@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
|
@@ -23,7 +23,12 @@ __export(textarea_props_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(textarea_props_exports);
|
|
24
24
|
const props = {
|
|
25
25
|
about: { required: false, control: "text", type: "string" },
|
|
26
|
-
accessKey: {
|
|
26
|
+
accessKey: {
|
|
27
|
+
required: false,
|
|
28
|
+
control: "text",
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Keyboard shortcut to activate or add focus to the element."
|
|
31
|
+
},
|
|
27
32
|
"aria-activedescendant": {
|
|
28
33
|
description: "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
29
34
|
required: false,
|
|
@@ -179,7 +184,7 @@ const props = {
|
|
|
179
184
|
type: "string"
|
|
180
185
|
},
|
|
181
186
|
"aria-label": {
|
|
182
|
-
description: "
|
|
187
|
+
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
188
|
required: false,
|
|
184
189
|
control: "text",
|
|
185
190
|
type: "string"
|
|
@@ -355,25 +360,90 @@ const props = {
|
|
|
355
360
|
control: "text",
|
|
356
361
|
type: "string"
|
|
357
362
|
},
|
|
358
|
-
autoCapitalize: {
|
|
359
|
-
|
|
363
|
+
autoCapitalize: {
|
|
364
|
+
required: false,
|
|
365
|
+
control: "text",
|
|
366
|
+
type: "string",
|
|
367
|
+
description: "Sets whether input is automatically capitalized when entered by user."
|
|
368
|
+
},
|
|
369
|
+
autoComplete: {
|
|
370
|
+
required: false,
|
|
371
|
+
control: "text",
|
|
372
|
+
type: "string",
|
|
373
|
+
description: "Indicates whether controls in this form can by default have their valuesautomatically completed by the browser."
|
|
374
|
+
},
|
|
360
375
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
361
|
-
autoFocus: {
|
|
376
|
+
autoFocus: {
|
|
377
|
+
required: false,
|
|
378
|
+
control: "boolean",
|
|
379
|
+
type: "boolean",
|
|
380
|
+
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
381
|
+
},
|
|
362
382
|
autoSave: { required: false, control: "text", type: "string" },
|
|
363
383
|
className: { required: false, control: "text", type: "string" },
|
|
364
|
-
color: {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
384
|
+
color: {
|
|
385
|
+
required: false,
|
|
386
|
+
control: "color",
|
|
387
|
+
type: "string",
|
|
388
|
+
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."
|
|
389
|
+
},
|
|
390
|
+
cols: {
|
|
391
|
+
required: false,
|
|
392
|
+
control: "number",
|
|
393
|
+
type: "number",
|
|
394
|
+
description: "Defines the number of columns in a textarea."
|
|
395
|
+
},
|
|
396
|
+
content: {
|
|
397
|
+
required: false,
|
|
398
|
+
control: "text",
|
|
399
|
+
type: "string",
|
|
400
|
+
description: "A value associated with http-equiv orname depending on the context."
|
|
401
|
+
},
|
|
402
|
+
contextMenu: {
|
|
403
|
+
required: false,
|
|
404
|
+
control: "text",
|
|
405
|
+
type: "string",
|
|
406
|
+
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
407
|
+
},
|
|
368
408
|
datatype: { required: false, control: "text", type: "string" },
|
|
369
409
|
defaultChecked: { required: false, control: "boolean", type: "boolean" },
|
|
370
|
-
dir: {
|
|
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
|
+
},
|
|
371
416
|
dirName: { required: false, control: "text", type: "string" },
|
|
372
|
-
disabled: {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
417
|
+
disabled: {
|
|
418
|
+
required: false,
|
|
419
|
+
control: "boolean",
|
|
420
|
+
type: "boolean",
|
|
421
|
+
description: "Indicates whether the user can interact with the element."
|
|
422
|
+
},
|
|
423
|
+
draggable: {
|
|
424
|
+
required: false,
|
|
425
|
+
control: "boolean",
|
|
426
|
+
type: "boolean",
|
|
427
|
+
description: "Defines whether the element can be dragged."
|
|
428
|
+
},
|
|
429
|
+
form: {
|
|
430
|
+
required: false,
|
|
431
|
+
control: "text",
|
|
432
|
+
type: "string",
|
|
433
|
+
description: "Indicates the form that is the owner of the element."
|
|
434
|
+
},
|
|
435
|
+
hidden: {
|
|
436
|
+
required: false,
|
|
437
|
+
control: "boolean",
|
|
438
|
+
type: "boolean",
|
|
439
|
+
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
440
|
+
},
|
|
441
|
+
id: {
|
|
442
|
+
required: false,
|
|
443
|
+
control: "text",
|
|
444
|
+
type: "string",
|
|
445
|
+
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
446
|
+
},
|
|
377
447
|
inputMode: {
|
|
378
448
|
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",
|
|
379
449
|
required: false,
|
|
@@ -401,26 +471,86 @@ const props = {
|
|
|
401
471
|
itemRef: { required: false, control: "text", type: "string" },
|
|
402
472
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
403
473
|
itemType: { required: false, control: "text", type: "string" },
|
|
404
|
-
lang: {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
474
|
+
lang: {
|
|
475
|
+
required: false,
|
|
476
|
+
control: "text",
|
|
477
|
+
type: "string",
|
|
478
|
+
description: "Defines the language used in the element."
|
|
479
|
+
},
|
|
480
|
+
maxLength: {
|
|
481
|
+
required: false,
|
|
482
|
+
control: "number",
|
|
483
|
+
type: "number",
|
|
484
|
+
description: "Defines the maximum number of characters allowed in the element."
|
|
485
|
+
},
|
|
486
|
+
minLength: {
|
|
487
|
+
required: false,
|
|
488
|
+
control: "number",
|
|
489
|
+
type: "number",
|
|
490
|
+
description: "Defines the minimum number of characters allowed in the element."
|
|
491
|
+
},
|
|
492
|
+
name: {
|
|
493
|
+
required: false,
|
|
494
|
+
control: "text",
|
|
495
|
+
type: "string",
|
|
496
|
+
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)."
|
|
497
|
+
},
|
|
408
498
|
nonce: { required: false, control: "text", type: "string" },
|
|
409
|
-
placeholder: {
|
|
499
|
+
placeholder: {
|
|
500
|
+
required: false,
|
|
501
|
+
control: "text",
|
|
502
|
+
type: "string",
|
|
503
|
+
description: "Provides a hint to the user of what can be entered in the field."
|
|
504
|
+
},
|
|
410
505
|
prefix: { required: false, control: "text", type: "string" },
|
|
411
506
|
property: { required: false, control: "text", type: "string" },
|
|
412
507
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
413
|
-
readOnly: {
|
|
414
|
-
|
|
415
|
-
|
|
508
|
+
readOnly: {
|
|
509
|
+
required: false,
|
|
510
|
+
control: "boolean",
|
|
511
|
+
type: "boolean",
|
|
512
|
+
description: "Indicates whether the element can be edited."
|
|
513
|
+
},
|
|
514
|
+
rel: {
|
|
515
|
+
required: false,
|
|
516
|
+
control: "text",
|
|
517
|
+
type: "string",
|
|
518
|
+
description: "Specifies the relationship of the target object to the link object."
|
|
519
|
+
},
|
|
520
|
+
required: {
|
|
521
|
+
required: false,
|
|
522
|
+
control: "boolean",
|
|
523
|
+
type: "boolean",
|
|
524
|
+
description: "Indicates whether this form element must be filled before the form can be submitted."
|
|
525
|
+
},
|
|
416
526
|
resource: { required: false, control: "text", type: "string" },
|
|
417
527
|
results: { required: false, control: "number", type: "number" },
|
|
418
528
|
rev: { required: false, control: "text", type: "string" },
|
|
419
|
-
role: {
|
|
420
|
-
|
|
529
|
+
role: {
|
|
530
|
+
required: false,
|
|
531
|
+
control: "text",
|
|
532
|
+
type: "string",
|
|
533
|
+
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
534
|
+
},
|
|
535
|
+
rows: {
|
|
536
|
+
required: false,
|
|
537
|
+
control: "number",
|
|
538
|
+
type: "number",
|
|
539
|
+
description: "Defines the number of rows in a text area."
|
|
540
|
+
},
|
|
421
541
|
security: { required: false, control: "text", type: "string" },
|
|
422
|
-
slot: {
|
|
423
|
-
|
|
542
|
+
slot: {
|
|
543
|
+
required: false,
|
|
544
|
+
control: "text",
|
|
545
|
+
type: "string",
|
|
546
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
547
|
+
},
|
|
548
|
+
spellCheck: {
|
|
549
|
+
required: false,
|
|
550
|
+
control: "boolean",
|
|
551
|
+
type: "boolean",
|
|
552
|
+
description: "Indicates whether spell checking is allowed for the element."
|
|
553
|
+
},
|
|
424
554
|
suppressContentEditableWarning: {
|
|
425
555
|
required: false,
|
|
426
556
|
control: "boolean",
|
|
@@ -431,13 +561,24 @@ const props = {
|
|
|
431
561
|
control: "boolean",
|
|
432
562
|
type: "boolean"
|
|
433
563
|
},
|
|
434
|
-
tabIndex: {
|
|
435
|
-
|
|
564
|
+
tabIndex: {
|
|
565
|
+
required: false,
|
|
566
|
+
control: "number",
|
|
567
|
+
type: "number",
|
|
568
|
+
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
569
|
+
},
|
|
570
|
+
title: {
|
|
571
|
+
required: false,
|
|
572
|
+
control: "text",
|
|
573
|
+
type: "string",
|
|
574
|
+
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
575
|
+
},
|
|
436
576
|
translate: {
|
|
437
577
|
required: false,
|
|
438
578
|
control: "radio",
|
|
439
579
|
type: "string",
|
|
440
|
-
options: ["yes", "no"]
|
|
580
|
+
options: ["yes", "no"],
|
|
581
|
+
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."
|
|
441
582
|
},
|
|
442
583
|
typeof: { required: false, control: "text", type: "string" },
|
|
443
584
|
unselectable: {
|
|
@@ -447,5 +588,10 @@ const props = {
|
|
|
447
588
|
options: ["on", "off"]
|
|
448
589
|
},
|
|
449
590
|
vocab: { required: false, control: "text", type: "string" },
|
|
450
|
-
wrap: {
|
|
591
|
+
wrap: {
|
|
592
|
+
required: false,
|
|
593
|
+
control: "text",
|
|
594
|
+
type: "string",
|
|
595
|
+
description: "Indicates whether the text should be wrapped."
|
|
596
|
+
}
|
|
451
597
|
};
|
|
@@ -25,30 +25,46 @@ __export(tooltip_props_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(tooltip_props_exports);
|
|
26
26
|
const propsTooltip = {
|
|
27
27
|
delayDuration: {
|
|
28
|
-
description: "The
|
|
28
|
+
description: "The delay before the Tooltip shows after the Trigger is hovered, in milliseconds. If no value is specified, the default is 700ms",
|
|
29
29
|
required: false,
|
|
30
30
|
control: "number",
|
|
31
31
|
type: "number"
|
|
32
32
|
},
|
|
33
33
|
disableHoverableContent: {
|
|
34
|
-
description: "When
|
|
34
|
+
description: "When toggled, prevents the Tooltip content from showing when the Trigger is hovered.",
|
|
35
35
|
required: false,
|
|
36
36
|
control: "boolean",
|
|
37
37
|
type: "boolean"
|
|
38
38
|
},
|
|
39
|
-
open: {
|
|
39
|
+
open: {
|
|
40
|
+
required: false,
|
|
41
|
+
control: "boolean",
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
44
|
+
}
|
|
40
45
|
};
|
|
41
46
|
const propsTooltipTrigger = {};
|
|
42
47
|
const propsTooltipContent = {
|
|
43
48
|
about: { required: false, control: "text", type: "string" },
|
|
44
|
-
accessKey: {
|
|
49
|
+
accessKey: {
|
|
50
|
+
required: false,
|
|
51
|
+
control: "text",
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Keyboard shortcut to activate or add focus to the element."
|
|
54
|
+
},
|
|
45
55
|
align: {
|
|
46
56
|
required: false,
|
|
47
57
|
control: "radio",
|
|
48
58
|
type: "string",
|
|
49
|
-
options: ["center", "start", "end"]
|
|
59
|
+
options: ["center", "start", "end"],
|
|
60
|
+
description: "Specifies the horizontal alignment of the element."
|
|
61
|
+
},
|
|
62
|
+
alignOffset: {
|
|
63
|
+
required: false,
|
|
64
|
+
control: "number",
|
|
65
|
+
type: "number",
|
|
66
|
+
description: "The offset in pixels from the \u201Cstart\u201C or \u201Cend\u201C alignment options."
|
|
50
67
|
},
|
|
51
|
-
alignOffset: { required: false, control: "number", type: "number" },
|
|
52
68
|
"aria-activedescendant": {
|
|
53
69
|
description: "Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.",
|
|
54
70
|
required: false,
|
|
@@ -204,7 +220,7 @@ const propsTooltipContent = {
|
|
|
204
220
|
type: "string"
|
|
205
221
|
},
|
|
206
222
|
"aria-label": {
|
|
207
|
-
description: "
|
|
223
|
+
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.",
|
|
208
224
|
required: false,
|
|
209
225
|
control: "text",
|
|
210
226
|
type: "string"
|
|
@@ -381,28 +397,71 @@ const propsTooltipContent = {
|
|
|
381
397
|
type: "string"
|
|
382
398
|
},
|
|
383
399
|
arrowPadding: { required: false, control: "number", type: "number" },
|
|
384
|
-
|
|
385
|
-
|
|
400
|
+
autoCapitalize: {
|
|
401
|
+
required: false,
|
|
402
|
+
control: "text",
|
|
403
|
+
type: "string",
|
|
404
|
+
description: "Sets whether input is automatically capitalized when entered by user."
|
|
405
|
+
},
|
|
386
406
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
387
|
-
autoFocus: {
|
|
407
|
+
autoFocus: {
|
|
408
|
+
required: false,
|
|
409
|
+
control: "boolean",
|
|
410
|
+
type: "boolean",
|
|
411
|
+
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
412
|
+
},
|
|
388
413
|
autoSave: { required: false, control: "text", type: "string" },
|
|
389
414
|
avoidCollisions: { required: false, control: "boolean", type: "boolean" },
|
|
390
415
|
className: { required: false, control: "text", type: "string" },
|
|
391
|
-
color: {
|
|
392
|
-
|
|
393
|
-
|
|
416
|
+
color: {
|
|
417
|
+
required: false,
|
|
418
|
+
control: "color",
|
|
419
|
+
type: "string",
|
|
420
|
+
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."
|
|
421
|
+
},
|
|
422
|
+
content: {
|
|
423
|
+
required: false,
|
|
424
|
+
control: "text",
|
|
425
|
+
type: "string",
|
|
426
|
+
description: "A value associated with http-equiv orname depending on the context."
|
|
427
|
+
},
|
|
428
|
+
contextMenu: {
|
|
429
|
+
required: false,
|
|
430
|
+
control: "text",
|
|
431
|
+
type: "string",
|
|
432
|
+
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
433
|
+
},
|
|
394
434
|
datatype: { required: false, control: "text", type: "string" },
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
435
|
+
dir: {
|
|
436
|
+
required: false,
|
|
437
|
+
control: "text",
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
|
|
440
|
+
},
|
|
441
|
+
draggable: {
|
|
442
|
+
required: false,
|
|
443
|
+
control: "boolean",
|
|
444
|
+
type: "boolean",
|
|
445
|
+
description: "Defines whether the element can be dragged."
|
|
446
|
+
},
|
|
447
|
+
hidden: {
|
|
448
|
+
required: false,
|
|
449
|
+
control: "boolean",
|
|
450
|
+
type: "boolean",
|
|
451
|
+
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
452
|
+
},
|
|
399
453
|
hideWhenDetached: {
|
|
400
454
|
required: false,
|
|
401
455
|
control: "boolean",
|
|
402
456
|
type: "boolean",
|
|
403
457
|
defaultValue: true
|
|
404
458
|
},
|
|
405
|
-
id: {
|
|
459
|
+
id: {
|
|
460
|
+
required: false,
|
|
461
|
+
control: "text",
|
|
462
|
+
type: "string",
|
|
463
|
+
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
464
|
+
},
|
|
406
465
|
inputMode: {
|
|
407
466
|
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",
|
|
408
467
|
required: false,
|
|
@@ -430,32 +489,64 @@ const propsTooltipContent = {
|
|
|
430
489
|
itemRef: { required: false, control: "text", type: "string" },
|
|
431
490
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
432
491
|
itemType: { required: false, control: "text", type: "string" },
|
|
433
|
-
lang: {
|
|
492
|
+
lang: {
|
|
493
|
+
required: false,
|
|
494
|
+
control: "text",
|
|
495
|
+
type: "string",
|
|
496
|
+
description: "Defines the language used in the element."
|
|
497
|
+
},
|
|
434
498
|
nonce: { required: false, control: "text", type: "string" },
|
|
435
|
-
placeholder: {
|
|
499
|
+
placeholder: {
|
|
500
|
+
required: false,
|
|
501
|
+
control: "text",
|
|
502
|
+
type: "string",
|
|
503
|
+
description: "Provides a hint to the user of what can be entered in the field."
|
|
504
|
+
},
|
|
436
505
|
prefix: { required: false, control: "text", type: "string" },
|
|
437
506
|
property: { required: false, control: "text", type: "string" },
|
|
438
507
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
439
|
-
rel: {
|
|
508
|
+
rel: {
|
|
509
|
+
required: false,
|
|
510
|
+
control: "text",
|
|
511
|
+
type: "string",
|
|
512
|
+
description: "Specifies the relationship of the target object to the link object."
|
|
513
|
+
},
|
|
440
514
|
resource: { required: false, control: "text", type: "string" },
|
|
441
515
|
results: { required: false, control: "number", type: "number" },
|
|
442
516
|
rev: { required: false, control: "text", type: "string" },
|
|
443
|
-
role: {
|
|
517
|
+
role: {
|
|
518
|
+
required: false,
|
|
519
|
+
control: "text",
|
|
520
|
+
type: "string",
|
|
521
|
+
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
522
|
+
},
|
|
444
523
|
security: { required: false, control: "text", type: "string" },
|
|
445
524
|
side: {
|
|
446
525
|
required: false,
|
|
447
526
|
control: "select",
|
|
448
527
|
type: "string",
|
|
449
|
-
options: ["top", "right", "bottom", "left"]
|
|
528
|
+
options: ["top", "right", "bottom", "left"],
|
|
529
|
+
description: "The preferred alignment against the Trigger. May change when collisions occur."
|
|
450
530
|
},
|
|
451
531
|
sideOffset: {
|
|
452
532
|
required: false,
|
|
453
533
|
control: "number",
|
|
454
534
|
type: "number",
|
|
455
|
-
defaultValue: 4
|
|
535
|
+
defaultValue: 4,
|
|
536
|
+
description: "The distance in pixels between the Content and the Trigger."
|
|
537
|
+
},
|
|
538
|
+
slot: {
|
|
539
|
+
required: false,
|
|
540
|
+
control: "text",
|
|
541
|
+
type: "string",
|
|
542
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
543
|
+
},
|
|
544
|
+
spellCheck: {
|
|
545
|
+
required: false,
|
|
546
|
+
control: "boolean",
|
|
547
|
+
type: "boolean",
|
|
548
|
+
description: "Indicates whether spell checking is allowed for the element."
|
|
456
549
|
},
|
|
457
|
-
slot: { required: false, control: "text", type: "string" },
|
|
458
|
-
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
459
550
|
sticky: {
|
|
460
551
|
required: false,
|
|
461
552
|
control: "radio",
|
|
@@ -472,13 +563,24 @@ const propsTooltipContent = {
|
|
|
472
563
|
control: "boolean",
|
|
473
564
|
type: "boolean"
|
|
474
565
|
},
|
|
475
|
-
tabIndex: {
|
|
476
|
-
|
|
566
|
+
tabIndex: {
|
|
567
|
+
required: false,
|
|
568
|
+
control: "number",
|
|
569
|
+
type: "number",
|
|
570
|
+
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
571
|
+
},
|
|
572
|
+
title: {
|
|
573
|
+
required: false,
|
|
574
|
+
control: "text",
|
|
575
|
+
type: "string",
|
|
576
|
+
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
577
|
+
},
|
|
477
578
|
translate: {
|
|
478
579
|
required: false,
|
|
479
580
|
control: "radio",
|
|
480
581
|
type: "string",
|
|
481
|
-
options: ["yes", "no"]
|
|
582
|
+
options: ["yes", "no"],
|
|
583
|
+
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."
|
|
482
584
|
},
|
|
483
585
|
typeof: { required: false, control: "text", type: "string" },
|
|
484
586
|
unselectable: {
|
package/lib/cjs/accordion.js
CHANGED
|
@@ -44,15 +44,22 @@ const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
|
44
44
|
const hooksAccordion = {
|
|
45
45
|
onNavigatorSelect: (context, event) => {
|
|
46
46
|
for (const instance of event.instancePath) {
|
|
47
|
-
if (instance.component === `${namespace}:
|
|
47
|
+
if (instance.component === `${namespace}:AccordionContent`) {
|
|
48
48
|
const accordion = (0, import_react_sdk.getClosestInstance)(
|
|
49
49
|
event.instancePath,
|
|
50
50
|
instance,
|
|
51
51
|
`${namespace}:Accordion`
|
|
52
52
|
);
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
const item = (0, import_react_sdk.getClosestInstance)(
|
|
54
|
+
event.instancePath,
|
|
55
|
+
instance,
|
|
56
|
+
`${namespace}:AccordionItem`
|
|
57
|
+
);
|
|
58
|
+
if (accordion && item) {
|
|
59
|
+
const itemValue = context.getPropValue(item.id, "value") ?? context.indexesWithinAncestors.get(item.id)?.toString();
|
|
60
|
+
if (itemValue) {
|
|
61
|
+
context.setPropVariable(accordion.id, "value", itemValue);
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
}
|