@webstudio-is/sdk-components-react-radix 0.87.1 → 0.89.0
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/lib/__generated__/accordion.props.js +605 -114
- package/lib/__generated__/button.props.js +158 -47
- package/lib/__generated__/checkbox.props.js +1083 -0
- package/lib/__generated__/collapsible.props.js +234 -44
- package/lib/__generated__/dialog.props.js +611 -121
- package/lib/__generated__/input.props.js +264 -47
- package/lib/__generated__/label.props.js +123 -23
- package/lib/__generated__/navigation-menu.props.js +2565 -0
- package/lib/__generated__/popover.props.js +129 -28
- package/lib/__generated__/radio-group.props.js +1627 -0
- package/lib/__generated__/select.props.js +3678 -0
- package/lib/__generated__/sheet.props.js +591 -121
- package/lib/__generated__/switch.props.js +1083 -0
- package/lib/__generated__/tabs.props.js +906 -68
- package/lib/__generated__/textarea.props.js +177 -31
- package/lib/__generated__/tooltip.props.js +131 -29
- package/lib/accordion.js +11 -4
- package/lib/accordion.ws.js +88 -72
- package/lib/checkbox.js +13 -0
- package/lib/checkbox.ws.js +153 -0
- package/lib/cjs/__generated__/accordion.props.js +605 -114
- package/lib/cjs/__generated__/button.props.js +158 -47
- package/lib/cjs/__generated__/checkbox.props.js +1103 -0
- package/lib/cjs/__generated__/collapsible.props.js +234 -44
- package/lib/cjs/__generated__/dialog.props.js +611 -121
- package/lib/cjs/__generated__/input.props.js +264 -47
- package/lib/cjs/__generated__/label.props.js +123 -23
- package/lib/cjs/__generated__/navigation-menu.props.js +2585 -0
- package/lib/cjs/__generated__/popover.props.js +129 -28
- package/lib/cjs/__generated__/radio-group.props.js +1647 -0
- package/lib/cjs/__generated__/select.props.js +3698 -0
- package/lib/cjs/__generated__/sheet.props.js +591 -121
- package/lib/cjs/__generated__/switch.props.js +1103 -0
- package/lib/cjs/__generated__/tabs.props.js +906 -68
- package/lib/cjs/__generated__/textarea.props.js +177 -31
- package/lib/cjs/__generated__/tooltip.props.js +131 -29
- package/lib/cjs/accordion.js +11 -4
- package/lib/cjs/accordion.ws.js +86 -71
- package/lib/cjs/{textarea.js → checkbox.js} +9 -6
- package/lib/cjs/checkbox.ws.js +174 -0
- package/lib/cjs/collapsible.ws.js +5 -1
- package/lib/cjs/components.js +27 -14
- package/lib/cjs/dialog.ws.js +18 -17
- package/lib/cjs/hooks.js +5 -1
- package/lib/cjs/label.ws.js +2 -1
- package/lib/cjs/metas.js +29 -14
- package/lib/cjs/navigation-menu.js +107 -0
- package/lib/cjs/navigation-menu.ws.js +514 -0
- package/lib/cjs/popover.ws.js +13 -9
- package/lib/cjs/props-descriptions.js +56 -0
- package/lib/cjs/props.js +27 -14
- package/lib/cjs/{button.js → radio-group.js} +10 -8
- package/lib/cjs/radio-group.ws.js +191 -0
- package/lib/cjs/select.js +83 -0
- package/lib/cjs/select.ws.js +350 -0
- package/lib/cjs/sheet.ws.js +88 -176
- package/lib/cjs/{input.js → switch.js} +8 -9
- package/lib/cjs/switch.ws.js +173 -0
- package/lib/cjs/tabs.js +2 -3
- package/lib/cjs/tabs.ws.js +14 -18
- package/lib/cjs/theme/styles.js +100 -0
- package/lib/cjs/theme/tailwind-classes.js +125 -16
- package/lib/cjs/theme/tailwind-colors.js +1 -0
- package/lib/cjs/tooltip.ws.js +12 -8
- package/lib/collapsible.ws.js +5 -1
- package/lib/components.js +44 -22
- package/lib/dialog.ws.js +18 -17
- package/lib/hooks.js +5 -1
- package/lib/label.ws.js +2 -1
- package/lib/metas.js +58 -24
- package/lib/navigation-menu.js +85 -0
- package/lib/navigation-menu.ws.js +501 -0
- package/lib/popover.ws.js +13 -9
- package/lib/props-descriptions.js +36 -0
- package/lib/props.js +56 -24
- package/lib/radio-group.js +11 -0
- package/lib/radio-group.ws.js +173 -0
- package/lib/select.js +75 -0
- package/lib/select.ws.js +338 -0
- package/lib/sheet.ws.js +89 -194
- package/lib/switch.js +7 -0
- package/lib/switch.ws.js +145 -0
- package/lib/tabs.js +3 -5
- package/lib/tabs.ws.js +15 -19
- package/lib/theme/styles.js +70 -0
- package/lib/theme/tailwind-classes.js +125 -16
- package/lib/theme/tailwind-colors.js +1 -0
- package/lib/tooltip.ws.js +12 -8
- package/lib/types/__generated__/checkbox.props.d.ts +3 -0
- package/lib/types/__generated__/navigation-menu.props.d.ts +8 -0
- package/lib/types/__generated__/radio-group.props.d.ts +4 -0
- package/lib/types/__generated__/select.props.d.ts +9 -0
- package/lib/types/__generated__/switch.props.d.ts +3 -0
- package/lib/types/checkbox.d.ts +6 -0
- package/lib/types/checkbox.stories.d.ts +11 -0
- package/lib/types/checkbox.ws.d.ts +5 -0
- package/lib/types/components.d.ts +5 -4
- package/lib/types/metas.d.ts +6 -4
- package/lib/types/navigation-menu.d.ts +15 -0
- package/lib/types/navigation-menu.ws.d.ts +15 -0
- package/lib/types/props-descriptions.d.ts +29 -0
- package/lib/types/props.d.ts +5 -4
- package/lib/types/radio-group.d.ts +5 -0
- package/lib/types/radio-group.stories.d.ts +9 -0
- package/lib/types/radio-group.ws.d.ts +7 -0
- package/lib/types/select.d.ts +14 -0
- package/lib/types/select.ws.d.ts +17 -0
- package/lib/types/sheet.ws.d.ts +2 -15
- package/lib/types/switch.d.ts +4 -0
- package/lib/types/switch.stories.d.ts +9 -0
- package/lib/types/switch.ws.d.ts +5 -0
- package/lib/types/tabs.d.ts +3 -12
- package/lib/types/theme/radix-common-types.d.ts +3 -2
- package/lib/types/theme/styles.d.ts +215 -0
- package/lib/types/theme/tailwind-classes.d.ts +16 -6
- package/lib/types/theme/tailwind-colors.d.ts +1 -0
- package/lib/types/theme/tailwind-theme.d.ts +1 -1
- package/package.json +12 -7
- package/src/__generated__/accordion.props.ts +675 -108
- package/src/__generated__/button.props.ts +177 -45
- package/src/__generated__/checkbox.props.ts +1217 -0
- package/src/__generated__/collapsible.props.ts +261 -42
- package/src/__generated__/dialog.props.ts +682 -115
- package/src/__generated__/input.props.ts +292 -44
- package/src/__generated__/label.props.ts +137 -22
- package/src/__generated__/navigation-menu.props.ts +2882 -0
- package/src/__generated__/popover.props.ts +142 -24
- package/src/__generated__/radio-group.props.ts +1828 -0
- package/src/__generated__/select.props.ts +4130 -0
- package/src/__generated__/sheet.props.ts +657 -110
- package/src/__generated__/switch.props.ts +1217 -0
- package/src/__generated__/tabs.props.ts +1019 -67
- package/src/__generated__/textarea.props.ts +195 -30
- package/src/__generated__/tooltip.props.ts +145 -25
- package/src/accordion.tsx +14 -7
- package/src/accordion.ws.ts +87 -70
- package/src/{textarea.stories.ts → checkbox.stories.ts} +6 -11
- package/src/checkbox.tsx +22 -0
- package/src/checkbox.ws.ts +154 -0
- package/src/collapsible.ws.ts +6 -1
- package/src/components.ts +25 -12
- package/src/dialog.ws.tsx +17 -16
- package/src/hooks.ts +4 -0
- package/src/label.ws.ts +3 -1
- package/src/metas.ts +36 -12
- package/src/navigation-menu.stories.tsx +21 -0
- package/src/navigation-menu.tsx +130 -0
- package/src/navigation-menu.ws.ts +524 -0
- package/src/popover.ws.tsx +13 -9
- package/src/props-descriptions.ts +43 -0
- package/src/props.ts +35 -12
- package/src/{input.stories.ts → radio-group.stories.ts} +6 -15
- package/src/radio-group.tsx +17 -0
- package/src/radio-group.ws.ts +178 -0
- package/src/select.stories.tsx +21 -0
- package/src/select.tsx +112 -0
- package/src/select.ws.ts +349 -0
- package/src/sheet.ws.tsx +91 -209
- package/src/{button.stories.ts → switch.stories.ts} +6 -19
- package/src/switch.tsx +10 -0
- package/src/switch.ws.ts +146 -0
- package/src/tabs.tsx +4 -17
- package/src/tabs.ws.ts +19 -19
- package/src/theme/radix-common-types.ts +3 -2
- package/src/theme/styles.ts +80 -0
- package/src/theme/tailwind-classes.ts +150 -14
- package/src/theme/tailwind-colors.ts +1 -0
- package/src/tooltip.ws.tsx +13 -8
- package/lib/button.js +0 -8
- package/lib/button.ws.js +0 -133
- package/lib/cjs/button.ws.js +0 -160
- package/lib/cjs/input.ws.js +0 -103
- package/lib/cjs/textarea.ws.js +0 -98
- package/lib/input.js +0 -8
- package/lib/input.ws.js +0 -75
- package/lib/textarea.js +0 -8
- package/lib/textarea.ws.js +0 -70
- package/lib/types/button.d.ts +0 -7
- package/lib/types/button.stories.d.ts +0 -20
- package/lib/types/button.ws.d.ts +0 -7
- package/lib/types/input.d.ts +0 -2
- package/lib/types/input.stories.d.ts +0 -20
- package/lib/types/input.ws.d.ts +0 -3
- package/lib/types/textarea.d.ts +0 -2
- package/lib/types/textarea.stories.d.ts +0 -14
- package/lib/types/textarea.ws.d.ts +0 -3
- package/src/button.tsx +0 -25
- package/src/button.ws.ts +0 -155
- package/src/input.tsx +0 -12
- package/src/input.ws.ts +0 -78
- package/src/textarea.tsx +0 -12
- package/src/textarea.ws.ts +0 -74
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
const props = {
|
|
2
2
|
about: { required: false, control: "text", type: "string" },
|
|
3
|
-
accessKey: {
|
|
3
|
+
accessKey: {
|
|
4
|
+
required: false,
|
|
5
|
+
control: "text",
|
|
6
|
+
type: "string",
|
|
7
|
+
description: "Keyboard shortcut to activate or add focus to the element."
|
|
8
|
+
},
|
|
4
9
|
"aria-activedescendant": {
|
|
5
10
|
description: "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
6
11
|
required: false,
|
|
@@ -156,7 +161,7 @@ const props = {
|
|
|
156
161
|
type: "string"
|
|
157
162
|
},
|
|
158
163
|
"aria-label": {
|
|
159
|
-
description: "
|
|
164
|
+
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.",
|
|
160
165
|
required: false,
|
|
161
166
|
control: "text",
|
|
162
167
|
type: "string"
|
|
@@ -332,25 +337,90 @@ const props = {
|
|
|
332
337
|
control: "text",
|
|
333
338
|
type: "string"
|
|
334
339
|
},
|
|
335
|
-
autoCapitalize: {
|
|
336
|
-
|
|
340
|
+
autoCapitalize: {
|
|
341
|
+
required: false,
|
|
342
|
+
control: "text",
|
|
343
|
+
type: "string",
|
|
344
|
+
description: "Sets whether input is automatically capitalized when entered by user."
|
|
345
|
+
},
|
|
346
|
+
autoComplete: {
|
|
347
|
+
required: false,
|
|
348
|
+
control: "text",
|
|
349
|
+
type: "string",
|
|
350
|
+
description: "Indicates whether controls in this form can by default have their valuesautomatically completed by the browser."
|
|
351
|
+
},
|
|
337
352
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
338
|
-
autoFocus: {
|
|
353
|
+
autoFocus: {
|
|
354
|
+
required: false,
|
|
355
|
+
control: "boolean",
|
|
356
|
+
type: "boolean",
|
|
357
|
+
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
358
|
+
},
|
|
339
359
|
autoSave: { required: false, control: "text", type: "string" },
|
|
340
360
|
className: { required: false, control: "text", type: "string" },
|
|
341
|
-
color: {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
361
|
+
color: {
|
|
362
|
+
required: false,
|
|
363
|
+
control: "color",
|
|
364
|
+
type: "string",
|
|
365
|
+
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."
|
|
366
|
+
},
|
|
367
|
+
cols: {
|
|
368
|
+
required: false,
|
|
369
|
+
control: "number",
|
|
370
|
+
type: "number",
|
|
371
|
+
description: "Defines the number of columns in a textarea."
|
|
372
|
+
},
|
|
373
|
+
content: {
|
|
374
|
+
required: false,
|
|
375
|
+
control: "text",
|
|
376
|
+
type: "string",
|
|
377
|
+
description: "A value associated with http-equiv orname depending on the context."
|
|
378
|
+
},
|
|
379
|
+
contextMenu: {
|
|
380
|
+
required: false,
|
|
381
|
+
control: "text",
|
|
382
|
+
type: "string",
|
|
383
|
+
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
384
|
+
},
|
|
345
385
|
datatype: { required: false, control: "text", type: "string" },
|
|
346
386
|
defaultChecked: { required: false, control: "boolean", type: "boolean" },
|
|
347
|
-
dir: {
|
|
387
|
+
dir: {
|
|
388
|
+
required: false,
|
|
389
|
+
control: "text",
|
|
390
|
+
type: "string",
|
|
391
|
+
description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
|
|
392
|
+
},
|
|
348
393
|
dirName: { required: false, control: "text", type: "string" },
|
|
349
|
-
disabled: {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
394
|
+
disabled: {
|
|
395
|
+
required: false,
|
|
396
|
+
control: "boolean",
|
|
397
|
+
type: "boolean",
|
|
398
|
+
description: "Indicates whether the user can interact with the element."
|
|
399
|
+
},
|
|
400
|
+
draggable: {
|
|
401
|
+
required: false,
|
|
402
|
+
control: "boolean",
|
|
403
|
+
type: "boolean",
|
|
404
|
+
description: "Defines whether the element can be dragged."
|
|
405
|
+
},
|
|
406
|
+
form: {
|
|
407
|
+
required: false,
|
|
408
|
+
control: "text",
|
|
409
|
+
type: "string",
|
|
410
|
+
description: "Indicates the form that is the owner of the element."
|
|
411
|
+
},
|
|
412
|
+
hidden: {
|
|
413
|
+
required: false,
|
|
414
|
+
control: "boolean",
|
|
415
|
+
type: "boolean",
|
|
416
|
+
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
417
|
+
},
|
|
418
|
+
id: {
|
|
419
|
+
required: false,
|
|
420
|
+
control: "text",
|
|
421
|
+
type: "string",
|
|
422
|
+
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
423
|
+
},
|
|
354
424
|
inputMode: {
|
|
355
425
|
description: "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
|
|
356
426
|
required: false,
|
|
@@ -378,26 +448,86 @@ const props = {
|
|
|
378
448
|
itemRef: { required: false, control: "text", type: "string" },
|
|
379
449
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
380
450
|
itemType: { required: false, control: "text", type: "string" },
|
|
381
|
-
lang: {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
451
|
+
lang: {
|
|
452
|
+
required: false,
|
|
453
|
+
control: "text",
|
|
454
|
+
type: "string",
|
|
455
|
+
description: "Defines the language used in the element."
|
|
456
|
+
},
|
|
457
|
+
maxLength: {
|
|
458
|
+
required: false,
|
|
459
|
+
control: "number",
|
|
460
|
+
type: "number",
|
|
461
|
+
description: "Defines the maximum number of characters allowed in the element."
|
|
462
|
+
},
|
|
463
|
+
minLength: {
|
|
464
|
+
required: false,
|
|
465
|
+
control: "number",
|
|
466
|
+
type: "number",
|
|
467
|
+
description: "Defines the minimum number of characters allowed in the element."
|
|
468
|
+
},
|
|
469
|
+
name: {
|
|
470
|
+
required: false,
|
|
471
|
+
control: "text",
|
|
472
|
+
type: "string",
|
|
473
|
+
description: "This name is important when submitting form data to the server, as it identifies the data associated with the input. When multiple inputs share the same name attribute, they are treated as part of the same group (e.g., radio buttons or checkboxes)."
|
|
474
|
+
},
|
|
385
475
|
nonce: { required: false, control: "text", type: "string" },
|
|
386
|
-
placeholder: {
|
|
476
|
+
placeholder: {
|
|
477
|
+
required: false,
|
|
478
|
+
control: "text",
|
|
479
|
+
type: "string",
|
|
480
|
+
description: "Provides a hint to the user of what can be entered in the field."
|
|
481
|
+
},
|
|
387
482
|
prefix: { required: false, control: "text", type: "string" },
|
|
388
483
|
property: { required: false, control: "text", type: "string" },
|
|
389
484
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
390
|
-
readOnly: {
|
|
391
|
-
|
|
392
|
-
|
|
485
|
+
readOnly: {
|
|
486
|
+
required: false,
|
|
487
|
+
control: "boolean",
|
|
488
|
+
type: "boolean",
|
|
489
|
+
description: "Indicates whether the element can be edited."
|
|
490
|
+
},
|
|
491
|
+
rel: {
|
|
492
|
+
required: false,
|
|
493
|
+
control: "text",
|
|
494
|
+
type: "string",
|
|
495
|
+
description: "Specifies the relationship of the target object to the link object."
|
|
496
|
+
},
|
|
497
|
+
required: {
|
|
498
|
+
required: false,
|
|
499
|
+
control: "boolean",
|
|
500
|
+
type: "boolean",
|
|
501
|
+
description: "Indicates whether this form element must be filled before the form can be submitted."
|
|
502
|
+
},
|
|
393
503
|
resource: { required: false, control: "text", type: "string" },
|
|
394
504
|
results: { required: false, control: "number", type: "number" },
|
|
395
505
|
rev: { required: false, control: "text", type: "string" },
|
|
396
|
-
role: {
|
|
397
|
-
|
|
506
|
+
role: {
|
|
507
|
+
required: false,
|
|
508
|
+
control: "text",
|
|
509
|
+
type: "string",
|
|
510
|
+
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
511
|
+
},
|
|
512
|
+
rows: {
|
|
513
|
+
required: false,
|
|
514
|
+
control: "number",
|
|
515
|
+
type: "number",
|
|
516
|
+
description: "Defines the number of rows in a text area."
|
|
517
|
+
},
|
|
398
518
|
security: { required: false, control: "text", type: "string" },
|
|
399
|
-
slot: {
|
|
400
|
-
|
|
519
|
+
slot: {
|
|
520
|
+
required: false,
|
|
521
|
+
control: "text",
|
|
522
|
+
type: "string",
|
|
523
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
524
|
+
},
|
|
525
|
+
spellCheck: {
|
|
526
|
+
required: false,
|
|
527
|
+
control: "boolean",
|
|
528
|
+
type: "boolean",
|
|
529
|
+
description: "Indicates whether spell checking is allowed for the element."
|
|
530
|
+
},
|
|
401
531
|
suppressContentEditableWarning: {
|
|
402
532
|
required: false,
|
|
403
533
|
control: "boolean",
|
|
@@ -408,13 +538,24 @@ const props = {
|
|
|
408
538
|
control: "boolean",
|
|
409
539
|
type: "boolean"
|
|
410
540
|
},
|
|
411
|
-
tabIndex: {
|
|
412
|
-
|
|
541
|
+
tabIndex: {
|
|
542
|
+
required: false,
|
|
543
|
+
control: "number",
|
|
544
|
+
type: "number",
|
|
545
|
+
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
546
|
+
},
|
|
547
|
+
title: {
|
|
548
|
+
required: false,
|
|
549
|
+
control: "text",
|
|
550
|
+
type: "string",
|
|
551
|
+
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
552
|
+
},
|
|
413
553
|
translate: {
|
|
414
554
|
required: false,
|
|
415
555
|
control: "radio",
|
|
416
556
|
type: "string",
|
|
417
|
-
options: ["yes", "no"]
|
|
557
|
+
options: ["yes", "no"],
|
|
558
|
+
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."
|
|
418
559
|
},
|
|
419
560
|
typeof: { required: false, control: "text", type: "string" },
|
|
420
561
|
unselectable: {
|
|
@@ -424,7 +565,12 @@ const props = {
|
|
|
424
565
|
options: ["on", "off"]
|
|
425
566
|
},
|
|
426
567
|
vocab: { required: false, control: "text", type: "string" },
|
|
427
|
-
wrap: {
|
|
568
|
+
wrap: {
|
|
569
|
+
required: false,
|
|
570
|
+
control: "text",
|
|
571
|
+
type: "string",
|
|
572
|
+
description: "Indicates whether the text should be wrapped."
|
|
573
|
+
}
|
|
428
574
|
};
|
|
429
575
|
export {
|
|
430
576
|
props
|
|
@@ -1,29 +1,45 @@
|
|
|
1
1
|
const propsTooltip = {
|
|
2
2
|
delayDuration: {
|
|
3
|
-
description: "The
|
|
3
|
+
description: "The delay before the Tooltip shows after the Trigger is hovered, in milliseconds. If no value is specified, the default is 700ms",
|
|
4
4
|
required: false,
|
|
5
5
|
control: "number",
|
|
6
6
|
type: "number"
|
|
7
7
|
},
|
|
8
8
|
disableHoverableContent: {
|
|
9
|
-
description: "When
|
|
9
|
+
description: "When toggled, prevents the Tooltip content from showing when the Trigger is hovered.",
|
|
10
10
|
required: false,
|
|
11
11
|
control: "boolean",
|
|
12
12
|
type: "boolean"
|
|
13
13
|
},
|
|
14
|
-
open: {
|
|
14
|
+
open: {
|
|
15
|
+
required: false,
|
|
16
|
+
control: "boolean",
|
|
17
|
+
type: "boolean",
|
|
18
|
+
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
19
|
+
}
|
|
15
20
|
};
|
|
16
21
|
const propsTooltipTrigger = {};
|
|
17
22
|
const propsTooltipContent = {
|
|
18
23
|
about: { required: false, control: "text", type: "string" },
|
|
19
|
-
accessKey: {
|
|
24
|
+
accessKey: {
|
|
25
|
+
required: false,
|
|
26
|
+
control: "text",
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Keyboard shortcut to activate or add focus to the element."
|
|
29
|
+
},
|
|
20
30
|
align: {
|
|
21
31
|
required: false,
|
|
22
32
|
control: "radio",
|
|
23
33
|
type: "string",
|
|
24
|
-
options: ["center", "start", "end"]
|
|
34
|
+
options: ["center", "start", "end"],
|
|
35
|
+
description: "Specifies the horizontal alignment of the element."
|
|
36
|
+
},
|
|
37
|
+
alignOffset: {
|
|
38
|
+
required: false,
|
|
39
|
+
control: "number",
|
|
40
|
+
type: "number",
|
|
41
|
+
description: "The offset in pixels from the \u201Cstart\u201C or \u201Cend\u201C alignment options."
|
|
25
42
|
},
|
|
26
|
-
alignOffset: { required: false, control: "number", type: "number" },
|
|
27
43
|
"aria-activedescendant": {
|
|
28
44
|
description: "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
29
45
|
required: false,
|
|
@@ -179,7 +195,7 @@ const propsTooltipContent = {
|
|
|
179
195
|
type: "string"
|
|
180
196
|
},
|
|
181
197
|
"aria-label": {
|
|
182
|
-
description: "
|
|
198
|
+
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.",
|
|
183
199
|
required: false,
|
|
184
200
|
control: "text",
|
|
185
201
|
type: "string"
|
|
@@ -356,28 +372,71 @@ const propsTooltipContent = {
|
|
|
356
372
|
type: "string"
|
|
357
373
|
},
|
|
358
374
|
arrowPadding: { required: false, control: "number", type: "number" },
|
|
359
|
-
|
|
360
|
-
|
|
375
|
+
autoCapitalize: {
|
|
376
|
+
required: false,
|
|
377
|
+
control: "text",
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "Sets whether input is automatically capitalized when entered by user."
|
|
380
|
+
},
|
|
361
381
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
362
|
-
autoFocus: {
|
|
382
|
+
autoFocus: {
|
|
383
|
+
required: false,
|
|
384
|
+
control: "boolean",
|
|
385
|
+
type: "boolean",
|
|
386
|
+
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
387
|
+
},
|
|
363
388
|
autoSave: { required: false, control: "text", type: "string" },
|
|
364
389
|
avoidCollisions: { required: false, control: "boolean", type: "boolean" },
|
|
365
390
|
className: { required: false, control: "text", type: "string" },
|
|
366
|
-
color: {
|
|
367
|
-
|
|
368
|
-
|
|
391
|
+
color: {
|
|
392
|
+
required: false,
|
|
393
|
+
control: "color",
|
|
394
|
+
type: "string",
|
|
395
|
+
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."
|
|
396
|
+
},
|
|
397
|
+
content: {
|
|
398
|
+
required: false,
|
|
399
|
+
control: "text",
|
|
400
|
+
type: "string",
|
|
401
|
+
description: "A value associated with http-equiv orname depending on the context."
|
|
402
|
+
},
|
|
403
|
+
contextMenu: {
|
|
404
|
+
required: false,
|
|
405
|
+
control: "text",
|
|
406
|
+
type: "string",
|
|
407
|
+
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
408
|
+
},
|
|
369
409
|
datatype: { required: false, control: "text", type: "string" },
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
410
|
+
dir: {
|
|
411
|
+
required: false,
|
|
412
|
+
control: "text",
|
|
413
|
+
type: "string",
|
|
414
|
+
description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
|
|
415
|
+
},
|
|
416
|
+
draggable: {
|
|
417
|
+
required: false,
|
|
418
|
+
control: "boolean",
|
|
419
|
+
type: "boolean",
|
|
420
|
+
description: "Defines whether the element can be dragged."
|
|
421
|
+
},
|
|
422
|
+
hidden: {
|
|
423
|
+
required: false,
|
|
424
|
+
control: "boolean",
|
|
425
|
+
type: "boolean",
|
|
426
|
+
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
427
|
+
},
|
|
374
428
|
hideWhenDetached: {
|
|
375
429
|
required: false,
|
|
376
430
|
control: "boolean",
|
|
377
431
|
type: "boolean",
|
|
378
432
|
defaultValue: true
|
|
379
433
|
},
|
|
380
|
-
id: {
|
|
434
|
+
id: {
|
|
435
|
+
required: false,
|
|
436
|
+
control: "text",
|
|
437
|
+
type: "string",
|
|
438
|
+
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
439
|
+
},
|
|
381
440
|
inputMode: {
|
|
382
441
|
description: "Hints at the type of data that might be entered by the user while editing the element or its contents\n@see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute",
|
|
383
442
|
required: false,
|
|
@@ -405,32 +464,64 @@ const propsTooltipContent = {
|
|
|
405
464
|
itemRef: { required: false, control: "text", type: "string" },
|
|
406
465
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
407
466
|
itemType: { required: false, control: "text", type: "string" },
|
|
408
|
-
lang: {
|
|
467
|
+
lang: {
|
|
468
|
+
required: false,
|
|
469
|
+
control: "text",
|
|
470
|
+
type: "string",
|
|
471
|
+
description: "Defines the language used in the element."
|
|
472
|
+
},
|
|
409
473
|
nonce: { required: false, control: "text", type: "string" },
|
|
410
|
-
placeholder: {
|
|
474
|
+
placeholder: {
|
|
475
|
+
required: false,
|
|
476
|
+
control: "text",
|
|
477
|
+
type: "string",
|
|
478
|
+
description: "Provides a hint to the user of what can be entered in the field."
|
|
479
|
+
},
|
|
411
480
|
prefix: { required: false, control: "text", type: "string" },
|
|
412
481
|
property: { required: false, control: "text", type: "string" },
|
|
413
482
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
414
|
-
rel: {
|
|
483
|
+
rel: {
|
|
484
|
+
required: false,
|
|
485
|
+
control: "text",
|
|
486
|
+
type: "string",
|
|
487
|
+
description: "Specifies the relationship of the target object to the link object."
|
|
488
|
+
},
|
|
415
489
|
resource: { required: false, control: "text", type: "string" },
|
|
416
490
|
results: { required: false, control: "number", type: "number" },
|
|
417
491
|
rev: { required: false, control: "text", type: "string" },
|
|
418
|
-
role: {
|
|
492
|
+
role: {
|
|
493
|
+
required: false,
|
|
494
|
+
control: "text",
|
|
495
|
+
type: "string",
|
|
496
|
+
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
497
|
+
},
|
|
419
498
|
security: { required: false, control: "text", type: "string" },
|
|
420
499
|
side: {
|
|
421
500
|
required: false,
|
|
422
501
|
control: "select",
|
|
423
502
|
type: "string",
|
|
424
|
-
options: ["top", "right", "bottom", "left"]
|
|
503
|
+
options: ["top", "right", "bottom", "left"],
|
|
504
|
+
description: "The preferred alignment against the Trigger. May change when collisions occur."
|
|
425
505
|
},
|
|
426
506
|
sideOffset: {
|
|
427
507
|
required: false,
|
|
428
508
|
control: "number",
|
|
429
509
|
type: "number",
|
|
430
|
-
defaultValue: 4
|
|
510
|
+
defaultValue: 4,
|
|
511
|
+
description: "The distance in pixels between the Content and the Trigger."
|
|
512
|
+
},
|
|
513
|
+
slot: {
|
|
514
|
+
required: false,
|
|
515
|
+
control: "text",
|
|
516
|
+
type: "string",
|
|
517
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
518
|
+
},
|
|
519
|
+
spellCheck: {
|
|
520
|
+
required: false,
|
|
521
|
+
control: "boolean",
|
|
522
|
+
type: "boolean",
|
|
523
|
+
description: "Indicates whether spell checking is allowed for the element."
|
|
431
524
|
},
|
|
432
|
-
slot: { required: false, control: "text", type: "string" },
|
|
433
|
-
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
434
525
|
sticky: {
|
|
435
526
|
required: false,
|
|
436
527
|
control: "radio",
|
|
@@ -447,13 +538,24 @@ const propsTooltipContent = {
|
|
|
447
538
|
control: "boolean",
|
|
448
539
|
type: "boolean"
|
|
449
540
|
},
|
|
450
|
-
tabIndex: {
|
|
451
|
-
|
|
541
|
+
tabIndex: {
|
|
542
|
+
required: false,
|
|
543
|
+
control: "number",
|
|
544
|
+
type: "number",
|
|
545
|
+
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
546
|
+
},
|
|
547
|
+
title: {
|
|
548
|
+
required: false,
|
|
549
|
+
control: "text",
|
|
550
|
+
type: "string",
|
|
551
|
+
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
552
|
+
},
|
|
452
553
|
translate: {
|
|
453
554
|
required: false,
|
|
454
555
|
control: "radio",
|
|
455
556
|
type: "string",
|
|
456
|
-
options: ["yes", "no"]
|
|
557
|
+
options: ["yes", "no"],
|
|
558
|
+
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."
|
|
457
559
|
},
|
|
458
560
|
typeof: { required: false, control: "text", type: "string" },
|
|
459
561
|
unselectable: {
|
package/lib/accordion.js
CHANGED
|
@@ -27,15 +27,22 @@ const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
|
27
27
|
const hooksAccordion = {
|
|
28
28
|
onNavigatorSelect: (context, event) => {
|
|
29
29
|
for (const instance of event.instancePath) {
|
|
30
|
-
if (instance.component === `${namespace}:
|
|
30
|
+
if (instance.component === `${namespace}:AccordionContent`) {
|
|
31
31
|
const accordion = getClosestInstance(
|
|
32
32
|
event.instancePath,
|
|
33
33
|
instance,
|
|
34
34
|
`${namespace}:Accordion`
|
|
35
35
|
);
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const item = getClosestInstance(
|
|
37
|
+
event.instancePath,
|
|
38
|
+
instance,
|
|
39
|
+
`${namespace}:AccordionItem`
|
|
40
|
+
);
|
|
41
|
+
if (accordion && item) {
|
|
42
|
+
const itemValue = context.getPropValue(item.id, "value") ?? context.indexesWithinAncestors.get(item.id)?.toString();
|
|
43
|
+
if (itemValue) {
|
|
44
|
+
context.setPropVariable(accordion.id, "value", itemValue);
|
|
45
|
+
}
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
}
|