@webstudio-is/sdk-components-react-radix 0.195.0 → 0.197.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__/select.props.js +6 -0
- package/lib/__generated__/tabs.props.js +2 -2
- package/lib/accordion.template.js +95 -0
- package/lib/accordion.ws.js +53 -205
- package/lib/checkbox.template.js +63 -0
- package/lib/checkbox.ws.js +22 -119
- package/lib/collapsible.template.js +16 -0
- package/lib/collapsible.ws.js +21 -71
- package/lib/dialog.template.js +119 -0
- package/lib/dialog.ws.js +60 -237
- package/lib/label.template.js +23 -0
- package/lib/label.ws.js +12 -36
- package/lib/metas.js +48 -50
- package/lib/navigation-menu.template.js +283 -0
- package/lib/navigation-menu.ws.js +54 -420
- package/lib/popover.template.js +33 -0
- package/lib/popover.ws.js +19 -79
- package/lib/radio-group.template.js +66 -0
- package/lib/radio-group.ws.js +27 -125
- package/lib/select.template.js +121 -0
- package/lib/select.ws.js +61 -262
- package/lib/shared/preset-styles.js +38 -0
- package/lib/shared/proxy.js +5 -0
- package/lib/shared/styles.js +51 -0
- package/lib/shared/theme.js +162 -0
- package/lib/sheet.template.js +129 -0
- package/lib/switch.js +1 -1
- package/lib/switch.template.js +63 -0
- package/lib/switch.ws.js +22 -106
- package/lib/tabs.template.js +66 -0
- package/lib/tabs.ws.js +36 -131
- package/lib/templates.js +28 -0
- package/lib/tooltip.template.js +33 -0
- package/lib/tooltip.ws.js +24 -84
- 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__/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.template.d.ts +10 -0
- package/lib/types/accordion.ws.d.ts +1 -1
- package/lib/types/checkbox.d.ts +1 -1
- package/lib/types/checkbox.template.d.ts +2 -0
- package/lib/types/checkbox.ws.d.ts +1 -1
- package/lib/types/collapsible.template.d.ts +2 -0
- package/lib/types/collapsible.ws.d.ts +1 -1
- package/lib/types/dialog.template.d.ts +10 -0
- package/lib/types/dialog.ws.d.ts +1 -9
- package/lib/types/label.template.d.ts +10 -0
- package/lib/types/label.ws.d.ts +1 -1
- package/lib/types/metas.d.ts +0 -1
- package/lib/types/navigation-menu.template.d.ts +2 -0
- package/lib/types/navigation-menu.ws.d.ts +1 -1
- package/lib/types/popover.template.d.ts +10 -0
- package/lib/types/popover.ws.d.ts +1 -9
- package/lib/types/radio-group.template.d.ts +2 -0
- package/lib/types/radio-group.ws.d.ts +1 -1
- package/lib/types/select.template.d.ts +2 -0
- package/lib/types/select.ws.d.ts +1 -1
- package/lib/types/shared/preset-styles.d.ts +2 -0
- package/lib/types/shared/proxy.d.ts +17 -0
- package/lib/types/shared/styles.d.ts +2 -0
- package/lib/types/shared/theme.d.ts +212 -0
- package/lib/types/{sheet.ws.d.ts → sheet.template.d.ts} +2 -2
- package/lib/types/switch.template.d.ts +2 -0
- package/lib/types/switch.ws.d.ts +1 -1
- package/lib/types/tabs.template.d.ts +2 -0
- package/lib/types/tabs.ws.d.ts +1 -1
- package/lib/types/templates.d.ts +13 -0
- package/lib/types/tooltip.template.d.ts +10 -0
- package/lib/types/tooltip.ws.d.ts +1 -9
- package/package.json +26 -23
- package/lib/sheet.ws.js +0 -217
- package/lib/theme/__generated__/tailwind-theme.js +0 -503
- package/lib/theme/styles.js +0 -52
- package/lib/theme/tailwind-classes.js +0 -474
- package/lib/types/__generated__/sheet.props.d.ts +0 -8
- package/lib/types/theme/__generated__/tailwind-theme.d.ts +0 -26
- package/lib/types/theme/styles.d.ts +0 -278
- package/lib/types/theme/tailwind-classes.d.ts +0 -104
- package/lib/types/theme/tailwind-colors.d.ts +0 -31
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
export declare const fontSize: {
|
|
2
|
+
readonly sm: "0.875rem";
|
|
3
|
+
readonly lg: "1.125rem";
|
|
4
|
+
};
|
|
5
|
+
export declare const fontSizeLineHeight: {
|
|
6
|
+
readonly sm: "1.25rem";
|
|
7
|
+
readonly lg: "1.75rem";
|
|
8
|
+
};
|
|
9
|
+
export declare const lineHeight: {
|
|
10
|
+
readonly none: "1";
|
|
11
|
+
readonly snug: "1.375";
|
|
12
|
+
};
|
|
13
|
+
export declare const weights: {
|
|
14
|
+
readonly medium: "500";
|
|
15
|
+
};
|
|
16
|
+
export declare const letterSpacing: {
|
|
17
|
+
readonly tight: "-0.025em";
|
|
18
|
+
};
|
|
19
|
+
export declare const spacing: {
|
|
20
|
+
readonly "0": "0px";
|
|
21
|
+
readonly "1": "0.25rem";
|
|
22
|
+
readonly "2": "0.5rem";
|
|
23
|
+
readonly "3": "0.75rem";
|
|
24
|
+
readonly "4": "1rem";
|
|
25
|
+
readonly "5": "1.25rem";
|
|
26
|
+
readonly "6": "1.5rem";
|
|
27
|
+
readonly "7": "1.75rem";
|
|
28
|
+
readonly "8": "2rem";
|
|
29
|
+
readonly "9": "2.25rem";
|
|
30
|
+
readonly "10": "2.5rem";
|
|
31
|
+
readonly "11": "2.75rem";
|
|
32
|
+
readonly "12": "3rem";
|
|
33
|
+
readonly "14": "3.5rem";
|
|
34
|
+
readonly "16": "4rem";
|
|
35
|
+
readonly "20": "5rem";
|
|
36
|
+
readonly "24": "6rem";
|
|
37
|
+
readonly "28": "7rem";
|
|
38
|
+
readonly "32": "8rem";
|
|
39
|
+
readonly "36": "9rem";
|
|
40
|
+
readonly "40": "10rem";
|
|
41
|
+
readonly "44": "11rem";
|
|
42
|
+
readonly "48": "12rem";
|
|
43
|
+
readonly "52": "13rem";
|
|
44
|
+
readonly "56": "14rem";
|
|
45
|
+
readonly "60": "15rem";
|
|
46
|
+
readonly "64": "16rem";
|
|
47
|
+
readonly "72": "18rem";
|
|
48
|
+
readonly "80": "20rem";
|
|
49
|
+
readonly "96": "24rem";
|
|
50
|
+
readonly px: "1px";
|
|
51
|
+
readonly "0.5": "0.125rem";
|
|
52
|
+
readonly "1.5": "0.375rem";
|
|
53
|
+
readonly "2.5": "0.625rem";
|
|
54
|
+
readonly "3.5": "0.875rem";
|
|
55
|
+
};
|
|
56
|
+
export declare const width: {
|
|
57
|
+
readonly full: "100%";
|
|
58
|
+
readonly "0": "0px";
|
|
59
|
+
readonly "1": "0.25rem";
|
|
60
|
+
readonly "2": "0.5rem";
|
|
61
|
+
readonly "3": "0.75rem";
|
|
62
|
+
readonly "4": "1rem";
|
|
63
|
+
readonly "5": "1.25rem";
|
|
64
|
+
readonly "6": "1.5rem";
|
|
65
|
+
readonly "7": "1.75rem";
|
|
66
|
+
readonly "8": "2rem";
|
|
67
|
+
readonly "9": "2.25rem";
|
|
68
|
+
readonly "10": "2.5rem";
|
|
69
|
+
readonly "11": "2.75rem";
|
|
70
|
+
readonly "12": "3rem";
|
|
71
|
+
readonly "14": "3.5rem";
|
|
72
|
+
readonly "16": "4rem";
|
|
73
|
+
readonly "20": "5rem";
|
|
74
|
+
readonly "24": "6rem";
|
|
75
|
+
readonly "28": "7rem";
|
|
76
|
+
readonly "32": "8rem";
|
|
77
|
+
readonly "36": "9rem";
|
|
78
|
+
readonly "40": "10rem";
|
|
79
|
+
readonly "44": "11rem";
|
|
80
|
+
readonly "48": "12rem";
|
|
81
|
+
readonly "52": "13rem";
|
|
82
|
+
readonly "56": "14rem";
|
|
83
|
+
readonly "60": "15rem";
|
|
84
|
+
readonly "64": "16rem";
|
|
85
|
+
readonly "72": "18rem";
|
|
86
|
+
readonly "80": "20rem";
|
|
87
|
+
readonly "96": "24rem";
|
|
88
|
+
readonly px: "1px";
|
|
89
|
+
readonly "0.5": "0.125rem";
|
|
90
|
+
readonly "1.5": "0.375rem";
|
|
91
|
+
readonly "2.5": "0.625rem";
|
|
92
|
+
readonly "3.5": "0.875rem";
|
|
93
|
+
};
|
|
94
|
+
export declare const height: {
|
|
95
|
+
readonly full: "100%";
|
|
96
|
+
readonly "0": "0px";
|
|
97
|
+
readonly "1": "0.25rem";
|
|
98
|
+
readonly "2": "0.5rem";
|
|
99
|
+
readonly "3": "0.75rem";
|
|
100
|
+
readonly "4": "1rem";
|
|
101
|
+
readonly "5": "1.25rem";
|
|
102
|
+
readonly "6": "1.5rem";
|
|
103
|
+
readonly "7": "1.75rem";
|
|
104
|
+
readonly "8": "2rem";
|
|
105
|
+
readonly "9": "2.25rem";
|
|
106
|
+
readonly "10": "2.5rem";
|
|
107
|
+
readonly "11": "2.75rem";
|
|
108
|
+
readonly "12": "3rem";
|
|
109
|
+
readonly "14": "3.5rem";
|
|
110
|
+
readonly "16": "4rem";
|
|
111
|
+
readonly "20": "5rem";
|
|
112
|
+
readonly "24": "6rem";
|
|
113
|
+
readonly "28": "7rem";
|
|
114
|
+
readonly "32": "8rem";
|
|
115
|
+
readonly "36": "9rem";
|
|
116
|
+
readonly "40": "10rem";
|
|
117
|
+
readonly "44": "11rem";
|
|
118
|
+
readonly "48": "12rem";
|
|
119
|
+
readonly "52": "13rem";
|
|
120
|
+
readonly "56": "14rem";
|
|
121
|
+
readonly "60": "15rem";
|
|
122
|
+
readonly "64": "16rem";
|
|
123
|
+
readonly "72": "18rem";
|
|
124
|
+
readonly "80": "20rem";
|
|
125
|
+
readonly "96": "24rem";
|
|
126
|
+
readonly px: "1px";
|
|
127
|
+
readonly "0.5": "0.125rem";
|
|
128
|
+
readonly "1.5": "0.375rem";
|
|
129
|
+
readonly "2.5": "0.625rem";
|
|
130
|
+
readonly "3.5": "0.875rem";
|
|
131
|
+
};
|
|
132
|
+
export declare const maxWidth: {
|
|
133
|
+
readonly "0": "0rem";
|
|
134
|
+
readonly xs: "20rem";
|
|
135
|
+
readonly sm: "24rem";
|
|
136
|
+
readonly md: "28rem";
|
|
137
|
+
readonly lg: "32rem";
|
|
138
|
+
readonly xl: "36rem";
|
|
139
|
+
readonly prose: "65ch";
|
|
140
|
+
};
|
|
141
|
+
export declare const borderWidth: {
|
|
142
|
+
"0": string;
|
|
143
|
+
"2": string;
|
|
144
|
+
"4": string;
|
|
145
|
+
"8": string;
|
|
146
|
+
DEFAULT: string;
|
|
147
|
+
};
|
|
148
|
+
export declare const borderRadius: {
|
|
149
|
+
readonly sm: "0.125rem";
|
|
150
|
+
readonly md: "0.375rem";
|
|
151
|
+
readonly full: "9999px";
|
|
152
|
+
};
|
|
153
|
+
export declare const colors: {
|
|
154
|
+
readonly transparent: "transparent";
|
|
155
|
+
readonly current: "currentColor";
|
|
156
|
+
readonly inherit: "inherit";
|
|
157
|
+
readonly popover: "rgb(255, 255, 255)";
|
|
158
|
+
readonly popoverForeground: "rgb(2, 8, 23)";
|
|
159
|
+
readonly border: "rgb(226, 232, 240)";
|
|
160
|
+
readonly background: "rgb(255, 255, 255)";
|
|
161
|
+
readonly foreground: "hsl(222.2 84% 4.9%)";
|
|
162
|
+
readonly ring: "rgb(148, 163, 184)";
|
|
163
|
+
readonly mutedForeground: "rgb(100, 116, 139)";
|
|
164
|
+
readonly muted: "hsl(210 40% 96.1%)";
|
|
165
|
+
readonly primary: "rgb(15, 23, 42)";
|
|
166
|
+
readonly primaryForeground: "hsl(210 40% 98%)";
|
|
167
|
+
readonly destructive: "rgb(239, 68, 68)";
|
|
168
|
+
readonly destructiveForeground: "rgb(248, 250, 252)";
|
|
169
|
+
readonly accent: "rgb(241, 245, 249)";
|
|
170
|
+
readonly accentForeground: "rgb(15, 23, 42)";
|
|
171
|
+
readonly input: "rgb(226, 232, 240)";
|
|
172
|
+
readonly secondary: "rgb(241, 245, 249)";
|
|
173
|
+
readonly secondaryForeground: "rgb(15, 23, 42)";
|
|
174
|
+
};
|
|
175
|
+
export declare const transition: {
|
|
176
|
+
readonly all: "all 150ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
177
|
+
readonly transform: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1)";
|
|
178
|
+
};
|
|
179
|
+
export declare const opacity: {
|
|
180
|
+
readonly "0": "0";
|
|
181
|
+
readonly "5": "0.05";
|
|
182
|
+
readonly "10": "0.1";
|
|
183
|
+
readonly "20": "0.2";
|
|
184
|
+
readonly "25": "0.25";
|
|
185
|
+
readonly "30": "0.3";
|
|
186
|
+
readonly "40": "0.4";
|
|
187
|
+
readonly "50": "0.5";
|
|
188
|
+
readonly "60": "0.6";
|
|
189
|
+
readonly "70": "0.7";
|
|
190
|
+
readonly "75": "0.75";
|
|
191
|
+
readonly "80": "0.8";
|
|
192
|
+
readonly "90": "0.9";
|
|
193
|
+
readonly "95": "0.95";
|
|
194
|
+
readonly "100": "1";
|
|
195
|
+
};
|
|
196
|
+
export declare const boxShadow: {
|
|
197
|
+
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
198
|
+
readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
199
|
+
readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
200
|
+
readonly ring: string;
|
|
201
|
+
};
|
|
202
|
+
export declare const zIndex: {
|
|
203
|
+
readonly "0": "0";
|
|
204
|
+
readonly "10": "10";
|
|
205
|
+
readonly "20": "20";
|
|
206
|
+
readonly "30": "30";
|
|
207
|
+
readonly "40": "40";
|
|
208
|
+
readonly "50": "50";
|
|
209
|
+
};
|
|
210
|
+
export declare const blur: {
|
|
211
|
+
sm: string;
|
|
212
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TemplateMeta } from "@webstudio-is/template";
|
|
2
2
|
/**
|
|
3
3
|
* Styles source without animations:
|
|
4
4
|
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/sheet.tsx
|
|
@@ -7,4 +7,4 @@ import type { WsComponentMeta } from "@webstudio-is/react-sdk";
|
|
|
7
7
|
* MIT License
|
|
8
8
|
* Copyright (c) 2023 shadcn
|
|
9
9
|
**/
|
|
10
|
-
export declare const meta:
|
|
10
|
+
export declare const meta: TemplateMeta;
|
package/lib/types/switch.ws.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
2
|
export declare const metaSwitch: WsComponentMeta;
|
|
3
3
|
export declare const metaSwitchThumb: WsComponentMeta;
|
|
4
4
|
export declare const propsMetaSwitch: WsComponentPropsMeta;
|
package/lib/types/tabs.ws.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
2
|
export declare const metaTabs: WsComponentMeta;
|
|
3
3
|
export declare const metaTabsList: WsComponentMeta;
|
|
4
4
|
export declare const metaTabsTrigger: WsComponentMeta;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { meta as Label } from "./label.template";
|
|
2
|
+
export { meta as Tabs } from "./tabs.template";
|
|
3
|
+
export { meta as Sheet } from "./sheet.template";
|
|
4
|
+
export { meta as Dialog } from "./dialog.template";
|
|
5
|
+
export { meta as Switch } from "./switch.template";
|
|
6
|
+
export { meta as Checkbox } from "./checkbox.template";
|
|
7
|
+
export { meta as Collapsible } from "./collapsible.template";
|
|
8
|
+
export { meta as Accordion } from "./accordion.template";
|
|
9
|
+
export { meta as Tooltip } from "./tooltip.template";
|
|
10
|
+
export { meta as Popover } from "./popover.template";
|
|
11
|
+
export { meta as RadioGroup } from "./radio-group.template";
|
|
12
|
+
export { meta as Select } from "./select.template";
|
|
13
|
+
export { meta as NavigationMenu } from "./navigation-menu.template";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TemplateMeta } from "@webstudio-is/template";
|
|
2
|
+
/**
|
|
3
|
+
* Styles source without animations:
|
|
4
|
+
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/tooltip.tsx
|
|
5
|
+
*
|
|
6
|
+
* Attributions
|
|
7
|
+
* MIT License
|
|
8
|
+
* Copyright (c) 2023 shadcn
|
|
9
|
+
**/
|
|
10
|
+
export declare const meta: TemplateMeta;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
2
|
export declare const metaTooltipTrigger: WsComponentMeta;
|
|
3
3
|
export declare const metaTooltipContent: WsComponentMeta;
|
|
4
|
-
/**
|
|
5
|
-
* Styles source without animations:
|
|
6
|
-
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/tooltip.tsx
|
|
7
|
-
*
|
|
8
|
-
* Attributions
|
|
9
|
-
* MIT License
|
|
10
|
-
* Copyright (c) 2023 shadcn
|
|
11
|
-
**/
|
|
12
4
|
export declare const metaTooltip: WsComponentMeta;
|
|
13
5
|
export declare const propsMetaTooltip: WsComponentPropsMeta;
|
|
14
6
|
export declare const propsMetaTooltipTrigger: WsComponentPropsMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react-radix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.197.0",
|
|
4
4
|
"description": "Webstudio wrapper for radix library",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"webstudio": "./src/hooks.ts",
|
|
33
33
|
"types": "./lib/types/hooks.d.ts",
|
|
34
34
|
"import": "./lib/hooks.js"
|
|
35
|
+
},
|
|
36
|
+
"./templates": {
|
|
37
|
+
"webstudio": "./src/templates.ts",
|
|
38
|
+
"types": "./lib/types/templates.d.ts",
|
|
39
|
+
"import": "./lib/templates.js"
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
"peerDependencies": {
|
|
@@ -39,42 +44,40 @@
|
|
|
39
44
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
40
45
|
},
|
|
41
46
|
"dependencies": {
|
|
42
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
43
|
-
"@radix-ui/react-checkbox": "^1.1.
|
|
44
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
45
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
46
|
-
"@radix-ui/react-label": "^2.1.
|
|
47
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
48
|
-
"@radix-ui/react-popover": "^1.1.
|
|
49
|
-
"@radix-ui/react-radio-group": "^1.2.
|
|
50
|
-
"@radix-ui/react-select": "^2.1.
|
|
51
|
-
"@radix-ui/react-switch": "^1.1.
|
|
52
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
53
|
-
"@radix-ui/react-tooltip": "^1.1.
|
|
47
|
+
"@radix-ui/react-accordion": "^1.2.2",
|
|
48
|
+
"@radix-ui/react-checkbox": "^1.1.3",
|
|
49
|
+
"@radix-ui/react-collapsible": "^1.1.2",
|
|
50
|
+
"@radix-ui/react-dialog": "^1.1.4",
|
|
51
|
+
"@radix-ui/react-label": "^2.1.1",
|
|
52
|
+
"@radix-ui/react-navigation-menu": "^1.2.3",
|
|
53
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
54
|
+
"@radix-ui/react-radio-group": "^1.2.2",
|
|
55
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
56
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
57
|
+
"@radix-ui/react-tabs": "^1.1.2",
|
|
58
|
+
"@radix-ui/react-tooltip": "^1.1.6",
|
|
54
59
|
"@radix-ui/react-use-controllable-state": "^1.1.0",
|
|
55
60
|
"await-interaction-response": "^0.0.2",
|
|
56
|
-
"@webstudio-is/
|
|
57
|
-
"@webstudio-is/
|
|
58
|
-
"@webstudio-is/
|
|
59
|
-
"@webstudio-is/sdk": "0.
|
|
61
|
+
"@webstudio-is/css-engine": "0.197.0",
|
|
62
|
+
"@webstudio-is/icons": "0.197.0",
|
|
63
|
+
"@webstudio-is/react-sdk": "0.197.0",
|
|
64
|
+
"@webstudio-is/sdk": "0.197.0"
|
|
60
65
|
},
|
|
61
66
|
"devDependencies": {
|
|
62
|
-
"@types/node": "^22.9.3",
|
|
63
67
|
"@types/react": "^18.2.70",
|
|
64
68
|
"@types/react-dom": "^18.2.25",
|
|
65
69
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
66
70
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
67
|
-
"tailwindcss": "^3.3.3",
|
|
68
71
|
"@webstudio-is/css-data": "0.0.0",
|
|
69
72
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
70
73
|
"@webstudio-is/sdk-cli": "^0.94.0",
|
|
71
|
-
"@webstudio-is/
|
|
72
|
-
"@webstudio-is/
|
|
74
|
+
"@webstudio-is/sdk-components-react": "0.197.0",
|
|
75
|
+
"@webstudio-is/template": "0.197.0",
|
|
76
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
73
77
|
},
|
|
74
78
|
"scripts": {
|
|
75
79
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|
|
76
|
-
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts !./src/*.test.{ts,tsx}' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
|
|
77
|
-
"build:tailwind": "tsx scripts/generate-tailwind-theme.ts && prettier --write src/theme/__generated__",
|
|
80
|
+
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts !./src/*.template.tsx !./src/*.test.{ts,tsx}' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
|
|
78
81
|
"build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
|
|
79
82
|
"dts": "tsc --project tsconfig.dts.json",
|
|
80
83
|
"typecheck": "tsc"
|
package/lib/sheet.ws.js
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { HamburgerMenuIcon as o, LargeXIcon as p } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { fixed as m, inset as g, z as l, bg as t, backdropBlur as d, flex as e, overflow as y, w as a, gap as r, border as i, p as u, shadow as h, relative as b, mr as f, maxW as v, grow as x, my as c, leading as S, text as n, tracking as D, absolute as T, right as B, top as k, rounded as C, opacity as s, items as H, justify as w, h as I, outline as E, hover as M, focus as O, ring as j } from "./theme/tailwind-classes.js";
|
|
3
|
-
import { getButtonStyles as z } from "./theme/styles.js";
|
|
4
|
-
const U = {
|
|
5
|
-
category: "radix",
|
|
6
|
-
order: 1,
|
|
7
|
-
type: "container",
|
|
8
|
-
icon: o,
|
|
9
|
-
stylable: !1,
|
|
10
|
-
description: "Displays content in a menu that slides out from the side of the screen, triggered by a button. Use this component for a typical mobile hamburger menu.",
|
|
11
|
-
template: [
|
|
12
|
-
{
|
|
13
|
-
type: "instance",
|
|
14
|
-
component: "Dialog",
|
|
15
|
-
label: "Sheet",
|
|
16
|
-
props: [],
|
|
17
|
-
children: [
|
|
18
|
-
{
|
|
19
|
-
type: "instance",
|
|
20
|
-
component: "DialogTrigger",
|
|
21
|
-
label: "Sheet Trigger",
|
|
22
|
-
children: [
|
|
23
|
-
{
|
|
24
|
-
type: "instance",
|
|
25
|
-
component: "Button",
|
|
26
|
-
styles: z("ghost", "icon"),
|
|
27
|
-
children: [
|
|
28
|
-
{
|
|
29
|
-
type: "instance",
|
|
30
|
-
component: "HtmlEmbed",
|
|
31
|
-
label: "Hamburger Menu Svg",
|
|
32
|
-
props: [
|
|
33
|
-
{
|
|
34
|
-
type: "string",
|
|
35
|
-
name: "code",
|
|
36
|
-
value: o
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
children: []
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: "instance",
|
|
47
|
-
component: "DialogOverlay",
|
|
48
|
-
label: "Sheet Overlay",
|
|
49
|
-
/**
|
|
50
|
-
* fixed inset-0 z-50 bg-background/80 backdrop-blur-sm
|
|
51
|
-
* flex
|
|
52
|
-
**/
|
|
53
|
-
styles: [
|
|
54
|
-
m(),
|
|
55
|
-
g(0),
|
|
56
|
-
l(50),
|
|
57
|
-
t("background", 80),
|
|
58
|
-
d("sm"),
|
|
59
|
-
// To allow positioning Content
|
|
60
|
-
e(),
|
|
61
|
-
e("col"),
|
|
62
|
-
y("auto")
|
|
63
|
-
].flat(),
|
|
64
|
-
children: [
|
|
65
|
-
{
|
|
66
|
-
type: "instance",
|
|
67
|
-
component: "DialogContent",
|
|
68
|
-
label: "Sheet Content",
|
|
69
|
-
/**
|
|
70
|
-
* fixed w-full z-50
|
|
71
|
-
* grid gap-4 max-w-lg
|
|
72
|
-
* m-auto
|
|
73
|
-
* border bg-background p-6 shadow-lg
|
|
74
|
-
**/
|
|
75
|
-
styles: [
|
|
76
|
-
a("full"),
|
|
77
|
-
l(50),
|
|
78
|
-
e(),
|
|
79
|
-
e("col"),
|
|
80
|
-
r(4),
|
|
81
|
-
i(),
|
|
82
|
-
t("background"),
|
|
83
|
-
u(6),
|
|
84
|
-
h("lg"),
|
|
85
|
-
b(),
|
|
86
|
-
// side=left
|
|
87
|
-
f("auto"),
|
|
88
|
-
v("sm"),
|
|
89
|
-
x()
|
|
90
|
-
].flat(),
|
|
91
|
-
children: [
|
|
92
|
-
{
|
|
93
|
-
type: "instance",
|
|
94
|
-
component: "Box",
|
|
95
|
-
label: "Navigation",
|
|
96
|
-
props: [
|
|
97
|
-
{ name: "tag", type: "string", value: "nav" },
|
|
98
|
-
{ name: "role", type: "string", value: "navigation" }
|
|
99
|
-
],
|
|
100
|
-
children: [
|
|
101
|
-
{
|
|
102
|
-
type: "instance",
|
|
103
|
-
component: "Box",
|
|
104
|
-
label: "Sheet Header",
|
|
105
|
-
styles: [e(), e("col"), r(1)].flat(),
|
|
106
|
-
children: [
|
|
107
|
-
{
|
|
108
|
-
type: "instance",
|
|
109
|
-
component: "DialogTitle",
|
|
110
|
-
label: "Sheet Title",
|
|
111
|
-
/**
|
|
112
|
-
* text-lg leading-none tracking-tight
|
|
113
|
-
**/
|
|
114
|
-
styles: [
|
|
115
|
-
c(0),
|
|
116
|
-
S("none"),
|
|
117
|
-
n("lg"),
|
|
118
|
-
D("tight")
|
|
119
|
-
].flat(),
|
|
120
|
-
children: [
|
|
121
|
-
{
|
|
122
|
-
type: "text",
|
|
123
|
-
value: "Sheet Title",
|
|
124
|
-
placeholder: !0
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
type: "instance",
|
|
130
|
-
component: "DialogDescription",
|
|
131
|
-
label: "Sheet Description",
|
|
132
|
-
/**
|
|
133
|
-
* text-sm text-muted-foreground
|
|
134
|
-
**/
|
|
135
|
-
styles: [
|
|
136
|
-
c(0),
|
|
137
|
-
n("sm"),
|
|
138
|
-
n("mutedForeground")
|
|
139
|
-
].flat(),
|
|
140
|
-
children: [
|
|
141
|
-
{
|
|
142
|
-
type: "text",
|
|
143
|
-
value: "Sheet description text you can edit",
|
|
144
|
-
placeholder: !0
|
|
145
|
-
}
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
type: "instance",
|
|
152
|
-
component: "Text",
|
|
153
|
-
children: [
|
|
154
|
-
{
|
|
155
|
-
type: "text",
|
|
156
|
-
value: "The text you can edit",
|
|
157
|
-
placeholder: !0
|
|
158
|
-
}
|
|
159
|
-
]
|
|
160
|
-
}
|
|
161
|
-
]
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
type: "instance",
|
|
165
|
-
component: "DialogClose",
|
|
166
|
-
label: "Close Button",
|
|
167
|
-
/**
|
|
168
|
-
* absolute right-4 top-4
|
|
169
|
-
* rounded-sm opacity-70
|
|
170
|
-
* ring-offset-background
|
|
171
|
-
* hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
|
|
172
|
-
* flex items-center justify-center h-4 w-4
|
|
173
|
-
**/
|
|
174
|
-
styles: [
|
|
175
|
-
T(),
|
|
176
|
-
B(4),
|
|
177
|
-
k(4),
|
|
178
|
-
C("sm"),
|
|
179
|
-
s(70),
|
|
180
|
-
e(),
|
|
181
|
-
H("center"),
|
|
182
|
-
w("center"),
|
|
183
|
-
I(4),
|
|
184
|
-
a(4),
|
|
185
|
-
i(0),
|
|
186
|
-
t("transparent"),
|
|
187
|
-
E(),
|
|
188
|
-
M(s(100)),
|
|
189
|
-
O(j("ring", 2, "background", 2))
|
|
190
|
-
].flat(),
|
|
191
|
-
children: [
|
|
192
|
-
{
|
|
193
|
-
type: "instance",
|
|
194
|
-
component: "HtmlEmbed",
|
|
195
|
-
label: "Close Icon",
|
|
196
|
-
props: [
|
|
197
|
-
{
|
|
198
|
-
type: "string",
|
|
199
|
-
name: "code",
|
|
200
|
-
value: p
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
children: []
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
};
|
|
215
|
-
export {
|
|
216
|
-
U as meta
|
|
217
|
-
};
|