@tamagui/dom 0.0.0-bootstrap.0 → 3.0.0-beta.643.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/events.cjs +17 -0
- package/dist/cjs/events.native.cjs +19 -0
- package/dist/cjs/events.native.js +21 -0
- package/dist/cjs/events.native.js.map +1 -0
- package/dist/cjs/index.cjs +26 -0
- package/dist/cjs/index.native.cjs +28 -0
- package/dist/cjs/index.native.js +30 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/props.cjs +17 -0
- package/dist/cjs/props.native.cjs +19 -0
- package/dist/cjs/props.native.js +21 -0
- package/dist/cjs/props.native.js.map +1 -0
- package/dist/cjs/tables/attributes.cjs +850 -0
- package/dist/cjs/tables/attributes.native.cjs +862 -0
- package/dist/cjs/tables/attributes.native.js +864 -0
- package/dist/cjs/tables/attributes.native.js.map +1 -0
- package/dist/cjs/tables/compatibility.cjs +338 -0
- package/dist/cjs/tables/compatibility.native.cjs +340 -0
- package/dist/cjs/tables/compatibility.native.js +342 -0
- package/dist/cjs/tables/compatibility.native.js.map +1 -0
- package/dist/cjs/tables/events.cjs +169 -0
- package/dist/cjs/tables/events.native.cjs +175 -0
- package/dist/cjs/tables/events.native.js +177 -0
- package/dist/cjs/tables/events.native.js.map +1 -0
- package/dist/cjs/tables/nativeBacking.cjs +133 -0
- package/dist/cjs/tables/nativeBacking.native.cjs +135 -0
- package/dist/cjs/tables/nativeBacking.native.js +137 -0
- package/dist/cjs/tables/nativeBacking.native.js.map +1 -0
- package/dist/cjs/tables/tags.cjs +576 -0
- package/dist/cjs/tables/tags.native.cjs +578 -0
- package/dist/cjs/tables/tags.native.js +580 -0
- package/dist/cjs/tables/tags.native.js.map +1 -0
- package/dist/cjs/tables/types.cjs +17 -0
- package/dist/cjs/tables/types.native.cjs +19 -0
- package/dist/cjs/tables/types.native.js +21 -0
- package/dist/cjs/tables/types.native.js.map +1 -0
- package/dist/esm/events.mjs +0 -0
- package/dist/esm/events.native.js +0 -0
- package/dist/esm/index.mjs +15 -0
- package/dist/esm/index.native.js +15 -0
- package/dist/esm/props.mjs +0 -0
- package/dist/esm/props.native.js +0 -0
- package/dist/esm/tables/attributes.mjs +821 -0
- package/dist/esm/tables/attributes.mjs.map +1 -0
- package/dist/esm/tables/attributes.native.js +831 -0
- package/dist/esm/tables/attributes.native.js.map +1 -0
- package/dist/esm/tables/compatibility.mjs +314 -0
- package/dist/esm/tables/compatibility.mjs.map +1 -0
- package/dist/esm/tables/compatibility.native.js +314 -0
- package/dist/esm/tables/compatibility.native.js.map +1 -0
- package/dist/esm/tables/events.mjs +145 -0
- package/dist/esm/tables/events.mjs.map +1 -0
- package/dist/esm/tables/events.native.js +149 -0
- package/dist/esm/tables/events.native.js.map +1 -0
- package/dist/esm/tables/nativeBacking.mjs +106 -0
- package/dist/esm/tables/nativeBacking.mjs.map +1 -0
- package/dist/esm/tables/nativeBacking.native.js +106 -0
- package/dist/esm/tables/nativeBacking.native.js.map +1 -0
- package/dist/esm/tables/tags.mjs +550 -0
- package/dist/esm/tables/tags.mjs.map +1 -0
- package/dist/esm/tables/tags.native.js +550 -0
- package/dist/esm/tables/tags.native.js.map +1 -0
- package/dist/esm/tables/types.mjs +0 -0
- package/dist/esm/tables/types.native.js +0 -0
- package/package.json +57 -7
- package/src/events.ts +58 -0
- package/src/index.ts +19 -0
- package/src/props.ts +699 -0
- package/src/tables/attributes.ts +863 -0
- package/src/tables/compatibility.ts +360 -0
- package/src/tables/events.ts +176 -0
- package/src/tables/nativeBacking.ts +132 -0
- package/src/tables/tags.ts +557 -0
- package/src/tables/types.ts +202 -0
- package/types/events.d.ts +58 -0
- package/types/events.d.ts.map +11 -0
- package/types/index.d.ts +20 -0
- package/types/index.d.ts.map +11 -0
- package/types/props.d.ts +499 -0
- package/types/props.d.ts.map +11 -0
- package/types/tables/attributes.d.ts +21 -0
- package/types/tables/attributes.d.ts.map +11 -0
- package/types/tables/compatibility.d.ts +28 -0
- package/types/tables/compatibility.d.ts.map +11 -0
- package/types/tables/events.d.ts +5 -0
- package/types/tables/events.d.ts.map +11 -0
- package/types/tables/nativeBacking.d.ts +28 -0
- package/types/tables/nativeBacking.d.ts.map +11 -0
- package/types/tables/tags.d.ts +36 -0
- package/types/tables/tags.d.ts.map +11 -0
- package/types/tables/types.d.ts +135 -0
- package/types/tables/types.d.ts.map +11 -0
- package/README.md +0 -1
package/types/props.d.ts
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DOMChangeEvent, DOMClickEvent, DOMImageErrorEvent, DOMImageLoadEvent, DOMInputEvent, DOMKeyEvent } from "./events";
|
|
3
|
+
/** the aria roles an author may set, excluding the abstract roles */
|
|
4
|
+
export type AriaRole = "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "document" | "emphasis" | "feed" | "figure" | "form" | "grid" | "gridcell" | "group" | "heading" | "img" | "input" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "meter" | "navigation" | "none" | "note" | "option" | "paragraph" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
|
|
5
|
+
/** the autofill hints web and react native both understand */
|
|
6
|
+
export type AutoComplete = "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "on" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off";
|
|
7
|
+
/** every html input type; the ones native cannot render are a native build error */
|
|
8
|
+
export type InputType = "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "month" | "number" | "password" | "radio" | "range" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week";
|
|
9
|
+
/**
|
|
10
|
+
* `data-*` passthrough. Only `data-testid` reaches native, as `testID`; the
|
|
11
|
+
* rest are web attributes.
|
|
12
|
+
*/
|
|
13
|
+
export interface StrictDOMDataProps {
|
|
14
|
+
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Everything every tag accepts. Element interfaces extend this rather than
|
|
18
|
+
* restating it, so a tag costs one interface to instantiate.
|
|
19
|
+
*/
|
|
20
|
+
export interface StrictDOMPropsBase extends StrictDOMDataProps {
|
|
21
|
+
/** @platform web */
|
|
22
|
+
"aria-activedescendant"?: string;
|
|
23
|
+
/** @platform web */
|
|
24
|
+
"aria-atomic"?: boolean;
|
|
25
|
+
/** @platform web */
|
|
26
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both";
|
|
27
|
+
"aria-busy"?: boolean;
|
|
28
|
+
"aria-checked"?: boolean | "mixed";
|
|
29
|
+
/** @platform web */
|
|
30
|
+
"aria-colcount"?: number;
|
|
31
|
+
/** @platform web */
|
|
32
|
+
"aria-colindex"?: number;
|
|
33
|
+
/** @platform web */
|
|
34
|
+
"aria-colindextext"?: string;
|
|
35
|
+
/** @platform web */
|
|
36
|
+
"aria-colspan"?: number;
|
|
37
|
+
/** @platform web */
|
|
38
|
+
"aria-controls"?: string;
|
|
39
|
+
/** @platform web */
|
|
40
|
+
"aria-current"?: boolean | "page" | "step" | "location" | "date" | "time";
|
|
41
|
+
/**
|
|
42
|
+
* react native has no described-by relationship; put the description in aria-label instead
|
|
43
|
+
* @platform web
|
|
44
|
+
*/
|
|
45
|
+
"aria-describedby"?: string;
|
|
46
|
+
/** @platform web */
|
|
47
|
+
"aria-details"?: string;
|
|
48
|
+
"aria-disabled"?: boolean;
|
|
49
|
+
/** @platform web */
|
|
50
|
+
"aria-errormessage"?: string;
|
|
51
|
+
"aria-expanded"?: boolean;
|
|
52
|
+
/** @platform web */
|
|
53
|
+
"aria-flowto"?: string;
|
|
54
|
+
/** @platform web */
|
|
55
|
+
"aria-haspopup"?: "menu" | "listbox" | "tree" | "grid" | "dialog";
|
|
56
|
+
/** also sets importantForAccessibility on android so descendants are hidden */
|
|
57
|
+
"aria-hidden"?: boolean;
|
|
58
|
+
/** @platform web */
|
|
59
|
+
"aria-invalid"?: boolean | "grammar" | "spelling";
|
|
60
|
+
/** @platform web */
|
|
61
|
+
"aria-keyshortcuts"?: string;
|
|
62
|
+
"aria-label"?: string;
|
|
63
|
+
"aria-labelledby"?: string;
|
|
64
|
+
/** @platform web */
|
|
65
|
+
"aria-level"?: number;
|
|
66
|
+
"aria-live"?: "off" | "assertive" | "polite";
|
|
67
|
+
"aria-modal"?: boolean;
|
|
68
|
+
/** @platform web */
|
|
69
|
+
"aria-multiline"?: boolean;
|
|
70
|
+
/** @platform web */
|
|
71
|
+
"aria-multiselectable"?: boolean;
|
|
72
|
+
/** @platform web */
|
|
73
|
+
"aria-orientation"?: "horizontal" | "vertical";
|
|
74
|
+
/** @platform web */
|
|
75
|
+
"aria-owns"?: string;
|
|
76
|
+
/** @platform web */
|
|
77
|
+
"aria-placeholder"?: string;
|
|
78
|
+
/** @platform web */
|
|
79
|
+
"aria-posinset"?: number;
|
|
80
|
+
/** @platform web */
|
|
81
|
+
"aria-pressed"?: boolean | "mixed";
|
|
82
|
+
/** @platform web */
|
|
83
|
+
"aria-readonly"?: boolean;
|
|
84
|
+
/** @platform web */
|
|
85
|
+
"aria-required"?: boolean;
|
|
86
|
+
/** @platform web */
|
|
87
|
+
"aria-roledescription"?: string;
|
|
88
|
+
/** @platform web */
|
|
89
|
+
"aria-rowcount"?: number;
|
|
90
|
+
/** @platform web */
|
|
91
|
+
"aria-rowindex"?: number;
|
|
92
|
+
/** @platform web */
|
|
93
|
+
"aria-rowindextext"?: string;
|
|
94
|
+
/** @platform web */
|
|
95
|
+
"aria-rowspan"?: number;
|
|
96
|
+
"aria-selected"?: boolean;
|
|
97
|
+
/** @platform web */
|
|
98
|
+
"aria-setsize"?: number;
|
|
99
|
+
/** @platform web */
|
|
100
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other";
|
|
101
|
+
"aria-valuemax"?: number;
|
|
102
|
+
"aria-valuemin"?: number;
|
|
103
|
+
"aria-valuenow"?: number;
|
|
104
|
+
"aria-valuetext"?: string;
|
|
105
|
+
/**
|
|
106
|
+
* focus a native element through a ref in an effect instead
|
|
107
|
+
* @platform web
|
|
108
|
+
*/
|
|
109
|
+
autoFocus?: boolean;
|
|
110
|
+
dir?: "auto" | "ltr" | "rtl";
|
|
111
|
+
/**
|
|
112
|
+
* element timing is a browser performance api
|
|
113
|
+
* @platform web
|
|
114
|
+
*/
|
|
115
|
+
elementTiming?: string;
|
|
116
|
+
/** native applies display none and has no until-found reveal */
|
|
117
|
+
hidden?: true | "hidden" | "until-found";
|
|
118
|
+
id?: string;
|
|
119
|
+
/** @platform web */
|
|
120
|
+
inert?: boolean;
|
|
121
|
+
/** @platform web */
|
|
122
|
+
lang?: string;
|
|
123
|
+
role?: AriaRole;
|
|
124
|
+
tabIndex?: 0 | -1;
|
|
125
|
+
/** @platform web */
|
|
126
|
+
suppressHydrationWarning?: boolean;
|
|
127
|
+
"data-testid"?: string;
|
|
128
|
+
onPointerCancel?: (event: unknown) => void;
|
|
129
|
+
onPointerDown?: (event: unknown) => void;
|
|
130
|
+
onPointerEnter?: (event: unknown) => void;
|
|
131
|
+
onPointerLeave?: (event: unknown) => void;
|
|
132
|
+
onPointerMove?: (event: unknown) => void;
|
|
133
|
+
onPointerOut?: (event: unknown) => void;
|
|
134
|
+
onPointerOver?: (event: unknown) => void;
|
|
135
|
+
onPointerUp?: (event: unknown) => void;
|
|
136
|
+
onGotPointerCapture?: (event: unknown) => void;
|
|
137
|
+
onLostPointerCapture?: (event: unknown) => void;
|
|
138
|
+
onTouchCancel?: (event: unknown) => void;
|
|
139
|
+
onTouchEnd?: (event: unknown) => void;
|
|
140
|
+
onTouchMove?: (event: unknown) => void;
|
|
141
|
+
onTouchStart?: (event: unknown) => void;
|
|
142
|
+
/** native builds the click payload from the press event; preventDefault and stopPropagation are no-ops because there is nothing to cancel */
|
|
143
|
+
onClick?: (event: DOMClickEvent) => void;
|
|
144
|
+
/**
|
|
145
|
+
* native has no secondary pointer button
|
|
146
|
+
* @platform web
|
|
147
|
+
*/
|
|
148
|
+
onAuxClick?: (event: unknown) => void;
|
|
149
|
+
/**
|
|
150
|
+
* native has no context menu event; use a long press
|
|
151
|
+
* @platform web
|
|
152
|
+
*/
|
|
153
|
+
onContextMenu?: (event: unknown) => void;
|
|
154
|
+
/** native focus events only fire on elements that can hold focus, which is text entry and pressable elements */
|
|
155
|
+
onBlur?: (event: unknown) => void;
|
|
156
|
+
/** native focus events only fire on elements that can hold focus, which is text entry and pressable elements */
|
|
157
|
+
onFocus?: (event: unknown) => void;
|
|
158
|
+
/**
|
|
159
|
+
* native has no bubbling focus event; use onFocus
|
|
160
|
+
* @platform web
|
|
161
|
+
*/
|
|
162
|
+
onFocusIn?: (event: unknown) => void;
|
|
163
|
+
/**
|
|
164
|
+
* native has no bubbling blur event; use onBlur
|
|
165
|
+
* @platform web
|
|
166
|
+
*/
|
|
167
|
+
onFocusOut?: (event: unknown) => void;
|
|
168
|
+
/** native only reports key presses inside a text-entry control, and reports the submit key as Enter */
|
|
169
|
+
onKeyDown?: (event: DOMKeyEvent) => void;
|
|
170
|
+
/**
|
|
171
|
+
* react native reports key presses, not key releases
|
|
172
|
+
* @platform web
|
|
173
|
+
*/
|
|
174
|
+
onKeyUp?: (event: unknown) => void;
|
|
175
|
+
/**
|
|
176
|
+
* native has no clipboard events
|
|
177
|
+
* @platform web
|
|
178
|
+
*/
|
|
179
|
+
onCopy?: (event: unknown) => void;
|
|
180
|
+
/**
|
|
181
|
+
* native has no clipboard events
|
|
182
|
+
* @platform web
|
|
183
|
+
*/
|
|
184
|
+
onCut?: (event: unknown) => void;
|
|
185
|
+
/**
|
|
186
|
+
* native has no clipboard events
|
|
187
|
+
* @platform web
|
|
188
|
+
*/
|
|
189
|
+
onPaste?: (event: unknown) => void;
|
|
190
|
+
/**
|
|
191
|
+
* fullscreen is a browser api
|
|
192
|
+
* @platform web
|
|
193
|
+
*/
|
|
194
|
+
onFullscreenChange?: (event: unknown) => void;
|
|
195
|
+
/**
|
|
196
|
+
* fullscreen is a browser api
|
|
197
|
+
* @platform web
|
|
198
|
+
*/
|
|
199
|
+
onFullscreenError?: (event: unknown) => void;
|
|
200
|
+
onScroll?: (event: unknown) => void;
|
|
201
|
+
/**
|
|
202
|
+
* native has no wheel input
|
|
203
|
+
* @platform web
|
|
204
|
+
*/
|
|
205
|
+
onWheel?: (event: unknown) => void;
|
|
206
|
+
onMouseDown?: (event: unknown) => void;
|
|
207
|
+
onMouseEnter?: (event: unknown) => void;
|
|
208
|
+
onMouseLeave?: (event: unknown) => void;
|
|
209
|
+
/**
|
|
210
|
+
* use onPointerMove for cross-platform pointer input
|
|
211
|
+
* @platform web
|
|
212
|
+
*/
|
|
213
|
+
onMouseMove?: (event: unknown) => void;
|
|
214
|
+
onMouseOut?: (event: unknown) => void;
|
|
215
|
+
onMouseOver?: (event: unknown) => void;
|
|
216
|
+
onMouseUp?: (event: unknown) => void;
|
|
217
|
+
}
|
|
218
|
+
export interface StrictDOMAnchorProps extends StrictDOMPropsBase {
|
|
219
|
+
/** @platform web */
|
|
220
|
+
download?: string;
|
|
221
|
+
/**
|
|
222
|
+
* native has no navigation; handle onClick and call your router or Linking
|
|
223
|
+
* @platform web
|
|
224
|
+
*/
|
|
225
|
+
href?: string;
|
|
226
|
+
/** native honours it for image requests only */
|
|
227
|
+
referrerPolicy?: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
228
|
+
/** @platform web */
|
|
229
|
+
rel?: string;
|
|
230
|
+
/** @platform web */
|
|
231
|
+
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
232
|
+
children?: ReactNode;
|
|
233
|
+
}
|
|
234
|
+
export interface StrictDOMProps extends StrictDOMPropsBase {
|
|
235
|
+
children?: ReactNode;
|
|
236
|
+
}
|
|
237
|
+
/** the common interface for a tag that takes no children: br and hr */
|
|
238
|
+
export interface StrictDOMVoidProps extends StrictDOMPropsBase {
|
|
239
|
+
children?: never;
|
|
240
|
+
}
|
|
241
|
+
export interface StrictDOMButtonProps extends StrictDOMPropsBase {
|
|
242
|
+
/** native also clears focusable, and editable on a text-entry control */
|
|
243
|
+
disabled?: boolean;
|
|
244
|
+
type?: "button" | "submit";
|
|
245
|
+
children?: ReactNode;
|
|
246
|
+
}
|
|
247
|
+
export interface StrictDOMImageProps extends StrictDOMPropsBase {
|
|
248
|
+
alt?: string;
|
|
249
|
+
crossOrigin?: "anonymous" | "use-credentials";
|
|
250
|
+
/** @platform web */
|
|
251
|
+
decoding?: "async" | "auto" | "sync";
|
|
252
|
+
/** @platform web */
|
|
253
|
+
draggable?: boolean;
|
|
254
|
+
/** @platform web */
|
|
255
|
+
fetchPriority?: "high" | "low" | "auto";
|
|
256
|
+
height?: number;
|
|
257
|
+
/** @platform web */
|
|
258
|
+
loading?: "eager" | "lazy";
|
|
259
|
+
/** native honours it for image requests only */
|
|
260
|
+
referrerPolicy?: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
261
|
+
src?: string;
|
|
262
|
+
srcSet?: string;
|
|
263
|
+
width?: number;
|
|
264
|
+
onError?: (event: DOMImageErrorEvent) => void;
|
|
265
|
+
/** native reports naturalWidth and naturalHeight from the decoded source */
|
|
266
|
+
onLoad?: (event: DOMImageLoadEvent) => void;
|
|
267
|
+
children?: never;
|
|
268
|
+
}
|
|
269
|
+
export interface StrictDOMInputProps extends StrictDOMPropsBase {
|
|
270
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
271
|
+
autoComplete?: AutoComplete;
|
|
272
|
+
/**
|
|
273
|
+
* checkbox and radio inputs have no native rendering
|
|
274
|
+
* @platform web
|
|
275
|
+
*/
|
|
276
|
+
checked?: boolean | "mixed";
|
|
277
|
+
/**
|
|
278
|
+
* checkbox and radio inputs have no native rendering
|
|
279
|
+
* @platform web
|
|
280
|
+
*/
|
|
281
|
+
defaultChecked?: boolean;
|
|
282
|
+
defaultValue?: string;
|
|
283
|
+
/** native also clears focusable, and editable on a text-entry control */
|
|
284
|
+
disabled?: boolean;
|
|
285
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
286
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
287
|
+
/** @platform web */
|
|
288
|
+
max?: string | number;
|
|
289
|
+
maxLength?: number;
|
|
290
|
+
/** @platform web */
|
|
291
|
+
min?: string | number;
|
|
292
|
+
/** @platform web */
|
|
293
|
+
minLength?: number;
|
|
294
|
+
/** @platform web */
|
|
295
|
+
multiple?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* form field names only matter to a form submission, which native does not have
|
|
298
|
+
* @platform web
|
|
299
|
+
*/
|
|
300
|
+
name?: string;
|
|
301
|
+
placeholder?: string;
|
|
302
|
+
readOnly?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* native has no form validation
|
|
305
|
+
* @platform web
|
|
306
|
+
*/
|
|
307
|
+
required?: boolean;
|
|
308
|
+
/** ios only on native */
|
|
309
|
+
spellCheck?: boolean;
|
|
310
|
+
/** @platform web */
|
|
311
|
+
step?: number | "any";
|
|
312
|
+
/** on native the type selects the keyboard and secure entry rather than reaching one prop, and the types with no text-entry control are a build error */
|
|
313
|
+
type?: InputType;
|
|
314
|
+
value?: string;
|
|
315
|
+
/**
|
|
316
|
+
* native text entry reports changes only after they are applied
|
|
317
|
+
* @platform web
|
|
318
|
+
*/
|
|
319
|
+
onBeforeInput?: (event: unknown) => void;
|
|
320
|
+
/** native fires on every keystroke like onInput, because there is no commit-on-blur change event */
|
|
321
|
+
onChange?: (event: DOMChangeEvent) => void;
|
|
322
|
+
onInput?: (event: DOMInputEvent) => void;
|
|
323
|
+
/**
|
|
324
|
+
* native has no form validation
|
|
325
|
+
* @platform web
|
|
326
|
+
*/
|
|
327
|
+
onInvalid?: (event: unknown) => void;
|
|
328
|
+
/**
|
|
329
|
+
* read the selection through the element ref instead
|
|
330
|
+
* @platform web
|
|
331
|
+
*/
|
|
332
|
+
onSelect?: (event: unknown) => void;
|
|
333
|
+
children?: never;
|
|
334
|
+
}
|
|
335
|
+
export interface StrictDOMLabelProps extends StrictDOMPropsBase {
|
|
336
|
+
/**
|
|
337
|
+
* native has no label association; wrap the control or drive it from your own state
|
|
338
|
+
* @platform web
|
|
339
|
+
*/
|
|
340
|
+
for?: string;
|
|
341
|
+
children?: ReactNode;
|
|
342
|
+
}
|
|
343
|
+
export interface StrictDOMListItemProps extends StrictDOMPropsBase {
|
|
344
|
+
/** the list counter is not rendered on either platform, matching the list-style reset */
|
|
345
|
+
value?: number;
|
|
346
|
+
children?: ReactNode;
|
|
347
|
+
}
|
|
348
|
+
export interface StrictDOMOptionGroupProps extends StrictDOMPropsBase {
|
|
349
|
+
/** native also clears focusable, and editable on a text-entry control */
|
|
350
|
+
disabled?: boolean;
|
|
351
|
+
/** @platform web */
|
|
352
|
+
label?: string;
|
|
353
|
+
children?: ReactNode;
|
|
354
|
+
}
|
|
355
|
+
export interface StrictDOMOptionProps extends StrictDOMPropsBase {
|
|
356
|
+
/** native also clears focusable, and editable on a text-entry control */
|
|
357
|
+
disabled?: boolean;
|
|
358
|
+
/** @platform web */
|
|
359
|
+
label?: string;
|
|
360
|
+
value?: string;
|
|
361
|
+
children?: string | number;
|
|
362
|
+
}
|
|
363
|
+
export interface StrictDOMSelectProps extends StrictDOMPropsBase {
|
|
364
|
+
autoComplete?: AutoComplete;
|
|
365
|
+
defaultValue?: string | readonly string[];
|
|
366
|
+
/** @platform web */
|
|
367
|
+
multiple?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* form field names only matter to a form submission, which native does not have
|
|
370
|
+
* @platform web
|
|
371
|
+
*/
|
|
372
|
+
name?: string;
|
|
373
|
+
/**
|
|
374
|
+
* native has no form validation
|
|
375
|
+
* @platform web
|
|
376
|
+
*/
|
|
377
|
+
required?: boolean;
|
|
378
|
+
value?: string | readonly string[];
|
|
379
|
+
/**
|
|
380
|
+
* native text entry reports changes only after they are applied
|
|
381
|
+
* @platform web
|
|
382
|
+
*/
|
|
383
|
+
onBeforeInput?: (event: unknown) => void;
|
|
384
|
+
/** native fires on every keystroke like onInput, because there is no commit-on-blur change event */
|
|
385
|
+
onChange?: (event: DOMChangeEvent) => void;
|
|
386
|
+
onInput?: (event: DOMInputEvent) => void;
|
|
387
|
+
/**
|
|
388
|
+
* native has no form validation
|
|
389
|
+
* @platform web
|
|
390
|
+
*/
|
|
391
|
+
onInvalid?: (event: unknown) => void;
|
|
392
|
+
/**
|
|
393
|
+
* read the selection through the element ref instead
|
|
394
|
+
* @platform web
|
|
395
|
+
*/
|
|
396
|
+
onSelect?: (event: unknown) => void;
|
|
397
|
+
children?: ReactNode;
|
|
398
|
+
}
|
|
399
|
+
export interface StrictDOMTextAreaProps extends StrictDOMPropsBase {
|
|
400
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
401
|
+
autoComplete?: AutoComplete;
|
|
402
|
+
defaultValue?: string;
|
|
403
|
+
/** native also clears focusable, and editable on a text-entry control */
|
|
404
|
+
disabled?: boolean;
|
|
405
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
406
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
407
|
+
maxLength?: number;
|
|
408
|
+
/** @platform web */
|
|
409
|
+
minLength?: number;
|
|
410
|
+
/**
|
|
411
|
+
* form field names only matter to a form submission, which native does not have
|
|
412
|
+
* @platform web
|
|
413
|
+
*/
|
|
414
|
+
name?: string;
|
|
415
|
+
placeholder?: string;
|
|
416
|
+
readOnly?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* native has no form validation
|
|
419
|
+
* @platform web
|
|
420
|
+
*/
|
|
421
|
+
required?: boolean;
|
|
422
|
+
rows?: number;
|
|
423
|
+
/** ios only on native */
|
|
424
|
+
spellCheck?: boolean;
|
|
425
|
+
value?: string;
|
|
426
|
+
/**
|
|
427
|
+
* native text entry reports changes only after they are applied
|
|
428
|
+
* @platform web
|
|
429
|
+
*/
|
|
430
|
+
onBeforeInput?: (event: unknown) => void;
|
|
431
|
+
/** native fires on every keystroke like onInput, because there is no commit-on-blur change event */
|
|
432
|
+
onChange?: (event: DOMChangeEvent) => void;
|
|
433
|
+
onInput?: (event: DOMInputEvent) => void;
|
|
434
|
+
/**
|
|
435
|
+
* native has no form validation
|
|
436
|
+
* @platform web
|
|
437
|
+
*/
|
|
438
|
+
onInvalid?: (event: unknown) => void;
|
|
439
|
+
/**
|
|
440
|
+
* read the selection through the element ref instead
|
|
441
|
+
* @platform web
|
|
442
|
+
*/
|
|
443
|
+
onSelect?: (event: unknown) => void;
|
|
444
|
+
children?: never;
|
|
445
|
+
}
|
|
446
|
+
/** the props interface for each tag in the DOM contract */
|
|
447
|
+
export type StrictDOMPropsByTag = {
|
|
448
|
+
a: StrictDOMAnchorProps;
|
|
449
|
+
article: StrictDOMProps;
|
|
450
|
+
aside: StrictDOMProps;
|
|
451
|
+
b: StrictDOMProps;
|
|
452
|
+
bdi: StrictDOMProps;
|
|
453
|
+
bdo: StrictDOMProps;
|
|
454
|
+
blockquote: StrictDOMProps;
|
|
455
|
+
br: StrictDOMVoidProps;
|
|
456
|
+
button: StrictDOMButtonProps;
|
|
457
|
+
code: StrictDOMProps;
|
|
458
|
+
del: StrictDOMProps;
|
|
459
|
+
div: StrictDOMProps;
|
|
460
|
+
em: StrictDOMProps;
|
|
461
|
+
fieldset: StrictDOMProps;
|
|
462
|
+
footer: StrictDOMProps;
|
|
463
|
+
form: StrictDOMProps;
|
|
464
|
+
h1: StrictDOMProps;
|
|
465
|
+
h2: StrictDOMProps;
|
|
466
|
+
h3: StrictDOMProps;
|
|
467
|
+
h4: StrictDOMProps;
|
|
468
|
+
h5: StrictDOMProps;
|
|
469
|
+
h6: StrictDOMProps;
|
|
470
|
+
header: StrictDOMProps;
|
|
471
|
+
hr: StrictDOMVoidProps;
|
|
472
|
+
i: StrictDOMProps;
|
|
473
|
+
img: StrictDOMImageProps;
|
|
474
|
+
input: StrictDOMInputProps;
|
|
475
|
+
ins: StrictDOMProps;
|
|
476
|
+
kbd: StrictDOMProps;
|
|
477
|
+
label: StrictDOMLabelProps;
|
|
478
|
+
li: StrictDOMListItemProps;
|
|
479
|
+
main: StrictDOMProps;
|
|
480
|
+
mark: StrictDOMProps;
|
|
481
|
+
nav: StrictDOMProps;
|
|
482
|
+
ol: StrictDOMProps;
|
|
483
|
+
optgroup: StrictDOMOptionGroupProps;
|
|
484
|
+
option: StrictDOMOptionProps;
|
|
485
|
+
p: StrictDOMProps;
|
|
486
|
+
pre: StrictDOMProps;
|
|
487
|
+
s: StrictDOMProps;
|
|
488
|
+
section: StrictDOMProps;
|
|
489
|
+
select: StrictDOMSelectProps;
|
|
490
|
+
span: StrictDOMProps;
|
|
491
|
+
strong: StrictDOMProps;
|
|
492
|
+
sub: StrictDOMProps;
|
|
493
|
+
sup: StrictDOMProps;
|
|
494
|
+
textarea: StrictDOMTextAreaProps;
|
|
495
|
+
u: StrictDOMProps;
|
|
496
|
+
ul: StrictDOMProps;
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAGA,cAAc,iBAAiB;AAE/B,cACE,gBACA,eACA,oBACA,mBACA,eACA,mBACK;;AAGP,YAAY,WACR,UACA,gBACA,gBACA,YACA,WACA,eACA,WACA,YACA,SACA,aACA,SACA,iBACA,aACA,kBACA,gBACA,eACA,aACA,WACA,aACA,aACA,SACA,WACA,SACA,SACA,aACA,UACA,YACA,QACA,UACA,cACA,SACA,SACA,YACA,aACA,QACA,SACA,YACA,SACA,SACA,YACA,aACA,qBACA,kBACA,UACA,eACA,SACA,SACA,WACA,cACA,gBACA,UACA,eACA,WACA,QACA,aACA,cACA,cACA,WACA,cACA,cACA,WACA,eACA,WACA,WACA,cACA,gBACA,WACA,QACA,UACA,YACA,aACA,SACA,YACA,SACA,UACA,YACA,YACA,SACA,aACA;;AAGJ,YAAY,eACR,oBACA,kBACA,kBACA,kBACA,mBACA,oBACA,mBACA,WACA,WACA,eACA,iBACA,gBACA,cACA,YACA,kBACA,mBACA,mBACA,YACA,YACA,qBACA,UACA,gBACA,WACA,eACA,qBACA,qBACA,SACA,gBACA,eACA,gBACA,wBACA,gBACA,gBACA,iBACA,aACA,OACA,kBACA,iBACA,uBACA,aACA,iBACA,mBACA,2BACA,4BACA,wCACA,4BACA,0BACA,gBACA,mBACA,YACA,QACA,qBACA,iBACA,eACA,QACA,aACA,iBACA;;AAGJ,YAAY,YACR,aACA,UACA,SACA,mBACA,UACA,SACA,WACA,UACA,WACA,aACA,UACA,UACA,WACA,WACA,QACA,SACA,SACA,QACA;;;;;AAMJ,iBAAiB,mBAAmB;;;;;;;AAQpC,iBAAiB,2BAA2B,mBAAmB;;CAE7D;;CAEA;;CAEA,sBAAsB,SAAS,WAAW,SAAS;CACnD;CACA,2BAA2B;;CAE3B;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA,2BAA2B,SAAS,SAAS,aAAa,SAAS;;;;;CAKnE;;CAEA;CACA;;CAEA;CACA;;CAEA;;CAEA,kBAAkB,SAAS,YAAY,SAAS,SAAS;;CAEzD;;CAEA,2BAA2B,YAA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",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/props.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"// Generated by scripts/generate-props.ts from the tables in src/tables.\n// Run `bun run generate:props` after changing a table. Do not edit by hand.\n\nimport type { ReactNode } from 'react'\n\nimport type {\n DOMChangeEvent,\n DOMClickEvent,\n DOMImageErrorEvent,\n DOMImageLoadEvent,\n DOMInputEvent,\n DOMKeyEvent,\n} from './events'\n\n/** the aria roles an author may set, excluding the abstract roles */\nexport type AriaRole =\n | 'alert'\n | 'alertdialog'\n | 'application'\n | 'article'\n | 'banner'\n | 'blockquote'\n | 'button'\n | 'caption'\n | 'cell'\n | 'checkbox'\n | 'code'\n | 'columnheader'\n | 'combobox'\n | 'complementary'\n | 'contentinfo'\n | 'definition'\n | 'deletion'\n | 'dialog'\n | 'document'\n | 'emphasis'\n | 'feed'\n | 'figure'\n | 'form'\n | 'grid'\n | 'gridcell'\n | 'group'\n | 'heading'\n | 'img'\n | 'input'\n | 'insertion'\n | 'link'\n | 'list'\n | 'listbox'\n | 'listitem'\n | 'log'\n | 'main'\n | 'marquee'\n | 'math'\n | 'menu'\n | 'menubar'\n | 'menuitem'\n | 'menuitemcheckbox'\n | 'menuitemradio'\n | 'meter'\n | 'navigation'\n | 'none'\n | 'note'\n | 'option'\n | 'paragraph'\n | 'progressbar'\n | 'radio'\n | 'radiogroup'\n | 'region'\n | 'row'\n | 'rowgroup'\n | 'rowheader'\n | 'scrollbar'\n | 'search'\n | 'searchbox'\n | 'separator'\n | 'slider'\n | 'spinbutton'\n | 'status'\n | 'strong'\n | 'subscript'\n | 'superscript'\n | 'switch'\n | 'tab'\n | 'table'\n | 'tablist'\n | 'tabpanel'\n | 'term'\n | 'textbox'\n | 'time'\n | 'timer'\n | 'toolbar'\n | 'tooltip'\n | 'tree'\n | 'treegrid'\n | 'treeitem'\n\n/** the autofill hints web and react native both understand */\nexport type AutoComplete =\n | 'additional-name'\n | 'address-line1'\n | 'address-line2'\n | 'birthdate-day'\n | 'birthdate-full'\n | 'birthdate-month'\n | 'birthdate-year'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-day'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-middle-name'\n | 'cc-family-name'\n | 'cc-type'\n | 'country'\n | 'current-password'\n | 'email'\n | 'family-name'\n | 'gender'\n | 'given-name'\n | 'honorific-prefix'\n | 'honorific-suffix'\n | 'name'\n | 'name-family'\n | 'name-given'\n | 'name-middle'\n | 'name-middle-initial'\n | 'name-prefix'\n | 'name-suffix'\n | 'new-password'\n | 'nickname'\n | 'on'\n | 'one-time-code'\n | 'organization'\n | 'organization-title'\n | 'password'\n | 'password-new'\n | 'postal-address'\n | 'postal-address-country'\n | 'postal-address-extended'\n | 'postal-address-extended-postal-code'\n | 'postal-address-locality'\n | 'postal-address-region'\n | 'postal-code'\n | 'street-address'\n | 'sms-otp'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-device'\n | 'url'\n | 'username'\n | 'username-new'\n | 'off'\n\n/** every html input type; the ones native cannot render are a native build error */\nexport type InputType =\n | 'checkbox'\n | 'color'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'file'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'radio'\n | 'range'\n | 'search'\n | 'submit'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week'\n\n/**\n * `data-*` passthrough. Only `data-testid` reaches native, as `testID`; the\n * rest are web attributes.\n */\nexport interface StrictDOMDataProps {\n [key: `data-${string}`]: string | number | boolean | undefined\n}\n\n/**\n * Everything every tag accepts. Element interfaces extend this rather than\n * restating it, so a tag costs one interface to instantiate.\n */\nexport interface StrictDOMPropsBase extends StrictDOMDataProps {\n /** @platform web */\n 'aria-activedescendant'?: string\n /** @platform web */\n 'aria-atomic'?: boolean\n /** @platform web */\n 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'\n 'aria-busy'?: boolean\n 'aria-checked'?: boolean | 'mixed'\n /** @platform web */\n 'aria-colcount'?: number\n /** @platform web */\n 'aria-colindex'?: number\n /** @platform web */\n 'aria-colindextext'?: string\n /** @platform web */\n 'aria-colspan'?: number\n /** @platform web */\n 'aria-controls'?: string\n /** @platform web */\n 'aria-current'?: boolean | 'page' | 'step' | 'location' | 'date' | 'time'\n /**\n * react native has no described-by relationship; put the description in aria-label instead\n * @platform web\n */\n 'aria-describedby'?: string\n /** @platform web */\n 'aria-details'?: string\n 'aria-disabled'?: boolean\n /** @platform web */\n 'aria-errormessage'?: string\n 'aria-expanded'?: boolean\n /** @platform web */\n 'aria-flowto'?: string\n /** @platform web */\n 'aria-haspopup'?: 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'\n /** also sets importantForAccessibility on android so descendants are hidden */\n 'aria-hidden'?: boolean\n /** @platform web */\n 'aria-invalid'?: boolean | 'grammar' | 'spelling'\n /** @platform web */\n 'aria-keyshortcuts'?: string\n 'aria-label'?: string\n 'aria-labelledby'?: string\n /** @platform web */\n 'aria-level'?: number\n 'aria-live'?: 'off' | 'assertive' | 'polite'\n 'aria-modal'?: boolean\n /** @platform web */\n 'aria-multiline'?: boolean\n /** @platform web */\n 'aria-multiselectable'?: boolean\n /** @platform web */\n 'aria-orientation'?: 'horizontal' | 'vertical'\n /** @platform web */\n 'aria-owns'?: string\n /** @platform web */\n 'aria-placeholder'?: string\n /** @platform web */\n 'aria-posinset'?: number\n /** @platform web */\n 'aria-pressed'?: boolean | 'mixed'\n /** @platform web */\n 'aria-readonly'?: boolean\n /** @platform web */\n 'aria-required'?: boolean\n /** @platform web */\n 'aria-roledescription'?: string\n /** @platform web */\n 'aria-rowcount'?: number\n /** @platform web */\n 'aria-rowindex'?: number\n /** @platform web */\n 'aria-rowindextext'?: string\n /** @platform web */\n 'aria-rowspan'?: number\n 'aria-selected'?: boolean\n /** @platform web */\n 'aria-setsize'?: number\n /** @platform web */\n 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'\n 'aria-valuemax'?: number\n 'aria-valuemin'?: number\n 'aria-valuenow'?: number\n 'aria-valuetext'?: string\n /**\n * focus a native element through a ref in an effect instead\n * @platform web\n */\n autoFocus?: boolean\n dir?: 'auto' | 'ltr' | 'rtl'\n /**\n * element timing is a browser performance api\n * @platform web\n */\n elementTiming?: string\n /** native applies display none and has no until-found reveal */\n hidden?: true | 'hidden' | 'until-found'\n id?: string\n /** @platform web */\n inert?: boolean\n /** @platform web */\n lang?: string\n role?: AriaRole\n tabIndex?: 0 | -1\n /** @platform web */\n suppressHydrationWarning?: boolean\n 'data-testid'?: string\n onPointerCancel?: (event: unknown) => void\n onPointerDown?: (event: unknown) => void\n onPointerEnter?: (event: unknown) => void\n onPointerLeave?: (event: unknown) => void\n onPointerMove?: (event: unknown) => void\n onPointerOut?: (event: unknown) => void\n onPointerOver?: (event: unknown) => void\n onPointerUp?: (event: unknown) => void\n onGotPointerCapture?: (event: unknown) => void\n onLostPointerCapture?: (event: unknown) => void\n onTouchCancel?: (event: unknown) => void\n onTouchEnd?: (event: unknown) => void\n onTouchMove?: (event: unknown) => void\n onTouchStart?: (event: unknown) => void\n /** native builds the click payload from the press event; preventDefault and stopPropagation are no-ops because there is nothing to cancel */\n onClick?: (event: DOMClickEvent) => void\n /**\n * native has no secondary pointer button\n * @platform web\n */\n onAuxClick?: (event: unknown) => void\n /**\n * native has no context menu event; use a long press\n * @platform web\n */\n onContextMenu?: (event: unknown) => void\n /** native focus events only fire on elements that can hold focus, which is text entry and pressable elements */\n onBlur?: (event: unknown) => void\n /** native focus events only fire on elements that can hold focus, which is text entry and pressable elements */\n onFocus?: (event: unknown) => void\n /**\n * native has no bubbling focus event; use onFocus\n * @platform web\n */\n onFocusIn?: (event: unknown) => void\n /**\n * native has no bubbling blur event; use onBlur\n * @platform web\n */\n onFocusOut?: (event: unknown) => void\n /** native only reports key presses inside a text-entry control, and reports the submit key as Enter */\n onKeyDown?: (event: DOMKeyEvent) => void\n /**\n * react native reports key presses, not key releases\n * @platform web\n */\n onKeyUp?: (event: unknown) => void\n /**\n * native has no clipboard events\n * @platform web\n */\n onCopy?: (event: unknown) => void\n /**\n * native has no clipboard events\n * @platform web\n */\n onCut?: (event: unknown) => void\n /**\n * native has no clipboard events\n * @platform web\n */\n onPaste?: (event: unknown) => void\n /**\n * fullscreen is a browser api\n * @platform web\n */\n onFullscreenChange?: (event: unknown) => void\n /**\n * fullscreen is a browser api\n * @platform web\n */\n onFullscreenError?: (event: unknown) => void\n onScroll?: (event: unknown) => void\n /**\n * native has no wheel input\n * @platform web\n */\n onWheel?: (event: unknown) => void\n onMouseDown?: (event: unknown) => void\n onMouseEnter?: (event: unknown) => void\n onMouseLeave?: (event: unknown) => void\n /**\n * use onPointerMove for cross-platform pointer input\n * @platform web\n */\n onMouseMove?: (event: unknown) => void\n onMouseOut?: (event: unknown) => void\n onMouseOver?: (event: unknown) => void\n onMouseUp?: (event: unknown) => void\n}\n\nexport interface StrictDOMAnchorProps extends StrictDOMPropsBase {\n /** @platform web */\n download?: string\n /**\n * native has no navigation; handle onClick and call your router or Linking\n * @platform web\n */\n href?: string\n /** native honours it for image requests only */\n referrerPolicy?:\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'same-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url'\n /** @platform web */\n rel?: string\n /** @platform web */\n target?: '_self' | '_blank' | '_parent' | '_top'\n children?: ReactNode\n}\n\nexport interface StrictDOMProps extends StrictDOMPropsBase {\n children?: ReactNode\n}\n\n/** the common interface for a tag that takes no children: br and hr */\nexport interface StrictDOMVoidProps extends StrictDOMPropsBase {\n children?: never\n}\n\nexport interface StrictDOMButtonProps extends StrictDOMPropsBase {\n /** native also clears focusable, and editable on a text-entry control */\n disabled?: boolean\n type?: 'button' | 'submit'\n children?: ReactNode\n}\n\nexport interface StrictDOMImageProps extends StrictDOMPropsBase {\n alt?: string\n crossOrigin?: 'anonymous' | 'use-credentials'\n /** @platform web */\n decoding?: 'async' | 'auto' | 'sync'\n /** @platform web */\n draggable?: boolean\n /** @platform web */\n fetchPriority?: 'high' | 'low' | 'auto'\n height?: number\n /** @platform web */\n loading?: 'eager' | 'lazy'\n /** native honours it for image requests only */\n referrerPolicy?:\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'same-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url'\n src?: string\n srcSet?: string\n width?: number\n onError?: (event: DOMImageErrorEvent) => void\n /** native reports naturalWidth and naturalHeight from the decoded source */\n onLoad?: (event: DOMImageLoadEvent) => void\n children?: never\n}\n\nexport interface StrictDOMInputProps extends StrictDOMPropsBase {\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters'\n autoComplete?: AutoComplete\n /**\n * checkbox and radio inputs have no native rendering\n * @platform web\n */\n checked?: boolean | 'mixed'\n /**\n * checkbox and radio inputs have no native rendering\n * @platform web\n */\n defaultChecked?: boolean\n defaultValue?: string\n /** native also clears focusable, and editable on a text-entry control */\n disabled?: boolean\n enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'\n inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'\n /** @platform web */\n max?: string | number\n maxLength?: number\n /** @platform web */\n min?: string | number\n /** @platform web */\n minLength?: number\n /** @platform web */\n multiple?: boolean\n /**\n * form field names only matter to a form submission, which native does not have\n * @platform web\n */\n name?: string\n placeholder?: string\n readOnly?: boolean\n /**\n * native has no form validation\n * @platform web\n */\n required?: boolean\n /** ios only on native */\n spellCheck?: boolean\n /** @platform web */\n step?: number | 'any'\n /** on native the type selects the keyboard and secure entry rather than reaching one prop, and the types with no text-entry control are a build error */\n type?: InputType\n value?: string\n /**\n * native text entry reports changes only after they are applied\n * @platform web\n */\n onBeforeInput?: (event: unknown) => void\n /** native fires on every keystroke like onInput, because there is no commit-on-blur change event */\n onChange?: (event: DOMChangeEvent) => void\n onInput?: (event: DOMInputEvent) => void\n /**\n * native has no form validation\n * @platform web\n */\n onInvalid?: (event: unknown) => void\n /**\n * read the selection through the element ref instead\n * @platform web\n */\n onSelect?: (event: unknown) => void\n children?: never\n}\n\nexport interface StrictDOMLabelProps extends StrictDOMPropsBase {\n /**\n * native has no label association; wrap the control or drive it from your own state\n * @platform web\n */\n for?: string\n children?: ReactNode\n}\n\nexport interface StrictDOMListItemProps extends StrictDOMPropsBase {\n /** the list counter is not rendered on either platform, matching the list-style reset */\n value?: number\n children?: ReactNode\n}\n\nexport interface StrictDOMOptionGroupProps extends StrictDOMPropsBase {\n /** native also clears focusable, and editable on a text-entry control */\n disabled?: boolean\n /** @platform web */\n label?: string\n children?: ReactNode\n}\n\nexport interface StrictDOMOptionProps extends StrictDOMPropsBase {\n /** native also clears focusable, and editable on a text-entry control */\n disabled?: boolean\n /** @platform web */\n label?: string\n value?: string\n children?: string | number\n}\n\nexport interface StrictDOMSelectProps extends StrictDOMPropsBase {\n autoComplete?: AutoComplete\n defaultValue?: string | readonly string[]\n /** @platform web */\n multiple?: boolean\n /**\n * form field names only matter to a form submission, which native does not have\n * @platform web\n */\n name?: string\n /**\n * native has no form validation\n * @platform web\n */\n required?: boolean\n value?: string | readonly string[]\n /**\n * native text entry reports changes only after they are applied\n * @platform web\n */\n onBeforeInput?: (event: unknown) => void\n /** native fires on every keystroke like onInput, because there is no commit-on-blur change event */\n onChange?: (event: DOMChangeEvent) => void\n onInput?: (event: DOMInputEvent) => void\n /**\n * native has no form validation\n * @platform web\n */\n onInvalid?: (event: unknown) => void\n /**\n * read the selection through the element ref instead\n * @platform web\n */\n onSelect?: (event: unknown) => void\n children?: ReactNode\n}\n\nexport interface StrictDOMTextAreaProps extends StrictDOMPropsBase {\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters'\n autoComplete?: AutoComplete\n defaultValue?: string\n /** native also clears focusable, and editable on a text-entry control */\n disabled?: boolean\n enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'\n inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'\n maxLength?: number\n /** @platform web */\n minLength?: number\n /**\n * form field names only matter to a form submission, which native does not have\n * @platform web\n */\n name?: string\n placeholder?: string\n readOnly?: boolean\n /**\n * native has no form validation\n * @platform web\n */\n required?: boolean\n rows?: number\n /** ios only on native */\n spellCheck?: boolean\n value?: string\n /**\n * native text entry reports changes only after they are applied\n * @platform web\n */\n onBeforeInput?: (event: unknown) => void\n /** native fires on every keystroke like onInput, because there is no commit-on-blur change event */\n onChange?: (event: DOMChangeEvent) => void\n onInput?: (event: DOMInputEvent) => void\n /**\n * native has no form validation\n * @platform web\n */\n onInvalid?: (event: unknown) => void\n /**\n * read the selection through the element ref instead\n * @platform web\n */\n onSelect?: (event: unknown) => void\n children?: never\n}\n\n/** the props interface for each tag in the DOM contract */\nexport type StrictDOMPropsByTag = {\n a: StrictDOMAnchorProps\n article: StrictDOMProps\n aside: StrictDOMProps\n b: StrictDOMProps\n bdi: StrictDOMProps\n bdo: StrictDOMProps\n blockquote: StrictDOMProps\n br: StrictDOMVoidProps\n button: StrictDOMButtonProps\n code: StrictDOMProps\n del: StrictDOMProps\n div: StrictDOMProps\n em: StrictDOMProps\n fieldset: StrictDOMProps\n footer: StrictDOMProps\n form: StrictDOMProps\n h1: StrictDOMProps\n h2: StrictDOMProps\n h3: StrictDOMProps\n h4: StrictDOMProps\n h5: StrictDOMProps\n h6: StrictDOMProps\n header: StrictDOMProps\n hr: StrictDOMVoidProps\n i: StrictDOMProps\n img: StrictDOMImageProps\n input: StrictDOMInputProps\n ins: StrictDOMProps\n kbd: StrictDOMProps\n label: StrictDOMLabelProps\n li: StrictDOMListItemProps\n main: StrictDOMProps\n mark: StrictDOMProps\n nav: StrictDOMProps\n ol: StrictDOMProps\n optgroup: StrictDOMOptionGroupProps\n option: StrictDOMOptionProps\n p: StrictDOMProps\n pre: StrictDOMProps\n s: StrictDOMProps\n section: StrictDOMProps\n select: StrictDOMSelectProps\n span: StrictDOMProps\n strong: StrictDOMProps\n sub: StrictDOMProps\n sup: StrictDOMProps\n textarea: StrictDOMTextAreaProps\n u: StrictDOMProps\n ul: StrictDOMProps\n}\n"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AttributeRow } from "./types";
|
|
2
|
+
/** roles authors may set, excluding the abstract roles */
|
|
3
|
+
export declare const ARIA_ROLES: readonly string[];
|
|
4
|
+
/** autofill hints shared by web and react native */
|
|
5
|
+
export declare const AUTO_COMPLETE_VALUES: readonly string[];
|
|
6
|
+
/** every html input type; the ones native cannot render are a native build error */
|
|
7
|
+
export declare const HTML_INPUT_TYPES: readonly string[];
|
|
8
|
+
/**
|
|
9
|
+
* Input types react native can render with a text-entry control.
|
|
10
|
+
*
|
|
11
|
+
* `hidden` and `submit` were here and should not have been: hidden renders
|
|
12
|
+
* nothing at all and submit is a button, so neither is a text-entry control and
|
|
13
|
+
* claiming native support for them would pass a build that cannot render.
|
|
14
|
+
*/
|
|
15
|
+
export declare const NATIVE_INPUT_TYPES: readonly string[];
|
|
16
|
+
export declare const ATTRIBUTES: Readonly<Record<string, AttributeRow>>;
|
|
17
|
+
export declare const ATTRIBUTE_NAMES: readonly string[];
|
|
18
|
+
/** props the styling frontend supplies, so the DOM contract does not generate them */
|
|
19
|
+
export declare const FRONTEND_PROPS: readonly string[];
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mappings": "AAAA,cAAc,oBAA6B;;AAgC3C,OAAO,cAAM;;AAoFb,OAAO,cAAM;;AA8Db,OAAO,cAAM;;;;;;;;AA6Bb,OAAO,cAAM;AA8Cb,OAAO,cAAM,YAAY,SAAS,eAAe;AA8lBjD,OAAO,cAAM;;AAGb,OAAO,cAAM",
|
|
3
|
+
"names": [],
|
|
4
|
+
"sources": [
|
|
5
|
+
"src/tables/attributes.ts"
|
|
6
|
+
],
|
|
7
|
+
"version": 3,
|
|
8
|
+
"sourcesContent": [
|
|
9
|
+
"import type { AttributeRow, TagName } from './types'\n\n/**\n * The attribute table: every non-event prop in the Tamagui DOM contract.\n *\n * `tags` is the authority for the unsupported-prop diagnostic, `type` is the\n * source the prop-interface generator emits, and `nativeProp` records what\n * actually carries the value on native. A row with `native: 'none'` still\n * type-checks and works on web; using it in a native build is a diagnostic.\n *\n * Props that only make sense on a text-entry control (`autoCapitalize`,\n * `enterKeyHint`, `inputMode`, `spellCheck`) are scoped to input and textarea\n * here even though React Strict DOM declares them globally. See\n * `compatibility.ts`.\n *\n * The `aria-*` rows map to the legacy accessibility props on purpose, and it is\n * worth knowing why before anyone simplifies them. React Native does accept\n * some `aria-*` props directly and translates them itself, so those mappings\n * look redundant — but the set differs per host. `View` handles thirteen of\n * them, `Text` handles seven, and neither handles `aria-modal`, `aria-posinset`\n * or `aria-setsize`. Since one row has to be right for every backing a tag can\n * lower to, the mapping that every host accepts unconditionally is the correct\n * one. Verified against react-native 0.86.2's `View.js` and `Text.js`, not\n * against its types. `id` is the exception: View, Text and TextInput all take\n * it, so that row passes it straight through.\n */\n\nconst TEXT_ENTRY: readonly TagName[] = ['input', 'textarea']\nconst ANCHOR: readonly TagName[] = ['a']\nconst IMAGE: readonly TagName[] = ['img']\n\n/** roles authors may set, excluding the abstract roles */\nexport const ARIA_ROLES: readonly string[] = [\n 'alert',\n 'alertdialog',\n 'application',\n 'article',\n 'banner',\n 'blockquote',\n 'button',\n 'caption',\n 'cell',\n 'checkbox',\n 'code',\n 'columnheader',\n 'combobox',\n 'complementary',\n 'contentinfo',\n 'definition',\n 'deletion',\n 'dialog',\n 'document',\n 'emphasis',\n 'feed',\n 'figure',\n 'form',\n 'grid',\n 'gridcell',\n 'group',\n 'heading',\n 'img',\n 'input',\n 'insertion',\n 'link',\n 'list',\n 'listbox',\n 'listitem',\n 'log',\n 'main',\n 'marquee',\n 'math',\n 'menu',\n 'menubar',\n 'menuitem',\n 'menuitemcheckbox',\n 'menuitemradio',\n 'meter',\n 'navigation',\n 'none',\n 'note',\n 'option',\n 'paragraph',\n 'progressbar',\n 'radio',\n 'radiogroup',\n 'region',\n 'row',\n 'rowgroup',\n 'rowheader',\n 'scrollbar',\n 'search',\n 'searchbox',\n 'separator',\n 'slider',\n 'spinbutton',\n 'status',\n 'strong',\n 'subscript',\n 'superscript',\n 'switch',\n 'tab',\n 'table',\n 'tablist',\n 'tabpanel',\n 'term',\n 'textbox',\n 'time',\n 'timer',\n 'toolbar',\n 'tooltip',\n 'tree',\n 'treegrid',\n 'treeitem',\n]\n\n/** autofill hints shared by web and react native */\nexport const AUTO_COMPLETE_VALUES: readonly string[] = [\n 'additional-name',\n 'address-line1',\n 'address-line2',\n 'birthdate-day',\n 'birthdate-full',\n 'birthdate-month',\n 'birthdate-year',\n 'cc-csc',\n 'cc-exp',\n 'cc-exp-day',\n 'cc-exp-month',\n 'cc-exp-year',\n 'cc-number',\n 'cc-name',\n 'cc-given-name',\n 'cc-middle-name',\n 'cc-family-name',\n 'cc-type',\n 'country',\n 'current-password',\n 'email',\n 'family-name',\n 'gender',\n 'given-name',\n 'honorific-prefix',\n 'honorific-suffix',\n 'name',\n 'name-family',\n 'name-given',\n 'name-middle',\n 'name-middle-initial',\n 'name-prefix',\n 'name-suffix',\n 'new-password',\n 'nickname',\n 'on',\n 'one-time-code',\n 'organization',\n 'organization-title',\n 'password',\n 'password-new',\n 'postal-address',\n 'postal-address-country',\n 'postal-address-extended',\n 'postal-address-extended-postal-code',\n 'postal-address-locality',\n 'postal-address-region',\n 'postal-code',\n 'street-address',\n 'sms-otp',\n 'tel',\n 'tel-country-code',\n 'tel-national',\n 'tel-device',\n 'url',\n 'username',\n 'username-new',\n 'off',\n]\n\n/** every html input type; the ones native cannot render are a native build error */\nexport const HTML_INPUT_TYPES: readonly string[] = [\n 'checkbox',\n 'color',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n]\n\n/**\n * Input types react native can render with a text-entry control.\n *\n * `hidden` and `submit` were here and should not have been: hidden renders\n * nothing at all and submit is a button, so neither is a text-entry control and\n * claiming native support for them would pass a build that cannot render.\n */\nexport const NATIVE_INPUT_TYPES: readonly string[] = [\n 'email',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'url',\n]\n\nconst ariaState = (name: string, nativeProp: string | null): AttributeRow => ({\n group: 'aria',\n tags: '*',\n type: 'boolean',\n nativeProp,\n web: 'host',\n native: nativeProp ? 'polyfill' : 'none',\n})\n\nconst ariaRef = (): AttributeRow => ({\n group: 'aria',\n tags: '*',\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n})\n\nconst ariaNumber = (nativeProp: string | null = null): AttributeRow => ({\n group: 'aria',\n tags: '*',\n type: 'number',\n nativeProp,\n web: 'host',\n native: nativeProp ? 'polyfill' : 'none',\n})\n\nconst ariaText = (nativeProp: string | null = null): AttributeRow => ({\n group: 'aria',\n tags: '*',\n type: 'string',\n nativeProp,\n web: 'host',\n native: nativeProp ? 'polyfill' : 'none',\n})\n\nexport const ATTRIBUTES: Readonly<Record<string, AttributeRow>> = {\n // accessibility\n 'aria-activedescendant': ariaRef(),\n 'aria-atomic': ariaState('aria-atomic', null),\n 'aria-autocomplete': {\n group: 'aria',\n tags: '*',\n type: `'none' | 'inline' | 'list' | 'both'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-busy': ariaState('aria-busy', 'accessibilityState.busy'),\n 'aria-checked': {\n group: 'aria',\n tags: '*',\n type: `boolean | 'mixed'`,\n nativeProp: 'accessibilityState.checked',\n web: 'host',\n native: 'polyfill',\n },\n 'aria-colcount': ariaNumber(),\n 'aria-colindex': ariaNumber(),\n 'aria-colindextext': ariaText(),\n 'aria-colspan': ariaNumber(),\n 'aria-controls': ariaRef(),\n 'aria-current': {\n group: 'aria',\n tags: '*',\n type: `boolean | 'page' | 'step' | 'location' | 'date' | 'time'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-describedby': {\n ...ariaRef(),\n note: 'react native has no described-by relationship; put the description in aria-label instead',\n },\n 'aria-details': ariaRef(),\n 'aria-disabled': ariaState('aria-disabled', 'accessibilityState.disabled'),\n 'aria-errormessage': ariaRef(),\n 'aria-expanded': ariaState('aria-expanded', 'accessibilityState.expanded'),\n 'aria-flowto': ariaRef(),\n 'aria-haspopup': {\n group: 'aria',\n tags: '*',\n type: `'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-hidden': {\n group: 'aria',\n tags: '*',\n type: 'boolean',\n nativeProp: 'accessibilityElementsHidden',\n web: 'host',\n native: 'polyfill',\n note: 'also sets importantForAccessibility on android so descendants are hidden',\n },\n 'aria-invalid': {\n group: 'aria',\n tags: '*',\n type: `boolean | 'grammar' | 'spelling'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-keyshortcuts': ariaText(),\n 'aria-label': ariaText('accessibilityLabel'),\n 'aria-labelledby': {\n group: 'aria',\n tags: '*',\n type: 'string',\n nativeProp: 'accessibilityLabelledBy',\n web: 'host',\n native: 'polyfill',\n },\n 'aria-level': ariaNumber(),\n 'aria-live': {\n group: 'aria',\n tags: '*',\n type: `'off' | 'assertive' | 'polite'`,\n nativeProp: 'accessibilityLiveRegion',\n web: 'host',\n native: 'polyfill',\n },\n 'aria-modal': ariaState('aria-modal', 'accessibilityViewIsModal'),\n 'aria-multiline': ariaState('aria-multiline', null),\n 'aria-multiselectable': ariaState('aria-multiselectable', null),\n 'aria-orientation': {\n group: 'aria',\n tags: '*',\n type: `'horizontal' | 'vertical'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-owns': ariaRef(),\n 'aria-placeholder': ariaText(),\n // react-native 0.86.2 has no accessibilityPosInSet — checked View.js and\n // ViewAccessibility.d.ts, it exists in neither. Mapping to it would have the\n // prop silently dropped at the host, which is worse than declaring it web-only\n 'aria-posinset': ariaNumber(),\n 'aria-pressed': {\n group: 'aria',\n tags: '*',\n type: `boolean | 'mixed'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-readonly': ariaState('aria-readonly', null),\n 'aria-required': ariaState('aria-required', null),\n 'aria-roledescription': ariaText(),\n 'aria-rowcount': ariaNumber(),\n 'aria-rowindex': ariaNumber(),\n 'aria-rowindextext': ariaText(),\n 'aria-rowspan': ariaNumber(),\n 'aria-selected': ariaState('aria-selected', 'accessibilityState.selected'),\n // same: no accessibilitySetSize anywhere in react-native 0.86.2\n 'aria-setsize': ariaNumber(),\n 'aria-sort': {\n group: 'aria',\n tags: '*',\n type: `'none' | 'ascending' | 'descending' | 'other'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n 'aria-valuemax': ariaNumber('accessibilityValue.max'),\n 'aria-valuemin': ariaNumber('accessibilityValue.min'),\n 'aria-valuenow': ariaNumber('accessibilityValue.now'),\n 'aria-valuetext': ariaText('accessibilityValue.text'),\n\n // global\n autoFocus: {\n group: 'global',\n tags: '*',\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'focus a native element through a ref in an effect instead',\n },\n dir: {\n group: 'global',\n tags: '*',\n type: `'auto' | 'ltr' | 'rtl'`,\n nativeProp: 'writingDirection',\n web: 'host',\n native: 'polyfill',\n },\n elementTiming: {\n group: 'global',\n tags: '*',\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'element timing is a browser performance api',\n },\n hidden: {\n group: 'global',\n tags: '*',\n type: `true | 'hidden' | 'until-found'`,\n nativeProp: 'style.display',\n web: 'host',\n native: 'polyfill',\n note: 'native applies display none and has no until-found reveal',\n },\n id: {\n group: 'global',\n tags: '*',\n type: 'string',\n // react native takes `id` itself on View, Text and TextInput and assigns it\n // to nativeID, so there is nothing to rename\n nativeProp: 'id',\n web: 'host',\n native: 'polyfill',\n },\n inert: {\n group: 'global',\n tags: '*',\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n lang: {\n group: 'global',\n tags: '*',\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n role: {\n group: 'global',\n tags: '*',\n type: 'AriaRole',\n nativeProp: 'role',\n web: 'host',\n native: 'polyfill',\n },\n tabIndex: {\n group: 'global',\n tags: '*',\n type: '0 | -1',\n nativeProp: 'focusable',\n web: 'host',\n native: 'polyfill',\n },\n\n // react\n suppressHydrationWarning: {\n group: 'react',\n tags: '*',\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n\n children: {\n group: 'react',\n tags: '*',\n nativeProp: 'children',\n web: 'host',\n native: 'host',\n note: 'the content model in the tag table decides the type: no children on a void tag, text only inside an option',\n },\n\n // supplied by the styling frontend, never generated as a prop here\n style: {\n group: 'frontend',\n tags: '*',\n nativeProp: 'style',\n web: 'host',\n native: 'host',\n note: 'each frontend supplies its own style contract: tamagui style props, className, or style() handles',\n },\n 'data-*': {\n group: 'data',\n tags: '*',\n type: 'string | number | boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'data-testid is the one exception and reaches testID on native',\n },\n 'data-testid': {\n group: 'data',\n tags: '*',\n type: 'string',\n nativeProp: 'testID',\n web: 'host',\n native: 'polyfill',\n },\n\n // text entry\n autoCapitalize: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: `'none' | 'sentences' | 'words' | 'characters'`,\n nativeProp: 'autoCapitalize',\n web: 'host',\n native: 'host',\n },\n autoComplete: {\n group: 'element',\n tags: ['input', 'select', 'textarea'],\n type: 'AutoComplete',\n nativeProp: 'autoComplete',\n web: 'host',\n native: 'host',\n },\n enterKeyHint: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: `'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'`,\n nativeProp: 'enterKeyHint',\n web: 'host',\n native: 'host',\n },\n inputMode: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: `'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'`,\n nativeProp: 'inputMode',\n web: 'host',\n native: 'host',\n },\n spellCheck: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: 'boolean',\n nativeProp: 'spellCheck',\n web: 'host',\n native: 'host',\n note: 'ios only on native',\n },\n\n // anchor\n download: {\n group: 'element',\n tags: ANCHOR,\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n href: {\n group: 'element',\n tags: ANCHOR,\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'native has no navigation; handle onClick and call your router or Linking',\n },\n referrerPolicy: {\n group: 'element',\n tags: ['a', 'img'],\n type: `'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'`,\n nativeProp: 'referrerPolicy',\n web: 'host',\n native: 'host',\n note: 'native honours it for image requests only',\n },\n rel: {\n group: 'element',\n tags: ANCHOR,\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n target: {\n group: 'element',\n tags: ANCHOR,\n type: `'_self' | '_blank' | '_parent' | '_top'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n\n // button, input, option, optgroup, textarea\n disabled: {\n group: 'element',\n tags: ['button', 'input', 'optgroup', 'option', 'textarea'],\n type: 'boolean',\n nativeProp: 'disabled',\n web: 'host',\n native: 'polyfill',\n note: 'native also clears focusable, and editable on a text-entry control',\n },\n type: {\n group: 'element',\n tags: ['button', 'input'],\n perTag: {\n button: { type: `'button' | 'submit'` },\n input: {\n type: 'InputType',\n note: 'on native the type selects the keyboard and secure entry rather than reaching one prop, and the types with no text-entry control are a build error',\n },\n },\n nativeProp: null,\n web: 'host',\n native: 'polyfill',\n },\n\n // image\n alt: {\n group: 'element',\n tags: IMAGE,\n type: 'string',\n nativeProp: 'alt',\n web: 'host',\n native: 'host',\n },\n crossOrigin: {\n group: 'element',\n tags: IMAGE,\n type: `'anonymous' | 'use-credentials'`,\n nativeProp: 'crossOrigin',\n web: 'host',\n native: 'host',\n },\n decoding: {\n group: 'element',\n tags: IMAGE,\n type: `'async' | 'auto' | 'sync'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n draggable: {\n group: 'element',\n tags: IMAGE,\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n fetchPriority: {\n group: 'element',\n tags: IMAGE,\n type: `'high' | 'low' | 'auto'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n height: {\n group: 'element',\n tags: IMAGE,\n type: 'number',\n nativeProp: 'height',\n web: 'host',\n native: 'host',\n },\n loading: {\n group: 'element',\n tags: IMAGE,\n type: `'eager' | 'lazy'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n src: {\n group: 'element',\n tags: IMAGE,\n type: 'string',\n nativeProp: 'src',\n web: 'host',\n native: 'host',\n },\n srcSet: {\n group: 'element',\n tags: IMAGE,\n type: 'string',\n nativeProp: 'srcSet',\n web: 'host',\n native: 'host',\n },\n width: {\n group: 'element',\n tags: IMAGE,\n type: 'number',\n nativeProp: 'width',\n web: 'host',\n native: 'host',\n },\n\n // form controls\n checked: {\n group: 'element',\n tags: ['input'],\n type: `boolean | 'mixed'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'checkbox and radio inputs have no native rendering',\n },\n defaultChecked: {\n group: 'element',\n tags: ['input'],\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'checkbox and radio inputs have no native rendering',\n },\n defaultValue: {\n group: 'element',\n tags: ['input', 'select', 'textarea'],\n type: 'string',\n perTag: { select: { type: 'string | readonly string[]' } },\n nativeProp: 'defaultValue',\n web: 'host',\n native: 'host',\n },\n for: {\n group: 'element',\n tags: ['label'],\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'native has no label association; wrap the control or drive it from your own state',\n },\n label: {\n group: 'element',\n tags: ['optgroup', 'option'],\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n max: {\n group: 'element',\n tags: ['input'],\n type: 'string | number',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n maxLength: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: 'number',\n nativeProp: 'maxLength',\n web: 'host',\n native: 'host',\n },\n min: {\n group: 'element',\n tags: ['input'],\n type: 'string | number',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n minLength: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: 'number',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n multiple: {\n group: 'element',\n tags: ['input', 'select'],\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n name: {\n group: 'element',\n tags: ['input', 'select', 'textarea'],\n type: 'string',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'form field names only matter to a form submission, which native does not have',\n },\n placeholder: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: 'string',\n nativeProp: 'placeholder',\n web: 'host',\n native: 'host',\n },\n readOnly: {\n group: 'element',\n tags: TEXT_ENTRY,\n type: 'boolean',\n nativeProp: 'editable',\n web: 'host',\n native: 'polyfill',\n },\n required: {\n group: 'element',\n tags: ['input', 'select', 'textarea'],\n type: 'boolean',\n nativeProp: null,\n web: 'host',\n native: 'none',\n note: 'native has no form validation',\n },\n rows: {\n group: 'element',\n tags: ['textarea'],\n type: 'number',\n nativeProp: 'numberOfLines',\n web: 'host',\n native: 'polyfill',\n },\n step: {\n group: 'element',\n tags: ['input'],\n type: `number | 'any'`,\n nativeProp: null,\n web: 'host',\n native: 'none',\n },\n value: {\n group: 'element',\n tags: ['input', 'li', 'option', 'select', 'textarea'],\n type: 'string',\n perTag: {\n li: {\n type: 'number',\n note: 'the list counter is not rendered on either platform, matching the list-style reset',\n },\n select: { type: 'string | readonly string[]' },\n },\n nativeProp: 'value',\n web: 'host',\n native: 'polyfill',\n },\n}\n\nexport const ATTRIBUTE_NAMES: readonly string[] = Object.keys(ATTRIBUTES)\n\n/** props the styling frontend supplies, so the DOM contract does not generate them */\nexport const FRONTEND_PROPS: readonly string[] = ['style']\n"
|
|
10
|
+
]
|
|
11
|
+
}
|