@softistx/material 3.249.0 → 3.250.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,26 @@
1
- import { _ as e, b as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, o as l, p as u, s as d, u as f, v as p } from "./use-shape-morph-D1MOoQ4T.js";
2
- import { B as m, C as h, D as g, E as _, F as v, H as y, I as b, L as x, M as S, N as ee, O as te, P as C, R as ne, S as w, T as re, U as T, V as ie, W as E, _ as D, a as ae, b as O, c as oe, d as se, f as ce, g as k, h as A, i as j, j as le, k as ue, m as M, n as de, o as fe, p as pe, r as me, v as he, w as ge, x as _e, y as ve, z as ye } from "./useLatest-RGIW0nya.js";
3
- import { n as N, t as be } from "./is-production-Cx8oURag.js";
1
+ import { _ as e, b as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, o as l, p as u, r as d, s as f, u as p, v as m } from "./use-shape-morph-D1MOoQ4T.js";
2
+ import { B as h, C as g, D as ee, E as _, F as v, H as y, I as te, L as b, M as ne, N as re, O as x, P as S, R as C, S as w, T, U as E, V as D, W as O, _ as ie, a as ae, b as oe, c as k, d as se, f as ce, g as A, h as j, i as le, j as ue, k as de, l as fe, m as M, n as pe, o as me, p as he, s as ge, u as _e, v as ve, w as ye, x as be, y as xe, z as Se } from "./useLatest-CbcU5ozz.js";
3
+ import { t as Ce } from "./switch-control-BrwJRN_V.js";
4
+ import { n as N, t as we } from "./is-production-Cx8oURag.js";
4
5
  import * as P from "react";
5
- import { Children as xe, Fragment as Se, cloneElement as Ce, createContext as F, isValidElement as we, use as Te, useCallback as I, useContext as L, useEffect as R, useLayoutEffect as Ee, useMemo as De, useRef as z, useState as Oe, useSyncExternalStore as B } from "react";
6
- import { Fragment as ke, jsx as V, jsxs as H } from "react/jsx-runtime";
7
- import { forwardEscape as Ae, keepListEscape as je } from "@softistx/material-core/escape-forward";
8
- import { X as Me } from "lucide-react";
9
- import { THEME_PRESETS as Ne } from "@softistx/material-core/theme/presets";
10
- import { DEFAULT_THEME_NAME as Pe, THEME_NAME_PATTERN as Fe, applyThemeColorMeta as Ie } from "@softistx/material-core/theme/boot";
6
+ import { Children as Te, Fragment as Ee, cloneElement as De, createContext as F, isValidElement as Oe, use as ke, useCallback as Ae, useContext as I, useEffect as L, useId as je, useLayoutEffect as Me, useMemo as Ne, useRef as R, useState as Pe, useSyncExternalStore as z } from "react";
7
+ import { Fragment as Fe, jsx as B, jsxs as V } from "react/jsx-runtime";
8
+ import { forwardEscape as Ie, keepListEscape as Le } from "@softistx/material-core/escape-forward";
9
+ import { X as Re } from "lucide-react";
10
+ import { THEME_PRESETS as ze } from "@softistx/material-core/theme/presets";
11
+ import { DEFAULT_THEME_NAME as Be, THEME_NAME_PATTERN as Ve, applyThemeColorMeta as He } from "@softistx/material-core/theme/boot";
11
12
  //#region ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
12
- var Le = Object.defineProperty, U = (e, t) => Le(e, "name", {
13
+ var Ue = Object.defineProperty, H = (e, t) => Ue(e, "name", {
13
14
  value: t,
14
15
  configurable: !0
15
- }), Re = "Dialog", [ze, Be] = u(Re), [Ve, W] = ze(Re), He = /* @__PURE__ */ U((e) => {
16
- let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = P.useRef(null), c = P.useRef(null), [l, u] = f({
16
+ }), We = "Dialog", [Ge, Ke] = u(We), [qe, U] = Ge(We), Je = /* @__PURE__ */ H((e) => {
17
+ let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = P.useRef(null), c = P.useRef(null), [l, u] = p({
17
18
  prop: r,
18
19
  defaultProp: i ?? !1,
19
20
  onChange: a,
20
- caller: Re
21
- }), [d, p] = P.useState(0), [m, h] = P.useState(0);
22
- return /* @__PURE__ */ V(Ve, {
21
+ caller: We
22
+ }), [d, f] = P.useState(0), [m, h] = P.useState(0);
23
+ return /* @__PURE__ */ B(qe, {
23
24
  scope: t,
24
25
  triggerRef: s,
25
26
  contentRef: c,
@@ -28,7 +29,7 @@ var Le = Object.defineProperty, U = (e, t) => Le(e, "name", {
28
29
  descriptionId: y(),
29
30
  titlePresent: d > 0,
30
31
  descriptionPresent: m > 0,
31
- setTitleCount: p,
32
+ setTitleCount: f,
32
33
  setDescriptionCount: h,
33
34
  open: l,
34
35
  onOpenChange: u,
@@ -36,49 +37,49 @@ var Le = Object.defineProperty, U = (e, t) => Le(e, "name", {
36
37
  modal: o,
37
38
  children: n
38
39
  });
39
- }, "Dialog"), Ue = "DialogTrigger", We = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, n) {
40
- let { __scopeDialog: i, ...a } = e, o = W(Ue, i), s = t(n, o.triggerRef);
41
- return /* @__PURE__ */ V(c.button, {
40
+ }, "Dialog"), Ye = "DialogTrigger", Xe = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, n) {
41
+ let { __scopeDialog: i, ...a } = e, o = U(Ye, i), s = t(n, o.triggerRef);
42
+ return /* @__PURE__ */ B(c.button, {
42
43
  type: "button",
43
44
  "aria-haspopup": "dialog",
44
45
  "aria-expanded": o.open,
45
46
  "aria-controls": o.open ? o.contentId : void 0,
46
- "data-state": lt(o.open),
47
+ "data-state": G(o.open),
47
48
  ...a,
48
49
  ref: s,
49
50
  onClick: r(e.onClick, o.onOpenToggle)
50
51
  });
51
- }, "DialogTrigger")), Ge = "DialogPortal", [Ke, qe] = ze(Ge, { forceMount: void 0 }), Je = /* @__PURE__ */ U((e) => {
52
- let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = W(Ge, t);
53
- return /* @__PURE__ */ V(Ke, {
52
+ }, "DialogTrigger")), Ze = "DialogPortal", [Qe, $e] = Ge(Ze, { forceMount: void 0 }), et = /* @__PURE__ */ H((e) => {
53
+ let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = U(Ze, t);
54
+ return /* @__PURE__ */ B(Qe, {
54
55
  scope: t,
55
56
  forceMount: n,
56
- children: P.Children.map(r, (e) => /* @__PURE__ */ V(T, {
57
+ children: P.Children.map(r, (e) => /* @__PURE__ */ B(E, {
57
58
  present: n || a.open,
58
- children: /* @__PURE__ */ V(x, {
59
+ children: /* @__PURE__ */ B(b, {
59
60
  asChild: !0,
60
61
  container: i,
61
62
  children: e
62
63
  })
63
64
  }))
64
65
  });
65
- }, "DialogPortal"), Ye = "DialogOverlay", Xe = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
66
- let n = qe(Ye, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = W(Ye, e.__scopeDialog);
67
- return a.modal ? /* @__PURE__ */ V(T, {
66
+ }, "DialogPortal"), tt = "DialogOverlay", nt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
67
+ let n = $e(tt, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = U(tt, e.__scopeDialog);
68
+ return a.modal ? /* @__PURE__ */ B(E, {
68
69
  present: r || a.open,
69
- children: /* @__PURE__ */ V(Qe, {
70
+ children: /* @__PURE__ */ B(it, {
70
71
  ...i,
71
72
  ref: t
72
73
  })
73
74
  }) : null;
74
- }, "DialogOverlay")), Ze = p("DialogOverlay.RemoveScroll"), Qe = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, n) {
75
- let { __scopeDialog: r, ...i } = e, a = W(Ye, r), o = t(n, m());
76
- return /* @__PURE__ */ V(v, {
77
- as: Ze,
75
+ }, "DialogOverlay")), rt = m("DialogOverlay.RemoveScroll"), it = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, n) {
76
+ let { __scopeDialog: r, ...i } = e, a = U(tt, r), o = t(n, h());
77
+ return /* @__PURE__ */ B(v, {
78
+ as: rt,
78
79
  allowPinchZoom: !0,
79
80
  shards: [a.contentRef],
80
- children: /* @__PURE__ */ V(c.div, {
81
- "data-state": lt(a.open),
81
+ children: /* @__PURE__ */ B(c.div, {
82
+ "data-state": G(a.open),
82
83
  ...i,
83
84
  ref: o,
84
85
  style: {
@@ -87,24 +88,24 @@ var Le = Object.defineProperty, U = (e, t) => Le(e, "name", {
87
88
  }
88
89
  })
89
90
  });
90
- }, "DialogOverlayImpl")), G = "DialogContent", $e = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
91
- let n = qe(G, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = W(G, e.__scopeDialog);
92
- return /* @__PURE__ */ V(T, {
91
+ }, "DialogOverlayImpl")), W = "DialogContent", at = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
92
+ let n = $e(W, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = U(W, e.__scopeDialog);
93
+ return /* @__PURE__ */ B(E, {
93
94
  present: r || a.open,
94
- children: a.modal ? /* @__PURE__ */ V(et, {
95
+ children: a.modal ? /* @__PURE__ */ B(ot, {
95
96
  ...i,
96
97
  ref: t
97
- }) : /* @__PURE__ */ V(tt, {
98
+ }) : /* @__PURE__ */ B(st, {
98
99
  ...i,
99
100
  ref: t
100
101
  })
101
102
  });
102
- }, "DialogContent")), et = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, n) {
103
- let i = W(G, e.__scopeDialog), a = P.useRef(null), o = t(n, i.contentRef, a);
103
+ }, "DialogContent")), ot = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, n) {
104
+ let i = U(W, e.__scopeDialog), a = P.useRef(null), o = t(n, i.contentRef, a);
104
105
  return P.useEffect(() => {
105
106
  let e = a.current;
106
- if (e) return C(e);
107
- }, []), /* @__PURE__ */ V(nt, {
107
+ if (e) return S(e);
108
+ }, []), /* @__PURE__ */ B(ct, {
108
109
  ...e,
109
110
  ref: o,
110
111
  trapFocus: i.open,
@@ -118,9 +119,9 @@ var Le = Object.defineProperty, U = (e, t) => Le(e, "name", {
118
119
  }),
119
120
  onFocusOutside: r(e.onFocusOutside, (e) => e.preventDefault())
120
121
  });
121
- }, "DialogContentModal")), tt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
122
- let n = W(G, e.__scopeDialog), r = P.useRef(!1), i = P.useRef(!1);
123
- return /* @__PURE__ */ V(nt, {
122
+ }, "DialogContentModal")), st = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
123
+ let n = U(W, e.__scopeDialog), r = P.useRef(!1), i = P.useRef(!1);
124
+ return /* @__PURE__ */ B(ct, {
124
125
  ...e,
125
126
  ref: t,
126
127
  trapFocus: !1,
@@ -134,74 +135,74 @@ var Le = Object.defineProperty, U = (e, t) => Le(e, "name", {
134
135
  n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
135
136
  }
136
137
  });
137
- }, "DialogContentNonModal")), nt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
138
- let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...o } = e, s = W(G, n);
139
- return b(), /* @__PURE__ */ V(ke, { children: /* @__PURE__ */ V(ne, {
138
+ }, "DialogContentNonModal")), ct = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
139
+ let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...o } = e, s = U(W, n);
140
+ return te(), /* @__PURE__ */ B(Fe, { children: /* @__PURE__ */ B(C, {
140
141
  asChild: !0,
141
142
  loop: !0,
142
143
  trapped: r,
143
144
  onMountAutoFocus: i,
144
145
  onUnmountAutoFocus: a,
145
- children: /* @__PURE__ */ V(ye, {
146
+ children: /* @__PURE__ */ B(Se, {
146
147
  role: "dialog",
147
148
  id: s.contentId,
148
149
  "aria-describedby": s.descriptionPresent ? s.descriptionId : void 0,
149
150
  "aria-labelledby": s.titlePresent ? s.titleId : void 0,
150
- "data-state": lt(s.open),
151
+ "data-state": G(s.open),
151
152
  ...o,
152
153
  ref: t,
153
154
  deferPointerDownOutside: !0,
154
155
  onDismiss: () => s.onOpenChange(!1)
155
156
  })
156
157
  }) });
157
- }, "DialogContentImpl")), rt = "DialogTitle", it = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
158
- let { __scopeDialog: r, ...i } = e, a = W(rt, r), { setTitleCount: o } = a;
159
- return n(() => (o((e) => e + 1), () => o((e) => e - 1)), [o]), /* @__PURE__ */ V(c.h2, {
158
+ }, "DialogContentImpl")), lt = "DialogTitle", ut = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
159
+ let { __scopeDialog: r, ...i } = e, a = U(lt, r), { setTitleCount: o } = a;
160
+ return n(() => (o((e) => e + 1), () => o((e) => e - 1)), [o]), /* @__PURE__ */ B(c.h2, {
160
161
  id: a.titleId,
161
162
  ...i,
162
163
  ref: t
163
164
  });
164
- }, "DialogTitle")), at = "DialogDescription", ot = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
165
- let { __scopeDialog: r, ...i } = e, a = W(at, r), { setDescriptionCount: o } = a;
166
- return n(() => (o((e) => e + 1), () => o((e) => e - 1)), [o]), /* @__PURE__ */ V(c.p, {
165
+ }, "DialogTitle")), dt = "DialogDescription", ft = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
166
+ let { __scopeDialog: r, ...i } = e, a = U(dt, r), { setDescriptionCount: o } = a;
167
+ return n(() => (o((e) => e + 1), () => o((e) => e - 1)), [o]), /* @__PURE__ */ B(c.p, {
167
168
  id: a.descriptionId,
168
169
  ...i,
169
170
  ref: t
170
171
  });
171
- }, "DialogDescription")), st = "DialogClose", ct = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ U(function(e, t) {
172
- let { __scopeDialog: n, ...i } = e, a = W(st, n);
173
- return /* @__PURE__ */ V(c.button, {
172
+ }, "DialogDescription")), pt = "DialogClose", mt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ H(function(e, t) {
173
+ let { __scopeDialog: n, ...i } = e, a = U(pt, n);
174
+ return /* @__PURE__ */ B(c.button, {
174
175
  type: "button",
175
176
  ...i,
176
177
  ref: t,
177
178
  onClick: r(e.onClick, () => a.onOpenChange(!1))
178
179
  });
179
180
  }, "DialogClose"));
