@webstudio-is/sdk-components-react-radix 0.91.0 → 0.92.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 +6 -12
- package/lib/__generated__/checkbox.props.js +3 -6
- package/lib/__generated__/collapsible.props.js +4 -8
- package/lib/__generated__/dialog.props.js +8 -16
- package/lib/__generated__/label.props.js +2 -4
- package/lib/__generated__/navigation-menu.props.js +8 -16
- package/lib/__generated__/popover.props.js +4 -8
- package/lib/__generated__/radio-group.props.js +4 -8
- package/lib/__generated__/select.props.js +15 -19
- package/lib/__generated__/sheet.props.js +8 -16
- package/lib/__generated__/switch.props.js +3 -6
- package/lib/__generated__/tabs.props.js +5 -10
- package/lib/__generated__/tooltip.props.js +4 -8
- package/lib/accordion.js +7 -14
- package/{src/accordion.stories.tsx → lib/accordion.stories.js} +9 -12
- package/lib/accordion.ws.js +11 -22
- package/lib/checkbox.js +3 -6
- package/lib/checkbox.stories.js +19 -0
- package/lib/checkbox.ws.js +5 -10
- package/lib/collapsible.js +5 -10
- package/{src/collapsible.stories.tsx → lib/collapsible.stories.js} +9 -12
- package/lib/collapsible.ws.js +7 -14
- package/lib/components.js +13 -62
- package/lib/dialog.js +9 -18
- package/{src/dialog.stories.tsx → lib/dialog.stories.js} +9 -12
- package/lib/dialog.ws.js +15 -30
- package/lib/hooks.js +2 -4
- package/lib/label.js +2 -4
- package/lib/label.stories.js +19 -0
- package/lib/label.ws.js +3 -6
- package/lib/metas.js +55 -105
- package/lib/navigation-menu.js +9 -18
- package/{src/navigation-menu.stories.tsx → lib/navigation-menu.stories.js} +9 -12
- package/lib/navigation-menu.ws.js +16 -31
- package/lib/popover.js +5 -10
- package/{src/popover.stories.tsx → lib/popover.stories.js} +9 -12
- package/lib/popover.ws.js +7 -14
- package/lib/props-descriptions.js +2 -4
- package/lib/props.js +54 -103
- package/lib/radio-group.js +4 -8
- package/lib/radio-group.stories.js +19 -0
- package/lib/radio-group.ws.js +7 -14
- package/lib/select.js +10 -20
- package/{src/select.stories.tsx → lib/select.stories.js} +9 -12
- package/lib/select.ws.js +17 -34
- package/lib/sheet.js +9 -18
- package/{src/sheet.stories.tsx → lib/sheet.stories.js} +9 -12
- package/lib/sheet.ws.js +2 -4
- package/lib/switch.js +3 -6
- package/lib/switch.stories.js +19 -0
- package/lib/switch.ws.js +5 -10
- package/lib/tabs.js +6 -12
- package/{src/tabs.stories.tsx → lib/tabs.stories.js} +9 -12
- package/lib/tabs.ws.js +9 -18
- package/lib/theme/__generated__/tailwind-theme.js +517 -0
- package/lib/theme/styles.js +3 -6
- package/lib/theme/tailwind-classes.js +149 -301
- package/lib/theme/tailwind-colors.js +2 -4
- package/lib/tooltip.js +5 -10
- package/{src/tooltip.stories.tsx → lib/tooltip.stories.js} +9 -12
- package/lib/tooltip.ws.js +7 -14
- package/lib/types/__generated__/accordion.props.d.ts +1 -1
- package/lib/types/__generated__/checkbox.props.d.ts +1 -1
- package/lib/types/__generated__/collapsible.props.d.ts +1 -1
- package/lib/types/__generated__/dialog.props.d.ts +1 -1
- package/lib/types/__generated__/label.props.d.ts +1 -1
- package/lib/types/__generated__/navigation-menu.props.d.ts +1 -1
- package/lib/types/__generated__/popover.props.d.ts +1 -1
- package/lib/types/__generated__/radio-group.props.d.ts +1 -1
- package/lib/types/__generated__/select.props.d.ts +1 -1
- package/lib/types/__generated__/sheet.props.d.ts +1 -1
- package/lib/types/__generated__/switch.props.d.ts +1 -1
- package/lib/types/__generated__/tabs.props.d.ts +1 -1
- package/lib/types/__generated__/tooltip.props.d.ts +1 -1
- package/lib/types/accordion.d.ts +1 -1
- package/lib/types/sheet.d.ts +1 -1
- package/lib/types/theme/__generated__/tailwind-theme.d.ts +26 -0
- package/lib/types/theme/styles.d.ts +60 -60
- package/lib/types/theme/tailwind-classes.d.ts +33 -33
- package/package.json +20 -23
- package/lib/__generated__/button.props.js +0 -565
- package/lib/__generated__/input.props.js +0 -668
- package/lib/__generated__/textarea.props.js +0 -577
- package/lib/cjs/__generated__/accordion.props.js +0 -2645
- package/lib/cjs/__generated__/button.props.js +0 -585
- package/lib/cjs/__generated__/checkbox.props.js +0 -1103
- package/lib/cjs/__generated__/collapsible.props.js +0 -1050
- package/lib/cjs/__generated__/dialog.props.js +0 -2623
- package/lib/cjs/__generated__/input.props.js +0 -688
- package/lib/cjs/__generated__/label.props.js +0 -541
- package/lib/cjs/__generated__/navigation-menu.props.js +0 -2585
- package/lib/cjs/__generated__/popover.props.js +0 -582
- package/lib/cjs/__generated__/radio-group.props.js +0 -1647
- package/lib/cjs/__generated__/select.props.js +0 -3698
- package/lib/cjs/__generated__/sheet.props.js +0 -2642
- package/lib/cjs/__generated__/switch.props.js +0 -1103
- package/lib/cjs/__generated__/tabs.props.js +0 -2144
- package/lib/cjs/__generated__/textarea.props.js +0 -597
- package/lib/cjs/__generated__/tooltip.props.js +0 -593
- package/lib/cjs/accordion.js +0 -67
- package/lib/cjs/accordion.ws.js +0 -285
- package/lib/cjs/checkbox.js +0 -31
- package/lib/cjs/checkbox.ws.js +0 -174
- package/lib/cjs/collapsible.js +0 -53
- package/lib/cjs/collapsible.ws.js +0 -122
- package/lib/cjs/components.js +0 -82
- package/lib/cjs/dialog.js +0 -89
- package/lib/cjs/dialog.ws.js +0 -315
- package/lib/cjs/hooks.js +0 -43
- package/lib/cjs/label.js +0 -37
- package/lib/cjs/label.ws.js +0 -75
- package/lib/cjs/metas.js +0 -84
- package/lib/cjs/navigation-menu.js +0 -107
- package/lib/cjs/navigation-menu.ws.js +0 -514
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/popover.js +0 -90
- package/lib/cjs/popover.ws.js +0 -142
- package/lib/cjs/props-descriptions.js +0 -56
- package/lib/cjs/props.js +0 -82
- package/lib/cjs/radio-group.js +0 -30
- package/lib/cjs/radio-group.ws.js +0 -191
- package/lib/cjs/select.js +0 -83
- package/lib/cjs/select.ws.js +0 -350
- package/lib/cjs/sheet.js +0 -96
- package/lib/cjs/sheet.ws.js +0 -257
- package/lib/cjs/switch.js +0 -27
- package/lib/cjs/switch.ws.js +0 -173
- package/lib/cjs/tabs.js +0 -59
- package/lib/cjs/tabs.ws.js +0 -196
- package/lib/cjs/theme/radix-common-types.js +0 -16
- package/lib/cjs/theme/styles.js +0 -96
- package/lib/cjs/theme/tailwind-classes.js +0 -819
- package/lib/cjs/theme/tailwind-colors.js +0 -45
- package/lib/cjs/theme/tailwind-theme.js +0 -46
- package/lib/cjs/tooltip.js +0 -87
- package/lib/cjs/tooltip.ws.js +0 -143
- package/lib/theme/radix-common-types.js +0 -0
- package/lib/theme/tailwind-theme.js +0 -16
- package/lib/types/__generated__/button.props.d.ts +0 -2
- package/lib/types/__generated__/input.props.d.ts +0 -2
- package/lib/types/__generated__/textarea.props.d.ts +0 -2
- package/lib/types/theme/radix-common-types.d.ts +0 -85
- package/lib/types/theme/tailwind-theme.d.ts +0 -72
- package/src/__generated__/accordion.props.ts +0 -2949
- package/src/__generated__/button.props.ts +0 -635
- package/src/__generated__/checkbox.props.ts +0 -1217
- package/src/__generated__/collapsible.props.ts +0 -1156
- package/src/__generated__/dialog.props.ts +0 -2923
- package/src/__generated__/input.props.ts +0 -748
- package/src/__generated__/label.props.ts +0 -585
- package/src/__generated__/navigation-menu.props.ts +0 -2882
- package/src/__generated__/popover.props.ts +0 -626
- package/src/__generated__/radio-group.props.ts +0 -1828
- package/src/__generated__/select.props.ts +0 -4130
- package/src/__generated__/sheet.props.ts +0 -2942
- package/src/__generated__/switch.props.ts +0 -1217
- package/src/__generated__/tabs.props.ts +0 -2386
- package/src/__generated__/textarea.props.ts +0 -645
- package/src/__generated__/tooltip.props.ts +0 -639
- package/src/accordion.tsx +0 -88
- package/src/accordion.ws.ts +0 -296
- package/src/checkbox.stories.ts +0 -22
- package/src/checkbox.tsx +0 -22
- package/src/checkbox.ws.ts +0 -154
- package/src/collapsible.tsx +0 -62
- package/src/collapsible.ws.ts +0 -115
- package/src/components.ts +0 -50
- package/src/dialog.tsx +0 -92
- package/src/dialog.ws.tsx +0 -320
- package/src/hooks.ts +0 -22
- package/src/label.stories.ts +0 -22
- package/src/label.tsx +0 -15
- package/src/label.ws.ts +0 -50
- package/src/metas.ts +0 -74
- package/src/navigation-menu.tsx +0 -130
- package/src/navigation-menu.ws.ts +0 -524
- package/src/popover.tsx +0 -96
- package/src/popover.ws.tsx +0 -128
- package/src/props-descriptions.ts +0 -43
- package/src/props.ts +0 -73
- package/src/radio-group.stories.ts +0 -22
- package/src/radio-group.tsx +0 -17
- package/src/radio-group.ws.ts +0 -178
- package/src/select.tsx +0 -112
- package/src/select.ws.ts +0 -349
- package/src/sheet.tsx +0 -79
- package/src/sheet.ws.tsx +0 -236
- package/src/switch.stories.ts +0 -22
- package/src/switch.tsx +0 -10
- package/src/switch.ws.ts +0 -146
- package/src/tabs.tsx +0 -64
- package/src/tabs.ws.ts +0 -198
- package/src/theme/radix-common-types.ts +0 -496
- package/src/theme/styles.ts +0 -76
- package/src/theme/tailwind-classes.ts +0 -1026
- package/src/theme/tailwind-colors.ts +0 -39
- package/src/theme/tailwind-theme.ts +0 -24
- package/src/tooltip.tsx +0 -95
- package/src/tooltip.ws.tsx +0 -130
package/lib/props.js
CHANGED
|
@@ -1,120 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
export {
|
|
3
|
+
propsMetaCollapsible as Collapsible,
|
|
4
|
+
propsMetaCollapsibleTrigger as CollapsibleTrigger,
|
|
5
|
+
propsMetaCollapsibleContent as CollapsibleContent
|
|
5
6
|
} from "./collapsible.ws";
|
|
6
|
-
|
|
7
|
-
propsMetaDialog,
|
|
8
|
-
propsMetaDialogTrigger,
|
|
9
|
-
propsMetaDialogOverlay,
|
|
10
|
-
propsMetaDialogContent,
|
|
11
|
-
propsMetaDialogClose,
|
|
12
|
-
propsMetaDialogTitle,
|
|
13
|
-
propsMetaDialogDescription
|
|
7
|
+
export {
|
|
8
|
+
propsMetaDialog as Dialog,
|
|
9
|
+
propsMetaDialogTrigger as DialogTrigger,
|
|
10
|
+
propsMetaDialogOverlay as DialogOverlay,
|
|
11
|
+
propsMetaDialogContent as DialogContent,
|
|
12
|
+
propsMetaDialogClose as DialogClose,
|
|
13
|
+
propsMetaDialogTitle as DialogTitle,
|
|
14
|
+
propsMetaDialogDescription as DialogDescription
|
|
14
15
|
} from "./dialog.ws";
|
|
15
|
-
|
|
16
|
-
propsMetaPopover,
|
|
17
|
-
propsMetaPopoverTrigger,
|
|
18
|
-
propsMetaPopoverContent
|
|
16
|
+
export {
|
|
17
|
+
propsMetaPopover as Popover,
|
|
18
|
+
propsMetaPopoverTrigger as PopoverTrigger,
|
|
19
|
+
propsMetaPopoverContent as PopoverContent
|
|
19
20
|
} from "./popover.ws";
|
|
20
|
-
|
|
21
|
-
propsMetaTooltip,
|
|
22
|
-
propsMetaTooltipTrigger,
|
|
23
|
-
propsMetaTooltipContent
|
|
21
|
+
export {
|
|
22
|
+
propsMetaTooltip as Tooltip,
|
|
23
|
+
propsMetaTooltipTrigger as TooltipTrigger,
|
|
24
|
+
propsMetaTooltipContent as TooltipContent
|
|
24
25
|
} from "./tooltip.ws";
|
|
25
|
-
|
|
26
|
-
propsMetaTabs,
|
|
27
|
-
propsMetaTabsList,
|
|
28
|
-
propsMetaTabsTrigger,
|
|
29
|
-
propsMetaTabsContent
|
|
26
|
+
export {
|
|
27
|
+
propsMetaTabs as Tabs,
|
|
28
|
+
propsMetaTabsList as TabsList,
|
|
29
|
+
propsMetaTabsTrigger as TabsTrigger,
|
|
30
|
+
propsMetaTabsContent as TabsContent
|
|
30
31
|
} from "./tabs.ws";
|
|
31
|
-
|
|
32
|
-
import {
|
|
33
|
-
propsMetaAccordion,
|
|
34
|
-
propsMetaAccordionItem,
|
|
35
|
-
propsMetaAccordionHeader,
|
|
36
|
-
propsMetaAccordionTrigger,
|
|
37
|
-
propsMetaAccordionContent
|
|
38
|
-
} from "./accordion.ws";
|
|
39
|
-
import {
|
|
40
|
-
propsMetaNavigationMenu,
|
|
41
|
-
propsMetaNavigationMenuList,
|
|
42
|
-
propsMetaNavigationMenuItem,
|
|
43
|
-
propsMetaNavigationMenuTrigger,
|
|
44
|
-
propsMetaNavigationMenuContent,
|
|
45
|
-
propsMetaNavigationMenuLink,
|
|
46
|
-
propsMetaNavigationMenuViewport
|
|
47
|
-
} from "./navigation-menu.ws";
|
|
48
|
-
import {
|
|
49
|
-
propsMetaSelect,
|
|
50
|
-
propsMetaSelectTrigger,
|
|
51
|
-
propsMetaSelectValue,
|
|
52
|
-
propsMetaSelectViewport,
|
|
53
|
-
propsMetaSelectContent,
|
|
54
|
-
propsMetaSelectItem,
|
|
55
|
-
propsMetaSelectItemIndicator,
|
|
56
|
-
propsMetaSelectItemText
|
|
57
|
-
} from "./select.ws";
|
|
58
|
-
import {
|
|
59
|
-
propsMetaSwitch,
|
|
60
|
-
propsMetaSwitchThumb
|
|
61
|
-
} from "./switch.ws";
|
|
62
|
-
import {
|
|
63
|
-
propsMetaCheckbox,
|
|
64
|
-
propsMetaCheckboxIndicator
|
|
65
|
-
} from "./checkbox.ws";
|
|
66
|
-
import {
|
|
67
|
-
propsMetaRadioGroup,
|
|
68
|
-
propsMetaRadioGroupItem,
|
|
69
|
-
propsMetaRadioGroupIndicator
|
|
70
|
-
} from "./radio-group.ws";
|
|
32
|
+
export { propsMeta as Label } from "./label.ws";
|
|
71
33
|
export {
|
|
72
34
|
propsMetaAccordion as Accordion,
|
|
73
|
-
propsMetaAccordionContent as AccordionContent,
|
|
74
|
-
propsMetaAccordionHeader as AccordionHeader,
|
|
75
35
|
propsMetaAccordionItem as AccordionItem,
|
|
36
|
+
propsMetaAccordionHeader as AccordionHeader,
|
|
76
37
|
propsMetaAccordionTrigger as AccordionTrigger,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
propsMetaCollapsibleContent as CollapsibleContent,
|
|
81
|
-
propsMetaCollapsibleTrigger as CollapsibleTrigger,
|
|
82
|
-
propsMetaDialog as Dialog,
|
|
83
|
-
propsMetaDialogClose as DialogClose,
|
|
84
|
-
propsMetaDialogContent as DialogContent,
|
|
85
|
-
propsMetaDialogDescription as DialogDescription,
|
|
86
|
-
propsMetaDialogOverlay as DialogOverlay,
|
|
87
|
-
propsMetaDialogTitle as DialogTitle,
|
|
88
|
-
propsMetaDialogTrigger as DialogTrigger,
|
|
89
|
-
propsMeta as Label,
|
|
38
|
+
propsMetaAccordionContent as AccordionContent
|
|
39
|
+
} from "./accordion.ws";
|
|
40
|
+
export {
|
|
90
41
|
propsMetaNavigationMenu as NavigationMenu,
|
|
91
|
-
propsMetaNavigationMenuContent as NavigationMenuContent,
|
|
92
|
-
propsMetaNavigationMenuItem as NavigationMenuItem,
|
|
93
|
-
propsMetaNavigationMenuLink as NavigationMenuLink,
|
|
94
42
|
propsMetaNavigationMenuList as NavigationMenuList,
|
|
43
|
+
propsMetaNavigationMenuItem as NavigationMenuItem,
|
|
95
44
|
propsMetaNavigationMenuTrigger as NavigationMenuTrigger,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
propsMetaRadioGroupIndicator as RadioGroupIndicator,
|
|
102
|
-
propsMetaRadioGroupItem as RadioGroupItem,
|
|
45
|
+
propsMetaNavigationMenuContent as NavigationMenuContent,
|
|
46
|
+
propsMetaNavigationMenuLink as NavigationMenuLink,
|
|
47
|
+
propsMetaNavigationMenuViewport as NavigationMenuViewport
|
|
48
|
+
} from "./navigation-menu.ws";
|
|
49
|
+
export {
|
|
103
50
|
propsMetaSelect as Select,
|
|
104
|
-
propsMetaSelectContent as SelectContent,
|
|
105
|
-
propsMetaSelectItem as SelectItem,
|
|
106
|
-
propsMetaSelectItemIndicator as SelectItemIndicator,
|
|
107
|
-
propsMetaSelectItemText as SelectItemText,
|
|
108
51
|
propsMetaSelectTrigger as SelectTrigger,
|
|
109
52
|
propsMetaSelectValue as SelectValue,
|
|
110
53
|
propsMetaSelectViewport as SelectViewport,
|
|
54
|
+
propsMetaSelectContent as SelectContent,
|
|
55
|
+
propsMetaSelectItem as SelectItem,
|
|
56
|
+
propsMetaSelectItemIndicator as SelectItemIndicator,
|
|
57
|
+
propsMetaSelectItemText as SelectItemText
|
|
58
|
+
} from "./select.ws";
|
|
59
|
+
export {
|
|
111
60
|
propsMetaSwitch as Switch,
|
|
112
|
-
propsMetaSwitchThumb as SwitchThumb
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
61
|
+
propsMetaSwitchThumb as SwitchThumb
|
|
62
|
+
} from "./switch.ws";
|
|
63
|
+
export {
|
|
64
|
+
propsMetaCheckbox as Checkbox,
|
|
65
|
+
propsMetaCheckboxIndicator as CheckboxIndicator
|
|
66
|
+
} from "./checkbox.ws";
|
|
67
|
+
export {
|
|
68
|
+
propsMetaRadioGroup as RadioGroup,
|
|
69
|
+
propsMetaRadioGroupItem as RadioGroupItem,
|
|
70
|
+
propsMetaRadioGroupIndicator as RadioGroupIndicator
|
|
71
|
+
} from "./radio-group.ws";
|
package/lib/radio-group.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import {
|
|
2
3
|
} from "react";
|
|
3
4
|
import { Root, Item, Indicator } from "@radix-ui/react-radio-group";
|
|
4
|
-
const RadioGroup = Root;
|
|
5
|
-
const RadioGroupItem = Item;
|
|
6
|
-
const RadioGroupIndicator = Indicator;
|
|
7
|
-
export {
|
|
8
|
-
RadioGroup,
|
|
9
|
-
RadioGroupIndicator,
|
|
10
|
-
RadioGroupItem
|
|
11
|
-
};
|
|
5
|
+
export const RadioGroup = Root;
|
|
6
|
+
export const RadioGroupItem = Item;
|
|
7
|
+
export const RadioGroupIndicator = Indicator;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { renderComponentTemplate } from "@webstudio-is/react-sdk";
|
|
3
|
+
import * as baseComponents from "@webstudio-is/sdk-components-react";
|
|
4
|
+
import * as baseMetas from "@webstudio-is/sdk-components-react/metas";
|
|
5
|
+
import * as radixComponents from "./components";
|
|
6
|
+
import * as radixMetas from "./metas";
|
|
7
|
+
import { RadioGroup as RadioGroupPrimitive } from "./radio-group";
|
|
8
|
+
export default {
|
|
9
|
+
title: "Components/RadioGroup",
|
|
10
|
+
component: RadioGroupPrimitive
|
|
11
|
+
};
|
|
12
|
+
export const RadioGroup = {
|
|
13
|
+
render: (props) => renderComponentTemplate({
|
|
14
|
+
name: "RadioGroup",
|
|
15
|
+
props: { ...props },
|
|
16
|
+
components: { ...baseComponents, ...radixComponents },
|
|
17
|
+
metas: { ...baseMetas, ...radixMetas }
|
|
18
|
+
})
|
|
19
|
+
};
|
package/lib/radio-group.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import {
|
|
2
3
|
ItemIcon,
|
|
3
4
|
RadioCheckedIcon,
|
|
@@ -75,7 +76,7 @@ const createRadioGroupItem = ({
|
|
|
75
76
|
}
|
|
76
77
|
]
|
|
77
78
|
});
|
|
78
|
-
const metaRadioGroup = {
|
|
79
|
+
export const metaRadioGroup = {
|
|
79
80
|
category: "radix",
|
|
80
81
|
order: 100,
|
|
81
82
|
type: "container",
|
|
@@ -132,7 +133,7 @@ const metaRadioGroup = {
|
|
|
132
133
|
}
|
|
133
134
|
]
|
|
134
135
|
};
|
|
135
|
-
const metaRadioGroupItem = {
|
|
136
|
+
export const metaRadioGroupItem = {
|
|
136
137
|
category: "hidden",
|
|
137
138
|
type: "container",
|
|
138
139
|
requiredAncestors: ["RadioGroup"],
|
|
@@ -142,7 +143,7 @@ const metaRadioGroupItem = {
|
|
|
142
143
|
button: [button, buttonReset].flat()
|
|
143
144
|
}
|
|
144
145
|
};
|
|
145
|
-
const metaRadioGroupIndicator = {
|
|
146
|
+
export const metaRadioGroupIndicator = {
|
|
146
147
|
category: "hidden",
|
|
147
148
|
type: "container",
|
|
148
149
|
detachable: false,
|
|
@@ -152,22 +153,14 @@ const metaRadioGroupIndicator = {
|
|
|
152
153
|
span
|
|
153
154
|
}
|
|
154
155
|
};
|
|
155
|
-
const propsMetaRadioGroup = {
|
|
156
|
+
export const propsMetaRadioGroup = {
|
|
156
157
|
props: propsRadioGroup,
|
|
157
158
|
initialProps: ["id", "value", "name", "required"]
|
|
158
159
|
};
|
|
159
|
-
const propsMetaRadioGroupItem = {
|
|
160
|
+
export const propsMetaRadioGroupItem = {
|
|
160
161
|
props: propsRadioGroupItem,
|
|
161
162
|
initialProps: ["value"]
|
|
162
163
|
};
|
|
163
|
-
const propsMetaRadioGroupIndicator = {
|
|
164
|
+
export const propsMetaRadioGroupIndicator = {
|
|
164
165
|
props: propsRadioGroupIndicator
|
|
165
166
|
};
|
|
166
|
-
export {
|
|
167
|
-
metaRadioGroup,
|
|
168
|
-
metaRadioGroupIndicator,
|
|
169
|
-
metaRadioGroupItem,
|
|
170
|
-
propsMetaRadioGroup,
|
|
171
|
-
propsMetaRadioGroupIndicator,
|
|
172
|
-
propsMetaRadioGroupItem
|
|
173
|
-
};
|
package/lib/select.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
forwardRef
|
|
@@ -14,25 +15,25 @@ import {
|
|
|
14
15
|
Viewport
|
|
15
16
|
} from "@radix-ui/react-select";
|
|
16
17
|
import { getClosestInstance } from "@webstudio-is/react-sdk";
|
|
17
|
-
const Select = forwardRef(({ value, ...props }, _ref) => {
|
|
18
|
+
export const Select = forwardRef(({ value, ...props }, _ref) => {
|
|
18
19
|
if (value === "") {
|
|
19
20
|
value = void 0;
|
|
20
21
|
}
|
|
21
22
|
return /* @__PURE__ */ jsx(Root, { value, ...props });
|
|
22
23
|
});
|
|
23
|
-
const SelectTrigger = Trigger;
|
|
24
|
-
const SelectValue = forwardRef((props, ref) => {
|
|
24
|
+
export const SelectTrigger = Trigger;
|
|
25
|
+
export const SelectValue = forwardRef((props, ref) => {
|
|
25
26
|
return /* @__PURE__ */ jsx(Value, { ref, ...props });
|
|
26
27
|
});
|
|
27
|
-
const SelectContent = forwardRef((props, ref) => {
|
|
28
|
+
export const SelectContent = forwardRef((props, ref) => {
|
|
28
29
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, { ref, ...props, position: "popper" }) });
|
|
29
30
|
});
|
|
30
|
-
const SelectViewport = Viewport;
|
|
31
|
-
const SelectItem = Item;
|
|
32
|
-
const SelectItemIndicator = ItemIndicator;
|
|
33
|
-
const SelectItemText = ItemText;
|
|
31
|
+
export const SelectViewport = Viewport;
|
|
32
|
+
export const SelectItem = Item;
|
|
33
|
+
export const SelectItemIndicator = ItemIndicator;
|
|
34
|
+
export const SelectItemText = ItemText;
|
|
34
35
|
const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
35
|
-
const hooksSelect = {
|
|
36
|
+
export const hooksSelect = {
|
|
36
37
|
onNavigatorUnselect: (context, event) => {
|
|
37
38
|
for (const instance of event.instancePath) {
|
|
38
39
|
if (instance.component === `${namespace}:SelectContent`) {
|
|
@@ -62,14 +63,3 @@ const hooksSelect = {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
};
|
|
65
|
-
export {
|
|
66
|
-
Select,
|
|
67
|
-
SelectContent,
|
|
68
|
-
SelectItem,
|
|
69
|
-
SelectItemIndicator,
|
|
70
|
-
SelectItemText,
|
|
71
|
-
SelectTrigger,
|
|
72
|
-
SelectValue,
|
|
73
|
-
SelectViewport,
|
|
74
|
-
hooksSelect
|
|
75
|
-
};
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
import { renderComponentTemplate } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { Select as SelectPrimitive } from "./select";
|
|
4
4
|
import * as baseComponents from "@webstudio-is/sdk-components-react";
|
|
5
5
|
import * as baseMetas from "@webstudio-is/sdk-components-react/metas";
|
|
6
6
|
import * as radixComponents from "./components";
|
|
7
7
|
import * as radixMetas from "./metas";
|
|
8
|
-
|
|
9
8
|
export default {
|
|
10
9
|
title: "Components/Select",
|
|
11
|
-
component: SelectPrimitive
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
metas: { ...baseMetas, ...radixMetas },
|
|
20
|
-
}),
|
|
10
|
+
component: SelectPrimitive
|
|
11
|
+
};
|
|
12
|
+
export const Select = {
|
|
13
|
+
render: () => renderComponentTemplate({
|
|
14
|
+
name: "Select",
|
|
15
|
+
components: { ...baseComponents, ...radixComponents },
|
|
16
|
+
metas: { ...baseMetas, ...radixMetas }
|
|
17
|
+
})
|
|
21
18
|
};
|
package/lib/select.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import {
|
|
2
3
|
SelectIcon,
|
|
3
4
|
TriggerIcon,
|
|
@@ -89,7 +90,7 @@ const createSelectItem = ({
|
|
|
89
90
|
}
|
|
90
91
|
]
|
|
91
92
|
});
|
|
92
|
-
const metaSelect = {
|
|
93
|
+
export const metaSelect = {
|
|
93
94
|
category: "radix",
|
|
94
95
|
order: 10,
|
|
95
96
|
type: "container",
|
|
@@ -229,7 +230,7 @@ const metaSelect = {
|
|
|
229
230
|
}
|
|
230
231
|
]
|
|
231
232
|
};
|
|
232
|
-
const metaSelectTrigger = {
|
|
233
|
+
export const metaSelectTrigger = {
|
|
233
234
|
category: "hidden",
|
|
234
235
|
type: "container",
|
|
235
236
|
icon: TriggerIcon,
|
|
@@ -238,7 +239,7 @@ const metaSelectTrigger = {
|
|
|
238
239
|
button
|
|
239
240
|
}
|
|
240
241
|
};
|
|
241
|
-
const metaSelectValue = {
|
|
242
|
+
export const metaSelectValue = {
|
|
242
243
|
category: "hidden",
|
|
243
244
|
type: "container",
|
|
244
245
|
label: "Value",
|
|
@@ -248,28 +249,28 @@ const metaSelectValue = {
|
|
|
248
249
|
span
|
|
249
250
|
}
|
|
250
251
|
};
|
|
251
|
-
const metaSelectContent = {
|
|
252
|
+
export const metaSelectContent = {
|
|
252
253
|
category: "hidden",
|
|
253
254
|
type: "container",
|
|
254
255
|
icon: ContentIcon,
|
|
255
256
|
detachable: false,
|
|
256
257
|
presetStyle
|
|
257
258
|
};
|
|
258
|
-
const metaSelectViewport = {
|
|
259
|
+
export const metaSelectViewport = {
|
|
259
260
|
category: "hidden",
|
|
260
261
|
type: "container",
|
|
261
262
|
icon: ViewportIcon,
|
|
262
263
|
detachable: false,
|
|
263
264
|
presetStyle
|
|
264
265
|
};
|
|
265
|
-
const metaSelectItem = {
|
|
266
|
+
export const metaSelectItem = {
|
|
266
267
|
category: "hidden",
|
|
267
268
|
type: "container",
|
|
268
269
|
icon: ItemIcon,
|
|
269
270
|
requiredAncestors: ["SelectViewport"],
|
|
270
271
|
presetStyle
|
|
271
272
|
};
|
|
272
|
-
const metaSelectItemIndicator = {
|
|
273
|
+
export const metaSelectItemIndicator = {
|
|
273
274
|
category: "hidden",
|
|
274
275
|
type: "container",
|
|
275
276
|
label: "Indicator",
|
|
@@ -280,7 +281,7 @@ const metaSelectItemIndicator = {
|
|
|
280
281
|
span
|
|
281
282
|
}
|
|
282
283
|
};
|
|
283
|
-
const metaSelectItemText = {
|
|
284
|
+
export const metaSelectItemText = {
|
|
284
285
|
category: "hidden",
|
|
285
286
|
type: "container",
|
|
286
287
|
label: "Item Text",
|
|
@@ -291,48 +292,30 @@ const metaSelectItemText = {
|
|
|
291
292
|
span
|
|
292
293
|
}
|
|
293
294
|
};
|
|
294
|
-
const propsMetaSelect = {
|
|
295
|
+
export const propsMetaSelect = {
|
|
295
296
|
props: propsSelect,
|
|
296
297
|
initialProps: ["value", "open", "name", "required"]
|
|
297
298
|
};
|
|
298
|
-
const propsMetaSelectTrigger = {
|
|
299
|
+
export const propsMetaSelectTrigger = {
|
|
299
300
|
props: propsSelectTrigger
|
|
300
301
|
};
|
|
301
|
-
const propsMetaSelectValue = {
|
|
302
|
+
export const propsMetaSelectValue = {
|
|
302
303
|
props: propsSelectValue,
|
|
303
304
|
initialProps: ["placeholder"]
|
|
304
305
|
};
|
|
305
|
-
const propsMetaSelectContent = {
|
|
306
|
+
export const propsMetaSelectContent = {
|
|
306
307
|
props: propsSelectContent
|
|
307
308
|
};
|
|
308
|
-
const propsMetaSelectViewport = {
|
|
309
|
+
export const propsMetaSelectViewport = {
|
|
309
310
|
props: propsSelectViewport
|
|
310
311
|
};
|
|
311
|
-
const propsMetaSelectItem = {
|
|
312
|
+
export const propsMetaSelectItem = {
|
|
312
313
|
props: propsSelectItem,
|
|
313
314
|
initialProps: ["value"]
|
|
314
315
|
};
|
|
315
|
-
const propsMetaSelectItemIndicator = {
|
|
316
|
+
export const propsMetaSelectItemIndicator = {
|
|
316
317
|
props: propsSelectItemIndicator
|
|
317
318
|
};
|
|
318
|
-
const propsMetaSelectItemText = {
|
|
319
|
+
export const propsMetaSelectItemText = {
|
|
319
320
|
props: propsSelectItemText
|
|
320
321
|
};
|
|
321
|
-
export {
|
|
322
|
-
metaSelect,
|
|
323
|
-
metaSelectContent,
|
|
324
|
-
metaSelectItem,
|
|
325
|
-
metaSelectItemIndicator,
|
|
326
|
-
metaSelectItemText,
|
|
327
|
-
metaSelectTrigger,
|
|
328
|
-
metaSelectValue,
|
|
329
|
-
metaSelectViewport,
|
|
330
|
-
propsMetaSelect,
|
|
331
|
-
propsMetaSelectContent,
|
|
332
|
-
propsMetaSelectItem,
|
|
333
|
-
propsMetaSelectItemIndicator,
|
|
334
|
-
propsMetaSelectItemText,
|
|
335
|
-
propsMetaSelectTrigger,
|
|
336
|
-
propsMetaSelectValue,
|
|
337
|
-
propsMetaSelectViewport
|
|
338
|
-
};
|
package/lib/sheet.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
forwardRef
|
|
4
5
|
} from "react";
|
|
5
6
|
import { getClosestInstance } from "@webstudio-is/react-sdk";
|
|
6
7
|
import * as Dialog from "./dialog";
|
|
7
|
-
const Sheet = Dialog.Dialog;
|
|
8
|
-
const SheetTrigger = Dialog.DialogTrigger;
|
|
9
|
-
const SheetOverlay = Dialog.DialogOverlay;
|
|
10
|
-
const SheetClose = Dialog.DialogClose;
|
|
11
|
-
const SheetTitle = Dialog.DialogTitle;
|
|
12
|
-
const SheetDescription = Dialog.DialogDescription;
|
|
13
|
-
const SheetContent = forwardRef(
|
|
8
|
+
export const Sheet = Dialog.Dialog;
|
|
9
|
+
export const SheetTrigger = Dialog.DialogTrigger;
|
|
10
|
+
export const SheetOverlay = Dialog.DialogOverlay;
|
|
11
|
+
export const SheetClose = Dialog.DialogClose;
|
|
12
|
+
export const SheetTitle = Dialog.DialogTitle;
|
|
13
|
+
export const SheetDescription = Dialog.DialogDescription;
|
|
14
|
+
export const SheetContent = forwardRef(
|
|
14
15
|
({ tag = "nav", side = "left", role = "navigation", children, ...props }, ref) => {
|
|
15
16
|
const Tag = tag;
|
|
16
17
|
return /* @__PURE__ */ jsx(
|
|
@@ -26,7 +27,7 @@ const SheetContent = forwardRef(
|
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
29
|
const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
29
|
-
const hooksSheet = {
|
|
30
|
+
export const hooksSheet = {
|
|
30
31
|
onNavigatorUnselect: (context, event) => {
|
|
31
32
|
for (const instance of event.instancePath) {
|
|
32
33
|
if (instance.component === `${namespace}:SheetOverlay`) {
|
|
@@ -56,13 +57,3 @@ const hooksSheet = {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
};
|
|
59
|
-
export {
|
|
60
|
-
Sheet,
|
|
61
|
-
SheetClose,
|
|
62
|
-
SheetContent,
|
|
63
|
-
SheetDescription,
|
|
64
|
-
SheetOverlay,
|
|
65
|
-
SheetTitle,
|
|
66
|
-
SheetTrigger,
|
|
67
|
-
hooksSheet
|
|
68
|
-
};
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
import { renderComponentTemplate } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { Sheet as SheetPrimitive } from "./sheet";
|
|
4
4
|
import * as baseComponents from "@webstudio-is/sdk-components-react";
|
|
5
5
|
import * as baseMetas from "@webstudio-is/sdk-components-react/metas";
|
|
6
6
|
import * as radixComponents from "./components";
|
|
7
7
|
import * as radixMetas from "./metas";
|
|
8
|
-
|
|
9
8
|
export default {
|
|
10
9
|
title: "Components/Sheet",
|
|
11
|
-
component: SheetPrimitive
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
metas: { ...baseMetas, ...radixMetas },
|
|
20
|
-
}),
|
|
10
|
+
component: SheetPrimitive
|
|
11
|
+
};
|
|
12
|
+
export const Sheet = {
|
|
13
|
+
render: () => renderComponentTemplate({
|
|
14
|
+
name: "Sheet",
|
|
15
|
+
components: { ...baseComponents, ...radixComponents },
|
|
16
|
+
metas: { ...baseMetas, ...radixMetas }
|
|
17
|
+
})
|
|
21
18
|
};
|
package/lib/sheet.ws.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { HamburgerMenuIcon, LargeXIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import * as tc from "./theme/tailwind-classes";
|
|
3
4
|
import { getButtonStyles } from "./theme/styles";
|
|
4
|
-
const meta = {
|
|
5
|
+
export const meta = {
|
|
5
6
|
category: "radix",
|
|
6
7
|
order: 1,
|
|
7
8
|
type: "container",
|
|
@@ -222,6 +223,3 @@ const meta = {
|
|
|
222
223
|
}
|
|
223
224
|
]
|
|
224
225
|
};
|
|
225
|
-
export {
|
|
226
|
-
meta
|
|
227
|
-
};
|
package/lib/switch.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { renderComponentTemplate } from "@webstudio-is/react-sdk";
|
|
3
|
+
import * as baseComponents from "@webstudio-is/sdk-components-react";
|
|
4
|
+
import * as baseMetas from "@webstudio-is/sdk-components-react/metas";
|
|
5
|
+
import * as radixComponents from "./components";
|
|
6
|
+
import * as radixMetas from "./metas";
|
|
7
|
+
import { Switch as SwitchPrimitive } from "./switch";
|
|
8
|
+
export default {
|
|
9
|
+
title: "Components/Switch",
|
|
10
|
+
component: SwitchPrimitive
|
|
11
|
+
};
|
|
12
|
+
export const Switch = {
|
|
13
|
+
render: (props) => renderComponentTemplate({
|
|
14
|
+
name: "Switch",
|
|
15
|
+
props: { ...props },
|
|
16
|
+
components: { ...baseComponents, ...radixComponents },
|
|
17
|
+
metas: { ...baseMetas, ...radixMetas }
|
|
18
|
+
})
|
|
19
|
+
};
|
package/lib/switch.ws.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { SwitchIcon, TriggerIcon } from "@webstudio-is/icons/svg";
|
|
2
3
|
import {
|
|
3
4
|
defaultStates
|
|
@@ -6,7 +7,7 @@ import { button, span } from "@webstudio-is/react-sdk/css-normalize";
|
|
|
6
7
|
import * as tc from "./theme/tailwind-classes";
|
|
7
8
|
import { buttonReset } from "./theme/styles";
|
|
8
9
|
import { propsSwitch, propsSwitchThumb } from "./__generated__/switch.props";
|
|
9
|
-
const metaSwitch = {
|
|
10
|
+
export const metaSwitch = {
|
|
10
11
|
category: "radix",
|
|
11
12
|
order: 11,
|
|
12
13
|
type: "container",
|
|
@@ -108,7 +109,7 @@ const metaSwitch = {
|
|
|
108
109
|
}
|
|
109
110
|
]
|
|
110
111
|
};
|
|
111
|
-
const metaSwitchThumb = {
|
|
112
|
+
export const metaSwitchThumb = {
|
|
112
113
|
category: "hidden",
|
|
113
114
|
type: "container",
|
|
114
115
|
detachable: false,
|
|
@@ -130,16 +131,10 @@ const metaSwitchThumb = {
|
|
|
130
131
|
span
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
|
-
const propsMetaSwitch = {
|
|
134
|
+
export const propsMetaSwitch = {
|
|
134
135
|
props: propsSwitch,
|
|
135
136
|
initialProps: ["id", "checked", "name", "required"]
|
|
136
137
|
};
|
|
137
|
-
const propsMetaSwitchThumb = {
|
|
138
|
+
export const propsMetaSwitchThumb = {
|
|
138
139
|
props: propsSwitchThumb
|
|
139
140
|
};
|
|
140
|
-
export {
|
|
141
|
-
metaSwitch,
|
|
142
|
-
metaSwitchThumb,
|
|
143
|
-
propsMetaSwitch,
|
|
144
|
-
propsMetaSwitchThumb
|
|
145
|
-
};
|