@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,27 +337,107 @@ const props = {
|
|
|
332
337
|
control: "text",
|
|
333
338
|
type: "string"
|
|
334
339
|
},
|
|
335
|
-
autoCapitalize: {
|
|
340
|
+
autoCapitalize: {
|
|
341
|
+
required: false,
|
|
342
|
+
control: "text",
|
|
343
|
+
type: "string",
|
|
344
|
+
description: "Sets whether input is automatically capitalized when entered by user."
|
|
345
|
+
},
|
|
336
346
|
autoCorrect: { required: false, control: "text", type: "string" },
|
|
337
|
-
autoFocus: {
|
|
347
|
+
autoFocus: {
|
|
348
|
+
required: false,
|
|
349
|
+
control: "boolean",
|
|
350
|
+
type: "boolean",
|
|
351
|
+
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
352
|
+
},
|
|
338
353
|
autoSave: { required: false, control: "text", type: "string" },
|
|
339
354
|
className: { required: false, control: "text", type: "string" },
|
|
340
|
-
color: {
|
|
341
|
-
|
|
342
|
-
|
|
355
|
+
color: {
|
|
356
|
+
required: false,
|
|
357
|
+
control: "color",
|
|
358
|
+
type: "string",
|
|
359
|
+
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."
|
|
360
|
+
},
|
|
361
|
+
content: {
|
|
362
|
+
required: false,
|
|
363
|
+
control: "text",
|
|
364
|
+
type: "string",
|
|
365
|
+
description: "A value associated with http-equiv orname depending on the context."
|
|
366
|
+
},
|
|
367
|
+
contextMenu: {
|
|
368
|
+
required: false,
|
|
369
|
+
control: "text",
|
|
370
|
+
type: "string",
|
|
371
|
+
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
372
|
+
},
|
|
343
373
|
datatype: { required: false, control: "text", type: "string" },
|
|
344
374
|
defaultChecked: { required: false, control: "boolean", type: "boolean" },
|
|
345
|
-
dir: {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
375
|
+
dir: {
|
|
376
|
+
required: false,
|
|
377
|
+
control: "text",
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
|
|
380
|
+
},
|
|
381
|
+
disabled: {
|
|
382
|
+
required: false,
|
|
383
|
+
control: "boolean",
|
|
384
|
+
type: "boolean",
|
|
385
|
+
description: "Indicates whether the user can interact with the element."
|
|
386
|
+
},
|
|
387
|
+
draggable: {
|
|
388
|
+
required: false,
|
|
389
|
+
control: "boolean",
|
|
390
|
+
type: "boolean",
|
|
391
|
+
description: "Defines whether the element can be dragged."
|
|
392
|
+
},
|
|
393
|
+
form: {
|
|
394
|
+
required: false,
|
|
395
|
+
control: "text",
|
|
396
|
+
type: "string",
|
|
397
|
+
description: "Indicates the form that is the owner of the element."
|
|
398
|
+
},
|
|
399
|
+
formAction: {
|
|
400
|
+
required: false,
|
|
401
|
+
control: "text",
|
|
402
|
+
type: "string",
|
|
403
|
+
description: "Indicates the action of the element, overriding the action defined inthe form."
|
|
404
|
+
},
|
|
405
|
+
formEncType: {
|
|
406
|
+
required: false,
|
|
407
|
+
control: "text",
|
|
408
|
+
type: "string",
|
|
409
|
+
description: `If the button/input is a submit button (e.g. type="submit"), this attribute sets the encoding type to use during form submission. If this attribute is specified, it overrides theenctype attribute of the button's form owner.`
|
|
410
|
+
},
|
|
411
|
+
formMethod: {
|
|
412
|
+
required: false,
|
|
413
|
+
control: "text",
|
|
414
|
+
type: "string",
|
|
415
|
+
description: `If the button/input is a submit button (e.g. type="submit"), this attribute sets the submission method to use during form submission (GET, POST, etc.). If this attribute is specified, it overrides the method attribute of the button's form owner.`
|
|
416
|
+
},
|
|
417
|
+
formNoValidate: {
|
|
418
|
+
required: false,
|
|
419
|
+
control: "boolean",
|
|
420
|
+
type: "boolean",
|
|
421
|
+
description: `If the button/input is a submit button (e.g. type="submit"), this boolean attribute specifies that the form is not to be validatedwhen it is submitted. If this attribute is specified, it overrides thenovalidate attribute of the button's form owner.`
|
|
422
|
+
},
|
|
423
|
+
formTarget: {
|
|
424
|
+
required: false,
|
|
425
|
+
control: "text",
|
|
426
|
+
type: "string",
|
|
427
|
+
description: `If the button/input is a submit button (e.g. type="submit"), this attribute specifies the browsing context (for example, tab, window, or inline frame) in which to display the response that is received aftersubmitting the form. If this attribute is specified, it overrides thetarget attribute of the button's form owner.`
|
|
428
|
+
},
|
|
429
|
+
hidden: {
|
|
430
|
+
required: false,
|
|
431
|
+
control: "boolean",
|
|
432
|
+
type: "boolean",
|
|
433
|
+
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
434
|
+
},
|
|
435
|
+
id: {
|
|
436
|
+
required: false,
|
|
437
|
+
control: "text",
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
440
|
+
},
|
|
356
441
|
inputMode: {
|
|
357
442
|
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",
|
|
358
443
|
required: false,
|
|
@@ -380,28 +465,56 @@ const props = {
|
|
|
380
465
|
itemRef: { required: false, control: "text", type: "string" },
|
|
381
466
|
itemScope: { required: false, control: "boolean", type: "boolean" },
|
|
382
467
|
itemType: { required: false, control: "text", type: "string" },
|
|
383
|
-
lang: {
|
|
384
|
-
|
|
468
|
+
lang: {
|
|
469
|
+
required: false,
|
|
470
|
+
control: "text",
|
|
471
|
+
type: "string",
|
|
472
|
+
description: "Defines the language used in the element."
|
|
473
|
+
},
|
|
474
|
+
name: {
|
|
475
|
+
required: false,
|
|
476
|
+
control: "text",
|
|
477
|
+
type: "string",
|
|
478
|
+
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)."
|
|
479
|
+
},
|
|
385
480
|
nonce: { required: false, control: "text", type: "string" },
|
|
386
|
-
placeholder: {
|
|
481
|
+
placeholder: {
|
|
482
|
+
required: false,
|
|
483
|
+
control: "text",
|
|
484
|
+
type: "string",
|
|
485
|
+
description: "Provides a hint to the user of what can be entered in the field."
|
|
486
|
+
},
|
|
387
487
|
prefix: { required: false, control: "text", type: "string" },
|
|
388
488
|
property: { required: false, control: "text", type: "string" },
|
|
389
489
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
390
|
-
rel: {
|
|
490
|
+
rel: {
|
|
491
|
+
required: false,
|
|
492
|
+
control: "text",
|
|
493
|
+
type: "string",
|
|
494
|
+
description: "Specifies the relationship of the target object to the link object."
|
|
495
|
+
},
|
|
391
496
|
resource: { required: false, control: "text", type: "string" },
|
|
392
497
|
results: { required: false, control: "number", type: "number" },
|
|
393
498
|
rev: { required: false, control: "text", type: "string" },
|
|
394
|
-
role: {
|
|
499
|
+
role: {
|
|
500
|
+
required: false,
|
|
501
|
+
control: "text",
|
|
502
|
+
type: "string",
|
|
503
|
+
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
504
|
+
},
|
|
395
505
|
security: { required: false, control: "text", type: "string" },
|
|
396
|
-
|
|
506
|
+
slot: {
|
|
397
507
|
required: false,
|
|
398
|
-
control: "
|
|
508
|
+
control: "text",
|
|
399
509
|
type: "string",
|
|
400
|
-
|
|
401
|
-
|
|
510
|
+
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
511
|
+
},
|
|
512
|
+
spellCheck: {
|
|
513
|
+
required: false,
|
|
514
|
+
control: "boolean",
|
|
515
|
+
type: "boolean",
|
|
516
|
+
description: "Indicates whether spell checking is allowed for the element."
|
|
402
517
|
},
|
|
403
|
-
slot: { required: false, control: "text", type: "string" },
|
|
404
|
-
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
405
518
|
suppressContentEditableWarning: {
|
|
406
519
|
required: false,
|
|
407
520
|
control: "boolean",
|
|
@@ -412,19 +525,31 @@ const props = {
|
|
|
412
525
|
control: "boolean",
|
|
413
526
|
type: "boolean"
|
|
414
527
|
},
|
|
415
|
-
tabIndex: {
|
|
416
|
-
|
|
528
|
+
tabIndex: {
|
|
529
|
+
required: false,
|
|
530
|
+
control: "number",
|
|
531
|
+
type: "number",
|
|
532
|
+
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
533
|
+
},
|
|
534
|
+
title: {
|
|
535
|
+
required: false,
|
|
536
|
+
control: "text",
|
|
537
|
+
type: "string",
|
|
538
|
+
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
539
|
+
},
|
|
417
540
|
translate: {
|
|
418
541
|
required: false,
|
|
419
542
|
control: "radio",
|
|
420
543
|
type: "string",
|
|
421
|
-
options: ["yes", "no"]
|
|
544
|
+
options: ["yes", "no"],
|
|
545
|
+
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."
|
|
422
546
|
},
|
|
423
547
|
type: {
|
|
424
548
|
required: false,
|
|
425
549
|
control: "radio",
|
|
426
550
|
type: "string",
|
|
427
|
-
options: ["button", "submit", "reset"]
|
|
551
|
+
options: ["button", "submit", "reset"],
|
|
552
|
+
description: "Defines the behavior of the button, such as submitting a form or resetting form fields."
|
|
428
553
|
},
|
|
429
554
|
typeof: { required: false, control: "text", type: "string" },
|
|
430
555
|
unselectable: {
|
|
@@ -433,20 +558,6 @@ const props = {
|
|
|
433
558
|
type: "string",
|
|
434
559
|
options: ["on", "off"]
|
|
435
560
|
},
|
|
436
|
-
variant: {
|
|
437
|
-
required: false,
|
|
438
|
-
control: "select",
|
|
439
|
-
type: "string",
|
|
440
|
-
defaultValue: "default",
|
|
441
|
-
options: [
|
|
442
|
-
"link",
|
|
443
|
-
"default",
|
|
444
|
-
"destructive",
|
|
445
|
-
"outline",
|
|
446
|
-
"secondary",
|
|
447
|
-
"ghost"
|
|
448
|
-
]
|
|
449
|
-
},
|
|
450
561
|
vocab: { required: false, control: "text", type: "string" }
|
|
451
562
|
};
|
|
452
563
|
export {
|