180
- function lt(e) {
181
+ function G(e) {
181
182
  return e ? "open" : "closed";
182
183
  }
183
- U(lt, "getState");
184
+ H(G, "getState");
184
185
  //#endregion
185
186
  //#region ../../node_modules/@radix-ui/react-menu/dist/index.mjs
186
- var ut = Object.defineProperty, K = (e, t) => ut(e, "name", {
187
+ var ht = Object.defineProperty, K = (e, t) => ht(e, "name", {
187
188
  value: t,
188
189
  configurable: !0
189
- }), dt = ["Enter", " "], ft = [
190
+ }), gt = ["Enter", " "], _t = [
190
191
  "ArrowDown",
191
192
  "PageUp",
192
193
  "Home"
193
- ], pt = [
194
+ ], vt = [
194
195
  "ArrowUp",
195
196
  "PageDown",
196
197
  "End"
197
- ], mt = [...ft, ...pt];
198
- [...dt], [...dt];
199
- var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
200
- vt,
201
- ee,
202
- te
203
- ]), bt = ee(), xt = te(), [St, J] = q(ht), [Ct, wt] = q(ht), Tt = /* @__PURE__ */ K((e) => {
204
- let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, c = bt(t), [l, u] = P.useState(null), d = P.useRef(!1), f = s(a), p = ie(i);
198
+ ], yt = [..._t, ...vt];
199
+ [...gt], [...gt];
200
+ var bt = "Menu", [xt, St, Ct] = O(bt), [q, wt] = u(bt, [
201
+ Ct,
202
+ re,
203
+ x
204
+ ]), Tt = re(), Et = x(), [Dt, J] = q(bt), [Ot, kt] = q(bt), At = /* @__PURE__ */ K((e) => {
205
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, c = Tt(t), [l, u] = P.useState(null), d = P.useRef(!1), f = s(a), p = D(i);
205
206
  return P.useEffect(() => {
206
207
  let e = /* @__PURE__ */ K(() => {
207
208
  d.current = !0, document.addEventListener("pointerdown", t, {
@@ -219,15 +220,15 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
219
220
  if (!n) return;
220
221
  let e = /* @__PURE__ */ K(() => f(!1), "handleBlur");
221
222
  return window.addEventListener("blur", e), () => window.removeEventListener("blur", e);
222
- }, [n, f]), /* @__PURE__ */ V(S, {
223
+ }, [n, f]), /* @__PURE__ */ B(ne, {
223
224
  ...c,
224
- children: /* @__PURE__ */ V(St, {
225
+ children: /* @__PURE__ */ B(Dt, {
225
226
  scope: t,
226
227
  open: n,
227
228
  onOpenChange: f,
228
229
  content: l,
229
230
  onContentChange: u,
230
- children: /* @__PURE__ */ V(Ct, {
231
+ children: /* @__PURE__ */ B(Ot, {
231
232
  scope: t,
232
233
  onClose: P.useCallback(() => f(!1), [f]),
233
234
  isUsingKeyboardRef: d,
@@ -237,51 +238,51 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
237
238
  })
238
239
  })
239
240
  });
240
- }, "Menu"), Et = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
241
+ }, "Menu"), jt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
241
242
  let { __scopeMenu: n, ...r } = e;
242
- return /* @__PURE__ */ V(ue, {
243
- ...bt(n),
243
+ return /* @__PURE__ */ B(de, {
244
+ ...Tt(n),
244
245
  ...r,
245
246
  ref: t
246
247
  });
247
- }, "MenuAnchor")), Dt = "MenuPortal", [Ot, kt] = q(Dt, { forceMount: void 0 }), At = /* @__PURE__ */ K((e) => {
248
- let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = J(Dt, t);
249
- return /* @__PURE__ */ V(Ot, {
248
+ }, "MenuAnchor")), Mt = "MenuPortal", [Nt, Pt] = q(Mt, { forceMount: void 0 }), Ft = /* @__PURE__ */ K((e) => {
249
+ let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, a = J(Mt, t);
250
+ return /* @__PURE__ */ B(Nt, {
250
251
  scope: t,
251
252
  forceMount: n,
252
- children: /* @__PURE__ */ V(T, {
253
+ children: /* @__PURE__ */ B(E, {
253
254
  present: n || a.open,
254
- children: /* @__PURE__ */ V(x, {
255
+ children: /* @__PURE__ */ B(b, {
255
256
  asChild: !0,
256
257
  container: i,
257
258
  children: r
258
259
  })
259
260
  })
260
261
  });
261
- }, "MenuPortal"), Y = "MenuContent", [jt, Mt] = q(Y), Nt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
262
- let n = kt(Y, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = J(Y, e.__scopeMenu), o = wt(Y, e.__scopeMenu);
263
- return /* @__PURE__ */ V(gt.Provider, {
262
+ }, "MenuPortal"), Y = "MenuContent", [It, Lt] = q(Y), Rt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
263
+ let n = Pt(Y, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = J(Y, e.__scopeMenu), o = kt(Y, e.__scopeMenu);
264
+ return /* @__PURE__ */ B(xt.Provider, {
264
265
  scope: e.__scopeMenu,
265
- children: /* @__PURE__ */ V(T, {
266
+ children: /* @__PURE__ */ B(E, {
266
267
  present: r || a.open,
267
- children: /* @__PURE__ */ V(gt.Slot, {
268
+ children: /* @__PURE__ */ B(xt.Slot, {
268
269
  scope: e.__scopeMenu,
269
- children: o.modal ? /* @__PURE__ */ V(Pt, {
270
+ children: o.modal ? /* @__PURE__ */ B(zt, {
270
271
  ...i,
271
272
  ref: t
272
- }) : /* @__PURE__ */ V(Ft, {
273
+ }) : /* @__PURE__ */ B(Bt, {
273
274
  ...i,
274
275
  ref: t
275
276
  })
276
277
  })
277
278
  })
278
279
  });
279
- }, "MenuContent")), Pt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
280
+ }, "MenuContent")), zt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
280
281
  let i = J(Y, e.__scopeMenu), a = P.useRef(null), o = t(n, a);
281
282
  return P.useEffect(() => {
282
283
  let e = a.current;
283
- if (e) return C(e);
284
- }, []), /* @__PURE__ */ V(Lt, {
284
+ if (e) return S(e);
285
+ }, []), /* @__PURE__ */ B(Ht, {
285
286
  ...e,
286
287
  ref: o,
287
288
  trapFocus: i.open,
@@ -290,9 +291,9 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
290
291
  onFocusOutside: r(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
291
292
  onDismiss: () => i.onOpenChange(!1)
292
293
  });
293
- }, "MenuRootContentModal")), Ft = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
294
+ }, "MenuRootContentModal")), Bt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
294
295
  let n = J(Y, e.__scopeMenu);
295
- return /* @__PURE__ */ V(Lt, {
296
+ return /* @__PURE__ */ B(Ht, {
296
297
  ...e,
297
298
  ref: t,
298
299
  trapFocus: !1,
@@ -300,44 +301,44 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
300
301
  disableOutsideScroll: !1,
301
302
  onDismiss: () => n.onOpenChange(!1)
302
303
  });
303
- }, "MenuRootContentNonModal")), It = p("MenuContent.ScrollLock"), Lt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
304
- let { __scopeMenu: i, loop: a = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: h, disableOutsideScroll: _, ...y } = e, x = J(Y, i), S = wt(Y, i), ee = bt(i), te = xt(i), C = _t(i), [w, re] = P.useState(null), T = P.useRef(null), ie = t(n, T, x.onContentChange), E = P.useRef(0), D = P.useRef(""), ae = P.useRef(0), O = P.useRef(null), oe = P.useRef("right"), se = P.useRef(0), ce = _ ? v : P.Fragment, k = _ ? {
305
- as: It,
304
+ }, "MenuRootContentNonModal")), Vt = m("MenuContent.ScrollLock"), Ht = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
305
+ let { __scopeMenu: i, loop: a = !1, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: c, disableOutsidePointerEvents: l, onEntryFocus: u, onEscapeKeyDown: d, onPointerDownOutside: f, onFocusOutside: p, onInteractOutside: m, onDismiss: h, disableOutsideScroll: g, ..._ } = e, y = J(Y, i), b = kt(Y, i), ne = Tt(i), re = Et(i), x = St(i), [S, w] = P.useState(null), T = P.useRef(null), E = t(n, T, y.onContentChange), D = P.useRef(0), O = P.useRef(""), ie = P.useRef(0), ae = P.useRef(null), oe = P.useRef("right"), k = P.useRef(0), se = g ? v : P.Fragment, ce = g ? {
306
+ as: Vt,
306
307
  allowPinchZoom: !0
307
308
  } : void 0, A = /* @__PURE__ */ K((e) => {
308
- let t = D.current + e, n = C().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = cn(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
309
+ let t = O.current + e, n = x().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = pn(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
309
310
  (/* @__PURE__ */ K((function e(t) {
310
- D.current = t, window.clearTimeout(E.current), t !== "" && (E.current = window.setTimeout(() => e(""), 1e3));
311
+ O.current = t, window.clearTimeout(D.current), t !== "" && (D.current = window.setTimeout(() => e(""), 1e3));
311
312
  }), "updateSearch"))(t), o && setTimeout(() => o.focus());
312
313
  }, "handleTypeaheadSearch");
313
- P.useEffect(() => () => window.clearTimeout(E.current), []), b();
314
- let j = P.useCallback((e) => oe.current === O.current?.side && un(e, O.current?.area), []);
315
- return /* @__PURE__ */ V(jt, {
314
+ P.useEffect(() => () => window.clearTimeout(D.current), []), te();
315
+ let j = P.useCallback((e) => oe.current === ae.current?.side && hn(e, ae.current?.area), []);
316
+ return /* @__PURE__ */ B(It, {
316
317
  scope: i,
317
- searchRef: D,
318
+ searchRef: O,
318
319
  onItemEnter: P.useCallback((e) => {
319
320
  j(e) && e.preventDefault();
320
321
  }, [j]),
321
322
  onItemLeave: P.useCallback((e) => {
322
- j(e) || (T.current?.focus(), re(null));
323
+ j(e) || (T.current?.focus(), w(null));
323
324
  }, [j]),
324
325
  onTriggerLeave: P.useCallback((e) => {
325
326
  j(e) && e.preventDefault();
326
327
  }, [j]),
327
- pointerGraceTimerRef: ae,
328
+ pointerGraceTimerRef: ie,
328
329
  onPointerGraceIntentChange: P.useCallback((e) => {
329
- O.current = e;
330
+ ae.current = e;
330
331
  }, []),
331
- children: /* @__PURE__ */ V(ce, {
332
- ...k,
333
- children: /* @__PURE__ */ V(ne, {
332
+ children: /* @__PURE__ */ B(se, {
333
+ ...ce,
334
+ children: /* @__PURE__ */ B(C, {
334
335
  asChild: !0,
335
336
  trapped: o,
336
337
  onMountAutoFocus: r(s, (e) => {
337
338
  e.preventDefault(), T.current?.focus({ preventScroll: !0 });
338
339
  }),
339
340
  onUnmountAutoFocus: c,
340
- children: /* @__PURE__ */ V(ye, {
341
+ children: /* @__PURE__ */ B(Se, {
341
342
  asChild: !0,
342
343
  disableOutsidePointerEvents: l,
343
344
  onEscapeKeyDown: d,
@@ -345,48 +346,48 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
345
346
  onFocusOutside: p,
346
347
  onInteractOutside: m,
347
348
  onDismiss: h,
348
- children: /* @__PURE__ */ V(g, {
349
+ children: /* @__PURE__ */ B(ee, {
349
350
  asChild: !0,
350
- ...te,
351
- dir: S.dir,
351
+ ...re,
352
+ dir: b.dir,
352
353
  orientation: "vertical",
353
354
  loop: a,
354
- currentTabStopId: w,
355
- onCurrentTabStopIdChange: re,
355
+ currentTabStopId: S,
356
+ onCurrentTabStopIdChange: w,
356
357
  onEntryFocus: r(u, (e) => {
357
- S.isUsingKeyboardRef.current || e.preventDefault();
358
+ b.isUsingKeyboardRef.current || e.preventDefault();
358
359
  }),
359
360
  preventScrollOnEntryFocus: !0,
360
- children: /* @__PURE__ */ V(le, {
361
+ children: /* @__PURE__ */ B(ue, {
361
362
  role: "menu",
362
363
  "aria-orientation": "vertical",
363
- "data-state": nn(x.open),
364
+ "data-state": cn(y.open),
364
365
  "data-radix-menu-content": "",
365
- dir: S.dir,
366
- ...ee,
367
- ...y,
368
- ref: ie,
366
+ dir: b.dir,
367
+ ...ne,
368
+ ..._,
369
+ ref: E,
369
370
  style: {
370
371
  outline: "none",
371
- ...y.style
372
+ ..._.style
372
373
  },
373
- onKeyDown: r(y.onKeyDown, (e) => {
374
+ onKeyDown: r(_.onKeyDown, (e) => {
374
375
  let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
375
376
  t && (e.key === "Tab" && e.preventDefault(), !n && r && A(e.key));
376
377
  let i = T.current;
377
- if (e.target !== i || !mt.includes(e.key)) return;
378
+ if (e.target !== i || !yt.includes(e.key)) return;
378
379
  e.preventDefault();
379
- let a = C().filter((e) => !e.disabled).map((e) => e.ref.current);
380
- pt.includes(e.key) && a.reverse(), on(a);
380
+ let a = x().filter((e) => !e.disabled).map((e) => e.ref.current);
381
+ vt.includes(e.key) && a.reverse(), dn(a);
381
382
  }),
382
383
  onBlur: r(e.onBlur, (e) => {
383
- e.currentTarget.contains(e.target) || (window.clearTimeout(E.current), D.current = "");
384
+ e.currentTarget.contains(e.target) || (window.clearTimeout(D.current), O.current = "");
384
385
  }),
385
- onPointerMove: r(e.onPointerMove, dn((e) => {
386
- let t = e.target, n = se.current !== e.clientX;
386
+ onPointerMove: r(e.onPointerMove, gn((e) => {
387
+ let t = e.target, n = k.current !== e.clientX;
387
388
  if (e.currentTarget.contains(t) && n) {
388
- let t = e.clientX > se.current ? "right" : "left";
389
- oe.current = t, se.current = e.clientX;
389
+ let t = e.clientX > k.current ? "right" : "left";
390
+ oe.current = t, k.current = e.clientX;
390
391
  }
391
392
  }))
392
393
  })
@@ -395,31 +396,31 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
395
396
  })
396
397
  })
397
398
  });
398
- }, "MenuContentImpl")), Rt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
399
+ }, "MenuContentImpl")), Ut = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
399
400
  let { __scopeMenu: n, ...r } = e;
400
- return /* @__PURE__ */ V(c.div, {
401
+ return /* @__PURE__ */ B(c.div, {
401
402
  role: "group",
402
403
  ...r,
403
404
  ref: t
404
405
  });
405
- }, "MenuGroup")), zt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
406
+ }, "MenuGroup")), Wt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
406
407
  let { __scopeMenu: n, ...r } = e;
407
- return /* @__PURE__ */ V(c.div, {
408
+ return /* @__PURE__ */ B(c.div, {
408
409
  ...r,
409
410
  ref: t
410
411
  });
411
- }, "MenuLabel")), Bt = "MenuItem", Vt = "menu.itemSelect", Ht = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
412
- let { disabled: i = !1, onSelect: o, ...s } = e, c = P.useRef(null), l = wt(Bt, e.__scopeMenu), u = Mt(Bt, e.__scopeMenu), d = t(n, c), f = P.useRef(!1), p = /* @__PURE__ */ K(() => {
412
+ }, "MenuLabel")), Gt = "MenuItem", Kt = "menu.itemSelect", qt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
413
+ let { disabled: i = !1, onSelect: o, ...s } = e, c = P.useRef(null), l = kt(Gt, e.__scopeMenu), u = Lt(Gt, e.__scopeMenu), d = t(n, c), f = P.useRef(!1), p = /* @__PURE__ */ K(() => {
413
414
  let e = c.current;
414
415
  if (!i && e) {
415
- let t = new CustomEvent(Vt, {
416
+ let t = new CustomEvent(Kt, {
416
417
  bubbles: !0,
417
418
  cancelable: !0
418
419
  });
419
- e.addEventListener(Vt, (e) => o?.(e), { once: !0 }), a(e, t), t.defaultPrevented ? f.current = !1 : l.onClose();
420
+ e.addEventListener(Kt, (e) => o?.(e), { once: !0 }), a(e, t), t.defaultPrevented ? f.current = !1 : l.onClose();
420
421
  }
421
422
  }, "handleSelect");
422
- return /* @__PURE__ */ V(Ut, {
423
+ return /* @__PURE__ */ B(Jt, {
423
424
  ...s,
424
425
  ref: d,
425
426
  disabled: i,
@@ -431,114 +432,114 @@ var ht = "Menu", [gt, _t, vt] = E(ht), [q, yt] = u(ht, [
431
432
  f.current || e.currentTarget?.click();
432
433
  }),
433
434
  onKeyDown: r(e.onKeyDown, (e) => {
434
- i || e.target !== e.currentTarget || u.searchRef.current !== "" && e.key === " " || dt.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
435
+ i || e.target !== e.currentTarget || u.searchRef.current !== "" && e.key === " " || gt.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
435
436
  })
436
437
  });
437
- }, "MenuItem")), Ut = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
438
- let { __scopeMenu: i, disabled: a = !1, textValue: o, ...s } = e, l = Mt(Bt, i), u = xt(i), d = P.useRef(null), f = t(n, d), [p, m] = P.useState(!1), [h, g] = P.useState("");
438
+ }, "MenuItem")), Jt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, n) {
439
+ let { __scopeMenu: i, disabled: a = !1, textValue: o, ...s } = e, l = Lt(Gt, i), u = Et(i), d = P.useRef(null), f = t(n, d), [p, m] = P.useState(!1), [h, g] = P.useState("");
439
440
  return P.useEffect(() => {
440
441
  let e = d.current;
441
442
  e && g((e.textContent ?? "").trim());
442
- }, [s.children]), /* @__PURE__ */ V(gt.ItemSlot, {
443
+ }, [s.children]), /* @__PURE__ */ B(xt.ItemSlot, {
443
444
  scope: i,
444
445
  disabled: a,
445
446
  textValue: o ?? h,
446
- children: /* @__PURE__ */ V(_, {
447
+ children: /* @__PURE__ */ B(_, {
447
448
  asChild: !0,
448
449
  ...u,
449
450
  focusable: !a,
450
- children: /* @__PURE__ */ V(c.div, {
451
+ children: /* @__PURE__ */ B(c.div, {
451
452
  role: "menuitem",
452
453
  "data-highlighted": p ? "" : void 0,
453
454
  "aria-disabled": a || void 0,
454
455
  "data-disabled": a ? "" : void 0,
455
456
  ...s,
456
457
  ref: f,
457
- onPointerMove: r(e.onPointerMove, dn((e) => {
458
+ onPointerMove: r(e.onPointerMove, gn((e) => {
458
459
  a ? l.onItemLeave(e) : (l.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
459
460
  })),
460
- onPointerLeave: r(e.onPointerLeave, dn((e) => l.onItemLeave(e))),
461
+ onPointerLeave: r(e.onPointerLeave, gn((e) => l.onItemLeave(e))),
461
462
  onFocus: r(e.onFocus, () => m(!0)),
462
463
  onBlur: r(e.onBlur, () => m(!1))
463
464
  })
464
465
  })
465
466
  });
466
- }, "MenuItemImpl")), [Wt, Gt] = q("MenuRadioGroup", {
467
+ }, "MenuItemImpl")), [Yt, Xt] = q("MenuRadioGroup", {
467
468
  value: void 0,
468
469
  onValueChange: /* @__PURE__ */ K(() => {}, "onValueChange")
469
- }), Kt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
470
+ }), Zt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
470
471
  let { value: n, onValueChange: r, ...i } = e, a = s(r);
471
- return /* @__PURE__ */ V(Wt, {
472
+ return /* @__PURE__ */ B(Yt, {
472
473
  scope: e.__scopeMenu,
473
474
  value: n,
474
475
  onValueChange: a,
475
- children: /* @__PURE__ */ V(Rt, {
476
+ children: /* @__PURE__ */ B(Ut, {
476
477
  ...i,
477
478
  ref: t
478
479
  })
479
480
  });
480
- }, "MenuRadioGroup")), qt = "MenuRadioItem", Jt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
481
- let { value: n, ...i } = e, a = Gt(qt, e.__scopeMenu), o = n === a.value;
482
- return /* @__PURE__ */ V(Xt, {
481
+ }, "MenuRadioGroup")), Qt = "MenuRadioItem", $t = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
482
+ let { value: n, ...i } = e, a = Xt(Qt, e.__scopeMenu), o = n === a.value;
483
+ return /* @__PURE__ */ B(tn, {
483
484
  scope: e.__scopeMenu,
484
485
  checked: o,
485
- children: /* @__PURE__ */ V(Ht, {
486
+ children: /* @__PURE__ */ B(qt, {
486
487
  role: "menuitemradio",
487
488
  "aria-checked": o,
488
489
  ...i,
489
490
  ref: t,
490
- "data-state": an(o),
491
+ "data-state": un(o),
491
492
  onSelect: r(i.onSelect, () => a.onValueChange?.(n), { checkForDefaultPrevented: !1 })
492
493
  })
493
494
  });
494
- }, "MenuRadioItem")), Yt = "MenuItemIndicator", [Xt, Zt] = q(Yt, { checked: !1 }), Qt = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
495
- let { __scopeMenu: n, forceMount: r, ...i } = e, a = Zt(Yt, n);
496
- return /* @__PURE__ */ V(T, {
497
- present: r || rn(a.checked) || a.checked === !0,
498
- children: /* @__PURE__ */ V(c.span, {
495
+ }, "MenuRadioItem")), en = "MenuItemIndicator", [tn, nn] = q(en, { checked: !1 }), rn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
496
+ let { __scopeMenu: n, forceMount: r, ...i } = e, a = nn(en, n);
497
+ return /* @__PURE__ */ B(E, {
498
+ present: r || ln(a.checked) || a.checked === !0,
499
+ children: /* @__PURE__ */ B(c.span, {
499
500
  ...i,
500
501
  ref: t,
501
- "data-state": an(a.checked)
502
+ "data-state": un(a.checked)
502
503
  })
503
504
  });
504
- }, "MenuItemIndicator")), $t = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
505
+ }, "MenuItemIndicator")), an = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ K(function(e, t) {
505
506
  let { __scopeMenu: n, ...r } = e;
506
- return /* @__PURE__ */ V(c.div, {
507
+ return /* @__PURE__ */ B(c.div, {
507
508
  role: "separator",
508
509
  "aria-orientation": "horizontal",
509
510
  ...r,
510
511
  ref: t
511
512
  });
512
- }, "MenuSeparator")), [en, tn] = q("MenuSub");
513
- function nn(e) {
513
+ }, "MenuSeparator")), [on, sn] = q("MenuSub");
514
+ function cn(e) {
514
515
  return e ? "open" : "closed";
515
516
  }
516
- K(nn, "getOpenState");
517
- function rn(e) {
517
+ K(cn, "getOpenState");
518
+ function ln(e) {
518
519
  return e === "indeterminate";
519
520
  }
520
- K(rn, "isIndeterminate");
521
- function an(e) {
522
- return rn(e) ? "indeterminate" : e ? "checked" : "unchecked";
521
+ K(ln, "isIndeterminate");
522
+ function un(e) {
523
+ return ln(e) ? "indeterminate" : e ? "checked" : "unchecked";
523
524
  }
524
- K(an, "getCheckedState");
525
- function on(e) {
525
+ K(un, "getCheckedState");
526
+ function dn(e) {
526
527
  let t = document.activeElement;
527
528
  for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
528
529
  }
529
- K(on, "focusFirst");
530
- function sn(e, t) {
530
+ K(dn, "focusFirst");
531
+ function fn(e, t) {
531
532
  return e.map((n, r) => e[(t + r) % e.length]);
532
533
  }
533
- K(sn, "wrapArray");
534
- function cn(e, t, n) {
535
- let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = sn(e, Math.max(i, 0));
534
+ K(fn, "wrapArray");
535
+ function pn(e, t, n) {
536
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = fn(e, Math.max(i, 0));
536
537
  r.length === 1 && (a = a.filter((e) => e !== n));
537
538
  let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
538
539
  return o === n ? void 0 : o;
539
540
  }
540
- K(cn, "getNextMatch");
541
- function ln(e, t) {
541
+ K(pn, "getNextMatch");
542
+ function mn(e, t) {
542
543
  let { x: n, y: r } = e, i = !1;
543
544
  for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
544
545
  let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
@@ -546,29 +547,29 @@ function ln(e, t) {
546
547
  }
547
548
  return i;
548
549
  }
549
- K(ln, "isPointInPolygon");
550
- function un(e, t) {
551
- return t ? ln({
550
+ K(mn, "isPointInPolygon");
551
+ function hn(e, t) {
552
+ return t ? mn({
552
553
  x: e.clientX,
553
554
  y: e.clientY
554
555
  }, t) : !1;
555
556
  }
556
- K(un, "isPointerInGraceArea");
557
- function dn(e) {
557
+ K(hn, "isPointerInGraceArea");
558
+ function gn(e) {
558
559
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
559
560
  }
560
- K(dn, "whenMouse");
561
- var fn = Tt, pn = Et, mn = At, hn = Nt, gn = zt, _n = Ht, vn = Kt, yn = Jt, bn = Qt, xn = $t, Sn = Object.defineProperty, X = (e, t) => Sn(e, "name", {
561
+ K(gn, "whenMouse");
562
+ var _n = At, vn = jt, yn = Ft, bn = Rt, xn = Wt, Sn = qt, Cn = Zt, wn = $t, Tn = rn, En = an, Dn = Object.defineProperty, X = (e, t) => Dn(e, "name", {
562
563
  value: t,
563
564
  configurable: !0
564
- }), Cn = "DropdownMenu", [wn, Tn] = u(Cn, [yt]), Z = yt(), [En, Dn] = wn(Cn), On = /* @__PURE__ */ X((e) => {
565
- let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = Z(t), l = P.useRef(null), [u, d] = f({
565
+ }), On = "DropdownMenu", [kn, An] = u(On, [wt]), Z = wt(), [jn, Mn] = kn(On), Nn = /* @__PURE__ */ X((e) => {
566
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = Z(t), l = P.useRef(null), [u, d] = p({
566
567
  prop: i,
567
568
  defaultProp: a ?? !1,
568
569
  onChange: o,
569
- caller: Cn
570
+ caller: On
570
571
  });
571
- return /* @__PURE__ */ V(En, {
572
+ return /* @__PURE__ */ B(jn, {
572
573
  scope: t,
573
574
  triggerId: y(),
574
575
  triggerRef: l,
@@ -577,7 +578,7 @@ var fn = Tt, pn = Et, mn = At, hn = Nt, gn = zt, _n = Ht, vn = Kt, yn = Jt, bn =
577
578
  onOpenChange: d,
578
579
  onOpenToggle: P.useCallback(() => d((e) => !e), [d]),
579
580
  modal: s,
580
- children: /* @__PURE__ */ V(fn, {
581
+ children: /* @__PURE__ */ B(_n, {
581
582
  ...c,
582
583
  open: u,
583
584
  onOpenChange: d,
@@ -586,12 +587,12 @@ var fn = Tt, pn = Et, mn = At, hn = Nt, gn = zt, _n = Ht, vn = Kt, yn = Jt, bn =
586
587
  children: n
587
588
  })
588
589
  });
589
- }, "DropdownMenu"), kn = "DropdownMenuTrigger", An = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, n) {
590
- let { __scopeDropdownMenu: i, disabled: a = !1, ...o } = e, s = Dn(kn, i), l = Z(i), u = t(n, s.triggerRef);
591
- return /* @__PURE__ */ V(pn, {
590
+ }, "DropdownMenu"), Pn = "DropdownMenuTrigger", Fn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, n) {
591
+ let { __scopeDropdownMenu: i, disabled: a = !1, ...o } = e, s = Mn(Pn, i), l = Z(i), u = t(n, s.triggerRef);
592
+ return /* @__PURE__ */ B(vn, {
592
593
  asChild: !0,
593
594
  ...l,
594
- children: /* @__PURE__ */ V(c.button, {
595
+ children: /* @__PURE__ */ B(c.button, {
595
596
  type: "button",
596
597
  id: s.triggerId,
597
598
  "aria-haspopup": "menu",
@@ -614,15 +615,15 @@ var fn = Tt, pn = Et, mn = At, hn = Nt, gn = zt, _n = Ht, vn = Kt, yn = Jt, bn =
614
615
  })
615
616
  })
616
617
  });
617
- }, "DropdownMenuTrigger")), jn = /* @__PURE__ */ X((e) => {
618
+ }, "DropdownMenuTrigger")), In = /* @__PURE__ */ X((e) => {
618
619
  let { __scopeDropdownMenu: t, ...n } = e;
619
- return /* @__PURE__ */ V(mn, {
620
+ return /* @__PURE__ */ B(yn, {
620
621
  ...Z(t),
621
622
  ...n
622
623
  });
623
- }, "DropdownMenuPortal"), Mn = "DropdownMenuContent", Nn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
624
- let { __scopeDropdownMenu: n, ...i } = e, a = Dn(Mn, n), o = Z(n), s = P.useRef(!1);
625
- return /* @__PURE__ */ V(hn, {
624
+ }, "DropdownMenuPortal"), Ln = "DropdownMenuContent", Rn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
625
+ let { __scopeDropdownMenu: n, ...i } = e, a = Mn(Ln, n), o = Z(n), s = P.useRef(!1);
626
+ return /* @__PURE__ */ B(bn, {
626
627
  id: a.contentId,
627
628
  "aria-labelledby": a.triggerId,
628
629
  ...o,
@@ -644,59 +645,59 @@ var fn = Tt, pn = Et, mn = At, hn = Nt, gn = zt, _n = Ht, vn = Kt, yn = Jt, bn =
644
645
  "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
645
646
  }
646
647
  });
647
- }, "DropdownMenuContent")), Pn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
648
+ }, "DropdownMenuContent")), zn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
648
649
  let { __scopeDropdownMenu: n, ...r } = e;
649
- return /* @__PURE__ */ V(gn, {
650
+ return /* @__PURE__ */ B(xn, {
650
651
  ...Z(n),
651
652
  ...r,
652
653
  ref: t
653
654
  });
654
- }, "DropdownMenuLabel")), Fn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
655
+ }, "DropdownMenuLabel")), Bn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
655
656
  let { __scopeDropdownMenu: n, ...r } = e;
656
- return /* @__PURE__ */ V(_n, {
657
+ return /* @__PURE__ */ B(Sn, {
657
658
  ...Z(n),
658
659
  ...r,
659
660
  ref: t
660
661
  });
661
- }, "DropdownMenuItem")), In = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
662
+ }, "DropdownMenuItem")), Vn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
662
663
  let { __scopeDropdownMenu: n, ...r } = e;
663
- return /* @__PURE__ */ V(vn, {
664
+ return /* @__PURE__ */ B(Cn, {
664
665
  ...Z(n),
665
666
  ...r,
666
667
  ref: t
667
668
  });
668
- }, "DropdownMenuRadioGroup")), Ln = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
669
+ }, "DropdownMenuRadioGroup")), Hn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
669
670
  let { __scopeDropdownMenu: n, ...r } = e;
670
- return /* @__PURE__ */ V(yn, {
671
+ return /* @__PURE__ */ B(wn, {
671
672
  ...Z(n),
672
673
  ...r,
673
674
  ref: t
674
675
  });
675
- }, "DropdownMenuRadioItem")), Rn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
676
+ }, "DropdownMenuRadioItem")), Un = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
676
677
  let { __scopeDropdownMenu: n, ...r } = e;
677
- return /* @__PURE__ */ V(bn, {
678
+ return /* @__PURE__ */ B(Tn, {
678
679
  ...Z(n),
679
680
  ...r,
680
681
  ref: t
681
682
  });
682
- }, "DropdownMenuItemIndicator")), zn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
683
+ }, "DropdownMenuItemIndicator")), Wn = /* @__PURE__ */ P.forwardRef(/* @__PURE__ */ X(function(e, t) {
683
684
  let { __scopeDropdownMenu: n, ...r } = e;
684
- return /* @__PURE__ */ V(xn, {
685
+ return /* @__PURE__ */ B(En, {
685
686
  ...Z(n),
686
687
  ...r,
687
688
  ref: t
688
689
  });
689
- }, "DropdownMenuSeparator")), Bn = On, Vn = An, Hn = jn, Un = Nn, Wn = Pn, Gn = Fn, Kn = In, qn = Ln, Jn = Rn, Yn = zn, Xn = Object.defineProperty, Zn = (e, t) => Xn(e, "name", {
690
+ }, "DropdownMenuSeparator")), Gn = Nn, Kn = Fn, qn = In, Jn = Rn, Yn = zn, Xn = Bn, Zn = Vn, Qn = Hn, $n = Un, er = Wn, tr = Object.defineProperty, nr = (e, t) => tr(e, "name", {
690
691
  value: t,
691
692
  configurable: !0
692
693
  });
693
- function Qn(e, [t, n]) {
694
+ function rr(e, [t, n]) {
694
695
  return Math.min(n, Math.max(t, e));
695
696
  }
696
- Zn(Qn, "clamp");
697
+ nr(rr, "clamp");
697
698
  //#endregion
698
699
  //#region lib/components/ui/actions/button/button.compound-variants.ts
699
- var $n = [
700
+ var ir = [
700
701
  {
701
702
  variant: "filled",
702
703
  color: "primary",
@@ -735,144 +736,144 @@ var $n = [
735
736
  {
736
737
  variant: "tonal",
737
738
  color: "primary",
738
- class: `${A.primary} ${M.primary} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${k.primary}`
739
+ class: `${j.primary} ${M.primary} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${A.primary}`
739
740
  },
740
741
  {
741
742
  variant: "tonal",
742
743
  color: "secondary",
743
- class: `${A.secondary} ${M.secondary} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${k.secondary}`
744
+ class: `${j.secondary} ${M.secondary} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${A.secondary}`
744
745
  },
745
746
  {
746
747
  variant: "tonal",
747
748
  color: "info",
748
- class: `${A.info} ${M.info} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${k.info}`
749
+ class: `${j.info} ${M.info} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${A.info}`
749
750
  },
750
751
  {
751
752
  variant: "tonal",
752
753
  color: "success",
753
- class: `${A.success} ${M.success} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${k.success}`
754
+ class: `${j.success} ${M.success} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${A.success}`
754
755
  },
755
756
  {
756
757
  variant: "tonal",
757
758
  color: "warning",
758
- class: `${A.warning} ${M.warning} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${k.warning}`
759
+ class: `${j.warning} ${M.warning} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${A.warning}`
759
760
  },
760
761
  {
761
762
  variant: "tonal",
762
763
  color: "error",
763
- class: `${A.error} ${M.error} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${k.error}`
764
+ class: `${j.error} ${M.error} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover) ${A.error}`
764
765
  },
765
766
  {
766
767
  variant: "tonal",
767
768
  color: "default",
768
- class: `${A.default} ${M.default} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
769
+ class: `${j.default} ${M.default} bg-(--br-fill) hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
769
770
  },
770
771
  {
771
772
  variant: "ghost",
772
773
  color: "primary",
773
- class: `${A.primary} ${M.primary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
774
+ class: `${j.primary} ${M.primary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
774
775
  },
775
776
  {
776
777
  variant: "ghost",
777
778
  color: "default",
778
- class: `${A.default} ${M.default} hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`
779
+ class: `${j.default} ${M.default} hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`
779
780
  },
780
781
  {
781
782
  variant: "ghost",
782
783
  color: "secondary",
783
- class: `${A.secondary} ${M.secondary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
784
+ class: `${j.secondary} ${M.secondary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
784
785
  },
785
786
  {
786
787
  variant: "ghost",
787
788
  color: "success",
788
- class: `${A.success} ${M.success} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
789
+ class: `${j.success} ${M.success} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
789
790
  },
790
791
  {
791
792
  variant: "ghost",
792
793
  color: "info",
793
- class: `${A.info} ${M.info} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
794
+ class: `${j.info} ${M.info} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
794
795
  },
795
796
  {
796
797
  variant: "ghost",
797
798
  color: "warning",
798
- class: `${A.warning} ${M.warning} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
799
+ class: `${j.warning} ${M.warning} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
799
800
  },
800
801
  {
801
802
  variant: "ghost",
802
803
  color: "error",
803
- class: `${A.error} ${M.error} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
804
+ class: `${j.error} ${M.error} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
804
805
  },
805
806
  {
806
807
  variant: "outlined",
807
808
  color: "primary",
808
- class: `${A.primary} ${M.primary} hover:bg-(--br-hover) focus:bg-(--br-hover)`
809
+ class: `${j.primary} ${M.primary} hover:bg-(--br-hover) focus:bg-(--br-hover)`
809
810
  },
810
811
  {
811
812
  variant: "outlined",
812
813
  color: "secondary",
813
- class: `${A.secondary} ${M.secondary} hover:bg-(--br-hover) focus:bg-(--br-hover)`
814
+ class: `${j.secondary} ${M.secondary} hover:bg-(--br-hover) focus:bg-(--br-hover)`
814
815
  },
815
816
  {
816
817
  variant: "outlined",
817
818
  color: "info",
818
- class: `${A.info} ${M.info} hover:bg-(--br-hover) focus:bg-(--br-hover)`
819
+ class: `${j.info} ${M.info} hover:bg-(--br-hover) focus:bg-(--br-hover)`
819
820
  },
820
821
  {
821
822
  variant: "outlined",
822
823
  color: "success",
823
- class: `${A.success} ${M.success} hover:bg-(--br-hover) focus:bg-(--br-hover)`
824
+ class: `${j.success} ${M.success} hover:bg-(--br-hover) focus:bg-(--br-hover)`
824
825
  },
825
826
  {
826
827
  variant: "outlined",
827
828
  color: "warning",
828
- class: `${A.warning} ${M.warning} hover:bg-(--br-hover) focus:bg-(--br-hover)`
829
+ class: `${j.warning} ${M.warning} hover:bg-(--br-hover) focus:bg-(--br-hover)`
829
830
  },
830
831
  {
831
832
  variant: "outlined",
832
833
  color: "error",
833
- class: `${A.error} ${M.error} hover:bg-(--br-hover) focus:bg-(--br-hover)`
834
+ class: `${j.error} ${M.error} hover:bg-(--br-hover) focus:bg-(--br-hover)`
834
835
  },
835
836
  {
836
837
  variant: "outlined",
837
838
  color: "default",
838
- class: `${A.default} ${M.default} hover:bg-(--br-hover) focus:bg-(--br-hover)`
839
+ class: `${j.default} ${M.default} hover:bg-(--br-hover) focus:bg-(--br-hover)`
839
840
  },
840
841
  {
841
842
  variant: "link",
842
843
  color: "primary",
843
- class: `${A.primary} ${M.primary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
844
+ class: `${j.primary} ${M.primary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
844
845
  },
845
846
  {
846
847
  variant: "link",
847
848
  color: "secondary",
848
- class: `${A.secondary} ${M.secondary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
849
+ class: `${j.secondary} ${M.secondary} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
849
850
  },
850
851
  {
851
852
  variant: "link",
852
853
  color: "success",
853
- class: `${A.success} ${M.success} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
854
+ class: `${j.success} ${M.success} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
854
855
  },
855
856
  {
856
857
  variant: "link",
857
858
  color: "info",
858
- class: `${A.info} ${M.info} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
859
+ class: `${j.info} ${M.info} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
859
860
  },
860
861
  {
861
862
  variant: "link",
862
863
  color: "warning",
863
- class: `${A.warning} ${M.warning} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
864
+ class: `${j.warning} ${M.warning} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
864
865
  },
865
866
  {
866
867
  variant: "link",
867
868
  color: "error",
868
- class: `${A.error} ${M.error} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
869
+ class: `${j.error} ${M.error} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
869
870
  },
870
871
  {
871
872
  variant: "link",
872
873
  color: "default",
873
- class: `${A.default} ${M.default} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
874
+ class: `${j.default} ${M.default} hover:bg-(--br-hover) active:bg-(--br-active) focus:bg-(--br-hover)`
874
875
  }
875
- ], er = d("nxgt-btn nxgt-morph-fill no-underline inline-flex center gap-[var(--btn-gap,0.5rem)] [:where(&)]:h-min cursor-pointer whitespace-nowrap disabled:pointer-events-none aria-busy:cursor-progress [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-[var(--btn-ic,1rem)] shrink-0 [&_svg]:shrink-0 aria-invalid:[--btn-focus:var(--color-error)] aria-invalid:[--btn-line:var(--color-error)] px-[calc(var(--btn-px,1rem)+var(--btn-dx,0px))] py-2 has-[>svg]:px-[calc(var(--btn-px,1rem)-var(--btn-pxi,0.25rem)+var(--btn-dx,0px))]", {
876
+ ], ar = f("nxgt-btn nxgt-morph-fill no-underline inline-flex center gap-[var(--btn-gap,0.5rem)] [:where(&)]:h-min cursor-pointer whitespace-nowrap disabled:pointer-events-none aria-busy:cursor-progress [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-[var(--btn-ic,1rem)] shrink-0 [&_svg]:shrink-0 aria-invalid:[--btn-focus:var(--color-error)] aria-invalid:[--btn-line:var(--color-error)] px-[calc(var(--btn-px,1rem)+var(--btn-dx,0px))] py-2 has-[>svg]:px-[calc(var(--btn-px,1rem)-var(--btn-pxi,0.25rem)+var(--btn-dx,0px))]", {
876
877
  variants: {
877
878
  variant: {
878
879
  filled: "",
@@ -881,7 +882,7 @@ var $n = [
881
882
  outlined: "bg-[var(--br-backing,transparent)] [--btn-line-lift-base:0%] dark:[--btn-line-lift-base:25%] shadow-[inset_0_0_0_1.5px_color-mix(in_oklab,color-mix(in_oklab,var(--btn-line,currentColor),white_var(--btn-line-lift,var(--btn-line-lift-base)))_var(--btn-line-mix,90%),transparent)]",
882
883
  link: "nxgt-btn-bare bg-[var(--br-backing,transparent)] focus:underline underline-offset-4 hover:underline"
883
884
  },
884
- color: D,
885
+ color: ie,
885
886
  size: {
886
887
  xs: "h-(--btn-h) [--btn-h:24px] [--btn-px:12px] [--btn-pxi:4px] [--btn-gap:4px] [--btn-ic:14px] [--btn-sq:6px] [--btn-fs:var(--text-label-md)] [--btn-lh:var(--text-label-md--line-height)] [--btn-ls:var(--text-label-md--letter-spacing)] [--btn-fw:560]",
887
888
  sm: "h-(--btn-h) [--btn-h:32px] [--btn-px:16px] [--btn-pxi:4px] [--btn-gap:6px] [--btn-ic:16px] [--btn-sq:8px] [--btn-fs:var(--text-label-lg)] [--btn-lh:var(--text-label-lg--line-height)] [--btn-ls:var(--text-label-lg--letter-spacing)] [--btn-fw:580]",
@@ -899,11 +900,11 @@ var $n = [
899
900
  variant: "filled",
900
901
  color: "primary"
901
902
  },
902
- compoundVariants: $n
903
- }), tr = ((e) => er(e?.variant === "ghost" && e.color == null ? {
903
+ compoundVariants: ir
904
+ }), or = ((e) => ar(e?.variant === "ghost" && e.color == null ? {
904
905
  ...e,
905
906
  color: "default"
906
- } : e)), nr = {
907
+ } : e)), sr = {
907
908
  xs: "min-h-6",
908
909
  sm: "min-h-8",
909
910
  default: "min-h-9",
@@ -911,67 +912,67 @@ var $n = [
911
912
  xl: "min-h-14",
912
913
  "2xl": "min-h-24"
913
914
  };
914
- function rr(e, t) {
915
- return !e || t?.startsWith("icon") ? !1 : `h-auto ${t ? nr[t] : ""} whitespace-normal **:whitespace-normal text-center`;
915
+ function cr(e, t) {
916
+ return !e || t?.startsWith("icon") ? !1 : `h-auto ${t ? sr[t] : ""} whitespace-normal **:whitespace-normal text-center`;
916
917
  }
917
918
  //#endregion
918
919
  //#region lib/components/ui/actions/button/button.classes.ts
919
- function ir({ asChild: e, variant: t, color: n, size: r, wrap: i, className: a }) {
920
- return N("w-fit max-w-full min-w-0 justify-center", e && "nxgt-btn-as-child overflow-clip text-ellipsis whitespace-nowrap [overflow-clip-margin:22px]", tr({
920
+ function lr({ asChild: e, variant: t, color: n, size: r, wrap: i, className: a }) {
921
+ return N("w-fit max-w-full min-w-0 justify-center", e && "nxgt-btn-as-child overflow-clip text-ellipsis whitespace-nowrap [overflow-clip-margin:22px]", or({
921
922
  variant: t,
922
923
  color: n,
923
924
  size: r
924
- }), rr(i, r), a);
925
+ }), cr(i, r), a);
925
926
  }
926
927
  //#endregion
927
928
  //#region lib/components/ui/actions/button/button-busy.tsx
928
- function ar(e) {
929
- R(() => {
930
- e && !be() && console.warn("Button: `selected` is ignored with `asChild`; set aria-pressed on the child element.");
929
+ function ur(e) {
930
+ L(() => {
931
+ e && !we() && console.warn("Button: `selected` is ignored with `asChild`; set aria-pressed on the child element.");
931
932
  }, [e]);
932
933
  }
933
- function or({ spinnerVariant: e, color: t }) {
934
- return /* @__PURE__ */ V(pe, {
934
+ function dr({ spinnerVariant: e, color: t }) {
935
+ return /* @__PURE__ */ B(he, {
935
936
  variant: e,
936
937
  color: t,
937
938
  className: N("nxgt-btn-spinner starting:scale-50 duration-200 ease-out", e === "4" ? "size-7.5" : "size-4.5")
938
939
  });
939
940
  }
940
- var sr = F(!1);
941
+ var fr = F(!1);
941
942
  //#endregion
942
943
  //#region lib/components/ui/actions/button/has-text-content.ts
943
- function cr(e) {
944
- return e == null || typeof e == "boolean" ? !1 : typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? String(e).trim() !== "" : Array.isArray(e) ? e.some(cr) : we(e) ? !lr(e.props["aria-hidden"]) && cr(e.props.children) : !1;
944
+ function pr(e) {
945
+ return e == null || typeof e == "boolean" ? !1 : typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? String(e).trim() !== "" : Array.isArray(e) ? e.some(pr) : Oe(e) ? !mr(e.props["aria-hidden"]) && pr(e.props.children) : !1;
945
946
  }
946
- function lr(e) {
947
+ function mr(e) {
947
948
  return !!e && e !== "false";
948
949
  }
949
950
  //#endregion
950
951
  //#region lib/components/ui/actions/button/label-text.tsx
951
- function ur(e) {
952
+ function hr(e) {
952
953
  let t = [], n = 0, r = [], i = () => {
953
954
  if (r.length === 0) return;
954
955
  let e = r.join("");
955
- r = [], e.trim() === "" ? t.push(e) : t.push(/* @__PURE__ */ V("span", {
956
+ r = [], e.trim() === "" ? t.push(e) : t.push(/* @__PURE__ */ B("span", {
956
957
  "data-slot": "button-label",
957
958
  children: e
958
959
  }, `label-${n++}`));
959
960
  };
960
- for (let n of xe.toArray(e)) {
961
+ for (let n of Te.toArray(e)) {
961
962
  if (typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
962
963
  r.push(n);
963
964
  continue;
964
965
  }
965
- i(), t.push(dr(n));
966
+ i(), t.push(gr(n));
966
967
  }
967
968
  return i(), t;
968
969
  }
969
- function dr(e) {
970
- return we(e) && e.type === Se ? Ce(e, void 0, ur(e.props.children)) : e;
970
+ function gr(e) {
971
+ return Oe(e) && e.type === Ee ? De(e, void 0, hr(e.props.children)) : e;
971
972
  }
972
973
  //#endregion
973
974
  //#region lib/hooks/use-router-navigation-state.ts
974
- function fr(e) {
975
+ function _r(e) {
975
976
  let t = e, n = /* @__PURE__ */ new Set();
976
977
  return {
977
978
  get: () => t,
@@ -986,42 +987,42 @@ function fr(e) {
986
987
  })
987
988
  };
988
989
  }
989
- var pr = fr(null), mr = F(null), hr = () => () => {}, gr = () => null;
990
- function _r(e) {
991
- let t = L(mr) ?? pr;
992
- return B(e ? t.subscribe : hr, e ? t.get : gr, e ? t.get : gr);
990
+ var vr = _r(null), yr = F(null), br = () => () => {}, xr = () => null;
991
+ function Sr(e) {
992
+ let t = I(yr) ?? vr;
993
+ return z(e ? t.subscribe : br, e ? t.get : xr, e ? t.get : xr);
993
994
  }
994
995
  //#endregion
995
996
  //#region lib/components/ui/actions/button/use-form-submit-loading.ts
996
- var vr = 1e3;
997
- function yr(e) {
997
+ var Cr = 1e3;
998
+ function wr(e) {
998
999
  return (e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.type === "submit";
999
1000
  }
1000
- function br(e) {
1001
- return [...e.form?.elements ?? []].find(yr) === e;
1001
+ function Tr(e) {
1002
+ return [...e.form?.elements ?? []].find(wr) === e;
1002
1003
  }
1003
- function xr(e, t) {
1004
- let n = _r(t), [r, i] = Oe(!1), a = z(!1), o = z(n), s = t && n !== null;
1005
- return R(() => {
1004
+ function Er(e, t) {
1005
+ let n = Sr(t), [r, i] = Pe(!1), a = R(!1), o = R(n), s = t && n !== null;
1006
+ return L(() => {
1006
1007
  let t = e.current, n = t?.form;
1007
1008
  if (!s || !t || !n) return;
1008
1009
  let r, c = (e) => {
1009
1010
  if (e.defaultPrevented) return;
1010
1011
  let { submitter: n } = e;
1011
- (n ? n !== t : !br(t)) || (a.current = o.current !== "idle", i(!0), clearTimeout(r), r = setTimeout(() => {
1012
+ (n ? n !== t : !Tr(t)) || (a.current = o.current !== "idle", i(!0), clearTimeout(r), r = setTimeout(() => {
1012
1013
  a.current || i(!1);
1013
- }, vr));
1014
+ }, Cr));
1014
1015
  };
1015
1016
  return n.addEventListener("submit", c), () => {
1016
1017
  clearTimeout(r), n.removeEventListener("submit", c);
1017
1018
  };
1018
- }, [s, e]), R(() => {
1019
+ }, [s, e]), L(() => {
1019
1020
  let e = o.current;
1020
1021
  o.current = n, r && (e === "idle" && n !== "idle" ? a.current = !0 : n === "idle" && a.current && (a.current = !1, i(!1)));
1021
1022
  }, [r, n]), s && r && n !== "idle";
1022
1023
  }
1023
- function Sr(e, t, n, r) {
1024
- let i = z(null), a = I((t) => {
1024
+ function Dr(e, t, n, r) {
1025
+ let i = R(null), a = Ae((t) => {
1025
1026
  if (i.current = t, typeof e == "function") {
1026
1027
  let n = e(t);
1027
1028
  return () => {
@@ -1031,7 +1032,7 @@ function Sr(e, t, n, r) {
1031
1032
  return e && (e.current = t), () => {
1032
1033
  i.current = null, e && (e.current = null);
1033
1034
  };
1034
- }, [e]), o = xr(i, t === void 0 && !n && r === "submit");
1035
+ }, [e]), o = Er(i, t === void 0 && !n && r === "submit");
1035
1036
  return {
1036
1037
  setRef: a,
1037
1038
  loading: t ?? o
@@ -1039,74 +1040,72 @@ function Sr(e, t, n, r) {
1039
1040
  }
1040
1041
  //#endregion
1041
1042
  //#region lib/components/ui/actions/button/button.tsx
1042
- function Cr(e, t) {
1043
- return L(O) || !!(e["aria-label"] || e["aria-labelledby"]) || cr(t);
1044
- }
1045
- function wr({ className: t, variant: n = "filled", asChild: r = !1, children: a, color: o, size: s, loading: c, lockOnClick: l, spinnerVariant: u = "2", wrap: d, shape: f, selected: p, disabled: m, onClickCapture: h, type: g = "button", ref: _, ...v }) {
1046
- let y = r ? i : "button", b = L(ve), x = s ?? b;
1047
- ar(r && p !== void 0);
1048
- let S = !r && p !== void 0, ee = Cr(v, a), { setRef: te, loading: C } = Sr(_, c, r, g), ne = ce(l, C), w = C || ne.locked, T = L(sr), ie = he(w, ne, h);
1049
- return /* @__PURE__ */ V(O, {
1050
- value: ee,
1051
- children: /* @__PURE__ */ H(y, {
1043
+ function Or(e, t) {
1044
+ return I(oe) || !!(e["aria-label"] || e["aria-labelledby"]) || pr(t);
1045
+ }
1046
+ function kr({ className: t, variant: n = "filled", asChild: r = !1, children: a, color: o, size: s, loading: c, lockOnClick: l, spinnerVariant: u = "2", wrap: d, shape: f, selected: p, disabled: m, onClickCapture: h, type: g = "button", ref: ee, ..._ }) {
1047
+ let v = r ? i : "button", y = I(xe), te = s ?? y;
1048
+ ur(r && p !== void 0);
1049
+ let b = !r && p !== void 0, ne = Or(_, a), { setRef: re, loading: x } = Dr(ee, c, r, g), S = ce(l, x), C = x || S.locked, w = I(fr), E = ve(C, S, h);
1050
+ return /* @__PURE__ */ B(oe, {
1051
+ value: ne,
1052
+ children: /* @__PURE__ */ V(v, {
1052
1053
  "data-slot": "button",
1053
1054
  "data-variant": n,
1054
1055
  "data-color": o,
1055
- "data-size": x,
1056
+ "data-size": te,
1056
1057
  "data-shape": f,
1057
- "data-selected": S && p ? "true" : void 0,
1058
- className: ir({
1058
+ "data-selected": b && p ? "true" : void 0,
1059
+ className: lr({
1059
1060
  asChild: r,
1060
1061
  variant: n,
1061
1062
  color: o,
1062
- size: x,
1063
+ size: te,
1063
1064
  wrap: d,
1064
- className: re(t, v["aria-haspopup"])
1065
+ className: T(t, _["aria-haspopup"])
1065
1066
  }),
1066
1067
  type: r ? void 0 : g,
1067
1068
  disabled: m,
1068
- ref: te,
1069
- ...v,
1070
- "aria-disabled": w || v["aria-disabled"],
1071
- "aria-busy": w || v["aria-busy"],
1072
- "aria-pressed": S ? p : v["aria-pressed"],
1073
- onClickCapture: ie,
1074
- children: [w && !T && /* @__PURE__ */ V(or, {
1069
+ ref: re,
1070
+ ..._,
1071
+ "aria-disabled": C || _["aria-disabled"],
1072
+ "aria-busy": C || _["aria-busy"],
1073
+ "aria-pressed": b ? p : _["aria-pressed"],
1074
+ onClickCapture: E,
1075
+ children: [C && !w && /* @__PURE__ */ B(dr, {
1075
1076
  spinnerVariant: u,
1076
1077
  color: n === "filled" ? "light" : o
1077
- }), /* @__PURE__ */ V(e, { children: r ? a : ur(a) })]
1078
+ }), /* @__PURE__ */ B(e, { children: r ? a : hr(a) })]
1078
1079
  })
1079
1080
  });
1080
1081
  }
1081
- function Tr({ tooltip: e, ...t }) {
1082
- return e ? /* @__PURE__ */ V(_e, {
1082
+ function Ar({ tooltip: e, ...t }) {
1083
+ return e ? /* @__PURE__ */ B(be, {
1083
1084
  content: e,
1084
- children: /* @__PURE__ */ V(wr, { ...t })
1085
- }) : /* @__PURE__ */ V(wr, { ...t });
1085
+ children: /* @__PURE__ */ B(kr, { ...t })
1086
+ }) : /* @__PURE__ */ B(kr, { ...t });
1086
1087
  }
1087
- //#endregion
1088
- //#region lib/components/ui/option-item-classes.ts
1089
- var Er = "relative before:pointer-events-none before:absolute before:inset-y-1 before:start-0 before:w-[3px] before:rounded-none", Dr = `pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none ${`${Er} before:bg-transparent before:transition-colors before:duration-100 motion-reduce:before:transition-none`}`, Or = [
1090
- Dr,
1088
+ var jr = "tonal", Mr = "relative before:pointer-events-none before:absolute before:inset-y-1 before:start-0 before:w-[3px] before:rounded-none", Nr = `pointer-coarse:min-h-11 transition-colors duration-100 motion-reduce:transition-none ${`${Mr} before:bg-transparent before:transition-colors before:duration-100 motion-reduce:before:transition-none`}`, Pr = [
1089
+ Nr,
1091
1090
  "data-[highlighted]:bg-card-tint-8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
1092
1091
  "data-[state=checked]:bg-card-tint-12 data-[state=checked]:font-medium data-[state=checked]:before:bg-primary-text data-[state=checked]:text-primary-text data-[state=checked]:[&_svg:not([class*='text-'])]:text-primary-text",
1093
1092
  "data-[state=checked]:data-[highlighted]:bg-card-tint-18 data-[state=checked]:data-[highlighted]:before:bg-primary-text",
1094
1093
  "forced-colors:data-[highlighted]:outline-solid forced-colors:data-[highlighted]:outline-2 forced-colors:data-[highlighted]:-outline-offset-2 forced-colors:data-[highlighted]:outline-[Highlight] forced-colors:data-[state=checked]:before:bg-[Highlight]"
1095
1094
  ].join(" ");
1096
1095
  [
1097
- Dr,
1096
+ Nr,
1098
1097
  "hover:bg-card-tint-8 focus-visible:bg-card-tint-8 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-(--nxgt-option-ring)",
1099
1098
  "forced-colors:focus-visible:outline-solid forced-colors:focus-visible:outline-2 forced-colors:focus-visible:-outline-offset-2 forced-colors:focus-visible:outline-[Highlight]"
1100
1099
  ].join(" ");
1101
- var kr = "data-[active]:bg-card-tint-12 data-[active]:font-medium data-[active]:before:bg-primary-text data-[active]:text-primary-text data-[active]:[&_svg:not([class*='text-'])]:text-primary-text data-[active]:data-[highlighted]:bg-card-tint-18 data-[active]:data-[highlighted]:before:bg-primary-text data-[variant=error]:data-[active]:text-error-text forced-colors:data-[active]:before:bg-[Highlight]";
1100
+ var Fr = "data-[active]:bg-card-tint-12 data-[active]:font-medium data-[active]:before:bg-primary-text data-[active]:text-primary-text data-[active]:[&_svg:not([class*='text-'])]:text-primary-text data-[active]:data-[highlighted]:bg-card-tint-18 data-[active]:data-[highlighted]:before:bg-primary-text data-[variant=error]:data-[active]:text-error-text forced-colors:data-[active]:before:bg-[Highlight]";
1102
1101
  [
1103
- Dr,
1102
+ Nr,
1104
1103
  "data-[highlighted]:bg-card-tint-8",
1105
1104
  "data-[selected]:bg-card-tint-12 data-[selected]:font-medium data-[selected]:before:bg-primary-text data-[selected]:text-primary-text data-[selected]:[&_svg:not([class*='text-'])]:text-primary-text",
1106
1105
  "data-[selected]:data-[highlighted]:bg-card-tint-18 data-[selected]:data-[highlighted]:before:bg-primary-text",
1107
1106
  "forced-colors:data-[highlighted]:outline-solid forced-colors:data-[highlighted]:outline-2 forced-colors:data-[highlighted]:-outline-offset-2 forced-colors:data-[highlighted]:outline-[Highlight] forced-colors:data-[selected]:before:bg-[Highlight]"
1108
1107
  ].join(" "), [
1109
- Dr,
1108
+ Nr,
1110
1109
  "data-[selected=true]:bg-card-tint-8",
1111
1110
  "aria-checked:bg-card-tint-12 aria-checked:font-medium aria-checked:before:bg-primary-text aria-checked:text-primary-text aria-checked:[&_svg:not([class*='text-'])]:text-primary-text",
1112
1111
  "aria-checked:data-[selected=true]:bg-card-tint-18 aria-checked:data-[selected=true]:before:bg-primary-text",
@@ -1121,70 +1120,274 @@ var kr = "data-[active]:bg-card-tint-12 data-[active]:font-medium data-[active]:
1121
1120
  "forced-colors:data-[selected=true]:outline-solid forced-colors:data-[selected=true]:outline-2 forced-colors:data-[selected=true]:-outline-offset-2 forced-colors:data-[selected=true]:outline-[Highlight]"
1122
1121
  ].join(" ");
1123
1122
  //#endregion
1124
- //#region lib/components/ui/forms/field-blur-context.ts
1125
- var Ar = F(null);
1126
- function jr(e, t) {
1127
- return De(() => e ? t ? (n) => {
1128
- let r = e(n), i = typeof t == "function" ? t(n) : void 0;
1129
- return typeof t != "function" && (t.current = n), () => {
1130
- r?.(), typeof i == "function" ? i() : typeof t == "function" ? t(null) : t.current = null;
1131
- };
1132
- } : e : t, [e, t]);
1123
+ //#region lib/components/ui/overlays/dialog/escape-owner.ts
1124
+ var Ir = /* @__PURE__ */ new WeakSet(), Lr = "data-escape-owner";
1125
+ function Rr(e, t) {
1126
+ let n = e.target?.closest?.(`[${Lr}]`);
1127
+ !n || n === t || !t?.contains(n) || (Ir.add(e), e.preventDefault());
1128
+ }
1129
+ //#endregion
1130
+ //#region lib/components/ui/overlays/dialog/use-escape-forward.ts
1131
+ function zr(e, n) {
1132
+ let r = R(null);
1133
+ return {
1134
+ ref: t(r, n),
1135
+ onEscapeKeyDown(t) {
1136
+ Le(t), Rr(t, r.current), e?.(t), Ie(r.current, t);
1137
+ }
1138
+ };
1139
+ }
1140
+ //#endregion
1141
+ //#region lib/components/ui/overlays/dialog/use-overlay-order.ts
1142
+ function Br(e) {
1143
+ let n = R(null);
1144
+ return {
1145
+ overlayRef: Ae((e) => {
1146
+ let t = n.current;
1147
+ !e || !t?.isConnected || t.parentNode === e.parentNode && t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING && t.before(e);
1148
+ }, []),
1149
+ contentRef: t(n, e)
1150
+ };
1151
+ }
1152
+ //#endregion
1153
+ //#region lib/components/ui/overlays/dialog/use-modal-content.ts
1154
+ function Vr({ ref: e, onEscapeKeyDown: t, ...n }, r) {
1155
+ let i = I(ge) ?? !0, a = zr(t, k(r ?? i, e)), o = Br(a.ref);
1156
+ return {
1157
+ ref: o.contentRef,
1158
+ overlayRef: o.overlayRef,
1159
+ onEscapeKeyDown: a.onEscapeKeyDown,
1160
+ outside: {
1161
+ onPointerDownOutside: Hr(n.onPointerDownOutside),
1162
+ onFocusOutside: Hr(n.onFocusOutside),
1163
+ onInteractOutside: Hr(n.onInteractOutside)
1164
+ }
1165
+ };
1166
+ }
1167
+ function Hr(e) {
1168
+ return (t) => {
1169
+ e?.(t);
1170
+ let n = t.target;
1171
+ n instanceof Element && n.closest("[data-sonner-toaster]") && t.preventDefault();
1172
+ };
1173
+ }
1174
+ //#endregion
1175
+ //#region lib/components/ui/overlays/dialog/menu-trigger.ts
1176
+ var Ur = "[role=\"menu\"]", Wr = 8;
1177
+ function Gr(e) {
1178
+ let t = null, n = e?.closest(Ur) ?? null;
1179
+ for (let e = 0; n && e < Wr; e++) {
1180
+ let e = n.getAttribute("data-return-focus"), r = e ? n.ownerDocument.getElementById(e) : null;
1181
+ if (r) return r;
1182
+ let [i] = (n.getAttribute("aria-labelledby") ?? "").split(/\s+/), a = i ? n.ownerDocument.getElementById(i) : null;
1183
+ if (!a) break;
1184
+ t = a, n = a.closest(Ur);
1185
+ }
1186
+ return t;
1187
+ }
1188
+ //#endregion
1189
+ //#region lib/components/ui/overlays/dialog/use-return-focus.ts
1190
+ var Kr = "button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
1191
+ function qr(e) {
1192
+ ([...e.querySelectorAll(Kr)].find((e) => e.tabIndex >= 0 && e.getClientRects().length > 0) ?? e).focus({ preventScroll: !0 });
1133
1193
  }
1134
- function Mr(e) {
1135
- return jr(Te(Ar), e);
1194
+ function Jr(e, { focusFallback: t = !1 } = {}) {
1195
+ let n = R(null), r = R(null);
1196
+ return {
1197
+ onOpenAutoFocus(i) {
1198
+ let a = document.activeElement;
1199
+ n.current = a instanceof HTMLElement && a !== document.body ? a : null, r.current = Gr(n.current), e.onOpenAutoFocus?.(i);
1200
+ let o = i.target;
1201
+ !t || i.defaultPrevented || !(o instanceof HTMLElement) || queueMicrotask(() => {
1202
+ o.isConnected && !o.contains(document.activeElement) && qr(o);
1203
+ });
1204
+ },
1205
+ onCloseAutoFocus(t) {
1206
+ e.onCloseAutoFocus?.(t);
1207
+ let i = n.current?.isConnected ? n.current : r.current;
1208
+ if (n.current = null, r.current = null, t.defaultPrevented || !i?.isConnected) return;
1209
+ let a = document.activeElement;
1210
+ a && a !== document.body || (t.preventDefault(), i.focus());
1211
+ }
1212
+ };
1136
1213
  }
1137
1214
  //#endregion
1138
1215
  //#region lib/components/ui/primitives/input/input-box.ts
1139
- var Nr = "selection:bg-primary selection:text-primary-foreground", Pr = [
1216
+ var Yr = "selection:bg-primary selection:text-primary-foreground", Xr = [
1140
1217
  "inline-flex gap-2 items-center h-11 max-h-full w-full min-w-0",
1141
1218
  "px-2 py-1 text-base md:text-sm outline-none",
1142
1219
  "placeholder:text-muted-foreground",
1143
1220
  "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-muted-foreground",
1144
1221
  "disabled:pointer-events-none"
1145
- ], Fr = [
1146
- ...Pr,
1147
- Nr,
1148
- oe
1222
+ ], Zr = [
1223
+ ...Xr,
1224
+ Yr,
1225
+ me
1149
1226
  ];
1150
- [...Pr];
1227
+ [...Xr];
1228
+ //#endregion
1229
+ //#region lib/components/ui/forms/field-blur-context.ts
1230
+ var Qr = F(null);
1231
+ function $r(e, t) {
1232
+ return Ne(() => e ? t ? (n) => {
1233
+ let r = e(n), i = typeof t == "function" ? t(n) : void 0;
1234
+ return typeof t != "function" && (t.current = n), () => {
1235
+ r?.(), typeof i == "function" ? i() : typeof t == "function" ? t(null) : t.current = null;
1236
+ };
1237
+ } : e : t, [e, t]);
1238
+ }
1239
+ function ei(e) {
1240
+ return $r(ke(Qr), e);
1241
+ }
1151
1242
  //#endregion
1152
- //#region lib/components/ui/overlays/dialog/dialog-confirm.ts
1153
- var Ir = F(void 0);
1154
- function Lr() {
1155
- return L(Ir);
1243
+ //#region lib/components/ui/fields/switch/partials/switch-row.tsx
1244
+ function ti({ id: e, rowTextId: t, text: n, isChecked: r, error: i, variant: a = "box", className: o, readOnly: s, children: c }) {
1245
+ return /* @__PURE__ */ V("div", {
1246
+ "data-checked": r,
1247
+ "data-filled": r,
1248
+ "data-invalid": i || void 0,
1249
+ className: N(a === "plain" ? "flex w-full min-w-0 items-start gap-2 min-h-11 py-[5px]" : Zr, a !== "plain" && "h-auto min-h-11 items-start py-[5px]", o),
1250
+ children: [/* @__PURE__ */ B("label", {
1251
+ id: t,
1252
+ htmlFor: e,
1253
+ className: N(d(), "my-1.5 min-w-0 flex-1 break-words", s ? "cursor-default" : "cursor-pointer", "pointer-coarse:py-3 pointer-coarse:-my-1.5", { "text-primary-text": r }),
1254
+ children: n
1255
+ }), c]
1256
+ });
1257
+ }
1258
+ //#endregion
1259
+ //#region lib/components/ui/fields/switch/switch.utils.ts
1260
+ function ni({ id: e, label: t, placeholder: n, helperText: r, props: i }) {
1261
+ let a = `${e}-label`, o = r ? `${e}-helper` : void 0, s = !!(t && n), c = s ? `${e}-text` : void 0, l = [
1262
+ c,
1263
+ o,
1264
+ i["aria-describedby"]
1265
+ ].filter(Boolean).join(" ") || void 0, u = !!(i["aria-label"] || i["aria-labelledby"]);
1266
+ return {
1267
+ labelId: a,
1268
+ rowTextId: c,
1269
+ helperId: o,
1270
+ nameProps: {
1271
+ ...s && !u ? { "aria-labelledby": a } : {},
1272
+ ...l ? { "aria-describedby": l } : {}
1273
+ }
1274
+ };
1275
+ }
1276
+ //#endregion
1277
+ //#region lib/components/ui/fields/switch/use-switch-checked.ts
1278
+ function ri(e) {
1279
+ let [t, n] = Pe(e.defaultChecked ?? !1);
1280
+ return {
1281
+ isChecked: e.checked ?? t,
1282
+ onCheckedChange: (t) => {
1283
+ e.checked === void 0 && n(t), e.onCheckedChange?.(t);
1284
+ }
1285
+ };
1286
+ }
1287
+ //#endregion
1288
+ //#region lib/components/ui/fields/switch/use-switch-state.ts
1289
+ function ii({ label: e, placeholder: t, helperText: n, props: r }) {
1290
+ let i = ei(), a = !!(t || e), o = je(), s = r.id ?? o, c = ni({
1291
+ id: s,
1292
+ label: e,
1293
+ placeholder: t,
1294
+ helperText: n,
1295
+ props: r
1296
+ }), { isChecked: l, onCheckedChange: u } = ri(r);
1297
+ return {
1298
+ blurRoot: i,
1299
+ hasRow: a,
1300
+ id: s,
1301
+ ...c,
1302
+ isChecked: l,
1303
+ onCheckedChange: u
1304
+ };
1305
+ }
1306
+ //#endregion
1307
+ //#region lib/components/ui/fields/switch/switch.tsx
1308
+ function ai({ error: e, helperText: t, label: n, placeholder: r, variant: i = "box", className: a, ...o }) {
1309
+ let s = ii({
1310
+ label: n,
1311
+ placeholder: r,
1312
+ helperText: t,
1313
+ props: o
1314
+ }), { id: c } = s, l = !(r || t), u = l ? a : void 0, d = s.hasRow && l && i === "box", f = {
1315
+ "aria-invalid": e || void 0,
1316
+ ...o,
1317
+ ...s.nameProps,
1318
+ id: c,
1319
+ onCheckedChange: s.onCheckedChange
1320
+ }, p = s.hasRow ? /* @__PURE__ */ B(ti, {
1321
+ className: N(d && "self-end", u),
1322
+ id: c,
1323
+ rowTextId: s.rowTextId,
1324
+ text: r || n,
1325
+ isChecked: s.isChecked,
1326
+ error: e,
1327
+ variant: i,
1328
+ readOnly: o.readOnly,
1329
+ children: /* @__PURE__ */ B(Ce, {
1330
+ ...f,
1331
+ className: "cursor-pointer"
1332
+ })
1333
+ }) : /* @__PURE__ */ B(Ce, {
1334
+ ...f,
1335
+ className: N("cursor-pointer", u)
1336
+ });
1337
+ return /* @__PURE__ */ V("div", {
1338
+ ref: s.blurRoot,
1339
+ "data-slot": "switch-field",
1340
+ className: l ? "contents" : N("grid min-w-0 content-start gap-1.5", s.hasRow && "w-full", a),
1341
+ children: [n && r && /* @__PURE__ */ B(ae, {
1342
+ id: s.labelId,
1343
+ htmlFor: c,
1344
+ withAsterisk: o.required,
1345
+ children: n
1346
+ }), /* @__PURE__ */ V("div", {
1347
+ className: l ? "contents" : "flex min-w-0 flex-col gap-0.5",
1348
+ children: [p, t ? /* @__PURE__ */ B(pe, {
1349
+ id: s.helperId,
1350
+ error: e,
1351
+ children: t
1352
+ }) : null]
1353
+ })]
1354
+ });
1355
+ }
1356
+ var oi = ai, si = F(void 0);
1357
+ function ci() {
1358
+ return I(si);
1156
1359
  }
1157
1360
  //#endregion
1158
1361
  //#region lib/components/ui/overlays/dialog/dialog-outside.ts
1159
- function Rr(e) {
1362
+ function li(e) {
1160
1363
  let t = e.target;
1161
1364
  t instanceof Element && t.closest("[data-slot=\"combobox-content\"]") && e.preventDefault();
1162
1365
  }
1163
- function zr(e) {
1366
+ function ui(e) {
1164
1367
  return (t) => {
1165
- Rr(t), e?.(t);
1368
+ li(t), e?.(t);
1166
1369
  };
1167
1370
  }
1168
- function Br(e) {
1371
+ function di(e) {
1169
1372
  return {
1170
1373
  ...e,
1171
- onPointerDownOutside: zr(e.onPointerDownOutside),
1172
- onFocusOutside: zr(e.onFocusOutside),
1173
- onInteractOutside: zr(e.onInteractOutside)
1374
+ onPointerDownOutside: ui(e.onPointerDownOutside),
1375
+ onFocusOutside: ui(e.onFocusOutside),
1376
+ onInteractOutside: ui(e.onInteractOutside)
1174
1377
  };
1175
1378
  }
1176
1379
  //#endregion
1177
1380
  //#region lib/components/ui/overlays/dialog/dialog-portal.tsx
1178
- function Vr({ container: e, ...t }) {
1179
- return /* @__PURE__ */ V(Je, {
1381
+ function fi({ container: e, ...t }) {
1382
+ return /* @__PURE__ */ B(et, {
1180
1383
  "data-slot": "dialog-portal",
1181
- container: h(e),
1384
+ container: g(e),
1182
1385
  ...t
1183
1386
  });
1184
1387
  }
1185
1388
  //#endregion
1186
1389
  //#region lib/components/ui/overlays/dialog/dialog-variants.ts
1187
- var Hr = d("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 p-6 [--dialog-px:1.5rem] max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto", {
1390
+ var pi = f("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 p-6 [--dialog-px:1.5rem] max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto", {
1188
1391
  variants: {
1189
1392
  layout: {
1190
1393
  stack: "has-[>[data-slot=dialog-body]]:flex has-[>[data-slot=dialog-body]]:flex-col has-[>[data-slot=dialog-body]]:overflow-hidden",
@@ -1211,67 +1414,15 @@ var Hr = d("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full translate-x-
1211
1414
  layout: "stack"
1212
1415
  }
1213
1416
  });
1214
- function Ur(e, t, n) {
1417
+ function mi(e, t, n) {
1215
1418
  let r = e === "split";
1216
1419
  return {
1217
1420
  size: t ?? (r ? "lg" : void 0),
1218
1421
  mobilePresentation: n ?? (r ? "fullscreen" : void 0)
1219
1422
  };
1220
1423
  }
1221
- //#endregion
1222
- //#region lib/components/ui/overlays/dialog/escape-owner.ts
1223
- var Wr = /* @__PURE__ */ new WeakSet(), Gr = "data-escape-owner";
1224
- function Kr(e, t) {
1225
- let n = e.target?.closest?.(`[${Gr}]`);
1226
- !n || n === t || !t?.contains(n) || (Wr.add(e), e.preventDefault());
1227
- }
1228
- //#endregion
1229
- //#region lib/components/ui/overlays/dialog/use-escape-forward.ts
1230
- function qr(e, n) {
1231
- let r = z(null);
1232
- return {
1233
- ref: t(r, n),
1234
- onEscapeKeyDown(t) {
1235
- je(t), Kr(t, r.current), e?.(t), Ae(r.current, t);
1236
- }
1237
- };
1238
- }
1239
- //#endregion
1240
- //#region lib/components/ui/overlays/dialog/use-overlay-order.ts
1241
- function Jr(e) {
1242
- let n = z(null);
1243
- return {
1244
- overlayRef: I((e) => {
1245
- let t = n.current;
1246
- !e || !t?.isConnected || t.parentNode === e.parentNode && t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING && t.before(e);
1247
- }, []),
1248
- contentRef: t(n, e)
1249
- };
1250
- }
1251
- //#endregion
1252
- //#region lib/components/ui/overlays/dialog/use-modal-content.ts
1253
- function Yr({ ref: e, onEscapeKeyDown: t, ...n }, r) {
1254
- let i = L(de) ?? !0, a = qr(t, me(r ?? i, e)), o = Jr(a.ref);
1255
- return {
1256
- ref: o.contentRef,
1257
- overlayRef: o.overlayRef,
1258
- onEscapeKeyDown: a.onEscapeKeyDown,
1259
- outside: {
1260
- onPointerDownOutside: Xr(n.onPointerDownOutside),
1261
- onFocusOutside: Xr(n.onFocusOutside),
1262
- onInteractOutside: Xr(n.onInteractOutside)
1263
- }
1264
- };
1265
- }
1266
- function Xr(e) {
1267
- return (t) => {
1268
- e?.(t);
1269
- let n = t.target;
1270
- n instanceof Element && n.closest("[data-sonner-toaster]") && t.preventDefault();
1271
- };
1272
- }
1273
- function Zr(e) {
1274
- return I((t) => {
1424
+ function hi(e) {
1425
+ return Ae((t) => {
1275
1426
  if (!t || !e) return;
1276
1427
  let n = () => t.toggleAttribute("data-narrow", t.offsetWidth < 640);
1277
1428
  if (n(), typeof ResizeObserver > "u") return;
@@ -1282,75 +1433,35 @@ function Zr(e) {
1282
1433
  }, [e]);
1283
1434
  }
1284
1435
  //#endregion
1285
- //#region lib/components/ui/overlays/dialog/menu-trigger.ts
1286
- var Qr = "[role=\"menu\"]", $r = 8;
1287
- function ei(e) {
1288
- let t = null, n = e?.closest(Qr) ?? null;
1289
- for (let e = 0; n && e < $r; e++) {
1290
- let e = n.getAttribute("data-return-focus"), r = e ? n.ownerDocument.getElementById(e) : null;
1291
- if (r) return r;
1292
- let [i] = (n.getAttribute("aria-labelledby") ?? "").split(/\s+/), a = i ? n.ownerDocument.getElementById(i) : null;
1293
- if (!a) break;
1294
- t = a, n = a.closest(Qr);
1295
- }
1296
- return t;
1297
- }
1298
- //#endregion
1299
- //#region lib/components/ui/overlays/dialog/use-return-focus.ts
1300
- var ti = "button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
1301
- function ni(e) {
1302
- ([...e.querySelectorAll(ti)].find((e) => e.tabIndex >= 0 && e.getClientRects().length > 0) ?? e).focus({ preventScroll: !0 });
1303
- }
1304
- function ri(e, { focusFallback: t = !1 } = {}) {
1305
- let n = z(null), r = z(null);
1306
- return {
1307
- onOpenAutoFocus(i) {
1308
- let a = document.activeElement;
1309
- n.current = a instanceof HTMLElement && a !== document.body ? a : null, r.current = ei(n.current), e.onOpenAutoFocus?.(i);
1310
- let o = i.target;
1311
- !t || i.defaultPrevented || !(o instanceof HTMLElement) || queueMicrotask(() => {
1312
- o.isConnected && !o.contains(document.activeElement) && ni(o);
1313
- });
1314
- },
1315
- onCloseAutoFocus(t) {
1316
- e.onCloseAutoFocus?.(t);
1317
- let i = n.current?.isConnected ? n.current : r.current;
1318
- if (n.current = null, r.current = null, t.defaultPrevented || !i?.isConnected) return;
1319
- let a = document.activeElement;
1320
- a && a !== document.body || (t.preventDefault(), i.focus());
1321
- }
1322
- };
1323
- }
1324
- //#endregion
1325
1436
  //#region lib/components/ui/overlays/dialog/dialog-parts.tsx
1326
- function ii({ className: e, ...t }) {
1327
- return /* @__PURE__ */ V("div", {
1437
+ function gi({ className: e, ...t }) {
1438
+ return /* @__PURE__ */ B("div", {
1328
1439
  "data-slot": "dialog-header",
1329
1440
  className: N("flex flex-col gap-2 text-left", e),
1330
1441
  ...t
1331
1442
  });
1332
1443
  }
1333
- function ai({ className: e, stackOnPhone: t = !1, children: n, ...r }) {
1334
- let i = Lr(), a = i != null && xe.toArray(n).length === 0;
1335
- return /* @__PURE__ */ H("div", {
1444
+ function _i({ className: e, stackOnPhone: t = !1, children: n, ...r }) {
1445
+ let i = ci(), a = i != null && Te.toArray(n).length === 0;
1446
+ return /* @__PURE__ */ V("div", {
1336
1447
  "data-slot": "dialog-footer",
1337
1448
  className: N("flex flex-row flex-wrap justify-end gap-2 pt-2", t ? "max-sm:flex-col max-sm:*:w-full" : "@max-sm/dialog:*:min-h-11 @max-sm/dialog:*:flex-1", a && "max-sm:hidden", e),
1338
1449
  ...r,
1339
- children: [n, i != null && /* @__PURE__ */ V("span", {
1450
+ children: [n, i != null && /* @__PURE__ */ B("span", {
1340
1451
  className: "contents max-sm:hidden",
1341
1452
  children: i
1342
1453
  })]
1343
1454
  });
1344
1455
  }
1345
- function oi({ className: e, ...t }) {
1346
- return /* @__PURE__ */ V(it, {
1456
+ function vi({ className: e, ...t }) {
1457
+ return /* @__PURE__ */ B(ut, {
1347
1458
  "data-slot": "dialog-title",
1348
1459
  className: N("text-2xl/8 font-medium tracking-tight text-foreground", e),
1349
1460
  ...t
1350
1461
  });
1351
1462
  }
1352
- function si({ className: e, ...t }) {
1353
- return /* @__PURE__ */ V(ot, {
1463
+ function yi({ className: e, ...t }) {
1464
+ return /* @__PURE__ */ B(ft, {
1354
1465
  "data-slot": "dialog-description",
1355
1466
  className: N("text-muted-foreground text-sm/6", e),
1356
1467
  ...t
@@ -1358,81 +1469,81 @@ function si({ className: e, ...t }) {
1358
1469
  }
1359
1470
  //#endregion
1360
1471
  //#region lib/components/ui/overlays/dialog/dialog.tsx
1361
- function ci({ ...e }) {
1362
- return /* @__PURE__ */ V(de, {
1472
+ function bi({ ...e }) {
1473
+ return /* @__PURE__ */ B(ge, {
1363
1474
  value: e.modal ?? !0,
1364
- children: /* @__PURE__ */ V(He, {
1475
+ children: /* @__PURE__ */ B(Je, {
1365
1476
  "data-slot": "dialog",
1366
1477
  ...e
1367
1478
  })
1368
1479
  });
1369
1480
  }
1370
- function li({ asChild: e = !0, ...t }) {
1371
- return /* @__PURE__ */ V(We, {
1481
+ function xi({ asChild: e = !0, ...t }) {
1482
+ return /* @__PURE__ */ B(Xe, {
1372
1483
  "data-slot": "dialog-trigger",
1373
1484
  ...t,
1374
1485
  asChild: e
1375
1486
  });
1376
1487
  }
1377
- function ui({ className: e, color: t, children: n, type: r = "button", variant: i = "ghost", ...a }) {
1488
+ function Si({ className: e, color: t, children: n, type: r = "button", variant: i = "ghost", ...a }) {
1378
1489
  let { t: s } = o();
1379
- return /* @__PURE__ */ V(ct, {
1490
+ return /* @__PURE__ */ B(mt, {
1380
1491
  "aria-label": n ? void 0 : s("material.buttons.close", "Close"),
1381
1492
  ...a,
1382
1493
  type: r,
1383
- className: N("absolute top-4 right-4", se({
1494
+ className: N("absolute top-4 right-4", le({
1384
1495
  variant: i,
1385
1496
  color: t,
1386
1497
  className: e
1387
1498
  })),
1388
1499
  "data-slot": "dialog-close",
1389
- children: n || /* @__PURE__ */ V(Me, { className: "size-4" })
1500
+ children: n || /* @__PURE__ */ B(Re, { className: "size-4" })
1390
1501
  });
1391
1502
  }
1392
- function di({ className: e, scrim: t = "dim", ...n }) {
1393
- return /* @__PURE__ */ V(Xe, {
1503
+ function Ci({ className: e, scrim: t = "dim", ...n }) {
1504
+ return /* @__PURE__ */ B(nt, {
1394
1505
  "data-slot": "dialog-overlay",
1395
1506
  "data-scrim": t,
1396
1507
  className: N("nxgt-scrim fixed inset-0 z-50", e),
1397
1508
  ...n
1398
1509
  });
1399
1510
  }
1400
- function fi({ className: e, children: n, onInteractOutside: r, onPointerDownOutside: i, onFocusOutside: a, onOpenAutoFocus: o, onCloseAutoFocus: s, onEscapeKeyDown: c, layout: l, size: u, mobilePresentation: d, scrim: f, container: p, confirm: m, ref: h, ...g }) {
1401
- let { size: _, mobilePresentation: v } = Ur(l, u, d), y = ri({
1511
+ function wi({ className: e, children: n, onInteractOutside: r, onPointerDownOutside: i, onFocusOutside: a, onOpenAutoFocus: o, onCloseAutoFocus: s, onEscapeKeyDown: c, layout: l, size: u, mobilePresentation: d, scrim: f, container: p, confirm: m, ref: h, ...g }) {
1512
+ let { size: ee, mobilePresentation: _ } = mi(l, u, d), v = Jr({
1402
1513
  onOpenAutoFocus: o,
1403
1514
  onCloseAutoFocus: s
1404
- }), b = Yr(Br({
1405
- ref: t(h, Zr(l === "split")),
1515
+ }), y = Vr(di({
1516
+ ref: t(h, hi(l === "split")),
1406
1517
  onEscapeKeyDown: c,
1407
1518
  onInteractOutside: r,
1408
1519
  onPointerDownOutside: i,
1409
1520
  onFocusOutside: a
1410
1521
  }));
1411
- return /* @__PURE__ */ V(fe, { children: /* @__PURE__ */ V(ae, {
1522
+ return /* @__PURE__ */ B(se, { children: /* @__PURE__ */ B(_e, {
1412
1523
  value: !0,
1413
- children: /* @__PURE__ */ H(Vr, {
1524
+ children: /* @__PURE__ */ V(fi, {
1414
1525
  "data-slot": "dialog-portal",
1415
1526
  container: p,
1416
- children: [/* @__PURE__ */ V(di, {
1417
- ref: b.overlayRef,
1527
+ children: [/* @__PURE__ */ B(Ci, {
1528
+ ref: y.overlayRef,
1418
1529
  scrim: f
1419
- }), /* @__PURE__ */ V($e, {
1420
- ref: b.ref,
1530
+ }), /* @__PURE__ */ B(at, {
1531
+ ref: y.ref,
1421
1532
  "data-slot": "dialog-content",
1422
- "data-presentation": v ?? void 0,
1423
- "data-size": _ ?? "md",
1533
+ "data-presentation": _ ?? void 0,
1534
+ "data-size": ee ?? "md",
1424
1535
  "data-layout": l ?? void 0,
1425
- className: N(Hr({
1536
+ className: N(pi({
1426
1537
  layout: l,
1427
- size: _,
1428
- mobilePresentation: v
1538
+ size: ee,
1539
+ mobilePresentation: _
1429
1540
  }), e),
1430
- onOpenAutoFocus: y.onOpenAutoFocus,
1431
- onCloseAutoFocus: y.onCloseAutoFocus,
1432
- onEscapeKeyDown: b.onEscapeKeyDown,
1541
+ onOpenAutoFocus: v.onOpenAutoFocus,
1542
+ onCloseAutoFocus: v.onCloseAutoFocus,
1543
+ onEscapeKeyDown: y.onEscapeKeyDown,
1433
1544
  ...g,
1434
- ...b.outside,
1435
- children: /* @__PURE__ */ V(Ir, {
1545
+ ...y.outside,
1546
+ children: /* @__PURE__ */ B(si, {
1436
1547
  value: m,
1437
1548
  children: n
1438
1549
  })
@@ -1442,15 +1553,15 @@ function fi({ className: e, children: n, onInteractOutside: r, onPointerDownOuts
1442
1553
  }
1443
1554
  //#endregion
1444
1555
  //#region lib/components/ui/primitives/portal-container-provider/portal-container-provider.tsx
1445
- function pi({ container: e, children: t }) {
1446
- return /* @__PURE__ */ V(w.Provider, {
1556
+ function Ti({ container: e, children: t }) {
1557
+ return /* @__PURE__ */ B(w.Provider, {
1447
1558
  value: e ?? null,
1448
1559
  children: t
1449
1560
  });
1450
1561
  }
1451
1562
  //#endregion
1452
1563
  //#region lib/components/ui/menu-item-loading.tsx
1453
- function mi(e) {
1564
+ function Ei(e) {
1454
1565
  return e ? {
1455
1566
  "aria-disabled": !0,
1456
1567
  "aria-busy": !0,
@@ -1459,9 +1570,9 @@ function mi(e) {
1459
1570
  onSelect: (e) => e.preventDefault()
1460
1571
  } : {};
1461
1572
  }
1462
- var hi = "data-[loading]:cursor-progress data-[loading]:opacity-70 data-[loading]:[&>svg]:hidden";
1463
- function gi({ className: e }) {
1464
- return /* @__PURE__ */ V(pe, {
1573
+ var Di = "data-[loading]:cursor-progress data-[loading]:opacity-70 data-[loading]:[&>svg]:hidden";
1574
+ function Oi({ className: e }) {
1575
+ return /* @__PURE__ */ B(he, {
1465
1576
  "aria-hidden": "true",
1466
1577
  color: "default",
1467
1578
  className: N("size-4", e)
@@ -1469,19 +1580,19 @@ function gi({ className: e }) {
1469
1580
  }
1470
1581
  //#endregion
1471
1582
  //#region lib/components/ui/selection/option-mark.tsx
1472
- function _i({ kind: e, animate: t = "state", className: n }) {
1583
+ function ki({ kind: e, animate: t = "state", className: n }) {
1473
1584
  let r = t === "enter" ? "nxgt-option-mark-enter" : "";
1474
- return e === "dot" ? /* @__PURE__ */ V("span", {
1585
+ return e === "dot" ? /* @__PURE__ */ B("span", {
1475
1586
  "aria-hidden": "true",
1476
1587
  "data-slot": "option-mark",
1477
1588
  className: N("nxgt-option-dot", r, n)
1478
- }) : /* @__PURE__ */ V("svg", {
1589
+ }) : /* @__PURE__ */ B("svg", {
1479
1590
  "aria-hidden": "true",
1480
1591
  focusable: "false",
1481
1592
  "data-slot": "option-mark",
1482
1593
  viewBox: "0 0 24 24",
1483
1594
  className: N("nxgt-option-check", r, n),
1484
- children: /* @__PURE__ */ V("path", {
1595
+ children: /* @__PURE__ */ B("path", {
1485
1596
  d: "M5.5 12.5l4.2 4.2L18.5 7.5",
1486
1597
  pathLength: 1
1487
1598
  })
@@ -1489,73 +1600,73 @@ function _i({ kind: e, animate: t = "state", className: n }) {
1489
1600
  }
1490
1601
  //#endregion
1491
1602
  //#region lib/components/ui/overlays/dropdown-menu/dropdown-menu-items.tsx
1492
- function vi({ className: t, inset: n, variant: r = "default", active: i, loading: a, children: o, ...s }) {
1493
- return /* @__PURE__ */ H(Gn, {
1603
+ function Ai({ className: t, inset: n, variant: r = "default", active: i, loading: a, children: o, ...s }) {
1604
+ return /* @__PURE__ */ V(Xn, {
1494
1605
  "data-slot": "dropdown-menu-item",
1495
1606
  "data-pw": "dropdown-menu-item",
1496
1607
  "data-inset": n,
1497
1608
  "data-variant": r,
1498
1609
  "data-active": i ? "" : void 0,
1499
- className: N("data-[variant=error]:text-error-text data-[variant=error]:data-[highlighted]:bg-error/10 dark:data-[variant=error]:data-[highlighted]:bg-error/20 data-[variant=error]:[&_svg]:!text-error-text [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", Or, kr, hi, t),
1610
+ className: N("data-[variant=error]:text-error-text data-[variant=error]:data-[highlighted]:bg-error/10 dark:data-[variant=error]:data-[highlighted]:bg-error/20 data-[variant=error]:[&_svg]:!text-error-text [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", Pr, Fr, Di, t),
1500
1611
  ...s,
1501
- ...mi(a),
1502
- children: [a && /* @__PURE__ */ V(gi, {}), /* @__PURE__ */ V(e, { children: o })]
1612
+ ...Ei(a),
1613
+ children: [a && /* @__PURE__ */ B(Oi, {}), /* @__PURE__ */ B(e, { children: o })]
1503
1614
  });
1504
1615
  }
1505
- function yi({ ...e }) {
1506
- return /* @__PURE__ */ V(Kn, {
1616
+ function ji({ ...e }) {
1617
+ return /* @__PURE__ */ B(Zn, {
1507
1618
  "data-slot": "dropdown-menu-radio-group",
1508
1619
  ...e
1509
1620
  });
1510
1621
  }
1511
- function bi({ className: e, children: t, mark: n = "start", ...r }) {
1622
+ function Mi({ className: e, children: t, mark: n = "start", ...r }) {
1512
1623
  let i = n === "end";
1513
- return /* @__PURE__ */ V(qn, {
1624
+ return /* @__PURE__ */ B(Qn, {
1514
1625
  "data-slot": "dropdown-menu-radio-item",
1515
- className: N("flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) py-1.5 pe-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", i ? "ps-2" : "ps-8", Or, e),
1626
+ className: N("flex cursor-default items-center gap-2 rounded-(--nxgt-item-radius) py-1.5 pe-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", i ? "ps-2" : "ps-8", Pr, e),
1516
1627
  ...r,
1517
- children: i ? /* @__PURE__ */ H(ke, { children: [t, /* @__PURE__ */ V("span", {
1628
+ children: i ? /* @__PURE__ */ V(Fe, { children: [t, /* @__PURE__ */ B("span", {
1518
1629
  className: "pointer-events-none ms-auto flex size-3.5 center",
1519
- children: /* @__PURE__ */ V(Jn, {
1630
+ children: /* @__PURE__ */ B($n, {
1520
1631
  forceMount: !0,
1521
- children: /* @__PURE__ */ V(_i, { kind: "check" })
1632
+ children: /* @__PURE__ */ B(ki, { kind: "check" })
1522
1633
  })
1523
- })] }) : /* @__PURE__ */ H(ke, { children: [/* @__PURE__ */ V("span", {
1634
+ })] }) : /* @__PURE__ */ V(Fe, { children: [/* @__PURE__ */ B("span", {
1524
1635
  className: "pointer-events-none absolute start-2 flex size-3.5 center",
1525
- children: /* @__PURE__ */ V(Jn, {
1636
+ children: /* @__PURE__ */ B($n, {
1526
1637
  forceMount: !0,
1527
- children: /* @__PURE__ */ V(_i, { kind: "dot" })
1638
+ children: /* @__PURE__ */ B(ki, { kind: "dot" })
1528
1639
  })
1529
1640
  }), t] })
1530
1641
  });
1531
1642
  }
1532
1643
  //#endregion
1533
1644
  //#region lib/components/ui/overlays/dropdown-menu/dropdown-menu.tsx
1534
- function xi(e) {
1535
- return /* @__PURE__ */ V(de, {
1645
+ function Ni(e) {
1646
+ return /* @__PURE__ */ B(ge, {
1536
1647
  value: e.modal ?? !1,
1537
- children: /* @__PURE__ */ V(Bn, {
1648
+ children: /* @__PURE__ */ B(Gn, {
1538
1649
  "data-slot": "dropdown-menu",
1539
1650
  modal: !1,
1540
1651
  ...e
1541
1652
  })
1542
1653
  });
1543
1654
  }
1544
- function Si({ className: e, ...t }) {
1545
- return /* @__PURE__ */ V(Vn, {
1655
+ function Pi({ className: e, ...t }) {
1656
+ return /* @__PURE__ */ B(Kn, {
1546
1657
  "data-slot": "dropdown-menu-trigger",
1547
1658
  "data-pw": t.name ?? "dropdown-menu",
1548
- className: N("transition-all focus:bg-primary/10 hover:bg-primary/10", ge, e),
1659
+ className: N("transition-all focus:bg-primary/10 hover:bg-primary/10", ye, e),
1549
1660
  ...t
1550
1661
  });
1551
1662
  }
1552
- function Ci({ className: e, sideOffset: t = 4, container: n, ref: r, ...i }) {
1553
- let a = j(!1, r);
1554
- return /* @__PURE__ */ V(ae, {
1663
+ function Fi({ className: e, sideOffset: t = 4, container: n, ref: r, ...i }) {
1664
+ let a = fe(!1, r);
1665
+ return /* @__PURE__ */ B(_e, {
1555
1666
  value: !1,
1556
- children: /* @__PURE__ */ V(Hn, {
1557
- container: h(n),
1558
- children: /* @__PURE__ */ V(Un, {
1667
+ children: /* @__PURE__ */ B(qn, {
1668
+ container: g(n),
1669
+ children: /* @__PURE__ */ B(Jn, {
1559
1670
  ref: a,
1560
1671
  "data-slot": "dropdown-menu-content",
1561
1672
  sideOffset: t,
@@ -1565,16 +1676,16 @@ function Ci({ className: e, sideOffset: t = 4, container: n, ref: r, ...i }) {
1565
1676
  })
1566
1677
  });
1567
1678
  }
1568
- function wi({ className: e, inset: t, ...n }) {
1569
- return /* @__PURE__ */ V(Wn, {
1679
+ function Ii({ className: e, inset: t, ...n }) {
1680
+ return /* @__PURE__ */ B(Yn, {
1570
1681
  "data-slot": "dropdown-menu-label",
1571
1682
  "data-inset": t,
1572
1683
  className: N("px-2 py-1.5 text-xs font-medium data-[inset]:ps-8 text-muted-foreground", e),
1573
1684
  ...n
1574
1685
  });
1575
1686
  }
1576
- function Ti({ className: e, ...t }) {
1577
- return /* @__PURE__ */ V(Yn, {
1687
+ function Li({ className: e, ...t }) {
1688
+ return /* @__PURE__ */ B(er, {
1578
1689
  "data-slot": "dropdown-menu-separator",
1579
1690
  className: N("bg-border -mx-1 my-1 h-px", e),
1580
1691
  ...t
@@ -1582,18 +1693,18 @@ function Ti({ className: e, ...t }) {
1582
1693
  }
1583
1694
  //#endregion
1584
1695
  //#region lib/lib/adopt-styles.ts
1585
- function Ei(e, t) {
1586
- let n = Di.get(e) ?? /* @__PURE__ */ new Map();
1587
- Di.set(e, n);
1696
+ function Ri(e, t) {
1697
+ let n = zi.get(e) ?? /* @__PURE__ */ new Map();
1698
+ zi.set(e, n);
1588
1699
  let r = n.get(t);
1589
1700
  if (r) return r;
1590
- let i = Oi(e, t), a = () => {
1701
+ let i = Bi(e, t), a = () => {
1591
1702
  i(), n.delete(t);
1592
1703
  };
1593
1704
  return n.set(t, a), a;
1594
1705
  }
1595
- var Di = /* @__PURE__ */ new WeakMap();
1596
- function Oi(e, t) {
1706
+ var zi = /* @__PURE__ */ new WeakMap();
1707
+ function Bi(e, t) {
1597
1708
  let n = new CSSStyleSheet();
1598
1709
  return n.replaceSync(t), e.adoptedStyleSheets = [...e.adoptedStyleSheets, n], () => {
1599
1710
  e.adoptedStyleSheets = e.adoptedStyleSheets.filter((e) => e !== n);
@@ -1601,36 +1712,36 @@ function Oi(e, t) {
1601
1712
  }
1602
1713
  //#endregion
1603
1714
  //#region lib/hooks/resolve-theme.ts
1604
- function ki(e, t, n = "system") {
1715
+ function Vi(e, t, n = "system") {
1605
1716
  let r = e === "light" || e === "dark" || e === "system" ? e : n;
1606
1717
  return {
1607
1718
  theme: r === "system" ? t ? "dark" : "light" : r,
1608
1719
  preference: r
1609
1720
  };
1610
1721
  }
1611
- function Ai(e) {
1612
- typeof document > "u" || (document.documentElement.classList.toggle("dark", e === "dark"), document.documentElement.style.colorScheme = e, Ie(e));
1722
+ function Hi(e) {
1723
+ typeof document > "u" || (document.documentElement.classList.toggle("dark", e === "dark"), document.documentElement.style.colorScheme = e, He(e));
1613
1724
  }
1614
- var ji = Pe;
1615
- function Mi(e, t, n) {
1616
- return typeof e != "string" || !Fe.test(e) || t && !t.includes(e) ? n : e;
1725
+ var Ui = Be;
1726
+ function Wi(e, t, n) {
1727
+ return typeof e != "string" || !Ve.test(e) || t && !t.includes(e) ? n : e;
1617
1728
  }
1618
- function Ni(e) {
1729
+ function Gi(e) {
1619
1730
  if (typeof document > "u") return;
1620
1731
  let t = document.documentElement;
1621
- e === ji ? t.removeAttribute("data-nxgt-theme") : t.setAttribute("data-nxgt-theme", e);
1732
+ e === Ui ? t.removeAttribute("data-nxgt-theme") : t.setAttribute("data-nxgt-theme", e);
1622
1733
  }
1623
1734
  //#endregion
1624
1735
  //#region lib/lib/warn-once.ts
1625
- var Pi = /* @__PURE__ */ new Set();
1626
- function Fi(e, t) {
1736
+ var Ki = /* @__PURE__ */ new Set();
1737
+ function qi(e, t) {
1627
1738
  let n = `[@softistx/material] ${t}: ${e}`;
1628
- be() || Pi.has(n) || (Pi.add(n), console.warn(n));
1739
+ we() || Ki.has(n) || (Ki.add(n), console.warn(n));
1629
1740
  }
1630
1741
  //#endregion
1631
1742
  //#region lib/hooks/theme-store.ts
1632
- var Ii = "theme", Li = "nxgt-theme";
1633
- function Ri(e, t) {
1743
+ var Ji = "theme", Yi = "nxgt-theme";
1744
+ function Xi(e, t) {
1634
1745
  let n = /* @__PURE__ */ new Set(), r;
1635
1746
  function i() {
1636
1747
  let t = l(e);
@@ -1667,16 +1778,16 @@ function Ri(e, t) {
1667
1778
  }
1668
1779
  };
1669
1780
  }
1670
- var zi = Ri(Ii), Bi = {
1671
- subscribe: zi.subscribe,
1672
- getSnapshot: zi.getSnapshot,
1673
- getServerSnapshot: zi.getServerSnapshot,
1781
+ var Zi = Xi(Ji), Qi = {
1782
+ subscribe: Zi.subscribe,
1783
+ getSnapshot: Zi.getSnapshot,
1784
+ getServerSnapshot: Zi.getServerSnapshot,
1674
1785
  set(e, t = "system") {
1675
- zi.write(e === "system" && t === "system" ? void 0 : e);
1786
+ Zi.write(e === "system" && t === "system" ? void 0 : e);
1676
1787
  }
1677
- }, Q, $ = Ri(Li, () => {
1678
- Q || Ni(Mi($.getSnapshot(), void 0, ji));
1679
- }), Vi = {
1788
+ }, Q, $ = Xi(Yi, () => {
1789
+ Q || Gi(Wi($.getSnapshot(), void 0, Ui));
1790
+ }), $i = {
1680
1791
  subscribe: $.subscribe,
1681
1792
  getSnapshot: $.getSnapshot,
1682
1793
  getServerSnapshot: $.getServerSnapshot,
@@ -1687,70 +1798,70 @@ var zi = Ri(Ii), Bi = {
1687
1798
  },
1688
1799
  set(e) {
1689
1800
  if (Q && !Q.known.includes(e)) {
1690
- Fi(`setThemeName("${e}") ignored: not one of its themes (${Q.known.join(", ")}).`, "NxgtThemeProvider");
1801
+ qi(`setThemeName("${e}") ignored: not one of its themes (${Q.known.join(", ")}).`, "NxgtThemeProvider");
1691
1802
  return;
1692
1803
  }
1693
- $.write(e), Q || Ni(e);
1804
+ $.write(e), Q || Gi(e);
1694
1805
  }
1695
- }, Hi = () => typeof window < "u" && typeof window.matchMedia == "function", Ui = () => null;
1696
- function Wi(e) {
1697
- return B(I((t) => {
1698
- if (!Hi()) return () => {};
1806
+ }, ea = () => typeof window < "u" && typeof window.matchMedia == "function", ta = () => null;
1807
+ function na(e) {
1808
+ return z(Ae((t) => {
1809
+ if (!ea()) return () => {};
1699
1810
  let n = window.matchMedia(e);
1700
1811
  return n.addEventListener("change", t), () => n.removeEventListener("change", t);
1701
- }, [e]), () => Hi() ? window.matchMedia(e).matches : null, Ui);
1812
+ }, [e]), () => ea() ? window.matchMedia(e).matches : null, ta);
1702
1813
  }
1703
1814
  //#endregion
1704
1815
  //#region lib/hooks/use-ssr-media-query.ts
1705
- function Gi(e, t) {
1706
- return Wi(e) ?? t;
1816
+ function ra(e, t) {
1817
+ return na(e) ?? t;
1707
1818
  }
1708
1819
  //#endregion
1709
1820
  //#region lib/themes/theme-context.ts
1710
- var Ki = F(null), qi = F(null), Ji = {
1821
+ var ia = F(null), aa = F(null), oa = {
1711
1822
  preset: "gradient",
1712
1823
  tone: "primary",
1713
1824
  intensity: "default"
1714
1825
  };
1715
1826
  //#endregion
1716
1827
  //#region lib/themes/theme-value.ts
1717
- function Yi(e, t, n) {
1828
+ function sa(e, t, n) {
1718
1829
  return {
1719
1830
  name: e,
1720
1831
  theme: t,
1721
- background: t?.background === !1 ? !1 : t?.background ?? Ji,
1832
+ background: t?.background === !1 ? !1 : t?.background ?? oa,
1722
1833
  defaultMode: n
1723
1834
  };
1724
1835
  }
1725
1836
  //#endregion
1726
1837
  //#region lib/themes/nxgt-theme-provider.tsx
1727
- var Xi = () => () => {}, Zi = () => B(Xi, () => !1, () => !0);
1728
- function Qi({ themes: e = Ne, defaultTheme: t = ji, defaultMode: n, children: r }) {
1729
- let i = B(Vi.subscribe, Vi.getSnapshot, Vi.getServerSnapshot), a = Zi(), o = De(() => e.map((e) => e.name), [e]);
1730
- !be() && !o.includes(t) && Fi(`defaultTheme "${t}" is not in themes (${o.join(", ")}).`, "NxgtThemeProvider");
1731
- let s = Mi(i, o, t), c = e.find((e) => e.name === s), l = n ?? c?.colorScheme ?? "system";
1732
- Ee(() => Vi.claim({
1838
+ var ca = () => () => {}, la = () => z(ca, () => !1, () => !0);
1839
+ function ua({ themes: e = ze, defaultTheme: t = Ui, defaultMode: n, children: r }) {
1840
+ let i = z($i.subscribe, $i.getSnapshot, $i.getServerSnapshot), a = la(), o = Ne(() => e.map((e) => e.name), [e]);
1841
+ !we() && !o.includes(t) && qi(`defaultTheme "${t}" is not in themes (${o.join(", ")}).`, "NxgtThemeProvider");
1842
+ let s = Wi(i, o, t), c = e.find((e) => e.name === s), l = n ?? c?.colorScheme ?? "system";
1843
+ Me(() => $i.claim({
1733
1844
  known: o,
1734
1845
  fallback: t
1735
- }), [o, t]), R(() => {
1736
- a || Ni(s);
1846
+ }), [o, t]), L(() => {
1847
+ a || Gi(s);
1737
1848
  }, [s, a]);
1738
- let u = ki(B(Bi.subscribe, Bi.getSnapshot, Bi.getServerSnapshot), Gi("(prefers-color-scheme: dark)", !1), l).theme;
1739
- R(() => {
1740
- a || Ai(u);
1849
+ let u = Vi(z(Qi.subscribe, Qi.getSnapshot, Qi.getServerSnapshot), ra("(prefers-color-scheme: dark)", !1), l).theme;
1850
+ L(() => {
1851
+ a || Hi(u);
1741
1852
  }, [u, a]);
1742
- let d = De(() => Yi(s, c, l), [
1853
+ let d = Ne(() => sa(s, c, l), [
1743
1854
  s,
1744
1855
  c,
1745
1856
  l
1746
1857
  ]);
1747
- return /* @__PURE__ */ V(Ki.Provider, {
1858
+ return /* @__PURE__ */ B(ia.Provider, {
1748
1859
  value: e,
1749
- children: /* @__PURE__ */ V(qi.Provider, {
1860
+ children: /* @__PURE__ */ B(aa.Provider, {
1750
1861
  value: d,
1751
1862
  children: r
1752
1863
  })
1753
1864
  });
1754
1865
  }
1755
1866
  //#endregion
1756
- export { Tr as C, Er as S, Qn as T, ai as _, wi as a, Fr as b, vi as c, pi as d, ci as f, si as g, li as h, Ci as i, yi as l, fi as m, Ei as n, Ti as o, ui as p, xi as r, Si as s, Qi as t, bi as u, ii as v, cr as w, Mr as x, oi as y };
1867
+ export { or as A, Ke as B, Zr as C, Ar as D, Mr as E, ft as F, nt as I, et as L, Je as M, mt as N, jr as O, at as P, ut as R, ei as S, Vr as T, _i as _, Ii as a, ai as b, Ai as c, Ti as d, bi as f, yi as g, xi as h, Fi as i, rr as j, pr as k, ji as l, wi as m, Ri as n, Li as o, Si as p, Ni as r, Pi as s, ua as t, Mi as u, gi as v, Jr as w, oi as x, vi as y, Xe as z };