/
box.props.ts
581 lines (580 loc) Β· 17.7 KB
/
box.props.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
import type { PropMeta } from "@webstudio-is/react-sdk";
export const props: Record<string, PropMeta> = {
about: { required: false, control: "text", type: "string" },
accessKey: {
required: false,
control: "text",
type: "string",
description: "Keyboard shortcut to activate or add focus to the element.",
},
"aria-activedescendant": {
description:
"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
required: false,
control: "text",
type: "string",
},
"aria-atomic": {
description:
"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.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-autocomplete": {
description:
"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\npresented if they are made.",
required: false,
control: "select",
type: "string",
options: ["list", "none", "inline", "both"],
},
"aria-braillelabel": {
description:
"Defines a string value that labels the current element, which is intended to be converted into Braille.",
required: false,
control: "text",
type: "string",
},
"aria-brailleroledescription": {
description:
"Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.",
required: false,
control: "text",
type: "string",
},
"aria-busy": { required: false, control: "boolean", type: "boolean" },
"aria-checked": {
description:
'Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.',
required: false,
control: "text",
type: "string",
},
"aria-colcount": {
description:
"Defines the total number of columns in a table, grid, or treegrid.",
required: false,
control: "number",
type: "number",
},
"aria-colindex": {
description:
"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.",
required: false,
control: "number",
type: "number",
},
"aria-colindextext": {
description: "Defines a human readable text alternative of aria-colindex.",
required: false,
control: "text",
type: "string",
},
"aria-colspan": {
description:
"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.",
required: false,
control: "number",
type: "number",
},
"aria-controls": {
description:
"Identifies the element (or elements) whose contents or presence are controlled by the current element.",
required: false,
control: "text",
type: "string",
},
"aria-current": {
description:
"Indicates the element that represents the current item within a container or set of related elements.",
required: false,
control: "text",
type: "string",
},
"aria-describedby": {
description:
"Identifies the element (or elements) that describes the object.",
required: false,
control: "text",
type: "string",
},
"aria-description": {
description:
"Defines a string value that describes or annotates the current element.",
required: false,
control: "text",
type: "string",
},
"aria-details": {
description:
"Identifies the element that provides a detailed, extended description for the object.",
required: false,
control: "text",
type: "string",
},
"aria-disabled": {
description:
"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-dropeffect": {
description:
"Indicates what functions can be performed when a dragged object is released on the drop target.",
required: false,
control: "select",
type: "string",
options: ["link", "none", "copy", "execute", "move", "popup"],
},
"aria-errormessage": {
description:
"Identifies the element that provides an error message for the object.",
required: false,
control: "text",
type: "string",
},
"aria-expanded": {
description:
"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-flowto": {
description:
"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.",
required: false,
control: "text",
type: "string",
},
"aria-grabbed": {
description:
'Indicates an element\'s "grabbed" state in a drag-and-drop operation.',
required: false,
control: "boolean",
type: "boolean",
},
"aria-haspopup": {
description:
"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.",
required: false,
control: "text",
type: "string",
},
"aria-hidden": {
description:
"Indicates whether the element is exposed to an accessibility API.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-invalid": {
description:
"Indicates the entered value does not conform to the format expected by the application.",
required: false,
control: "text",
type: "string",
},
"aria-keyshortcuts": {
description:
"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.",
required: false,
control: "text",
type: "string",
},
"aria-label": {
description:
"Provides the accessible name that describes an interactive element if no other accessible name exists, for example in a button that contains an image with no text.",
required: false,
control: "text",
type: "string",
},
"aria-labelledby": {
description:
"Identifies the element (or elements) that labels the current element.",
required: false,
control: "text",
type: "string",
},
"aria-level": {
description:
"Defines the hierarchical level of an element within a structure.",
required: false,
control: "number",
type: "number",
},
"aria-live": {
description:
"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.",
required: false,
control: "radio",
type: "string",
options: ["off", "assertive", "polite"],
},
"aria-modal": {
description: "Indicates whether an element is modal when displayed.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-multiline": {
description:
"Indicates whether a text box accepts multiple lines of input or only a single line.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-multiselectable": {
description:
"Indicates that the user may select more than one item from the current selectable descendants.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-orientation": {
description:
"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.",
required: false,
control: "radio",
type: "string",
options: ["horizontal", "vertical"],
},
"aria-owns": {
description:
"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.",
required: false,
control: "text",
type: "string",
},
"aria-placeholder": {
description:
"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.",
required: false,
control: "text",
type: "string",
},
"aria-posinset": {
description:
"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.",
required: false,
control: "number",
type: "number",
},
"aria-pressed": {
description: 'Indicates the current "pressed" state of toggle buttons.',
required: false,
control: "text",
type: "string",
},
"aria-readonly": {
description:
"Indicates that the element is not editable, but is otherwise operable.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-relevant": {
description:
"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.",
required: false,
control: "select",
type: "string",
options: [
"text",
"additions",
"additions removals",
"additions text",
"all",
"removals",
"removals additions",
"removals text",
"text additions",
"text removals",
],
},
"aria-required": {
description:
"Indicates that user input is required on the element before a form may be submitted.",
required: false,
control: "boolean",
type: "boolean",
},
"aria-roledescription": {
description:
"Defines a human-readable, author-localized description for the role of an element.",
required: false,
control: "text",
type: "string",
},
"aria-rowcount": {
description:
"Defines the total number of rows in a table, grid, or treegrid.",
required: false,
control: "number",
type: "number",
},
"aria-rowindex": {
description:
"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.",
required: false,
control: "number",
type: "number",
},
"aria-rowindextext": {
description: "Defines a human readable text alternative of aria-rowindex.",
required: false,
control: "text",
type: "string",
},
"aria-rowspan": {
description:
"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.",
required: false,
control: "number",
type: "number",
},
"aria-selected": {
description: 'Indicates the current "selected" state of various widgets.',
required: false,
control: "boolean",
type: "boolean",
},
"aria-setsize": {
description:
"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.",
required: false,
control: "number",
type: "number",
},
"aria-sort": {
description:
"Indicates if items in a table or grid are sorted in ascending or descending order.",
required: false,
control: "select",
type: "string",
options: ["none", "ascending", "descending", "other"],
},
"aria-valuemax": {
description: "Defines the maximum allowed value for a range widget.",
required: false,
control: "number",
type: "number",
},
"aria-valuemin": {
description: "Defines the minimum allowed value for a range widget.",
required: false,
control: "number",
type: "number",
},
"aria-valuenow": {
description: "Defines the current value for a range widget.",
required: false,
control: "number",
type: "number",
},
"aria-valuetext": {
description:
"Defines the human readable text alternative of aria-valuenow for a range widget.",
required: false,
control: "text",
type: "string",
},
autoCapitalize: {
required: false,
control: "text",
type: "string",
description:
"Sets whether input is automatically capitalized when entered by user.",
},
autoCorrect: { required: false, control: "text", type: "string" },
autoFocus: {
required: false,
control: "boolean",
type: "boolean",
description:
"Indicates that an element should be focused on page load, or when its parent dialog is displayed.",
},
autoSave: { required: false, control: "text", type: "string" },
className: { required: false, control: "text", type: "string" },
color: {
required: false,
control: "color",
type: "string",
description:
"This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. Note: This is a legacy attribute. Please use the CSS color property instead.",
},
content: {
required: false,
control: "text",
type: "string",
description:
"A value associated with http-equiv orname depending on the context.",
},
contextMenu: {
required: false,
control: "text",
type: "string",
description:
"Defines the ID of a menu element which willserve as the element's context menu.",
},
datatype: { required: false, control: "text", type: "string" },
defaultChecked: { required: false, control: "boolean", type: "boolean" },
dir: {
required: false,
control: "text",
type: "string",
description:
"Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)",
},
draggable: {
required: false,
control: "boolean",
type: "boolean",
description: "Defines whether the element can be dragged.",
},
hidden: {
required: false,
control: "boolean",
type: "boolean",
description:
"Prevents rendering of given element, while keeping child elements, e.g. script elements, active.",
},
id: {
required: false,
control: "text",
type: "string",
description:
"Often used with CSS to style a specific element. The value of this attribute must be unique.",
},
inputMode: {
description:
"Hints at the type of data that might be entered by the user while editing the element or its contents",
required: false,
control: "select",
type: "string",
options: [
"search",
"text",
"none",
"tel",
"url",
"email",
"numeric",
"decimal",
],
},
is: {
description:
"Specify that a standard HTML element should behave like a defined custom built-in element",
required: false,
control: "text",
type: "string",
},
itemID: { required: false, control: "text", type: "string" },
itemProp: { required: false, control: "text", type: "string" },
itemRef: { required: false, control: "text", type: "string" },
itemScope: { required: false, control: "boolean", type: "boolean" },
itemType: { required: false, control: "text", type: "string" },
lang: {
required: false,
control: "text",
type: "string",
description: "Defines the language used in the element.",
},
nonce: { required: false, control: "text", type: "string" },
prefix: { required: false, control: "text", type: "string" },
property: { required: false, control: "text", type: "string" },
radioGroup: { required: false, control: "text", type: "string" },
rel: {
required: false,
control: "text",
type: "string",
description:
"Specifies the relationship of the target object to the link object.",
},
resource: { required: false, control: "text", type: "string" },
results: { required: false, control: "number", type: "number" },
rev: { required: false, control: "text", type: "string" },
role: {
required: false,
control: "text",
type: "string",
description:
"Defines an explicit role for an element for use by assistive technologies.",
},
security: { required: false, control: "text", type: "string" },
slot: {
required: false,
control: "text",
type: "string",
description: "Assigns a slot in a shadow DOM shadow tree to an element.",
},
spellCheck: {
required: false,
control: "boolean",
type: "boolean",
description: "Indicates whether spell checking is allowed for the element.",
},
suppressContentEditableWarning: {
required: false,
control: "boolean",
type: "boolean",
},
suppressHydrationWarning: {
required: false,
control: "boolean",
type: "boolean",
},
tabIndex: {
required: false,
control: "number",
type: "number",
description:
"Overrides the browser's default tab order and follows the one specified instead.",
},
tag: {
description:
"Use this property to change the HTML tag of this element to semantically structure and describe the content of a webpage. This can be important for accessibility tools and search engine optimization.",
required: false,
control: "select",
type: "string",
defaultValue: "div",
options: [
"div",
"address",
"article",
"aside",
"figure",
"footer",
"header",
"main",
"nav",
"section",
],
},
title: {
required: false,
control: "text",
type: "string",
description:
"Text to be displayed in a tooltip when hovering over the element.",
},
translate: {
required: false,
control: "radio",
type: "string",
options: ["yes", "no"],
description:
"Specify whether an element's attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged.",
},
typeof: { required: false, control: "text", type: "string" },
unselectable: {
required: false,
control: "radio",
type: "string",
options: ["on", "off"],
},
vocab: { required: false, control: "text", type: "string" },
};