@nuee/ui 0.4.0 → 0.5.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 (189) hide show
  1. package/dist/Icon.js +2 -0
  2. package/dist/Icon.js.map +2 -2
  3. package/dist/accordion.d.ts +4 -4
  4. package/dist/accordion.js +105 -207
  5. package/dist/accordion.js.map +4 -4
  6. package/dist/alert-dialog.d.ts +6 -6
  7. package/dist/alert-dialog.js +83 -352
  8. package/dist/alert-dialog.js.map +4 -4
  9. package/dist/aspect-ratio.d.ts +1 -1
  10. package/dist/aspect-ratio.js +6 -42
  11. package/dist/aspect-ratio.js.map +2 -2
  12. package/dist/attachment.d.ts +8 -8
  13. package/dist/attachment.js +82 -314
  14. package/dist/attachment.js.map +4 -4
  15. package/dist/avatar.d.ts +7 -9
  16. package/dist/avatar.js +29 -71
  17. package/dist/avatar.js.map +2 -2
  18. package/dist/badge.d.ts +2 -4
  19. package/dist/badge.js +7 -44
  20. package/dist/badge.js.map +2 -2
  21. package/dist/banner.d.ts +4 -7
  22. package/dist/banner.js +35 -273
  23. package/dist/banner.js.map +2 -2
  24. package/dist/breadcrumb.d.ts +7 -7
  25. package/dist/breadcrumb.js +12 -92
  26. package/dist/breadcrumb.js.map +4 -4
  27. package/dist/bubble.d.ts +6 -4
  28. package/dist/bubble.js +17 -55
  29. package/dist/bubble.js.map +2 -2
  30. package/dist/button-group.d.ts +5 -5
  31. package/dist/button-group.js +113 -159
  32. package/dist/button-group.js.map +4 -4
  33. package/dist/button.d.ts +7 -5
  34. package/dist/button.js +141 -44
  35. package/dist/button.js.map +2 -2
  36. package/dist/calendar.d.ts +9 -0
  37. package/dist/calendar.js +234 -0
  38. package/dist/calendar.js.map +7 -0
  39. package/dist/card.d.ts +3 -3
  40. package/dist/card.js +31 -216
  41. package/dist/card.js.map +2 -2
  42. package/dist/carousel.d.ts +28 -0
  43. package/dist/carousel.js +427 -0
  44. package/dist/carousel.js.map +7 -0
  45. package/dist/checkbox.d.ts +3 -3
  46. package/dist/checkbox.js +45 -115
  47. package/dist/checkbox.js.map +4 -4
  48. package/dist/collapsible.d.ts +3 -3
  49. package/dist/collapsible.js +96 -184
  50. package/dist/collapsible.js.map +4 -4
  51. package/dist/combobox.d.ts +6 -6
  52. package/dist/combobox.js +182 -268
  53. package/dist/combobox.js.map +4 -4
  54. package/dist/content-row.d.ts +7 -7
  55. package/dist/content-row.js +97 -241
  56. package/dist/content-row.js.map +3 -3
  57. package/dist/context-menu.js +15 -738
  58. package/dist/context-menu.js.map +4 -4
  59. package/dist/control-layout.d.ts +9 -0
  60. package/dist/date-picker.d.ts +11 -0
  61. package/dist/date-picker.js +140 -0
  62. package/dist/date-picker.js.map +7 -0
  63. package/dist/dialog.d.ts +5 -5
  64. package/dist/dialog.js +44 -161
  65. package/dist/dialog.js.map +4 -4
  66. package/dist/drawer.d.ts +8 -8
  67. package/dist/drawer.js +80 -119
  68. package/dist/drawer.js.map +2 -2
  69. package/dist/dropdown-menu.d.ts +8 -8
  70. package/dist/dropdown-menu.js +244 -416
  71. package/dist/dropdown-menu.js.map +4 -4
  72. package/dist/empty.d.ts +6 -6
  73. package/dist/empty.js +31 -210
  74. package/dist/empty.js.map +2 -2
  75. package/dist/field.d.ts +9 -9
  76. package/dist/field.js +81 -31
  77. package/dist/field.js.map +3 -3
  78. package/dist/global.css +5 -0
  79. package/dist/heading.d.ts +6 -0
  80. package/dist/heading.js +92 -0
  81. package/dist/heading.js.map +7 -0
  82. package/dist/hover-card.d.ts +7 -4
  83. package/dist/hover-card.js +51 -3
  84. package/dist/hover-card.js.map +2 -2
  85. package/dist/index.d.ts +14 -8
  86. package/dist/index.js +295 -12210
  87. package/dist/index.js.map +4 -4
  88. package/dist/input-group.d.ts +5 -5
  89. package/dist/input-group.js +95 -485
  90. package/dist/input-group.js.map +4 -4
  91. package/dist/input-otp.d.ts +6 -6
  92. package/dist/input-otp.js +18 -43
  93. package/dist/input-otp.js.map +2 -2
  94. package/dist/input.d.ts +3 -3
  95. package/dist/input.js +7 -4
  96. package/dist/input.js.map +2 -2
  97. package/dist/kbd.d.ts +2 -7
  98. package/dist/kbd.js +4 -99
  99. package/dist/kbd.js.map +3 -3
  100. package/dist/label.d.ts +2 -5
  101. package/dist/label.js +64 -39
  102. package/dist/label.js.map +3 -3
  103. package/dist/link.d.ts +3 -5
  104. package/dist/link.js +22 -107
  105. package/dist/link.js.map +4 -4
  106. package/dist/marker.d.ts +3 -3
  107. package/dist/marker.js +17 -104
  108. package/dist/marker.js.map +2 -2
  109. package/dist/menubar.d.ts +2 -2
  110. package/dist/menubar.js +36 -772
  111. package/dist/menubar.js.map +4 -4
  112. package/dist/message.d.ts +9 -6
  113. package/dist/message.js +35 -155
  114. package/dist/message.js.map +2 -2
  115. package/dist/native-select.d.ts +5 -5
  116. package/dist/native-select.js +24 -102
  117. package/dist/native-select.js.map +4 -4
  118. package/dist/navigation-menu.d.ts +7 -7
  119. package/dist/navigation-menu.js +183 -307
  120. package/dist/navigation-menu.js.map +4 -4
  121. package/dist/pagination.d.ts +5 -5
  122. package/dist/pagination.js +13 -92
  123. package/dist/pagination.js.map +4 -4
  124. package/dist/popover.d.ts +4 -4
  125. package/dist/popover.js +44 -36
  126. package/dist/popover.js.map +3 -3
  127. package/dist/primitives.js +2 -0
  128. package/dist/primitives.js.map +2 -2
  129. package/dist/progress.d.ts +3 -3
  130. package/dist/progress.js +16 -30
  131. package/dist/progress.js.map +2 -2
  132. package/dist/radio-group.d.ts +5 -5
  133. package/dist/radio-group.js +43 -49
  134. package/dist/radio-group.js.map +3 -3
  135. package/dist/reset.css +0 -1
  136. package/dist/scroll-area.d.ts +2 -2
  137. package/dist/scroll-area.js +56 -80
  138. package/dist/scroll-area.js.map +2 -2
  139. package/dist/select.d.ts +5 -5
  140. package/dist/select.js +169 -255
  141. package/dist/select.js.map +4 -4
  142. package/dist/separator.d.ts +1 -1
  143. package/dist/separator.js +11 -10
  144. package/dist/separator.js.map +2 -2
  145. package/dist/skeleton.d.ts +1 -1
  146. package/dist/skeleton.js +6 -37
  147. package/dist/skeleton.js.map +2 -2
  148. package/dist/slider.d.ts +3 -3
  149. package/dist/slider.js +37 -46
  150. package/dist/slider.js.map +2 -2
  151. package/dist/spinner.d.ts +2 -4
  152. package/dist/spinner.js +5 -61
  153. package/dist/spinner.js.map +3 -3
  154. package/dist/stylex.css +463 -307
  155. package/dist/switch.d.ts +3 -3
  156. package/dist/switch.js +49 -35
  157. package/dist/switch.js.map +3 -3
  158. package/dist/table.d.ts +9 -10
  159. package/dist/table.js +33 -274
  160. package/dist/table.js.map +2 -2
  161. package/dist/tabs.d.ts +4 -4
  162. package/dist/tabs.js +84 -135
  163. package/dist/tabs.js.map +3 -3
  164. package/dist/textarea.d.ts +3 -3
  165. package/dist/textarea.js +11 -43
  166. package/dist/textarea.js.map +2 -2
  167. package/dist/timeline.d.ts +19 -0
  168. package/dist/timeline.js +104 -0
  169. package/dist/timeline.js.map +7 -0
  170. package/dist/toast.d.ts +4 -2
  171. package/dist/toast.js +261 -485
  172. package/dist/toast.js.map +4 -4
  173. package/dist/toast.stylex.d.ts +4 -2
  174. package/dist/toggle-group.d.ts +5 -5
  175. package/dist/toggle-group.js +52 -60
  176. package/dist/toggle-group.js.map +3 -3
  177. package/dist/toggle.d.ts +3 -3
  178. package/dist/toggle.js +28 -20
  179. package/dist/toggle.js.map +3 -3
  180. package/dist/tooltip.d.ts +1 -1
  181. package/dist/tooltip.js +52 -44
  182. package/dist/tooltip.js.map +3 -3
  183. package/dist/typography.d.ts +50 -294
  184. package/package.json +15 -7
  185. package/dist/message-scroller.d.ts +0 -10
  186. package/dist/message-scroller.js +0 -464
  187. package/dist/message-scroller.js.map +0 -7
  188. package/dist/typography.js +0 -85
  189. package/dist/typography.js.map +0 -7
