-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro-jsx.d.ts
1467 lines (1378 loc) · 52.2 KB
/
astro-jsx.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference lib="dom" />
/* eslint @typescript-eslint/no-unused-vars: off */
/**
* Adapted from babel-plugin-react-html-attrs's TypeScript definition from DefinitelyTyped.
* @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/babel-plugin-react-html-attrs/index.d.ts
*
* and
*
* Adapted from React’s TypeScript definition from DefinitelyTyped.
* @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts
*/
declare namespace astroHTML.JSX {
export type Child = Node | Node[] | string | number | boolean | null | undefined | unknown;
export type Children = Child | Child[];
interface ElementChildrenAttribute {
// eslint-disable-next-line @typescript-eslint/ban-types
children: {};
}
interface IntrinsicAttributes extends AstroBuiltinProps, AstroBuiltinAttributes {
slot?: string;
children?: Children;
}
type AstroBuiltinProps = import('./dist/types/@types/astro').AstroBuiltinProps;
type AstroBuiltinAttributes = import('./dist/types/@types/astro').AstroBuiltinAttributes;
type AstroDefineVarsAttribute = import('./dist/types/@types/astro').AstroDefineVarsAttribute;
type AstroScriptAttributes = import('./dist/types/@types/astro').AstroScriptAttributes &
AstroDefineVarsAttribute;
type AstroStyleAttributes = import('./dist/types/@types/astro').AstroStyleAttributes &
AstroDefineVarsAttribute;
// This is an unfortunate use of `any`, but unfortunately we can't make a type that works for every framework
// without importing every single framework's types (which comes with its own set of problems).
// Using any isn't that bad here however as in Astro files the return type of a component isn't relevant in most cases
type Element = HTMLElement | any;
interface DOMAttributes {
children?: Children;
// Clipboard Events
oncopy?: string | undefined | null;
oncut?: string | undefined | null;
onpaste?: string | undefined | null;
// Composition Events
oncompositionend?: string | undefined | null;
oncompositionstart?: string | undefined | null;
oncompositionupdate?: string | undefined | null;
// Focus Events
onfocus?: string | undefined | null;
onfocusin?: string | undefined | null;
onfocusout?: string | undefined | null;
onblur?: string | undefined | null;
// Form Events
onchange?: string | undefined | null;
oninput?: string | undefined | null;
onreset?: string | undefined | null;
onsubmit?: string | undefined | null;
oninvalid?: string | undefined | null;
onbeforeinput?: string | undefined | null;
// Image Events
onload?: string | undefined | null;
onerror?: string | undefined | null; // also a Media Event
// Detail Events
ontoggle?: string | undefined | null;
// Keyboard Events
onkeydown?: string | undefined | null;
onkeypress?: string | undefined | null;
onkeyup?: string | undefined | null;
// Media Events
onabort?: string | undefined | null;
oncanplay?: string | undefined | null;
oncanplaythrough?: string | undefined | null;
oncuechange?: string | undefined | null;
ondurationchange?: string | undefined | null;
onemptied?: string | undefined | null;
onencrypted?: string | undefined | null;
onended?: string | undefined | null;
onloadeddata?: string | undefined | null;
onloadedmetadata?: string | undefined | null;
onloadstart?: string | undefined | null;
onpause?: string | undefined | null;
onplay?: string | undefined | null;
onplaying?: string | undefined | null;
onprogress?: string | undefined | null;
onratechange?: string | undefined | null;
onseeked?: string | undefined | null;
onseeking?: string | undefined | null;
onstalled?: string | undefined | null;
onsuspend?: string | undefined | null;
ontimeupdate?: string | undefined | null;
onvolumechange?: string | undefined | null;
onwaiting?: string | undefined | null;
// MouseEvents
onauxclick?: string | undefined | null;
onclick?: string | undefined | null;
oncontextmenu?: string | undefined | null;
ondblclick?: string | undefined | null;
ondrag?: string | undefined | null;
ondragend?: string | undefined | null;
ondragenter?: string | undefined | null;
ondragexit?: string | undefined | null;
ondragleave?: string | undefined | null;
ondragover?: string | undefined | null;
ondragstart?: string | undefined | null;
ondrop?: string | undefined | null;
onmousedown?: string | undefined | null;
onmouseenter?: string | undefined | null;
onmouseleave?: string | undefined | null;
onmousemove?: string | undefined | null;
onmouseout?: string | undefined | null;
onmouseover?: string | undefined | null;
onmouseup?: string | undefined | null;
// Selection Events
onselect?: string | undefined | null;
onselectionchange?: string | undefined | null;
onselectstart?: string | undefined | null;
// Touch Events
ontouchcancel?: string | undefined | null;
ontouchend?: string | undefined | null;
ontouchmove?: string | undefined | null;
ontouchstart?: string | undefined | null;
// Pointer Events
ongotpointercapture?: string | undefined | null;
onpointercancel?: string | undefined | null;
onpointerdown?: string | undefined | null;
onpointerenter?: string | undefined | null;
onpointerleave?: string | undefined | null;
onpointermove?: string | undefined | null;
onpointerout?: string | undefined | null;
onpointerover?: string | undefined | null;
onpointerup?: string | undefined | null;
onlostpointercapture?: string | undefined | null;
// UI Events
onscroll?: string | undefined | null;
onresize?: string | undefined | null;
// Wheel Events
onwheel?: string | undefined | null;
// Animation Events
onanimationstart?: string | undefined | null;
onanimationend?: string | undefined | null;
onanimationiteration?: string | undefined | null;
// Transition Events
ontransitionstart?: string | undefined | null;
ontransitionrun?: string | undefined | null;
ontransitionend?: string | undefined | null;
ontransitioncancel?: string | undefined | null;
// Message Events
onmessage?: string | undefined | null;
onmessageerror?: string | undefined | null;
// Global Events
oncancel?: string | undefined | null;
onclose?: string | undefined | null;
onfullscreenchange?: string | undefined | null;
onfullscreenerror?: string | undefined | null;
}
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
interface AriaAttributes {
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
'aria-activedescendant'?: string | undefined | null;
/** 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. */
'aria-atomic'?: boolean | 'false' | 'true' | undefined | null;
/**
* 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
* presented if they are made.
*/
'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' | undefined | null;
/** 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. */
'aria-busy'?: boolean | 'false' | 'true' | undefined | null;
/**
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
* @see aria-pressed @see aria-selected.
*/
'aria-checked'?: boolean | 'false' | 'mixed' | 'true' | undefined | null;
/**
* Defines the total number of columns in a table, grid, or treegrid.
* @see aria-colindex.
*/
'aria-colcount'?: number | string | undefined | null;
/**
* Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
* @see aria-colcount @see aria-colspan.
*/
'aria-colindex'?: number | string | undefined | null;
/**
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
* @see aria-colindex @see aria-rowspan.
*/
'aria-colspan'?: number | string | undefined | null;
/**
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
* @see aria-owns.
*/
'aria-controls'?: string | undefined | null;
/** Indicates the element that represents the current item within a container or set of related elements. */
'aria-current'?:
| boolean
| 'false'
| 'true'
| 'page'
| 'step'
| 'location'
| 'date'
| 'time'
| undefined
| null;
/**
* Identifies the element (or elements) that describes the object.
* @see aria-labelledby
*/
'aria-describedby'?: string | undefined | null;
/**
* Identifies the element that provides a detailed, extended description for the object.
* @see aria-describedby.
*/
'aria-details'?: string | undefined | null;
/**
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
* @see aria-hidden @see aria-readonly.
*/
'aria-disabled'?: boolean | 'false' | 'true' | undefined | null;
/**
* Indicates what functions can be performed when a dragged object is released on the drop target.
* @deprecated in ARIA 1.1
*/
'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' | undefined | null;
/**
* Identifies the element that provides an error message for the object.
* @see aria-invalid @see aria-describedby.
*/
'aria-errormessage'?: string | undefined | null;
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
'aria-expanded'?: boolean | 'false' | 'true' | undefined | null;
/**
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
* allows assistive technology to override the general default of reading in document source order.
*/
'aria-flowto'?: string | undefined | null;
/**
* Indicates an element's "grabbed" state in a drag-and-drop operation.
* @deprecated in ARIA 1.1
*/
'aria-grabbed'?: boolean | 'false' | 'true' | undefined | null;
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
'aria-haspopup'?:
| boolean
| 'false'
| 'true'
| 'menu'
| 'listbox'
| 'tree'
| 'grid'
| 'dialog'
| undefined
| null;
/**
* Indicates whether the element is exposed to an accessibility API.
* @see aria-disabled.
*/
'aria-hidden'?: boolean | 'false' | 'true' | undefined | null;
/**
* Indicates the entered value does not conform to the format expected by the application.
* @see aria-errormessage.
*/
'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling' | undefined | null;
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
'aria-keyshortcuts'?: string | undefined | null;
/**
* Defines a string value that labels the current element.
* @see aria-labelledby.
*/
'aria-label'?: string | undefined | null;
/**
* Identifies the element (or elements) that labels the current element.
* @see aria-describedby.
*/
'aria-labelledby'?: string | undefined | null;
/** Defines the hierarchical level of an element within a structure. */
'aria-level'?: number | string | undefined | null;
/** 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. */
'aria-live'?: 'off' | 'assertive' | 'polite' | undefined | null;
/** Indicates whether an element is modal when displayed. */
'aria-modal'?: boolean | 'false' | 'true' | undefined | null;
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
'aria-multiline'?: boolean | 'false' | 'true' | undefined | null;
/** Indicates that the user may select more than one item from the current selectable descendants. */
'aria-multiselectable'?: boolean | 'false' | 'true' | undefined | null;
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
'aria-orientation'?: 'horizontal' | 'vertical' | undefined | null;
/**
* Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
* between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
* @see aria-controls.
*/
'aria-owns'?: string | undefined | null;
/**
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
* A hint could be a sample value or a brief description of the expected format.
*/
'aria-placeholder'?: string | undefined | null;
/**
* 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.
* @see aria-setsize.
*/
'aria-posinset'?: number | string | undefined | null;
/**
* Indicates the current "pressed" state of toggle buttons.
* @see aria-checked @see aria-selected.
*/
'aria-pressed'?: boolean | 'false' | 'mixed' | 'true' | undefined | null;
/**
* Indicates that the element is not editable, but is otherwise operable.
* @see aria-disabled.
*/
'aria-readonly'?: boolean | 'false' | 'true' | undefined | null;
/**
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
* @see aria-atomic.
*/
'aria-relevant'?:
| 'additions'
| 'additions removals'
| 'additions text'
| 'all'
| 'removals'
| 'removals additions'
| 'removals text'
| 'text'
| 'text additions'
| 'text removals'
| undefined
| null;
/** Indicates that user input is required on the element before a form may be submitted. */
'aria-required'?: boolean | 'false' | 'true' | undefined | null;
/** Defines a human-readable, author-localized description for the role of an element. */
'aria-roledescription'?: string | undefined | null;
/**
* Defines the total number of rows in a table, grid, or treegrid.
* @see aria-rowindex.
*/
'aria-rowcount'?: number | string | undefined | null;
/**
* Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
* @see aria-rowcount @see aria-rowspan.
*/
'aria-rowindex'?: number | string | undefined | null;
/**
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
* @see aria-rowindex @see aria-colspan.
*/
'aria-rowspan'?: number | string | undefined | null;
/**
* Indicates the current "selected" state of various widgets.
* @see aria-checked @see aria-pressed.
*/
'aria-selected'?: boolean | 'false' | 'true' | undefined | null;
/**
* 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.
* @see aria-posinset.
*/
'aria-setsize'?: number | string | undefined | null;
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined | null;
/** Defines the maximum allowed value for a range widget. */
'aria-valuemax'?: number | string | undefined | null;
/** Defines the minimum allowed value for a range widget. */
'aria-valuemin'?: number | string | undefined | null;
/**
* Defines the current value for a range widget.
* @see aria-valuetext.
*/
'aria-valuenow'?: number | string | undefined | null;
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
'aria-valuetext'?: string | undefined | null;
}
// All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
type AriaRole =
| 'alert'
| 'alertdialog'
| 'application'
| 'article'
| 'banner'
| 'button'
| 'cell'
| 'checkbox'
| 'columnheader'
| 'combobox'
| 'complementary'
| 'contentinfo'
| 'definition'
| 'dialog'
| 'directory'
| 'document'
| 'feed'
| 'figure'
| 'form'
| 'grid'
| 'gridcell'
| 'group'
| 'heading'
| 'img'
| 'link'
| 'list'
| 'listbox'
| 'listitem'
| 'log'
| 'main'
| 'marquee'
| 'math'
| 'menu'
| 'menubar'
| 'menuitem'
| 'menuitemcheckbox'
| 'menuitemradio'
| 'navigation'
| 'none'
| 'note'
| 'option'
| 'presentation'
| 'progressbar'
| 'radio'
| 'radiogroup'
| 'region'
| 'row'
| 'rowgroup'
| 'rowheader'
| 'scrollbar'
| 'search'
| 'searchbox'
| 'separator'
| 'slider'
| 'spinbutton'
| 'status'
| 'switch'
| 'tab'
| 'table'
| 'tablist'
| 'tabpanel'
| 'term'
| 'textbox'
| 'timer'
| 'toolbar'
| 'tooltip'
| 'tree'
| 'treegrid'
| 'treeitem';
interface HTMLAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes {
// Standard HTML Attributes
accesskey?: string | undefined | null;
autocapitalize?: string | undefined | null;
autofocus?: boolean | string | undefined | null;
class?: string | undefined | null;
contenteditable?: 'true' | 'false' | boolean | 'inherit' | string | undefined | null;
dir?: string | undefined | null;
draggable?: 'true' | 'false' | boolean | undefined | null;
enterkeyhint?:
| 'enter'
| 'done'
| 'go'
| 'next'
| 'previous'
| 'search'
| 'send'
| undefined
| null;
hidden?: boolean | string | undefined | null;
id?: string | undefined | null;
inert?: boolean | string | undefined | null;
inputmode?:
| 'none'
| 'text'
| 'tel'
| 'url'
| 'email'
| 'numeric'
| 'decimal'
| 'search'
| undefined
| null;
is?: string | undefined | null;
itemid?: string | undefined | null;
itemprop?: string | undefined | null;
itemref?: string | undefined | null;
itemscope?: boolean | string | undefined | null;
itemtype?: string | undefined | null;
lang?: string | undefined | null;
slot?: string | undefined | null;
spellcheck?: 'true' | 'false' | boolean | undefined | null;
style?: string | Record<string, any> | undefined | null;
tabindex?: number | string | undefined | null;
title?: string | undefined | null;
translate?: 'yes' | 'no' | undefined | null;
// <command>, <menuitem>
radiogroup?: string | undefined | null;
// WAI-ARIA
role?: AriaRole | undefined | null;
// RDFa Attributes
about?: string | undefined | null;
datatype?: string | undefined | null;
inlist?: any;
prefix?: string | undefined | null;
property?: string | undefined | null;
resource?: string | undefined | null;
typeof?: string | undefined | null;
vocab?: string | undefined | null;
// Non-standard Attributes
contextmenu?: string | undefined | null; // Obsolete
autosave?: string | undefined | null; // Apple exclusive
color?: string | undefined | null;
results?: number | string | undefined | null;
security?: string | undefined | null;
unselectable?: 'on' | 'off' | undefined | null; // Internet Explorer
}
type HTMLAttributeReferrerPolicy =
| ''
| 'no-referrer'
| 'no-referrer-when-downgrade'
| 'origin'
| 'origin-when-cross-origin'
| 'same-origin'
| 'strict-origin'
| 'strict-origin-when-cross-origin'
| 'unsafe-url';
type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top';
interface AnchorHTMLAttributes extends HTMLAttributes {
download?: string | boolean | undefined | null;
href?: string | URL | undefined | null;
hreflang?: string | undefined | null;
media?: string | undefined | null;
ping?: string | undefined | null;
rel?: string | undefined | null;
target?: HTMLAttributeAnchorTarget | undefined | null;
type?: string | undefined | null;
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
}
interface AudioHTMLAttributes extends MediaHTMLAttributes {}
interface AreaHTMLAttributes extends HTMLAttributes {
alt?: string | undefined | null;
coords?: string | undefined | null;
download?: any;
href?: string | undefined | null;
hreflang?: string | undefined | null;
media?: string | undefined | null;
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
rel?: string | undefined | null;
shape?: string | undefined | null;
target?: string | undefined | null;
}
interface BaseHTMLAttributes extends HTMLAttributes {
href?: string | undefined | null;
target?: string | undefined | null;
}
interface BlockquoteHTMLAttributes extends HTMLAttributes {
cite?: string | undefined | null;
}
interface ButtonHTMLAttributes extends HTMLAttributes {
disabled?: boolean | string | undefined | null;
form?: string | undefined | null;
formaction?: string | undefined | null;
formenctype?: string | undefined | null;
formmethod?: string | undefined | null;
formnovalidate?: boolean | string | undefined | null;
formtarget?: string | undefined | null;
name?: string | undefined | null;
type?: 'submit' | 'reset' | 'button' | undefined | null;
value?: string | string[] | number | undefined | null;
}
interface CanvasHTMLAttributes extends HTMLAttributes {
height?: number | string | undefined | null;
width?: number | string | undefined | null;
}
interface ColHTMLAttributes extends HTMLAttributes {
span?: number | string | undefined | null;
width?: number | string | undefined | null;
}
interface ColgroupHTMLAttributes extends HTMLAttributes {
span?: number | string | undefined | null;
}
interface DataHTMLAttributes extends HTMLAttributes {
value?: string | string[] | number | undefined | null;
}
interface DetailsHTMLAttributes extends HTMLAttributes {
open?: boolean | string | undefined | null;
}
interface DelHTMLAttributes extends HTMLAttributes {
cite?: string | undefined | null;
datetime?: string | undefined | null;
}
interface DialogHTMLAttributes extends HTMLAttributes {
open?: boolean | string | undefined | null;
}
interface EmbedHTMLAttributes extends HTMLAttributes {
height?: number | string | undefined | null;
src?: string | undefined | null;
type?: string | undefined | null;
width?: number | string | undefined | null;
}
interface FieldsetHTMLAttributes extends HTMLAttributes {
disabled?: boolean | string | undefined | null;
form?: string | undefined | null;
name?: string | undefined | null;
}
interface FormHTMLAttributes extends HTMLAttributes {
'accept-charset'?: string | undefined | null;
action?: string | undefined | null;
autocomplete?: string | undefined | null;
autocorrect?: string | undefined | null;
enctype?: string | undefined | null;
method?: string | undefined | null;
name?: string | undefined | null;
novalidate?: boolean | string | undefined | null;
target?: string | undefined | null;
}
interface HtmlHTMLAttributes extends HTMLAttributes {
manifest?: string | undefined | null;
}
interface IframeHTMLAttributes extends HTMLAttributes {
allow?: string | undefined | null;
allowfullscreen?: boolean | string | undefined | null;
allowtransparency?: boolean | string | undefined | null;
/** @deprecated */
frameborder?: number | string | undefined | null;
height?: number | string | undefined | null;
loading?: 'eager' | 'lazy' | undefined | null;
/** @deprecated */
marginheight?: number | string | undefined | null;
/** @deprecated */
marginwidth?: number | string | undefined | null;
name?: string | undefined | null;
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
sandbox?: string | undefined | null;
/** @deprecated */
scrolling?: string | undefined | null;
seamless?: boolean | string | undefined | null;
src?: string | undefined | null;
srcdoc?: string | undefined | null;
width?: number | string | undefined | null;
}
interface ImgHTMLAttributes extends HTMLAttributes {
alt?: string | undefined | null;
crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null;
decoding?: 'async' | 'auto' | 'sync' | undefined | null;
height?: number | string | undefined | null;
loading?: 'eager' | 'lazy' | undefined | null;
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
sizes?: string | undefined | null;
src?: string | undefined | null;
srcset?: string | undefined | null;
usemap?: string | undefined | null;
width?: number | string | undefined | null;
}
interface InsHTMLAttributes extends HTMLAttributes {
cite?: string | undefined | null;
datetime?: string | undefined | null;
}
type HTMLInputTypeAttribute =
| 'button'
| 'checkbox'
| 'color'
| 'date'
| 'datetime-local'
| 'email'
| 'file'
| 'hidden'
| 'image'
| 'month'
| 'number'
| 'password'
| 'radio'
| 'range'
| 'reset'
| 'search'
| 'submit'
| 'tel'
| 'text'
| 'time'
| 'url'
| 'week';
interface InputHTMLAttributes extends HTMLAttributes {
accept?: string | undefined | null;
alt?: string | undefined | null;
autocomplete?: string | undefined | null;
autocorrect?: string | undefined | null;
capture?: boolean | string | undefined | null;
checked?: boolean | string | undefined | null;
crossorigin?: string | undefined | null;
dirname?: string | undefined | null;
disabled?: boolean | string | undefined | null;
form?: string | undefined | null;
formaction?: string | undefined | null;
formenctype?: string | undefined | null;
formmethod?: string | undefined | null;
formnovalidate?: boolean | string | undefined | null;
formtarget?: string | undefined | null;
height?: number | string | undefined | null;
list?: string | undefined | null;
max?: number | string | undefined | null;
maxlength?: number | string | undefined | null;
min?: number | string | undefined | null;
minlength?: number | string | undefined | null;
multiple?: boolean | string | undefined | null;
name?: string | undefined | null;
pattern?: string | undefined | null;
placeholder?: string | undefined | null;
readonly?: boolean | string | undefined | null;
required?: boolean | string | undefined | null;
size?: number | string | undefined | null;
src?: string | undefined | null;
step?: number | string | undefined | null;
type?: HTMLInputTypeAttribute | string | undefined | null;
value?: string | string[] | number | undefined | null;
width?: number | string | undefined | null;
}
interface KeygenHTMLAttributes extends HTMLAttributes {
challenge?: string | undefined | null;
disabled?: boolean | string | undefined | null;
form?: string | undefined | null;
keytype?: string | undefined | null;
keyparams?: string | undefined | null;
name?: string | undefined | null;
}
interface LabelHTMLAttributes extends HTMLAttributes {
form?: string | undefined | null;
for?: string | undefined | null;
}
interface LiHTMLAttributes extends HTMLAttributes {
value?: string | number | undefined | null;
}
interface LinkHTMLAttributes extends HTMLAttributes {
as?: string | undefined | null;
crossorigin?: boolean | string | undefined | null;
href?: string | URL | undefined | null;
hreflang?: string | undefined | null;
integrity?: string | undefined | null;
media?: string | undefined | null;
imageSrcSet?: string | undefined | null;
imageSizes?: string | undefined | null;
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined | null;
rel?: string | undefined | null;
sizes?: string | undefined | null;
type?: string | undefined | null;
charset?: string | undefined | null;
}
interface MapHTMLAttributes extends HTMLAttributes {
name?: string | undefined | null;
}
interface MenuHTMLAttributes extends HTMLAttributes {
type?: string | undefined | null;
}
interface MediaHTMLAttributes extends HTMLAttributes {
autoplay?: boolean | string | undefined | null;
controls?: boolean | string | undefined | null;
controlslist?: string | undefined | null;
crossorigin?: string | undefined | null;
loop?: boolean | string | undefined | null;
mediagroup?: string | undefined | null;
muted?: boolean | string | undefined | null;
playsinline?: boolean | string | undefined | null;
preload?: string | undefined | null;
src?: string | undefined | null;
}
interface MetaHTMLAttributes extends HTMLAttributes {
charset?: string | undefined | null;
content?: string | URL | undefined | null;
'http-equiv'?: string | undefined | null;
name?: string | undefined | null;
media?: string | undefined | null;
}
interface MeterHTMLAttributes extends HTMLAttributes {
form?: string | undefined | null;
high?: number | string | undefined | null;
low?: number | string | undefined | null;
max?: number | string | undefined | null;
min?: number | string | undefined | null;
optimum?: number | string | undefined | null;
value?: string | string[] | number | undefined | null;
}
interface QuoteHTMLAttributes extends HTMLAttributes {
cite?: string | undefined | null;
}
interface ObjectHTMLAttributes extends HTMLAttributes {
classid?: string | undefined | null;
data?: string | undefined | null;
form?: string | undefined | null;
height?: number | string | undefined | null;
name?: string | undefined | null;
type?: string | undefined | null;
usemap?: string | undefined | null;
width?: number | string | undefined | null;
wmode?: string | undefined | null;
}
interface OlHTMLAttributes extends HTMLAttributes {
reversed?: boolean | string | undefined | null;
start?: number | string | undefined | null;
type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined | null;
}
interface OptgroupHTMLAttributes extends HTMLAttributes {
disabled?: boolean | string | undefined | null;
label?: string | undefined | null;
}
interface OptionHTMLAttributes extends HTMLAttributes {
disabled?: boolean | string | undefined | null;
label?: string | undefined | null;
selected?: boolean | string | undefined | null;
value?: string | string[] | number | undefined | null;
}
interface OutputHTMLAttributes extends HTMLAttributes {
form?: string | undefined | null;
for?: string | undefined | null;
name?: string | undefined | null;
}
interface ParamHTMLAttributes extends HTMLAttributes {
name?: string | undefined | null;
value?: string | string[] | number | undefined | null;
}
interface ProgressHTMLAttributes extends HTMLAttributes {
max?: number | string | undefined | null;
value?: string | string[] | number | undefined | null;
}
interface SlotHTMLAttributes extends HTMLAttributes {
name?: string | undefined | null;
}
interface ScriptHTMLAttributes extends HTMLAttributes {
async?: boolean | string | undefined | null;
charset?: string | undefined | null;
crossorigin?: string | undefined | null;
defer?: boolean | string | undefined | null;
integrity?: string | undefined | null;
nomodule?: boolean | string | undefined | null;
nonce?: string | undefined | null;
src?: string | undefined | null;
type?: string | undefined | null;
}
interface SelectHTMLAttributes extends HTMLAttributes {
autocomplete?: string | undefined | null;
autocorrect?: string | undefined | null;
disabled?: boolean | string | undefined | null;
form?: string | undefined | null;
multiple?: boolean | string | undefined | null;
name?: string | undefined | null;
required?: boolean | string | undefined | null;
size?: number | string | undefined | null;
value?: string | string[] | number | undefined | null;
}
interface SourceHTMLAttributes extends HTMLAttributes {
height?: number | string | undefined | null;
media?: string | undefined | null;
sizes?: string | undefined | null;
src?: string | undefined | null;
srcset?: string | undefined | null;
type?: string | undefined | null;
width?: number | string | undefined | null;
}
interface StyleHTMLAttributes extends HTMLAttributes {
media?: string | undefined | null;
nonce?: string | undefined | null;
scoped?: boolean | string | undefined | null;
type?: string | undefined | null;
}
interface TableHTMLAttributes extends HTMLAttributes {
align?: 'left' | 'center' | 'right' | undefined | null;
bgcolor?: string | undefined | null;
border?: number | undefined | null;
cellpadding?: number | string | undefined | null;
cellspacing?: number | string | undefined | null;
frame?: boolean | undefined | null;
rules?: 'none' | 'groups' | 'rows' | 'columns' | 'all' | undefined | null;
summary?: string | undefined | null;
width?: number | string | undefined | null;
}
interface TextareaHTMLAttributes extends HTMLAttributes {
autocomplete?: string | undefined | null;
autocorrect?: string | undefined | null;
cols?: number | string | undefined | null;
dirname?: string | undefined | null;
disabled?: boolean | string | undefined | null;
form?: string | undefined | null;
maxlength?: number | string | undefined | null;
minlength?: number | string | undefined | null;
name?: string | undefined | null;
placeholder?: string | undefined | null;
readonly?: boolean | string | undefined | null;
required?: boolean | string | undefined | null;
rows?: number | string | undefined | null;
value?: string | string[] | number | undefined | null;
wrap?: string | undefined | null;
}
interface TdHTMLAttributes extends HTMLAttributes {
align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined | null;
colspan?: number | string | undefined | null;
headers?: string | undefined | null;
rowspan?: number | string | undefined | null;
scope?: string | undefined | null;
abbr?: string | undefined | null;
valign?: 'top' | 'middle' | 'bottom' | 'baseline' | undefined | null;
}
interface ThHTMLAttributes extends HTMLAttributes {
align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined | null;
colspan?: number | string | undefined | null;
headers?: string | undefined | null;
rowspan?: number | string | undefined | null;
scope?: string | undefined | null;
abbr?: string | undefined | null;
}
interface TimeHTMLAttributes extends HTMLAttributes {
datetime?: string | undefined | null;
}
interface TrackHTMLAttributes extends HTMLAttributes {
default?: boolean | string | undefined | null;
kind?: string | undefined | null;
label?: string | undefined | null;
src?: string | undefined | null;
srclang?: string | undefined | null;
}
interface VideoHTMLAttributes extends MediaHTMLAttributes {
height?: number | string | undefined | null;
playsinline?: boolean | string | undefined | null;
poster?: string | undefined | null;
width?: number | string | undefined | null;
disablepictureinpicture?: boolean | string | undefined | null;
}