@webstudio-is/sdk-components-react-radix 0.87.0 → 0.88.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.
Files changed (182) hide show
  1. package/lib/__generated__/accordion.props.js +0 -5
  2. package/lib/__generated__/button.props.js +0 -21
  3. package/lib/__generated__/checkbox.props.js +850 -0
  4. package/lib/__generated__/collapsible.props.js +0 -2
  5. package/lib/__generated__/dialog.props.js +0 -11
  6. package/lib/__generated__/label.props.js +0 -1
  7. package/lib/__generated__/navigation-menu.props.js +2104 -0
  8. package/lib/__generated__/popover.props.js +0 -3
  9. package/lib/__generated__/radio-group.props.js +1282 -0
  10. package/lib/__generated__/select.props.js +2962 -0
  11. package/lib/__generated__/sheet.props.js +0 -11
  12. package/lib/__generated__/switch.props.js +850 -0
  13. package/lib/__generated__/tabs.props.js +428 -5
  14. package/lib/__generated__/tooltip.props.js +0 -2
  15. package/lib/accordion.js +11 -4
  16. package/lib/accordion.ws.js +87 -72
  17. package/lib/checkbox.js +13 -0
  18. package/lib/checkbox.ws.js +151 -0
  19. package/lib/cjs/__generated__/accordion.props.js +0 -5
  20. package/lib/cjs/__generated__/button.props.js +0 -21
  21. package/lib/cjs/__generated__/checkbox.props.js +870 -0
  22. package/lib/cjs/__generated__/collapsible.props.js +0 -2
  23. package/lib/cjs/__generated__/dialog.props.js +0 -11
  24. package/lib/cjs/__generated__/label.props.js +0 -1
  25. package/lib/cjs/__generated__/navigation-menu.props.js +2124 -0
  26. package/lib/cjs/__generated__/popover.props.js +0 -3
  27. package/lib/cjs/__generated__/radio-group.props.js +1302 -0
  28. package/lib/cjs/__generated__/select.props.js +2982 -0
  29. package/lib/cjs/__generated__/sheet.props.js +0 -11
  30. package/lib/cjs/__generated__/switch.props.js +870 -0
  31. package/lib/cjs/__generated__/tabs.props.js +428 -5
  32. package/lib/cjs/__generated__/tooltip.props.js +0 -2
  33. package/lib/cjs/accordion.js +11 -4
  34. package/lib/cjs/accordion.ws.js +85 -71
  35. package/lib/cjs/{textarea.js → checkbox.js} +9 -6
  36. package/lib/cjs/checkbox.ws.js +172 -0
  37. package/lib/cjs/collapsible.ws.js +4 -1
  38. package/lib/cjs/components.js +27 -14
  39. package/lib/cjs/dialog.ws.js +17 -17
  40. package/lib/cjs/hooks.js +5 -1
  41. package/lib/cjs/label.ws.js +1 -1
  42. package/lib/cjs/metas.js +29 -14
  43. package/lib/cjs/navigation-menu.js +107 -0
  44. package/lib/cjs/navigation-menu.ws.js +513 -0
  45. package/lib/cjs/popover.ws.js +12 -9
  46. package/lib/cjs/props.js +27 -14
  47. package/lib/cjs/{button.js → radio-group.js} +10 -8
  48. package/lib/cjs/radio-group.ws.js +188 -0
  49. package/lib/cjs/select.js +81 -0
  50. package/lib/cjs/select.ws.js +349 -0
  51. package/lib/cjs/sheet.ws.js +87 -176
  52. package/lib/cjs/{input.js → switch.js} +8 -9
  53. package/lib/cjs/switch.ws.js +171 -0
  54. package/lib/cjs/tabs.js +2 -3
  55. package/lib/cjs/tabs.ws.js +13 -18
  56. package/lib/cjs/theme/styles.js +100 -0
  57. package/lib/cjs/theme/tailwind-classes.js +125 -16
  58. package/lib/cjs/theme/tailwind-colors.js +1 -0
  59. package/lib/cjs/tooltip.ws.js +11 -8
  60. package/lib/collapsible.ws.js +4 -1
  61. package/lib/components.js +44 -22
  62. package/lib/dialog.ws.js +17 -17
  63. package/lib/hooks.js +5 -1
  64. package/lib/label.ws.js +1 -1
  65. package/lib/metas.js +58 -24
  66. package/lib/navigation-menu.js +85 -0
  67. package/lib/navigation-menu.ws.js +500 -0
  68. package/lib/popover.ws.js +12 -9
  69. package/lib/props.js +56 -24
  70. package/lib/radio-group.js +11 -0
  71. package/lib/radio-group.ws.js +170 -0
  72. package/lib/select.js +73 -0
  73. package/lib/select.ws.js +337 -0
  74. package/lib/sheet.ws.js +88 -194
  75. package/lib/switch.js +7 -0
  76. package/lib/switch.ws.js +143 -0
  77. package/lib/tabs.js +3 -5
  78. package/lib/tabs.ws.js +14 -19
  79. package/lib/theme/styles.js +70 -0
  80. package/lib/theme/tailwind-classes.js +125 -16
  81. package/lib/theme/tailwind-colors.js +1 -0
  82. package/lib/tooltip.ws.js +11 -8
  83. package/lib/types/__generated__/checkbox.props.d.ts +3 -0
  84. package/lib/types/__generated__/navigation-menu.props.d.ts +8 -0
  85. package/lib/types/__generated__/radio-group.props.d.ts +4 -0
  86. package/lib/types/__generated__/select.props.d.ts +9 -0
  87. package/lib/types/__generated__/switch.props.d.ts +3 -0
  88. package/lib/types/checkbox.d.ts +6 -0
  89. package/lib/types/checkbox.stories.d.ts +11 -0
  90. package/lib/types/checkbox.ws.d.ts +5 -0
  91. package/lib/types/components.d.ts +5 -4
  92. package/lib/types/metas.d.ts +6 -4
  93. package/lib/types/navigation-menu.d.ts +15 -0
  94. package/lib/types/navigation-menu.ws.d.ts +15 -0
  95. package/lib/types/props.d.ts +5 -4
  96. package/lib/types/radio-group.d.ts +5 -0
  97. package/lib/types/radio-group.stories.d.ts +9 -0
  98. package/lib/types/radio-group.ws.d.ts +7 -0
  99. package/lib/types/select.d.ts +12 -0
  100. package/lib/types/select.ws.d.ts +17 -0
  101. package/lib/types/sheet.ws.d.ts +2 -15
  102. package/lib/types/switch.d.ts +4 -0
  103. package/lib/types/switch.stories.d.ts +9 -0
  104. package/lib/types/switch.ws.d.ts +5 -0
  105. package/lib/types/tabs.d.ts +3 -12
  106. package/lib/types/theme/radix-common-types.d.ts +3 -2
  107. package/lib/types/theme/styles.d.ts +215 -0
  108. package/lib/types/theme/tailwind-classes.d.ts +16 -6
  109. package/lib/types/theme/tailwind-colors.d.ts +1 -0
  110. package/lib/types/theme/tailwind-theme.d.ts +1 -1
  111. package/package.json +12 -7
  112. package/src/__generated__/accordion.props.ts +0 -5
  113. package/src/__generated__/button.props.ts +0 -21
  114. package/src/__generated__/checkbox.props.ts +948 -0
  115. package/src/__generated__/collapsible.props.ts +0 -2
  116. package/src/__generated__/dialog.props.ts +0 -11
  117. package/src/__generated__/label.props.ts +0 -1
  118. package/src/__generated__/navigation-menu.props.ts +2349 -0
  119. package/src/__generated__/popover.props.ts +0 -3
  120. package/src/__generated__/radio-group.props.ts +1429 -0
  121. package/src/__generated__/select.props.ts +3304 -0
  122. package/src/__generated__/sheet.props.ts +0 -11
  123. package/src/__generated__/switch.props.ts +948 -0
  124. package/src/__generated__/tabs.props.ts +477 -4
  125. package/src/__generated__/tooltip.props.ts +0 -2
  126. package/src/accordion.tsx +14 -7
  127. package/src/accordion.ws.ts +85 -70
  128. package/src/{textarea.stories.ts → checkbox.stories.ts} +6 -11
  129. package/src/checkbox.tsx +22 -0
  130. package/src/checkbox.ws.ts +151 -0
  131. package/src/collapsible.ws.ts +4 -1
  132. package/src/components.ts +25 -12
  133. package/src/dialog.ws.tsx +15 -16
  134. package/src/hooks.ts +4 -0
  135. package/src/label.ws.ts +1 -1
  136. package/src/metas.ts +36 -12
  137. package/src/navigation-menu.stories.tsx +21 -0
  138. package/src/navigation-menu.tsx +130 -0
  139. package/src/navigation-menu.ws.ts +523 -0
  140. package/src/popover.ws.tsx +12 -9
  141. package/src/props.ts +35 -12
  142. package/src/{input.stories.ts → radio-group.stories.ts} +6 -15
  143. package/src/radio-group.tsx +17 -0
  144. package/src/radio-group.ws.ts +174 -0
  145. package/src/select.stories.tsx +21 -0
  146. package/src/select.tsx +107 -0
  147. package/src/select.ws.ts +347 -0
  148. package/src/sheet.ws.tsx +89 -209
  149. package/src/{button.stories.ts → switch.stories.ts} +6 -19
  150. package/src/switch.tsx +10 -0
  151. package/src/switch.ws.ts +143 -0
  152. package/src/tabs.tsx +4 -17
  153. package/src/tabs.ws.ts +17 -19
  154. package/src/theme/radix-common-types.ts +3 -2
  155. package/src/theme/styles.ts +80 -0
  156. package/src/theme/tailwind-classes.ts +150 -14
  157. package/src/theme/tailwind-colors.ts +1 -0
  158. package/src/tooltip.ws.tsx +11 -8
  159. package/lib/button.js +0 -8
  160. package/lib/button.ws.js +0 -133
  161. package/lib/cjs/button.ws.js +0 -160
  162. package/lib/cjs/input.ws.js +0 -103
  163. package/lib/cjs/textarea.ws.js +0 -98
  164. package/lib/input.js +0 -8
  165. package/lib/input.ws.js +0 -75
  166. package/lib/textarea.js +0 -8
  167. package/lib/textarea.ws.js +0 -70
  168. package/lib/types/button.d.ts +0 -7
  169. package/lib/types/button.stories.d.ts +0 -20
  170. package/lib/types/button.ws.d.ts +0 -7
  171. package/lib/types/input.d.ts +0 -2
  172. package/lib/types/input.stories.d.ts +0 -20
  173. package/lib/types/input.ws.d.ts +0 -3
  174. package/lib/types/textarea.d.ts +0 -2
  175. package/lib/types/textarea.stories.d.ts +0 -14
  176. package/lib/types/textarea.ws.d.ts +0 -3
  177. package/src/button.tsx +0 -25
  178. package/src/button.ws.ts +0 -155
  179. package/src/input.tsx +0 -12
  180. package/src/input.ws.ts +0 -78
  181. package/src/textarea.tsx +0 -12
  182. package/src/textarea.ws.ts +0 -74
