jsx.d.ts 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337
  1. import { Ref, ComponentPublicInstance } from '@vue/runtime-core'
  2. // This code is based on react definition in DefinitelyTyped published under the MIT license.
  3. // Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
  4. // Path in the repository: types/react/index.d.ts
  5. //
  6. // Copyrights of original definition are:
  7. // AssureSign <http://www.assuresign.com>
  8. // Microsoft <https://microsoft.com>
  9. // John Reilly <https://github.com/johnnyreilly>
  10. // Benoit Benezech <https://github.com/bbenezech>
  11. // Patricio Zavolinsky <https://github.com/pzavolinsky>
  12. // Digiguru <https://github.com/digiguru>
  13. // Eric Anderson <https://github.com/ericanderson>
  14. // Dovydas Navickas <https://github.com/DovydasNavickas>
  15. // Josh Rutherford <https://github.com/theruther4d>
  16. // Guilherme Hübner <https://github.com/guilhermehubner>
  17. // Ferdy Budhidharma <https://github.com/ferdaber>
  18. // Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
  19. // Olivier Pascal <https://github.com/pascaloliv>
  20. // Martin Hochel <https://github.com/hotell>
  21. // Frank Li <https://github.com/franklixuefei>
  22. // Jessica Franco <https://github.com/Jessidhia>
  23. // Saransh Kataria <https://github.com/saranshkataria>
  24. // Kanitkorn Sujautra <https://github.com/lukyth>
  25. // Sebastian Silbermann <https://github.com/eps1lon>
  26. import * as CSS from 'csstype'
  27. export interface CSSProperties extends CSS.Properties<string | number> {
  28. /**
  29. * The index signature was removed to enable closed typing for style
  30. * using CSSType. You're able to use type assertion or module augmentation
  31. * to add properties or an index signature of your own.
  32. *
  33. * For examples and more information, visit:
  34. * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
  35. */
  36. }
  37. type Booleanish = boolean | 'true' | 'false'
  38. // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
  39. interface AriaAttributes {
  40. /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
  41. 'aria-activedescendant'?: string
  42. /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
  43. 'aria-atomic'?: boolean | 'false' | 'true'
  44. /**
  45. * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
  46. * presented if they are made.
  47. */
  48. 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'
  49. /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
  50. 'aria-busy'?: boolean | 'false' | 'true'
  51. /**
  52. * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
  53. * @see aria-pressed @see aria-selected.
  54. */
  55. 'aria-checked'?: boolean | 'false' | 'mixed' | 'true'
  56. /**
  57. * Defines the total number of columns in a table, grid, or treegrid.
  58. * @see aria-colindex.
  59. */
  60. 'aria-colcount'?: number
  61. /**
  62. * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
  63. * @see aria-colcount @see aria-colspan.
  64. */
  65. 'aria-colindex'?: number
  66. /**
  67. * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
  68. * @see aria-colindex @see aria-rowspan.
  69. */
  70. 'aria-colspan'?: number
  71. /**
  72. * Identifies the element (or elements) whose contents or presence are controlled by the current element.
  73. * @see aria-owns.
  74. */
  75. 'aria-controls'?: string
  76. /** Indicates the element that represents the current item within a container or set of related elements. */
  77. 'aria-current'?:
  78. | boolean
  79. | 'false'
  80. | 'true'
  81. | 'page'
  82. | 'step'
  83. | 'location'
  84. | 'date'
  85. | 'time'
  86. /**
  87. * Identifies the element (or elements) that describes the object.
  88. * @see aria-labelledby
  89. */
  90. 'aria-describedby'?: string
  91. /**
  92. * Identifies the element that provides a detailed, extended description for the object.
  93. * @see aria-describedby.
  94. */
  95. 'aria-details'?: string
  96. /**
  97. * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
  98. * @see aria-hidden @see aria-readonly.
  99. */
  100. 'aria-disabled'?: boolean | 'false' | 'true'
  101. /**
  102. * Indicates what functions can be performed when a dragged object is released on the drop target.
  103. * @deprecated in ARIA 1.1
  104. */
  105. 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'
  106. /**
  107. * Identifies the element that provides an error message for the object.
  108. * @see aria-invalid @see aria-describedby.
  109. */
  110. 'aria-errormessage'?: string
  111. /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
  112. 'aria-expanded'?: boolean | 'false' | 'true'
  113. /**
  114. * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
  115. * allows assistive technology to override the general default of reading in document source order.
  116. */
  117. 'aria-flowto'?: string
  118. /**
  119. * Indicates an element's "grabbed" state in a drag-and-drop operation.
  120. * @deprecated in ARIA 1.1
  121. */
  122. 'aria-grabbed'?: boolean | 'false' | 'true'
  123. /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
  124. 'aria-haspopup'?:
  125. | boolean
  126. | 'false'
  127. | 'true'
  128. | 'menu'
  129. | 'listbox'
  130. | 'tree'
  131. | 'grid'
  132. | 'dialog'
  133. /**
  134. * Indicates whether the element is exposed to an accessibility API.
  135. * @see aria-disabled.
  136. */
  137. 'aria-hidden'?: boolean | 'false' | 'true'
  138. /**
  139. * Indicates the entered value does not conform to the format expected by the application.
  140. * @see aria-errormessage.
  141. */
  142. 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling'
  143. /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
  144. 'aria-keyshortcuts'?: string
  145. /**
  146. * Defines a string value that labels the current element.
  147. * @see aria-labelledby.
  148. */
  149. 'aria-label'?: string
  150. /**
  151. * Identifies the element (or elements) that labels the current element.
  152. * @see aria-describedby.
  153. */
  154. 'aria-labelledby'?: string
  155. /** Defines the hierarchical level of an element within a structure. */
  156. 'aria-level'?: number
  157. /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
  158. 'aria-live'?: 'off' | 'assertive' | 'polite'
  159. /** Indicates whether an element is modal when displayed. */
  160. 'aria-modal'?: boolean | 'false' | 'true'
  161. /** Indicates whether a text box accepts multiple lines of input or only a single line. */
  162. 'aria-multiline'?: boolean | 'false' | 'true'
  163. /** Indicates that the user may select more than one item from the current selectable descendants. */
  164. 'aria-multiselectable'?: boolean | 'false' | 'true'
  165. /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
  166. 'aria-orientation'?: 'horizontal' | 'vertical'
  167. /**
  168. * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
  169. * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
  170. * @see aria-controls.
  171. */
  172. 'aria-owns'?: string
  173. /**
  174. * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
  175. * A hint could be a sample value or a brief description of the expected format.
  176. */
  177. 'aria-placeholder'?: string
  178. /**
  179. * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
  180. * @see aria-setsize.
  181. */
  182. 'aria-posinset'?: number
  183. /**
  184. * Indicates the current "pressed" state of toggle buttons.
  185. * @see aria-checked @see aria-selected.
  186. */
  187. 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true'
  188. /**
  189. * Indicates that the element is not editable, but is otherwise operable.
  190. * @see aria-disabled.
  191. */
  192. 'aria-readonly'?: boolean | 'false' | 'true'
  193. /**
  194. * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
  195. * @see aria-atomic.
  196. */
  197. 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text'
  198. /** Indicates that user input is required on the element before a form may be submitted. */
  199. 'aria-required'?: boolean | 'false' | 'true'
  200. /** Defines a human-readable, author-localized description for the role of an element. */
  201. 'aria-roledescription'?: string
  202. /**
  203. * Defines the total number of rows in a table, grid, or treegrid.
  204. * @see aria-rowindex.
  205. */
  206. 'aria-rowcount'?: number
  207. /**
  208. * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
  209. * @see aria-rowcount @see aria-rowspan.
  210. */
  211. 'aria-rowindex'?: number
  212. /**
  213. * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
  214. * @see aria-rowindex @see aria-colspan.
  215. */
  216. 'aria-rowspan'?: number
  217. /**
  218. * Indicates the current "selected" state of various widgets.
  219. * @see aria-checked @see aria-pressed.
  220. */
  221. 'aria-selected'?: boolean | 'false' | 'true'
  222. /**
  223. * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
  224. * @see aria-posinset.
  225. */
  226. 'aria-setsize'?: number
  227. /** Indicates if items in a table or grid are sorted in ascending or descending order. */
  228. 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'
  229. /** Defines the maximum allowed value for a range widget. */
  230. 'aria-valuemax'?: number
  231. /** Defines the minimum allowed value for a range widget. */
  232. 'aria-valuemin'?: number
  233. /**
  234. * Defines the current value for a range widget.
  235. * @see aria-valuetext.
  236. */
  237. 'aria-valuenow'?: number
  238. /** Defines the human readable text alternative of aria-valuenow for a range widget. */
  239. 'aria-valuetext'?: string
  240. }
  241. export interface HTMLAttributes extends AriaAttributes {
  242. domPropsInnerHTML?: string
  243. class?: any
  244. style?: string | CSSProperties
  245. // Standard HTML Attributes
  246. accesskey?: string
  247. contenteditable?: Booleanish | 'inherit'
  248. contextmenu?: string
  249. dir?: string
  250. draggable?: Booleanish
  251. hidden?: boolean
  252. id?: string
  253. lang?: string
  254. placeholder?: string
  255. spellcheck?: Booleanish
  256. tabindex?: number
  257. title?: string
  258. translate?: 'yes' | 'no'
  259. // Unknown
  260. radiogroup?: string // <command>, <menuitem>
  261. // WAI-ARIA
  262. role?: string
  263. // RDFa Attributes
  264. about?: string
  265. datatype?: string
  266. inlist?: any
  267. prefix?: string
  268. property?: string
  269. resource?: string
  270. typeof?: string
  271. vocab?: string
  272. // Non-standard Attributes
  273. autocapitalize?: string
  274. autocorrect?: string
  275. autocave?: string
  276. color?: string
  277. itemprop?: string
  278. itemscope?: boolean
  279. itemtype?: string
  280. itemid?: string
  281. itemref?: string
  282. results?: number
  283. security?: string
  284. unselectable?: 'on' | 'off'
  285. // Living Standard
  286. /**
  287. * Hints at the type of data that might be entered by the user while editing the element or its contents
  288. * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
  289. */
  290. inputmode?:
  291. | 'none'
  292. | 'text'
  293. | 'tel'
  294. | 'url'
  295. | 'email'
  296. | 'numeric'
  297. | 'decimal'
  298. | 'search'
  299. /**
  300. * Specify that a standard HTML element should behave like a defined custom built-in element
  301. * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
  302. */
  303. is?: string
  304. }
  305. export interface AnchorHTMLAttributes extends HTMLAttributes {
  306. download?: any
  307. href?: string
  308. hreflang?: string
  309. media?: string
  310. ping?: string
  311. rel?: string
  312. target?: string
  313. type?: string
  314. referrerpolicy?: string
  315. }
  316. export interface AreaHTMLAttributes extends HTMLAttributes {
  317. alt?: string
  318. coords?: string
  319. download?: any
  320. href?: string
  321. hreflang?: string
  322. media?: string
  323. rel?: string
  324. shape?: string
  325. target?: string
  326. }
  327. export interface AudioHTMLAttributes extends MediaHTMLAttributes {}
  328. export interface BaseHTMLAttributes extends HTMLAttributes {
  329. href?: string
  330. target?: string
  331. }
  332. export interface BlockquoteHTMLAttributes extends HTMLAttributes {
  333. cite?: string
  334. }
  335. export interface ButtonHTMLAttributes extends HTMLAttributes {
  336. autofocus?: boolean
  337. disabled?: boolean
  338. form?: string
  339. formaction?: string
  340. formenctype?: string
  341. formmethod?: string
  342. formnovalidate?: boolean
  343. formtarget?: string
  344. name?: string
  345. type?: 'submit' | 'reset' | 'button'
  346. value?: string | string[] | number
  347. }
  348. export interface CanvasHTMLAttributes extends HTMLAttributes {
  349. height?: number | string
  350. width?: number | string
  351. }
  352. export interface ColHTMLAttributes extends HTMLAttributes {
  353. span?: number
  354. width?: number | string
  355. }
  356. export interface ColgroupHTMLAttributes extends HTMLAttributes {
  357. span?: number
  358. }
  359. export interface DataHTMLAttributes extends HTMLAttributes {
  360. value?: string | string[] | number
  361. }
  362. export interface DetailsHTMLAttributes extends HTMLAttributes {
  363. open?: boolean
  364. }
  365. export interface DelHTMLAttributes extends HTMLAttributes {
  366. cite?: string
  367. datetime?: string
  368. }
  369. export interface DialogHTMLAttributes extends HTMLAttributes {
  370. open?: boolean
  371. }
  372. export interface EmbedHTMLAttributes extends HTMLAttributes {
  373. height?: number | string
  374. src?: string
  375. type?: string
  376. width?: number | string
  377. }
  378. export interface FieldsetHTMLAttributes extends HTMLAttributes {
  379. disabled?: boolean
  380. form?: string
  381. name?: string
  382. }
  383. export interface FormHTMLAttributes extends HTMLAttributes {
  384. acceptcharset?: string
  385. action?: string
  386. autocomplete?: string
  387. enctype?: string
  388. method?: string
  389. name?: string
  390. novalidate?: boolean
  391. target?: string
  392. }
  393. export interface HtmlHTMLAttributes extends HTMLAttributes {
  394. manifest?: string
  395. }
  396. export interface IframeHTMLAttributes extends HTMLAttributes {
  397. allow?: string
  398. allowfullscreen?: boolean
  399. allowtransparency?: boolean
  400. frameborder?: number | string
  401. height?: number | string
  402. marginheight?: number
  403. marginwidth?: number
  404. name?: string
  405. referrerpolicy?: string
  406. sandbox?: string
  407. scrolling?: string
  408. seamless?: boolean
  409. src?: string
  410. srcdoc?: string
  411. width?: number | string
  412. }
  413. export interface ImgHTMLAttributes extends HTMLAttributes {
  414. alt?: string
  415. crossorigin?: 'anonymous' | 'use-credentials' | ''
  416. decoding?: 'async' | 'auto' | 'sync'
  417. height?: number | string
  418. sizes?: string
  419. src?: string
  420. srcset?: string
  421. usemap?: string
  422. width?: number | string
  423. }
  424. export interface InsHTMLAttributes extends HTMLAttributes {
  425. cite?: string
  426. datetime?: string
  427. }
  428. export interface InputHTMLAttributes extends HTMLAttributes {
  429. accept?: string
  430. alt?: string
  431. autocomplete?: string
  432. autofocus?: boolean
  433. capture?: boolean // https://www.w3.org/tr/html-media-capture/#the-capture-attribute
  434. checked?: boolean
  435. crossorigin?: string
  436. disabled?: boolean
  437. form?: string
  438. formaction?: string
  439. formenctype?: string
  440. formmethod?: string
  441. formnovalidate?: boolean
  442. formtarget?: string
  443. height?: number | string
  444. list?: string
  445. max?: number | string
  446. maxlength?: number
  447. min?: number | string
  448. minlength?: number
  449. multiple?: boolean
  450. name?: string
  451. pattern?: string
  452. placeholder?: string
  453. readonly?: boolean
  454. required?: boolean
  455. size?: number
  456. src?: string
  457. step?: number | string
  458. type?: string
  459. value?: string | string[] | number
  460. width?: number | string
  461. }
  462. export interface KeygenHTMLAttributes extends HTMLAttributes {
  463. autofocus?: boolean
  464. challenge?: string
  465. disabled?: boolean
  466. form?: string
  467. keytype?: string
  468. keyparams?: string
  469. name?: string
  470. }
  471. export interface LabelHTMLAttributes extends HTMLAttributes {
  472. for?: string
  473. form?: string
  474. }
  475. export interface LiHTMLAttributes extends HTMLAttributes {
  476. value?: string | string[] | number
  477. }
  478. export interface LinkHTMLAttributes extends HTMLAttributes {
  479. as?: string
  480. crossorigin?: string
  481. href?: string
  482. hreflang?: string
  483. integrity?: string
  484. media?: string
  485. rel?: string
  486. sizes?: string
  487. type?: string
  488. }
  489. export interface MapHTMLAttributes extends HTMLAttributes {
  490. name?: string
  491. }
  492. export interface MenuHTMLAttributes extends HTMLAttributes {
  493. type?: string
  494. }
  495. export interface MediaHTMLAttributes extends HTMLAttributes {
  496. autoplay?: boolean
  497. controls?: boolean
  498. controlslist?: string
  499. crossorigin?: string
  500. loop?: boolean
  501. mediagroup?: string
  502. muted?: boolean
  503. playsinline?: boolean
  504. preload?: string
  505. src?: string
  506. }
  507. export interface MetaHTMLAttributes extends HTMLAttributes {
  508. charset?: string
  509. content?: string
  510. httpequiv?: string
  511. name?: string
  512. }
  513. export interface MeterHTMLAttributes extends HTMLAttributes {
  514. form?: string
  515. high?: number
  516. low?: number
  517. max?: number | string
  518. min?: number | string
  519. optimum?: number
  520. value?: string | string[] | number
  521. }
  522. export interface QuoteHTMLAttributes extends HTMLAttributes {
  523. cite?: string
  524. }
  525. export interface ObjectHTMLAttributes extends HTMLAttributes {
  526. classid?: string
  527. data?: string
  528. form?: string
  529. height?: number | string
  530. name?: string
  531. type?: string
  532. usemap?: string
  533. width?: number | string
  534. wmode?: string
  535. }
  536. export interface OlHTMLAttributes extends HTMLAttributes {
  537. reversed?: boolean
  538. start?: number
  539. type?: '1' | 'a' | 'A' | 'i' | 'I'
  540. }
  541. export interface OptgroupHTMLAttributes extends HTMLAttributes {
  542. disabled?: boolean
  543. label?: string
  544. }
  545. export interface OptionHTMLAttributes extends HTMLAttributes {
  546. disabled?: boolean
  547. label?: string
  548. selected?: boolean
  549. value?: string | string[] | number
  550. }
  551. export interface OutputHTMLAttributes extends HTMLAttributes {
  552. for?: string
  553. form?: string
  554. name?: string
  555. }
  556. export interface ParamHTMLAttributes extends HTMLAttributes {
  557. name?: string
  558. value?: string | string[] | number
  559. }
  560. export interface ProgressHTMLAttributes extends HTMLAttributes {
  561. max?: number | string
  562. value?: string | string[] | number
  563. }
  564. export interface ScriptHTMLAttributes extends HTMLAttributes {
  565. async?: boolean
  566. charset?: string
  567. crossorigin?: string
  568. defer?: boolean
  569. integrity?: string
  570. nomodule?: boolean
  571. nonce?: string
  572. src?: string
  573. type?: string
  574. }
  575. export interface SelectHTMLAttributes extends HTMLAttributes {
  576. autocomplete?: string
  577. autofocus?: boolean
  578. disabled?: boolean
  579. form?: string
  580. multiple?: boolean
  581. name?: string
  582. required?: boolean
  583. size?: number
  584. value?: string | string[] | number
  585. }
  586. export interface SourceHTMLAttributes extends HTMLAttributes {
  587. media?: string
  588. sizes?: string
  589. src?: string
  590. srcset?: string
  591. type?: string
  592. }
  593. export interface StyleHTMLAttributes extends HTMLAttributes {
  594. media?: string
  595. nonce?: string
  596. scoped?: boolean
  597. type?: string
  598. }
  599. export interface TableHTMLAttributes extends HTMLAttributes {
  600. cellpadding?: number | string
  601. cellspacing?: number | string
  602. summary?: string
  603. }
  604. export interface TextareaHTMLAttributes extends HTMLAttributes {
  605. autocomplete?: string
  606. autofocus?: boolean
  607. cols?: number
  608. dirname?: string
  609. disabled?: boolean
  610. form?: string
  611. maxlength?: number
  612. minlength?: number
  613. name?: string
  614. placeholder?: string
  615. readonly?: boolean
  616. required?: boolean
  617. rows?: number
  618. value?: string | string[] | number
  619. wrap?: string
  620. }
  621. export interface TdHTMLAttributes extends HTMLAttributes {
  622. align?: 'left' | 'center' | 'right' | 'justify' | 'char'
  623. colspan?: number
  624. headers?: string
  625. rowspan?: number
  626. scope?: string
  627. valign?: 'top' | 'middle' | 'bottom' | 'baseline'
  628. }
  629. export interface ThHTMLAttributes extends HTMLAttributes {
  630. align?: 'left' | 'center' | 'right' | 'justify' | 'char'
  631. colspan?: number
  632. headers?: string
  633. rowspan?: number
  634. scope?: string
  635. }
  636. export interface TimeHTMLAttributes extends HTMLAttributes {
  637. datetime?: string
  638. }
  639. export interface TrackHTMLAttributes extends HTMLAttributes {
  640. default?: boolean
  641. kind?: string
  642. label?: string
  643. src?: string
  644. srclang?: string
  645. }
  646. export interface VideoHTMLAttributes extends MediaHTMLAttributes {
  647. height?: number | string
  648. playsinline?: boolean
  649. poster?: string
  650. width?: number | string
  651. disablePictureInPicture?: boolean
  652. }
  653. export interface WebViewHTMLAttributes extends HTMLAttributes {
  654. allowfullscreen?: boolean
  655. allowpopups?: boolean
  656. autoFocus?: boolean
  657. autosize?: boolean
  658. blinkfeatures?: string
  659. disableblinkfeatures?: string
  660. disableguestresize?: boolean
  661. disablewebsecurity?: boolean
  662. guestinstance?: string
  663. httpreferrer?: string
  664. nodeintegration?: boolean
  665. partition?: string
  666. plugins?: boolean
  667. preload?: string
  668. src?: string
  669. useragent?: string
  670. webpreferences?: string
  671. }
  672. export interface SVGAttributes extends AriaAttributes {
  673. domPropsInnerHTML?: string
  674. color?: string
  675. height?: number | string
  676. id?: string
  677. lang?: string
  678. max?: number | string
  679. media?: string
  680. method?: string
  681. min?: number | string
  682. name?: string
  683. target?: string
  684. type?: string
  685. width?: number | string
  686. // Other HTML properties supported by SVG elements in browsers
  687. role?: string
  688. tabindex?: number
  689. // SVG Specific attributes
  690. 'accent-height'?: number | string
  691. accumulate?: 'none' | 'sum'
  692. additive?: 'replace' | 'sum'
  693. 'alignment-baseline'?:
  694. | 'auto'
  695. | 'baseline'
  696. | 'before-edge'
  697. | 'text-before-edge'
  698. | 'middle'
  699. | 'central'
  700. | 'after-edge'
  701. | 'text-after-edge'
  702. | 'ideographic'
  703. | 'alphabetic'
  704. | 'hanging'
  705. | 'mathematical'
  706. | 'inherit'
  707. allowReorder?: 'no' | 'yes'
  708. alphabetic?: number | string
  709. amplitude?: number | string
  710. 'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated'
  711. ascent?: number | string
  712. attributeName?: string
  713. attributeType?: string
  714. autoReverse?: number | string
  715. azimuth?: number | string
  716. baseFrequency?: number | string
  717. 'baseline-shift'?: number | string
  718. baseProfile?: number | string
  719. bbox?: number | string
  720. begin?: number | string
  721. bias?: number | string
  722. by?: number | string
  723. calcMode?: number | string
  724. 'cap-height'?: number | string
  725. clip?: number | string
  726. 'clip-path'?: string
  727. clipPathUnits?: number | string
  728. 'clip-rule'?: number | string
  729. 'color-interpolation'?: number | string
  730. 'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit'
  731. 'color-profile'?: number | string
  732. 'color-rendering'?: number | string
  733. contentScriptType?: number | string
  734. contentStyleType?: number | string
  735. cursor?: number | string
  736. cx?: number | string
  737. cy?: number | string
  738. d?: string
  739. decelerate?: number | string
  740. descent?: number | string
  741. diffuseConstant?: number | string
  742. direction?: number | string
  743. display?: number | string
  744. divisor?: number | string
  745. 'dominant-baseline'?: number | string
  746. dur?: number | string
  747. dx?: number | string
  748. dy?: number | string
  749. edgeMode?: number | string
  750. elevation?: number | string
  751. 'enable-background'?: number | string
  752. end?: number | string
  753. exponent?: number | string
  754. externalResourcesRequired?: number | string
  755. fill?: string
  756. 'fill-opacity'?: number | string
  757. 'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit'
  758. filter?: string
  759. filterRes?: number | string
  760. filterUnits?: number | string
  761. 'flood-color'?: number | string
  762. 'flood-opacity'?: number | string
  763. focusable?: number | string
  764. 'font-family'?: string
  765. 'font-size'?: number | string
  766. 'font-size-adjust'?: number | string
  767. 'font-stretch'?: number | string
  768. 'font-style'?: number | string
  769. 'font-variant'?: number | string
  770. 'font-weight'?: number | string
  771. format?: number | string
  772. from?: number | string
  773. fx?: number | string
  774. fy?: number | string
  775. g1?: number | string
  776. g2?: number | string
  777. 'glyph-name'?: number | string
  778. 'glyph-orientation-horizontal'?: number | string
  779. 'glyph-orientation-vertical'?: number | string
  780. glyphRef?: number | string
  781. gradientTransform?: string
  782. gradientUnits?: string
  783. hanging?: number | string
  784. 'horiz-adv-x'?: number | string
  785. 'horiz-origin-x'?: number | string
  786. href?: string
  787. ideographic?: number | string
  788. 'image-rendering'?: number | string
  789. in2?: number | string
  790. in?: string
  791. intercept?: number | string
  792. k1?: number | string
  793. k2?: number | string
  794. k3?: number | string
  795. k4?: number | string
  796. k?: number | string
  797. kernelMatrix?: number | string
  798. kernelUnitLength?: number | string
  799. kerning?: number | string
  800. keyPoints?: number | string
  801. keySplines?: number | string
  802. keyTimes?: number | string
  803. lengthAdjust?: number | string
  804. 'letter-spacing'?: number | string
  805. 'lighting-color'?: number | string
  806. limitingConeAngle?: number | string
  807. local?: number | string
  808. 'marker-end'?: string
  809. markerHeight?: number | string
  810. 'marker-mid'?: string
  811. 'marker-start'?: string
  812. markerUnits?: number | string
  813. markerWidth?: number | string
  814. mask?: string
  815. maskContentUnits?: number | string
  816. maskUnits?: number | string
  817. mathematical?: number | string
  818. mode?: number | string
  819. numOctaves?: number | string
  820. offset?: number | string
  821. opacity?: number | string
  822. operator?: number | string
  823. order?: number | string
  824. orient?: number | string
  825. orientation?: number | string
  826. origin?: number | string
  827. overflow?: number | string
  828. 'overline-position'?: number | string
  829. 'overline-thickness'?: number | string
  830. 'paint-order'?: number | string
  831. 'panose-1'?: number | string
  832. pathLength?: number | string
  833. patternContentUnits?: string
  834. patternTransform?: number | string
  835. patternUnits?: string
  836. 'pointer-events'?: number | string
  837. points?: string
  838. pointsAtX?: number | string
  839. pointsAtY?: number | string
  840. pointsAtZ?: number | string
  841. preserveAlpha?: number | string
  842. preserveAspectRatio?: string
  843. primitiveUnits?: number | string
  844. r?: number | string
  845. radius?: number | string
  846. refX?: number | string
  847. refY?: number | string
  848. renderingIntent?: number | string
  849. repeatCount?: number | string
  850. repeatDur?: number | string
  851. requiredExtensions?: number | string
  852. requiredFeatures?: number | string
  853. restart?: number | string
  854. result?: string
  855. rotate?: number | string
  856. rx?: number | string
  857. ry?: number | string
  858. scale?: number | string
  859. seed?: number | string
  860. 'shape-rendering'?: number | string
  861. slope?: number | string
  862. spacing?: number | string
  863. specularConstant?: number | string
  864. specularExponent?: number | string
  865. speed?: number | string
  866. spreadMethod?: string
  867. startOffset?: number | string
  868. stdDeviation?: number | string
  869. stemh?: number | string
  870. stemv?: number | string
  871. stitchTiles?: number | string
  872. 'stop-color'?: string
  873. 'stop-opacity'?: number | string
  874. 'strikethrough-position'?: number | string
  875. 'strikethrough-thickness'?: number | string
  876. string?: number | string
  877. stroke?: string
  878. 'stroke-dasharray'?: string | number
  879. 'stroke-dashoffset'?: string | number
  880. 'stroke-linecap'?: 'butt' | 'round' | 'square' | 'inherit'
  881. 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | 'inherit'
  882. 'stroke-miterlimit'?: number | string
  883. 'stroke-opacity'?: number | string
  884. 'stroke-width'?: number | string
  885. surfaceScale?: number | string
  886. systemLanguage?: number | string
  887. tableValues?: number | string
  888. targetX?: number | string
  889. targetY?: number | string
  890. 'text-anchor'?: string
  891. 'text-decoration'?: number | string
  892. textLength?: number | string
  893. 'text-rendering'?: number | string
  894. to?: number | string
  895. transform?: string
  896. u1?: number | string
  897. u2?: number | string
  898. 'underline-position'?: number | string
  899. 'underline-thickness'?: number | string
  900. unicode?: number | string
  901. 'unicode-bidi'?: number | string
  902. 'unicode-range'?: number | string
  903. 'unitsPer-em'?: number | string
  904. 'v-alphabetic'?: number | string
  905. values?: string
  906. 'vector-effect'?: number | string
  907. version?: string
  908. 'vert-adv-y'?: number | string
  909. 'vert-origin-x'?: number | string
  910. 'vert-origin-y'?: number | string
  911. 'v-hanging'?: number | string
  912. 'v-ideographic'?: number | string
  913. viewBox?: string
  914. viewTarget?: number | string
  915. visibility?: number | string
  916. 'v-mathematical'?: number | string
  917. widths?: number | string
  918. 'word-spacing'?: number | string
  919. 'writing-mode'?: number | string
  920. x1?: number | string
  921. x2?: number | string
  922. x?: number | string
  923. xChannelSelector?: string
  924. 'x-height'?: number | string
  925. xlinkActuate?: string
  926. xlinkArcrole?: string
  927. xlinkHref?: string
  928. xlinkRole?: string
  929. xlinkShow?: string
  930. xlinkTitle?: string
  931. xlinkType?: string
  932. y1?: number | string
  933. y2?: number | string
  934. y?: number | string
  935. yChannelSelector?: string
  936. z?: number | string
  937. zoomAndPan?: string
  938. }
  939. interface IntrinsicElementAttributes {
  940. a: AnchorHTMLAttributes
  941. abbr: HTMLAttributes
  942. address: HTMLAttributes
  943. area: AreaHTMLAttributes
  944. article: HTMLAttributes
  945. aside: HTMLAttributes
  946. audio: AudioHTMLAttributes
  947. b: HTMLAttributes
  948. base: BaseHTMLAttributes
  949. bdi: HTMLAttributes
  950. bdo: HTMLAttributes
  951. big: HTMLAttributes
  952. blockquote: BlockquoteHTMLAttributes
  953. body: HTMLAttributes
  954. br: HTMLAttributes
  955. button: ButtonHTMLAttributes
  956. canvas: CanvasHTMLAttributes
  957. caption: HTMLAttributes
  958. cite: HTMLAttributes
  959. code: HTMLAttributes
  960. col: ColHTMLAttributes
  961. colgroup: ColgroupHTMLAttributes
  962. data: DataHTMLAttributes
  963. datalist: HTMLAttributes
  964. dd: HTMLAttributes
  965. del: DelHTMLAttributes
  966. details: DetailsHTMLAttributes
  967. dfn: HTMLAttributes
  968. dialog: DialogHTMLAttributes
  969. div: HTMLAttributes
  970. dl: HTMLAttributes
  971. dt: HTMLAttributes
  972. em: HTMLAttributes
  973. embed: EmbedHTMLAttributes
  974. fieldset: FieldsetHTMLAttributes
  975. figcaption: HTMLAttributes
  976. figure: HTMLAttributes
  977. footer: HTMLAttributes
  978. form: FormHTMLAttributes
  979. h1: HTMLAttributes
  980. h2: HTMLAttributes
  981. h3: HTMLAttributes
  982. h4: HTMLAttributes
  983. h5: HTMLAttributes
  984. h6: HTMLAttributes
  985. head: HTMLAttributes
  986. header: HTMLAttributes
  987. hgroup: HTMLAttributes
  988. hr: HTMLAttributes
  989. html: HtmlHTMLAttributes
  990. i: HTMLAttributes
  991. iframe: IframeHTMLAttributes
  992. img: ImgHTMLAttributes
  993. input: InputHTMLAttributes
  994. ins: InsHTMLAttributes
  995. kbd: HTMLAttributes
  996. keygen: KeygenHTMLAttributes
  997. label: LabelHTMLAttributes
  998. legend: HTMLAttributes
  999. li: LiHTMLAttributes
  1000. link: LinkHTMLAttributes
  1001. main: HTMLAttributes
  1002. map: MapHTMLAttributes
  1003. mark: HTMLAttributes
  1004. menu: MenuHTMLAttributes
  1005. menuitem: HTMLAttributes
  1006. meta: MetaHTMLAttributes
  1007. meter: MeterHTMLAttributes
  1008. nav: HTMLAttributes
  1009. noindex: HTMLAttributes
  1010. noscript: HTMLAttributes
  1011. object: ObjectHTMLAttributes
  1012. ol: OlHTMLAttributes
  1013. optgroup: OptgroupHTMLAttributes
  1014. option: OptionHTMLAttributes
  1015. output: OutputHTMLAttributes
  1016. p: HTMLAttributes
  1017. param: ParamHTMLAttributes
  1018. picture: HTMLAttributes
  1019. pre: HTMLAttributes
  1020. progress: ProgressHTMLAttributes
  1021. q: QuoteHTMLAttributes
  1022. rp: HTMLAttributes
  1023. rt: HTMLAttributes
  1024. ruby: HTMLAttributes
  1025. s: HTMLAttributes
  1026. samp: HTMLAttributes
  1027. script: ScriptHTMLAttributes
  1028. section: HTMLAttributes
  1029. select: SelectHTMLAttributes
  1030. small: HTMLAttributes
  1031. source: SourceHTMLAttributes
  1032. span: HTMLAttributes
  1033. strong: HTMLAttributes
  1034. style: StyleHTMLAttributes
  1035. sub: HTMLAttributes
  1036. summary: HTMLAttributes
  1037. sup: HTMLAttributes
  1038. table: TableHTMLAttributes
  1039. template: HTMLAttributes
  1040. tbody: HTMLAttributes
  1041. td: TdHTMLAttributes
  1042. textarea: TextareaHTMLAttributes
  1043. tfoot: HTMLAttributes
  1044. th: ThHTMLAttributes
  1045. thead: HTMLAttributes
  1046. time: TimeHTMLAttributes
  1047. title: HTMLAttributes
  1048. tr: HTMLAttributes
  1049. track: TrackHTMLAttributes
  1050. u: HTMLAttributes
  1051. ul: HTMLAttributes
  1052. var: HTMLAttributes
  1053. video: VideoHTMLAttributes
  1054. wbr: HTMLAttributes
  1055. webview: WebViewHTMLAttributes
  1056. // SVG
  1057. svg: SVGAttributes
  1058. animate: SVGAttributes
  1059. animateMotion: SVGAttributes
  1060. animateTransform: SVGAttributes
  1061. circle: SVGAttributes
  1062. clipPath: SVGAttributes
  1063. defs: SVGAttributes
  1064. desc: SVGAttributes
  1065. ellipse: SVGAttributes
  1066. feBlend: SVGAttributes
  1067. feColorMatrix: SVGAttributes
  1068. feComponentTransfer: SVGAttributes
  1069. feComposite: SVGAttributes
  1070. feConvolveMatrix: SVGAttributes
  1071. feDiffuseLighting: SVGAttributes
  1072. feDisplacementMap: SVGAttributes
  1073. feDistantLight: SVGAttributes
  1074. feDropShadow: SVGAttributes
  1075. feFlood: SVGAttributes
  1076. feFuncA: SVGAttributes
  1077. feFuncB: SVGAttributes
  1078. feFuncG: SVGAttributes
  1079. feFuncR: SVGAttributes
  1080. feGaussianBlur: SVGAttributes
  1081. feImage: SVGAttributes
  1082. feMerge: SVGAttributes
  1083. feMergeNode: SVGAttributes
  1084. feMorphology: SVGAttributes
  1085. feOffset: SVGAttributes
  1086. fePointLight: SVGAttributes
  1087. feSpecularLighting: SVGAttributes
  1088. feSpotLight: SVGAttributes
  1089. feTile: SVGAttributes
  1090. feTurbulence: SVGAttributes
  1091. filter: SVGAttributes
  1092. foreignObject: SVGAttributes
  1093. g: SVGAttributes
  1094. image: SVGAttributes
  1095. line: SVGAttributes
  1096. linearGradient: SVGAttributes
  1097. marker: SVGAttributes
  1098. mask: SVGAttributes
  1099. metadata: SVGAttributes
  1100. mpath: SVGAttributes
  1101. path: SVGAttributes
  1102. pattern: SVGAttributes
  1103. polygon: SVGAttributes
  1104. polyline: SVGAttributes
  1105. radialGradient: SVGAttributes
  1106. rect: SVGAttributes
  1107. stop: SVGAttributes
  1108. switch: SVGAttributes
  1109. symbol: SVGAttributes
  1110. text: SVGAttributes
  1111. textPath: SVGAttributes
  1112. tspan: SVGAttributes
  1113. use: SVGAttributes
  1114. view: SVGAttributes
  1115. }
  1116. export interface Events {
  1117. // clipboard events
  1118. onCopy: ClipboardEvent
  1119. onCut: ClipboardEvent
  1120. onPaste: ClipboardEvent
  1121. // composition events
  1122. onCompositionend: CompositionEvent
  1123. onCompositionstart: CompositionEvent
  1124. onCompositionupdate: CompositionEvent
  1125. // drag drop events
  1126. onDrag: DragEvent
  1127. onDragend: DragEvent
  1128. onDragenter: DragEvent
  1129. onDragexit: DragEvent
  1130. onDragleave: DragEvent
  1131. onDragover: DragEvent
  1132. onDragstart: DragEvent
  1133. onDrop: DragEvent
  1134. // focus events
  1135. onFocus: FocusEvent
  1136. onBlur: FocusEvent
  1137. // form events
  1138. onChange: Event
  1139. onBeforeinput: Event
  1140. onInput: Event
  1141. onReset: Event
  1142. onSubmit: Event
  1143. onInvalid: Event
  1144. // image events
  1145. onLoad: Event
  1146. onError: Event
  1147. // keyboard events
  1148. onKeydown: KeyboardEvent
  1149. onKeypress: KeyboardEvent
  1150. onKeyup: KeyboardEvent
  1151. // mouse events
  1152. onAuxclick: MouseEvent
  1153. onClick: MouseEvent
  1154. onContextmenu: MouseEvent
  1155. onDblclick: MouseEvent
  1156. onMousedown: MouseEvent
  1157. onMouseenter: MouseEvent
  1158. onMouseleave: MouseEvent
  1159. onMousemove: MouseEvent
  1160. onMouseout: MouseEvent
  1161. onMouseover: MouseEvent
  1162. onMouseup: MouseEvent
  1163. // media events
  1164. onAbort: Event
  1165. onCanplay: Event
  1166. onCanplaythrough: Event
  1167. onDurationchange: Event
  1168. onEmptied: Event
  1169. onEncrypted: Event
  1170. onEnded: Event
  1171. onLoadeddata: Event
  1172. onLoadedmetadata: Event
  1173. onLoadstart: Event
  1174. onPause: Event
  1175. onPlay: Event
  1176. onPlaying: Event
  1177. onProgress: Event
  1178. onRatechange: Event
  1179. onSeeked: Event
  1180. onSeeking: Event
  1181. onStalled: Event
  1182. onSuspend: Event
  1183. onTimeupdate: Event
  1184. onVolumechange: Event
  1185. onWaiting: Event
  1186. // selection events
  1187. onSelect: Event
  1188. // UI events
  1189. onScroll: UIEvent
  1190. // touch events
  1191. onTouchcancel: TouchEvent
  1192. onTouchend: TouchEvent
  1193. onTouchmove: TouchEvent
  1194. onTouchstart: TouchEvent
  1195. // pointer events
  1196. onPointerdown: PointerEvent
  1197. onPointermove: PointerEvent
  1198. onPointerup: PointerEvent
  1199. onPointercancel: PointerEvent
  1200. onPointerenter: PointerEvent
  1201. onPointerleave: PointerEvent
  1202. onPointerover: PointerEvent
  1203. onPointerout: PointerEvent
  1204. // wheel events
  1205. onWheel: WheelEvent
  1206. // animation events
  1207. onAnimationstart: AnimationEvent
  1208. onAnimationend: AnimationEvent
  1209. onAnimationiteration: AnimationEvent
  1210. // transition events
  1211. onTransitionend: TransitionEvent
  1212. onTransitionstart: TransitionEvent
  1213. }
  1214. type StringKeyOf<T> = Extract<keyof T, string>
  1215. type EventHandlers<E> = {
  1216. [K in StringKeyOf<E>]?: E[K] extends Function ? E[K] : (payload: E[K]) => void
  1217. }
  1218. type ReservedProps = {
  1219. key?: string | number
  1220. ref?: string | Ref | ((ref: Element | ComponentPublicInstance | null) => void)
  1221. }
  1222. type ElementAttrs<T> = T & EventHandlers<Events> & ReservedProps
  1223. type NativeElements = {
  1224. [K in StringKeyOf<IntrinsicElementAttributes>]: ElementAttrs<
  1225. IntrinsicElementAttributes[K]
  1226. >
  1227. }
  1228. declare global {
  1229. namespace JSX {
  1230. interface Element {}
  1231. interface ElementClass {
  1232. $props: {}
  1233. }
  1234. interface ElementAttributesProperty {
  1235. $props: {}
  1236. }
  1237. interface IntrinsicElements extends NativeElements {
  1238. // allow arbitrary elements
  1239. [name: string]: any
  1240. }
  1241. }
  1242. }
  1243. // suppress ts:2669
  1244. export {}