lucent-ui 0.14.1 → 0.14.2
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 +25 -25
- package/dist/index.d.ts +2 -1
- package/dist/index.js +109 -131
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ const qt = {
|
|
|
74
74
|
},
|
|
75
75
|
onMouseLeave: (p) => {
|
|
76
76
|
var b;
|
|
77
|
-
!f && !c &&
|
|
77
|
+
!f && !c && Ft(p.currentTarget, e, d), (b = m.onMouseLeave) == null || b.call(m, p);
|
|
78
78
|
},
|
|
79
79
|
onMouseDown: (p) => {
|
|
80
80
|
var b;
|
|
@@ -118,12 +118,12 @@ const Lt = {
|
|
|
118
118
|
function Rt(e, t, r) {
|
|
119
119
|
e.style.transform = "translateY(-1px)", e.style.boxShadow = Lt[t], t === "primary" ? e.style.background = "var(--lucent-accent-hover)" : t === "secondary" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 10%, var(--lucent-surface-secondary))" : t === "outline" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 10%, var(--lucent-surface))" : t === "ghost" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 8%, var(--lucent-surface))" : t === "danger" && (e.style.background = "var(--lucent-danger-hover)", r !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)"));
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Ft(e, t, r) {
|
|
122
122
|
e.style.transform = "", e.style.boxShadow = "", t === "primary" ? e.style.background = "var(--lucent-accent-default)" : t === "secondary" ? e.style.background = "var(--lucent-surface-secondary)" : t === "outline" ? e.style.background = "var(--lucent-surface)" : t === "ghost" ? e.style.background = "transparent" : t === "danger" && (e.style.background = "var(--lucent-danger-default)", r !== !1 && (e.style.borderColor = "var(--lucent-danger-default)"));
|
|
123
123
|
}
|
|
124
|
-
const
|
|
124
|
+
const Pt = { xs: 10, sm: 12, md: 14, lg: 16 };
|
|
125
125
|
function Nt({ size: e }) {
|
|
126
|
-
const t =
|
|
126
|
+
const t = Pt[e];
|
|
127
127
|
return /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, style: { flexShrink: 0, marginLeft: -2 }, children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" }) });
|
|
128
128
|
}
|
|
129
129
|
function $t() {
|
|
@@ -315,7 +315,7 @@ const Wr = {
|
|
|
315
315
|
whiteSpace: "nowrap",
|
|
316
316
|
userSelect: "none",
|
|
317
317
|
flexShrink: 0
|
|
318
|
-
}, z = { ...x, paddingLeft: ce[e], paddingRight: "2px" },
|
|
318
|
+
}, z = { ...x, paddingLeft: ce[e], paddingRight: "2px" }, F = { ...x, paddingLeft: "2px", paddingRight: ce[e] };
|
|
319
319
|
return /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...d }, children: [
|
|
320
320
|
t && /* @__PURE__ */ n(
|
|
321
321
|
"label",
|
|
@@ -403,7 +403,7 @@ const Wr = {
|
|
|
403
403
|
alignItems: "center"
|
|
404
404
|
}, children: i })
|
|
405
405
|
] }),
|
|
406
|
-
s && /* @__PURE__ */ n("span", { style:
|
|
406
|
+
s && /* @__PURE__ */ n("span", { style: F, children: s })
|
|
407
407
|
]
|
|
408
408
|
}
|
|
409
409
|
),
|
|
@@ -1146,7 +1146,7 @@ const Xr = {
|
|
|
1146
1146
|
style: h,
|
|
1147
1147
|
...y
|
|
1148
1148
|
}, g) => {
|
|
1149
|
-
const m = $(null), C = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, f = nn[t], p = i !== void 0, [b, k] = I(l ?? !1), [S, A] = I(!1), x = p ? !!i : b, z = $(x), [
|
|
1149
|
+
const m = $(null), C = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, f = nn[t], p = i !== void 0, [b, k] = I(l ?? !1), [S, A] = I(!1), x = p ? !!i : b, z = $(x), [F, w] = I(0);
|
|
1150
1150
|
Y(() => {
|
|
1151
1151
|
!s && z.current !== x && (z.current = x, w((R) => R + 1));
|
|
1152
1152
|
}, [x, s]);
|
|
@@ -1177,7 +1177,7 @@ const Xr = {
|
|
|
1177
1177
|
flexShrink: 0,
|
|
1178
1178
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1179
1179
|
// Re-key forces the animation to restart on every toggle.
|
|
1180
|
-
animation:
|
|
1180
|
+
animation: F > 0 ? "lucent-cb-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
1181
1181
|
}, B = /* @__PURE__ */ v(
|
|
1182
1182
|
"label",
|
|
1183
1183
|
{
|
|
@@ -1229,7 +1229,7 @@ const Xr = {
|
|
|
1229
1229
|
children: /* @__PURE__ */ n("path", { d: "M2 5H8", stroke: q, strokeWidth: 1.5, strokeLinecap: "round" })
|
|
1230
1230
|
}
|
|
1231
1231
|
)
|
|
1232
|
-
] },
|
|
1232
|
+
] }, F),
|
|
1233
1233
|
(e || a) && /* @__PURE__ */ v("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
1234
1234
|
e && /* @__PURE__ */ n("span", { style: {
|
|
1235
1235
|
fontWeight: a ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1416,7 +1416,7 @@ function Zr({ value: e, label: t, size: r = "md", contained: o = !1, helperText:
|
|
|
1416
1416
|
background: p ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)",
|
|
1417
1417
|
animation: b ? "lucent-radio-dot 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0,
|
|
1418
1418
|
opacity: b ? 1 : 0
|
|
1419
|
-
},
|
|
1419
|
+
}, F = {
|
|
1420
1420
|
width: m,
|
|
1421
1421
|
height: m,
|
|
1422
1422
|
borderRadius: "50%",
|
|
@@ -1457,7 +1457,7 @@ function Zr({ value: e, label: t, size: r = "md", contained: o = !1, helperText:
|
|
|
1457
1457
|
...h
|
|
1458
1458
|
}
|
|
1459
1459
|
),
|
|
1460
|
-
/* @__PURE__ */ n("span", { "aria-hidden": !0, style:
|
|
1460
|
+
/* @__PURE__ */ n("span", { "aria-hidden": !0, style: F, children: /* @__PURE__ */ n("span", { style: z }) }, S),
|
|
1461
1461
|
t || a ? /* @__PURE__ */ v("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
1462
1462
|
t && /* @__PURE__ */ n("span", { style: {
|
|
1463
1463
|
fontWeight: a ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1646,7 +1646,7 @@ function to({
|
|
|
1646
1646
|
Y(() => {
|
|
1647
1647
|
!s && S.current !== p && (S.current = p, x((B) => B + 1));
|
|
1648
1648
|
}, [p, s]);
|
|
1649
|
-
const { track: [z,
|
|
1649
|
+
const { track: [z, F], thumb: w } = pn[t], E = p ? z - w - 2 : 2, H = (B) => {
|
|
1650
1650
|
m || f(B.target.checked), d == null || d(B);
|
|
1651
1651
|
}, q = /* @__PURE__ */ n(
|
|
1652
1652
|
"span",
|
|
@@ -1655,9 +1655,9 @@ function to({
|
|
|
1655
1655
|
style: {
|
|
1656
1656
|
position: "relative",
|
|
1657
1657
|
width: z,
|
|
1658
|
-
height:
|
|
1659
|
-
borderRadius:
|
|
1660
|
-
background: s ? "var(--lucent-surface-secondary)" : p ? "var(--lucent-accent-default)" : "var(--lucent-
|
|
1658
|
+
height: F,
|
|
1659
|
+
borderRadius: F / 2,
|
|
1660
|
+
background: s ? "var(--lucent-surface-secondary)" : p ? "var(--lucent-accent-default)" : "var(--lucent-control-track)",
|
|
1661
1661
|
flexShrink: 0,
|
|
1662
1662
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1663
1663
|
animation: A > 0 ? `lucent-toggle-pop 240ms ${Ge} forwards` : void 0
|
|
@@ -2672,12 +2672,12 @@ const Dn = { sm: "3px", md: "4px", lg: "5px" }, In = { sm: "14px", md: "18px", l
|
|
|
2672
2672
|
to right,
|
|
2673
2673
|
var(--lucent-accent-default) 0%,
|
|
2674
2674
|
var(--lucent-accent-default) var(--ls-fill),
|
|
2675
|
-
var(--lucent-
|
|
2676
|
-
var(--lucent-
|
|
2675
|
+
var(--lucent-control-track) var(--ls-fill),
|
|
2676
|
+
var(--lucent-control-track) 100%
|
|
2677
2677
|
);
|
|
2678
2678
|
}
|
|
2679
2679
|
.lucent-slider:disabled::-webkit-slider-runnable-track {
|
|
2680
|
-
background: var(--lucent-
|
|
2680
|
+
background: var(--lucent-control-track);
|
|
2681
2681
|
}
|
|
2682
2682
|
|
|
2683
2683
|
/* WebKit thumb */
|
|
@@ -2710,7 +2710,7 @@ const Dn = { sm: "3px", md: "4px", lg: "5px" }, In = { sm: "14px", md: "18px", l
|
|
|
2710
2710
|
.lucent-slider::-moz-range-track {
|
|
2711
2711
|
height: var(--ls-track-h);
|
|
2712
2712
|
border-radius: 999px;
|
|
2713
|
-
background: var(--lucent-
|
|
2713
|
+
background: var(--lucent-control-track);
|
|
2714
2714
|
}
|
|
2715
2715
|
.lucent-slider::-moz-range-progress {
|
|
2716
2716
|
height: var(--ls-track-h);
|
|
@@ -3280,7 +3280,7 @@ function Rn({ children: e, style: t, ...r }) {
|
|
|
3280
3280
|
}
|
|
3281
3281
|
);
|
|
3282
3282
|
}
|
|
3283
|
-
function
|
|
3283
|
+
function Fn({ children: e, className: t, ...r }) {
|
|
3284
3284
|
return /* @__PURE__ */ n(
|
|
3285
3285
|
"tr",
|
|
3286
3286
|
{
|
|
@@ -3290,7 +3290,7 @@ function Pn({ children: e, className: t, ...r }) {
|
|
|
3290
3290
|
}
|
|
3291
3291
|
);
|
|
3292
3292
|
}
|
|
3293
|
-
function
|
|
3293
|
+
function Pn({ as: e, children: t, style: r, ...o }) {
|
|
3294
3294
|
const a = e === "th", i = {
|
|
3295
3295
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
3296
3296
|
fontFamily: "var(--lucent-font-family-base)",
|
|
@@ -3333,8 +3333,8 @@ function fe({ striped: e = !1, children: t, className: r, style: o, ...a }) {
|
|
|
3333
3333
|
fe.Head = Bn;
|
|
3334
3334
|
fe.Body = Ln;
|
|
3335
3335
|
fe.Foot = Rn;
|
|
3336
|
-
fe.Row =
|
|
3337
|
-
fe.Cell =
|
|
3336
|
+
fe.Row = Fn;
|
|
3337
|
+
fe.Cell = Pn;
|
|
3338
3338
|
const bo = {
|
|
3339
3339
|
id: "table",
|
|
3340
3340
|
name: "Table",
|
|
@@ -3792,11 +3792,11 @@ function Xn({
|
|
|
3792
3792
|
const s = ke(), c = i ?? s, [d, h] = I(!1), [y, g] = I("hex"), [m, C] = I(0), [f, p] = I(() => {
|
|
3793
3793
|
const u = e ? me(e) ?? { r: 0, g: 0, b: 0, a: 1 } : { r: 0, g: 0, b: 0, a: 1 };
|
|
3794
3794
|
return Z(u);
|
|
3795
|
-
}), [b, k] = I(() => he(f).slice(1).toUpperCase()), S = $(null), A = $(null), x = $(null), [z,
|
|
3795
|
+
}), [b, k] = I(() => he(f).slice(1).toUpperCase()), S = $(null), A = $(null), x = $(null), [z, F] = I(!1);
|
|
3796
3796
|
Me(() => {
|
|
3797
3797
|
if (!d || !x.current) return;
|
|
3798
3798
|
const u = x.current.getBoundingClientRect();
|
|
3799
|
-
|
|
3799
|
+
F(u.right > window.innerWidth);
|
|
3800
3800
|
}, [d]), Y(() => {
|
|
3801
3801
|
if (!e) return;
|
|
3802
3802
|
const u = me(e);
|
|
@@ -3813,8 +3813,8 @@ function Xn({
|
|
|
3813
3813
|
const T = he(u);
|
|
3814
3814
|
k(T.slice(1).toUpperCase()), t == null || t(T);
|
|
3815
3815
|
}, [t]), E = ie((u) => {
|
|
3816
|
-
const T = A.current.getBoundingClientRect(), M = Math.round(Se((u.clientX - T.left) / T.width, 0, 1) * 100),
|
|
3817
|
-
w({ ...f, s: M, v:
|
|
3816
|
+
const T = A.current.getBoundingClientRect(), M = Math.round(Se((u.clientX - T.left) / T.width, 0, 1) * 100), P = Math.round((1 - Se((u.clientY - T.top) / T.height, 0, 1)) * 100);
|
|
3817
|
+
w({ ...f, s: M, v: P });
|
|
3818
3818
|
}, [f, w]), H = ie(async () => {
|
|
3819
3819
|
if ("EyeDropper" in window)
|
|
3820
3820
|
try {
|
|
@@ -4008,8 +4008,8 @@ function Xn({
|
|
|
4008
4008
|
k(T.toUpperCase());
|
|
4009
4009
|
const M = me(`#${T}`);
|
|
4010
4010
|
if (M) {
|
|
4011
|
-
const
|
|
4012
|
-
p(
|
|
4011
|
+
const P = Z(M);
|
|
4012
|
+
p(P), t == null || t(Ne(M));
|
|
4013
4013
|
}
|
|
4014
4014
|
},
|
|
4015
4015
|
spellCheck: !1,
|
|
@@ -4041,36 +4041,36 @@ function Xn({
|
|
|
4041
4041
|
{ label: "G", val: q.g, max: 255, fn: (u) => w(Z({ ...q, g: u })) },
|
|
4042
4042
|
{ label: "B", val: q.b, max: 255, fn: (u) => w(Z({ ...q, b: u })) },
|
|
4043
4043
|
{ label: "A", val: j, max: 100, fn: (u) => w({ ...f, a: u / 100 }) }
|
|
4044
|
-
].map(({ label: u, val: T, max: M, fn:
|
|
4044
|
+
].map(({ label: u, val: T, max: M, fn: P }) => /* @__PURE__ */ n(oe, { size: "sm", type: "number", prefix: u, value: T, min: 0, max: M, onChange: (N) => {
|
|
4045
4045
|
const L = +N.target.value;
|
|
4046
|
-
!isNaN(L) && L >= 0 && L <= M &&
|
|
4046
|
+
!isNaN(L) && L >= 0 && L <= M && P(L);
|
|
4047
4047
|
}, className: "lucent-cp-field", style: { flex: 1 } }, u)) }),
|
|
4048
4048
|
y === "hsl" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4049
4049
|
{ label: "H", val: D.h, max: 360, fn: (u) => {
|
|
4050
|
-
const { r: T, g: M, b:
|
|
4051
|
-
w(Z({ r: T, g: M, b:
|
|
4050
|
+
const { r: T, g: M, b: P } = we(u, D.s, D.l);
|
|
4051
|
+
w(Z({ r: T, g: M, b: P, a: f.a }));
|
|
4052
4052
|
} },
|
|
4053
4053
|
{ label: "S", val: D.s, max: 100, fn: (u) => {
|
|
4054
|
-
const { r: T, g: M, b:
|
|
4055
|
-
w(Z({ r: T, g: M, b:
|
|
4054
|
+
const { r: T, g: M, b: P } = we(D.h, u, D.l);
|
|
4055
|
+
w(Z({ r: T, g: M, b: P, a: f.a }));
|
|
4056
4056
|
} },
|
|
4057
4057
|
{ label: "L", val: D.l, max: 100, fn: (u) => {
|
|
4058
|
-
const { r: T, g: M, b:
|
|
4059
|
-
w(Z({ r: T, g: M, b:
|
|
4058
|
+
const { r: T, g: M, b: P } = we(D.h, D.s, u);
|
|
4059
|
+
w(Z({ r: T, g: M, b: P, a: f.a }));
|
|
4060
4060
|
} },
|
|
4061
4061
|
{ label: "A", val: j, max: 100, fn: (u) => w({ ...f, a: u / 100 }) }
|
|
4062
|
-
].map(({ label: u, val: T, max: M, fn:
|
|
4062
|
+
].map(({ label: u, val: T, max: M, fn: P }) => /* @__PURE__ */ n(oe, { size: "sm", type: "number", prefix: u, value: T, min: 0, max: M, onChange: (N) => {
|
|
4063
4063
|
const L = +N.target.value;
|
|
4064
|
-
!isNaN(L) && L >= 0 && L <= M &&
|
|
4064
|
+
!isNaN(L) && L >= 0 && L <= M && P(L);
|
|
4065
4065
|
}, className: "lucent-cp-field", style: { flex: 1 } }, u)) }),
|
|
4066
4066
|
y === "hsb" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4067
4067
|
{ label: "H", val: f.h, max: 360, fn: (u) => w({ ...f, h: u }) },
|
|
4068
4068
|
{ label: "S", val: f.s, max: 100, fn: (u) => w({ ...f, s: u }) },
|
|
4069
4069
|
{ label: "B", val: f.v, max: 100, fn: (u) => w({ ...f, v: u }) },
|
|
4070
4070
|
{ label: "A", val: j, max: 100, fn: (u) => w({ ...f, a: u / 100 }) }
|
|
4071
|
-
].map(({ label: u, val: T, max: M, fn:
|
|
4071
|
+
].map(({ label: u, val: T, max: M, fn: P }) => /* @__PURE__ */ n(oe, { size: "sm", type: "number", prefix: u, value: T, min: 0, max: M, onChange: (N) => {
|
|
4072
4072
|
const L = +N.target.value;
|
|
4073
|
-
!isNaN(L) && L >= 0 && L <= M &&
|
|
4073
|
+
!isNaN(L) && L >= 0 && L <= M && P(L);
|
|
4074
4074
|
}, className: "lucent-cp-field", style: { flex: 1 } }, u)) }),
|
|
4075
4075
|
a.length > 0 && /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4076
4076
|
a.length > 1 && /* @__PURE__ */ n(
|
|
@@ -4462,7 +4462,7 @@ function So({
|
|
|
4462
4462
|
b.current = setTimeout(() => C(!1), 150);
|
|
4463
4463
|
}, z = () => {
|
|
4464
4464
|
b.current && clearTimeout(b.current), C(!0);
|
|
4465
|
-
},
|
|
4465
|
+
}, F = d ? /* @__PURE__ */ n(tn, { size: "sm" }) : e ? /* @__PURE__ */ n(
|
|
4466
4466
|
"button",
|
|
4467
4467
|
{
|
|
4468
4468
|
type: "button",
|
|
@@ -4499,7 +4499,7 @@ function So({
|
|
|
4499
4499
|
placeholder: r,
|
|
4500
4500
|
disabled: h,
|
|
4501
4501
|
leftElement: /* @__PURE__ */ n(Zn, { size: Jn[o] }),
|
|
4502
|
-
rightElement:
|
|
4502
|
+
rightElement: F ?? void 0,
|
|
4503
4503
|
onFocus: z,
|
|
4504
4504
|
onBlur: x,
|
|
4505
4505
|
...a !== void 0 && { label: a },
|
|
@@ -5361,12 +5361,12 @@ function Lo({ items: e, separator: t = "/", style: r }) {
|
|
|
5361
5361
|
}
|
|
5362
5362
|
function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "underline", style: i }) {
|
|
5363
5363
|
var _;
|
|
5364
|
-
const l = r !== void 0, [s, c] = I(t ?? ((_ = e[0]) == null ? void 0 : _.value) ?? ""), d = l ? r : s, [h, y] = I(null), g = $([]), [m, C] = I(null), f = $(!1), p = a === "pills", b = $(null), k = $(null), S = $(null), [A, x] = I(e.length), [z,
|
|
5364
|
+
const l = r !== void 0, [s, c] = I(t ?? ((_ = e[0]) == null ? void 0 : _.value) ?? ""), d = l ? r : s, [h, y] = I(null), g = $([]), [m, C] = I(null), f = $(!1), p = a === "pills", b = $(null), k = $(null), S = $(null), [A, x] = I(e.length), [z, F] = I(!1), [w, E] = I(!1), [H, q] = I(null), D = e.slice(0, A), B = e.slice(A), R = B.length > 0, j = B.some((u) => u.value === d), G = () => {
|
|
5365
5365
|
if (j) {
|
|
5366
5366
|
C(null);
|
|
5367
5367
|
return;
|
|
5368
5368
|
}
|
|
5369
|
-
const u = e.findIndex((M,
|
|
5369
|
+
const u = e.findIndex((M, P) => P < A && M.value === d), T = g.current[u];
|
|
5370
5370
|
if (T) {
|
|
5371
5371
|
if (p) {
|
|
5372
5372
|
const M = T.querySelector("span");
|
|
@@ -5420,7 +5420,7 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5420
5420
|
}, [e]), Y(() => {
|
|
5421
5421
|
if (!z) return;
|
|
5422
5422
|
const u = (T) => {
|
|
5423
|
-
S.current && !S.current.contains(T.target) && k.current && !k.current.contains(T.target) && (
|
|
5423
|
+
S.current && !S.current.contains(T.target) && k.current && !k.current.contains(T.target) && (F(!1), q(null));
|
|
5424
5424
|
};
|
|
5425
5425
|
return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
|
|
5426
5426
|
}, [z]);
|
|
@@ -5428,9 +5428,9 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5428
5428
|
l || c(u), o == null || o(u);
|
|
5429
5429
|
}, V = (u, T) => {
|
|
5430
5430
|
var L;
|
|
5431
|
-
const M = D.map((J, Q) => J.disabled ? -1 : Q).filter((J) => J !== -1),
|
|
5431
|
+
const M = D.map((J, Q) => J.disabled ? -1 : Q).filter((J) => J !== -1), P = M.indexOf(T);
|
|
5432
5432
|
let N = -1;
|
|
5433
|
-
u.key === "ArrowRight" && (N = M[(
|
|
5433
|
+
u.key === "ArrowRight" && (N = M[(P + 1) % M.length] ?? -1), u.key === "ArrowLeft" && (N = M[(P - 1 + M.length) % M.length] ?? -1), u.key === "Home" && (N = M[0] ?? -1), u.key === "End" && (N = M[M.length - 1] ?? -1), N !== -1 && (u.preventDefault(), (L = g.current[N]) == null || L.focus(), X(D[N].value));
|
|
5434
5434
|
};
|
|
5435
5435
|
return /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...i }, children: [
|
|
5436
5436
|
/* @__PURE__ */ v(
|
|
@@ -5450,7 +5450,7 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5450
5450
|
},
|
|
5451
5451
|
children: [
|
|
5452
5452
|
e.map((u, T) => {
|
|
5453
|
-
const M = T < A,
|
|
5453
|
+
const M = T < A, P = u.value === d, N = u.disabled ?? !1;
|
|
5454
5454
|
return /* @__PURE__ */ v(
|
|
5455
5455
|
"button",
|
|
5456
5456
|
{
|
|
@@ -5458,11 +5458,11 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5458
5458
|
g.current[T] = L;
|
|
5459
5459
|
},
|
|
5460
5460
|
role: "tab",
|
|
5461
|
-
"aria-selected":
|
|
5461
|
+
"aria-selected": P,
|
|
5462
5462
|
"aria-controls": `lucent-tabpanel-${u.value}`,
|
|
5463
5463
|
id: `lucent-tab-${u.value}`,
|
|
5464
5464
|
disabled: N,
|
|
5465
|
-
tabIndex:
|
|
5465
|
+
tabIndex: P && M ? 0 : -1,
|
|
5466
5466
|
onClick: () => {
|
|
5467
5467
|
N || X(u.value);
|
|
5468
5468
|
},
|
|
@@ -5478,13 +5478,13 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5478
5478
|
cursor: N ? "not-allowed" : "pointer",
|
|
5479
5479
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5480
5480
|
fontSize: "var(--lucent-font-size-md)",
|
|
5481
|
-
fontWeight:
|
|
5482
|
-
color: N ? "var(--lucent-text-disabled)" : p &&
|
|
5481
|
+
fontWeight: P ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
5482
|
+
color: N ? "var(--lucent-text-disabled)" : p && P ? "var(--lucent-text-on-accent)" : P ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
5483
5483
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
5484
5484
|
whiteSpace: "nowrap",
|
|
5485
5485
|
outline: "none",
|
|
5486
5486
|
position: M ? "relative" : "absolute",
|
|
5487
|
-
zIndex:
|
|
5487
|
+
zIndex: P ? 1 : 0,
|
|
5488
5488
|
// Hidden overflow tabs are positioned off-screen for measurement
|
|
5489
5489
|
...M ? {} : { visibility: "hidden", pointerEvents: "none", left: -9999 }
|
|
5490
5490
|
},
|
|
@@ -5493,10 +5493,10 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5493
5493
|
display: "block",
|
|
5494
5494
|
padding: "var(--lucent-space-1) var(--lucent-space-3)",
|
|
5495
5495
|
borderRadius: "var(--lucent-radius-md)",
|
|
5496
|
-
background: !p && h === T && !
|
|
5496
|
+
background: !p && h === T && !P && !N ? "var(--lucent-surface-secondary)" : "transparent",
|
|
5497
5497
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
5498
5498
|
}, children: u.label }),
|
|
5499
|
-
p && h === T && !
|
|
5499
|
+
p && h === T && !P && !N && M && /* @__PURE__ */ n(
|
|
5500
5500
|
"span",
|
|
5501
5501
|
{
|
|
5502
5502
|
"aria-hidden": !0,
|
|
@@ -5522,7 +5522,7 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5522
5522
|
"button",
|
|
5523
5523
|
{
|
|
5524
5524
|
ref: k,
|
|
5525
|
-
onClick: () =>
|
|
5525
|
+
onClick: () => F((u) => !u),
|
|
5526
5526
|
onMouseEnter: () => E(!0),
|
|
5527
5527
|
onMouseLeave: () => E(!1),
|
|
5528
5528
|
style: {
|
|
@@ -5594,16 +5594,16 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5594
5594
|
minWidth: 140
|
|
5595
5595
|
},
|
|
5596
5596
|
children: B.map((u, T) => {
|
|
5597
|
-
const M = u.value === d,
|
|
5597
|
+
const M = u.value === d, P = u.disabled ?? !1, N = H === T;
|
|
5598
5598
|
return /* @__PURE__ */ n(
|
|
5599
5599
|
"button",
|
|
5600
5600
|
{
|
|
5601
|
-
disabled:
|
|
5601
|
+
disabled: P,
|
|
5602
5602
|
onClick: () => {
|
|
5603
|
-
|
|
5603
|
+
P || (X(u.value), F(!1));
|
|
5604
5604
|
},
|
|
5605
5605
|
onMouseEnter: () => {
|
|
5606
|
-
|
|
5606
|
+
P || q(T);
|
|
5607
5607
|
},
|
|
5608
5608
|
onMouseLeave: () => q(null),
|
|
5609
5609
|
style: {
|
|
@@ -5612,11 +5612,11 @@ function Ro({ tabs: e, defaultValue: t, value: r, onChange: o, variant: a = "und
|
|
|
5612
5612
|
padding: "var(--lucent-space-2) var(--lucent-space-4)",
|
|
5613
5613
|
background: M || N ? "var(--lucent-surface-secondary)" : "none",
|
|
5614
5614
|
border: "none",
|
|
5615
|
-
cursor:
|
|
5615
|
+
cursor: P ? "not-allowed" : "pointer",
|
|
5616
5616
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5617
5617
|
fontSize: "var(--lucent-font-size-md)",
|
|
5618
5618
|
fontWeight: M ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
5619
|
-
color:
|
|
5619
|
+
color: P ? "var(--lucent-text-disabled)" : M || N ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
5620
5620
|
textAlign: "left",
|
|
5621
5621
|
outline: "none",
|
|
5622
5622
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), color var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
@@ -5649,7 +5649,7 @@ const pa = `
|
|
|
5649
5649
|
to { opacity: 1; transform: translateY(0); }
|
|
5650
5650
|
}
|
|
5651
5651
|
`;
|
|
5652
|
-
function
|
|
5652
|
+
function Fo({ trigger: e, children: t, defaultOpen: r = !1, open: o, onOpenChange: a, style: i }) {
|
|
5653
5653
|
const l = o !== void 0, [s, c] = I(r), d = l ? o : s, h = $(null), [y, g] = I(d ? void 0 : 0), m = $(!1);
|
|
5654
5654
|
Y(() => {
|
|
5655
5655
|
const f = h.current;
|
|
@@ -5747,7 +5747,7 @@ function fa({ open: e }) {
|
|
|
5747
5747
|
function ge(e) {
|
|
5748
5748
|
return typeof e == "number" ? `${e}px` : e;
|
|
5749
5749
|
}
|
|
5750
|
-
function
|
|
5750
|
+
function Po({
|
|
5751
5751
|
children: e,
|
|
5752
5752
|
header: t,
|
|
5753
5753
|
sidebar: r,
|
|
@@ -5912,7 +5912,7 @@ function No({
|
|
|
5912
5912
|
})) : t, A = c ? [...S].sort((D, B) => {
|
|
5913
5913
|
const R = D[c.key], j = B[c.key], G = String(R ?? "").localeCompare(String(j ?? ""), void 0, { numeric: !0 });
|
|
5914
5914
|
return c.dir === "asc" ? G : -G;
|
|
5915
|
-
}) : S, x = r > 0 ? A.slice(b * r, (b + 1) * r) : A, z = r > 0 ? Math.max(1, Math.ceil(A.length / r)) : 1,
|
|
5915
|
+
}) : S, x = r > 0 ? A.slice(b * r, (b + 1) * r) : A, z = r > 0 ? Math.max(1, Math.ceil(A.length / r)) : 1, F = (D) => {
|
|
5916
5916
|
p || y(D), a == null || a(D);
|
|
5917
5917
|
}, w = (D) => {
|
|
5918
5918
|
d((B) => !B || B.key !== D ? { key: D, dir: "asc" } : B.dir === "asc" ? { key: D, dir: "desc" } : null), p || y(0), a == null || a(0);
|
|
@@ -6023,7 +6023,7 @@ function No({
|
|
|
6023
6023
|
/* @__PURE__ */ n(
|
|
6024
6024
|
qe,
|
|
6025
6025
|
{
|
|
6026
|
-
onClick: () =>
|
|
6026
|
+
onClick: () => F(b - 1),
|
|
6027
6027
|
disabled: b === 0,
|
|
6028
6028
|
"aria-label": "Previous page",
|
|
6029
6029
|
children: /* @__PURE__ */ n(Qe, { dir: "left" })
|
|
@@ -6037,7 +6037,7 @@ function No({
|
|
|
6037
6037
|
}, children: "…" }, `ellipsis-${B}`) : /* @__PURE__ */ n(
|
|
6038
6038
|
qe,
|
|
6039
6039
|
{
|
|
6040
|
-
onClick: () =>
|
|
6040
|
+
onClick: () => F(D),
|
|
6041
6041
|
active: D === b,
|
|
6042
6042
|
"aria-label": `Page ${D + 1}`,
|
|
6043
6043
|
"aria-current": D === b ? "page" : void 0,
|
|
@@ -6049,7 +6049,7 @@ function No({
|
|
|
6049
6049
|
/* @__PURE__ */ n(
|
|
6050
6050
|
qe,
|
|
6051
6051
|
{
|
|
6052
|
-
onClick: () =>
|
|
6052
|
+
onClick: () => F(b + 1),
|
|
6053
6053
|
disabled: b >= z - 1,
|
|
6054
6054
|
"aria-label": "Next page",
|
|
6055
6055
|
children: /* @__PURE__ */ n(Qe, { dir: "right" })
|
|
@@ -6507,7 +6507,7 @@ function Wo({
|
|
|
6507
6507
|
E && E.group === w.group ? E.items.push(w) : z.push({ group: w.group, items: [w] });
|
|
6508
6508
|
}
|
|
6509
6509
|
if (!d) return null;
|
|
6510
|
-
let
|
|
6510
|
+
let F = 0;
|
|
6511
6511
|
return /* @__PURE__ */ n(
|
|
6512
6512
|
"div",
|
|
6513
6513
|
{
|
|
@@ -6612,7 +6612,7 @@ function Wo({
|
|
|
6612
6612
|
E.map((q) => {
|
|
6613
6613
|
const D = q.disabled ?? !1;
|
|
6614
6614
|
let B = !1;
|
|
6615
|
-
return D || (B =
|
|
6615
|
+
return D || (B = F === g, F++), /* @__PURE__ */ v(
|
|
6616
6616
|
"div",
|
|
6617
6617
|
{
|
|
6618
6618
|
role: "option",
|
|
@@ -6795,7 +6795,7 @@ function Oo({
|
|
|
6795
6795
|
errorText: h,
|
|
6796
6796
|
style: y
|
|
6797
6797
|
}) {
|
|
6798
|
-
const g = t !== void 0, [m, C] = I(r), f = g ? t : m, [p, b] = I(!1), [k, S] = I(""), [A, x] = I(0), [z,
|
|
6798
|
+
const g = t !== void 0, [m, C] = I(r), f = g ? t : m, [p, b] = I(!1), [k, S] = I(""), [A, x] = I(0), [z, F] = I(!1), w = $(null), E = $(null), H = ke();
|
|
6799
6799
|
Y(() => {
|
|
6800
6800
|
if (!p) return;
|
|
6801
6801
|
const u = (T) => {
|
|
@@ -6876,8 +6876,8 @@ function Oo({
|
|
|
6876
6876
|
S(u.target.value), b(!0), x(0);
|
|
6877
6877
|
},
|
|
6878
6878
|
onKeyDown: R,
|
|
6879
|
-
onFocus: () =>
|
|
6880
|
-
onBlur: () =>
|
|
6879
|
+
onFocus: () => F(!0),
|
|
6880
|
+
onBlur: () => F(!1),
|
|
6881
6881
|
disabled: i,
|
|
6882
6882
|
placeholder: f.length === 0 ? a : "",
|
|
6883
6883
|
"aria-autocomplete": "list",
|
|
@@ -6924,7 +6924,7 @@ function Oo({
|
|
|
6924
6924
|
},
|
|
6925
6925
|
children: [
|
|
6926
6926
|
B.length === 0 ? /* @__PURE__ */ n("div", { style: { padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ n(W, { color: "secondary", size: "sm", children: "No options" }) }) : B.map((u, T) => {
|
|
6927
|
-
const M = f.includes(u.value),
|
|
6927
|
+
const M = f.includes(u.value), P = T === A, N = u.disabled ?? !1, L = j && !M;
|
|
6928
6928
|
return /* @__PURE__ */ v(
|
|
6929
6929
|
"div",
|
|
6930
6930
|
{
|
|
@@ -6942,7 +6942,7 @@ function Oo({
|
|
|
6942
6942
|
padding: be[s],
|
|
6943
6943
|
borderRadius: "var(--lucent-radius-md)",
|
|
6944
6944
|
cursor: N || L ? "not-allowed" : "pointer",
|
|
6945
|
-
background:
|
|
6945
|
+
background: P ? "var(--lucent-surface-secondary)" : "transparent",
|
|
6946
6946
|
opacity: N || L ? 0.5 : 1
|
|
6947
6947
|
},
|
|
6948
6948
|
children: [
|
|
@@ -7277,7 +7277,7 @@ function jo({
|
|
|
7277
7277
|
errorText: h,
|
|
7278
7278
|
style: y
|
|
7279
7279
|
}) {
|
|
7280
|
-
const g = e !== void 0, [m, C] = I(t), f = g ? e : m, p = !!h, b = a, k = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, S = /* @__PURE__ */ new Date(), [A, x] = I((f ?? S).getFullYear()), [z,
|
|
7280
|
+
const g = e !== void 0, [m, C] = I(t), f = g ? e : m, p = !!h, b = a, k = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, S = /* @__PURE__ */ new Date(), [A, x] = I((f ?? S).getFullYear()), [z, F] = I((f ?? S).getMonth()), [w, E] = I(!1), [H, q] = I(!1), D = $(null);
|
|
7281
7281
|
Y(() => {
|
|
7282
7282
|
if (!w) return;
|
|
7283
7283
|
const V = (_) => {
|
|
@@ -7289,9 +7289,9 @@ function jo({
|
|
|
7289
7289
|
const B = (V) => {
|
|
7290
7290
|
g || C(V), r == null || r(V), E(!1);
|
|
7291
7291
|
}, R = () => {
|
|
7292
|
-
z === 0 ? (
|
|
7292
|
+
z === 0 ? (F(11), x((V) => V - 1)) : F((V) => V - 1);
|
|
7293
7293
|
}, j = () => {
|
|
7294
|
-
z === 11 ? (
|
|
7294
|
+
z === 11 ? (F(0), x((V) => V + 1)) : F((V) => V + 1);
|
|
7295
7295
|
}, G = b ? "transparent" : p ? "var(--lucent-danger-default)" : H ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", X = H ? `0 0 0 3px ${p ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7296
7296
|
return /* @__PURE__ */ v("div", { ref: D, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", position: "relative", ...y }, children: [
|
|
7297
7297
|
c && /* @__PURE__ */ n(
|
|
@@ -7537,7 +7537,7 @@ const Uo = {
|
|
|
7537
7537
|
md: "var(--lucent-font-size-sm)",
|
|
7538
7538
|
lg: "var(--lucent-font-size-md)"
|
|
7539
7539
|
};
|
|
7540
|
-
function
|
|
7540
|
+
function Fa(e, t) {
|
|
7541
7541
|
return e ? Te(e.start, e.end) ? pe(e.start) : `${pe(e.start)} → ${pe(e.end)}` : t;
|
|
7542
7542
|
}
|
|
7543
7543
|
function Go({
|
|
@@ -7554,7 +7554,7 @@ function Go({
|
|
|
7554
7554
|
errorText: h,
|
|
7555
7555
|
style: y
|
|
7556
7556
|
}) {
|
|
7557
|
-
const g = e !== void 0, [m, C] = I(t), f = g ? e : m, p = !!h, b = a, k = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [S, A] = I(null), [x, z] = I(null),
|
|
7557
|
+
const g = e !== void 0, [m, C] = I(t), f = g ? e : m, p = !!h, b = a, k = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [S, A] = I(null), [x, z] = I(null), F = /* @__PURE__ */ new Date(), [w, E] = I(((f == null ? void 0 : f.start) ?? F).getFullYear()), [H, q] = I(((f == null ? void 0 : f.start) ?? F).getMonth()), D = H === 11 ? 0 : H + 1, B = H === 11 ? w + 1 : w, [R, j] = I(!1), [G, X] = I(!1), V = $(null);
|
|
7558
7558
|
Y(() => {
|
|
7559
7559
|
if (!R) return;
|
|
7560
7560
|
const L = (J) => {
|
|
@@ -7580,7 +7580,7 @@ function Go({
|
|
|
7580
7580
|
const [L, J] = Ce(x, S) ? [x, S] : [S, x];
|
|
7581
7581
|
M = { start: L, end: J };
|
|
7582
7582
|
} else S ? M = { start: S, end: S } : f && (M = { start: f.start, end: f.end });
|
|
7583
|
-
const
|
|
7583
|
+
const P = b ? "transparent" : p ? "var(--lucent-danger-default)" : G ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", N = G ? `0 0 0 3px ${p ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7584
7584
|
return /* @__PURE__ */ v("div", { ref: V, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", position: "relative", ...y }, children: [
|
|
7585
7585
|
c && /* @__PURE__ */ n(
|
|
7586
7586
|
"label",
|
|
@@ -7616,7 +7616,7 @@ function Go({
|
|
|
7616
7616
|
boxSizing: "border-box",
|
|
7617
7617
|
padding: `0 ${La[s]}`,
|
|
7618
7618
|
borderRadius: "var(--lucent-radius-lg)",
|
|
7619
|
-
border: `1px solid ${
|
|
7619
|
+
border: `1px solid ${P}`,
|
|
7620
7620
|
boxShadow: N,
|
|
7621
7621
|
background: b ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
7622
7622
|
color: f ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
@@ -7635,7 +7635,7 @@ function Go({
|
|
|
7635
7635
|
/* @__PURE__ */ n("path", { d: "M1 6h12", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
7636
7636
|
/* @__PURE__ */ n("path", { d: "M4 1v2M10 1v2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
7637
7637
|
] }),
|
|
7638
|
-
/* @__PURE__ */ n("span", { style: { flex: 1, textAlign: "left" }, children:
|
|
7638
|
+
/* @__PURE__ */ n("span", { style: { flex: 1, textAlign: "left" }, children: Fa(f, o) })
|
|
7639
7639
|
]
|
|
7640
7640
|
}
|
|
7641
7641
|
),
|
|
@@ -7687,7 +7687,7 @@ function Go({
|
|
|
7687
7687
|
year: w,
|
|
7688
7688
|
month: H,
|
|
7689
7689
|
...(f == null ? void 0 : f.start) !== void 0 && { selected: f.start },
|
|
7690
|
-
today:
|
|
7690
|
+
today: F,
|
|
7691
7691
|
...i !== void 0 && { min: i },
|
|
7692
7692
|
...l !== void 0 && { max: l },
|
|
7693
7693
|
onSelect: _,
|
|
@@ -7704,7 +7704,7 @@ function Go({
|
|
|
7704
7704
|
year: B,
|
|
7705
7705
|
month: D,
|
|
7706
7706
|
...(f == null ? void 0 : f.end) !== void 0 && { selected: f.end },
|
|
7707
|
-
today:
|
|
7707
|
+
today: F,
|
|
7708
7708
|
...i !== void 0 && { min: i },
|
|
7709
7709
|
...l !== void 0 && { max: l },
|
|
7710
7710
|
onSelect: _,
|
|
@@ -7836,7 +7836,7 @@ const _o = {
|
|
|
7836
7836
|
function We(e) {
|
|
7837
7837
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
7838
7838
|
}
|
|
7839
|
-
function
|
|
7839
|
+
function Pa() {
|
|
7840
7840
|
return Math.random().toString(36).slice(2);
|
|
7841
7841
|
}
|
|
7842
7842
|
function Na({
|
|
@@ -7920,13 +7920,13 @@ function Yo({
|
|
|
7920
7920
|
continue;
|
|
7921
7921
|
}
|
|
7922
7922
|
if (!t && y.length + z.length >= 1) break;
|
|
7923
|
-
z.push({ id:
|
|
7923
|
+
z.push({ id: Pa(), file: w });
|
|
7924
7924
|
}
|
|
7925
7925
|
if (z.length === 0) return;
|
|
7926
|
-
const
|
|
7927
|
-
c || h(
|
|
7926
|
+
const F = t ? [...y, ...z] : z;
|
|
7927
|
+
c || h(F), a == null || a(F);
|
|
7928
7928
|
}, [l, y, c, r, t, a, i]), k = (x) => {
|
|
7929
|
-
const z = y.filter((
|
|
7929
|
+
const z = y.filter((F) => F.id !== x);
|
|
7930
7930
|
c || h(z), a == null || a(z);
|
|
7931
7931
|
}, S = (x) => {
|
|
7932
7932
|
x.preventDefault(), m(!1), b(x.dataTransfer.files);
|
|
@@ -8330,6 +8330,7 @@ const Jo = {
|
|
|
8330
8330
|
borderDefault: "#e5e7eb",
|
|
8331
8331
|
borderSubtle: "#f3f4f6",
|
|
8332
8332
|
borderStrong: "#9ca3af",
|
|
8333
|
+
controlTrack: "#d1d5db",
|
|
8333
8334
|
// Text
|
|
8334
8335
|
textPrimary: "#111827",
|
|
8335
8336
|
textSecondary: "#6b7280",
|
|
@@ -8409,11 +8410,11 @@ function Za(e) {
|
|
|
8409
8410
|
const [t, r, o] = ne(e), [a, i] = ht(t, r);
|
|
8410
8411
|
return ae(a, i, Math.max(0.04, Math.min(0.2, 0.07 + (1 - o))));
|
|
8411
8412
|
}
|
|
8412
|
-
function
|
|
8413
|
+
function Fe(e) {
|
|
8413
8414
|
const [t, r, o] = ne(e), [a, i] = ht(t, r);
|
|
8414
8415
|
return ae(a, i, Math.max(0.06, Math.min(0.5, (1 - o) * 0.6 + 0.06)));
|
|
8415
8416
|
}
|
|
8416
|
-
function
|
|
8417
|
+
function Pe(e) {
|
|
8417
8418
|
const [t, r, o] = ne(e);
|
|
8418
8419
|
return ae(t, r, Math.max(0.04, Math.min(0.97, 1 - o + 0.04)));
|
|
8419
8420
|
}
|
|
@@ -8438,13 +8439,14 @@ function Qa(e) {
|
|
|
8438
8439
|
surfaceRaised: i(0.08),
|
|
8439
8440
|
surfaceOverlay: i(0.08),
|
|
8440
8441
|
// ── Borders ──────────────────────────────────────────────────────────────
|
|
8441
|
-
borderDefault:
|
|
8442
|
-
borderSubtle:
|
|
8443
|
-
borderStrong:
|
|
8442
|
+
borderDefault: Fe(e.borderDefault),
|
|
8443
|
+
borderSubtle: Fe(e.borderSubtle),
|
|
8444
|
+
borderStrong: Fe(e.borderStrong),
|
|
8445
|
+
controlTrack: i(0.1),
|
|
8444
8446
|
// ── Text ─────────────────────────────────────────────────────────────────
|
|
8445
|
-
textPrimary:
|
|
8446
|
-
textSecondary:
|
|
8447
|
-
textDisabled:
|
|
8447
|
+
textPrimary: Pe(e.textPrimary),
|
|
8448
|
+
textSecondary: Pe(e.textSecondary),
|
|
8449
|
+
textDisabled: Pe(e.textDisabled),
|
|
8448
8450
|
// textInverse flips to dark bg so it reads on light accent surfaces
|
|
8449
8451
|
textInverse: t,
|
|
8450
8452
|
textOnAccent: e.textOnAccent,
|
|
@@ -8570,7 +8572,6 @@ const yt = {
|
|
|
8570
8572
|
bgBase: "#ffffff",
|
|
8571
8573
|
surface: "#ffffff",
|
|
8572
8574
|
borderDefault: "#e5e7eb",
|
|
8573
|
-
textPrimary: "#111827",
|
|
8574
8575
|
accentDefault: "#111827",
|
|
8575
8576
|
successDefault: "#16a34a",
|
|
8576
8577
|
warningDefault: "#d97706",
|
|
@@ -8581,7 +8582,6 @@ const yt = {
|
|
|
8581
8582
|
bgBase: "#111318",
|
|
8582
8583
|
surface: "#181a20",
|
|
8583
8584
|
borderDefault: "#2e3039",
|
|
8584
|
-
textPrimary: "#f3f4f6",
|
|
8585
8585
|
accentDefault: "#f9fafb",
|
|
8586
8586
|
successDefault: "#22c55e",
|
|
8587
8587
|
warningDefault: "#f59e0b",
|
|
@@ -8594,7 +8594,6 @@ const yt = {
|
|
|
8594
8594
|
bgBase: "#fffefb",
|
|
8595
8595
|
surface: "#fffdf7",
|
|
8596
8596
|
borderDefault: "#e8e3d6",
|
|
8597
|
-
textPrimary: "#1a1710",
|
|
8598
8597
|
accentDefault: "#e9c96b",
|
|
8599
8598
|
successDefault: "#16a34a",
|
|
8600
8599
|
warningDefault: "#d97706",
|
|
@@ -8605,7 +8604,6 @@ const yt = {
|
|
|
8605
8604
|
bgBase: "#151310",
|
|
8606
8605
|
surface: "#1c1a15",
|
|
8607
8606
|
borderDefault: "#33302a",
|
|
8608
|
-
textPrimary: "#f5f3ee",
|
|
8609
8607
|
accentDefault: "#e9c96b",
|
|
8610
8608
|
successDefault: "#22c55e",
|
|
8611
8609
|
warningDefault: "#f59e0b",
|
|
@@ -8618,7 +8616,6 @@ const yt = {
|
|
|
8618
8616
|
bgBase: "#fdfcff",
|
|
8619
8617
|
surface: "#faf9fe",
|
|
8620
8618
|
borderDefault: "#e0dde9",
|
|
8621
|
-
textPrimary: "#1a1726",
|
|
8622
8619
|
accentDefault: "#6366f1",
|
|
8623
8620
|
successDefault: "#16a34a",
|
|
8624
8621
|
warningDefault: "#d97706",
|
|
@@ -8629,7 +8626,6 @@ const yt = {
|
|
|
8629
8626
|
bgBase: "#12111a",
|
|
8630
8627
|
surface: "#191820",
|
|
8631
8628
|
borderDefault: "#2e2d3a",
|
|
8632
|
-
textPrimary: "#f0eef6",
|
|
8633
8629
|
accentDefault: "#818cf8",
|
|
8634
8630
|
successDefault: "#22c55e",
|
|
8635
8631
|
warningDefault: "#f59e0b",
|
|
@@ -8642,7 +8638,6 @@ const yt = {
|
|
|
8642
8638
|
bgBase: "#fdfcfe",
|
|
8643
8639
|
surface: "#faf8fd",
|
|
8644
8640
|
borderDefault: "#e2dce9",
|
|
8645
|
-
textPrimary: "#1c1726",
|
|
8646
8641
|
accentDefault: "#8b5cf6",
|
|
8647
8642
|
successDefault: "#16a34a",
|
|
8648
8643
|
warningDefault: "#d97706",
|
|
@@ -8653,7 +8648,6 @@ const yt = {
|
|
|
8653
8648
|
bgBase: "#13111a",
|
|
8654
8649
|
surface: "#1a1822",
|
|
8655
8650
|
borderDefault: "#302d3b",
|
|
8656
|
-
textPrimary: "#f0edf7",
|
|
8657
8651
|
accentDefault: "#a78bfa",
|
|
8658
8652
|
successDefault: "#22c55e",
|
|
8659
8653
|
warningDefault: "#f59e0b",
|
|
@@ -8666,7 +8660,6 @@ const yt = {
|
|
|
8666
8660
|
bgBase: "#fbfefc",
|
|
8667
8661
|
surface: "#f7fcf9",
|
|
8668
8662
|
borderDefault: "#dbe8df",
|
|
8669
|
-
textPrimary: "#0f1f15",
|
|
8670
8663
|
accentDefault: "#10b981",
|
|
8671
8664
|
successDefault: "#16a34a",
|
|
8672
8665
|
warningDefault: "#d97706",
|
|
@@ -8677,7 +8670,6 @@ const yt = {
|
|
|
8677
8670
|
bgBase: "#0f1512",
|
|
8678
8671
|
surface: "#151c18",
|
|
8679
8672
|
borderDefault: "#263330",
|
|
8680
|
-
textPrimary: "#ecf5f0",
|
|
8681
8673
|
accentDefault: "#34d399",
|
|
8682
8674
|
successDefault: "#22c55e",
|
|
8683
8675
|
warningDefault: "#f59e0b",
|
|
@@ -8690,7 +8682,6 @@ const yt = {
|
|
|
8690
8682
|
bgBase: "#fbfefd",
|
|
8691
8683
|
surface: "#f6fcfa",
|
|
8692
8684
|
borderDefault: "#d4e5e0",
|
|
8693
|
-
textPrimary: "#152420",
|
|
8694
8685
|
accentDefault: "#0d9488",
|
|
8695
8686
|
successDefault: "#16a34a",
|
|
8696
8687
|
warningDefault: "#d97706",
|
|
@@ -8701,7 +8692,6 @@ const yt = {
|
|
|
8701
8692
|
bgBase: "#0f1514",
|
|
8702
8693
|
surface: "#161d1c",
|
|
8703
8694
|
borderDefault: "#283836",
|
|
8704
|
-
textPrimary: "#e4f3f0",
|
|
8705
8695
|
accentDefault: "#2dd4bf",
|
|
8706
8696
|
successDefault: "#22c55e",
|
|
8707
8697
|
warningDefault: "#f59e0b",
|
|
@@ -8714,7 +8704,6 @@ const yt = {
|
|
|
8714
8704
|
bgBase: "#fffcfd",
|
|
8715
8705
|
surface: "#fef9fa",
|
|
8716
8706
|
borderDefault: "#ecdde1",
|
|
8717
|
-
textPrimary: "#24121a",
|
|
8718
8707
|
accentDefault: "#f43f5e",
|
|
8719
8708
|
successDefault: "#16a34a",
|
|
8720
8709
|
warningDefault: "#d97706",
|
|
@@ -8725,7 +8714,6 @@ const yt = {
|
|
|
8725
8714
|
bgBase: "#161012",
|
|
8726
8715
|
surface: "#1d1518",
|
|
8727
8716
|
borderDefault: "#3a282e",
|
|
8728
|
-
textPrimary: "#f8ecf0",
|
|
8729
8717
|
accentDefault: "#fb7185",
|
|
8730
8718
|
successDefault: "#22c55e",
|
|
8731
8719
|
warningDefault: "#f59e0b",
|
|
@@ -8738,7 +8726,6 @@ const yt = {
|
|
|
8738
8726
|
bgBase: "#fffcfb",
|
|
8739
8727
|
surface: "#fef9f7",
|
|
8740
8728
|
borderDefault: "#e9ddd8",
|
|
8741
|
-
textPrimary: "#261a16",
|
|
8742
8729
|
accentDefault: "#e8624a",
|
|
8743
8730
|
successDefault: "#16a34a",
|
|
8744
8731
|
warningDefault: "#d97706",
|
|
@@ -8749,7 +8736,6 @@ const yt = {
|
|
|
8749
8736
|
bgBase: "#171210",
|
|
8750
8737
|
surface: "#1e1816",
|
|
8751
8738
|
borderDefault: "#3b312c",
|
|
8752
|
-
textPrimary: "#f5ece8",
|
|
8753
8739
|
accentDefault: "#f38b76",
|
|
8754
8740
|
successDefault: "#22c55e",
|
|
8755
8741
|
warningDefault: "#f59e0b",
|
|
@@ -8762,7 +8748,6 @@ const yt = {
|
|
|
8762
8748
|
bgBase: "#fffefb",
|
|
8763
8749
|
surface: "#fefcf6",
|
|
8764
8750
|
borderDefault: "#e8e1d0",
|
|
8765
|
-
textPrimary: "#261f0f",
|
|
8766
8751
|
accentDefault: "#d97706",
|
|
8767
8752
|
successDefault: "#16a34a",
|
|
8768
8753
|
warningDefault: "#b45309",
|
|
@@ -8773,7 +8758,6 @@ const yt = {
|
|
|
8773
8758
|
bgBase: "#171310",
|
|
8774
8759
|
surface: "#1e1a15",
|
|
8775
8760
|
borderDefault: "#3a3329",
|
|
8776
|
-
textPrimary: "#f5f0e6",
|
|
8777
8761
|
accentDefault: "#f59e0b",
|
|
8778
8762
|
successDefault: "#22c55e",
|
|
8779
8763
|
warningDefault: "#d97706",
|
|
@@ -8786,7 +8770,6 @@ const yt = {
|
|
|
8786
8770
|
bgBase: "#fbfdff",
|
|
8787
8771
|
surface: "#f6fafd",
|
|
8788
8772
|
borderDefault: "#d9e4ec",
|
|
8789
|
-
textPrimary: "#0f1a24",
|
|
8790
8773
|
accentDefault: "#0ea5e9",
|
|
8791
8774
|
successDefault: "#16a34a",
|
|
8792
8775
|
warningDefault: "#d97706",
|
|
@@ -8797,7 +8780,6 @@ const yt = {
|
|
|
8797
8780
|
bgBase: "#0e1318",
|
|
8798
8781
|
surface: "#141a20",
|
|
8799
8782
|
borderDefault: "#243038",
|
|
8800
|
-
textPrimary: "#ebf2f8",
|
|
8801
8783
|
accentDefault: "#38bdf8",
|
|
8802
8784
|
successDefault: "#22c55e",
|
|
8803
8785
|
warningDefault: "#f59e0b",
|
|
@@ -8810,7 +8792,6 @@ const yt = {
|
|
|
8810
8792
|
bgBase: "#fafbfc",
|
|
8811
8793
|
surface: "#f7f8fa",
|
|
8812
8794
|
borderDefault: "#dde1e6",
|
|
8813
|
-
textPrimary: "#1a1d23",
|
|
8814
8795
|
accentDefault: "#475569",
|
|
8815
8796
|
successDefault: "#16a34a",
|
|
8816
8797
|
warningDefault: "#d97706",
|
|
@@ -8821,7 +8802,6 @@ const yt = {
|
|
|
8821
8802
|
bgBase: "#0f1116",
|
|
8822
8803
|
surface: "#161920",
|
|
8823
8804
|
borderDefault: "#2b3040",
|
|
8824
|
-
textPrimary: "#e8ecf4",
|
|
8825
8805
|
accentDefault: "#94a3b8",
|
|
8826
8806
|
successDefault: "#22c55e",
|
|
8827
8807
|
warningDefault: "#f59e0b",
|
|
@@ -8834,7 +8814,6 @@ const yt = {
|
|
|
8834
8814
|
bgBase: "#fbfcfb",
|
|
8835
8815
|
surface: "#f5f7f5",
|
|
8836
8816
|
borderDefault: "#d8ddd6",
|
|
8837
|
-
textPrimary: "#1a2019",
|
|
8838
8817
|
accentDefault: "#5f8c6e",
|
|
8839
8818
|
successDefault: "#16a34a",
|
|
8840
8819
|
warningDefault: "#d97706",
|
|
@@ -8845,7 +8824,6 @@ const yt = {
|
|
|
8845
8824
|
bgBase: "#101410",
|
|
8846
8825
|
surface: "#171c17",
|
|
8847
8826
|
borderDefault: "#2c372c",
|
|
8848
|
-
textPrimary: "#e4ede6",
|
|
8849
8827
|
accentDefault: "#86b394",
|
|
8850
8828
|
successDefault: "#22c55e",
|
|
8851
8829
|
warningDefault: "#f59e0b",
|
|
@@ -9041,7 +9019,7 @@ function Lr(e) {
|
|
|
9041
9019
|
function Rr(e) {
|
|
9042
9020
|
return typeof e == "string" ? Ar[e] : e;
|
|
9043
9021
|
}
|
|
9044
|
-
function
|
|
9022
|
+
function Fr(e, t) {
|
|
9045
9023
|
let r, o, a, i;
|
|
9046
9024
|
if (typeof e == "string") {
|
|
9047
9025
|
const s = Er[e];
|
|
@@ -9067,7 +9045,7 @@ function Zo({
|
|
|
9067
9045
|
anchors: o,
|
|
9068
9046
|
children: a
|
|
9069
9047
|
}) {
|
|
9070
|
-
const i = ke().replace(/:/g, ""), l = t ?
|
|
9048
|
+
const i = ke().replace(/:/g, ""), l = t ? Fr(t, e) : void 0, s = (() => {
|
|
9071
9049
|
if (o) {
|
|
9072
9050
|
const p = vt(o, e);
|
|
9073
9051
|
if (l) {
|
|
@@ -9350,7 +9328,7 @@ const myTheme = createTheme({
|
|
|
9350
9328
|
function K(e, t) {
|
|
9351
9329
|
return { field: e, message: t };
|
|
9352
9330
|
}
|
|
9353
|
-
function
|
|
9331
|
+
function Pr(e) {
|
|
9354
9332
|
const t = [];
|
|
9355
9333
|
if (typeof e != "object" || e === null)
|
|
9356
9334
|
return { valid: !1, errors: [K("manifest", "Must be a non-null object")] };
|
|
@@ -9368,7 +9346,7 @@ function Fr(e) {
|
|
|
9368
9346
|
}) : t.push(K("usageExamples", "Must be an array")), Array.isArray(r.compositionGraph) || t.push(K("compositionGraph", "Must be an array (empty array is fine for atoms)")), typeof r.specVersion == "string" && !/^\d+\.\d+$/.test(r.specVersion) && t.push(K("specVersion", 'Must be "MAJOR.MINOR" format, e.g. "0.1"')), { valid: t.length === 0, errors: t };
|
|
9369
9347
|
}
|
|
9370
9348
|
function ai(e) {
|
|
9371
|
-
const t =
|
|
9349
|
+
const t = Pr(e);
|
|
9372
9350
|
if (!t.valid) {
|
|
9373
9351
|
const r = t.errors.map((o) => ` ${o.field}: ${o.message}`).join(`
|
|
9374
9352
|
`);
|
|
@@ -9404,7 +9382,7 @@ export {
|
|
|
9404
9382
|
Kt as Chip,
|
|
9405
9383
|
mo as CodeBlock,
|
|
9406
9384
|
go as CodeBlockManifest,
|
|
9407
|
-
|
|
9385
|
+
Fo as Collapsible,
|
|
9408
9386
|
Xn as ColorPicker,
|
|
9409
9387
|
xe as ColorSwatch,
|
|
9410
9388
|
Wo as CommandPalette,
|
|
@@ -9433,7 +9411,7 @@ export {
|
|
|
9433
9411
|
Vo as MULTI_SELECT_MANIFEST,
|
|
9434
9412
|
Oo as MultiSelect,
|
|
9435
9413
|
po as NavLink,
|
|
9436
|
-
|
|
9414
|
+
Po as PageLayout,
|
|
9437
9415
|
Zr as Radio,
|
|
9438
9416
|
ln as RadioGroup,
|
|
9439
9417
|
Qr as RadioGroupUncontrolled,
|
|
@@ -9489,12 +9467,12 @@ export {
|
|
|
9489
9467
|
wr as oceanPalette,
|
|
9490
9468
|
Tt as pillShape,
|
|
9491
9469
|
Dr as playfulPreset,
|
|
9492
|
-
|
|
9470
|
+
Fr as resolvePreset,
|
|
9493
9471
|
wt as rosePalette,
|
|
9494
9472
|
St as roundedShape,
|
|
9495
9473
|
kt as sharpShape,
|
|
9496
9474
|
It as spaciousDensity,
|
|
9497
9475
|
zt as subtleShadow,
|
|
9498
9476
|
Qo as useLucent,
|
|
9499
|
-
|
|
9477
|
+
Pr as validateManifest
|
|
9500
9478
|
};
|