@superslate/ui 0.0.0-stage → 0.1.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 (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +85 -2
  3. package/dist/base.css +110 -0
  4. package/dist/cli.js +205 -0
  5. package/dist/components/accordion/Accordion.d.ts +24 -0
  6. package/dist/components/alert/Alert.d.ts +13 -0
  7. package/dist/components/alert-dialog/AlertDialog.d.ts +33 -0
  8. package/dist/components/avatar/Avatar.d.ts +14 -0
  9. package/dist/components/badge/Badge.d.ts +9 -0
  10. package/dist/components/breadcrumb/Breadcrumb.d.ts +15 -0
  11. package/dist/components/button/Button.d.ts +17 -0
  12. package/dist/components/card/Card.d.ts +18 -0
  13. package/dist/components/checkbox/Checkbox.d.ts +19 -0
  14. package/dist/components/dialog/Dialog.d.ts +43 -0
  15. package/dist/components/drawer/Drawer.d.ts +44 -0
  16. package/dist/components/empty-state/EmptyState.d.ts +9 -0
  17. package/dist/components/field/Field.d.ts +29 -0
  18. package/dist/components/input/Input.d.ts +15 -0
  19. package/dist/components/kbd/Kbd.d.ts +5 -0
  20. package/dist/components/menu/Menu.d.ts +41 -0
  21. package/dist/components/pagination/Pagination.d.ts +14 -0
  22. package/dist/components/popover/Popover.d.ts +38 -0
  23. package/dist/components/select/Select.d.ts +38 -0
  24. package/dist/components/separator/Separator.d.ts +6 -0
  25. package/dist/components/skeleton/Skeleton.d.ts +7 -0
  26. package/dist/components/spinner/Spinner.d.ts +7 -0
  27. package/dist/components/switch/Switch.d.ts +18 -0
  28. package/dist/components/tabs/Tabs.d.ts +28 -0
  29. package/dist/components/toast/Toast.d.ts +15 -0
  30. package/dist/components/tooltip/Tooltip.d.ts +29 -0
  31. package/dist/index.cjs +1 -0
  32. package/dist/index.d.ts +27 -0
  33. package/dist/index.js +2047 -0
  34. package/dist/registry/accordion.json +26 -0
  35. package/dist/registry/alert-dialog.json +26 -0
  36. package/dist/registry/alert.json +23 -0
  37. package/dist/registry/avatar.json +22 -0
  38. package/dist/registry/badge.json +22 -0
  39. package/dist/registry/breadcrumb.json +23 -0
  40. package/dist/registry/button.json +22 -0
  41. package/dist/registry/card.json +22 -0
  42. package/dist/registry/checkbox.json +26 -0
  43. package/dist/registry/dialog.json +27 -0
  44. package/dist/registry/drawer.json +27 -0
  45. package/dist/registry/empty-state.json +22 -0
  46. package/dist/registry/field.json +22 -0
  47. package/dist/registry/input.json +23 -0
  48. package/dist/registry/kbd.json +22 -0
  49. package/dist/registry/menu.json +26 -0
  50. package/dist/registry/pagination.json +26 -0
  51. package/dist/registry/popover.json +27 -0
  52. package/dist/registry/registry.json +385 -0
  53. package/dist/registry/select.json +27 -0
  54. package/dist/registry/separator.json +22 -0
  55. package/dist/registry/shared.json +37 -0
  56. package/dist/registry/skeleton.json +22 -0
  57. package/dist/registry/spinner.json +22 -0
  58. package/dist/registry/switch.json +25 -0
  59. package/dist/registry/tabs.json +25 -0
  60. package/dist/registry/toast.json +26 -0
  61. package/dist/registry/tooltip.json +26 -0
  62. package/dist/styles.css +231 -0
  63. package/dist/themes.css +83 -0
  64. package/dist/tokens.css +118 -0
  65. package/dist/utils/cn.d.ts +1 -0
  66. package/dist/utils/icons.d.ts +15 -0
  67. package/dist/utils/slot.d.ts +8 -0
  68. package/package.json +115 -4
package/dist/index.js ADDED
@@ -0,0 +1,2047 @@
1
+ "use client";
2
+ import { jsx as o, jsxs as f, Fragment as U } from "react/jsx-runtime";
3
+ import * as l from "react";
4
+ import * as me from "@zag-js/accordion";
5
+ import { useMachine as $, normalizeProps as N, Portal as z } from "@zag-js/react";
6
+ import * as W from "@zag-js/dialog";
7
+ import * as pe from "@zag-js/checkbox";
8
+ import * as ge from "@zag-js/menu";
9
+ import * as fe from "@zag-js/pagination";
10
+ import * as _e from "@zag-js/popover";
11
+ import * as ce from "@zag-js/select";
12
+ import * as be from "@zag-js/switch";
13
+ import * as he from "@zag-js/tabs";
14
+ import * as Q from "@zag-js/toast";
15
+ import * as ve from "@zag-js/tooltip";
16
+ function a(...e) {
17
+ let t = "";
18
+ for (let s = 0; s < e.length; s += 1) {
19
+ const n = e[s];
20
+ n && (t = t ? `${t} ${n}` : n);
21
+ }
22
+ return t;
23
+ }
24
+ function y(e) {
25
+ return function({ size: s = 16, width: n, height: r, ...i }) {
26
+ return /* @__PURE__ */ o(
27
+ "svg",
28
+ {
29
+ xmlns: "http://www.w3.org/2000/svg",
30
+ width: n ?? s,
31
+ height: r ?? s,
32
+ viewBox: "0 0 24 24",
33
+ fill: "none",
34
+ stroke: "currentColor",
35
+ strokeWidth: "2",
36
+ strokeLinecap: "round",
37
+ strokeLinejoin: "round",
38
+ "aria-hidden": "true",
39
+ ...i,
40
+ children: e
41
+ }
42
+ );
43
+ };
44
+ }
45
+ const we = y(/* @__PURE__ */ o("path", { d: "M20 6 9 17l-5-5" })), Ve = y(/* @__PURE__ */ o("path", { d: "M5 12h14" })), X = y(
46
+ /* @__PURE__ */ f(U, { children: [
47
+ /* @__PURE__ */ o("path", { d: "M18 6 6 18" }),
48
+ /* @__PURE__ */ o("path", { d: "m6 6 12 12" })
49
+ ] })
50
+ ), We = y(/* @__PURE__ */ o("path", { d: "m6 9 6 6 6-6" })), Ue = y(/* @__PURE__ */ o("path", { d: "m15 18-6-6 6-6" })), xe = y(/* @__PURE__ */ o("path", { d: "m9 18 6-6-6-6" })), Ze = y(
51
+ /* @__PURE__ */ f(U, { children: [
52
+ /* @__PURE__ */ o("path", { d: "m7 15 5 5 5-5" }),
53
+ /* @__PURE__ */ o("path", { d: "m7 9 5-5 5 5" })
54
+ ] })
55
+ ), ye = y(
56
+ /* @__PURE__ */ f(U, { children: [
57
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10" }),
58
+ /* @__PURE__ */ o("path", { d: "M12 16v-4" }),
59
+ /* @__PURE__ */ o("path", { d: "M12 8h.01" })
60
+ ] })
61
+ ), Te = y(
62
+ /* @__PURE__ */ f(U, { children: [
63
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10" }),
64
+ /* @__PURE__ */ o("path", { d: "m9 12 2 2 4-4" })
65
+ ] })
66
+ ), Ie = y(
67
+ /* @__PURE__ */ f(U, { children: [
68
+ /* @__PURE__ */ o("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
69
+ /* @__PURE__ */ o("path", { d: "M12 9v4" }),
70
+ /* @__PURE__ */ o("path", { d: "M12 17h.01" })
71
+ ] })
72
+ ), ke = y(
73
+ /* @__PURE__ */ f(U, { children: [
74
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "10" }),
75
+ /* @__PURE__ */ o("path", { d: "m15 9-6 6" }),
76
+ /* @__PURE__ */ o("path", { d: "m9 9 6 6" })
77
+ ] })
78
+ ), Ke = "ss-accordion-module_root", Ye = "ss-accordion-module_bordered", Je = "ss-accordion-module_item", Qe = "ss-accordion-module_trigger", Xe = "ss-accordion-module_triggerLabel", et = "ss-accordion-module_indicator", tt = "ss-accordion-module_content", ot = "ss-accordion-module_contentInner", B = {
79
+ root: Ke,
80
+ bordered: Ye,
81
+ item: Je,
82
+ trigger: Qe,
83
+ triggerLabel: Xe,
84
+ indicator: et,
85
+ content: tt,
86
+ contentInner: ot
87
+ }, De = l.createContext(null), Ae = l.createContext(null);
88
+ function le() {
89
+ const e = l.useContext(De);
90
+ if (!e) throw new Error("Accordion parts must be rendered inside Accordion.Root");
91
+ return e;
92
+ }
93
+ function Re() {
94
+ const e = l.useContext(Ae);
95
+ if (!e) throw new Error("Accordion.Trigger and Accordion.Content must be inside Accordion.Item");
96
+ return e;
97
+ }
98
+ function st({
99
+ value: e,
100
+ defaultValue: t,
101
+ onValueChange: s,
102
+ multiple: n = !1,
103
+ collapsible: r = !0,
104
+ disabled: i = !1,
105
+ variant: c = "default",
106
+ className: d,
107
+ children: u,
108
+ ...g
109
+ }) {
110
+ const _ = $(me.machine, {
111
+ id: l.useId(),
112
+ value: e,
113
+ defaultValue: t,
114
+ multiple: n,
115
+ collapsible: r,
116
+ disabled: i,
117
+ onValueChange: (m) => s?.(m.value)
118
+ }), p = me.connect(_, N);
119
+ return /* @__PURE__ */ o(De.Provider, { value: p, children: /* @__PURE__ */ o(
120
+ "div",
121
+ {
122
+ ...p.getRootProps(),
123
+ "data-ss-ui": "accordion",
124
+ className: a(B.root, c === "bordered" && B.bordered, d),
125
+ ...g,
126
+ children: u
127
+ }
128
+ ) });
129
+ }
130
+ function nt({ value: e, disabled: t, className: s, children: n, ...r }) {
131
+ const i = le(), c = l.useMemo(() => ({ value: e, disabled: t }), [e, t]);
132
+ return /* @__PURE__ */ o(Ae.Provider, { value: c, children: /* @__PURE__ */ o(
133
+ "div",
134
+ {
135
+ ...i.getItemProps({ value: e, disabled: t }),
136
+ className: a(B.item, s),
137
+ ...r,
138
+ children: n
139
+ }
140
+ ) });
141
+ }
142
+ function rt({
143
+ className: e,
144
+ children: t,
145
+ ...s
146
+ }) {
147
+ const n = le(), r = Re();
148
+ return /* @__PURE__ */ f(
149
+ "button",
150
+ {
151
+ ...n.getItemTriggerProps(r),
152
+ type: "button",
153
+ className: a(B.trigger, e),
154
+ ...s,
155
+ children: [
156
+ /* @__PURE__ */ o("span", { className: B.triggerLabel, children: t }),
157
+ /* @__PURE__ */ o("span", { ...n.getItemIndicatorProps(r), className: B.indicator, children: /* @__PURE__ */ o(We, { size: 16 }) })
158
+ ]
159
+ }
160
+ );
161
+ }
162
+ function it({
163
+ className: e,
164
+ children: t,
165
+ ...s
166
+ }) {
167
+ const n = le(), r = Re();
168
+ return /* @__PURE__ */ o("div", { ...n.getItemContentProps(r), className: a(B.content, e), ...s, children: /* @__PURE__ */ o("div", { className: B.contentInner, children: t }) });
169
+ }
170
+ const Ri = {
171
+ Root: st,
172
+ Item: nt,
173
+ Trigger: rt,
174
+ Content: it
175
+ }, at = "ss-alert-module_root", ct = "ss-alert-module_icon", lt = "ss-alert-module_body", dt = "ss-alert-module_title", ut = "ss-alert-module_description", mt = "ss-alert-module_close", pt = "ss-alert-module_info", gt = "ss-alert-module_success", ft = "ss-alert-module_warning", _t = "ss-alert-module_destructive", q = {
176
+ root: at,
177
+ icon: ct,
178
+ body: lt,
179
+ title: dt,
180
+ description: ut,
181
+ close: mt,
182
+ info: pt,
183
+ success: gt,
184
+ warning: ft,
185
+ destructive: _t
186
+ }, bt = {
187
+ info: ye,
188
+ success: Te,
189
+ warning: Ie,
190
+ destructive: ke
191
+ };
192
+ function Si({
193
+ variant: e = "info",
194
+ title: t,
195
+ description: s,
196
+ onClose: n,
197
+ closeLabel: r = "Dismiss alert",
198
+ icon: i,
199
+ children: c,
200
+ className: d,
201
+ ...u
202
+ }) {
203
+ const g = bt[e];
204
+ return /* @__PURE__ */ f(
205
+ "div",
206
+ {
207
+ role: "alert",
208
+ "data-ss-ui": "alert",
209
+ "data-variant": e,
210
+ className: a(q.root, q[e], d),
211
+ ...u,
212
+ children: [
213
+ i !== !1 && /* @__PURE__ */ o("span", { className: q.icon, "aria-hidden": "true", children: i ?? /* @__PURE__ */ o(g, { size: 16 }) }),
214
+ /* @__PURE__ */ f("div", { className: q.body, children: [
215
+ t && /* @__PURE__ */ o(ht, { children: t }),
216
+ s && /* @__PURE__ */ o(vt, { children: s }),
217
+ c
218
+ ] }),
219
+ n && /* @__PURE__ */ o(
220
+ "button",
221
+ {
222
+ type: "button",
223
+ className: q.close,
224
+ onClick: n,
225
+ "aria-label": r,
226
+ children: /* @__PURE__ */ o(X, { size: 14 })
227
+ }
228
+ )
229
+ ]
230
+ }
231
+ );
232
+ }
233
+ function ht({ className: e, ...t }) {
234
+ return /* @__PURE__ */ o("p", { className: a(q.title, e), ...t });
235
+ }
236
+ function vt({ className: e, ...t }) {
237
+ return /* @__PURE__ */ o("p", { className: a(q.description, e), ...t });
238
+ }
239
+ function $t(e, t) {
240
+ if (!(typeof e != "function" && typeof t != "function"))
241
+ return (...s) => {
242
+ typeof e == "function" && e(...s), typeof t == "function" && t(...s);
243
+ };
244
+ }
245
+ function Nt(e, t) {
246
+ const s = { ...e, ...t };
247
+ for (const n of Object.keys(e)) {
248
+ const r = e[n], i = t[n];
249
+ n === "className" ? s.className = a(r, i) : n === "style" ? s.style = {
250
+ ...typeof r == "object" && r !== null ? r : {},
251
+ ...typeof i == "object" && i !== null ? i : {}
252
+ } : /^on[A-Z]/.test(n) && typeof r == "function" && typeof i == "function" && (s[n] = $t(i, r));
253
+ }
254
+ return s;
255
+ }
256
+ function T({ children: e, ...t }) {
257
+ if (!l.isValidElement(e))
258
+ return null;
259
+ const s = Nt(t, e.props);
260
+ return l.cloneElement(e, s);
261
+ }
262
+ const Ct = "ss-alert-dialog-module_backdrop", Pt = "ss-alert-dialog-module_positioner", wt = "ss-alert-dialog-module_content", xt = "ss-alert-dialog-module_header", yt = "ss-alert-dialog-module_title", Tt = "ss-alert-dialog-module_description", It = "ss-alert-dialog-module_footer", O = {
263
+ backdrop: Ct,
264
+ positioner: Pt,
265
+ content: wt,
266
+ header: xt,
267
+ title: yt,
268
+ description: Tt,
269
+ footer: It
270
+ }, Se = l.createContext(null);
271
+ function Z() {
272
+ const e = l.useContext(Se);
273
+ if (!e) throw new Error("AlertDialog parts must be rendered inside AlertDialog.Root");
274
+ return e;
275
+ }
276
+ function kt({
277
+ children: e,
278
+ open: t,
279
+ defaultOpen: s,
280
+ onOpenChange: n
281
+ }) {
282
+ const r = t !== void 0, i = $(W.machine, {
283
+ id: l.useId(),
284
+ role: "alertdialog",
285
+ ...r ? { open: t } : { defaultOpen: s },
286
+ closeOnInteractOutside: !1,
287
+ closeOnEscape: !0,
288
+ preventScroll: !0,
289
+ onOpenChange: (d) => n?.(d.open)
290
+ }), c = W.connect(i, N);
291
+ return /* @__PURE__ */ o(Se.Provider, { value: c, children: e });
292
+ }
293
+ function Dt({ asChild: e = !1, children: t, ...s }) {
294
+ const n = Z();
295
+ return e ? /* @__PURE__ */ o(T, { ...n.getTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getTriggerProps(), ...s, children: t });
296
+ }
297
+ function At({
298
+ className: e,
299
+ children: t,
300
+ ...s
301
+ }) {
302
+ const n = Z();
303
+ return n.open ? /* @__PURE__ */ f(z, { children: [
304
+ /* @__PURE__ */ o("div", { ...n.getBackdropProps(), className: O.backdrop }),
305
+ /* @__PURE__ */ o("div", { ...n.getPositionerProps(), className: O.positioner, children: /* @__PURE__ */ o(
306
+ "div",
307
+ {
308
+ ...n.getContentProps(),
309
+ "data-ss-ui": "alert-dialog",
310
+ className: a(O.content, e),
311
+ ...s,
312
+ children: t
313
+ }
314
+ ) })
315
+ ] }) : null;
316
+ }
317
+ function Rt({ className: e, ...t }) {
318
+ return /* @__PURE__ */ o("div", { className: a(O.header, e), ...t });
319
+ }
320
+ function St({ className: e, ...t }) {
321
+ const s = Z();
322
+ return /* @__PURE__ */ o("h2", { ...s.getTitleProps(), className: a(O.title, e), ...t });
323
+ }
324
+ function Bt({
325
+ className: e,
326
+ ...t
327
+ }) {
328
+ const s = Z();
329
+ return /* @__PURE__ */ o("p", { ...s.getDescriptionProps(), className: a(O.description, e), ...t });
330
+ }
331
+ function zt({ className: e, ...t }) {
332
+ return /* @__PURE__ */ o("div", { className: a(O.footer, e), ...t });
333
+ }
334
+ function Mt({ asChild: e = !1, children: t, ...s }) {
335
+ const n = Z();
336
+ return e ? /* @__PURE__ */ o(T, { ...n.getCloseTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getCloseTriggerProps(), ...s, children: t });
337
+ }
338
+ function Et({
339
+ asChild: e = !1,
340
+ onClick: t,
341
+ children: s,
342
+ ...n
343
+ }) {
344
+ const r = Z(), i = (c) => {
345
+ t?.(c), c.defaultPrevented || r.setOpen(!1);
346
+ };
347
+ return e ? /* @__PURE__ */ o(T, { onClick: i, ...n, children: s }) : /* @__PURE__ */ o("button", { type: "button", onClick: i, ...n, children: s });
348
+ }
349
+ const Bi = {
350
+ Root: kt,
351
+ Trigger: Dt,
352
+ Content: At,
353
+ Header: Rt,
354
+ Title: St,
355
+ Description: Bt,
356
+ Footer: zt,
357
+ Cancel: Mt,
358
+ Action: Et
359
+ }, Lt = "ss-avatar-module_root", Ft = "ss-avatar-module_circle", qt = "ss-avatar-module_rounded", Ot = "ss-avatar-module_xs", Ht = "ss-avatar-module_sm", jt = "ss-avatar-module_md", Gt = "ss-avatar-module_lg", Vt = "ss-avatar-module_xl", Wt = "ss-avatar-module_image", Ut = "ss-avatar-module_fallback", Zt = "ss-avatar-module_status", Kt = "ss-avatar-module_status_online", Yt = "ss-avatar-module_status_busy", Jt = "ss-avatar-module_status_away", Qt = "ss-avatar-module_status_offline", M = {
360
+ root: Lt,
361
+ circle: Ft,
362
+ rounded: qt,
363
+ xs: Ot,
364
+ sm: Ht,
365
+ md: jt,
366
+ lg: Gt,
367
+ xl: Vt,
368
+ image: Wt,
369
+ fallback: Ut,
370
+ status: Zt,
371
+ status_online: Kt,
372
+ status_busy: Yt,
373
+ status_away: Jt,
374
+ status_offline: Qt
375
+ };
376
+ function Xt(e) {
377
+ if (!e) return "?";
378
+ const t = e.trim().split(/\s+/).filter(Boolean);
379
+ if (t.length === 0) return "?";
380
+ if (t.length === 1) return (t[0] ?? "").slice(0, 2).toUpperCase();
381
+ const s = t[0]?.[0] ?? "", n = t[t.length - 1]?.[0] ?? "";
382
+ return `${s}${n}`.toUpperCase();
383
+ }
384
+ function eo(e) {
385
+ let t = 0;
386
+ for (let s = 0; s < e.length; s += 1)
387
+ t = t * 31 + e.charCodeAt(s) >>> 0;
388
+ return t % 360;
389
+ }
390
+ function zi({
391
+ src: e,
392
+ alt: t,
393
+ name: s,
394
+ fallback: n,
395
+ size: r = "md",
396
+ shape: i = "circle",
397
+ status: c,
398
+ className: d,
399
+ style: u,
400
+ ...g
401
+ }) {
402
+ const [_, p] = l.useState(!1);
403
+ l.useEffect(() => {
404
+ p(!1);
405
+ }, [e]);
406
+ const m = !!(e && !_), b = t ?? s ?? "Avatar", h = eo(s || t || "user");
407
+ return /* @__PURE__ */ f(
408
+ "span",
409
+ {
410
+ role: "img",
411
+ "aria-label": b,
412
+ "data-ss-ui": "avatar",
413
+ "data-size": r,
414
+ "data-shape": i,
415
+ className: a(M.root, M[r], M[i], d),
416
+ style: !m && !n ? { "--ss-avatar-hue": String(h), ...u } : u,
417
+ ...g,
418
+ children: [
419
+ m ? /* @__PURE__ */ o(
420
+ "img",
421
+ {
422
+ src: e,
423
+ alt: b,
424
+ className: M.image,
425
+ onError: () => p(!0)
426
+ }
427
+ ) : /* @__PURE__ */ o("span", { className: M.fallback, "aria-hidden": "true", children: n ?? Xt(s ?? t) }),
428
+ c && /* @__PURE__ */ o(
429
+ "span",
430
+ {
431
+ className: a(M.status, M[`status_${c}`]),
432
+ "aria-label": c
433
+ }
434
+ )
435
+ ]
436
+ }
437
+ );
438
+ }
439
+ const to = "ss-badge-module_root", oo = "ss-badge-module_sm", so = "ss-badge-module_md", no = "ss-badge-module_dot", ro = "ss-badge-module_secondary", io = "ss-badge-module_outline", ao = "ss-badge-module_success", co = "ss-badge-module_warning", lo = "ss-badge-module_destructive", uo = "ss-badge-module_info", ne = {
440
+ root: to,
441
+ sm: oo,
442
+ md: so,
443
+ dot: no,
444
+ default: "ss-badge-module_default",
445
+ secondary: ro,
446
+ outline: io,
447
+ success: ao,
448
+ warning: co,
449
+ destructive: lo,
450
+ info: uo
451
+ };
452
+ function Mi({
453
+ children: e,
454
+ variant: t = "secondary",
455
+ size: s = "md",
456
+ dot: n = !1,
457
+ className: r,
458
+ ...i
459
+ }) {
460
+ return /* @__PURE__ */ f(
461
+ "span",
462
+ {
463
+ "data-ss-ui": "badge",
464
+ "data-variant": t,
465
+ "data-size": s,
466
+ className: a(ne.root, ne[t], ne[s], r),
467
+ ...i,
468
+ children: [
469
+ n && /* @__PURE__ */ o("span", { className: ne.dot, "aria-hidden": "true" }),
470
+ e
471
+ ]
472
+ }
473
+ );
474
+ }
475
+ const mo = "ss-breadcrumb-module_nav", po = "ss-breadcrumb-module_list", go = "ss-breadcrumb-module_item", fo = "ss-breadcrumb-module_link", _o = "ss-breadcrumb-module_page", bo = "ss-breadcrumb-module_separator", K = {
476
+ nav: mo,
477
+ list: po,
478
+ item: go,
479
+ link: fo,
480
+ page: _o,
481
+ separator: bo
482
+ };
483
+ function ho({
484
+ "aria-label": e = "Breadcrumb",
485
+ className: t,
486
+ ...s
487
+ }) {
488
+ return /* @__PURE__ */ o(
489
+ "nav",
490
+ {
491
+ "aria-label": e,
492
+ "data-ss-ui": "breadcrumb",
493
+ className: a(K.nav, t),
494
+ ...s
495
+ }
496
+ );
497
+ }
498
+ function vo({ className: e, ...t }) {
499
+ return /* @__PURE__ */ o("ol", { className: a(K.list, e), ...t });
500
+ }
501
+ function $o({ className: e, ...t }) {
502
+ return /* @__PURE__ */ o("li", { className: a(K.item, e), ...t });
503
+ }
504
+ function No({ className: e, ...t }) {
505
+ return /* @__PURE__ */ o("a", { className: a(K.link, e), ...t });
506
+ }
507
+ function Co({ className: e, ...t }) {
508
+ return /* @__PURE__ */ o("span", { "aria-current": "page", className: a(K.page, e), ...t });
509
+ }
510
+ function Po({
511
+ children: e,
512
+ className: t,
513
+ ...s
514
+ }) {
515
+ return /* @__PURE__ */ o("span", { role: "presentation", "aria-hidden": "true", className: a(K.separator, t), ...s, children: e ?? /* @__PURE__ */ o(xe, { size: 14 }) });
516
+ }
517
+ const Ei = {
518
+ Root: ho,
519
+ List: vo,
520
+ Item: $o,
521
+ Link: No,
522
+ Page: Co,
523
+ Separator: Po
524
+ }, wo = "ss-button-module_root", xo = "ss-button-module_sm", yo = "ss-button-module_md", To = "ss-button-module_lg", Io = "ss-button-module_icon", ko = "ss-button-module_secondary", Do = "ss-button-module_outline", Ao = "ss-button-module_ghost", Ro = "ss-button-module_destructive", So = "ss-button-module_link", Bo = "ss-button-module_disabled", zo = "ss-button-module_spinner", J = {
525
+ root: wo,
526
+ sm: xo,
527
+ md: yo,
528
+ lg: To,
529
+ icon: Io,
530
+ default: "ss-button-module_default",
531
+ secondary: ko,
532
+ outline: Do,
533
+ ghost: Ao,
534
+ destructive: Ro,
535
+ link: So,
536
+ disabled: Bo,
537
+ spinner: zo,
538
+ "ss-spin": "ss-button-module_ss-spin"
539
+ };
540
+ function Mo({
541
+ variant: e = "default",
542
+ size: t = "md",
543
+ className: s
544
+ } = {}) {
545
+ return a(J.root, J[e], J[t], s);
546
+ }
547
+ function Li({
548
+ children: e,
549
+ variant: t = "default",
550
+ size: s = "md",
551
+ type: n = "button",
552
+ isLoading: r = !1,
553
+ leftIcon: i,
554
+ rightIcon: c,
555
+ disabled: d,
556
+ className: u,
557
+ ref: g,
558
+ ..._
559
+ }) {
560
+ const p = !!(d || r);
561
+ return /* @__PURE__ */ f(
562
+ "button",
563
+ {
564
+ ref: g,
565
+ type: n,
566
+ disabled: p,
567
+ "aria-busy": r || void 0,
568
+ "data-ss-ui": "button",
569
+ "data-variant": t,
570
+ "data-size": s,
571
+ className: a(Mo({ variant: t, size: s, className: u }), p && J.disabled),
572
+ ..._,
573
+ children: [
574
+ r ? /* @__PURE__ */ o("span", { className: J.spinner, "aria-hidden": "true" }) : i,
575
+ e,
576
+ !r && c
577
+ ]
578
+ }
579
+ );
580
+ }
581
+ const Eo = "ss-card-module_card", Lo = "ss-card-module_interactive", Fo = "ss-card-module_header", qo = "ss-card-module_headerAction", Oo = "ss-card-module_headerBordered", Ho = "ss-card-module_title", jo = "ss-card-module_description", Go = "ss-card-module_action", Vo = "ss-card-module_content", Wo = "ss-card-module_footer", Uo = "ss-card-module_footerBordered", x = {
582
+ card: Eo,
583
+ interactive: Lo,
584
+ header: Fo,
585
+ headerAction: qo,
586
+ headerBordered: Oo,
587
+ title: Ho,
588
+ description: jo,
589
+ action: Go,
590
+ content: Vo,
591
+ footer: Wo,
592
+ footerBordered: Uo
593
+ };
594
+ function Fi({ interactive: e = !1, className: t, ...s }) {
595
+ return /* @__PURE__ */ o(
596
+ "div",
597
+ {
598
+ "data-ss-ui": "card",
599
+ className: a(x.card, e && x.interactive, t),
600
+ ...s
601
+ }
602
+ );
603
+ }
604
+ function qi({
605
+ bordered: e = !1,
606
+ hasAction: t = !1,
607
+ className: s,
608
+ ...n
609
+ }) {
610
+ return /* @__PURE__ */ o(
611
+ "div",
612
+ {
613
+ className: a(
614
+ x.header,
615
+ e && x.headerBordered,
616
+ t && x.headerAction,
617
+ s
618
+ ),
619
+ ...n
620
+ }
621
+ );
622
+ }
623
+ function Oi({ className: e, ...t }) {
624
+ return /* @__PURE__ */ o("h3", { className: a(x.title, e), ...t });
625
+ }
626
+ function Hi({ className: e, ...t }) {
627
+ return /* @__PURE__ */ o("p", { className: a(x.description, e), ...t });
628
+ }
629
+ function ji({ className: e, ...t }) {
630
+ return /* @__PURE__ */ o("div", { className: a(x.action, e), ...t });
631
+ }
632
+ function Gi({ className: e, ...t }) {
633
+ return /* @__PURE__ */ o("div", { className: a(x.content, e), ...t });
634
+ }
635
+ function Vi({ bordered: e = !1, className: t, ...s }) {
636
+ return /* @__PURE__ */ o("div", { className: a(x.footer, e && x.footerBordered, t), ...s });
637
+ }
638
+ const Zo = "ss-checkbox-module_root", Ko = "ss-checkbox-module_control", Yo = "ss-checkbox-module_sm", Jo = "ss-checkbox-module_md", Qo = "ss-checkbox-module_lg", Xo = "ss-checkbox-module_text", es = "ss-checkbox-module_label", ts = "ss-checkbox-module_description", G = {
639
+ root: Zo,
640
+ control: Ko,
641
+ sm: Yo,
642
+ md: Jo,
643
+ lg: Qo,
644
+ text: Xo,
645
+ label: es,
646
+ description: ts
647
+ };
648
+ function Wi({
649
+ label: e,
650
+ description: t,
651
+ checked: s,
652
+ defaultChecked: n = !1,
653
+ onCheckedChange: r,
654
+ size: i = "md",
655
+ disabled: c = !1,
656
+ invalid: d = !1,
657
+ required: u = !1,
658
+ readOnly: g = !1,
659
+ name: _,
660
+ value: p,
661
+ className: m,
662
+ "aria-label": b
663
+ }) {
664
+ const h = s !== void 0, R = $(pe.machine, {
665
+ id: l.useId(),
666
+ ...h ? { checked: s } : { defaultChecked: n },
667
+ disabled: c,
668
+ invalid: d,
669
+ required: u,
670
+ readOnly: g,
671
+ name: _,
672
+ value: p,
673
+ onCheckedChange: (ie) => r?.(ie.checked)
674
+ }), v = pe.connect(R, N), j = i === "sm" ? 12 : i === "lg" ? 16 : 14;
675
+ return /* @__PURE__ */ f(
676
+ "label",
677
+ {
678
+ ...v.getRootProps(),
679
+ "data-ss-ui": "checkbox",
680
+ "data-size": i,
681
+ className: a(G.root, G[i], m),
682
+ children: [
683
+ /* @__PURE__ */ o("span", { ...v.getControlProps(), className: G.control, children: v.indeterminate ? /* @__PURE__ */ o(Ve, { size: j, strokeWidth: 2.5 }) : v.checked && /* @__PURE__ */ o(we, { size: j, strokeWidth: 2.5 }) }),
684
+ (e || t) && /* @__PURE__ */ f("span", { className: G.text, children: [
685
+ e && /* @__PURE__ */ o("span", { ...v.getLabelProps(), className: G.label, children: e }),
686
+ t && /* @__PURE__ */ o("span", { className: G.description, children: t })
687
+ ] }),
688
+ /* @__PURE__ */ o("input", { ...v.getHiddenInputProps(), "aria-label": b })
689
+ ]
690
+ }
691
+ );
692
+ }
693
+ const os = "ss-dialog-module_backdrop", ss = "ss-dialog-module_positioner", ns = "ss-dialog-module_content", rs = "ss-dialog-module_sm", is = "ss-dialog-module_md", as = "ss-dialog-module_lg", cs = "ss-dialog-module_header", ls = "ss-dialog-module_title", ds = "ss-dialog-module_description", us = "ss-dialog-module_body", ms = "ss-dialog-module_footer", ps = "ss-dialog-module_close", D = {
694
+ backdrop: os,
695
+ "ss-fade-in": "ss-dialog-module_ss-fade-in",
696
+ positioner: ss,
697
+ content: ns,
698
+ "ss-dialog-enter": "ss-dialog-module_ss-dialog-enter",
699
+ sm: rs,
700
+ md: is,
701
+ lg: as,
702
+ header: cs,
703
+ title: ls,
704
+ description: ds,
705
+ body: us,
706
+ footer: ms,
707
+ close: ps
708
+ }, Be = l.createContext(null);
709
+ function ee() {
710
+ const e = l.useContext(Be);
711
+ if (!e) throw new Error("Dialog parts must be rendered inside Dialog.Root");
712
+ return e;
713
+ }
714
+ function gs({
715
+ children: e,
716
+ open: t,
717
+ defaultOpen: s,
718
+ onOpenChange: n,
719
+ role: r = "dialog",
720
+ closeOnInteractOutside: i = !0,
721
+ closeOnEscape: c = !0,
722
+ preventScroll: d = !0
723
+ }) {
724
+ const u = t !== void 0, g = $(W.machine, {
725
+ id: l.useId(),
726
+ role: r,
727
+ ...u ? { open: t } : { defaultOpen: s },
728
+ closeOnInteractOutside: i,
729
+ closeOnEscape: c,
730
+ preventScroll: d,
731
+ onOpenChange: (p) => n?.(p.open)
732
+ }), _ = W.connect(g, N);
733
+ return /* @__PURE__ */ o(Be.Provider, { value: _, children: e });
734
+ }
735
+ function fs({ asChild: e = !1, children: t, ...s }) {
736
+ const n = ee();
737
+ return e ? /* @__PURE__ */ o(T, { ...n.getTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getTriggerProps(), ...s, children: t });
738
+ }
739
+ function _s({
740
+ size: e = "md",
741
+ showClose: t = !0,
742
+ closeLabel: s = "Close dialog",
743
+ className: n,
744
+ children: r,
745
+ ...i
746
+ }) {
747
+ const c = ee();
748
+ return c.open ? /* @__PURE__ */ f(z, { children: [
749
+ /* @__PURE__ */ o("div", { ...c.getBackdropProps(), className: D.backdrop }),
750
+ /* @__PURE__ */ o("div", { ...c.getPositionerProps(), className: D.positioner, children: /* @__PURE__ */ f(
751
+ "div",
752
+ {
753
+ ...c.getContentProps(),
754
+ "data-ss-ui": "dialog",
755
+ "data-size": e,
756
+ className: a(D.content, D[e], n),
757
+ ...i,
758
+ children: [
759
+ t && /* @__PURE__ */ o(
760
+ "button",
761
+ {
762
+ ...c.getCloseTriggerProps(),
763
+ type: "button",
764
+ "aria-label": s,
765
+ className: D.close,
766
+ children: /* @__PURE__ */ o(X, { size: 16 })
767
+ }
768
+ ),
769
+ r
770
+ ]
771
+ }
772
+ ) })
773
+ ] }) : null;
774
+ }
775
+ function bs({ className: e, ...t }) {
776
+ return /* @__PURE__ */ o("div", { className: a(D.header, e), ...t });
777
+ }
778
+ function hs({ className: e, ...t }) {
779
+ const s = ee();
780
+ return /* @__PURE__ */ o("h2", { ...s.getTitleProps(), className: a(D.title, e), ...t });
781
+ }
782
+ function vs({
783
+ className: e,
784
+ ...t
785
+ }) {
786
+ const s = ee();
787
+ return /* @__PURE__ */ o("p", { ...s.getDescriptionProps(), className: a(D.description, e), ...t });
788
+ }
789
+ function $s({ className: e, ...t }) {
790
+ return /* @__PURE__ */ o("div", { className: a(D.body, e), ...t });
791
+ }
792
+ function Ns({ className: e, ...t }) {
793
+ return /* @__PURE__ */ o("div", { className: a(D.footer, e), ...t });
794
+ }
795
+ function Cs({ asChild: e = !1, children: t, ...s }) {
796
+ const n = ee();
797
+ return e ? /* @__PURE__ */ o(T, { ...n.getCloseTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getCloseTriggerProps(), ...s, children: t });
798
+ }
799
+ const Ui = {
800
+ Root: gs,
801
+ Trigger: fs,
802
+ Content: _s,
803
+ Header: bs,
804
+ Title: hs,
805
+ Description: vs,
806
+ Body: $s,
807
+ Footer: Ns,
808
+ Close: Cs
809
+ }, Ps = "ss-drawer-module_backdrop", ws = "ss-drawer-module_positioner", xs = "ss-drawer-module_pos_right", ys = "ss-drawer-module_pos_left", Ts = "ss-drawer-module_pos_bottom", Is = "ss-drawer-module_content", ks = "ss-drawer-module_side_right", Ds = "ss-drawer-module_side_left", As = "ss-drawer-module_side_bottom", Rs = "ss-drawer-module_size_sm", Ss = "ss-drawer-module_size_md", Bs = "ss-drawer-module_size_lg", zs = "ss-drawer-module_header", Ms = "ss-drawer-module_title", Es = "ss-drawer-module_description", Ls = "ss-drawer-module_body", Fs = "ss-drawer-module_footer", qs = "ss-drawer-module_close", P = {
810
+ backdrop: Ps,
811
+ "ss-fade-in": "ss-drawer-module_ss-fade-in",
812
+ positioner: ws,
813
+ pos_right: xs,
814
+ pos_left: ys,
815
+ pos_bottom: Ts,
816
+ content: Is,
817
+ side_right: ks,
818
+ side_left: Ds,
819
+ "ss-slide-right": "ss-drawer-module_ss-slide-right",
820
+ "ss-slide-left": "ss-drawer-module_ss-slide-left",
821
+ side_bottom: As,
822
+ "ss-slide-bottom": "ss-drawer-module_ss-slide-bottom",
823
+ size_sm: Rs,
824
+ size_md: Ss,
825
+ size_lg: Bs,
826
+ header: zs,
827
+ title: Ms,
828
+ description: Es,
829
+ body: Ls,
830
+ footer: Fs,
831
+ close: qs
832
+ }, ze = l.createContext(null);
833
+ function te() {
834
+ const e = l.useContext(ze);
835
+ if (!e) throw new Error("Drawer parts must be rendered inside Drawer.Root");
836
+ return e;
837
+ }
838
+ function Os({
839
+ children: e,
840
+ open: t,
841
+ defaultOpen: s,
842
+ onOpenChange: n,
843
+ closeOnInteractOutside: r = !0,
844
+ closeOnEscape: i = !0,
845
+ preventScroll: c = !0
846
+ }) {
847
+ const d = t !== void 0, u = $(W.machine, {
848
+ id: l.useId(),
849
+ role: "dialog",
850
+ ...d ? { open: t } : { defaultOpen: s },
851
+ closeOnInteractOutside: r,
852
+ closeOnEscape: i,
853
+ preventScroll: c,
854
+ onOpenChange: (_) => n?.(_.open)
855
+ }), g = W.connect(u, N);
856
+ return /* @__PURE__ */ o(ze.Provider, { value: g, children: e });
857
+ }
858
+ function Hs({ asChild: e = !1, children: t, ...s }) {
859
+ const n = te();
860
+ return e ? /* @__PURE__ */ o(T, { ...n.getTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getTriggerProps(), ...s, children: t });
861
+ }
862
+ function js({
863
+ side: e = "right",
864
+ size: t = "md",
865
+ showClose: s = !0,
866
+ closeLabel: n = "Close drawer",
867
+ className: r,
868
+ children: i,
869
+ ...c
870
+ }) {
871
+ const d = te();
872
+ return d.open ? /* @__PURE__ */ f(z, { children: [
873
+ /* @__PURE__ */ o("div", { ...d.getBackdropProps(), className: P.backdrop }),
874
+ /* @__PURE__ */ o("div", { ...d.getPositionerProps(), className: a(P.positioner, P[`pos_${e}`]), children: /* @__PURE__ */ f(
875
+ "div",
876
+ {
877
+ ...d.getContentProps(),
878
+ "data-ss-ui": "drawer",
879
+ "data-side": e,
880
+ "data-size": t,
881
+ className: a(P.content, P[`side_${e}`], P[`size_${t}`], r),
882
+ ...c,
883
+ children: [
884
+ s && /* @__PURE__ */ o(
885
+ "button",
886
+ {
887
+ ...d.getCloseTriggerProps(),
888
+ type: "button",
889
+ "aria-label": n,
890
+ className: P.close,
891
+ children: /* @__PURE__ */ o(X, { size: 16 })
892
+ }
893
+ ),
894
+ i
895
+ ]
896
+ }
897
+ ) })
898
+ ] }) : null;
899
+ }
900
+ function Gs({ className: e, ...t }) {
901
+ return /* @__PURE__ */ o("div", { className: a(P.header, e), ...t });
902
+ }
903
+ function Vs({ className: e, ...t }) {
904
+ const s = te();
905
+ return /* @__PURE__ */ o("h2", { ...s.getTitleProps(), className: a(P.title, e), ...t });
906
+ }
907
+ function Ws({
908
+ className: e,
909
+ ...t
910
+ }) {
911
+ const s = te();
912
+ return /* @__PURE__ */ o("p", { ...s.getDescriptionProps(), className: a(P.description, e), ...t });
913
+ }
914
+ function Us({ className: e, ...t }) {
915
+ return /* @__PURE__ */ o("div", { className: a(P.body, e), ...t });
916
+ }
917
+ function Zs({ className: e, ...t }) {
918
+ return /* @__PURE__ */ o("div", { className: a(P.footer, e), ...t });
919
+ }
920
+ function Ks({ asChild: e = !1, children: t, ...s }) {
921
+ const n = te();
922
+ return e ? /* @__PURE__ */ o(T, { ...n.getCloseTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getCloseTriggerProps(), ...s, children: t });
923
+ }
924
+ const Zi = {
925
+ Root: Os,
926
+ Trigger: Hs,
927
+ Content: js,
928
+ Header: Gs,
929
+ Title: Vs,
930
+ Description: Ws,
931
+ Body: Us,
932
+ Footer: Zs,
933
+ Close: Ks
934
+ }, Ys = "ss-empty-state-module_root", Js = "ss-empty-state-module_compact", Qs = "ss-empty-state-module_icon", Xs = "ss-empty-state-module_copy", en = "ss-empty-state-module_title", tn = "ss-empty-state-module_description", on = "ss-empty-state-module_action", E = {
935
+ root: Ys,
936
+ compact: Js,
937
+ icon: Qs,
938
+ copy: Xs,
939
+ title: en,
940
+ description: tn,
941
+ action: on
942
+ };
943
+ function Ki({
944
+ icon: e,
945
+ title: t,
946
+ description: s,
947
+ action: n,
948
+ compact: r = !1,
949
+ className: i,
950
+ ...c
951
+ }) {
952
+ return /* @__PURE__ */ f(
953
+ "div",
954
+ {
955
+ "data-ss-ui": "empty-state",
956
+ className: a(E.root, r && E.compact, i),
957
+ ...c,
958
+ children: [
959
+ e && /* @__PURE__ */ o("div", { className: E.icon, "aria-hidden": "true", children: e }),
960
+ /* @__PURE__ */ f("div", { className: E.copy, children: [
961
+ /* @__PURE__ */ o("h3", { className: E.title, children: t }),
962
+ s && /* @__PURE__ */ o("p", { className: E.description, children: s })
963
+ ] }),
964
+ n && /* @__PURE__ */ o("div", { className: E.action, children: n })
965
+ ]
966
+ }
967
+ );
968
+ }
969
+ const sn = "ss-field-module_root", nn = "ss-field-module_label", rn = "ss-field-module_labelDisabled", an = "ss-field-module_required", cn = "ss-field-module_description", ln = "ss-field-module_error", V = {
970
+ root: sn,
971
+ label: nn,
972
+ labelDisabled: rn,
973
+ required: an,
974
+ description: cn,
975
+ error: ln
976
+ }, Me = l.createContext(null);
977
+ function Y() {
978
+ return l.useContext(Me);
979
+ }
980
+ function dn({
981
+ id: e,
982
+ invalid: t = !1,
983
+ disabled: s = !1,
984
+ required: n = !1,
985
+ className: r,
986
+ children: i,
987
+ ...c
988
+ }) {
989
+ const d = l.useId(), u = e ?? d, g = l.useMemo(
990
+ () => ({
991
+ id: u,
992
+ descriptionId: `${u}-description`,
993
+ errorId: `${u}-error`,
994
+ invalid: t,
995
+ disabled: s,
996
+ required: n
997
+ }),
998
+ [u, t, s, n]
999
+ );
1000
+ return /* @__PURE__ */ o(Me.Provider, { value: g, children: /* @__PURE__ */ o(
1001
+ "div",
1002
+ {
1003
+ "data-ss-ui": "field",
1004
+ "data-invalid": t || void 0,
1005
+ "data-disabled": s || void 0,
1006
+ className: a(V.root, r),
1007
+ ...c,
1008
+ children: i
1009
+ }
1010
+ ) });
1011
+ }
1012
+ function un({ required: e, className: t, children: s, htmlFor: n, ...r }) {
1013
+ const i = Y(), c = e ?? i?.required ?? !1;
1014
+ return /* @__PURE__ */ f(
1015
+ "label",
1016
+ {
1017
+ htmlFor: n ?? i?.id,
1018
+ className: a(V.label, i?.disabled && V.labelDisabled, t),
1019
+ ...r,
1020
+ children: [
1021
+ s,
1022
+ c && /* @__PURE__ */ o("span", { className: V.required, "aria-hidden": "true", children: "*" })
1023
+ ]
1024
+ }
1025
+ );
1026
+ }
1027
+ function mn({
1028
+ id: e,
1029
+ className: t,
1030
+ ...s
1031
+ }) {
1032
+ const n = Y();
1033
+ return /* @__PURE__ */ o("p", { id: e ?? n?.descriptionId, className: a(V.description, t), ...s });
1034
+ }
1035
+ function pn({ id: e, className: t, ...s }) {
1036
+ const n = Y();
1037
+ return /* @__PURE__ */ o(
1038
+ "p",
1039
+ {
1040
+ id: e ?? n?.errorId,
1041
+ role: "alert",
1042
+ "aria-live": "polite",
1043
+ className: a(V.error, t),
1044
+ ...s
1045
+ }
1046
+ );
1047
+ }
1048
+ const Yi = {
1049
+ Root: dn,
1050
+ Label: un,
1051
+ Description: mn,
1052
+ Error: pn
1053
+ }, gn = "ss-input-module_input", fn = "ss-input-module_group", _n = "ss-input-module_bareInput", bn = "ss-input-module_sm", hn = "ss-input-module_group_sm", vn = "ss-input-module_md", $n = "ss-input-module_group_md", Nn = "ss-input-module_lg", Cn = "ss-input-module_group_lg", Pn = "ss-input-module_invalid", wn = "ss-input-module_affix", xn = "ss-input-module_textarea", C = {
1054
+ input: gn,
1055
+ group: fn,
1056
+ bareInput: _n,
1057
+ sm: bn,
1058
+ group_sm: hn,
1059
+ md: vn,
1060
+ group_md: $n,
1061
+ lg: Nn,
1062
+ group_lg: Cn,
1063
+ invalid: Pn,
1064
+ affix: wn,
1065
+ textarea: xn
1066
+ };
1067
+ function Ji({
1068
+ size: e = "md",
1069
+ invalid: t,
1070
+ disabled: s,
1071
+ required: n,
1072
+ id: r,
1073
+ prefix: i,
1074
+ suffix: c,
1075
+ className: d,
1076
+ "aria-describedby": u,
1077
+ ref: g,
1078
+ ..._
1079
+ }) {
1080
+ const p = Y(), m = t ?? p?.invalid ?? !1, b = s ?? p?.disabled ?? !1, h = n ?? p?.required ?? !1, R = u ?? (p ? m ? p.errorId : p.descriptionId : void 0);
1081
+ return i || c ? /* @__PURE__ */ f(
1082
+ "div",
1083
+ {
1084
+ "data-ss-ui": "input-group",
1085
+ "data-invalid": m || void 0,
1086
+ "data-disabled": b || void 0,
1087
+ className: a(C.group, C[`group_${e}`], m && C.invalid, d),
1088
+ children: [
1089
+ i && /* @__PURE__ */ o("span", { className: C.affix, children: i }),
1090
+ /* @__PURE__ */ o(
1091
+ "input",
1092
+ {
1093
+ ref: g,
1094
+ id: r ?? p?.id,
1095
+ disabled: b,
1096
+ required: h,
1097
+ "aria-invalid": m || void 0,
1098
+ "aria-describedby": R,
1099
+ className: C.bareInput,
1100
+ ..._
1101
+ }
1102
+ ),
1103
+ c && /* @__PURE__ */ o("span", { className: C.affix, children: c })
1104
+ ]
1105
+ }
1106
+ ) : /* @__PURE__ */ o(
1107
+ "input",
1108
+ {
1109
+ ref: g,
1110
+ id: r ?? p?.id,
1111
+ disabled: b,
1112
+ required: h,
1113
+ "aria-invalid": m || void 0,
1114
+ "aria-describedby": R,
1115
+ "data-ss-ui": "input",
1116
+ "data-size": e,
1117
+ className: a(C.input, C[e], m && C.invalid, d),
1118
+ ..._
1119
+ }
1120
+ );
1121
+ }
1122
+ function Qi({
1123
+ invalid: e,
1124
+ disabled: t,
1125
+ required: s,
1126
+ id: n,
1127
+ className: r,
1128
+ "aria-describedby": i,
1129
+ ref: c,
1130
+ ...d
1131
+ }) {
1132
+ const u = Y(), g = e ?? u?.invalid ?? !1, _ = t ?? u?.disabled ?? !1, p = s ?? u?.required ?? !1, m = i ?? (u ? g ? u.errorId : u.descriptionId : void 0);
1133
+ return /* @__PURE__ */ o(
1134
+ "textarea",
1135
+ {
1136
+ ref: c,
1137
+ id: n ?? u?.id,
1138
+ disabled: _,
1139
+ required: p,
1140
+ "aria-invalid": g || void 0,
1141
+ "aria-describedby": m,
1142
+ "data-ss-ui": "textarea",
1143
+ className: a(C.input, C.textarea, g && C.invalid, r),
1144
+ ...d
1145
+ }
1146
+ );
1147
+ }
1148
+ const yn = "ss-kbd-module_root", Tn = "ss-kbd-module_sm", In = "ss-kbd-module_md", $e = {
1149
+ root: yn,
1150
+ sm: Tn,
1151
+ md: In
1152
+ };
1153
+ function Xi({ size: e = "md", className: t, ...s }) {
1154
+ return /* @__PURE__ */ o(
1155
+ "kbd",
1156
+ {
1157
+ "data-ss-ui": "kbd",
1158
+ "data-size": e,
1159
+ className: a($e.root, $e[e], t),
1160
+ ...s
1161
+ }
1162
+ );
1163
+ }
1164
+ const kn = "ss-menu-module_positioner", Dn = "ss-menu-module_content", An = "ss-menu-module_item", Rn = "ss-menu-module_destructive", Sn = "ss-menu-module_icon", Bn = "ss-menu-module_label", zn = "ss-menu-module_shortcut", Mn = "ss-menu-module_separator", En = "ss-menu-module_group", Ln = "ss-menu-module_groupLabel", A = {
1165
+ positioner: kn,
1166
+ content: Dn,
1167
+ item: An,
1168
+ destructive: Rn,
1169
+ icon: Sn,
1170
+ label: Bn,
1171
+ shortcut: zn,
1172
+ separator: Mn,
1173
+ group: En,
1174
+ groupLabel: Ln
1175
+ }, Ee = l.createContext(null);
1176
+ function oe() {
1177
+ const e = l.useContext(Ee);
1178
+ if (!e) throw new Error("Menu parts must be rendered inside Menu.Root");
1179
+ return e;
1180
+ }
1181
+ function Fn({
1182
+ children: e,
1183
+ open: t,
1184
+ defaultOpen: s,
1185
+ onOpenChange: n,
1186
+ onSelect: r,
1187
+ placement: i = "bottom-start",
1188
+ loopFocus: c = !0,
1189
+ closeOnSelect: d = !0,
1190
+ "aria-label": u
1191
+ }) {
1192
+ const g = t !== void 0, _ = $(ge.machine, {
1193
+ id: l.useId(),
1194
+ ...g ? { open: t } : { defaultOpen: s },
1195
+ loopFocus: c,
1196
+ closeOnSelect: d,
1197
+ "aria-label": u,
1198
+ positioning: { placement: i, offset: { mainAxis: 6 } },
1199
+ onOpenChange: (m) => n?.(m.open),
1200
+ onSelect: (m) => r?.(m.value)
1201
+ }), p = ge.connect(_, N);
1202
+ return /* @__PURE__ */ o(Ee.Provider, { value: p, children: e });
1203
+ }
1204
+ function qn({ asChild: e = !1, children: t, ...s }) {
1205
+ const n = oe();
1206
+ return e ? /* @__PURE__ */ o(T, { ...n.getTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getTriggerProps(), ...s, children: t });
1207
+ }
1208
+ function On({
1209
+ className: e,
1210
+ children: t,
1211
+ ...s
1212
+ }) {
1213
+ const n = oe();
1214
+ return n.open ? /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o("div", { ...n.getPositionerProps(), className: A.positioner, children: /* @__PURE__ */ o(
1215
+ "div",
1216
+ {
1217
+ ...n.getContentProps(),
1218
+ "data-ss-ui": "menu",
1219
+ className: a(A.content, e),
1220
+ ...s,
1221
+ children: t
1222
+ }
1223
+ ) }) }) : null;
1224
+ }
1225
+ function Hn({
1226
+ value: e,
1227
+ disabled: t = !1,
1228
+ destructive: s = !1,
1229
+ icon: n,
1230
+ shortcut: r,
1231
+ onSelect: i,
1232
+ onClick: c,
1233
+ className: d,
1234
+ children: u,
1235
+ ...g
1236
+ }) {
1237
+ const p = oe().getItemProps({ value: e, disabled: t });
1238
+ return /* @__PURE__ */ f(
1239
+ "div",
1240
+ {
1241
+ ...p,
1242
+ "data-destructive": s || void 0,
1243
+ className: a(A.item, s && A.destructive, d),
1244
+ onClick: (m) => {
1245
+ p.onClick?.(m), c?.(m), t || i?.();
1246
+ },
1247
+ ...g,
1248
+ children: [
1249
+ n && /* @__PURE__ */ o("span", { className: A.icon, "aria-hidden": "true", children: n }),
1250
+ /* @__PURE__ */ o("span", { className: A.label, children: u }),
1251
+ r && /* @__PURE__ */ o("span", { className: A.shortcut, children: r })
1252
+ ]
1253
+ }
1254
+ );
1255
+ }
1256
+ function jn({ className: e, ...t }) {
1257
+ const s = oe();
1258
+ return /* @__PURE__ */ o("hr", { ...s.getSeparatorProps(), className: a(A.separator, e), ...t });
1259
+ }
1260
+ function Gn({ label: e, className: t, children: s, ...n }) {
1261
+ const r = oe(), i = l.useId();
1262
+ return /* @__PURE__ */ f("div", { ...r.getItemGroupProps({ id: i }), className: a(A.group, t), ...n, children: [
1263
+ e && /* @__PURE__ */ o("div", { ...r.getItemGroupLabelProps({ htmlFor: i }), className: A.groupLabel, children: e }),
1264
+ s
1265
+ ] });
1266
+ }
1267
+ const ea = {
1268
+ Root: Fn,
1269
+ Trigger: qn,
1270
+ Content: On,
1271
+ Item: Hn,
1272
+ Separator: jn,
1273
+ Group: Gn
1274
+ }, Vn = "ss-pagination-module_root", Wn = "ss-pagination-module_pages", Un = "ss-pagination-module_button", Zn = "ss-pagination-module_active", Kn = "ss-pagination-module_ellipsis", L = {
1275
+ root: Vn,
1276
+ pages: Wn,
1277
+ button: Un,
1278
+ active: Zn,
1279
+ ellipsis: Kn
1280
+ };
1281
+ function ta({
1282
+ count: e,
1283
+ pageSize: t = 10,
1284
+ page: s,
1285
+ defaultPage: n = 1,
1286
+ siblingCount: r = 1,
1287
+ onPageChange: i,
1288
+ prevLabel: c = "Previous page",
1289
+ nextLabel: d = "Next page",
1290
+ "aria-label": u = "Pagination",
1291
+ className: g
1292
+ }) {
1293
+ const _ = s !== void 0, p = $(fe.machine, {
1294
+ id: l.useId(),
1295
+ count: e,
1296
+ pageSize: t,
1297
+ ..._ ? { page: s } : { defaultPage: n },
1298
+ siblingCount: r,
1299
+ onPageChange: (b) => i?.(b.page)
1300
+ }), m = fe.connect(p, N);
1301
+ return m.totalPages <= 1 ? null : /* @__PURE__ */ f(
1302
+ "nav",
1303
+ {
1304
+ ...m.getRootProps(),
1305
+ "aria-label": u,
1306
+ "data-ss-ui": "pagination",
1307
+ className: a(L.root, g),
1308
+ children: [
1309
+ /* @__PURE__ */ o(
1310
+ "button",
1311
+ {
1312
+ ...m.getPrevTriggerProps(),
1313
+ type: "button",
1314
+ "aria-label": c,
1315
+ className: L.button,
1316
+ children: /* @__PURE__ */ o(Ue, { size: 15 })
1317
+ }
1318
+ ),
1319
+ /* @__PURE__ */ o("div", { className: L.pages, children: m.pages.map((b, h) => b.type === "page" ? /* @__PURE__ */ o(
1320
+ "button",
1321
+ {
1322
+ ...m.getItemProps(b),
1323
+ type: "button",
1324
+ className: a(L.button, b.value === m.page && L.active),
1325
+ children: b.value
1326
+ },
1327
+ b.value
1328
+ ) : /* @__PURE__ */ o(
1329
+ "span",
1330
+ {
1331
+ ...m.getEllipsisProps({ index: h }),
1332
+ className: L.ellipsis,
1333
+ children: "…"
1334
+ },
1335
+ `ellipsis-${h}`
1336
+ )) }),
1337
+ /* @__PURE__ */ o(
1338
+ "button",
1339
+ {
1340
+ ...m.getNextTriggerProps(),
1341
+ type: "button",
1342
+ "aria-label": d,
1343
+ className: L.button,
1344
+ children: /* @__PURE__ */ o(xe, { size: 15 })
1345
+ }
1346
+ )
1347
+ ]
1348
+ }
1349
+ );
1350
+ }
1351
+ const Yn = "ss-popover-module_positioner", Jn = "ss-popover-module_content", Qn = "ss-popover-module_header", Xn = "ss-popover-module_title", er = "ss-popover-module_description", tr = "ss-popover-module_close", or = "ss-popover-module_arrow", sr = "ss-popover-module_arrowTip", S = {
1352
+ positioner: Yn,
1353
+ content: Jn,
1354
+ header: Qn,
1355
+ title: Xn,
1356
+ description: er,
1357
+ close: tr,
1358
+ arrow: or,
1359
+ arrowTip: sr
1360
+ }, Le = l.createContext(null);
1361
+ function se() {
1362
+ const e = l.useContext(Le);
1363
+ if (!e) throw new Error("Popover parts must be rendered inside Popover.Root");
1364
+ return e;
1365
+ }
1366
+ function nr({
1367
+ children: e,
1368
+ open: t,
1369
+ defaultOpen: s,
1370
+ onOpenChange: n,
1371
+ placement: r = "bottom-start",
1372
+ offset: i = 8,
1373
+ modal: c = !1,
1374
+ portalled: d = !0
1375
+ }) {
1376
+ const u = t !== void 0, g = $(_e.machine, {
1377
+ id: l.useId(),
1378
+ ...u ? { open: t } : { defaultOpen: s },
1379
+ modal: c,
1380
+ portalled: d,
1381
+ positioning: {
1382
+ placement: r,
1383
+ offset: { mainAxis: i }
1384
+ },
1385
+ onOpenChange: (p) => n?.(p.open)
1386
+ }), _ = _e.connect(g, N);
1387
+ return /* @__PURE__ */ o(Le.Provider, { value: _, children: e });
1388
+ }
1389
+ function rr({ asChild: e = !1, children: t, ...s }) {
1390
+ const n = se();
1391
+ return e ? /* @__PURE__ */ o(T, { ...n.getTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getTriggerProps(), ...s, children: t });
1392
+ }
1393
+ function ir({
1394
+ hasArrow: e = !1,
1395
+ className: t,
1396
+ children: s,
1397
+ ...n
1398
+ }) {
1399
+ const r = se();
1400
+ if (!r.open) return null;
1401
+ const i = r.portalled ? z : l.Fragment;
1402
+ return /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o("div", { ...r.getPositionerProps(), className: S.positioner, children: /* @__PURE__ */ f(
1403
+ "div",
1404
+ {
1405
+ ...r.getContentProps(),
1406
+ "data-ss-ui": "popover",
1407
+ className: a(S.content, t),
1408
+ ...n,
1409
+ children: [
1410
+ e && /* @__PURE__ */ o("div", { ...r.getArrowProps(), className: S.arrow, children: /* @__PURE__ */ o("div", { ...r.getArrowTipProps(), className: S.arrowTip }) }),
1411
+ s
1412
+ ]
1413
+ }
1414
+ ) }) });
1415
+ }
1416
+ function ar({ className: e, ...t }) {
1417
+ return /* @__PURE__ */ o("div", { className: a(S.header, e), ...t });
1418
+ }
1419
+ function cr({ className: e, ...t }) {
1420
+ const s = se();
1421
+ return /* @__PURE__ */ o("h3", { ...s.getTitleProps(), className: a(S.title, e), ...t });
1422
+ }
1423
+ function lr({
1424
+ className: e,
1425
+ ...t
1426
+ }) {
1427
+ const s = se();
1428
+ return /* @__PURE__ */ o("p", { ...s.getDescriptionProps(), className: a(S.description, e), ...t });
1429
+ }
1430
+ function dr({
1431
+ asChild: e = !1,
1432
+ className: t,
1433
+ children: s,
1434
+ "aria-label": n = "Close popover",
1435
+ ...r
1436
+ }) {
1437
+ const i = se();
1438
+ return e ? /* @__PURE__ */ o(T, { ...i.getCloseTriggerProps(), ...r, children: s }) : /* @__PURE__ */ o(
1439
+ "button",
1440
+ {
1441
+ type: "button",
1442
+ ...i.getCloseTriggerProps(),
1443
+ "aria-label": n,
1444
+ className: a(S.close, t),
1445
+ ...r,
1446
+ children: s ?? /* @__PURE__ */ o(X, { size: 14 })
1447
+ }
1448
+ );
1449
+ }
1450
+ const oa = {
1451
+ Root: nr,
1452
+ Trigger: rr,
1453
+ Content: ir,
1454
+ Header: ar,
1455
+ Title: cr,
1456
+ Description: lr,
1457
+ Close: dr
1458
+ }, ur = "ss-select-module_root", mr = "ss-select-module_control", pr = "ss-select-module_trigger", gr = "ss-select-module_triggerText", fr = "ss-select-module_invalid", _r = "ss-select-module_triggerIcon", br = "ss-select-module_positioner", hr = "ss-select-module_content", vr = "ss-select-module_item", $r = "ss-select-module_itemText", Nr = "ss-select-module_indicator", Cr = "ss-select-module_empty", w = {
1459
+ root: ur,
1460
+ control: mr,
1461
+ trigger: pr,
1462
+ triggerText: gr,
1463
+ invalid: fr,
1464
+ triggerIcon: _r,
1465
+ positioner: br,
1466
+ content: hr,
1467
+ item: vr,
1468
+ itemText: $r,
1469
+ indicator: Nr,
1470
+ empty: Cr
1471
+ }, Fe = l.createContext(null);
1472
+ function de() {
1473
+ const e = l.useContext(Fe);
1474
+ if (!e) throw new Error("Select parts must be rendered inside Select.Root");
1475
+ return e;
1476
+ }
1477
+ function Pr({
1478
+ items: e,
1479
+ value: t,
1480
+ defaultValue: s,
1481
+ onValueChange: n,
1482
+ onOpenChange: r,
1483
+ multiple: i = !1,
1484
+ disabled: c,
1485
+ invalid: d,
1486
+ required: u,
1487
+ name: g,
1488
+ className: _,
1489
+ children: p
1490
+ }) {
1491
+ const m = Y(), b = d ?? m?.invalid ?? !1, h = c ?? m?.disabled ?? !1, R = u ?? m?.required ?? !1, v = t !== void 0, j = l.useMemo(
1492
+ () => ce.collection({
1493
+ items: e,
1494
+ itemToString: (I) => I.label,
1495
+ itemToValue: (I) => I.value,
1496
+ isItemDisabled: (I) => !!I.disabled
1497
+ }),
1498
+ [e]
1499
+ ), ie = $(ce.machine, {
1500
+ id: l.useId(),
1501
+ collection: j,
1502
+ ...v ? { value: t } : { defaultValue: s },
1503
+ multiple: i,
1504
+ closeOnSelect: !i,
1505
+ disabled: h,
1506
+ invalid: b,
1507
+ required: R,
1508
+ name: g,
1509
+ positioning: { sameWidth: !0, offset: { mainAxis: 6 } },
1510
+ onValueChange: (I) => n?.(I.value, I.items),
1511
+ onOpenChange: (I) => r?.(I.open)
1512
+ }), ae = ce.connect(ie, N), Ge = l.useMemo(() => ({ api: ae, items: e, invalid: b }), [ae, e, b]);
1513
+ return /* @__PURE__ */ o(Fe.Provider, { value: Ge, children: /* @__PURE__ */ o(
1514
+ "div",
1515
+ {
1516
+ ...ae.getRootProps(),
1517
+ "data-ss-ui": "select",
1518
+ className: a(w.root, _),
1519
+ children: p
1520
+ }
1521
+ ) });
1522
+ }
1523
+ function wr({
1524
+ placeholder: e = "Select an option",
1525
+ className: t,
1526
+ children: s,
1527
+ ...n
1528
+ }) {
1529
+ const { api: r, invalid: i } = de();
1530
+ return /* @__PURE__ */ o("div", { ...r.getControlProps(), className: w.control, children: /* @__PURE__ */ f(
1531
+ "button",
1532
+ {
1533
+ ...r.getTriggerProps(),
1534
+ type: "button",
1535
+ "data-placeholder-shown": r.valueAsString ? void 0 : "",
1536
+ "aria-invalid": i || void 0,
1537
+ className: a(w.trigger, i && w.invalid, t),
1538
+ ...n,
1539
+ children: [
1540
+ /* @__PURE__ */ o("span", { className: w.triggerText, children: s ?? (r.valueAsString || e) }),
1541
+ /* @__PURE__ */ o(Ze, { size: 15, className: w.triggerIcon })
1542
+ ]
1543
+ }
1544
+ ) });
1545
+ }
1546
+ function xr({
1547
+ className: e,
1548
+ children: t,
1549
+ emptyText: s = "No options",
1550
+ ...n
1551
+ }) {
1552
+ const { api: r, items: i } = de();
1553
+ return r.open ? /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o("div", { ...r.getPositionerProps(), className: w.positioner, children: /* @__PURE__ */ o(
1554
+ "div",
1555
+ {
1556
+ ...r.getContentProps(),
1557
+ "data-ss-ui": "select-content",
1558
+ className: a(w.content, e),
1559
+ ...n,
1560
+ children: t ?? (i.length > 0 ? i.map((c) => /* @__PURE__ */ o(qe, { item: c, children: c.label }, c.value)) : /* @__PURE__ */ o("div", { className: w.empty, children: s }))
1561
+ }
1562
+ ) }) }) : null;
1563
+ }
1564
+ function qe({ item: e, className: t, children: s, ...n }) {
1565
+ const { api: r } = de(), i = r.value.includes(e.value);
1566
+ return /* @__PURE__ */ f("div", { ...r.getItemProps({ item: e }), className: a(w.item, t), ...n, children: [
1567
+ /* @__PURE__ */ o("span", { ...r.getItemTextProps({ item: e }), className: w.itemText, children: s ?? e.label }),
1568
+ i && /* @__PURE__ */ o("span", { ...r.getItemIndicatorProps({ item: e }), className: w.indicator, children: /* @__PURE__ */ o(we, { size: 14, strokeWidth: 2.5 }) })
1569
+ ] });
1570
+ }
1571
+ const sa = {
1572
+ Root: Pr,
1573
+ Trigger: wr,
1574
+ Content: xr,
1575
+ Item: qe
1576
+ }, yr = "ss-separator-module_root", Tr = "ss-separator-module_horizontal", Ir = "ss-separator-module_vertical", Ne = {
1577
+ root: yr,
1578
+ horizontal: Tr,
1579
+ vertical: Ir
1580
+ };
1581
+ function na({
1582
+ orientation: e = "horizontal",
1583
+ decorative: t = !0,
1584
+ className: s,
1585
+ ...n
1586
+ }) {
1587
+ return /* @__PURE__ */ o(
1588
+ "div",
1589
+ {
1590
+ role: t ? "none" : "separator",
1591
+ "aria-orientation": t ? void 0 : e,
1592
+ "data-ss-ui": "separator",
1593
+ "data-orientation": e,
1594
+ className: a(Ne.root, Ne[e], s),
1595
+ ...n
1596
+ }
1597
+ );
1598
+ }
1599
+ const kr = "ss-skeleton-module_root", Dr = "ss-skeleton-module_rect", Ar = "ss-skeleton-module_text", Rr = "ss-skeleton-module_circle", Ce = {
1600
+ root: kr,
1601
+ "ss-pulse": "ss-skeleton-module_ss-pulse",
1602
+ rect: Dr,
1603
+ text: Ar,
1604
+ circle: Rr
1605
+ };
1606
+ function ra({
1607
+ variant: e = "rect",
1608
+ width: t,
1609
+ height: s,
1610
+ style: n,
1611
+ className: r,
1612
+ ...i
1613
+ }) {
1614
+ return /* @__PURE__ */ o(
1615
+ "div",
1616
+ {
1617
+ "aria-hidden": "true",
1618
+ "data-ss-ui": "skeleton",
1619
+ "data-variant": e,
1620
+ className: a(Ce.root, Ce[e], r),
1621
+ style: { width: t, height: s, ...n },
1622
+ ...i
1623
+ }
1624
+ );
1625
+ }
1626
+ const Sr = "ss-spinner-module_root", Br = "ss-spinner-module_xs", zr = "ss-spinner-module_sm", Mr = "ss-spinner-module_md", Er = "ss-spinner-module_lg", Pe = {
1627
+ root: Sr,
1628
+ "ss-spin": "ss-spinner-module_ss-spin",
1629
+ xs: Br,
1630
+ sm: zr,
1631
+ md: Mr,
1632
+ lg: Er
1633
+ };
1634
+ function ia({ size: e = "md", label: t = "Loading", className: s, ...n }) {
1635
+ return /* @__PURE__ */ o(
1636
+ "span",
1637
+ {
1638
+ role: "status",
1639
+ "aria-label": t,
1640
+ "data-ss-ui": "spinner",
1641
+ "data-size": e,
1642
+ className: a(Pe.root, Pe[e], s),
1643
+ ...n,
1644
+ children: /* @__PURE__ */ o("span", { className: "ss-sr-only", children: t })
1645
+ }
1646
+ );
1647
+ }
1648
+ const Lr = "ss-switch-module_root", Fr = "ss-switch-module_track", qr = "ss-switch-module_thumb", Or = "ss-switch-module_sm", Hr = "ss-switch-module_md", jr = "ss-switch-module_lg", Gr = "ss-switch-module_text", Vr = "ss-switch-module_label", Wr = "ss-switch-module_description", F = {
1649
+ root: Lr,
1650
+ track: Fr,
1651
+ thumb: qr,
1652
+ sm: Or,
1653
+ md: Hr,
1654
+ lg: jr,
1655
+ text: Gr,
1656
+ label: Vr,
1657
+ description: Wr
1658
+ };
1659
+ function aa({
1660
+ checked: e,
1661
+ defaultChecked: t,
1662
+ onCheckedChange: s,
1663
+ size: n = "md",
1664
+ label: r,
1665
+ description: i,
1666
+ disabled: c = !1,
1667
+ invalid: d = !1,
1668
+ required: u = !1,
1669
+ readOnly: g = !1,
1670
+ name: _,
1671
+ value: p,
1672
+ className: m,
1673
+ "aria-label": b
1674
+ }) {
1675
+ const h = e !== void 0, R = $(be.machine, {
1676
+ id: l.useId(),
1677
+ ...h ? { checked: e } : { defaultChecked: t },
1678
+ disabled: c,
1679
+ invalid: d,
1680
+ required: u,
1681
+ readOnly: g,
1682
+ name: _,
1683
+ value: p,
1684
+ onCheckedChange: (j) => s?.(j.checked)
1685
+ }), v = be.connect(R, N);
1686
+ return /* @__PURE__ */ f(
1687
+ "label",
1688
+ {
1689
+ ...v.getRootProps(),
1690
+ "data-ss-ui": "switch",
1691
+ "data-size": n,
1692
+ className: a(F.root, F[n], m),
1693
+ children: [
1694
+ /* @__PURE__ */ o("input", { ...v.getHiddenInputProps(), "aria-label": b }),
1695
+ /* @__PURE__ */ o("span", { ...v.getControlProps(), className: F.track, children: /* @__PURE__ */ o("span", { ...v.getThumbProps(), className: F.thumb }) }),
1696
+ (r || i) && /* @__PURE__ */ f("span", { className: F.text, children: [
1697
+ r && /* @__PURE__ */ o("span", { ...v.getLabelProps(), className: F.label, children: r }),
1698
+ i && /* @__PURE__ */ o("span", { className: F.description, children: i })
1699
+ ] })
1700
+ ]
1701
+ }
1702
+ );
1703
+ }
1704
+ const Ur = "ss-tabs-module_root", Zr = "ss-tabs-module_vertical", Kr = "ss-tabs-module_list", Yr = "ss-tabs-module_list_line", Jr = "ss-tabs-module_list_pill", Qr = "ss-tabs-module_trigger", Xr = "ss-tabs-module_trigger_line", ei = "ss-tabs-module_trigger_pill", ti = "ss-tabs-module_content", H = {
1705
+ root: Ur,
1706
+ vertical: Zr,
1707
+ list: Kr,
1708
+ list_line: Yr,
1709
+ list_pill: Jr,
1710
+ trigger: Qr,
1711
+ trigger_line: Xr,
1712
+ trigger_pill: ei,
1713
+ content: ti
1714
+ }, Oe = l.createContext(null);
1715
+ function ue() {
1716
+ const e = l.useContext(Oe);
1717
+ if (!e) throw new Error("Tabs parts must be rendered inside Tabs.Root");
1718
+ return e;
1719
+ }
1720
+ function oi({
1721
+ value: e,
1722
+ defaultValue: t,
1723
+ onValueChange: s,
1724
+ orientation: n = "horizontal",
1725
+ activationMode: r = "automatic",
1726
+ loopFocus: i = !0,
1727
+ variant: c = "line",
1728
+ className: d,
1729
+ children: u,
1730
+ ...g
1731
+ }) {
1732
+ const _ = e !== void 0, p = $(he.machine, {
1733
+ id: l.useId(),
1734
+ ..._ ? { value: e } : { defaultValue: t },
1735
+ orientation: n,
1736
+ activationMode: r,
1737
+ loopFocus: i,
1738
+ onValueChange: (h) => s?.(h.value)
1739
+ }), m = he.connect(p, N), b = l.useMemo(() => ({ api: m, variant: c }), [m, c]);
1740
+ return /* @__PURE__ */ o(Oe.Provider, { value: b, children: /* @__PURE__ */ o(
1741
+ "div",
1742
+ {
1743
+ ...m.getRootProps(),
1744
+ "data-ss-ui": "tabs",
1745
+ "data-variant": c,
1746
+ className: a(H.root, H[n], d),
1747
+ ...g,
1748
+ children: u
1749
+ }
1750
+ ) });
1751
+ }
1752
+ function si({ className: e, children: t, ...s }) {
1753
+ const { api: n, variant: r } = ue();
1754
+ return /* @__PURE__ */ o(
1755
+ "div",
1756
+ {
1757
+ ...n.getListProps(),
1758
+ className: a(H.list, H[`list_${r}`], e),
1759
+ ...s,
1760
+ children: t
1761
+ }
1762
+ );
1763
+ }
1764
+ function ni({ value: e, disabled: t, className: s, children: n, ...r }) {
1765
+ const { api: i, variant: c } = ue();
1766
+ return /* @__PURE__ */ o(
1767
+ "button",
1768
+ {
1769
+ ...i.getTriggerProps({ value: e, disabled: t }),
1770
+ type: "button",
1771
+ className: a(H.trigger, H[`trigger_${c}`], s),
1772
+ ...r,
1773
+ children: n
1774
+ }
1775
+ );
1776
+ }
1777
+ function ri({ value: e, className: t, children: s, ...n }) {
1778
+ const { api: r } = ue();
1779
+ return /* @__PURE__ */ o("div", { ...r.getContentProps({ value: e }), className: a(H.content, t), ...n, children: s });
1780
+ }
1781
+ const ca = {
1782
+ Root: oi,
1783
+ List: si,
1784
+ Trigger: ni,
1785
+ Content: ri
1786
+ }, ii = "ss-toast-module_group", ai = "ss-toast-module_toast", ci = "ss-toast-module_icon", li = "ss-toast-module_type_success", di = "ss-toast-module_type_error", ui = "ss-toast-module_type_warning", mi = "ss-toast-module_type_info", pi = "ss-toast-module_spinner", gi = "ss-toast-module_body", fi = "ss-toast-module_title", _i = "ss-toast-module_description", bi = "ss-toast-module_action", hi = "ss-toast-module_close", k = {
1787
+ group: ii,
1788
+ toast: ai,
1789
+ "ss-toast-in": "ss-toast-module_ss-toast-in",
1790
+ icon: ci,
1791
+ type_success: li,
1792
+ type_error: di,
1793
+ type_warning: ui,
1794
+ type_info: mi,
1795
+ spinner: pi,
1796
+ "ss-spin": "ss-toast-module_ss-spin",
1797
+ body: gi,
1798
+ title: fi,
1799
+ description: _i,
1800
+ action: bi,
1801
+ close: hi
1802
+ };
1803
+ function vi(e = {}) {
1804
+ return Q.createStore({
1805
+ placement: "bottom-end",
1806
+ gap: 10,
1807
+ overlap: !1,
1808
+ max: 5,
1809
+ ...e
1810
+ });
1811
+ }
1812
+ const $i = vi(), Ni = {
1813
+ success: Te,
1814
+ error: ke,
1815
+ warning: Ie,
1816
+ info: ye
1817
+ };
1818
+ function Ci({
1819
+ toastProps: e,
1820
+ parent: t,
1821
+ index: s
1822
+ }) {
1823
+ const n = $(Q.machine, {
1824
+ ...e,
1825
+ parent: t,
1826
+ index: s
1827
+ }), r = Q.connect(n, N), i = Ni[r.type];
1828
+ return /* @__PURE__ */ f(
1829
+ "div",
1830
+ {
1831
+ ...r.getRootProps(),
1832
+ "data-ss-ui": "toast",
1833
+ "data-variant": r.type,
1834
+ className: a(k.toast, k[`type_${r.type}`]),
1835
+ children: [
1836
+ /* @__PURE__ */ o("span", { ...r.getGhostBeforeProps() }),
1837
+ r.type === "loading" ? /* @__PURE__ */ o("span", { className: k.spinner, "aria-hidden": "true" }) : i && /* @__PURE__ */ o("span", { className: k.icon, "aria-hidden": "true", children: /* @__PURE__ */ o(i, { size: 16 }) }),
1838
+ /* @__PURE__ */ f("div", { className: k.body, children: [
1839
+ r.title && /* @__PURE__ */ o("div", { ...r.getTitleProps(), className: k.title, children: r.title }),
1840
+ r.description && /* @__PURE__ */ o("div", { ...r.getDescriptionProps(), className: k.description, children: r.description })
1841
+ ] }),
1842
+ e.action && /* @__PURE__ */ o("button", { ...r.getActionTriggerProps(), type: "button", className: k.action, children: e.action.label }),
1843
+ r.closable !== !1 && /* @__PURE__ */ o(
1844
+ "button",
1845
+ {
1846
+ ...r.getCloseTriggerProps(),
1847
+ type: "button",
1848
+ "aria-label": "Dismiss notification",
1849
+ className: k.close,
1850
+ children: /* @__PURE__ */ o(X, { size: 14 })
1851
+ }
1852
+ ),
1853
+ /* @__PURE__ */ o("span", { ...r.getGhostAfterProps() })
1854
+ ]
1855
+ }
1856
+ );
1857
+ }
1858
+ function la({ store: e = $i, label: t = "Notifications", className: s }) {
1859
+ const n = $(Q.group.machine, {
1860
+ id: l.useId(),
1861
+ store: e
1862
+ }), r = Q.group.connect(n, N), i = r.getToasts();
1863
+ return /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
1864
+ "div",
1865
+ {
1866
+ ...r.getGroupProps({ label: t }),
1867
+ "data-ss-ui": "toaster",
1868
+ className: a(k.group, s),
1869
+ children: i.map((c, d) => /* @__PURE__ */ o(Ci, { toastProps: c, parent: n, index: d }, c.id))
1870
+ }
1871
+ ) });
1872
+ }
1873
+ const Pi = "ss-tooltip-module_positioner", wi = "ss-tooltip-module_content", xi = "ss-tooltip-module_arrow", yi = "ss-tooltip-module_arrowTip", re = {
1874
+ positioner: Pi,
1875
+ content: wi,
1876
+ arrow: xi,
1877
+ arrowTip: yi
1878
+ }, He = l.createContext(null);
1879
+ function je() {
1880
+ const e = l.useContext(He);
1881
+ if (!e) throw new Error("Tooltip parts must be rendered inside Tooltip.Root");
1882
+ return e;
1883
+ }
1884
+ function Ti({
1885
+ children: e,
1886
+ open: t,
1887
+ defaultOpen: s,
1888
+ onOpenChange: n,
1889
+ disabled: r = !1,
1890
+ openDelay: i = 300,
1891
+ closeDelay: c = 120,
1892
+ placement: d = "top",
1893
+ interactive: u = !1,
1894
+ offset: g = 8
1895
+ }) {
1896
+ const _ = t !== void 0, p = $(ve.machine, {
1897
+ id: l.useId(),
1898
+ ..._ ? { open: t } : { defaultOpen: s },
1899
+ disabled: r,
1900
+ openDelay: i,
1901
+ closeDelay: c,
1902
+ interactive: u,
1903
+ positioning: {
1904
+ placement: d,
1905
+ offset: { mainAxis: g }
1906
+ },
1907
+ onOpenChange: (b) => n?.(b.open)
1908
+ }), m = ve.connect(p, N);
1909
+ return /* @__PURE__ */ o(He.Provider, { value: m, children: e });
1910
+ }
1911
+ function Ii({ asChild: e = !1, children: t, ...s }) {
1912
+ const n = je();
1913
+ return e ? /* @__PURE__ */ o(T, { ...n.getTriggerProps(), ...s, children: t }) : /* @__PURE__ */ o("button", { type: "button", ...n.getTriggerProps(), ...s, children: t });
1914
+ }
1915
+ function ki({
1916
+ hasArrow: e = !0,
1917
+ className: t,
1918
+ children: s,
1919
+ ...n
1920
+ }) {
1921
+ const r = je();
1922
+ return r.open ? /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o("div", { ...r.getPositionerProps(), className: re.positioner, children: /* @__PURE__ */ f(
1923
+ "div",
1924
+ {
1925
+ ...r.getContentProps(),
1926
+ "data-ss-ui": "tooltip",
1927
+ className: a(re.content, t),
1928
+ ...n,
1929
+ children: [
1930
+ e && /* @__PURE__ */ o("div", { ...r.getArrowProps(), className: re.arrow, children: /* @__PURE__ */ o("div", { ...r.getArrowTipProps(), className: re.arrowTip }) }),
1931
+ s
1932
+ ]
1933
+ }
1934
+ ) }) }) : null;
1935
+ }
1936
+ const da = {
1937
+ Root: Ti,
1938
+ Trigger: Ii,
1939
+ Content: ki
1940
+ };
1941
+ export {
1942
+ Ri as Accordion,
1943
+ it as AccordionContent,
1944
+ nt as AccordionItem,
1945
+ st as AccordionRoot,
1946
+ rt as AccordionTrigger,
1947
+ Si as Alert,
1948
+ vt as AlertDescription,
1949
+ Bi as AlertDialog,
1950
+ Et as AlertDialogAction,
1951
+ Mt as AlertDialogCancel,
1952
+ At as AlertDialogContent,
1953
+ Bt as AlertDialogDescription,
1954
+ zt as AlertDialogFooter,
1955
+ Rt as AlertDialogHeader,
1956
+ kt as AlertDialogRoot,
1957
+ St as AlertDialogTitle,
1958
+ Dt as AlertDialogTrigger,
1959
+ ht as AlertTitle,
1960
+ zi as Avatar,
1961
+ Mi as Badge,
1962
+ Ei as Breadcrumb,
1963
+ $o as BreadcrumbItem,
1964
+ No as BreadcrumbLink,
1965
+ vo as BreadcrumbList,
1966
+ Co as BreadcrumbPage,
1967
+ ho as BreadcrumbRoot,
1968
+ Po as BreadcrumbSeparator,
1969
+ Li as Button,
1970
+ Fi as Card,
1971
+ ji as CardAction,
1972
+ Gi as CardContent,
1973
+ Hi as CardDescription,
1974
+ Vi as CardFooter,
1975
+ qi as CardHeader,
1976
+ Oi as CardTitle,
1977
+ Wi as Checkbox,
1978
+ Ui as Dialog,
1979
+ $s as DialogBody,
1980
+ Cs as DialogClose,
1981
+ _s as DialogContent,
1982
+ vs as DialogDescription,
1983
+ Ns as DialogFooter,
1984
+ bs as DialogHeader,
1985
+ gs as DialogRoot,
1986
+ hs as DialogTitle,
1987
+ fs as DialogTrigger,
1988
+ Zi as Drawer,
1989
+ Us as DrawerBody,
1990
+ Ks as DrawerClose,
1991
+ js as DrawerContent,
1992
+ Ws as DrawerDescription,
1993
+ Zs as DrawerFooter,
1994
+ Gs as DrawerHeader,
1995
+ Os as DrawerRoot,
1996
+ Vs as DrawerTitle,
1997
+ Hs as DrawerTrigger,
1998
+ Ki as EmptyState,
1999
+ Yi as Field,
2000
+ mn as FieldDescription,
2001
+ pn as FieldError,
2002
+ un as FieldLabel,
2003
+ dn as FieldRoot,
2004
+ Ji as Input,
2005
+ Xi as Kbd,
2006
+ ea as Menu,
2007
+ On as MenuContent,
2008
+ Gn as MenuGroup,
2009
+ Hn as MenuItem,
2010
+ Fn as MenuRoot,
2011
+ jn as MenuSeparator,
2012
+ qn as MenuTrigger,
2013
+ ta as Pagination,
2014
+ oa as Popover,
2015
+ dr as PopoverClose,
2016
+ ir as PopoverContent,
2017
+ lr as PopoverDescription,
2018
+ ar as PopoverHeader,
2019
+ nr as PopoverRoot,
2020
+ cr as PopoverTitle,
2021
+ rr as PopoverTrigger,
2022
+ sa as Select,
2023
+ xr as SelectContent,
2024
+ qe as SelectItem,
2025
+ Pr as SelectRoot,
2026
+ wr as SelectTrigger,
2027
+ na as Separator,
2028
+ ra as Skeleton,
2029
+ ia as Spinner,
2030
+ aa as Switch,
2031
+ ca as Tabs,
2032
+ ri as TabsContent,
2033
+ si as TabsList,
2034
+ oi as TabsRoot,
2035
+ ni as TabsTrigger,
2036
+ Qi as Textarea,
2037
+ la as Toaster,
2038
+ da as Tooltip,
2039
+ ki as TooltipContent,
2040
+ Ti as TooltipRoot,
2041
+ Ii as TooltipTrigger,
2042
+ Mo as buttonClassName,
2043
+ a as cn,
2044
+ vi as createToaster,
2045
+ $i as toaster,
2046
+ Y as useFieldContext
2047
+ };