opsfuse-ui 0.1.27 → 0.1.28

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.
@@ -1,30 +1,30 @@
1
1
  "use client";
2
2
  import { Loader2Icon as e, XIcon as t } from "lucide-react";
3
3
  import * as n from "react";
4
- import { cloneElement as r } from "react";
5
- import { clsx as i } from "clsx";
6
- import { twMerge as a } from "tailwind-merge";
7
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import { cva as l } from "class-variance-authority";
9
- import { Dialog as u, Label as d, Slot as f } from "radix-ui";
10
- import { Toaster as p, toast as m } from "sonner";
4
+ import { cloneElement as r, isValidElement as i, useEffect as a, useRef as o } from "react";
5
+ import { clsx as s } from "clsx";
6
+ import { twMerge as c } from "tailwind-merge";
7
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { cva as f } from "class-variance-authority";
9
+ import { Dialog as p, Label as m, Slot as h } from "radix-ui";
10
+ import { Toaster as g, toast as _, useSonner as ee } from "sonner";
11
11
  //#region src/lib/utils.ts
12
- function h(...e) {
13
- return a(i(e));
12
+ function v(...e) {
13
+ return c(s(e));
14
14
  }
15
15
  //#endregion
16
16
  //#region src/components/ui/spinner.tsx
17
- function g({ className: t, ...n }) {
18
- return /* @__PURE__ */ s(e, {
17
+ function y({ className: t, ...n }) {
18
+ return /* @__PURE__ */ u(e, {
19
19
  role: "status",
20
20
  "aria-label": "Loading",
21
- className: h("size-4 animate-spin", t),
21
+ className: v("size-4 animate-spin", t),
22
22
  ...n
23
23
  });
24
24
  }
25
25
  //#endregion
26
26
  //#region src/components/ui/button.tsx
27
- var _ = l("cursor-pointer group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
27
+ var b = f("cursor-pointer group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
28
28
  variants: {
29
29
  motion: {
30
30
  default: "transition-all",
@@ -57,45 +57,45 @@ var _ = l("cursor-pointer group/button inline-flex shrink-0 items-center justify
57
57
  size: "default"
58
58
  }
59
59
  });
60
- function v({ className: e, variant: t = "default", size: n = "default", motion: r = "default", asChild: i = !1, loading: a = !1, loadingText: o = "Loading...", ...l }) {
61
- let u = i ? f.Root : "button";
62
- return /* @__PURE__ */ s(u, {
60
+ function x({ className: e, variant: t = "default", size: n = "default", motion: r = "default", asChild: i = !1, loading: a = !1, loadingText: o = "Loading...", ...s }) {
61
+ let c = i ? h.Root : "button";
62
+ return /* @__PURE__ */ u(c, {
63
63
  "data-slot": "button",
64
64
  "data-variant": t,
65
65
  "data-size": n,
66
66
  "data-motion": r,
67
- className: h(_({
67
+ className: v(b({
68
68
  variant: t,
69
69
  size: n,
70
70
  motion: r
71
71
  }), e),
72
- ...l,
73
- children: a ? /* @__PURE__ */ c("div", {
72
+ ...s,
73
+ children: a ? /* @__PURE__ */ d("div", {
74
74
  className: "flex items-center gap-2",
75
- children: [/* @__PURE__ */ s(g, { className: "size-4 animate-spin" }), o]
76
- }) : l.children
75
+ children: [/* @__PURE__ */ u(y, { className: "size-4 animate-spin" }), o]
76
+ }) : s.children
77
77
  });
78
78
  }
79
79
  //#endregion
80
80
  //#region src/lib/brand-theme.ts
81
- var y = [
81
+ var te = [
82
82
  "recruitsmartly",
83
83
  "skillready",
84
84
  "worklog",
85
85
  "verity",
86
86
  "lms"
87
- ], ee = "recruitsmartly";
87
+ ], S = "recruitsmartly";
88
88
  //#endregion
89
89
  //#region src/lib/document-dark-mode.ts
90
- function b() {
90
+ function C() {
91
91
  if (typeof document > "u") return !1;
92
92
  let e = document.documentElement;
93
93
  return e.classList.contains("dark") || e.getAttribute("data-theme") === "dark" || e.getAttribute("data-mode") === "dark" || e.getAttribute("data-color-mode") === "dark" || e.classList.contains("theme-dark") || (document.body?.classList.contains("dark") ?? !1);
94
94
  }
95
- function x() {
96
- let [e, t] = n.useState(() => typeof document > "u" ? !1 : b());
95
+ function w() {
96
+ let [e, t] = n.useState(() => typeof document > "u" ? !1 : C());
97
97
  return n.useEffect(() => {
98
- let e = () => t(b());
98
+ let e = () => t(C());
99
99
  e();
100
100
  let n = new MutationObserver(e);
101
101
  return n.observe(document.documentElement, {
@@ -114,7 +114,7 @@ function x() {
114
114
  }
115
115
  //#endregion
116
116
  //#region src/lib/theme-scope.ts
117
- var S = "opsfuse-ui", C = {
117
+ var T = "opsfuse-ui", E = {
118
118
  "--color-background": "var(--background)",
119
119
  "--color-foreground": "var(--foreground)",
120
120
  "--color-card": "var(--card)",
@@ -191,56 +191,56 @@ var S = "opsfuse-ui", C = {
191
191
  "--color-chart-6": "var(--chart-6)",
192
192
  "--color-chart-grid": "var(--chart-grid)",
193
193
  "--color-chart-axis": "var(--chart-axis)"
194
- }, w = n.createContext(null);
195
- function te({ theme: e, children: t }) {
196
- return /* @__PURE__ */ s(w.Provider, {
194
+ }, D = n.createContext(null);
195
+ function ne({ theme: e, children: t }) {
196
+ return /* @__PURE__ */ u(D.Provider, {
197
197
  value: e,
198
198
  children: t
199
199
  });
200
200
  }
201
- function T() {
202
- return n.useContext(w) ?? "recruitsmartly";
201
+ function O() {
202
+ return n.useContext(D) ?? "recruitsmartly";
203
203
  }
204
- function E(e) {
204
+ function k(e) {
205
205
  return `brand-${e}`;
206
206
  }
207
- function D(e, t, n, r) {
207
+ function A(e, t, n, r) {
208
208
  return {
209
- className: h(S, E(e), t && "dark", n),
209
+ className: v(T, k(e), t && "dark", n),
210
210
  style: {
211
- ...C,
211
+ ...E,
212
212
  ...r
213
213
  }
214
214
  };
215
215
  }
216
- function O(e, t) {
217
- return D(T(), x(), e, t);
216
+ function j(e, t) {
217
+ return A(O(), w(), e, t);
218
218
  }
219
219
  //#endregion
220
220
  //#region src/lib/portaled-layer.ts
221
- var k = { zIndex: "var(--z-popover)" }, A = {
221
+ var M = { zIndex: "var(--z-popover)" }, N = {
222
222
  onWheel: (e) => {
223
223
  e.stopPropagation();
224
224
  },
225
225
  onTouchMove: (e) => {
226
226
  e.stopPropagation();
227
227
  }
228
- }, j = ["[data-slot=\"combobox-content\"]", "[data-slot=\"combobox-positioner\"]"].join(", "), M = [
229
- j,
228
+ }, P = ["[data-slot=\"combobox-content\"]", "[data-slot=\"combobox-positioner\"]"].join(", "), re = [
229
+ P,
230
230
  "[data-slot=\"combobox-list\"]",
231
231
  "[data-slot=\"combobox-chips\"]",
232
232
  "[data-slot=\"combobox-chip-input\"]",
233
233
  "[data-popup-open]",
234
234
  ".combobox-pointer-field"
235
235
  ].join(", ");
236
- function N(e) {
237
- return e instanceof Element && !!e.closest(M);
236
+ function ie(e) {
237
+ return e instanceof Element && !!e.closest(re);
238
238
  }
239
- function P(e) {
239
+ function ae(e) {
240
240
  n.useEffect(() => {
241
241
  if (!e) return;
242
242
  let t = (e) => {
243
- N(e.target) || e.preventDefault();
243
+ ie(e.target) || e.preventDefault();
244
244
  };
245
245
  return document.addEventListener("wheel", t, {
246
246
  passive: !1,
@@ -253,85 +253,85 @@ function P(e) {
253
253
  };
254
254
  }, [e]);
255
255
  }
256
- function F(e) {
257
- return e instanceof Element && !!e.closest(j);
256
+ function oe(e) {
257
+ return e instanceof Element && !!e.closest(P);
258
258
  }
259
- function ne(e) {
260
- return F(e.detail.originalEvent.target);
259
+ function se(e) {
260
+ return oe(e.detail.originalEvent.target);
261
261
  }
262
- function I() {
263
- for (let e of document.querySelectorAll(j)) for (let t = e; t && t !== document.body; t = t.parentElement) t.getAttribute("aria-hidden") === "true" && t.removeAttribute("aria-hidden");
262
+ function F() {
263
+ for (let e of document.querySelectorAll(P)) for (let t = e; t && t !== document.body; t = t.parentElement) t.getAttribute("aria-hidden") === "true" && t.removeAttribute("aria-hidden");
264
264
  }
265
265
  //#endregion
266
266
  //#region src/components/ui/dialog.tsx
267
- function L({ ...e }) {
268
- return /* @__PURE__ */ s(u.Root, {
267
+ function I({ ...e }) {
268
+ return /* @__PURE__ */ u(p.Root, {
269
269
  "data-slot": "dialog",
270
270
  ...e
271
271
  });
272
272
  }
273
- function re({ ...e }) {
274
- return /* @__PURE__ */ s(u.Trigger, {
273
+ function ce({ ...e }) {
274
+ return /* @__PURE__ */ u(p.Trigger, {
275
275
  "data-slot": "dialog-trigger",
276
276
  ...e
277
277
  });
278
278
  }
279
- function R({ ...e }) {
280
- return /* @__PURE__ */ s(u.Portal, {
279
+ function L({ ...e }) {
280
+ return /* @__PURE__ */ u(p.Portal, {
281
281
  "data-slot": "dialog-portal",
282
282
  ...e
283
283
  });
284
284
  }
285
- function z({ ...e }) {
286
- return /* @__PURE__ */ s(u.Close, {
285
+ function R({ ...e }) {
286
+ return /* @__PURE__ */ u(p.Close, {
287
287
  "data-slot": "dialog-close",
288
288
  ...e
289
289
  });
290
290
  }
291
- function B({ className: e, ...t }) {
292
- return /* @__PURE__ */ s(u.Overlay, {
291
+ function z({ className: e, ...t }) {
292
+ return /* @__PURE__ */ u(p.Overlay, {
293
293
  "data-slot": "dialog-overlay",
294
- className: h("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
294
+ className: v("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
295
295
  ...t
296
296
  });
297
297
  }
298
- function V({ className: e, children: r, showCloseButton: i = !0, style: a, onPointerDownOutside: o, onFocusOutside: l, onInteractOutside: d, ...f }) {
299
- let p = O(), m = n.useCallback((e, t) => {
300
- if (ne(e)) {
298
+ function B({ className: e, children: r, showCloseButton: i = !0, style: a, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: c, ...l }) {
299
+ let f = j(), m = n.useCallback((e, t) => {
300
+ if (se(e)) {
301
301
  e.preventDefault();
302
302
  return;
303
303
  }
304
304
  t?.(e);
305
305
  }, []);
306
306
  return n.useLayoutEffect(() => {
307
- I();
307
+ F();
308
308
  let e = new MutationObserver(() => {
309
- I();
309
+ F();
310
310
  });
311
311
  return e.observe(document.body, {
312
312
  subtree: !0,
313
313
  attributes: !0,
314
314
  attributeFilter: ["aria-hidden"]
315
315
  }), () => e.disconnect();
316
- }, []), /* @__PURE__ */ c(R, { children: [/* @__PURE__ */ s(B, {}), /* @__PURE__ */ c(u.Content, {
316
+ }, []), /* @__PURE__ */ d(L, { children: [/* @__PURE__ */ u(z, {}), /* @__PURE__ */ d(p.Content, {
317
317
  "data-slot": "dialog-content",
318
318
  style: {
319
- ...p.style,
319
+ ...f.style,
320
320
  ...a
321
321
  },
322
- className: h(p.className, "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
322
+ className: v(f.className, "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
323
323
  onPointerDownOutside: (e) => m(e, o),
324
- onFocusOutside: (e) => m(e, l),
325
- onInteractOutside: (e) => m(e, d),
326
- ...f,
327
- children: [r, i && /* @__PURE__ */ s(u.Close, {
324
+ onFocusOutside: (e) => m(e, s),
325
+ onInteractOutside: (e) => m(e, c),
326
+ ...l,
327
+ children: [r, i && /* @__PURE__ */ u(p.Close, {
328
328
  "data-slot": "dialog-close",
329
329
  asChild: !0,
330
- children: /* @__PURE__ */ c(v, {
330
+ children: /* @__PURE__ */ d(x, {
331
331
  variant: "ghost",
332
332
  className: "absolute top-2 right-2",
333
333
  size: "icon-sm",
334
- children: [/* @__PURE__ */ s(t, {}), /* @__PURE__ */ s("span", {
334
+ children: [/* @__PURE__ */ u(t, {}), /* @__PURE__ */ u("span", {
335
335
  className: "sr-only",
336
336
  children: "Close"
337
337
  })]
@@ -339,59 +339,59 @@ function V({ className: e, children: r, showCloseButton: i = !0, style: a, onPoi
339
339
  })]
340
340
  })] });
341
341
  }
342
- function H({ className: e, ...t }) {
343
- return /* @__PURE__ */ s("div", {
342
+ function V({ className: e, ...t }) {
343
+ return /* @__PURE__ */ u("div", {
344
344
  "data-slot": "dialog-header",
345
- className: h("flex flex-col gap-2", e),
345
+ className: v("flex flex-col gap-2", e),
346
346
  ...t
347
347
  });
348
348
  }
349
- function U({ className: e, showCloseButton: t = !1, children: n, ...r }) {
350
- return /* @__PURE__ */ c("div", {
349
+ function H({ className: e, showCloseButton: t = !1, children: n, ...r }) {
350
+ return /* @__PURE__ */ d("div", {
351
351
  "data-slot": "dialog-footer",
352
- className: h("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
352
+ className: v("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
353
353
  ...r,
354
- children: [n, t && /* @__PURE__ */ s(u.Close, {
354
+ children: [n, t && /* @__PURE__ */ u(p.Close, {
355
355
  asChild: !0,
356
- children: /* @__PURE__ */ s(v, {
356
+ children: /* @__PURE__ */ u(x, {
357
357
  variant: "outline",
358
358
  children: "Close"
359
359
  })
360
360
  })]
361
361
  });
362
362
  }
363
- function W({ className: e, ...t }) {
364
- return /* @__PURE__ */ s(u.Title, {
363
+ function U({ className: e, ...t }) {
364
+ return /* @__PURE__ */ u(p.Title, {
365
365
  "data-slot": "dialog-title",
366
- className: h("font-heading text-base leading-none font-semibold", e),
366
+ className: v("font-heading text-base leading-none font-semibold", e),
367
367
  ...t
368
368
  });
369
369
  }
370
- function G({ className: e, ...t }) {
371
- return /* @__PURE__ */ s(u.Description, {
370
+ function W({ className: e, ...t }) {
371
+ return /* @__PURE__ */ u(p.Description, {
372
372
  "data-slot": "dialog-description",
373
- className: h("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
373
+ className: v("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
374
374
  ...t
375
375
  });
376
376
  }
377
- var K = null;
378
- function q(e) {
379
- K?.(e);
377
+ var G = null;
378
+ function le(e) {
379
+ G?.(e);
380
380
  }
381
- function J({ children: e }) {
381
+ function ue({ children: e }) {
382
382
  let [t, r] = n.useState(null);
383
- n.useLayoutEffect(() => (K = (e) => r(e), () => {
384
- K = null;
383
+ n.useLayoutEffect(() => (G = (e) => r(e), () => {
384
+ G = null;
385
385
  }), []);
386
386
  let i = n.useCallback((e) => {
387
387
  e || r((e) => (e && e.onClose?.(), null));
388
388
  }, []);
389
- return /* @__PURE__ */ c(o, { children: [e, t ? /* @__PURE__ */ s(L, {
389
+ return /* @__PURE__ */ d(l, { children: [e, t ? /* @__PURE__ */ u(I, {
390
390
  open: !0,
391
391
  onOpenChange: i,
392
- children: /* @__PURE__ */ c(V, {
392
+ children: /* @__PURE__ */ d(B, {
393
393
  showCloseButton: t.showCloseButton ?? !0,
394
- children: [/* @__PURE__ */ c(H, { children: [/* @__PURE__ */ s(W, { children: t.title }), /* @__PURE__ */ s(G, {
394
+ children: [/* @__PURE__ */ d(V, { children: [/* @__PURE__ */ u(U, { children: t.title }), /* @__PURE__ */ u(W, {
395
395
  className: t.description ? void 0 : "sr-only",
396
396
  children: t.description ?? t.title
397
397
  })] }), t.children]
@@ -400,59 +400,127 @@ function J({ children: e }) {
400
400
  }
401
401
  //#endregion
402
402
  //#region src/components/ui/sonner.tsx
403
- var Y = ({ style: e, className: t, ...n }) => {
404
- let r = T(), i = x(), a = D(r, i);
405
- return /* @__PURE__ */ s(p, {
406
- theme: i ? "dark" : "light",
403
+ var de = 7e3, K = "[data-sonner-toast]", q = "[data-sonner-toaster]", J = "[data-close-button]";
404
+ function Y(e) {
405
+ return typeof e == "function" ? Y(e()) : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Y).join("") : i(e) ? Y(e.props.children) : "";
406
+ }
407
+ function fe() {
408
+ let { toasts: e } = ee(), t = o(null), n = o(null), r = o(/* @__PURE__ */ new Map());
409
+ return a(() => {
410
+ let i = new Set(e.map((e) => e.id));
411
+ for (let e of r.current.keys()) i.has(e) || r.current.delete(e);
412
+ for (let i of [...e].reverse()) {
413
+ let e = [Y(i.title), Y(i.description)].filter(Boolean).join(". ") || Y(i.jsx), a = `${i.type}:${e}`;
414
+ if (!e || r.current.get(i.id) === a) continue;
415
+ r.current.set(i.id, a);
416
+ let o = i.type === "error" ? n.current : t.current;
417
+ if (!o) continue;
418
+ let s = document.createElement("p");
419
+ s.textContent = e, o.append(s), window.setTimeout(() => s.remove(), de);
420
+ }
421
+ }, [e]), /* @__PURE__ */ d("div", {
422
+ className: "sr-only",
423
+ children: [/* @__PURE__ */ u("div", {
424
+ ref: t,
425
+ "aria-live": "polite",
426
+ "aria-relevant": "additions",
427
+ "aria-atomic": "false"
428
+ }), /* @__PURE__ */ u("div", {
429
+ ref: n,
430
+ "aria-live": "assertive",
431
+ "aria-relevant": "additions",
432
+ "aria-atomic": "false"
433
+ })]
434
+ });
435
+ }
436
+ function pe() {
437
+ a(() => {
438
+ let e = null, t = (t) => {
439
+ let n = Array.from(t.parentElement?.querySelectorAll(`${K}:not([data-removed="true"])`) ?? []), r = n.indexOf(t), i = n[r + 1] ?? n[r - 1];
440
+ i && i !== t ? i.focus({ preventScroll: !0 }) : e?.focus({ preventScroll: !0 });
441
+ }, n = (t) => {
442
+ let n = t.target, r = t.relatedTarget;
443
+ n?.closest(q) && !r?.closest(q) && (e = r);
444
+ }, r = (e) => {
445
+ if (e.key !== "Escape" || e.defaultPrevented) return;
446
+ let t = document.activeElement?.closest(K);
447
+ if (!t || t.dataset.dismissible === "false") return;
448
+ let n = t.querySelector(`:scope > ${J}`);
449
+ n && (e.preventDefault(), e.stopPropagation(), n.click());
450
+ }, i = (e) => {
451
+ if (e.detail !== 0) return;
452
+ let n = (e.target?.closest(J))?.closest(K);
453
+ n && n.dataset.dismissible !== "false" && t(n);
454
+ };
455
+ return document.addEventListener("focusin", n), document.addEventListener("keydown", r, !0), document.addEventListener("click", i, !0), () => {
456
+ document.removeEventListener("focusin", n), document.removeEventListener("keydown", r, !0), document.removeEventListener("click", i, !0);
457
+ };
458
+ }, []);
459
+ }
460
+ var me = ({ style: e, className: t, toastOptions: n, ...r }) => {
461
+ let i = O(), s = w(), c = A(i, s), f = o(null);
462
+ return pe(), a(() => {
463
+ f.current?.setAttribute("aria-live", "off");
464
+ }, []), /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
465
+ ref: f,
466
+ theme: s ? "dark" : "light",
407
467
  position: "bottom-right",
408
468
  richColors: !0,
409
- className: h("toaster group", a.className, t),
469
+ closeButton: !0,
470
+ className: v("toaster group", c.className, t),
410
471
  style: {
411
- ...a.style,
472
+ ...c.style,
412
473
  ...e
413
474
  },
414
- ...n
415
- });
475
+ toastOptions: {
476
+ ...n,
477
+ classNames: {
478
+ ...n?.classNames,
479
+ closeButton: v("not-focus-visible:pointer-events-none not-focus-visible:opacity-0", n?.classNames?.closeButton)
480
+ }
481
+ },
482
+ ...r
483
+ }), /* @__PURE__ */ u(fe, {})] });
416
484
  };
417
485
  //#endregion
418
486
  //#region src/components/ui/label.tsx
419
487
  function X({ className: e, ...t }) {
420
- return /* @__PURE__ */ s(d.Root, {
488
+ return /* @__PURE__ */ u(m.Root, {
421
489
  "data-slot": "label",
422
- className: h("flex items-center text-foreground gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
490
+ className: v("flex items-center text-foreground gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
423
491
  ...t
424
492
  });
425
493
  }
426
494
  //#endregion
427
495
  //#region src/components/ui/input.tsx
428
- function Z({ className: e, type: t, error: n = !1, label: i, helperText: a, startIcon: o, endIcon: l, appearance: u = "default", ...d }) {
429
- let f = o ? r(o, { className: h("stroke-text-input-placeholder") }) : null, p = l ? r(l, { className: h("stroke-text-input-placeholder") }) : null;
430
- return /* @__PURE__ */ c("div", {
496
+ function Z({ className: e, type: t, error: n = !1, label: i, helperText: a, startIcon: o, endIcon: s, appearance: c = "default", ...l }) {
497
+ let f = o ? r(o, { className: v("stroke-text-input-placeholder") }) : null, p = s ? r(s, { className: v("stroke-text-input-placeholder") }) : null;
498
+ return /* @__PURE__ */ d("div", {
431
499
  className: "w-full flex flex-col gap-2 h-fit ",
432
500
  children: [
433
- !!i && /* @__PURE__ */ s(X, { children: i }),
434
- /* @__PURE__ */ c("div", {
501
+ !!i && /* @__PURE__ */ u(X, { children: i }),
502
+ /* @__PURE__ */ d("div", {
435
503
  className: "w-full relative",
436
504
  children: [
437
- f && /* @__PURE__ */ s("div", {
505
+ f && /* @__PURE__ */ u("div", {
438
506
  className: "absolute left-3 top-1/2 -translate-y-1/2",
439
507
  children: f
440
508
  }),
441
- /* @__PURE__ */ s("input", {
442
- ...d,
509
+ /* @__PURE__ */ u("input", {
510
+ ...l,
443
511
  type: t,
444
512
  "data-slot": "input",
445
- "data-appearance": u,
446
- "aria-invalid": n ? !0 : d["aria-invalid"],
447
- className: h(u === "themed" && "input-themed transition-smooth flex h-9 w-full min-w-0 py-1 text-base shadow-none outline-none md:text-sm", u === "default" && `file:text-foreground ${d?.placeholder ? "placeholder:text-text-disabled placeholder:text-sm placeholder:font-normal" : "placeholder:text-muted-foreground"} selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 ${f ? "pl-10" : "pl-3"} ${p ? "pr-10" : "pr-3"} py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-base-secondary-disabled md:text-sm`, u === "default" && "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", u === "themed" && (n || d["aria-invalid"] === !0 ? "input-error" : void 0), f && u === "themed" && "pl-10", !f && u === "themed" && "pl-3", p && u === "themed" && "pr-10", !p && u === "themed" && "pr-3", e)
513
+ "data-appearance": c,
514
+ "aria-invalid": n ? !0 : l["aria-invalid"],
515
+ className: v(c === "themed" && "input-themed transition-smooth flex h-9 w-full min-w-0 py-1 text-base shadow-none outline-none md:text-sm", c === "default" && `file:text-foreground ${l?.placeholder ? "placeholder:text-text-disabled placeholder:text-sm placeholder:font-normal" : "placeholder:text-muted-foreground"} selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 ${f ? "pl-10" : "pl-3"} ${p ? "pr-10" : "pr-3"} py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-base-secondary-disabled md:text-sm`, c === "default" && "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", c === "themed" && (n || l["aria-invalid"] === !0 ? "input-error" : void 0), f && c === "themed" && "pl-10", !f && c === "themed" && "pl-3", p && c === "themed" && "pr-10", !p && c === "themed" && "pr-3", e)
448
516
  }),
449
- p && /* @__PURE__ */ s("div", {
517
+ p && /* @__PURE__ */ u("div", {
450
518
  className: "absolute right-3 top-1/2 -translate-y-1/2",
451
519
  children: p
452
520
  })
453
521
  ]
454
522
  }),
455
- a && /* @__PURE__ */ s("p", {
523
+ a && /* @__PURE__ */ u("p", {
456
524
  className: `text-caption ${n ? "text-destructive" : "text-muted-foreground"}`,
457
525
  children: a
458
526
  })
@@ -462,16 +530,16 @@ function Z({ className: e, type: t, error: n = !1, label: i, helperText: a, star
462
530
  //#endregion
463
531
  //#region src/components/ui/textarea.tsx
464
532
  function Q({ className: e, error: t = !1, label: n, helperText: r, ...i }) {
465
- return /* @__PURE__ */ c("div", {
533
+ return /* @__PURE__ */ d("div", {
466
534
  className: "w-full flex flex-col gap-2",
467
535
  children: [
468
- n && /* @__PURE__ */ s(X, { children: n }),
469
- /* @__PURE__ */ s("textarea", {
536
+ n && /* @__PURE__ */ u(X, { children: n }),
537
+ /* @__PURE__ */ u("textarea", {
470
538
  "data-slot": "textarea",
471
- className: h("flex-1 border-input placeholder:text-text-disabled focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
539
+ className: v("flex-1 border-input placeholder:text-text-disabled focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
472
540
  ...i
473
541
  }),
474
- r && /* @__PURE__ */ s("p", {
542
+ r && /* @__PURE__ */ u("p", {
475
543
  className: `text-caption ${t ? "text-destructive" : "text-muted-foreground"}`,
476
544
  children: r
477
545
  })
@@ -480,15 +548,15 @@ function Q({ className: e, error: t = !1, label: n, helperText: r, ...i }) {
480
548
  }
481
549
  //#endregion
482
550
  //#region src/components/ui/input-group.tsx
483
- function ie({ className: e, ...t }) {
484
- return /* @__PURE__ */ s("div", {
551
+ function he({ className: e, ...t }) {
552
+ return /* @__PURE__ */ u("div", {
485
553
  "data-slot": "input-group",
486
554
  role: "group",
487
- className: h("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
555
+ className: v("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
488
556
  ...t
489
557
  });
490
558
  }
491
- var ae = l("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
559
+ var ge = f("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
492
560
  variants: { align: {
493
561
  "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
494
562
  "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
@@ -497,19 +565,19 @@ var ae = l("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 tex
497
565
  } },
498
566
  defaultVariants: { align: "inline-start" }
499
567
  });
500
- function oe({ className: e, align: t = "inline-start", ...n }) {
501
- return /* @__PURE__ */ s("div", {
568
+ function $({ className: e, align: t = "inline-start", ...n }) {
569
+ return /* @__PURE__ */ u("div", {
502
570
  role: "group",
503
571
  "data-slot": "input-group-addon",
504
572
  "data-align": t,
505
- className: h(ae({ align: t }), e),
573
+ className: v(ge({ align: t }), e),
506
574
  onClick: (e) => {
507
575
  e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
508
576
  },
509
577
  ...n
510
578
  });
511
579
  }
512
- var se = l("flex items-center gap-2 text-sm shadow-none", {
580
+ var _e = f("flex items-center gap-2 text-sm shadow-none", {
513
581
  variants: { size: {
514
582
  xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
515
583
  sm: "",
@@ -518,34 +586,34 @@ var se = l("flex items-center gap-2 text-sm shadow-none", {
518
586
  } },
519
587
  defaultVariants: { size: "xs" }
520
588
  });
521
- function ce({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
522
- return /* @__PURE__ */ s(v, {
589
+ function ve({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
590
+ return /* @__PURE__ */ u(x, {
523
591
  type: t,
524
592
  "data-size": r,
525
593
  variant: n,
526
- className: h(se({ size: r }), e),
594
+ className: v(_e({ size: r }), e),
527
595
  ...i
528
596
  });
529
597
  }
530
- function le({ className: e, ...t }) {
531
- return /* @__PURE__ */ s("span", {
532
- className: h("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
598
+ function ye({ className: e, ...t }) {
599
+ return /* @__PURE__ */ u("span", {
600
+ className: v("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
533
601
  ...t
534
602
  });
535
603
  }
536
- function $({ className: e, ...t }) {
537
- return /* @__PURE__ */ s(Z, {
604
+ function be({ className: e, ...t }) {
605
+ return /* @__PURE__ */ u(Z, {
538
606
  "data-slot": "input-group-control",
539
- className: h("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
607
+ className: v("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
540
608
  ...t
541
609
  });
542
610
  }
543
- function ue({ className: e, ...t }) {
544
- return /* @__PURE__ */ s(Q, {
611
+ function xe({ className: e, ...t }) {
612
+ return /* @__PURE__ */ u(Q, {
545
613
  "data-slot": "input-group-control",
546
- className: h("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
614
+ className: v("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
547
615
  ...t
548
616
  });
549
617
  }
550
618
  //#endregion
551
- export { E as A, h as B, q as C, C as D, P as E, ee as F, y as I, v as L, O as M, S as N, te as O, b as P, _ as R, re as S, k as T, H as _, le as a, J as b, Z as c, m as d, L as f, U as g, G as h, $ as i, T as j, D as k, X as l, V as m, oe as n, ue as o, z as p, ce as r, Q as s, ie as t, Y as u, B as v, A as w, W as x, R as y, g as z };
619
+ export { k as A, v as B, le as C, E as D, ae as E, S as F, te as I, x as L, j as M, T as N, ne as O, C as P, b as R, ce as S, M as T, V as _, ye as a, ue as b, Z as c, _ as d, I as f, H as g, W as h, be as i, O as j, A as k, X as l, B as m, $ as n, xe as o, R as p, ve as r, Q as s, he as t, me as u, z as v, N as w, U as x, L as y, y as z };