lucent-ui 0.42.0 → 0.43.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.
- package/dist/index.cjs +22 -22
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1118 -1068
- package/dist-cli/cli/entry.js +0 -0
- package/dist-cli/cli/index.js +0 -0
- package/dist-server/server/http.js +0 -0
- package/dist-server/server/index.js +0 -0
- package/package.json +15 -13
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as Ce, T as
|
|
2
|
-
import { b as ps, C as hs, c as fs, L as ms, S as gs, d as vs, e as bs, f as ys, h as xs, i as ws, j as ks, k as Ss, l as Ts, m as Cs, n as Is, o as Ms, p as zs, q as As, r as Es, t as qs, u as Bs, v as Ds, w as
|
|
1
|
+
import { s as Ce, T as G, I as jt, B as fe, g as sn, a as Oe } from "./LucentProvider-tSCR4lQw.js";
|
|
2
|
+
import { b as ps, C as hs, c as fs, L as ms, S as gs, d as vs, e as bs, f as ys, h as xs, i as ws, j as ks, k as Ss, l as Ts, m as Cs, n as Is, o as Ms, p as zs, q as As, r as Es, t as qs, u as Bs, v as Ds, w as Ls, x as Ps, y as Rs, z as $s, A as Ns, D as Fs, E as Ws, F as Vs, G as Os, H as Hs, J as Us, K as js, M as Gs, N as _s, O as Ys, P as Ks, Q as Xs, R as Zs, U as Js, V as Qs, W as el, X as tl, Y as nl, Z as rl, _ as al, $ as ol } from "./LucentProvider-tSCR4lQw.js";
|
|
3
3
|
import { jsxs as g, jsx as t, Fragment as Z } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as Gt, useRef as
|
|
4
|
+
import { forwardRef as Gt, useRef as O, useEffect as U, useState as q, useCallback as X, useContext as ne, createContext as Ie, useLayoutEffect as re, useId as at, Children as ln, isValidElement as cn, cloneElement as dn } from "react";
|
|
5
5
|
import { createPortal as ie } from "react-dom";
|
|
6
6
|
const Io = {
|
|
7
7
|
id: "button",
|
|
@@ -241,14 +241,14 @@ const Io = {
|
|
|
241
241
|
md: "var(--lucent-space-4)",
|
|
242
242
|
lg: "var(--lucent-space-4)"
|
|
243
243
|
}, fn = Gt(
|
|
244
|
-
({ label: e, helperText: r, errorText: n, autoResize: i = !1, maxLength: a, showCount: o = !1, size: l = "md", id: s, value: c, onChange: u, disabled: p, style: h, ...w },
|
|
245
|
-
const m =
|
|
246
|
-
|
|
244
|
+
({ label: e, helperText: r, errorText: n, autoResize: i = !1, maxLength: a, showCount: o = !1, size: l = "md", id: s, value: c, onChange: u, disabled: p, style: h, ...w }, v) => {
|
|
245
|
+
const m = O(null), f = v ?? m, d = s ?? `lucent-textarea-${Math.random().toString(36).slice(2, 7)}`, y = !!n, x = !!p, k = typeof c == "string" ? c.length : 0;
|
|
246
|
+
U(() => {
|
|
247
247
|
if (!i) return;
|
|
248
|
-
const
|
|
249
|
-
|
|
248
|
+
const S = f.current;
|
|
249
|
+
S && (S.style.height = "auto", S.style.height = `${S.scrollHeight}px`);
|
|
250
250
|
}, [c, i, f]);
|
|
251
|
-
const
|
|
251
|
+
const I = x ? "transparent" : y ? "var(--lucent-danger-default)" : "var(--lucent-border-default)";
|
|
252
252
|
return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%" }, children: [
|
|
253
253
|
e && /* @__PURE__ */ t("label", { htmlFor: d, style: {
|
|
254
254
|
fontSize: pn[l],
|
|
@@ -275,7 +275,7 @@ const Io = {
|
|
|
275
275
|
fontFamily: "var(--lucent-font-family-base)",
|
|
276
276
|
color: x ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
277
277
|
background: x ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
|
|
278
|
-
border: `1px solid ${
|
|
278
|
+
border: `1px solid ${I}`,
|
|
279
279
|
borderRadius: "var(--lucent-radius-lg)",
|
|
280
280
|
outline: "none",
|
|
281
281
|
resize: i ? "none" : "vertical",
|
|
@@ -288,21 +288,21 @@ const Io = {
|
|
|
288
288
|
].join(", "),
|
|
289
289
|
...h
|
|
290
290
|
},
|
|
291
|
-
onMouseEnter: (
|
|
292
|
-
var
|
|
293
|
-
!x &&
|
|
291
|
+
onMouseEnter: (S) => {
|
|
292
|
+
var b;
|
|
293
|
+
!x && S.currentTarget !== document.activeElement && (S.currentTarget.style.borderColor = y ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (b = w.onMouseEnter) == null || b.call(w, S);
|
|
294
294
|
},
|
|
295
|
-
onMouseLeave: (
|
|
296
|
-
var
|
|
297
|
-
!x &&
|
|
295
|
+
onMouseLeave: (S) => {
|
|
296
|
+
var b;
|
|
297
|
+
!x && S.currentTarget !== document.activeElement && (S.currentTarget.style.borderColor = y ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (b = w.onMouseLeave) == null || b.call(w, S);
|
|
298
298
|
},
|
|
299
|
-
onFocus: (
|
|
300
|
-
var
|
|
301
|
-
x || (
|
|
299
|
+
onFocus: (S) => {
|
|
300
|
+
var b;
|
|
301
|
+
x || (S.currentTarget.style.borderColor = y ? "var(--lucent-danger-default)" : "var(--lucent-accent-border)", S.currentTarget.style.boxShadow = `0 0 0 3px ${y ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (b = w.onFocus) == null || b.call(w, S));
|
|
302
302
|
},
|
|
303
|
-
onBlur: (
|
|
304
|
-
var
|
|
305
|
-
x || (
|
|
303
|
+
onBlur: (S) => {
|
|
304
|
+
var b;
|
|
305
|
+
x || (S.currentTarget.style.borderColor = y ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", S.currentTarget.style.boxShadow = "none", (b = w.onBlur) == null || b.call(w, S));
|
|
306
306
|
},
|
|
307
307
|
...w
|
|
308
308
|
}
|
|
@@ -314,12 +314,12 @@ const Io = {
|
|
|
314
314
|
] }),
|
|
315
315
|
(o || a) && /* @__PURE__ */ g("span", { style: {
|
|
316
316
|
fontSize: "var(--lucent-font-size-xs)",
|
|
317
|
-
color: a &&
|
|
317
|
+
color: a && k >= a ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)",
|
|
318
318
|
fontFamily: "var(--lucent-font-family-mono)",
|
|
319
319
|
flexShrink: 0,
|
|
320
320
|
marginLeft: "var(--lucent-space-2)"
|
|
321
321
|
}, children: [
|
|
322
|
-
|
|
322
|
+
k,
|
|
323
323
|
a ? `/${a}` : ""
|
|
324
324
|
] })
|
|
325
325
|
] })
|
|
@@ -461,7 +461,7 @@ const zo = {
|
|
|
461
461
|
0% { transform: scale(1); opacity: 0.6; }
|
|
462
462
|
100% { transform: scale(2.8); opacity: 0; }
|
|
463
463
|
}`;
|
|
464
|
-
function
|
|
464
|
+
function Pe({
|
|
465
465
|
children: e,
|
|
466
466
|
variant: r = "neutral",
|
|
467
467
|
size: n = "md",
|
|
@@ -476,34 +476,34 @@ function Le({
|
|
|
476
476
|
disabled: h = !1,
|
|
477
477
|
style: w
|
|
478
478
|
}) {
|
|
479
|
-
const
|
|
479
|
+
const v = mn[r], m = gn[n], [f, d] = q(!1), y = s && c, x = s && !e, k = !h && (i || a), I = `color-mix(in srgb, ${v.color} 8%, transparent)`, S = m.dotSize * 3, b = {
|
|
480
480
|
display: "inline-flex",
|
|
481
481
|
alignItems: "center",
|
|
482
482
|
justifyContent: x ? "center" : void 0,
|
|
483
483
|
gap: x ? void 0 : m.gap,
|
|
484
|
-
height: x ?
|
|
485
|
-
width: x ?
|
|
484
|
+
height: x ? S : m.height,
|
|
485
|
+
width: x ? S : void 0,
|
|
486
486
|
padding: x ? 0 : i ? m.paddingDismiss : m.padding,
|
|
487
487
|
fontSize: m.fontSize,
|
|
488
488
|
fontFamily: "var(--lucent-font-family-base)",
|
|
489
489
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
490
490
|
lineHeight: 1,
|
|
491
491
|
borderRadius: x ? "var(--lucent-radius-full)" : "var(--lucent-radius-lg)",
|
|
492
|
-
background: p ? f &&
|
|
493
|
-
color:
|
|
494
|
-
border: p || u ? "1px solid transparent" : `1px solid ${f &&
|
|
492
|
+
background: p ? f && k ? I : "transparent" : f && k ? v.hoverBg : v.bg,
|
|
493
|
+
color: v.color,
|
|
494
|
+
border: p || u ? "1px solid transparent" : `1px solid ${f && k ? v.hoverBorder : v.border}`,
|
|
495
495
|
whiteSpace: "nowrap",
|
|
496
496
|
boxSizing: "border-box",
|
|
497
497
|
opacity: h ? 0.5 : 1,
|
|
498
|
-
transform: f &&
|
|
499
|
-
boxShadow: f &&
|
|
498
|
+
transform: f && k ? "translateY(-1px)" : "none",
|
|
499
|
+
boxShadow: f && k && !p ? `0 2px 4px ${v.hoverBorder}22` : "none",
|
|
500
500
|
transition: [
|
|
501
501
|
"transform var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
502
502
|
"box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
503
503
|
"border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
504
504
|
"background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
505
505
|
].join(", "),
|
|
506
|
-
cursor:
|
|
506
|
+
cursor: k ? "pointer" : "default",
|
|
507
507
|
// Reset button styles when onClick
|
|
508
508
|
...a ? { outline: "none" } : {},
|
|
509
509
|
...w
|
|
@@ -573,7 +573,7 @@ function Le({
|
|
|
573
573
|
children: /* @__PURE__ */ t("svg", { width: m.iconSize - 2, height: m.iconSize - 2, viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", children: /* @__PURE__ */ t("path", { d: "M2 2L8 8M8 2L2 8" }) })
|
|
574
574
|
}
|
|
575
575
|
)
|
|
576
|
-
] }),
|
|
576
|
+
] }), T = {
|
|
577
577
|
onMouseEnter: () => {
|
|
578
578
|
h || d(!0);
|
|
579
579
|
},
|
|
@@ -585,11 +585,11 @@ function Le({
|
|
|
585
585
|
type: "button",
|
|
586
586
|
onClick: h ? void 0 : a,
|
|
587
587
|
disabled: h,
|
|
588
|
-
style:
|
|
589
|
-
...
|
|
588
|
+
style: b,
|
|
589
|
+
...T,
|
|
590
590
|
children: E
|
|
591
591
|
}
|
|
592
|
-
) : /* @__PURE__ */ t("span", { style:
|
|
592
|
+
) : /* @__PURE__ */ t("span", { style: b, ...T, children: E });
|
|
593
593
|
}
|
|
594
594
|
const Eo = {
|
|
595
595
|
id: "chip",
|
|
@@ -843,7 +843,7 @@ function Tn({ orientation: e = "horizontal", label: r, spacing: n = "0", style:
|
|
|
843
843
|
}
|
|
844
844
|
);
|
|
845
845
|
}
|
|
846
|
-
const
|
|
846
|
+
const Lo = {
|
|
847
847
|
id: "divider",
|
|
848
848
|
name: "Divider",
|
|
849
849
|
tier: "atom",
|
|
@@ -893,22 +893,22 @@ const Po = {
|
|
|
893
893
|
style: p,
|
|
894
894
|
...h
|
|
895
895
|
}, w) => {
|
|
896
|
-
const
|
|
897
|
-
|
|
898
|
-
!s &&
|
|
899
|
-
}, [
|
|
896
|
+
const v = O(null), m = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, f = Cn[r], d = o !== void 0, [y, x] = q(l ?? !1), k = d ? !!o : y, I = O(k), [S, b] = q(0);
|
|
897
|
+
U(() => {
|
|
898
|
+
!s && I.current !== k && (I.current = k, b((R) => R + 1));
|
|
899
|
+
}, [k, s]);
|
|
900
900
|
const E = X(
|
|
901
|
-
(
|
|
902
|
-
|
|
901
|
+
(R) => {
|
|
902
|
+
v.current = R, typeof w == "function" ? w(R) : w && (w.current = R);
|
|
903
903
|
},
|
|
904
904
|
[w]
|
|
905
905
|
);
|
|
906
|
-
|
|
907
|
-
|
|
906
|
+
U(() => {
|
|
907
|
+
v.current && (v.current.indeterminate = n);
|
|
908
908
|
}, [n]);
|
|
909
|
-
const
|
|
910
|
-
d || x(
|
|
911
|
-
}, z = s ? "var(--lucent-text-disabled)" : "var(--lucent-accent-fg)",
|
|
909
|
+
const T = (R) => {
|
|
910
|
+
d || x(R.target.checked), u == null || u(R);
|
|
911
|
+
}, z = s ? "var(--lucent-text-disabled)" : "var(--lucent-accent-fg)", D = {
|
|
912
912
|
width: f,
|
|
913
913
|
height: f,
|
|
914
914
|
// fixed corner so global radius overrides (e.g. via customizer) don't
|
|
@@ -916,16 +916,16 @@ const Po = {
|
|
|
916
916
|
// rounded regardless of theming.
|
|
917
917
|
// bumping up a bit to keep the box from feeling too sharp.
|
|
918
918
|
borderRadius: "4px",
|
|
919
|
-
border: `1.5px solid ${s ? "transparent" :
|
|
920
|
-
background: s ? "var(--lucent-surface-secondary)" :
|
|
919
|
+
border: `1.5px solid ${s ? "transparent" : k || n ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
|
|
920
|
+
background: s ? "var(--lucent-surface-secondary)" : k || n ? "var(--lucent-accent-default)" : "var(--lucent-surface)",
|
|
921
921
|
display: "inline-flex",
|
|
922
922
|
alignItems: "center",
|
|
923
923
|
justifyContent: "center",
|
|
924
924
|
flexShrink: 0,
|
|
925
925
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
926
926
|
// Re-key forces the animation to restart on every toggle.
|
|
927
|
-
animation:
|
|
928
|
-
},
|
|
927
|
+
animation: S > 0 ? "lucent-cb-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
928
|
+
}, P = /* @__PURE__ */ g(
|
|
929
929
|
"label",
|
|
930
930
|
{
|
|
931
931
|
style: {
|
|
@@ -948,13 +948,13 @@ const Po = {
|
|
|
948
948
|
id: m,
|
|
949
949
|
checked: d ? o : y,
|
|
950
950
|
disabled: s,
|
|
951
|
-
onChange:
|
|
951
|
+
onChange: T,
|
|
952
952
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
953
953
|
...h
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
|
-
/* @__PURE__ */ g("span", { "aria-hidden": !0, style:
|
|
957
|
-
|
|
956
|
+
/* @__PURE__ */ g("span", { "aria-hidden": !0, style: D, children: [
|
|
957
|
+
k && !n && /* @__PURE__ */ t(
|
|
958
958
|
"svg",
|
|
959
959
|
{
|
|
960
960
|
width: f - 4,
|
|
@@ -976,7 +976,7 @@ const Po = {
|
|
|
976
976
|
children: /* @__PURE__ */ t("path", { d: "M2 5H8", stroke: z, strokeWidth: 1.5, strokeLinecap: "round" })
|
|
977
977
|
}
|
|
978
978
|
)
|
|
979
|
-
] },
|
|
979
|
+
] }, S),
|
|
980
980
|
(e || a) && /* @__PURE__ */ g("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
981
981
|
e && /* @__PURE__ */ t("span", { style: {
|
|
982
982
|
fontWeight: a ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1003,23 +1003,23 @@ const Po = {
|
|
|
1003
1003
|
padding: a ? "var(--lucent-space-3)" : "0 var(--lucent-space-3)",
|
|
1004
1004
|
display: "flex",
|
|
1005
1005
|
alignItems: a ? "flex-start" : "center",
|
|
1006
|
-
background:
|
|
1006
|
+
background: k && !s ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "transparent",
|
|
1007
1007
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1008
1008
|
cursor: s ? "not-allowed" : "pointer",
|
|
1009
1009
|
...p
|
|
1010
1010
|
},
|
|
1011
|
-
onClick: (
|
|
1012
|
-
var
|
|
1013
|
-
s ||
|
|
1011
|
+
onClick: (R) => {
|
|
1012
|
+
var H;
|
|
1013
|
+
s || R.target === R.currentTarget && ((H = v.current) == null || H.click());
|
|
1014
1014
|
},
|
|
1015
|
-
children:
|
|
1015
|
+
children: P
|
|
1016
1016
|
}
|
|
1017
|
-
) :
|
|
1017
|
+
) : P
|
|
1018
1018
|
] });
|
|
1019
1019
|
}
|
|
1020
1020
|
);
|
|
1021
1021
|
pt.displayName = "Checkbox";
|
|
1022
|
-
const
|
|
1022
|
+
const Po = {
|
|
1023
1023
|
id: "checkbox",
|
|
1024
1024
|
name: "Checkbox",
|
|
1025
1025
|
tier: "atom",
|
|
@@ -1146,22 +1146,22 @@ const En = { sm: 14, md: 16, lg: 20 }, qn = { sm: "calc(var(--lucent-space-8) *
|
|
|
1146
1146
|
lg: "var(--lucent-font-size-md)"
|
|
1147
1147
|
};
|
|
1148
1148
|
function Ro({ value: e, label: r, size: n = "md", contained: i = !1, helperText: a, disabled: o, id: l, onChange: s, checked: c, style: u, ...p }) {
|
|
1149
|
-
const h = ne(_t), w = l ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`,
|
|
1150
|
-
|
|
1149
|
+
const h = ne(_t), w = l ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, v = En[n], m = o ?? (h == null ? void 0 : h.disabled) ?? !1, f = h ? h.value === e : !!c, d = O(f), [y, x] = q(0);
|
|
1150
|
+
U(() => {
|
|
1151
1151
|
!m && d.current !== f && (d.current = f, x((E) => E + 1));
|
|
1152
1152
|
}, [f, m]);
|
|
1153
|
-
const
|
|
1153
|
+
const k = (E) => {
|
|
1154
1154
|
h == null || h.onChange(e), s == null || s(E);
|
|
1155
|
-
},
|
|
1156
|
-
width:
|
|
1157
|
-
height:
|
|
1155
|
+
}, I = {
|
|
1156
|
+
width: v / 2,
|
|
1157
|
+
height: v / 2,
|
|
1158
1158
|
borderRadius: "50%",
|
|
1159
1159
|
background: m ? "var(--lucent-text-disabled)" : "var(--lucent-accent-fg)",
|
|
1160
1160
|
animation: f ? "lucent-radio-dot 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0,
|
|
1161
1161
|
opacity: f ? 1 : 0
|
|
1162
|
-
},
|
|
1163
|
-
width:
|
|
1164
|
-
height:
|
|
1162
|
+
}, S = {
|
|
1163
|
+
width: v,
|
|
1164
|
+
height: v,
|
|
1165
1165
|
borderRadius: "50%",
|
|
1166
1166
|
border: `1.5px solid ${m ? "transparent" : f ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
|
|
1167
1167
|
background: m ? "var(--lucent-surface-secondary)" : f ? "var(--lucent-accent-default)" : "var(--lucent-surface)",
|
|
@@ -1171,7 +1171,7 @@ function Ro({ value: e, label: r, size: n = "md", contained: i = !1, helperText:
|
|
|
1171
1171
|
flexShrink: 0,
|
|
1172
1172
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1173
1173
|
animation: y > 0 ? "lucent-radio-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
1174
|
-
},
|
|
1174
|
+
}, b = /* @__PURE__ */ g(
|
|
1175
1175
|
"label",
|
|
1176
1176
|
{
|
|
1177
1177
|
style: {
|
|
@@ -1195,12 +1195,12 @@ function Ro({ value: e, label: r, size: n = "md", contained: i = !1, helperText:
|
|
|
1195
1195
|
name: (h == null ? void 0 : h.name) ?? p.name,
|
|
1196
1196
|
checked: f,
|
|
1197
1197
|
disabled: m,
|
|
1198
|
-
onChange:
|
|
1198
|
+
onChange: k,
|
|
1199
1199
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
1200
1200
|
...p
|
|
1201
1201
|
}
|
|
1202
1202
|
),
|
|
1203
|
-
/* @__PURE__ */ t("span", { "aria-hidden": !0, style:
|
|
1203
|
+
/* @__PURE__ */ t("span", { "aria-hidden": !0, style: S, children: /* @__PURE__ */ t("span", { style: I }) }, y),
|
|
1204
1204
|
r || a ? /* @__PURE__ */ g("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
1205
1205
|
r && /* @__PURE__ */ t("span", { style: {
|
|
1206
1206
|
fontWeight: a ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1231,13 +1231,13 @@ function Ro({ value: e, label: r, size: n = "md", contained: i = !1, helperText:
|
|
|
1231
1231
|
},
|
|
1232
1232
|
onClick: (E) => {
|
|
1233
1233
|
if (!m && E.target === E.currentTarget) {
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1234
|
+
const T = E.currentTarget.querySelector("input");
|
|
1235
|
+
T == null || T.click();
|
|
1236
1236
|
}
|
|
1237
1237
|
},
|
|
1238
|
-
children:
|
|
1238
|
+
children: b
|
|
1239
1239
|
}
|
|
1240
|
-
) :
|
|
1240
|
+
) : b
|
|
1241
1241
|
] });
|
|
1242
1242
|
}
|
|
1243
1243
|
function $o({
|
|
@@ -1547,13 +1547,13 @@ const No = {
|
|
|
1547
1547
|
warning: { bg: "var(--lucent-warning-subtle)", color: "var(--lucent-warning-text)", border: "var(--lucent-warning-subtle)", dismissHover: "var(--lucent-warning-default)" },
|
|
1548
1548
|
danger: { bg: "var(--lucent-danger-subtle)", color: "var(--lucent-danger-text)", border: "var(--lucent-danger-subtle)", dismissHover: "var(--lucent-danger-default)" },
|
|
1549
1549
|
info: { bg: "var(--lucent-info-subtle)", color: "var(--lucent-info-text)", border: "var(--lucent-info-subtle)", dismissHover: "var(--lucent-info-default)" }
|
|
1550
|
-
},
|
|
1550
|
+
}, Ln = {
|
|
1551
1551
|
sm: { fontSize: "var(--lucent-font-size-xs)", height: "20px", padding: "0 var(--lucent-space-3)", iconSize: 10, gap: "var(--lucent-space-1)" },
|
|
1552
1552
|
md: { fontSize: "var(--lucent-font-size-sm)", height: "24px", padding: "0 var(--lucent-space-3)", iconSize: 12, gap: "var(--lucent-space-1)" },
|
|
1553
1553
|
lg: { fontSize: "var(--lucent-font-size-md)", height: "28px", padding: "0 var(--lucent-space-4)", iconSize: 14, gap: "var(--lucent-space-2)" }
|
|
1554
1554
|
};
|
|
1555
1555
|
function Vo({ children: e, variant: r = "neutral", size: n = "md", onDismiss: i, disabled: a }) {
|
|
1556
|
-
const o = Dn[r], l =
|
|
1556
|
+
const o = Dn[r], l = Ln[n], [s, c] = q(!1), u = !a && i;
|
|
1557
1557
|
return /* @__PURE__ */ g(
|
|
1558
1558
|
"span",
|
|
1559
1559
|
{
|
|
@@ -1679,7 +1679,7 @@ const Oo = {
|
|
|
1679
1679
|
notes: 'The dismiss button has aria-label="Dismiss" and is keyboard-focusable.',
|
|
1680
1680
|
keyboardInteractions: ["Enter / Space — activates the dismiss button when focused"]
|
|
1681
1681
|
}
|
|
1682
|
-
}, J = 5, Ae = J + 3,
|
|
1682
|
+
}, J = 5, Ae = J + 3, Pn = {
|
|
1683
1683
|
top: {
|
|
1684
1684
|
bottom: -J,
|
|
1685
1685
|
left: "50%",
|
|
@@ -1710,32 +1710,32 @@ const Oo = {
|
|
|
1710
1710
|
}
|
|
1711
1711
|
};
|
|
1712
1712
|
function Ne({ content: e, children: r, placement: n = "top", delay: i = 300, open: a, interactive: o = !1 }) {
|
|
1713
|
-
const [l, s] = q(!1), c = a !== void 0 ? a : l, u =
|
|
1713
|
+
const [l, s] = q(!1), c = a !== void 0 ? a : l, u = O(null), p = O(null), h = O(null), [w, v] = q(null), m = () => {
|
|
1714
1714
|
p.current && (clearTimeout(p.current), p.current = null);
|
|
1715
1715
|
}, f = () => {
|
|
1716
1716
|
m(), u.current = setTimeout(() => s(!0), i);
|
|
1717
1717
|
}, d = () => {
|
|
1718
1718
|
u.current && clearTimeout(u.current), o ? p.current = setTimeout(() => s(!1), 100) : s(!1);
|
|
1719
1719
|
}, y = X(() => {
|
|
1720
|
-
const
|
|
1721
|
-
if (!
|
|
1722
|
-
const
|
|
1720
|
+
const k = h.current;
|
|
1721
|
+
if (!k) return;
|
|
1722
|
+
const I = k.getBoundingClientRect(), S = I.left + I.width / 2, b = I.top + I.height / 2;
|
|
1723
1723
|
switch (n) {
|
|
1724
1724
|
case "top":
|
|
1725
|
-
|
|
1725
|
+
v({ top: I.top - Ae, left: S });
|
|
1726
1726
|
break;
|
|
1727
1727
|
case "bottom":
|
|
1728
|
-
|
|
1728
|
+
v({ top: I.bottom + Ae, left: S });
|
|
1729
1729
|
break;
|
|
1730
1730
|
case "left":
|
|
1731
|
-
|
|
1731
|
+
v({ top: b, left: I.left - Ae });
|
|
1732
1732
|
break;
|
|
1733
1733
|
case "right":
|
|
1734
|
-
|
|
1734
|
+
v({ top: b, left: I.right + Ae });
|
|
1735
1735
|
break;
|
|
1736
1736
|
}
|
|
1737
1737
|
}, [n]);
|
|
1738
|
-
if (
|
|
1738
|
+
if (re(() => {
|
|
1739
1739
|
c && y();
|
|
1740
1740
|
}, [c, y]), !e) return /* @__PURE__ */ t(Z, { children: r });
|
|
1741
1741
|
const x = {
|
|
@@ -1791,7 +1791,7 @@ function Ne({ content: e, children: r, placement: n = "top", delay: i = 300, ope
|
|
|
1791
1791
|
width: 0,
|
|
1792
1792
|
height: 0,
|
|
1793
1793
|
borderStyle: "solid",
|
|
1794
|
-
...
|
|
1794
|
+
...Pn[n]
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
1797
|
)
|
|
@@ -2201,10 +2201,10 @@ function Ko({
|
|
|
2201
2201
|
showCopyButton: s = !0,
|
|
2202
2202
|
style: c
|
|
2203
2203
|
}) {
|
|
2204
|
-
var
|
|
2205
|
-
const u = !!(n != null && n.length), [p, h] = q(0), [w,
|
|
2204
|
+
var k, I;
|
|
2205
|
+
const u = !!(n != null && n.length), [p, h] = q(0), [w, v] = q(!1), m = u ? ((k = n[p]) == null ? void 0 : k.code) ?? "" : e ?? "", f = u ? (I = n[p]) == null ? void 0 : I.language : r, d = async () => {
|
|
2206
2206
|
try {
|
|
2207
|
-
await navigator.clipboard.writeText(m),
|
|
2207
|
+
await navigator.clipboard.writeText(m), v(!0), setTimeout(() => v(!1), $n);
|
|
2208
2208
|
} catch {
|
|
2209
2209
|
}
|
|
2210
2210
|
}, y = {
|
|
@@ -2227,11 +2227,11 @@ function Ko({
|
|
|
2227
2227
|
onClick: d,
|
|
2228
2228
|
"aria-label": w ? "Copied!" : "Copy code",
|
|
2229
2229
|
style: y,
|
|
2230
|
-
onMouseEnter: (
|
|
2231
|
-
w || (
|
|
2230
|
+
onMouseEnter: (S) => {
|
|
2231
|
+
w || (S.currentTarget.style.background = "var(--lucent-surface-secondary)", S.currentTarget.style.color = "var(--lucent-text-primary)");
|
|
2232
2232
|
},
|
|
2233
|
-
onMouseLeave: (
|
|
2234
|
-
w || (
|
|
2233
|
+
onMouseLeave: (S) => {
|
|
2234
|
+
w || (S.currentTarget.style.background = "transparent", S.currentTarget.style.color = "var(--lucent-text-secondary)");
|
|
2235
2235
|
},
|
|
2236
2236
|
children: [
|
|
2237
2237
|
w ? /* @__PURE__ */ t(Fn, {}) : /* @__PURE__ */ t(Nn, {}),
|
|
@@ -2259,13 +2259,13 @@ function Ko({
|
|
|
2259
2259
|
borderBottom: "1px solid var(--lucent-border-default)",
|
|
2260
2260
|
padding: "0 var(--lucent-space-2)"
|
|
2261
2261
|
},
|
|
2262
|
-
children: n.map((
|
|
2263
|
-
const E =
|
|
2262
|
+
children: n.map((S, b) => {
|
|
2263
|
+
const E = b === p;
|
|
2264
2264
|
return /* @__PURE__ */ g(
|
|
2265
2265
|
"button",
|
|
2266
2266
|
{
|
|
2267
2267
|
onClick: () => {
|
|
2268
|
-
h(
|
|
2268
|
+
h(b), v(!1);
|
|
2269
2269
|
},
|
|
2270
2270
|
style: {
|
|
2271
2271
|
display: "inline-flex",
|
|
@@ -2284,18 +2284,18 @@ function Ko({
|
|
|
2284
2284
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
2285
2285
|
whiteSpace: "nowrap"
|
|
2286
2286
|
},
|
|
2287
|
-
onMouseEnter: (
|
|
2288
|
-
E || (
|
|
2287
|
+
onMouseEnter: (T) => {
|
|
2288
|
+
E || (T.currentTarget.style.color = "var(--lucent-text-primary)");
|
|
2289
2289
|
},
|
|
2290
|
-
onMouseLeave: (
|
|
2291
|
-
E || (
|
|
2290
|
+
onMouseLeave: (T) => {
|
|
2291
|
+
E || (T.currentTarget.style.color = "var(--lucent-text-secondary)");
|
|
2292
2292
|
},
|
|
2293
2293
|
children: [
|
|
2294
|
-
|
|
2295
|
-
|
|
2294
|
+
S.icon !== void 0 && /* @__PURE__ */ t("span", { style: { display: "inline-flex", alignItems: "center" }, children: S.icon }),
|
|
2295
|
+
S.label
|
|
2296
2296
|
]
|
|
2297
2297
|
},
|
|
2298
|
-
|
|
2298
|
+
S.label
|
|
2299
2299
|
);
|
|
2300
2300
|
})
|
|
2301
2301
|
}
|
|
@@ -3274,7 +3274,7 @@ function ri({
|
|
|
3274
3274
|
label: l,
|
|
3275
3275
|
style: s
|
|
3276
3276
|
}) {
|
|
3277
|
-
const c = Math.max(0, Math.min(e, r)), u = r > 0 ? c / r * 100 : 0, p = Jn(c, r, n, a, o), h = Xn[i], w = Zn[p],
|
|
3277
|
+
const c = Math.max(0, Math.min(e, r)), u = r > 0 ? c / r * 100 : 0, p = Jn(c, r, n, a, o), h = Xn[i], w = Zn[p], v = l === !0 ? `${Math.round(u)}%` : l || null;
|
|
3278
3278
|
return /* @__PURE__ */ g(
|
|
3279
3279
|
"div",
|
|
3280
3280
|
{
|
|
@@ -3314,7 +3314,7 @@ function ri({
|
|
|
3314
3314
|
)
|
|
3315
3315
|
}
|
|
3316
3316
|
),
|
|
3317
|
-
|
|
3317
|
+
v != null && /* @__PURE__ */ t(
|
|
3318
3318
|
"span",
|
|
3319
3319
|
{
|
|
3320
3320
|
style: {
|
|
@@ -3324,7 +3324,7 @@ function ri({
|
|
|
3324
3324
|
whiteSpace: "nowrap",
|
|
3325
3325
|
flexShrink: 0
|
|
3326
3326
|
},
|
|
3327
|
-
children:
|
|
3327
|
+
children: v
|
|
3328
3328
|
}
|
|
3329
3329
|
)
|
|
3330
3330
|
]
|
|
@@ -3409,9 +3409,9 @@ function ot({
|
|
|
3409
3409
|
selected: l = !1,
|
|
3410
3410
|
style: s
|
|
3411
3411
|
}) {
|
|
3412
|
-
const c = ne(ft), u =
|
|
3412
|
+
const c = ne(ft), u = O(-1);
|
|
3413
3413
|
u.current === -1 && c && (u.current = c.getItemIndex(), c.registerItem(u.current, a));
|
|
3414
|
-
const p = c ? c.activeIndex === u.current : !1, h = (c == null ? void 0 : c.size) ?? "md", w = ht[h],
|
|
3414
|
+
const p = c ? c.activeIndex === u.current : !1, h = (c == null ? void 0 : c.size) ?? "md", w = ht[h], v = er[h], m = nr[h], f = () => {
|
|
3415
3415
|
a || (e(), c == null || c.close());
|
|
3416
3416
|
}, d = () => {
|
|
3417
3417
|
!a && c && c.setActiveIndex(u.current);
|
|
@@ -3446,8 +3446,8 @@ function ot({
|
|
|
3446
3446
|
display: "flex",
|
|
3447
3447
|
color: a ? "var(--lucent-text-disabled)" : o ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)"
|
|
3448
3448
|
}, children: n }),
|
|
3449
|
-
/* @__PURE__ */ t("span", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
3450
|
-
i && /* @__PURE__ */ t(
|
|
3449
|
+
/* @__PURE__ */ t("span", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(G, { size: v, style: { color: y }, children: r }) }),
|
|
3450
|
+
i && /* @__PURE__ */ t(G, { size: h === "lg" ? "sm" : "xs", style: { color: "var(--lucent-text-secondary)", flexShrink: 0 }, children: i }),
|
|
3451
3451
|
l && /* @__PURE__ */ t("span", { style: {
|
|
3452
3452
|
flexShrink: 0,
|
|
3453
3453
|
display: "flex",
|
|
@@ -3474,7 +3474,7 @@ function ar({ style: e }) {
|
|
|
3474
3474
|
function oi({ label: e, children: r, style: n }) {
|
|
3475
3475
|
const i = ne(ft), a = (i == null ? void 0 : i.size) ?? "md", o = ht[a];
|
|
3476
3476
|
return /* @__PURE__ */ g("div", { role: "group", "aria-label": e, style: n, children: [
|
|
3477
|
-
/* @__PURE__ */ t("div", { style: { padding: `${o} ${o} var(--lucent-space-1)` }, children: /* @__PURE__ */ t(
|
|
3477
|
+
/* @__PURE__ */ t("div", { style: { padding: `${o} ${o} var(--lucent-space-1)` }, children: /* @__PURE__ */ t(G, { size: tr[a], color: "secondary", weight: "medium", children: e }) }),
|
|
3478
3478
|
r
|
|
3479
3479
|
] });
|
|
3480
3480
|
}
|
|
@@ -3488,143 +3488,143 @@ function Yt({
|
|
|
3488
3488
|
portalContainer: l,
|
|
3489
3489
|
style: s
|
|
3490
3490
|
}) {
|
|
3491
|
-
const c = a !== void 0, [u, p] = q(!1), h = c ? a : u, [w,
|
|
3492
|
-
if (!
|
|
3493
|
-
const
|
|
3494
|
-
|
|
3491
|
+
const c = a !== void 0, [u, p] = q(!1), h = c ? a : u, [w, v] = q(!1), [m, f] = q("idle"), d = O(null), y = O(null), x = O(null), k = O(!1), [I, S] = q(null), b = O(0), E = O(/* @__PURE__ */ new Map()), [T, z] = q(-1);
|
|
3492
|
+
if (!k.current && typeof document < "u") {
|
|
3493
|
+
const B = document.createElement("style");
|
|
3494
|
+
B.textContent = Qn, document.head.appendChild(B), k.current = !0;
|
|
3495
3495
|
}
|
|
3496
|
-
|
|
3496
|
+
U(() => {
|
|
3497
3497
|
if (h)
|
|
3498
|
-
|
|
3498
|
+
b.current = 0, E.current.clear(), v(!0), f("entering");
|
|
3499
3499
|
else if (w) {
|
|
3500
3500
|
f("exiting");
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3501
|
+
const B = setTimeout(() => {
|
|
3502
|
+
v(!1), f("idle");
|
|
3503
3503
|
}, He);
|
|
3504
|
-
return () => clearTimeout(
|
|
3504
|
+
return () => clearTimeout(B);
|
|
3505
3505
|
}
|
|
3506
3506
|
}, [h]);
|
|
3507
|
-
const
|
|
3508
|
-
c || p(
|
|
3509
|
-
}, [c, o]),
|
|
3510
|
-
const
|
|
3511
|
-
|
|
3512
|
-
}, []),
|
|
3513
|
-
|
|
3514
|
-
}, [
|
|
3515
|
-
|
|
3507
|
+
const D = X((B) => {
|
|
3508
|
+
c || p(B), o == null || o(B);
|
|
3509
|
+
}, [c, o]), P = X(() => {
|
|
3510
|
+
const B = x.current;
|
|
3511
|
+
B && (B.querySelector("button, [tabindex]") ?? B).focus();
|
|
3512
|
+
}, []), R = X(() => {
|
|
3513
|
+
D(!1), P();
|
|
3514
|
+
}, [D, P]);
|
|
3515
|
+
re(() => {
|
|
3516
3516
|
if (!w || m !== "entering" || !d.current) return;
|
|
3517
|
-
const
|
|
3518
|
-
const A = y.current,
|
|
3519
|
-
if (!A || !
|
|
3520
|
-
const
|
|
3521
|
-
|
|
3517
|
+
const B = requestAnimationFrame(() => {
|
|
3518
|
+
const A = y.current, M = d.current;
|
|
3519
|
+
if (!A || !M) return;
|
|
3520
|
+
const N = M.getBoundingClientRect();
|
|
3521
|
+
S(rr(N, A, n));
|
|
3522
3522
|
});
|
|
3523
|
-
return () => cancelAnimationFrame(
|
|
3524
|
-
}, [w, m, n]),
|
|
3523
|
+
return () => cancelAnimationFrame(B);
|
|
3524
|
+
}, [w, m, n]), U(() => {
|
|
3525
3525
|
if (!w || m !== "entering") return;
|
|
3526
|
-
const
|
|
3527
|
-
const
|
|
3528
|
-
z(
|
|
3526
|
+
const B = setTimeout(() => {
|
|
3527
|
+
const M = Array.from(E.current.entries()).sort((N, j) => N[0] - j[0]).find(([, N]) => !N.disabled);
|
|
3528
|
+
z(M ? M[0] : -1);
|
|
3529
3529
|
}, 0);
|
|
3530
|
-
return () => clearTimeout(
|
|
3531
|
-
}, [w, m]),
|
|
3530
|
+
return () => clearTimeout(B);
|
|
3531
|
+
}, [w, m]), U(() => {
|
|
3532
3532
|
if (!h) return;
|
|
3533
|
-
const
|
|
3534
|
-
var
|
|
3535
|
-
const
|
|
3536
|
-
(
|
|
3533
|
+
const B = (M) => {
|
|
3534
|
+
var j, $;
|
|
3535
|
+
const N = M.target;
|
|
3536
|
+
(j = d.current) != null && j.contains(N) || ($ = y.current) != null && $.contains(N) || R();
|
|
3537
3537
|
}, A = requestAnimationFrame(() => {
|
|
3538
|
-
document.addEventListener("mousedown",
|
|
3538
|
+
document.addEventListener("mousedown", B);
|
|
3539
3539
|
});
|
|
3540
3540
|
return () => {
|
|
3541
|
-
cancelAnimationFrame(A), document.removeEventListener("mousedown",
|
|
3541
|
+
cancelAnimationFrame(A), document.removeEventListener("mousedown", B);
|
|
3542
3542
|
};
|
|
3543
|
-
}, [h,
|
|
3543
|
+
}, [h, R]), U(() => {
|
|
3544
3544
|
if (!h) return;
|
|
3545
|
-
let
|
|
3545
|
+
let B = !1;
|
|
3546
3546
|
const A = setTimeout(() => {
|
|
3547
|
-
|
|
3548
|
-
}, 50),
|
|
3549
|
-
|
|
3547
|
+
B = !0;
|
|
3548
|
+
}, 50), M = () => {
|
|
3549
|
+
B && R();
|
|
3550
3550
|
};
|
|
3551
|
-
return window.addEventListener("scroll",
|
|
3552
|
-
clearTimeout(A), window.removeEventListener("scroll",
|
|
3551
|
+
return window.addEventListener("scroll", M, { passive: !0, capture: !0 }), () => {
|
|
3552
|
+
clearTimeout(A), window.removeEventListener("scroll", M, { capture: !0 });
|
|
3553
3553
|
};
|
|
3554
|
-
}, [h,
|
|
3555
|
-
const
|
|
3554
|
+
}, [h, R]);
|
|
3555
|
+
const H = X(() => Array.from(E.current.entries()).filter(([, B]) => !B.disabled).map(([B]) => B).sort((B, A) => B - A), []), V = X((B) => {
|
|
3556
3556
|
if (!h) return;
|
|
3557
|
-
const A =
|
|
3557
|
+
const A = H();
|
|
3558
3558
|
if (A.length !== 0)
|
|
3559
|
-
switch (
|
|
3559
|
+
switch (B.key) {
|
|
3560
3560
|
case "Escape":
|
|
3561
|
-
|
|
3561
|
+
B.preventDefault(), R();
|
|
3562
3562
|
break;
|
|
3563
3563
|
case "ArrowDown": {
|
|
3564
|
-
|
|
3565
|
-
const
|
|
3566
|
-
return
|
|
3564
|
+
B.preventDefault(), z((M) => {
|
|
3565
|
+
const N = A.indexOf(M);
|
|
3566
|
+
return N < A.length - 1 ? A[N + 1] : A[0];
|
|
3567
3567
|
});
|
|
3568
3568
|
break;
|
|
3569
3569
|
}
|
|
3570
3570
|
case "ArrowUp": {
|
|
3571
|
-
|
|
3572
|
-
const
|
|
3573
|
-
return
|
|
3571
|
+
B.preventDefault(), z((M) => {
|
|
3572
|
+
const N = A.indexOf(M);
|
|
3573
|
+
return N > 0 ? A[N - 1] : A[A.length - 1];
|
|
3574
3574
|
});
|
|
3575
3575
|
break;
|
|
3576
3576
|
}
|
|
3577
3577
|
case "Home": {
|
|
3578
|
-
|
|
3578
|
+
B.preventDefault(), z(A[0]);
|
|
3579
3579
|
break;
|
|
3580
3580
|
}
|
|
3581
3581
|
case "End": {
|
|
3582
|
-
|
|
3582
|
+
B.preventDefault(), z(A[A.length - 1]);
|
|
3583
3583
|
break;
|
|
3584
3584
|
}
|
|
3585
3585
|
case "Enter":
|
|
3586
3586
|
case " ": {
|
|
3587
|
-
|
|
3588
|
-
const
|
|
3589
|
-
if (
|
|
3590
|
-
const
|
|
3591
|
-
|
|
3587
|
+
B.preventDefault();
|
|
3588
|
+
const M = y.current;
|
|
3589
|
+
if (M) {
|
|
3590
|
+
const N = M.querySelector('[data-active="true"]');
|
|
3591
|
+
N == null || N.click();
|
|
3592
3592
|
}
|
|
3593
3593
|
break;
|
|
3594
3594
|
}
|
|
3595
3595
|
case "Tab": {
|
|
3596
|
-
|
|
3596
|
+
R();
|
|
3597
3597
|
break;
|
|
3598
3598
|
}
|
|
3599
3599
|
}
|
|
3600
|
-
}, [h,
|
|
3601
|
-
|
|
3600
|
+
}, [h, R, H]);
|
|
3601
|
+
U(() => {
|
|
3602
3602
|
if (h)
|
|
3603
|
-
return document.addEventListener("keydown",
|
|
3604
|
-
}, [h,
|
|
3603
|
+
return document.addEventListener("keydown", V), () => document.removeEventListener("keydown", V);
|
|
3604
|
+
}, [h, V]), U(() => {
|
|
3605
3605
|
if (!h) return;
|
|
3606
|
-
const
|
|
3607
|
-
if (!
|
|
3608
|
-
const A =
|
|
3606
|
+
const B = y.current;
|
|
3607
|
+
if (!B) return;
|
|
3608
|
+
const A = B.querySelector('[data-active="true"]');
|
|
3609
3609
|
A == null || A.scrollIntoView({ block: "nearest" });
|
|
3610
|
-
}, [
|
|
3610
|
+
}, [T, h]);
|
|
3611
3611
|
const W = () => {
|
|
3612
|
-
|
|
3613
|
-
},
|
|
3614
|
-
(
|
|
3615
|
-
const A =
|
|
3612
|
+
D(!h);
|
|
3613
|
+
}, C = (B) => {
|
|
3614
|
+
(B.key === "Enter" || B.key === " " || B.key === "ArrowDown") && (B.preventDefault(), h || D(!0)), B.key === "ArrowUp" && (B.preventDefault(), h || (D(!0), setTimeout(() => {
|
|
3615
|
+
const A = H();
|
|
3616
3616
|
A.length > 0 && z(A[A.length - 1]);
|
|
3617
3617
|
}, 0)));
|
|
3618
|
-
},
|
|
3619
|
-
activeIndex:
|
|
3618
|
+
}, L = {
|
|
3619
|
+
activeIndex: T,
|
|
3620
3620
|
setActiveIndex: z,
|
|
3621
|
-
registerItem: (
|
|
3622
|
-
E.current.set(
|
|
3621
|
+
registerItem: (B, A) => {
|
|
3622
|
+
E.current.set(B, { disabled: A });
|
|
3623
3623
|
},
|
|
3624
|
-
close:
|
|
3625
|
-
getItemIndex: () =>
|
|
3624
|
+
close: R,
|
|
3625
|
+
getItemIndex: () => b.current++,
|
|
3626
3626
|
size: i
|
|
3627
|
-
},
|
|
3627
|
+
}, F = at();
|
|
3628
3628
|
return /* @__PURE__ */ g(Z, { children: [
|
|
3629
3629
|
/* @__PURE__ */ t(
|
|
3630
3630
|
"span",
|
|
@@ -3636,10 +3636,10 @@ function Yt({
|
|
|
3636
3636
|
{
|
|
3637
3637
|
ref: x,
|
|
3638
3638
|
onClick: W,
|
|
3639
|
-
onKeyDown:
|
|
3639
|
+
onKeyDown: C,
|
|
3640
3640
|
"aria-haspopup": "menu",
|
|
3641
3641
|
"aria-expanded": h,
|
|
3642
|
-
"aria-controls": h ?
|
|
3642
|
+
"aria-controls": h ? F : void 0,
|
|
3643
3643
|
style: { display: "inline-flex", cursor: "pointer" },
|
|
3644
3644
|
children: e
|
|
3645
3645
|
}
|
|
@@ -3647,16 +3647,16 @@ function Yt({
|
|
|
3647
3647
|
}
|
|
3648
3648
|
),
|
|
3649
3649
|
w && ie(
|
|
3650
|
-
/* @__PURE__ */ t(ft.Provider, { value:
|
|
3650
|
+
/* @__PURE__ */ t(ft.Provider, { value: L, children: /* @__PURE__ */ t(
|
|
3651
3651
|
"div",
|
|
3652
3652
|
{
|
|
3653
3653
|
ref: y,
|
|
3654
|
-
id:
|
|
3654
|
+
id: F,
|
|
3655
3655
|
role: "menu",
|
|
3656
3656
|
style: {
|
|
3657
3657
|
position: "fixed",
|
|
3658
|
-
top: (
|
|
3659
|
-
left: (
|
|
3658
|
+
top: (I == null ? void 0 : I.top) ?? -9999,
|
|
3659
|
+
left: (I == null ? void 0 : I.left) ?? -9999,
|
|
3660
3660
|
zIndex: 1e3,
|
|
3661
3661
|
minWidth: 180,
|
|
3662
3662
|
background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
|
|
@@ -3669,7 +3669,7 @@ function Yt({
|
|
|
3669
3669
|
maxHeight: "min(320px, calc(100vh - 32px))",
|
|
3670
3670
|
overflowY: "auto",
|
|
3671
3671
|
animation: m === "exiting" ? `lucent-menu-out ${He}ms var(--lucent-easing-default) forwards` : `lucent-menu-in ${He}ms var(--lucent-easing-decelerate)`,
|
|
3672
|
-
transformOrigin: (
|
|
3672
|
+
transformOrigin: (I == null ? void 0 : I.transformOrigin) ?? "top left",
|
|
3673
3673
|
outline: "none",
|
|
3674
3674
|
pointerEvents: m === "exiting" ? "none" : "auto",
|
|
3675
3675
|
...s
|
|
@@ -4010,7 +4010,7 @@ function ur({
|
|
|
4010
4010
|
leftIcon: u,
|
|
4011
4011
|
style: p
|
|
4012
4012
|
}) {
|
|
4013
|
-
const h = s ?? c, [w,
|
|
4013
|
+
const h = s ?? c, [w, v] = q(!1), m = or[a], f = m.borderRadius ?? "var(--lucent-radius-lg)", d = ir[a], y = h ? {
|
|
4014
4014
|
background: "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)",
|
|
4015
4015
|
color: "var(--lucent-text-disabled)",
|
|
4016
4016
|
borderColor: "transparent"
|
|
@@ -4034,7 +4034,7 @@ function ur({
|
|
|
4034
4034
|
...Kt[i],
|
|
4035
4035
|
...o === !1 && { border: "none" },
|
|
4036
4036
|
...y
|
|
4037
|
-
},
|
|
4037
|
+
}, k = "var(--lucent-radius-sm)", I = `${f} ${k} ${k} ${f}`, S = `${k} ${f} ${f} ${k}`;
|
|
4038
4038
|
return /* @__PURE__ */ g(
|
|
4039
4039
|
"div",
|
|
4040
4040
|
{
|
|
@@ -4054,27 +4054,27 @@ function ur({
|
|
|
4054
4054
|
disabled: h,
|
|
4055
4055
|
"aria-busy": c,
|
|
4056
4056
|
onClick: r,
|
|
4057
|
-
onMouseEnter: (
|
|
4058
|
-
h || wt(
|
|
4057
|
+
onMouseEnter: (b) => {
|
|
4058
|
+
h || wt(b.currentTarget, i, o);
|
|
4059
4059
|
},
|
|
4060
|
-
onMouseLeave: (
|
|
4061
|
-
h || kt(
|
|
4060
|
+
onMouseLeave: (b) => {
|
|
4061
|
+
h || kt(b.currentTarget, i, o);
|
|
4062
4062
|
},
|
|
4063
|
-
onMouseDown: (
|
|
4064
|
-
h || St(
|
|
4063
|
+
onMouseDown: (b) => {
|
|
4064
|
+
h || St(b.currentTarget, i);
|
|
4065
4065
|
},
|
|
4066
|
-
onMouseUp: (
|
|
4067
|
-
Tt(
|
|
4066
|
+
onMouseUp: (b) => {
|
|
4067
|
+
Tt(b.currentTarget);
|
|
4068
4068
|
},
|
|
4069
|
-
onFocus: (
|
|
4070
|
-
|
|
4069
|
+
onFocus: (b) => {
|
|
4070
|
+
b.currentTarget.dataset.pressed || (b.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)");
|
|
4071
4071
|
},
|
|
4072
|
-
onBlur: (
|
|
4073
|
-
|
|
4072
|
+
onBlur: (b) => {
|
|
4073
|
+
b.currentTarget.style.boxShadow = "";
|
|
4074
4074
|
},
|
|
4075
4075
|
style: {
|
|
4076
4076
|
...x,
|
|
4077
|
-
borderRadius:
|
|
4077
|
+
borderRadius: I,
|
|
4078
4078
|
padding: i === "ghost" || i === "danger-ghost" ? `0 ${m.paddingInner} 0 ${m.paddingOuter}` : `0 ${m.paddingOuter}`
|
|
4079
4079
|
},
|
|
4080
4080
|
children: [
|
|
@@ -4087,7 +4087,7 @@ function ur({
|
|
|
4087
4087
|
Yt,
|
|
4088
4088
|
{
|
|
4089
4089
|
open: w,
|
|
4090
|
-
onOpenChange:
|
|
4090
|
+
onOpenChange: v,
|
|
4091
4091
|
placement: l,
|
|
4092
4092
|
size: lr[a],
|
|
4093
4093
|
trigger: /* @__PURE__ */ t(
|
|
@@ -4096,41 +4096,41 @@ function ur({
|
|
|
4096
4096
|
type: "button",
|
|
4097
4097
|
disabled: h,
|
|
4098
4098
|
"aria-label": "More actions",
|
|
4099
|
-
onMouseEnter: (
|
|
4100
|
-
h || wt(
|
|
4099
|
+
onMouseEnter: (b) => {
|
|
4100
|
+
h || wt(b.currentTarget, i, o);
|
|
4101
4101
|
},
|
|
4102
|
-
onMouseLeave: (
|
|
4103
|
-
h || kt(
|
|
4102
|
+
onMouseLeave: (b) => {
|
|
4103
|
+
h || kt(b.currentTarget, i, o);
|
|
4104
4104
|
},
|
|
4105
|
-
onMouseDown: (
|
|
4106
|
-
h || St(
|
|
4105
|
+
onMouseDown: (b) => {
|
|
4106
|
+
h || St(b.currentTarget, i);
|
|
4107
4107
|
},
|
|
4108
|
-
onMouseUp: (
|
|
4109
|
-
Tt(
|
|
4108
|
+
onMouseUp: (b) => {
|
|
4109
|
+
Tt(b.currentTarget);
|
|
4110
4110
|
},
|
|
4111
|
-
onFocus: (
|
|
4112
|
-
|
|
4111
|
+
onFocus: (b) => {
|
|
4112
|
+
b.currentTarget.dataset.pressed || (b.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)");
|
|
4113
4113
|
},
|
|
4114
|
-
onBlur: (
|
|
4115
|
-
|
|
4114
|
+
onBlur: (b) => {
|
|
4115
|
+
b.currentTarget.style.boxShadow = "";
|
|
4116
4116
|
},
|
|
4117
4117
|
style: {
|
|
4118
4118
|
...x,
|
|
4119
|
-
borderRadius:
|
|
4119
|
+
borderRadius: S,
|
|
4120
4120
|
padding: 0,
|
|
4121
4121
|
width: sr[a]
|
|
4122
4122
|
},
|
|
4123
4123
|
children: /* @__PURE__ */ t("svg", { width: d, height: d, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, style: { flexShrink: 0, transition: "transform var(--lucent-duration-fast) var(--lucent-easing-default)", ...w && { transform: "rotate(180deg)" } }, children: /* @__PURE__ */ t("polyline", { points: "6 9 12 15 18 9" }) })
|
|
4124
4124
|
}
|
|
4125
4125
|
),
|
|
4126
|
-
children: n.map((
|
|
4126
|
+
children: n.map((b, E) => /* @__PURE__ */ t(
|
|
4127
4127
|
ot,
|
|
4128
4128
|
{
|
|
4129
|
-
onSelect:
|
|
4130
|
-
...
|
|
4131
|
-
...
|
|
4132
|
-
...
|
|
4133
|
-
children:
|
|
4129
|
+
onSelect: b.onSelect,
|
|
4130
|
+
...b.disabled !== void 0 && { disabled: b.disabled },
|
|
4131
|
+
...b.danger !== void 0 && { danger: b.danger },
|
|
4132
|
+
...b.icon !== void 0 && { icon: b.icon },
|
|
4133
|
+
children: b.label
|
|
4134
4134
|
},
|
|
4135
4135
|
E
|
|
4136
4136
|
))
|
|
@@ -4309,11 +4309,11 @@ function ci({
|
|
|
4309
4309
|
const s = a ?? i, c = a ? "danger" : "secondary";
|
|
4310
4310
|
return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...l }, children: [
|
|
4311
4311
|
e && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "baseline", gap: "var(--lucent-space-1)" }, children: [
|
|
4312
|
-
/* @__PURE__ */ t(
|
|
4313
|
-
n && /* @__PURE__ */ t(
|
|
4312
|
+
/* @__PURE__ */ t(G, { as: "label", size: "sm", weight: "medium", lineHeight: "tight", ...r !== void 0 && { htmlFor: r }, children: e }),
|
|
4313
|
+
n && /* @__PURE__ */ t(G, { as: "span", size: "sm", color: "danger", lineHeight: "tight", "aria-hidden": "true", children: "*" })
|
|
4314
4314
|
] }),
|
|
4315
4315
|
o,
|
|
4316
|
-
s && /* @__PURE__ */ t(
|
|
4316
|
+
s && /* @__PURE__ */ t(G, { size: "xs", color: c, lineHeight: "tight", children: s })
|
|
4317
4317
|
] });
|
|
4318
4318
|
}
|
|
4319
4319
|
const di = {
|
|
@@ -4420,23 +4420,23 @@ function ui({
|
|
|
4420
4420
|
isLoading: p = !1,
|
|
4421
4421
|
disabled: h = !1,
|
|
4422
4422
|
id: w,
|
|
4423
|
-
style:
|
|
4423
|
+
style: v
|
|
4424
4424
|
}) {
|
|
4425
|
-
const m = i ?? (n === "filter" ? "Filter…" : "Search…"), [f, d] = q(!1), [y, x] = q(null),
|
|
4426
|
-
|
|
4427
|
-
if (!
|
|
4428
|
-
const
|
|
4429
|
-
E({ top:
|
|
4430
|
-
}, [
|
|
4425
|
+
const m = i ?? (n === "filter" ? "Filter…" : "Search…"), [f, d] = q(!1), [y, x] = q(null), k = O(null), I = O(null), S = O(null), [b, E] = q({ top: 0, left: 0, width: 0 }), T = n === "search" && f && c.length > 0;
|
|
4426
|
+
re(() => {
|
|
4427
|
+
if (!T || !I.current) return;
|
|
4428
|
+
const V = I.current.getBoundingClientRect();
|
|
4429
|
+
E({ top: V.bottom + 4, left: V.left, width: V.width });
|
|
4430
|
+
}, [T]);
|
|
4431
4431
|
const z = () => {
|
|
4432
4432
|
r("");
|
|
4433
|
-
},
|
|
4434
|
-
u == null || u(
|
|
4435
|
-
},
|
|
4436
|
-
|
|
4437
|
-
},
|
|
4438
|
-
|
|
4439
|
-
},
|
|
4433
|
+
}, D = (V) => {
|
|
4434
|
+
u == null || u(V), d(!1);
|
|
4435
|
+
}, P = () => {
|
|
4436
|
+
k.current = setTimeout(() => d(!1), 150);
|
|
4437
|
+
}, R = () => {
|
|
4438
|
+
k.current && clearTimeout(k.current), d(!0);
|
|
4439
|
+
}, H = p ? /* @__PURE__ */ t(Sn, { size: "sm" }) : e ? /* @__PURE__ */ t(
|
|
4440
4440
|
"button",
|
|
4441
4441
|
{
|
|
4442
4442
|
type: "button",
|
|
@@ -4452,16 +4452,16 @@ function ui({
|
|
|
4452
4452
|
borderRadius: "var(--lucent-radius-sm)",
|
|
4453
4453
|
color: "var(--lucent-text-secondary)"
|
|
4454
4454
|
},
|
|
4455
|
-
onMouseEnter: (
|
|
4456
|
-
|
|
4455
|
+
onMouseEnter: (V) => {
|
|
4456
|
+
V.currentTarget.style.color = "var(--lucent-text-primary)";
|
|
4457
4457
|
},
|
|
4458
|
-
onMouseLeave: (
|
|
4459
|
-
|
|
4458
|
+
onMouseLeave: (V) => {
|
|
4459
|
+
V.currentTarget.style.color = "var(--lucent-text-secondary)";
|
|
4460
4460
|
},
|
|
4461
4461
|
children: /* @__PURE__ */ t(br, {})
|
|
4462
4462
|
}
|
|
4463
4463
|
) : null;
|
|
4464
|
-
return /* @__PURE__ */ g("div", { ref:
|
|
4464
|
+
return /* @__PURE__ */ g("div", { ref: I, style: { ...v }, children: [
|
|
4465
4465
|
/* @__PURE__ */ t(
|
|
4466
4466
|
jt,
|
|
4467
4467
|
{
|
|
@@ -4469,29 +4469,29 @@ function ui({
|
|
|
4469
4469
|
type: "text",
|
|
4470
4470
|
size: a,
|
|
4471
4471
|
value: e,
|
|
4472
|
-
onChange: (
|
|
4472
|
+
onChange: (V) => r(V.target.value),
|
|
4473
4473
|
placeholder: m,
|
|
4474
4474
|
disabled: h,
|
|
4475
4475
|
leftElement: n === "filter" ? /* @__PURE__ */ t(vr, { size: Ct[a] }) : /* @__PURE__ */ t(gr, { size: Ct[a] }),
|
|
4476
|
-
rightElement:
|
|
4477
|
-
onFocus:
|
|
4478
|
-
onBlur:
|
|
4476
|
+
rightElement: H ?? void 0,
|
|
4477
|
+
onFocus: R,
|
|
4478
|
+
onBlur: P,
|
|
4479
4479
|
...o !== void 0 && { label: o },
|
|
4480
4480
|
...l !== void 0 && { helperText: l },
|
|
4481
4481
|
...s !== void 0 && { errorText: s }
|
|
4482
4482
|
}
|
|
4483
4483
|
),
|
|
4484
|
-
|
|
4484
|
+
T && ie(
|
|
4485
4485
|
/* @__PURE__ */ t(
|
|
4486
4486
|
"div",
|
|
4487
4487
|
{
|
|
4488
|
-
ref:
|
|
4488
|
+
ref: S,
|
|
4489
4489
|
role: "listbox",
|
|
4490
4490
|
style: {
|
|
4491
4491
|
position: "fixed",
|
|
4492
|
-
top:
|
|
4493
|
-
left:
|
|
4494
|
-
width:
|
|
4492
|
+
top: b.top,
|
|
4493
|
+
left: b.left,
|
|
4494
|
+
width: b.width,
|
|
4495
4495
|
zIndex: 1e3,
|
|
4496
4496
|
background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
|
|
4497
4497
|
backdropFilter: "blur(6px)",
|
|
@@ -4501,12 +4501,12 @@ function ui({
|
|
|
4501
4501
|
boxShadow: "0 0 24px -4px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), var(--lucent-shadow-md)",
|
|
4502
4502
|
padding: mr[a]
|
|
4503
4503
|
},
|
|
4504
|
-
children: c.map((
|
|
4504
|
+
children: c.map((V, W) => /* @__PURE__ */ t(
|
|
4505
4505
|
"div",
|
|
4506
4506
|
{
|
|
4507
4507
|
role: "option",
|
|
4508
4508
|
"aria-selected": !1,
|
|
4509
|
-
onMouseDown: () =>
|
|
4509
|
+
onMouseDown: () => D(V),
|
|
4510
4510
|
onMouseEnter: () => x(W),
|
|
4511
4511
|
onMouseLeave: () => x(null),
|
|
4512
4512
|
style: {
|
|
@@ -4516,9 +4516,9 @@ function ui({
|
|
|
4516
4516
|
background: y === W ? "color-mix(in srgb, var(--lucent-accent-default) 14%, transparent)" : "transparent",
|
|
4517
4517
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
4518
4518
|
},
|
|
4519
|
-
children: /* @__PURE__ */ t(
|
|
4519
|
+
children: /* @__PURE__ */ t(G, { as: "span", size: fr[a], children: V.label })
|
|
4520
4520
|
},
|
|
4521
|
-
|
|
4521
|
+
V.id
|
|
4522
4522
|
))
|
|
4523
4523
|
}
|
|
4524
4524
|
),
|
|
@@ -4740,111 +4740,111 @@ function hi({
|
|
|
4740
4740
|
target: p,
|
|
4741
4741
|
rel: h,
|
|
4742
4742
|
disabled: w,
|
|
4743
|
-
status:
|
|
4743
|
+
status: v,
|
|
4744
4744
|
selected: m,
|
|
4745
4745
|
hoverable: f,
|
|
4746
4746
|
media: d
|
|
4747
4747
|
}) {
|
|
4748
|
-
const y = kr[e], x = e === "combo",
|
|
4749
|
-
let
|
|
4750
|
-
x ?
|
|
4751
|
-
const
|
|
4748
|
+
const y = kr[e], x = e === "combo", k = o ?? (x ? "md" : y.shadowDefault), { py: I, px: S } = yr[a], b = `${I} ${S}`, E = xr[l], T = u != null, z = c != null || T, D = z || (f ?? !1), P = (w ?? !1) && z, R = T ? "a" : z ? "button" : "div", [H, V] = q(!1), [W, C] = q(!1), [L, F] = q(!1), B = (m ?? !1) && !P, A = B ? zr : void 0, M = Ar(y, m ?? !1, P), N = v != null ? `inset 3px 0 0 ${wr[v]}` : void 0;
|
|
4749
|
+
let j;
|
|
4750
|
+
x ? j = ge(A, N) : D && !P ? L ? j = ge(Mr, A, N) : W ? j = ge(Ir, A, N) : H ? j = ge(z ? Tr : Cr, qe[k], A, N) : j = ge(qe[k], A, N) : j = ge(qe[k], A, N);
|
|
4751
|
+
const $ = {
|
|
4752
4752
|
display: "flex",
|
|
4753
4753
|
flexDirection: "column",
|
|
4754
|
-
background:
|
|
4754
|
+
background: M,
|
|
4755
4755
|
border: y.border,
|
|
4756
4756
|
borderRadius: E,
|
|
4757
4757
|
// Only clip overflow when media is present (to round image corners).
|
|
4758
4758
|
// Default to visible so nested child shadows (e.g. elevated Card inside combo) aren't cut off.
|
|
4759
|
-
overflow: d != null && !(
|
|
4759
|
+
overflow: d != null && !(B || D && W) ? "hidden" : "visible",
|
|
4760
4760
|
boxSizing: "border-box",
|
|
4761
4761
|
position: "relative",
|
|
4762
|
-
...
|
|
4762
|
+
...j !== void 0 && { boxShadow: j },
|
|
4763
4763
|
// Hover/press transform
|
|
4764
|
-
...
|
|
4765
|
-
...
|
|
4764
|
+
...D && !P && L && { transform: "translateY(1px)" },
|
|
4765
|
+
...D && !P && H && !L && { transform: "translateY(-1px)" },
|
|
4766
4766
|
// Hover/interactive base styles
|
|
4767
|
-
...
|
|
4768
|
-
cursor:
|
|
4767
|
+
...D && {
|
|
4768
|
+
cursor: P ? "not-allowed" : "pointer",
|
|
4769
4769
|
transition: Sr
|
|
4770
4770
|
},
|
|
4771
4771
|
// Button UA reset
|
|
4772
|
-
...z && !
|
|
4772
|
+
...z && !T && {
|
|
4773
4773
|
padding: 0,
|
|
4774
4774
|
font: "inherit",
|
|
4775
4775
|
textAlign: "inherit",
|
|
4776
4776
|
width: "100%",
|
|
4777
|
-
background:
|
|
4777
|
+
background: M
|
|
4778
4778
|
},
|
|
4779
4779
|
// Link reset
|
|
4780
|
-
...
|
|
4780
|
+
...T && {
|
|
4781
4781
|
textDecoration: "none",
|
|
4782
4782
|
color: "inherit"
|
|
4783
4783
|
},
|
|
4784
4784
|
// Disabled
|
|
4785
|
-
...
|
|
4785
|
+
...P && {
|
|
4786
4786
|
opacity: 0.6,
|
|
4787
4787
|
pointerEvents: "none"
|
|
4788
4788
|
},
|
|
4789
4789
|
...s
|
|
4790
4790
|
};
|
|
4791
4791
|
return /* @__PURE__ */ g(
|
|
4792
|
-
|
|
4792
|
+
R,
|
|
4793
4793
|
{
|
|
4794
|
-
style:
|
|
4795
|
-
...
|
|
4796
|
-
onMouseEnter: () =>
|
|
4794
|
+
style: $,
|
|
4795
|
+
...D && !P ? {
|
|
4796
|
+
onMouseEnter: () => V(!0),
|
|
4797
4797
|
onMouseLeave: () => {
|
|
4798
|
-
|
|
4798
|
+
V(!1), F(!1);
|
|
4799
4799
|
},
|
|
4800
|
-
onMouseDown: () =>
|
|
4801
|
-
onMouseUp: () =>
|
|
4802
|
-
onFocus: () =>
|
|
4800
|
+
onMouseDown: () => F(!0),
|
|
4801
|
+
onMouseUp: () => F(!1),
|
|
4802
|
+
onFocus: () => C(!0),
|
|
4803
4803
|
onBlur: () => {
|
|
4804
|
-
|
|
4804
|
+
C(!1), F(!1);
|
|
4805
4805
|
}
|
|
4806
4806
|
} : {},
|
|
4807
|
-
...
|
|
4808
|
-
href:
|
|
4807
|
+
...T && {
|
|
4808
|
+
href: P ? void 0 : Ce(u),
|
|
4809
4809
|
...p !== void 0 && { target: p },
|
|
4810
4810
|
...h !== void 0 && { rel: h }
|
|
4811
4811
|
},
|
|
4812
|
-
...!
|
|
4812
|
+
...!T && z && {
|
|
4813
4813
|
type: "button",
|
|
4814
|
-
...
|
|
4814
|
+
...P && { disabled: !0 }
|
|
4815
4815
|
},
|
|
4816
|
-
...c !== void 0 && !
|
|
4816
|
+
...c !== void 0 && !P && { onClick: c },
|
|
4817
4817
|
...z && m !== void 0 && { "aria-pressed": m },
|
|
4818
|
-
...
|
|
4818
|
+
...T && P && { "aria-disabled": !0 },
|
|
4819
4819
|
children: [
|
|
4820
4820
|
d != null && /* @__PURE__ */ t("div", { style: { lineHeight: 0, overflow: "hidden", borderRadius: `${E} ${E} 0 0` }, children: d }),
|
|
4821
4821
|
r != null && /* @__PURE__ */ t(
|
|
4822
4822
|
"div",
|
|
4823
4823
|
{
|
|
4824
4824
|
style: {
|
|
4825
|
-
padding:
|
|
4825
|
+
padding: b,
|
|
4826
4826
|
...y.dividers ? { borderBottom: "1px solid var(--lucent-border-default)" } : {}
|
|
4827
4827
|
},
|
|
4828
4828
|
children: r
|
|
4829
4829
|
}
|
|
4830
4830
|
),
|
|
4831
|
-
/* @__PURE__ */ t(mt.Provider, { value: { px:
|
|
4831
|
+
/* @__PURE__ */ t(mt.Provider, { value: { px: S, py: I }, children: /* @__PURE__ */ t(
|
|
4832
4832
|
"div",
|
|
4833
4833
|
{
|
|
4834
4834
|
style: {
|
|
4835
|
-
padding:
|
|
4835
|
+
padding: b,
|
|
4836
4836
|
flex: 1,
|
|
4837
4837
|
...x ? {
|
|
4838
4838
|
background: "var(--lucent-surface)",
|
|
4839
4839
|
border: "1px solid var(--lucent-border-default)",
|
|
4840
4840
|
borderRadius: E,
|
|
4841
|
-
boxShadow: qe[
|
|
4842
|
-
marginLeft: `calc(${
|
|
4843
|
-
marginRight: `calc(${
|
|
4841
|
+
boxShadow: qe[k],
|
|
4842
|
+
marginLeft: `calc(${S} / 3)`,
|
|
4843
|
+
marginRight: `calc(${S} / 3)`,
|
|
4844
4844
|
// When header/footer is absent, mirror the horizontal inset vertically
|
|
4845
4845
|
// so the elevated body stays framed by the transparent chrome on all sides.
|
|
4846
|
-
...r == null && { marginTop: `calc(${
|
|
4847
|
-
...n == null && { marginBottom: `calc(${
|
|
4846
|
+
...r == null && { marginTop: `calc(${I} / 3)` },
|
|
4847
|
+
...n == null && { marginBottom: `calc(${I} / 3)` }
|
|
4848
4848
|
} : {}
|
|
4849
4849
|
},
|
|
4850
4850
|
children: i
|
|
@@ -4854,7 +4854,7 @@ function hi({
|
|
|
4854
4854
|
"div",
|
|
4855
4855
|
{
|
|
4856
4856
|
style: {
|
|
4857
|
-
padding:
|
|
4857
|
+
padding: b,
|
|
4858
4858
|
...y.dividers ? { borderTop: "1px solid var(--lucent-border-default)" } : {}
|
|
4859
4859
|
},
|
|
4860
4860
|
children: n
|
|
@@ -5128,14 +5128,14 @@ const mi = {
|
|
|
5128
5128
|
] }), Dr = () => /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
5129
5129
|
/* @__PURE__ */ t("path", { d: "M8 2L14.5 13H1.5L8 2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
|
|
5130
5130
|
/* @__PURE__ */ t("path", { d: "M8 6V9M8 11V11.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
5131
|
-
] }),
|
|
5131
|
+
] }), Lr = () => /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
5132
5132
|
/* @__PURE__ */ t("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
5133
5133
|
/* @__PURE__ */ t("path", { d: "M5.5 5.5L10.5 10.5M10.5 5.5L5.5 10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
5134
|
-
] }),
|
|
5134
|
+
] }), Pr = {
|
|
5135
5135
|
info: /* @__PURE__ */ t(qr, {}),
|
|
5136
5136
|
success: /* @__PURE__ */ t(Br, {}),
|
|
5137
5137
|
warning: /* @__PURE__ */ t(Dr, {}),
|
|
5138
|
-
danger: /* @__PURE__ */ t(
|
|
5138
|
+
danger: /* @__PURE__ */ t(Lr, {})
|
|
5139
5139
|
}, Rr = () => /* @__PURE__ */ t("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
|
|
5140
5140
|
function gi({
|
|
5141
5141
|
variant: e = "info",
|
|
@@ -5145,7 +5145,7 @@ function gi({
|
|
|
5145
5145
|
icon: a,
|
|
5146
5146
|
style: o
|
|
5147
5147
|
}) {
|
|
5148
|
-
const l = Er[e], s = a ??
|
|
5148
|
+
const l = Er[e], s = a ?? Pr[e];
|
|
5149
5149
|
return /* @__PURE__ */ g(
|
|
5150
5150
|
"div",
|
|
5151
5151
|
{
|
|
@@ -5176,8 +5176,8 @@ function gi({
|
|
|
5176
5176
|
}
|
|
5177
5177
|
),
|
|
5178
5178
|
/* @__PURE__ */ g("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)" }, children: [
|
|
5179
|
-
r && /* @__PURE__ */ t(
|
|
5180
|
-
n && /* @__PURE__ */ t(
|
|
5179
|
+
r && /* @__PURE__ */ t(G, { as: "span", size: "sm", weight: "semibold", color: l.textColor, lineHeight: "tight", children: r }),
|
|
5180
|
+
n && /* @__PURE__ */ t(G, { as: "span", size: "sm", color: l.textColor, lineHeight: "base", children: n })
|
|
5181
5181
|
] }),
|
|
5182
5182
|
i && /* @__PURE__ */ t(
|
|
5183
5183
|
"button",
|
|
@@ -5320,8 +5320,8 @@ function bi({
|
|
|
5320
5320
|
}
|
|
5321
5321
|
),
|
|
5322
5322
|
/* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: [
|
|
5323
|
-
/* @__PURE__ */ t(
|
|
5324
|
-
n && /* @__PURE__ */ t(
|
|
5323
|
+
/* @__PURE__ */ t(G, { as: "h3", size: "lg", weight: "semibold", align: "center", lineHeight: "tight", children: r }),
|
|
5324
|
+
n && /* @__PURE__ */ t(G, { size: "sm", color: "secondary", align: "center", lineHeight: "relaxed", children: n })
|
|
5325
5325
|
] }),
|
|
5326
5326
|
i != null && /* @__PURE__ */ t("div", { children: i })
|
|
5327
5327
|
]
|
|
@@ -5587,7 +5587,7 @@ function Fr({ items: e, separator: r = "/", style: n, LinkComponent: i }) {
|
|
|
5587
5587
|
p.currentTarget.style.color = "var(--lucent-text-secondary)";
|
|
5588
5588
|
};
|
|
5589
5589
|
return /* @__PURE__ */ g("li", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
5590
|
-
l ? /* @__PURE__ */ t(
|
|
5590
|
+
l ? /* @__PURE__ */ t(G, { size: "sm", color: "primary", as: "span", "aria-current": "page", children: a.label }) : a.href != null ? i ? /* @__PURE__ */ t(
|
|
5591
5591
|
i,
|
|
5592
5592
|
{
|
|
5593
5593
|
href: Ce(a.href) ?? "#",
|
|
@@ -5654,26 +5654,26 @@ function Vr() {
|
|
|
5654
5654
|
e.setAttribute("data-lucent-collapsible", ""), e.textContent = Wr, document.head.appendChild(e), At = !0;
|
|
5655
5655
|
}
|
|
5656
5656
|
function ki({ trigger: e, children: r, defaultOpen: n = !1, open: i, onOpenChange: a, padded: o = !0, disabled: l = !1, style: s }) {
|
|
5657
|
-
const c = ne(mt), u = c.px !== "0" || c.py !== "0", p = i !== void 0, [h, w] = q(n),
|
|
5658
|
-
|
|
5657
|
+
const c = ne(mt), u = c.px !== "0" || c.py !== "0", p = i !== void 0, [h, w] = q(n), v = p ? i : h, m = O(null), f = O(!1), d = O();
|
|
5658
|
+
U(Vr, []), U(() => {
|
|
5659
5659
|
f.current = !0;
|
|
5660
|
-
}, []),
|
|
5660
|
+
}, []), re(() => {
|
|
5661
5661
|
const x = m.current;
|
|
5662
5662
|
if (x)
|
|
5663
|
-
if (
|
|
5663
|
+
if (v) {
|
|
5664
5664
|
x.style.overflow = "hidden";
|
|
5665
|
-
const
|
|
5666
|
-
x.style.height = `${
|
|
5665
|
+
const k = x.scrollHeight;
|
|
5666
|
+
x.style.height = `${k}px`, x.style.transition = zt, clearTimeout(d.current), d.current = setTimeout(() => {
|
|
5667
5667
|
x.style.height = "auto", x.style.overflow = "visible", x.style.transition = "";
|
|
5668
5668
|
}, Xt + 20);
|
|
5669
5669
|
} else f.current && (clearTimeout(d.current), x.style.overflow = "hidden", x.style.transition = "", x.style.height = `${x.scrollHeight}px`, x.getBoundingClientRect(), x.style.transition = zt, x.style.height = "0px");
|
|
5670
|
-
}, [
|
|
5670
|
+
}, [v]), U(() => {
|
|
5671
5671
|
const x = m.current;
|
|
5672
|
-
x && !
|
|
5673
|
-
}, []),
|
|
5672
|
+
x && !v && !f.current && (x.style.height = "0px");
|
|
5673
|
+
}, []), U(() => () => clearTimeout(d.current), []);
|
|
5674
5674
|
const y = () => {
|
|
5675
5675
|
if (l) return;
|
|
5676
|
-
const x = !
|
|
5676
|
+
const x = !v;
|
|
5677
5677
|
p || w(x), a == null || a(x);
|
|
5678
5678
|
};
|
|
5679
5679
|
return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", fontFamily: "var(--lucent-font-family-base)", fontSize: "var(--lucent-font-size-md)", ...u && { margin: `calc(-1 * ${c.py}) calc(-1 * ${c.px})` }, ...s }, children: [
|
|
@@ -5683,7 +5683,7 @@ function ki({ trigger: e, children: r, defaultOpen: n = !1, open: i, onOpenChang
|
|
|
5683
5683
|
"data-lucent-collapsible-trigger": !0,
|
|
5684
5684
|
onClick: y,
|
|
5685
5685
|
disabled: l,
|
|
5686
|
-
"aria-expanded":
|
|
5686
|
+
"aria-expanded": v,
|
|
5687
5687
|
style: {
|
|
5688
5688
|
display: "flex",
|
|
5689
5689
|
alignItems: "center",
|
|
@@ -5704,7 +5704,7 @@ function ki({ trigger: e, children: r, defaultOpen: n = !1, open: i, onOpenChang
|
|
|
5704
5704
|
},
|
|
5705
5705
|
children: [
|
|
5706
5706
|
/* @__PURE__ */ t("span", { style: { flex: 1 }, children: e }),
|
|
5707
|
-
/* @__PURE__ */ t(Or, { open:
|
|
5707
|
+
/* @__PURE__ */ t(Or, { open: v })
|
|
5708
5708
|
]
|
|
5709
5709
|
}
|
|
5710
5710
|
),
|
|
@@ -5712,15 +5712,15 @@ function ki({ trigger: e, children: r, defaultOpen: n = !1, open: i, onOpenChang
|
|
|
5712
5712
|
"div",
|
|
5713
5713
|
{
|
|
5714
5714
|
ref: m,
|
|
5715
|
-
"aria-hidden": !
|
|
5716
|
-
style: { overflow:
|
|
5715
|
+
"aria-hidden": !v,
|
|
5716
|
+
style: { overflow: v ? "visible" : "hidden" },
|
|
5717
5717
|
children: /* @__PURE__ */ t(
|
|
5718
5718
|
"div",
|
|
5719
5719
|
{
|
|
5720
5720
|
style: {
|
|
5721
5721
|
...o ? { padding: "var(--lucent-space-3) var(--lucent-space-4) var(--lucent-space-4)" } : {},
|
|
5722
|
-
opacity:
|
|
5723
|
-
transform:
|
|
5722
|
+
opacity: v ? 1 : 0,
|
|
5723
|
+
transform: v ? "translateY(0)" : "translateY(-4px)",
|
|
5724
5724
|
transition: `opacity ${Mt}ms ${ye}, transform ${Mt}ms ${ye}`
|
|
5725
5725
|
},
|
|
5726
5726
|
children: r
|
|
@@ -5756,7 +5756,7 @@ function Or({ open: e }) {
|
|
|
5756
5756
|
}
|
|
5757
5757
|
function Hr(e) {
|
|
5758
5758
|
const [r, n] = q(() => typeof window > "u" ? !1 : window.matchMedia(e).matches);
|
|
5759
|
-
return
|
|
5759
|
+
return U(() => {
|
|
5760
5760
|
const i = window.matchMedia(e);
|
|
5761
5761
|
n(i.matches);
|
|
5762
5762
|
const a = (o) => n(o.matches);
|
|
@@ -5885,46 +5885,46 @@ function Si({
|
|
|
5885
5885
|
sidebarMode: p = "auto",
|
|
5886
5886
|
sidebarDrawerBreakpoint: h = 768,
|
|
5887
5887
|
sidebarDrawerOpen: w = !1,
|
|
5888
|
-
onSidebarDrawerOpenChange:
|
|
5888
|
+
onSidebarDrawerOpenChange: v,
|
|
5889
5889
|
rightSidebar: m,
|
|
5890
5890
|
rightSidebarWidth: f = 240,
|
|
5891
5891
|
rightSidebarCollapsed: d = !1,
|
|
5892
5892
|
footer: y,
|
|
5893
5893
|
footerHeight: x = 28,
|
|
5894
|
-
chromeBackground:
|
|
5895
|
-
mainStyle:
|
|
5896
|
-
style:
|
|
5894
|
+
chromeBackground: k = "navigation",
|
|
5895
|
+
mainStyle: I,
|
|
5896
|
+
style: S
|
|
5897
5897
|
}) {
|
|
5898
|
-
const
|
|
5898
|
+
const b = ke(s), E = ke(o), T = ke(l), z = ke(f), D = ke(x), P = n != null || i != null || a != null, H = {
|
|
5899
5899
|
navigation: "var(--lucent-navigation)",
|
|
5900
5900
|
bgBase: "var(--lucent-bg-base)",
|
|
5901
5901
|
bgSubtle: "var(--lucent-bg-subtle)",
|
|
5902
5902
|
surface: "var(--lucent-surface)",
|
|
5903
5903
|
surfaceSecondary: "var(--lucent-surface-secondary)"
|
|
5904
|
-
}[
|
|
5905
|
-
|
|
5904
|
+
}[k] ?? "var(--lucent-navigation)", V = Hr(`(max-width: ${h - 1}px)`), W = P && (p === "drawer" || p === "auto" && V), [C, L] = q(!1), [F, B] = q("idle");
|
|
5905
|
+
U(() => {
|
|
5906
5906
|
if (w && W)
|
|
5907
|
-
|
|
5908
|
-
else if (
|
|
5909
|
-
|
|
5910
|
-
const
|
|
5911
|
-
|
|
5907
|
+
L(!0), B("entering");
|
|
5908
|
+
else if (C) {
|
|
5909
|
+
B("exiting");
|
|
5910
|
+
const M = setTimeout(() => {
|
|
5911
|
+
L(!1), B("idle");
|
|
5912
5912
|
}, Ue);
|
|
5913
|
-
return () => clearTimeout(
|
|
5913
|
+
return () => clearTimeout(M);
|
|
5914
5914
|
}
|
|
5915
|
-
}, [w, W]),
|
|
5916
|
-
!W && w && (
|
|
5917
|
-
}, [W]),
|
|
5915
|
+
}, [w, W]), U(() => {
|
|
5916
|
+
!W && w && (v == null || v(!1));
|
|
5917
|
+
}, [W]), U(() => {
|
|
5918
5918
|
if (!w || !W) return;
|
|
5919
|
-
const
|
|
5920
|
-
|
|
5919
|
+
const M = (N) => {
|
|
5920
|
+
N.key === "Escape" && (v == null || v(!1));
|
|
5921
5921
|
};
|
|
5922
|
-
return document.addEventListener("keydown",
|
|
5923
|
-
}, [w, W,
|
|
5922
|
+
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
5923
|
+
}, [w, W, v]), U(() => {
|
|
5924
5924
|
if (w && W) {
|
|
5925
|
-
const
|
|
5925
|
+
const M = document.body.style.overflow;
|
|
5926
5926
|
return document.body.style.overflow = "hidden", () => {
|
|
5927
|
-
document.body.style.overflow =
|
|
5927
|
+
document.body.style.overflow = M;
|
|
5928
5928
|
};
|
|
5929
5929
|
}
|
|
5930
5930
|
}, [w, W]);
|
|
@@ -5937,9 +5937,9 @@ function Si({
|
|
|
5937
5937
|
flexDirection: "column",
|
|
5938
5938
|
height: "100vh",
|
|
5939
5939
|
overflow: "hidden",
|
|
5940
|
-
background:
|
|
5940
|
+
background: H,
|
|
5941
5941
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5942
|
-
...
|
|
5942
|
+
...S
|
|
5943
5943
|
},
|
|
5944
5944
|
children: [
|
|
5945
5945
|
/* @__PURE__ */ g("style", { children: [
|
|
@@ -5951,29 +5951,29 @@ function Si({
|
|
|
5951
5951
|
{
|
|
5952
5952
|
style: {
|
|
5953
5953
|
flexShrink: 0,
|
|
5954
|
-
height:
|
|
5954
|
+
height: b,
|
|
5955
5955
|
zIndex: 10,
|
|
5956
|
-
background:
|
|
5956
|
+
background: H,
|
|
5957
5957
|
display: "flex",
|
|
5958
5958
|
alignItems: "center"
|
|
5959
5959
|
},
|
|
5960
5960
|
children: [
|
|
5961
|
-
W && /* @__PURE__ */ t("div", { style: { flexShrink: 0, padding: "0 var(--lucent-space-2)" }, children: /* @__PURE__ */ t(Et, { open: w, onClick: () =>
|
|
5961
|
+
W && /* @__PURE__ */ t("div", { style: { flexShrink: 0, padding: "0 var(--lucent-space-2)" }, children: /* @__PURE__ */ t(Et, { open: w, onClick: () => v == null ? void 0 : v(!w) }) }),
|
|
5962
5962
|
/* @__PURE__ */ t("div", { style: { flex: 1, height: "100%", minWidth: 0 }, children: r })
|
|
5963
5963
|
]
|
|
5964
5964
|
}
|
|
5965
5965
|
),
|
|
5966
5966
|
/* @__PURE__ */ g("div", { style: { display: "flex", flex: 1, overflow: "hidden", position: "relative" }, children: [
|
|
5967
|
-
|
|
5967
|
+
P && !W && /* @__PURE__ */ t(
|
|
5968
5968
|
"div",
|
|
5969
5969
|
{
|
|
5970
5970
|
style: {
|
|
5971
|
-
width: c ?
|
|
5971
|
+
width: c ? T : E,
|
|
5972
5972
|
flexShrink: 0,
|
|
5973
5973
|
display: "flex",
|
|
5974
5974
|
flexDirection: "column",
|
|
5975
5975
|
overflow: "hidden",
|
|
5976
|
-
background:
|
|
5976
|
+
background: H,
|
|
5977
5977
|
transition: "width 200ms var(--lucent-easing-default)"
|
|
5978
5978
|
},
|
|
5979
5979
|
children: /* @__PURE__ */ t(
|
|
@@ -5989,7 +5989,7 @@ function Si({
|
|
|
5989
5989
|
)
|
|
5990
5990
|
}
|
|
5991
5991
|
),
|
|
5992
|
-
|
|
5992
|
+
P && !W && u && /* @__PURE__ */ t(Gr, { collapsed: c, sidebarWidth: c ? T : E, onClick: () => u(!c) }),
|
|
5993
5993
|
/* @__PURE__ */ t(
|
|
5994
5994
|
"main",
|
|
5995
5995
|
{
|
|
@@ -6003,7 +6003,7 @@ function Si({
|
|
|
6003
6003
|
borderRadius: "var(--lucent-radius-lg)",
|
|
6004
6004
|
boxShadow: "var(--lucent-shadow-sm)",
|
|
6005
6005
|
background: "var(--lucent-bg-base)",
|
|
6006
|
-
...
|
|
6006
|
+
...I
|
|
6007
6007
|
},
|
|
6008
6008
|
children: e
|
|
6009
6009
|
}
|
|
@@ -6017,7 +6017,7 @@ function Si({
|
|
|
6017
6017
|
flexShrink: 0,
|
|
6018
6018
|
overflow: "hidden",
|
|
6019
6019
|
overflowY: d ? "hidden" : "auto",
|
|
6020
|
-
background:
|
|
6020
|
+
background: H,
|
|
6021
6021
|
transition: "width 200ms var(--lucent-easing-default)"
|
|
6022
6022
|
},
|
|
6023
6023
|
children: m
|
|
@@ -6029,26 +6029,26 @@ function Si({
|
|
|
6029
6029
|
{
|
|
6030
6030
|
style: {
|
|
6031
6031
|
flexShrink: 0,
|
|
6032
|
-
height:
|
|
6032
|
+
height: D,
|
|
6033
6033
|
zIndex: 10,
|
|
6034
|
-
background:
|
|
6034
|
+
background: H
|
|
6035
6035
|
},
|
|
6036
6036
|
children: y
|
|
6037
6037
|
}
|
|
6038
6038
|
),
|
|
6039
|
-
W &&
|
|
6039
|
+
W && C && ie(
|
|
6040
6040
|
/* @__PURE__ */ g(Z, { children: [
|
|
6041
6041
|
/* @__PURE__ */ t(
|
|
6042
6042
|
"div",
|
|
6043
6043
|
{
|
|
6044
|
-
onClick: () =>
|
|
6044
|
+
onClick: () => v == null ? void 0 : v(!1),
|
|
6045
6045
|
style: {
|
|
6046
6046
|
position: "fixed",
|
|
6047
6047
|
inset: 0,
|
|
6048
6048
|
zIndex: 1100,
|
|
6049
6049
|
background: "var(--lucent-bg-overlay)",
|
|
6050
|
-
animation: `${
|
|
6051
|
-
pointerEvents:
|
|
6050
|
+
animation: `${F === "exiting" ? "lucent-backdrop-out" : "lucent-backdrop-in"} ${Ue}ms var(--lucent-easing-default) forwards`,
|
|
6051
|
+
pointerEvents: F === "exiting" ? "none" : "auto"
|
|
6052
6052
|
}
|
|
6053
6053
|
}
|
|
6054
6054
|
),
|
|
@@ -6066,13 +6066,13 @@ function Si({
|
|
|
6066
6066
|
zIndex: 1101,
|
|
6067
6067
|
display: "flex",
|
|
6068
6068
|
flexDirection: "column",
|
|
6069
|
-
background:
|
|
6069
|
+
background: H,
|
|
6070
6070
|
boxShadow: "var(--lucent-shadow-lg)",
|
|
6071
|
-
animation: `${
|
|
6071
|
+
animation: `${F === "exiting" ? "lucent-drawer-out" : "lucent-drawer-in"} ${Ue}ms var(--lucent-easing-decelerate) forwards`,
|
|
6072
6072
|
fontFamily: "var(--lucent-font-family-base)"
|
|
6073
6073
|
},
|
|
6074
6074
|
children: [
|
|
6075
|
-
/* @__PURE__ */ t("div", { style: { flexShrink: 0, display: "flex", alignItems: "center", padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ t(Et, { open: !0, onClick: () =>
|
|
6075
|
+
/* @__PURE__ */ t("div", { style: { flexShrink: 0, display: "flex", alignItems: "center", padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ t(Et, { open: !0, onClick: () => v == null ? void 0 : v(!1) }) }),
|
|
6076
6076
|
/* @__PURE__ */ t(
|
|
6077
6077
|
qt,
|
|
6078
6078
|
{
|
|
@@ -6147,32 +6147,60 @@ function Ti({
|
|
|
6147
6147
|
emptyState: l,
|
|
6148
6148
|
style: s
|
|
6149
6149
|
}) {
|
|
6150
|
-
const [c, u] = q(null), [p, h] = q(0), [w,
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
return
|
|
6156
|
-
})
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6150
|
+
const [c, u] = q(null), [p, h] = q(0), [w, v] = q(null), [m, f] = q({}), d = i !== void 0, y = d ? i : p, x = e.some((C) => C.filterable), k = O(/* @__PURE__ */ new Map()), [I, S] = q({}), b = (() => {
|
|
6151
|
+
for (let C = e.length - 1; C >= 0; C--) {
|
|
6152
|
+
const L = e[C];
|
|
6153
|
+
if (L != null && L.sticky) return L.key;
|
|
6154
|
+
}
|
|
6155
|
+
return null;
|
|
6156
|
+
})();
|
|
6157
|
+
re(() => {
|
|
6158
|
+
const C = e.filter((B) => B.sticky).map((B) => B.key);
|
|
6159
|
+
if (C.length === 0) return;
|
|
6160
|
+
const L = () => {
|
|
6161
|
+
const B = {};
|
|
6162
|
+
let A = 0;
|
|
6163
|
+
for (const M of C) {
|
|
6164
|
+
B[M] = A;
|
|
6165
|
+
const N = k.current.get(M);
|
|
6166
|
+
N && (A += N.getBoundingClientRect().width);
|
|
6167
|
+
}
|
|
6168
|
+
S(B);
|
|
6169
|
+
};
|
|
6170
|
+
L();
|
|
6171
|
+
const F = new ResizeObserver(L);
|
|
6172
|
+
for (const B of C) {
|
|
6173
|
+
const A = k.current.get(B);
|
|
6174
|
+
A && F.observe(A);
|
|
6175
|
+
}
|
|
6176
|
+
return () => F.disconnect();
|
|
6177
|
+
}, [e]);
|
|
6178
|
+
const E = x ? r.filter((C) => e.every((L) => {
|
|
6179
|
+
if (!L.filterable) return !0;
|
|
6180
|
+
const F = m[L.key];
|
|
6181
|
+
if (!F || F.length === 0) return !0;
|
|
6182
|
+
const B = String(C[L.key] ?? "");
|
|
6183
|
+
return F.includes(B);
|
|
6184
|
+
})) : r, T = c ? [...E].sort((C, L) => {
|
|
6185
|
+
const F = C[c.key], B = L[c.key], A = String(F ?? "").localeCompare(String(B ?? ""), void 0, { numeric: !0 });
|
|
6186
|
+
return c.dir === "asc" ? A : -A;
|
|
6187
|
+
}) : E, z = n > 0 ? T.slice(y * n, (y + 1) * n) : T, D = n > 0 ? Math.max(1, Math.ceil(T.length / n)) : 1, P = (C) => {
|
|
6188
|
+
d || h(C), a == null || a(C);
|
|
6189
|
+
}, R = (C) => {
|
|
6190
|
+
u((L) => !L || L.key !== C ? { key: C, dir: "asc" } : L.dir === "asc" ? { key: C, dir: "desc" } : null), d || h(0), a == null || a(0);
|
|
6191
|
+
}, H = (C, L) => {
|
|
6192
|
+
const F = { ...m, [C]: L };
|
|
6193
|
+
L.length === 0 && delete F[C], f(F), d || h(0), a == null || a(0), o == null || o(F);
|
|
6194
|
+
}, V = () => {
|
|
6167
6195
|
f({}), d || h(0), a == null || a(0), o == null || o({});
|
|
6168
|
-
},
|
|
6169
|
-
if (
|
|
6170
|
-
for (let
|
|
6196
|
+
}, W = [];
|
|
6197
|
+
if (D <= 7)
|
|
6198
|
+
for (let C = 0; C < D; C++) W.push(C);
|
|
6171
6199
|
else {
|
|
6172
|
-
|
|
6173
|
-
for (let
|
|
6174
|
-
|
|
6175
|
-
y <
|
|
6200
|
+
W.push(0), y > 2 && W.push("…");
|
|
6201
|
+
for (let C = Math.max(1, y - 1); C <= Math.min(D - 2, y + 1); C++)
|
|
6202
|
+
W.push(C);
|
|
6203
|
+
y < D - 3 && W.push("…"), W.push(D - 1);
|
|
6176
6204
|
}
|
|
6177
6205
|
return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
6178
6206
|
x && /* @__PURE__ */ t("div", { style: { position: "relative", zIndex: 1 }, children: /* @__PURE__ */ t(
|
|
@@ -6181,8 +6209,8 @@ function Ti({
|
|
|
6181
6209
|
columns: e,
|
|
6182
6210
|
rows: r,
|
|
6183
6211
|
filters: m,
|
|
6184
|
-
onFilter:
|
|
6185
|
-
onClearAll:
|
|
6212
|
+
onFilter: H,
|
|
6213
|
+
onClearAll: V
|
|
6186
6214
|
}
|
|
6187
6215
|
) }),
|
|
6188
6216
|
/* @__PURE__ */ t("div", { style: {
|
|
@@ -6191,119 +6219,141 @@ function Ti({
|
|
|
6191
6219
|
border: "1px solid var(--lucent-border-default)",
|
|
6192
6220
|
background: "var(--lucent-surface)"
|
|
6193
6221
|
}, children: /* @__PURE__ */ g("table", { style: {
|
|
6194
|
-
|
|
6222
|
+
minWidth: "100%",
|
|
6195
6223
|
borderCollapse: "collapse",
|
|
6196
6224
|
fontFamily: "var(--lucent-font-family-base)",
|
|
6197
6225
|
fontSize: "var(--lucent-font-size-sm)"
|
|
6198
6226
|
}, children: [
|
|
6199
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { style: { borderBottom: "1px solid var(--lucent-border-default)" }, children: e.map((
|
|
6200
|
-
const
|
|
6227
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { style: { borderBottom: "1px solid var(--lucent-border-default)" }, children: e.map((C) => {
|
|
6228
|
+
const L = (c == null ? void 0 : c.key) === C.key ? c.dir : "none";
|
|
6201
6229
|
return /* @__PURE__ */ t(
|
|
6202
6230
|
"th",
|
|
6203
6231
|
{
|
|
6204
|
-
|
|
6232
|
+
ref: C.sticky ? (F) => {
|
|
6233
|
+
F ? k.current.set(C.key, F) : k.current.delete(C.key);
|
|
6234
|
+
} : void 0,
|
|
6235
|
+
onClick: C.sortable ? () => R(C.key) : void 0,
|
|
6205
6236
|
style: {
|
|
6206
6237
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
6207
|
-
textAlign:
|
|
6238
|
+
textAlign: C.align ?? "left",
|
|
6208
6239
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
6209
6240
|
color: "var(--lucent-text-secondary)",
|
|
6210
|
-
background: "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)",
|
|
6241
|
+
background: C.sticky ? "color-mix(in srgb, var(--lucent-text-primary) 5%, var(--lucent-surface))" : "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)",
|
|
6211
6242
|
borderBottom: "1px solid var(--lucent-border-default)",
|
|
6212
|
-
cursor:
|
|
6243
|
+
cursor: C.sortable ? "pointer" : "default",
|
|
6213
6244
|
userSelect: "none",
|
|
6214
6245
|
whiteSpace: "nowrap",
|
|
6215
|
-
...
|
|
6246
|
+
...C.width ? { width: C.width } : {},
|
|
6247
|
+
...C.sticky ? {
|
|
6248
|
+
position: "sticky",
|
|
6249
|
+
left: I[C.key] ?? 0,
|
|
6250
|
+
zIndex: 2
|
|
6251
|
+
} : {},
|
|
6252
|
+
...C.key === b ? {
|
|
6253
|
+
boxShadow: "2px 0 4px -2px color-mix(in srgb, var(--lucent-text-primary) 10%, transparent)"
|
|
6254
|
+
} : {}
|
|
6216
6255
|
},
|
|
6217
6256
|
children: /* @__PURE__ */ g("span", { style: { display: "inline-flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6257
|
+
C.header,
|
|
6258
|
+
C.sortable && /* @__PURE__ */ t(_r, { state: L }),
|
|
6259
|
+
C.headerFilter && /* @__PURE__ */ t(
|
|
6221
6260
|
"span",
|
|
6222
6261
|
{
|
|
6223
|
-
onClick: (
|
|
6262
|
+
onClick: (F) => F.stopPropagation(),
|
|
6224
6263
|
style: { display: "inline-flex", marginLeft: "var(--lucent-space-1)" },
|
|
6225
|
-
children:
|
|
6264
|
+
children: C.headerFilter
|
|
6226
6265
|
}
|
|
6227
6266
|
)
|
|
6228
6267
|
] })
|
|
6229
6268
|
},
|
|
6230
|
-
|
|
6269
|
+
C.key
|
|
6231
6270
|
);
|
|
6232
6271
|
}) }) }),
|
|
6233
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
6272
|
+
/* @__PURE__ */ t("tbody", { children: z.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t(
|
|
6234
6273
|
"td",
|
|
6235
6274
|
{
|
|
6236
6275
|
colSpan: e.length,
|
|
6237
6276
|
style: { padding: "var(--lucent-space-12)", textAlign: "center" },
|
|
6238
|
-
children: l ?? /* @__PURE__ */ t(
|
|
6277
|
+
children: l ?? /* @__PURE__ */ t(G, { color: "secondary", children: "No data" })
|
|
6239
6278
|
}
|
|
6240
|
-
) }) :
|
|
6279
|
+
) }) : z.map((C, L) => /* @__PURE__ */ t(
|
|
6241
6280
|
"tr",
|
|
6242
6281
|
{
|
|
6243
|
-
onMouseEnter: () =>
|
|
6244
|
-
onMouseLeave: () =>
|
|
6282
|
+
onMouseEnter: () => v(L),
|
|
6283
|
+
onMouseLeave: () => v(null),
|
|
6245
6284
|
style: {
|
|
6246
|
-
borderBottom:
|
|
6247
|
-
background: w ===
|
|
6285
|
+
borderBottom: L < z.length - 1 ? "1px solid var(--lucent-border-subtle)" : "none",
|
|
6286
|
+
background: w === L ? "color-mix(in srgb, var(--lucent-text-primary) 4%, transparent)" : "transparent",
|
|
6248
6287
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
6249
6288
|
},
|
|
6250
|
-
children: e.map((
|
|
6289
|
+
children: e.map((F) => /* @__PURE__ */ t(
|
|
6251
6290
|
"td",
|
|
6252
6291
|
{
|
|
6253
6292
|
style: {
|
|
6254
6293
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
6255
6294
|
color: "var(--lucent-text-primary)",
|
|
6256
|
-
textAlign:
|
|
6257
|
-
verticalAlign: "middle"
|
|
6295
|
+
textAlign: F.align ?? "left",
|
|
6296
|
+
verticalAlign: "middle",
|
|
6297
|
+
whiteSpace: "nowrap",
|
|
6298
|
+
...F.sticky ? {
|
|
6299
|
+
position: "sticky",
|
|
6300
|
+
left: I[F.key] ?? 0,
|
|
6301
|
+
zIndex: 1,
|
|
6302
|
+
background: w === L ? "color-mix(in srgb, var(--lucent-text-primary) 4%, var(--lucent-surface))" : "var(--lucent-surface)",
|
|
6303
|
+
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
6304
|
+
} : {},
|
|
6305
|
+
...F.key === b ? {
|
|
6306
|
+
boxShadow: "2px 0 4px -2px color-mix(in srgb, var(--lucent-text-primary) 10%, transparent)"
|
|
6307
|
+
} : {}
|
|
6258
6308
|
},
|
|
6259
|
-
children:
|
|
6309
|
+
children: F.render ? F.render(C, L) : String(C[F.key] ?? "")
|
|
6260
6310
|
},
|
|
6261
|
-
|
|
6311
|
+
F.key
|
|
6262
6312
|
))
|
|
6263
6313
|
},
|
|
6264
|
-
|
|
6314
|
+
L
|
|
6265
6315
|
)) })
|
|
6266
6316
|
] }) }),
|
|
6267
|
-
n > 0 &&
|
|
6317
|
+
n > 0 && T.length > 0 && /* @__PURE__ */ g("div", { style: {
|
|
6268
6318
|
display: "flex",
|
|
6269
6319
|
alignItems: "center",
|
|
6270
6320
|
justifyContent: "space-between",
|
|
6271
6321
|
gap: "var(--lucent-space-3)",
|
|
6272
6322
|
flexWrap: "wrap"
|
|
6273
6323
|
}, children: [
|
|
6274
|
-
/* @__PURE__ */ t(
|
|
6324
|
+
/* @__PURE__ */ t(G, { color: "secondary", size: "sm", children: T.length === 0 ? `0 rows${r.length > 0 ? ` (filtered from ${r.length})` : ""}` : T.length === 1 ? `1 row${T.length < r.length ? ` (filtered from ${r.length})` : ""}` : `${y * n + 1}–${Math.min((y + 1) * n, T.length)} of ${T.length} rows${T.length < r.length ? ` (filtered from ${r.length})` : ""}` }),
|
|
6275
6325
|
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6276
6326
|
/* @__PURE__ */ t(
|
|
6277
6327
|
je,
|
|
6278
6328
|
{
|
|
6279
|
-
onClick: () =>
|
|
6329
|
+
onClick: () => P(y - 1),
|
|
6280
6330
|
disabled: y === 0,
|
|
6281
6331
|
"aria-label": "Previous page",
|
|
6282
6332
|
children: /* @__PURE__ */ t(Bt, { dir: "left" })
|
|
6283
6333
|
}
|
|
6284
6334
|
),
|
|
6285
|
-
|
|
6286
|
-
(
|
|
6335
|
+
W.map(
|
|
6336
|
+
(C, L) => C === "…" ? /* @__PURE__ */ t("span", { style: {
|
|
6287
6337
|
padding: "0 var(--lucent-space-1)",
|
|
6288
6338
|
color: "var(--lucent-text-disabled)",
|
|
6289
6339
|
fontSize: "var(--lucent-font-size-sm)"
|
|
6290
|
-
}, children: "…" }, `ellipsis-${
|
|
6340
|
+
}, children: "…" }, `ellipsis-${L}`) : /* @__PURE__ */ t(
|
|
6291
6341
|
je,
|
|
6292
6342
|
{
|
|
6293
|
-
onClick: () =>
|
|
6294
|
-
active:
|
|
6295
|
-
"aria-label": `Page ${
|
|
6296
|
-
"aria-current":
|
|
6297
|
-
children:
|
|
6343
|
+
onClick: () => P(C),
|
|
6344
|
+
active: C === y,
|
|
6345
|
+
"aria-label": `Page ${C + 1}`,
|
|
6346
|
+
"aria-current": C === y ? "page" : void 0,
|
|
6347
|
+
children: C + 1
|
|
6298
6348
|
},
|
|
6299
|
-
|
|
6349
|
+
C
|
|
6300
6350
|
)
|
|
6301
6351
|
),
|
|
6302
6352
|
/* @__PURE__ */ t(
|
|
6303
6353
|
je,
|
|
6304
6354
|
{
|
|
6305
|
-
onClick: () =>
|
|
6306
|
-
disabled: y >=
|
|
6355
|
+
onClick: () => P(y + 1),
|
|
6356
|
+
disabled: y >= D - 1,
|
|
6307
6357
|
"aria-label": "Next page",
|
|
6308
6358
|
children: /* @__PURE__ */ t(Bt, { dir: "right" })
|
|
6309
6359
|
}
|
|
@@ -6364,8 +6414,8 @@ function Kr({
|
|
|
6364
6414
|
value: n,
|
|
6365
6415
|
onChange: i
|
|
6366
6416
|
}) {
|
|
6367
|
-
const [a, o] = q(!1), [l, s] = q(!1), [c, u] = q(""), p =
|
|
6368
|
-
|
|
6417
|
+
const [a, o] = q(!1), [l, s] = q(!1), [c, u] = q(""), p = O(null), h = O(null), w = n.length > 0;
|
|
6418
|
+
U(() => {
|
|
6369
6419
|
if (!a) {
|
|
6370
6420
|
u("");
|
|
6371
6421
|
return;
|
|
@@ -6383,7 +6433,7 @@ function Kr({
|
|
|
6383
6433
|
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", y);
|
|
6384
6434
|
};
|
|
6385
6435
|
}, [a]);
|
|
6386
|
-
const
|
|
6436
|
+
const v = c ? r.filter((d) => d.toLowerCase().includes(c.toLowerCase())) : r, m = (d) => i(n.includes(d) ? n.filter((y) => y !== d) : [...n, d]), f = n.length === 0 ? null : n.length === 1 ? /* @__PURE__ */ g("span", { style: { color: "var(--lucent-text-secondary)", fontWeight: "var(--lucent-font-weight-regular)" }, children: [
|
|
6387
6437
|
": ",
|
|
6388
6438
|
n[0]
|
|
6389
6439
|
] }) : /* @__PURE__ */ g("span", { style: { color: "var(--lucent-accent-default)" }, children: [
|
|
@@ -6490,13 +6540,13 @@ function Kr({
|
|
|
6490
6540
|
children: "Clear selection"
|
|
6491
6541
|
}
|
|
6492
6542
|
) }),
|
|
6493
|
-
/* @__PURE__ */ t("div", { style: { overflowY: "auto", padding: "var(--lucent-space-1)", borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" }, children:
|
|
6543
|
+
/* @__PURE__ */ t("div", { style: { overflowY: "auto", padding: "var(--lucent-space-1)", borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" }, children: v.length === 0 ? /* @__PURE__ */ t("div", { style: {
|
|
6494
6544
|
padding: "var(--lucent-space-3)",
|
|
6495
6545
|
color: "var(--lucent-text-disabled)",
|
|
6496
6546
|
fontFamily: "var(--lucent-font-family-base)",
|
|
6497
6547
|
fontSize: "var(--lucent-font-size-xs)",
|
|
6498
6548
|
textAlign: "center"
|
|
6499
|
-
}, children: "No results" }) :
|
|
6549
|
+
}, children: "No results" }) : v.map((d) => /* @__PURE__ */ t(
|
|
6500
6550
|
Xr,
|
|
6501
6551
|
{
|
|
6502
6552
|
label: d,
|
|
@@ -6717,51 +6767,51 @@ function Ii({
|
|
|
6717
6767
|
onOpenChange: a,
|
|
6718
6768
|
style: o
|
|
6719
6769
|
}) {
|
|
6720
|
-
const l = i !== void 0, [s, c] = q(!1), u = l ? i : s, [p, h] = q(""), [w,
|
|
6770
|
+
const l = i !== void 0, [s, c] = q(!1), u = l ? i : s, [p, h] = q(""), [w, v] = q(0), m = O(null), f = O(null), d = O(!1);
|
|
6721
6771
|
if (!d.current) {
|
|
6722
|
-
const
|
|
6723
|
-
|
|
6772
|
+
const T = document.createElement("style");
|
|
6773
|
+
T.textContent = Zr, document.head.appendChild(T), d.current = !0;
|
|
6724
6774
|
}
|
|
6725
|
-
const y = X((
|
|
6726
|
-
l || c(
|
|
6775
|
+
const y = X((T) => {
|
|
6776
|
+
l || c(T), a == null || a(T);
|
|
6727
6777
|
}, [l, a]);
|
|
6728
|
-
|
|
6729
|
-
const
|
|
6778
|
+
U(() => {
|
|
6779
|
+
const T = (z) => {
|
|
6730
6780
|
(z.metaKey || z.ctrlKey) && z.key === n && (z.preventDefault(), y(!u));
|
|
6731
6781
|
};
|
|
6732
|
-
return window.addEventListener("keydown",
|
|
6733
|
-
}, [u, n, y]),
|
|
6734
|
-
u && (h(""),
|
|
6735
|
-
var
|
|
6736
|
-
return (
|
|
6782
|
+
return window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T);
|
|
6783
|
+
}, [u, n, y]), U(() => {
|
|
6784
|
+
u && (h(""), v(0), setTimeout(() => {
|
|
6785
|
+
var T;
|
|
6786
|
+
return (T = m.current) == null ? void 0 : T.focus();
|
|
6737
6787
|
}, 10));
|
|
6738
6788
|
}, [u]);
|
|
6739
|
-
const x = p ? e.filter((
|
|
6740
|
-
|
|
6741
|
-
const
|
|
6742
|
-
if (!
|
|
6743
|
-
const z =
|
|
6789
|
+
const x = p ? e.filter((T) => Jr(T, p)) : e, k = x.filter((T) => !T.disabled);
|
|
6790
|
+
U(() => {
|
|
6791
|
+
const T = f.current;
|
|
6792
|
+
if (!T) return;
|
|
6793
|
+
const z = T.querySelector('[data-active="true"]');
|
|
6744
6794
|
z == null || z.scrollIntoView({ block: "nearest" });
|
|
6745
6795
|
}, [w]);
|
|
6746
|
-
const
|
|
6747
|
-
|
|
6748
|
-
},
|
|
6749
|
-
if (
|
|
6796
|
+
const I = (T) => {
|
|
6797
|
+
T.disabled || (T.onSelect(), y(!1));
|
|
6798
|
+
}, S = (T) => {
|
|
6799
|
+
if (T.key === "Escape") {
|
|
6750
6800
|
y(!1);
|
|
6751
6801
|
return;
|
|
6752
6802
|
}
|
|
6753
|
-
if (
|
|
6754
|
-
|
|
6755
|
-
else if (
|
|
6756
|
-
|
|
6757
|
-
else if (
|
|
6758
|
-
const z =
|
|
6759
|
-
z &&
|
|
6760
|
-
}
|
|
6761
|
-
},
|
|
6762
|
-
for (const
|
|
6763
|
-
const z =
|
|
6764
|
-
z && z.group ===
|
|
6803
|
+
if (T.key === "ArrowDown")
|
|
6804
|
+
T.preventDefault(), k.length > 0 && v((z) => (z + 1) % k.length);
|
|
6805
|
+
else if (T.key === "ArrowUp")
|
|
6806
|
+
T.preventDefault(), k.length > 0 && v((z) => (z - 1 + k.length) % k.length);
|
|
6807
|
+
else if (T.key === "Enter") {
|
|
6808
|
+
const z = k[w];
|
|
6809
|
+
z && I(z);
|
|
6810
|
+
}
|
|
6811
|
+
}, b = [];
|
|
6812
|
+
for (const T of x) {
|
|
6813
|
+
const z = b[b.length - 1];
|
|
6814
|
+
z && z.group === T.group ? z.items.push(T) : b.push({ group: T.group, items: [T] });
|
|
6765
6815
|
}
|
|
6766
6816
|
if (!u) return null;
|
|
6767
6817
|
let E = 0;
|
|
@@ -6791,7 +6841,7 @@ function Ii({
|
|
|
6791
6841
|
role: "combobox",
|
|
6792
6842
|
"aria-haspopup": "listbox",
|
|
6793
6843
|
"aria-expanded": "true",
|
|
6794
|
-
onClick: (
|
|
6844
|
+
onClick: (T) => T.stopPropagation(),
|
|
6795
6845
|
style: {
|
|
6796
6846
|
width: "100%",
|
|
6797
6847
|
maxWidth: 560,
|
|
@@ -6825,10 +6875,10 @@ function Ii({
|
|
|
6825
6875
|
"aria-autocomplete": "list",
|
|
6826
6876
|
"aria-controls": "lucent-command-list",
|
|
6827
6877
|
value: p,
|
|
6828
|
-
onChange: (
|
|
6829
|
-
h(
|
|
6878
|
+
onChange: (T) => {
|
|
6879
|
+
h(T.target.value), v(0);
|
|
6830
6880
|
},
|
|
6831
|
-
onKeyDown:
|
|
6881
|
+
onKeyDown: S,
|
|
6832
6882
|
placeholder: r,
|
|
6833
6883
|
style: {
|
|
6834
6884
|
flex: 1,
|
|
@@ -6851,30 +6901,30 @@ function Ii({
|
|
|
6851
6901
|
role: "listbox",
|
|
6852
6902
|
ref: f,
|
|
6853
6903
|
style: { maxHeight: 360, overflowY: "auto", padding: "var(--lucent-space-1) var(--lucent-space-2)" },
|
|
6854
|
-
children: x.length === 0 ? /* @__PURE__ */ t("div", { style: { padding: "var(--lucent-space-8)", textAlign: "center" }, children: /* @__PURE__ */ g(
|
|
6904
|
+
children: x.length === 0 ? /* @__PURE__ */ t("div", { style: { padding: "var(--lucent-space-8)", textAlign: "center" }, children: /* @__PURE__ */ g(G, { color: "secondary", children: [
|
|
6855
6905
|
'No results for "',
|
|
6856
6906
|
p,
|
|
6857
6907
|
'"'
|
|
6858
|
-
] }) }) :
|
|
6859
|
-
|
|
6908
|
+
] }) }) : b.map(({ group: T, items: z }, D) => /* @__PURE__ */ g("div", { children: [
|
|
6909
|
+
T && /* @__PURE__ */ t("div", { style: {
|
|
6860
6910
|
padding: "var(--lucent-space-2) var(--lucent-space-2) var(--lucent-space-1)",
|
|
6861
|
-
...
|
|
6862
|
-
}, children: /* @__PURE__ */ t(
|
|
6863
|
-
z.map((
|
|
6864
|
-
const
|
|
6865
|
-
let
|
|
6866
|
-
return
|
|
6911
|
+
...D > 0 ? { borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" } : {}
|
|
6912
|
+
}, children: /* @__PURE__ */ t(G, { size: "xs", color: "secondary", weight: "medium", children: T }) }),
|
|
6913
|
+
z.map((P) => {
|
|
6914
|
+
const R = P.disabled ?? !1;
|
|
6915
|
+
let H = !1;
|
|
6916
|
+
return R || (H = E === w, E++), /* @__PURE__ */ g(
|
|
6867
6917
|
"div",
|
|
6868
6918
|
{
|
|
6869
6919
|
role: "option",
|
|
6870
|
-
"aria-selected":
|
|
6871
|
-
"aria-disabled":
|
|
6872
|
-
"data-active":
|
|
6873
|
-
onClick: () =>
|
|
6920
|
+
"aria-selected": H,
|
|
6921
|
+
"aria-disabled": R,
|
|
6922
|
+
"data-active": H,
|
|
6923
|
+
onClick: () => I(P),
|
|
6874
6924
|
onMouseEnter: () => {
|
|
6875
|
-
if (!
|
|
6876
|
-
const
|
|
6877
|
-
|
|
6925
|
+
if (!R) {
|
|
6926
|
+
const V = k.indexOf(P);
|
|
6927
|
+
V !== -1 && v(V);
|
|
6878
6928
|
}
|
|
6879
6929
|
},
|
|
6880
6930
|
style: {
|
|
@@ -6883,23 +6933,23 @@ function Ii({
|
|
|
6883
6933
|
gap: "var(--lucent-space-3)",
|
|
6884
6934
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
6885
6935
|
borderRadius: "var(--lucent-radius-md)",
|
|
6886
|
-
cursor:
|
|
6887
|
-
background:
|
|
6936
|
+
cursor: R ? "not-allowed" : "pointer",
|
|
6937
|
+
background: H ? "color-mix(in srgb, var(--lucent-accent-default) 20%, var(--lucent-surface-secondary))" : "transparent",
|
|
6888
6938
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
6889
|
-
opacity:
|
|
6939
|
+
opacity: R ? 0.5 : 1
|
|
6890
6940
|
},
|
|
6891
6941
|
children: [
|
|
6892
|
-
|
|
6942
|
+
P.icon && /* @__PURE__ */ t("span", { style: { flexShrink: 0, color: "var(--lucent-text-secondary)", display: "flex" }, children: P.icon }),
|
|
6893
6943
|
/* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
6894
|
-
/* @__PURE__ */ t(
|
|
6895
|
-
|
|
6944
|
+
/* @__PURE__ */ t(G, { size: "sm", weight: "medium", truncate: !0, children: P.label }),
|
|
6945
|
+
P.description && /* @__PURE__ */ t(G, { size: "xs", color: "secondary", truncate: !0, children: P.description })
|
|
6896
6946
|
] })
|
|
6897
6947
|
]
|
|
6898
6948
|
},
|
|
6899
|
-
|
|
6949
|
+
P.id
|
|
6900
6950
|
);
|
|
6901
6951
|
})
|
|
6902
|
-
] },
|
|
6952
|
+
] }, D))
|
|
6903
6953
|
}
|
|
6904
6954
|
),
|
|
6905
6955
|
/* @__PURE__ */ t("div", { style: {
|
|
@@ -6912,10 +6962,10 @@ function Ii({
|
|
|
6912
6962
|
["↑↓", "Navigate"],
|
|
6913
6963
|
["↵", "Select"],
|
|
6914
6964
|
["Esc", "Close"]
|
|
6915
|
-
].map(([
|
|
6916
|
-
/* @__PURE__ */ t(fe, { size: "xs", variant: "outline", tabIndex: -1, style: { pointerEvents: "none" }, children:
|
|
6917
|
-
/* @__PURE__ */ t(
|
|
6918
|
-
] },
|
|
6965
|
+
].map(([T, z]) => /* @__PURE__ */ g("span", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6966
|
+
/* @__PURE__ */ t(fe, { size: "xs", variant: "outline", tabIndex: -1, style: { pointerEvents: "none" }, children: T }),
|
|
6967
|
+
/* @__PURE__ */ t(G, { size: "xs", color: "secondary", children: z })
|
|
6968
|
+
] }, T)) })
|
|
6919
6969
|
]
|
|
6920
6970
|
}
|
|
6921
6971
|
)
|
|
@@ -7039,44 +7089,44 @@ function zi({
|
|
|
7039
7089
|
errorText: p,
|
|
7040
7090
|
style: h
|
|
7041
7091
|
}) {
|
|
7042
|
-
const w = r !== void 0, [
|
|
7043
|
-
|
|
7092
|
+
const w = r !== void 0, [v, m] = q(n), f = w ? r : v, [d, y] = q(!1), [x, k] = q(""), [I, S] = q(0), [b, E] = q(!1), T = O(null), z = O(null), D = O(null), P = O(null), [R, H] = q({ top: 0, left: 0, width: 0 }), V = at();
|
|
7093
|
+
U(() => {
|
|
7044
7094
|
if (!d) return;
|
|
7045
|
-
const
|
|
7095
|
+
const $ = (_) => {
|
|
7046
7096
|
var K, se;
|
|
7047
|
-
!((K =
|
|
7097
|
+
!((K = T.current) != null && K.contains(_.target)) && !((se = P.current) != null && se.contains(_.target)) && (y(!1), k(""));
|
|
7048
7098
|
};
|
|
7049
|
-
return document.addEventListener("mousedown",
|
|
7050
|
-
}, [d]),
|
|
7051
|
-
if (!d || !
|
|
7052
|
-
const
|
|
7053
|
-
|
|
7099
|
+
return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
|
|
7100
|
+
}, [d]), re(() => {
|
|
7101
|
+
if (!d || !D.current) return;
|
|
7102
|
+
const $ = D.current.getBoundingClientRect();
|
|
7103
|
+
H({ top: $.bottom + 4, left: $.left, width: $.width });
|
|
7054
7104
|
}, [d, f, x]);
|
|
7055
|
-
const W = (
|
|
7056
|
-
const
|
|
7057
|
-
w || m(
|
|
7058
|
-
},
|
|
7059
|
-
const
|
|
7060
|
-
w || m(
|
|
7061
|
-
},
|
|
7062
|
-
(
|
|
7063
|
-
),
|
|
7064
|
-
if (
|
|
7065
|
-
y(!1),
|
|
7105
|
+
const W = ($) => {
|
|
7106
|
+
const _ = f.includes($) ? f.filter((K) => K !== $) : l !== void 0 && f.length >= l ? f : [...f, $];
|
|
7107
|
+
w || m(_), i == null || i(_);
|
|
7108
|
+
}, C = ($) => {
|
|
7109
|
+
const _ = f.filter((K) => K !== $);
|
|
7110
|
+
w || m(_), i == null || i(_);
|
|
7111
|
+
}, L = e.filter(
|
|
7112
|
+
($) => $.label.toLowerCase().includes(x.toLowerCase())
|
|
7113
|
+
), F = ($) => {
|
|
7114
|
+
if ($.key === "Escape") {
|
|
7115
|
+
y(!1), k("");
|
|
7066
7116
|
return;
|
|
7067
7117
|
}
|
|
7068
|
-
if (
|
|
7069
|
-
|
|
7070
|
-
const
|
|
7071
|
-
|
|
7118
|
+
if ($.key === "ArrowDown" && ($.preventDefault(), y(!0), S((_) => Math.min(_ + 1, L.length - 1))), $.key === "ArrowUp" && ($.preventDefault(), S((_) => Math.max(_ - 1, 0))), $.key === "Enter") {
|
|
7119
|
+
$.preventDefault();
|
|
7120
|
+
const _ = L[I];
|
|
7121
|
+
_ && !_.disabled && W(_.value);
|
|
7072
7122
|
}
|
|
7073
|
-
|
|
7074
|
-
},
|
|
7075
|
-
return /* @__PURE__ */ g("div", { ref:
|
|
7123
|
+
$.key === "Backspace" && x === "" && f.length > 0 && C(f[f.length - 1]);
|
|
7124
|
+
}, B = l !== void 0 && f.length >= l, A = !!p, M = o ? "var(--lucent-border-default)" : A ? "var(--lucent-danger-default)" : b ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", N = b ? `0 0 0 3px ${A ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", j = `lucent-multiselect-${at()}`;
|
|
7125
|
+
return /* @__PURE__ */ g("div", { ref: T, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...h }, children: [
|
|
7076
7126
|
c && /* @__PURE__ */ t(
|
|
7077
7127
|
"label",
|
|
7078
7128
|
{
|
|
7079
|
-
htmlFor:
|
|
7129
|
+
htmlFor: j,
|
|
7080
7130
|
style: {
|
|
7081
7131
|
fontSize: Ge[s],
|
|
7082
7132
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
@@ -7086,13 +7136,13 @@ function zi({
|
|
|
7086
7136
|
children: c
|
|
7087
7137
|
}
|
|
7088
7138
|
),
|
|
7089
|
-
/* @__PURE__ */ g("div", { ref:
|
|
7139
|
+
/* @__PURE__ */ g("div", { ref: D, children: [
|
|
7090
7140
|
/* @__PURE__ */ g(
|
|
7091
7141
|
"div",
|
|
7092
7142
|
{
|
|
7093
7143
|
onClick: () => {
|
|
7094
|
-
var
|
|
7095
|
-
o || (y(!0), (
|
|
7144
|
+
var $;
|
|
7145
|
+
o || (y(!0), ($ = z.current) == null || $.focus());
|
|
7096
7146
|
},
|
|
7097
7147
|
style: {
|
|
7098
7148
|
display: "flex",
|
|
@@ -7103,35 +7153,35 @@ function zi({
|
|
|
7103
7153
|
boxSizing: "border-box",
|
|
7104
7154
|
padding: ta[s],
|
|
7105
7155
|
borderRadius: "var(--lucent-radius-lg)",
|
|
7106
|
-
border: `1px solid ${
|
|
7156
|
+
border: `1px solid ${M}`,
|
|
7107
7157
|
background: o ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
|
|
7108
7158
|
cursor: o ? "not-allowed" : "text",
|
|
7109
7159
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
7110
|
-
boxShadow:
|
|
7160
|
+
boxShadow: N
|
|
7111
7161
|
},
|
|
7112
7162
|
children: [
|
|
7113
|
-
f.map((
|
|
7114
|
-
const
|
|
7115
|
-
return
|
|
7163
|
+
f.map(($) => {
|
|
7164
|
+
const _ = e.find((K) => K.value === $);
|
|
7165
|
+
return _ ? /* @__PURE__ */ t(Pe, { size: na[s], onDismiss: () => C($), disabled: o, children: _.label }, $) : null;
|
|
7116
7166
|
}),
|
|
7117
7167
|
/* @__PURE__ */ t(
|
|
7118
7168
|
"input",
|
|
7119
7169
|
{
|
|
7120
|
-
id:
|
|
7170
|
+
id: j,
|
|
7121
7171
|
ref: z,
|
|
7122
7172
|
value: x,
|
|
7123
|
-
onChange: (
|
|
7124
|
-
|
|
7173
|
+
onChange: ($) => {
|
|
7174
|
+
k($.target.value), y(!0), S(0);
|
|
7125
7175
|
},
|
|
7126
|
-
onKeyDown:
|
|
7176
|
+
onKeyDown: F,
|
|
7127
7177
|
onFocus: () => E(!0),
|
|
7128
7178
|
onBlur: () => E(!1),
|
|
7129
7179
|
disabled: o,
|
|
7130
7180
|
placeholder: f.length === 0 ? a : "",
|
|
7131
7181
|
"aria-autocomplete": "list",
|
|
7132
|
-
"aria-controls":
|
|
7182
|
+
"aria-controls": V,
|
|
7133
7183
|
"aria-expanded": d,
|
|
7134
|
-
"aria-describedby": A ? `${
|
|
7184
|
+
"aria-describedby": A ? `${j}-error` : u ? `${j}-helper` : void 0,
|
|
7135
7185
|
role: "combobox",
|
|
7136
7186
|
style: {
|
|
7137
7187
|
flex: "1 1 80px",
|
|
@@ -7154,15 +7204,15 @@ function zi({
|
|
|
7154
7204
|
/* @__PURE__ */ g(
|
|
7155
7205
|
"div",
|
|
7156
7206
|
{
|
|
7157
|
-
ref:
|
|
7158
|
-
id:
|
|
7207
|
+
ref: P,
|
|
7208
|
+
id: V,
|
|
7159
7209
|
role: "listbox",
|
|
7160
7210
|
"aria-multiselectable": "true",
|
|
7161
7211
|
style: {
|
|
7162
7212
|
position: "fixed",
|
|
7163
|
-
top:
|
|
7164
|
-
left:
|
|
7165
|
-
width:
|
|
7213
|
+
top: R.top,
|
|
7214
|
+
left: R.left,
|
|
7215
|
+
width: R.width,
|
|
7166
7216
|
zIndex: 1e3,
|
|
7167
7217
|
background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
|
|
7168
7218
|
backdropFilter: "blur(6px)",
|
|
@@ -7175,50 +7225,50 @@ function zi({
|
|
|
7175
7225
|
padding: Be[s]
|
|
7176
7226
|
},
|
|
7177
7227
|
children: [
|
|
7178
|
-
|
|
7179
|
-
const K = f.includes(
|
|
7228
|
+
L.length === 0 ? /* @__PURE__ */ t("div", { style: { padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ t(G, { color: "secondary", size: Dt[s], children: "No options" }) }) : L.map(($, _) => {
|
|
7229
|
+
const K = f.includes($.value), se = _ === I, ae = $.disabled ?? !1, Y = B && !K;
|
|
7180
7230
|
return /* @__PURE__ */ g(
|
|
7181
7231
|
"div",
|
|
7182
7232
|
{
|
|
7183
7233
|
role: "option",
|
|
7184
7234
|
"aria-selected": K,
|
|
7185
|
-
"aria-disabled":
|
|
7235
|
+
"aria-disabled": ae || Y,
|
|
7186
7236
|
onClick: () => {
|
|
7187
|
-
!
|
|
7237
|
+
!ae && !Y && W($.value);
|
|
7188
7238
|
},
|
|
7189
|
-
onMouseEnter: () =>
|
|
7239
|
+
onMouseEnter: () => S(_),
|
|
7190
7240
|
style: {
|
|
7191
7241
|
display: "flex",
|
|
7192
7242
|
alignItems: "center",
|
|
7193
7243
|
gap: Be[s],
|
|
7194
7244
|
padding: Be[s],
|
|
7195
7245
|
borderRadius: "var(--lucent-radius-md)",
|
|
7196
|
-
cursor:
|
|
7246
|
+
cursor: ae || Y ? "not-allowed" : "pointer",
|
|
7197
7247
|
background: se ? "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)" : "transparent",
|
|
7198
|
-
opacity:
|
|
7248
|
+
opacity: ae || Y ? 0.5 : 1
|
|
7199
7249
|
},
|
|
7200
7250
|
children: [
|
|
7201
7251
|
/* @__PURE__ */ t(
|
|
7202
7252
|
pt,
|
|
7203
7253
|
{
|
|
7204
7254
|
checked: K,
|
|
7205
|
-
disabled:
|
|
7255
|
+
disabled: ae || Y,
|
|
7206
7256
|
size: s,
|
|
7207
7257
|
style: { margin: 0, pointerEvents: "none" },
|
|
7208
7258
|
"aria-hidden": !0,
|
|
7209
7259
|
readOnly: !0
|
|
7210
7260
|
}
|
|
7211
7261
|
),
|
|
7212
|
-
/* @__PURE__ */ t(
|
|
7262
|
+
/* @__PURE__ */ t(G, { size: Dt[s], children: $.label })
|
|
7213
7263
|
]
|
|
7214
7264
|
},
|
|
7215
|
-
|
|
7265
|
+
$.value
|
|
7216
7266
|
);
|
|
7217
7267
|
}),
|
|
7218
|
-
|
|
7268
|
+
B && /* @__PURE__ */ t("div", { style: {
|
|
7219
7269
|
padding: "var(--lucent-space-2)",
|
|
7220
7270
|
borderTop: "1px solid var(--lucent-border-subtle)"
|
|
7221
|
-
}, children: /* @__PURE__ */ g(
|
|
7271
|
+
}, children: /* @__PURE__ */ g(G, { size: s === "lg" ? "sm" : "xs", color: "secondary", children: [
|
|
7222
7272
|
"Max ",
|
|
7223
7273
|
l,
|
|
7224
7274
|
" selected"
|
|
@@ -7232,7 +7282,7 @@ function zi({
|
|
|
7232
7282
|
A && /* @__PURE__ */ t(
|
|
7233
7283
|
"span",
|
|
7234
7284
|
{
|
|
7235
|
-
id: `${
|
|
7285
|
+
id: `${j}-error`,
|
|
7236
7286
|
role: "alert",
|
|
7237
7287
|
style: {
|
|
7238
7288
|
fontSize: Ge[s],
|
|
@@ -7245,7 +7295,7 @@ function zi({
|
|
|
7245
7295
|
!A && u && /* @__PURE__ */ t(
|
|
7246
7296
|
"span",
|
|
7247
7297
|
{
|
|
7248
|
-
id: `${
|
|
7298
|
+
id: `${j}-helper`,
|
|
7249
7299
|
style: {
|
|
7250
7300
|
fontSize: Ge[s],
|
|
7251
7301
|
color: "var(--lucent-text-secondary)",
|
|
@@ -7373,7 +7423,7 @@ function Re(e, r) {
|
|
|
7373
7423
|
function $e(e, r) {
|
|
7374
7424
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate()) < new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
7375
7425
|
}
|
|
7376
|
-
function
|
|
7426
|
+
function Lt(e, r) {
|
|
7377
7427
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate()) > new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
7378
7428
|
}
|
|
7379
7429
|
const oa = [
|
|
@@ -7410,7 +7460,7 @@ const sa = { sm: "calc(var(--lucent-space-8) * 0.5 + 18px)", md: "calc(var(--luc
|
|
|
7410
7460
|
md: "calc((var(--lucent-space-2) + var(--lucent-space-3)) / 2)",
|
|
7411
7461
|
lg: "var(--lucent-space-3)"
|
|
7412
7462
|
}, ua = { sm: 28, md: 32, lg: 38 }, pa = { sm: "var(--lucent-font-size-xs)", md: "var(--lucent-font-size-sm)", lg: "var(--lucent-font-size-md)" }, ha = { sm: "xs", md: "sm", lg: "md" }, fa = { sm: "xs", md: "xs", lg: "sm" }, ma = { sm: 24, md: 28, lg: 32 }, ga = { sm: 14, md: 16, lg: 18 }, Zt = { sm: "var(--lucent-space-3)", md: "var(--lucent-space-4)", lg: "var(--lucent-space-5)" }, st = { sm: 220, md: 260, lg: 300 };
|
|
7413
|
-
function
|
|
7463
|
+
function Pt({ dir: e, onClick: r, disabled: n, size: i = "md" }) {
|
|
7414
7464
|
const [a, o] = q(!1), l = ma[i], s = ga[i];
|
|
7415
7465
|
return /* @__PURE__ */ t(
|
|
7416
7466
|
"button",
|
|
@@ -7461,54 +7511,54 @@ function lt({
|
|
|
7461
7511
|
onDayHover: p,
|
|
7462
7512
|
size: h = "md"
|
|
7463
7513
|
}) {
|
|
7464
|
-
const w = ra(e, r),
|
|
7465
|
-
...Array(
|
|
7514
|
+
const w = ra(e, r), v = aa(e, r), [m, f] = q(null), d = [
|
|
7515
|
+
...Array(v).fill(null),
|
|
7466
7516
|
...Array.from({ length: w }, (y, x) => x + 1)
|
|
7467
7517
|
];
|
|
7468
7518
|
for (; d.length % 7 !== 0; ) d.push(null);
|
|
7469
7519
|
return /* @__PURE__ */ g("div", { children: [
|
|
7470
7520
|
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "var(--lucent-space-3)" }, children: [
|
|
7471
|
-
/* @__PURE__ */ t(
|
|
7472
|
-
/* @__PURE__ */ g(
|
|
7521
|
+
/* @__PURE__ */ t(Pt, { dir: "prev", onClick: s, size: h }),
|
|
7522
|
+
/* @__PURE__ */ g(G, { weight: "medium", size: ha[h], children: [
|
|
7473
7523
|
oa[r],
|
|
7474
7524
|
" ",
|
|
7475
7525
|
e
|
|
7476
7526
|
] }),
|
|
7477
|
-
/* @__PURE__ */ t(
|
|
7527
|
+
/* @__PURE__ */ t(Pt, { dir: "next", onClick: c, size: h })
|
|
7478
7528
|
] }),
|
|
7479
|
-
/* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children: ia.map((y) => /* @__PURE__ */ t("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ t(
|
|
7529
|
+
/* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children: ia.map((y) => /* @__PURE__ */ t("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ t(G, { size: fa[h], color: "secondary", children: y }) }, y)) }),
|
|
7480
7530
|
/* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: d.map((y, x) => {
|
|
7481
7531
|
if (!y) return /* @__PURE__ */ t("div", {}, x);
|
|
7482
|
-
const
|
|
7532
|
+
const k = new Date(e, r, y), I = n ? Re(k, n) : !1, S = Re(k, i), b = (a ? $e(k, a) : !1) || (o ? Lt(k, o) : !1);
|
|
7483
7533
|
let E = !1;
|
|
7484
|
-
return u != null && u.start && (u != null && u.end) && (E = !$e(
|
|
7534
|
+
return u != null && u.start && (u != null && u.end) && (E = !$e(k, u.start) && !Lt(k, u.end)), /* @__PURE__ */ t(
|
|
7485
7535
|
"button",
|
|
7486
7536
|
{
|
|
7487
7537
|
type: "button",
|
|
7488
|
-
disabled:
|
|
7489
|
-
onClick: () => !
|
|
7538
|
+
disabled: b,
|
|
7539
|
+
onClick: () => !b && l(k),
|
|
7490
7540
|
onMouseEnter: () => {
|
|
7491
|
-
f(y), p == null || p(
|
|
7541
|
+
f(y), p == null || p(k);
|
|
7492
7542
|
},
|
|
7493
7543
|
onMouseLeave: () => {
|
|
7494
7544
|
f(null), p == null || p(null);
|
|
7495
7545
|
},
|
|
7496
|
-
"aria-label": Te(
|
|
7497
|
-
"aria-pressed":
|
|
7546
|
+
"aria-label": Te(k),
|
|
7547
|
+
"aria-pressed": I,
|
|
7498
7548
|
style: {
|
|
7499
7549
|
display: "flex",
|
|
7500
7550
|
alignItems: "center",
|
|
7501
7551
|
justifyContent: "center",
|
|
7502
7552
|
height: ua[h],
|
|
7503
7553
|
width: "100%",
|
|
7504
|
-
border:
|
|
7554
|
+
border: S && !I ? "1px solid var(--lucent-border-strong)" : "1px solid transparent",
|
|
7505
7555
|
borderRadius: "var(--lucent-radius-md)",
|
|
7506
|
-
background:
|
|
7507
|
-
color:
|
|
7556
|
+
background: I ? "var(--lucent-accent-default)" : E ? "var(--lucent-accent-subtle)" : m === y && !b ? "color-mix(in srgb, var(--lucent-accent-default) 14%, transparent)" : "transparent",
|
|
7557
|
+
color: I ? "var(--lucent-accent-fg)" : b ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
7508
7558
|
fontSize: pa[h],
|
|
7509
7559
|
fontFamily: "var(--lucent-font-family-base)",
|
|
7510
|
-
fontWeight:
|
|
7511
|
-
cursor:
|
|
7560
|
+
fontWeight: S ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
7561
|
+
cursor: b ? "not-allowed" : "pointer",
|
|
7512
7562
|
transition: "background var(--lucent-duration-fast)"
|
|
7513
7563
|
},
|
|
7514
7564
|
children: y
|
|
@@ -7532,27 +7582,27 @@ function Ei({
|
|
|
7532
7582
|
errorText: p,
|
|
7533
7583
|
style: h
|
|
7534
7584
|
}) {
|
|
7535
|
-
const w = e !== void 0, [
|
|
7536
|
-
|
|
7537
|
-
if (!
|
|
7538
|
-
const
|
|
7539
|
-
var
|
|
7540
|
-
!((
|
|
7585
|
+
const w = e !== void 0, [v, m] = q(r), f = w ? e : v, d = !!p, y = a, x = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, k = /* @__PURE__ */ new Date(), [I, S] = q((f ?? k).getFullYear()), [b, E] = q((f ?? k).getMonth()), [T, z] = q(!1), [D, P] = q(!1), R = O(null), H = O(null), [V, W] = q({ top: 0, left: 0 });
|
|
7586
|
+
U(() => {
|
|
7587
|
+
if (!T) return;
|
|
7588
|
+
const M = (N) => {
|
|
7589
|
+
var j, $;
|
|
7590
|
+
!((j = R.current) != null && j.contains(N.target)) && !(($ = H.current) != null && $.contains(N.target)) && z(!1);
|
|
7541
7591
|
};
|
|
7542
|
-
return document.addEventListener("mousedown",
|
|
7543
|
-
}, [
|
|
7544
|
-
if (!
|
|
7545
|
-
const
|
|
7546
|
-
W({ top:
|
|
7547
|
-
}, [
|
|
7548
|
-
const
|
|
7549
|
-
w || m(
|
|
7550
|
-
},
|
|
7551
|
-
|
|
7552
|
-
},
|
|
7553
|
-
|
|
7554
|
-
},
|
|
7555
|
-
return /* @__PURE__ */ g("div", { ref:
|
|
7592
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
7593
|
+
}, [T]), re(() => {
|
|
7594
|
+
if (!T || !R.current) return;
|
|
7595
|
+
const M = R.current.getBoundingClientRect();
|
|
7596
|
+
W({ top: M.bottom + 4, left: M.left });
|
|
7597
|
+
}, [T]);
|
|
7598
|
+
const C = (M) => {
|
|
7599
|
+
w || m(M), n == null || n(M), z(!1);
|
|
7600
|
+
}, L = () => {
|
|
7601
|
+
b === 0 ? (E(11), S((M) => M - 1)) : E((M) => M - 1);
|
|
7602
|
+
}, F = () => {
|
|
7603
|
+
b === 11 ? (E(0), S((M) => M + 1)) : E((M) => M + 1);
|
|
7604
|
+
}, B = y ? "transparent" : d ? "var(--lucent-danger-default)" : D ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", A = D ? `0 0 0 3px ${d ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7605
|
+
return /* @__PURE__ */ g("div", { ref: R, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...h }, children: [
|
|
7556
7606
|
c && /* @__PURE__ */ t(
|
|
7557
7607
|
"label",
|
|
7558
7608
|
{
|
|
@@ -7572,11 +7622,11 @@ function Ei({
|
|
|
7572
7622
|
type: "button",
|
|
7573
7623
|
id: x,
|
|
7574
7624
|
disabled: a,
|
|
7575
|
-
onClick: () => !a && z((
|
|
7576
|
-
onFocus: () =>
|
|
7577
|
-
onBlur: () =>
|
|
7625
|
+
onClick: () => !a && z((M) => !M),
|
|
7626
|
+
onFocus: () => P(!0),
|
|
7627
|
+
onBlur: () => P(!1),
|
|
7578
7628
|
"aria-haspopup": "dialog",
|
|
7579
|
-
"aria-expanded":
|
|
7629
|
+
"aria-expanded": T,
|
|
7580
7630
|
"aria-invalid": d,
|
|
7581
7631
|
style: {
|
|
7582
7632
|
display: "flex",
|
|
@@ -7587,7 +7637,7 @@ function Ei({
|
|
|
7587
7637
|
boxSizing: "border-box",
|
|
7588
7638
|
padding: `0 ${ca[s]}`,
|
|
7589
7639
|
borderRadius: "var(--lucent-radius-lg)",
|
|
7590
|
-
border: `1px solid ${
|
|
7640
|
+
border: `1px solid ${B}`,
|
|
7591
7641
|
boxShadow: A,
|
|
7592
7642
|
background: y ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
|
|
7593
7643
|
color: f ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
@@ -7633,17 +7683,17 @@ function Ei({
|
|
|
7633
7683
|
children: u
|
|
7634
7684
|
}
|
|
7635
7685
|
),
|
|
7636
|
-
|
|
7686
|
+
T && ie(
|
|
7637
7687
|
/* @__PURE__ */ t(
|
|
7638
7688
|
"div",
|
|
7639
7689
|
{
|
|
7640
|
-
ref:
|
|
7690
|
+
ref: H,
|
|
7641
7691
|
role: "dialog",
|
|
7642
7692
|
"aria-label": "Date picker",
|
|
7643
7693
|
style: {
|
|
7644
7694
|
position: "fixed",
|
|
7645
|
-
top:
|
|
7646
|
-
left:
|
|
7695
|
+
top: V.top,
|
|
7696
|
+
left: V.left,
|
|
7647
7697
|
zIndex: 1e3,
|
|
7648
7698
|
background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
|
|
7649
7699
|
backdropFilter: "blur(6px)",
|
|
@@ -7657,15 +7707,15 @@ function Ei({
|
|
|
7657
7707
|
children: /* @__PURE__ */ t(
|
|
7658
7708
|
lt,
|
|
7659
7709
|
{
|
|
7660
|
-
year:
|
|
7661
|
-
month:
|
|
7710
|
+
year: I,
|
|
7711
|
+
month: b,
|
|
7662
7712
|
...f !== void 0 && { selected: f },
|
|
7663
|
-
today:
|
|
7713
|
+
today: k,
|
|
7664
7714
|
...o !== void 0 && { min: o },
|
|
7665
7715
|
...l !== void 0 && { max: l },
|
|
7666
|
-
onSelect:
|
|
7667
|
-
onPrevMonth:
|
|
7668
|
-
onNextMonth:
|
|
7716
|
+
onSelect: C,
|
|
7717
|
+
onPrevMonth: L,
|
|
7718
|
+
onNextMonth: F,
|
|
7669
7719
|
size: s
|
|
7670
7720
|
}
|
|
7671
7721
|
)
|
|
@@ -7821,42 +7871,42 @@ function ka({
|
|
|
7821
7871
|
trigger: h,
|
|
7822
7872
|
style: w
|
|
7823
7873
|
}) {
|
|
7824
|
-
const
|
|
7825
|
-
|
|
7874
|
+
const v = e !== void 0, [m, f] = q(r), d = v ? e : m, y = !!p, x = a, k = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [I, S] = q(null), [b, E] = q(null), T = /* @__PURE__ */ new Date(), [z, D] = q(((d == null ? void 0 : d.start) ?? T).getFullYear()), [P, R] = q(((d == null ? void 0 : d.start) ?? T).getMonth()), H = P === 11 ? 0 : P + 1, V = P === 11 ? z + 1 : z, [W, C] = q(!1), [L, F] = q(!1), B = O(null), A = O(null), [M, N] = q({ top: 0, left: 0 });
|
|
7875
|
+
U(() => {
|
|
7826
7876
|
if (!W) return;
|
|
7827
|
-
const
|
|
7877
|
+
const Y = (me) => {
|
|
7828
7878
|
var ze, xe;
|
|
7829
|
-
!((ze =
|
|
7879
|
+
!((ze = B.current) != null && ze.contains(me.target)) && !((xe = A.current) != null && xe.contains(me.target)) && (C(!1), S(null));
|
|
7830
7880
|
};
|
|
7831
|
-
return document.addEventListener("mousedown",
|
|
7832
|
-
}, [W]),
|
|
7833
|
-
if (!W || !
|
|
7834
|
-
const
|
|
7835
|
-
|
|
7881
|
+
return document.addEventListener("mousedown", Y), () => document.removeEventListener("mousedown", Y);
|
|
7882
|
+
}, [W]), re(() => {
|
|
7883
|
+
if (!W || !B.current) return;
|
|
7884
|
+
const Y = B.current.getBoundingClientRect();
|
|
7885
|
+
N({ top: Y.bottom + 4, left: Y.left });
|
|
7836
7886
|
}, [W]);
|
|
7837
|
-
const
|
|
7838
|
-
if (!
|
|
7839
|
-
|
|
7887
|
+
const j = (Y) => {
|
|
7888
|
+
if (!I)
|
|
7889
|
+
S(Y);
|
|
7840
7890
|
else {
|
|
7841
|
-
const [me, ze] = $e(
|
|
7842
|
-
|
|
7891
|
+
const [me, ze] = $e(Y, I) || Re(Y, I) ? [Y, I] : [I, Y], xe = { start: me, end: ze };
|
|
7892
|
+
v || f(xe), n == null || n(xe), S(null), C(!1);
|
|
7843
7893
|
}
|
|
7844
|
-
},
|
|
7845
|
-
|
|
7846
|
-
},
|
|
7847
|
-
|
|
7894
|
+
}, $ = () => {
|
|
7895
|
+
P === 0 ? (R(11), D((Y) => Y - 1)) : R((Y) => Y - 1);
|
|
7896
|
+
}, _ = () => {
|
|
7897
|
+
P === 11 ? (R(0), D((Y) => Y + 1)) : R((Y) => Y + 1);
|
|
7848
7898
|
};
|
|
7849
7899
|
let K;
|
|
7850
|
-
if (
|
|
7851
|
-
const [
|
|
7852
|
-
K = { start:
|
|
7853
|
-
} else
|
|
7854
|
-
const se = x ? "transparent" : y ? "var(--lucent-danger-default)" :
|
|
7855
|
-
return /* @__PURE__ */ g("div", { ref:
|
|
7900
|
+
if (I && b) {
|
|
7901
|
+
const [Y, me] = $e(b, I) ? [b, I] : [I, b];
|
|
7902
|
+
K = { start: Y, end: me };
|
|
7903
|
+
} else I ? K = { start: I, end: I } : d && (K = { start: d.start, end: d.end });
|
|
7904
|
+
const se = x ? "transparent" : y ? "var(--lucent-danger-default)" : L ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", ae = L ? `0 0 0 3px ${y ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7905
|
+
return /* @__PURE__ */ g("div", { ref: B, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...w }, children: [
|
|
7856
7906
|
c && /* @__PURE__ */ t(
|
|
7857
7907
|
"label",
|
|
7858
7908
|
{
|
|
7859
|
-
htmlFor:
|
|
7909
|
+
htmlFor: k,
|
|
7860
7910
|
style: {
|
|
7861
7911
|
fontSize: Ye[s],
|
|
7862
7912
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
@@ -7869,7 +7919,7 @@ function ka({
|
|
|
7869
7919
|
h ? /* @__PURE__ */ t(
|
|
7870
7920
|
"span",
|
|
7871
7921
|
{
|
|
7872
|
-
onClick: () => !a &&
|
|
7922
|
+
onClick: () => !a && C((Y) => !Y),
|
|
7873
7923
|
"aria-haspopup": "dialog",
|
|
7874
7924
|
"aria-expanded": W,
|
|
7875
7925
|
style: { display: "inline-flex", cursor: a ? "not-allowed" : "pointer" },
|
|
@@ -7879,11 +7929,11 @@ function ka({
|
|
|
7879
7929
|
"button",
|
|
7880
7930
|
{
|
|
7881
7931
|
type: "button",
|
|
7882
|
-
id:
|
|
7932
|
+
id: k,
|
|
7883
7933
|
disabled: a,
|
|
7884
|
-
onClick: () => !a &&
|
|
7885
|
-
onFocus: () =>
|
|
7886
|
-
onBlur: () =>
|
|
7934
|
+
onClick: () => !a && C((Y) => !Y),
|
|
7935
|
+
onFocus: () => F(!0),
|
|
7936
|
+
onBlur: () => F(!1),
|
|
7887
7937
|
"aria-haspopup": "dialog",
|
|
7888
7938
|
"aria-expanded": W,
|
|
7889
7939
|
"aria-invalid": y,
|
|
@@ -7897,7 +7947,7 @@ function ka({
|
|
|
7897
7947
|
padding: `0 ${ya[s]}`,
|
|
7898
7948
|
borderRadius: "var(--lucent-radius-lg)",
|
|
7899
7949
|
border: `1px solid ${se}`,
|
|
7900
|
-
boxShadow:
|
|
7950
|
+
boxShadow: ae,
|
|
7901
7951
|
background: x ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
|
|
7902
7952
|
color: d ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
7903
7953
|
fontFamily: "var(--lucent-font-family-base)",
|
|
@@ -7951,8 +8001,8 @@ function ka({
|
|
|
7951
8001
|
"aria-label": "Date range picker",
|
|
7952
8002
|
style: {
|
|
7953
8003
|
position: "fixed",
|
|
7954
|
-
top:
|
|
7955
|
-
left:
|
|
8004
|
+
top: M.top,
|
|
8005
|
+
left: M.left,
|
|
7956
8006
|
zIndex: 1e3,
|
|
7957
8007
|
background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
|
|
7958
8008
|
backdropFilter: "blur(6px)",
|
|
@@ -7969,16 +8019,16 @@ function ka({
|
|
|
7969
8019
|
lt,
|
|
7970
8020
|
{
|
|
7971
8021
|
year: z,
|
|
7972
|
-
month:
|
|
8022
|
+
month: P,
|
|
7973
8023
|
...(d == null ? void 0 : d.start) !== void 0 && { selected: d.start },
|
|
7974
|
-
today:
|
|
8024
|
+
today: T,
|
|
7975
8025
|
...o !== void 0 && { min: o },
|
|
7976
8026
|
...l !== void 0 && { max: l },
|
|
7977
|
-
onSelect:
|
|
7978
|
-
onPrevMonth:
|
|
7979
|
-
onNextMonth:
|
|
8027
|
+
onSelect: j,
|
|
8028
|
+
onPrevMonth: $,
|
|
8029
|
+
onNextMonth: _,
|
|
7980
8030
|
...K !== void 0 && { highlightRange: K },
|
|
7981
|
-
...
|
|
8031
|
+
...I && { onDayHover: E },
|
|
7982
8032
|
size: s
|
|
7983
8033
|
}
|
|
7984
8034
|
) }),
|
|
@@ -7986,17 +8036,17 @@ function ka({
|
|
|
7986
8036
|
/* @__PURE__ */ t("div", { style: { minWidth: st[s] }, children: /* @__PURE__ */ t(
|
|
7987
8037
|
lt,
|
|
7988
8038
|
{
|
|
7989
|
-
year:
|
|
7990
|
-
month:
|
|
8039
|
+
year: V,
|
|
8040
|
+
month: H,
|
|
7991
8041
|
...(d == null ? void 0 : d.end) !== void 0 && { selected: d.end },
|
|
7992
|
-
today:
|
|
8042
|
+
today: T,
|
|
7993
8043
|
...o !== void 0 && { min: o },
|
|
7994
8044
|
...l !== void 0 && { max: l },
|
|
7995
|
-
onSelect:
|
|
7996
|
-
onPrevMonth:
|
|
7997
|
-
onNextMonth:
|
|
8045
|
+
onSelect: j,
|
|
8046
|
+
onPrevMonth: $,
|
|
8047
|
+
onNextMonth: _,
|
|
7998
8048
|
...K !== void 0 && { highlightRange: K },
|
|
7999
|
-
...
|
|
8049
|
+
...I && { onDayHover: E },
|
|
8000
8050
|
size: s
|
|
8001
8051
|
}
|
|
8002
8052
|
) })
|
|
@@ -8005,12 +8055,12 @@ function ka({
|
|
|
8005
8055
|
),
|
|
8006
8056
|
document.body
|
|
8007
8057
|
),
|
|
8008
|
-
|
|
8009
|
-
|
|
8058
|
+
I && W && /* @__PURE__ */ t("div", { style: { position: "absolute", top: "calc(100% + var(--lucent-space-1))", left: 0, zIndex: 1001, pointerEvents: "none" } }),
|
|
8059
|
+
I && W && /* @__PURE__ */ t("div", { style: {
|
|
8010
8060
|
position: "absolute",
|
|
8011
8061
|
bottom: -24,
|
|
8012
8062
|
left: 0
|
|
8013
|
-
}, children: /* @__PURE__ */ t(
|
|
8063
|
+
}, children: /* @__PURE__ */ t(G, { size: "xs", color: "secondary", children: "Now pick the end date" }) })
|
|
8014
8064
|
] });
|
|
8015
8065
|
}
|
|
8016
8066
|
const Bi = {
|
|
@@ -8146,8 +8196,8 @@ function Ta({
|
|
|
8146
8196
|
/* @__PURE__ */ t("path", { d: "M12 2v4h4", stroke: "currentColor", strokeWidth: "1.3" })
|
|
8147
8197
|
] }),
|
|
8148
8198
|
/* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
8149
|
-
/* @__PURE__ */ t(
|
|
8150
|
-
o ? /* @__PURE__ */ t(
|
|
8199
|
+
/* @__PURE__ */ t(G, { size: "sm", truncate: !0, children: e.file.name }),
|
|
8200
|
+
o ? /* @__PURE__ */ t(G, { size: "xs", color: "danger", children: e.error }) : /* @__PURE__ */ t(G, { size: "xs", color: "secondary", children: ct(e.file.size) }),
|
|
8151
8201
|
a !== void 0 && !o && /* @__PURE__ */ t("div", { style: {
|
|
8152
8202
|
marginTop: 4,
|
|
8153
8203
|
height: 3,
|
|
@@ -8199,27 +8249,27 @@ function Di({
|
|
|
8199
8249
|
disabled: l = !1,
|
|
8200
8250
|
style: s
|
|
8201
8251
|
}) {
|
|
8202
|
-
const c = i !== void 0, [u, p] = q([]), h = c ? i : u, [w,
|
|
8203
|
-
if (!
|
|
8204
|
-
const
|
|
8205
|
-
for (const
|
|
8206
|
-
if (n &&
|
|
8207
|
-
o == null || o(`"${
|
|
8252
|
+
const c = i !== void 0, [u, p] = q([]), h = c ? i : u, [w, v] = q(!1), [m, f] = q(!1), d = O(null), y = X((S) => {
|
|
8253
|
+
if (!S || l) return;
|
|
8254
|
+
const b = [];
|
|
8255
|
+
for (const T of Array.from(S)) {
|
|
8256
|
+
if (n && T.size > n) {
|
|
8257
|
+
o == null || o(`"${T.name}" exceeds the ${ct(n)} limit.`);
|
|
8208
8258
|
continue;
|
|
8209
8259
|
}
|
|
8210
|
-
if (!r && h.length +
|
|
8211
|
-
|
|
8260
|
+
if (!r && h.length + b.length >= 1) break;
|
|
8261
|
+
b.push({ id: Sa(), file: T });
|
|
8212
8262
|
}
|
|
8213
|
-
if (
|
|
8214
|
-
const E = r ? [...h, ...
|
|
8263
|
+
if (b.length === 0) return;
|
|
8264
|
+
const E = r ? [...h, ...b] : b;
|
|
8215
8265
|
c || p(E), a == null || a(E);
|
|
8216
|
-
}, [l, h, c, n, r, a, o]), x = (
|
|
8217
|
-
const
|
|
8218
|
-
c || p(
|
|
8219
|
-
},
|
|
8220
|
-
|
|
8221
|
-
},
|
|
8222
|
-
y(
|
|
8266
|
+
}, [l, h, c, n, r, a, o]), x = (S) => {
|
|
8267
|
+
const b = h.filter((E) => E.id !== S);
|
|
8268
|
+
c || p(b), a == null || a(b);
|
|
8269
|
+
}, k = (S) => {
|
|
8270
|
+
S.preventDefault(), v(!1), y(S.dataTransfer.files);
|
|
8271
|
+
}, I = (S) => {
|
|
8272
|
+
y(S.target.files), S.target.value = "";
|
|
8223
8273
|
};
|
|
8224
8274
|
return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
8225
8275
|
/* @__PURE__ */ g(
|
|
@@ -8230,20 +8280,20 @@ function Di({
|
|
|
8230
8280
|
"aria-label": "Upload files",
|
|
8231
8281
|
"aria-disabled": l,
|
|
8232
8282
|
onClick: () => {
|
|
8233
|
-
var
|
|
8234
|
-
return !l && ((
|
|
8283
|
+
var S;
|
|
8284
|
+
return !l && ((S = d.current) == null ? void 0 : S.click());
|
|
8235
8285
|
},
|
|
8236
|
-
onKeyDown: (
|
|
8237
|
-
var
|
|
8238
|
-
(
|
|
8286
|
+
onKeyDown: (S) => {
|
|
8287
|
+
var b;
|
|
8288
|
+
(S.key === "Enter" || S.key === " ") && (S.preventDefault(), (b = d.current) == null || b.click());
|
|
8239
8289
|
},
|
|
8240
8290
|
onFocus: () => f(!0),
|
|
8241
8291
|
onBlur: () => f(!1),
|
|
8242
|
-
onDragOver: (
|
|
8243
|
-
|
|
8292
|
+
onDragOver: (S) => {
|
|
8293
|
+
S.preventDefault(), l || v(!0);
|
|
8244
8294
|
},
|
|
8245
|
-
onDragLeave: () =>
|
|
8246
|
-
onDrop:
|
|
8295
|
+
onDragLeave: () => v(!1),
|
|
8296
|
+
onDrop: k,
|
|
8247
8297
|
style: {
|
|
8248
8298
|
display: "flex",
|
|
8249
8299
|
flexDirection: "column",
|
|
@@ -8275,8 +8325,8 @@ function Di({
|
|
|
8275
8325
|
}
|
|
8276
8326
|
),
|
|
8277
8327
|
/* @__PURE__ */ g("div", { style: { textAlign: "center", width: "100%" }, children: [
|
|
8278
|
-
/* @__PURE__ */ t(
|
|
8279
|
-
(e || n) && /* @__PURE__ */ t(
|
|
8328
|
+
/* @__PURE__ */ t(G, { color: l ? "disabled" : "primary", weight: "medium", align: "center", children: w ? "Drop to upload" : "Drop files here or click to browse" }),
|
|
8329
|
+
(e || n) && /* @__PURE__ */ t(G, { size: "xs", color: "secondary", align: "center", children: [
|
|
8280
8330
|
e && `Accepted: ${e}`,
|
|
8281
8331
|
n && `Max size: ${ct(n)}`
|
|
8282
8332
|
].filter(Boolean).join(" · ") })
|
|
@@ -8289,7 +8339,7 @@ function Di({
|
|
|
8289
8339
|
accept: e,
|
|
8290
8340
|
multiple: r,
|
|
8291
8341
|
disabled: l,
|
|
8292
|
-
onChange:
|
|
8342
|
+
onChange: I,
|
|
8293
8343
|
style: { display: "none" },
|
|
8294
8344
|
tabIndex: -1
|
|
8295
8345
|
}
|
|
@@ -8297,10 +8347,10 @@ function Di({
|
|
|
8297
8347
|
]
|
|
8298
8348
|
}
|
|
8299
8349
|
),
|
|
8300
|
-
h.length > 0 && /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: h.map((
|
|
8350
|
+
h.length > 0 && /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: h.map((S) => /* @__PURE__ */ t(Ta, { item: S, onRemove: x }, S.id)) })
|
|
8301
8351
|
] });
|
|
8302
8352
|
}
|
|
8303
|
-
const
|
|
8353
|
+
const Li = {
|
|
8304
8354
|
id: "file-upload",
|
|
8305
8355
|
name: "FileUpload",
|
|
8306
8356
|
tier: "molecule",
|
|
@@ -8411,7 +8461,7 @@ function Ia({ status: e }) {
|
|
|
8411
8461
|
/* @__PURE__ */ t("path", { d: "M5 5v2.5", stroke: "#fff", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
8412
8462
|
] }) : /* @__PURE__ */ t("svg", { width: "6", height: "6", viewBox: "0 0 6 6", "aria-hidden": !0, children: /* @__PURE__ */ t("circle", { cx: "3", cy: "3", r: "3", fill: "#fff" }) });
|
|
8413
8463
|
}
|
|
8414
|
-
function
|
|
8464
|
+
function Pi({ items: e, style: r }) {
|
|
8415
8465
|
return /* @__PURE__ */ t(
|
|
8416
8466
|
"ol",
|
|
8417
8467
|
{
|
|
@@ -8466,10 +8516,10 @@ function Li({ items: e, style: r }) {
|
|
|
8466
8516
|
minWidth: 0
|
|
8467
8517
|
}, children: [
|
|
8468
8518
|
/* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "baseline", gap: "var(--lucent-space-2)", flexWrap: "wrap" }, children: [
|
|
8469
|
-
/* @__PURE__ */ t(
|
|
8470
|
-
n.date && /* @__PURE__ */ t(
|
|
8519
|
+
/* @__PURE__ */ t(G, { weight: "medium", size: "sm", children: n.title }),
|
|
8520
|
+
n.date && /* @__PURE__ */ t(G, { size: "xs", color: "secondary", children: n.date })
|
|
8471
8521
|
] }),
|
|
8472
|
-
n.description && /* @__PURE__ */ t("div", { style: { marginTop: "var(--lucent-space-1)" }, children: /* @__PURE__ */ t(
|
|
8522
|
+
n.description && /* @__PURE__ */ t("div", { style: { marginTop: "var(--lucent-space-1)" }, children: /* @__PURE__ */ t(G, { size: "sm", color: "secondary", children: n.description }) }),
|
|
8473
8523
|
n.content && /* @__PURE__ */ t("div", { style: { marginTop: "var(--lucent-space-3)" }, children: n.content })
|
|
8474
8524
|
] })
|
|
8475
8525
|
]
|
|
@@ -8577,9 +8627,9 @@ const Ma = () => /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox:
|
|
|
8577
8627
|
warning: { border: "var(--lucent-warning-default)", iconColor: "var(--lucent-warning-text)" },
|
|
8578
8628
|
danger: { border: "var(--lucent-danger-default)", iconColor: "var(--lucent-danger-text)" }
|
|
8579
8629
|
};
|
|
8580
|
-
let
|
|
8581
|
-
function
|
|
8582
|
-
return `lucent-toast-${++
|
|
8630
|
+
let La = 0;
|
|
8631
|
+
function Pa() {
|
|
8632
|
+
return `lucent-toast-${++La}`;
|
|
8583
8633
|
}
|
|
8584
8634
|
function Qt(e) {
|
|
8585
8635
|
return e.startsWith("top");
|
|
@@ -8620,8 +8670,8 @@ function Rt({ entry: e, onDismiss: r, hideContent: n, fixedHeight: i }) {
|
|
|
8620
8670
|
children: [
|
|
8621
8671
|
h && /* @__PURE__ */ t("span", { style: { flexShrink: 0, color: p.iconColor, display: "flex", alignItems: "center" }, children: h }),
|
|
8622
8672
|
/* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)" }, children: [
|
|
8623
|
-
/* @__PURE__ */ t(
|
|
8624
|
-
l && /* @__PURE__ */ t(
|
|
8673
|
+
/* @__PURE__ */ t(G, { as: "span", size: "sm", weight: "semibold", color: "primary", lineHeight: "tight", children: o }),
|
|
8674
|
+
l && /* @__PURE__ */ t(G, { as: "span", size: "sm", color: "secondary", lineHeight: "base", style: { whiteSpace: "pre-line" }, children: l })
|
|
8625
8675
|
] }),
|
|
8626
8676
|
c && w === "button" && /* @__PURE__ */ t(Oa, { label: c.label, onClick: () => {
|
|
8627
8677
|
c.onClick(), r(a);
|
|
@@ -8647,11 +8697,11 @@ function Rt({ entry: e, onDismiss: r, hideContent: n, fixedHeight: i }) {
|
|
|
8647
8697
|
color: "var(--lucent-text-secondary)",
|
|
8648
8698
|
opacity: n ? 0 : 0.6
|
|
8649
8699
|
},
|
|
8650
|
-
onMouseEnter: (
|
|
8651
|
-
n || (
|
|
8700
|
+
onMouseEnter: (v) => {
|
|
8701
|
+
n || (v.currentTarget.style.opacity = "1");
|
|
8652
8702
|
},
|
|
8653
|
-
onMouseLeave: (
|
|
8654
|
-
n || (
|
|
8703
|
+
onMouseLeave: (v) => {
|
|
8704
|
+
n || (v.currentTarget.style.opacity = "0.6");
|
|
8655
8705
|
},
|
|
8656
8706
|
children: /* @__PURE__ */ t(qa, {})
|
|
8657
8707
|
}
|
|
@@ -8731,10 +8781,10 @@ function _a({ toasts: e, position: r, onDismiss: n, portalContainer: i }) {
|
|
|
8731
8781
|
const [a, o] = q(!1), [l, s] = q(void 0), c = X((d) => {
|
|
8732
8782
|
d && s(d.offsetHeight);
|
|
8733
8783
|
}, []), u = Qt(r), p = e.filter((d) => d.phase !== "exiting"), h = e.filter((d) => d.phase === "exiting");
|
|
8734
|
-
|
|
8784
|
+
U(() => {
|
|
8735
8785
|
p.length <= 1 && o(!1);
|
|
8736
8786
|
}, [p.length]);
|
|
8737
|
-
const w =
|
|
8787
|
+
const w = O(null), v = X(() => {
|
|
8738
8788
|
w.current && (clearTimeout(w.current), w.current = null), p.length > 1 && o(!0);
|
|
8739
8789
|
}, [p.length]), m = X(() => {
|
|
8740
8790
|
w.current = setTimeout(() => {
|
|
@@ -8743,7 +8793,7 @@ function _a({ toasts: e, position: r, onDismiss: n, portalContainer: i }) {
|
|
|
8743
8793
|
}, []), f = /* @__PURE__ */ t("div", { style: Ga(r), children: /* @__PURE__ */ t(
|
|
8744
8794
|
"div",
|
|
8745
8795
|
{
|
|
8746
|
-
onMouseEnter:
|
|
8796
|
+
onMouseEnter: v,
|
|
8747
8797
|
onMouseLeave: m,
|
|
8748
8798
|
style: { margin: "calc(-1 * var(--lucent-space-2))", padding: "var(--lucent-space-2)" },
|
|
8749
8799
|
children: /* @__PURE__ */ g("div", { style: {
|
|
@@ -8756,14 +8806,14 @@ function _a({ toasts: e, position: r, onDismiss: n, portalContainer: i }) {
|
|
|
8756
8806
|
transition: "transform var(--lucent-duration-base) var(--lucent-easing-emphasized), margin var(--lucent-duration-base) var(--lucent-easing-emphasized), gap var(--lucent-duration-base) var(--lucent-easing-emphasized)"
|
|
8757
8807
|
}, children: [
|
|
8758
8808
|
p.map((d, y) => {
|
|
8759
|
-
const x = p.length - 1 - y,
|
|
8809
|
+
const x = p.length - 1 - y, k = !a && x > Wa, I = x * $a, S = u ? I : -I, b = a ? 1 : 1 - x * Na, E = a ? 1 : Math.max(0, 1 - x * Fa), T = d.phase === "entering", z = x === 0, D = !a && !z;
|
|
8760
8810
|
return /* @__PURE__ */ t(
|
|
8761
8811
|
"div",
|
|
8762
8812
|
{
|
|
8763
8813
|
ref: z ? c : void 0,
|
|
8764
8814
|
role: "status",
|
|
8765
8815
|
"aria-live": "polite",
|
|
8766
|
-
"aria-hidden":
|
|
8816
|
+
"aria-hidden": k,
|
|
8767
8817
|
style: {
|
|
8768
8818
|
// Front toast is relative (sets container height).
|
|
8769
8819
|
// Stacked toasts overlap via absolute + top: 0.
|
|
@@ -8772,20 +8822,20 @@ function _a({ toasts: e, position: r, onDismiss: n, portalContainer: i }) {
|
|
|
8772
8822
|
// Top positions: anchor at bottom:0 (peek below front toast)
|
|
8773
8823
|
...!a && !z && (u ? { bottom: 0 } : { top: 0 }),
|
|
8774
8824
|
zIndex: 100 - x,
|
|
8775
|
-
transform:
|
|
8776
|
-
opacity:
|
|
8825
|
+
transform: T ? `translateY(${u ? "-20px" : "20px"}) scale(0.96)` : a ? void 0 : `translateY(${S}px) scaleX(${b})`,
|
|
8826
|
+
opacity: T || d.phase === "exiting" ? 0 : E,
|
|
8777
8827
|
transformOrigin: u ? "bottom center" : "top center",
|
|
8778
|
-
transition:
|
|
8779
|
-
pointerEvents:
|
|
8780
|
-
visibility:
|
|
8828
|
+
transition: T ? "none" : "transform var(--lucent-duration-base) var(--lucent-easing-emphasized), opacity var(--lucent-duration-base) var(--lucent-easing-default)",
|
|
8829
|
+
pointerEvents: k ? "none" : "auto",
|
|
8830
|
+
visibility: k ? "hidden" : "visible"
|
|
8781
8831
|
},
|
|
8782
8832
|
children: /* @__PURE__ */ t(
|
|
8783
8833
|
Rt,
|
|
8784
8834
|
{
|
|
8785
8835
|
entry: d,
|
|
8786
8836
|
onDismiss: n,
|
|
8787
|
-
hideContent:
|
|
8788
|
-
...
|
|
8837
|
+
hideContent: D,
|
|
8838
|
+
...D && l !== void 0 && { fixedHeight: l }
|
|
8789
8839
|
}
|
|
8790
8840
|
)
|
|
8791
8841
|
},
|
|
@@ -8825,13 +8875,13 @@ function Ni({
|
|
|
8825
8875
|
}) {
|
|
8826
8876
|
const [o, l] = q([]), s = X((p) => {
|
|
8827
8877
|
l((h) => {
|
|
8828
|
-
const w = h.find((
|
|
8829
|
-
return !w || w.phase === "exiting" ? h : h.map((
|
|
8878
|
+
const w = h.find((v) => v.id === p);
|
|
8879
|
+
return !w || w.phase === "exiting" ? h : h.map((v) => v.id === p ? { ...v, phase: "exiting" } : v);
|
|
8830
8880
|
}), setTimeout(() => {
|
|
8831
8881
|
l((h) => h.filter((w) => w.id !== p));
|
|
8832
8882
|
}, Ra);
|
|
8833
8883
|
}, []), c = X((p) => {
|
|
8834
|
-
const h =
|
|
8884
|
+
const h = Pa(), w = {
|
|
8835
8885
|
id: h,
|
|
8836
8886
|
title: p.title,
|
|
8837
8887
|
variant: p.variant ?? "default",
|
|
@@ -8841,8 +8891,8 @@ function Ni({
|
|
|
8841
8891
|
...p.icon !== void 0 && { icon: p.icon },
|
|
8842
8892
|
phase: "entering"
|
|
8843
8893
|
};
|
|
8844
|
-
return l((
|
|
8845
|
-
const m = [...
|
|
8894
|
+
return l((v) => {
|
|
8895
|
+
const m = [...v, w], f = m.filter((d) => d.phase !== "exiting");
|
|
8846
8896
|
if (f.length > i) {
|
|
8847
8897
|
const d = f.slice(0, f.length - i);
|
|
8848
8898
|
for (const y of d)
|
|
@@ -8852,12 +8902,12 @@ function Ni({
|
|
|
8852
8902
|
}), requestAnimationFrame(() => {
|
|
8853
8903
|
requestAnimationFrame(() => {
|
|
8854
8904
|
l(
|
|
8855
|
-
(
|
|
8905
|
+
(v) => v.map((m) => m.id === h && m.phase === "entering" ? { ...m, phase: "visible" } : m)
|
|
8856
8906
|
);
|
|
8857
8907
|
});
|
|
8858
8908
|
}), h;
|
|
8859
8909
|
}, [n, i, s]);
|
|
8860
|
-
|
|
8910
|
+
U(() => {
|
|
8861
8911
|
const p = [];
|
|
8862
8912
|
for (const h of o)
|
|
8863
8913
|
if (h.phase === "visible" && h.duration !== 1 / 0) {
|
|
@@ -9141,21 +9191,21 @@ function We({
|
|
|
9141
9191
|
style: o,
|
|
9142
9192
|
"aria-label": l = "Navigation"
|
|
9143
9193
|
}) {
|
|
9144
|
-
const s =
|
|
9194
|
+
const s = O(!1);
|
|
9145
9195
|
if (!s.current && typeof document < "u") {
|
|
9146
9196
|
const f = document.createElement("style");
|
|
9147
9197
|
f.textContent = Ya, document.head.appendChild(f), s.current = !0;
|
|
9148
9198
|
}
|
|
9149
|
-
const c = Fe[i], u =
|
|
9199
|
+
const c = Fe[i], u = O(null), p = O(null), h = O(!1), w = O(0), v = X(() => {
|
|
9150
9200
|
const f = u.current, d = p.current;
|
|
9151
9201
|
if (!f || !d) return;
|
|
9152
9202
|
const y = f.querySelector('[data-active="true"]'), x = f.querySelector('[data-active-parent="true"]');
|
|
9153
|
-
let
|
|
9154
|
-
if (y && !y.closest('[aria-hidden="true"]') ?
|
|
9203
|
+
let k = null, I = !1;
|
|
9204
|
+
if (y && !y.closest('[aria-hidden="true"]') ? k = y : x && !x.closest('[aria-hidden="true"]') && (k = x, I = !0), !k) {
|
|
9155
9205
|
d.style.opacity = "0";
|
|
9156
9206
|
return;
|
|
9157
9207
|
}
|
|
9158
|
-
const
|
|
9208
|
+
const S = f.getBoundingClientRect(), b = k.getBoundingClientRect();
|
|
9159
9209
|
h.current ? d.style.transition = [
|
|
9160
9210
|
`top 150ms ${De}`,
|
|
9161
9211
|
`left 150ms ${De}`,
|
|
@@ -9164,11 +9214,11 @@ function We({
|
|
|
9164
9214
|
"opacity 100ms ease",
|
|
9165
9215
|
"background 150ms ease",
|
|
9166
9216
|
"box-shadow 150ms ease"
|
|
9167
|
-
].join(", ") : (d.style.transition = "none", h.current = !0), d.style.top = `${
|
|
9217
|
+
].join(", ") : (d.style.transition = "none", h.current = !0), d.style.top = `${b.top - S.top}px`, d.style.left = `${b.left - S.left}px`, d.style.width = `${b.width}px`, d.style.height = `${b.height}px`, d.style.opacity = "1", I ? (d.style.background = n ? "var(--lucent-surface-secondary)" : "color-mix(in srgb, var(--lucent-accent-default) 12%, transparent)", d.style.boxShadow = "none") : (d.style.background = n ? "var(--lucent-surface)" : "var(--lucent-accent-default)", d.style.boxShadow = n ? "inset -3px 0 0 var(--lucent-accent-default), var(--lucent-shadow-sm)" : "none");
|
|
9168
9218
|
}, [n]), m = X(() => {
|
|
9169
|
-
cancelAnimationFrame(w.current), w.current = requestAnimationFrame(
|
|
9170
|
-
}, [
|
|
9171
|
-
return
|
|
9219
|
+
cancelAnimationFrame(w.current), w.current = requestAnimationFrame(v);
|
|
9220
|
+
}, [v]);
|
|
9221
|
+
return U(() => {
|
|
9172
9222
|
const f = u.current;
|
|
9173
9223
|
if (!f) return;
|
|
9174
9224
|
const d = new MutationObserver(m);
|
|
@@ -9177,14 +9227,14 @@ function We({
|
|
|
9177
9227
|
attributeFilter: ["data-active", "data-active-parent", "aria-hidden"],
|
|
9178
9228
|
subtree: !0
|
|
9179
9229
|
}), () => d.disconnect();
|
|
9180
|
-
}, [m]),
|
|
9230
|
+
}, [m]), U(() => {
|
|
9181
9231
|
const f = u.current;
|
|
9182
9232
|
if (!f) return;
|
|
9183
9233
|
const d = new ResizeObserver(m);
|
|
9184
9234
|
return d.observe(f), () => d.disconnect();
|
|
9185
|
-
}, [m]),
|
|
9235
|
+
}, [m]), U(() => {
|
|
9186
9236
|
document.fonts.ready.then(m);
|
|
9187
|
-
}, [m]),
|
|
9237
|
+
}, [m]), U(() => {
|
|
9188
9238
|
m();
|
|
9189
9239
|
}, [e, n, i, m]), /* @__PURE__ */ t(he.Provider, { value: { orientation: r, depth: 0, inverse: n, size: i, hasIcons: a, parentHasIcon: !1, requestMeasure: m }, children: /* @__PURE__ */ g(
|
|
9190
9240
|
"nav",
|
|
@@ -9235,14 +9285,14 @@ function Ka({
|
|
|
9235
9285
|
as: s,
|
|
9236
9286
|
style: c
|
|
9237
9287
|
}) {
|
|
9238
|
-
const { orientation: u, depth: p, inverse: h, size: w, parentHasIcon:
|
|
9239
|
-
|
|
9288
|
+
const { orientation: u, depth: p, inverse: h, size: w, parentHasIcon: v, requestMeasure: m } = ne(he), f = Fe[w];
|
|
9289
|
+
U(() => {
|
|
9240
9290
|
m();
|
|
9241
9291
|
}, [n, m]);
|
|
9242
9292
|
let d = null;
|
|
9243
9293
|
const y = [], x = Array.isArray(e) ? e : [e];
|
|
9244
|
-
for (const
|
|
9245
|
-
|
|
9294
|
+
for (const I of x)
|
|
9295
|
+
I != null && typeof I == "object" && "type" in I && I.type === en ? d = I : y.push(I);
|
|
9246
9296
|
return d ? /* @__PURE__ */ t(
|
|
9247
9297
|
Xa,
|
|
9248
9298
|
{
|
|
@@ -9272,7 +9322,7 @@ function Ka({
|
|
|
9272
9322
|
display: "flex",
|
|
9273
9323
|
alignItems: "center",
|
|
9274
9324
|
gap: f.gap,
|
|
9275
|
-
padding: u === "vertical" ? `${f.paddingY} ${f.paddingX} ${f.paddingY} ${i != null ||
|
|
9325
|
+
padding: u === "vertical" ? `${f.paddingY} ${f.paddingX} ${f.paddingY} ${i != null || v ? "var(--lucent-space-2)" : "var(--lucent-space-4)"}` : `${f.paddingY} ${f.paddingX}`,
|
|
9276
9326
|
borderRadius: "var(--lucent-radius-md)",
|
|
9277
9327
|
background: "transparent",
|
|
9278
9328
|
color: o ? "var(--lucent-text-disabled)" : n ? h ? "var(--lucent-text-primary)" : "var(--lucent-accent-fg)" : "var(--lucent-text-secondary)",
|
|
@@ -9317,67 +9367,67 @@ function Xa({
|
|
|
9317
9367
|
inverse: p,
|
|
9318
9368
|
size: h
|
|
9319
9369
|
}) {
|
|
9320
|
-
const { hasIcons: w, requestMeasure:
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
}, [f, i, E,
|
|
9370
|
+
const { hasIcons: w, requestMeasure: v } = ne(he), m = Fe[h], [f, d] = q(!1), y = O(null), [x, k] = q(0), I = O(null), S = O(null), b = O(), E = Za(s), T = i && !E, z = !T && !f && E, D = i || E;
|
|
9371
|
+
U(() => {
|
|
9372
|
+
v();
|
|
9373
|
+
}, [f, i, E, v]), U(() => {
|
|
9324
9374
|
if (c !== "vertical") return;
|
|
9325
|
-
const
|
|
9326
|
-
if (
|
|
9375
|
+
const M = y.current;
|
|
9376
|
+
if (M)
|
|
9327
9377
|
if (f) {
|
|
9328
|
-
const
|
|
9329
|
-
|
|
9330
|
-
const
|
|
9331
|
-
|
|
9378
|
+
const N = M.scrollHeight;
|
|
9379
|
+
k(N);
|
|
9380
|
+
const j = setTimeout(() => {
|
|
9381
|
+
k(void 0);
|
|
9332
9382
|
}, 130);
|
|
9333
|
-
return () => clearTimeout(
|
|
9383
|
+
return () => clearTimeout(j);
|
|
9334
9384
|
} else
|
|
9335
|
-
|
|
9336
|
-
}, [f, c]),
|
|
9385
|
+
k(M.scrollHeight), M.getBoundingClientRect(), k(0);
|
|
9386
|
+
}, [f, c]), U(() => {
|
|
9337
9387
|
if (c !== "horizontal" || !f) return;
|
|
9338
|
-
const
|
|
9339
|
-
|
|
9388
|
+
const M = (N) => {
|
|
9389
|
+
I.current && !I.current.contains(N.target) && C();
|
|
9340
9390
|
};
|
|
9341
|
-
return document.addEventListener("mousedown",
|
|
9342
|
-
}, [c, f]),
|
|
9391
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
9392
|
+
}, [c, f]), re(() => {
|
|
9343
9393
|
if (c !== "horizontal" || !f) return;
|
|
9344
|
-
const
|
|
9345
|
-
if (!
|
|
9346
|
-
const
|
|
9347
|
-
|
|
9394
|
+
const M = S.current;
|
|
9395
|
+
if (!M) return;
|
|
9396
|
+
const N = M.getBoundingClientRect();
|
|
9397
|
+
N.right > window.innerWidth && (M.style.left = "auto", M.style.right = "0"), N.bottom > window.innerHeight && (M.style.top = "auto", M.style.bottom = "100%", M.style.marginTop = "0", M.style.marginBottom = "var(--lucent-space-1)");
|
|
9348
9398
|
}, [c, f]);
|
|
9349
|
-
const [
|
|
9350
|
-
a || (
|
|
9351
|
-
},
|
|
9352
|
-
|
|
9353
|
-
d(!1),
|
|
9399
|
+
const [P, R] = q("idle"), [H, V] = q(!1), W = () => {
|
|
9400
|
+
a || (V(!0), R("entering"), d(!0));
|
|
9401
|
+
}, C = () => {
|
|
9402
|
+
R("exiting"), setTimeout(() => {
|
|
9403
|
+
d(!1), V(!1), R("idle");
|
|
9354
9404
|
}, Ke);
|
|
9355
|
-
}, O = () => {
|
|
9356
|
-
a || (c === "horizontal" ? f ? P() : W() : d(!f));
|
|
9357
|
-
}, Y = (I) => {
|
|
9358
|
-
a || (c === "vertical" ? (I.key === "ArrowRight" && !f && (I.preventDefault(), d(!0)), I.key === "ArrowLeft" && f && (I.preventDefault(), d(!1))) : (I.key === "ArrowDown" && !f && (I.preventDefault(), W()), I.key === "ArrowUp" && f && (I.preventDefault(), P())), (I.key === "Enter" || I.key === " ") && (I.preventDefault(), O()), I.key === "Escape" && f && (I.preventDefault(), c === "horizontal" ? P() : d(!1)));
|
|
9359
9405
|
}, L = () => {
|
|
9360
|
-
c === "horizontal"
|
|
9406
|
+
a || (c === "horizontal" ? f ? C() : W() : d(!f));
|
|
9407
|
+
}, F = (M) => {
|
|
9408
|
+
a || (c === "vertical" ? (M.key === "ArrowRight" && !f && (M.preventDefault(), d(!0)), M.key === "ArrowLeft" && f && (M.preventDefault(), d(!1))) : (M.key === "ArrowDown" && !f && (M.preventDefault(), W()), M.key === "ArrowUp" && f && (M.preventDefault(), C())), (M.key === "Enter" || M.key === " ") && (M.preventDefault(), L()), M.key === "Escape" && f && (M.preventDefault(), c === "horizontal" ? C() : d(!1)));
|
|
9409
|
+
}, B = () => {
|
|
9410
|
+
c === "horizontal" && !a && (clearTimeout(b.current), W());
|
|
9361
9411
|
}, A = () => {
|
|
9362
|
-
c === "horizontal" && (
|
|
9412
|
+
c === "horizontal" && (b.current = setTimeout(() => C(), 150));
|
|
9363
9413
|
};
|
|
9364
9414
|
return c === "horizontal" ? /* @__PURE__ */ g(
|
|
9365
9415
|
"div",
|
|
9366
9416
|
{
|
|
9367
|
-
ref:
|
|
9417
|
+
ref: I,
|
|
9368
9418
|
style: { position: "relative" },
|
|
9369
|
-
onMouseEnter:
|
|
9419
|
+
onMouseEnter: B,
|
|
9370
9420
|
onMouseLeave: A,
|
|
9371
9421
|
children: [
|
|
9372
9422
|
/* @__PURE__ */ g(
|
|
9373
9423
|
"button",
|
|
9374
9424
|
{
|
|
9375
9425
|
"data-lucent-navitem": "",
|
|
9376
|
-
"data-hint":
|
|
9377
|
-
onClick: (
|
|
9378
|
-
|
|
9426
|
+
"data-hint": D || void 0,
|
|
9427
|
+
onClick: (M) => {
|
|
9428
|
+
L(), o == null || o(M);
|
|
9379
9429
|
},
|
|
9380
|
-
onKeyDown:
|
|
9430
|
+
onKeyDown: F,
|
|
9381
9431
|
"aria-expanded": f,
|
|
9382
9432
|
"aria-disabled": a || void 0,
|
|
9383
9433
|
style: {
|
|
@@ -9387,12 +9437,12 @@ function Xa({
|
|
|
9387
9437
|
padding: `${m.paddingY} ${m.paddingX}`,
|
|
9388
9438
|
borderRadius: "var(--lucent-radius-md)",
|
|
9389
9439
|
background: "transparent",
|
|
9390
|
-
color: a ? "var(--lucent-text-disabled)" :
|
|
9440
|
+
color: a ? "var(--lucent-text-disabled)" : D ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
9391
9441
|
border: 0,
|
|
9392
|
-
borderBottom:
|
|
9442
|
+
borderBottom: D ? "2px solid var(--lucent-accent-default)" : "2px solid transparent",
|
|
9393
9443
|
fontFamily: "var(--lucent-font-family-base)",
|
|
9394
9444
|
fontSize: m.fontSize,
|
|
9395
|
-
fontWeight:
|
|
9445
|
+
fontWeight: D ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
9396
9446
|
cursor: a ? "not-allowed" : "pointer",
|
|
9397
9447
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
9398
9448
|
userSelect: "none",
|
|
@@ -9408,10 +9458,10 @@ function Xa({
|
|
|
9408
9458
|
]
|
|
9409
9459
|
}
|
|
9410
9460
|
),
|
|
9411
|
-
|
|
9461
|
+
H && /* @__PURE__ */ t(he.Provider, { value: { orientation: "vertical", depth: 0, inverse: p, size: h, hasIcons: w, parentHasIcon: !1, requestMeasure: v }, children: /* @__PURE__ */ t(
|
|
9412
9462
|
"div",
|
|
9413
9463
|
{
|
|
9414
|
-
ref:
|
|
9464
|
+
ref: S,
|
|
9415
9465
|
style: {
|
|
9416
9466
|
position: "absolute",
|
|
9417
9467
|
top: "100%",
|
|
@@ -9424,7 +9474,7 @@ function Xa({
|
|
|
9424
9474
|
boxShadow: "var(--lucent-shadow-lg)",
|
|
9425
9475
|
padding: "var(--lucent-space-1)",
|
|
9426
9476
|
zIndex: 100,
|
|
9427
|
-
animation:
|
|
9477
|
+
animation: P === "exiting" ? `lucent-navmenu-dropdown-out ${Ke}ms var(--lucent-easing-default) forwards` : `lucent-navmenu-dropdown-in ${Ke}ms var(--lucent-easing-default) forwards`
|
|
9428
9478
|
},
|
|
9429
9479
|
children: s
|
|
9430
9480
|
}
|
|
@@ -9436,13 +9486,13 @@ function Xa({
|
|
|
9436
9486
|
"button",
|
|
9437
9487
|
{
|
|
9438
9488
|
"data-lucent-navitem": "",
|
|
9439
|
-
"data-active":
|
|
9489
|
+
"data-active": T || void 0,
|
|
9440
9490
|
"data-active-parent": z || void 0,
|
|
9441
|
-
"data-hint": !
|
|
9442
|
-
onClick: (
|
|
9443
|
-
|
|
9491
|
+
"data-hint": !T && !z && D || void 0,
|
|
9492
|
+
onClick: (M) => {
|
|
9493
|
+
L(), o == null || o(M);
|
|
9444
9494
|
},
|
|
9445
|
-
onKeyDown:
|
|
9495
|
+
onKeyDown: F,
|
|
9446
9496
|
"aria-expanded": f,
|
|
9447
9497
|
"aria-disabled": a || void 0,
|
|
9448
9498
|
style: {
|
|
@@ -9453,12 +9503,12 @@ function Xa({
|
|
|
9453
9503
|
padding: `${m.paddingY} ${m.paddingX} ${m.paddingY} ${r != null ? "var(--lucent-space-2)" : "var(--lucent-space-4)"}`,
|
|
9454
9504
|
borderRadius: "var(--lucent-radius-md)",
|
|
9455
9505
|
background: "transparent",
|
|
9456
|
-
color: a ? "var(--lucent-text-disabled)" :
|
|
9506
|
+
color: a ? "var(--lucent-text-disabled)" : T ? p ? "var(--lucent-text-primary)" : "var(--lucent-accent-fg)" : z || D ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
9457
9507
|
border: 0,
|
|
9458
9508
|
boxShadow: "none",
|
|
9459
9509
|
fontFamily: "var(--lucent-font-family-base)",
|
|
9460
9510
|
fontSize: m.fontSize,
|
|
9461
|
-
fontWeight:
|
|
9511
|
+
fontWeight: D ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
9462
9512
|
textAlign: "left",
|
|
9463
9513
|
textDecoration: "none",
|
|
9464
9514
|
cursor: a ? "not-allowed" : "pointer",
|
|
@@ -9485,7 +9535,7 @@ function Xa({
|
|
|
9485
9535
|
height: x !== void 0 ? x : "auto",
|
|
9486
9536
|
transition: "height 120ms var(--lucent-easing-default)"
|
|
9487
9537
|
},
|
|
9488
|
-
children: /* @__PURE__ */ t(he.Provider, { value: { orientation: c, depth: u + 1, inverse: p, size: h, hasIcons: w, parentHasIcon: r != null, requestMeasure:
|
|
9538
|
+
children: /* @__PURE__ */ t(he.Provider, { value: { orientation: c, depth: u + 1, inverse: p, size: h, hasIcons: w, parentHasIcon: r != null, requestMeasure: v }, children: /* @__PURE__ */ t(
|
|
9489
9539
|
"div",
|
|
9490
9540
|
{
|
|
9491
9541
|
style: {
|
|
@@ -9528,40 +9578,40 @@ function Ja({
|
|
|
9528
9578
|
collapsible: o,
|
|
9529
9579
|
style: l
|
|
9530
9580
|
}) {
|
|
9531
|
-
const { orientation: s, inverse: c, size: u, hasIcons: p } = ne(he), h = Fe[u], w = o ?? r != null,
|
|
9581
|
+
const { orientation: s, inverse: c, size: u, hasIcons: p } = ne(he), h = Fe[u], w = o ?? r != null, v = p ? "var(--lucent-space-2)" : "var(--lucent-space-4)";
|
|
9532
9582
|
if (s === "horizontal")
|
|
9533
9583
|
return /* @__PURE__ */ t(Z, { children: e });
|
|
9534
|
-
const m = i !== void 0, [f, d] = q(n), y = m ? i : f, x =
|
|
9535
|
-
|
|
9584
|
+
const m = i !== void 0, [f, d] = q(n), y = m ? i : f, x = O(null), [k, I] = q(y ? void 0 : 0);
|
|
9585
|
+
U(() => {
|
|
9536
9586
|
if (!w) return;
|
|
9537
|
-
const
|
|
9538
|
-
if (
|
|
9587
|
+
const b = x.current;
|
|
9588
|
+
if (b)
|
|
9539
9589
|
if (y) {
|
|
9540
|
-
const E =
|
|
9541
|
-
|
|
9542
|
-
const
|
|
9543
|
-
|
|
9590
|
+
const E = b.scrollHeight;
|
|
9591
|
+
I(E);
|
|
9592
|
+
const T = setTimeout(() => {
|
|
9593
|
+
I(void 0);
|
|
9544
9594
|
}, 130);
|
|
9545
|
-
return () => clearTimeout(
|
|
9595
|
+
return () => clearTimeout(T);
|
|
9546
9596
|
} else
|
|
9547
|
-
|
|
9597
|
+
I(b.scrollHeight), b.getBoundingClientRect(), I(0);
|
|
9548
9598
|
}, [y, w]);
|
|
9549
|
-
const
|
|
9550
|
-
const
|
|
9551
|
-
m || d(
|
|
9599
|
+
const S = X(() => {
|
|
9600
|
+
const b = !y;
|
|
9601
|
+
m || d(b), a == null || a(b);
|
|
9552
9602
|
}, [y, m, a]);
|
|
9553
9603
|
return r ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", marginTop: "var(--lucent-space-3)", ...l }, children: [
|
|
9554
9604
|
w ? /* @__PURE__ */ g(
|
|
9555
9605
|
"button",
|
|
9556
9606
|
{
|
|
9557
|
-
onClick:
|
|
9607
|
+
onClick: S,
|
|
9558
9608
|
"aria-expanded": y,
|
|
9559
9609
|
style: {
|
|
9560
9610
|
display: "flex",
|
|
9561
9611
|
alignItems: "center",
|
|
9562
9612
|
justifyContent: "space-between",
|
|
9563
9613
|
width: "100%",
|
|
9564
|
-
padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${
|
|
9614
|
+
padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${v}`,
|
|
9565
9615
|
background: "none",
|
|
9566
9616
|
border: 0,
|
|
9567
9617
|
cursor: "pointer",
|
|
@@ -9586,7 +9636,7 @@ function Ja({
|
|
|
9586
9636
|
"div",
|
|
9587
9637
|
{
|
|
9588
9638
|
style: {
|
|
9589
|
-
padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${
|
|
9639
|
+
padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${v}`,
|
|
9590
9640
|
fontFamily: "var(--lucent-font-family-base)",
|
|
9591
9641
|
fontSize: "var(--lucent-font-size-xs)",
|
|
9592
9642
|
fontWeight: "var(--lucent-font-weight-semibold)",
|
|
@@ -9606,7 +9656,7 @@ function Ja({
|
|
|
9606
9656
|
"aria-hidden": !y,
|
|
9607
9657
|
style: {
|
|
9608
9658
|
overflow: "hidden",
|
|
9609
|
-
height:
|
|
9659
|
+
height: k !== void 0 ? k : "auto",
|
|
9610
9660
|
transition: "height 120ms var(--lucent-easing-default)"
|
|
9611
9661
|
},
|
|
9612
9662
|
children: /* @__PURE__ */ t(
|
|
@@ -9712,78 +9762,78 @@ function Wi({
|
|
|
9712
9762
|
icon: c,
|
|
9713
9763
|
style: u
|
|
9714
9764
|
}) {
|
|
9715
|
-
const p = n !== void 0, [h, w] = q(i),
|
|
9765
|
+
const p = n !== void 0, [h, w] = q(i), v = p ? n : h, [m, f] = q(!1), [d, y] = q(!1), [x, k] = q("idle"), [I, S] = q(null), [b, E] = q(-1), T = O(null), z = O(null);
|
|
9716
9766
|
if (!Nt && typeof document < "u") {
|
|
9717
|
-
const
|
|
9718
|
-
|
|
9767
|
+
const C = document.createElement("style");
|
|
9768
|
+
C.textContent = to, document.head.appendChild(C), Nt = !0;
|
|
9719
9769
|
}
|
|
9720
|
-
|
|
9770
|
+
U(() => {
|
|
9721
9771
|
if (m)
|
|
9722
|
-
y(!0),
|
|
9772
|
+
y(!0), k("entering"), E(-1);
|
|
9723
9773
|
else if (d) {
|
|
9724
|
-
|
|
9725
|
-
const
|
|
9726
|
-
y(!1),
|
|
9774
|
+
k("exiting");
|
|
9775
|
+
const C = setTimeout(() => {
|
|
9776
|
+
y(!1), k("idle");
|
|
9727
9777
|
}, Xe);
|
|
9728
|
-
return () => clearTimeout(
|
|
9778
|
+
return () => clearTimeout(C);
|
|
9729
9779
|
}
|
|
9730
|
-
}, [m]),
|
|
9731
|
-
if (!d || x !== "entering" || !
|
|
9732
|
-
const
|
|
9733
|
-
const
|
|
9734
|
-
!
|
|
9780
|
+
}, [m]), re(() => {
|
|
9781
|
+
if (!d || x !== "entering" || !T.current) return;
|
|
9782
|
+
const C = requestAnimationFrame(() => {
|
|
9783
|
+
const L = z.current, F = T.current;
|
|
9784
|
+
!L || !F || S(ao(F.getBoundingClientRect(), L));
|
|
9735
9785
|
});
|
|
9736
|
-
return () => cancelAnimationFrame(
|
|
9786
|
+
return () => cancelAnimationFrame(C);
|
|
9737
9787
|
}, [d, x]);
|
|
9738
|
-
const
|
|
9739
|
-
|
|
9788
|
+
const D = X(() => f(!1), []);
|
|
9789
|
+
U(() => {
|
|
9740
9790
|
if (!m) return;
|
|
9741
|
-
const
|
|
9742
|
-
var A,
|
|
9743
|
-
const
|
|
9744
|
-
(A =
|
|
9745
|
-
},
|
|
9746
|
-
document.addEventListener("mousedown",
|
|
9791
|
+
const C = (F) => {
|
|
9792
|
+
var A, M;
|
|
9793
|
+
const B = F.target;
|
|
9794
|
+
(A = T.current) != null && A.contains(B) || (M = z.current) != null && M.contains(B) || D();
|
|
9795
|
+
}, L = requestAnimationFrame(() => {
|
|
9796
|
+
document.addEventListener("mousedown", C);
|
|
9747
9797
|
});
|
|
9748
9798
|
return () => {
|
|
9749
|
-
cancelAnimationFrame(
|
|
9799
|
+
cancelAnimationFrame(L), document.removeEventListener("mousedown", C);
|
|
9750
9800
|
};
|
|
9751
|
-
}, [m,
|
|
9801
|
+
}, [m, D]), U(() => {
|
|
9752
9802
|
if (!m) return;
|
|
9753
|
-
const
|
|
9754
|
-
|
|
9803
|
+
const C = (L) => {
|
|
9804
|
+
L.key === "Escape" && D();
|
|
9755
9805
|
};
|
|
9756
|
-
return document.addEventListener("keydown",
|
|
9757
|
-
}, [m,
|
|
9758
|
-
const
|
|
9759
|
-
const
|
|
9760
|
-
p || w(
|
|
9761
|
-
},
|
|
9762
|
-
p || w([]), a == null || a([]),
|
|
9763
|
-
},
|
|
9764
|
-
if (
|
|
9765
|
-
|
|
9766
|
-
else if (
|
|
9767
|
-
|
|
9768
|
-
else if ((
|
|
9769
|
-
|
|
9770
|
-
const
|
|
9771
|
-
|
|
9772
|
-
}
|
|
9773
|
-
},
|
|
9774
|
-
return /* @__PURE__ */ g("span", { ref:
|
|
9806
|
+
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
9807
|
+
}, [m, D]);
|
|
9808
|
+
const P = (C) => {
|
|
9809
|
+
const L = v.includes(C) ? v.filter((F) => F !== C) : [...v, C];
|
|
9810
|
+
p || w(L), a == null || a(L);
|
|
9811
|
+
}, R = () => {
|
|
9812
|
+
p || w([]), a == null || a([]), D();
|
|
9813
|
+
}, H = (C) => {
|
|
9814
|
+
if (C.key === "ArrowDown")
|
|
9815
|
+
C.preventDefault(), E((L) => (L + 1) % r.length);
|
|
9816
|
+
else if (C.key === "ArrowUp")
|
|
9817
|
+
C.preventDefault(), E((L) => (L - 1 + r.length) % r.length);
|
|
9818
|
+
else if ((C.key === "Enter" || C.key === " ") && b >= 0) {
|
|
9819
|
+
C.preventDefault();
|
|
9820
|
+
const L = r[b];
|
|
9821
|
+
L && !L.disabled && P(L.value);
|
|
9822
|
+
}
|
|
9823
|
+
}, V = no[l], W = ro[l];
|
|
9824
|
+
return /* @__PURE__ */ g("span", { ref: T, style: { display: "inline-flex", ...u }, children: [
|
|
9775
9825
|
/* @__PURE__ */ g(
|
|
9776
9826
|
fe,
|
|
9777
9827
|
{
|
|
9778
|
-
variant: o === "outline" &&
|
|
9828
|
+
variant: o === "outline" && v.length > 0 ? "secondary" : o === "ghost" ? "ghost" : o,
|
|
9779
9829
|
size: l,
|
|
9780
9830
|
...e ? { chevron: !0 } : {},
|
|
9781
9831
|
disabled: s,
|
|
9782
|
-
onClick: () => !s && f((
|
|
9832
|
+
onClick: () => !s && f((C) => !C),
|
|
9783
9833
|
...c !== void 0 && { leftIcon: c },
|
|
9784
9834
|
children: [
|
|
9785
9835
|
e || void 0,
|
|
9786
|
-
|
|
9836
|
+
v.length > 0 && /* @__PURE__ */ t(Pe, { variant: "accent", size: l === "xs" ? "sm" : l, children: v.length })
|
|
9787
9837
|
]
|
|
9788
9838
|
}
|
|
9789
9839
|
),
|
|
@@ -9796,11 +9846,11 @@ function Wi({
|
|
|
9796
9846
|
"aria-multiselectable": !0,
|
|
9797
9847
|
"aria-label": e,
|
|
9798
9848
|
tabIndex: -1,
|
|
9799
|
-
onKeyDown:
|
|
9849
|
+
onKeyDown: H,
|
|
9800
9850
|
style: {
|
|
9801
9851
|
position: "fixed",
|
|
9802
|
-
top: (
|
|
9803
|
-
left: (
|
|
9852
|
+
top: (I == null ? void 0 : I.top) ?? -9999,
|
|
9853
|
+
left: (I == null ? void 0 : I.left) ?? -9999,
|
|
9804
9854
|
zIndex: 1e3,
|
|
9805
9855
|
minWidth: 180,
|
|
9806
9856
|
background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
|
|
@@ -9809,52 +9859,52 @@ function Wi({
|
|
|
9809
9859
|
border: "1px solid color-mix(in srgb, var(--lucent-accent-default) 15%, var(--lucent-border-default))",
|
|
9810
9860
|
borderRadius: "var(--lucent-radius-lg)",
|
|
9811
9861
|
boxShadow: "0 0 24px -4px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), var(--lucent-shadow-md)",
|
|
9812
|
-
padding:
|
|
9862
|
+
padding: V,
|
|
9813
9863
|
maxHeight: "min(320px, calc(100vh - 32px))",
|
|
9814
9864
|
overflowY: "auto",
|
|
9815
9865
|
animation: x === "exiting" ? `lucent-filter-ms-out ${Xe}ms var(--lucent-easing-default) forwards` : `lucent-filter-ms-in ${Xe}ms var(--lucent-easing-decelerate)`,
|
|
9816
|
-
transformOrigin: (
|
|
9866
|
+
transformOrigin: (I == null ? void 0 : I.transformOrigin) ?? "top left",
|
|
9817
9867
|
outline: "none",
|
|
9818
9868
|
pointerEvents: x === "exiting" ? "none" : "auto",
|
|
9819
9869
|
fontFamily: "var(--lucent-font-family-base)"
|
|
9820
9870
|
},
|
|
9821
9871
|
children: [
|
|
9822
|
-
r.map((
|
|
9823
|
-
const
|
|
9872
|
+
r.map((C, L) => {
|
|
9873
|
+
const F = v.includes(C.value), B = b === L;
|
|
9824
9874
|
return /* @__PURE__ */ g(
|
|
9825
9875
|
"div",
|
|
9826
9876
|
{
|
|
9827
9877
|
role: "option",
|
|
9828
|
-
"aria-selected":
|
|
9829
|
-
"aria-disabled":
|
|
9830
|
-
onClick: () => !
|
|
9831
|
-
onMouseEnter: () => E(
|
|
9878
|
+
"aria-selected": F,
|
|
9879
|
+
"aria-disabled": C.disabled,
|
|
9880
|
+
onClick: () => !C.disabled && P(C.value),
|
|
9881
|
+
onMouseEnter: () => E(L),
|
|
9832
9882
|
style: {
|
|
9833
9883
|
display: "flex",
|
|
9834
9884
|
alignItems: "center",
|
|
9835
9885
|
gap: "var(--lucent-space-2)",
|
|
9836
|
-
padding: `var(--lucent-space-2) ${
|
|
9886
|
+
padding: `var(--lucent-space-2) ${V}`,
|
|
9837
9887
|
borderRadius: "var(--lucent-radius-md)",
|
|
9838
|
-
cursor:
|
|
9839
|
-
background:
|
|
9840
|
-
opacity:
|
|
9888
|
+
cursor: C.disabled ? "not-allowed" : "pointer",
|
|
9889
|
+
background: B ? "var(--lucent-surface-secondary)" : "transparent",
|
|
9890
|
+
opacity: C.disabled ? 0.5 : 1,
|
|
9841
9891
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
9842
9892
|
},
|
|
9843
9893
|
children: [
|
|
9844
9894
|
/* @__PURE__ */ t(
|
|
9845
9895
|
pt,
|
|
9846
9896
|
{
|
|
9847
|
-
checked:
|
|
9897
|
+
checked: F,
|
|
9848
9898
|
onChange: () => {
|
|
9849
9899
|
},
|
|
9850
|
-
disabled:
|
|
9900
|
+
disabled: C.disabled,
|
|
9851
9901
|
style: { pointerEvents: "none" }
|
|
9852
9902
|
}
|
|
9853
9903
|
),
|
|
9854
|
-
|
|
9904
|
+
C.swatch ? /* @__PURE__ */ t(Pe, { size: l === "xs" ? "sm" : l, swatch: C.swatch, children: C.label }) : /* @__PURE__ */ t(G, { size: W, children: C.label })
|
|
9855
9905
|
]
|
|
9856
9906
|
},
|
|
9857
|
-
|
|
9907
|
+
C.value
|
|
9858
9908
|
);
|
|
9859
9909
|
}),
|
|
9860
9910
|
/* @__PURE__ */ t(
|
|
@@ -9871,16 +9921,16 @@ function Wi({
|
|
|
9871
9921
|
/* @__PURE__ */ t(
|
|
9872
9922
|
"div",
|
|
9873
9923
|
{
|
|
9874
|
-
onClick:
|
|
9924
|
+
onClick: v.length > 0 ? R : void 0,
|
|
9875
9925
|
style: {
|
|
9876
9926
|
display: "flex",
|
|
9877
9927
|
alignItems: "center",
|
|
9878
|
-
padding: `var(--lucent-space-2) ${
|
|
9928
|
+
padding: `var(--lucent-space-2) ${V}`,
|
|
9879
9929
|
borderRadius: "var(--lucent-radius-md)",
|
|
9880
|
-
cursor:
|
|
9881
|
-
opacity:
|
|
9930
|
+
cursor: v.length > 0 ? "pointer" : "default",
|
|
9931
|
+
opacity: v.length > 0 ? 1 : 0.5
|
|
9882
9932
|
},
|
|
9883
|
-
children: /* @__PURE__ */ t(
|
|
9933
|
+
children: /* @__PURE__ */ t(G, { size: W, color: v.length > 0 ? "secondary" : "disabled", children: "Clear all" })
|
|
9884
9934
|
}
|
|
9885
9935
|
)
|
|
9886
9936
|
]
|
|
@@ -9903,8 +9953,8 @@ function Vi({
|
|
|
9903
9953
|
style: u
|
|
9904
9954
|
}) {
|
|
9905
9955
|
var x;
|
|
9906
|
-
const p = n !== void 0, [h, w] = q(i),
|
|
9907
|
-
p || w(
|
|
9956
|
+
const p = n !== void 0, [h, w] = q(i), v = p ? n : h, m = (x = r.find((k) => k.value === v)) == null ? void 0 : x.label, f = v !== void 0, d = (k) => {
|
|
9957
|
+
p || w(k), a == null || a(k);
|
|
9908
9958
|
}, y = () => {
|
|
9909
9959
|
p || w(void 0), a == null || a(void 0);
|
|
9910
9960
|
};
|
|
@@ -9925,19 +9975,19 @@ function Vi({
|
|
|
9925
9975
|
size: l,
|
|
9926
9976
|
...u !== void 0 && { style: u },
|
|
9927
9977
|
children: [
|
|
9928
|
-
r.map((
|
|
9978
|
+
r.map((k) => /* @__PURE__ */ t(
|
|
9929
9979
|
ot,
|
|
9930
9980
|
{
|
|
9931
|
-
selected:
|
|
9932
|
-
...
|
|
9933
|
-
onSelect: () => d(
|
|
9934
|
-
children:
|
|
9981
|
+
selected: v === k.value,
|
|
9982
|
+
...k.disabled !== void 0 && { disabled: k.disabled },
|
|
9983
|
+
onSelect: () => d(k.value),
|
|
9984
|
+
children: k.label
|
|
9935
9985
|
},
|
|
9936
|
-
|
|
9986
|
+
k.value
|
|
9937
9987
|
)),
|
|
9938
9988
|
f && /* @__PURE__ */ g(Z, { children: [
|
|
9939
9989
|
/* @__PURE__ */ t(ar, {}),
|
|
9940
|
-
/* @__PURE__ */ t(ot, { onSelect: y, children: /* @__PURE__ */ t(
|
|
9990
|
+
/* @__PURE__ */ t(ot, { onSelect: y, children: /* @__PURE__ */ t(G, { size: l === "lg" ? "md" : "sm", color: "secondary", children: "Clear" }) })
|
|
9941
9991
|
] })
|
|
9942
9992
|
]
|
|
9943
9993
|
}
|
|
@@ -9958,22 +10008,22 @@ function Oi({
|
|
|
9958
10008
|
disabled: s = !1,
|
|
9959
10009
|
style: c
|
|
9960
10010
|
}) {
|
|
9961
|
-
const u = e !== void 0, [p, h] = q(r), w = u ? e : p, [
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
var
|
|
9965
|
-
return (
|
|
10011
|
+
const u = e !== void 0, [p, h] = q(r), w = u ? e : p, [v, m] = q(!!w), f = O(null);
|
|
10012
|
+
U(() => {
|
|
10013
|
+
v && requestAnimationFrame(() => {
|
|
10014
|
+
var k;
|
|
10015
|
+
return (k = f.current) == null ? void 0 : k.focus();
|
|
9966
10016
|
});
|
|
9967
|
-
}, [
|
|
9968
|
-
const d = (
|
|
9969
|
-
const
|
|
9970
|
-
u || h(
|
|
10017
|
+
}, [v]);
|
|
10018
|
+
const d = (k) => {
|
|
10019
|
+
const I = k.target.value;
|
|
10020
|
+
u || h(I), n == null || n(I);
|
|
9971
10021
|
}, y = () => {
|
|
9972
10022
|
w || m(!1);
|
|
9973
10023
|
}, x = () => {
|
|
9974
10024
|
s || m(!0);
|
|
9975
10025
|
};
|
|
9976
|
-
return
|
|
10026
|
+
return v ? /* @__PURE__ */ t(
|
|
9977
10027
|
jt,
|
|
9978
10028
|
{
|
|
9979
10029
|
ref: f,
|
|
@@ -10093,7 +10143,7 @@ function tn({ index: e, state: r, step: n, cfg: i }) {
|
|
|
10093
10143
|
);
|
|
10094
10144
|
}
|
|
10095
10145
|
function nn({ state: e }) {
|
|
10096
|
-
return /* @__PURE__ */ t(
|
|
10146
|
+
return /* @__PURE__ */ t(Pe, { variant: po[e], size: "sm", borderless: !0, children: uo[e] });
|
|
10097
10147
|
}
|
|
10098
10148
|
function fo({ step: e, state: r, index: n, cfg: i, numbered: a, showStatus: o }) {
|
|
10099
10149
|
return /* @__PURE__ */ g(Z, { children: [
|
|
@@ -10229,7 +10279,7 @@ function Ui({
|
|
|
10229
10279
|
showStatus: o = !1,
|
|
10230
10280
|
style: l
|
|
10231
10281
|
}) {
|
|
10232
|
-
|
|
10282
|
+
U(ho, []);
|
|
10233
10283
|
const s = so[n], c = e.map(lo), u = i === "vertical" ? go : mo;
|
|
10234
10284
|
return /* @__PURE__ */ t(
|
|
10235
10285
|
"div",
|
|
@@ -10375,8 +10425,8 @@ function Gi({
|
|
|
10375
10425
|
n != null && n.length > 0 && /* @__PURE__ */ t(Fr, { items: n }),
|
|
10376
10426
|
/* @__PURE__ */ g(xt, { justify: "between", align: "end", wrap: !0, gap: "3", children: [
|
|
10377
10427
|
/* @__PURE__ */ g(yt, { gap: "1", style: { minWidth: 0 }, children: [
|
|
10378
|
-
/* @__PURE__ */ t(
|
|
10379
|
-
r != null && /* @__PURE__ */ t(
|
|
10428
|
+
/* @__PURE__ */ t(G, { as: "h1", size: "3xl", weight: "bold", family: "display", children: e }),
|
|
10429
|
+
r != null && /* @__PURE__ */ t(G, { size: "sm", color: "secondary", children: r })
|
|
10380
10430
|
] }),
|
|
10381
10431
|
u && /* @__PURE__ */ g(xt, { gap: "2", wrap: !0, children: [
|
|
10382
10432
|
s && a.map((p, h) => Wt(p, "outline", h)),
|
|
@@ -10604,28 +10654,28 @@ function Yi({
|
|
|
10604
10654
|
}) {
|
|
10605
10655
|
const [p, h] = q(null);
|
|
10606
10656
|
if (e.length < 2) return null;
|
|
10607
|
-
const w = gt(i),
|
|
10608
|
-
const z =
|
|
10609
|
-
h(Math.max(0, Math.min(
|
|
10610
|
-
},
|
|
10657
|
+
const w = gt(i), v = e.length - 1, m = Math.min(...e), f = Math.max(...e), d = vt([m, f], [ve - Ot, Ot]), y = e.map((T, z) => ({ x: z, y: d(T) })), x = l ? bt(y) : Ve(y), k = a ? l ? on(y, ve) : an(y, ve) : null, I = (T) => {
|
|
10658
|
+
const z = T.currentTarget.getBoundingClientRect(), D = T.clientX - z.left, P = Math.round(D / z.width * (e.length - 1));
|
|
10659
|
+
h(Math.max(0, Math.min(P, e.length - 1)));
|
|
10660
|
+
}, S = p !== null ? y[p] : void 0, b = p !== null ? e[p] : void 0, E = p === 0 || p === e.length - 1;
|
|
10611
10661
|
return /* @__PURE__ */ g("div", { style: { position: "relative", width: r, height: n, ...u }, children: [
|
|
10612
10662
|
/* @__PURE__ */ g(
|
|
10613
10663
|
"svg",
|
|
10614
10664
|
{
|
|
10615
|
-
viewBox: `0 0 ${
|
|
10665
|
+
viewBox: `0 0 ${v} ${ve}`,
|
|
10616
10666
|
width: "100%",
|
|
10617
10667
|
height: "100%",
|
|
10618
10668
|
preserveAspectRatio: "none",
|
|
10619
10669
|
role: "img",
|
|
10620
10670
|
"aria-label": c,
|
|
10621
10671
|
style: { display: "block", overflow: "visible" },
|
|
10622
|
-
onMouseMove:
|
|
10672
|
+
onMouseMove: I,
|
|
10623
10673
|
onMouseLeave: () => h(null),
|
|
10624
10674
|
children: [
|
|
10625
|
-
|
|
10675
|
+
k && /* @__PURE__ */ t(
|
|
10626
10676
|
"path",
|
|
10627
10677
|
{
|
|
10628
|
-
d:
|
|
10678
|
+
d: k,
|
|
10629
10679
|
fill: `color-mix(in srgb, ${w} 15%, transparent)`,
|
|
10630
10680
|
stroke: "none"
|
|
10631
10681
|
}
|
|
@@ -10645,9 +10695,9 @@ function Yi({
|
|
|
10645
10695
|
]
|
|
10646
10696
|
}
|
|
10647
10697
|
),
|
|
10648
|
-
|
|
10698
|
+
S && /* @__PURE__ */ t("span", { style: {
|
|
10649
10699
|
position: "absolute",
|
|
10650
|
-
left: `${
|
|
10700
|
+
left: `${S.x / v * 100}%`,
|
|
10651
10701
|
top: 0,
|
|
10652
10702
|
width: 1,
|
|
10653
10703
|
height: "100%",
|
|
@@ -10657,10 +10707,10 @@ function Yi({
|
|
|
10657
10707
|
transition: "left 150ms ease-out",
|
|
10658
10708
|
pointerEvents: "none"
|
|
10659
10709
|
} }),
|
|
10660
|
-
|
|
10710
|
+
S && /* @__PURE__ */ t("span", { style: {
|
|
10661
10711
|
position: "absolute",
|
|
10662
|
-
left: `${
|
|
10663
|
-
top: `${
|
|
10712
|
+
left: `${S.x / v * 100}%`,
|
|
10713
|
+
top: `${S.y / ve * 100}%`,
|
|
10664
10714
|
width: 8,
|
|
10665
10715
|
height: 8,
|
|
10666
10716
|
borderRadius: "50%",
|
|
@@ -10670,16 +10720,16 @@ function Yi({
|
|
|
10670
10720
|
transition: "left 150ms ease-out, top 150ms ease-out",
|
|
10671
10721
|
pointerEvents: "none"
|
|
10672
10722
|
} }),
|
|
10673
|
-
|
|
10723
|
+
S && b !== void 0 && !E && /* @__PURE__ */ t("span", { style: {
|
|
10674
10724
|
position: "absolute",
|
|
10675
|
-
left: `${
|
|
10676
|
-
top: `${
|
|
10725
|
+
left: `${S.x / v * 100}%`,
|
|
10726
|
+
top: `${S.y / ve * 100}%`,
|
|
10677
10727
|
transition: "left 150ms ease-out, top 150ms ease-out",
|
|
10678
10728
|
pointerEvents: "none"
|
|
10679
10729
|
}, children: /* @__PURE__ */ t("span", { style: { position: "absolute", bottom: -2 }, children: /* @__PURE__ */ t(
|
|
10680
10730
|
Ne,
|
|
10681
10731
|
{
|
|
10682
|
-
content: s ? s(
|
|
10732
|
+
content: s ? s(b, p) : b,
|
|
10683
10733
|
open: !0,
|
|
10684
10734
|
placement: "top",
|
|
10685
10735
|
children: /* @__PURE__ */ t("span", {})
|
|
@@ -10753,9 +10803,9 @@ function Xi({
|
|
|
10753
10803
|
}) {
|
|
10754
10804
|
const [h, w] = q(null);
|
|
10755
10805
|
if (e.length === 0) return null;
|
|
10756
|
-
const
|
|
10757
|
-
const
|
|
10758
|
-
w({ index: z, x: ue(
|
|
10806
|
+
const v = gt(i), m = le - ce - Je, f = be - bo, d = Math.max(...e.map((z) => z.value), 0), y = rn(0, d, 5), x = y[y.length - 1] ?? d, k = vt([0, x], [f, Qe]), I = m / e.length, S = I * (1 - s), b = (I - S) / 2, E = l ?? ((z) => z >= 1e3 ? `${(z / 1e3).toFixed(1)}k` : String(z)), T = (z) => {
|
|
10807
|
+
const D = e[z], P = ce + z * I + I / 2, R = k(D.value);
|
|
10808
|
+
w({ index: z, x: ue(P, le), y: ue(R, be) });
|
|
10759
10809
|
};
|
|
10760
10810
|
return /* @__PURE__ */ g("div", { style: { position: "relative", width: r, height: n, ...p }, children: [
|
|
10761
10811
|
/* @__PURE__ */ g(
|
|
@@ -10770,14 +10820,14 @@ function Xi({
|
|
|
10770
10820
|
style: { display: "block" },
|
|
10771
10821
|
children: [
|
|
10772
10822
|
y.map((z) => {
|
|
10773
|
-
const
|
|
10823
|
+
const D = k(z);
|
|
10774
10824
|
return a ? /* @__PURE__ */ t(
|
|
10775
10825
|
"line",
|
|
10776
10826
|
{
|
|
10777
10827
|
x1: ce,
|
|
10778
|
-
y1:
|
|
10828
|
+
y1: D,
|
|
10779
10829
|
x2: le - Je,
|
|
10780
|
-
y2:
|
|
10830
|
+
y2: D,
|
|
10781
10831
|
stroke: "var(--lucent-border-subtle, #e5e7eb)",
|
|
10782
10832
|
strokeWidth: 0.5,
|
|
10783
10833
|
strokeDasharray: "3 3"
|
|
@@ -10785,21 +10835,21 @@ function Xi({
|
|
|
10785
10835
|
z
|
|
10786
10836
|
) : null;
|
|
10787
10837
|
}),
|
|
10788
|
-
e.map((z,
|
|
10789
|
-
const
|
|
10838
|
+
e.map((z, D) => {
|
|
10839
|
+
const P = ce + D * I + b, R = Math.max(0, f - k(z.value)), H = f - R, V = z.color ?? v, W = (h == null ? void 0 : h.index) === D, C = h !== null && !W;
|
|
10790
10840
|
return /* @__PURE__ */ g(
|
|
10791
10841
|
"g",
|
|
10792
10842
|
{
|
|
10793
|
-
onMouseEnter: () =>
|
|
10843
|
+
onMouseEnter: () => T(D),
|
|
10794
10844
|
onMouseLeave: () => w(null),
|
|
10795
10845
|
style: { cursor: "pointer" },
|
|
10796
10846
|
children: [
|
|
10797
10847
|
/* @__PURE__ */ t(
|
|
10798
10848
|
"rect",
|
|
10799
10849
|
{
|
|
10800
|
-
x: ce +
|
|
10850
|
+
x: ce + D * I,
|
|
10801
10851
|
y: Qe,
|
|
10802
|
-
width:
|
|
10852
|
+
width: I,
|
|
10803
10853
|
height: f - Qe,
|
|
10804
10854
|
fill: "transparent"
|
|
10805
10855
|
}
|
|
@@ -10807,15 +10857,15 @@ function Xi({
|
|
|
10807
10857
|
/* @__PURE__ */ t(
|
|
10808
10858
|
"path",
|
|
10809
10859
|
{
|
|
10810
|
-
d: yo(
|
|
10811
|
-
fill:
|
|
10812
|
-
opacity:
|
|
10860
|
+
d: yo(P, H, S, R, c),
|
|
10861
|
+
fill: V,
|
|
10862
|
+
opacity: C ? 0.35 : 1,
|
|
10813
10863
|
style: { transition: "opacity 150ms" }
|
|
10814
10864
|
}
|
|
10815
10865
|
)
|
|
10816
10866
|
]
|
|
10817
10867
|
},
|
|
10818
|
-
|
|
10868
|
+
D
|
|
10819
10869
|
);
|
|
10820
10870
|
}),
|
|
10821
10871
|
/* @__PURE__ */ t(
|
|
@@ -10835,29 +10885,29 @@ function Xi({
|
|
|
10835
10885
|
y.map((z) => /* @__PURE__ */ t("span", { style: {
|
|
10836
10886
|
...et,
|
|
10837
10887
|
right: `${ue(le - ce + 6, le)}%`,
|
|
10838
|
-
top: `${ue(
|
|
10888
|
+
top: `${ue(k(z), be)}%`,
|
|
10839
10889
|
transform: "translateY(-50%)",
|
|
10840
10890
|
textAlign: "right"
|
|
10841
10891
|
}, children: E(z) }, z)),
|
|
10842
|
-
e.map((z,
|
|
10843
|
-
const
|
|
10892
|
+
e.map((z, D) => {
|
|
10893
|
+
const P = ue(ce + D * I + I / 2, le), R = (h == null ? void 0 : h.index) === D, H = h !== null && !R, V = ue(k(z.value), be);
|
|
10844
10894
|
return /* @__PURE__ */ g("span", { style: { display: "contents" }, children: [
|
|
10845
10895
|
/* @__PURE__ */ t("span", { style: {
|
|
10846
10896
|
...et,
|
|
10847
|
-
left: `${
|
|
10897
|
+
left: `${P}%`,
|
|
10848
10898
|
top: `${ue(f + 4, be)}%`,
|
|
10849
10899
|
transform: "translateX(-50%)",
|
|
10850
|
-
fontWeight:
|
|
10900
|
+
fontWeight: R ? 600 : 400
|
|
10851
10901
|
}, children: z.label }),
|
|
10852
10902
|
o && /* @__PURE__ */ t("span", { style: {
|
|
10853
10903
|
...et,
|
|
10854
|
-
left: `${
|
|
10855
|
-
top: `${
|
|
10904
|
+
left: `${P}%`,
|
|
10905
|
+
top: `${V}%`,
|
|
10856
10906
|
transform: "translate(-50%, -100%) translateY(-4px)",
|
|
10857
|
-
opacity:
|
|
10907
|
+
opacity: H ? 0.35 : 1,
|
|
10858
10908
|
transition: "opacity 150ms"
|
|
10859
10909
|
}, children: E(z.value) })
|
|
10860
|
-
] },
|
|
10910
|
+
] }, D);
|
|
10861
10911
|
}),
|
|
10862
10912
|
h && /* @__PURE__ */ t("span", { style: { position: "absolute", left: `${h.x}%`, top: `${h.y}%`, pointerEvents: "none" }, children: /* @__PURE__ */ t("span", { style: { position: "absolute", bottom: 0 }, children: /* @__PURE__ */ t(
|
|
10863
10913
|
Ne,
|
|
@@ -10903,7 +10953,7 @@ const Zi = {
|
|
|
10903
10953
|
ariaAttributes: ["aria-label"],
|
|
10904
10954
|
notes: "Provide a descriptive ariaLabel summarising the data for screen readers."
|
|
10905
10955
|
}
|
|
10906
|
-
}, ee = 400,
|
|
10956
|
+
}, ee = 400, oe = 200, de = 40, tt = 12, Le = 12, xo = 24;
|
|
10907
10957
|
function Ji({
|
|
10908
10958
|
data: e,
|
|
10909
10959
|
series: r,
|
|
@@ -10918,62 +10968,62 @@ function Ji({
|
|
|
10918
10968
|
formatValue: p,
|
|
10919
10969
|
xLabelCount: h,
|
|
10920
10970
|
ariaLabel: w = "Area chart",
|
|
10921
|
-
style:
|
|
10971
|
+
style: v
|
|
10922
10972
|
}) {
|
|
10923
10973
|
const [m, f] = q(null), d = r ?? (e ? [{ id: "_default", name: "", data: e, color: gt(a) }] : []), y = d[0];
|
|
10924
10974
|
if (!y || y.data.length === 0) return null;
|
|
10925
|
-
const x = y.data.map((A) => A.label),
|
|
10926
|
-
(A) => A.data.map((
|
|
10927
|
-
),
|
|
10928
|
-
const
|
|
10929
|
-
if (
|
|
10975
|
+
const x = y.data.map((A) => A.label), k = d.flatMap((A) => A.data.map((M) => M.value)), I = Math.max(...k, 0), S = ee - de - tt, b = oe - xo, E = rn(0, I, 5), T = E[E.length - 1] ?? I, z = vt([0, T], [b, Le]), D = x.length > 1 ? S / (x.length - 1) : 0, P = p ?? ((A) => A >= 1e3 ? `${(A / 1e3).toFixed(1)}k` : String(A)), R = h ?? Math.min(x.length, 7), H = x.length <= R ? 1 : Math.ceil(x.length / R), V = c ? bt : Ve, W = c ? on : an, C = d.map(
|
|
10976
|
+
(A) => A.data.map((M, N) => ({ x: de + N * D, y: z(M.value) }))
|
|
10977
|
+
), L = D / 2, F = (A) => {
|
|
10978
|
+
const M = A.currentTarget.getBoundingClientRect(), j = (A.clientX - M.left) / M.width * ee - de;
|
|
10979
|
+
if (j < -L || j > S + L) {
|
|
10930
10980
|
f(null);
|
|
10931
10981
|
return;
|
|
10932
10982
|
}
|
|
10933
|
-
const
|
|
10934
|
-
var
|
|
10935
|
-
return ((
|
|
10983
|
+
const $ = D > 0 ? Math.round(j / D) : 0, _ = Math.max(0, Math.min($, x.length - 1)), K = de + _ * D, se = Math.min(...C.map((ae) => {
|
|
10984
|
+
var Y;
|
|
10985
|
+
return ((Y = ae[_]) == null ? void 0 : Y.y) ?? Le;
|
|
10936
10986
|
}));
|
|
10937
|
-
f({ index:
|
|
10938
|
-
},
|
|
10987
|
+
f({ index: _, x: K / ee * 100, y: se / oe * 100 });
|
|
10988
|
+
}, B = m && /* @__PURE__ */ g("div", { children: [
|
|
10939
10989
|
/* @__PURE__ */ t("div", { style: { fontWeight: 600, marginBottom: d.length > 1 ? 2 : 0 }, children: x[m.index] }),
|
|
10940
|
-
d.map((A,
|
|
10941
|
-
var
|
|
10942
|
-
const
|
|
10943
|
-
if (
|
|
10944
|
-
const
|
|
10990
|
+
d.map((A, M) => {
|
|
10991
|
+
var $;
|
|
10992
|
+
const N = ($ = A.data[m.index]) == null ? void 0 : $.value;
|
|
10993
|
+
if (N === void 0) return null;
|
|
10994
|
+
const j = A.color ?? te[M % te.length];
|
|
10945
10995
|
return /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
10946
|
-
d.length > 1 && /* @__PURE__ */ t("span", { style: { width: 6, height: 6, borderRadius: "50%", background:
|
|
10996
|
+
d.length > 1 && /* @__PURE__ */ t("span", { style: { width: 6, height: 6, borderRadius: "50%", background: j, flexShrink: 0 } }),
|
|
10947
10997
|
/* @__PURE__ */ g("span", { children: [
|
|
10948
10998
|
A.name ? `${A.name}: ` : "",
|
|
10949
|
-
|
|
10999
|
+
P(N)
|
|
10950
11000
|
] })
|
|
10951
11001
|
] }, A.id);
|
|
10952
11002
|
})
|
|
10953
11003
|
] });
|
|
10954
|
-
return /* @__PURE__ */ g("div", { style: { position: "relative", width: n, height: i, ...
|
|
11004
|
+
return /* @__PURE__ */ g("div", { style: { position: "relative", width: n, height: i, ...v }, children: [
|
|
10955
11005
|
/* @__PURE__ */ g(
|
|
10956
11006
|
"svg",
|
|
10957
11007
|
{
|
|
10958
|
-
viewBox: `0 0 ${ee} ${
|
|
11008
|
+
viewBox: `0 0 ${ee} ${oe}`,
|
|
10959
11009
|
width: "100%",
|
|
10960
11010
|
height: "100%",
|
|
10961
11011
|
preserveAspectRatio: "none",
|
|
10962
11012
|
role: "img",
|
|
10963
11013
|
"aria-label": w,
|
|
10964
11014
|
style: { display: "block" },
|
|
10965
|
-
onMouseMove:
|
|
11015
|
+
onMouseMove: F,
|
|
10966
11016
|
onMouseLeave: () => f(null),
|
|
10967
11017
|
children: [
|
|
10968
11018
|
E.map((A) => {
|
|
10969
|
-
const
|
|
11019
|
+
const M = z(A);
|
|
10970
11020
|
return o ? /* @__PURE__ */ t(
|
|
10971
11021
|
"line",
|
|
10972
11022
|
{
|
|
10973
11023
|
x1: de,
|
|
10974
|
-
y1:
|
|
11024
|
+
y1: M,
|
|
10975
11025
|
x2: ee - tt,
|
|
10976
|
-
y2:
|
|
11026
|
+
y2: M,
|
|
10977
11027
|
stroke: "var(--lucent-border-subtle, #e5e7eb)",
|
|
10978
11028
|
strokeWidth: 0.5,
|
|
10979
11029
|
strokeDasharray: "3 3"
|
|
@@ -10985,23 +11035,23 @@ function Ji({
|
|
|
10985
11035
|
"line",
|
|
10986
11036
|
{
|
|
10987
11037
|
x1: de,
|
|
10988
|
-
y1:
|
|
11038
|
+
y1: b,
|
|
10989
11039
|
x2: ee - tt,
|
|
10990
|
-
y2:
|
|
11040
|
+
y2: b,
|
|
10991
11041
|
stroke: "var(--lucent-border-default, #d1d5db)",
|
|
10992
11042
|
strokeWidth: 0.5
|
|
10993
11043
|
}
|
|
10994
11044
|
),
|
|
10995
|
-
d.map((A,
|
|
10996
|
-
const
|
|
11045
|
+
d.map((A, M) => {
|
|
11046
|
+
const N = A.color ?? te[M % te.length], j = C[M], $ = V(j), _ = W(j, b);
|
|
10997
11047
|
return /* @__PURE__ */ g("g", { children: [
|
|
10998
|
-
/* @__PURE__ */ t("path", { d:
|
|
11048
|
+
/* @__PURE__ */ t("path", { d: _, fill: N, opacity: u, stroke: "none" }),
|
|
10999
11049
|
/* @__PURE__ */ t(
|
|
11000
11050
|
"path",
|
|
11001
11051
|
{
|
|
11002
|
-
d:
|
|
11052
|
+
d: $,
|
|
11003
11053
|
fill: "none",
|
|
11004
|
-
stroke:
|
|
11054
|
+
stroke: N,
|
|
11005
11055
|
strokeWidth: 1.5,
|
|
11006
11056
|
strokeLinecap: "round",
|
|
11007
11057
|
strokeLinejoin: "round"
|
|
@@ -11012,46 +11062,46 @@ function Ji({
|
|
|
11012
11062
|
]
|
|
11013
11063
|
}
|
|
11014
11064
|
),
|
|
11015
|
-
l && d.map((A,
|
|
11016
|
-
const
|
|
11017
|
-
return
|
|
11065
|
+
l && d.map((A, M) => {
|
|
11066
|
+
const N = A.color ?? te[M % te.length];
|
|
11067
|
+
return C[M].map(($, _) => /* @__PURE__ */ t("span", { style: {
|
|
11018
11068
|
position: "absolute",
|
|
11019
|
-
left: `${
|
|
11020
|
-
top: `${
|
|
11069
|
+
left: `${$.x / ee * 100}%`,
|
|
11070
|
+
top: `${$.y / oe * 100}%`,
|
|
11021
11071
|
width: s * 2,
|
|
11022
11072
|
height: s * 2,
|
|
11023
11073
|
borderRadius: "50%",
|
|
11024
|
-
background:
|
|
11074
|
+
background: N,
|
|
11025
11075
|
border: "1.5px solid var(--lucent-surface, #fff)",
|
|
11026
11076
|
transform: "translate(-50%, -50%)",
|
|
11027
11077
|
pointerEvents: "none"
|
|
11028
|
-
} }, `${A.id}-${
|
|
11078
|
+
} }, `${A.id}-${_}`));
|
|
11029
11079
|
}),
|
|
11030
11080
|
m && /* @__PURE__ */ g(Z, { children: [
|
|
11031
11081
|
/* @__PURE__ */ t("span", { style: {
|
|
11032
11082
|
position: "absolute",
|
|
11033
11083
|
left: `${m.x}%`,
|
|
11034
|
-
top: `${
|
|
11084
|
+
top: `${Le / oe * 100}%`,
|
|
11035
11085
|
width: 1,
|
|
11036
|
-
height: `${(
|
|
11086
|
+
height: `${(b - Le) / oe * 100}%`,
|
|
11037
11087
|
background: "var(--lucent-border-default)",
|
|
11038
11088
|
opacity: 0.5,
|
|
11039
11089
|
transform: "translateX(-50%)",
|
|
11040
11090
|
pointerEvents: "none"
|
|
11041
11091
|
} }),
|
|
11042
|
-
d.map((A,
|
|
11043
|
-
var
|
|
11044
|
-
const
|
|
11045
|
-
if (!
|
|
11046
|
-
const
|
|
11092
|
+
d.map((A, M) => {
|
|
11093
|
+
var $;
|
|
11094
|
+
const N = ($ = C[M]) == null ? void 0 : $[m.index];
|
|
11095
|
+
if (!N) return null;
|
|
11096
|
+
const j = A.color ?? te[M % te.length];
|
|
11047
11097
|
return /* @__PURE__ */ t("span", { style: {
|
|
11048
11098
|
position: "absolute",
|
|
11049
|
-
left: `${
|
|
11050
|
-
top: `${
|
|
11099
|
+
left: `${N.x / ee * 100}%`,
|
|
11100
|
+
top: `${N.y / oe * 100}%`,
|
|
11051
11101
|
width: 10,
|
|
11052
11102
|
height: 10,
|
|
11053
11103
|
borderRadius: "50%",
|
|
11054
|
-
background:
|
|
11104
|
+
background: j,
|
|
11055
11105
|
border: "2px solid var(--lucent-surface, #fff)",
|
|
11056
11106
|
transform: "translate(-50%, -50%)",
|
|
11057
11107
|
pointerEvents: "none"
|
|
@@ -11061,7 +11111,7 @@ function Ji({
|
|
|
11061
11111
|
E.map((A) => /* @__PURE__ */ t("span", { style: {
|
|
11062
11112
|
position: "absolute",
|
|
11063
11113
|
right: `${(ee - de + 6) / ee * 100}%`,
|
|
11064
|
-
top: `${z(A) /
|
|
11114
|
+
top: `${z(A) / oe * 100}%`,
|
|
11065
11115
|
transform: "translateY(-50%)",
|
|
11066
11116
|
textAlign: "right",
|
|
11067
11117
|
fontFamily: "var(--lucent-font-family-base)",
|
|
@@ -11069,24 +11119,24 @@ function Ji({
|
|
|
11069
11119
|
color: "var(--lucent-text-secondary)",
|
|
11070
11120
|
whiteSpace: "nowrap",
|
|
11071
11121
|
pointerEvents: "none"
|
|
11072
|
-
}, children:
|
|
11073
|
-
x.map((A,
|
|
11074
|
-
if (
|
|
11075
|
-
const
|
|
11122
|
+
}, children: P(A) }, A)),
|
|
11123
|
+
x.map((A, M) => {
|
|
11124
|
+
if (M % H !== 0) return null;
|
|
11125
|
+
const N = (m == null ? void 0 : m.index) === M;
|
|
11076
11126
|
return /* @__PURE__ */ t("span", { style: {
|
|
11077
11127
|
position: "absolute",
|
|
11078
|
-
left: `${(de +
|
|
11079
|
-
top: `${(
|
|
11128
|
+
left: `${(de + M * D) / ee * 100}%`,
|
|
11129
|
+
top: `${(b + 4) / oe * 100}%`,
|
|
11080
11130
|
transform: "translateX(-50%)",
|
|
11081
11131
|
fontFamily: "var(--lucent-font-family-base)",
|
|
11082
11132
|
fontSize: "var(--lucent-font-size-xs)",
|
|
11083
11133
|
color: "var(--lucent-text-secondary)",
|
|
11084
|
-
fontWeight:
|
|
11134
|
+
fontWeight: N ? 600 : 400,
|
|
11085
11135
|
whiteSpace: "nowrap",
|
|
11086
11136
|
pointerEvents: "none"
|
|
11087
|
-
}, children: A },
|
|
11137
|
+
}, children: A }, M);
|
|
11088
11138
|
}),
|
|
11089
|
-
m && /* @__PURE__ */ t("span", { style: { position: "absolute", left: `${m.x}%`, top: `${m.y}%`, pointerEvents: "none" }, children: /* @__PURE__ */ t("span", { style: { position: "absolute", bottom: 0 }, children: /* @__PURE__ */ t(Ne, { content:
|
|
11139
|
+
m && /* @__PURE__ */ t("span", { style: { position: "absolute", left: `${m.x}%`, top: `${m.y}%`, pointerEvents: "none" }, children: /* @__PURE__ */ t("span", { style: { position: "absolute", bottom: 0 }, children: /* @__PURE__ */ t(Ne, { content: B, open: !0, placement: "top", children: /* @__PURE__ */ t("span", {}) }) }) })
|
|
11090
11140
|
] });
|
|
11091
11141
|
}
|
|
11092
11142
|
const Qi = {
|
|
@@ -11133,32 +11183,32 @@ function es({
|
|
|
11133
11183
|
}) {
|
|
11134
11184
|
const [c, u] = q(null);
|
|
11135
11185
|
if (e.length === 0) return null;
|
|
11136
|
-
const p = e.reduce((
|
|
11186
|
+
const p = e.reduce((S, b) => S + b.value, 0);
|
|
11137
11187
|
if (p === 0) return null;
|
|
11138
|
-
const h = rt * (1 - n),
|
|
11188
|
+
const h = rt * (1 - n), v = 360 - i * e.length;
|
|
11139
11189
|
let m = o;
|
|
11140
|
-
const f = e.map((
|
|
11141
|
-
const E =
|
|
11190
|
+
const f = e.map((S, b) => {
|
|
11191
|
+
const E = S.value / p * v, T = m, z = m + E;
|
|
11142
11192
|
return m = z + i, {
|
|
11143
|
-
...
|
|
11144
|
-
segStart:
|
|
11193
|
+
...S,
|
|
11194
|
+
segStart: T,
|
|
11145
11195
|
segEnd: z,
|
|
11146
|
-
color:
|
|
11196
|
+
color: S.color ?? te[b % te.length]
|
|
11147
11197
|
};
|
|
11148
11198
|
}), d = h * 2 * 0.7, y = (nt - d) / 2, x = c !== null ? f[c] : void 0;
|
|
11149
|
-
let
|
|
11199
|
+
let k, I = null;
|
|
11150
11200
|
if (x) {
|
|
11151
|
-
const
|
|
11152
|
-
|
|
11153
|
-
const
|
|
11154
|
-
|
|
11201
|
+
const S = (x.segStart + x.segEnd) / 2;
|
|
11202
|
+
k = Se(Ht, Ut, rt + 8, S);
|
|
11203
|
+
const b = (x.value / p * 100).toFixed(1);
|
|
11204
|
+
I = /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
11155
11205
|
/* @__PURE__ */ t("span", { style: { width: 6, height: 6, borderRadius: "50%", background: x.color, flexShrink: 0 } }),
|
|
11156
11206
|
/* @__PURE__ */ g("span", { children: [
|
|
11157
11207
|
/* @__PURE__ */ t("span", { style: { fontWeight: 600 }, children: x.label }),
|
|
11158
11208
|
" ",
|
|
11159
11209
|
x.value,
|
|
11160
11210
|
" (",
|
|
11161
|
-
|
|
11211
|
+
b,
|
|
11162
11212
|
"%)"
|
|
11163
11213
|
] })
|
|
11164
11214
|
] });
|
|
@@ -11174,20 +11224,20 @@ function es({
|
|
|
11174
11224
|
"aria-label": l,
|
|
11175
11225
|
style: { display: "block" },
|
|
11176
11226
|
children: [
|
|
11177
|
-
f.map((
|
|
11178
|
-
const E = c ===
|
|
11227
|
+
f.map((S, b) => {
|
|
11228
|
+
const E = c === b, T = c !== null && !E, D = ((S.segStart + S.segEnd) / 2 - 90) * Math.PI / 180, P = E ? 3 : 0, R = Math.cos(D) * P, H = Math.sin(D) * P;
|
|
11179
11229
|
return /* @__PURE__ */ t(
|
|
11180
11230
|
"path",
|
|
11181
11231
|
{
|
|
11182
|
-
d: vo(Ht, Ut, rt, h,
|
|
11183
|
-
fill:
|
|
11184
|
-
transform: `translate(${
|
|
11185
|
-
opacity:
|
|
11232
|
+
d: vo(Ht, Ut, rt, h, S.segStart, S.segEnd),
|
|
11233
|
+
fill: S.color,
|
|
11234
|
+
transform: `translate(${R}, ${H})`,
|
|
11235
|
+
opacity: T ? 0.4 : 1,
|
|
11186
11236
|
style: { transition: "transform 150ms, opacity 150ms", cursor: "pointer" },
|
|
11187
|
-
onMouseEnter: () => u(
|
|
11237
|
+
onMouseEnter: () => u(b),
|
|
11188
11238
|
onMouseLeave: () => u(null)
|
|
11189
11239
|
},
|
|
11190
|
-
|
|
11240
|
+
b
|
|
11191
11241
|
);
|
|
11192
11242
|
}),
|
|
11193
11243
|
a != null && /* @__PURE__ */ t("foreignObject", { x: y, y, width: d, height: d, children: /* @__PURE__ */ t(
|
|
@@ -11209,12 +11259,12 @@ function es({
|
|
|
11209
11259
|
]
|
|
11210
11260
|
}
|
|
11211
11261
|
),
|
|
11212
|
-
|
|
11262
|
+
k && /* @__PURE__ */ t("span", { style: {
|
|
11213
11263
|
position: "absolute",
|
|
11214
|
-
left: `${
|
|
11215
|
-
top: `${
|
|
11264
|
+
left: `${k.x}%`,
|
|
11265
|
+
top: `${k.y}%`,
|
|
11216
11266
|
pointerEvents: "none"
|
|
11217
|
-
}, children: /* @__PURE__ */ t(Ne, { content:
|
|
11267
|
+
}, children: /* @__PURE__ */ t(Ne, { content: I, open: !0, placement: "top", children: /* @__PURE__ */ t("span", {}) }) })
|
|
11218
11268
|
] });
|
|
11219
11269
|
}
|
|
11220
11270
|
const ts = {
|
|
@@ -11561,8 +11611,8 @@ export {
|
|
|
11561
11611
|
mi as CardManifest,
|
|
11562
11612
|
mt as CardPaddingContext,
|
|
11563
11613
|
pt as Checkbox,
|
|
11564
|
-
|
|
11565
|
-
|
|
11614
|
+
Po as CheckboxManifest,
|
|
11615
|
+
Pe as Chip,
|
|
11566
11616
|
Ko as CodeBlock,
|
|
11567
11617
|
Xo as CodeBlockManifest,
|
|
11568
11618
|
ki as Collapsible,
|
|
@@ -11576,12 +11626,12 @@ export {
|
|
|
11576
11626
|
Ei as DatePicker,
|
|
11577
11627
|
ka as DateRangePicker,
|
|
11578
11628
|
Tn as Divider,
|
|
11579
|
-
|
|
11629
|
+
Lo as DividerManifest,
|
|
11580
11630
|
es as DonutChart,
|
|
11581
11631
|
ts as DonutChartManifest,
|
|
11582
11632
|
bi as EmptyState,
|
|
11583
11633
|
yi as EmptyStateManifest,
|
|
11584
|
-
|
|
11634
|
+
Li as FILE_UPLOAD_MANIFEST,
|
|
11585
11635
|
Di as FileUpload,
|
|
11586
11636
|
Hi as FilterDateRange,
|
|
11587
11637
|
Wi as FilterMultiSelect,
|
|
@@ -11647,12 +11697,12 @@ export {
|
|
|
11647
11697
|
ys as Tabs,
|
|
11648
11698
|
Vo as Tag,
|
|
11649
11699
|
Oo as TagManifest,
|
|
11650
|
-
|
|
11700
|
+
G as Text,
|
|
11651
11701
|
Go as TextManifest,
|
|
11652
11702
|
fn as Textarea,
|
|
11653
11703
|
zo as TextareaManifest,
|
|
11654
11704
|
ns as ThemeAnchorsSpec,
|
|
11655
|
-
|
|
11705
|
+
Pi as Timeline,
|
|
11656
11706
|
Fi as ToastManifest,
|
|
11657
11707
|
Ni as ToastProvider,
|
|
11658
11708
|
xs as Toggle,
|
|
@@ -11675,8 +11725,8 @@ export {
|
|
|
11675
11725
|
qs as deriveDarkFromLight,
|
|
11676
11726
|
Bs as deriveTokens,
|
|
11677
11727
|
Ds as elevatedShadow,
|
|
11678
|
-
|
|
11679
|
-
|
|
11728
|
+
Ls as emeraldPalette,
|
|
11729
|
+
Ps as enterprisePreset,
|
|
11680
11730
|
Rs as flatShadow,
|
|
11681
11731
|
sn as getAccentFg,
|
|
11682
11732
|
$s as getContrastText,
|