@@ -43,22 +43,77 @@ module.exports = __toCommonJS(accordion_ws_exports);
43
43
  var import_svg = require("@webstudio-is/icons/svg");
44
44
  var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
45
45
  var tc = __toESM(require("./theme/tailwind-classes"), 1);
46
+ var import_styles = require("./theme/styles");
46
47
  var import_accordion = require("./__generated__/accordion.props");
47
48
  const presetStyle = {
48
49
  div: import_css_normalize.div
49
50
  };
50
51
  const accordionItemStyles = [tc.borderB()].flat();
51
- const accordionHeaderStyles = [tc.flex()].flat();
52
- const accordionTriggerStyles = [
53
- tc.flex(),
54
- tc.flex(1),
55
- tc.items("center"),
56
- tc.justify("between"),
57
- tc.py(4),
58
- tc.font("medium"),
59
- tc.transition("all"),
60
- tc.hover([tc.underline()].flat())
61
- ].flat();
52
+ const createAccordionTrigger = ({
53
+ children
54
+ }) => ({
55
+ type: "instance",
56
+ component: "AccordionHeader",
57
+ // flex
58
+ styles: [tc.flex()].flat(),
59
+ children: [
60
+ {
61
+ type: "instance",
62
+ component: "AccordionTrigger",
63
+ // flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180
64
+ styles: [
65
+ tc.flex(),
66
+ tc.flex(1),
67
+ tc.items("center"),
68
+ tc.justify("between"),
69
+ tc.py(4),
70
+ tc.font("medium"),
71
+ tc.hover([tc.underline()].flat()),
72
+ tc.property("--accordion-trigger-icon-transform", "0deg"),
73
+ tc.state(
74
+ [tc.property("--accordion-trigger-icon-transform", "180deg")],
75
+ "[data-state=open]"
76
+ )
77
+ ].flat(),
78
+ children: [
79
+ {
80
+ type: "instance",
81
+ component: "Text",
82
+ children
83
+ },
84
+ {
85
+ type: "instance",
86
+ component: "Box",
87
+ label: "Icon Container",
88
+ // h-4 w-4 shrink-0 transition-transform duration-200
89
+ styles: [
90
+ tc.property("rotate", "--accordion-trigger-icon-transform"),
91
+ tc.h(4),
92
+ tc.w(4),
93
+ tc.shrink(0),
94
+ tc.transition("all"),
95
+ tc.duration(200)
96
+ ].flat(),
97
+ children: [
98
+ {
99
+ type: "instance",
100
+ component: "HtmlEmbed",
101
+ label: "Chevron Icon",
102
+ props: [
103
+ {
104
+ type: "string",
105
+ name: "code",
106
+ value: import_svg.ChevronDownIcon
107
+ }
108
+ ],
109
+ children: []
110
+ }
111
+ ]
112
+ }
113
+ ]
114
+ }
115
+ ]
116
+ });
62
117
  const accordionContentStyles = [
63
118
  tc.overflow("hidden"),
64
119
  tc.text("sm"),
@@ -68,6 +123,7 @@ const accordionContentStyles = [
68
123
  ].flat();
69
124
  const metaAccordion = {
70
125
  category: "radix",
126
+ order: 3,
71
127
  type: "container",
72
128
  icon: import_svg.AccordionIcon,
73
129
  presetStyle,
@@ -99,19 +155,9 @@ const metaAccordion = {
99
155
  component: "AccordionItem",
100
156
  styles: accordionItemStyles,
101
157
  children: [
102
- {
103
- type: "instance",
104
- component: "AccordionHeader",
105
- styles: accordionHeaderStyles,
106
- children: [
107
- {
108
- type: "instance",
109
- component: "AccordionTrigger",
110
- styles: accordionTriggerStyles,
111
- children: [{ type: "text", value: "Is it accessible?" }]
112
- }
113
- ]
114
- },
158
+ createAccordionTrigger({
159
+ children: [{ type: "text", value: "Is it accessible?" }]
160
+ }),
115
161
  {
116
162
  type: "instance",
117
163
  component: "AccordionContent",
@@ -130,19 +176,9 @@ const metaAccordion = {
130
176
  component: "AccordionItem",
131
177
  styles: accordionItemStyles,
132
178
  children: [
133
- {
134
- type: "instance",
135
- component: "AccordionHeader",
136
- styles: accordionHeaderStyles,
137
- children: [
138
- {
139
- type: "instance",
140
- component: "AccordionTrigger",
141
- styles: accordionTriggerStyles,
142
- children: [{ type: "text", value: "Is it styled?" }]
143
- }
144
- ]
145
- },
179
+ createAccordionTrigger({
180
+ children: [{ type: "text", value: "Is it styled?" }]
181
+ }),
146
182
  {
147
183
  type: "instance",
148
184
  component: "AccordionContent",
@@ -161,19 +197,9 @@ const metaAccordion = {
161
197
  component: "AccordionItem",
162
198
  styles: accordionItemStyles,
163
199
  children: [
164
- {
165
- type: "instance",
166
- component: "AccordionHeader",
167
- styles: accordionHeaderStyles,
168
- children: [
169
- {
170
- type: "instance",
171
- component: "AccordionTrigger",
172
- styles: accordionTriggerStyles,
173
- children: [{ type: "text", value: "Is it animated?" }]
174
- }
175
- ]
176
- },
200
+ createAccordionTrigger({
201
+ children: [{ type: "text", value: "Is it animated?" }]
202
+ }),
177
203
  {
178
204
  type: "instance",
179
205
  component: "AccordionContent",
@@ -197,7 +223,8 @@ const metaAccordionItem = {
197
223
  icon: import_svg.ItemIcon,
198
224
  requiredAncestors: ["Accordion"],
199
225
  indexWithinAncestor: "Accordion",
200
- presetStyle
226
+ presetStyle,
227
+ label: "Item"
201
228
  };
202
229
  const metaAccordionHeader = {
203
230
  category: "hidden",
@@ -207,7 +234,8 @@ const metaAccordionHeader = {
207
234
  detachable: false,
208
235
  presetStyle: {
209
236
  h3: [import_css_normalize.h3, tc.my(0)].flat()
210
- }
237
+ },
238
+ label: "Item Header"
211
239
  };
212
240
  const metaAccordionTrigger = {
213
241
  category: "hidden",
@@ -216,24 +244,9 @@ const metaAccordionTrigger = {
216
244
  requiredAncestors: ["AccordionHeader"],
217
245
  detachable: false,
218
246
  presetStyle: {
219
- button: [
220
- import_css_normalize.button,
221
- {
222
- property: "backgroundColor",
223
- value: { type: "keyword", value: "transparent" }
224
- },
225
- {
226
- property: "backgroundImage",
227
- value: { type: "keyword", value: "none" }
228
- },
229
- {
230
- property: "cursor",
231
- value: { type: "keyword", value: "pointer" }
232
- },
233
- tc.px(0),
234
- tc.border(0)
235
- ].flat()
236
- }
247
+ button: [import_css_normalize.button, import_styles.buttonReset].flat()
248
+ },
249
+ label: "Item Trigger"
237
250
  };
238
251
  const metaAccordionContent = {
239
252
  category: "hidden",
@@ -241,7 +254,8 @@ const metaAccordionContent = {
241
254
  icon: import_svg.ContentIcon,
242
255
  requiredAncestors: ["AccordionItem"],
243
256
  detachable: false,
244
- presetStyle
257
+ presetStyle,
258
+ label: "Item Content"
245
259
  };
246
260
  const propsMetaAccordion = {
247
261
  props: import_accordion.propsAccordion,
@@ -16,13 +16,16 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var textarea_exports = {};
20
- __export(textarea_exports, {
21
- Textarea: () => Textarea
19
+ var checkbox_exports = {};
20
+ __export(checkbox_exports, {
21
+ Checkbox: () => Checkbox,
22
+ CheckboxIndicator: () => CheckboxIndicator
22
23
  });
23
- module.exports = __toCommonJS(textarea_exports);
24
+ module.exports = __toCommonJS(checkbox_exports);
24
25
  var import_jsx_runtime = require("react/jsx-runtime");
25
26
  var import_react = require("react");
26
- const Textarea = (0, import_react.forwardRef)(({ children: _children, ...props }, ref) => {
27
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { ref, ...props });
27
+ var import_react_checkbox = require("@radix-ui/react-checkbox");
28
+ const Checkbox = (0, import_react.forwardRef)((props, ref) => {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_checkbox.Root, { ref, ...props });
28
30
  });
31
+ const CheckboxIndicator = import_react_checkbox.Indicator;
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var checkbox_ws_exports = {};
30
+ __export(checkbox_ws_exports, {
31
+ metaCheckbox: () => metaCheckbox,
32
+ metaCheckboxIndicator: () => metaCheckboxIndicator,
33
+ propsMetaCheckbox: () => propsMetaCheckbox,
34
+ propsMetaCheckboxIndicator: () => propsMetaCheckboxIndicator
35
+ });
36
+ module.exports = __toCommonJS(checkbox_ws_exports);
37
+ var import_svg = require("@webstudio-is/icons/svg");
38
+ var import_react_sdk = require("@webstudio-is/react-sdk");
39
+ var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
40
+ var tc = __toESM(require("./theme/tailwind-classes"), 1);
41
+ var import_styles = require("./theme/styles");
42
+ var import_checkbox = require("./__generated__/checkbox.props");
43
+ const metaCheckbox = {
44
+ category: "radix",
45
+ order: 101,
46
+ type: "container",
47
+ icon: import_svg.CheckboxCheckedIcon,
48
+ states: [
49
+ ...import_react_sdk.defaultStates,
50
+ {
51
+ label: "Checked",
52
+ selector: "[data-state=checked]",
53
+ category: "component-states"
54
+ },
55
+ {
56
+ label: "Unchecked",
57
+ selector: "[data-state=unchecked]",
58
+ category: "component-states"
59
+ }
60
+ ],
61
+ presetStyle: {
62
+ button: [import_css_normalize.button, import_styles.buttonReset].flat()
63
+ },
64
+ template: [
65
+ {
66
+ type: "instance",
67
+ component: "Label",
68
+ label: "Checkbox Field",
69
+ styles: [tc.flex(), tc.gap(2), tc.items("center")].flat(),
70
+ children: [
71
+ {
72
+ type: "instance",
73
+ component: "Checkbox",
74
+ dataSources: {
75
+ checkboxChecked: { type: "variable", initialValue: false }
76
+ },
77
+ props: [
78
+ {
79
+ name: "checked",
80
+ type: "dataSource",
81
+ dataSourceName: "checkboxChecked"
82
+ },
83
+ {
84
+ name: "onCheckedChange",
85
+ type: "action",
86
+ value: [
87
+ {
88
+ type: "execute",
89
+ args: ["checked"],
90
+ code: `checkboxChecked = checked`
91
+ }
92
+ ]
93
+ }
94
+ ],
95
+ // peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background
96
+ // focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
97
+ // disabled:cursor-not-allowed disabled:opacity-50
98
+ // data-[state=checked]:bg-primary
99
+ // data-[state=checked]:text-primary-foreground",
100
+ styles: [
101
+ // We are not supporting peer like styles yet
102
+ tc.h(4),
103
+ tc.w(4),
104
+ tc.shrink(0),
105
+ tc.rounded("sm"),
106
+ tc.border(),
107
+ tc.border("primary"),
108
+ tc.focusVisible(
109
+ [tc.outline("none"), tc.ring("ring", 2, "background", 2)].flat()
110
+ ),
111
+ tc.disabled([tc.cursor("not-allowed"), tc.opacity(50)].flat()),
112
+ tc.state(
113
+ [tc.bg("primary"), tc.text("primaryForeground")].flat(),
114
+ "[data-state=checked]"
115
+ )
116
+ ].flat(),
117
+ children: [
118
+ {
119
+ type: "instance",
120
+ component: "CheckboxIndicator",
121
+ // flex items-center justify-center text-current
122
+ styles: [
123
+ tc.flex(),
124
+ tc.items("center"),
125
+ tc.justify("center"),
126
+ tc.text("current")
127
+ ].flat(),
128
+ children: [
129
+ {
130
+ type: "instance",
131
+ component: "HtmlEmbed",
132
+ label: "Indicator Icon",
133
+ props: [
134
+ {
135
+ type: "string",
136
+ name: "code",
137
+ value: import_svg.CheckMarkIcon
138
+ }
139
+ ],
140
+ children: []
141
+ }
142
+ ]
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ type: "instance",
148
+ component: "Text",
149
+ label: "Checkbox Label",
150
+ props: [{ name: "tag", type: "string", value: "span" }],
151
+ children: [{ type: "text", value: "Checkbox" }]
152
+ }
153
+ ]
154
+ }
155
+ ]
156
+ };
157
+ const metaCheckboxIndicator = {
158
+ category: "hidden",
159
+ type: "container",
160
+ icon: import_svg.TriggerIcon,
161
+ states: import_react_sdk.defaultStates,
162
+ presetStyle: {
163
+ span: import_css_normalize.span
164
+ }
165
+ };
166
+ const propsMetaCheckbox = {
167
+ props: import_checkbox.propsCheckbox,
168
+ initialProps: ["id", "checked", "name", "required"]
169
+ };
170
+ const propsMetaCheckboxIndicator = {
171
+ props: import_checkbox.propsCheckboxIndicator
172
+ };
@@ -27,13 +27,15 @@ __export(collapsible_ws_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(collapsible_ws_exports);
29
29
  var import_svg = require("@webstudio-is/icons/svg");
30
- var import_collapsible = require("./__generated__/collapsible.props");
31
30
  var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
31
+ var import_collapsible = require("./__generated__/collapsible.props");
32
+ var import_styles = require("./theme/styles");
32
33
  const presetStyle = {
33
34
  div: import_css_normalize.div
34
35
  };
35
36
  const metaCollapsible = {
36
37
  category: "radix",
38
+ order: 5,
37
39
  type: "container",
38
40
  presetStyle,
39
41
  icon: import_svg.CollapsibleIcon,
@@ -66,6 +68,7 @@ const metaCollapsible = {
66
68
  {
67
69
  type: "instance",
68
70
  component: "Button",
71
+ styles: (0, import_styles.getButtonStyles)("outline"),
69
72
  children: [{ type: "text", value: "Click to toggle content" }]
70
73
  }
71
74
  ]
@@ -23,7 +23,8 @@ __export(components_exports, {
23
23
  AccordionHeader: () => import_accordion.AccordionHeader,
24
24
  AccordionItem: () => import_accordion.AccordionItem,
25
25
  AccordionTrigger: () => import_accordion.AccordionTrigger,
26
- Button: () => import_button.Button,
26
+ Checkbox: () => import_checkbox.Checkbox,
27
+ CheckboxIndicator: () => import_checkbox.CheckboxIndicator,
27
28
  Collapsible: () => import_collapsible.Collapsible,
28
29
  CollapsibleContent: () => import_collapsible.CollapsibleContent,
29
30
  CollapsibleTrigger: () => import_collapsible.CollapsibleTrigger,
@@ -34,23 +35,34 @@ __export(components_exports, {
34
35
  DialogOverlay: () => import_dialog.DialogOverlay,
35
36
  DialogTitle: () => import_dialog.DialogTitle,
36
37
  DialogTrigger: () => import_dialog.DialogTrigger,
37
- Input: () => import_input.Input,
38
38
  Label: () => import_label.Label,
39
+ NavigationMenu: () => import_navigation_menu.NavigationMenu,
40
+ NavigationMenuContent: () => import_navigation_menu.NavigationMenuContent,
41
+ NavigationMenuItem: () => import_navigation_menu.NavigationMenuItem,
42
+ NavigationMenuLink: () => import_navigation_menu.NavigationMenuLink,
43
+ NavigationMenuList: () => import_navigation_menu.NavigationMenuList,
44
+ NavigationMenuTrigger: () => import_navigation_menu.NavigationMenuTrigger,
45
+ NavigationMenuViewport: () => import_navigation_menu.NavigationMenuViewport,
39
46
  Popover: () => import_popover.Popover,
40
47
  PopoverContent: () => import_popover.PopoverContent,
41
48
  PopoverTrigger: () => import_popover.PopoverTrigger,
42
- Sheet: () => import_sheet.Sheet,
43
- SheetClose: () => import_sheet.SheetClose,
44
- SheetContent: () => import_sheet.SheetContent,
45
- SheetDescription: () => import_sheet.SheetDescription,
46
- SheetOverlay: () => import_sheet.SheetOverlay,
47
- SheetTitle: () => import_sheet.SheetTitle,
48
- SheetTrigger: () => import_sheet.SheetTrigger,
49
+ RadioGroup: () => import_radio_group.RadioGroup,
50
+ RadioGroupIndicator: () => import_radio_group.RadioGroupIndicator,
51
+ RadioGroupItem: () => import_radio_group.RadioGroupItem,
52
+ Select: () => import_select.Select,
53
+ SelectContent: () => import_select.SelectContent,
54
+ SelectItem: () => import_select.SelectItem,
55
+ SelectItemIndicator: () => import_select.SelectItemIndicator,
56
+ SelectItemText: () => import_select.SelectItemText,
57
+ SelectTrigger: () => import_select.SelectTrigger,
58
+ SelectValue: () => import_select.SelectValue,
59
+ SelectViewport: () => import_select.SelectViewport,
60
+ Switch: () => import_switch.Switch,
61
+ SwitchThumb: () => import_switch.SwitchThumb,
49
62
  Tabs: () => import_tabs.Tabs,
50
63
  TabsContent: () => import_tabs.TabsContent,
51
64
  TabsList: () => import_tabs.TabsList,
52
65
  TabsTrigger: () => import_tabs.TabsTrigger,
53
- Textarea: () => import_textarea.Textarea,
54
66
  Tooltip: () => import_tooltip.Tooltip,
55
67
  TooltipContent: () => import_tooltip.TooltipContent,
56
68
  TooltipTrigger: () => import_tooltip.TooltipTrigger
@@ -60,10 +72,11 @@ var import_collapsible = require("./collapsible");
60
72
  var import_dialog = require("./dialog");
61
73
  var import_popover = require("./popover");
62
74
  var import_tooltip = require("./tooltip");
63
- var import_sheet = require("./sheet");
64
75
  var import_tabs = require("./tabs");
65
- var import_button = require("./button");
66
- var import_input = require("./input");
67
- var import_textarea = require("./textarea");
68
76
  var import_label = require("./label");
69
77
  var import_accordion = require("./accordion");
78
+ var import_navigation_menu = require("./navigation-menu");
79
+ var import_select = require("./select");
80
+ var import_switch = require("./switch");
81
+ var import_checkbox = require("./checkbox");
82
+ var import_radio_group = require("./radio-group");
@@ -46,10 +46,10 @@ __export(dialog_ws_exports, {
46
46
  module.exports = __toCommonJS(dialog_ws_exports);
47
47
  var import_svg = require("@webstudio-is/icons/svg");
48
48
  var import_react_sdk = require("@webstudio-is/react-sdk");
49
+ var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
49
50
  var tc = __toESM(require("./theme/tailwind-classes"), 1);
50
51
  var import_dialog = require("./__generated__/dialog.props");
51
- var import_button = require("./button.ws");
52
- var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
52
+ var import_styles = require("./theme/styles");
53
53
  const presetStyle = {
54
54
  div: import_css_normalize.div
55
55
  };
@@ -99,13 +99,14 @@ const metaDialogClose = {
99
99
  category: "hidden",
100
100
  type: "container",
101
101
  presetStyle: buttonPresetStyle,
102
- icon: import_svg.ButtonElementIcon
102
+ icon: import_svg.ButtonElementIcon,
103
+ label: "Close Button"
103
104
  };
104
105
  const metaDialog = {
105
106
  category: "radix",
107
+ order: 4,
106
108
  type: "container",
107
109
  icon: import_svg.DialogIcon,
108
- order: 15,
109
110
  stylable: false,
110
111
  template: [
111
112
  {
@@ -132,15 +133,18 @@ const metaDialog = {
132
133
  {
133
134
  type: "instance",
134
135
  component: "DialogTrigger",
135
- props: [],
136
- children: (0, import_button.template)({
137
- children: [{ type: "text", value: "Button" }]
138
- })
136
+ children: [
137
+ {
138
+ type: "instance",
139
+ component: "Button",
140
+ styles: (0, import_styles.getButtonStyles)("outline"),
141
+ children: [{ type: "text", value: "Button" }]
142
+ }
143
+ ]
139
144
  },
140
145
  {
141
146
  type: "instance",
142
147
  component: "DialogOverlay",
143
- props: [],
144
148
  /**
145
149
  * fixed inset-0 z-50 bg-background/80 backdrop-blur-sm
146
150
  * flex
@@ -152,13 +156,13 @@ const metaDialog = {
152
156
  tc.bg("background", 80),
153
157
  tc.backdropBlur("sm"),
154
158
  // To allow positioning Content
155
- tc.flex()
159
+ tc.flex(),
160
+ tc.overflow("auto")
156
161
  ].flat(),
157
162
  children: [
158
163
  {
159
164
  type: "instance",
160
165
  component: "DialogContent",
161
- props: [],
162
166
  /**
163
167
  * fixed w-full z-50
164
168
  * grid gap-4 max-w-lg
@@ -184,13 +188,11 @@ const metaDialog = {
184
188
  type: "instance",
185
189
  component: "Box",
186
190
  label: "Dialog Header",
187
- props: [],
188
191
  styles: [tc.flex(), tc.flex("col"), tc.gap(1)].flat(),
189
192
  children: [
190
193
  {
191
194
  type: "instance",
192
195
  component: "DialogTitle",
193
- props: [],
194
196
  /**
195
197
  * text-lg leading-none tracking-tight
196
198
  **/
@@ -210,7 +212,6 @@ const metaDialog = {
210
212
  {
211
213
  type: "instance",
212
214
  component: "DialogDescription",
213
- props: [],
214
215
  /**
215
216
  * text-sm text-muted-foreground
216
217
  **/
@@ -222,7 +223,7 @@ const metaDialog = {
222
223
  children: [
223
224
  {
224
225
  type: "text",
225
- value: "dialog description text you can edit"
226
+ value: "Dialog description text you can edit"
226
227
  }
227
228
  ]
228
229
  }
@@ -236,7 +237,6 @@ const metaDialog = {
236
237
  {
237
238
  type: "instance",
238
239
  component: "DialogClose",
239
- props: [],
240
240
  /**
241
241
  * absolute right-4 top-4
242
242
  * rounded-sm opacity-70
@@ -273,7 +273,7 @@ const metaDialog = {
273
273
  };
274
274
  const propsMetaDialog = {
275
275
  props: import_dialog.propsDialog,
276
- initialProps: ["open", "modal"]
276
+ initialProps: ["open"]
277
277
  };
278
278
  const propsMetaDialogTrigger = {
279
279
  props: import_dialog.propsDialogTrigger
package/lib/cjs/hooks.js CHANGED
@@ -28,6 +28,8 @@ var import_popover = require("./popover");
28
28
  var import_sheet = require("./sheet");
29
29
  var import_tooltip = require("./tooltip");
30
30
  var import_accordion = require("./accordion");
31
+ var import_navigation_menu = require("./navigation-menu");
32
+ var import_select = require("./select");
31
33
  const hooks = [
32
34
  import_collapsible.hooksCollapsible,
33
35
  import_tabs.hooksTabs,
@@ -35,5 +37,7 @@ const hooks = [
35
37
  import_popover.hooksPopover,
36
38
  import_sheet.hooksSheet,
37
39
  import_tooltip.hooksTooltip,
38
- import_accordion.hooksAccordion
40
+ import_accordion.hooksAccordion,
41
+ import_navigation_menu.hooksNavigationMenu,
42
+ import_select.hooksSelect
39
43
  ];
@@ -42,11 +42,11 @@ const presetStyle = {
42
42
  };
43
43
  const meta = {
44
44
  category: "radix",
45
+ order: 102,
45
46
  type: "container",
46
47
  icon: import_svg.LabelIcon,
47
48
  presetStyle,
48
49
  states: import_react_sdk.defaultStates,
49
- order: 1,
50
50
  template: [
51
51
  {
52
52
  type: "instance",