lucent-ui 0.20.0 → 0.21.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 +37 -37
- package/dist/index.d.ts +19 -0
- package/dist/index.js +826 -715
- package/dist-cli/cli/entry.js +0 -0
- package/dist-cli/cli/index.js +0 -0
- package/dist-server/server/index.js +0 -0
- package/dist-server/src/components/atoms/Progress/Progress.manifest.js +33 -0
- package/dist-server/src/manifest/validate.test.js +28 -0
- package/package.json +15 -13
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as y, jsx as n, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as pe, useState as z, useRef as V, useEffect as X, useCallback as ee, useContext as fe, createContext as ye, useLayoutEffect as se, useId as
|
|
2
|
+
import { forwardRef as pe, useState as z, useRef as V, useEffect as X, useCallback as ee, useContext as fe, createContext as ye, useLayoutEffect as se, useId as be } from "react";
|
|
3
3
|
import { createPortal as de } from "react-dom";
|
|
4
4
|
const _t = {
|
|
5
5
|
primary: {
|
|
@@ -45,12 +45,12 @@ const _t = {
|
|
|
45
45
|
lg: { height: "calc(var(--lucent-space-12) * 0.5 + 26px)", padding: "0 var(--lucent-space-5)", fontSize: "var(--lucent-font-size-lg)" }
|
|
46
46
|
}, Ee = pe(
|
|
47
47
|
({ variant: e = "primary", size: t = "md", loading: r = !1, fullWidth: o = !1, spread: a = !1, leftIcon: i, rightIcon: l, chevron: s = !1, disableHoverStyles: c = !1, bordered: d = !0, children: u, disabled: f, style: h, ...m }, T) => {
|
|
48
|
-
const
|
|
48
|
+
const b = f ?? r;
|
|
49
49
|
return /* @__PURE__ */ y(
|
|
50
50
|
"button",
|
|
51
51
|
{
|
|
52
52
|
ref: T,
|
|
53
|
-
disabled:
|
|
53
|
+
disabled: b,
|
|
54
54
|
"aria-busy": r,
|
|
55
55
|
style: {
|
|
56
56
|
display: "inline-flex",
|
|
@@ -62,7 +62,7 @@ const _t = {
|
|
|
62
62
|
lineHeight: 1,
|
|
63
63
|
letterSpacing: "0.01em",
|
|
64
64
|
borderRadius: "var(--lucent-radius-lg)",
|
|
65
|
-
cursor:
|
|
65
|
+
cursor: b ? "not-allowed" : "pointer",
|
|
66
66
|
width: o ? "100%" : void 0,
|
|
67
67
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default), transform 80ms var(--lucent-easing-default)",
|
|
68
68
|
whiteSpace: "nowrap",
|
|
@@ -72,7 +72,7 @@ const _t = {
|
|
|
72
72
|
...Yt[t],
|
|
73
73
|
..._t[e],
|
|
74
74
|
...h,
|
|
75
|
-
...
|
|
75
|
+
...b && {
|
|
76
76
|
background: "color-mix(in srgb, var(--lucent-surface-secondary) 70%, var(--lucent-border-default))",
|
|
77
77
|
color: "color-mix(in srgb, var(--lucent-text-disabled) 50%, var(--lucent-border-default))",
|
|
78
78
|
borderColor: "transparent"
|
|
@@ -81,32 +81,32 @@ const _t = {
|
|
|
81
81
|
...d === !1 && { border: "none" }
|
|
82
82
|
},
|
|
83
83
|
onMouseEnter: (p) => {
|
|
84
|
-
var
|
|
85
|
-
!
|
|
84
|
+
var v;
|
|
85
|
+
!b && !c && Xt(p.currentTarget, e, d), (v = m.onMouseEnter) == null || v.call(m, p);
|
|
86
86
|
},
|
|
87
87
|
onMouseLeave: (p) => {
|
|
88
|
-
var
|
|
89
|
-
!
|
|
88
|
+
var v;
|
|
89
|
+
!b && !c && Jt(p.currentTarget, e, d), (v = m.onMouseLeave) == null || v.call(m, p);
|
|
90
90
|
},
|
|
91
91
|
onMouseDown: (p) => {
|
|
92
|
-
var
|
|
93
|
-
if (!
|
|
92
|
+
var v;
|
|
93
|
+
if (!b) {
|
|
94
94
|
const x = e === "danger" || e === "danger-outline" || e === "danger-ghost" ? "var(--lucent-danger-default)" : "var(--lucent-accent-default)";
|
|
95
95
|
p.currentTarget.style.transform = "translateY(1px)", p.currentTarget.style.boxShadow = `0 0 0 2px var(--lucent-surface), 0 0 0 4px ${x}`, p.currentTarget.dataset.pressed = "1";
|
|
96
96
|
}
|
|
97
|
-
(
|
|
97
|
+
(v = m.onMouseDown) == null || v.call(m, p);
|
|
98
98
|
},
|
|
99
99
|
onMouseUp: (p) => {
|
|
100
|
-
var
|
|
101
|
-
p.currentTarget.style.transform = "", p.currentTarget.style.boxShadow = "", delete p.currentTarget.dataset.pressed, (
|
|
100
|
+
var v;
|
|
101
|
+
p.currentTarget.style.transform = "", p.currentTarget.style.boxShadow = "", delete p.currentTarget.dataset.pressed, (v = m.onMouseUp) == null || v.call(m, p);
|
|
102
102
|
},
|
|
103
103
|
onFocus: (p) => {
|
|
104
|
-
var
|
|
105
|
-
p.currentTarget.dataset.pressed || (p.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)"), (
|
|
104
|
+
var v;
|
|
105
|
+
p.currentTarget.dataset.pressed || (p.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)"), (v = m.onFocus) == null || v.call(m, p);
|
|
106
106
|
},
|
|
107
107
|
onBlur: (p) => {
|
|
108
|
-
var
|
|
109
|
-
p.currentTarget.style.boxShadow = "", (
|
|
108
|
+
var v;
|
|
109
|
+
p.currentTarget.style.boxShadow = "", (v = m.onBlur) == null || v.call(m, p);
|
|
110
110
|
},
|
|
111
111
|
...m,
|
|
112
112
|
children: [
|
|
@@ -146,7 +146,7 @@ function en() {
|
|
|
146
146
|
/* @__PURE__ */ n("path", { d: "M12 2a10 10 0 0 1 10 10" })
|
|
147
147
|
] });
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const Qo = {
|
|
150
150
|
id: "button",
|
|
151
151
|
name: "Button",
|
|
152
152
|
tier: "atom",
|
|
@@ -332,7 +332,7 @@ const Xo = {
|
|
|
332
332
|
style: d,
|
|
333
333
|
...u
|
|
334
334
|
}, f) => {
|
|
335
|
-
const h = c ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`, m = !!o, T = !!u.disabled, [
|
|
335
|
+
const h = c ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`, m = !!o, T = !!u.disabled, [b, p] = z(!1), [v, k] = z(!1), x = T ? "transparent" : m ? "var(--lucent-danger-default)" : b ? "var(--lucent-focus-ring)" : v ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", M = b ? `0 0 0 3px ${m ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", S = {
|
|
336
336
|
display: "flex",
|
|
337
337
|
alignItems: "center",
|
|
338
338
|
color: T ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
|
|
@@ -462,7 +462,7 @@ const Xo = {
|
|
|
462
462
|
}
|
|
463
463
|
);
|
|
464
464
|
ce.displayName = "Input";
|
|
465
|
-
const
|
|
465
|
+
const ei = {
|
|
466
466
|
id: "input",
|
|
467
467
|
name: "Input",
|
|
468
468
|
tier: "atom",
|
|
@@ -511,13 +511,13 @@ const Jo = {
|
|
|
511
511
|
lg: "var(--lucent-space-4)"
|
|
512
512
|
}, on = pe(
|
|
513
513
|
({ label: e, helperText: t, errorText: r, autoResize: o = !1, maxLength: a, showCount: i = !1, size: l = "md", id: s, value: c, onChange: d, disabled: u, style: f, ...h }, m) => {
|
|
514
|
-
const T = V(null),
|
|
514
|
+
const T = V(null), b = m ?? T, p = s ?? `lucent-textarea-${Math.random().toString(36).slice(2, 7)}`, v = !!r, k = !!u, x = typeof c == "string" ? c.length : 0;
|
|
515
515
|
X(() => {
|
|
516
516
|
if (!o) return;
|
|
517
|
-
const S =
|
|
517
|
+
const S = b.current;
|
|
518
518
|
S && (S.style.height = "auto", S.style.height = `${S.scrollHeight}px`);
|
|
519
|
-
}, [c, o,
|
|
520
|
-
const M = k ? "transparent" :
|
|
519
|
+
}, [c, o, b]);
|
|
520
|
+
const M = k ? "transparent" : v ? "var(--lucent-danger-default)" : "var(--lucent-border-default)";
|
|
521
521
|
return /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%" }, children: [
|
|
522
522
|
e && /* @__PURE__ */ n("label", { htmlFor: p, style: {
|
|
523
523
|
fontSize: an[l],
|
|
@@ -528,14 +528,14 @@ const Jo = {
|
|
|
528
528
|
/* @__PURE__ */ n(
|
|
529
529
|
"textarea",
|
|
530
530
|
{
|
|
531
|
-
ref:
|
|
531
|
+
ref: b,
|
|
532
532
|
id: p,
|
|
533
533
|
maxLength: a,
|
|
534
534
|
value: c,
|
|
535
535
|
onChange: d,
|
|
536
536
|
disabled: u,
|
|
537
|
-
"aria-invalid":
|
|
538
|
-
"aria-describedby":
|
|
537
|
+
"aria-invalid": v,
|
|
538
|
+
"aria-describedby": v ? `${p}-error` : t ? `${p}-helper` : void 0,
|
|
539
539
|
style: {
|
|
540
540
|
width: "100%",
|
|
541
541
|
minHeight: "100px",
|
|
@@ -559,27 +559,27 @@ const Jo = {
|
|
|
559
559
|
},
|
|
560
560
|
onMouseEnter: (S) => {
|
|
561
561
|
var A;
|
|
562
|
-
!k && S.currentTarget !== document.activeElement && (S.currentTarget.style.borderColor =
|
|
562
|
+
!k && S.currentTarget !== document.activeElement && (S.currentTarget.style.borderColor = v ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (A = h.onMouseEnter) == null || A.call(h, S);
|
|
563
563
|
},
|
|
564
564
|
onMouseLeave: (S) => {
|
|
565
565
|
var A;
|
|
566
|
-
!k && S.currentTarget !== document.activeElement && (S.currentTarget.style.borderColor =
|
|
566
|
+
!k && S.currentTarget !== document.activeElement && (S.currentTarget.style.borderColor = v ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (A = h.onMouseLeave) == null || A.call(h, S);
|
|
567
567
|
},
|
|
568
568
|
onFocus: (S) => {
|
|
569
569
|
var A;
|
|
570
|
-
k || (S.currentTarget.style.borderColor =
|
|
570
|
+
k || (S.currentTarget.style.borderColor = v ? "var(--lucent-danger-default)" : "var(--lucent-focus-ring)", S.currentTarget.style.boxShadow = `0 0 0 3px ${v ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (A = h.onFocus) == null || A.call(h, S));
|
|
571
571
|
},
|
|
572
572
|
onBlur: (S) => {
|
|
573
573
|
var A;
|
|
574
|
-
k || (S.currentTarget.style.borderColor =
|
|
574
|
+
k || (S.currentTarget.style.borderColor = v ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", S.currentTarget.style.boxShadow = "none", (A = h.onBlur) == null || A.call(h, S));
|
|
575
575
|
},
|
|
576
576
|
...h
|
|
577
577
|
}
|
|
578
578
|
),
|
|
579
579
|
/* @__PURE__ */ y("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
|
|
580
580
|
/* @__PURE__ */ y("div", { children: [
|
|
581
|
-
|
|
582
|
-
!
|
|
581
|
+
v && /* @__PURE__ */ n("span", { id: `${p}-error`, role: "alert", style: { fontSize: "var(--lucent-font-size-sm)", color: "var(--lucent-danger-text)", fontFamily: "var(--lucent-font-family-base)" }, children: r }),
|
|
582
|
+
!v && t && /* @__PURE__ */ n("span", { id: `${p}-helper`, style: { fontSize: "var(--lucent-font-size-sm)", color: "var(--lucent-text-secondary)", fontFamily: "var(--lucent-font-family-base)" }, children: t })
|
|
583
583
|
] }),
|
|
584
584
|
(i || a) && /* @__PURE__ */ y("span", { style: {
|
|
585
585
|
fontSize: "var(--lucent-font-size-xs)",
|
|
@@ -596,7 +596,7 @@ const Jo = {
|
|
|
596
596
|
}
|
|
597
597
|
);
|
|
598
598
|
on.displayName = "Textarea";
|
|
599
|
-
const
|
|
599
|
+
const ti = {
|
|
600
600
|
id: "textarea",
|
|
601
601
|
name: "Textarea",
|
|
602
602
|
tier: "atom",
|
|
@@ -640,7 +640,7 @@ const Zo = {
|
|
|
640
640
|
sm: { fontSize: "var(--lucent-font-size-xs)", padding: "0 var(--lucent-space-2)", height: "18px" },
|
|
641
641
|
md: { fontSize: "var(--lucent-font-size-sm)", padding: "0 var(--lucent-space-2)", height: "22px" }
|
|
642
642
|
};
|
|
643
|
-
function
|
|
643
|
+
function ni({ variant: e = "neutral", size: t = "md", dot: r = !1, children: o, style: a }) {
|
|
644
644
|
const i = sn[e], l = ln[t];
|
|
645
645
|
return /* @__PURE__ */ y("span", { style: {
|
|
646
646
|
display: "inline-flex",
|
|
@@ -670,7 +670,7 @@ function Qo({ variant: e = "neutral", size: t = "md", dot: r = !1, children: o,
|
|
|
670
670
|
o
|
|
671
671
|
] });
|
|
672
672
|
}
|
|
673
|
-
const
|
|
673
|
+
const ai = {
|
|
674
674
|
id: "badge",
|
|
675
675
|
name: "Badge",
|
|
676
676
|
tier: "atom",
|
|
@@ -780,7 +780,7 @@ function un({
|
|
|
780
780
|
disabled: d = !1,
|
|
781
781
|
style: u
|
|
782
782
|
}) {
|
|
783
|
-
const f = cn[t], h = dn[r], [m, T] = z(!1),
|
|
783
|
+
const f = cn[t], h = dn[r], [m, T] = z(!1), b = !d && (o || a), p = {
|
|
784
784
|
display: "inline-flex",
|
|
785
785
|
alignItems: "center",
|
|
786
786
|
gap: h.gap,
|
|
@@ -791,25 +791,25 @@ function un({
|
|
|
791
791
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
792
792
|
lineHeight: 1,
|
|
793
793
|
borderRadius: "var(--lucent-radius-lg)",
|
|
794
|
-
background: m &&
|
|
794
|
+
background: m && b ? f.hoverBg : f.bg,
|
|
795
795
|
color: f.color,
|
|
796
|
-
border: c ? "1px solid transparent" : `1px solid ${m &&
|
|
796
|
+
border: c ? "1px solid transparent" : `1px solid ${m && b ? f.hoverBorder : f.border}`,
|
|
797
797
|
whiteSpace: "nowrap",
|
|
798
798
|
boxSizing: "border-box",
|
|
799
799
|
opacity: d ? 0.5 : 1,
|
|
800
|
-
transform: m &&
|
|
801
|
-
boxShadow: m &&
|
|
800
|
+
transform: m && b ? "translateY(-1px)" : "none",
|
|
801
|
+
boxShadow: m && b ? `0 2px 4px ${f.hoverBorder}22` : "none",
|
|
802
802
|
transition: [
|
|
803
803
|
"transform var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
804
804
|
"box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
805
805
|
"border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
806
806
|
"background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
807
807
|
].join(", "),
|
|
808
|
-
cursor:
|
|
808
|
+
cursor: b ? "pointer" : "default",
|
|
809
809
|
// Reset button styles when onClick
|
|
810
810
|
...a ? { outline: "none" } : {},
|
|
811
811
|
...u
|
|
812
|
-
},
|
|
812
|
+
}, v = /* @__PURE__ */ y(oe, { children: [
|
|
813
813
|
l && /* @__PURE__ */ n("span", { style: {
|
|
814
814
|
width: h.dotSize + 2,
|
|
815
815
|
height: h.dotSize + 2,
|
|
@@ -875,11 +875,11 @@ function un({
|
|
|
875
875
|
disabled: d,
|
|
876
876
|
style: p,
|
|
877
877
|
...k,
|
|
878
|
-
children:
|
|
878
|
+
children: v
|
|
879
879
|
}
|
|
880
|
-
) : /* @__PURE__ */ n("span", { style: p, ...k, children:
|
|
880
|
+
) : /* @__PURE__ */ n("span", { style: p, ...k, children: v });
|
|
881
881
|
}
|
|
882
|
-
const
|
|
882
|
+
const ri = {
|
|
883
883
|
id: "chip",
|
|
884
884
|
name: "Chip",
|
|
885
885
|
tier: "atom",
|
|
@@ -934,7 +934,7 @@ function hn(e, t) {
|
|
|
934
934
|
const r = e.trim().split(/\s+/);
|
|
935
935
|
return r.length === 1 ? (((o = r[0]) == null ? void 0 : o[0]) ?? "").toUpperCase() : ((((a = r[0]) == null ? void 0 : a[0]) ?? "") + (((i = r[r.length - 1]) == null ? void 0 : i[0]) ?? "")).toUpperCase();
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function oi({ src: e, alt: t, size: r = "md", initials: o, style: a, ...i }) {
|
|
938
938
|
const l = pn[r], s = hn(t, o), c = {
|
|
939
939
|
width: l,
|
|
940
940
|
height: l,
|
|
@@ -975,7 +975,7 @@ function ni({ src: e, alt: t, size: r = "md", initials: o, style: a, ...i }) {
|
|
|
975
975
|
}
|
|
976
976
|
);
|
|
977
977
|
}
|
|
978
|
-
const
|
|
978
|
+
const ii = {
|
|
979
979
|
id: "avatar",
|
|
980
980
|
name: "Avatar",
|
|
981
981
|
tier: "atom",
|
|
@@ -1012,7 +1012,7 @@ const ai = {
|
|
|
1012
1012
|
md: 2,
|
|
1013
1013
|
lg: 2
|
|
1014
1014
|
};
|
|
1015
|
-
function
|
|
1015
|
+
function vn({ size: e = "md", label: t = "Loading…", color: r }) {
|
|
1016
1016
|
const o = mn[e], a = gn[e];
|
|
1017
1017
|
return /* @__PURE__ */ y("span", { role: "status", "aria-label": t, style: { display: "inline-flex", alignItems: "center", justifyContent: "center" }, children: [
|
|
1018
1018
|
/* @__PURE__ */ y(
|
|
@@ -1042,7 +1042,7 @@ function bn({ size: e = "md", label: t = "Loading…", color: r }) {
|
|
|
1042
1042
|
/* @__PURE__ */ n("span", { style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0,0,0,0)", whiteSpace: "nowrap" }, children: t })
|
|
1043
1043
|
] });
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1045
|
+
const si = {
|
|
1046
1046
|
id: "spinner",
|
|
1047
1047
|
name: "Spinner",
|
|
1048
1048
|
tier: "atom",
|
|
@@ -1067,7 +1067,7 @@ const ri = {
|
|
|
1067
1067
|
notes: 'The visible SVG is aria-hidden. The label is conveyed via a visually-hidden span inside role="status".'
|
|
1068
1068
|
}
|
|
1069
1069
|
};
|
|
1070
|
-
function
|
|
1070
|
+
function li({ orientation: e = "horizontal", label: t, spacing: r = "var(--lucent-space-4)", style: o }) {
|
|
1071
1071
|
return e === "vertical" ? /* @__PURE__ */ n(
|
|
1072
1072
|
"span",
|
|
1073
1073
|
{
|
|
@@ -1122,7 +1122,7 @@ function oi({ orientation: e = "horizontal", label: t, spacing: r = "var(--lucen
|
|
|
1122
1122
|
}
|
|
1123
1123
|
);
|
|
1124
1124
|
}
|
|
1125
|
-
const
|
|
1125
|
+
const ci = {
|
|
1126
1126
|
id: "divider",
|
|
1127
1127
|
name: "Divider",
|
|
1128
1128
|
tier: "atom",
|
|
@@ -1145,7 +1145,7 @@ const ii = {
|
|
|
1145
1145
|
role: "separator",
|
|
1146
1146
|
ariaAttributes: ["aria-orientation", "aria-label"]
|
|
1147
1147
|
}
|
|
1148
|
-
},
|
|
1148
|
+
}, bn = { sm: 14, md: 16, lg: 20 }, yn = { sm: "calc(var(--lucent-space-8) * 0.5 + 16px)", md: "calc(var(--lucent-space-10) * 0.5 + 20px)", lg: "calc(var(--lucent-space-12) * 0.5 + 24px)" }, xn = `
|
|
1149
1149
|
@keyframes lucent-cb-pop {
|
|
1150
1150
|
0% { transform: scale(1); }
|
|
1151
1151
|
35% { transform: scale(0.82); }
|
|
@@ -1172,7 +1172,7 @@ const ii = {
|
|
|
1172
1172
|
style: u,
|
|
1173
1173
|
...f
|
|
1174
1174
|
}, h) => {
|
|
1175
|
-
const m = V(null), T = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`,
|
|
1175
|
+
const m = V(null), T = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, b = bn[t], p = i !== void 0, [v, k] = z(l ?? !1), [x, M] = z(!1), S = p ? !!i : v, A = V(S), [R, C] = z(0);
|
|
1176
1176
|
X(() => {
|
|
1177
1177
|
!s && A.current !== S && (A.current = S, C((L) => L + 1));
|
|
1178
1178
|
}, [S, s]);
|
|
@@ -1188,8 +1188,8 @@ const ii = {
|
|
|
1188
1188
|
const $ = (L) => {
|
|
1189
1189
|
p || k(L.target.checked), d == null || d(L);
|
|
1190
1190
|
}, W = s ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)", w = {
|
|
1191
|
-
width:
|
|
1192
|
-
height:
|
|
1191
|
+
width: b,
|
|
1192
|
+
height: b,
|
|
1193
1193
|
// fixed corner so global radius overrides (e.g. via customizer) don't
|
|
1194
1194
|
// turn checkboxes into circles. the design spec keeps them slightly
|
|
1195
1195
|
// rounded regardless of theming.
|
|
@@ -1204,7 +1204,7 @@ const ii = {
|
|
|
1204
1204
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1205
1205
|
// Re-key forces the animation to restart on every toggle.
|
|
1206
1206
|
animation: R > 0 ? "lucent-cb-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
1207
|
-
},
|
|
1207
|
+
}, F = /* @__PURE__ */ y(
|
|
1208
1208
|
"label",
|
|
1209
1209
|
{
|
|
1210
1210
|
style: {
|
|
@@ -1225,7 +1225,7 @@ const ii = {
|
|
|
1225
1225
|
ref: D,
|
|
1226
1226
|
type: "checkbox",
|
|
1227
1227
|
id: T,
|
|
1228
|
-
checked: p ? i :
|
|
1228
|
+
checked: p ? i : v,
|
|
1229
1229
|
disabled: s,
|
|
1230
1230
|
onChange: $,
|
|
1231
1231
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
@@ -1236,8 +1236,8 @@ const ii = {
|
|
|
1236
1236
|
S && !r && /* @__PURE__ */ n(
|
|
1237
1237
|
"svg",
|
|
1238
1238
|
{
|
|
1239
|
-
width:
|
|
1240
|
-
height:
|
|
1239
|
+
width: b - 4,
|
|
1240
|
+
height: b - 4,
|
|
1241
1241
|
viewBox: "0 0 10 10",
|
|
1242
1242
|
fill: "none",
|
|
1243
1243
|
style: { animation: "lucent-cb-mark 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" },
|
|
@@ -1247,8 +1247,8 @@ const ii = {
|
|
|
1247
1247
|
r && /* @__PURE__ */ n(
|
|
1248
1248
|
"svg",
|
|
1249
1249
|
{
|
|
1250
|
-
width:
|
|
1251
|
-
height:
|
|
1250
|
+
width: b - 4,
|
|
1251
|
+
height: b - 4,
|
|
1252
1252
|
viewBox: "0 0 10 10",
|
|
1253
1253
|
fill: "none",
|
|
1254
1254
|
style: { animation: "lucent-cb-mark 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" },
|
|
@@ -1295,14 +1295,14 @@ const ii = {
|
|
|
1295
1295
|
var N;
|
|
1296
1296
|
s || L.target === L.currentTarget && ((N = m.current) == null || N.click());
|
|
1297
1297
|
},
|
|
1298
|
-
children:
|
|
1298
|
+
children: F
|
|
1299
1299
|
}
|
|
1300
|
-
) :
|
|
1300
|
+
) : F
|
|
1301
1301
|
] });
|
|
1302
1302
|
}
|
|
1303
1303
|
);
|
|
1304
1304
|
yt.displayName = "Checkbox";
|
|
1305
|
-
const
|
|
1305
|
+
const di = {
|
|
1306
1306
|
id: "checkbox",
|
|
1307
1307
|
name: "Checkbox",
|
|
1308
1308
|
tier: "atom",
|
|
@@ -1428,11 +1428,11 @@ const Sn = { sm: 14, md: 16, lg: 20 }, Tn = { sm: "calc(var(--lucent-space-8) *
|
|
|
1428
1428
|
md: "var(--lucent-font-size-md)",
|
|
1429
1429
|
lg: "var(--lucent-font-size-md)"
|
|
1430
1430
|
};
|
|
1431
|
-
function
|
|
1432
|
-
const f = fe(xt), h = l ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, m = Sn[r], [T,
|
|
1431
|
+
function ui({ value: e, label: t, size: r = "md", contained: o = !1, helperText: a, disabled: i, id: l, onChange: s, checked: c, style: d, ...u }) {
|
|
1432
|
+
const f = fe(xt), h = l ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, m = Sn[r], [T, b] = z(!1), p = i ?? (f == null ? void 0 : f.disabled) ?? !1, v = f ? f.value === e : !!c, k = V(v), [x, M] = z(0);
|
|
1433
1433
|
X(() => {
|
|
1434
|
-
!p && k.current !==
|
|
1435
|
-
}, [
|
|
1434
|
+
!p && k.current !== v && (k.current = v, M((D) => D + 1));
|
|
1435
|
+
}, [v, p]);
|
|
1436
1436
|
const S = (D) => {
|
|
1437
1437
|
f == null || f.onChange(e), s == null || s(D);
|
|
1438
1438
|
}, A = {
|
|
@@ -1440,14 +1440,14 @@ function li({ value: e, label: t, size: r = "md", contained: o = !1, helperText:
|
|
|
1440
1440
|
height: m / 2,
|
|
1441
1441
|
borderRadius: "50%",
|
|
1442
1442
|
background: p ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)",
|
|
1443
|
-
animation:
|
|
1444
|
-
opacity:
|
|
1443
|
+
animation: v ? "lucent-radio-dot 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0,
|
|
1444
|
+
opacity: v ? 1 : 0
|
|
1445
1445
|
}, R = {
|
|
1446
1446
|
width: m,
|
|
1447
1447
|
height: m,
|
|
1448
1448
|
borderRadius: "50%",
|
|
1449
|
-
border: `1.5px solid ${p ? "transparent" :
|
|
1450
|
-
background: p ? "var(--lucent-surface-secondary)" :
|
|
1449
|
+
border: `1.5px solid ${p ? "transparent" : v ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
|
|
1450
|
+
background: p ? "var(--lucent-surface-secondary)" : v ? "var(--lucent-accent-default)" : "var(--lucent-surface)",
|
|
1451
1451
|
display: "inline-flex",
|
|
1452
1452
|
alignItems: "center",
|
|
1453
1453
|
justifyContent: "center",
|
|
@@ -1476,7 +1476,7 @@ function li({ value: e, label: t, size: r = "md", contained: o = !1, helperText:
|
|
|
1476
1476
|
id: h,
|
|
1477
1477
|
value: e,
|
|
1478
1478
|
name: (f == null ? void 0 : f.name) ?? u.name,
|
|
1479
|
-
checked:
|
|
1479
|
+
checked: v,
|
|
1480
1480
|
disabled: p,
|
|
1481
1481
|
onChange: S,
|
|
1482
1482
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
@@ -1504,14 +1504,14 @@ function li({ value: e, label: t, size: r = "md", contained: o = !1, helperText:
|
|
|
1504
1504
|
"div",
|
|
1505
1505
|
{
|
|
1506
1506
|
onMouseEnter: () => {
|
|
1507
|
-
p ||
|
|
1507
|
+
p || b(!0);
|
|
1508
1508
|
},
|
|
1509
|
-
onMouseLeave: () =>
|
|
1509
|
+
onMouseLeave: () => b(!1),
|
|
1510
1510
|
style: {
|
|
1511
|
-
border: `1px solid ${
|
|
1511
|
+
border: `1px solid ${v && !p ? "var(--lucent-accent-default)" : T && !p ? "var(--lucent-border-strong)" : "var(--lucent-border-default)"}`,
|
|
1512
1512
|
borderRadius: "var(--lucent-radius-lg)",
|
|
1513
1513
|
...a ? { padding: "var(--lucent-space-3)" } : { minHeight: Tn[r], padding: "0 var(--lucent-space-3)", display: "flex", alignItems: "center" },
|
|
1514
|
-
background:
|
|
1514
|
+
background: v && !p ? "var(--lucent-accent-subtle)" : "var(--lucent-surface)",
|
|
1515
1515
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1516
1516
|
cursor: p ? "not-allowed" : "pointer",
|
|
1517
1517
|
...d
|
|
@@ -1527,7 +1527,7 @@ function li({ value: e, label: t, size: r = "md", contained: o = !1, helperText:
|
|
|
1527
1527
|
) : C
|
|
1528
1528
|
] });
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function pi({
|
|
1531
1531
|
defaultValue: e = "",
|
|
1532
1532
|
onChange: t,
|
|
1533
1533
|
...r
|
|
@@ -1544,7 +1544,7 @@ function ci({
|
|
|
1544
1544
|
}
|
|
1545
1545
|
);
|
|
1546
1546
|
}
|
|
1547
|
-
const
|
|
1547
|
+
const fi = {
|
|
1548
1548
|
id: "radio",
|
|
1549
1549
|
name: "Radio",
|
|
1550
1550
|
tier: "atom",
|
|
@@ -1654,7 +1654,7 @@ const di = {
|
|
|
1654
1654
|
100% { transform: scale(1); }
|
|
1655
1655
|
}
|
|
1656
1656
|
`;
|
|
1657
|
-
function
|
|
1657
|
+
function hi({
|
|
1658
1658
|
label: e,
|
|
1659
1659
|
size: t = "md",
|
|
1660
1660
|
checked: r,
|
|
@@ -1668,7 +1668,7 @@ function ui({
|
|
|
1668
1668
|
style: u,
|
|
1669
1669
|
...f
|
|
1670
1670
|
}) {
|
|
1671
|
-
const h = c ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, m = r !== void 0, [T,
|
|
1671
|
+
const h = c ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, m = r !== void 0, [T, b] = z(o ?? !1), p = m ? !!r : T, [v, k] = z(!1), x = V(p), [M, S] = z(0), [A, R] = z(!1);
|
|
1672
1672
|
X(() => {
|
|
1673
1673
|
if (!s && x.current !== p) {
|
|
1674
1674
|
x.current = p, S((U) => U + 1), R(!0);
|
|
@@ -1677,8 +1677,8 @@ function ui({
|
|
|
1677
1677
|
}
|
|
1678
1678
|
}, [p, s]);
|
|
1679
1679
|
const { track: [C, D], thumb: $ } = Mn[t], W = p ? C - $ - 2 : 2, w = (N) => {
|
|
1680
|
-
m ||
|
|
1681
|
-
},
|
|
1680
|
+
m || b(N.target.checked), d == null || d(N);
|
|
1681
|
+
}, F = /* @__PURE__ */ y(
|
|
1682
1682
|
"span",
|
|
1683
1683
|
{
|
|
1684
1684
|
"aria-hidden": !0,
|
|
@@ -1752,7 +1752,7 @@ function ui({
|
|
|
1752
1752
|
...f
|
|
1753
1753
|
}
|
|
1754
1754
|
),
|
|
1755
|
-
l === "left" &&
|
|
1755
|
+
l === "left" && F,
|
|
1756
1756
|
e || i ? /* @__PURE__ */ y("span", { style: { display: "flex", flexDirection: "column", flex: l === "right" ? 1 : void 0 }, children: [
|
|
1757
1757
|
e && /* @__PURE__ */ n("span", { style: {
|
|
1758
1758
|
fontWeight: i ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1764,7 +1764,7 @@ function ui({
|
|
|
1764
1764
|
marginTop: "2px"
|
|
1765
1765
|
}, children: i })
|
|
1766
1766
|
] }) : null,
|
|
1767
|
-
l === "right" &&
|
|
1767
|
+
l === "right" && F
|
|
1768
1768
|
]
|
|
1769
1769
|
}
|
|
1770
1770
|
);
|
|
@@ -1778,7 +1778,7 @@ function ui({
|
|
|
1778
1778
|
},
|
|
1779
1779
|
onMouseLeave: () => k(!1),
|
|
1780
1780
|
style: {
|
|
1781
|
-
border: `1px solid ${p && !s ? "var(--lucent-accent-default)" :
|
|
1781
|
+
border: `1px solid ${p && !s ? "var(--lucent-accent-default)" : v && !s ? "var(--lucent-border-strong)" : "var(--lucent-border-default)"}`,
|
|
1782
1782
|
borderRadius: "var(--lucent-radius-lg)",
|
|
1783
1783
|
...i ? { padding: "var(--lucent-space-3)" } : { minHeight: In[t], padding: "0 var(--lucent-space-3)", display: "flex", alignItems: "center" },
|
|
1784
1784
|
background: p && !s ? "var(--lucent-accent-subtle)" : "var(--lucent-surface)",
|
|
@@ -1797,7 +1797,7 @@ function ui({
|
|
|
1797
1797
|
) : L
|
|
1798
1798
|
] });
|
|
1799
1799
|
}
|
|
1800
|
-
const
|
|
1800
|
+
const mi = {
|
|
1801
1801
|
id: "toggle",
|
|
1802
1802
|
name: "Toggle",
|
|
1803
1803
|
tier: "atom",
|
|
@@ -1902,7 +1902,7 @@ const pi = {
|
|
|
1902
1902
|
lg: "var(--lucent-space-3)"
|
|
1903
1903
|
}, wt = pe(
|
|
1904
1904
|
({ options: e, size: t = "md", label: r, helperText: o, errorText: a, placeholder: i, disabled: l, id: s, style: c, ...d }, u) => {
|
|
1905
|
-
const f = s ?? `lucent-select-${Math.random().toString(36).slice(2, 7)}`, h = !!a, m = !!l, [T,
|
|
1905
|
+
const f = s ?? `lucent-select-${Math.random().toString(36).slice(2, 7)}`, h = !!a, m = !!l, [T, b] = z(!1), [p, v] = z(!1), k = m ? "transparent" : h ? "var(--lucent-danger-default)" : T ? "var(--lucent-focus-ring)" : p ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", x = T ? `0 0 0 3px ${h ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
1906
1906
|
return /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...c }, children: [
|
|
1907
1907
|
r && /* @__PURE__ */ n(
|
|
1908
1908
|
"label",
|
|
@@ -1936,9 +1936,9 @@ const pi = {
|
|
|
1936
1936
|
].join(", ")
|
|
1937
1937
|
},
|
|
1938
1938
|
onMouseEnter: () => {
|
|
1939
|
-
m ||
|
|
1939
|
+
m || v(!0);
|
|
1940
1940
|
},
|
|
1941
|
-
onMouseLeave: () =>
|
|
1941
|
+
onMouseLeave: () => v(!1),
|
|
1942
1942
|
children: [
|
|
1943
1943
|
/* @__PURE__ */ y(
|
|
1944
1944
|
"select",
|
|
@@ -1965,14 +1965,14 @@ const pi = {
|
|
|
1965
1965
|
},
|
|
1966
1966
|
onFocus: (M) => {
|
|
1967
1967
|
var S;
|
|
1968
|
-
m ||
|
|
1968
|
+
m || b(!0), (S = d.onFocus) == null || S.call(d, M);
|
|
1969
1969
|
},
|
|
1970
1970
|
onBlur: (M) => {
|
|
1971
1971
|
var S;
|
|
1972
|
-
|
|
1972
|
+
b(!1), (S = d.onBlur) == null || S.call(d, M);
|
|
1973
1973
|
},
|
|
1974
1974
|
onMouseDown: () => {
|
|
1975
|
-
m ||
|
|
1975
|
+
m || b(!0);
|
|
1976
1976
|
},
|
|
1977
1977
|
...d,
|
|
1978
1978
|
children: [
|
|
@@ -2028,7 +2028,7 @@ const pi = {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
);
|
|
2030
2030
|
wt.displayName = "Select";
|
|
2031
|
-
const
|
|
2031
|
+
const gi = {
|
|
2032
2032
|
id: "select",
|
|
2033
2033
|
name: "Select",
|
|
2034
2034
|
tier: "atom",
|
|
@@ -2138,7 +2138,7 @@ const fi = {
|
|
|
2138
2138
|
md: { fontSize: "var(--lucent-font-size-sm)", height: "24px", padding: "0 var(--lucent-space-3)", iconSize: 12, gap: "var(--lucent-space-1)" },
|
|
2139
2139
|
lg: { fontSize: "var(--lucent-font-size-md)", height: "28px", padding: "0 var(--lucent-space-4)", iconSize: 14, gap: "var(--lucent-space-2)" }
|
|
2140
2140
|
};
|
|
2141
|
-
function
|
|
2141
|
+
function vi({ children: e, variant: t = "neutral", size: r = "md", onDismiss: o, disabled: a }) {
|
|
2142
2142
|
const i = En[t], l = qn[r], [s, c] = z(!1), d = !a && o;
|
|
2143
2143
|
return /* @__PURE__ */ y(
|
|
2144
2144
|
"span",
|
|
@@ -2208,7 +2208,7 @@ function hi({ children: e, variant: t = "neutral", size: r = "md", onDismiss: o,
|
|
|
2208
2208
|
}
|
|
2209
2209
|
);
|
|
2210
2210
|
}
|
|
2211
|
-
const
|
|
2211
|
+
const bi = {
|
|
2212
2212
|
id: "tag",
|
|
2213
2213
|
name: "Tag",
|
|
2214
2214
|
tier: "atom",
|
|
@@ -2300,7 +2300,7 @@ const mi = {
|
|
|
2300
2300
|
borderColor: "transparent var(--lucent-text-primary) transparent transparent"
|
|
2301
2301
|
}
|
|
2302
2302
|
};
|
|
2303
|
-
function
|
|
2303
|
+
function yi({ content: e, children: t, placement: r = "top", delay: o = 300 }) {
|
|
2304
2304
|
const [a, i] = z(!1), l = V(null), s = () => {
|
|
2305
2305
|
l.current = setTimeout(() => i(!0), o);
|
|
2306
2306
|
}, c = () => {
|
|
@@ -2358,7 +2358,7 @@ function gi({ content: e, children: t, placement: r = "top", delay: o = 300 }) {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
) : /* @__PURE__ */ n(oe, { children: t });
|
|
2360
2360
|
}
|
|
2361
|
-
const
|
|
2361
|
+
const xi = {
|
|
2362
2362
|
id: "tooltip",
|
|
2363
2363
|
name: "Tooltip",
|
|
2364
2364
|
tier: "atom",
|
|
@@ -2414,7 +2414,7 @@ const bi = {
|
|
|
2414
2414
|
lg: 20,
|
|
2415
2415
|
xl: 24
|
|
2416
2416
|
};
|
|
2417
|
-
function
|
|
2417
|
+
function wi({ children: e, size: t = "md", label: r, color: o, style: a }) {
|
|
2418
2418
|
const i = Ln[t];
|
|
2419
2419
|
return /* @__PURE__ */ n(
|
|
2420
2420
|
"span",
|
|
@@ -2436,7 +2436,7 @@ function vi({ children: e, size: t = "md", label: r, color: o, style: a }) {
|
|
|
2436
2436
|
}
|
|
2437
2437
|
);
|
|
2438
2438
|
}
|
|
2439
|
-
const
|
|
2439
|
+
const ki = {
|
|
2440
2440
|
id: "icon",
|
|
2441
2441
|
name: "Icon",
|
|
2442
2442
|
tier: "atom",
|
|
@@ -2484,7 +2484,7 @@ const yi = {
|
|
|
2484
2484
|
ariaAttributes: ["aria-label", "aria-hidden"],
|
|
2485
2485
|
notes: 'aria-hidden="true" is applied automatically when no label is given, hiding the icon from screen readers.'
|
|
2486
2486
|
}
|
|
2487
|
-
},
|
|
2487
|
+
}, Pn = {
|
|
2488
2488
|
primary: "var(--lucent-text-primary)",
|
|
2489
2489
|
secondary: "var(--lucent-text-secondary)",
|
|
2490
2490
|
disabled: "var(--lucent-text-disabled)",
|
|
@@ -2494,7 +2494,7 @@ const yi = {
|
|
|
2494
2494
|
warning: "var(--lucent-warning-text)",
|
|
2495
2495
|
danger: "var(--lucent-danger-text)",
|
|
2496
2496
|
info: "var(--lucent-info-text)"
|
|
2497
|
-
},
|
|
2497
|
+
}, Fn = {
|
|
2498
2498
|
xs: "var(--lucent-font-size-xs)",
|
|
2499
2499
|
sm: "var(--lucent-font-size-sm)",
|
|
2500
2500
|
md: "var(--lucent-font-size-md)",
|
|
@@ -2530,9 +2530,9 @@ function _({
|
|
|
2530
2530
|
...u
|
|
2531
2531
|
}) {
|
|
2532
2532
|
const f = {
|
|
2533
|
-
fontSize:
|
|
2533
|
+
fontSize: Fn[t],
|
|
2534
2534
|
fontWeight: Nn[r],
|
|
2535
|
-
color:
|
|
2535
|
+
color: Pn[o],
|
|
2536
2536
|
textAlign: a,
|
|
2537
2537
|
lineHeight: $n[i],
|
|
2538
2538
|
fontFamily: Wn[l],
|
|
@@ -2546,7 +2546,7 @@ function _({
|
|
|
2546
2546
|
};
|
|
2547
2547
|
return /* @__PURE__ */ n(e, { style: f, ...u, children: c });
|
|
2548
2548
|
}
|
|
2549
|
-
const
|
|
2549
|
+
const Si = {
|
|
2550
2550
|
id: "text",
|
|
2551
2551
|
name: "Text",
|
|
2552
2552
|
tier: "atom",
|
|
@@ -2644,7 +2644,7 @@ const xi = {
|
|
|
2644
2644
|
notes: 'The rendered element determines the implicit ARIA role. Use heading elements (h1–h6) for document headings so screen readers can navigate the page structure. Use `as="label"` with `htmlFor` to associate labels with form controls. Decorative text needs no additional ARIA.'
|
|
2645
2645
|
}
|
|
2646
2646
|
};
|
|
2647
|
-
function
|
|
2647
|
+
function Ti({
|
|
2648
2648
|
children: e,
|
|
2649
2649
|
href: t,
|
|
2650
2650
|
isActive: r = !1,
|
|
@@ -2790,7 +2790,7 @@ const On = { sm: "3px", md: "4px", lg: "5px" }, Hn = { sm: "14px", md: "18px", l
|
|
|
2790
2790
|
cursor: not-allowed;
|
|
2791
2791
|
}
|
|
2792
2792
|
`;
|
|
2793
|
-
function
|
|
2793
|
+
function Ci({
|
|
2794
2794
|
label: e,
|
|
2795
2795
|
showValue: t = !1,
|
|
2796
2796
|
size: r = "md",
|
|
@@ -2805,9 +2805,9 @@ function ki({
|
|
|
2805
2805
|
style: f,
|
|
2806
2806
|
...h
|
|
2807
2807
|
}) {
|
|
2808
|
-
const m = d ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`, T = l !== void 0, [
|
|
2808
|
+
const m = d ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`, T = l !== void 0, [b, p] = z(
|
|
2809
2809
|
s ?? Math.round((o + a) / 2)
|
|
2810
|
-
),
|
|
2810
|
+
), v = T ? l : b, k = `${(v - o) / (a - o) * 100}%`, x = (M) => {
|
|
2811
2811
|
T || p(Number(M.target.value)), u == null || u(M);
|
|
2812
2812
|
};
|
|
2813
2813
|
return /* @__PURE__ */ y(oe, { children: [
|
|
@@ -2854,7 +2854,7 @@ function ki({
|
|
|
2854
2854
|
color: c ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
|
|
2855
2855
|
fontVariantNumeric: "tabular-nums"
|
|
2856
2856
|
},
|
|
2857
|
-
children:
|
|
2857
|
+
children: v
|
|
2858
2858
|
}
|
|
2859
2859
|
)
|
|
2860
2860
|
]
|
|
@@ -2870,7 +2870,7 @@ function ki({
|
|
|
2870
2870
|
max: a,
|
|
2871
2871
|
step: i,
|
|
2872
2872
|
disabled: c,
|
|
2873
|
-
value: T ? l :
|
|
2873
|
+
value: T ? l : b,
|
|
2874
2874
|
onChange: x,
|
|
2875
2875
|
style: {
|
|
2876
2876
|
"--ls-track-h": On[r],
|
|
@@ -2885,7 +2885,7 @@ function ki({
|
|
|
2885
2885
|
)
|
|
2886
2886
|
] });
|
|
2887
2887
|
}
|
|
2888
|
-
const
|
|
2888
|
+
const Ii = {
|
|
2889
2889
|
id: "slider",
|
|
2890
2890
|
name: "Slider",
|
|
2891
2891
|
tier: "atom",
|
|
@@ -2991,7 +2991,7 @@ function Un() {
|
|
|
2991
2991
|
function Gn() {
|
|
2992
2992
|
return /* @__PURE__ */ n("svg", { width: 13, height: 13, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ n("path", { d: "M20 6L9 17l-5-5" }) });
|
|
2993
2993
|
}
|
|
2994
|
-
function
|
|
2994
|
+
function Mi({
|
|
2995
2995
|
code: e,
|
|
2996
2996
|
language: t,
|
|
2997
2997
|
tabs: r,
|
|
@@ -3000,13 +3000,13 @@ function Ti({
|
|
|
3000
3000
|
showCopyButton: i = !0,
|
|
3001
3001
|
style: l
|
|
3002
3002
|
}) {
|
|
3003
|
-
var
|
|
3004
|
-
const s = !!(r != null && r.length), [c, d] = z(0), [u, f] = z(!1), h = s ? ((
|
|
3003
|
+
var v, k;
|
|
3004
|
+
const s = !!(r != null && r.length), [c, d] = z(0), [u, f] = z(!1), h = s ? ((v = r[c]) == null ? void 0 : v.code) ?? "" : e ?? "", m = s ? (k = r[c]) == null ? void 0 : k.language : t, T = async () => {
|
|
3005
3005
|
try {
|
|
3006
3006
|
await navigator.clipboard.writeText(h), f(!0), setTimeout(() => f(!1), jn);
|
|
3007
3007
|
} catch {
|
|
3008
3008
|
}
|
|
3009
|
-
},
|
|
3009
|
+
}, b = {
|
|
3010
3010
|
display: "inline-flex",
|
|
3011
3011
|
alignItems: "center",
|
|
3012
3012
|
gap: "var(--lucent-space-1)",
|
|
@@ -3025,7 +3025,7 @@ function Ti({
|
|
|
3025
3025
|
{
|
|
3026
3026
|
onClick: T,
|
|
3027
3027
|
"aria-label": u ? "Copied!" : "Copy code",
|
|
3028
|
-
style:
|
|
3028
|
+
style: b,
|
|
3029
3029
|
onMouseEnter: (x) => {
|
|
3030
3030
|
u || (x.currentTarget.style.background = "var(--lucent-surface-secondary)", x.currentTarget.style.color = "var(--lucent-text-primary)");
|
|
3031
3031
|
},
|
|
@@ -3205,7 +3205,7 @@ function Ti({
|
|
|
3205
3205
|
}
|
|
3206
3206
|
);
|
|
3207
3207
|
}
|
|
3208
|
-
const
|
|
3208
|
+
const Di = {
|
|
3209
3209
|
id: "code-block",
|
|
3210
3210
|
name: "CodeBlock",
|
|
3211
3211
|
tier: "atom",
|
|
@@ -3381,7 +3381,7 @@ xe.Body = Kn;
|
|
|
3381
3381
|
xe.Foot = Xn;
|
|
3382
3382
|
xe.Row = Jn;
|
|
3383
3383
|
xe.Cell = Zn;
|
|
3384
|
-
const
|
|
3384
|
+
const zi = {
|
|
3385
3385
|
id: "table",
|
|
3386
3386
|
name: "Table",
|
|
3387
3387
|
tier: "atom",
|
|
@@ -3496,10 +3496,10 @@ function kt({
|
|
|
3496
3496
|
id: s,
|
|
3497
3497
|
style: c
|
|
3498
3498
|
}) {
|
|
3499
|
-
var
|
|
3499
|
+
var v;
|
|
3500
3500
|
const [d, u] = z(
|
|
3501
|
-
r ?? ((
|
|
3502
|
-
), f = t !== void 0 ? t : d, h = V(null), [m, T] = z(null),
|
|
3501
|
+
r ?? ((v = e[0]) == null ? void 0 : v.value) ?? ""
|
|
3502
|
+
), f = t !== void 0 ? t : d, h = V(null), [m, T] = z(null), b = V(!1);
|
|
3503
3503
|
se(() => {
|
|
3504
3504
|
const k = h.current;
|
|
3505
3505
|
if (!k) return;
|
|
@@ -3508,8 +3508,8 @@ function kt({
|
|
|
3508
3508
|
S && (T({
|
|
3509
3509
|
left: S.offsetLeft,
|
|
3510
3510
|
width: S.offsetWidth,
|
|
3511
|
-
animate:
|
|
3512
|
-
}),
|
|
3511
|
+
animate: b.current
|
|
3512
|
+
}), b.current = !0);
|
|
3513
3513
|
};
|
|
3514
3514
|
x();
|
|
3515
3515
|
const M = new ResizeObserver(x);
|
|
@@ -3850,8 +3850,8 @@ function ua({
|
|
|
3850
3850
|
id: c,
|
|
3851
3851
|
style: d
|
|
3852
3852
|
}) {
|
|
3853
|
-
var
|
|
3854
|
-
const u = o === "sm" ? 24 : 40, f =
|
|
3853
|
+
var P, j;
|
|
3854
|
+
const u = o === "sm" ? 24 : 40, f = be(), h = c ?? f, [m, T] = z(!1), [b, p] = z("hex"), [v, k] = z(0), [x, M] = z(() => {
|
|
3855
3855
|
const g = e ? ke(e) ?? { r: 0, g: 0, b: 0, a: 1 } : { r: 0, g: 0, b: 0, a: 1 };
|
|
3856
3856
|
return re(g);
|
|
3857
3857
|
}), [S, A] = z(() => we(x).slice(1).toUpperCase()), R = V(null), C = V(null), D = V(null), [$, W] = z({ top: 0, left: 0 });
|
|
@@ -3882,7 +3882,7 @@ function ua({
|
|
|
3882
3882
|
M(g);
|
|
3883
3883
|
const E = we(g);
|
|
3884
3884
|
A(E.slice(1).toUpperCase()), t == null || t(E);
|
|
3885
|
-
}, [t]),
|
|
3885
|
+
}, [t]), F = ee((g) => {
|
|
3886
3886
|
const E = C.current.getBoundingClientRect(), O = Math.round(qe((g.clientX - E.left) / E.width, 0, 1) * 100), Y = Math.round((1 - qe((g.clientY - E.top) / E.height, 0, 1)) * 100);
|
|
3887
3887
|
w({ ...x, s: O, v: Y });
|
|
3888
3888
|
}, [x, w]), L = ee(async () => {
|
|
@@ -3992,10 +3992,10 @@ function ua({
|
|
|
3992
3992
|
flexShrink: 0
|
|
3993
3993
|
},
|
|
3994
3994
|
onPointerDown: (g) => {
|
|
3995
|
-
g.currentTarget.setPointerCapture(g.pointerId),
|
|
3995
|
+
g.currentTarget.setPointerCapture(g.pointerId), F(g);
|
|
3996
3996
|
},
|
|
3997
3997
|
onPointerMove: (g) => {
|
|
3998
|
-
g.buttons > 0 &&
|
|
3998
|
+
g.buttons > 0 && F(g);
|
|
3999
3999
|
},
|
|
4000
4000
|
children: [
|
|
4001
4001
|
/* @__PURE__ */ n("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to right, #fff, transparent)" } }),
|
|
@@ -4066,12 +4066,12 @@ function ua({
|
|
|
4066
4066
|
kt,
|
|
4067
4067
|
{
|
|
4068
4068
|
size: "sm",
|
|
4069
|
-
value:
|
|
4069
|
+
value: b,
|
|
4070
4070
|
onChange: (g) => p(g),
|
|
4071
4071
|
options: I.map(({ id: g, label: E }) => ({ value: g, label: E }))
|
|
4072
4072
|
}
|
|
4073
4073
|
),
|
|
4074
|
-
|
|
4074
|
+
b === "hex" && /* @__PURE__ */ y("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
|
|
4075
4075
|
/* @__PURE__ */ n(
|
|
4076
4076
|
Ee,
|
|
4077
4077
|
{
|
|
@@ -4123,7 +4123,7 @@ function ua({
|
|
|
4123
4123
|
}
|
|
4124
4124
|
)
|
|
4125
4125
|
] }),
|
|
4126
|
-
|
|
4126
|
+
b === "rgb" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4127
4127
|
{ label: "R", val: N.r, max: 255, fn: (g) => w(re({ ...N, r: g })) },
|
|
4128
4128
|
{ label: "G", val: N.g, max: 255, fn: (g) => w(re({ ...N, g })) },
|
|
4129
4129
|
{ label: "B", val: N.b, max: 255, fn: (g) => w(re({ ...N, b: g })) },
|
|
@@ -4132,7 +4132,7 @@ function ua({
|
|
|
4132
4132
|
const G = +H.target.value;
|
|
4133
4133
|
!isNaN(G) && G >= 0 && G <= O && Y(G);
|
|
4134
4134
|
}, className: "lucent-cp-field", style: { flex: 1 } }, g)) }),
|
|
4135
|
-
|
|
4135
|
+
b === "hsl" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4136
4136
|
{ label: "H", val: U.h, max: 360, fn: (g) => {
|
|
4137
4137
|
const { r: E, g: O, b: Y } = Ae(g, U.s, U.l);
|
|
4138
4138
|
w(re({ r: E, g: O, b: Y, a: x.a }));
|
|
@@ -4150,7 +4150,7 @@ function ua({
|
|
|
4150
4150
|
const G = +H.target.value;
|
|
4151
4151
|
!isNaN(G) && G >= 0 && G <= O && Y(G);
|
|
4152
4152
|
}, className: "lucent-cp-field", style: { flex: 1 } }, g)) }),
|
|
4153
|
-
|
|
4153
|
+
b === "hsb" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4154
4154
|
{ label: "H", val: x.h, max: 360, fn: (g) => w({ ...x, h: g }) },
|
|
4155
4155
|
{ label: "S", val: x.s, max: 100, fn: (g) => w({ ...x, s: g }) },
|
|
4156
4156
|
{ label: "B", val: x.v, max: 100, fn: (g) => w({ ...x, v: g }) },
|
|
@@ -4164,7 +4164,7 @@ function ua({
|
|
|
4164
4164
|
wt,
|
|
4165
4165
|
{
|
|
4166
4166
|
size: "sm",
|
|
4167
|
-
value: String(
|
|
4167
|
+
value: String(v),
|
|
4168
4168
|
onChange: (g) => k(Number(g.target.value)),
|
|
4169
4169
|
options: l.map((g, E) => ({ value: String(E), label: g.label }))
|
|
4170
4170
|
}
|
|
@@ -4174,8 +4174,8 @@ function ua({
|
|
|
4174
4174
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
4175
4175
|
color: "var(--lucent-text-secondary)",
|
|
4176
4176
|
fontFamily: "var(--lucent-font-family-base)"
|
|
4177
|
-
}, children: (
|
|
4178
|
-
/* @__PURE__ */ n("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((j = l[
|
|
4177
|
+
}, children: (P = l[0]) == null ? void 0 : P.label }),
|
|
4178
|
+
/* @__PURE__ */ n("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((j = l[v]) == null ? void 0 : j.colors) ?? []).map((g) => {
|
|
4179
4179
|
const E = Je(g).toLowerCase() === Z.slice(0, 7).toLowerCase();
|
|
4180
4180
|
return /* @__PURE__ */ n(
|
|
4181
4181
|
ze,
|
|
@@ -4199,7 +4199,7 @@ function ua({
|
|
|
4199
4199
|
);
|
|
4200
4200
|
}
|
|
4201
4201
|
ua.displayName = "ColorPicker";
|
|
4202
|
-
const
|
|
4202
|
+
const Ai = {
|
|
4203
4203
|
id: "color-picker",
|
|
4204
4204
|
name: "ColorPicker",
|
|
4205
4205
|
tier: "atom",
|
|
@@ -4306,7 +4306,7 @@ const Mi = {
|
|
|
4306
4306
|
"Tab — moves through format tabs and input fields within the popover"
|
|
4307
4307
|
]
|
|
4308
4308
|
}
|
|
4309
|
-
},
|
|
4309
|
+
}, Ei = {
|
|
4310
4310
|
id: "color-swatch",
|
|
4311
4311
|
name: "ColorSwatch",
|
|
4312
4312
|
tier: "atom",
|
|
@@ -4341,7 +4341,7 @@ const Mi = {
|
|
|
4341
4341
|
ariaAttributes: ["title (tooltip)"],
|
|
4342
4342
|
keyboardInteractions: ["Enter / Space — triggers onClick"]
|
|
4343
4343
|
}
|
|
4344
|
-
},
|
|
4344
|
+
}, qi = {
|
|
4345
4345
|
id: "segmented-control",
|
|
4346
4346
|
name: "SegmentedControl",
|
|
4347
4347
|
tier: "atom",
|
|
@@ -4451,7 +4451,7 @@ const Mi = {
|
|
|
4451
4451
|
between: "space-between",
|
|
4452
4452
|
around: "space-around"
|
|
4453
4453
|
};
|
|
4454
|
-
function
|
|
4454
|
+
function Bi({
|
|
4455
4455
|
gap: e = "4",
|
|
4456
4456
|
align: t = "stretch",
|
|
4457
4457
|
justify: r = "start",
|
|
@@ -4472,7 +4472,7 @@ function Ai({
|
|
|
4472
4472
|
};
|
|
4473
4473
|
return /* @__PURE__ */ n(o, { style: c, ...s, children: i });
|
|
4474
4474
|
}
|
|
4475
|
-
const
|
|
4475
|
+
const Ri = {
|
|
4476
4476
|
id: "stack",
|
|
4477
4477
|
name: "Stack",
|
|
4478
4478
|
tier: "atom",
|
|
@@ -4597,7 +4597,7 @@ const Ei = {
|
|
|
4597
4597
|
between: "space-between",
|
|
4598
4598
|
around: "space-around"
|
|
4599
4599
|
};
|
|
4600
|
-
function
|
|
4600
|
+
function Li({
|
|
4601
4601
|
gap: e = "3",
|
|
4602
4602
|
align: t = "center",
|
|
4603
4603
|
justify: r = "start",
|
|
@@ -4618,7 +4618,7 @@ function qi({
|
|
|
4618
4618
|
};
|
|
4619
4619
|
return /* @__PURE__ */ n(o, { style: c, ...s, children: i });
|
|
4620
4620
|
}
|
|
4621
|
-
const
|
|
4621
|
+
const Pi = {
|
|
4622
4622
|
id: "row",
|
|
4623
4623
|
name: "Row",
|
|
4624
4624
|
tier: "atom",
|
|
@@ -4735,8 +4735,117 @@ const Bi = {
|
|
|
4735
4735
|
accessibility: {
|
|
4736
4736
|
notes: 'Row renders a <div> by default, which has no implicit ARIA role. Use the `as` prop to render semantic elements (nav, section) when the content has a specific structural purpose. For toolbar patterns, consider adding role="toolbar" via the role prop.'
|
|
4737
4737
|
}
|
|
4738
|
+
}, ga = {
|
|
4739
|
+
sm: { height: 4, radius: "var(--lucent-radius-sm)" },
|
|
4740
|
+
md: { height: 8, radius: "var(--lucent-radius-md)" },
|
|
4741
|
+
lg: { height: 12, radius: "var(--lucent-radius-md)" }
|
|
4742
|
+
}, va = {
|
|
4743
|
+
accent: "var(--lucent-accent-default)",
|
|
4744
|
+
success: "var(--lucent-success-default)",
|
|
4745
|
+
warning: "var(--lucent-warning-default)",
|
|
4746
|
+
danger: "var(--lucent-danger-default)"
|
|
4738
4747
|
};
|
|
4739
|
-
function
|
|
4748
|
+
function ba(e, t, r, o, a) {
|
|
4749
|
+
return o !== void 0 && a !== void 0 ? o <= a ? e >= a ? "danger" : e >= o ? "warning" : "success" : e <= a ? "danger" : e <= o ? "warning" : "success" : o !== void 0 ? o <= t / 2 ? e <= o ? "warning" : r ?? "accent" : e >= o ? "warning" : r ?? "accent" : a !== void 0 ? a <= t / 2 ? e <= a ? "danger" : r ?? "accent" : e >= a ? "danger" : r ?? "accent" : r ?? "accent";
|
|
4750
|
+
}
|
|
4751
|
+
function Fi({
|
|
4752
|
+
value: e,
|
|
4753
|
+
max: t = 100,
|
|
4754
|
+
variant: r,
|
|
4755
|
+
size: o = "md",
|
|
4756
|
+
warnAt: a,
|
|
4757
|
+
dangerAt: i,
|
|
4758
|
+
label: l,
|
|
4759
|
+
style: s
|
|
4760
|
+
}) {
|
|
4761
|
+
const c = Math.max(0, Math.min(e, t)), d = t > 0 ? c / t * 100 : 0, u = ba(c, t, r, a, i), f = ga[o], h = va[u], m = l === !0 ? `${Math.round(d)}%` : l || null;
|
|
4762
|
+
return /* @__PURE__ */ y(
|
|
4763
|
+
"div",
|
|
4764
|
+
{
|
|
4765
|
+
style: {
|
|
4766
|
+
display: "flex",
|
|
4767
|
+
alignItems: "center",
|
|
4768
|
+
gap: "var(--lucent-space-3)",
|
|
4769
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4770
|
+
...s
|
|
4771
|
+
},
|
|
4772
|
+
children: [
|
|
4773
|
+
/* @__PURE__ */ n(
|
|
4774
|
+
"div",
|
|
4775
|
+
{
|
|
4776
|
+
role: "progressbar",
|
|
4777
|
+
"aria-valuenow": c,
|
|
4778
|
+
"aria-valuemin": 0,
|
|
4779
|
+
"aria-valuemax": t,
|
|
4780
|
+
style: {
|
|
4781
|
+
flex: 1,
|
|
4782
|
+
height: f.height,
|
|
4783
|
+
borderRadius: f.radius,
|
|
4784
|
+
background: "var(--lucent-surface-secondary)",
|
|
4785
|
+
overflow: "hidden"
|
|
4786
|
+
},
|
|
4787
|
+
children: /* @__PURE__ */ n(
|
|
4788
|
+
"div",
|
|
4789
|
+
{
|
|
4790
|
+
style: {
|
|
4791
|
+
width: `${d}%`,
|
|
4792
|
+
height: "100%",
|
|
4793
|
+
borderRadius: f.radius,
|
|
4794
|
+
background: h,
|
|
4795
|
+
transition: "width var(--lucent-duration-base) var(--lucent-easing-default), background var(--lucent-duration-base) var(--lucent-easing-default)"
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4798
|
+
)
|
|
4799
|
+
}
|
|
4800
|
+
),
|
|
4801
|
+
m != null && /* @__PURE__ */ n(
|
|
4802
|
+
"span",
|
|
4803
|
+
{
|
|
4804
|
+
style: {
|
|
4805
|
+
fontSize: "var(--lucent-font-size-sm)",
|
|
4806
|
+
fontWeight: "var(--lucent-font-weight-medium)",
|
|
4807
|
+
color: "var(--lucent-text-secondary)",
|
|
4808
|
+
whiteSpace: "nowrap",
|
|
4809
|
+
flexShrink: 0
|
|
4810
|
+
},
|
|
4811
|
+
children: m
|
|
4812
|
+
}
|
|
4813
|
+
)
|
|
4814
|
+
]
|
|
4815
|
+
}
|
|
4816
|
+
);
|
|
4817
|
+
}
|
|
4818
|
+
const Ni = {
|
|
4819
|
+
id: "progress",
|
|
4820
|
+
name: "Progress",
|
|
4821
|
+
tier: "atom",
|
|
4822
|
+
domain: "neutral",
|
|
4823
|
+
specVersion: "0.1",
|
|
4824
|
+
description: "A horizontal bar indicating completion, progress, or resource usage.",
|
|
4825
|
+
designIntent: 'Use Progress to visualise a bounded numeric value — task completion, disk usage, health bars, etc. Set warnAt/dangerAt thresholds for automatic colour shifts instead of hardcoding variants. Ascending thresholds (warnAt < dangerAt) suit "high is bad" metrics like CPU; descending thresholds (warnAt > dangerAt) suit "low is bad" metrics like battery.',
|
|
4826
|
+
props: [
|
|
4827
|
+
{ name: "value", type: "number", required: !0, description: "Current progress value." },
|
|
4828
|
+
{ name: "max", type: "number", required: !1, default: "100", description: "Maximum value." },
|
|
4829
|
+
{ name: "variant", type: "enum", required: !1, default: "accent", description: "Colour variant. Overridden when thresholds are set.", enumValues: ["accent", "success", "warning", "danger"] },
|
|
4830
|
+
{ name: "size", type: "enum", required: !1, default: "md", description: "Bar height.", enumValues: ["sm", "md", "lg"] },
|
|
4831
|
+
{ name: "warnAt", type: "number", required: !1, description: "Value at which variant auto-switches to warning." },
|
|
4832
|
+
{ name: "dangerAt", type: "number", required: !1, description: "Value at which variant auto-switches to danger." },
|
|
4833
|
+
{ name: "label", type: "union", required: !1, description: "true shows percentage; ReactNode shows custom label." }
|
|
4834
|
+
],
|
|
4835
|
+
usageExamples: [
|
|
4836
|
+
{ title: "Basic", code: "<Progress value={60} />" },
|
|
4837
|
+
{ title: "With label", code: "<Progress value={42} label />" },
|
|
4838
|
+
{ title: "Thresholds", code: "<Progress value={85} warnAt={70} dangerAt={90} label />" },
|
|
4839
|
+
{ title: "Danger variant", code: '<Progress value={95} variant="danger" size="lg" label />' }
|
|
4840
|
+
],
|
|
4841
|
+
compositionGraph: [],
|
|
4842
|
+
accessibility: {
|
|
4843
|
+
role: "progressbar",
|
|
4844
|
+
ariaAttributes: ["aria-valuenow", "aria-valuemin", "aria-valuemax"],
|
|
4845
|
+
notes: "Uses native progressbar role. Add aria-label on the wrapping element for screen-reader context."
|
|
4846
|
+
}
|
|
4847
|
+
};
|
|
4848
|
+
function $i({
|
|
4740
4849
|
label: e,
|
|
4741
4850
|
htmlFor: t,
|
|
4742
4851
|
required: r = !1,
|
|
@@ -4755,7 +4864,7 @@ function Ri({
|
|
|
4755
4864
|
s && /* @__PURE__ */ n(_, { size: "xs", color: c, lineHeight: "tight", children: s })
|
|
4756
4865
|
] });
|
|
4757
4866
|
}
|
|
4758
|
-
const
|
|
4867
|
+
const Wi = {
|
|
4759
4868
|
id: "form-field",
|
|
4760
4869
|
name: "FormField",
|
|
4761
4870
|
tier: "molecule",
|
|
@@ -4841,11 +4950,11 @@ const Li = {
|
|
|
4841
4950
|
ariaAttributes: ["aria-required", "aria-describedby"],
|
|
4842
4951
|
notes: 'Link the wrapped control to an error message using aria-describedby on the control and a matching id on the error element for full screen reader support. The required asterisk is aria-hidden; set aria-required="true" on the control itself.'
|
|
4843
4952
|
}
|
|
4844
|
-
},
|
|
4953
|
+
}, ya = { sm: 14, md: 18, lg: 20 }, xa = { sm: "sm", md: "md", lg: "md" }, wa = { sm: "var(--lucent-space-1)", md: "var(--lucent-space-2)", lg: "var(--lucent-space-2)" }, ka = ({ size: e = 16 }) => /* @__PURE__ */ y("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
4845
4954
|
/* @__PURE__ */ n("circle", { cx: "6.5", cy: "6.5", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
4846
4955
|
/* @__PURE__ */ n("path", { d: "M9.5 9.5L13 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
4847
|
-
] }),
|
|
4848
|
-
function
|
|
4956
|
+
] }), Sa = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
|
|
4957
|
+
function Oi({
|
|
4849
4958
|
value: e,
|
|
4850
4959
|
onChange: t,
|
|
4851
4960
|
placeholder: r = "Search…",
|
|
@@ -4860,7 +4969,7 @@ function Fi({
|
|
|
4860
4969
|
id: f,
|
|
4861
4970
|
style: h
|
|
4862
4971
|
}) {
|
|
4863
|
-
const [m, T] = z(!1), [
|
|
4972
|
+
const [m, T] = z(!1), [b, p] = z(null), v = V(null), k = V(null), x = V(null), [M, S] = z({ top: 0, left: 0, width: 0 }), A = m && s.length > 0;
|
|
4864
4973
|
se(() => {
|
|
4865
4974
|
if (!A || !k.current) return;
|
|
4866
4975
|
const w = k.current.getBoundingClientRect();
|
|
@@ -4871,10 +4980,10 @@ function Fi({
|
|
|
4871
4980
|
}, C = (w) => {
|
|
4872
4981
|
c == null || c(w), T(!1);
|
|
4873
4982
|
}, D = () => {
|
|
4874
|
-
|
|
4983
|
+
v.current = setTimeout(() => T(!1), 150);
|
|
4875
4984
|
}, $ = () => {
|
|
4876
|
-
|
|
4877
|
-
}, W = d ? /* @__PURE__ */ n(
|
|
4985
|
+
v.current && clearTimeout(v.current), T(!0);
|
|
4986
|
+
}, W = d ? /* @__PURE__ */ n(vn, { size: "sm" }) : e ? /* @__PURE__ */ n(
|
|
4878
4987
|
"button",
|
|
4879
4988
|
{
|
|
4880
4989
|
type: "button",
|
|
@@ -4896,7 +5005,7 @@ function Fi({
|
|
|
4896
5005
|
onMouseLeave: (w) => {
|
|
4897
5006
|
w.currentTarget.style.color = "var(--lucent-text-secondary)";
|
|
4898
5007
|
},
|
|
4899
|
-
children: /* @__PURE__ */ n(
|
|
5008
|
+
children: /* @__PURE__ */ n(Sa, {})
|
|
4900
5009
|
}
|
|
4901
5010
|
) : null;
|
|
4902
5011
|
return /* @__PURE__ */ y("div", { ref: k, style: { ...h }, children: [
|
|
@@ -4910,7 +5019,7 @@ function Fi({
|
|
|
4910
5019
|
onChange: (w) => t(w.target.value),
|
|
4911
5020
|
placeholder: r,
|
|
4912
5021
|
disabled: u,
|
|
4913
|
-
leftElement: /* @__PURE__ */ n(
|
|
5022
|
+
leftElement: /* @__PURE__ */ n(ka, { size: ya[o] }),
|
|
4914
5023
|
rightElement: W ?? void 0,
|
|
4915
5024
|
onFocus: $,
|
|
4916
5025
|
onBlur: D,
|
|
@@ -4937,24 +5046,24 @@ function Fi({
|
|
|
4937
5046
|
border: "1px solid color-mix(in srgb, var(--lucent-accent-default) 15%, var(--lucent-border-default))",
|
|
4938
5047
|
borderRadius: "var(--lucent-radius-lg)",
|
|
4939
5048
|
boxShadow: "0 0 24px -4px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), var(--lucent-shadow-md)",
|
|
4940
|
-
padding:
|
|
5049
|
+
padding: wa[o]
|
|
4941
5050
|
},
|
|
4942
|
-
children: s.map((w,
|
|
5051
|
+
children: s.map((w, F) => /* @__PURE__ */ n(
|
|
4943
5052
|
"div",
|
|
4944
5053
|
{
|
|
4945
5054
|
role: "option",
|
|
4946
5055
|
"aria-selected": !1,
|
|
4947
5056
|
onMouseDown: () => C(w),
|
|
4948
|
-
onMouseEnter: () => p(
|
|
5057
|
+
onMouseEnter: () => p(F),
|
|
4949
5058
|
onMouseLeave: () => p(null),
|
|
4950
5059
|
style: {
|
|
4951
5060
|
padding: "var(--lucent-space-2)",
|
|
4952
5061
|
borderRadius: "var(--lucent-radius-md)",
|
|
4953
5062
|
cursor: "pointer",
|
|
4954
|
-
background:
|
|
5063
|
+
background: b === F ? "color-mix(in srgb, var(--lucent-accent-default) 20%, var(--lucent-surface-secondary))" : "transparent",
|
|
4955
5064
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
4956
5065
|
},
|
|
4957
|
-
children: /* @__PURE__ */ n(_, { as: "span", size:
|
|
5066
|
+
children: /* @__PURE__ */ n(_, { as: "span", size: xa[o], children: w.label })
|
|
4958
5067
|
},
|
|
4959
5068
|
w.id
|
|
4960
5069
|
))
|
|
@@ -4964,7 +5073,7 @@ function Fi({
|
|
|
4964
5073
|
)
|
|
4965
5074
|
] });
|
|
4966
5075
|
}
|
|
4967
|
-
const
|
|
5076
|
+
const Hi = {
|
|
4968
5077
|
id: "search-input",
|
|
4969
5078
|
name: "SearchInput",
|
|
4970
5079
|
tier: "molecule",
|
|
@@ -5086,7 +5195,7 @@ const [results, setResults] = useState([]);
|
|
|
5086
5195
|
keyboardInteractions: ["Enter to select focused result", "Escape to close dropdown"],
|
|
5087
5196
|
notes: 'The results list uses role="listbox" with role="option" items. For full keyboard navigation (arrow keys to move between results), wire up onKeyDown on the Input and manage an activeIndex state.'
|
|
5088
5197
|
}
|
|
5089
|
-
}, Ct = ye("0"),
|
|
5198
|
+
}, Ct = ye("0"), Ta = {
|
|
5090
5199
|
none: { py: "0", px: "0" },
|
|
5091
5200
|
sm: { py: "var(--lucent-space-2)", px: "var(--lucent-space-3)" },
|
|
5092
5201
|
md: { py: "var(--lucent-space-4)", px: "var(--lucent-space-5)" },
|
|
@@ -5096,17 +5205,17 @@ const [results, setResults] = useState([]);
|
|
|
5096
5205
|
sm: "var(--lucent-shadow-sm)",
|
|
5097
5206
|
md: "var(--lucent-shadow-md)",
|
|
5098
5207
|
lg: "var(--lucent-shadow-lg)"
|
|
5099
|
-
},
|
|
5208
|
+
}, Ca = {
|
|
5100
5209
|
none: "var(--lucent-radius-none)",
|
|
5101
5210
|
sm: "var(--lucent-radius-sm)",
|
|
5102
5211
|
md: "var(--lucent-radius-md)",
|
|
5103
5212
|
lg: "var(--lucent-radius-lg)"
|
|
5104
|
-
},
|
|
5213
|
+
}, Ia = {
|
|
5105
5214
|
success: "var(--lucent-success-default)",
|
|
5106
5215
|
warning: "var(--lucent-warning-default)",
|
|
5107
5216
|
danger: "var(--lucent-danger-default)",
|
|
5108
5217
|
info: "var(--lucent-info-default)"
|
|
5109
|
-
},
|
|
5218
|
+
}, Ma = {
|
|
5110
5219
|
ghost: {
|
|
5111
5220
|
background: "transparent",
|
|
5112
5221
|
border: "none",
|
|
@@ -5137,22 +5246,22 @@ const [results, setResults] = useState([]);
|
|
|
5137
5246
|
shadowDefault: "none",
|
|
5138
5247
|
dividers: !1
|
|
5139
5248
|
}
|
|
5140
|
-
},
|
|
5249
|
+
}, Da = [
|
|
5141
5250
|
"transform 80ms var(--lucent-easing-default)",
|
|
5142
5251
|
"box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
5143
5252
|
"border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
5144
5253
|
"background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
5145
|
-
].join(", "),
|
|
5254
|
+
].join(", "), za = "0 4px 14px -2px var(--lucent-accent-subtle)", Aa = "0 0 0 3px var(--lucent-accent-subtle)", Ea = "0 0 0 2px var(--lucent-surface), 0 0 0 4px var(--lucent-accent-default)", qa = "0 0 0 3px var(--lucent-accent-subtle)";
|
|
5146
5255
|
function he(...e) {
|
|
5147
5256
|
const t = e.filter(
|
|
5148
5257
|
(r) => r != null && r !== "none" && r !== "var(--lucent-shadow-none)"
|
|
5149
5258
|
);
|
|
5150
5259
|
return t.length > 0 ? t.join(", ") : void 0;
|
|
5151
5260
|
}
|
|
5152
|
-
function
|
|
5261
|
+
function Ba(e, t, r) {
|
|
5153
5262
|
return !t || r ? e.background : e.background === "transparent" ? "var(--lucent-accent-subtle)" : `color-mix(in srgb, var(--lucent-accent-default) 6%, ${e.background})`;
|
|
5154
5263
|
}
|
|
5155
|
-
function
|
|
5264
|
+
function Vi({
|
|
5156
5265
|
variant: e = "outline",
|
|
5157
5266
|
header: t,
|
|
5158
5267
|
footer: r,
|
|
@@ -5168,11 +5277,11 @@ function Ni({
|
|
|
5168
5277
|
disabled: h,
|
|
5169
5278
|
status: m,
|
|
5170
5279
|
selected: T,
|
|
5171
|
-
media:
|
|
5280
|
+
media: b
|
|
5172
5281
|
}) {
|
|
5173
|
-
const p =
|
|
5282
|
+
const p = Ma[e], v = e === "combo", k = i ?? (v ? "md" : p.shadowDefault), { py: x, px: M } = Ta[a], S = `${x} ${M}`, A = Ca[l], R = d != null, C = c != null || R, D = (h ?? !1) && C, $ = R ? "a" : C ? "button" : "div", [W, w] = z(!1), [F, L] = z(!1), [N, U] = z(!1), Z = (T ?? !1) && !D, J = Z ? qa : void 0, B = Ba(p, T ?? !1, D);
|
|
5174
5283
|
let I;
|
|
5175
|
-
|
|
5284
|
+
v ? I = J : C && !D ? N ? I = he(Ea, J) : F ? I = he(Aa, J) : W ? I = he(za, Se[k], J) : I = he(Se[k], J) : I = he(Se[k], J);
|
|
5176
5285
|
const q = {
|
|
5177
5286
|
display: "flex",
|
|
5178
5287
|
flexDirection: "column",
|
|
@@ -5181,7 +5290,7 @@ function Ni({
|
|
|
5181
5290
|
borderRadius: A,
|
|
5182
5291
|
// Outer box-shadow rings (selected, focus) get clipped by overflow:hidden,
|
|
5183
5292
|
// so we switch to overflow:visible when a ring is active.
|
|
5184
|
-
overflow: Z || C &&
|
|
5293
|
+
overflow: Z || C && F ? "visible" : "hidden",
|
|
5185
5294
|
boxSizing: "border-box",
|
|
5186
5295
|
position: "relative",
|
|
5187
5296
|
...I !== void 0 && { boxShadow: I },
|
|
@@ -5192,7 +5301,7 @@ function Ni({
|
|
|
5192
5301
|
...C && {
|
|
5193
5302
|
cursor: D ? "not-allowed" : "pointer",
|
|
5194
5303
|
outline: "none",
|
|
5195
|
-
transition:
|
|
5304
|
+
transition: Da
|
|
5196
5305
|
},
|
|
5197
5306
|
// Button UA reset
|
|
5198
5307
|
...C && !R && {
|
|
@@ -5243,7 +5352,7 @@ function Ni({
|
|
|
5243
5352
|
...C && T !== void 0 && { "aria-pressed": T },
|
|
5244
5353
|
...R && D && { "aria-disabled": !0 },
|
|
5245
5354
|
children: [
|
|
5246
|
-
|
|
5355
|
+
b != null && /* @__PURE__ */ n("div", { style: { lineHeight: 0 }, children: b }),
|
|
5247
5356
|
m != null && /* @__PURE__ */ n(
|
|
5248
5357
|
"div",
|
|
5249
5358
|
{
|
|
@@ -5254,7 +5363,7 @@ function Ni({
|
|
|
5254
5363
|
left: 0,
|
|
5255
5364
|
bottom: 0,
|
|
5256
5365
|
width: 3,
|
|
5257
|
-
background:
|
|
5366
|
+
background: Ia[m],
|
|
5258
5367
|
zIndex: 1
|
|
5259
5368
|
}
|
|
5260
5369
|
}
|
|
@@ -5275,7 +5384,7 @@ function Ni({
|
|
|
5275
5384
|
style: {
|
|
5276
5385
|
padding: S,
|
|
5277
5386
|
flex: 1,
|
|
5278
|
-
...
|
|
5387
|
+
...v ? {
|
|
5279
5388
|
background: "var(--lucent-surface)",
|
|
5280
5389
|
border: "1px solid var(--lucent-border-default)",
|
|
5281
5390
|
borderRadius: A,
|
|
@@ -5301,7 +5410,7 @@ function Ni({
|
|
|
5301
5410
|
}
|
|
5302
5411
|
);
|
|
5303
5412
|
}
|
|
5304
|
-
function
|
|
5413
|
+
function ji({ children: e, style: t }) {
|
|
5305
5414
|
const r = fe(Ct);
|
|
5306
5415
|
return /* @__PURE__ */ n(
|
|
5307
5416
|
"div",
|
|
@@ -5317,7 +5426,7 @@ function $i({ children: e, style: t }) {
|
|
|
5317
5426
|
}
|
|
5318
5427
|
);
|
|
5319
5428
|
}
|
|
5320
|
-
const
|
|
5429
|
+
const Ui = {
|
|
5321
5430
|
id: "card",
|
|
5322
5431
|
name: "Card",
|
|
5323
5432
|
tier: "molecule",
|
|
@@ -5527,30 +5636,30 @@ const Wi = {
|
|
|
5527
5636
|
accessibility: {
|
|
5528
5637
|
notes: "Non-interactive cards have no implicit ARIA role — wrap in <section> or <article> if needed. Interactive cards with onClick render as <button> with focus ring. Interactive cards with href render as <a> with focus ring. Selected cards set aria-pressed on the interactive element. The status accent bar is aria-hidden (decorative). Media slot images should include alt text."
|
|
5529
5638
|
}
|
|
5530
|
-
},
|
|
5639
|
+
}, Ra = {
|
|
5531
5640
|
info: { bg: "var(--lucent-info-subtle)", border: "var(--lucent-info-default)", iconColor: "var(--lucent-info-text)", textColor: "info" },
|
|
5532
5641
|
success: { bg: "var(--lucent-success-subtle)", border: "var(--lucent-success-default)", iconColor: "var(--lucent-success-text)", textColor: "success" },
|
|
5533
5642
|
warning: { bg: "var(--lucent-warning-subtle)", border: "var(--lucent-warning-default)", iconColor: "var(--lucent-warning-text)", textColor: "warning" },
|
|
5534
5643
|
danger: { bg: "var(--lucent-danger-subtle)", border: "var(--lucent-danger-default)", iconColor: "var(--lucent-danger-text)", textColor: "danger" }
|
|
5535
|
-
},
|
|
5644
|
+
}, La = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
5536
5645
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
5537
5646
|
/* @__PURE__ */ n("path", { d: "M8 5.5V8.5M8 10.5V11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
5538
|
-
] }),
|
|
5647
|
+
] }), Pa = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
5539
5648
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
5540
5649
|
/* @__PURE__ */ n("path", { d: "M5 8L7 10L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
5541
|
-
] }),
|
|
5650
|
+
] }), Fa = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
5542
5651
|
/* @__PURE__ */ n("path", { d: "M8 2L14.5 13H1.5L8 2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
|
|
5543
5652
|
/* @__PURE__ */ n("path", { d: "M8 6V9M8 11V11.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
5544
|
-
] }),
|
|
5653
|
+
] }), Na = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
5545
5654
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
5546
5655
|
/* @__PURE__ */ n("path", { d: "M5.5 5.5L10.5 10.5M10.5 5.5L5.5 10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
5547
|
-
] }),
|
|
5548
|
-
info: /* @__PURE__ */ n(
|
|
5549
|
-
success: /* @__PURE__ */ n(
|
|
5550
|
-
warning: /* @__PURE__ */ n(
|
|
5551
|
-
danger: /* @__PURE__ */ n(
|
|
5552
|
-
},
|
|
5553
|
-
function
|
|
5656
|
+
] }), $a = {
|
|
5657
|
+
info: /* @__PURE__ */ n(La, {}),
|
|
5658
|
+
success: /* @__PURE__ */ n(Pa, {}),
|
|
5659
|
+
warning: /* @__PURE__ */ n(Fa, {}),
|
|
5660
|
+
danger: /* @__PURE__ */ n(Na, {})
|
|
5661
|
+
}, Wa = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
|
|
5662
|
+
function Gi({
|
|
5554
5663
|
variant: e = "info",
|
|
5555
5664
|
title: t,
|
|
5556
5665
|
children: r,
|
|
@@ -5558,7 +5667,7 @@ function Oi({
|
|
|
5558
5667
|
icon: a,
|
|
5559
5668
|
style: i
|
|
5560
5669
|
}) {
|
|
5561
|
-
const l =
|
|
5670
|
+
const l = Ra[e], s = a ?? $a[e];
|
|
5562
5671
|
return /* @__PURE__ */ y(
|
|
5563
5672
|
"div",
|
|
5564
5673
|
{
|
|
@@ -5616,14 +5725,14 @@ function Oi({
|
|
|
5616
5725
|
onMouseLeave: (c) => {
|
|
5617
5726
|
c.currentTarget.style.opacity = "0.7";
|
|
5618
5727
|
},
|
|
5619
|
-
children: /* @__PURE__ */ n(
|
|
5728
|
+
children: /* @__PURE__ */ n(Wa, {})
|
|
5620
5729
|
}
|
|
5621
5730
|
)
|
|
5622
5731
|
]
|
|
5623
5732
|
}
|
|
5624
5733
|
);
|
|
5625
5734
|
}
|
|
5626
|
-
const
|
|
5735
|
+
const _i = {
|
|
5627
5736
|
id: "alert",
|
|
5628
5737
|
name: "Alert",
|
|
5629
5738
|
tier: "molecule",
|
|
@@ -5698,7 +5807,7 @@ const Hi = {
|
|
|
5698
5807
|
notes: 'role="alert" causes screen readers to announce the content immediately when rendered. For non-urgent status messages, consider using role="status" instead by overriding via style/wrapper.'
|
|
5699
5808
|
}
|
|
5700
5809
|
};
|
|
5701
|
-
function
|
|
5810
|
+
function Yi({
|
|
5702
5811
|
illustration: e,
|
|
5703
5812
|
title: t,
|
|
5704
5813
|
description: r,
|
|
@@ -5741,7 +5850,7 @@ function Vi({
|
|
|
5741
5850
|
}
|
|
5742
5851
|
);
|
|
5743
5852
|
}
|
|
5744
|
-
const
|
|
5853
|
+
const Ki = {
|
|
5745
5854
|
id: "empty-state",
|
|
5746
5855
|
name: "EmptyState",
|
|
5747
5856
|
tier: "molecule",
|
|
@@ -5812,11 +5921,11 @@ const ji = {
|
|
|
5812
5921
|
accessibility: {
|
|
5813
5922
|
notes: "The title renders as an h3 by default. If EmptyState appears inside a section with its own heading hierarchy, override by passing a Text component as part of a custom layout. Ensure the action element has a descriptive label for screen readers."
|
|
5814
5923
|
}
|
|
5815
|
-
},
|
|
5924
|
+
}, Oa = {
|
|
5816
5925
|
text: "1em",
|
|
5817
5926
|
circle: 40,
|
|
5818
5927
|
rectangle: 40
|
|
5819
|
-
},
|
|
5928
|
+
}, Ha = {
|
|
5820
5929
|
text: "var(--lucent-radius-sm)",
|
|
5821
5930
|
circle: "var(--lucent-radius-full)",
|
|
5822
5931
|
rectangle: "var(--lucent-radius-md)"
|
|
@@ -5845,7 +5954,7 @@ function lt({
|
|
|
5845
5954
|
}
|
|
5846
5955
|
);
|
|
5847
5956
|
}
|
|
5848
|
-
function
|
|
5957
|
+
function Xi({
|
|
5849
5958
|
variant: e = "rectangle",
|
|
5850
5959
|
width: t = "100%",
|
|
5851
5960
|
height: r,
|
|
@@ -5854,7 +5963,7 @@ function Ui({
|
|
|
5854
5963
|
radius: i,
|
|
5855
5964
|
style: l
|
|
5856
5965
|
}) {
|
|
5857
|
-
const s = r ??
|
|
5966
|
+
const s = r ?? Oa[e], c = i ?? Ha[e], d = a ? /* @__PURE__ */ n("style", { children: `
|
|
5858
5967
|
@keyframes lucent-skeleton-shimmer {
|
|
5859
5968
|
0% { background-position: 200% 0; }
|
|
5860
5969
|
100% { background-position: -200% 0; }
|
|
@@ -5886,7 +5995,7 @@ function Ui({
|
|
|
5886
5995
|
)
|
|
5887
5996
|
] });
|
|
5888
5997
|
}
|
|
5889
|
-
const
|
|
5998
|
+
const Ji = {
|
|
5890
5999
|
id: "skeleton",
|
|
5891
6000
|
name: "Skeleton",
|
|
5892
6001
|
tier: "molecule",
|
|
@@ -5973,7 +6082,7 @@ const Gi = {
|
|
|
5973
6082
|
notes: 'Wrap loading regions with aria-busy="true" on the container so screen readers know content is loading. Individual Skeleton elements are presentational and do not need ARIA attributes themselves.'
|
|
5974
6083
|
}
|
|
5975
6084
|
};
|
|
5976
|
-
function
|
|
6085
|
+
function Zi({ items: e, separator: t = "/", style: r }) {
|
|
5977
6086
|
return /* @__PURE__ */ n("nav", { "aria-label": "Breadcrumb", style: r, children: /* @__PURE__ */ n(
|
|
5978
6087
|
"ol",
|
|
5979
6088
|
{
|
|
@@ -6039,28 +6148,28 @@ function _i({ items: e, separator: t = "/", style: r }) {
|
|
|
6039
6148
|
}
|
|
6040
6149
|
) });
|
|
6041
6150
|
}
|
|
6042
|
-
function
|
|
6151
|
+
function Qi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "underline", style: i }) {
|
|
6043
6152
|
var B;
|
|
6044
|
-
const l = r !== void 0, [s, c] = z(t ?? ((B = e[0]) == null ? void 0 : B.value) ?? ""), d = l ? r : s, [u, f] = z(null), h = V([]), [m, T] = z(null),
|
|
6153
|
+
const l = r !== void 0, [s, c] = z(t ?? ((B = e[0]) == null ? void 0 : B.value) ?? ""), d = l ? r : s, [u, f] = z(null), h = V([]), [m, T] = z(null), b = V(!1), p = a === "pills", v = V(null), k = V(null), x = V(null), [M, S] = z(e.length), [A, R] = z(!1), [C, D] = z(!1), [$, W] = z(null), w = e.slice(0, M), F = e.slice(M), L = F.length > 0, N = F.some((I) => I.value === d), U = () => {
|
|
6045
6154
|
if (N) {
|
|
6046
6155
|
T(null);
|
|
6047
6156
|
return;
|
|
6048
6157
|
}
|
|
6049
|
-
const I = e.findIndex((
|
|
6158
|
+
const I = e.findIndex((P, j) => j < M && P.value === d), q = h.current[I];
|
|
6050
6159
|
if (q) {
|
|
6051
6160
|
if (p) {
|
|
6052
|
-
const
|
|
6053
|
-
if (!
|
|
6054
|
-
T({ left:
|
|
6161
|
+
const P = q.querySelector("span");
|
|
6162
|
+
if (!P) return;
|
|
6163
|
+
T({ left: P.offsetLeft + q.offsetLeft, width: P.offsetWidth, animate: b.current });
|
|
6055
6164
|
} else
|
|
6056
|
-
T({ left: q.offsetLeft, width: q.offsetWidth, animate:
|
|
6057
|
-
|
|
6165
|
+
T({ left: q.offsetLeft, width: q.offsetWidth, animate: b.current });
|
|
6166
|
+
b.current = !0;
|
|
6058
6167
|
}
|
|
6059
6168
|
};
|
|
6060
6169
|
se(() => {
|
|
6061
6170
|
U(), document.fonts.ready.then(U);
|
|
6062
6171
|
}, [d, M, p]), X(() => {
|
|
6063
|
-
const I =
|
|
6172
|
+
const I = v.current;
|
|
6064
6173
|
if (!I) return;
|
|
6065
6174
|
const q = () => {
|
|
6066
6175
|
const E = I.clientWidth, O = 70;
|
|
@@ -6087,15 +6196,15 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6087
6196
|
}
|
|
6088
6197
|
S(H < 1 ? 1 : H);
|
|
6089
6198
|
};
|
|
6090
|
-
let
|
|
6199
|
+
let P;
|
|
6091
6200
|
(() => {
|
|
6092
|
-
|
|
6093
|
-
|
|
6201
|
+
P = requestAnimationFrame(() => {
|
|
6202
|
+
P = requestAnimationFrame(q);
|
|
6094
6203
|
});
|
|
6095
6204
|
})();
|
|
6096
6205
|
const g = new ResizeObserver(q);
|
|
6097
6206
|
return g.observe(I), () => {
|
|
6098
|
-
g.disconnect(), cancelAnimationFrame(
|
|
6207
|
+
g.disconnect(), cancelAnimationFrame(P);
|
|
6099
6208
|
};
|
|
6100
6209
|
}, [e]), X(() => {
|
|
6101
6210
|
if (!A) return;
|
|
@@ -6108,15 +6217,15 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6108
6217
|
l || c(I), o == null || o(I);
|
|
6109
6218
|
}, J = (I, q) => {
|
|
6110
6219
|
var E;
|
|
6111
|
-
const
|
|
6220
|
+
const P = w.map((O, Y) => O.disabled ? -1 : Y).filter((O) => O !== -1), j = P.indexOf(q);
|
|
6112
6221
|
let g = -1;
|
|
6113
|
-
I.key === "ArrowRight" && (g =
|
|
6222
|
+
I.key === "ArrowRight" && (g = P[(j + 1) % P.length] ?? -1), I.key === "ArrowLeft" && (g = P[(j - 1 + P.length) % P.length] ?? -1), I.key === "Home" && (g = P[0] ?? -1), I.key === "End" && (g = P[P.length - 1] ?? -1), g !== -1 && (I.preventDefault(), (E = h.current[g]) == null || E.focus(), Z(w[g].value));
|
|
6114
6223
|
};
|
|
6115
6224
|
return /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...i }, children: [
|
|
6116
6225
|
/* @__PURE__ */ y(
|
|
6117
6226
|
"div",
|
|
6118
6227
|
{
|
|
6119
|
-
ref:
|
|
6228
|
+
ref: v,
|
|
6120
6229
|
role: "tablist",
|
|
6121
6230
|
style: {
|
|
6122
6231
|
position: "relative",
|
|
@@ -6130,7 +6239,7 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6130
6239
|
},
|
|
6131
6240
|
children: [
|
|
6132
6241
|
e.map((I, q) => {
|
|
6133
|
-
const
|
|
6242
|
+
const P = q < M, j = I.value === d, g = I.disabled ?? !1;
|
|
6134
6243
|
return /* @__PURE__ */ y(
|
|
6135
6244
|
"button",
|
|
6136
6245
|
{
|
|
@@ -6142,13 +6251,13 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6142
6251
|
"aria-controls": `lucent-tabpanel-${I.value}`,
|
|
6143
6252
|
id: `lucent-tab-${I.value}`,
|
|
6144
6253
|
disabled: g,
|
|
6145
|
-
tabIndex: j &&
|
|
6254
|
+
tabIndex: j && P ? 0 : -1,
|
|
6146
6255
|
onClick: () => {
|
|
6147
6256
|
g || Z(I.value);
|
|
6148
6257
|
},
|
|
6149
6258
|
onKeyDown: (E) => J(E, q),
|
|
6150
6259
|
onMouseEnter: () => {
|
|
6151
|
-
!g &&
|
|
6260
|
+
!g && P && f(q);
|
|
6152
6261
|
},
|
|
6153
6262
|
onMouseLeave: () => f(null),
|
|
6154
6263
|
style: {
|
|
@@ -6163,10 +6272,10 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6163
6272
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
6164
6273
|
whiteSpace: "nowrap",
|
|
6165
6274
|
outline: "none",
|
|
6166
|
-
position:
|
|
6275
|
+
position: P ? "relative" : "absolute",
|
|
6167
6276
|
zIndex: j ? 1 : 0,
|
|
6168
6277
|
// Hidden overflow tabs are positioned off-screen for measurement
|
|
6169
|
-
...
|
|
6278
|
+
...P ? {} : { visibility: "hidden", pointerEvents: "none", left: -9999 }
|
|
6170
6279
|
},
|
|
6171
6280
|
children: [
|
|
6172
6281
|
/* @__PURE__ */ n("span", { style: {
|
|
@@ -6176,7 +6285,7 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6176
6285
|
background: !p && u === q && !j && !g ? "var(--lucent-surface-secondary)" : "transparent",
|
|
6177
6286
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
6178
6287
|
}, children: I.label }),
|
|
6179
|
-
p && u === q && !j && !g &&
|
|
6288
|
+
p && u === q && !j && !g && P && /* @__PURE__ */ n(
|
|
6180
6289
|
"span",
|
|
6181
6290
|
{
|
|
6182
6291
|
"aria-hidden": !0,
|
|
@@ -6273,8 +6382,8 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6273
6382
|
padding: "var(--lucent-space-1) 0",
|
|
6274
6383
|
minWidth: 140
|
|
6275
6384
|
},
|
|
6276
|
-
children:
|
|
6277
|
-
const
|
|
6385
|
+
children: F.map((I, q) => {
|
|
6386
|
+
const P = I.value === d, j = I.disabled ?? !1, g = $ === q;
|
|
6278
6387
|
return /* @__PURE__ */ n(
|
|
6279
6388
|
"button",
|
|
6280
6389
|
{
|
|
@@ -6290,13 +6399,13 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6290
6399
|
display: "block",
|
|
6291
6400
|
width: "100%",
|
|
6292
6401
|
padding: "var(--lucent-space-2) var(--lucent-space-4)",
|
|
6293
|
-
background:
|
|
6402
|
+
background: P || g ? "var(--lucent-surface-secondary)" : "none",
|
|
6294
6403
|
border: "none",
|
|
6295
6404
|
cursor: j ? "not-allowed" : "pointer",
|
|
6296
6405
|
fontFamily: "var(--lucent-font-family-base)",
|
|
6297
6406
|
fontSize: "var(--lucent-font-size-md)",
|
|
6298
|
-
fontWeight:
|
|
6299
|
-
color: j ? "var(--lucent-text-disabled)" :
|
|
6407
|
+
fontWeight: P ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
6408
|
+
color: j ? "var(--lucent-text-disabled)" : P || g ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
6300
6409
|
textAlign: "left",
|
|
6301
6410
|
outline: "none",
|
|
6302
6411
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), color var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
@@ -6323,33 +6432,33 @@ function Yi({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
6323
6432
|
))
|
|
6324
6433
|
] });
|
|
6325
6434
|
}
|
|
6326
|
-
const
|
|
6435
|
+
const Va = `
|
|
6327
6436
|
@keyframes lucent-collapsible-open {
|
|
6328
6437
|
from { opacity: 0; transform: translateY(-4px); }
|
|
6329
6438
|
to { opacity: 1; transform: translateY(0); }
|
|
6330
6439
|
}
|
|
6331
6440
|
`;
|
|
6332
|
-
function
|
|
6441
|
+
function es({ trigger: e, children: t, defaultOpen: r = !1, open: o, onOpenChange: a, style: i }) {
|
|
6333
6442
|
const l = o !== void 0, [s, c] = z(r), d = l ? o : s, u = V(null), [f, h] = z(d ? void 0 : 0), m = V(!1);
|
|
6334
6443
|
X(() => {
|
|
6335
|
-
const
|
|
6336
|
-
if (
|
|
6444
|
+
const b = u.current;
|
|
6445
|
+
if (b)
|
|
6337
6446
|
if (d) {
|
|
6338
|
-
const p =
|
|
6447
|
+
const p = b.scrollHeight;
|
|
6339
6448
|
h(p), m.current = !0;
|
|
6340
|
-
const
|
|
6449
|
+
const v = setTimeout(() => {
|
|
6341
6450
|
h(void 0), m.current = !1;
|
|
6342
6451
|
}, 220);
|
|
6343
|
-
return () => clearTimeout(
|
|
6452
|
+
return () => clearTimeout(v);
|
|
6344
6453
|
} else
|
|
6345
|
-
h(
|
|
6454
|
+
h(b.scrollHeight), b.getBoundingClientRect(), h(0);
|
|
6346
6455
|
}, [d]);
|
|
6347
6456
|
const T = () => {
|
|
6348
|
-
const
|
|
6349
|
-
l || c(
|
|
6457
|
+
const b = !d;
|
|
6458
|
+
l || c(b), a == null || a(b);
|
|
6350
6459
|
};
|
|
6351
6460
|
return /* @__PURE__ */ y(oe, { children: [
|
|
6352
|
-
/* @__PURE__ */ n("style", { children:
|
|
6461
|
+
/* @__PURE__ */ n("style", { children: Va }),
|
|
6353
6462
|
/* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", fontFamily: "var(--lucent-font-family-base)", fontSize: "var(--lucent-font-size-md)", ...i }, children: [
|
|
6354
6463
|
/* @__PURE__ */ y(
|
|
6355
6464
|
"button",
|
|
@@ -6372,7 +6481,7 @@ function Ki({ trigger: e, children: t, defaultOpen: r = !1, open: o, onOpenChang
|
|
|
6372
6481
|
},
|
|
6373
6482
|
children: [
|
|
6374
6483
|
/* @__PURE__ */ n("span", { style: { flex: 1 }, children: e }),
|
|
6375
|
-
/* @__PURE__ */ n(
|
|
6484
|
+
/* @__PURE__ */ n(ja, { open: d })
|
|
6376
6485
|
]
|
|
6377
6486
|
}
|
|
6378
6487
|
),
|
|
@@ -6401,7 +6510,7 @@ function Ki({ trigger: e, children: t, defaultOpen: r = !1, open: o, onOpenChang
|
|
|
6401
6510
|
] })
|
|
6402
6511
|
] });
|
|
6403
6512
|
}
|
|
6404
|
-
function
|
|
6513
|
+
function ja({ open: e }) {
|
|
6405
6514
|
return /* @__PURE__ */ n(
|
|
6406
6515
|
"svg",
|
|
6407
6516
|
{
|
|
@@ -6424,11 +6533,11 @@ function Oa({ open: e }) {
|
|
|
6424
6533
|
}
|
|
6425
6534
|
);
|
|
6426
6535
|
}
|
|
6427
|
-
const ge = "lucent-pl-no-scrollbar",
|
|
6536
|
+
const ge = "lucent-pl-no-scrollbar", Ua = `.${ge}{scrollbar-width:none}.${ge}::-webkit-scrollbar{display:none}`;
|
|
6428
6537
|
function Te(e) {
|
|
6429
6538
|
return typeof e == "number" ? `${e}px` : e;
|
|
6430
6539
|
}
|
|
6431
|
-
function
|
|
6540
|
+
function ts({
|
|
6432
6541
|
children: e,
|
|
6433
6542
|
header: t,
|
|
6434
6543
|
sidebar: r,
|
|
@@ -6444,7 +6553,7 @@ function Xi({
|
|
|
6444
6553
|
mainStyle: h,
|
|
6445
6554
|
style: m
|
|
6446
6555
|
}) {
|
|
6447
|
-
const T = Te(a),
|
|
6556
|
+
const T = Te(a), b = Te(o), p = Te(s), v = Te(u), k = f === "bgBase" ? "var(--lucent-bg-base)" : f === "bgSubtle" ? "var(--lucent-bg-subtle)" : "var(--lucent-surface)";
|
|
6448
6557
|
return /* @__PURE__ */ y(
|
|
6449
6558
|
"div",
|
|
6450
6559
|
{
|
|
@@ -6458,7 +6567,7 @@ function Xi({
|
|
|
6458
6567
|
...m
|
|
6459
6568
|
},
|
|
6460
6569
|
children: [
|
|
6461
|
-
/* @__PURE__ */ n("style", { children:
|
|
6570
|
+
/* @__PURE__ */ n("style", { children: Ua }),
|
|
6462
6571
|
t != null && /* @__PURE__ */ n(
|
|
6463
6572
|
"div",
|
|
6464
6573
|
{
|
|
@@ -6477,7 +6586,7 @@ function Xi({
|
|
|
6477
6586
|
{
|
|
6478
6587
|
className: ge,
|
|
6479
6588
|
style: {
|
|
6480
|
-
width: i ? 0 :
|
|
6589
|
+
width: i ? 0 : b,
|
|
6481
6590
|
flexShrink: 0,
|
|
6482
6591
|
overflow: "hidden",
|
|
6483
6592
|
overflowY: i ? "hidden" : "auto",
|
|
@@ -6526,7 +6635,7 @@ function Xi({
|
|
|
6526
6635
|
{
|
|
6527
6636
|
style: {
|
|
6528
6637
|
flexShrink: 0,
|
|
6529
|
-
height:
|
|
6638
|
+
height: v,
|
|
6530
6639
|
zIndex: 10,
|
|
6531
6640
|
background: k
|
|
6532
6641
|
},
|
|
@@ -6537,7 +6646,7 @@ function Xi({
|
|
|
6537
6646
|
}
|
|
6538
6647
|
);
|
|
6539
6648
|
}
|
|
6540
|
-
function
|
|
6649
|
+
function Ga({ state: e }) {
|
|
6541
6650
|
return /* @__PURE__ */ y(
|
|
6542
6651
|
"svg",
|
|
6543
6652
|
{
|
|
@@ -6580,7 +6689,7 @@ function ct({ dir: e }) {
|
|
|
6580
6689
|
}
|
|
6581
6690
|
) });
|
|
6582
6691
|
}
|
|
6583
|
-
function
|
|
6692
|
+
function ns({
|
|
6584
6693
|
columns: e,
|
|
6585
6694
|
rows: t,
|
|
6586
6695
|
pageSize: r = 10,
|
|
@@ -6590,36 +6699,36 @@ function Ji({
|
|
|
6590
6699
|
emptyState: l,
|
|
6591
6700
|
style: s
|
|
6592
6701
|
}) {
|
|
6593
|
-
const [c, d] = z(null), [u, f] = z(0), [h, m] = z(null), [T,
|
|
6594
|
-
if (!
|
|
6595
|
-
const L = T[
|
|
6702
|
+
const [c, d] = z(null), [u, f] = z(0), [h, m] = z(null), [T, b] = z({}), p = o !== void 0, v = p ? o : u, k = e.some((w) => w.filterable), x = k ? t.filter((w) => e.every((F) => {
|
|
6703
|
+
if (!F.filterable) return !0;
|
|
6704
|
+
const L = T[F.key];
|
|
6596
6705
|
if (!L || L.length === 0) return !0;
|
|
6597
|
-
const N = String(w[
|
|
6706
|
+
const N = String(w[F.key] ?? "");
|
|
6598
6707
|
return L.includes(N);
|
|
6599
|
-
})) : t, M = c ? [...x].sort((w,
|
|
6600
|
-
const L = w[c.key], N =
|
|
6708
|
+
})) : t, M = c ? [...x].sort((w, F) => {
|
|
6709
|
+
const L = w[c.key], N = F[c.key], U = String(L ?? "").localeCompare(String(N ?? ""), void 0, { numeric: !0 });
|
|
6601
6710
|
return c.dir === "asc" ? U : -U;
|
|
6602
|
-
}) : x, S = r > 0 ? M.slice(
|
|
6711
|
+
}) : x, S = r > 0 ? M.slice(v * r, (v + 1) * r) : M, A = r > 0 ? Math.max(1, Math.ceil(M.length / r)) : 1, R = (w) => {
|
|
6603
6712
|
p || f(w), a == null || a(w);
|
|
6604
6713
|
}, C = (w) => {
|
|
6605
|
-
d((
|
|
6606
|
-
}, D = (w,
|
|
6607
|
-
const L = { ...T, [w]:
|
|
6608
|
-
|
|
6714
|
+
d((F) => !F || F.key !== w ? { key: w, dir: "asc" } : F.dir === "asc" ? { key: w, dir: "desc" } : null), p || f(0), a == null || a(0);
|
|
6715
|
+
}, D = (w, F) => {
|
|
6716
|
+
const L = { ...T, [w]: F };
|
|
6717
|
+
F.length === 0 && delete L[w], b(L), p || f(0), a == null || a(0), i == null || i(L);
|
|
6609
6718
|
}, $ = () => {
|
|
6610
|
-
|
|
6719
|
+
b({}), p || f(0), a == null || a(0), i == null || i({});
|
|
6611
6720
|
}, W = [];
|
|
6612
6721
|
if (A <= 7)
|
|
6613
6722
|
for (let w = 0; w < A; w++) W.push(w);
|
|
6614
6723
|
else {
|
|
6615
|
-
W.push(0),
|
|
6616
|
-
for (let w = Math.max(1,
|
|
6724
|
+
W.push(0), v > 2 && W.push("…");
|
|
6725
|
+
for (let w = Math.max(1, v - 1); w <= Math.min(A - 2, v + 1); w++)
|
|
6617
6726
|
W.push(w);
|
|
6618
|
-
|
|
6727
|
+
v < A - 3 && W.push("…"), W.push(A - 1);
|
|
6619
6728
|
}
|
|
6620
6729
|
return /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
6621
6730
|
k && /* @__PURE__ */ n("div", { style: { position: "relative", zIndex: 1 }, children: /* @__PURE__ */ n(
|
|
6622
|
-
|
|
6731
|
+
_a,
|
|
6623
6732
|
{
|
|
6624
6733
|
columns: e,
|
|
6625
6734
|
rows: t,
|
|
@@ -6639,7 +6748,7 @@ function Ji({
|
|
|
6639
6748
|
fontSize: "var(--lucent-font-size-sm)"
|
|
6640
6749
|
}, children: [
|
|
6641
6750
|
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { style: { borderBottom: "1px solid var(--lucent-border-default)" }, children: e.map((w) => {
|
|
6642
|
-
const
|
|
6751
|
+
const F = (c == null ? void 0 : c.key) === w.key ? c.dir : "none";
|
|
6643
6752
|
return /* @__PURE__ */ n(
|
|
6644
6753
|
"th",
|
|
6645
6754
|
{
|
|
@@ -6658,7 +6767,7 @@ function Ji({
|
|
|
6658
6767
|
},
|
|
6659
6768
|
children: /* @__PURE__ */ y("span", { style: { display: "inline-flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6660
6769
|
w.header,
|
|
6661
|
-
w.sortable && /* @__PURE__ */ n(
|
|
6770
|
+
w.sortable && /* @__PURE__ */ n(Ga, { state: F })
|
|
6662
6771
|
] })
|
|
6663
6772
|
},
|
|
6664
6773
|
w.key
|
|
@@ -6671,14 +6780,14 @@ function Ji({
|
|
|
6671
6780
|
style: { padding: "var(--lucent-space-12)", textAlign: "center" },
|
|
6672
6781
|
children: l ?? /* @__PURE__ */ n(_, { color: "secondary", children: "No data" })
|
|
6673
6782
|
}
|
|
6674
|
-
) }) : S.map((w,
|
|
6783
|
+
) }) : S.map((w, F) => /* @__PURE__ */ n(
|
|
6675
6784
|
"tr",
|
|
6676
6785
|
{
|
|
6677
|
-
onMouseEnter: () => m(
|
|
6786
|
+
onMouseEnter: () => m(F),
|
|
6678
6787
|
onMouseLeave: () => m(null),
|
|
6679
6788
|
style: {
|
|
6680
|
-
borderBottom:
|
|
6681
|
-
background: h ===
|
|
6789
|
+
borderBottom: F < S.length - 1 ? "1px solid var(--lucent-border-subtle)" : "none",
|
|
6790
|
+
background: h === F ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
6682
6791
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
6683
6792
|
},
|
|
6684
6793
|
children: e.map((L) => /* @__PURE__ */ n(
|
|
@@ -6690,12 +6799,12 @@ function Ji({
|
|
|
6690
6799
|
textAlign: L.align ?? "left",
|
|
6691
6800
|
verticalAlign: "middle"
|
|
6692
6801
|
},
|
|
6693
|
-
children: L.render ? L.render(w,
|
|
6802
|
+
children: L.render ? L.render(w, F) : String(w[L.key] ?? "")
|
|
6694
6803
|
},
|
|
6695
6804
|
L.key
|
|
6696
6805
|
))
|
|
6697
6806
|
},
|
|
6698
|
-
|
|
6807
|
+
F
|
|
6699
6808
|
)) })
|
|
6700
6809
|
] }) }),
|
|
6701
6810
|
r > 0 && M.length > 0 && /* @__PURE__ */ y("div", { style: {
|
|
@@ -6705,29 +6814,29 @@ function Ji({
|
|
|
6705
6814
|
gap: "var(--lucent-space-3)",
|
|
6706
6815
|
flexWrap: "wrap"
|
|
6707
6816
|
}, children: [
|
|
6708
|
-
/* @__PURE__ */ n(_, { color: "secondary", size: "sm", children: M.length === 0 ? `0 rows${t.length > 0 ? ` (filtered from ${t.length})` : ""}` : M.length === 1 ? `1 row${M.length < t.length ? ` (filtered from ${t.length})` : ""}` : `${
|
|
6817
|
+
/* @__PURE__ */ n(_, { color: "secondary", size: "sm", children: M.length === 0 ? `0 rows${t.length > 0 ? ` (filtered from ${t.length})` : ""}` : M.length === 1 ? `1 row${M.length < t.length ? ` (filtered from ${t.length})` : ""}` : `${v * r + 1}–${Math.min((v + 1) * r, M.length)} of ${M.length} rows${M.length < t.length ? ` (filtered from ${t.length})` : ""}` }),
|
|
6709
6818
|
/* @__PURE__ */ y("div", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6710
6819
|
/* @__PURE__ */ n(
|
|
6711
6820
|
We,
|
|
6712
6821
|
{
|
|
6713
|
-
onClick: () => R(
|
|
6714
|
-
disabled:
|
|
6822
|
+
onClick: () => R(v - 1),
|
|
6823
|
+
disabled: v === 0,
|
|
6715
6824
|
"aria-label": "Previous page",
|
|
6716
6825
|
children: /* @__PURE__ */ n(ct, { dir: "left" })
|
|
6717
6826
|
}
|
|
6718
6827
|
),
|
|
6719
6828
|
W.map(
|
|
6720
|
-
(w,
|
|
6829
|
+
(w, F) => w === "…" ? /* @__PURE__ */ n("span", { style: {
|
|
6721
6830
|
padding: "0 var(--lucent-space-1)",
|
|
6722
6831
|
color: "var(--lucent-text-disabled)",
|
|
6723
6832
|
fontSize: "var(--lucent-font-size-sm)"
|
|
6724
|
-
}, children: "…" }, `ellipsis-${
|
|
6833
|
+
}, children: "…" }, `ellipsis-${F}`) : /* @__PURE__ */ n(
|
|
6725
6834
|
We,
|
|
6726
6835
|
{
|
|
6727
6836
|
onClick: () => R(w),
|
|
6728
|
-
active: w ===
|
|
6837
|
+
active: w === v,
|
|
6729
6838
|
"aria-label": `Page ${w + 1}`,
|
|
6730
|
-
"aria-current": w ===
|
|
6839
|
+
"aria-current": w === v ? "page" : void 0,
|
|
6731
6840
|
children: w + 1
|
|
6732
6841
|
},
|
|
6733
6842
|
w
|
|
@@ -6736,8 +6845,8 @@ function Ji({
|
|
|
6736
6845
|
/* @__PURE__ */ n(
|
|
6737
6846
|
We,
|
|
6738
6847
|
{
|
|
6739
|
-
onClick: () => R(
|
|
6740
|
-
disabled:
|
|
6848
|
+
onClick: () => R(v + 1),
|
|
6849
|
+
disabled: v >= A - 1,
|
|
6741
6850
|
"aria-label": "Next page",
|
|
6742
6851
|
children: /* @__PURE__ */ n(ct, { dir: "right" })
|
|
6743
6852
|
}
|
|
@@ -6746,7 +6855,7 @@ function Ji({
|
|
|
6746
6855
|
] })
|
|
6747
6856
|
] });
|
|
6748
6857
|
}
|
|
6749
|
-
function
|
|
6858
|
+
function _a({
|
|
6750
6859
|
columns: e,
|
|
6751
6860
|
rows: t,
|
|
6752
6861
|
filters: r,
|
|
@@ -6760,7 +6869,7 @@ function ja({
|
|
|
6760
6869
|
new Set(t.map((d) => String(d[s.key] ?? "")))
|
|
6761
6870
|
).sort();
|
|
6762
6871
|
return /* @__PURE__ */ n(
|
|
6763
|
-
|
|
6872
|
+
Ya,
|
|
6764
6873
|
{
|
|
6765
6874
|
label: s.header,
|
|
6766
6875
|
values: c,
|
|
@@ -6792,7 +6901,7 @@ function ja({
|
|
|
6792
6901
|
)
|
|
6793
6902
|
] });
|
|
6794
6903
|
}
|
|
6795
|
-
function
|
|
6904
|
+
function Ya({
|
|
6796
6905
|
label: e,
|
|
6797
6906
|
values: t,
|
|
6798
6907
|
value: r,
|
|
@@ -6810,14 +6919,14 @@ function Ua({
|
|
|
6810
6919
|
}, 0);
|
|
6811
6920
|
const p = (k) => {
|
|
6812
6921
|
u.current && !u.current.contains(k.target) && i(!1);
|
|
6813
|
-
},
|
|
6922
|
+
}, v = (k) => {
|
|
6814
6923
|
k.key === "Escape" && i(!1);
|
|
6815
6924
|
};
|
|
6816
|
-
return document.addEventListener("mousedown", p), document.addEventListener("keydown",
|
|
6817
|
-
document.removeEventListener("mousedown", p), document.removeEventListener("keydown",
|
|
6925
|
+
return document.addEventListener("mousedown", p), document.addEventListener("keydown", v), () => {
|
|
6926
|
+
document.removeEventListener("mousedown", p), document.removeEventListener("keydown", v);
|
|
6818
6927
|
};
|
|
6819
6928
|
}, [a]);
|
|
6820
|
-
const m = c ? t.filter((p) => p.toLowerCase().includes(c.toLowerCase())) : t, T = (p) => o(r.includes(p) ? r.filter((
|
|
6929
|
+
const m = c ? t.filter((p) => p.toLowerCase().includes(c.toLowerCase())) : t, T = (p) => o(r.includes(p) ? r.filter((v) => v !== p) : [...r, p]), b = r.length === 0 ? null : r.length === 1 ? /* @__PURE__ */ y("span", { style: { color: "var(--lucent-text-secondary)", fontWeight: "var(--lucent-font-weight-regular)" }, children: [
|
|
6821
6930
|
": ",
|
|
6822
6931
|
r[0]
|
|
6823
6932
|
] }) : /* @__PURE__ */ y("span", { style: { color: "var(--lucent-accent-default)" }, children: [
|
|
@@ -6852,7 +6961,7 @@ function Ua({
|
|
|
6852
6961
|
},
|
|
6853
6962
|
children: [
|
|
6854
6963
|
e,
|
|
6855
|
-
|
|
6964
|
+
b,
|
|
6856
6965
|
/* @__PURE__ */ n(
|
|
6857
6966
|
"svg",
|
|
6858
6967
|
{
|
|
@@ -6931,7 +7040,7 @@ function Ua({
|
|
|
6931
7040
|
fontSize: "var(--lucent-font-size-xs)",
|
|
6932
7041
|
textAlign: "center"
|
|
6933
7042
|
}, children: "No results" }) : m.map((p) => /* @__PURE__ */ n(
|
|
6934
|
-
|
|
7043
|
+
Ka,
|
|
6935
7044
|
{
|
|
6936
7045
|
label: p,
|
|
6937
7046
|
isSelected: r.includes(p),
|
|
@@ -6942,7 +7051,7 @@ function Ua({
|
|
|
6942
7051
|
] })
|
|
6943
7052
|
] });
|
|
6944
7053
|
}
|
|
6945
|
-
function
|
|
7054
|
+
function Ka({ label: e, isSelected: t, onClick: r }) {
|
|
6946
7055
|
const [o, a] = z(!1);
|
|
6947
7056
|
return /* @__PURE__ */ y(
|
|
6948
7057
|
"button",
|
|
@@ -7023,7 +7132,7 @@ function We({
|
|
|
7023
7132
|
}
|
|
7024
7133
|
);
|
|
7025
7134
|
}
|
|
7026
|
-
const
|
|
7135
|
+
const as = {
|
|
7027
7136
|
id: "data-table",
|
|
7028
7137
|
name: "DataTable",
|
|
7029
7138
|
tier: "molecule",
|
|
@@ -7132,18 +7241,18 @@ const Zi = {
|
|
|
7132
7241
|
keyboardInteractions: ["Tab to pagination controls", "Enter/Space to activate buttons"],
|
|
7133
7242
|
notes: 'Column headers with sortable:true are interactive buttons with aria-sort reflecting the current sort direction. Pagination buttons include aria-label and aria-current="page" for the active page.'
|
|
7134
7243
|
}
|
|
7135
|
-
},
|
|
7244
|
+
}, Xa = `
|
|
7136
7245
|
@keyframes lucent-palette-in {
|
|
7137
7246
|
from { opacity: 0; transform: scale(0.96) translateY(-8px); }
|
|
7138
7247
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
7139
7248
|
}
|
|
7140
7249
|
`;
|
|
7141
|
-
function
|
|
7250
|
+
function Ja(e, t) {
|
|
7142
7251
|
var o;
|
|
7143
7252
|
const r = t.toLowerCase();
|
|
7144
7253
|
return e.label.toLowerCase().includes(r) || (((o = e.description) == null ? void 0 : o.toLowerCase().includes(r)) ?? !1);
|
|
7145
7254
|
}
|
|
7146
|
-
function
|
|
7255
|
+
function rs({
|
|
7147
7256
|
commands: e,
|
|
7148
7257
|
placeholder: t = "Search commands…",
|
|
7149
7258
|
shortcutKey: r = "k",
|
|
@@ -7151,37 +7260,37 @@ function Qi({
|
|
|
7151
7260
|
onOpenChange: a,
|
|
7152
7261
|
style: i
|
|
7153
7262
|
}) {
|
|
7154
|
-
const l = o !== void 0, [s, c] = z(!1), d = l ? o : s, [u, f] = z(""), [h, m] = z(0), T = V(null),
|
|
7263
|
+
const l = o !== void 0, [s, c] = z(!1), d = l ? o : s, [u, f] = z(""), [h, m] = z(0), T = V(null), b = V(null), p = V(!1);
|
|
7155
7264
|
if (!p.current) {
|
|
7156
7265
|
const C = document.createElement("style");
|
|
7157
|
-
C.textContent =
|
|
7266
|
+
C.textContent = Xa, document.head.appendChild(C), p.current = !0;
|
|
7158
7267
|
}
|
|
7159
|
-
const
|
|
7268
|
+
const v = ee((C) => {
|
|
7160
7269
|
l || c(C), a == null || a(C);
|
|
7161
7270
|
}, [l, a]);
|
|
7162
7271
|
X(() => {
|
|
7163
7272
|
const C = (D) => {
|
|
7164
|
-
(D.metaKey || D.ctrlKey) && D.key === r && (D.preventDefault(),
|
|
7273
|
+
(D.metaKey || D.ctrlKey) && D.key === r && (D.preventDefault(), v(!d));
|
|
7165
7274
|
};
|
|
7166
7275
|
return window.addEventListener("keydown", C), () => window.removeEventListener("keydown", C);
|
|
7167
|
-
}, [d, r,
|
|
7276
|
+
}, [d, r, v]), X(() => {
|
|
7168
7277
|
d && (f(""), m(0), setTimeout(() => {
|
|
7169
7278
|
var C;
|
|
7170
7279
|
return (C = T.current) == null ? void 0 : C.focus();
|
|
7171
7280
|
}, 10));
|
|
7172
7281
|
}, [d]);
|
|
7173
|
-
const k = u ? e.filter((C) =>
|
|
7282
|
+
const k = u ? e.filter((C) => Ja(C, u)) : e, x = k.filter((C) => !C.disabled);
|
|
7174
7283
|
X(() => {
|
|
7175
|
-
const C =
|
|
7284
|
+
const C = b.current;
|
|
7176
7285
|
if (!C) return;
|
|
7177
7286
|
const D = C.querySelector('[data-active="true"]');
|
|
7178
7287
|
D == null || D.scrollIntoView({ block: "nearest" });
|
|
7179
7288
|
}, [h]);
|
|
7180
7289
|
const M = (C) => {
|
|
7181
|
-
C.disabled || (C.onSelect(),
|
|
7290
|
+
C.disabled || (C.onSelect(), v(!1));
|
|
7182
7291
|
}, S = (C) => {
|
|
7183
7292
|
if (C.key === "Escape") {
|
|
7184
|
-
|
|
7293
|
+
v(!1);
|
|
7185
7294
|
return;
|
|
7186
7295
|
}
|
|
7187
7296
|
if (C.key === "ArrowDown")
|
|
@@ -7205,7 +7314,7 @@ function Qi({
|
|
|
7205
7314
|
role: "dialog",
|
|
7206
7315
|
"aria-label": "Command palette",
|
|
7207
7316
|
"aria-modal": "true",
|
|
7208
|
-
onClick: () =>
|
|
7317
|
+
onClick: () => v(!1),
|
|
7209
7318
|
style: {
|
|
7210
7319
|
position: "fixed",
|
|
7211
7320
|
inset: 0,
|
|
@@ -7283,7 +7392,7 @@ function Qi({
|
|
|
7283
7392
|
{
|
|
7284
7393
|
id: "lucent-command-list",
|
|
7285
7394
|
role: "listbox",
|
|
7286
|
-
ref:
|
|
7395
|
+
ref: b,
|
|
7287
7396
|
style: { maxHeight: 360, overflowY: "auto", padding: "var(--lucent-space-1) var(--lucent-space-2)" },
|
|
7288
7397
|
children: k.length === 0 ? /* @__PURE__ */ n("div", { style: { padding: "var(--lucent-space-8)", textAlign: "center" }, children: /* @__PURE__ */ y(_, { color: "secondary", children: [
|
|
7289
7398
|
'No results for "',
|
|
@@ -7296,14 +7405,14 @@ function Qi({
|
|
|
7296
7405
|
}, children: /* @__PURE__ */ n(_, { size: "xs", color: "secondary", weight: "medium", children: C }) }),
|
|
7297
7406
|
D.map((W) => {
|
|
7298
7407
|
const w = W.disabled ?? !1;
|
|
7299
|
-
let
|
|
7300
|
-
return w || (
|
|
7408
|
+
let F = !1;
|
|
7409
|
+
return w || (F = R === h, R++), /* @__PURE__ */ y(
|
|
7301
7410
|
"div",
|
|
7302
7411
|
{
|
|
7303
7412
|
role: "option",
|
|
7304
|
-
"aria-selected":
|
|
7413
|
+
"aria-selected": F,
|
|
7305
7414
|
"aria-disabled": w,
|
|
7306
|
-
"data-active":
|
|
7415
|
+
"data-active": F,
|
|
7307
7416
|
onClick: () => M(W),
|
|
7308
7417
|
onMouseEnter: () => {
|
|
7309
7418
|
if (!w) {
|
|
@@ -7318,7 +7427,7 @@ function Qi({
|
|
|
7318
7427
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
7319
7428
|
borderRadius: "var(--lucent-radius-md)",
|
|
7320
7429
|
cursor: w ? "not-allowed" : "pointer",
|
|
7321
|
-
background:
|
|
7430
|
+
background: F ? "color-mix(in srgb, var(--lucent-accent-default) 20%, var(--lucent-surface-secondary))" : "transparent",
|
|
7322
7431
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
7323
7432
|
opacity: w ? 0.5 : 1
|
|
7324
7433
|
},
|
|
@@ -7356,7 +7465,7 @@ function Qi({
|
|
|
7356
7465
|
}
|
|
7357
7466
|
);
|
|
7358
7467
|
}
|
|
7359
|
-
const
|
|
7468
|
+
const os = {
|
|
7360
7469
|
id: "command-palette",
|
|
7361
7470
|
name: "CommandPalette",
|
|
7362
7471
|
tier: "overlay",
|
|
@@ -7438,15 +7547,15 @@ const es = {
|
|
|
7438
7547
|
keyboardInteractions: ["⌘K / Ctrl+K to open", "↑↓ to navigate", "Enter to select", "Escape to close"],
|
|
7439
7548
|
notes: 'The backdrop and panel use role="dialog" with aria-modal="true". The input is role="searchbox". The result list is role="listbox" with role="option" items. Focus is moved to the search input on open.'
|
|
7440
7549
|
}
|
|
7441
|
-
},
|
|
7550
|
+
}, Za = {
|
|
7442
7551
|
sm: "calc(var(--lucent-space-8) * 0.5 + 16px + 2px)",
|
|
7443
7552
|
md: "calc(var(--lucent-space-10) * 0.5 + 20px + 2px)",
|
|
7444
7553
|
lg: "calc(var(--lucent-space-12) * 0.5 + 24px + 2px)"
|
|
7445
|
-
},
|
|
7554
|
+
}, Qa = {
|
|
7446
7555
|
sm: "var(--lucent-font-size-sm)",
|
|
7447
7556
|
md: "var(--lucent-font-size-md)",
|
|
7448
7557
|
lg: "var(--lucent-font-size-lg)"
|
|
7449
|
-
},
|
|
7558
|
+
}, er = {
|
|
7450
7559
|
sm: "var(--lucent-space-1) var(--lucent-space-2)",
|
|
7451
7560
|
md: "var(--lucent-space-1) var(--lucent-space-2)",
|
|
7452
7561
|
lg: "var(--lucent-space-2) var(--lucent-space-3)"
|
|
@@ -7458,8 +7567,8 @@ const es = {
|
|
|
7458
7567
|
sm: "var(--lucent-font-size-sm)",
|
|
7459
7568
|
md: "var(--lucent-font-size-sm)",
|
|
7460
7569
|
lg: "var(--lucent-font-size-md)"
|
|
7461
|
-
}, dt = { sm: "sm", md: "md", lg: "lg" },
|
|
7462
|
-
function
|
|
7570
|
+
}, dt = { sm: "sm", md: "md", lg: "lg" }, tr = { sm: "sm", md: "md", lg: "lg" };
|
|
7571
|
+
function is({
|
|
7463
7572
|
options: e,
|
|
7464
7573
|
value: t,
|
|
7465
7574
|
defaultValue: r = [],
|
|
@@ -7473,39 +7582,39 @@ function ts({
|
|
|
7473
7582
|
errorText: u,
|
|
7474
7583
|
style: f
|
|
7475
7584
|
}) {
|
|
7476
|
-
const h = t !== void 0, [m, T] = z(r),
|
|
7585
|
+
const h = t !== void 0, [m, T] = z(r), b = h ? t : m, [p, v] = z(!1), [k, x] = z(""), [M, S] = z(0), [A, R] = z(!1), C = V(null), D = V(null), $ = V(null), W = V(null), [w, F] = z({ top: 0, left: 0, width: 0 }), L = be();
|
|
7477
7586
|
X(() => {
|
|
7478
7587
|
if (!p) return;
|
|
7479
7588
|
const g = (E) => {
|
|
7480
7589
|
var O, Y;
|
|
7481
|
-
!((O = C.current) != null && O.contains(E.target)) && !((Y = W.current) != null && Y.contains(E.target)) && (
|
|
7590
|
+
!((O = C.current) != null && O.contains(E.target)) && !((Y = W.current) != null && Y.contains(E.target)) && (v(!1), x(""));
|
|
7482
7591
|
};
|
|
7483
7592
|
return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
|
|
7484
7593
|
}, [p]), se(() => {
|
|
7485
7594
|
if (!p || !$.current) return;
|
|
7486
7595
|
const g = $.current.getBoundingClientRect();
|
|
7487
|
-
|
|
7488
|
-
}, [p,
|
|
7596
|
+
F({ top: g.bottom + 4, left: g.left, width: g.width });
|
|
7597
|
+
}, [p, b, k]);
|
|
7489
7598
|
const N = (g) => {
|
|
7490
|
-
const E =
|
|
7599
|
+
const E = b.includes(g) ? b.filter((O) => O !== g) : l !== void 0 && b.length >= l ? b : [...b, g];
|
|
7491
7600
|
h || T(E), o == null || o(E);
|
|
7492
7601
|
}, U = (g) => {
|
|
7493
|
-
const E =
|
|
7602
|
+
const E = b.filter((O) => O !== g);
|
|
7494
7603
|
h || T(E), o == null || o(E);
|
|
7495
7604
|
}, Z = e.filter(
|
|
7496
7605
|
(g) => g.label.toLowerCase().includes(k.toLowerCase())
|
|
7497
7606
|
), J = (g) => {
|
|
7498
7607
|
if (g.key === "Escape") {
|
|
7499
|
-
|
|
7608
|
+
v(!1), x("");
|
|
7500
7609
|
return;
|
|
7501
7610
|
}
|
|
7502
|
-
if (g.key === "ArrowDown" && (g.preventDefault(),
|
|
7611
|
+
if (g.key === "ArrowDown" && (g.preventDefault(), v(!0), S((E) => Math.min(E + 1, Z.length - 1))), g.key === "ArrowUp" && (g.preventDefault(), S((E) => Math.max(E - 1, 0))), g.key === "Enter") {
|
|
7503
7612
|
g.preventDefault();
|
|
7504
7613
|
const E = Z[M];
|
|
7505
7614
|
E && !E.disabled && N(E.value);
|
|
7506
7615
|
}
|
|
7507
|
-
g.key === "Backspace" && k === "" &&
|
|
7508
|
-
}, B = l !== void 0 &&
|
|
7616
|
+
g.key === "Backspace" && k === "" && b.length > 0 && U(b[b.length - 1]);
|
|
7617
|
+
}, B = l !== void 0 && b.length >= l, I = !!u, q = i ? "var(--lucent-border-default)" : I ? "var(--lucent-danger-default)" : A ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", P = A ? `0 0 0 3px ${I ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", j = `lucent-multiselect-${be()}`;
|
|
7509
7618
|
return /* @__PURE__ */ y("div", { ref: C, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...f }, children: [
|
|
7510
7619
|
c && /* @__PURE__ */ n(
|
|
7511
7620
|
"label",
|
|
@@ -7526,27 +7635,27 @@ function ts({
|
|
|
7526
7635
|
{
|
|
7527
7636
|
onClick: () => {
|
|
7528
7637
|
var g;
|
|
7529
|
-
i || (
|
|
7638
|
+
i || (v(!0), (g = D.current) == null || g.focus());
|
|
7530
7639
|
},
|
|
7531
7640
|
style: {
|
|
7532
7641
|
display: "flex",
|
|
7533
7642
|
flexWrap: "wrap",
|
|
7534
7643
|
alignItems: "center",
|
|
7535
7644
|
gap: Ce[s],
|
|
7536
|
-
minHeight:
|
|
7645
|
+
minHeight: Za[s],
|
|
7537
7646
|
boxSizing: "border-box",
|
|
7538
|
-
padding:
|
|
7647
|
+
padding: er[s],
|
|
7539
7648
|
borderRadius: "var(--lucent-radius-lg)",
|
|
7540
7649
|
border: `1px solid ${q}`,
|
|
7541
7650
|
background: i ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
7542
7651
|
cursor: i ? "not-allowed" : "text",
|
|
7543
7652
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
7544
|
-
boxShadow:
|
|
7653
|
+
boxShadow: P
|
|
7545
7654
|
},
|
|
7546
7655
|
children: [
|
|
7547
|
-
|
|
7656
|
+
b.map((g) => {
|
|
7548
7657
|
const E = e.find((O) => O.value === g);
|
|
7549
|
-
return E ? /* @__PURE__ */ n(un, { size:
|
|
7658
|
+
return E ? /* @__PURE__ */ n(un, { size: tr[s], onDismiss: () => U(g), disabled: i, children: E.label }, g) : null;
|
|
7550
7659
|
}),
|
|
7551
7660
|
/* @__PURE__ */ n(
|
|
7552
7661
|
"input",
|
|
@@ -7555,13 +7664,13 @@ function ts({
|
|
|
7555
7664
|
ref: D,
|
|
7556
7665
|
value: k,
|
|
7557
7666
|
onChange: (g) => {
|
|
7558
|
-
x(g.target.value),
|
|
7667
|
+
x(g.target.value), v(!0), S(0);
|
|
7559
7668
|
},
|
|
7560
7669
|
onKeyDown: J,
|
|
7561
7670
|
onFocus: () => R(!0),
|
|
7562
7671
|
onBlur: () => R(!1),
|
|
7563
7672
|
disabled: i,
|
|
7564
|
-
placeholder:
|
|
7673
|
+
placeholder: b.length === 0 ? a : "",
|
|
7565
7674
|
"aria-autocomplete": "list",
|
|
7566
7675
|
"aria-controls": L,
|
|
7567
7676
|
"aria-expanded": p,
|
|
@@ -7574,10 +7683,10 @@ function ts({
|
|
|
7574
7683
|
outline: "none",
|
|
7575
7684
|
background: "transparent",
|
|
7576
7685
|
fontFamily: "var(--lucent-font-family-base)",
|
|
7577
|
-
fontSize:
|
|
7686
|
+
fontSize: Qa[s],
|
|
7578
7687
|
color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
7579
7688
|
cursor: i ? "not-allowed" : "text",
|
|
7580
|
-
padding:
|
|
7689
|
+
padding: b.length === 0 ? "2px 0 2px var(--lucent-space-1)" : "2px 0"
|
|
7581
7690
|
}
|
|
7582
7691
|
}
|
|
7583
7692
|
)
|
|
@@ -7610,7 +7719,7 @@ function ts({
|
|
|
7610
7719
|
},
|
|
7611
7720
|
children: [
|
|
7612
7721
|
Z.length === 0 ? /* @__PURE__ */ n("div", { style: { padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ n(_, { color: "secondary", size: dt[s], children: "No options" }) }) : Z.map((g, E) => {
|
|
7613
|
-
const O =
|
|
7722
|
+
const O = b.includes(g.value), Y = E === M, H = g.disabled ?? !1, G = B && !O;
|
|
7614
7723
|
return /* @__PURE__ */ y(
|
|
7615
7724
|
"div",
|
|
7616
7725
|
{
|
|
@@ -7690,7 +7799,7 @@ function ts({
|
|
|
7690
7799
|
)
|
|
7691
7800
|
] });
|
|
7692
7801
|
}
|
|
7693
|
-
const
|
|
7802
|
+
const ss = {
|
|
7694
7803
|
id: "multi-select",
|
|
7695
7804
|
name: "MultiSelect",
|
|
7696
7805
|
tier: "molecule",
|
|
@@ -7795,10 +7904,10 @@ const ns = {
|
|
|
7795
7904
|
notes: 'The input carries role="combobox" with aria-expanded and aria-controls pointing to the listbox. Each option has role="option" with aria-selected. Remove buttons on tags have descriptive aria-label.'
|
|
7796
7905
|
}
|
|
7797
7906
|
};
|
|
7798
|
-
function
|
|
7907
|
+
function nr(e, t) {
|
|
7799
7908
|
return new Date(e, t + 1, 0).getDate();
|
|
7800
7909
|
}
|
|
7801
|
-
function
|
|
7910
|
+
function ar(e, t) {
|
|
7802
7911
|
return new Date(e, t, 1).getDay();
|
|
7803
7912
|
}
|
|
7804
7913
|
function Be(e, t) {
|
|
@@ -7810,7 +7919,7 @@ function Re(e, t) {
|
|
|
7810
7919
|
function ut(e, t) {
|
|
7811
7920
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate()) > new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
7812
7921
|
}
|
|
7813
|
-
const
|
|
7922
|
+
const rr = [
|
|
7814
7923
|
"January",
|
|
7815
7924
|
"February",
|
|
7816
7925
|
"March",
|
|
@@ -7823,11 +7932,11 @@ const tr = [
|
|
|
7823
7932
|
"October",
|
|
7824
7933
|
"November",
|
|
7825
7934
|
"December"
|
|
7826
|
-
],
|
|
7827
|
-
function
|
|
7935
|
+
], or = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
7936
|
+
function ve(e) {
|
|
7828
7937
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
7829
7938
|
}
|
|
7830
|
-
const
|
|
7939
|
+
const ir = { sm: "calc(var(--lucent-space-8) * 0.5 + 18px)", md: "calc(var(--lucent-space-10) * 0.5 + 22px)", lg: "calc(var(--lucent-space-12) * 0.5 + 26px)" }, sr = {
|
|
7831
7940
|
sm: "var(--lucent-font-size-sm)",
|
|
7832
7941
|
md: "var(--lucent-font-size-md)",
|
|
7833
7942
|
lg: "var(--lucent-font-size-md)"
|
|
@@ -7835,17 +7944,17 @@ const ar = { sm: "calc(var(--lucent-space-8) * 0.5 + 18px)", md: "calc(var(--luc
|
|
|
7835
7944
|
sm: "var(--lucent-font-size-sm)",
|
|
7836
7945
|
md: "var(--lucent-font-size-sm)",
|
|
7837
7946
|
lg: "var(--lucent-font-size-md)"
|
|
7838
|
-
},
|
|
7947
|
+
}, lr = {
|
|
7839
7948
|
sm: "var(--lucent-space-3)",
|
|
7840
7949
|
md: "var(--lucent-space-4)",
|
|
7841
7950
|
lg: "var(--lucent-space-4)"
|
|
7842
|
-
},
|
|
7951
|
+
}, cr = {
|
|
7843
7952
|
sm: "var(--lucent-space-2)",
|
|
7844
7953
|
md: "calc((var(--lucent-space-2) + var(--lucent-space-3)) / 2)",
|
|
7845
7954
|
lg: "var(--lucent-space-3)"
|
|
7846
|
-
},
|
|
7955
|
+
}, dr = { sm: 28, md: 32, lg: 38 }, ur = { sm: "var(--lucent-font-size-xs)", md: "var(--lucent-font-size-sm)", lg: "var(--lucent-font-size-md)" }, pr = { sm: "xs", md: "sm", lg: "md" }, fr = { sm: "xs", md: "xs", lg: "sm" }, hr = { sm: 24, md: 28, lg: 32 }, mr = { sm: 14, md: 16, lg: 18 }, It = { sm: "var(--lucent-space-3)", md: "var(--lucent-space-4)", lg: "var(--lucent-space-5)" }, Ye = { sm: 220, md: 260, lg: 300 };
|
|
7847
7956
|
function pt({ dir: e, onClick: t, disabled: r, size: o = "md" }) {
|
|
7848
|
-
const [a, i] = z(!1), l =
|
|
7957
|
+
const [a, i] = z(!1), l = hr[o], s = mr[o];
|
|
7849
7958
|
return /* @__PURE__ */ n(
|
|
7850
7959
|
"button",
|
|
7851
7960
|
{
|
|
@@ -7895,25 +8004,25 @@ function Ke({
|
|
|
7895
8004
|
onDayHover: u,
|
|
7896
8005
|
size: f = "md"
|
|
7897
8006
|
}) {
|
|
7898
|
-
const h =
|
|
8007
|
+
const h = nr(e, t), m = ar(e, t), [T, b] = z(null), p = [
|
|
7899
8008
|
...Array(m).fill(null),
|
|
7900
|
-
...Array.from({ length: h }, (
|
|
8009
|
+
...Array.from({ length: h }, (v, k) => k + 1)
|
|
7901
8010
|
];
|
|
7902
8011
|
for (; p.length % 7 !== 0; ) p.push(null);
|
|
7903
8012
|
return /* @__PURE__ */ y("div", { children: [
|
|
7904
8013
|
/* @__PURE__ */ y("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "var(--lucent-space-3)" }, children: [
|
|
7905
8014
|
/* @__PURE__ */ n(pt, { dir: "prev", onClick: s, size: f }),
|
|
7906
|
-
/* @__PURE__ */ y(_, { weight: "medium", size:
|
|
7907
|
-
|
|
8015
|
+
/* @__PURE__ */ y(_, { weight: "medium", size: pr[f], children: [
|
|
8016
|
+
rr[t],
|
|
7908
8017
|
" ",
|
|
7909
8018
|
e
|
|
7910
8019
|
] }),
|
|
7911
8020
|
/* @__PURE__ */ n(pt, { dir: "next", onClick: c, size: f })
|
|
7912
8021
|
] }),
|
|
7913
|
-
/* @__PURE__ */ n("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children:
|
|
7914
|
-
/* @__PURE__ */ n("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: p.map((
|
|
7915
|
-
if (!
|
|
7916
|
-
const x = new Date(e, t,
|
|
8022
|
+
/* @__PURE__ */ n("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children: or.map((v) => /* @__PURE__ */ n("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ n(_, { size: fr[f], color: "secondary", children: v }) }, v)) }),
|
|
8023
|
+
/* @__PURE__ */ n("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: p.map((v, k) => {
|
|
8024
|
+
if (!v) return /* @__PURE__ */ n("div", {}, k);
|
|
8025
|
+
const x = new Date(e, t, v), M = r ? Be(x, r) : !1, S = Be(x, o), A = (a ? Re(x, a) : !1) || (i ? ut(x, i) : !1);
|
|
7917
8026
|
let R = !1;
|
|
7918
8027
|
return d != null && d.start && (d != null && d.end) && (R = !Re(x, d.start) && !ut(x, d.end)), /* @__PURE__ */ n(
|
|
7919
8028
|
"button",
|
|
@@ -7922,37 +8031,37 @@ function Ke({
|
|
|
7922
8031
|
disabled: A,
|
|
7923
8032
|
onClick: () => !A && l(x),
|
|
7924
8033
|
onMouseEnter: () => {
|
|
7925
|
-
v
|
|
8034
|
+
b(v), u == null || u(x);
|
|
7926
8035
|
},
|
|
7927
8036
|
onMouseLeave: () => {
|
|
7928
|
-
|
|
8037
|
+
b(null), u == null || u(null);
|
|
7929
8038
|
},
|
|
7930
|
-
"aria-label":
|
|
8039
|
+
"aria-label": ve(x),
|
|
7931
8040
|
"aria-pressed": M,
|
|
7932
8041
|
style: {
|
|
7933
8042
|
display: "flex",
|
|
7934
8043
|
alignItems: "center",
|
|
7935
8044
|
justifyContent: "center",
|
|
7936
|
-
height:
|
|
8045
|
+
height: dr[f],
|
|
7937
8046
|
width: "100%",
|
|
7938
8047
|
border: S && !M ? "1px solid var(--lucent-border-strong)" : "1px solid transparent",
|
|
7939
8048
|
borderRadius: "var(--lucent-radius-md)",
|
|
7940
|
-
background: M ? "var(--lucent-accent-default)" : R ? "var(--lucent-accent-subtle)" : T ===
|
|
8049
|
+
background: M ? "var(--lucent-accent-default)" : R ? "var(--lucent-accent-subtle)" : T === v && !A ? "color-mix(in srgb, var(--lucent-accent-default) 20%, var(--lucent-surface-secondary))" : "transparent",
|
|
7941
8050
|
color: M ? "var(--lucent-text-on-accent)" : A ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
7942
|
-
fontSize:
|
|
8051
|
+
fontSize: ur[f],
|
|
7943
8052
|
fontFamily: "var(--lucent-font-family-base)",
|
|
7944
8053
|
fontWeight: S ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
7945
8054
|
cursor: A ? "not-allowed" : "pointer",
|
|
7946
8055
|
transition: "background var(--lucent-duration-fast)"
|
|
7947
8056
|
},
|
|
7948
|
-
children:
|
|
8057
|
+
children: v
|
|
7949
8058
|
},
|
|
7950
8059
|
k
|
|
7951
8060
|
);
|
|
7952
8061
|
}) })
|
|
7953
8062
|
] });
|
|
7954
8063
|
}
|
|
7955
|
-
function
|
|
8064
|
+
function ls({
|
|
7956
8065
|
value: e,
|
|
7957
8066
|
defaultValue: t,
|
|
7958
8067
|
onChange: r,
|
|
@@ -7966,12 +8075,12 @@ function as({
|
|
|
7966
8075
|
errorText: u,
|
|
7967
8076
|
style: f
|
|
7968
8077
|
}) {
|
|
7969
|
-
const h = e !== void 0, [m, T] = z(t),
|
|
8078
|
+
const h = e !== void 0, [m, T] = z(t), b = h ? e : m, p = !!u, v = a, k = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, x = /* @__PURE__ */ new Date(), [M, S] = z((b ?? x).getFullYear()), [A, R] = z((b ?? x).getMonth()), [C, D] = z(!1), [$, W] = z(!1), w = V(null), F = V(null), [L, N] = z({ top: 0, left: 0 });
|
|
7970
8079
|
X(() => {
|
|
7971
8080
|
if (!C) return;
|
|
7972
|
-
const q = (
|
|
8081
|
+
const q = (P) => {
|
|
7973
8082
|
var j, g;
|
|
7974
|
-
!((j = w.current) != null && j.contains(
|
|
8083
|
+
!((j = w.current) != null && j.contains(P.target)) && !((g = F.current) != null && g.contains(P.target)) && D(!1);
|
|
7975
8084
|
};
|
|
7976
8085
|
return document.addEventListener("mousedown", q), () => document.removeEventListener("mousedown", q);
|
|
7977
8086
|
}, [C]), se(() => {
|
|
@@ -7985,7 +8094,7 @@ function as({
|
|
|
7985
8094
|
A === 0 ? (R(11), S((q) => q - 1)) : R((q) => q - 1);
|
|
7986
8095
|
}, J = () => {
|
|
7987
8096
|
A === 11 ? (R(0), S((q) => q + 1)) : R((q) => q + 1);
|
|
7988
|
-
}, B =
|
|
8097
|
+
}, B = v ? "transparent" : p ? "var(--lucent-danger-default)" : $ ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", I = $ ? `0 0 0 3px ${p ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7989
8098
|
return /* @__PURE__ */ y("div", { ref: w, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...f }, children: [
|
|
7990
8099
|
c && /* @__PURE__ */ n(
|
|
7991
8100
|
"label",
|
|
@@ -7994,7 +8103,7 @@ function as({
|
|
|
7994
8103
|
style: {
|
|
7995
8104
|
fontSize: He[s],
|
|
7996
8105
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
7997
|
-
color:
|
|
8106
|
+
color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
7998
8107
|
fontFamily: "var(--lucent-font-family-base)"
|
|
7999
8108
|
},
|
|
8000
8109
|
children: c
|
|
@@ -8015,19 +8124,19 @@ function as({
|
|
|
8015
8124
|
style: {
|
|
8016
8125
|
display: "flex",
|
|
8017
8126
|
alignItems: "center",
|
|
8018
|
-
gap:
|
|
8127
|
+
gap: cr[s],
|
|
8019
8128
|
width: "100%",
|
|
8020
|
-
height:
|
|
8129
|
+
height: ir[s],
|
|
8021
8130
|
boxSizing: "border-box",
|
|
8022
|
-
padding: `0 ${
|
|
8131
|
+
padding: `0 ${lr[s]}`,
|
|
8023
8132
|
borderRadius: "var(--lucent-radius-lg)",
|
|
8024
8133
|
border: `1px solid ${B}`,
|
|
8025
8134
|
boxShadow: I,
|
|
8026
|
-
background:
|
|
8027
|
-
color:
|
|
8135
|
+
background: v ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
8136
|
+
color: b ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
8028
8137
|
fontFamily: "var(--lucent-font-family-base)",
|
|
8029
|
-
fontSize:
|
|
8030
|
-
cursor:
|
|
8138
|
+
fontSize: sr[s],
|
|
8139
|
+
cursor: v ? "not-allowed" : "pointer",
|
|
8031
8140
|
outline: "none",
|
|
8032
8141
|
transition: [
|
|
8033
8142
|
"border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
@@ -8040,7 +8149,7 @@ function as({
|
|
|
8040
8149
|
/* @__PURE__ */ n("path", { d: "M1 6h12", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
8041
8150
|
/* @__PURE__ */ n("path", { d: "M4 1v2M10 1v2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
8042
8151
|
] }),
|
|
8043
|
-
/* @__PURE__ */ n("span", { style: { flex: 1, textAlign: "left" }, children:
|
|
8152
|
+
/* @__PURE__ */ n("span", { style: { flex: 1, textAlign: "left" }, children: b ? ve(b) : o })
|
|
8044
8153
|
]
|
|
8045
8154
|
}
|
|
8046
8155
|
),
|
|
@@ -8071,7 +8180,7 @@ function as({
|
|
|
8071
8180
|
/* @__PURE__ */ n(
|
|
8072
8181
|
"div",
|
|
8073
8182
|
{
|
|
8074
|
-
ref:
|
|
8183
|
+
ref: F,
|
|
8075
8184
|
role: "dialog",
|
|
8076
8185
|
"aria-label": "Date picker",
|
|
8077
8186
|
style: {
|
|
@@ -8093,7 +8202,7 @@ function as({
|
|
|
8093
8202
|
{
|
|
8094
8203
|
year: M,
|
|
8095
8204
|
month: A,
|
|
8096
|
-
...
|
|
8205
|
+
...b !== void 0 && { selected: b },
|
|
8097
8206
|
today: x,
|
|
8098
8207
|
...i !== void 0 && { min: i },
|
|
8099
8208
|
...l !== void 0 && { max: l },
|
|
@@ -8109,7 +8218,7 @@ function as({
|
|
|
8109
8218
|
)
|
|
8110
8219
|
] });
|
|
8111
8220
|
}
|
|
8112
|
-
const
|
|
8221
|
+
const cs = {
|
|
8113
8222
|
id: "date-picker",
|
|
8114
8223
|
name: "DatePicker",
|
|
8115
8224
|
tier: "molecule",
|
|
@@ -8220,15 +8329,15 @@ const rs = {
|
|
|
8220
8329
|
keyboardInteractions: ["Enter/Space to open calendar", "Click day to select", "Escape closes popover (click outside)"],
|
|
8221
8330
|
notes: 'The calendar popover is role="dialog". Each day button has aria-label with the full date and aria-pressed for selected state. Full arrow-key navigation within the calendar grid is a planned enhancement.'
|
|
8222
8331
|
}
|
|
8223
|
-
},
|
|
8332
|
+
}, gr = { sm: "calc(var(--lucent-space-8) * 0.5 + 18px)", md: "calc(var(--lucent-space-10) * 0.5 + 22px)", lg: "calc(var(--lucent-space-12) * 0.5 + 26px)" }, vr = {
|
|
8224
8333
|
sm: "var(--lucent-font-size-sm)",
|
|
8225
8334
|
md: "var(--lucent-font-size-md)",
|
|
8226
8335
|
lg: "var(--lucent-font-size-md)"
|
|
8227
|
-
},
|
|
8336
|
+
}, br = {
|
|
8228
8337
|
sm: "var(--lucent-space-3)",
|
|
8229
8338
|
md: "var(--lucent-space-4)",
|
|
8230
8339
|
lg: "var(--lucent-space-4)"
|
|
8231
|
-
},
|
|
8340
|
+
}, yr = {
|
|
8232
8341
|
sm: "var(--lucent-space-2)",
|
|
8233
8342
|
md: "calc((var(--lucent-space-2) + var(--lucent-space-3)) / 2)",
|
|
8234
8343
|
lg: "var(--lucent-space-3)"
|
|
@@ -8237,10 +8346,10 @@ const rs = {
|
|
|
8237
8346
|
md: "var(--lucent-font-size-sm)",
|
|
8238
8347
|
lg: "var(--lucent-font-size-md)"
|
|
8239
8348
|
};
|
|
8240
|
-
function
|
|
8241
|
-
return e ? Be(e.start, e.end) ?
|
|
8349
|
+
function xr(e, t) {
|
|
8350
|
+
return e ? Be(e.start, e.end) ? ve(e.start) : `${ve(e.start)} → ${ve(e.end)}` : t;
|
|
8242
8351
|
}
|
|
8243
|
-
function
|
|
8352
|
+
function ds({
|
|
8244
8353
|
value: e,
|
|
8245
8354
|
defaultValue: t,
|
|
8246
8355
|
onChange: r,
|
|
@@ -8254,7 +8363,7 @@ function os({
|
|
|
8254
8363
|
errorText: u,
|
|
8255
8364
|
style: f
|
|
8256
8365
|
}) {
|
|
8257
|
-
const h = e !== void 0, [m, T] = z(t),
|
|
8366
|
+
const h = e !== void 0, [m, T] = z(t), b = h ? e : m, p = !!u, v = a, k = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [x, M] = z(null), [S, A] = z(null), R = /* @__PURE__ */ new Date(), [C, D] = z(((b == null ? void 0 : b.start) ?? R).getFullYear()), [$, W] = z(((b == null ? void 0 : b.start) ?? R).getMonth()), w = $ === 11 ? 0 : $ + 1, F = $ === 11 ? C + 1 : C, [L, N] = z(!1), [U, Z] = z(!1), J = V(null), B = V(null), [I, q] = z({ top: 0, left: 0 });
|
|
8258
8367
|
X(() => {
|
|
8259
8368
|
if (!L) return;
|
|
8260
8369
|
const H = (G) => {
|
|
@@ -8267,7 +8376,7 @@ function os({
|
|
|
8267
8376
|
const H = J.current.getBoundingClientRect();
|
|
8268
8377
|
q({ top: H.bottom + 4, left: H.left });
|
|
8269
8378
|
}, [L]);
|
|
8270
|
-
const
|
|
8379
|
+
const P = (H) => {
|
|
8271
8380
|
if (!x)
|
|
8272
8381
|
M(H);
|
|
8273
8382
|
else {
|
|
@@ -8283,8 +8392,8 @@ function os({
|
|
|
8283
8392
|
if (x && S) {
|
|
8284
8393
|
const [H, G] = Re(S, x) ? [S, x] : [x, S];
|
|
8285
8394
|
E = { start: H, end: G };
|
|
8286
|
-
} else x ? E = { start: x, end: x } :
|
|
8287
|
-
const O =
|
|
8395
|
+
} else x ? E = { start: x, end: x } : b && (E = { start: b.start, end: b.end });
|
|
8396
|
+
const O = v ? "transparent" : p ? "var(--lucent-danger-default)" : U ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", Y = U ? `0 0 0 3px ${p ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
8288
8397
|
return /* @__PURE__ */ y("div", { ref: J, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...f }, children: [
|
|
8289
8398
|
c && /* @__PURE__ */ n(
|
|
8290
8399
|
"label",
|
|
@@ -8293,7 +8402,7 @@ function os({
|
|
|
8293
8402
|
style: {
|
|
8294
8403
|
fontSize: Ve[s],
|
|
8295
8404
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
8296
|
-
color:
|
|
8405
|
+
color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
8297
8406
|
fontFamily: "var(--lucent-font-family-base)"
|
|
8298
8407
|
},
|
|
8299
8408
|
children: c
|
|
@@ -8314,19 +8423,19 @@ function os({
|
|
|
8314
8423
|
style: {
|
|
8315
8424
|
display: "flex",
|
|
8316
8425
|
alignItems: "center",
|
|
8317
|
-
gap:
|
|
8426
|
+
gap: yr[s],
|
|
8318
8427
|
width: "100%",
|
|
8319
|
-
height:
|
|
8428
|
+
height: gr[s],
|
|
8320
8429
|
boxSizing: "border-box",
|
|
8321
|
-
padding: `0 ${
|
|
8430
|
+
padding: `0 ${br[s]}`,
|
|
8322
8431
|
borderRadius: "var(--lucent-radius-lg)",
|
|
8323
8432
|
border: `1px solid ${O}`,
|
|
8324
8433
|
boxShadow: Y,
|
|
8325
|
-
background:
|
|
8326
|
-
color:
|
|
8434
|
+
background: v ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
8435
|
+
color: b ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
8327
8436
|
fontFamily: "var(--lucent-font-family-base)",
|
|
8328
|
-
fontSize:
|
|
8329
|
-
cursor:
|
|
8437
|
+
fontSize: vr[s],
|
|
8438
|
+
cursor: v ? "not-allowed" : "pointer",
|
|
8330
8439
|
outline: "none",
|
|
8331
8440
|
transition: [
|
|
8332
8441
|
"border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
@@ -8339,7 +8448,7 @@ function os({
|
|
|
8339
8448
|
/* @__PURE__ */ n("path", { d: "M1 6h12", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
8340
8449
|
/* @__PURE__ */ n("path", { d: "M4 1v2M10 1v2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
8341
8450
|
] }),
|
|
8342
|
-
/* @__PURE__ */ n("span", { style: { flex: 1, textAlign: "left" }, children:
|
|
8451
|
+
/* @__PURE__ */ n("span", { style: { flex: 1, textAlign: "left" }, children: xr(b, o) })
|
|
8343
8452
|
]
|
|
8344
8453
|
}
|
|
8345
8454
|
),
|
|
@@ -8394,11 +8503,11 @@ function os({
|
|
|
8394
8503
|
{
|
|
8395
8504
|
year: C,
|
|
8396
8505
|
month: $,
|
|
8397
|
-
...(
|
|
8506
|
+
...(b == null ? void 0 : b.start) !== void 0 && { selected: b.start },
|
|
8398
8507
|
today: R,
|
|
8399
8508
|
...i !== void 0 && { min: i },
|
|
8400
8509
|
...l !== void 0 && { max: l },
|
|
8401
|
-
onSelect:
|
|
8510
|
+
onSelect: P,
|
|
8402
8511
|
onPrevMonth: j,
|
|
8403
8512
|
onNextMonth: g,
|
|
8404
8513
|
...E !== void 0 && { highlightRange: E },
|
|
@@ -8410,13 +8519,13 @@ function os({
|
|
|
8410
8519
|
/* @__PURE__ */ n("div", { style: { minWidth: Ye[s] }, children: /* @__PURE__ */ n(
|
|
8411
8520
|
Ke,
|
|
8412
8521
|
{
|
|
8413
|
-
year:
|
|
8522
|
+
year: F,
|
|
8414
8523
|
month: w,
|
|
8415
|
-
...(
|
|
8524
|
+
...(b == null ? void 0 : b.end) !== void 0 && { selected: b.end },
|
|
8416
8525
|
today: R,
|
|
8417
8526
|
...i !== void 0 && { min: i },
|
|
8418
8527
|
...l !== void 0 && { max: l },
|
|
8419
|
-
onSelect:
|
|
8528
|
+
onSelect: P,
|
|
8420
8529
|
onPrevMonth: j,
|
|
8421
8530
|
onNextMonth: g,
|
|
8422
8531
|
...E !== void 0 && { highlightRange: E },
|
|
@@ -8437,7 +8546,7 @@ function os({
|
|
|
8437
8546
|
}, children: /* @__PURE__ */ n(_, { size: "xs", color: "secondary", children: "Now pick the end date" }) })
|
|
8438
8547
|
] });
|
|
8439
8548
|
}
|
|
8440
|
-
const
|
|
8549
|
+
const us = {
|
|
8441
8550
|
id: "date-range-picker",
|
|
8442
8551
|
name: "DateRangePicker",
|
|
8443
8552
|
tier: "molecule",
|
|
@@ -8548,10 +8657,10 @@ const is = {
|
|
|
8548
8657
|
function Xe(e) {
|
|
8549
8658
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
8550
8659
|
}
|
|
8551
|
-
function
|
|
8660
|
+
function wr() {
|
|
8552
8661
|
return Math.random().toString(36).slice(2);
|
|
8553
8662
|
}
|
|
8554
|
-
function
|
|
8663
|
+
function kr({
|
|
8555
8664
|
item: e,
|
|
8556
8665
|
onRemove: t
|
|
8557
8666
|
}) {
|
|
@@ -8613,7 +8722,7 @@ function yr({
|
|
|
8613
8722
|
)
|
|
8614
8723
|
] });
|
|
8615
8724
|
}
|
|
8616
|
-
function
|
|
8725
|
+
function ps({
|
|
8617
8726
|
accept: e,
|
|
8618
8727
|
multiple: t = !1,
|
|
8619
8728
|
maxSize: r,
|
|
@@ -8623,7 +8732,7 @@ function ss({
|
|
|
8623
8732
|
disabled: l = !1,
|
|
8624
8733
|
style: s
|
|
8625
8734
|
}) {
|
|
8626
|
-
const c = o !== void 0, [d, u] = z([]), f = c ? o : d, [h, m] = z(!1), [T,
|
|
8735
|
+
const c = o !== void 0, [d, u] = z([]), f = c ? o : d, [h, m] = z(!1), [T, b] = z(!1), p = V(null), v = ee((S) => {
|
|
8627
8736
|
if (!S || l) return;
|
|
8628
8737
|
const A = [];
|
|
8629
8738
|
for (const C of Array.from(S)) {
|
|
@@ -8632,7 +8741,7 @@ function ss({
|
|
|
8632
8741
|
continue;
|
|
8633
8742
|
}
|
|
8634
8743
|
if (!t && f.length + A.length >= 1) break;
|
|
8635
|
-
A.push({ id:
|
|
8744
|
+
A.push({ id: wr(), file: C });
|
|
8636
8745
|
}
|
|
8637
8746
|
if (A.length === 0) return;
|
|
8638
8747
|
const R = t ? [...f, ...A] : A;
|
|
@@ -8641,9 +8750,9 @@ function ss({
|
|
|
8641
8750
|
const A = f.filter((R) => R.id !== S);
|
|
8642
8751
|
c || u(A), a == null || a(A);
|
|
8643
8752
|
}, x = (S) => {
|
|
8644
|
-
S.preventDefault(), m(!1),
|
|
8753
|
+
S.preventDefault(), m(!1), v(S.dataTransfer.files);
|
|
8645
8754
|
}, M = (S) => {
|
|
8646
|
-
|
|
8755
|
+
v(S.target.files), S.target.value = "";
|
|
8647
8756
|
};
|
|
8648
8757
|
return /* @__PURE__ */ y("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
8649
8758
|
/* @__PURE__ */ y(
|
|
@@ -8661,8 +8770,8 @@ function ss({
|
|
|
8661
8770
|
var A;
|
|
8662
8771
|
(S.key === "Enter" || S.key === " ") && (S.preventDefault(), (A = p.current) == null || A.click());
|
|
8663
8772
|
},
|
|
8664
|
-
onFocus: () =>
|
|
8665
|
-
onBlur: () =>
|
|
8773
|
+
onFocus: () => b(!0),
|
|
8774
|
+
onBlur: () => b(!1),
|
|
8666
8775
|
onDragOver: (S) => {
|
|
8667
8776
|
S.preventDefault(), l || m(!0);
|
|
8668
8777
|
},
|
|
@@ -8721,10 +8830,10 @@ function ss({
|
|
|
8721
8830
|
]
|
|
8722
8831
|
}
|
|
8723
8832
|
),
|
|
8724
|
-
f.length > 0 && /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: f.map((S) => /* @__PURE__ */ n(
|
|
8833
|
+
f.length > 0 && /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: f.map((S) => /* @__PURE__ */ n(kr, { item: S, onRemove: k }, S.id)) })
|
|
8725
8834
|
] });
|
|
8726
8835
|
}
|
|
8727
|
-
const
|
|
8836
|
+
const fs = {
|
|
8728
8837
|
id: "file-upload",
|
|
8729
8838
|
name: "FileUpload",
|
|
8730
8839
|
tier: "molecule",
|
|
@@ -8822,23 +8931,23 @@ const handleChange = async (updated: UploadFile[]) => {
|
|
|
8822
8931
|
keyboardInteractions: ["Enter/Space to open file picker", "Tab to focus drop zone"],
|
|
8823
8932
|
notes: 'The drop zone has role="button" with tabIndex=0 and responds to Enter/Space. Remove buttons on file rows have aria-label including the filename.'
|
|
8824
8933
|
}
|
|
8825
|
-
},
|
|
8934
|
+
}, Sr = {
|
|
8826
8935
|
default: "var(--lucent-border-strong)",
|
|
8827
8936
|
success: "var(--lucent-success-default)",
|
|
8828
8937
|
warning: "var(--lucent-warning-default)",
|
|
8829
8938
|
danger: "var(--lucent-danger-default)",
|
|
8830
8939
|
info: "var(--lucent-info-default)"
|
|
8831
|
-
},
|
|
8940
|
+
}, Tr = {
|
|
8832
8941
|
default: "var(--lucent-surface-secondary)",
|
|
8833
8942
|
success: "var(--lucent-success-subtle)",
|
|
8834
8943
|
warning: "var(--lucent-warning-subtle)",
|
|
8835
8944
|
danger: "var(--lucent-danger-subtle)",
|
|
8836
8945
|
info: "var(--lucent-info-subtle)"
|
|
8837
8946
|
};
|
|
8838
|
-
function
|
|
8947
|
+
function Cr({ status: e }) {
|
|
8839
8948
|
return e === "success" ? /* @__PURE__ */ n("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ n("path", { d: "M2 5l2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : e === "danger" ? /* @__PURE__ */ n("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ n("path", { d: "M2 2l6 6M8 2L2 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) : e === "warning" ? /* @__PURE__ */ n("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ n("path", { d: "M5 2v4M5 7.5v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) : null;
|
|
8840
8949
|
}
|
|
8841
|
-
function
|
|
8950
|
+
function hs({ items: e, style: t }) {
|
|
8842
8951
|
return /* @__PURE__ */ n(
|
|
8843
8952
|
"ol",
|
|
8844
8953
|
{
|
|
@@ -8851,7 +8960,7 @@ function cs({ items: e, style: t }) {
|
|
|
8851
8960
|
...t
|
|
8852
8961
|
},
|
|
8853
8962
|
children: e.map((r, o) => {
|
|
8854
|
-
const a = r.status ?? "default", i =
|
|
8963
|
+
const a = r.status ?? "default", i = Sr[a], l = Tr[a], s = o === e.length - 1;
|
|
8855
8964
|
return /* @__PURE__ */ y(
|
|
8856
8965
|
"li",
|
|
8857
8966
|
{
|
|
@@ -8880,7 +8989,7 @@ function cs({ items: e, style: t }) {
|
|
|
8880
8989
|
color: i,
|
|
8881
8990
|
flexShrink: 0,
|
|
8882
8991
|
zIndex: 1
|
|
8883
|
-
}, children: r.icon ?? /* @__PURE__ */ n(
|
|
8992
|
+
}, children: r.icon ?? /* @__PURE__ */ n(Cr, { status: a }) }),
|
|
8884
8993
|
!s && /* @__PURE__ */ n("div", { style: {
|
|
8885
8994
|
flex: 1,
|
|
8886
8995
|
width: 2,
|
|
@@ -8908,7 +9017,7 @@ function cs({ items: e, style: t }) {
|
|
|
8908
9017
|
}
|
|
8909
9018
|
);
|
|
8910
9019
|
}
|
|
8911
|
-
const
|
|
9020
|
+
const ms = {
|
|
8912
9021
|
id: "timeline",
|
|
8913
9022
|
name: "Timeline",
|
|
8914
9023
|
tier: "molecule",
|
|
@@ -8962,7 +9071,7 @@ const ds = {
|
|
|
8962
9071
|
keyboardInteractions: ["Standard document flow — no interactive elements unless custom icons include them"],
|
|
8963
9072
|
notes: "Timeline is a semantic <ol> with <li> items. It is non-interactive by default. If items contain interactive elements (links, buttons), those elements carry their own keyboard behaviour."
|
|
8964
9073
|
}
|
|
8965
|
-
}, je = 120,
|
|
9074
|
+
}, je = 120, Ir = `
|
|
8966
9075
|
@keyframes lucent-menu-in {
|
|
8967
9076
|
from { opacity: 0; transform: scale(0.97) translateY(-2px); }
|
|
8968
9077
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
@@ -8975,20 +9084,20 @@ const ds = {
|
|
|
8975
9084
|
sm: "var(--lucent-space-2)",
|
|
8976
9085
|
md: "var(--lucent-space-2)",
|
|
8977
9086
|
lg: "var(--lucent-space-3)"
|
|
8978
|
-
},
|
|
9087
|
+
}, Mr = {
|
|
8979
9088
|
sm: "sm",
|
|
8980
9089
|
md: "md",
|
|
8981
9090
|
lg: "lg"
|
|
8982
|
-
},
|
|
9091
|
+
}, Dr = {
|
|
8983
9092
|
sm: "xs",
|
|
8984
9093
|
md: "sm",
|
|
8985
9094
|
lg: "md"
|
|
8986
|
-
},
|
|
9095
|
+
}, zr = {
|
|
8987
9096
|
sm: 12,
|
|
8988
9097
|
md: 14,
|
|
8989
9098
|
lg: 16
|
|
8990
9099
|
}, Qe = ye(null), Ie = 4;
|
|
8991
|
-
function
|
|
9100
|
+
function Ar(e, t, r) {
|
|
8992
9101
|
const o = t.offsetWidth, a = t.offsetHeight, i = window.innerWidth, l = window.innerHeight;
|
|
8993
9102
|
let s = 0, c = 0, d = r;
|
|
8994
9103
|
const u = {
|
|
@@ -9001,7 +9110,7 @@ function Mr(e, t, r) {
|
|
|
9001
9110
|
let f = "top left";
|
|
9002
9111
|
return d.startsWith("top") ? f = d.endsWith("-end") ? "bottom right" : d.endsWith("-start") ? "bottom left" : "bottom center" : d.startsWith("bottom") ? f = d.endsWith("-end") ? "top right" : d.endsWith("-start") ? "top left" : "top center" : d === "left" ? f = "center right" : d === "right" && (f = "center left"), { top: s, left: c, transformOrigin: f };
|
|
9003
9112
|
}
|
|
9004
|
-
function
|
|
9113
|
+
function gs({
|
|
9005
9114
|
onSelect: e,
|
|
9006
9115
|
children: t,
|
|
9007
9116
|
icon: r,
|
|
@@ -9013,11 +9122,11 @@ function us({
|
|
|
9013
9122
|
}) {
|
|
9014
9123
|
const c = fe(Qe), d = V(-1);
|
|
9015
9124
|
d.current === -1 && c && (d.current = c.getItemIndex(), c.registerItem(d.current, a));
|
|
9016
|
-
const u = c ? c.activeIndex === d.current : !1, f = (c == null ? void 0 : c.size) ?? "md", h = Ze[f], m =
|
|
9125
|
+
const u = c ? c.activeIndex === d.current : !1, f = (c == null ? void 0 : c.size) ?? "md", h = Ze[f], m = Mr[f], T = zr[f], b = () => {
|
|
9017
9126
|
a || (e(), c == null || c.close());
|
|
9018
9127
|
}, p = () => {
|
|
9019
9128
|
!a && c && c.setActiveIndex(d.current);
|
|
9020
|
-
},
|
|
9129
|
+
}, v = a ? "var(--lucent-text-disabled)" : i ? "var(--lucent-danger-text)" : "var(--lucent-text-primary)";
|
|
9021
9130
|
return /* @__PURE__ */ y(
|
|
9022
9131
|
"div",
|
|
9023
9132
|
{
|
|
@@ -9026,7 +9135,7 @@ function us({
|
|
|
9026
9135
|
"aria-disabled": a || void 0,
|
|
9027
9136
|
"data-active": u || void 0,
|
|
9028
9137
|
tabIndex: -1,
|
|
9029
|
-
onClick:
|
|
9138
|
+
onClick: b,
|
|
9030
9139
|
onMouseEnter: p,
|
|
9031
9140
|
style: {
|
|
9032
9141
|
display: "flex",
|
|
@@ -9048,7 +9157,7 @@ function us({
|
|
|
9048
9157
|
display: "flex",
|
|
9049
9158
|
color: a ? "var(--lucent-text-disabled)" : i ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)"
|
|
9050
9159
|
}, children: r }),
|
|
9051
|
-
/* @__PURE__ */ n("span", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ n(_, { size: m, style: { color:
|
|
9160
|
+
/* @__PURE__ */ n("span", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ n(_, { size: m, style: { color: v }, children: t }) }),
|
|
9052
9161
|
o && /* @__PURE__ */ n(_, { size: f === "lg" ? "sm" : "xs", style: { color: "var(--lucent-text-secondary)", flexShrink: 0 }, children: o }),
|
|
9053
9162
|
l && /* @__PURE__ */ n("span", { style: {
|
|
9054
9163
|
flexShrink: 0,
|
|
@@ -9059,7 +9168,7 @@ function us({
|
|
|
9059
9168
|
}
|
|
9060
9169
|
);
|
|
9061
9170
|
}
|
|
9062
|
-
function
|
|
9171
|
+
function vs({ style: e }) {
|
|
9063
9172
|
return /* @__PURE__ */ n(
|
|
9064
9173
|
"div",
|
|
9065
9174
|
{
|
|
@@ -9073,14 +9182,14 @@ function ps({ style: e }) {
|
|
|
9073
9182
|
}
|
|
9074
9183
|
);
|
|
9075
9184
|
}
|
|
9076
|
-
function
|
|
9185
|
+
function bs({ label: e, children: t, style: r }) {
|
|
9077
9186
|
const o = fe(Qe), a = (o == null ? void 0 : o.size) ?? "md", i = Ze[a];
|
|
9078
9187
|
return /* @__PURE__ */ y("div", { role: "group", "aria-label": e, style: r, children: [
|
|
9079
|
-
/* @__PURE__ */ n("div", { style: { padding: `${i} ${i} var(--lucent-space-1)` }, children: /* @__PURE__ */ n(_, { size:
|
|
9188
|
+
/* @__PURE__ */ n("div", { style: { padding: `${i} ${i} var(--lucent-space-1)` }, children: /* @__PURE__ */ n(_, { size: Dr[a], color: "secondary", weight: "medium", children: e }) }),
|
|
9080
9189
|
t
|
|
9081
9190
|
] });
|
|
9082
9191
|
}
|
|
9083
|
-
function
|
|
9192
|
+
function ys({
|
|
9084
9193
|
trigger: e,
|
|
9085
9194
|
children: t,
|
|
9086
9195
|
placement: r = "bottom-start",
|
|
@@ -9090,18 +9199,18 @@ function hs({
|
|
|
9090
9199
|
portalContainer: l,
|
|
9091
9200
|
style: s
|
|
9092
9201
|
}) {
|
|
9093
|
-
const c = a !== void 0, [d, u] = z(!1), f = c ? a : d, [h, m] = z(!1), [T,
|
|
9202
|
+
const c = a !== void 0, [d, u] = z(!1), f = c ? a : d, [h, m] = z(!1), [T, b] = z("idle"), p = V(null), v = V(null), k = V(null), x = V(!1), [M, S] = z(null), A = V(0), R = V(/* @__PURE__ */ new Map()), [C, D] = z(-1);
|
|
9094
9203
|
if (!x.current && typeof document < "u") {
|
|
9095
9204
|
const B = document.createElement("style");
|
|
9096
|
-
B.textContent =
|
|
9205
|
+
B.textContent = Ir, document.head.appendChild(B), x.current = !0;
|
|
9097
9206
|
}
|
|
9098
9207
|
X(() => {
|
|
9099
9208
|
if (f)
|
|
9100
|
-
A.current = 0, R.current.clear(), m(!0),
|
|
9209
|
+
A.current = 0, R.current.clear(), m(!0), b("entering");
|
|
9101
9210
|
else if (h) {
|
|
9102
|
-
|
|
9211
|
+
b("exiting");
|
|
9103
9212
|
const B = setTimeout(() => {
|
|
9104
|
-
m(!1),
|
|
9213
|
+
m(!1), b("idle");
|
|
9105
9214
|
}, je);
|
|
9106
9215
|
return () => clearTimeout(B);
|
|
9107
9216
|
}
|
|
@@ -9117,16 +9226,16 @@ function hs({
|
|
|
9117
9226
|
se(() => {
|
|
9118
9227
|
if (!h || T !== "entering" || !p.current) return;
|
|
9119
9228
|
const B = requestAnimationFrame(() => {
|
|
9120
|
-
const I =
|
|
9229
|
+
const I = v.current, q = p.current;
|
|
9121
9230
|
if (!I || !q) return;
|
|
9122
|
-
const
|
|
9123
|
-
S(
|
|
9231
|
+
const P = q.getBoundingClientRect();
|
|
9232
|
+
S(Ar(P, I, r));
|
|
9124
9233
|
});
|
|
9125
9234
|
return () => cancelAnimationFrame(B);
|
|
9126
9235
|
}, [h, T, r]), X(() => {
|
|
9127
9236
|
if (!h || T !== "entering") return;
|
|
9128
9237
|
const B = setTimeout(() => {
|
|
9129
|
-
const q = Array.from(R.current.entries()).sort((
|
|
9238
|
+
const q = Array.from(R.current.entries()).sort((P, j) => P[0] - j[0]).find(([, P]) => !P.disabled);
|
|
9130
9239
|
D(q ? q[0] : -1);
|
|
9131
9240
|
}, 0);
|
|
9132
9241
|
return () => clearTimeout(B);
|
|
@@ -9134,8 +9243,8 @@ function hs({
|
|
|
9134
9243
|
if (!f) return;
|
|
9135
9244
|
const B = (q) => {
|
|
9136
9245
|
var j, g;
|
|
9137
|
-
const
|
|
9138
|
-
(j = p.current) != null && j.contains(
|
|
9246
|
+
const P = q.target;
|
|
9247
|
+
(j = p.current) != null && j.contains(P) || (g = v.current) != null && g.contains(P) || w();
|
|
9139
9248
|
}, I = requestAnimationFrame(() => {
|
|
9140
9249
|
document.addEventListener("mousedown", B);
|
|
9141
9250
|
});
|
|
@@ -9154,9 +9263,9 @@ function hs({
|
|
|
9154
9263
|
clearTimeout(I), window.removeEventListener("scroll", q, { capture: !0 });
|
|
9155
9264
|
};
|
|
9156
9265
|
}, [f, w]);
|
|
9157
|
-
const
|
|
9266
|
+
const F = ee(() => Array.from(R.current.entries()).filter(([, B]) => !B.disabled).map(([B]) => B).sort((B, I) => B - I), []), L = ee((B) => {
|
|
9158
9267
|
if (!f) return;
|
|
9159
|
-
const I =
|
|
9268
|
+
const I = F();
|
|
9160
9269
|
if (I.length !== 0)
|
|
9161
9270
|
switch (B.key) {
|
|
9162
9271
|
case "Escape":
|
|
@@ -9164,15 +9273,15 @@ function hs({
|
|
|
9164
9273
|
break;
|
|
9165
9274
|
case "ArrowDown": {
|
|
9166
9275
|
B.preventDefault(), D((q) => {
|
|
9167
|
-
const
|
|
9168
|
-
return
|
|
9276
|
+
const P = I.indexOf(q);
|
|
9277
|
+
return P < I.length - 1 ? I[P + 1] : I[0];
|
|
9169
9278
|
});
|
|
9170
9279
|
break;
|
|
9171
9280
|
}
|
|
9172
9281
|
case "ArrowUp": {
|
|
9173
9282
|
B.preventDefault(), D((q) => {
|
|
9174
|
-
const
|
|
9175
|
-
return
|
|
9283
|
+
const P = I.indexOf(q);
|
|
9284
|
+
return P > 0 ? I[P - 1] : I[I.length - 1];
|
|
9176
9285
|
});
|
|
9177
9286
|
break;
|
|
9178
9287
|
}
|
|
@@ -9187,10 +9296,10 @@ function hs({
|
|
|
9187
9296
|
case "Enter":
|
|
9188
9297
|
case " ": {
|
|
9189
9298
|
B.preventDefault();
|
|
9190
|
-
const q =
|
|
9299
|
+
const q = v.current;
|
|
9191
9300
|
if (q) {
|
|
9192
|
-
const
|
|
9193
|
-
|
|
9301
|
+
const P = q.querySelector('[data-active="true"]');
|
|
9302
|
+
P == null || P.click();
|
|
9194
9303
|
}
|
|
9195
9304
|
break;
|
|
9196
9305
|
}
|
|
@@ -9199,13 +9308,13 @@ function hs({
|
|
|
9199
9308
|
break;
|
|
9200
9309
|
}
|
|
9201
9310
|
}
|
|
9202
|
-
}, [f, w,
|
|
9311
|
+
}, [f, w, F]);
|
|
9203
9312
|
X(() => {
|
|
9204
9313
|
if (f)
|
|
9205
9314
|
return document.addEventListener("keydown", L), () => document.removeEventListener("keydown", L);
|
|
9206
9315
|
}, [f, L]), X(() => {
|
|
9207
9316
|
if (!f) return;
|
|
9208
|
-
const B =
|
|
9317
|
+
const B = v.current;
|
|
9209
9318
|
if (!B) return;
|
|
9210
9319
|
const I = B.querySelector('[data-active="true"]');
|
|
9211
9320
|
I == null || I.scrollIntoView({ block: "nearest" });
|
|
@@ -9214,7 +9323,7 @@ function hs({
|
|
|
9214
9323
|
$(!f);
|
|
9215
9324
|
}, U = (B) => {
|
|
9216
9325
|
(B.key === "Enter" || B.key === " " || B.key === "ArrowDown") && (B.preventDefault(), f || $(!0)), B.key === "ArrowUp" && (B.preventDefault(), f || ($(!0), setTimeout(() => {
|
|
9217
|
-
const I =
|
|
9326
|
+
const I = F();
|
|
9218
9327
|
I.length > 0 && D(I[I.length - 1]);
|
|
9219
9328
|
}, 0)));
|
|
9220
9329
|
}, Z = {
|
|
@@ -9226,7 +9335,7 @@ function hs({
|
|
|
9226
9335
|
close: w,
|
|
9227
9336
|
getItemIndex: () => A.current++,
|
|
9228
9337
|
size: o
|
|
9229
|
-
}, J =
|
|
9338
|
+
}, J = be();
|
|
9230
9339
|
return /* @__PURE__ */ y(oe, { children: [
|
|
9231
9340
|
/* @__PURE__ */ n(
|
|
9232
9341
|
"span",
|
|
@@ -9252,7 +9361,7 @@ function hs({
|
|
|
9252
9361
|
/* @__PURE__ */ n(Qe.Provider, { value: Z, children: /* @__PURE__ */ n(
|
|
9253
9362
|
"div",
|
|
9254
9363
|
{
|
|
9255
|
-
ref:
|
|
9364
|
+
ref: v,
|
|
9256
9365
|
id: J,
|
|
9257
9366
|
role: "menu",
|
|
9258
9367
|
style: {
|
|
@@ -9283,7 +9392,7 @@ function hs({
|
|
|
9283
9392
|
)
|
|
9284
9393
|
] });
|
|
9285
9394
|
}
|
|
9286
|
-
const
|
|
9395
|
+
const xs = {
|
|
9287
9396
|
id: "menu",
|
|
9288
9397
|
name: "Menu",
|
|
9289
9398
|
tier: "molecule",
|
|
@@ -9516,45 +9625,45 @@ const ms = {
|
|
|
9516
9625
|
notes: 'Focus returns to the trigger element after the menu is dismissed via Escape or selection. Disabled items are skipped during keyboard navigation and have aria-disabled. Selected items use role="menuitemcheckbox" with aria-checked for screen reader announcement. The popover is portaled to document.body (or portalContainer) but remains semantically linked to the trigger via aria-controls.'
|
|
9517
9626
|
}
|
|
9518
9627
|
}, Mt = ye(null);
|
|
9519
|
-
function
|
|
9628
|
+
function ws() {
|
|
9520
9629
|
const e = fe(Mt);
|
|
9521
9630
|
if (!e) throw new Error("useToast must be used inside <ToastProvider>");
|
|
9522
9631
|
return e;
|
|
9523
9632
|
}
|
|
9524
|
-
const
|
|
9633
|
+
const Er = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
9525
9634
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
9526
9635
|
/* @__PURE__ */ n("path", { d: "M8 5.5V8.5M8 10.5V11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
9527
|
-
] }),
|
|
9636
|
+
] }), qr = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
9528
9637
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
9529
9638
|
/* @__PURE__ */ n("path", { d: "M5 8L7 10L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
9530
|
-
] }),
|
|
9639
|
+
] }), Br = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
9531
9640
|
/* @__PURE__ */ n("path", { d: "M8 2L14.5 13H1.5L8 2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
|
|
9532
9641
|
/* @__PURE__ */ n("path", { d: "M8 6V9M8 11V11.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
9533
|
-
] }),
|
|
9642
|
+
] }), Rr = () => /* @__PURE__ */ y("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
9534
9643
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
9535
9644
|
/* @__PURE__ */ n("path", { d: "M5.5 5.5L10.5 10.5M10.5 5.5L5.5 10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
9536
|
-
] }),
|
|
9537
|
-
info: /* @__PURE__ */ n(
|
|
9538
|
-
success: /* @__PURE__ */ n(
|
|
9539
|
-
warning: /* @__PURE__ */ n(
|
|
9540
|
-
danger: /* @__PURE__ */ n(
|
|
9541
|
-
},
|
|
9645
|
+
] }), Lr = () => /* @__PURE__ */ n("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ n("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), Pr = {
|
|
9646
|
+
info: /* @__PURE__ */ n(Er, {}),
|
|
9647
|
+
success: /* @__PURE__ */ n(qr, {}),
|
|
9648
|
+
warning: /* @__PURE__ */ n(Br, {}),
|
|
9649
|
+
danger: /* @__PURE__ */ n(Rr, {})
|
|
9650
|
+
}, Fr = {
|
|
9542
9651
|
default: { border: "var(--lucent-border-default)", iconColor: "var(--lucent-text-secondary)" },
|
|
9543
9652
|
info: { border: "var(--lucent-info-default)", iconColor: "var(--lucent-info-text)" },
|
|
9544
9653
|
success: { border: "var(--lucent-success-default)", iconColor: "var(--lucent-success-text)" },
|
|
9545
9654
|
warning: { border: "var(--lucent-warning-default)", iconColor: "var(--lucent-warning-text)" },
|
|
9546
9655
|
danger: { border: "var(--lucent-danger-default)", iconColor: "var(--lucent-danger-text)" }
|
|
9547
9656
|
};
|
|
9548
|
-
let
|
|
9549
|
-
function
|
|
9550
|
-
return `lucent-toast-${++
|
|
9657
|
+
let Nr = 0;
|
|
9658
|
+
function $r() {
|
|
9659
|
+
return `lucent-toast-${++Nr}`;
|
|
9551
9660
|
}
|
|
9552
9661
|
function Dt(e) {
|
|
9553
9662
|
return e.startsWith("top");
|
|
9554
9663
|
}
|
|
9555
|
-
const
|
|
9664
|
+
const Wr = 200, Or = 8, Hr = 0.04, Vr = 0.2, jr = 3, Ur = 356;
|
|
9556
9665
|
function ft({ entry: e, onDismiss: t, hideContent: r, fixedHeight: o }) {
|
|
9557
|
-
const { id: a, title: i, description: l, variant: s, action: c, icon: d } = e, u =
|
|
9666
|
+
const { id: a, title: i, description: l, variant: s, action: c, icon: d } = e, u = Fr[s], f = d ?? (s !== "default" ? Pr[s] : null), h = (c == null ? void 0 : c.style) ?? "button";
|
|
9558
9667
|
return /* @__PURE__ */ n(
|
|
9559
9668
|
"div",
|
|
9560
9669
|
{
|
|
@@ -9568,7 +9677,7 @@ function ft({ entry: e, onDismiss: t, hideContent: r, fixedHeight: o }) {
|
|
|
9568
9677
|
borderRadius: "var(--lucent-radius-lg)",
|
|
9569
9678
|
boxShadow: r ? "none" : "var(--lucent-shadow-lg)",
|
|
9570
9679
|
boxSizing: "border-box",
|
|
9571
|
-
width:
|
|
9680
|
+
width: Ur,
|
|
9572
9681
|
maxWidth: "calc(100vw - var(--lucent-space-8))",
|
|
9573
9682
|
fontFamily: "var(--lucent-font-family-base)",
|
|
9574
9683
|
transition: "height var(--lucent-duration-base) var(--lucent-easing-emphasized), box-shadow var(--lucent-duration-base) var(--lucent-easing-default)",
|
|
@@ -9591,10 +9700,10 @@ function ft({ entry: e, onDismiss: t, hideContent: r, fixedHeight: o }) {
|
|
|
9591
9700
|
/* @__PURE__ */ n(_, { as: "span", size: "sm", weight: "semibold", color: "primary", lineHeight: "tight", children: i }),
|
|
9592
9701
|
l && /* @__PURE__ */ n(_, { as: "span", size: "sm", color: "secondary", lineHeight: "base", style: { whiteSpace: "pre-line" }, children: l })
|
|
9593
9702
|
] }),
|
|
9594
|
-
c && h === "button" && /* @__PURE__ */ n(
|
|
9703
|
+
c && h === "button" && /* @__PURE__ */ n(Gr, { label: c.label, onClick: () => {
|
|
9595
9704
|
c.onClick(), t(a);
|
|
9596
9705
|
} }),
|
|
9597
|
-
c && h === "link" && /* @__PURE__ */ n(
|
|
9706
|
+
c && h === "link" && /* @__PURE__ */ n(_r, { label: c.label, iconColor: u.iconColor, onClick: () => {
|
|
9598
9707
|
c.onClick(), t(a);
|
|
9599
9708
|
} }),
|
|
9600
9709
|
/* @__PURE__ */ n(
|
|
@@ -9621,7 +9730,7 @@ function ft({ entry: e, onDismiss: t, hideContent: r, fixedHeight: o }) {
|
|
|
9621
9730
|
onMouseLeave: (m) => {
|
|
9622
9731
|
r || (m.currentTarget.style.opacity = "0.6");
|
|
9623
9732
|
},
|
|
9624
|
-
children: /* @__PURE__ */ n(
|
|
9733
|
+
children: /* @__PURE__ */ n(Lr, {})
|
|
9625
9734
|
}
|
|
9626
9735
|
)
|
|
9627
9736
|
]
|
|
@@ -9630,7 +9739,7 @@ function ft({ entry: e, onDismiss: t, hideContent: r, fixedHeight: o }) {
|
|
|
9630
9739
|
}
|
|
9631
9740
|
);
|
|
9632
9741
|
}
|
|
9633
|
-
function
|
|
9742
|
+
function Gr({ label: e, onClick: t }) {
|
|
9634
9743
|
return /* @__PURE__ */ n(
|
|
9635
9744
|
"button",
|
|
9636
9745
|
{
|
|
@@ -9661,7 +9770,7 @@ function Vr({ label: e, onClick: t }) {
|
|
|
9661
9770
|
}
|
|
9662
9771
|
);
|
|
9663
9772
|
}
|
|
9664
|
-
function
|
|
9773
|
+
function _r({ label: e, iconColor: t, onClick: r }) {
|
|
9665
9774
|
return /* @__PURE__ */ n(
|
|
9666
9775
|
"button",
|
|
9667
9776
|
{
|
|
@@ -9685,17 +9794,17 @@ function jr({ label: e, iconColor: t, onClick: r }) {
|
|
|
9685
9794
|
}
|
|
9686
9795
|
);
|
|
9687
9796
|
}
|
|
9688
|
-
const ht = "var(--lucent-space-6)",
|
|
9689
|
-
function
|
|
9797
|
+
const ht = "var(--lucent-space-6)", Yr = 40, Kr = 120;
|
|
9798
|
+
function Xr(e) {
|
|
9690
9799
|
const t = {
|
|
9691
9800
|
position: "fixed",
|
|
9692
9801
|
zIndex: 9999,
|
|
9693
9802
|
pointerEvents: "none",
|
|
9694
9803
|
boxSizing: "border-box"
|
|
9695
9804
|
};
|
|
9696
|
-
return Dt(e) ? t.top =
|
|
9805
|
+
return Dt(e) ? t.top = Yr : t.top = `calc(100vh - ${Kr}px)`, e.endsWith("left") ? t.left = ht : e.endsWith("right") ? t.right = ht : (t.left = "50%", t.transform = "translateX(-50%)"), t;
|
|
9697
9806
|
}
|
|
9698
|
-
function
|
|
9807
|
+
function Jr({ toasts: e, position: t, onDismiss: r, portalContainer: o }) {
|
|
9699
9808
|
const [a, i] = z(!1), [l, s] = z(void 0), c = ee((p) => {
|
|
9700
9809
|
p && s(p.offsetHeight);
|
|
9701
9810
|
}, []), d = Dt(t), u = e.filter((p) => p.phase !== "exiting"), f = e.filter((p) => p.phase === "exiting");
|
|
@@ -9708,7 +9817,7 @@ function Yr({ toasts: e, position: t, onDismiss: r, portalContainer: o }) {
|
|
|
9708
9817
|
h.current = setTimeout(() => {
|
|
9709
9818
|
i(!1), h.current = null;
|
|
9710
9819
|
}, 150);
|
|
9711
|
-
}, []),
|
|
9820
|
+
}, []), b = /* @__PURE__ */ n("div", { style: Xr(t), children: /* @__PURE__ */ n(
|
|
9712
9821
|
"div",
|
|
9713
9822
|
{
|
|
9714
9823
|
onMouseEnter: m,
|
|
@@ -9723,8 +9832,8 @@ function Yr({ toasts: e, position: t, onDismiss: r, portalContainer: o }) {
|
|
|
9723
9832
|
marginTop: a && !d ? l ?? 0 : 0,
|
|
9724
9833
|
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)"
|
|
9725
9834
|
}, children: [
|
|
9726
|
-
u.map((p,
|
|
9727
|
-
const k = u.length - 1 -
|
|
9835
|
+
u.map((p, v) => {
|
|
9836
|
+
const k = u.length - 1 - v, x = !a && k > jr, M = k * Or, S = d ? M : -M, A = a ? 1 : 1 - k * Hr, R = a ? 1 : Math.max(0, 1 - k * Vr), C = p.phase === "entering", D = k === 0, $ = !a && !D;
|
|
9728
9837
|
return /* @__PURE__ */ n(
|
|
9729
9838
|
"div",
|
|
9730
9839
|
{
|
|
@@ -9782,9 +9891,9 @@ function Yr({ toasts: e, position: t, onDismiss: r, portalContainer: o }) {
|
|
|
9782
9891
|
] })
|
|
9783
9892
|
}
|
|
9784
9893
|
) });
|
|
9785
|
-
return de(
|
|
9894
|
+
return de(b, o ?? document.body);
|
|
9786
9895
|
}
|
|
9787
|
-
function
|
|
9896
|
+
function ks({
|
|
9788
9897
|
children: e,
|
|
9789
9898
|
position: t = "bottom-right",
|
|
9790
9899
|
duration: r = 5e3,
|
|
@@ -9797,9 +9906,9 @@ function bs({
|
|
|
9797
9906
|
return !h || h.phase === "exiting" ? f : f.map((m) => m.id === u ? { ...m, phase: "exiting" } : m);
|
|
9798
9907
|
}), setTimeout(() => {
|
|
9799
9908
|
l((f) => f.filter((h) => h.id !== u));
|
|
9800
|
-
},
|
|
9909
|
+
}, Wr);
|
|
9801
9910
|
}, []), c = ee((u) => {
|
|
9802
|
-
const f =
|
|
9911
|
+
const f = $r(), h = {
|
|
9803
9912
|
id: f,
|
|
9804
9913
|
title: u.title,
|
|
9805
9914
|
variant: u.variant ?? "default",
|
|
@@ -9810,11 +9919,11 @@ function bs({
|
|
|
9810
9919
|
phase: "entering"
|
|
9811
9920
|
};
|
|
9812
9921
|
return l((m) => {
|
|
9813
|
-
const T = [...m, h],
|
|
9814
|
-
if (
|
|
9815
|
-
const p =
|
|
9816
|
-
for (const
|
|
9817
|
-
setTimeout(() => s(
|
|
9922
|
+
const T = [...m, h], b = T.filter((p) => p.phase !== "exiting");
|
|
9923
|
+
if (b.length > o) {
|
|
9924
|
+
const p = b.slice(0, b.length - o);
|
|
9925
|
+
for (const v of p)
|
|
9926
|
+
setTimeout(() => s(v.id), 0);
|
|
9818
9927
|
}
|
|
9819
9928
|
return T;
|
|
9820
9929
|
}), requestAnimationFrame(() => {
|
|
@@ -9838,7 +9947,7 @@ function bs({
|
|
|
9838
9947
|
return /* @__PURE__ */ y(Mt.Provider, { value: d, children: [
|
|
9839
9948
|
e,
|
|
9840
9949
|
i.length > 0 && /* @__PURE__ */ n(
|
|
9841
|
-
|
|
9950
|
+
Jr,
|
|
9842
9951
|
{
|
|
9843
9952
|
toasts: i,
|
|
9844
9953
|
position: t,
|
|
@@ -9848,7 +9957,7 @@ function bs({
|
|
|
9848
9957
|
)
|
|
9849
9958
|
] });
|
|
9850
9959
|
}
|
|
9851
|
-
const
|
|
9960
|
+
const Ss = {
|
|
9852
9961
|
id: "toast",
|
|
9853
9962
|
name: "Toast",
|
|
9854
9963
|
tier: "molecule",
|
|
@@ -10045,7 +10154,7 @@ dismiss(id);`
|
|
|
10045
10154
|
],
|
|
10046
10155
|
notes: 'Each toast uses role="status" with aria-live="polite" so screen readers announce the content without interrupting the current task. This is appropriate for non-urgent status messages like "Changes saved" or "Profile updated". For truly urgent errors that must interrupt the user, consider wrapping the ToastProvider output in a role="alert" region or using the Alert component instead. The dismiss button carries aria-label="Dismiss" for screen reader clarity. Stacked toasts behind the front toast are marked aria-hidden="true" to prevent screen readers from announcing duplicate or hidden content. When the stack expands on hover, aria-hidden is removed so all toasts become accessible.'
|
|
10047
10156
|
}
|
|
10048
|
-
},
|
|
10157
|
+
}, Zr = {
|
|
10049
10158
|
fontFamilyBase: '"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
10050
10159
|
fontFamilyMono: '"DM Mono", "Fira Code", "Cascadia Code", monospace',
|
|
10051
10160
|
fontFamilyDisplay: '"Georama", "DM Sans", sans-serif',
|
|
@@ -10066,7 +10175,7 @@ dismiss(id);`
|
|
|
10066
10175
|
letterSpacingTight: "-0.02em",
|
|
10067
10176
|
letterSpacingBase: "0em",
|
|
10068
10177
|
letterSpacingWide: "0.04em"
|
|
10069
|
-
},
|
|
10178
|
+
}, Qr = {
|
|
10070
10179
|
space0: "0px",
|
|
10071
10180
|
space1: "0.25rem",
|
|
10072
10181
|
space2: "0.5rem",
|
|
@@ -10080,38 +10189,38 @@ dismiss(id);`
|
|
|
10080
10189
|
space16: "4rem",
|
|
10081
10190
|
space20: "5rem",
|
|
10082
10191
|
space24: "6rem"
|
|
10083
|
-
},
|
|
10192
|
+
}, eo = {
|
|
10084
10193
|
radiusNone: "0px",
|
|
10085
10194
|
radiusSm: "0.25rem",
|
|
10086
10195
|
radiusMd: "0.375rem",
|
|
10087
10196
|
radiusLg: "0.5rem",
|
|
10088
10197
|
radiusXl: "0.75rem",
|
|
10089
10198
|
radiusFull: "9999px"
|
|
10090
|
-
},
|
|
10199
|
+
}, to = {
|
|
10091
10200
|
durationFast: "100ms",
|
|
10092
10201
|
durationBase: "200ms",
|
|
10093
10202
|
durationSlow: "350ms",
|
|
10094
10203
|
easingDefault: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
10095
10204
|
easingEmphasized: "cubic-bezier(0.2, 0, 0, 1)",
|
|
10096
10205
|
easingDecelerate: "cubic-bezier(0, 0, 0.2, 1)"
|
|
10097
|
-
},
|
|
10206
|
+
}, no = {
|
|
10098
10207
|
shadowNone: "none",
|
|
10099
10208
|
shadowSm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
10100
10209
|
shadowMd: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
10101
10210
|
shadowLg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
10102
10211
|
shadowXl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
|
|
10103
|
-
},
|
|
10212
|
+
}, ao = {
|
|
10104
10213
|
shadowNone: "none",
|
|
10105
10214
|
shadowSm: "0 1px 2px 0 rgb(0 0 0 / 0.3)",
|
|
10106
10215
|
shadowMd: "0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4)",
|
|
10107
10216
|
shadowLg: "0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4)",
|
|
10108
10217
|
shadowXl: "0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5)"
|
|
10109
|
-
},
|
|
10110
|
-
...Kr,
|
|
10111
|
-
...Xr,
|
|
10112
|
-
...Jr,
|
|
10218
|
+
}, Fe = {
|
|
10113
10219
|
...Zr,
|
|
10114
10220
|
...Qr,
|
|
10221
|
+
...eo,
|
|
10222
|
+
...to,
|
|
10223
|
+
...no,
|
|
10115
10224
|
// Backgrounds — page/layout layer only
|
|
10116
10225
|
bgBase: "#ffffff",
|
|
10117
10226
|
bgSubtle: "#f9fafb",
|
|
@@ -10160,16 +10269,16 @@ dismiss(id);`
|
|
|
10160
10269
|
// Focus
|
|
10161
10270
|
focusRing: "#111827"
|
|
10162
10271
|
};
|
|
10163
|
-
function
|
|
10272
|
+
function ro(e) {
|
|
10164
10273
|
const t = parseInt(e.slice(1, 3), 16), r = parseInt(e.slice(3, 5), 16), o = parseInt(e.slice(5, 7), 16);
|
|
10165
10274
|
return { r: t, g: r, b: o };
|
|
10166
10275
|
}
|
|
10167
|
-
function
|
|
10276
|
+
function oo({ r: e, g: t, b: r }) {
|
|
10168
10277
|
const o = (a) => a.toString(16).padStart(2, "0");
|
|
10169
10278
|
return `#${o(e)}${o(t)}${o(r)}`;
|
|
10170
10279
|
}
|
|
10171
10280
|
function le(e) {
|
|
10172
|
-
const { r: t, g: r, b: o } =
|
|
10281
|
+
const { r: t, g: r, b: o } = ro(e), a = t / 255, i = r / 255, l = o / 255, s = Math.max(a, i, l), c = Math.min(a, i, l);
|
|
10173
10282
|
let d = 0, u = 0;
|
|
10174
10283
|
const f = (s + c) / 2;
|
|
10175
10284
|
if (s !== c) {
|
|
@@ -10193,17 +10302,17 @@ function ie(e, t, r) {
|
|
|
10193
10302
|
e = (e % 360 + 360) % 360, t = Math.min(1, Math.max(0, t)), r = Math.min(1, Math.max(0, r));
|
|
10194
10303
|
const o = (1 - Math.abs(2 * r - 1)) * t, a = o * (1 - Math.abs(e / 60 % 2 - 1)), i = r - o / 2;
|
|
10195
10304
|
let l = 0, s = 0, c = 0;
|
|
10196
|
-
return e < 60 ? (l = o, s = a) : e < 120 ? (l = a, s = o) : e < 180 ? (s = o, c = a) : e < 240 ? (s = a, c = o) : e < 300 ? (l = a, c = o) : (l = o, c = a),
|
|
10305
|
+
return e < 60 ? (l = o, s = a) : e < 120 ? (l = a, s = o) : e < 180 ? (s = o, c = a) : e < 240 ? (s = a, c = o) : e < 300 ? (l = a, c = o) : (l = o, c = a), oo({ r: Math.round((l + i) * 255), g: Math.round((s + i) * 255), b: Math.round((c + i) * 255) });
|
|
10197
10306
|
}
|
|
10198
10307
|
function K(e, t) {
|
|
10199
10308
|
const [r, o, a] = le(e);
|
|
10200
10309
|
return ie(r, o, Math.min(1, Math.max(0, a + t)));
|
|
10201
10310
|
}
|
|
10202
|
-
const
|
|
10311
|
+
const io = 222, so = 0.12;
|
|
10203
10312
|
function zt(e, t) {
|
|
10204
|
-
return t < 0.04 ? [
|
|
10313
|
+
return t < 0.04 ? [io, so] : [e, t];
|
|
10205
10314
|
}
|
|
10206
|
-
function
|
|
10315
|
+
function lo(e) {
|
|
10207
10316
|
const [t, r, o] = le(e), [a, i] = zt(t, r);
|
|
10208
10317
|
return ie(a, i, Math.max(0.04, Math.min(0.2, 0.07 + (1 - o))));
|
|
10209
10318
|
}
|
|
@@ -10219,13 +10328,13 @@ function me(e) {
|
|
|
10219
10328
|
const [t, r, o] = le(e);
|
|
10220
10329
|
return ie(t, r, Math.max(0.02, Math.min(0.98, 1 - o)));
|
|
10221
10330
|
}
|
|
10222
|
-
function
|
|
10223
|
-
const t =
|
|
10331
|
+
function co(e) {
|
|
10332
|
+
const t = lo(e.bgBase), [r, o, a] = le(t), i = (l) => ie(r, o, Math.min(0.25, a + l));
|
|
10224
10333
|
return {
|
|
10225
10334
|
// ── Non-color tokens: carry over from light unchanged ──────────────────
|
|
10226
10335
|
...e,
|
|
10227
10336
|
// ── Shadows: dark variants have higher opacity for visibility ───────────
|
|
10228
|
-
...
|
|
10337
|
+
...ao,
|
|
10229
10338
|
// ── Backgrounds ─────────────────────────────────────────────────────────
|
|
10230
10339
|
bgBase: t,
|
|
10231
10340
|
bgSubtle: i(0.02),
|
|
@@ -10274,36 +10383,36 @@ function io(e) {
|
|
|
10274
10383
|
focusRing: me(e.focusRing)
|
|
10275
10384
|
};
|
|
10276
10385
|
}
|
|
10277
|
-
const At =
|
|
10278
|
-
function
|
|
10386
|
+
const At = co(Fe);
|
|
10387
|
+
function uo(e) {
|
|
10279
10388
|
return "--lucent-" + e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`).replace(/([a-z])(\d)/g, (t, r, o) => `${r}-${o}`);
|
|
10280
10389
|
}
|
|
10281
|
-
function
|
|
10282
|
-
const r = Object.entries(e).map(([o, a]) => ` ${
|
|
10390
|
+
function po(e, t = ":root") {
|
|
10391
|
+
const r = Object.entries(e).map(([o, a]) => ` ${uo(o)}: ${a};`).join(`
|
|
10283
10392
|
`);
|
|
10284
10393
|
return `${t} {
|
|
10285
10394
|
${r}
|
|
10286
10395
|
}`;
|
|
10287
10396
|
}
|
|
10288
|
-
function
|
|
10397
|
+
function fo(e) {
|
|
10289
10398
|
const t = parseInt(e.slice(1, 3), 16) / 255, r = parseInt(e.slice(3, 5), 16) / 255, o = parseInt(e.slice(5, 7), 16) / 255, a = (i) => i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
|
|
10290
10399
|
return 0.2126 * a(t) + 0.7152 * a(r) + 0.0722 * a(o);
|
|
10291
10400
|
}
|
|
10292
|
-
const
|
|
10293
|
-
function
|
|
10401
|
+
const ho = 0.2126729, mo = 0.7151522, go = 0.072175, vo = 0.56, bo = 0.57, yo = 0.65, xo = 0.62, mt = 0.022, wo = 1.414, ko = 1.14, So = 1.14, gt = 0.027, vt = 0.027;
|
|
10402
|
+
function bt(e) {
|
|
10294
10403
|
const t = parseInt(e.slice(1, 3), 16) / 255, r = parseInt(e.slice(3, 5), 16) / 255, o = parseInt(e.slice(5, 7), 16) / 255, a = Math.pow(t, 2.4), i = Math.pow(r, 2.4), l = Math.pow(o, 2.4);
|
|
10295
|
-
let s =
|
|
10296
|
-
return s < 0 && (s = 0), s < mt ? s + Math.pow(mt - s,
|
|
10404
|
+
let s = ho * a + mo * i + go * l;
|
|
10405
|
+
return s < 0 && (s = 0), s < mt ? s + Math.pow(mt - s, wo) : s;
|
|
10297
10406
|
}
|
|
10298
10407
|
function Le(e, t) {
|
|
10299
|
-
const r =
|
|
10408
|
+
const r = bt(e), o = bt(t);
|
|
10300
10409
|
let a;
|
|
10301
10410
|
if (r > o) {
|
|
10302
|
-
const i = (Math.pow(r,
|
|
10411
|
+
const i = (Math.pow(r, vo) - Math.pow(o, bo)) * ko;
|
|
10303
10412
|
a = i < gt ? 0 : i - gt;
|
|
10304
10413
|
} else {
|
|
10305
|
-
const i = (Math.pow(r,
|
|
10306
|
-
a = i > -
|
|
10414
|
+
const i = (Math.pow(r, yo) - Math.pow(o, xo)) * So;
|
|
10415
|
+
a = i > -vt ? 0 : i + vt;
|
|
10307
10416
|
}
|
|
10308
10417
|
return a * 100;
|
|
10309
10418
|
}
|
|
@@ -10311,7 +10420,7 @@ function Et(e) {
|
|
|
10311
10420
|
const t = Math.abs(Le(e, "#ffffff")), r = Math.abs(Le(e, "#000000"));
|
|
10312
10421
|
return t >= r ? "#ffffff" : "#000000";
|
|
10313
10422
|
}
|
|
10314
|
-
function
|
|
10423
|
+
function To(e, t, r = 60) {
|
|
10315
10424
|
if (Math.abs(Le(e, t)) >= r) return e;
|
|
10316
10425
|
const o = parseInt(e.slice(1, 3), 16) / 255, a = parseInt(e.slice(3, 5), 16) / 255, i = parseInt(e.slice(5, 7), 16) / 255, l = Math.max(o, a, i), s = Math.min(o, a, i);
|
|
10317
10426
|
let c = 0, d = 0, u = (l + s) / 2;
|
|
@@ -10319,15 +10428,15 @@ function wo(e, t, r = 60) {
|
|
|
10319
10428
|
const m = l - s;
|
|
10320
10429
|
d = u > 0.5 ? m / (2 - l - s) : m / (l + s), l === o ? c = ((a - i) / m + (a < i ? 6 : 0)) / 6 : l === a ? c = ((i - o) / m + 2) / 6 : c = ((o - a) / m + 4) / 6;
|
|
10321
10430
|
}
|
|
10322
|
-
const h =
|
|
10431
|
+
const h = fo(t) > 0.5 ? -5e-3 : 5e-3;
|
|
10323
10432
|
for (let m = 0; m < 100; m++) {
|
|
10324
10433
|
u = Math.min(1, Math.max(0, u + h));
|
|
10325
|
-
const T =
|
|
10434
|
+
const T = Co(c, d, u);
|
|
10326
10435
|
if (Math.abs(Le(T, t)) >= r) return T;
|
|
10327
10436
|
}
|
|
10328
10437
|
return e;
|
|
10329
10438
|
}
|
|
10330
|
-
function
|
|
10439
|
+
function Co(e, t, r) {
|
|
10331
10440
|
const o = (c, d, u) => (u < 0 && (u += 1), u > 1 && (u -= 1), u < 0.16666666666666666 ? c + (d - c) * 6 * u : u < 0.5 ? d : u < 0.6666666666666666 ? c + (d - c) * (0.6666666666666666 - u) * 6 : c);
|
|
10332
10441
|
let a, i, l;
|
|
10333
10442
|
if (t === 0)
|
|
@@ -10339,32 +10448,32 @@ function ko(e, t, r) {
|
|
|
10339
10448
|
const s = (c) => Math.round(c * 255).toString(16).padStart(2, "0");
|
|
10340
10449
|
return `#${s(a)}${s(i)}${s(l)}`;
|
|
10341
10450
|
}
|
|
10342
|
-
function
|
|
10451
|
+
function Io(e, t) {
|
|
10343
10452
|
const [r, o, a] = le(e);
|
|
10344
10453
|
return t ? ie(r, o * 0.3, Math.min(1, a + (1 - a) * 0.85)) : ie(r, o, Math.min(0.25, a + 0.04));
|
|
10345
10454
|
}
|
|
10346
|
-
const
|
|
10455
|
+
const Pe = {
|
|
10347
10456
|
subtle: { light: 0.95, dark: 0.12 },
|
|
10348
10457
|
text: { light: 0.28, dark: 0.78 }
|
|
10349
10458
|
};
|
|
10350
10459
|
function Me(e, t) {
|
|
10351
10460
|
const [r, o] = le(e);
|
|
10352
|
-
return ie(r, o * 0.5, t ?
|
|
10461
|
+
return ie(r, o * 0.5, t ? Pe.subtle.light : Pe.subtle.dark);
|
|
10353
10462
|
}
|
|
10354
10463
|
function De(e, t) {
|
|
10355
10464
|
const [r, o] = le(e);
|
|
10356
|
-
return ie(r, o, t ?
|
|
10465
|
+
return ie(r, o, t ? Pe.text.light : Pe.text.dark);
|
|
10357
10466
|
}
|
|
10358
10467
|
function qt(e, t, r) {
|
|
10359
10468
|
const o = {}, a = r === "light";
|
|
10360
10469
|
if ("borderDefault" in e && ("borderSubtle" in e || (o.borderSubtle = K(t.borderDefault, a ? 0.05 : -0.02)), "borderStrong" in e || (o.borderStrong = K(t.borderDefault, a ? -0.27 : 0.19))), "bgBase" in e && ("bgSubtle" in e || (o.bgSubtle = K(t.bgBase, a ? -0.02 : 0.02)), "surfaceTint" in e || (o.surfaceTint = K(t.bgBase, a ? -0.04 : 0.03)), !("surface" in e))) {
|
|
10361
|
-
const i =
|
|
10470
|
+
const i = Io(t.bgBase, a);
|
|
10362
10471
|
o.surface = i, "surfaceSecondary" in e || (o.surfaceSecondary = K(i, a ? -0.04 : 0.03)), "surfaceRaised" in e || (o.surfaceRaised = K(i, a ? 0 : 0.06)), "surfaceOverlay" in e || (o.surfaceOverlay = K(i, a ? 0 : 0.06));
|
|
10363
10472
|
}
|
|
10364
10473
|
return "surface" in e && ("surfaceSecondary" in e || (o.surfaceSecondary = K(t.surface, a ? -0.04 : 0.03)), "surfaceRaised" in e || (o.surfaceRaised = K(t.surface, a ? 0 : 0.06)), "surfaceOverlay" in e || (o.surfaceOverlay = K(t.surface, a ? 0 : 0.06))), "textPrimary" in e && ("textSecondary" in e || (o.textSecondary = K(t.textPrimary, a ? 0.2 : -0.15)), "textDisabled" in e || (o.textDisabled = K(t.textPrimary, a ? 0.35 : -0.4))), "accentDefault" in e && ("accentHover" in e || (o.accentHover = K(t.accentDefault, a ? 0.05 : -0.07)), "accentActive" in e || (o.accentActive = K(t.accentDefault, a ? 0.13 : -0.14)), "accentSubtle" in e || (o.accentSubtle = K(t.accentDefault, a ? 0.85 : -0.6))), "successDefault" in e && ("successSubtle" in e || (o.successSubtle = Me(t.successDefault, a)), "successText" in e || (o.successText = De(t.successDefault, a))), "warningDefault" in e && ("warningSubtle" in e || (o.warningSubtle = Me(t.warningDefault, a)), "warningText" in e || (o.warningText = De(t.warningDefault, a))), "dangerDefault" in e && ("dangerHover" in e || (o.dangerHover = K(t.dangerDefault, a ? 0.05 : -0.07)), "dangerSubtle" in e || (o.dangerSubtle = Me(t.dangerDefault, a)), "dangerText" in e || (o.dangerText = De(t.dangerDefault, a))), "infoDefault" in e && ("infoSubtle" in e || (o.infoSubtle = Me(t.infoDefault, a)), "infoText" in e || (o.infoText = De(t.infoDefault, a))), o;
|
|
10365
10474
|
}
|
|
10366
10475
|
function Bt(e, t = "light") {
|
|
10367
|
-
const o = { ...t === "dark" ? At :
|
|
10476
|
+
const o = { ...t === "dark" ? At : Fe, ...e }, a = qt(e, o, t), i = t === "light" ? K(o.accentDefault, -0.15) : K(o.accentDefault, 0.15);
|
|
10368
10477
|
return {
|
|
10369
10478
|
...o,
|
|
10370
10479
|
...a,
|
|
@@ -10394,7 +10503,7 @@ const Rt = {
|
|
|
10394
10503
|
dangerDefault: "#ef4444",
|
|
10395
10504
|
infoDefault: "#3b82f6"
|
|
10396
10505
|
}
|
|
10397
|
-
},
|
|
10506
|
+
}, Mo = {
|
|
10398
10507
|
name: "brand",
|
|
10399
10508
|
light: {
|
|
10400
10509
|
bgBase: "#fffefb",
|
|
@@ -10438,7 +10547,7 @@ const Rt = {
|
|
|
10438
10547
|
dangerDefault: "#ef4444",
|
|
10439
10548
|
infoDefault: "#3b82f6"
|
|
10440
10549
|
}
|
|
10441
|
-
},
|
|
10550
|
+
}, Do = {
|
|
10442
10551
|
name: "violet",
|
|
10443
10552
|
light: {
|
|
10444
10553
|
bgBase: "#fdfcfe",
|
|
@@ -10460,7 +10569,7 @@ const Rt = {
|
|
|
10460
10569
|
dangerDefault: "#ef4444",
|
|
10461
10570
|
infoDefault: "#3b82f6"
|
|
10462
10571
|
}
|
|
10463
|
-
},
|
|
10572
|
+
}, zo = {
|
|
10464
10573
|
name: "emerald",
|
|
10465
10574
|
light: {
|
|
10466
10575
|
bgBase: "#fbfefc",
|
|
@@ -10482,7 +10591,7 @@ const Rt = {
|
|
|
10482
10591
|
dangerDefault: "#ef4444",
|
|
10483
10592
|
infoDefault: "#3b82f6"
|
|
10484
10593
|
}
|
|
10485
|
-
},
|
|
10594
|
+
}, Ao = {
|
|
10486
10595
|
name: "teal",
|
|
10487
10596
|
light: {
|
|
10488
10597
|
bgBase: "#fbfefd",
|
|
@@ -10504,7 +10613,7 @@ const Rt = {
|
|
|
10504
10613
|
dangerDefault: "#ef4444",
|
|
10505
10614
|
infoDefault: "#3b82f6"
|
|
10506
10615
|
}
|
|
10507
|
-
},
|
|
10616
|
+
}, Pt = {
|
|
10508
10617
|
name: "rose",
|
|
10509
10618
|
light: {
|
|
10510
10619
|
bgBase: "#fffcfd",
|
|
@@ -10526,7 +10635,7 @@ const Rt = {
|
|
|
10526
10635
|
dangerDefault: "#ef4444",
|
|
10527
10636
|
infoDefault: "#3b82f6"
|
|
10528
10637
|
}
|
|
10529
|
-
},
|
|
10638
|
+
}, Eo = {
|
|
10530
10639
|
name: "coral",
|
|
10531
10640
|
light: {
|
|
10532
10641
|
bgBase: "#fffcfb",
|
|
@@ -10548,7 +10657,7 @@ const Rt = {
|
|
|
10548
10657
|
dangerDefault: "#ef4444",
|
|
10549
10658
|
infoDefault: "#3b82f6"
|
|
10550
10659
|
}
|
|
10551
|
-
},
|
|
10660
|
+
}, qo = {
|
|
10552
10661
|
name: "amber",
|
|
10553
10662
|
light: {
|
|
10554
10663
|
bgBase: "#fffefb",
|
|
@@ -10570,7 +10679,7 @@ const Rt = {
|
|
|
10570
10679
|
dangerDefault: "#ef4444",
|
|
10571
10680
|
infoDefault: "#3b82f6"
|
|
10572
10681
|
}
|
|
10573
|
-
},
|
|
10682
|
+
}, Bo = {
|
|
10574
10683
|
name: "ocean",
|
|
10575
10684
|
light: {
|
|
10576
10685
|
bgBase: "#fbfdff",
|
|
@@ -10592,7 +10701,7 @@ const Rt = {
|
|
|
10592
10701
|
dangerDefault: "#ef4444",
|
|
10593
10702
|
infoDefault: "#3b82f6"
|
|
10594
10703
|
}
|
|
10595
|
-
},
|
|
10704
|
+
}, Ro = {
|
|
10596
10705
|
name: "slate",
|
|
10597
10706
|
light: {
|
|
10598
10707
|
bgBase: "#fafbfc",
|
|
@@ -10614,7 +10723,7 @@ const Rt = {
|
|
|
10614
10723
|
dangerDefault: "#ef4444",
|
|
10615
10724
|
infoDefault: "#3b82f6"
|
|
10616
10725
|
}
|
|
10617
|
-
},
|
|
10726
|
+
}, Lo = {
|
|
10618
10727
|
name: "sage",
|
|
10619
10728
|
light: {
|
|
10620
10729
|
bgBase: "#fbfcfb",
|
|
@@ -10636,7 +10745,7 @@ const Rt = {
|
|
|
10636
10745
|
dangerDefault: "#ef4444",
|
|
10637
10746
|
infoDefault: "#3b82f6"
|
|
10638
10747
|
}
|
|
10639
|
-
},
|
|
10748
|
+
}, Ft = {
|
|
10640
10749
|
name: "sharp",
|
|
10641
10750
|
tokens: {
|
|
10642
10751
|
radiusNone: "0px",
|
|
@@ -10765,74 +10874,74 @@ const Rt = {
|
|
|
10765
10874
|
shadowLg: "rgba(0, 0, 0, 0.3) 0px 8px 24px, rgba(0, 0, 0, 0.25) 0px 16px 48px",
|
|
10766
10875
|
shadowXl: "rgba(0, 0, 0, 0.35) 0px 12px 32px, rgba(0, 0, 0, 0.3) 0px 24px 64px"
|
|
10767
10876
|
}
|
|
10768
|
-
},
|
|
10877
|
+
}, Po = {
|
|
10769
10878
|
name: "modern",
|
|
10770
10879
|
palette: Lt,
|
|
10771
10880
|
shape: Nt,
|
|
10772
10881
|
density: Ot,
|
|
10773
10882
|
shadow: jt
|
|
10774
|
-
},
|
|
10883
|
+
}, Fo = {
|
|
10775
10884
|
name: "enterprise",
|
|
10776
10885
|
palette: Rt,
|
|
10777
|
-
shape:
|
|
10886
|
+
shape: Ft,
|
|
10778
10887
|
density: Wt,
|
|
10779
10888
|
shadow: Vt
|
|
10780
|
-
},
|
|
10889
|
+
}, No = {
|
|
10781
10890
|
name: "playful",
|
|
10782
|
-
palette:
|
|
10891
|
+
palette: Pt,
|
|
10783
10892
|
shape: $t,
|
|
10784
10893
|
density: Ht,
|
|
10785
10894
|
shadow: Ut
|
|
10786
|
-
},
|
|
10895
|
+
}, $o = {
|
|
10787
10896
|
default: Rt,
|
|
10788
|
-
brand:
|
|
10897
|
+
brand: Mo,
|
|
10789
10898
|
indigo: Lt,
|
|
10790
|
-
violet:
|
|
10791
|
-
emerald:
|
|
10792
|
-
teal:
|
|
10793
|
-
rose:
|
|
10794
|
-
coral:
|
|
10795
|
-
amber:
|
|
10796
|
-
ocean:
|
|
10797
|
-
slate:
|
|
10798
|
-
sage:
|
|
10799
|
-
},
|
|
10800
|
-
sharp:
|
|
10899
|
+
violet: Do,
|
|
10900
|
+
emerald: zo,
|
|
10901
|
+
teal: Ao,
|
|
10902
|
+
rose: Pt,
|
|
10903
|
+
coral: Eo,
|
|
10904
|
+
amber: qo,
|
|
10905
|
+
ocean: Bo,
|
|
10906
|
+
slate: Ro,
|
|
10907
|
+
sage: Lo
|
|
10908
|
+
}, Wo = {
|
|
10909
|
+
sharp: Ft,
|
|
10801
10910
|
rounded: Nt,
|
|
10802
10911
|
pill: $t
|
|
10803
|
-
},
|
|
10912
|
+
}, Oo = {
|
|
10804
10913
|
compact: Wt,
|
|
10805
10914
|
default: Ot,
|
|
10806
10915
|
spacious: Ht
|
|
10807
|
-
},
|
|
10916
|
+
}, Ho = {
|
|
10808
10917
|
flat: Vt,
|
|
10809
10918
|
subtle: jt,
|
|
10810
10919
|
elevated: Ut
|
|
10811
|
-
},
|
|
10812
|
-
modern:
|
|
10813
|
-
enterprise:
|
|
10814
|
-
playful:
|
|
10920
|
+
}, Vo = {
|
|
10921
|
+
modern: Po,
|
|
10922
|
+
enterprise: Fo,
|
|
10923
|
+
playful: No
|
|
10815
10924
|
};
|
|
10816
|
-
function
|
|
10817
|
-
return typeof e == "string" ?
|
|
10925
|
+
function jo(e) {
|
|
10926
|
+
return typeof e == "string" ? $o[e] : e;
|
|
10818
10927
|
}
|
|
10819
|
-
function
|
|
10820
|
-
return typeof e == "string" ?
|
|
10928
|
+
function Uo(e) {
|
|
10929
|
+
return typeof e == "string" ? Wo[e] : e;
|
|
10821
10930
|
}
|
|
10822
|
-
function
|
|
10823
|
-
return typeof e == "string" ?
|
|
10931
|
+
function Go(e) {
|
|
10932
|
+
return typeof e == "string" ? Oo[e] : e;
|
|
10824
10933
|
}
|
|
10825
|
-
function
|
|
10826
|
-
return typeof e == "string" ?
|
|
10934
|
+
function _o(e) {
|
|
10935
|
+
return typeof e == "string" ? Ho[e] : e;
|
|
10827
10936
|
}
|
|
10828
|
-
function
|
|
10937
|
+
function Yo(e, t) {
|
|
10829
10938
|
let r, o, a, i;
|
|
10830
10939
|
if (typeof e == "string") {
|
|
10831
|
-
const s =
|
|
10940
|
+
const s = Vo[e];
|
|
10832
10941
|
if (!s) return {};
|
|
10833
10942
|
r = s.palette, o = s.shape, a = s.density, i = s.shadow;
|
|
10834
10943
|
} else
|
|
10835
|
-
e.palette !== void 0 && (r =
|
|
10944
|
+
e.palette !== void 0 && (r = jo(e.palette)), e.shape !== void 0 && (o = Uo(e.shape)), e.density !== void 0 && (a = Go(e.density)), e.shadow !== void 0 && (i = _o(e.shadow));
|
|
10836
10945
|
const l = {};
|
|
10837
10946
|
if (r) {
|
|
10838
10947
|
const s = Bt(r[t], t);
|
|
@@ -10842,36 +10951,36 @@ function Uo(e, t) {
|
|
|
10842
10951
|
}
|
|
10843
10952
|
const Gt = ye({
|
|
10844
10953
|
theme: "light",
|
|
10845
|
-
tokens:
|
|
10954
|
+
tokens: Fe
|
|
10846
10955
|
});
|
|
10847
|
-
function
|
|
10956
|
+
function Ts({
|
|
10848
10957
|
theme: e = "light",
|
|
10849
10958
|
preset: t,
|
|
10850
10959
|
tokens: r,
|
|
10851
10960
|
anchors: o,
|
|
10852
10961
|
children: a
|
|
10853
10962
|
}) {
|
|
10854
|
-
const i =
|
|
10963
|
+
const i = be().replace(/:/g, ""), l = t ? Yo(t, e) : void 0, s = (() => {
|
|
10855
10964
|
if (o) {
|
|
10856
10965
|
const p = Bt(o, e);
|
|
10857
10966
|
if (l) {
|
|
10858
|
-
const
|
|
10967
|
+
const v = {};
|
|
10859
10968
|
for (const [k, x] of Object.entries(l))
|
|
10860
|
-
(k.startsWith("space") || k.startsWith("radius") || k.startsWith("shadow") || k.startsWith("duration") || k.startsWith("easing")) && (
|
|
10861
|
-
return { ...p, ...
|
|
10969
|
+
(k.startsWith("space") || k.startsWith("radius") || k.startsWith("shadow") || k.startsWith("duration") || k.startsWith("easing")) && (v[k] = x);
|
|
10970
|
+
return { ...p, ...v };
|
|
10862
10971
|
}
|
|
10863
10972
|
return p;
|
|
10864
10973
|
}
|
|
10865
|
-
const d = e === "dark" ? At :
|
|
10974
|
+
const d = e === "dark" ? At : Fe, u = l ? { ...l, ...r } : r, f = u ? { ...d, ...u } : d, h = u ? qt(u, f, e) : {}, m = (u == null ? void 0 : u.accentBorder) ?? (e === "light" ? K(f.accentDefault, -0.15) : K(f.accentDefault, 0.15)), T = (u == null ? void 0 : u.textOnAccent) ?? Et(f.accentDefault), b = To(f.accentDefault, T);
|
|
10866
10975
|
return {
|
|
10867
10976
|
...f,
|
|
10868
10977
|
...h,
|
|
10869
|
-
accentDefault:
|
|
10978
|
+
accentDefault: b,
|
|
10870
10979
|
textOnAccent: T,
|
|
10871
10980
|
accentBorder: m
|
|
10872
10981
|
};
|
|
10873
10982
|
})(), c = `html { font-size: 14px; }
|
|
10874
|
-
` +
|
|
10983
|
+
` + po(s, ":root");
|
|
10875
10984
|
return se(() => {
|
|
10876
10985
|
let d = document.getElementById(`lucent-tokens-${i}`);
|
|
10877
10986
|
return d || (d = document.createElement("style"), d.id = `lucent-tokens-${i}`, document.head.appendChild(d)), d.textContent = c, () => {
|
|
@@ -10880,10 +10989,10 @@ function ys({
|
|
|
10880
10989
|
};
|
|
10881
10990
|
}, [i, c]), /* @__PURE__ */ n(Gt.Provider, { value: { theme: e, tokens: s }, children: a });
|
|
10882
10991
|
}
|
|
10883
|
-
function
|
|
10992
|
+
function Cs() {
|
|
10884
10993
|
return fe(Gt);
|
|
10885
10994
|
}
|
|
10886
|
-
const
|
|
10995
|
+
const Is = {
|
|
10887
10996
|
bgBase: {
|
|
10888
10997
|
description: "Main page/canvas background. The lowest elevation layer — everything sits on top of this. When bgBase is customized, `surface` and `surfaceTint` are auto-derived so the entire card elevation hierarchy (ghost → outline → filled → elevated → combo) adapts automatically.",
|
|
10889
10998
|
lightGuidance: "Near-white. Typically #ffffff or a very faint tint (L > 0.96).",
|
|
@@ -10938,7 +11047,7 @@ const ws = {
|
|
|
10938
11047
|
darkGuidance: "Slightly lighter than light-mode. createTheme() handles this automatically.",
|
|
10939
11048
|
derives: ["infoSubtle", "infoText"]
|
|
10940
11049
|
}
|
|
10941
|
-
},
|
|
11050
|
+
}, Ms = {
|
|
10942
11051
|
id: "lucent-provider",
|
|
10943
11052
|
name: "LucentProvider",
|
|
10944
11053
|
tier: "provider",
|
|
@@ -11118,7 +11227,7 @@ const myTheme = createTheme({
|
|
|
11118
11227
|
}
|
|
11119
11228
|
],
|
|
11120
11229
|
compositionGraph: []
|
|
11121
|
-
},
|
|
11230
|
+
}, Ds = {
|
|
11122
11231
|
accentDefault: "#e9c96b",
|
|
11123
11232
|
accentHover: "#ddb84e",
|
|
11124
11233
|
accentActive: "#c9a33b",
|
|
@@ -11128,7 +11237,7 @@ const myTheme = createTheme({
|
|
|
11128
11237
|
function te(e, t) {
|
|
11129
11238
|
return { field: e, message: t };
|
|
11130
11239
|
}
|
|
11131
|
-
function
|
|
11240
|
+
function Ko(e) {
|
|
11132
11241
|
const t = [];
|
|
11133
11242
|
if (typeof e != "object" || e === null)
|
|
11134
11243
|
return { valid: !1, errors: [te("manifest", "Must be a non-null object")] };
|
|
@@ -11145,8 +11254,8 @@ function Go(e) {
|
|
|
11145
11254
|
(typeof s.title != "string" || s.title === "") && t.push(te(`${c}.title`, "Must be a non-empty string")), (typeof s.code != "string" || s.code === "") && t.push(te(`${c}.code`, "Must be a non-empty string"));
|
|
11146
11255
|
}) : t.push(te("usageExamples", "Must be an array")), Array.isArray(r.compositionGraph) || t.push(te("compositionGraph", "Must be an array (empty array is fine for atoms)")), typeof r.specVersion == "string" && !/^\d+\.\d+$/.test(r.specVersion) && t.push(te("specVersion", 'Must be "MAJOR.MINOR" format, e.g. "0.1"')), { valid: t.length === 0, errors: t };
|
|
11147
11256
|
}
|
|
11148
|
-
function
|
|
11149
|
-
const t =
|
|
11257
|
+
function zs(e) {
|
|
11258
|
+
const t = Ko(e);
|
|
11150
11259
|
if (!t.valid) {
|
|
11151
11260
|
const r = t.errors.map((o) => ` ${o.field}: ${o.message}`).join(`
|
|
11152
11261
|
`);
|
|
@@ -11154,137 +11263,139 @@ function Ts(e) {
|
|
|
11154
11263
|
${r}`);
|
|
11155
11264
|
}
|
|
11156
11265
|
}
|
|
11157
|
-
function
|
|
11266
|
+
function As(e) {
|
|
11158
11267
|
if (typeof e != "object" || e === null) return !1;
|
|
11159
11268
|
const t = e;
|
|
11160
11269
|
return typeof t.name == "string" && typeof t.type == "string" && typeof t.required == "boolean" && typeof t.description == "string";
|
|
11161
11270
|
}
|
|
11162
|
-
const
|
|
11271
|
+
const Es = "1.0", qs = "0.1.0";
|
|
11163
11272
|
export {
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11273
|
+
Gi as Alert,
|
|
11274
|
+
_i as AlertManifest,
|
|
11275
|
+
oi as Avatar,
|
|
11276
|
+
ii as AvatarManifest,
|
|
11277
|
+
ni as Badge,
|
|
11278
|
+
ai as BadgeManifest,
|
|
11279
|
+
Zi as Breadcrumb,
|
|
11171
11280
|
Ee as Button,
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11281
|
+
Qo as ButtonManifest,
|
|
11282
|
+
ri as CHIP_MANIFEST,
|
|
11283
|
+
Ai as COLOR_PICKER_MANIFEST,
|
|
11284
|
+
Ei as COLOR_SWATCH_MANIFEST,
|
|
11285
|
+
os as COMMAND_PALETTE_MANIFEST,
|
|
11286
|
+
Vi as Card,
|
|
11287
|
+
ji as CardBleed,
|
|
11288
|
+
Ui as CardManifest,
|
|
11180
11289
|
yt as Checkbox,
|
|
11181
|
-
|
|
11290
|
+
di as CheckboxManifest,
|
|
11182
11291
|
un as Chip,
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11292
|
+
Mi as CodeBlock,
|
|
11293
|
+
Di as CodeBlockManifest,
|
|
11294
|
+
es as Collapsible,
|
|
11186
11295
|
ua as ColorPicker,
|
|
11187
11296
|
ze as ColorSwatch,
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11297
|
+
rs as CommandPalette,
|
|
11298
|
+
as as DATA_TABLE_MANIFEST,
|
|
11299
|
+
cs as DATE_PICKER_MANIFEST,
|
|
11300
|
+
us as DATE_RANGE_PICKER_MANIFEST,
|
|
11301
|
+
ns as DataTable,
|
|
11302
|
+
ls as DatePicker,
|
|
11303
|
+
ds as DateRangePicker,
|
|
11304
|
+
li as Divider,
|
|
11305
|
+
ci as DividerManifest,
|
|
11306
|
+
Yi as EmptyState,
|
|
11307
|
+
Ki as EmptyStateManifest,
|
|
11308
|
+
fs as FILE_UPLOAD_MANIFEST,
|
|
11309
|
+
ps as FileUpload,
|
|
11310
|
+
$i as FormField,
|
|
11311
|
+
Wi as FormFieldManifest,
|
|
11312
|
+
wi as Icon,
|
|
11313
|
+
ki as IconManifest,
|
|
11205
11314
|
ce as Input,
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11315
|
+
ei as InputManifest,
|
|
11316
|
+
qs as LUCENT_UI_VERSION,
|
|
11317
|
+
Ts as LucentProvider,
|
|
11318
|
+
Ms as LucentProviderManifest,
|
|
11319
|
+
Es as MANIFEST_SPEC_VERSION,
|
|
11320
|
+
ss as MULTI_SELECT_MANIFEST,
|
|
11321
|
+
ys as Menu,
|
|
11322
|
+
bs as MenuGroup,
|
|
11323
|
+
gs as MenuItem,
|
|
11324
|
+
xs as MenuManifest,
|
|
11325
|
+
vs as MenuSeparator,
|
|
11326
|
+
is as MultiSelect,
|
|
11327
|
+
Ti as NavLink,
|
|
11328
|
+
ts as PageLayout,
|
|
11329
|
+
Fi as Progress,
|
|
11330
|
+
Ni as ProgressManifest,
|
|
11331
|
+
ui as Radio,
|
|
11221
11332
|
kn as RadioGroup,
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11333
|
+
pi as RadioGroupUncontrolled,
|
|
11334
|
+
fi as RadioManifest,
|
|
11335
|
+
Li as Row,
|
|
11336
|
+
Pi as RowManifest,
|
|
11337
|
+
qi as SEGMENTED_CONTROL_MANIFEST,
|
|
11338
|
+
Oi as SearchInput,
|
|
11339
|
+
Hi as SearchInputManifest,
|
|
11229
11340
|
kt as SegmentedControl,
|
|
11230
11341
|
wt as Select,
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11342
|
+
gi as SelectManifest,
|
|
11343
|
+
Xi as Skeleton,
|
|
11344
|
+
Ji as SkeletonManifest,
|
|
11345
|
+
Ci as Slider,
|
|
11346
|
+
Ii as SliderManifest,
|
|
11347
|
+
vn as Spinner,
|
|
11348
|
+
si as SpinnerManifest,
|
|
11349
|
+
Bi as Stack,
|
|
11350
|
+
Ri as StackManifest,
|
|
11351
|
+
ms as TIMELINE_MANIFEST,
|
|
11241
11352
|
xe as Table,
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11353
|
+
zi as TableManifest,
|
|
11354
|
+
Qi as Tabs,
|
|
11355
|
+
vi as Tag,
|
|
11356
|
+
bi as TagManifest,
|
|
11246
11357
|
_ as Text,
|
|
11247
|
-
|
|
11358
|
+
Si as TextManifest,
|
|
11248
11359
|
on as Textarea,
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11360
|
+
ti as TextareaManifest,
|
|
11361
|
+
Is as ThemeAnchorsSpec,
|
|
11362
|
+
hs as Timeline,
|
|
11363
|
+
Ss as ToastManifest,
|
|
11364
|
+
ks as ToastProvider,
|
|
11365
|
+
hi as Toggle,
|
|
11366
|
+
mi as ToggleManifest,
|
|
11367
|
+
yi as Tooltip,
|
|
11368
|
+
xi as TooltipManifest,
|
|
11369
|
+
zs as assertManifest,
|
|
11370
|
+
Mo as brandPalette,
|
|
11371
|
+
Ds as brandTokens,
|
|
11261
11372
|
Wt as compactDensity,
|
|
11262
11373
|
Bt as createTheme,
|
|
11263
11374
|
At as darkTokens,
|
|
11264
11375
|
Ot as defaultDensity,
|
|
11265
11376
|
Rt as defaultPalette,
|
|
11266
|
-
|
|
11377
|
+
co as deriveDarkFromLight,
|
|
11267
11378
|
qt as deriveTokens,
|
|
11268
11379
|
Ut as elevatedShadow,
|
|
11269
|
-
|
|
11270
|
-
|
|
11380
|
+
zo as emeraldPalette,
|
|
11381
|
+
Fo as enterprisePreset,
|
|
11271
11382
|
Vt as flatShadow,
|
|
11272
11383
|
Et as getContrastText,
|
|
11273
11384
|
Lt as indigoPalette,
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11385
|
+
As as isValidPropDescriptor,
|
|
11386
|
+
Fe as lightTokens,
|
|
11387
|
+
po as makeLibraryCSS,
|
|
11388
|
+
Po as modernPreset,
|
|
11389
|
+
Bo as oceanPalette,
|
|
11279
11390
|
$t as pillShape,
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11391
|
+
No as playfulPreset,
|
|
11392
|
+
Yo as resolvePreset,
|
|
11393
|
+
Pt as rosePalette,
|
|
11283
11394
|
Nt as roundedShape,
|
|
11284
|
-
|
|
11395
|
+
Ft as sharpShape,
|
|
11285
11396
|
Ht as spaciousDensity,
|
|
11286
11397
|
jt as subtleShadow,
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11398
|
+
Cs as useLucent,
|
|
11399
|
+
ws as useToast,
|
|
11400
|
+
Ko as validateManifest
|
|
11290
11401
|
};
|