@@ -0,0 +1,427 @@
1
+ "use client";
2
+
3
+ // src/carousel.tsx
4
+ import { c as _c } from "react/compiler-runtime";
5
+ import { CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react";
6
+ import * as stylex from "@stylexjs/stylex";
7
+ import useEmblaCarousel from "embla-carousel-react";
8
+ import { createContext, useLayoutEffect, useRef, useContext, useEffect, useState } from "react";
9
+ import { Button } from "./button.js";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var styles = {
12
+ root: {
13
+ kVAEAm: "x1n2onr6",
14
+ kzqmXN: "xh8yej3",
15
+ $$css: true
16
+ },
17
+ content: {
18
+ k1xSpc: "x78zum5",
19
+ $$css: true
20
+ },
21
+ item: {
22
+ kUk6DE: "x1otvp5z",
23
+ k7Eaqz: "xeuugli",
24
+ $$css: true
25
+ },
26
+ control: {
27
+ kVAEAm: "x10l6tqk",
28
+ k87sOh: "x1oye57c",
29
+ $$css: true
30
+ },
31
+ previous: {
32
+ kLqNvP: "xqj54ik",
33
+ $$css: true
34
+ },
35
+ next: {
36
+ kt4wiu: "x1inaw36",
37
+ $$css: true
38
+ }
39
+ };
40
+ var CarouselContext = createContext(null);
41
+ function useCarousel() {
42
+ const context = useContext(CarouselContext);
43
+ if (!context) {
44
+ throw new Error("Carousel slots must be rendered inside Carousel.");
45
+ }
46
+ return context;
47
+ }
48
+ function Carousel(t0) {
49
+ const $ = _c(37);
50
+ let children;
51
+ let onSelect;
52
+ let options;
53
+ let plugins;
54
+ let props2;
55
+ let setApi;
56
+ let xstyle;
57
+ if ($[0] !== t0) {
58
+ ({
59
+ children,
60
+ onSelect,
61
+ options,
62
+ plugins,
63
+ setApi,
64
+ xstyle,
65
+ ...props2
66
+ } = t0);
67
+ $[0] = t0;
68
+ $[1] = children;
69
+ $[2] = onSelect;
70
+ $[3] = options;
71
+ $[4] = plugins;
72
+ $[5] = props2;
73
+ $[6] = setApi;
74
+ $[7] = xstyle;
75
+ } else {
76
+ children = $[1];
77
+ onSelect = $[2];
78
+ options = $[3];
79
+ plugins = $[4];
80
+ props2 = $[5];
81
+ setApi = $[6];
82
+ xstyle = $[7];
83
+ }
84
+ const [viewportRef, api] = useEmblaCarousel(options, plugins);
85
+ const [canScrollPrevious, setCanScrollPrevious] = useState(false);
86
+ const [canScrollNext, setCanScrollNext] = useState(false);
87
+ const onSelectRef = useRef(onSelect);
88
+ let t1;
89
+ let t2;
90
+ if ($[8] !== onSelect) {
91
+ t1 = () => {
92
+ onSelectRef.current = onSelect;
93
+ };
94
+ t2 = [onSelect];
95
+ $[8] = onSelect;
96
+ $[9] = t1;
97
+ $[10] = t2;
98
+ } else {
99
+ t1 = $[9];
100
+ t2 = $[10];
101
+ }
102
+ useLayoutEffect(t1, t2);
103
+ let t3;
104
+ let t4;
105
+ if ($[11] !== api || $[12] !== setApi) {
106
+ t3 = () => {
107
+ if (api) {
108
+ setApi?.(api);
109
+ }
110
+ };
111
+ t4 = [api, setApi];
112
+ $[11] = api;
113
+ $[12] = setApi;
114
+ $[13] = t3;
115
+ $[14] = t4;
116
+ } else {
117
+ t3 = $[13];
118
+ t4 = $[14];
119
+ }
120
+ useEffect(t3, t4);
121
+ let t5;
122
+ let t6;
123
+ if ($[15] !== api) {
124
+ t5 = () => {
125
+ if (!api) {
126
+ return;
127
+ }
128
+ const handleSelection = function handleSelection2(nextApi) {
129
+ setCanScrollPrevious(nextApi.canScrollPrev());
130
+ setCanScrollNext(nextApi.canScrollNext());
131
+ onSelectRef.current?.(nextApi);
132
+ };
133
+ api.on("reInit", handleSelection).on("select", handleSelection);
134
+ const frame = requestAnimationFrame(() => handleSelection(api));
135
+ return () => {
136
+ cancelAnimationFrame(frame);
137
+ api.off("reInit", handleSelection).off("select", handleSelection);
138
+ };
139
+ };
140
+ t6 = [api];
141
+ $[15] = api;
142
+ $[16] = t5;
143
+ $[17] = t6;
144
+ } else {
145
+ t5 = $[16];
146
+ t6 = $[17];
147
+ }
148
+ useEffect(t5, t6);
149
+ let t7;
150
+ if ($[18] !== api) {
151
+ t7 = function scrollPrevious2() {
152
+ api?.scrollPrev();
153
+ };
154
+ $[18] = api;
155
+ $[19] = t7;
156
+ } else {
157
+ t7 = $[19];
158
+ }
159
+ const scrollPrevious = t7;
160
+ let t8;
161
+ if ($[20] !== api) {
162
+ t8 = function scrollNext2() {
163
+ api?.scrollNext();
164
+ };
165
+ $[20] = api;
166
+ $[21] = t8;
167
+ } else {
168
+ t8 = $[21];
169
+ }
170
+ const scrollNext = t8;
171
+ let t9;
172
+ if ($[22] !== canScrollNext || $[23] !== canScrollPrevious || $[24] !== scrollNext || $[25] !== scrollPrevious || $[26] !== viewportRef) {
173
+ t9 = {
174
+ canScrollNext,
175
+ canScrollPrevious,
176
+ scrollNext,
177
+ scrollPrevious,
178
+ viewportRef
179
+ };
180
+ $[22] = canScrollNext;
181
+ $[23] = canScrollPrevious;
182
+ $[24] = scrollNext;
183
+ $[25] = scrollPrevious;
184
+ $[26] = viewportRef;
185
+ $[27] = t9;
186
+ } else {
187
+ t9 = $[27];
188
+ }
189
+ let t10;
190
+ if ($[28] !== xstyle) {
191
+ t10 = stylex.props(styles.root, xstyle);
192
+ $[28] = xstyle;
193
+ $[29] = t10;
194
+ } else {
195
+ t10 = $[29];
196
+ }
197
+ let t11;
198
+ if ($[30] !== children || $[31] !== props2 || $[32] !== t10) {
199
+ t11 = /* @__PURE__ */ jsx("section", { ...props2, ...t10, children });
200
+ $[30] = children;
201
+ $[31] = props2;
202
+ $[32] = t10;
203
+ $[33] = t11;
204
+ } else {
205
+ t11 = $[33];
206
+ }
207
+ let t12;
208
+ if ($[34] !== t11 || $[35] !== t9) {
209
+ t12 = /* @__PURE__ */ jsx(CarouselContext.Provider, { value: t9, children: t11 });
210
+ $[34] = t11;
211
+ $[35] = t9;
212
+ $[36] = t12;
213
+ } else {
214
+ t12 = $[36];
215
+ }
216
+ return t12;
217
+ }
218
+ function CarouselContent(t0) {
219
+ const $ = _c(14);
220
+ let children;
221
+ let props2;
222
+ let xstyle;
223
+ if ($[0] !== t0) {
224
+ ({
225
+ children,
226
+ xstyle,
227
+ ...props2
228
+ } = t0);
229
+ $[0] = t0;
230
+ $[1] = children;
231
+ $[2] = props2;
232
+ $[3] = xstyle;
233
+ } else {
234
+ children = $[1];
235
+ props2 = $[2];
236
+ xstyle = $[3];
237
+ }
238
+ const {
239
+ viewportRef
240
+ } = useCarousel();
241
+ let t1;
242
+ if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
243
+ t1 = {
244
+ className: "xb3r6kr xh8yej3"
245
+ };
246
+ $[4] = t1;
247
+ } else {
248
+ t1 = $[4];
249
+ }
250
+ let t2;
251
+ if ($[5] !== xstyle) {
252
+ t2 = stylex.props(styles.content, xstyle);
253
+ $[5] = xstyle;
254
+ $[6] = t2;
255
+ } else {
256
+ t2 = $[6];
257
+ }
258
+ let t3;
259
+ if ($[7] !== children || $[8] !== props2 || $[9] !== t2) {
260
+ t3 = /* @__PURE__ */ jsx("div", { ...props2, ...t2, children });
261
+ $[7] = children;
262
+ $[8] = props2;
263
+ $[9] = t2;
264
+ $[10] = t3;
265
+ } else {
266
+ t3 = $[10];
267
+ }
268
+ let t4;
269
+ if ($[11] !== t3 || $[12] !== viewportRef) {
270
+ t4 = /* @__PURE__ */ jsx("div", { ref: viewportRef, ...t1, children: t3 });
271
+ $[11] = t3;
272
+ $[12] = viewportRef;
273
+ $[13] = t4;
274
+ } else {
275
+ t4 = $[13];
276
+ }
277
+ return t4;
278
+ }
279
+ function CarouselItem(t0) {
280
+ const $ = _c(8);
281
+ let props2;
282
+ let xstyle;
283
+ if ($[0] !== t0) {
284
+ ({
285
+ xstyle,
286
+ ...props2
287
+ } = t0);
288
+ $[0] = t0;
289
+ $[1] = props2;
290
+ $[2] = xstyle;
291
+ } else {
292
+ props2 = $[1];
293
+ xstyle = $[2];
294
+ }
295
+ let t1;
296
+ if ($[3] !== xstyle) {
297
+ t1 = stylex.props(styles.item, xstyle);
298
+ $[3] = xstyle;
299
+ $[4] = t1;
300
+ } else {
301
+ t1 = $[4];
302
+ }
303
+ let t2;
304
+ if ($[5] !== props2 || $[6] !== t1) {
305
+ t2 = /* @__PURE__ */ jsx("div", { ...props2, ...t1 });
306
+ $[5] = props2;
307
+ $[6] = t1;
308
+ $[7] = t2;
309
+ } else {
310
+ t2 = $[7];
311
+ }
312
+ return t2;
313
+ }
314
+ function CarouselPrevious(t0) {
315
+ const $ = _c(12);
316
+ let disabled;
317
+ let props2;
318
+ let xstyle;
319
+ if ($[0] !== t0) {
320
+ ({
321
+ disabled,
322
+ xstyle,
323
+ ...props2
324
+ } = t0);
325
+ $[0] = t0;
326
+ $[1] = disabled;
327
+ $[2] = props2;
328
+ $[3] = xstyle;
329
+ } else {
330
+ disabled = $[1];
331
+ props2 = $[2];
332
+ xstyle = $[3];
333
+ }
334
+ const {
335
+ canScrollPrevious,
336
+ scrollPrevious
337
+ } = useCarousel();
338
+ const t1 = disabled ?? !canScrollPrevious;
339
+ let t2;
340
+ if ($[4] !== xstyle) {
341
+ t2 = [styles.control, styles.previous, xstyle];
342
+ $[4] = xstyle;
343
+ $[5] = t2;
344
+ } else {
345
+ t2 = $[5];
346
+ }
347
+ let t3;
348
+ if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
349
+ t3 = /* @__PURE__ */ jsx(CaretLeftIcon, { "aria-hidden": "true" });
350
+ $[6] = t3;
351
+ } else {
352
+ t3 = $[6];
353
+ }
354
+ let t4;
355
+ if ($[7] !== props2 || $[8] !== scrollPrevious || $[9] !== t1 || $[10] !== t2) {
356
+ t4 = /* @__PURE__ */ jsx(Button, { "aria-label": "Previous slide", disabled: t1, onClick: scrollPrevious, size: "icon-sm", shape: "circle", variant: "secondary", xstyle: t2, ...props2, children: t3 });
357
+ $[7] = props2;
358
+ $[8] = scrollPrevious;
359
+ $[9] = t1;
360
+ $[10] = t2;
361
+ $[11] = t4;
362
+ } else {
363
+ t4 = $[11];
364
+ }
365
+ return t4;
366
+ }
367
+ function CarouselNext(t0) {
368
+ const $ = _c(12);
369
+ let disabled;
370
+ let props2;
371
+ let xstyle;
372
+ if ($[0] !== t0) {
373
+ ({
374
+ disabled,
375
+ xstyle,
376
+ ...props2
377
+ } = t0);
378
+ $[0] = t0;
379
+ $[1] = disabled;
380
+ $[2] = props2;
381
+ $[3] = xstyle;
382
+ } else {
383
+ disabled = $[1];
384
+ props2 = $[2];
385
+ xstyle = $[3];
386
+ }
387
+ const {
388
+ canScrollNext,
389
+ scrollNext
390
+ } = useCarousel();
391
+ const t1 = disabled ?? !canScrollNext;
392
+ let t2;
393
+ if ($[4] !== xstyle) {
394
+ t2 = [styles.control, styles.next, xstyle];
395
+ $[4] = xstyle;
396
+ $[5] = t2;
397
+ } else {
398
+ t2 = $[5];
399
+ }
400
+ let t3;
401
+ if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
402
+ t3 = /* @__PURE__ */ jsx(CaretRightIcon, { "aria-hidden": "true" });
403
+ $[6] = t3;
404
+ } else {
405
+ t3 = $[6];
406
+ }
407
+ let t4;
408
+ if ($[7] !== props2 || $[8] !== scrollNext || $[9] !== t1 || $[10] !== t2) {
409
+ t4 = /* @__PURE__ */ jsx(Button, { "aria-label": "Next slide", disabled: t1, onClick: scrollNext, size: "icon-sm", shape: "circle", variant: "secondary", xstyle: t2, ...props2, children: t3 });
410
+ $[7] = props2;
411
+ $[8] = scrollNext;
412
+ $[9] = t1;
413
+ $[10] = t2;
414
+ $[11] = t4;
415
+ } else {
416
+ t4 = $[11];
417
+ }
418
+ return t4;
419
+ }
420
+ export {
421
+ Carousel,
422
+ CarouselContent,
423
+ CarouselItem,
424
+ CarouselNext,
425
+ CarouselPrevious
426
+ };
427
+ //# sourceMappingURL=carousel.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/carousel.tsx"],
4
+ "sourcesContent": ["\"use client\";\n\nimport { c as _c } from \"react/compiler-runtime\";\nimport { sizeVars } from \"@nuee/tokens/semantic.stylex\";\nimport { CaretLeftIcon, CaretRightIcon } from \"@phosphor-icons/react\";\nimport * as stylex from \"@stylexjs/stylex\";\nimport useEmblaCarousel from \"embla-carousel-react\";\nimport { createContext, useLayoutEffect, useRef, useContext, useEffect, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { Button } from \"./button\";\nconst styles = {\n root: {\n kVAEAm: \"x1n2onr6\",\n kzqmXN: \"xh8yej3\",\n $$css: true\n },\n content: {\n k1xSpc: \"x78zum5\",\n $$css: true\n },\n item: {\n kUk6DE: \"x1otvp5z\",\n k7Eaqz: \"xeuugli\",\n $$css: true\n },\n control: {\n kVAEAm: \"x10l6tqk\",\n k87sOh: \"x1oye57c\",\n $$css: true\n },\n previous: {\n kLqNvP: \"xqj54ik\",\n $$css: true\n },\n next: {\n kt4wiu: \"x1inaw36\",\n $$css: true\n }\n};\ntype CarouselApi = ReturnType<typeof useEmblaCarousel>[1];\ntype CarouselOptions = Parameters<typeof useEmblaCarousel>[0];\ntype CarouselPlugins = Parameters<typeof useEmblaCarousel>[1];\ntype CarouselContextValue = {\n canScrollNext: boolean;\n canScrollPrevious: boolean;\n scrollNext: () => void;\n scrollPrevious: () => void;\n viewportRef: ReturnType<typeof useEmblaCarousel>[0];\n};\nconst CarouselContext = createContext<CarouselContextValue | null>(null);\nfunction useCarousel() {\n const context = useContext(CarouselContext);\n if (!context) {\n throw new Error(\"Carousel slots must be rendered inside Carousel.\");\n }\n return context;\n}\nexport type { CarouselApi };\nexport type CarouselProps = Omit<ComponentProps<\"section\">, \"className\" | \"style\"> & {\n children: ReactNode;\n onSelect?: (api: NonNullable<CarouselApi>) => void;\n options?: CarouselOptions;\n plugins?: CarouselPlugins;\n setApi?: (api: NonNullable<CarouselApi>) => void;\n xstyle?: stylex.StyleXStyles;\n};\nexport function Carousel(t0) {\n const $ = _c(37);\n let children;\n let onSelect;\n let options;\n let plugins;\n let props;\n let setApi;\n let xstyle;\n if ($[0] !== t0) {\n ({\n children,\n onSelect,\n options,\n plugins,\n setApi,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = children;\n $[2] = onSelect;\n $[3] = options;\n $[4] = plugins;\n $[5] = props;\n $[6] = setApi;\n $[7] = xstyle;\n } else {\n children = $[1];\n onSelect = $[2];\n options = $[3];\n plugins = $[4];\n props = $[5];\n setApi = $[6];\n xstyle = $[7];\n }\n const [viewportRef, api] = useEmblaCarousel(options, plugins);\n const [canScrollPrevious, setCanScrollPrevious] = useState(false);\n const [canScrollNext, setCanScrollNext] = useState(false);\n const onSelectRef = useRef(onSelect);\n let t1;\n let t2;\n if ($[8] !== onSelect) {\n t1 = () => {\n onSelectRef.current = onSelect;\n };\n t2 = [onSelect];\n $[8] = onSelect;\n $[9] = t1;\n $[10] = t2;\n } else {\n t1 = $[9];\n t2 = $[10];\n }\n useLayoutEffect(t1, t2);\n let t3;\n let t4;\n if ($[11] !== api || $[12] !== setApi) {\n t3 = () => {\n if (api) {\n setApi?.(api);\n }\n };\n t4 = [api, setApi];\n $[11] = api;\n $[12] = setApi;\n $[13] = t3;\n $[14] = t4;\n } else {\n t3 = $[13];\n t4 = $[14];\n }\n useEffect(t3, t4);\n let t5;\n let t6;\n if ($[15] !== api) {\n t5 = () => {\n if (!api) {\n return;\n }\n const handleSelection = function handleSelection(nextApi) {\n setCanScrollPrevious(nextApi.canScrollPrev());\n setCanScrollNext(nextApi.canScrollNext());\n onSelectRef.current?.(nextApi);\n };\n api.on(\"reInit\", handleSelection).on(\"select\", handleSelection);\n const frame = requestAnimationFrame(() => handleSelection(api));\n return () => {\n cancelAnimationFrame(frame);\n api.off(\"reInit\", handleSelection).off(\"select\", handleSelection);\n };\n };\n t6 = [api];\n $[15] = api;\n $[16] = t5;\n $[17] = t6;\n } else {\n t5 = $[16];\n t6 = $[17];\n }\n useEffect(t5, t6);\n let t7;\n if ($[18] !== api) {\n t7 = function scrollPrevious() {\n api?.scrollPrev();\n };\n $[18] = api;\n $[19] = t7;\n } else {\n t7 = $[19];\n }\n const scrollPrevious = t7;\n let t8;\n if ($[20] !== api) {\n t8 = function scrollNext() {\n api?.scrollNext();\n };\n $[20] = api;\n $[21] = t8;\n } else {\n t8 = $[21];\n }\n const scrollNext = t8;\n let t9;\n if ($[22] !== canScrollNext || $[23] !== canScrollPrevious || $[24] !== scrollNext || $[25] !== scrollPrevious || $[26] !== viewportRef) {\n t9 = {\n canScrollNext,\n canScrollPrevious,\n scrollNext,\n scrollPrevious,\n viewportRef\n };\n $[22] = canScrollNext;\n $[23] = canScrollPrevious;\n $[24] = scrollNext;\n $[25] = scrollPrevious;\n $[26] = viewportRef;\n $[27] = t9;\n } else {\n t9 = $[27];\n }\n let t10;\n if ($[28] !== xstyle) {\n t10 = stylex.props(styles.root, xstyle);\n $[28] = xstyle;\n $[29] = t10;\n } else {\n t10 = $[29];\n }\n let t11;\n if ($[30] !== children || $[31] !== props || $[32] !== t10) {\n t11 = <section {...props} {...t10}>{children}</section>;\n $[30] = children;\n $[31] = props;\n $[32] = t10;\n $[33] = t11;\n } else {\n t11 = $[33];\n }\n let t12;\n if ($[34] !== t11 || $[35] !== t9) {\n t12 = <CarouselContext.Provider value={t9}>{t11}</CarouselContext.Provider>;\n $[34] = t11;\n $[35] = t9;\n $[36] = t12;\n } else {\n t12 = $[36];\n }\n return t12;\n}\nexport type CarouselContentProps = Omit<ComponentProps<\"div\">, \"className\" | \"style\"> & {\n xstyle?: stylex.StyleXStyles;\n};\nexport function CarouselContent(t0) {\n const $ = _c(14);\n let children;\n let props;\n let xstyle;\n if ($[0] !== t0) {\n ({\n children,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = children;\n $[2] = props;\n $[3] = xstyle;\n } else {\n children = $[1];\n props = $[2];\n xstyle = $[3];\n }\n const {\n viewportRef\n } = useCarousel();\n let t1;\n if ($[4] === Symbol.for(\"react.memo_cache_sentinel\")) {\n t1 = {\n className: \"xb3r6kr xh8yej3\"\n };\n $[4] = t1;\n } else {\n t1 = $[4];\n }\n let t2;\n if ($[5] !== xstyle) {\n t2 = stylex.props(styles.content, xstyle);\n $[5] = xstyle;\n $[6] = t2;\n } else {\n t2 = $[6];\n }\n let t3;\n if ($[7] !== children || $[8] !== props || $[9] !== t2) {\n t3 = <div {...props} {...t2}>{children}</div>;\n $[7] = children;\n $[8] = props;\n $[9] = t2;\n $[10] = t3;\n } else {\n t3 = $[10];\n }\n let t4;\n if ($[11] !== t3 || $[12] !== viewportRef) {\n t4 = <div ref={viewportRef} {...t1}>{t3}</div>;\n $[11] = t3;\n $[12] = viewportRef;\n $[13] = t4;\n } else {\n t4 = $[13];\n }\n return t4;\n}\nexport type CarouselItemProps = Omit<ComponentProps<\"div\">, \"className\" | \"style\"> & {\n xstyle?: stylex.StyleXStyles;\n};\nexport function CarouselItem(t0) {\n const $ = _c(8);\n let props;\n let xstyle;\n if ($[0] !== t0) {\n ({\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = props;\n $[2] = xstyle;\n } else {\n props = $[1];\n xstyle = $[2];\n }\n let t1;\n if ($[3] !== xstyle) {\n t1 = stylex.props(styles.item, xstyle);\n $[3] = xstyle;\n $[4] = t1;\n } else {\n t1 = $[4];\n }\n let t2;\n if ($[5] !== props || $[6] !== t1) {\n t2 = <div {...props} {...t1} />;\n $[5] = props;\n $[6] = t1;\n $[7] = t2;\n } else {\n t2 = $[7];\n }\n return t2;\n}\ntype CarouselControlProps = Omit<ComponentProps<typeof Button>, \"children\" | \"onClick\" | \"className\" | \"style\">;\nexport function CarouselPrevious(t0) {\n const $ = _c(12);\n let disabled;\n let props;\n let xstyle;\n if ($[0] !== t0) {\n ({\n disabled,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = disabled;\n $[2] = props;\n $[3] = xstyle;\n } else {\n disabled = $[1];\n props = $[2];\n xstyle = $[3];\n }\n const {\n canScrollPrevious,\n scrollPrevious\n } = useCarousel();\n const t1 = disabled ?? !canScrollPrevious;\n let t2;\n if ($[4] !== xstyle) {\n t2 = [styles.control, styles.previous, xstyle];\n $[4] = xstyle;\n $[5] = t2;\n } else {\n t2 = $[5];\n }\n let t3;\n if ($[6] === Symbol.for(\"react.memo_cache_sentinel\")) {\n t3 = <CaretLeftIcon aria-hidden=\"true\" />;\n $[6] = t3;\n } else {\n t3 = $[6];\n }\n let t4;\n if ($[7] !== props || $[8] !== scrollPrevious || $[9] !== t1 || $[10] !== t2) {\n t4 = <Button aria-label=\"Previous slide\" disabled={t1} onClick={scrollPrevious} size=\"icon-sm\" shape=\"circle\" variant=\"secondary\" xstyle={t2} {...props}>{t3}</Button>;\n $[7] = props;\n $[8] = scrollPrevious;\n $[9] = t1;\n $[10] = t2;\n $[11] = t4;\n } else {\n t4 = $[11];\n }\n return t4;\n}\nexport function CarouselNext(t0) {\n const $ = _c(12);\n let disabled;\n let props;\n let xstyle;\n if ($[0] !== t0) {\n ({\n disabled,\n xstyle,\n ...props\n } = t0);\n $[0] = t0;\n $[1] = disabled;\n $[2] = props;\n $[3] = xstyle;\n } else {\n disabled = $[1];\n props = $[2];\n xstyle = $[3];\n }\n const {\n canScrollNext,\n scrollNext\n } = useCarousel();\n const t1 = disabled ?? !canScrollNext;\n let t2;\n if ($[4] !== xstyle) {\n t2 = [styles.control, styles.next, xstyle];\n $[4] = xstyle;\n $[5] = t2;\n } else {\n t2 = $[5];\n }\n let t3;\n if ($[6] === Symbol.for(\"react.memo_cache_sentinel\")) {\n t3 = <CaretRightIcon aria-hidden=\"true\" />;\n $[6] = t3;\n } else {\n t3 = $[6];\n }\n let t4;\n if ($[7] !== props || $[8] !== scrollNext || $[9] !== t1 || $[10] !== t2) {\n t4 = <Button aria-label=\"Next slide\" disabled={t1} onClick={scrollNext} size=\"icon-sm\" shape=\"circle\" variant=\"secondary\" xstyle={t2} {...props}>{t3}</Button>;\n $[7] = props;\n $[8] = scrollNext;\n $[9] = t1;\n $[10] = t2;\n $[11] = t4;\n } else {\n t4 = $[11];\n }\n return t4;\n}"],
5
+ "mappings": ";;;AAEA,SAAS,KAAK,UAAU;AAExB,SAAS,eAAe,sBAAsB;AAC9C,YAAY,YAAY;AACxB,OAAO,sBAAsB;AAC7B,SAAS,eAAe,iBAAiB,QAAQ,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I,EAAE,CAAC,MAAM,uBAAO,IAAI,2BAA2B,GAAG;AACpD,SAAK,oBAAC,kBAAe,eAAY,QAAO;AACxC,MAAE,CAAC,IAAI;AAAA,EACT,OAAO;AACL,SAAK,EAAE,CAAC;AAAA,EACV;AACA,MAAI;AACJ,MAAI,EAAE,CAAC,MAAMA,UAAS,EAAE,CAAC,MAAM,cAAc,EAAE,CAAC,MAAM,MAAM,EAAE,EAAE,MAAM,IAAI;AACxE,SAAK,oBAAC,UAAO,cAAW,cAAa,UAAU,IAAI,SAAS,YAAY,MAAK,WAAU,OAAM,UAAS,SAAQ,aAAY,QAAQ,IAAK,GAAGA,QAAQ,cAAG;AACrJ,MAAE,CAAC,IAAIA;AACP,MAAE,CAAC,IAAI;AACP,MAAE,CAAC,IAAI;AACP,MAAE,EAAE,IAAI;AACR,MAAE,EAAE,IAAI;AAAA,EACV,OAAO;AACL,SAAK,EAAE,EAAE;AAAA,EACX;AACA,SAAO;AACT;",
6
+ "names": ["props", "handleSelection", "scrollPrevious", "scrollNext"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
2
- import * as stylex from "@stylexjs/stylex";
3
2
  import type { ComponentProps } from "react";
4
- export type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root> & {
5
- xstyle?: stylex.StyleXStyles;
3
+ import type { ControlPlacementStyles } from "./control-layout";
4
+ export type CheckboxProps = Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "className" | "style"> & {
5
+ xstyle?: ControlPlacementStyles;
6
6
  };
7
7
  export declare function Checkbox({ xstyle, ...props }: CheckboxProps): import("react").JSX.Element;
package/dist/checkbox.js CHANGED
@@ -1,91 +1,11 @@
1
+ "use client";
2
+
1
3
  // src/checkbox.tsx
2
4
  import { c as _c } from "react/compiler-runtime";
3
5
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
6
+ import { CheckIcon } from "@phosphor-icons/react";
4
7
  import * as stylex from "@stylexjs/stylex";
5
-
6
- // src/Icon.tsx
7
- import {
8
- ArrowDownIcon,
9
- ArrowSquareOutIcon,
10
- ArrowsDownUpIcon,
11
- ArrowUpIcon,
12
- CalendarIcon,
13
- CaretDoubleLeftIcon,
14
- CaretDoubleRightIcon,
15
- CaretDownIcon,
16
- CaretLeftIcon,
17
- CaretRightIcon,
18
- CaretUpIcon,
19
- CaretUpDownIcon,
20
- CheckCircleIcon,
21
- CheckIcon,
22
- ChecksIcon,
23
- ClockIcon,
24
- ColumnsIcon,
25
- CopyIcon,
26
- DotsThreeIcon,
27
- EyeSlashIcon,
28
- FileIcon,
29
- FolderIcon,
30
- FunnelIcon,
31
- GitBranchIcon,
32
- InfoIcon,
33
- ListIcon,
34
- MagnifyingGlassIcon,
35
- MicrophoneIcon,
36
- PaperclipIcon,
37
- DownloadSimpleIcon,
38
- StopIcon,
39
- WarningIcon,
40
- WrenchIcon,
41
- XCircleIcon,
42
- XIcon
43
- } from "@phosphor-icons/react";
44
8
  import { jsx } from "react/jsx-runtime";
45
- var iconRegistry = {
46
- close: XIcon,
47
- chevronDown: CaretDownIcon,
48
- chevronLeft: CaretLeftIcon,
49
- chevronRight: CaretRightIcon,
50
- chevronUp: CaretUpIcon,
51
- chevronsLeft: CaretDoubleLeftIcon,
52
- chevronsRight: CaretDoubleRightIcon,
53
- caretUpDown: CaretUpDownIcon,
54
- check: CheckIcon,
55
- success: CheckCircleIcon,
56
- error: XCircleIcon,
57
- warning: WarningIcon,
58
- info: InfoIcon,
59
- calendar: CalendarIcon,
60
- clock: ClockIcon,
61
- externalLink: ArrowSquareOutIcon,
62
- menu: ListIcon,
63
- moreHorizontal: DotsThreeIcon,
64
- search: MagnifyingGlassIcon,
65
- arrowUp: ArrowUpIcon,
66
- arrowDown: ArrowDownIcon,
67
- arrowsUpDown: ArrowsDownUpIcon,
68
- funnel: FunnelIcon,
69
- eyeSlash: EyeSlashIcon,
70
- viewColumns: ColumnsIcon,
71
- copy: CopyIcon,
72
- checkDouble: ChecksIcon,
73
- wrench: WrenchIcon,
74
- stop: StopIcon,
75
- microphone: MicrophoneIcon,
76
- folder: FolderIcon,
77
- file: FileIcon,
78
- paperclip: PaperclipIcon,
79
- download: DownloadSimpleIcon,
80
- branch: GitBranchIcon
81
- };
82
- function Icon({ name, weight = "regular", ...props2 }) {
83
- const IconComponent = iconRegistry[name];
84
- return /* @__PURE__ */ jsx(IconComponent, { ...props2, weight });
85
- }
86
-
87
- // src/checkbox.tsx
88
- import { jsx as jsx2 } from "react/jsx-runtime";
89
9
  var styles = {
90
10
  root: {
91
11
  kGNEyG: "x6s0dn4",
@@ -94,17 +14,24 @@ var styles = {
94
14
  kaIpWk: "x7c24we",
95
15
  ksu8eU: "x1y0btm7",
96
16
  kMzoRj: "xzgztj1",
97
- kMwMTN: "x1ae0smn",
17
+ kMwMTN: "x1mij46l",
98
18
  kkrTdU: "x1ypdohk",
99
19
  k1xSpc: "x3nfvp2",
100
- kZKoxP: "xam5rvr",
20
+ kmuXW: "x2lah0s",
21
+ kMv6JI: "x1fe00qh",
22
+ kGuDYH: "x99mhxu",
23
+ k63SB2: "x1v899x5",
24
+ kLWn49: "xi1fz51",
25
+ kZKoxP: "xy4d3ni",
101
26
  kjj79g: "xl56j7k",
102
- kAzted: "x1rqwxy8",
103
- k7Eaqz: "x1vi9356",
27
+ kAzted: "x3ayk2s",
28
+ k7Eaqz: "x4gews3",
104
29
  kI3sdo: "x1a2a7pz",
105
30
  kIyJzY: "xdshaxz",
106
31
  k1ekBW: "x16ab8w3",
107
- kzqmXN: "xp8d6y2",
32
+ kAMwcw: "xscx6xn",
33
+ kzqmXN: "x1mu33zv",
34
+ kgeoSG: "x12vebyb",
108
35
  kZs9gx: "x7yqiub",
109
36
  kiEn40: "xzvmsi2",
110
37
  k7shQP: "x9v5kkp",
@@ -118,16 +45,14 @@ var styles = {
118
45
  $$css: true
119
46
  },
120
47
  disabled: {
121
- kWkggS: "x1fdj243",
122
- kVAM5u: "x13xm7is",
123
- kMwMTN: "x2rig74",
124
48
  kkrTdU: "x1h6gzvc",
125
- kGzVvX: "x1ty4m2n",
49
+ kSiTet: "x1l4zsnz",
50
+ kGzVvX: "xn0v8co",
126
51
  $$css: true
127
52
  }
128
53
  };
129
54
  function Checkbox(t0) {
130
- const $ = _c(11);
55
+ const $ = _c(13);
131
56
  let props2;
132
57
  let xstyle;
133
58
  if ($[0] !== t0) {
@@ -143,41 +68,46 @@ function Checkbox(t0) {
143
68
  xstyle = $[2];
144
69
  }
145
70
  let t1;
146
- let t2;
147
71
  if ($[3] !== xstyle) {
148
- t1 = (state) => {
149
- const stylexProps = stylex.props(styles.root, xstyle, state.checked && styles.checked, state.disabled && styles.disabled);
150
- return stylexProps.className;
151
- };
152
- t2 = (state_0) => {
153
- const stylexProps_0 = stylex.props(styles.root, xstyle, state_0.checked && styles.checked, state_0.disabled && styles.disabled);
154
- return stylexProps_0.style;
72
+ t1 = function getRootStyles2(state) {
73
+ return stylex.props(styles.root, xstyle, state.checked && styles.checked, state.disabled && styles.disabled);
155
74
  };
156
75
  $[3] = xstyle;
157
76
  $[4] = t1;
158
- $[5] = t2;
159
77
  } else {
160
78
  t1 = $[4];
161
- t2 = $[5];
162
79
  }
80
+ const getRootStyles = t1;
81
+ let t2;
163
82
  let t3;
164
- if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
165
- t3 = /* @__PURE__ */ jsx2(CheckboxPrimitive.Indicator, { className: "x6s0dn4 x3nfvp2 x5yr21d xl56j7k xh8yej3", children: /* @__PURE__ */ jsx2(Icon, { "aria-hidden": "true", name: "check", weight: "bold" }) });
166
- $[6] = t3;
83
+ if ($[5] !== getRootStyles) {
84
+ t2 = (state_0) => getRootStyles(state_0).className;
85
+ t3 = (state_1) => getRootStyles(state_1).style;
86
+ $[5] = getRootStyles;
87
+ $[6] = t2;
88
+ $[7] = t3;
167
89
  } else {
168
- t3 = $[6];
90
+ t2 = $[6];
91
+ t3 = $[7];
169
92
  }
170
93
  let t4;
171
- if ($[7] !== props2 || $[8] !== t1 || $[9] !== t2) {
172
- t4 = /* @__PURE__ */ jsx2(CheckboxPrimitive.Root, { ...props2, className: t1, style: t2, children: t3 });
173
- $[7] = props2;
174
- $[8] = t1;
175
- $[9] = t2;
176
- $[10] = t4;
94
+ if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
95
+ t4 = /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "x6s0dn4 x3nfvp2 x5yr21d xl56j7k xh8yej3", children: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", weight: "bold" }) });
96
+ $[8] = t4;
97
+ } else {
98
+ t4 = $[8];
99
+ }
100
+ let t5;
101
+ if ($[9] !== props2 || $[10] !== t2 || $[11] !== t3) {
102
+ t5 = /* @__PURE__ */ jsx(CheckboxPrimitive.Root, { ...props2, className: t2, style: t3, children: t4 });
103
+ $[9] = props2;
104
+ $[10] = t2;
105
+ $[11] = t3;
106
+ $[12] = t5;
177
107
  } else {
178
- t4 = $[10];
108
+ t5 = $[12];
179
109
  }
180
- return t4;
110
+ return t5;
181
111
  }
182
112
  export {
183
113
  Checkbox