@sandurtech/sandui 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sandui.js ADDED
@@ -0,0 +1,2208 @@
1
+ import Wn, { forwardRef as f, useContext as ve, createContext as ye, useState as F, useId as O, Children as be, isValidElement as X, useMemo as E, useCallback as A, useRef as z, useEffect as K, cloneElement as sn } from "react";
2
+ import { createPortal as rn } from "react-dom";
3
+ var Se = { exports: {} }, ce = {};
4
+ var Xe;
5
+ function Un() {
6
+ if (Xe) return ce;
7
+ Xe = 1;
8
+ var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
9
+ function n(t, r, o) {
10
+ var c = null;
11
+ if (o !== void 0 && (c = "" + o), r.key !== void 0 && (c = "" + r.key), "key" in r) {
12
+ o = {};
13
+ for (var d in r)
14
+ d !== "key" && (o[d] = r[d]);
15
+ } else o = r;
16
+ return r = o.ref, {
17
+ $$typeof: s,
18
+ type: t,
19
+ key: c,
20
+ ref: r !== void 0 ? r : null,
21
+ props: o
22
+ };
23
+ }
24
+ return ce.Fragment = e, ce.jsx = n, ce.jsxs = n, ce;
25
+ }
26
+ var ie = {};
27
+ var Ze;
28
+ function Jn() {
29
+ return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && (function() {
30
+ function s(u) {
31
+ if (u == null) return null;
32
+ if (typeof u == "function")
33
+ return u.$$typeof === S ? null : u.displayName || u.name || null;
34
+ if (typeof u == "string") return u;
35
+ switch (u) {
36
+ case j:
37
+ return "Fragment";
38
+ case D:
39
+ return "Profiler";
40
+ case y:
41
+ return "StrictMode";
42
+ case Z:
43
+ return "Suspense";
44
+ case W:
45
+ return "SuspenseList";
46
+ case Ce:
47
+ return "Activity";
48
+ }
49
+ if (typeof u == "object")
50
+ switch (typeof u.tag == "number" && console.error(
51
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
52
+ ), u.$$typeof) {
53
+ case g:
54
+ return "Portal";
55
+ case Y:
56
+ return u.displayName || "Context";
57
+ case P:
58
+ return (u._context.displayName || "Context") + ".Consumer";
59
+ case I:
60
+ var x = u.render;
61
+ return u = u.displayName, u || (u = x.displayName || x.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
62
+ case oe:
63
+ return x = u.displayName || null, x !== null ? x : s(u.type) || "Memo";
64
+ case U:
65
+ x = u._payload, u = u._init;
66
+ try {
67
+ return s(u(x));
68
+ } catch {
69
+ }
70
+ }
71
+ return null;
72
+ }
73
+ function e(u) {
74
+ return "" + u;
75
+ }
76
+ function n(u) {
77
+ try {
78
+ e(u);
79
+ var x = !1;
80
+ } catch {
81
+ x = !0;
82
+ }
83
+ if (x) {
84
+ x = console;
85
+ var N = x.error, k = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
86
+ return N.call(
87
+ x,
88
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
89
+ k
90
+ ), e(u);
91
+ }
92
+ }
93
+ function t(u) {
94
+ if (u === j) return "<>";
95
+ if (typeof u == "object" && u !== null && u.$$typeof === U)
96
+ return "<...>";
97
+ try {
98
+ var x = s(u);
99
+ return x ? "<" + x + ">" : "<...>";
100
+ } catch {
101
+ return "<...>";
102
+ }
103
+ }
104
+ function r() {
105
+ var u = q.A;
106
+ return u === null ? null : u.getOwner();
107
+ }
108
+ function o() {
109
+ return Error("react-stack-top-frame");
110
+ }
111
+ function c(u) {
112
+ if (Q.call(u, "key")) {
113
+ var x = Object.getOwnPropertyDescriptor(u, "key").get;
114
+ if (x && x.isReactWarning) return !1;
115
+ }
116
+ return u.key !== void 0;
117
+ }
118
+ function d(u, x) {
119
+ function N() {
120
+ Ke || (Ke = !0, console.error(
121
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
122
+ x
123
+ ));
124
+ }
125
+ N.isReactWarning = !0, Object.defineProperty(u, "key", {
126
+ get: N,
127
+ configurable: !0
128
+ });
129
+ }
130
+ function l() {
131
+ var u = s(this.type);
132
+ return Ye[u] || (Ye[u] = !0, console.error(
133
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
134
+ )), u = this.props.ref, u !== void 0 ? u : null;
135
+ }
136
+ function i(u, x, N, k, ge, Ee) {
137
+ var w = N.ref;
138
+ return u = {
139
+ $$typeof: b,
140
+ type: u,
141
+ key: x,
142
+ props: N,
143
+ _owner: k
144
+ }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(u, "ref", {
145
+ enumerable: !1,
146
+ get: l
147
+ }) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
148
+ configurable: !1,
149
+ enumerable: !1,
150
+ writable: !0,
151
+ value: 0
152
+ }), Object.defineProperty(u, "_debugInfo", {
153
+ configurable: !1,
154
+ enumerable: !1,
155
+ writable: !0,
156
+ value: null
157
+ }), Object.defineProperty(u, "_debugStack", {
158
+ configurable: !1,
159
+ enumerable: !1,
160
+ writable: !0,
161
+ value: ge
162
+ }), Object.defineProperty(u, "_debugTask", {
163
+ configurable: !1,
164
+ enumerable: !1,
165
+ writable: !0,
166
+ value: Ee
167
+ }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
168
+ }
169
+ function _(u, x, N, k, ge, Ee) {
170
+ var w = x.children;
171
+ if (w !== void 0)
172
+ if (k)
173
+ if (Kn(w)) {
174
+ for (k = 0; k < w.length; k++)
175
+ p(w[k]);
176
+ Object.freeze && Object.freeze(w);
177
+ } else
178
+ console.error(
179
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
180
+ );
181
+ else p(w);
182
+ if (Q.call(x, "key")) {
183
+ w = s(u);
184
+ var ee = Object.keys(x).filter(function(Yn) {
185
+ return Yn !== "key";
186
+ });
187
+ k = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", Je[w + k] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ `A props object containing a "key" prop is being spread into JSX:
189
+ let props = %s;
190
+ <%s {...props} />
191
+ React keys must be passed directly to JSX without using spread:
192
+ let props = %s;
193
+ <%s key={someKey} {...props} />`,
194
+ k,
195
+ w,
196
+ ee,
197
+ w
198
+ ), Je[w + k] = !0);
199
+ }
200
+ if (w = null, N !== void 0 && (n(N), w = "" + N), c(x) && (n(x.key), w = "" + x.key), "key" in x) {
201
+ N = {};
202
+ for (var Re in x)
203
+ Re !== "key" && (N[Re] = x[Re]);
204
+ } else N = x;
205
+ return w && d(
206
+ N,
207
+ typeof u == "function" ? u.displayName || u.name || "Unknown" : u
208
+ ), i(
209
+ u,
210
+ w,
211
+ N,
212
+ r(),
213
+ ge,
214
+ Ee
215
+ );
216
+ }
217
+ function p(u) {
218
+ h(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === U && (u._payload.status === "fulfilled" ? h(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
219
+ }
220
+ function h(u) {
221
+ return typeof u == "object" && u !== null && u.$$typeof === b;
222
+ }
223
+ var v = Wn, b = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), y = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), Y = /* @__PURE__ */ Symbol.for("react.context"), I = /* @__PURE__ */ Symbol.for("react.forward_ref"), Z = /* @__PURE__ */ Symbol.for("react.suspense"), W = /* @__PURE__ */ Symbol.for("react.suspense_list"), oe = /* @__PURE__ */ Symbol.for("react.memo"), U = /* @__PURE__ */ Symbol.for("react.lazy"), Ce = /* @__PURE__ */ Symbol.for("react.activity"), S = /* @__PURE__ */ Symbol.for("react.client.reference"), q = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, Kn = Array.isArray, $e = console.createTask ? console.createTask : function() {
224
+ return null;
225
+ };
226
+ v = {
227
+ react_stack_bottom_frame: function(u) {
228
+ return u();
229
+ }
230
+ };
231
+ var Ke, Ye = {}, We = v.react_stack_bottom_frame.bind(
232
+ v,
233
+ o
234
+ )(), Ue = $e(t(o)), Je = {};
235
+ ie.Fragment = j, ie.jsx = function(u, x, N) {
236
+ var k = 1e4 > q.recentlyCreatedOwnerStacks++;
237
+ return _(
238
+ u,
239
+ x,
240
+ N,
241
+ !1,
242
+ k ? Error("react-stack-top-frame") : We,
243
+ k ? $e(t(u)) : Ue
244
+ );
245
+ }, ie.jsxs = function(u, x, N) {
246
+ var k = 1e4 > q.recentlyCreatedOwnerStacks++;
247
+ return _(
248
+ u,
249
+ x,
250
+ N,
251
+ !0,
252
+ k ? Error("react-stack-top-frame") : We,
253
+ k ? $e(t(u)) : Ue
254
+ );
255
+ };
256
+ })()), ie;
257
+ }
258
+ var Qe;
259
+ function Xn() {
260
+ return Qe || (Qe = 1, process.env.NODE_ENV === "production" ? Se.exports = Un() : Se.exports = Jn()), Se.exports;
261
+ }
262
+ var a = Xn();
263
+ function m(...s) {
264
+ return s.filter(Boolean).join(" ");
265
+ }
266
+ const Zn = {
267
+ none: "0",
268
+ "2xs": "var(--sand-space-1)",
269
+ xs: "var(--sand-space-2)",
270
+ sm: "var(--sand-space-3)",
271
+ md: "var(--sand-space-4)",
272
+ lg: "var(--sand-space-5)",
273
+ xl: "var(--sand-space-6)",
274
+ "2xl": "var(--sand-space-7)",
275
+ "3xl": "var(--sand-space-8)"
276
+ }, Qn = {
277
+ sm: "var(--radius-sm)",
278
+ md: "var(--radius-md)",
279
+ lg: "var(--radius-lg)",
280
+ xl: "var(--radius-xl)",
281
+ full: "var(--radius-full)"
282
+ };
283
+ function me(s) {
284
+ if (s !== void 0)
285
+ return typeof s == "number" ? `${s}px` : Zn[s] ?? s;
286
+ }
287
+ function on(s) {
288
+ if (s !== void 0)
289
+ return typeof s == "number" ? `${s}px` : Qn[s] ?? s;
290
+ }
291
+ function C(s, e, n) {
292
+ return n === void 0 ? s : {
293
+ ...s,
294
+ [e]: n
295
+ };
296
+ }
297
+ function cn(s, e, n) {
298
+ if (n === void 0)
299
+ return s;
300
+ let t = s;
301
+ if (typeof n != "object" || n === null || Array.isArray(n))
302
+ return C(t, `--${e}`, String(n));
303
+ for (const [r, o] of Object.entries(n))
304
+ if (o !== void 0) {
305
+ const c = r === "base" ? `--${e}` : `--${e}-${r}`;
306
+ t = C(t, c, String(o));
307
+ }
308
+ return t;
309
+ }
310
+ function ea(s) {
311
+ return Array.from(
312
+ s.querySelectorAll(
313
+ [
314
+ "a[href]",
315
+ "button:not([disabled])",
316
+ "textarea:not([disabled])",
317
+ "input:not([disabled])",
318
+ "select:not([disabled])",
319
+ '[tabindex]:not([tabindex="-1"])'
320
+ ].join(",")
321
+ )
322
+ ).filter((e) => !e.hasAttribute("disabled") && !e.getAttribute("aria-hidden"));
323
+ }
324
+ function ke(s, e, n, t) {
325
+ if (n !== 0)
326
+ switch (s.key) {
327
+ case "ArrowRight":
328
+ case "ArrowDown":
329
+ s.preventDefault(), t((e + 1) % n);
330
+ break;
331
+ case "ArrowLeft":
332
+ case "ArrowUp":
333
+ s.preventDefault(), t((e - 1 + n) % n);
334
+ break;
335
+ case "Home":
336
+ s.preventDefault(), t(0);
337
+ break;
338
+ case "End":
339
+ s.preventDefault(), t(n - 1);
340
+ break;
341
+ }
342
+ }
343
+ const dn = ye({}), na = () => ve(dn);
344
+ function Ps({ children: s, icons: e, renderIcon: n }) {
345
+ return /* @__PURE__ */ a.jsx(dn.Provider, { value: { map: e, renderIcon: n }, children: s });
346
+ }
347
+ const B = f(function({ icon: e, size: n, fill: t, className: r, style: o, ...c }, d) {
348
+ const { map: l, renderIcon: i } = na(), _ = typeof e == "string" ? l?.[e] ?? e : e;
349
+ if (typeof _ == "function") {
350
+ const p = _;
351
+ return /* @__PURE__ */ a.jsx(
352
+ p,
353
+ {
354
+ ref: d,
355
+ width: n ?? 18,
356
+ height: n ?? 18,
357
+ className: m(r),
358
+ ...c
359
+ }
360
+ );
361
+ }
362
+ return typeof _ == "string" && i ? /* @__PURE__ */ a.jsx(a.Fragment, { children: i(_, { size: n, fill: t, className: r, style: o, ...c }) }) : /* @__PURE__ */ a.jsx(
363
+ "span",
364
+ {
365
+ ref: d,
366
+ className: m("material-symbols-rounded", r),
367
+ style: {
368
+ fontSize: n,
369
+ fontVariationSettings: t ? "'FILL' 1" : void 0,
370
+ display: "inline-flex",
371
+ alignItems: "center",
372
+ justifyContent: "center",
373
+ ...o
374
+ },
375
+ "aria-hidden": c["aria-label"] ? void 0 : !0,
376
+ ...c,
377
+ children: _
378
+ }
379
+ );
380
+ });
381
+ B.displayName = "SandIcon";
382
+ const aa = "_alert_f8qp0_1", ta = "_icon_f8qp0_13", sa = "_content_f8qp0_25", ra = "_title_f8qp0_30", oa = "_description_f8qp0_35", de = {
383
+ alert: aa,
384
+ icon: ta,
385
+ content: sa,
386
+ title: ra,
387
+ description: oa
388
+ }, ca = {
389
+ info: {
390
+ icon: "info",
391
+ color: "var(--color-info)",
392
+ soft: "var(--color-info-soft)"
393
+ },
394
+ success: {
395
+ icon: "check_circle",
396
+ color: "var(--color-success)",
397
+ soft: "var(--color-success-soft)"
398
+ },
399
+ warning: {
400
+ icon: "warning",
401
+ color: "var(--color-warning)",
402
+ soft: "var(--color-warning-soft)"
403
+ },
404
+ error: {
405
+ icon: "error",
406
+ color: "var(--color-error)",
407
+ soft: "var(--color-error-soft)"
408
+ }
409
+ }, ia = f(function({ status: e = "info", title: n, description: t, className: r, style: o, children: c, ...d }, l) {
410
+ const i = ca[e];
411
+ return /* @__PURE__ */ a.jsxs(
412
+ "div",
413
+ {
414
+ ref: l,
415
+ role: "status",
416
+ className: m(de.alert, r),
417
+ style: {
418
+ "--sand-alert-border": i.color,
419
+ "--sand-alert-bg": `color-mix(in srgb, ${i.soft} 74%, var(--theme-surface))`,
420
+ "--sand-alert-soft": i.soft,
421
+ "--sand-alert-color": i.color,
422
+ ...o
423
+ },
424
+ ...d,
425
+ children: [
426
+ /* @__PURE__ */ a.jsx("span", { className: de.icon, children: /* @__PURE__ */ a.jsx(B, { icon: i.icon, size: 20 }) }),
427
+ /* @__PURE__ */ a.jsxs("div", { className: de.content, children: [
428
+ n && /* @__PURE__ */ a.jsx("div", { className: de.title, children: n }),
429
+ t && /* @__PURE__ */ a.jsx("div", { className: de.description, children: t }),
430
+ c
431
+ ] })
432
+ ]
433
+ }
434
+ );
435
+ });
436
+ ia.displayName = "SandAlert";
437
+ const da = "_accordion_hg6cu_1", la = "_item_hg6cu_7", ua = "_trigger_hg6cu_23", _a = "_triggerMain_hg6cu_37", pa = "_itemIcon_hg6cu_45", ma = "_triggerText_hg6cu_64", fa = "_title_hg6cu_71", ba = "_descriptionFull_hg6cu_79", ha = "_content_hg6cu_88", va = "_contentOpen_hg6cu_94", ya = "_contentInner_hg6cu_98", xa = "_chevron_hg6cu_106", ga = "_chevronOpen_hg6cu_112", M = {
438
+ accordion: da,
439
+ item: la,
440
+ trigger: ua,
441
+ triggerMain: _a,
442
+ itemIcon: pa,
443
+ triggerText: ma,
444
+ title: fa,
445
+ descriptionFull: ba,
446
+ content: ha,
447
+ contentOpen: va,
448
+ contentInner: ya,
449
+ chevron: xa,
450
+ chevronOpen: ga
451
+ }, ln = () => null;
452
+ ln.displayName = "SandAccordionItem";
453
+ const Sa = f(function({ items: e = [], defaultOpen: n, className: t, children: r, ...o }, c) {
454
+ const [d, l] = F(n), i = O(), _ = [...e];
455
+ return be.forEach(r, (p) => {
456
+ X(p) && p.type === ln && _.push(p.props);
457
+ }), /* @__PURE__ */ a.jsx("div", { ref: c, className: m(M.accordion, t), ...o, children: _.map((p) => {
458
+ const h = d === p.id, v = `${i}-trigger-${p.id}`, b = `${i}-content-${p.id}`;
459
+ return /* @__PURE__ */ a.jsxs("div", { className: m(M.item, h && M.itemOpen), "data-state": h ? "open" : "closed", children: [
460
+ /* @__PURE__ */ a.jsxs(
461
+ "button",
462
+ {
463
+ id: v,
464
+ type: "button",
465
+ className: M.trigger,
466
+ "aria-expanded": h,
467
+ "aria-controls": b,
468
+ onClick: () => l((g) => g === p.id ? void 0 : p.id),
469
+ children: [
470
+ /* @__PURE__ */ a.jsxs("div", { className: M.triggerMain, children: [
471
+ p.icon && /* @__PURE__ */ a.jsx(B, { icon: p.icon, className: M.itemIcon, size: 24, "aria-hidden": "true" }),
472
+ /* @__PURE__ */ a.jsx("div", { className: M.triggerText, children: /* @__PURE__ */ a.jsx("span", { className: M.title, children: p.title }) })
473
+ ] }),
474
+ /* @__PURE__ */ a.jsx(
475
+ B,
476
+ {
477
+ icon: "expand_more",
478
+ className: m(M.chevron, h && M.chevronOpen),
479
+ size: 20,
480
+ "aria-hidden": "true"
481
+ }
482
+ )
483
+ ]
484
+ }
485
+ ),
486
+ /* @__PURE__ */ a.jsx(
487
+ "div",
488
+ {
489
+ id: b,
490
+ "aria-labelledby": v,
491
+ className: m(M.content, h && M.contentOpen),
492
+ role: "region",
493
+ children: /* @__PURE__ */ a.jsxs("div", { className: M.contentInner, children: [
494
+ p.description && /* @__PURE__ */ a.jsx("p", { className: M.descriptionFull, children: p.description }),
495
+ p.content
496
+ ] })
497
+ }
498
+ )
499
+ ] }, p.id);
500
+ }) });
501
+ });
502
+ Sa.displayName = "SandAccordion";
503
+ const ja = "_avatar_tjyvl_1", Na = "_image_tjyvl_57", ka = "_initials_tjyvl_63", wa = "_group_tjyvl_67", se = {
504
+ avatar: ja,
505
+ "variant-circle": "_variant-circle_tjyvl_15",
506
+ "variant-rounded": "_variant-rounded_tjyvl_19",
507
+ "variant-square": "_variant-square_tjyvl_23",
508
+ "size-xs": "_size-xs_tjyvl_27",
509
+ "size-sm": "_size-sm_tjyvl_33",
510
+ "size-md": "_size-md_tjyvl_39",
511
+ "size-lg": "_size-lg_tjyvl_45",
512
+ "size-xl": "_size-xl_tjyvl_51",
513
+ image: Na,
514
+ initials: ka,
515
+ group: wa
516
+ }, Ta = f(function({ src: e, initials: n, name: t, size: r = "md", variant: o = "circle", className: c = "", style: d, ...l }, i) {
517
+ const _ = typeof r == "number" ? {
518
+ width: r,
519
+ height: r,
520
+ fontSize: r * 0.4
521
+ } : void 0, p = n ?? t?.split(" ").map((h) => h[0]).join("").toUpperCase().slice(0, 2);
522
+ return /* @__PURE__ */ a.jsx(
523
+ "div",
524
+ {
525
+ ref: i,
526
+ className: m(
527
+ se.avatar,
528
+ typeof r == "string" && se[`size-${r}`],
529
+ se[`variant-${o}`],
530
+ c
531
+ ),
532
+ style: { ..._, ...d },
533
+ ...l,
534
+ children: e ? /* @__PURE__ */ a.jsx("img", { src: e, alt: t, className: se.image }) : /* @__PURE__ */ a.jsx("span", { className: se.initials, children: p })
535
+ }
536
+ );
537
+ });
538
+ Ta.displayName = "SandAvatar";
539
+ const Ia = f(function({ children: e, max: n, size: t = "md", className: r = "", ...o }, c) {
540
+ return /* @__PURE__ */ a.jsx("div", { ref: c, className: m(se.group, r), ...o, children: e });
541
+ });
542
+ Ia.displayName = "SandAvatarGroup";
543
+ const en = {
544
+ "sand-badge": "_sand-badge_ezp2k_1",
545
+ "sand-badge-primary": "_sand-badge-primary_ezp2k_15",
546
+ "sand-badge-secondary": "_sand-badge-secondary_ezp2k_21",
547
+ "sand-badge-success": "_sand-badge-success_ezp2k_27",
548
+ "sand-badge-failed": "_sand-badge-failed_ezp2k_33"
549
+ }, Ca = f(function({ variant: e = "primary", className: n = "", ...t }, r) {
550
+ const o = E(() => en[`sand-badge-${e}`], [e]);
551
+ return /* @__PURE__ */ a.jsx(
552
+ "span",
553
+ {
554
+ ref: r,
555
+ className: m(en["sand-badge"], o, n),
556
+ ...t
557
+ }
558
+ );
559
+ });
560
+ Ca.displayName = "SandBadge";
561
+ const le = {
562
+ "sand-breadcrumbs": "_sand-breadcrumbs_cngwf_1",
563
+ "sand-breadcrumb-item": "_sand-breadcrumb-item_cngwf_10",
564
+ "sand-breadcrumb-link": "_sand-breadcrumb-link_cngwf_17",
565
+ "sand-breadcrumb-current": "_sand-breadcrumb-current_cngwf_32",
566
+ "sand-breadcrumb-separator": "_sand-breadcrumb-separator_cngwf_37"
567
+ }, un = () => null;
568
+ un.displayName = "SandBreadcrumbItem";
569
+ const $a = f(function({ items: e = [], className: n = "", "aria-label": t = "Breadcrumb", children: r, ...o }, c) {
570
+ const d = E(() => {
571
+ const i = [...e];
572
+ return be.forEach(r, (_) => {
573
+ X(_) && _.type === un && i.push(_.props);
574
+ }), i;
575
+ }, [e, r]), l = E(
576
+ () => d.map((i, _) => {
577
+ const p = _ === d.length - 1;
578
+ return /* @__PURE__ */ a.jsxs("li", { className: le["sand-breadcrumb-item"], children: [
579
+ i.href && !p ? /* @__PURE__ */ a.jsx("a", { href: i.href, className: le["sand-breadcrumb-link"], children: i.label }) : /* @__PURE__ */ a.jsx(
580
+ "span",
581
+ {
582
+ "aria-current": p ? "page" : void 0,
583
+ className: p ? le["sand-breadcrumb-current"] : void 0,
584
+ children: i.label
585
+ }
586
+ ),
587
+ !p && /* @__PURE__ */ a.jsx("span", { className: m(le["sand-breadcrumb-separator"], "material-symbols-rounded"), "aria-hidden": "true", children: "chevron_right" })
588
+ ] }, `${String(i.label)}-${_}`);
589
+ }),
590
+ [d]
591
+ );
592
+ return /* @__PURE__ */ a.jsx("nav", { ref: c, "aria-label": t, className: m(le["sand-breadcrumbs"], n), ...o, children: /* @__PURE__ */ a.jsx("ol", { children: l }) });
593
+ });
594
+ $a.displayName = "SandBreadcrumbs";
595
+ const Ea = "_box_t20vf_1", Ra = "_surface_t20vf_19", Aa = "_inline_t20vf_27", fe = {
596
+ box: Ea,
597
+ surface: Ra,
598
+ inline: Aa
599
+ }, Oa = {
600
+ stretch: "stretch",
601
+ start: "flex-start",
602
+ center: "center",
603
+ end: "flex-end",
604
+ baseline: "baseline"
605
+ }, Ma = {
606
+ start: "flex-start",
607
+ center: "center",
608
+ end: "flex-end",
609
+ between: "space-between",
610
+ around: "space-around",
611
+ evenly: "space-evenly"
612
+ }, za = f(function({
613
+ as: e,
614
+ padding: n,
615
+ margin: t,
616
+ gap: r,
617
+ align: o,
618
+ justify: c,
619
+ surface: d,
620
+ inline: l,
621
+ width: i,
622
+ radius: _,
623
+ shadow: p = "none",
624
+ className: h,
625
+ style: v,
626
+ ...b
627
+ }, g) {
628
+ const j = e ?? "div";
629
+ let y = v;
630
+ return y = C(y, "--sand-padding", me(n)), y = C(y, "--sand-margin", me(t)), y = C(y, "--sand-gap", me(r)), y = C(y, "--sand-align", o ? Oa[o] : void 0), y = C(y, "--sand-justify", c ? Ma[c] : void 0), y = C(y, "--sand-width", typeof i == "number" ? `${i}px` : i), y = C(y, "--sand-box-radius", on(_)), y = C(
631
+ y,
632
+ "--sand-box-shadow",
633
+ p === "none" ? "none" : `var(--shadow-${p})`
634
+ ), /* @__PURE__ */ a.jsx(
635
+ j,
636
+ {
637
+ ref: g,
638
+ className: m(fe.box, d && fe.surface, l && fe.inline, h),
639
+ style: y,
640
+ ...b
641
+ }
642
+ );
643
+ });
644
+ za.displayName = "SandBox";
645
+ const Da = "_chip_1o3za_1", Pa = "_clickable_1o3za_16", La = "_startIcon_1o3za_61", Ba = "_label_1o3za_66", Fa = "_closeButton_1o3za_70", ne = {
646
+ chip: Da,
647
+ clickable: Pa,
648
+ "variant-primary": "_variant-primary_1o3za_26",
649
+ "variant-secondary": "_variant-secondary_1o3za_31",
650
+ "variant-success": "_variant-success_1o3za_36",
651
+ "variant-warning": "_variant-warning_1o3za_41",
652
+ "variant-error": "_variant-error_1o3za_46",
653
+ "variant-outline": "_variant-outline_1o3za_51",
654
+ startIcon: La,
655
+ label: Ba,
656
+ closeButton: Fa
657
+ }, _n = f(function({ variant: e = "primary", icon: n, onClose: t, clickable: r, children: o, className: c = "", ...d }, l) {
658
+ return /* @__PURE__ */ a.jsxs(
659
+ "span",
660
+ {
661
+ ref: l,
662
+ className: m(
663
+ ne.chip,
664
+ ne[`variant-${e}`],
665
+ r && ne.clickable,
666
+ c
667
+ ),
668
+ role: r ? "button" : void 0,
669
+ tabIndex: r ? 0 : void 0,
670
+ ...d,
671
+ children: [
672
+ n && /* @__PURE__ */ a.jsx(B, { icon: n, size: 16, className: ne.startIcon }),
673
+ /* @__PURE__ */ a.jsx("span", { className: ne.label, children: o }),
674
+ t && /* @__PURE__ */ a.jsx(
675
+ "button",
676
+ {
677
+ type: "button",
678
+ className: ne.closeButton,
679
+ onClick: (i) => {
680
+ i.stopPropagation(), t();
681
+ },
682
+ "aria-label": "Remove",
683
+ children: /* @__PURE__ */ a.jsx(B, { icon: "close", size: 14 })
684
+ }
685
+ )
686
+ ]
687
+ }
688
+ );
689
+ });
690
+ _n.displayName = "SandChip";
691
+ const Ls = _n, nn = {
692
+ "sand-btn": "_sand-btn_9p0tq_1",
693
+ "sand-btn-primary": "_sand-btn-primary_9p0tq_28",
694
+ "sand-btn-secondary": "_sand-btn-secondary_9p0tq_39",
695
+ "sand-btn-outline": "_sand-btn-outline_9p0tq_49",
696
+ "sand-btn-success": "_sand-btn-success_9p0tq_59",
697
+ "sand-btn-failed": "_sand-btn-failed_9p0tq_69"
698
+ }, Ae = f(function({ variant: e = "primary", className: n = "", type: t = "button", ...r }, o) {
699
+ const c = E(() => nn[`sand-btn-${e}`], [e]);
700
+ return /* @__PURE__ */ a.jsx(
701
+ "button",
702
+ {
703
+ ref: o,
704
+ className: m(nn["sand-btn"], c, n),
705
+ type: t,
706
+ ...r
707
+ }
708
+ );
709
+ });
710
+ Ae.displayName = "SandButton";
711
+ const je = {
712
+ "sand-card": "_sand-card_hf89l_1",
713
+ "sand-card-header": "_sand-card-header_hf89l_14",
714
+ "sand-card-body": "_sand-card-body_hf89l_22",
715
+ "sand-card-footer": "_sand-card-footer_hf89l_29"
716
+ }, qa = f(function({ header: e, footer: n, children: t, className: r = "", ...o }, c) {
717
+ return /* @__PURE__ */ a.jsxs("article", { ref: c, className: m(je["sand-card"], r), ...o, children: [
718
+ e && /* @__PURE__ */ a.jsx("header", { className: je["sand-card-header"], children: e }),
719
+ /* @__PURE__ */ a.jsx("div", { className: je["sand-card-body"], children: t }),
720
+ n && /* @__PURE__ */ a.jsx("footer", { className: je["sand-card-footer"], children: n })
721
+ ] });
722
+ });
723
+ qa.displayName = "SandCard";
724
+ const Va = "_active_1i66s_73", re = {
725
+ "sand-code-block": "_sand-code-block_1i66s_1",
726
+ "sand-copy-btn": "_sand-copy-btn_1i66s_20",
727
+ "sand-code-tabs": "_sand-code-tabs_1i66s_40",
728
+ "sand-tab-headers": "_sand-tab-headers_1i66s_51",
729
+ "sand-tab-btn": "_sand-tab-btn_1i66s_58",
730
+ active: Va
731
+ };
732
+ function Ha(s) {
733
+ if (!s) return "";
734
+ let e = s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
735
+ const n = [], t = (r, o) => {
736
+ const c = `___TOKEN_${n.length}___`;
737
+ return n.push(`<span class="token-${o}">${r}</span>`), c;
738
+ };
739
+ return e = e.replace(/\/\/.*/g, (r) => t(r, "comment")), e = e.replace(/\/\*[\s\S]*?\*\//g, (r) => t(r, "comment")), e = e.replace(/(["'`])(?:\\.|[^\\])*?\1/g, (r) => t(r, "string")), e = e.replace(/\b(true|false|null|undefined)\b/g, (r) => t(r, "boolean")), e = e.replace(
740
+ /\b(const|let|var|function|return|if|else|for|while|import|export|from|default|class|extends|type|interface|enum|async|await|try|catch|finally|throw|new|this|super|public|private|protected|readonly|static|get|set|as|in|of|void|any|number|string|boolean|symbol|bigint)\b/g,
741
+ (r) => t(r, "keyword")
742
+ ), e = e.replace(
743
+ /\b(React|useState|useEffect|useMemo|useCallback|useId|useRef|forwardRef|ComponentPropsWithoutRef|ReactNode|FC|HTMLAttributes)\b/g,
744
+ (r) => t(r, "class")
745
+ ), e = e.replace(/\b([a-z_][a-z0-9_]*)(?=\s*\()/gi, (r) => t(r, "function")), e = e.replace(/&lt;[A-Z][a-zA-Z0-9]*/g, (r) => t(r, "component")), e = e.replace(/&lt;\/?[a-z][a-z0-9]*/g, (r) => t(r, "tag")), e = e.replace(/&lt;\/[a-zA-Z0-9]+&gt;/gi, (r) => t(r, "tag")), e = e.replace(/\b([a-z][a-zA-Z0-9]*)(?=\s*=\s*[{"])/g, (r) => t(r, "attr")), e = e.replace(/\b(\d+)\b/g, (r) => t(r, "number")), e = e.replace(/(=&gt;|===|==|=|\+|-|\*|\/|&amp;&amp;|\|\||!)/g, (r) => t(r, "operator")), n.forEach((r, o) => {
746
+ e = e.replace(`___TOKEN_${o}___`, r);
747
+ }), e;
748
+ }
749
+ const pn = f(function({ code: e, className: n = "", ...t }, r) {
750
+ const [o, c] = F(!1), d = A(() => {
751
+ navigator.clipboard.writeText(e).then(() => {
752
+ c(!0), setTimeout(() => c(!1), 2e3);
753
+ });
754
+ }, [e]), l = E(() => Ha(e), [e]);
755
+ return /* @__PURE__ */ a.jsxs("pre", { ref: r, className: m(re["sand-code-block"], n), ...t, children: [
756
+ /* @__PURE__ */ a.jsx(
757
+ "button",
758
+ {
759
+ className: re["sand-copy-btn"],
760
+ onClick: d,
761
+ type: "button",
762
+ "aria-label": o ? "Code copied to clipboard" : "Copy code to clipboard",
763
+ children: o ? "Copied" : "Copy"
764
+ }
765
+ ),
766
+ /* @__PURE__ */ a.jsx("code", { dangerouslySetInnerHTML: { __html: l } })
767
+ ] });
768
+ });
769
+ pn.displayName = "SandCodeBlock";
770
+ const Ga = f(function({ items: e, tabs: n, defaultTab: t = 0, className: r = "", onTabChange: o }, c) {
771
+ const d = E(() => e ?? n ?? [], [e, n]), [l, i] = F(t), _ = O(), p = z([]), h = A(
772
+ (b) => {
773
+ i(b), o?.(b), p.current[b]?.focus();
774
+ },
775
+ [o]
776
+ ), v = E(() => d[l]?.code ?? "", [l, d]);
777
+ return /* @__PURE__ */ a.jsxs("div", { ref: c, className: m(re["sand-code-tabs"], r), children: [
778
+ /* @__PURE__ */ a.jsx("div", { className: re["sand-tab-headers"], role: "tablist", "aria-label": "Code examples", children: d.map((b, g) => /* @__PURE__ */ a.jsx(
779
+ "button",
780
+ {
781
+ ref: (j) => {
782
+ p.current[g] = j;
783
+ },
784
+ className: m(re["sand-tab-btn"], l === g && re.active),
785
+ type: "button",
786
+ role: "tab",
787
+ "aria-selected": l === g,
788
+ "aria-controls": `${_}-code-panel-${g}`,
789
+ id: `${_}-code-tab-${g}`,
790
+ tabIndex: l === g ? 0 : -1,
791
+ onClick: () => h(g),
792
+ onKeyDown: (j) => ke(j, g, d.length, (y) => h(y)),
793
+ children: b.name
794
+ },
795
+ g
796
+ )) }),
797
+ /* @__PURE__ */ a.jsx(
798
+ "div",
799
+ {
800
+ role: "tabpanel",
801
+ id: `${_}-code-panel-${l}`,
802
+ "aria-labelledby": `${_}-code-tab-${l}`,
803
+ children: /* @__PURE__ */ a.jsx(pn, { code: v })
804
+ }
805
+ )
806
+ ] });
807
+ });
808
+ Ga.displayName = "SandCodeTabs";
809
+ const Ka = {
810
+ "sand-divider": "_sand-divider_svs0p_1"
811
+ }, Ya = f(function({ className: e = "", ...n }, t) {
812
+ return /* @__PURE__ */ a.jsx("hr", { ref: t, className: m(Ka["sand-divider"], e), ...n });
813
+ });
814
+ Ya.displayName = "SandDivider";
815
+ const V = {
816
+ "sand-feedback": "_sand-feedback_1fyl0_1",
817
+ "sand-feedback-toast": "_sand-feedback-toast_1fyl0_12",
818
+ "sand-feedback-snackbar": "_sand-feedback-snackbar_1fyl0_18",
819
+ "sand-feedback-row": "_sand-feedback-row_1fyl0_28",
820
+ "sand-feedback-icon": "_sand-feedback-icon_1fyl0_34",
821
+ "sand-feedback-content": "_sand-feedback-content_1fyl0_41",
822
+ "sand-feedback-title": "_sand-feedback-title_1fyl0_49",
823
+ "sand-feedback-message": "_sand-feedback-message_1fyl0_55",
824
+ "sand-feedback-action": "_sand-feedback-action_1fyl0_61",
825
+ "sand-feedback-success": "_sand-feedback-success_1fyl0_65",
826
+ "sand-feedback-failed": "_sand-feedback-failed_1fyl0_72",
827
+ "sand-feedback-info": "_sand-feedback-info_1fyl0_79"
828
+ }, Wa = {
829
+ info: "info",
830
+ success: "check_circle",
831
+ failed: "error"
832
+ }, mn = f(function({ heading: e, message: n, action: t, variant: r = "info", className: o = "", mode: c, ...d }, l) {
833
+ const i = E(() => Wa[r], [r]), _ = r === "failed" ? "alert" : "status";
834
+ return /* @__PURE__ */ a.jsx(
835
+ "div",
836
+ {
837
+ ref: l,
838
+ role: _,
839
+ "aria-live": r === "failed" ? "assertive" : "polite",
840
+ className: m(
841
+ V["sand-feedback"],
842
+ V[`sand-feedback-${c}`],
843
+ V[`sand-feedback-${r}`],
844
+ o
845
+ ),
846
+ ...d,
847
+ children: /* @__PURE__ */ a.jsxs("div", { className: V["sand-feedback-row"], children: [
848
+ /* @__PURE__ */ a.jsx("span", { className: m(V["sand-feedback-icon"], "material-symbols-rounded"), "aria-hidden": "true", children: i }),
849
+ /* @__PURE__ */ a.jsxs("div", { className: V["sand-feedback-content"], children: [
850
+ e && /* @__PURE__ */ a.jsx("span", { className: V["sand-feedback-title"], children: e }),
851
+ /* @__PURE__ */ a.jsx("span", { className: V["sand-feedback-message"], children: n })
852
+ ] }),
853
+ t && /* @__PURE__ */ a.jsx("div", { className: V["sand-feedback-action"], children: t })
854
+ ] })
855
+ }
856
+ );
857
+ }), Ua = f(function(e, n) {
858
+ return /* @__PURE__ */ a.jsx(mn, { ref: n, mode: "toast", ...e });
859
+ });
860
+ Ua.displayName = "SandToast";
861
+ const Ja = f(function(e, n) {
862
+ return /* @__PURE__ */ a.jsx(mn, { ref: n, mode: "snackbar", ...e });
863
+ });
864
+ Ja.displayName = "SandSnackbar";
865
+ const Xa = "_grid_g8kr4_1", Za = "_item_g8kr4_7", fn = {
866
+ grid: Xa,
867
+ item: Za
868
+ }, bn = f(function({ columns: e = 12, gap: n = "md", className: t, style: r, ...o }, c) {
869
+ let d = r;
870
+ return d = cn(d, "sand-grid-columns", e), d = C(d, "--sand-grid-gap", me(n)), /* @__PURE__ */ a.jsx("div", { ref: c, className: m(fn.grid, t), style: d, ...o });
871
+ });
872
+ bn.displayName = "SandGrid";
873
+ const hn = f(function({ span: e = 1, className: n, style: t, ...r }, o) {
874
+ let c = t;
875
+ return c = cn(c, "sand-grid-span", e), /* @__PURE__ */ a.jsx("div", { ref: o, className: m(fn.item, n), style: c, ...r });
876
+ });
877
+ hn.displayName = "SandGrid.Item";
878
+ const Bs = Object.assign(bn, {
879
+ Item: hn
880
+ }), he = {
881
+ "sand-form-group": "_sand-form-group_6kvlc_1",
882
+ "sand-label": "_sand-label_6kvlc_8",
883
+ "sand-input": "_sand-input_6kvlc_17",
884
+ "sand-input-error": "_sand-input-error_6kvlc_37",
885
+ "sand-helper-text-error": "_sand-helper-text-error_6kvlc_45"
886
+ }, xe = f(function({ label: e, children: n, className: t = "", htmlFor: r, ...o }, c) {
887
+ return /* @__PURE__ */ a.jsxs("div", { ref: c, className: m(he["sand-form-group"], t), ...o, children: [
888
+ e && /* @__PURE__ */ a.jsx("label", { className: he["sand-label"], htmlFor: r, children: e }),
889
+ n
890
+ ] });
891
+ });
892
+ xe.displayName = "SandFormGroup";
893
+ const vn = f(function({ error: e, className: n = "", ...t }, r) {
894
+ return /* @__PURE__ */ a.jsx(
895
+ "input",
896
+ {
897
+ ref: r,
898
+ className: m(he["sand-input"], e && he["sand-input-error"], n),
899
+ "aria-invalid": e || t["aria-invalid"],
900
+ ...t
901
+ }
902
+ );
903
+ });
904
+ vn.displayName = "SandInput";
905
+ const Qa = f(function({ label: e, helperText: n, error: t, groupClassName: r, className: o = "", "aria-describedby": c, ...d }, l) {
906
+ const i = O(), _ = d.id ?? i, p = n ? `${_}-help` : void 0, h = E(
907
+ () => [c, p].filter(Boolean).join(" ") || void 0,
908
+ [c, p]
909
+ );
910
+ return /* @__PURE__ */ a.jsxs(xe, { label: e, className: r, htmlFor: _, children: [
911
+ /* @__PURE__ */ a.jsx(
912
+ vn,
913
+ {
914
+ ref: l,
915
+ id: _,
916
+ error: t,
917
+ className: o,
918
+ "aria-describedby": h,
919
+ ...d
920
+ }
921
+ ),
922
+ n && /* @__PURE__ */ a.jsx("span", { id: p, className: t ? he["sand-helper-text-error"] : "", children: n })
923
+ ] });
924
+ });
925
+ Qa.displayName = "SandInputGroup";
926
+ const et = {
927
+ "sand-kbd": "_sand-kbd_mo78g_1"
928
+ }, nt = f(function({ className: e = "", ...n }, t) {
929
+ return /* @__PURE__ */ a.jsx("kbd", { ref: t, className: m(et["sand-kbd"], e), ...n });
930
+ });
931
+ nt.displayName = "SandKBD";
932
+ const at = "_loader_1onos_1", tt = "_skeleton_1onos_10", yn = {
933
+ loader: at,
934
+ skeleton: tt
935
+ }, st = f(function({ size: e = 40, className: n, style: t, ...r }, o) {
936
+ return /* @__PURE__ */ a.jsx(
937
+ "span",
938
+ {
939
+ ref: o,
940
+ className: m(yn.loader, n),
941
+ style: { "--sand-loader-size": `${e}px`, ...t },
942
+ ...r
943
+ }
944
+ );
945
+ });
946
+ st.displayName = "SandLoader";
947
+ const rt = f(function({ width: e = "100%", height: n = 16, radius: t = "md", className: r, style: o, ...c }, d) {
948
+ return /* @__PURE__ */ a.jsx(
949
+ "div",
950
+ {
951
+ ref: d,
952
+ "aria-hidden": "true",
953
+ className: m(yn.skeleton, r),
954
+ style: {
955
+ width: e,
956
+ height: n,
957
+ "--sand-skeleton-radius": on(t),
958
+ ...o
959
+ },
960
+ ...c
961
+ }
962
+ );
963
+ });
964
+ rt.displayName = "SandSkeleton";
965
+ const ot = "_container_x9f0c_1", ct = "_slider_x9f0c_8", it = "_error_x9f0c_43", dt = "_valueDisplay_x9f0c_50", lt = "_helper_x9f0c_58", ae = {
966
+ container: ot,
967
+ slider: ct,
968
+ error: it,
969
+ valueDisplay: dt,
970
+ helper: lt,
971
+ "helper-error": "_helper-error_x9f0c_64"
972
+ }, ut = f(function({ label: e, helperText: n, error: t, className: r = "", ...o }, c) {
973
+ const d = O(), l = o.id ?? d, i = n ? `${l}-help` : void 0;
974
+ return /* @__PURE__ */ a.jsxs(xe, { label: e, htmlFor: l, children: [
975
+ /* @__PURE__ */ a.jsxs("div", { className: ae.container, children: [
976
+ /* @__PURE__ */ a.jsx(
977
+ "input",
978
+ {
979
+ ref: c,
980
+ id: l,
981
+ type: "range",
982
+ className: m(ae.slider, t && ae.error, r),
983
+ "aria-invalid": t || void 0,
984
+ "aria-describedby": i,
985
+ ...o
986
+ }
987
+ ),
988
+ o.value !== void 0 && /* @__PURE__ */ a.jsx("span", { className: ae.valueDisplay, children: o.value })
989
+ ] }),
990
+ n && /* @__PURE__ */ a.jsx("span", { id: i, className: m(ae.helper, t && ae["helper-error"]), children: n })
991
+ ] });
992
+ });
993
+ ut.displayName = "SandSlider";
994
+ const G = {
995
+ "sand-container": "_sand-container_plvlx_1",
996
+ "sand-header": "_sand-header_plvlx_7",
997
+ "sand-tool-layout": "_sand-tool-layout_plvlx_17",
998
+ "sand-tool-panel": "_sand-tool-panel_plvlx_24",
999
+ "sand-result-panel": "_sand-result-panel_plvlx_34",
1000
+ "sand-microservice-layout": "_sand-microservice-layout_plvlx_47",
1001
+ "sand-microservice-sidebar": "_sand-microservice-sidebar_plvlx_54",
1002
+ "sand-microservice-content": "_sand-microservice-content_plvlx_67",
1003
+ "sand-microservice-main": "_sand-microservice-main_plvlx_74"
1004
+ }, _t = f(function({ className: e = "", ...n }, t) {
1005
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(G["sand-container"], e), ...n });
1006
+ });
1007
+ _t.displayName = "SandContainer";
1008
+ const pt = f(function({ className: e = "", ...n }, t) {
1009
+ return /* @__PURE__ */ a.jsx("header", { ref: t, className: m(G["sand-header"], e), ...n });
1010
+ });
1011
+ pt.displayName = "SandHeader";
1012
+ const Me = f(
1013
+ function({ className: e = "", ...n }, t) {
1014
+ return /* @__PURE__ */ a.jsx("aside", { ref: t, className: m(G["sand-tool-panel"], e), ...n });
1015
+ }
1016
+ );
1017
+ Me.displayName = "SandAppLayout.Sidebar";
1018
+ const ze = f(
1019
+ function({ className: e = "", ...n }, t) {
1020
+ return /* @__PURE__ */ a.jsx("main", { ref: t, className: m(G["sand-result-panel"], e), ...n });
1021
+ }
1022
+ );
1023
+ ze.displayName = "SandAppLayout.Main";
1024
+ const mt = f(
1025
+ function({ className: e = "", ...n }, t) {
1026
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(G["sand-tool-layout"], e), ...n });
1027
+ }
1028
+ ), xn = Object.assign(mt, {
1029
+ Sidebar: Me,
1030
+ Main: ze
1031
+ });
1032
+ xn.displayName = "SandAppLayout";
1033
+ const Fs = xn, qs = Me, Vs = ze, gn = f(
1034
+ function({ children: e, className: n = "", ...t }, r) {
1035
+ return /* @__PURE__ */ a.jsx("aside", { ref: r, className: m(G["sand-microservice-sidebar"], n), ...t, children: e });
1036
+ }
1037
+ );
1038
+ gn.displayName = "SandMicroserviceLayout.Sidebar";
1039
+ const Sn = f(
1040
+ function({ children: e, className: n = "", ...t }, r) {
1041
+ return /* @__PURE__ */ a.jsx("div", { ref: r, className: m(G["sand-microservice-content"], n), ...t, children: e });
1042
+ }
1043
+ );
1044
+ Sn.displayName = "SandMicroserviceLayout.Content";
1045
+ const jn = f(
1046
+ function({ children: e, className: n = "", ...t }, r) {
1047
+ return /* @__PURE__ */ a.jsx("main", { ref: r, className: m(G["sand-microservice-main"], n), ...t, children: e });
1048
+ }
1049
+ );
1050
+ jn.displayName = "SandMicroserviceLayout.Main";
1051
+ const we = f(
1052
+ function({ children: e, className: n = "", ...t }, r) {
1053
+ return /* @__PURE__ */ a.jsx("div", { ref: r, className: m(G["sand-microservice-layout"], n), ...t, children: e });
1054
+ }
1055
+ );
1056
+ we.displayName = "SandMicroserviceLayout";
1057
+ we.Sidebar = gn;
1058
+ we.Content = Sn;
1059
+ we.Main = jn;
1060
+ const H = {
1061
+ "sand-modal-root": "_sand-modal-root_1e60v_1",
1062
+ "sand-modal-backdrop": "_sand-modal-backdrop_1e60v_11",
1063
+ "sand-modal-panel": "_sand-modal-panel_1e60v_22",
1064
+ "sand-modal-header": "_sand-modal-header_1e60v_36",
1065
+ "sand-modal-title": "_sand-modal-title_1e60v_45",
1066
+ "sand-modal-description": "_sand-modal-description_1e60v_52",
1067
+ "sand-modal-close": "_sand-modal-close_1e60v_59",
1068
+ "sand-modal-body": "_sand-modal-body_1e60v_78",
1069
+ "sand-modal-footer": "_sand-modal-footer_1e60v_86"
1070
+ };
1071
+ function Te(s, e) {
1072
+ const { enabled: n, initialFocusRef: t } = e, r = z(null), o = A(
1073
+ (c) => {
1074
+ if (!n || !s.current || c.key !== "Tab")
1075
+ return;
1076
+ const d = ea(s.current);
1077
+ if (d.length === 0) {
1078
+ c.preventDefault(), s.current.focus();
1079
+ return;
1080
+ }
1081
+ const l = d[0], i = d[d.length - 1], _ = document.activeElement;
1082
+ c.shiftKey && _ === l ? (c.preventDefault(), i.focus()) : !c.shiftKey && _ === i && (c.preventDefault(), l.focus());
1083
+ },
1084
+ [n, s]
1085
+ );
1086
+ K(() => {
1087
+ if (!n) {
1088
+ r.current && (r.current.focus(), r.current = null);
1089
+ return;
1090
+ }
1091
+ r.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
1092
+ const d = setTimeout(() => {
1093
+ const l = t?.current || s.current;
1094
+ l && l.focus();
1095
+ }, 16);
1096
+ return window.addEventListener("keydown", o), () => {
1097
+ window.removeEventListener("keydown", o), clearTimeout(d);
1098
+ };
1099
+ }, [n, o, t, s]);
1100
+ }
1101
+ const Nn = f(function({ as: e, direction: n = "column", gap: t = "md", align: r, justify: o, wrap: c, surface: d, className: l, style: i, ..._ }, p) {
1102
+ const h = e ?? "div";
1103
+ let v = i;
1104
+ return v = C(v, "--sand-display", "flex"), v = C(v, "--sand-gap", me(t)), v = C(v, "--sand-align", r), v = C(v, "--sand-justify", o), v = C(v, "--sand-stack-direction", n), v = C(v, "--sand-stack-wrap", c ? "wrap" : "nowrap"), /* @__PURE__ */ a.jsx(
1105
+ h,
1106
+ {
1107
+ ref: p,
1108
+ className: m(fe.box, d && fe.surface, l),
1109
+ style: {
1110
+ flexDirection: "var(--sand-stack-direction)",
1111
+ flexWrap: "var(--sand-stack-wrap)",
1112
+ ...v
1113
+ },
1114
+ ..._
1115
+ }
1116
+ );
1117
+ });
1118
+ Nn.displayName = "SandStack";
1119
+ const kn = ye(null);
1120
+ function wn() {
1121
+ const s = ve(kn);
1122
+ if (!s)
1123
+ throw new Error("SandModal sub-components must be used within SandModal.");
1124
+ return s;
1125
+ }
1126
+ const De = f(function({ className: e = "", ...n }, t) {
1127
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(H["sand-modal-header"], e), ...n });
1128
+ });
1129
+ De.displayName = "SandModal.Header";
1130
+ const Pe = f(function({ className: e = "", ...n }, t) {
1131
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(H["sand-modal-body"], e), ...n });
1132
+ });
1133
+ Pe.displayName = "SandModal.Body";
1134
+ const Le = f(function({ className: e = "", ...n }, t) {
1135
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(H["sand-modal-footer"], e), ...n });
1136
+ });
1137
+ Le.displayName = "SandModal.Footer";
1138
+ const Be = f(function({ className: e = "", ...n }, t) {
1139
+ const { titleId: r } = wn();
1140
+ return /* @__PURE__ */ a.jsx("div", { ref: t, id: r, className: m(H["sand-modal-title"], e), ...n });
1141
+ });
1142
+ Be.displayName = "SandModal.Title";
1143
+ const Fe = f(function({ className: e = "", ...n }, t) {
1144
+ const { descriptionId: r } = wn();
1145
+ return /* @__PURE__ */ a.jsx("div", { ref: t, id: r, className: m(H["sand-modal-description"], e), ...n });
1146
+ });
1147
+ Fe.displayName = "SandModal.Description";
1148
+ const Tn = f(function({
1149
+ open: e,
1150
+ isOpen: n,
1151
+ onClose: t,
1152
+ title: r,
1153
+ description: o,
1154
+ footer: c,
1155
+ closeOnOverlay: d = !0,
1156
+ initialFocusRef: l,
1157
+ children: i,
1158
+ className: _ = "",
1159
+ ...p
1160
+ }, h) {
1161
+ const v = e ?? n ?? !1, b = O(), g = O(), j = z(null), y = z(null), D = E(
1162
+ () => ({ titleId: b, descriptionId: g }),
1163
+ [g, b]
1164
+ ), P = A(
1165
+ (I) => {
1166
+ y.current = I, typeof h == "function" ? h(I) : h && (h.current = I);
1167
+ },
1168
+ [h]
1169
+ );
1170
+ Te(y, {
1171
+ enabled: v,
1172
+ initialFocusRef: l || j
1173
+ });
1174
+ const Y = A(
1175
+ (I) => {
1176
+ I.key === "Escape" && (I.preventDefault(), t());
1177
+ },
1178
+ [t]
1179
+ );
1180
+ return K(() => {
1181
+ if (!v) return;
1182
+ const I = document.body.style.overflow;
1183
+ return document.body.style.overflow = "hidden", () => {
1184
+ document.body.style.overflow = I;
1185
+ };
1186
+ }, [v]), v ? /* @__PURE__ */ a.jsxs("div", { className: H["sand-modal-root"], onKeyDown: Y, children: [
1187
+ /* @__PURE__ */ a.jsx(
1188
+ "button",
1189
+ {
1190
+ type: "button",
1191
+ className: H["sand-modal-backdrop"],
1192
+ "aria-label": "Close dialog",
1193
+ onClick: d ? t : void 0
1194
+ }
1195
+ ),
1196
+ /* @__PURE__ */ a.jsx(
1197
+ "div",
1198
+ {
1199
+ ref: P,
1200
+ role: "dialog",
1201
+ "aria-modal": "true",
1202
+ "aria-labelledby": r ? b : void 0,
1203
+ "aria-describedby": o ? g : void 0,
1204
+ className: m(H["sand-modal-panel"], _),
1205
+ tabIndex: -1,
1206
+ ...p,
1207
+ children: /* @__PURE__ */ a.jsxs(kn.Provider, { value: D, children: [
1208
+ (r || o) && /* @__PURE__ */ a.jsxs(De, { children: [
1209
+ /* @__PURE__ */ a.jsxs("div", { children: [
1210
+ r && /* @__PURE__ */ a.jsx(Be, { children: r }),
1211
+ o && /* @__PURE__ */ a.jsx(Fe, { children: o })
1212
+ ] }),
1213
+ /* @__PURE__ */ a.jsx(
1214
+ "button",
1215
+ {
1216
+ ref: j,
1217
+ type: "button",
1218
+ className: H["sand-modal-close"],
1219
+ onClick: t,
1220
+ "aria-label": "Close dialog",
1221
+ children: /* @__PURE__ */ a.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "close" })
1222
+ }
1223
+ )
1224
+ ] }),
1225
+ /* @__PURE__ */ a.jsx(Pe, { children: i }),
1226
+ c && /* @__PURE__ */ a.jsx(Le, { children: c })
1227
+ ] })
1228
+ }
1229
+ )
1230
+ ] }) : null;
1231
+ });
1232
+ Tn.displayName = "SandModal";
1233
+ const ft = Object.assign(Tn, {
1234
+ Header: De,
1235
+ Body: Pe,
1236
+ Footer: Le,
1237
+ Title: Be,
1238
+ Description: Fe
1239
+ });
1240
+ function Hs({
1241
+ onConfirm: s,
1242
+ onClose: e,
1243
+ confirmLabel: n = "Confirm",
1244
+ cancelLabel: t = "Cancel",
1245
+ confirmVariant: r = "primary",
1246
+ footer: o,
1247
+ children: c,
1248
+ ...d
1249
+ }) {
1250
+ const l = o || /* @__PURE__ */ a.jsxs(Nn, { direction: "row", gap: "sm", justify: "flex-end", children: [
1251
+ /* @__PURE__ */ a.jsx(Ae, { variant: "outline", onClick: e, children: t }),
1252
+ /* @__PURE__ */ a.jsx(Ae, { variant: r, onClick: s, children: n })
1253
+ ] });
1254
+ return /* @__PURE__ */ a.jsx(ft, { onClose: e, footer: l, ...d, children: c });
1255
+ }
1256
+ const bt = "_navbar_ce3ap_1", ht = "_container_ce3ap_11", vt = "_brand_ce3ap_20", yt = "_links_ce3ap_30", xt = "_link_ce3ap_30", gt = "_linkActive_ce3ap_55", St = "_mobileToggle_ce3ap_64", jt = "_overlay_ce3ap_86", Nt = "_overlayVisible_ce3ap_97", kt = "_drawer_ce3ap_102", wt = "_drawerOpen_ce3ap_118", Tt = "_drawerHeader_ce3ap_122", It = "_drawerTitle_ce3ap_130", Ct = "_drawerClose_ce3ap_136", $t = "_drawerContent_ce3ap_150", R = {
1257
+ navbar: bt,
1258
+ container: ht,
1259
+ brand: vt,
1260
+ links: yt,
1261
+ link: xt,
1262
+ linkActive: gt,
1263
+ mobileToggle: St,
1264
+ overlay: jt,
1265
+ overlayVisible: Nt,
1266
+ drawer: kt,
1267
+ drawerOpen: wt,
1268
+ drawerHeader: Tt,
1269
+ drawerTitle: It,
1270
+ drawerClose: Ct,
1271
+ drawerContent: $t
1272
+ }, Oe = () => null;
1273
+ Oe.displayName = "SandNavbarItem";
1274
+ const Gs = f(function({ brand: e, items: n = [], onMenuClick: t, className: r, children: o, ...c }, d) {
1275
+ const l = [...n];
1276
+ return be.forEach(o, (i) => {
1277
+ X(i) && i.type === Oe && l.push(i.props);
1278
+ }), /* @__PURE__ */ a.jsx("nav", { ref: d, className: m(R.navbar, r), ...c, children: /* @__PURE__ */ a.jsxs("div", { className: R.container, children: [
1279
+ /* @__PURE__ */ a.jsx("div", { className: R.brand, children: e }),
1280
+ /* @__PURE__ */ a.jsxs("div", { className: R.links, children: [
1281
+ l.map((i) => /* @__PURE__ */ a.jsx(
1282
+ "a",
1283
+ {
1284
+ href: i.href,
1285
+ className: m(R.link, i.active && R.linkActive),
1286
+ children: i.label
1287
+ },
1288
+ i.href
1289
+ )),
1290
+ be.map(o, (i) => X(i) && i.type === Oe ? null : i)
1291
+ ] }),
1292
+ /* @__PURE__ */ a.jsx(
1293
+ "button",
1294
+ {
1295
+ type: "button",
1296
+ className: R.mobileToggle,
1297
+ onClick: t,
1298
+ "aria-label": "Toggle menu",
1299
+ children: /* @__PURE__ */ a.jsx(B, { icon: "menu", size: 24 })
1300
+ }
1301
+ )
1302
+ ] }) });
1303
+ }), Et = f(function({ open: e, isOpen: n, onClose: t, title: r, children: o, className: c, ...d }, l) {
1304
+ const i = e ?? n ?? !1, _ = z(null), p = z(null), h = A(
1305
+ (b) => {
1306
+ _.current = b, typeof l == "function" ? l(b) : l && (l.current = b);
1307
+ },
1308
+ [l]
1309
+ );
1310
+ Te(_, {
1311
+ enabled: i,
1312
+ initialFocusRef: p
1313
+ });
1314
+ const v = A(
1315
+ (b) => {
1316
+ b.key === "Escape" && (b.preventDefault(), t());
1317
+ },
1318
+ [t]
1319
+ );
1320
+ return K(() => {
1321
+ if (!i) return;
1322
+ const b = document.body.style.overflow;
1323
+ return document.body.style.overflow = "hidden", () => {
1324
+ document.body.style.overflow = b;
1325
+ };
1326
+ }, [i]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1327
+ /* @__PURE__ */ a.jsx(
1328
+ "div",
1329
+ {
1330
+ className: m(R.overlay, i && R.overlayVisible),
1331
+ onClick: t,
1332
+ "aria-hidden": "true"
1333
+ }
1334
+ ),
1335
+ /* @__PURE__ */ a.jsxs(
1336
+ "div",
1337
+ {
1338
+ ref: h,
1339
+ className: m(R.drawer, i && R.drawerOpen, c),
1340
+ role: "dialog",
1341
+ "aria-modal": "true",
1342
+ onKeyDown: v,
1343
+ ...d,
1344
+ children: [
1345
+ /* @__PURE__ */ a.jsxs("div", { className: R.drawerHeader, children: [
1346
+ /* @__PURE__ */ a.jsx("div", { className: R.drawerTitle, children: r }),
1347
+ /* @__PURE__ */ a.jsx(
1348
+ "button",
1349
+ {
1350
+ ref: p,
1351
+ type: "button",
1352
+ className: R.drawerClose,
1353
+ onClick: t,
1354
+ "aria-label": "Close menu",
1355
+ children: /* @__PURE__ */ a.jsx(B, { icon: "close", size: 24 })
1356
+ }
1357
+ )
1358
+ ] }),
1359
+ /* @__PURE__ */ a.jsx("div", { className: R.drawerContent, children: o })
1360
+ ]
1361
+ }
1362
+ )
1363
+ ] });
1364
+ });
1365
+ Et.displayName = "SandDrawer";
1366
+ const ue = {
1367
+ "sand-pagination": "_sand-pagination_cizv5_1",
1368
+ "sand-page-btn": "_sand-page-btn_cizv5_8",
1369
+ "sand-page-btn-active": "_sand-page-btn-active_cizv5_36"
1370
+ }, Rt = f(function({ currentPage: e, totalPages: n, onPageChange: t, className: r = "", ...o }, c) {
1371
+ const d = E(() => Array.from({ length: n }, (_, p) => p + 1), [n]), l = A(
1372
+ (_) => {
1373
+ _ < 1 || _ > n || _ === e || t?.(_);
1374
+ },
1375
+ [e, t, n]
1376
+ ), i = A(
1377
+ (_) => {
1378
+ ke(_, e - 1, n, (p) => l(p + 1));
1379
+ },
1380
+ [e, l, n]
1381
+ );
1382
+ return /* @__PURE__ */ a.jsxs(
1383
+ "nav",
1384
+ {
1385
+ ref: c,
1386
+ "aria-label": "Pagination",
1387
+ className: m(ue["sand-pagination"], r),
1388
+ onKeyDown: i,
1389
+ ...o,
1390
+ children: [
1391
+ /* @__PURE__ */ a.jsx(
1392
+ "button",
1393
+ {
1394
+ type: "button",
1395
+ className: ue["sand-page-btn"],
1396
+ disabled: e === 1,
1397
+ "aria-label": "Previous page",
1398
+ onClick: () => l(e - 1),
1399
+ children: /* @__PURE__ */ a.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "chevron_left" })
1400
+ }
1401
+ ),
1402
+ d.map((_) => /* @__PURE__ */ a.jsx(
1403
+ "button",
1404
+ {
1405
+ type: "button",
1406
+ "aria-current": _ === e ? "page" : void 0,
1407
+ "aria-label": `Page ${_}`,
1408
+ className: m(ue["sand-page-btn"], _ === e && ue["sand-page-btn-active"]),
1409
+ onClick: () => l(_),
1410
+ children: _
1411
+ },
1412
+ _
1413
+ )),
1414
+ /* @__PURE__ */ a.jsx(
1415
+ "button",
1416
+ {
1417
+ type: "button",
1418
+ className: ue["sand-page-btn"],
1419
+ disabled: e === n,
1420
+ "aria-label": "Next page",
1421
+ onClick: () => l(e + 1),
1422
+ children: /* @__PURE__ */ a.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "chevron_right" })
1423
+ }
1424
+ )
1425
+ ]
1426
+ }
1427
+ );
1428
+ });
1429
+ Rt.displayName = "SandPagination";
1430
+ function In(s = {}) {
1431
+ const { isOpen: e, defaultIsOpen: n, onClose: t, onOpen: r } = s, [o, c] = F(n || !1), d = e !== void 0, l = d ? e : o, i = A(() => {
1432
+ d || c(!0), r?.();
1433
+ }, [d, r]), _ = A(() => {
1434
+ d || c(!1), t?.();
1435
+ }, [d, t]), p = A(() => {
1436
+ l ? _() : i();
1437
+ }, [l, i, _]);
1438
+ return {
1439
+ isOpen: l,
1440
+ onOpen: i,
1441
+ onClose: _,
1442
+ onToggle: p,
1443
+ setIsOpen: c
1444
+ };
1445
+ }
1446
+ const At = "_content_1b598_1", Ot = {
1447
+ content: At
1448
+ }, Cn = ye(null), $n = () => {
1449
+ const s = ve(Cn);
1450
+ if (!s) throw new Error("Popover components must be used within SandPopover");
1451
+ return s;
1452
+ };
1453
+ function qe({ children: s, defaultOpen: e, open: n, onOpenChange: t }) {
1454
+ const r = O(), o = z(null), { isOpen: c, onClose: d, onToggle: l } = In({
1455
+ isOpen: n,
1456
+ defaultIsOpen: e,
1457
+ onClose: () => t?.(!1),
1458
+ onOpen: () => t?.(!0)
1459
+ }), i = E(() => ({
1460
+ isOpen: c,
1461
+ onClose: d,
1462
+ onToggle: l,
1463
+ triggerRef: o,
1464
+ popoverId: r
1465
+ }), [c, d, l, r]);
1466
+ return /* @__PURE__ */ a.jsx(Cn.Provider, { value: i, children: s });
1467
+ }
1468
+ function Mt({ children: s }) {
1469
+ const { onToggle: e, isOpen: n, triggerRef: t, popoverId: r } = $n();
1470
+ return X(s) ? sn(s, {
1471
+ ref: t,
1472
+ onClick: (o) => {
1473
+ s.props.onClick?.(o), e();
1474
+ },
1475
+ "aria-haspopup": "dialog",
1476
+ "aria-expanded": n,
1477
+ "aria-controls": r
1478
+ }) : s;
1479
+ }
1480
+ const zt = f(function({ children: e, width: n, className: t = "", style: r, ...o }, c) {
1481
+ const { isOpen: d, onClose: l, triggerRef: i, popoverId: _ } = $n(), p = z(null);
1482
+ return Te(p, { enabled: d }), K(() => {
1483
+ if (!d) return;
1484
+ const h = (v) => {
1485
+ v instanceof KeyboardEvent && v.key === "Escape" && (l(), i.current?.focus()), v instanceof MouseEvent && p.current && !p.current.contains(v.target) && i.current && !i.current.contains(v.target) && l();
1486
+ };
1487
+ return document.addEventListener("mousedown", h), document.addEventListener("keydown", h), () => {
1488
+ document.removeEventListener("mousedown", h), document.removeEventListener("keydown", h);
1489
+ };
1490
+ }, [d, l, i]), d ? rn(
1491
+ /* @__PURE__ */ a.jsx(
1492
+ "div",
1493
+ {
1494
+ ref: (h) => {
1495
+ p.current = h, typeof c == "function" ? c(h) : c && (c.current = h);
1496
+ },
1497
+ id: _,
1498
+ role: "dialog",
1499
+ className: m(Ot.content, t),
1500
+ style: {
1501
+ width: n,
1502
+ ...r
1503
+ },
1504
+ ...o,
1505
+ children: e
1506
+ }
1507
+ ),
1508
+ document.body
1509
+ ) : null;
1510
+ });
1511
+ qe.Trigger = Mt;
1512
+ qe.Content = zt;
1513
+ qe.displayName = "SandPopover";
1514
+ const Dt = "_track_1b1ni_1", Pt = "_bar_1b1ni_8", Lt = "_ring_1b1ni_15", Bt = "_ringTrack_1b1ni_19", Ft = "_ringValue_1b1ni_24", qt = "_label_1b1ni_32", te = {
1515
+ track: Dt,
1516
+ bar: Pt,
1517
+ ring: Lt,
1518
+ ringTrack: Bt,
1519
+ ringValue: Ft,
1520
+ label: qt
1521
+ };
1522
+ function Vt(s, e) {
1523
+ return Math.min(Math.max(s, 0), e);
1524
+ }
1525
+ const Ht = f(function({ value: e, max: n = 100, size: t = 96, thickness: r = 8, variant: o = "linear", showValue: c, className: d, style: l, ...i }, _) {
1526
+ const p = Vt(e, n), h = p / n * 100;
1527
+ if (o === "circular") {
1528
+ const v = (t - r) / 2, b = 2 * Math.PI * v, g = b - h / 100 * b;
1529
+ return /* @__PURE__ */ a.jsxs(
1530
+ "div",
1531
+ {
1532
+ ref: _,
1533
+ role: "progressbar",
1534
+ "aria-valuemin": 0,
1535
+ "aria-valuemax": n,
1536
+ "aria-valuenow": p,
1537
+ className: m(d),
1538
+ style: { position: "relative", width: t, height: t, ...l },
1539
+ ...i,
1540
+ children: [
1541
+ /* @__PURE__ */ a.jsxs("svg", { className: te.ring, width: t, height: t, viewBox: `0 0 ${t} ${t}`, children: [
1542
+ /* @__PURE__ */ a.jsx("circle", { className: te.ringTrack, cx: t / 2, cy: t / 2, r: v, strokeWidth: r }),
1543
+ /* @__PURE__ */ a.jsx(
1544
+ "circle",
1545
+ {
1546
+ className: te.ringValue,
1547
+ cx: t / 2,
1548
+ cy: t / 2,
1549
+ r: v,
1550
+ strokeWidth: r,
1551
+ strokeDasharray: b,
1552
+ strokeDashoffset: g
1553
+ }
1554
+ )
1555
+ ] }),
1556
+ c && /* @__PURE__ */ a.jsxs("span", { className: te.label, children: [
1557
+ Math.round(h),
1558
+ "%"
1559
+ ] })
1560
+ ]
1561
+ }
1562
+ );
1563
+ }
1564
+ return /* @__PURE__ */ a.jsx(
1565
+ "div",
1566
+ {
1567
+ ref: _,
1568
+ role: "progressbar",
1569
+ "aria-valuemin": 0,
1570
+ "aria-valuemax": n,
1571
+ "aria-valuenow": p,
1572
+ className: m(te.track, d),
1573
+ style: { height: r, ...l },
1574
+ ...i,
1575
+ children: /* @__PURE__ */ a.jsx("div", { className: te.bar, style: { width: `${h}%` } })
1576
+ }
1577
+ );
1578
+ });
1579
+ Ht.displayName = "SandProgress";
1580
+ const Gt = "_container_15onh_1", Kt = "_nativeSelect_15onh_6", Yt = "_trigger_15onh_18", Wt = "_triggerActive_15onh_43", Ut = "_error_15onh_47", Jt = "_value_15onh_55", Xt = "_placeholder_15onh_62", Zt = "_chevron_15onh_66", Qt = "_chevronOpen_15onh_72", es = "_listbox_15onh_76", ns = "_option_15onh_93", as = "_optionSelected_15onh_109", ts = "_optionDisabled_15onh_118", ss = "_checkIcon_15onh_124", rs = "_helper_15onh_128", $ = {
1581
+ container: Gt,
1582
+ nativeSelect: Kt,
1583
+ trigger: Yt,
1584
+ triggerActive: Wt,
1585
+ error: Ut,
1586
+ value: Jt,
1587
+ placeholder: Xt,
1588
+ chevron: Zt,
1589
+ chevronOpen: Qt,
1590
+ listbox: es,
1591
+ option: ns,
1592
+ optionSelected: as,
1593
+ optionDisabled: ts,
1594
+ checkIcon: ss,
1595
+ helper: rs,
1596
+ "helper-error": "_helper-error_15onh_134"
1597
+ }, os = f(function({ label: e, helperText: n, error: t, options: r = [], placeholder: o = "Select an option...", value: c, defaultValue: d, onChange: l, className: i = "", ..._ }, p) {
1598
+ const h = O(), v = _.id ?? h, b = n ? `${v}-help` : void 0, [g, j] = F(d ?? c ?? ""), { isOpen: y, onOpen: D, onClose: P, onToggle: Y } = In(), I = z(null), Z = z(null), W = z(null), oe = r.find((S) => S.value === (c ?? g)), U = A((S) => {
1599
+ j(S), l?.(S), P(), W.current?.focus();
1600
+ }, [l, P]);
1601
+ Te(Z, { enabled: y }), K(() => {
1602
+ if (!y) return;
1603
+ const S = (q) => {
1604
+ I.current && !I.current.contains(q.target) && P();
1605
+ };
1606
+ return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
1607
+ }, [y, P]);
1608
+ const Ce = (S) => {
1609
+ S.key === "Escape" && (P(), W.current?.focus()), S.key === "ArrowDown" && !y && D();
1610
+ };
1611
+ return /* @__PURE__ */ a.jsxs(xe, { label: e, htmlFor: v, children: [
1612
+ /* @__PURE__ */ a.jsxs("div", { ref: I, className: $.container, onKeyDown: Ce, children: [
1613
+ /* @__PURE__ */ a.jsxs(
1614
+ "select",
1615
+ {
1616
+ ref: p,
1617
+ id: v,
1618
+ value: c ?? g,
1619
+ onChange: (S) => U(S.target.value),
1620
+ className: $.nativeSelect,
1621
+ tabIndex: -1,
1622
+ "aria-hidden": "true",
1623
+ ..._,
1624
+ children: [
1625
+ /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: o }),
1626
+ r.map((S) => /* @__PURE__ */ a.jsx("option", { value: S.value, disabled: S.disabled, children: S.label }, S.value))
1627
+ ]
1628
+ }
1629
+ ),
1630
+ /* @__PURE__ */ a.jsxs(
1631
+ "button",
1632
+ {
1633
+ ref: W,
1634
+ type: "button",
1635
+ "aria-haspopup": "listbox",
1636
+ "aria-expanded": y,
1637
+ "aria-labelledby": `${v}-label`,
1638
+ className: m(
1639
+ $.trigger,
1640
+ t && $.error,
1641
+ y && $.triggerActive,
1642
+ i
1643
+ ),
1644
+ onClick: Y,
1645
+ children: [
1646
+ /* @__PURE__ */ a.jsx("span", { className: m($.value, !oe && $.placeholder), children: oe ? oe.label : o }),
1647
+ /* @__PURE__ */ a.jsx(B, { icon: "expand_more", size: 20, className: m($.chevron, y && $.chevronOpen) })
1648
+ ]
1649
+ }
1650
+ ),
1651
+ y && /* @__PURE__ */ a.jsx(
1652
+ "ul",
1653
+ {
1654
+ ref: Z,
1655
+ role: "listbox",
1656
+ className: $.listbox,
1657
+ "aria-labelledby": `${v}-label`,
1658
+ children: r.map((S) => {
1659
+ const q = S.value === (c ?? g);
1660
+ return /* @__PURE__ */ a.jsxs(
1661
+ "li",
1662
+ {
1663
+ role: "option",
1664
+ "aria-selected": q,
1665
+ className: m(
1666
+ $.option,
1667
+ q && $.optionSelected,
1668
+ S.disabled && $.optionDisabled
1669
+ ),
1670
+ onClick: () => !S.disabled && U(S.value),
1671
+ tabIndex: S.disabled ? void 0 : 0,
1672
+ onKeyDown: (Q) => {
1673
+ (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), !S.disabled && U(S.value));
1674
+ },
1675
+ children: [
1676
+ S.label,
1677
+ q && /* @__PURE__ */ a.jsx(B, { icon: "check", size: 18, className: $.checkIcon })
1678
+ ]
1679
+ },
1680
+ S.value
1681
+ );
1682
+ })
1683
+ }
1684
+ )
1685
+ ] }),
1686
+ n && /* @__PURE__ */ a.jsx("span", { id: b, className: m($.helper, t && $["helper-error"]), children: n })
1687
+ ] });
1688
+ });
1689
+ os.displayName = "SandSelect";
1690
+ const T = {
1691
+ "sand-choice-group": "_sand-choice-group_viqgz_1",
1692
+ "sand-choice-row": "_sand-choice-row_viqgz_7",
1693
+ "sand-choice-input": "_sand-choice-input_viqgz_16",
1694
+ "sand-choice-control": "_sand-choice-control_viqgz_22",
1695
+ "sand-checkbox": "_sand-checkbox_viqgz_41",
1696
+ "sand-checkbox-icon": "_sand-checkbox-icon_viqgz_59",
1697
+ "sand-radio": "_sand-radio_viqgz_76",
1698
+ "sand-switch": "_sand-switch_viqgz_94",
1699
+ "sand-choice-content": "_sand-choice-content_viqgz_123",
1700
+ "sand-choice-label": "_sand-choice-label_viqgz_129",
1701
+ "sand-choice-description": "_sand-choice-description_viqgz_134"
1702
+ }, Ve = ({ label: s, description: e }) => /* @__PURE__ */ a.jsxs("span", { className: T["sand-choice-content"], children: [
1703
+ /* @__PURE__ */ a.jsx("span", { className: T["sand-choice-label"], children: s }),
1704
+ e && /* @__PURE__ */ a.jsx("span", { className: T["sand-choice-description"], children: e })
1705
+ ] }), En = f(function({ label: e, description: n, id: t, className: r = "", ...o }, c) {
1706
+ const d = O(), l = t ?? d;
1707
+ return /* @__PURE__ */ a.jsxs("label", { className: m(T["sand-choice-row"], r), htmlFor: l, children: [
1708
+ /* @__PURE__ */ a.jsx("input", { ref: c, id: l, type: "checkbox", className: T["sand-choice-input"], ...o }),
1709
+ /* @__PURE__ */ a.jsx("span", { className: m(T["sand-choice-control"], T["sand-checkbox"]), "aria-hidden": "true", children: /* @__PURE__ */ a.jsx("span", { className: m(T["sand-checkbox-icon"], "material-symbols-rounded"), children: "check" }) }),
1710
+ /* @__PURE__ */ a.jsx(Ve, { label: e, description: n })
1711
+ ] });
1712
+ });
1713
+ En.displayName = "SandCheckbox";
1714
+ const Rn = f(function({ label: e, description: n, id: t, className: r = "", onKeyDown: o, ...c }, d) {
1715
+ const l = O(), i = t ?? l, _ = (p) => {
1716
+ if (o?.(p), p.defaultPrevented || !c.name)
1717
+ return;
1718
+ const h = Array.from(
1719
+ document.querySelectorAll(`input[type="radio"][name="${c.name}"]`)
1720
+ ), v = h.findIndex((b) => b.id === i);
1721
+ ke(p, v, h.length, (b) => {
1722
+ h[b]?.focus(), h[b]?.click();
1723
+ });
1724
+ };
1725
+ return /* @__PURE__ */ a.jsxs("label", { className: m(T["sand-choice-row"], r), htmlFor: i, children: [
1726
+ /* @__PURE__ */ a.jsx("input", { ref: d, id: i, type: "radio", className: T["sand-choice-input"], onKeyDown: _, ...c }),
1727
+ /* @__PURE__ */ a.jsx("span", { className: m(T["sand-choice-control"], T["sand-radio"]), "aria-hidden": "true" }),
1728
+ /* @__PURE__ */ a.jsx(Ve, { label: e, description: n })
1729
+ ] });
1730
+ });
1731
+ Rn.displayName = "SandRadio";
1732
+ const An = f(function({ label: e, description: n, id: t, className: r = "", ...o }, c) {
1733
+ const d = O(), l = t ?? d;
1734
+ return /* @__PURE__ */ a.jsxs("label", { className: m(T["sand-choice-row"], r), htmlFor: l, children: [
1735
+ /* @__PURE__ */ a.jsx("input", { ref: c, id: l, type: "checkbox", role: "switch", className: T["sand-choice-input"], ...o }),
1736
+ /* @__PURE__ */ a.jsx("span", { className: m(T["sand-choice-control"], T["sand-switch"]), "aria-hidden": "true" }),
1737
+ /* @__PURE__ */ a.jsx(Ve, { label: e, description: n })
1738
+ ] });
1739
+ });
1740
+ An.displayName = "SandSwitch";
1741
+ const cs = f(function({ className: e = "", label: n, options: t = [], type: r = "radio", name: o, value: c, onChange: d, children: l, ...i }, _) {
1742
+ const p = O(), h = o ?? p, v = (b) => {
1743
+ if (r === "checkbox" || r === "switch") {
1744
+ const g = Array.isArray(c) ? c : [], j = g.includes(b) ? g.filter((y) => y !== b) : [...g, b];
1745
+ d?.(j);
1746
+ } else
1747
+ d?.(b);
1748
+ };
1749
+ return /* @__PURE__ */ a.jsxs("div", { ref: _, role: "group", "aria-label": typeof n == "string" ? n : void 0, className: m(T["sand-choice-group"], e), ...i, children: [
1750
+ n && /* @__PURE__ */ a.jsx("div", { className: T["sand-choice-group-label"], children: n }),
1751
+ /* @__PURE__ */ a.jsxs("div", { className: T["sand-choice-group-content"], children: [
1752
+ t.map((b) => {
1753
+ const g = Array.isArray(c) ? c.includes(b.value) : c === b.value, j = {
1754
+ key: b.value,
1755
+ name: h,
1756
+ label: b.label,
1757
+ description: b.description,
1758
+ disabled: b.disabled,
1759
+ checked: g,
1760
+ onChange: () => v(b.value)
1761
+ };
1762
+ return r === "checkbox" ? /* @__PURE__ */ a.jsx(En, { ...j }) : r === "switch" ? /* @__PURE__ */ a.jsx(An, { ...j }) : /* @__PURE__ */ a.jsx(Rn, { ...j });
1763
+ }),
1764
+ l
1765
+ ] })
1766
+ ] });
1767
+ });
1768
+ cs.displayName = "SandChoiceGroup";
1769
+ const is = "_wrapper_1142m_1", ds = "_table_1142m_9", ls = "_stickyHeader_1142m_36", us = "_striped_1142m_42", _s = "_hoverable_1142m_50", _e = {
1770
+ wrapper: is,
1771
+ table: ds,
1772
+ stickyHeader: ls,
1773
+ striped: us,
1774
+ hoverable: _s
1775
+ }, ps = f(function({ striped: e, hoverable: n = !0, stickyHeader: t, className: r, wrapperProps: o, items: c, data: d, children: l, ...i }, _) {
1776
+ const p = c ?? d;
1777
+ return /* @__PURE__ */ a.jsx("div", { ...o, className: m(_e.wrapper, o?.className), children: /* @__PURE__ */ a.jsxs(
1778
+ "table",
1779
+ {
1780
+ ref: _,
1781
+ className: m(_e.table, e && _e.striped, n && _e.hoverable, t && _e.stickyHeader, r),
1782
+ ...i,
1783
+ children: [
1784
+ l,
1785
+ p && !l && /* @__PURE__ */ a.jsx("tbody", { children: p.map((h, v) => /* @__PURE__ */ a.jsx("tr", { children: Object.values(h).map((b, g) => /* @__PURE__ */ a.jsx("td", { children: b }, g)) }, v)) })
1786
+ ]
1787
+ }
1788
+ ) });
1789
+ }), On = f(
1790
+ ({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("thead", { ref: n, ...e, children: s })
1791
+ );
1792
+ On.displayName = "SandTable.Header";
1793
+ const Mn = f(
1794
+ ({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("tbody", { ref: n, ...e, children: s })
1795
+ );
1796
+ Mn.displayName = "SandTable.Body";
1797
+ const zn = f(
1798
+ ({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("tr", { ref: n, ...e, children: s })
1799
+ );
1800
+ zn.displayName = "SandTable.Row";
1801
+ const Dn = f(
1802
+ ({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("td", { ref: n, ...e, children: s })
1803
+ );
1804
+ Dn.displayName = "SandTable.Cell";
1805
+ const Pn = f(
1806
+ ({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("th", { ref: n, ...e, children: s })
1807
+ );
1808
+ Pn.displayName = "SandTable.HeaderCell";
1809
+ const Ks = Object.assign(ps, {
1810
+ Header: On,
1811
+ Body: Mn,
1812
+ Row: zn,
1813
+ Cell: Dn,
1814
+ HeaderCell: Pn
1815
+ }), ms = "_textarea_14lbs_1", fs = "_error_14lbs_23", bs = "_helper_14lbs_31", pe = {
1816
+ textarea: ms,
1817
+ error: fs,
1818
+ helper: bs,
1819
+ "helper-error": "_helper-error_14lbs_37",
1820
+ "resize-none": "_resize-none_14lbs_42",
1821
+ "resize-both": "_resize-both_14lbs_46",
1822
+ "resize-horizontal": "_resize-horizontal_14lbs_50",
1823
+ "resize-vertical": "_resize-vertical_14lbs_54"
1824
+ }, hs = f(function({ label: e, helperText: n, error: t, resize: r = "vertical", className: o = "", ...c }, d) {
1825
+ const l = O(), i = c.id ?? l, _ = n ? `${i}-help` : void 0;
1826
+ return /* @__PURE__ */ a.jsxs(xe, { label: e, htmlFor: i, children: [
1827
+ /* @__PURE__ */ a.jsx(
1828
+ "textarea",
1829
+ {
1830
+ ref: d,
1831
+ id: i,
1832
+ className: m(
1833
+ pe.textarea,
1834
+ t && pe.error,
1835
+ pe[`resize-${r}`],
1836
+ o
1837
+ ),
1838
+ "aria-invalid": t || void 0,
1839
+ "aria-describedby": _,
1840
+ ...c
1841
+ }
1842
+ ),
1843
+ n && /* @__PURE__ */ a.jsx("span", { id: _, className: m(pe.helper, t && pe["helper-error"]), children: n })
1844
+ ] });
1845
+ });
1846
+ hs.displayName = "SandTextarea";
1847
+ const vs = "_root_yi163_1", ys = "_list_yi163_6", xs = "_trigger_yi163_18", gs = "_active_yi163_41", Ss = "_indicator_yi163_45", js = "_panel_yi163_57", L = {
1848
+ root: vs,
1849
+ list: ys,
1850
+ trigger: xs,
1851
+ active: gs,
1852
+ indicator: Ss,
1853
+ panel: js
1854
+ }, He = () => null;
1855
+ He.displayName = "SandTabItem";
1856
+ const Ln = ye(void 0);
1857
+ function Bn() {
1858
+ const s = ve(Ln);
1859
+ if (!s)
1860
+ throw new Error("Tabs components must be used within a SandTabs component");
1861
+ return s;
1862
+ }
1863
+ function Ie({ items: s = [], defaultValue: e, value: n, onChange: t, className: r, children: o, ...c }) {
1864
+ const d = O(), l = E(() => {
1865
+ const y = [...s];
1866
+ return be.forEach(o, (D) => {
1867
+ X(D) && D.type === He && y.push(D.props);
1868
+ }), y;
1869
+ }, [s, o]), [i, _] = F(e ?? l[0]?.id), p = n ?? i, h = A((y) => {
1870
+ _(y), t?.(y);
1871
+ }, [t]), v = E(() => ({
1872
+ activeId: p,
1873
+ setActiveId: h,
1874
+ baseId: d
1875
+ }), [p, h, d]), b = Math.max(l.findIndex((y) => y.id === p), 0), g = E(
1876
+ () => ({
1877
+ "--sand-tabs-left": `calc(4px + ${b} * (100% - 8px) / ${Math.max(l.length, 1)})`,
1878
+ "--sand-tabs-width": `calc((100% - 8px) / ${Math.max(l.length, 1)})`
1879
+ }),
1880
+ [b, l.length]
1881
+ ), j = l.length > 0;
1882
+ return /* @__PURE__ */ a.jsx(Ln.Provider, { value: v, children: /* @__PURE__ */ a.jsx("div", { className: m(L.root, r), ...c, children: j ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1883
+ /* @__PURE__ */ a.jsxs("div", { role: "tablist", "aria-label": "Tabs", className: L.list, style: g, children: [
1884
+ /* @__PURE__ */ a.jsx("span", { "aria-hidden": "true", className: L.indicator }),
1885
+ l.map((y, D) => {
1886
+ const P = `${d}-tab-${y.id}`, Y = `${d}-panel-${y.id}`, I = y.id === p;
1887
+ return /* @__PURE__ */ a.jsx(
1888
+ "button",
1889
+ {
1890
+ id: P,
1891
+ role: "tab",
1892
+ type: "button",
1893
+ tabIndex: I ? 0 : -1,
1894
+ "aria-selected": I,
1895
+ "aria-controls": Y,
1896
+ className: m(L.trigger, I && L.active),
1897
+ onClick: () => h(y.id),
1898
+ onKeyDown: (Z) => ke(Z, D, l.length, (W) => h(l[W].id)),
1899
+ children: y.label
1900
+ },
1901
+ y.id
1902
+ );
1903
+ })
1904
+ ] }),
1905
+ l[b] && /* @__PURE__ */ a.jsx(
1906
+ "div",
1907
+ {
1908
+ id: `${d}-panel-${l[b].id}`,
1909
+ role: "tabpanel",
1910
+ "aria-labelledby": `${d}-tab-${l[b].id}`,
1911
+ className: L.panel,
1912
+ children: l[b].content
1913
+ }
1914
+ )
1915
+ ] }) : o }) });
1916
+ }
1917
+ const Fn = ({ children: s, className: e, style: n, ...t }) => /* @__PURE__ */ a.jsx("div", { role: "tablist", className: m(L.list, e), style: n, ...t, children: s });
1918
+ Fn.displayName = "SandTabs.List";
1919
+ const qn = ({ value: s, children: e, className: n, ...t }) => {
1920
+ const { activeId: r, setActiveId: o, baseId: c } = Bn(), d = r === s;
1921
+ return /* @__PURE__ */ a.jsx(
1922
+ "button",
1923
+ {
1924
+ role: "tab",
1925
+ type: "button",
1926
+ id: `${c}-tab-${s}`,
1927
+ "aria-selected": d,
1928
+ "aria-controls": `${c}-panel-${s}`,
1929
+ tabIndex: d ? 0 : -1,
1930
+ className: m(L.trigger, d && L.active, n),
1931
+ onClick: () => o(s),
1932
+ ...t,
1933
+ children: e
1934
+ }
1935
+ );
1936
+ };
1937
+ qn.displayName = "SandTabs.Trigger";
1938
+ const Vn = ({ value: s, children: e, className: n, ...t }) => {
1939
+ const { activeId: r, baseId: o } = Bn();
1940
+ return r === s ? /* @__PURE__ */ a.jsx(
1941
+ "div",
1942
+ {
1943
+ role: "tabpanel",
1944
+ id: `${o}-panel-${s}`,
1945
+ "aria-labelledby": `${o}-tab-${s}`,
1946
+ className: m(L.panel, n),
1947
+ ...t,
1948
+ children: e
1949
+ }
1950
+ ) : null;
1951
+ };
1952
+ Vn.displayName = "SandTabs.Panel";
1953
+ Ie.List = Fn;
1954
+ Ie.Trigger = qn;
1955
+ Ie.Panel = Vn;
1956
+ Ie.Item = He;
1957
+ const Hn = ye(null);
1958
+ function an(s) {
1959
+ return s !== "system" ? s : typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1960
+ }
1961
+ function Ns(s) {
1962
+ if (!s)
1963
+ return;
1964
+ const e = {};
1965
+ return s.accent && (e["--sand-accent"] = s.accent), s.accentDark && (e["--sand-accent-dark"] = s.accentDark), s.surface && (e["--theme-surface"] = s.surface), s.surfaceVariant && (e["--theme-surface-variant"] = s.surfaceVariant), s.text && (e["--theme-text"] = s.text), s.textMuted && (e["--theme-text-muted"] = s.textMuted), s.border && (e["--theme-border"] = s.border), s.shadowSm && (e["--shadow-sm"] = s.shadowSm), s.shadowMd && (e["--shadow-md"] = s.shadowMd), s.shadowLg && (e["--shadow-lg"] = s.shadowLg), e;
1966
+ }
1967
+ function Ys({
1968
+ children: s,
1969
+ defaultTheme: e = "system",
1970
+ theme: n,
1971
+ tokens: t,
1972
+ className: r,
1973
+ root: o = !1
1974
+ }) {
1975
+ const [c, d] = F(e), l = n ?? c, i = an(l);
1976
+ K(() => {
1977
+ !o || typeof document > "u" || (document.documentElement.dataset.theme = i);
1978
+ }, [i, o]);
1979
+ const _ = E(
1980
+ () => ({
1981
+ theme: l,
1982
+ resolvedTheme: i,
1983
+ setTheme: d,
1984
+ toggleTheme: () => d((p) => an(p) === "dark" ? "light" : "dark")
1985
+ }),
1986
+ [i, l]
1987
+ );
1988
+ return /* @__PURE__ */ a.jsx(Hn.Provider, { value: _, children: /* @__PURE__ */ a.jsx("div", { className: r, "data-theme": i, style: Ns(t), children: s }) });
1989
+ }
1990
+ function Ws() {
1991
+ const s = ve(Hn);
1992
+ if (!s)
1993
+ throw new Error("useSandTheme must be used within SandThemeProvider.");
1994
+ return s;
1995
+ }
1996
+ const ks = "_title_huapx_1", ws = "_text_huapx_8", Ts = "_code_huapx_14", Is = "_gradient_huapx_25", Cs = "_muted_huapx_31", J = {
1997
+ title: ks,
1998
+ text: ws,
1999
+ code: Ts,
2000
+ gradient: Is,
2001
+ muted: Cs
2002
+ }, Ge = {
2003
+ regular: 400,
2004
+ medium: 500,
2005
+ semibold: 600,
2006
+ bold: 700
2007
+ }, $s = {
2008
+ xs: "1rem",
2009
+ sm: "1.25rem",
2010
+ md: "1.5rem",
2011
+ lg: "2rem",
2012
+ xl: "2.75rem",
2013
+ display: "clamp(3rem, 6vw, 4.75rem)"
2014
+ }, Gn = {
2015
+ xs: "0.75rem",
2016
+ sm: "0.875rem",
2017
+ md: "1rem",
2018
+ lg: "1.125rem",
2019
+ xl: "1.25rem"
2020
+ }, Es = f(function({ as: e, level: n = 2, size: t = "lg", weight: r = "semibold", gradient: o, muted: c, className: d, style: l, ...i }, _) {
2021
+ const p = e ?? `h${n}`;
2022
+ return /* @__PURE__ */ a.jsx(
2023
+ p,
2024
+ {
2025
+ ref: _,
2026
+ className: m(J.title, o && J.gradient, c && J.muted, d),
2027
+ style: { fontSize: $s[t], fontWeight: Ge[r], ...l },
2028
+ ...i
2029
+ }
2030
+ );
2031
+ });
2032
+ Es.displayName = "SandTitle";
2033
+ const Rs = f(function({ as: e, size: n = "md", weight: t = "regular", gradient: r, muted: o, className: c, style: d, ...l }, i) {
2034
+ const _ = e ?? "p";
2035
+ return /* @__PURE__ */ a.jsx(
2036
+ _,
2037
+ {
2038
+ ref: i,
2039
+ className: m(J.text, r && J.gradient, o && J.muted, c),
2040
+ style: { fontSize: Gn[n], fontWeight: Ge[t], ...d },
2041
+ ...l
2042
+ }
2043
+ );
2044
+ });
2045
+ Rs.displayName = "SandText";
2046
+ const As = f(function({ as: e, block: n, size: t = "sm", weight: r = "medium", className: o, style: c, ...d }, l) {
2047
+ const i = e ?? (n ? "pre" : "code");
2048
+ return /* @__PURE__ */ a.jsx(
2049
+ i,
2050
+ {
2051
+ ref: l,
2052
+ className: m(J.code, o),
2053
+ style: {
2054
+ fontSize: Gn[t],
2055
+ fontWeight: Ge[r],
2056
+ display: n ? "block" : void 0,
2057
+ whiteSpace: n ? "pre-wrap" : void 0,
2058
+ ...c
2059
+ },
2060
+ ...d
2061
+ }
2062
+ );
2063
+ });
2064
+ As.displayName = "SandCode";
2065
+ const Os = "_trigger_ehjfy_1", Ms = "_content_ehjfy_5", tn = {
2066
+ trigger: Os,
2067
+ content: Ms
2068
+ };
2069
+ function Us({ content: s, title: e, children: n }) {
2070
+ const t = O(), [r, o] = F(null), c = s ?? e;
2071
+ if (!X(n))
2072
+ return null;
2073
+ const d = (i) => {
2074
+ const _ = i.getBoundingClientRect();
2075
+ o({
2076
+ top: _.bottom + 10,
2077
+ left: _.left + _.width / 2
2078
+ });
2079
+ }, l = sn(n, {
2080
+ "aria-describedby": t,
2081
+ onMouseEnter: (i) => {
2082
+ d(i.currentTarget), n.props.onMouseEnter?.(i);
2083
+ },
2084
+ onMouseLeave: (i) => {
2085
+ o(null), n.props.onMouseLeave?.(i);
2086
+ },
2087
+ onFocus: (i) => {
2088
+ d(i.currentTarget), n.props.onFocus?.(i);
2089
+ },
2090
+ onBlur: (i) => {
2091
+ o(null), n.props.onBlur?.(i);
2092
+ }
2093
+ });
2094
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2095
+ /* @__PURE__ */ a.jsx("span", { className: tn.trigger, children: l }),
2096
+ r && typeof document < "u" ? rn(
2097
+ /* @__PURE__ */ a.jsx(
2098
+ "div",
2099
+ {
2100
+ id: t,
2101
+ role: "tooltip",
2102
+ className: tn.content,
2103
+ style: { top: r.top, left: r.left, transform: "translateX(-50%)" },
2104
+ children: c
2105
+ }
2106
+ ),
2107
+ document.body
2108
+ ) : null
2109
+ ] });
2110
+ }
2111
+ function Js(s) {
2112
+ const { value: e, defaultValue: n, onChange: t } = s, [r, o] = F(n), c = e !== void 0, d = c ? e : r, l = z(t);
2113
+ K(() => {
2114
+ l.current = t;
2115
+ });
2116
+ const i = A(
2117
+ (_) => {
2118
+ const p = typeof _ == "function" ? _(d) : _;
2119
+ c || o(p), l.current?.(p);
2120
+ },
2121
+ [c, d]
2122
+ );
2123
+ return [d, i];
2124
+ }
2125
+ const Ne = {
2126
+ sm: 640,
2127
+ md: 768,
2128
+ lg: 1024,
2129
+ xl: 1280
2130
+ };
2131
+ function Xs() {
2132
+ const [s, e] = F("base");
2133
+ return K(() => {
2134
+ const n = () => {
2135
+ const t = window.innerWidth;
2136
+ t >= Ne.xl ? e("xl") : t >= Ne.lg ? e("lg") : t >= Ne.md ? e("md") : t >= Ne.sm ? e("sm") : e("base");
2137
+ };
2138
+ return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
2139
+ }, []), s;
2140
+ }
2141
+ export {
2142
+ Sa as SandAccordion,
2143
+ ln as SandAccordionItem,
2144
+ ia as SandAlert,
2145
+ xn as SandAppLayout,
2146
+ Ta as SandAvatar,
2147
+ Ia as SandAvatarGroup,
2148
+ Ca as SandBadge,
2149
+ za as SandBox,
2150
+ un as SandBreadcrumbItem,
2151
+ $a as SandBreadcrumbs,
2152
+ Ae as SandButton,
2153
+ qa as SandCard,
2154
+ En as SandCheckbox,
2155
+ _n as SandChip,
2156
+ cs as SandChoiceGroup,
2157
+ As as SandCode,
2158
+ pn as SandCodeBlock,
2159
+ Ga as SandCodeTabs,
2160
+ _t as SandContainer,
2161
+ Hs as SandDialog,
2162
+ Ya as SandDivider,
2163
+ Et as SandDrawer,
2164
+ xe as SandFormGroup,
2165
+ Bs as SandGrid,
2166
+ pt as SandHeader,
2167
+ B as SandIcon,
2168
+ Ps as SandIconProvider,
2169
+ vn as SandInput,
2170
+ Qa as SandInputGroup,
2171
+ nt as SandKBD,
2172
+ st as SandLoader,
2173
+ we as SandMicroserviceLayout,
2174
+ ft as SandModal,
2175
+ Gs as SandNavbar,
2176
+ Oe as SandNavbarItem,
2177
+ Rt as SandPagination,
2178
+ qe as SandPopover,
2179
+ zt as SandPopoverContent,
2180
+ Mt as SandPopoverTrigger,
2181
+ Ht as SandProgress,
2182
+ Rn as SandRadio,
2183
+ Vs as SandResultPanel,
2184
+ os as SandSelect,
2185
+ rt as SandSkeleton,
2186
+ ut as SandSlider,
2187
+ Ja as SandSnackbar,
2188
+ Nn as SandStack,
2189
+ An as SandSwitch,
2190
+ He as SandTabItem,
2191
+ Ks as SandTable,
2192
+ Ie as SandTabs,
2193
+ Ls as SandTag,
2194
+ Rs as SandText,
2195
+ hs as SandTextarea,
2196
+ Ys as SandThemeProvider,
2197
+ Es as SandTitle,
2198
+ Ua as SandToast,
2199
+ Fs as SandToolLayout,
2200
+ qs as SandToolPanel,
2201
+ Us as SandTooltip,
2202
+ Xs as useBreakpoint,
2203
+ Js as useControllableState,
2204
+ In as useDisclosure,
2205
+ Te as useFocusTrap,
2206
+ na as useSandIcon,
2207
+ Ws as useSandTheme
2208
+ };