@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
|
@@ -2,7 +2,12 @@ import type { PropMeta } from "@webstudio-is/generate-arg-types";
|
|
|
2
2
|
|
|
3
3
|
export const props: Record<string, PropMeta> = {
|
|
4
4
|
about: { required: false, control: "text", type: "string" },
|
|
5
|
-
accessKey: {
|
|
5
|
+
accessKey: {
|
|
6
|
+
required: false,
|
|
7
|
+
control: "text",
|
|
8
|
+
type: "string",
|
|
9
|
+
description: "Keyboard shortcut to activate or add focus to the element.",
|
|
10
|
+
},
|
|
6
11
|
"aria-activedescendant": {
|
|
7
12
|
description:
|
|
8
13
|
"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
@@ -183,7 +188,7 @@ export const props: Record<string, PropMeta> = {
|
|
|
183
188
|
},
|
|
184
189
|
"aria-label": {
|
|
185
190
|
description:
|
|
186
|
-
"
|
|
191
|
+
"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.",
|
|
187
192
|
required: false,
|
|
188
193
|
control: "text",
|
|
189
194
|
type: "string",
|
|
@@ -382,25 +387,99 @@ export const props: Record<string, PropMeta> = {
|
|
|
382
387
|
control: "text",
|
|
383
388
|
type: "string",
|
|
384
389
|
},
|
|
385
|
-
autoCapitalize: {
|
|
386
|
-
|
|
390
|
+
autoCapitalize: {
|
|
391
|
+
required: false,
|
|
392
|
+
control: "text",
|
|
393
|
+
type: "string",
|
|
394
|
+
description:
|
|
395
|
+
"Sets whether input is automatically capitalized when entered by user.",
|
|
396
|
+
},
|
|
397
|
+
autoComplete: {
|
|
398
|
+
required: false,
|
|
399
|
+
control: "text",
|
|
400
|
+
type: "string",
|
|
401
|
+
description:
|
|
402
|
+
"Indicates whether controls in this form can by default have their valuesautomatically completed by the browser.",
|
|
403
|
+
},
|
|
387
404
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
388
|
-
autoFocus: {
|
|
405
|
+
autoFocus: {
|
|
406
|
+
required: false,
|
|
407
|
+
control: "boolean",
|
|
408
|
+
type: "boolean",
|
|
409
|
+
description:
|
|
410
|
+
"Indicates that an element should be focused on page load, or when its parent dialog is displayed.",
|
|
411
|
+
},
|
|
389
412
|
autoSave: { required: false, control: "text", type: "string" },
|
|
390
413
|
className: { required: false, control: "text", type: "string" },
|
|
391
|
-
color: {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
414
|
+
color: {
|
|
415
|
+
required: false,
|
|
416
|
+
control: "color",
|
|
417
|
+
type: "string",
|
|
418
|
+
description:
|
|
419
|
+
"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.",
|
|
420
|
+
},
|
|
421
|
+
cols: {
|
|
422
|
+
required: false,
|
|
423
|
+
control: "number",
|
|
424
|
+
type: "number",
|
|
425
|
+
description: "Defines the number of columns in a textarea.",
|
|
426
|
+
},
|
|
427
|
+
content: {
|
|
428
|
+
required: false,
|
|
429
|
+
control: "text",
|
|
430
|
+
type: "string",
|
|
431
|
+
description:
|
|
432
|
+
"A value associated with http-equiv orname depending on the context.",
|
|
433
|
+
},
|
|
434
|
+
contextMenu: {
|
|
435
|
+
required: false,
|
|
436
|
+
control: "text",
|
|
437
|
+
type: "string",
|
|
438
|
+
description:
|
|
439
|
+
"Defines the ID of a menu element which willserve as the element's context menu.",
|
|
440
|
+
},
|
|
395
441
|
datatype: { required: false, control: "text", type: "string" },
|
|
396
442
|
defaultChecked: { required: false, control: "boolean", type: "boolean" },
|
|
397
|
-
dir: {
|
|
443
|
+
dir: {
|
|
444
|
+
required: false,
|
|
445
|
+
control: "text",
|
|
446
|
+
type: "string",
|
|
447
|
+
description:
|
|
448
|
+
"Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)",
|
|
449
|
+
},
|
|
398
450
|
dirName: { required: false, control: "text", type: "string" },
|
|
399
|
-
disabled: {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
451
|
+
disabled: {
|
|
452
|
+
required: false,
|
|
453
|
+
control: "boolean",
|
|
454
|
+
type: "boolean",
|
|
455
|
+
description: "Indicates whether the user can interact with the element.",
|
|
456
|
+
},
|
|
457
|
+
draggable: {
|
|
458
|
+
required: false,
|
|
459
|
+
control: "boolean",
|
|
460
|
+
type: "boolean",
|
|
461
|
+
description: "Defines whether the element can be dragged.",
|
|
462
|
+
},
|
|
463
|
+
form: {
|
|
464
|
+
required: false,
|
|
465
|
+
control: "text",
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "Indicates the form that is the owner of the element.",
|
|
468
|
+
},
|
|
469
|
+
hidden: {
|
|
470
|
+
required: false,
|
|
471
|
+
control: "boolean",
|
|
472
|
+
type: "boolean",
|
|
473
|
+
description:
|
|
474
|
+
"Prevents rendering of given element, while keeping child elements, e.g. script elements, active.",
|
|
475
|
+
},
|
|
476
|
+
id: {
|
|
477
|
+
required: false,
|
|
478
|
+
control: "text",
|
|
479
|
+
type: "string",
|
|
480
|
+
description:
|
|
481
|
+
"Often used with CSS to style a specific element. The value of this attribute must be unique.",
|
|
482
|
+
},
|
|
404
483
|
inputMode: {
|
|
405
484
|
description:
|
|
406
485
|
"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",
|
|
@@ -430,26 +509,93 @@ export const props: Record<string, PropMeta> = {
|
|
|
430
509
|
itemRef: { required: false, control: "text", type: "string" },
|
|
431
510
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
432
511
|
itemType: { required: false, control: "text", type: "string" },
|
|
433
|
-
lang: {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
512
|
+
lang: {
|
|
513
|
+
required: false,
|
|
514
|
+
control: "text",
|
|
515
|
+
type: "string",
|
|
516
|
+
description: "Defines the language used in the element.",
|
|
517
|
+
},
|
|
518
|
+
maxLength: {
|
|
519
|
+
required: false,
|
|
520
|
+
control: "number",
|
|
521
|
+
type: "number",
|
|
522
|
+
description:
|
|
523
|
+
"Defines the maximum number of characters allowed in the element.",
|
|
524
|
+
},
|
|
525
|
+
minLength: {
|
|
526
|
+
required: false,
|
|
527
|
+
control: "number",
|
|
528
|
+
type: "number",
|
|
529
|
+
description:
|
|
530
|
+
"Defines the minimum number of characters allowed in the element.",
|
|
531
|
+
},
|
|
532
|
+
name: {
|
|
533
|
+
required: false,
|
|
534
|
+
control: "text",
|
|
535
|
+
type: "string",
|
|
536
|
+
description:
|
|
537
|
+
"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).",
|
|
538
|
+
},
|
|
437
539
|
nonce: { required: false, control: "text", type: "string" },
|
|
438
|
-
placeholder: {
|
|
540
|
+
placeholder: {
|
|
541
|
+
required: false,
|
|
542
|
+
control: "text",
|
|
543
|
+
type: "string",
|
|
544
|
+
description:
|
|
545
|
+
"Provides a hint to the user of what can be entered in the field.",
|
|
546
|
+
},
|
|
439
547
|
prefix: { required: false, control: "text", type: "string" },
|
|
440
548
|
property: { required: false, control: "text", type: "string" },
|
|
441
549
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
442
|
-
readOnly: {
|
|
443
|
-
|
|
444
|
-
|
|
550
|
+
readOnly: {
|
|
551
|
+
required: false,
|
|
552
|
+
control: "boolean",
|
|
553
|
+
type: "boolean",
|
|
554
|
+
description: "Indicates whether the element can be edited.",
|
|
555
|
+
},
|
|
556
|
+
rel: {
|
|
557
|
+
required: false,
|
|
558
|
+
control: "text",
|
|
559
|
+
type: "string",
|
|
560
|
+
description:
|
|
561
|
+
"Specifies the relationship of the target object to the link object.",
|
|
562
|
+
},
|
|
563
|
+
required: {
|
|
564
|
+
required: false,
|
|
565
|
+
control: "boolean",
|
|
566
|
+
type: "boolean",
|
|
567
|
+
description:
|
|
568
|
+
"Indicates whether this form element must be filled before the form can be submitted.",
|
|
569
|
+
},
|
|
445
570
|
resource: { required: false, control: "text", type: "string" },
|
|
446
571
|
results: { required: false, control: "number", type: "number" },
|
|
447
572
|
rev: { required: false, control: "text", type: "string" },
|
|
448
|
-
role: {
|
|
449
|
-
|
|
573
|
+
role: {
|
|
574
|
+
required: false,
|
|
575
|
+
control: "text",
|
|
576
|
+
type: "string",
|
|
577
|
+
description:
|
|
578
|
+
"Defines an explicit role for an element for use by assistive technologies.",
|
|
579
|
+
},
|
|
580
|
+
rows: {
|
|
581
|
+
required: false,
|
|
582
|
+
control: "number",
|
|
583
|
+
type: "number",
|
|
584
|
+
description: "Defines the number of rows in a text area.",
|
|
585
|
+
},
|
|
450
586
|
security: { required: false, control: "text", type: "string" },
|
|
451
|
-
slot: {
|
|
452
|
-
|
|
587
|
+
slot: {
|
|
588
|
+
required: false,
|
|
589
|
+
control: "text",
|
|
590
|
+
type: "string",
|
|
591
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element.",
|
|
592
|
+
},
|
|
593
|
+
spellCheck: {
|
|
594
|
+
required: false,
|
|
595
|
+
control: "boolean",
|
|
596
|
+
type: "boolean",
|
|
597
|
+
description: "Indicates whether spell checking is allowed for the element.",
|
|
598
|
+
},
|
|
453
599
|
suppressContentEditableWarning: {
|
|
454
600
|
required: false,
|
|
455
601
|
control: "boolean",
|
|
@@ -460,13 +606,27 @@ export const props: Record<string, PropMeta> = {
|
|
|
460
606
|
control: "boolean",
|
|
461
607
|
type: "boolean",
|
|
462
608
|
},
|
|
463
|
-
tabIndex: {
|
|
464
|
-
|
|
609
|
+
tabIndex: {
|
|
610
|
+
required: false,
|
|
611
|
+
control: "number",
|
|
612
|
+
type: "number",
|
|
613
|
+
description:
|
|
614
|
+
"Overrides the browser's default tab order and follows the one specified instead.",
|
|
615
|
+
},
|
|
616
|
+
title: {
|
|
617
|
+
required: false,
|
|
618
|
+
control: "text",
|
|
619
|
+
type: "string",
|
|
620
|
+
description:
|
|
621
|
+
"Text to be displayed in a tooltip when hovering over the element.",
|
|
622
|
+
},
|
|
465
623
|
translate: {
|
|
466
624
|
required: false,
|
|
467
625
|
control: "radio",
|
|
468
626
|
type: "string",
|
|
469
627
|
options: ["yes", "no"],
|
|
628
|
+
description:
|
|
629
|
+
"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.",
|
|
470
630
|
},
|
|
471
631
|
typeof: { required: false, control: "text", type: "string" },
|
|
472
632
|
unselectable: {
|
|
@@ -476,5 +636,10 @@ export const props: Record<string, PropMeta> = {
|
|
|
476
636
|
options: ["on", "off"],
|
|
477
637
|
},
|
|
478
638
|
vocab: { required: false, control: "text", type: "string" },
|
|
479
|
-
wrap: {
|
|
639
|
+
wrap: {
|
|
640
|
+
required: false,
|
|
641
|
+
control: "text",
|
|
642
|
+
type: "string",
|
|
643
|
+
description: "Indicates whether the text should be wrapped.",
|
|
644
|
+
},
|
|
480
645
|
};
|
|
@@ -3,31 +3,49 @@ import type { PropMeta } from "@webstudio-is/generate-arg-types";
|
|
|
3
3
|
export const propsTooltip: Record<string, PropMeta> = {
|
|
4
4
|
delayDuration: {
|
|
5
5
|
description:
|
|
6
|
-
"The
|
|
6
|
+
"The delay before the Tooltip shows after the Trigger is hovered, in milliseconds. If no value is specified, the default is 700ms",
|
|
7
7
|
required: false,
|
|
8
8
|
control: "number",
|
|
9
9
|
type: "number",
|
|
10
10
|
},
|
|
11
11
|
disableHoverableContent: {
|
|
12
12
|
description:
|
|
13
|
-
"When
|
|
13
|
+
"When toggled, prevents the Tooltip content from showing when the Trigger is hovered.",
|
|
14
14
|
required: false,
|
|
15
15
|
control: "boolean",
|
|
16
16
|
type: "boolean",
|
|
17
17
|
},
|
|
18
|
-
open: {
|
|
18
|
+
open: {
|
|
19
|
+
required: false,
|
|
20
|
+
control: "boolean",
|
|
21
|
+
type: "boolean",
|
|
22
|
+
description:
|
|
23
|
+
"Show or hide the content of this component on the canvas. This will not affect the initial state of the component.",
|
|
24
|
+
},
|
|
19
25
|
};
|
|
20
26
|
export const propsTooltipTrigger: Record<string, PropMeta> = {};
|
|
21
27
|
export const propsTooltipContent: Record<string, PropMeta> = {
|
|
22
28
|
about: { required: false, control: "text", type: "string" },
|
|
23
|
-
accessKey: {
|
|
29
|
+
accessKey: {
|
|
30
|
+
required: false,
|
|
31
|
+
control: "text",
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Keyboard shortcut to activate or add focus to the element.",
|
|
34
|
+
},
|
|
24
35
|
align: {
|
|
25
36
|
required: false,
|
|
26
37
|
control: "radio",
|
|
27
38
|
type: "string",
|
|
28
39
|
options: ["center", "start", "end"],
|
|
40
|
+
description: "Specifies the horizontal alignment of the element.",
|
|
41
|
+
},
|
|
42
|
+
alignOffset: {
|
|
43
|
+
required: false,
|
|
44
|
+
control: "number",
|
|
45
|
+
type: "number",
|
|
46
|
+
description:
|
|
47
|
+
"The offset in pixels from the “start“ or “end“ alignment options.",
|
|
29
48
|
},
|
|
30
|
-
alignOffset: { required: false, control: "number", type: "number" },
|
|
31
49
|
"aria-activedescendant": {
|
|
32
50
|
description:
|
|
33
51
|
"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
@@ -207,7 +225,8 @@ export const propsTooltipContent: Record<string, PropMeta> = {
|
|
|
207
225
|
type: "string",
|
|
208
226
|
},
|
|
209
227
|
"aria-label": {
|
|
210
|
-
description:
|
|
228
|
+
description:
|
|
229
|
+
"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.",
|
|
211
230
|
required: false,
|
|
212
231
|
control: "text",
|
|
213
232
|
type: "string",
|
|
@@ -407,28 +426,79 @@ export const propsTooltipContent: Record<string, PropMeta> = {
|
|
|
407
426
|
type: "string",
|
|
408
427
|
},
|
|
409
428
|
arrowPadding: { required: false, control: "number", type: "number" },
|
|
410
|
-
|
|
411
|
-
|
|
429
|
+
autoCapitalize: {
|
|
430
|
+
required: false,
|
|
431
|
+
control: "text",
|
|
432
|
+
type: "string",
|
|
433
|
+
description:
|
|
434
|
+
"Sets whether input is automatically capitalized when entered by user.",
|
|
435
|
+
},
|
|
412
436
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
413
|
-
autoFocus: {
|
|
437
|
+
autoFocus: {
|
|
438
|
+
required: false,
|
|
439
|
+
control: "boolean",
|
|
440
|
+
type: "boolean",
|
|
441
|
+
description:
|
|
442
|
+
"Indicates that an element should be focused on page load, or when its parent dialog is displayed.",
|
|
443
|
+
},
|
|
414
444
|
autoSave: { required: false, control: "text", type: "string" },
|
|
415
445
|
avoidCollisions: { required: false, control: "boolean", type: "boolean" },
|
|
416
446
|
className: { required: false, control: "text", type: "string" },
|
|
417
|
-
color: {
|
|
418
|
-
|
|
419
|
-
|
|
447
|
+
color: {
|
|
448
|
+
required: false,
|
|
449
|
+
control: "color",
|
|
450
|
+
type: "string",
|
|
451
|
+
description:
|
|
452
|
+
"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.",
|
|
453
|
+
},
|
|
454
|
+
content: {
|
|
455
|
+
required: false,
|
|
456
|
+
control: "text",
|
|
457
|
+
type: "string",
|
|
458
|
+
description:
|
|
459
|
+
"A value associated with http-equiv orname depending on the context.",
|
|
460
|
+
},
|
|
461
|
+
contextMenu: {
|
|
462
|
+
required: false,
|
|
463
|
+
control: "text",
|
|
464
|
+
type: "string",
|
|
465
|
+
description:
|
|
466
|
+
"Defines the ID of a menu element which willserve as the element's context menu.",
|
|
467
|
+
},
|
|
420
468
|
datatype: { required: false, control: "text", type: "string" },
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
469
|
+
dir: {
|
|
470
|
+
required: false,
|
|
471
|
+
control: "text",
|
|
472
|
+
type: "string",
|
|
473
|
+
description:
|
|
474
|
+
"Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)",
|
|
475
|
+
},
|
|
476
|
+
draggable: {
|
|
477
|
+
required: false,
|
|
478
|
+
control: "boolean",
|
|
479
|
+
type: "boolean",
|
|
480
|
+
description: "Defines whether the element can be dragged.",
|
|
481
|
+
},
|
|
482
|
+
hidden: {
|
|
483
|
+
required: false,
|
|
484
|
+
control: "boolean",
|
|
485
|
+
type: "boolean",
|
|
486
|
+
description:
|
|
487
|
+
"Prevents rendering of given element, while keeping child elements, e.g. script elements, active.",
|
|
488
|
+
},
|
|
425
489
|
hideWhenDetached: {
|
|
426
490
|
required: false,
|
|
427
491
|
control: "boolean",
|
|
428
492
|
type: "boolean",
|
|
429
493
|
defaultValue: true,
|
|
430
494
|
},
|
|
431
|
-
id: {
|
|
495
|
+
id: {
|
|
496
|
+
required: false,
|
|
497
|
+
control: "text",
|
|
498
|
+
type: "string",
|
|
499
|
+
description:
|
|
500
|
+
"Often used with CSS to style a specific element. The value of this attribute must be unique.",
|
|
501
|
+
},
|
|
432
502
|
inputMode: {
|
|
433
503
|
description:
|
|
434
504
|
"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",
|
|
@@ -458,32 +528,68 @@ export const propsTooltipContent: Record<string, PropMeta> = {
|
|
|
458
528
|
itemRef: { required: false, control: "text", type: "string" },
|
|
459
529
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
460
530
|
itemType: { required: false, control: "text", type: "string" },
|
|
461
|
-
lang: {
|
|
531
|
+
lang: {
|
|
532
|
+
required: false,
|
|
533
|
+
control: "text",
|
|
534
|
+
type: "string",
|
|
535
|
+
description: "Defines the language used in the element.",
|
|
536
|
+
},
|
|
462
537
|
nonce: { required: false, control: "text", type: "string" },
|
|
463
|
-
placeholder: {
|
|
538
|
+
placeholder: {
|
|
539
|
+
required: false,
|
|
540
|
+
control: "text",
|
|
541
|
+
type: "string",
|
|
542
|
+
description:
|
|
543
|
+
"Provides a hint to the user of what can be entered in the field.",
|
|
544
|
+
},
|
|
464
545
|
prefix: { required: false, control: "text", type: "string" },
|
|
465
546
|
property: { required: false, control: "text", type: "string" },
|
|
466
547
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
467
|
-
rel: {
|
|
548
|
+
rel: {
|
|
549
|
+
required: false,
|
|
550
|
+
control: "text",
|
|
551
|
+
type: "string",
|
|
552
|
+
description:
|
|
553
|
+
"Specifies the relationship of the target object to the link object.",
|
|
554
|
+
},
|
|
468
555
|
resource: { required: false, control: "text", type: "string" },
|
|
469
556
|
results: { required: false, control: "number", type: "number" },
|
|
470
557
|
rev: { required: false, control: "text", type: "string" },
|
|
471
|
-
role: {
|
|
558
|
+
role: {
|
|
559
|
+
required: false,
|
|
560
|
+
control: "text",
|
|
561
|
+
type: "string",
|
|
562
|
+
description:
|
|
563
|
+
"Defines an explicit role for an element for use by assistive technologies.",
|
|
564
|
+
},
|
|
472
565
|
security: { required: false, control: "text", type: "string" },
|
|
473
566
|
side: {
|
|
474
567
|
required: false,
|
|
475
568
|
control: "select",
|
|
476
569
|
type: "string",
|
|
477
570
|
options: ["top", "right", "bottom", "left"],
|
|
571
|
+
description:
|
|
572
|
+
"The preferred alignment against the Trigger. May change when collisions occur.",
|
|
478
573
|
},
|
|
479
574
|
sideOffset: {
|
|
480
575
|
required: false,
|
|
481
576
|
control: "number",
|
|
482
577
|
type: "number",
|
|
483
578
|
defaultValue: 4,
|
|
579
|
+
description: "The distance in pixels between the Content and the Trigger.",
|
|
580
|
+
},
|
|
581
|
+
slot: {
|
|
582
|
+
required: false,
|
|
583
|
+
control: "text",
|
|
584
|
+
type: "string",
|
|
585
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element.",
|
|
586
|
+
},
|
|
587
|
+
spellCheck: {
|
|
588
|
+
required: false,
|
|
589
|
+
control: "boolean",
|
|
590
|
+
type: "boolean",
|
|
591
|
+
description: "Indicates whether spell checking is allowed for the element.",
|
|
484
592
|
},
|
|
485
|
-
slot: { required: false, control: "text", type: "string" },
|
|
486
|
-
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
487
593
|
sticky: {
|
|
488
594
|
required: false,
|
|
489
595
|
control: "radio",
|
|
@@ -500,13 +606,27 @@ export const propsTooltipContent: Record<string, PropMeta> = {
|
|
|
500
606
|
control: "boolean",
|
|
501
607
|
type: "boolean",
|
|
502
608
|
},
|
|
503
|
-
tabIndex: {
|
|
504
|
-
|
|
609
|
+
tabIndex: {
|
|
610
|
+
required: false,
|
|
611
|
+
control: "number",
|
|
612
|
+
type: "number",
|
|
613
|
+
description:
|
|
614
|
+
"Overrides the browser's default tab order and follows the one specified instead.",
|
|
615
|
+
},
|
|
616
|
+
title: {
|
|
617
|
+
required: false,
|
|
618
|
+
control: "text",
|
|
619
|
+
type: "string",
|
|
620
|
+
description:
|
|
621
|
+
"Text to be displayed in a tooltip when hovering over the element.",
|
|
622
|
+
},
|
|
505
623
|
translate: {
|
|
506
624
|
required: false,
|
|
507
625
|
control: "radio",
|
|
508
626
|
type: "string",
|
|
509
627
|
options: ["yes", "no"],
|
|
628
|
+
description:
|
|
629
|
+
"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.",
|
|
510
630
|
},
|
|
511
631
|
typeof: { required: false, control: "text", type: "string" },
|
|
512
632
|
unselectable: {
|
package/src/accordion.tsx
CHANGED
|
@@ -57,23 +57,30 @@ export const AccordionContent: ForwardRefExoticComponent<
|
|
|
57
57
|
|
|
58
58
|
const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
59
59
|
|
|
60
|
-
// For each
|
|
60
|
+
// For each AccordionContent component within the selection,
|
|
61
61
|
// we identify its closest parent Accordion component
|
|
62
62
|
// and update its open prop bound to variable.
|
|
63
63
|
export const hooksAccordion: Hook = {
|
|
64
64
|
onNavigatorSelect: (context, event) => {
|
|
65
65
|
for (const instance of event.instancePath) {
|
|
66
|
-
if (instance.component === `${namespace}:
|
|
66
|
+
if (instance.component === `${namespace}:AccordionContent`) {
|
|
67
67
|
const accordion = getClosestInstance(
|
|
68
68
|
event.instancePath,
|
|
69
69
|
instance,
|
|
70
70
|
`${namespace}:Accordion`
|
|
71
71
|
);
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
const item = getClosestInstance(
|
|
73
|
+
event.instancePath,
|
|
74
|
+
instance,
|
|
75
|
+
`${namespace}:AccordionItem`
|
|
76
|
+
);
|
|
77
|
+
if (accordion && item) {
|
|
78
|
+
const itemValue =
|
|
79
|
+
context.getPropValue(item.id, "value") ??
|
|
80
|
+
context.indexesWithinAncestors.get(item.id)?.toString();
|
|
81
|
+
if (itemValue) {
|
|
82
|
+
context.setPropVariable(accordion.id, "value", itemValue);
|
|
83
|
+
}
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
}
|