@minimalstuff/ui 4.3.1 → 4.3.3

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.
@@ -294,7 +294,7 @@ function q(...e) {
294
294
  // src/components/shared/option_card_styles.ts
295
295
  function xe(e) {
296
296
  let { isSelected: t, isError: n, isDisabled: r, radius: i, unstyled: a } = e;
297
- return x("flex cursor-pointer items-start gap-3 transition-colors duration-150", w, n ? E : T, !a && [
297
+ return x("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", w, n ? E : T, !a && [
298
298
  j[i],
299
299
  "border px-3 py-2.5",
300
300
  t ? n ? x("border-red-500 dark:border-red-400", "bg-red-50 dark:bg-red-950/20") : "border-blue-500 bg-blue-50 dark:border-blue-500 dark:bg-blue-950/25" : n ? "border-red-300 bg-white dark:border-red-800/50 dark:bg-gray-800/50" : x("border-gray-200 dark:border-gray-700", "bg-gray-50 hover:border-gray-300 hover:bg-white dark:bg-gray-800/50 dark:hover:border-gray-600 dark:hover:bg-gray-800")
@@ -1827,7 +1827,7 @@ function Qn({ children: e, items: t, radius: n = "md", className: r, ref: i, "ar
1827
1827
  });
1828
1828
  Jn(c, v, u);
1829
1829
  let y = o(() => {
1830
- p(), s.current?.focus();
1830
+ p(), s.current?.focus({ preventScroll: !0 });
1831
1831
  }, [p]);
1832
1832
  return /* @__PURE__ */ _("div", {
1833
1833
  ref: i,
@@ -2012,7 +2012,13 @@ function Sr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
2012
2012
  m || k(U);
2013
2013
  }, se = o(() => {
2014
2014
  clearTimeout(B.current), G();
2015
- }, [G]);
2015
+ }, [G]), ce = (e) => {
2016
+ e.target.matches(":focus-visible") && K();
2017
+ }, le = (e) => {
2018
+ e.pointerType !== "touch" && K();
2019
+ }, ue = (e) => {
2020
+ e.pointerType !== "touch" && se();
2021
+ };
2016
2022
  c(() => () => clearTimeout(B.current), []), c(() => {
2017
2023
  if (!E) return;
2018
2024
  let e = (e) => {
@@ -2020,25 +2026,25 @@ function Sr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
2020
2026
  };
2021
2027
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
2022
2028
  }, [E, se]);
2023
- let ce = E && !m, le = M && s ? s : e, ue = {
2029
+ let de = E && !m, fe = M && s ? s : e, pe = {
2024
2030
  onClick: (e) => {
2025
2031
  i && s && oe(), a(t) && t.props.onClick?.(e);
2026
2032
  },
2027
- "aria-describedby": q(a(t) ? t.props["aria-describedby"] : void 0, ce && (C ?? (ee !== null && !ee)) && P)
2028
- }, de = a(t) ? n(t, ue) : t, fe = re.arrow?.x, pe = re.arrow?.y, me = xr[W];
2033
+ "aria-describedby": q(a(t) ? t.props["aria-describedby"] : void 0, de && (C ?? (ee !== null && !ee)) && P)
2034
+ }, me = a(t) ? n(t, pe) : t, he = re.arrow?.x, ge = re.arrow?.y, _e = xr[W];
2029
2035
  return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("span", {
2030
2036
  ref: ie,
2031
- className: x("inline-block", S),
2032
- onMouseEnter: K,
2033
- onMouseLeave: se,
2034
- onFocus: K,
2037
+ className: x("inline-flex", S),
2038
+ onPointerEnter: le,
2039
+ onPointerLeave: ue,
2040
+ onFocus: ce,
2035
2041
  onBlur: se,
2036
- children: [de, s !== void 0 && /* @__PURE__ */ g("span", {
2042
+ children: [me, s !== void 0 && /* @__PURE__ */ g("span", {
2037
2043
  role: "status",
2038
2044
  className: "sr-only",
2039
2045
  children: M ? s : null
2040
2046
  })]
2041
- }), ce && y(/* @__PURE__ */ g("div", {
2047
+ }), de && y(/* @__PURE__ */ g("div", {
2042
2048
  ref: ae,
2043
2049
  style: ne,
2044
2050
  className: "z-50 inline-block pointer-events-none",
@@ -2047,15 +2053,15 @@ function Sr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
2047
2053
  role: "tooltip",
2048
2054
  "data-state": D ? "open" : "closed",
2049
2055
  className: x("px-3 py-1.5 text-sm whitespace-nowrap", "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg", "transition-[opacity,transform] duration-150 ease-out", D ? "opacity-100" : "opacity-0", br[W], j[v]),
2050
- children: [le, /* @__PURE__ */ g("div", {
2056
+ children: [fe, /* @__PURE__ */ g("div", {
2051
2057
  ref: F,
2052
2058
  style: {
2053
2059
  position: "absolute",
2054
2060
  width: `${yr}px`,
2055
2061
  height: `${yr}px`,
2056
- left: fe === void 0 ? void 0 : `${fe}px`,
2057
- top: pe === void 0 ? void 0 : `${pe}px`,
2058
- [me]: `-${yr / 2}px`
2062
+ left: he === void 0 ? void 0 : `${he}px`,
2063
+ top: ge === void 0 ? void 0 : `${ge}px`,
2064
+ [_e]: `-${yr / 2}px`
2059
2065
  },
2060
2066
  className: "rotate-45 bg-gray-900 dark:bg-gray-100"
2061
2067
  })]
@@ -2311,7 +2317,7 @@ function ii({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
2311
2317
  }, [s, e]), c(() => {
2312
2318
  if (!e) return;
2313
2319
  let t = m.current;
2314
- (t?.isConnected ? t : a?.())?.focus();
2320
+ (t?.isConnected ? t : a?.())?.focus({ preventScroll: !0 });
2315
2321
  }, [e, a]), ri(u, {
2316
2322
  isEnded: e,
2317
2323
  onDismiss: t,
@@ -2332,7 +2338,7 @@ function ii({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
2332
2338
  }
2333
2339
  };
2334
2340
  }
2335
- // node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/vanilla.mjs
2341
+ // node_modules/.pnpm/zustand@5.0.16_@types+react@19.3.0_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/vanilla.mjs
2336
2342
  var ai = (e) => {
2337
2343
  let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
2338
2344
  let i = typeof e == "function" ? e(t) : e;
@@ -2349,7 +2355,7 @@ var ai = (e) => {
2349
2355
  return a;
2350
2356
  }, oi = ((e) => e ? ai(e) : ai), si = (e) => e;
2351
2357
  function ci(e, n = si) {
2352
- let r = t.useSyncExternalStore(e.subscribe, t.useCallback(() => n(e.getState()), [e, n]), t.useCallback(() => n(e.getInitialState()), [e, n]));
2358
+ let r = t.useSyncExternalStore(e.subscribe, t.useCallback(() => n(e.getState()), [e, n]), () => n(e.getInitialState()));
2353
2359
  return t.useDebugValue(r), r;
2354
2360
  }
2355
2361
  var li = (e) => {
@@ -2527,7 +2533,7 @@ function Ti({ trigger: e, children: t, side: r = "bottom", align: i = "start", r
2527
2533
  });
2528
2534
  Jn(v, E, b);
2529
2535
  let D = l(), O = (a(e) ? e.props.id : void 0) ?? D, k = `${O}-menu`, A = o(() => {
2530
- C(), d.current?.querySelector("button, [href], [tabindex]")?.focus();
2536
+ C(), d.current?.querySelector("button, [href], [tabindex]")?.focus({ preventScroll: !0 });
2531
2537
  }, [C]), j = o((e) => we(w.setReference, d, u)(e), [w, u]), M = {
2532
2538
  id: O,
2533
2539
  onClick: (t) => {
@@ -2542,7 +2548,7 @@ function Ti({ trigger: e, children: t, side: r = "bottom", align: i = "start", r
2542
2548
  }, N = a(e) ? n(e, M) : e;
2543
2549
  return /* @__PURE__ */ _("span", {
2544
2550
  ref: j,
2545
- className: x("inline-block", c),
2551
+ className: x("inline-flex", c),
2546
2552
  children: [N, v && /* @__PURE__ */ g(Kn, {
2547
2553
  id: k,
2548
2554
  labelledBy: O,
@@ -2567,16 +2573,16 @@ function Ei({ label: e, children: t, unstyled: n = !1, className: r, wrapperClas
2567
2573
  children: [/* @__PURE__ */ g("div", {
2568
2574
  id: a,
2569
2575
  role: "presentation",
2570
- className: x(!n && "px-4 py-1.5 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400", r),
2576
+ className: x(!n && "px-3 pt-2 pb-1 text-xs font-medium text-gray-500 dark:text-gray-400", r),
2571
2577
  children: e
2572
2578
  }), t]
2573
2579
  });
2574
2580
  }
2575
2581
  // src/components/menu_item/menu_item_content.tsx
2576
- var Di = ({ icon: e, children: t }) => /* @__PURE__ */ _(h, { children: [e && /* @__PURE__ */ g("div", {
2577
- className: x(e, "h-4 w-4 flex-shrink-0"),
2582
+ var Di = ({ icon: e, danger: t = !1, children: n }) => /* @__PURE__ */ _(h, { children: [e && /* @__PURE__ */ g("span", {
2583
+ className: x(e, "h-4 w-4 flex-shrink-0", !t && "text-gray-500 dark:text-gray-400"),
2578
2584
  "aria-hidden": "true"
2579
- }), t] });
2585
+ }), n] });
2580
2586
  // src/components/menu_item/menu_item_end.tsx
2581
2587
  function Oi({ trailing: e, selected: t }) {
2582
2588
  let n = t !== void 0;
@@ -2586,23 +2592,26 @@ function Oi({ trailing: e, selected: t }) {
2586
2592
  className: "text-xs text-gray-500 dark:text-gray-400",
2587
2593
  children: e
2588
2594
  }), n && /* @__PURE__ */ g("span", {
2589
- className: x("i-mdi-check h-4 w-4", !t && "invisible"),
2595
+ className: x("i-mdi-check h-4 w-4 text-blue-600 dark:text-blue-400", !t && "invisible"),
2590
2596
  "aria-hidden": "true"
2591
2597
  })]
2592
2598
  });
2593
2599
  }
2594
2600
  // src/components/menu_item/menu_item_styles.ts
2595
- var ki = [
2596
- "flex w-full cursor-pointer items-center gap-2 whitespace-nowrap px-4 py-2 text-left text-sm transition-colors",
2597
- "focus-visible:bg-gray-100 dark:focus-visible:bg-gray-700",
2598
- D
2599
- ];
2600
- function Ai(e, t, n) {
2601
- return x(ki, e, t ? "text-red-700 dark:text-red-300" : "text-gray-700 dark:text-gray-300", n);
2601
+ var ki = ["flex w-full cursor-pointer items-center gap-2 whitespace-nowrap px-3 py-2 text-left text-sm transition-colors", D], Ai = {
2602
+ default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
2603
+ danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
2604
+ };
2605
+ function ji(e, t, n, r) {
2606
+ let i = n ? "danger" : "default";
2607
+ return x(ki, Ai[i], e[i], t, r);
2602
2608
  }
2603
2609
  // src/components/menu_item/menu_item_button.tsx
2604
- var ji = ["hover:enabled:bg-gray-100 dark:hover:enabled:bg-gray-700", "disabled:cursor-not-allowed disabled:opacity-50"];
2605
- function Mi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, className: s, ref: c }) {
2610
+ var Mi = {
2611
+ default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
2612
+ danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
2613
+ }, Ni = ["disabled:cursor-not-allowed disabled:opacity-50"];
2614
+ function Pi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, className: s, ref: c }) {
2606
2615
  let l = Rn();
2607
2616
  return /* @__PURE__ */ _("button", {
2608
2617
  ref: c,
@@ -2614,9 +2623,10 @@ function Mi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
2614
2623
  e.stopPropagation(), n(e), l?.();
2615
2624
  },
2616
2625
  disabled: a,
2617
- className: Ai(ji, i, s),
2626
+ className: ji(Mi, Ni, i, s),
2618
2627
  children: [/* @__PURE__ */ g(Di, {
2619
2628
  icon: e,
2629
+ danger: i,
2620
2630
  children: o
2621
2631
  }), /* @__PURE__ */ g(Oi, {
2622
2632
  trailing: t,
@@ -2625,8 +2635,11 @@ function Mi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
2625
2635
  });
2626
2636
  }
2627
2637
  // src/components/menu_item/menu_item_link.tsx
2628
- var Ni = "_blank", Pi = "noopener noreferrer", Fi = ["no-underline hover:bg-gray-100 dark:hover:bg-gray-700", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
2629
- function Ii({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, className: c, ref: l }) {
2638
+ var Fi = "_blank", Ii = "noopener noreferrer", Li = {
2639
+ default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
2640
+ danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
2641
+ }, Ri = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
2642
+ function zi({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, className: c, ref: l }) {
2630
2643
  let u = Rn();
2631
2644
  return /* @__PURE__ */ _("a", {
2632
2645
  ref: l,
@@ -2634,28 +2647,29 @@ function Ii({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1,
2634
2647
  tabIndex: -1,
2635
2648
  href: o ? void 0 : n,
2636
2649
  target: r,
2637
- rel: i ?? (r === Ni ? Pi : void 0),
2650
+ rel: i ?? (r === Fi ? Ii : void 0),
2638
2651
  "aria-disabled": o || void 0,
2639
2652
  onClick: (e) => {
2640
2653
  e.stopPropagation(), u?.();
2641
2654
  },
2642
- className: Ai(Fi, a, c),
2655
+ className: ji(Li, Ri, a, c),
2643
2656
  children: [/* @__PURE__ */ g(Di, {
2644
2657
  icon: e,
2658
+ danger: a,
2645
2659
  children: s
2646
2660
  }), /* @__PURE__ */ g(Oi, { trailing: t })]
2647
2661
  });
2648
2662
  }
2649
2663
  // src/components/menu_item/menu_item.tsx
2650
- function Li(e) {
2651
- return e.href === void 0 ? /* @__PURE__ */ g(Mi, { ...e }) : /* @__PURE__ */ g(Ii, { ...e });
2664
+ function Bi(e) {
2665
+ return e.href === void 0 ? /* @__PURE__ */ g(Pi, { ...e }) : /* @__PURE__ */ g(zi, { ...e });
2652
2666
  }
2653
2667
  // src/components/menu_separator/menu_separator.tsx
2654
- var Ri = ({ unstyled: e = !1, className: t }) => /* @__PURE__ */ g("hr", {
2668
+ var Vi = ({ unstyled: e = !1, className: t }) => /* @__PURE__ */ g("hr", {
2655
2669
  "aria-orientation": "horizontal",
2656
- className: x("w-full", !e && ["my-1 border-0 border-t", "border-gray-200 dark:border-gray-700"], t)
2657
- }), zi = [];
2658
- function Bi() {
2670
+ className: x("w-full", !e && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], t)
2671
+ }), Hi = [];
2672
+ function Ui() {
2659
2673
  let e = 0, t = [], n = null, r = /* @__PURE__ */ new Set(), i = () => {
2660
2674
  for (let e of r) e(t);
2661
2675
  };
@@ -2676,7 +2690,7 @@ function Bi() {
2676
2690
  r.delete(i), r.size || (e = 0, t = [], n = null);
2677
2691
  }),
2678
2692
  getSnapshot: () => t,
2679
- getServerSnapshot: () => zi,
2693
+ getServerSnapshot: () => Hi,
2680
2694
  getListenersSize: () => r.size,
2681
2695
  getUpsertPromise: () => n,
2682
2696
  setUpsertPromise: (e) => {
@@ -2684,9 +2698,9 @@ function Bi() {
2684
2698
  }
2685
2699
  };
2686
2700
  }
2687
- var Vi = /* @__PURE__ */ new Map();
2688
- function Hi(e, t = 0) {
2689
- let n = { current: Bi() }, r = (e) => (r) => {
2701
+ var Wi = /* @__PURE__ */ new Map();
2702
+ function Gi(e, t = 0) {
2703
+ let n = { current: Ui() }, r = (e) => (r) => {
2690
2704
  let i = /* @__PURE__ */ new Set();
2691
2705
  n.current.set(e, (e) => (e.resolve(r), i.add(e.promise), {
2692
2706
  ...e,
@@ -2772,47 +2786,47 @@ function Hi(e, t = 0) {
2772
2786
  set: (r) => {
2773
2787
  if (t || (e = r, !r)) return;
2774
2788
  t = !0;
2775
- let i = Vi.get(r);
2776
- i ? n.current = i : Vi.set(r, n.current);
2789
+ let i = Wi.get(r);
2790
+ i ? n.current = i : Wi.set(r, n.current);
2777
2791
  }
2778
2792
  });
2779
2793
  }
2780
2794
  return d;
2781
2795
  }
2782
2796
  // src/components/modal/confirm_modal_title.tsx
2783
- var Ui = {
2797
+ var Ki = {
2784
2798
  danger: "i-mdi-alert-circle",
2785
2799
  primary: "i-mdi-help-circle",
2786
2800
  success: "i-mdi-check-circle"
2787
- }, Wi = {
2801
+ }, qi = {
2788
2802
  danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
2789
2803
  primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
2790
2804
  success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
2791
2805
  };
2792
- function Gi({ title: e, color: t }) {
2806
+ function Ji({ title: e, color: t }) {
2793
2807
  return /* @__PURE__ */ _("div", {
2794
2808
  className: "flex items-center gap-3",
2795
2809
  children: [/* @__PURE__ */ g("span", {
2796
- className: x("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", Wi[t]),
2810
+ className: x("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", qi[t]),
2797
2811
  "aria-hidden": "true",
2798
- children: /* @__PURE__ */ g("span", { className: x(Ui[t], "h-5 w-5") })
2812
+ children: /* @__PURE__ */ g("span", { className: x(Ki[t], "h-5 w-5") })
2799
2813
  }), e]
2800
2814
  });
2801
2815
  }
2802
2816
  // src/components/modal/modal_shell.tsx
2803
- var Ki = {
2817
+ var Yi = {
2804
2818
  sm: "max-w-md",
2805
2819
  md: "max-w-lg",
2806
2820
  lg: "max-w-2xl",
2807
2821
  xl: "max-w-4xl"
2808
- }, qi = {
2822
+ }, Xi = {
2809
2823
  auto: "",
2810
2824
  fixed: "ms-modal-height-fixed"
2811
- }, Ji = {
2825
+ }, Zi = {
2812
2826
  auto: "overflow-y-auto",
2813
2827
  fixed: "overflow-hidden flex flex-col"
2814
2828
  };
2815
- function Yi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size: a = "md", height: o = "auto", radius: s = "xl", className: c, dismissible: u = !0, closeLabel: d, role: f = "dialog", initialFocusRef: p, "aria-label": m }) {
2829
+ function Qi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size: a = "md", height: o = "auto", radius: s = "xl", className: c, dismissible: u = !0, closeLabel: d, role: f = "dialog", initialFocusRef: p, "aria-label": m }) {
2816
2830
  let h = l(), v = l(), { dialogRef: b, contentRef: S, footerSlot: C, setFooterSlot: w, isVisible: T, handleBackdropClick: E, handleBackdropMouseDown: D } = ii({
2817
2831
  isEnded: e,
2818
2832
  onDismiss: t,
@@ -2834,7 +2848,7 @@ function Yi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size:
2834
2848
  "aria-label": n ? void 0 : m,
2835
2849
  "aria-describedby": O ? v : void 0,
2836
2850
  tabIndex: -1,
2837
- className: x("relative w-full", Ki[a], qi[o], W, G, "shadow-2xl", j[s], "ms-modal-max-height overflow-hidden flex flex-col", "transition-all duration-200 ease-out", "focus:outline-none", T ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 translate-y-1"),
2851
+ className: x("relative w-full", Yi[a], Xi[o], W, G, "shadow-2xl", j[s], "ms-modal-max-height overflow-hidden flex flex-col", "transition-all duration-200 ease-out", "focus:outline-none", T ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 translate-y-1"),
2838
2852
  onClick: (e) => e.stopPropagation(),
2839
2853
  children: [
2840
2854
  n && /* @__PURE__ */ g(Dr, {
@@ -2847,7 +2861,7 @@ function Yi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size:
2847
2861
  /* @__PURE__ */ g("div", {
2848
2862
  ref: S,
2849
2863
  id: O ? v : void 0,
2850
- className: x("flex-1 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400 min-h-0", Ji[o], !n && "pt-6", c),
2864
+ className: x("flex-1 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400 min-h-0", Zi[o], !n && "pt-6", c),
2851
2865
  children: /* @__PURE__ */ g(fr.Provider, {
2852
2866
  value: C,
2853
2867
  children: r
@@ -2862,7 +2876,7 @@ function Yi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size:
2862
2876
  }), document.body);
2863
2877
  }
2864
2878
  // src/components/modal/confirm_modal.tsx
2865
- var Xi = Hi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
2879
+ var $i = Gi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
2866
2880
  pi();
2867
2881
  let [u, d] = p(!1), m = f(null), v = () => e.end(!1), y = async () => {
2868
2882
  if (!c) e.end(!0);
@@ -2875,10 +2889,10 @@ var Xi = Hi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i,
2875
2889
  }
2876
2890
  }
2877
2891
  }, b = Ae(), x = r ?? b.confirm, S = i ?? b.cancel, C = a ?? "primary";
2878
- return /* @__PURE__ */ g(Yi, {
2892
+ return /* @__PURE__ */ g(Qi, {
2879
2893
  isEnded: e.ended,
2880
2894
  onDismiss: v,
2881
- title: /* @__PURE__ */ g(Gi, {
2895
+ title: /* @__PURE__ */ g(Ji, {
2882
2896
  title: t,
2883
2897
  color: C
2884
2898
  }),
@@ -2908,10 +2922,10 @@ var Xi = Hi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i,
2908
2922
  });
2909
2923
  }, 200);
2910
2924
  // src/components/modal/modal.tsx
2911
- function Zi(e, t) {
2925
+ function ea(e, t) {
2912
2926
  return typeof e == "function" ? e(t) : e;
2913
2927
  }
2914
- var Qi = Hi(({ call: e, title: t, children: n, size: r, height: i, radius: a, className: o, dismissible: s, closeLabel: c, role: l, initialFocusRef: u, "aria-label": d }) => {
2928
+ var ta = Gi(({ call: e, title: t, children: n, size: r, height: i, radius: a, className: o, dismissible: s, closeLabel: c, role: l, initialFocusRef: u, "aria-label": d }) => {
2915
2929
  pi();
2916
2930
  let { dismiss: f, registry: p } = kr({
2917
2931
  onDismiss: () => e.end(),
@@ -2919,7 +2933,7 @@ var Qi = Hi(({ call: e, title: t, children: n, size: r, height: i, radius: a, cl
2919
2933
  });
2920
2934
  return /* @__PURE__ */ g(ur.Provider, {
2921
2935
  value: p,
2922
- children: /* @__PURE__ */ g(Yi, {
2936
+ children: /* @__PURE__ */ g(Qi, {
2923
2937
  isEnded: e.ended,
2924
2938
  onDismiss: f,
2925
2939
  title: t,
@@ -2932,17 +2946,17 @@ var Qi = Hi(({ call: e, title: t, children: n, size: r, height: i, radius: a, cl
2932
2946
  role: l,
2933
2947
  initialFocusRef: u,
2934
2948
  "aria-label": d,
2935
- children: Zi(n, f)
2949
+ children: ea(n, f)
2936
2950
  })
2937
2951
  });
2938
2952
  }, 200);
2939
2953
  // src/components/modal/modal_footer.tsx
2940
- function $i({ children: e }) {
2954
+ function na({ children: e }) {
2941
2955
  let t = s(fr);
2942
2956
  return t ? y(e, t) : null;
2943
2957
  }
2944
2958
  // src/components/modal/use_dismiss_guard.ts
2945
- function ea(e, t = !0) {
2959
+ function ra(e, t = !0) {
2946
2960
  let n = s(ur), r = f(e);
2947
2961
  if (u(() => {
2948
2962
  r.current = e;
@@ -2951,18 +2965,18 @@ function ea(e, t = !0) {
2951
2965
  }, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
2952
2966
  }
2953
2967
  // src/components/modal_provider/modal_provider.tsx
2954
- function ta() {
2955
- return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(Qi, {}), /* @__PURE__ */ g(Xi, {})] });
2968
+ function ia() {
2969
+ return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(ta, {}), /* @__PURE__ */ g($i, {})] });
2956
2970
  }
2957
2971
  // src/components/multi_combobox/multi_combobox.tsx
2958
- var na = 2;
2959
- function ra(e, t, n, r) {
2972
+ var aa = 2;
2973
+ function oa(e, t, n, r) {
2960
2974
  return r?.(e, t) ? !0 : n === void 0 || t.includes(e) ? !1 : t.length >= n;
2961
2975
  }
2962
- function ia(e, t) {
2976
+ function sa(e, t) {
2963
2977
  return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
2964
2978
  }
2965
- function aa(e, t) {
2979
+ function ca(e, t) {
2966
2980
  if (e.length <= t) return {
2967
2981
  visibleOptions: e,
2968
2982
  hiddenCount: 0
@@ -2973,8 +2987,8 @@ function aa(e, t) {
2973
2987
  hiddenCount: e.length - n
2974
2988
  };
2975
2989
  }
2976
- var oa = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2977
- function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, searchPlaceholder: a, noResultsText: s, clearLabel: l, clearText: u, maxSelectedValues: m, isOptionDisabled: v, maxDisplayedValues: y = na, formatOverflowCount: b, formatSelectedCount: S, formatMaxSelectedHint: C, radius: w = "sm", unstyled: T = !1, disabled: E = !1, required: D = !1, className: k, wrapperClassName: A, values: N, defaultValues: P = [], onChange: F, onDropdownClose: I, id: L }) {
2990
+ var la = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2991
+ function ua({ options: e, label: t, "aria-label": n, error: r, placeholder: i, searchPlaceholder: a, noResultsText: s, clearLabel: l, clearText: u, maxSelectedValues: m, isOptionDisabled: v, maxDisplayedValues: y = aa, formatOverflowCount: b, formatSelectedCount: S, formatMaxSelectedHint: C, radius: w = "sm", unstyled: T = !1, disabled: E = !1, required: D = !1, className: k, wrapperClassName: A, values: N, defaultValues: P = [], onChange: F, onDropdownClose: I, id: L }) {
2978
2992
  let R = Ae(), { fieldId: z, errorId: ee, labelId: te } = J(L), B = `${z}-listbox`, V = `${z}-max-hint`, ne = f(null), H = f(null), re = f(null), [U, W] = Ce(N, P), [ie, ae] = p(""), [G, oe] = p(!1), K = d(() => {
2979
2993
  let t = ie.trim().toLowerCase();
2980
2994
  return t ? e.filter((e) => e.label.toLowerCase().includes(t)) : e;
@@ -2982,7 +2996,7 @@ function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
2982
2996
  optionCount: K.length,
2983
2997
  getOptionId: (e) => `${B}-option-${e}`,
2984
2998
  isOpen: G
2985
- }), me = d(() => e.filter((e) => U.includes(e.value)), [e, U]), { visibleOptions: he, hiddenCount: ge } = aa(me, y), _e = () => {
2999
+ }), me = d(() => e.filter((e) => U.includes(e.value)), [e, U]), { visibleOptions: he, hiddenCount: ge } = ca(me, y), _e = () => {
2986
3000
  E || oe(!0);
2987
3001
  }, ve = o(() => {
2988
3002
  oe(!1), ae(""), pe(), I?.(U);
@@ -2993,8 +3007,8 @@ function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
2993
3007
  ]), ye = () => {
2994
3008
  G ? ve() : _e();
2995
3009
  }, be = (e) => {
2996
- if (ra(e, U, m, v)) return;
2997
- let t = ia(U, e);
3010
+ if (oa(e, U, m, v)) return;
3011
+ let t = sa(U, e);
2998
3012
  W(t), F?.(t);
2999
3013
  }, q = () => {
3000
3014
  W([]), F?.([]);
@@ -3070,10 +3084,10 @@ function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
3070
3084
  className: x(!T && "text-gray-500 dark:text-gray-400"),
3071
3085
  children: i
3072
3086
  }) : /* @__PURE__ */ _(h, { children: [he.map((e) => /* @__PURE__ */ g("span", {
3073
- className: x(!T && oa),
3087
+ className: x(!T && la),
3074
3088
  children: e.label
3075
3089
  }, e.value)), ge > 0 && /* @__PURE__ */ g("span", {
3076
- className: x(!T && oa),
3090
+ className: x(!T && la),
3077
3091
  children: (b ?? R.overflowCount)(ge)
3078
3092
  })] })
3079
3093
  }),
@@ -3129,7 +3143,7 @@ function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
3129
3143
  "aria-multiselectable": !0,
3130
3144
  className: x("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
3131
3145
  children: K.map((e, t) => {
3132
- let n = U.includes(e.value), r = ra(e.value, U, m, v);
3146
+ let n = U.includes(e.value), r = oa(e.value, U, m, v);
3133
3147
  return /* @__PURE__ */ _("li", {
3134
3148
  id: `${B}-option-${t}`,
3135
3149
  role: "option",
@@ -3183,7 +3197,7 @@ function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
3183
3197
  });
3184
3198
  }
3185
3199
  // src/components/radio_options/radio_option_row.tsx
3186
- function ca({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, isFirstOption: s, required: c, error: l, radius: u, unstyled: d, className: f, onSelect: p }) {
3200
+ function da({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, isFirstOption: s, required: c, error: l, radius: u, unstyled: d, className: f, onSelect: p }) {
3187
3201
  let m = !!l;
3188
3202
  return /* @__PURE__ */ g(De, {
3189
3203
  item: e,
@@ -3219,7 +3233,7 @@ function ca({ option: e, optionId: t, descriptionId: n, name: r, orientation: i,
3219
3233
  });
3220
3234
  }
3221
3235
  // src/components/radio_options/radio_options.tsx
3222
- function la({ options: e, orientation: t = "vertical", value: n, defaultValue: r, onChange: i, name: a, label: o, error: s, required: c, disabled: l, radius: u = "lg", unstyled: d = !1, className: f, wrapperClassName: p, id: m, "aria-describedby": h, ...v }) {
3236
+ function fa({ options: e, orientation: t = "vertical", value: n, defaultValue: r, onChange: i, name: a, label: o, error: s, required: c, disabled: l, radius: u = "lg", unstyled: d = !1, className: f, wrapperClassName: p, id: m, "aria-describedby": h, ...v }) {
3223
3237
  let { fieldId: y, errorId: b } = J(m), S = a ?? y, [C, w] = Ce(n, r ?? ""), T = e.map((e) => typeof e == "string" ? {
3224
3238
  value: e,
3225
3239
  label: e
@@ -3243,7 +3257,7 @@ function la({ options: e, orientation: t = "vertical", value: n, defaultValue: r
3243
3257
  }),
3244
3258
  /* @__PURE__ */ g("div", {
3245
3259
  className: x(t === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
3246
- children: T.map((e, n) => /* @__PURE__ */ g(ca, {
3260
+ children: T.map((e, n) => /* @__PURE__ */ g(da, {
3247
3261
  option: e,
3248
3262
  optionId: `${y}-${n}`,
3249
3263
  descriptionId: `${y}-${n}-desc`,
@@ -3269,7 +3283,7 @@ function la({ options: e, orientation: t = "vertical", value: n, defaultValue: r
3269
3283
  });
3270
3284
  }
3271
3285
  // src/components/select/select.tsx
3272
- function ua({ options: e, label: t, description: n, error: r, placeholder: i, radius: a = "md", unstyled: o = !1, className: s, wrapperClassName: c, value: l, defaultValue: u, onChange: d, id: f, "aria-describedby": p, ...m }) {
3286
+ function pa({ options: e, label: t, description: n, error: r, placeholder: i, radius: a = "md", unstyled: o = !1, className: s, wrapperClassName: c, value: l, defaultValue: u, onChange: d, id: f, "aria-describedby": p, ...m }) {
3273
3287
  let { fieldId: h, errorId: v, descriptionId: y } = J(f);
3274
3288
  return /* @__PURE__ */ g(Fe, {
3275
3289
  fieldId: h,
@@ -3304,7 +3318,7 @@ function ua({ options: e, label: t, description: n, error: r, placeholder: i, ra
3304
3318
  });
3305
3319
  }
3306
3320
  // src/components/switch/switch.tsx
3307
- function da({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i = !1, className: a, wrapperClassName: o, checked: s, defaultChecked: c = !1, onChange: l, id: u, "aria-describedby": d, ...f }) {
3321
+ function ma({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i = !1, className: a, wrapperClassName: o, checked: s, defaultChecked: c = !1, onChange: l, id: u, "aria-describedby": d, ...f }) {
3308
3322
  let { fieldId: p, errorId: m, descriptionId: v } = J(u), [y, b] = Ce(s, c), S = q(d, !!t && v, n && m);
3309
3323
  return /* @__PURE__ */ _("div", {
3310
3324
  className: x(i ? "w-full" : "w-fit", o),
@@ -3359,11 +3373,11 @@ function da({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i
3359
3373
  });
3360
3374
  }
3361
3375
  // src/components/tabs/tabs_styles.ts
3362
- var fa = {
3376
+ var ha = {
3363
3377
  list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
3364
3378
  tab: "",
3365
3379
  indicator: `absolute inset-0 ${H} border border-gray-200 dark:border-gray-700`
3366
- }, pa = {
3380
+ }, ga = {
3367
3381
  line: {
3368
3382
  activeTab: "border-transparent text-gray-900 dark:text-gray-100",
3369
3383
  idleTab: "border-transparent text-gray-500 dark:text-gray-400",
@@ -3386,52 +3400,52 @@ var fa = {
3386
3400
  idleTab: "text-gray-600 dark:text-gray-400",
3387
3401
  idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
3388
3402
  byOrientation: {
3389
- horizontal: fa,
3390
- vertical: fa
3403
+ horizontal: ha,
3404
+ vertical: ha
3391
3405
  }
3392
3406
  }
3393
- }, ma = {
3407
+ }, _a = {
3394
3408
  xs: "px-2 py-1 text-xs",
3395
3409
  sm: "px-3 py-1.5 text-sm",
3396
3410
  md: "px-4 py-2.5 text-sm",
3397
3411
  lg: "px-5 py-3 text-base"
3398
- }, ha = {
3412
+ }, va = {
3399
3413
  xs: "w-3.5 h-3.5",
3400
3414
  sm: "w-4 h-4",
3401
3415
  md: "w-4 h-4",
3402
3416
  lg: "w-5 h-5"
3403
- }, ga = {
3417
+ }, ya = {
3404
3418
  horizontal: x(S, O.primary.focusOutline),
3405
3419
  vertical: x("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", O.primary.focusOutline)
3406
- }, _a = "items-center", va = x("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", ae), ya = "w-48 shrink-0", ba = "justify-start text-left whitespace-normal", xa = "whitespace-nowrap", Sa = "flex min-h-0", Ca = x("flex-1 min-w-0 min-h-0 overflow-y-auto", ae), wa = "ml-6", Ta = "mt-4";
3407
- function Ea(e, t) {
3408
- return x("w-full", e === "vertical" && Sa, t);
3420
+ }, ba = "items-center", xa = x("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", ae), Sa = "w-48 shrink-0", Ca = "justify-start text-left whitespace-normal", wa = "whitespace-nowrap", Ta = "flex min-h-0", Ea = x("flex-1 min-w-0 min-h-0 overflow-y-auto", ae), Da = "ml-6", Oa = "mt-4";
3421
+ function ka(e, t) {
3422
+ return x("w-full", e === "vertical" && Ta, t);
3409
3423
  }
3410
- function Da(e) {
3424
+ function Aa(e) {
3411
3425
  let { orientation: t, unstyled: n, className: r } = e, i = t === "vertical";
3412
- return x(i && Ca, !n && [i ? wa : Ta, ga[t]], r);
3426
+ return x(i && Ea, !n && [i ? Da : Oa, ya[t]], r);
3413
3427
  }
3414
- function Oa(e) {
3428
+ function ja(e) {
3415
3429
  let { variant: t, orientation: n, radius: r, unstyled: i, isFullWidth: a, className: o } = e, s = n === "vertical";
3416
- return x("flex", s ? va : _a, !s && a && "w-full", !i && s && ya, !i && pa[t].byOrientation[n].list, !i && t === "segmented" && j[r], o);
3430
+ return x("flex", s ? xa : ba, !s && a && "w-full", !i && s && Sa, !i && ga[t].byOrientation[n].list, !i && t === "segmented" && j[r], o);
3417
3431
  }
3418
- function ka(e) {
3419
- let { variant: t, orientation: n, size: r, radius: i, unstyled: a, isActive: o, isDisabled: s, isFullWidth: c, className: l } = e, u = n === "vertical", d = pa[t];
3420
- return x("relative flex items-center gap-2", u ? ba : xa, !u && c && "flex-1 justify-center", s ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !a && [
3432
+ function Ma(e) {
3433
+ let { variant: t, orientation: n, size: r, radius: i, unstyled: a, isActive: o, isDisabled: s, isFullWidth: c, className: l } = e, u = n === "vertical", d = ga[t];
3434
+ return x("relative flex items-center gap-2", u ? Ca : wa, !u && c && "flex-1 justify-center", s ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !a && [
3421
3435
  "font-medium transition-colors duration-200",
3422
- ma[r],
3436
+ _a[r],
3423
3437
  d.byOrientation[n].tab,
3424
3438
  o ? d.activeTab : [d.idleTab, !s && d.idleHover],
3425
3439
  t === "segmented" && j[i],
3426
- ga[n]
3440
+ ya[n]
3427
3441
  ], l);
3428
3442
  }
3429
- function Aa(e) {
3443
+ function Na(e) {
3430
3444
  let { variant: t, orientation: n, radius: r } = e;
3431
- return x("tabs-indicator pointer-events-none", pa[t].byOrientation[n].indicator, t === "segmented" && j[r]);
3445
+ return x("tabs-indicator pointer-events-none", ga[t].byOrientation[n].indicator, t === "segmented" && j[r]);
3432
3446
  }
3433
3447
  // src/components/tabs/tab_button.tsx
3434
- function ja({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidth: i, variant: a, orientation: o, size: s, radius: c, unstyled: l, tabId: u, panelId: d, onSelect: f, onKeyDown: p, ref: m, indicatorRef: v }) {
3448
+ function Pa({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidth: i, variant: a, orientation: o, size: s, radius: c, unstyled: l, tabId: u, panelId: d, onSelect: f, onKeyDown: p, ref: m, indicatorRef: v }) {
3435
3449
  let y = !!e.disabled;
3436
3450
  return /* @__PURE__ */ _("button", {
3437
3451
  ref: m,
@@ -3445,7 +3459,7 @@ function ja({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
3445
3459
  disabled: e.disabled,
3446
3460
  onClick: f,
3447
3461
  onKeyDown: p,
3448
- className: ka({
3462
+ className: Ma({
3449
3463
  variant: a,
3450
3464
  orientation: o,
3451
3465
  size: s,
@@ -3459,7 +3473,7 @@ function ja({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
3459
3473
  t && !l && /* @__PURE__ */ g("span", {
3460
3474
  ref: v,
3461
3475
  "aria-hidden": "true",
3462
- className: Aa({
3476
+ className: Na({
3463
3477
  variant: a,
3464
3478
  orientation: o,
3465
3479
  radius: c
@@ -3467,7 +3481,7 @@ function ja({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
3467
3481
  }),
3468
3482
  e.icon && /* @__PURE__ */ g("span", {
3469
3483
  "aria-hidden": "true",
3470
- className: x("relative shrink-0", ha[s], e.icon)
3484
+ className: x("relative shrink-0", va[s], e.icon)
3471
3485
  }),
3472
3486
  /* @__PURE__ */ g("span", {
3473
3487
  className: "relative",
@@ -3478,7 +3492,7 @@ function ja({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
3478
3492
  });
3479
3493
  }
3480
3494
  // src/components/tabs/tab_panel.tsx
3481
- function Ma({ panelId: e, tabId: t, isHidden: n, isAnimated: r, className: i, contentKey: a, children: o }) {
3495
+ function Fa({ panelId: e, tabId: t, isHidden: n, isAnimated: r, className: i, contentKey: a, children: o }) {
3482
3496
  return /* @__PURE__ */ g("div", {
3483
3497
  role: "tabpanel",
3484
3498
  id: e,
@@ -3493,11 +3507,11 @@ function Ma({ panelId: e, tabId: t, isHidden: n, isAnimated: r, className: i, co
3493
3507
  });
3494
3508
  }
3495
3509
  // src/components/tabs/use_tab_indicator_transition.ts
3496
- var Na = 200, Pa = "ease-out", Fa = "(prefers-reduced-motion: reduce)";
3497
- function Ia() {
3498
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(Fa).matches;
3510
+ var Ia = 200, La = "ease-out", Ra = "(prefers-reduced-motion: reduce)";
3511
+ function za() {
3512
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(Ra).matches;
3499
3513
  }
3500
- function La(e, t, n) {
3514
+ function Ba(e, t, n) {
3501
3515
  return e === "vertical" ? [{
3502
3516
  transform: `translateY(${t.top - n.top}px)`,
3503
3517
  height: `${t.height}px`
@@ -3512,16 +3526,16 @@ function La(e, t, n) {
3512
3526
  width: `${n.width}px`
3513
3527
  }];
3514
3528
  }
3515
- function Ra(e, t, n, r) {
3516
- e.animate(La(t, n, r), {
3517
- duration: Na,
3518
- easing: Pa
3529
+ function Va(e, t, n, r) {
3530
+ e.animate(Ba(t, n, r), {
3531
+ duration: Ia,
3532
+ easing: La
3519
3533
  });
3520
3534
  }
3521
- function za(e, t, n) {
3522
- return !e || !t || !n ? !1 : !Ia();
3535
+ function Ha(e, t, n) {
3536
+ return !e || !t || !n ? !1 : !za();
3523
3537
  }
3524
- function Ba(e) {
3538
+ function Ua(e) {
3525
3539
  let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = f(null);
3526
3540
  u(() => {
3527
3541
  let e = n.current;
@@ -3530,7 +3544,7 @@ function Ba(e) {
3530
3544
  return;
3531
3545
  }
3532
3546
  let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
3533
- za(a.current, r, o) && Ra(e, i, a.current, t), a.current = t;
3547
+ Ha(a.current, r, o) && Va(e, i, a.current, t), a.current = t;
3534
3548
  }, [
3535
3549
  t,
3536
3550
  n,
@@ -3539,34 +3553,34 @@ function Ba(e) {
3539
3553
  ]);
3540
3554
  }
3541
3555
  // src/components/tabs/use_tabs_keyboard_navigation.ts
3542
- var Va = {
3556
+ var Wa = {
3543
3557
  Home: () => 0,
3544
3558
  End: (e, t) => t - 1
3545
- }, Ha = (e, t) => (e + 1) % t, Ua = (e, t) => (e - 1 + t) % t, Wa = {
3559
+ }, Ga = (e, t) => (e + 1) % t, Ka = (e, t) => (e - 1 + t) % t, qa = {
3546
3560
  horizontal: {
3547
- ...Va,
3548
- ArrowRight: Ha,
3549
- ArrowLeft: Ua
3561
+ ...Wa,
3562
+ ArrowRight: Ga,
3563
+ ArrowLeft: Ka
3550
3564
  },
3551
3565
  vertical: {
3552
- ...Va,
3553
- ArrowDown: Ha,
3554
- ArrowUp: Ua
3566
+ ...Wa,
3567
+ ArrowDown: Ga,
3568
+ ArrowUp: Ka
3555
3569
  }
3556
3570
  };
3557
- function Ga(e) {
3571
+ function Ja(e) {
3558
3572
  return e.flatMap((e, t) => e.disabled ? [] : [t]);
3559
3573
  }
3560
- function Ka(e, t) {
3574
+ function Ya(e, t) {
3561
3575
  let n = e[t];
3562
- return n && !n.disabled ? t : Ga(e)[0] ?? -1;
3576
+ return n && !n.disabled ? t : Ja(e)[0] ?? -1;
3563
3577
  }
3564
- function qa(e) {
3578
+ function Xa(e) {
3565
3579
  let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
3566
3580
  return (e) => {
3567
- let a = Wa[r][e.key];
3581
+ let a = qa[r][e.key];
3568
3582
  if (!a) return;
3569
- let o = Ga(t);
3583
+ let o = Ja(t);
3570
3584
  if (o.length === 0) return;
3571
3585
  e.preventDefault();
3572
3586
  let s = a(o.indexOf(n), o.length);
@@ -3574,32 +3588,32 @@ function qa(e) {
3574
3588
  };
3575
3589
  }
3576
3590
  // src/components/tabs/tabs.tsx
3577
- function Ja({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: s = !1, unstyled: c = !1, animated: u = !0, keepMounted: d = !1, className: p, tabListClassName: m, panelClassName: h, onChange: v }) {
3591
+ function Za({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: s = !1, unstyled: c = !1, animated: u = !0, keepMounted: d = !1, className: p, tabListClassName: m, panelClassName: h, onChange: v }) {
3578
3592
  let [y, b] = Ce(t, n), x = l(), S = f([]), C = f(null), w = (t) => {
3579
3593
  e[t]?.disabled || (b(t), v?.(t));
3580
3594
  }, T = (e) => {
3581
3595
  S.current[e]?.focus(), w(e);
3582
- }, E = Ka(e, y), D = qa({
3596
+ }, E = Ya(e, y), D = Xa({
3583
3597
  items: e,
3584
3598
  activeIndex: E,
3585
3599
  orientation: i,
3586
3600
  onNavigate: T
3587
- }), O = Da({
3601
+ }), O = Aa({
3588
3602
  orientation: i,
3589
3603
  unstyled: c,
3590
3604
  className: h
3591
3605
  }), k = u && !c;
3592
- return Ba({
3606
+ return Ua({
3593
3607
  activeIndex: y,
3594
3608
  indicatorRef: C,
3595
3609
  isAnimated: u,
3596
3610
  orientation: i
3597
3611
  }), /* @__PURE__ */ _("div", {
3598
- className: Ea(i, p),
3612
+ className: ka(i, p),
3599
3613
  children: [/* @__PURE__ */ g("div", {
3600
3614
  role: "tablist",
3601
3615
  "aria-orientation": i,
3602
- className: Oa({
3616
+ className: ja({
3603
3617
  variant: r,
3604
3618
  orientation: i,
3605
3619
  radius: o,
@@ -3607,7 +3621,7 @@ function Ja({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
3607
3621
  isFullWidth: s,
3608
3622
  className: m
3609
3623
  }),
3610
- children: e.map((e, t) => /* @__PURE__ */ g(ja, {
3624
+ children: e.map((e, t) => /* @__PURE__ */ g(Pa, {
3611
3625
  ref: (e) => {
3612
3626
  S.current[t] = e;
3613
3627
  },
@@ -3627,14 +3641,14 @@ function Ja({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
3627
3641
  onSelect: () => w(t),
3628
3642
  onKeyDown: D
3629
3643
  }, e.title))
3630
- }), d ? e.map((e, t) => /* @__PURE__ */ g(Ma, {
3644
+ }), d ? e.map((e, t) => /* @__PURE__ */ g(Fa, {
3631
3645
  panelId: `${x}-panel-${t}`,
3632
3646
  tabId: `${x}-tab-${t}`,
3633
3647
  isHidden: t !== y,
3634
3648
  isAnimated: k,
3635
3649
  className: O,
3636
3650
  children: e.content
3637
- }, e.title)) : /* @__PURE__ */ g(Ma, {
3651
+ }, e.title)) : /* @__PURE__ */ g(Fa, {
3638
3652
  panelId: `${x}-panel-${y}`,
3639
3653
  tabId: `${x}-tab-${y}`,
3640
3654
  isHidden: !1,
@@ -3646,7 +3660,7 @@ function Ja({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
3646
3660
  });
3647
3661
  }
3648
3662
  // src/components/textarea/textarea.tsx
3649
- function Ya({ label: e, description: t, error: n, showCharCount: r = !1, minLength: i, maxLength: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, ...h }) {
3663
+ function Qa({ label: e, description: t, error: n, showCharCount: r = !1, minLength: i, maxLength: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, ...h }) {
3650
3664
  let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } = yi(u, d), T = r && (i !== void 0 || a !== void 0), E = (e) => {
3651
3665
  w(e.target.value), f?.(e);
3652
3666
  };
@@ -3684,7 +3698,7 @@ function Ya({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
3684
3698
  });
3685
3699
  }
3686
3700
  // src/lib/is_webkit_gtk.ts
3687
- var Xa = "AppleWebKit", Za = ["Linux", "X11"], Qa = [
3701
+ var $a = "AppleWebKit", eo = ["Linux", "X11"], to = [
3688
3702
  "Chrome",
3689
3703
  "Chromium",
3690
3704
  "Edg",
@@ -3692,12 +3706,12 @@ var Xa = "AppleWebKit", Za = ["Linux", "X11"], Qa = [
3692
3706
  "CriOS",
3693
3707
  "FxiOS"
3694
3708
  ];
3695
- function $a(e) {
3696
- return !e.includes(Xa) || !Za.some((t) => e.includes(t)) ? !1 : !Qa.some((t) => e.includes(t));
3709
+ function no(e) {
3710
+ return !e.includes($a) || !eo.some((t) => e.includes(t)) ? !1 : !to.some((t) => e.includes(t));
3697
3711
  }
3698
3712
  // src/lib/theme_transition.ts
3699
- var eo = 750, to = "ease-in-out";
3700
- async function no({ theme: e, element: t, transitionDuration: n = eo, transitionEasing: r = to, applyThemeCallback: i }) {
3713
+ var ro = 750, io = "ease-in-out";
3714
+ async function ao({ theme: e, element: t, transitionDuration: n = ro, transitionEasing: r = io, applyThemeCallback: i }) {
3701
3715
  if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
3702
3716
  i(e);
3703
3717
  return;
@@ -3711,51 +3725,51 @@ async function no({ theme: e, element: t, transitionDuration: n = eo, transition
3711
3725
  pseudoElement: "::view-transition-new(root)"
3712
3726
  });
3713
3727
  }
3714
- function ro(e) {
3728
+ function oo(e) {
3715
3729
  return e === "light" ? "dark" : e === "dark" ? "system" : "light";
3716
3730
  }
3717
3731
  // src/stores/theme_store/theme_store.ts
3718
- var io = "theme";
3719
- function ao(e) {
3732
+ var so = "theme";
3733
+ function co(e) {
3720
3734
  return e === "light" || e === "dark" || e === "system";
3721
3735
  }
3722
- function oo() {
3736
+ function lo() {
3723
3737
  return globalThis.window !== void 0 && globalThis.document !== void 0;
3724
3738
  }
3725
- function so(e) {
3739
+ function uo(e) {
3726
3740
  let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
3727
3741
  document.documentElement.classList.toggle("dark", n);
3728
3742
  }
3729
- function co() {
3730
- if (!oo()) return "system";
3731
- let e = globalThis.localStorage.getItem(io);
3732
- return ao(e) ? e : "system";
3743
+ function fo() {
3744
+ if (!lo()) return "system";
3745
+ let e = globalThis.localStorage.getItem(so);
3746
+ return co(e) ? e : "system";
3733
3747
  }
3734
- var lo = co();
3735
- oo() && so(lo);
3736
- var uo = ui((e) => ({
3737
- theme: lo,
3748
+ var po = fo();
3749
+ lo() && uo(po);
3750
+ var mo = ui((e) => ({
3751
+ theme: po,
3738
3752
  setTheme: (t) => {
3739
- so(t), oo() && globalThis.localStorage.setItem(io, t), e({ theme: t });
3753
+ uo(t), lo() && globalThis.localStorage.setItem(so, t), e({ theme: t });
3740
3754
  }
3741
3755
  }));
3742
- oo() && (globalThis.addEventListener("storage", (e) => {
3743
- if (e.key !== io) return;
3744
- let t = ao(e.newValue) ? e.newValue : "system";
3745
- so(t), uo.setState({ theme: t });
3756
+ lo() && (globalThis.addEventListener("storage", (e) => {
3757
+ if (e.key !== so) return;
3758
+ let t = co(e.newValue) ? e.newValue : "system";
3759
+ uo(t), mo.setState({ theme: t });
3746
3760
  }), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
3747
- uo.getState().theme === "system" && so("system");
3761
+ mo.getState().theme === "system" && uo("system");
3748
3762
  }));
3749
3763
  // src/components/theme_toggle/theme_toggle.tsx
3750
- var fo = {
3764
+ var ho = {
3751
3765
  light: "i-tabler-sun text-yellow-500",
3752
3766
  dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
3753
3767
  system: "i-tabler-device-desktop text-blue-500"
3754
- }, po = "i-tabler-device-desktop text-gray-400";
3755
- function mo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", radius: i, variant: a, getAriaLabel: s, tooltip: c }) {
3756
- let l = uo((e) => e.theme), u = uo((e) => e.setTheme), d = Ae(), p = Ne(), m = f(null), h = o(async () => {
3757
- let r = ro(l), i = m.current, a = e ?? !$a(navigator.userAgent);
3758
- i && a ? await no({
3768
+ }, go = "i-tabler-device-desktop text-gray-400";
3769
+ function _o({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", radius: i, variant: a, getAriaLabel: s, tooltip: c }) {
3770
+ let l = mo((e) => e.theme), u = mo((e) => e.setTheme), d = Ae(), p = Ne(), m = f(null), h = o(async () => {
3771
+ let r = oo(l), i = m.current, a = e ?? !no(navigator.userAgent);
3772
+ i && a ? await ao({
3759
3773
  theme: r,
3760
3774
  element: i,
3761
3775
  transitionDuration: t,
@@ -3768,7 +3782,7 @@ function mo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
3768
3782
  t,
3769
3783
  n,
3770
3784
  u
3771
- ]), _ = p ? fo[l] : po;
3785
+ ]), _ = p ? ho[l] : go;
3772
3786
  return /* @__PURE__ */ g(Er, {
3773
3787
  ref: m,
3774
3788
  icon: _,
@@ -3783,7 +3797,7 @@ function mo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
3783
3797
  });
3784
3798
  }
3785
3799
  // src/components/toolbar/toolbar_items.ts
3786
- var ho = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", go = [
3800
+ var vo = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", yo = [
3787
3801
  "textarea",
3788
3802
  "[contenteditable]:not([contenteditable=\"false\"])",
3789
3803
  `input:not(${[
@@ -3798,45 +3812,45 @@ var ho = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
3798
3812
  "submit"
3799
3813
  ].map((e) => `[type="${e}"]`).join(", ")})`
3800
3814
  ].join(", ");
3801
- function _o(e) {
3815
+ function bo(e) {
3802
3816
  return e.matches(":disabled, [aria-disabled=\"true\"]");
3803
3817
  }
3804
- function vo(e) {
3805
- return Array.from(e.querySelectorAll(ho));
3818
+ function xo(e) {
3819
+ return Array.from(e.querySelectorAll(vo));
3806
3820
  }
3807
- function yo(e) {
3808
- return vo(e).filter((e) => !_o(e));
3821
+ function So(e) {
3822
+ return xo(e).filter((e) => !bo(e));
3809
3823
  }
3810
- function bo(e) {
3811
- return e instanceof HTMLElement && e.matches(go);
3824
+ function Co(e) {
3825
+ return e instanceof HTMLElement && e.matches(yo);
3812
3826
  }
3813
3827
  // src/components/toolbar/toolbar_navigation.ts
3814
- var xo = (e, t) => (e + 1) % t, So = (e, t) => (e - 1 + t) % t, Co = () => 0, wo = (e, t) => t - 1, To = {
3828
+ var wo = (e, t) => (e + 1) % t, To = (e, t) => (e - 1 + t) % t, Eo = () => 0, Do = (e, t) => t - 1, Oo = {
3815
3829
  horizontal: {
3816
- ArrowRight: xo,
3817
- ArrowLeft: So,
3818
- Home: Co,
3819
- End: wo
3830
+ ArrowRight: wo,
3831
+ ArrowLeft: To,
3832
+ Home: Eo,
3833
+ End: Do
3820
3834
  },
3821
3835
  vertical: {
3822
- ArrowDown: xo,
3823
- ArrowUp: So,
3824
- Home: Co,
3825
- End: wo
3836
+ ArrowDown: wo,
3837
+ ArrowUp: To,
3838
+ Home: Eo,
3839
+ End: Do
3826
3840
  }
3827
3841
  };
3828
- function Eo(e) {
3829
- let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = To[n][t];
3842
+ function ko(e) {
3843
+ let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = Oo[n][t];
3830
3844
  if (a && i !== 0) return a(r, i);
3831
3845
  }
3832
3846
  // src/components/toolbar/use_toolbar_roving_focus.ts
3833
- var Do = ["disabled", "aria-disabled"];
3834
- function Oo(e, t) {
3847
+ var Ao = ["disabled", "aria-disabled"];
3848
+ function jo(e, t) {
3835
3849
  let n = f(null), r = o(() => {
3836
3850
  let t = e.current;
3837
3851
  if (!t) return;
3838
- let r = yo(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3839
- for (let e of vo(t)) e.tabIndex = e === a ? 0 : -1;
3852
+ let r = So(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3853
+ for (let e of xo(t)) e.tabIndex = e === a ? 0 : -1;
3840
3854
  }, [e]);
3841
3855
  return c(() => {
3842
3856
  let t = e.current;
@@ -3847,19 +3861,19 @@ function Oo(e, t) {
3847
3861
  subtree: !0,
3848
3862
  childList: !0,
3849
3863
  attributes: !0,
3850
- attributeFilter: Do
3864
+ attributeFilter: Ao
3851
3865
  }), () => n.disconnect();
3852
3866
  }, [e, r]), {
3853
3867
  handleFocus: (t) => {
3854
3868
  let i = e.current;
3855
3869
  if (!i) return;
3856
- let a = yo(i).find((e) => e === t.target);
3870
+ let a = So(i).find((e) => e === t.target);
3857
3871
  a && (n.current = a, r());
3858
3872
  },
3859
3873
  handleKeyDown: (n) => {
3860
3874
  let r = e.current;
3861
- if (!r || bo(n.target)) return;
3862
- let i = yo(r), a = Eo({
3875
+ if (!r || Co(n.target)) return;
3876
+ let i = So(r), a = ko({
3863
3877
  key: n.key,
3864
3878
  orientation: t,
3865
3879
  currentPosition: i.findIndex((e) => e === n.target),
@@ -3870,18 +3884,18 @@ function Oo(e, t) {
3870
3884
  };
3871
3885
  }
3872
3886
  // src/components/toolbar/toolbar.tsx
3873
- var ko = {
3887
+ var Mo = {
3874
3888
  horizontal: "flex items-center gap-1",
3875
3889
  vertical: "flex flex-col items-stretch gap-1"
3876
3890
  };
3877
- function Ao(e) {
3878
- let { orientation: t = "horizontal", unstyled: n = !1, className: r, ref: i, onFocus: a, onKeyDown: o, ...s } = e, c = f(null), { handleFocus: l, handleKeyDown: u } = Oo(c, t);
3891
+ function No(e) {
3892
+ let { orientation: t = "horizontal", unstyled: n = !1, className: r, ref: i, onFocus: a, onKeyDown: o, ...s } = e, c = f(null), { handleFocus: l, handleKeyDown: u } = jo(c, t);
3879
3893
  return /* @__PURE__ */ g("div", {
3880
3894
  ...s,
3881
3895
  ref: we(c, i),
3882
3896
  role: "toolbar",
3883
3897
  "aria-orientation": t,
3884
- className: x(!n && ko[t], r),
3898
+ className: x(!n && Mo[t], r),
3885
3899
  onFocus: (e) => {
3886
3900
  l(e), a?.(e);
3887
3901
  },
@@ -3891,13 +3905,13 @@ function Ao(e) {
3891
3905
  });
3892
3906
  }
3893
3907
  // src/components/ui_provider/ui_provider.tsx
3894
- function jo(e = {}) {
3908
+ function Po(e = {}) {
3895
3909
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
3896
3910
  }
3897
- function Mo({ labels: e, announceFieldErrors: t, children: n }) {
3911
+ function Fo({ labels: e, announceFieldErrors: t, children: n }) {
3898
3912
  let r = s(ke), i = ye(), a = d(() => ({
3899
3913
  ...r,
3900
- ...jo(e)
3914
+ ...Po(e)
3901
3915
  }), [r, e]);
3902
3916
  return /* @__PURE__ */ g(ke.Provider, {
3903
3917
  value: a,
@@ -3908,10 +3922,10 @@ function Mo({ labels: e, announceFieldErrors: t, children: n }) {
3908
3922
  });
3909
3923
  }
3910
3924
  // src/hooks/use_is_client/with_client_only.tsx
3911
- var No = (e) => {
3925
+ var Io = (e) => {
3912
3926
  function t(t) {
3913
3927
  return Ne() ? /* @__PURE__ */ g(e, { ...t }) : null;
3914
3928
  }
3915
3929
  return t;
3916
3930
  };
3917
- export { I as Avatar, fe as BASE_INPUT_STYLES, R as Badge, te as Button, K as Card, le as CharacterCount, Ee as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, ze as Combobox, Xi as ConfirmModal, Qn as ContextMenu, tr as CopyButton, _i as Drawer, ir as Highlight, Er as IconButton, bi as Input, Si as Kbd, Ti as Menu, Ei as MenuGroup, Li as MenuItem, Ri as MenuSeparator, Qi as Modal, $i as ModalFooter, ta as ModalProvider, sa as MultiCombobox, la as RadioOptions, ua as Select, da as Switch, Ja as Tabs, Ya as Textarea, mo as ThemeToggle, Ao as Toolbar, Sr as Tooltip, Mo as UIProvider, nr as splitIntoHighlightSegments, pi as useDisableHotkeysWhileMounted, ea as useDismissGuard, di as useGlobalHotkeysStore, Ne as useIsClient, uo as useThemeStore, No as withClientOnly };
3931
+ export { I as Avatar, fe as BASE_INPUT_STYLES, R as Badge, te as Button, K as Card, le as CharacterCount, Ee as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, ze as Combobox, $i as ConfirmModal, Qn as ContextMenu, tr as CopyButton, _i as Drawer, ir as Highlight, Er as IconButton, bi as Input, Si as Kbd, Ti as Menu, Ei as MenuGroup, Bi as MenuItem, Vi as MenuSeparator, ta as Modal, na as ModalFooter, ia as ModalProvider, ua as MultiCombobox, fa as RadioOptions, pa as Select, ma as Switch, Za as Tabs, Qa as Textarea, _o as ThemeToggle, No as Toolbar, Sr as Tooltip, Fo as UIProvider, nr as splitIntoHighlightSegments, pi as useDisableHotkeysWhileMounted, ra as useDismissGuard, di as useGlobalHotkeysStore, Ne as useIsClient, mo as useThemeStore, Io as withClientOnly };