lucent-ui 0.16.0 → 0.17.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 +23 -23
- package/dist/index.d.ts +2 -2
- package/dist/index.js +433 -388
- 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/manifest/examples/button.manifest.js +32 -6
- package/package.json +14 -16
- package/dist-server/src/manifest/validate.test.js +0 -28
package/dist/index.js
CHANGED
|
@@ -26,8 +26,19 @@ const Ft = {
|
|
|
26
26
|
background: "var(--lucent-danger-default)",
|
|
27
27
|
color: "#ffffff",
|
|
28
28
|
border: "1px solid var(--lucent-danger-default)"
|
|
29
|
+
},
|
|
30
|
+
"danger-outline": {
|
|
31
|
+
background: "var(--lucent-surface)",
|
|
32
|
+
color: "var(--lucent-danger-text)",
|
|
33
|
+
border: "1px solid var(--lucent-danger-default)"
|
|
34
|
+
},
|
|
35
|
+
"danger-ghost": {
|
|
36
|
+
background: "transparent",
|
|
37
|
+
color: "var(--lucent-danger-text)",
|
|
38
|
+
border: "1px solid transparent"
|
|
29
39
|
}
|
|
30
40
|
}, Pt = {
|
|
41
|
+
"2xs": { height: "22px", padding: "0 var(--lucent-space-1)", fontSize: "var(--lucent-font-size-xs)", borderRadius: "var(--lucent-radius-md)" },
|
|
31
42
|
xs: { height: "26px", padding: "0 var(--lucent-space-2)", fontSize: "var(--lucent-font-size-xs)" },
|
|
32
43
|
sm: { height: "calc(var(--lucent-space-8) * 0.5 + 18px)", padding: "0 var(--lucent-space-3)", fontSize: "var(--lucent-font-size-sm)" },
|
|
33
44
|
md: { height: "calc(var(--lucent-space-10) * 0.5 + 22px)", padding: "0 var(--lucent-space-4)", fontSize: "var(--lucent-font-size-md)" },
|
|
@@ -80,8 +91,8 @@ const Ft = {
|
|
|
80
91
|
onMouseDown: (u) => {
|
|
81
92
|
var m;
|
|
82
93
|
if (!y) {
|
|
83
|
-
const
|
|
84
|
-
u.currentTarget.style.transform = "translateY(1px)", u.currentTarget.style.boxShadow = `0 0 0 2px var(--lucent-surface), 0 0 0 4px ${
|
|
94
|
+
const C = e === "danger" || e === "danger-outline" || e === "danger-ghost" ? "var(--lucent-danger-default)" : "var(--lucent-accent-default)";
|
|
95
|
+
u.currentTarget.style.transform = "translateY(1px)", u.currentTarget.style.boxShadow = `0 0 0 2px var(--lucent-surface), 0 0 0 4px ${C}`, u.currentTarget.dataset.pressed = "1";
|
|
85
96
|
}
|
|
86
97
|
(m = g.onMouseDown) == null || m.call(g, u);
|
|
87
98
|
},
|
|
@@ -114,15 +125,17 @@ const Nt = {
|
|
|
114
125
|
secondary: "0 4px 14px -2px var(--lucent-accent-subtle)",
|
|
115
126
|
outline: "0 4px 14px -2px var(--lucent-accent-subtle)",
|
|
116
127
|
ghost: "0 4px 14px -2px var(--lucent-accent-subtle)",
|
|
117
|
-
danger: "0 4px 14px -2px var(--lucent-danger-subtle)"
|
|
128
|
+
danger: "0 4px 14px -2px var(--lucent-danger-subtle)",
|
|
129
|
+
"danger-outline": "0 4px 14px -2px var(--lucent-danger-subtle)",
|
|
130
|
+
"danger-ghost": "0 4px 14px -2px var(--lucent-danger-subtle)"
|
|
118
131
|
};
|
|
119
132
|
function $t(e, t, a) {
|
|
120
|
-
e.style.transform = "translateY(-1px)", e.style.boxShadow = Nt[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"
|
|
133
|
+
e.style.transform = "translateY(-1px)", e.style.boxShadow = Nt[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)", a !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)")) : t === "danger-outline" ? (e.style.background = "color-mix(in srgb, var(--lucent-danger-default) 10%, var(--lucent-surface))", a !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)")) : t === "danger-ghost" && (e.style.background = "color-mix(in srgb, var(--lucent-danger-default) 8%, var(--lucent-surface))");
|
|
121
134
|
}
|
|
122
135
|
function Wt(e, t, a) {
|
|
123
|
-
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"
|
|
136
|
+
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)", a !== !1 && (e.style.borderColor = "var(--lucent-danger-default)")) : t === "danger-outline" ? (e.style.background = "var(--lucent-surface)", a !== !1 && (e.style.borderColor = "var(--lucent-danger-default)")) : t === "danger-ghost" && (e.style.background = "transparent");
|
|
124
137
|
}
|
|
125
|
-
const Ot = { xs: 10, sm: 12, md: 14, lg: 16 };
|
|
138
|
+
const Ot = { "2xs": 8, xs: 10, sm: 12, md: 14, lg: 16 };
|
|
126
139
|
function Ht({ size: e }) {
|
|
127
140
|
const t = Ot[e];
|
|
128
141
|
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" }) });
|
|
@@ -140,23 +153,23 @@ const eo = {
|
|
|
140
153
|
domain: "neutral",
|
|
141
154
|
specVersion: "1.0",
|
|
142
155
|
description: "A clickable control that triggers an action. The primary interactive primitive in Lucent UI.",
|
|
143
|
-
designIntent: 'Buttons communicate available actions. Variant conveys hierarchy: use "primary" for the single most important action in a view, "secondary" for supporting actions, "ghost" for low-emphasis actions in dense UIs, "outline" for bordered buttons with no fill, and "danger" exclusively for destructive or irreversible operations. Size should match surrounding content density — prefer "md" as the default, "sm" for toolbars or tables,
|
|
156
|
+
designIntent: 'Buttons communicate available actions. Variant conveys hierarchy: use "primary" for the single most important action in a view, "secondary" for supporting actions, "ghost" for low-emphasis actions in dense UIs, "outline" for bordered buttons with no fill, and "danger" exclusively for destructive or irreversible operations. Use "danger-ghost" for low-emphasis destructive actions (red text, no fill) and "danger-outline" for bordered destructive buttons. Size should match surrounding content density — prefer "md" as the default, "sm" for toolbars or tables, "xs" for compact UIs like customizer panels, and "2xs" for ultra-dense inline controls (~22px height) such as table-inline actions or toolbar icon triggers.',
|
|
144
157
|
props: [
|
|
145
158
|
{
|
|
146
159
|
name: "variant",
|
|
147
160
|
type: "enum",
|
|
148
161
|
required: !1,
|
|
149
162
|
default: "primary",
|
|
150
|
-
description:
|
|
151
|
-
enumValues: ["primary", "secondary", "outline", "ghost", "danger"]
|
|
163
|
+
description: 'Visual style conveying action hierarchy. "primary" — filled accent for the single most important action. "secondary" — subtle accent-tinted fill for supporting actions. "outline" — bordered with no fill, for neutral secondary actions. "ghost" — transparent with no border, for low-emphasis or inline actions. "danger" — filled red for irreversible destructive actions (e.g. "Delete account"). "danger-outline" — red border + red text for destructive actions that need visual weight without a filled background. "danger-ghost" — red text only, for low-emphasis destructive actions (e.g. "Remove" in a list row).',
|
|
164
|
+
enumValues: ["primary", "secondary", "outline", "ghost", "danger", "danger-outline", "danger-ghost"]
|
|
152
165
|
},
|
|
153
166
|
{
|
|
154
167
|
name: "size",
|
|
155
168
|
type: "enum",
|
|
156
169
|
required: !1,
|
|
157
170
|
default: "md",
|
|
158
|
-
description:
|
|
159
|
-
enumValues: ["xs", "sm", "md", "lg"]
|
|
171
|
+
description: 'Controls height and padding. "lg" (48px) — hero sections, onboarding flows. "md" (42px) — default for most forms and dialogs. "sm" (34px) — toolbars, table headers, card actions. "xs" (26px) — compact UIs like customizer panels, inline controls. "2xs" (22px) — ultra-dense inline icon triggers, table-row actions, dashboard toolbar buttons.',
|
|
172
|
+
enumValues: ["2xs", "xs", "sm", "md", "lg"]
|
|
160
173
|
},
|
|
161
174
|
{
|
|
162
175
|
name: "children",
|
|
@@ -265,6 +278,18 @@ const eo = {
|
|
|
265
278
|
{
|
|
266
279
|
title: "Dropdown trigger",
|
|
267
280
|
code: '<Button variant="outline" chevron>Options</Button>'
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
title: "Bordered destructive action",
|
|
284
|
+
code: '<Button variant="danger-outline" onClick={handleRevoke}>Revoke access</Button>'
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
title: "Low-emphasis destructive action",
|
|
288
|
+
code: '<Button variant="danger-ghost" onClick={handleRemove}>Remove</Button>'
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
title: "Dense inline action",
|
|
292
|
+
code: '<Button variant="ghost" size="2xs" leftIcon={<RefreshIcon />}>Retry</Button>'
|
|
268
293
|
}
|
|
269
294
|
],
|
|
270
295
|
compositionGraph: [],
|
|
@@ -316,7 +341,7 @@ const eo = {
|
|
|
316
341
|
whiteSpace: "nowrap",
|
|
317
342
|
userSelect: "none",
|
|
318
343
|
flexShrink: 0
|
|
319
|
-
},
|
|
344
|
+
}, z = { ...x, paddingLeft: ce[e], paddingRight: "2px" }, P = { ...x, paddingLeft: "2px", paddingRight: ce[e] };
|
|
320
345
|
return /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...d }, children: [
|
|
321
346
|
t && /* @__PURE__ */ n(
|
|
322
347
|
"label",
|
|
@@ -354,7 +379,7 @@ const eo = {
|
|
|
354
379
|
},
|
|
355
380
|
onMouseLeave: () => f(!1),
|
|
356
381
|
children: [
|
|
357
|
-
l && /* @__PURE__ */ n("span", { style:
|
|
382
|
+
l && /* @__PURE__ */ n("span", { style: z, children: l }),
|
|
358
383
|
/* @__PURE__ */ v("div", { style: { position: "relative", flex: 1, display: "flex", alignItems: "center", minWidth: 0 }, children: [
|
|
359
384
|
r && /* @__PURE__ */ n("span", { style: {
|
|
360
385
|
position: "absolute",
|
|
@@ -387,12 +412,12 @@ const eo = {
|
|
|
387
412
|
},
|
|
388
413
|
...p,
|
|
389
414
|
onFocus: (k) => {
|
|
390
|
-
var
|
|
391
|
-
u(!0), (
|
|
415
|
+
var M;
|
|
416
|
+
u(!0), (M = p.onFocus) == null || M.call(p, k);
|
|
392
417
|
},
|
|
393
418
|
onBlur: (k) => {
|
|
394
|
-
var
|
|
395
|
-
u(!1), (
|
|
419
|
+
var M;
|
|
420
|
+
u(!1), (M = p.onBlur) == null || M.call(p, k);
|
|
396
421
|
}
|
|
397
422
|
}
|
|
398
423
|
),
|
|
@@ -404,7 +429,7 @@ const eo = {
|
|
|
404
429
|
alignItems: "center"
|
|
405
430
|
}, children: i })
|
|
406
431
|
] }),
|
|
407
|
-
s && /* @__PURE__ */ n("span", { style:
|
|
432
|
+
s && /* @__PURE__ */ n("span", { style: P, children: s })
|
|
408
433
|
]
|
|
409
434
|
}
|
|
410
435
|
),
|
|
@@ -533,20 +558,20 @@ const to = {
|
|
|
533
558
|
...b
|
|
534
559
|
},
|
|
535
560
|
onMouseEnter: (x) => {
|
|
536
|
-
var
|
|
537
|
-
!f && x.currentTarget !== document.activeElement && (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (
|
|
561
|
+
var z;
|
|
562
|
+
!f && x.currentTarget !== document.activeElement && (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (z = h.onMouseEnter) == null || z.call(h, x);
|
|
538
563
|
},
|
|
539
564
|
onMouseLeave: (x) => {
|
|
540
|
-
var
|
|
541
|
-
!f && x.currentTarget !== document.activeElement && (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (
|
|
565
|
+
var z;
|
|
566
|
+
!f && x.currentTarget !== document.activeElement && (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (z = h.onMouseLeave) == null || z.call(h, x);
|
|
542
567
|
},
|
|
543
568
|
onFocus: (x) => {
|
|
544
|
-
var
|
|
545
|
-
f || (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-focus-ring)", x.currentTarget.style.boxShadow = `0 0 0 3px ${m ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (
|
|
569
|
+
var z;
|
|
570
|
+
f || (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-focus-ring)", x.currentTarget.style.boxShadow = `0 0 0 3px ${m ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (z = h.onFocus) == null || z.call(h, x));
|
|
546
571
|
},
|
|
547
572
|
onBlur: (x) => {
|
|
548
|
-
var
|
|
549
|
-
f || (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", x.currentTarget.style.boxShadow = "none", (
|
|
573
|
+
var z;
|
|
574
|
+
f || (x.currentTarget.style.borderColor = m ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", x.currentTarget.style.boxShadow = "none", (z = h.onBlur) == null || z.call(h, x));
|
|
550
575
|
},
|
|
551
576
|
...h
|
|
552
577
|
}
|
|
@@ -1147,11 +1172,11 @@ const uo = {
|
|
|
1147
1172
|
style: p,
|
|
1148
1173
|
...b
|
|
1149
1174
|
}, h) => {
|
|
1150
|
-
const g = j(null), T = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, y = ln[t], u = i !== void 0, [m, f] = D(l ?? !1), [C, I] = D(!1), x = u ? !!i : m,
|
|
1175
|
+
const g = j(null), T = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, y = ln[t], u = i !== void 0, [m, f] = D(l ?? !1), [C, I] = D(!1), x = u ? !!i : m, z = j(x), [P, k] = D(0);
|
|
1151
1176
|
J(() => {
|
|
1152
|
-
!s &&
|
|
1177
|
+
!s && z.current !== x && (z.current = x, k((q) => q + 1));
|
|
1153
1178
|
}, [x, s]);
|
|
1154
|
-
const
|
|
1179
|
+
const M = ie(
|
|
1155
1180
|
(q) => {
|
|
1156
1181
|
g.current = q, typeof h == "function" ? h(q) : h && (h.current = q);
|
|
1157
1182
|
},
|
|
@@ -1160,7 +1185,7 @@ const uo = {
|
|
|
1160
1185
|
J(() => {
|
|
1161
1186
|
g.current && (g.current.indeterminate = a);
|
|
1162
1187
|
}, [a]);
|
|
1163
|
-
const
|
|
1188
|
+
const W = (q) => {
|
|
1164
1189
|
u || f(q.target.checked), d == null || d(q);
|
|
1165
1190
|
}, L = s ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)", A = {
|
|
1166
1191
|
width: y,
|
|
@@ -1178,8 +1203,8 @@ const uo = {
|
|
|
1178
1203
|
flexShrink: 0,
|
|
1179
1204
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1180
1205
|
// Re-key forces the animation to restart on every toggle.
|
|
1181
|
-
animation:
|
|
1182
|
-
},
|
|
1206
|
+
animation: P > 0 ? "lucent-cb-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
1207
|
+
}, N = /* @__PURE__ */ v(
|
|
1183
1208
|
"label",
|
|
1184
1209
|
{
|
|
1185
1210
|
style: {
|
|
@@ -1197,12 +1222,12 @@ const uo = {
|
|
|
1197
1222
|
/* @__PURE__ */ n(
|
|
1198
1223
|
"input",
|
|
1199
1224
|
{
|
|
1200
|
-
ref:
|
|
1225
|
+
ref: M,
|
|
1201
1226
|
type: "checkbox",
|
|
1202
1227
|
id: T,
|
|
1203
1228
|
checked: u ? i : m,
|
|
1204
1229
|
disabled: s,
|
|
1205
|
-
onChange:
|
|
1230
|
+
onChange: W,
|
|
1206
1231
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
1207
1232
|
...b
|
|
1208
1233
|
}
|
|
@@ -1230,7 +1255,7 @@ const uo = {
|
|
|
1230
1255
|
children: /* @__PURE__ */ n("path", { d: "M2 5H8", stroke: L, strokeWidth: 1.5, strokeLinecap: "round" })
|
|
1231
1256
|
}
|
|
1232
1257
|
)
|
|
1233
|
-
] },
|
|
1258
|
+
] }, P),
|
|
1234
1259
|
(e || r) && /* @__PURE__ */ v("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
1235
1260
|
e && /* @__PURE__ */ n("span", { style: {
|
|
1236
1261
|
fontWeight: r ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1267,12 +1292,12 @@ const uo = {
|
|
|
1267
1292
|
...p
|
|
1268
1293
|
},
|
|
1269
1294
|
onClick: (q) => {
|
|
1270
|
-
var
|
|
1271
|
-
s || q.target === q.currentTarget && ((
|
|
1295
|
+
var $;
|
|
1296
|
+
s || q.target === q.currentTarget && (($ = g.current) == null || $.click());
|
|
1272
1297
|
},
|
|
1273
|
-
children:
|
|
1298
|
+
children: N
|
|
1274
1299
|
}
|
|
1275
|
-
) :
|
|
1300
|
+
) : N
|
|
1276
1301
|
] });
|
|
1277
1302
|
}
|
|
1278
1303
|
);
|
|
@@ -1406,18 +1431,18 @@ const pn = { sm: 14, md: 16, lg: 20 }, fn = { sm: "calc(var(--lucent-space-8) *
|
|
|
1406
1431
|
function fo({ value: e, label: t, size: a = "md", contained: o = !1, helperText: r, disabled: i, id: l, onChange: s, checked: c, style: d, ...p }) {
|
|
1407
1432
|
const b = je(ut), h = l ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, g = pn[a], [T, y] = D(!1), u = i ?? (b == null ? void 0 : b.disabled) ?? !1, m = b ? b.value === e : !!c, f = j(m), [C, I] = D(0);
|
|
1408
1433
|
J(() => {
|
|
1409
|
-
!u && f.current !== m && (f.current = m, I((
|
|
1434
|
+
!u && f.current !== m && (f.current = m, I((M) => M + 1));
|
|
1410
1435
|
}, [m, u]);
|
|
1411
|
-
const x = (
|
|
1412
|
-
b == null || b.onChange(e), s == null || s(
|
|
1413
|
-
},
|
|
1436
|
+
const x = (M) => {
|
|
1437
|
+
b == null || b.onChange(e), s == null || s(M);
|
|
1438
|
+
}, z = {
|
|
1414
1439
|
width: g / 2,
|
|
1415
1440
|
height: g / 2,
|
|
1416
1441
|
borderRadius: "50%",
|
|
1417
1442
|
background: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)",
|
|
1418
1443
|
animation: m ? "lucent-radio-dot 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0,
|
|
1419
1444
|
opacity: m ? 1 : 0
|
|
1420
|
-
},
|
|
1445
|
+
}, P = {
|
|
1421
1446
|
width: g,
|
|
1422
1447
|
height: g,
|
|
1423
1448
|
borderRadius: "50%",
|
|
@@ -1458,7 +1483,7 @@ function fo({ value: e, label: t, size: a = "md", contained: o = !1, helperText:
|
|
|
1458
1483
|
...p
|
|
1459
1484
|
}
|
|
1460
1485
|
),
|
|
1461
|
-
/* @__PURE__ */ n("span", { "aria-hidden": !0, style:
|
|
1486
|
+
/* @__PURE__ */ n("span", { "aria-hidden": !0, style: P, children: /* @__PURE__ */ n("span", { style: z }) }, C),
|
|
1462
1487
|
t || r ? /* @__PURE__ */ v("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
1463
1488
|
t && /* @__PURE__ */ n("span", { style: {
|
|
1464
1489
|
fontWeight: r ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1491,10 +1516,10 @@ function fo({ value: e, label: t, size: a = "md", contained: o = !1, helperText:
|
|
|
1491
1516
|
cursor: u ? "not-allowed" : "pointer",
|
|
1492
1517
|
...d
|
|
1493
1518
|
},
|
|
1494
|
-
onClick: (
|
|
1495
|
-
if (!u &&
|
|
1496
|
-
const
|
|
1497
|
-
|
|
1519
|
+
onClick: (M) => {
|
|
1520
|
+
if (!u && M.target === M.currentTarget) {
|
|
1521
|
+
const W = M.currentTarget.querySelector("input");
|
|
1522
|
+
W == null || W.click();
|
|
1498
1523
|
}
|
|
1499
1524
|
},
|
|
1500
1525
|
children: k
|
|
@@ -1643,45 +1668,61 @@ function go({
|
|
|
1643
1668
|
style: p,
|
|
1644
1669
|
...b
|
|
1645
1670
|
}) {
|
|
1646
|
-
const h = c ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, g = a !== void 0, [T, y] = D(o ?? !1), u = g ? !!a : T, [m, f] = D(!1), C = j(u), [I, x] = D(0);
|
|
1671
|
+
const h = c ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, g = a !== void 0, [T, y] = D(o ?? !1), u = g ? !!a : T, [m, f] = D(!1), C = j(u), [I, x] = D(0), [z, P] = D(!1);
|
|
1647
1672
|
J(() => {
|
|
1648
|
-
!s && C.current !== u
|
|
1673
|
+
if (!s && C.current !== u) {
|
|
1674
|
+
C.current = u, x((G) => G + 1), P(!0);
|
|
1675
|
+
const $ = setTimeout(() => P(!1), 150);
|
|
1676
|
+
return () => clearTimeout($);
|
|
1677
|
+
}
|
|
1649
1678
|
}, [u, s]);
|
|
1650
|
-
const { track: [
|
|
1651
|
-
g || y(
|
|
1652
|
-
},
|
|
1679
|
+
const { track: [k, M], thumb: W } = gn[t], L = u ? k - W - 2 : 2, A = ($) => {
|
|
1680
|
+
g || y($.target.checked), d == null || d($);
|
|
1681
|
+
}, N = /* @__PURE__ */ v(
|
|
1653
1682
|
"span",
|
|
1654
1683
|
{
|
|
1655
1684
|
"aria-hidden": !0,
|
|
1656
1685
|
style: {
|
|
1657
1686
|
position: "relative",
|
|
1658
|
-
width:
|
|
1659
|
-
height:
|
|
1660
|
-
borderRadius:
|
|
1661
|
-
|
|
1662
|
-
flexShrink: 0,
|
|
1663
|
-
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1664
|
-
animation: I > 0 ? `lucent-toggle-pop 240ms ${Ke} forwards` : void 0
|
|
1687
|
+
width: k,
|
|
1688
|
+
height: M,
|
|
1689
|
+
borderRadius: M / 2,
|
|
1690
|
+
flexShrink: 0
|
|
1665
1691
|
},
|
|
1666
|
-
children:
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1692
|
+
children: [
|
|
1693
|
+
/* @__PURE__ */ n(
|
|
1694
|
+
"span",
|
|
1695
|
+
{
|
|
1696
|
+
style: {
|
|
1697
|
+
position: "absolute",
|
|
1698
|
+
inset: 0,
|
|
1699
|
+
borderRadius: "inherit",
|
|
1700
|
+
background: s ? "var(--lucent-surface-secondary)" : u ? "var(--lucent-accent-default)" : "var(--lucent-control-track)",
|
|
1701
|
+
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1702
|
+
animation: I > 0 ? `lucent-toggle-pop 240ms ${Ke} forwards` : void 0
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
I
|
|
1706
|
+
),
|
|
1707
|
+
/* @__PURE__ */ n(
|
|
1708
|
+
"span",
|
|
1709
|
+
{
|
|
1710
|
+
style: {
|
|
1711
|
+
position: "absolute",
|
|
1712
|
+
top: 2,
|
|
1713
|
+
left: L,
|
|
1714
|
+
width: z ? W * 1.3 : W,
|
|
1715
|
+
height: W,
|
|
1716
|
+
borderRadius: W,
|
|
1717
|
+
background: "#ffffff",
|
|
1718
|
+
boxShadow: "0 1px 3px rgb(0 0 0 / 0.2)",
|
|
1719
|
+
transition: `left 260ms ${Ke}, width 200ms cubic-bezier(0.22, 1, 0.36, 1)`
|
|
1720
|
+
}
|
|
1679
1721
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
), A = /* @__PURE__ */ v(
|
|
1722
|
+
)
|
|
1723
|
+
]
|
|
1724
|
+
}
|
|
1725
|
+
), q = /* @__PURE__ */ v(
|
|
1685
1726
|
"label",
|
|
1686
1727
|
{
|
|
1687
1728
|
style: {
|
|
@@ -1705,13 +1746,13 @@ function go({
|
|
|
1705
1746
|
id: h,
|
|
1706
1747
|
checked: g ? a : T,
|
|
1707
1748
|
disabled: s,
|
|
1708
|
-
onChange:
|
|
1749
|
+
onChange: A,
|
|
1709
1750
|
"aria-checked": u,
|
|
1710
1751
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
1711
1752
|
...b
|
|
1712
1753
|
}
|
|
1713
1754
|
),
|
|
1714
|
-
l === "left" &&
|
|
1755
|
+
l === "left" && N,
|
|
1715
1756
|
e || i ? /* @__PURE__ */ v("span", { style: { display: "flex", flexDirection: "column", flex: l === "right" ? 1 : void 0 }, children: [
|
|
1716
1757
|
e && /* @__PURE__ */ n("span", { style: {
|
|
1717
1758
|
fontWeight: i ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
@@ -1723,7 +1764,7 @@ function go({
|
|
|
1723
1764
|
marginTop: "2px"
|
|
1724
1765
|
}, children: i })
|
|
1725
1766
|
] }) : null,
|
|
1726
|
-
l === "right" &&
|
|
1767
|
+
l === "right" && N
|
|
1727
1768
|
]
|
|
1728
1769
|
}
|
|
1729
1770
|
);
|
|
@@ -1745,15 +1786,15 @@ function go({
|
|
|
1745
1786
|
cursor: s ? "not-allowed" : "pointer",
|
|
1746
1787
|
...p
|
|
1747
1788
|
},
|
|
1748
|
-
onClick: (
|
|
1749
|
-
if (!s &&
|
|
1750
|
-
const
|
|
1751
|
-
|
|
1789
|
+
onClick: ($) => {
|
|
1790
|
+
if (!s && $.target === $.currentTarget) {
|
|
1791
|
+
const G = $.currentTarget.querySelector("input");
|
|
1792
|
+
G == null || G.click();
|
|
1752
1793
|
}
|
|
1753
1794
|
},
|
|
1754
|
-
children:
|
|
1795
|
+
children: q
|
|
1755
1796
|
}
|
|
1756
|
-
) :
|
|
1797
|
+
) : q
|
|
1757
1798
|
] });
|
|
1758
1799
|
}
|
|
1759
1800
|
const bo = {
|
|
@@ -3042,11 +3083,11 @@ function zo({
|
|
|
3042
3083
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
3043
3084
|
whiteSpace: "nowrap"
|
|
3044
3085
|
},
|
|
3045
|
-
onMouseEnter: (
|
|
3046
|
-
x || (
|
|
3086
|
+
onMouseEnter: (z) => {
|
|
3087
|
+
x || (z.currentTarget.style.color = "var(--lucent-text-primary)");
|
|
3047
3088
|
},
|
|
3048
|
-
onMouseLeave: (
|
|
3049
|
-
x || (
|
|
3089
|
+
onMouseLeave: (z) => {
|
|
3090
|
+
x || (z.currentTarget.style.color = "var(--lucent-text-secondary)");
|
|
3050
3091
|
},
|
|
3051
3092
|
children: [
|
|
3052
3093
|
C.icon !== void 0 && /* @__PURE__ */ n("span", { style: { display: "inline-flex", alignItems: "center" }, children: C.icon }),
|
|
@@ -3431,14 +3472,18 @@ const Eo = {
|
|
|
3431
3472
|
ariaAttributes: ['scope="col" on th cells'],
|
|
3432
3473
|
keyboardInteractions: ["Standard browser table navigation"]
|
|
3433
3474
|
}
|
|
3434
|
-
}, Je = {
|
|
3475
|
+
}, Je = {
|
|
3476
|
+
sm: "calc(var(--lucent-space-8) * 0.5 + 18px)",
|
|
3477
|
+
md: "calc(var(--lucent-space-10) * 0.5 + 22px)",
|
|
3478
|
+
lg: "calc(var(--lucent-space-12) * 0.5 + 26px)"
|
|
3479
|
+
}, Hn = {
|
|
3435
3480
|
sm: "var(--lucent-font-size-sm)",
|
|
3436
|
-
md: "var(--lucent-font-size-
|
|
3437
|
-
lg: "var(--lucent-font-size-
|
|
3481
|
+
md: "var(--lucent-font-size-md)",
|
|
3482
|
+
lg: "var(--lucent-font-size-lg)"
|
|
3438
3483
|
}, Vn = {
|
|
3439
|
-
sm: "var(--lucent-space-
|
|
3440
|
-
md: "var(--lucent-space-
|
|
3441
|
-
lg: "var(--lucent-space-
|
|
3484
|
+
sm: "var(--lucent-space-3)",
|
|
3485
|
+
md: "var(--lucent-space-4)",
|
|
3486
|
+
lg: "var(--lucent-space-5)"
|
|
3442
3487
|
};
|
|
3443
3488
|
function ft({
|
|
3444
3489
|
options: e,
|
|
@@ -3506,7 +3551,7 @@ function ft({
|
|
|
3506
3551
|
background: "var(--lucent-surface)",
|
|
3507
3552
|
borderRadius: "var(--lucent-radius-lg)",
|
|
3508
3553
|
boxShadow: "var(--lucent-shadow-sm)",
|
|
3509
|
-
transition: g.animate ? "left var(--lucent-duration-base)
|
|
3554
|
+
transition: g.animate ? "left var(--lucent-duration-base) cubic-bezier(0.34, 1.56, 0.64, 1), width var(--lucent-duration-base) cubic-bezier(0.22, 1, 0.36, 1)" : "none",
|
|
3510
3555
|
zIndex: 0,
|
|
3511
3556
|
pointerEvents: "none"
|
|
3512
3557
|
}
|
|
@@ -3804,21 +3849,21 @@ function ea({
|
|
|
3804
3849
|
id: s,
|
|
3805
3850
|
style: c
|
|
3806
3851
|
}) {
|
|
3807
|
-
var
|
|
3852
|
+
var F, R;
|
|
3808
3853
|
const d = o === "sm" ? 24 : 40, p = Ce(), b = s ?? p, [h, g] = D(!1), [T, y] = D("hex"), [u, m] = D(0), [f, C] = D(() => {
|
|
3809
3854
|
const w = e ? be(e) ?? { r: 0, g: 0, b: 0, a: 1 } : { r: 0, g: 0, b: 0, a: 1 };
|
|
3810
3855
|
return ee(w);
|
|
3811
|
-
}), [I, x] = D(() => ge(f).slice(1).toUpperCase()),
|
|
3856
|
+
}), [I, x] = D(() => ge(f).slice(1).toUpperCase()), z = j(null), P = j(null), k = j(null), [M, W] = D({ top: 0, left: 0 });
|
|
3812
3857
|
Ee(() => {
|
|
3813
|
-
if (!h || !
|
|
3814
|
-
const w =
|
|
3858
|
+
if (!h || !z.current) return;
|
|
3859
|
+
const w = z.current.getBoundingClientRect();
|
|
3815
3860
|
let E = w.left;
|
|
3816
3861
|
const B = w.bottom + 8;
|
|
3817
3862
|
if (k.current) {
|
|
3818
|
-
const
|
|
3819
|
-
E +
|
|
3863
|
+
const H = k.current.offsetWidth;
|
|
3864
|
+
E + H > window.innerWidth && (E = w.right - H);
|
|
3820
3865
|
}
|
|
3821
|
-
|
|
3866
|
+
W({ top: B, left: E });
|
|
3822
3867
|
}, [h]), J(() => {
|
|
3823
3868
|
if (!e) return;
|
|
3824
3869
|
const w = be(e);
|
|
@@ -3826,9 +3871,9 @@ function ea({
|
|
|
3826
3871
|
}, [e]), J(() => {
|
|
3827
3872
|
if (!h) return;
|
|
3828
3873
|
const w = (E) => {
|
|
3829
|
-
var
|
|
3874
|
+
var H, X;
|
|
3830
3875
|
const B = E.target;
|
|
3831
|
-
(
|
|
3876
|
+
(H = z.current) != null && H.contains(B) || (X = k.current) != null && X.contains(B) || g(!1);
|
|
3832
3877
|
};
|
|
3833
3878
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
3834
3879
|
}, [h]);
|
|
@@ -3837,16 +3882,16 @@ function ea({
|
|
|
3837
3882
|
const E = ge(w);
|
|
3838
3883
|
x(E.slice(1).toUpperCase()), t == null || t(E);
|
|
3839
3884
|
}, [t]), A = ie((w) => {
|
|
3840
|
-
const E =
|
|
3841
|
-
L({ ...f, s: B, v:
|
|
3842
|
-
}, [f, L]),
|
|
3885
|
+
const E = P.current.getBoundingClientRect(), B = Math.round(De((w.clientX - E.left) / E.width, 0, 1) * 100), H = Math.round((1 - De((w.clientY - E.top) / E.height, 0, 1)) * 100);
|
|
3886
|
+
L({ ...f, s: B, v: H });
|
|
3887
|
+
}, [f, L]), N = ie(async () => {
|
|
3843
3888
|
if ("EyeDropper" in window)
|
|
3844
3889
|
try {
|
|
3845
3890
|
const w = await new window.EyeDropper().open(), E = be(w.sRGBHex);
|
|
3846
3891
|
E && L(ee(E));
|
|
3847
3892
|
} catch {
|
|
3848
3893
|
}
|
|
3849
|
-
}, [L]), q = mt(f),
|
|
3894
|
+
}, [L]), q = mt(f), $ = Xn(q.r, q.g, q.b), G = ge(f), Q = ge({ ...f, a: 1 }), O = Math.round(f.a * 100), K = [
|
|
3850
3895
|
{ id: "hex", label: "Hex" },
|
|
3851
3896
|
{ id: "rgb", label: "RGB" },
|
|
3852
3897
|
{ id: "hsl", label: "HSL" },
|
|
@@ -3855,7 +3900,7 @@ function ea({
|
|
|
3855
3900
|
return /* @__PURE__ */ v(
|
|
3856
3901
|
"div",
|
|
3857
3902
|
{
|
|
3858
|
-
ref:
|
|
3903
|
+
ref: z,
|
|
3859
3904
|
style: { display: "inline-flex", flexDirection: r ? "row" : "column", alignItems: r ? "center" : void 0, gap: "var(--lucent-space-1)", position: "relative", ...c },
|
|
3860
3905
|
children: [
|
|
3861
3906
|
/* @__PURE__ */ n("style", { children: `
|
|
@@ -3918,8 +3963,8 @@ function ea({
|
|
|
3918
3963
|
"aria-label": "Color picker",
|
|
3919
3964
|
style: {
|
|
3920
3965
|
position: "fixed",
|
|
3921
|
-
top:
|
|
3922
|
-
left:
|
|
3966
|
+
top: M.top,
|
|
3967
|
+
left: M.left,
|
|
3923
3968
|
zIndex: 1e3,
|
|
3924
3969
|
background: "var(--lucent-surface)",
|
|
3925
3970
|
border: "1px solid var(--lucent-border-default)",
|
|
@@ -3934,7 +3979,7 @@ function ea({
|
|
|
3934
3979
|
/* @__PURE__ */ v(
|
|
3935
3980
|
"div",
|
|
3936
3981
|
{
|
|
3937
|
-
ref:
|
|
3982
|
+
ref: P,
|
|
3938
3983
|
style: {
|
|
3939
3984
|
position: "relative",
|
|
3940
3985
|
height: 160,
|
|
@@ -4029,7 +4074,7 @@ function ea({
|
|
|
4029
4074
|
{
|
|
4030
4075
|
variant: "secondary",
|
|
4031
4076
|
size: "sm",
|
|
4032
|
-
onClick:
|
|
4077
|
+
onClick: N,
|
|
4033
4078
|
disabled: !S,
|
|
4034
4079
|
title: S ? "Pick color from screen" : "Not supported in this browser",
|
|
4035
4080
|
leftIcon: /* @__PURE__ */ n(Qn, {}),
|
|
@@ -4047,8 +4092,8 @@ function ea({
|
|
|
4047
4092
|
x(E.toUpperCase());
|
|
4048
4093
|
const B = be(`#${E}`);
|
|
4049
4094
|
if (B) {
|
|
4050
|
-
const
|
|
4051
|
-
C(
|
|
4095
|
+
const H = ee(B);
|
|
4096
|
+
C(H), t == null || t(Oe(B));
|
|
4052
4097
|
}
|
|
4053
4098
|
},
|
|
4054
4099
|
spellCheck: !1,
|
|
@@ -4063,7 +4108,7 @@ function ea({
|
|
|
4063
4108
|
size: "sm",
|
|
4064
4109
|
type: "number",
|
|
4065
4110
|
suffix: "%",
|
|
4066
|
-
value:
|
|
4111
|
+
value: O,
|
|
4067
4112
|
min: 0,
|
|
4068
4113
|
max: 100,
|
|
4069
4114
|
onChange: (w) => {
|
|
@@ -4079,37 +4124,37 @@ function ea({
|
|
|
4079
4124
|
{ label: "R", val: q.r, max: 255, fn: (w) => L(ee({ ...q, r: w })) },
|
|
4080
4125
|
{ label: "G", val: q.g, max: 255, fn: (w) => L(ee({ ...q, g: w })) },
|
|
4081
4126
|
{ label: "B", val: q.b, max: 255, fn: (w) => L(ee({ ...q, b: w })) },
|
|
4082
|
-
{ label: "A", val:
|
|
4083
|
-
].map(({ label: w, val: E, max: B, fn:
|
|
4084
|
-
const
|
|
4085
|
-
!isNaN(
|
|
4127
|
+
{ label: "A", val: O, max: 100, fn: (w) => L({ ...f, a: w / 100 }) }
|
|
4128
|
+
].map(({ label: w, val: E, max: B, fn: H }) => /* @__PURE__ */ n(oe, { size: "sm", type: "number", prefix: w, value: E, min: 0, max: B, onChange: (X) => {
|
|
4129
|
+
const _ = +X.target.value;
|
|
4130
|
+
!isNaN(_) && _ >= 0 && _ <= B && H(_);
|
|
4086
4131
|
}, className: "lucent-cp-field", style: { flex: 1 } }, w)) }),
|
|
4087
4132
|
T === "hsl" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4088
|
-
{ label: "H", val:
|
|
4089
|
-
const { r: E, g: B, b:
|
|
4090
|
-
L(ee({ r: E, g: B, b:
|
|
4133
|
+
{ label: "H", val: $.h, max: 360, fn: (w) => {
|
|
4134
|
+
const { r: E, g: B, b: H } = Te(w, $.s, $.l);
|
|
4135
|
+
L(ee({ r: E, g: B, b: H, a: f.a }));
|
|
4091
4136
|
} },
|
|
4092
|
-
{ label: "S", val:
|
|
4093
|
-
const { r: E, g: B, b:
|
|
4094
|
-
L(ee({ r: E, g: B, b:
|
|
4137
|
+
{ label: "S", val: $.s, max: 100, fn: (w) => {
|
|
4138
|
+
const { r: E, g: B, b: H } = Te($.h, w, $.l);
|
|
4139
|
+
L(ee({ r: E, g: B, b: H, a: f.a }));
|
|
4095
4140
|
} },
|
|
4096
|
-
{ label: "L", val:
|
|
4097
|
-
const { r: E, g: B, b:
|
|
4098
|
-
L(ee({ r: E, g: B, b:
|
|
4141
|
+
{ label: "L", val: $.l, max: 100, fn: (w) => {
|
|
4142
|
+
const { r: E, g: B, b: H } = Te($.h, $.s, w);
|
|
4143
|
+
L(ee({ r: E, g: B, b: H, a: f.a }));
|
|
4099
4144
|
} },
|
|
4100
|
-
{ label: "A", val:
|
|
4101
|
-
].map(({ label: w, val: E, max: B, fn:
|
|
4102
|
-
const
|
|
4103
|
-
!isNaN(
|
|
4145
|
+
{ label: "A", val: O, max: 100, fn: (w) => L({ ...f, a: w / 100 }) }
|
|
4146
|
+
].map(({ label: w, val: E, max: B, fn: H }) => /* @__PURE__ */ n(oe, { size: "sm", type: "number", prefix: w, value: E, min: 0, max: B, onChange: (X) => {
|
|
4147
|
+
const _ = +X.target.value;
|
|
4148
|
+
!isNaN(_) && _ >= 0 && _ <= B && H(_);
|
|
4104
4149
|
}, className: "lucent-cp-field", style: { flex: 1 } }, w)) }),
|
|
4105
4150
|
T === "hsb" && /* @__PURE__ */ n("div", { style: { display: "flex", gap: 6 }, children: [
|
|
4106
4151
|
{ label: "H", val: f.h, max: 360, fn: (w) => L({ ...f, h: w }) },
|
|
4107
4152
|
{ label: "S", val: f.s, max: 100, fn: (w) => L({ ...f, s: w }) },
|
|
4108
4153
|
{ label: "B", val: f.v, max: 100, fn: (w) => L({ ...f, v: w }) },
|
|
4109
|
-
{ label: "A", val:
|
|
4110
|
-
].map(({ label: w, val: E, max: B, fn:
|
|
4111
|
-
const
|
|
4112
|
-
!isNaN(
|
|
4154
|
+
{ label: "A", val: O, max: 100, fn: (w) => L({ ...f, a: w / 100 }) }
|
|
4155
|
+
].map(({ label: w, val: E, max: B, fn: H }) => /* @__PURE__ */ n(oe, { size: "sm", type: "number", prefix: w, value: E, min: 0, max: B, onChange: (X) => {
|
|
4156
|
+
const _ = +X.target.value;
|
|
4157
|
+
!isNaN(_) && _ >= 0 && _ <= B && H(_);
|
|
4113
4158
|
}, className: "lucent-cp-field", style: { flex: 1 } }, w)) }),
|
|
4114
4159
|
l.length > 0 && /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
4115
4160
|
l.length > 1 && /* @__PURE__ */ n(
|
|
@@ -4126,9 +4171,9 @@ function ea({
|
|
|
4126
4171
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
4127
4172
|
color: "var(--lucent-text-secondary)",
|
|
4128
4173
|
fontFamily: "var(--lucent-font-family-base)"
|
|
4129
|
-
}, children: (
|
|
4130
|
-
/* @__PURE__ */ n("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((
|
|
4131
|
-
const E = Ge(w).toLowerCase() ===
|
|
4174
|
+
}, children: (F = l[0]) == null ? void 0 : F.label }),
|
|
4175
|
+
/* @__PURE__ */ n("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((R = l[u]) == null ? void 0 : R.colors) ?? []).map((w) => {
|
|
4176
|
+
const E = Ge(w).toLowerCase() === G.slice(0, 7).toLowerCase();
|
|
4132
4177
|
return /* @__PURE__ */ n(
|
|
4133
4178
|
Se,
|
|
4134
4179
|
{
|
|
@@ -4515,9 +4560,9 @@ function Po({
|
|
|
4515
4560
|
c == null || c(k), T(!1);
|
|
4516
4561
|
}, x = () => {
|
|
4517
4562
|
m.current = setTimeout(() => T(!1), 150);
|
|
4518
|
-
},
|
|
4563
|
+
}, z = () => {
|
|
4519
4564
|
m.current && clearTimeout(m.current), T(!0);
|
|
4520
|
-
},
|
|
4565
|
+
}, P = d ? /* @__PURE__ */ n(on, { size: "sm" }) : e ? /* @__PURE__ */ n(
|
|
4521
4566
|
"button",
|
|
4522
4567
|
{
|
|
4523
4568
|
type: "button",
|
|
@@ -4554,8 +4599,8 @@ function Po({
|
|
|
4554
4599
|
placeholder: a,
|
|
4555
4600
|
disabled: p,
|
|
4556
4601
|
leftElement: /* @__PURE__ */ n(na, { size: ta[o] }),
|
|
4557
|
-
rightElement:
|
|
4558
|
-
onFocus:
|
|
4602
|
+
rightElement: P ?? void 0,
|
|
4603
|
+
onFocus: z,
|
|
4559
4604
|
onBlur: x,
|
|
4560
4605
|
...r !== void 0 && { label: r },
|
|
4561
4606
|
...i !== void 0 && { helperText: i },
|
|
@@ -4578,18 +4623,18 @@ function Po({
|
|
|
4578
4623
|
boxShadow: "var(--lucent-shadow-md)",
|
|
4579
4624
|
overflow: "hidden"
|
|
4580
4625
|
},
|
|
4581
|
-
children: s.map((k,
|
|
4626
|
+
children: s.map((k, M) => /* @__PURE__ */ n(
|
|
4582
4627
|
"div",
|
|
4583
4628
|
{
|
|
4584
4629
|
role: "option",
|
|
4585
4630
|
"aria-selected": !1,
|
|
4586
4631
|
onMouseDown: () => I(k),
|
|
4587
|
-
onMouseEnter: () => u(
|
|
4632
|
+
onMouseEnter: () => u(M),
|
|
4588
4633
|
onMouseLeave: () => u(null),
|
|
4589
4634
|
style: {
|
|
4590
4635
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
4591
4636
|
cursor: "pointer",
|
|
4592
|
-
background: y ===
|
|
4637
|
+
background: y === M ? "var(--lucent-surface-secondary)" : "transparent",
|
|
4593
4638
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
4594
4639
|
},
|
|
4595
4640
|
children: /* @__PURE__ */ n(U, { as: "span", size: "md", children: k.label })
|
|
@@ -4806,32 +4851,32 @@ function $o({
|
|
|
4806
4851
|
selected: T,
|
|
4807
4852
|
media: y
|
|
4808
4853
|
}) {
|
|
4809
|
-
const u = la[e], m = e === "combo", f = i ?? (m ? "md" : u.shadowDefault), { py: C, px: I } = ra[r], x = `${C} ${I}`,
|
|
4854
|
+
const u = la[e], m = e === "combo", f = i ?? (m ? "md" : u.shadowDefault), { py: C, px: I } = ra[r], x = `${C} ${I}`, z = oa[l], P = d != null, k = c != null || P, M = (h ?? !1) && k, W = P ? "a" : k ? "button" : "div", [L, A] = D(!1), [N, q] = D(!1), [$, G] = D(!1), Q = (T ?? !1) && !M, O = Q ? pa : void 0, K = fa(u, T ?? !1, M);
|
|
4810
4855
|
let S;
|
|
4811
|
-
m ? S =
|
|
4812
|
-
const
|
|
4856
|
+
m ? S = O : k && !M ? $ ? S = ue(ua, O) : N ? S = ue(da, O) : L ? S = ue(ca, ve[f], O) : S = ue(ve[f], O) : S = ue(ve[f], O);
|
|
4857
|
+
const F = {
|
|
4813
4858
|
display: "flex",
|
|
4814
4859
|
flexDirection: "column",
|
|
4815
4860
|
background: K,
|
|
4816
4861
|
border: u.border,
|
|
4817
|
-
borderRadius:
|
|
4862
|
+
borderRadius: z,
|
|
4818
4863
|
// Outer box-shadow rings (selected, focus) get clipped by overflow:hidden,
|
|
4819
4864
|
// so we switch to overflow:visible when a ring is active.
|
|
4820
|
-
overflow: Q || k &&
|
|
4865
|
+
overflow: Q || k && N ? "visible" : "hidden",
|
|
4821
4866
|
boxSizing: "border-box",
|
|
4822
4867
|
position: "relative",
|
|
4823
4868
|
...S !== void 0 && { boxShadow: S },
|
|
4824
4869
|
// Interactive transform
|
|
4825
|
-
...k && !
|
|
4826
|
-
...k && !
|
|
4870
|
+
...k && !M && $ && { transform: "translateY(1px)" },
|
|
4871
|
+
...k && !M && L && !$ && { transform: "translateY(-1px)" },
|
|
4827
4872
|
// Interactive base styles
|
|
4828
4873
|
...k && {
|
|
4829
|
-
cursor:
|
|
4874
|
+
cursor: M ? "not-allowed" : "pointer",
|
|
4830
4875
|
outline: "none",
|
|
4831
4876
|
transition: sa
|
|
4832
4877
|
},
|
|
4833
4878
|
// Button UA reset
|
|
4834
|
-
...k && !
|
|
4879
|
+
...k && !P && {
|
|
4835
4880
|
padding: 0,
|
|
4836
4881
|
font: "inherit",
|
|
4837
4882
|
textAlign: "inherit",
|
|
@@ -4839,45 +4884,45 @@ function $o({
|
|
|
4839
4884
|
background: K
|
|
4840
4885
|
},
|
|
4841
4886
|
// Link reset
|
|
4842
|
-
...
|
|
4887
|
+
...P && {
|
|
4843
4888
|
textDecoration: "none",
|
|
4844
4889
|
color: "inherit"
|
|
4845
4890
|
},
|
|
4846
4891
|
// Disabled
|
|
4847
|
-
...
|
|
4892
|
+
...M && {
|
|
4848
4893
|
opacity: 0.6,
|
|
4849
4894
|
pointerEvents: "none"
|
|
4850
4895
|
},
|
|
4851
4896
|
...s
|
|
4852
4897
|
};
|
|
4853
4898
|
return /* @__PURE__ */ v(
|
|
4854
|
-
|
|
4899
|
+
W,
|
|
4855
4900
|
{
|
|
4856
|
-
style:
|
|
4857
|
-
...k && !
|
|
4901
|
+
style: F,
|
|
4902
|
+
...k && !M ? {
|
|
4858
4903
|
onMouseEnter: () => A(!0),
|
|
4859
4904
|
onMouseLeave: () => {
|
|
4860
|
-
A(!1),
|
|
4905
|
+
A(!1), G(!1);
|
|
4861
4906
|
},
|
|
4862
|
-
onMouseDown: () =>
|
|
4863
|
-
onMouseUp: () =>
|
|
4907
|
+
onMouseDown: () => G(!0),
|
|
4908
|
+
onMouseUp: () => G(!1),
|
|
4864
4909
|
onFocus: () => q(!0),
|
|
4865
4910
|
onBlur: () => {
|
|
4866
|
-
q(!1),
|
|
4911
|
+
q(!1), G(!1);
|
|
4867
4912
|
}
|
|
4868
4913
|
} : {},
|
|
4869
|
-
...
|
|
4870
|
-
href:
|
|
4914
|
+
...P && {
|
|
4915
|
+
href: M ? void 0 : d,
|
|
4871
4916
|
...p !== void 0 && { target: p },
|
|
4872
4917
|
...b !== void 0 && { rel: b }
|
|
4873
4918
|
},
|
|
4874
|
-
...!
|
|
4919
|
+
...!P && k && {
|
|
4875
4920
|
type: "button",
|
|
4876
|
-
...
|
|
4921
|
+
...M && { disabled: !0 }
|
|
4877
4922
|
},
|
|
4878
|
-
...c !== void 0 && !
|
|
4923
|
+
...c !== void 0 && !M && { onClick: c },
|
|
4879
4924
|
...k && T !== void 0 && { "aria-pressed": T },
|
|
4880
|
-
...
|
|
4925
|
+
...P && M && { "aria-disabled": !0 },
|
|
4881
4926
|
children: [
|
|
4882
4927
|
y != null && /* @__PURE__ */ n("div", { style: { lineHeight: 0 }, children: y }),
|
|
4883
4928
|
g != null && /* @__PURE__ */ n(
|
|
@@ -4914,7 +4959,7 @@ function $o({
|
|
|
4914
4959
|
...m ? {
|
|
4915
4960
|
background: "var(--lucent-surface)",
|
|
4916
4961
|
border: "1px solid var(--lucent-border-default)",
|
|
4917
|
-
borderRadius:
|
|
4962
|
+
borderRadius: z,
|
|
4918
4963
|
boxShadow: ve[f],
|
|
4919
4964
|
marginLeft: `calc(${I} / 3)`,
|
|
4920
4965
|
marginRight: `calc(${I} / 3)`
|
|
@@ -5677,76 +5722,76 @@ function Yo({ items: e, separator: t = "/", style: a }) {
|
|
|
5677
5722
|
}
|
|
5678
5723
|
function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "underline", style: i }) {
|
|
5679
5724
|
var K;
|
|
5680
|
-
const l = a !== void 0, [s, c] = D(t ?? ((K = e[0]) == null ? void 0 : K.value) ?? ""), d = l ? a : s, [p, b] = D(null), h = j([]), [g, T] = D(null), y = j(!1), u = r === "pills", m = j(null), f = j(null), C = j(null), [I, x] = D(e.length), [
|
|
5681
|
-
if (
|
|
5725
|
+
const l = a !== void 0, [s, c] = D(t ?? ((K = e[0]) == null ? void 0 : K.value) ?? ""), d = l ? a : s, [p, b] = D(null), h = j([]), [g, T] = D(null), y = j(!1), u = r === "pills", m = j(null), f = j(null), C = j(null), [I, x] = D(e.length), [z, P] = D(!1), [k, M] = D(!1), [W, L] = D(null), A = e.slice(0, I), N = e.slice(I), q = N.length > 0, $ = N.some((S) => S.value === d), G = () => {
|
|
5726
|
+
if ($) {
|
|
5682
5727
|
T(null);
|
|
5683
5728
|
return;
|
|
5684
5729
|
}
|
|
5685
|
-
const S = e.findIndex((
|
|
5686
|
-
if (
|
|
5730
|
+
const S = e.findIndex((R, w) => w < I && R.value === d), F = h.current[S];
|
|
5731
|
+
if (F) {
|
|
5687
5732
|
if (u) {
|
|
5688
|
-
const
|
|
5689
|
-
if (!
|
|
5690
|
-
T({ left:
|
|
5733
|
+
const R = F.querySelector("span");
|
|
5734
|
+
if (!R) return;
|
|
5735
|
+
T({ left: R.offsetLeft + F.offsetLeft, width: R.offsetWidth, animate: y.current });
|
|
5691
5736
|
} else
|
|
5692
|
-
T({ left:
|
|
5737
|
+
T({ left: F.offsetLeft, width: F.offsetWidth, animate: y.current });
|
|
5693
5738
|
y.current = !0;
|
|
5694
5739
|
}
|
|
5695
5740
|
};
|
|
5696
5741
|
Ee(() => {
|
|
5697
|
-
|
|
5742
|
+
G(), document.fonts.ready.then(G);
|
|
5698
5743
|
}, [d, I, u]), J(() => {
|
|
5699
5744
|
const S = m.current;
|
|
5700
5745
|
if (!S) return;
|
|
5701
|
-
const
|
|
5702
|
-
const B = S.clientWidth,
|
|
5703
|
-
let X = 0,
|
|
5746
|
+
const F = () => {
|
|
5747
|
+
const B = S.clientWidth, H = 70;
|
|
5748
|
+
let X = 0, _ = 0;
|
|
5704
5749
|
for (let re = 0; re < e.length; re++) {
|
|
5705
5750
|
const le = h.current[re];
|
|
5706
5751
|
if (!le) {
|
|
5707
|
-
|
|
5752
|
+
_++;
|
|
5708
5753
|
continue;
|
|
5709
5754
|
}
|
|
5710
5755
|
const se = le.offsetWidth;
|
|
5711
5756
|
if (re < e.length - 1) {
|
|
5712
|
-
if (X + se +
|
|
5757
|
+
if (X + se + H > B) break;
|
|
5713
5758
|
} else if (X + se > B) break;
|
|
5714
|
-
X += se,
|
|
5759
|
+
X += se, _++;
|
|
5715
5760
|
}
|
|
5716
|
-
if (
|
|
5761
|
+
if (_ >= e.length - 1 && _ < e.length) {
|
|
5717
5762
|
let re = 0;
|
|
5718
5763
|
for (let le = 0; le < e.length; le++) {
|
|
5719
5764
|
const se = h.current[le];
|
|
5720
5765
|
se && (re += se.offsetWidth);
|
|
5721
5766
|
}
|
|
5722
|
-
re <= B && (
|
|
5767
|
+
re <= B && (_ = e.length);
|
|
5723
5768
|
}
|
|
5724
|
-
x(
|
|
5769
|
+
x(_ < 1 ? 1 : _);
|
|
5725
5770
|
};
|
|
5726
|
-
let
|
|
5771
|
+
let R;
|
|
5727
5772
|
(() => {
|
|
5728
|
-
|
|
5729
|
-
|
|
5773
|
+
R = requestAnimationFrame(() => {
|
|
5774
|
+
R = requestAnimationFrame(F);
|
|
5730
5775
|
});
|
|
5731
5776
|
})();
|
|
5732
|
-
const E = new ResizeObserver(
|
|
5777
|
+
const E = new ResizeObserver(F);
|
|
5733
5778
|
return E.observe(S), () => {
|
|
5734
|
-
E.disconnect(), cancelAnimationFrame(
|
|
5779
|
+
E.disconnect(), cancelAnimationFrame(R);
|
|
5735
5780
|
};
|
|
5736
5781
|
}, [e]), J(() => {
|
|
5737
|
-
if (!
|
|
5738
|
-
const S = (
|
|
5739
|
-
C.current && !C.current.contains(
|
|
5782
|
+
if (!z) return;
|
|
5783
|
+
const S = (F) => {
|
|
5784
|
+
C.current && !C.current.contains(F.target) && f.current && !f.current.contains(F.target) && (P(!1), L(null));
|
|
5740
5785
|
};
|
|
5741
5786
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
5742
|
-
}, [
|
|
5787
|
+
}, [z]);
|
|
5743
5788
|
const Q = (S) => {
|
|
5744
5789
|
l || c(S), o == null || o(S);
|
|
5745
|
-
},
|
|
5790
|
+
}, O = (S, F) => {
|
|
5746
5791
|
var B;
|
|
5747
|
-
const
|
|
5792
|
+
const R = A.map((H, X) => H.disabled ? -1 : X).filter((H) => H !== -1), w = R.indexOf(F);
|
|
5748
5793
|
let E = -1;
|
|
5749
|
-
S.key === "ArrowRight" && (E =
|
|
5794
|
+
S.key === "ArrowRight" && (E = R[(w + 1) % R.length] ?? -1), S.key === "ArrowLeft" && (E = R[(w - 1 + R.length) % R.length] ?? -1), S.key === "Home" && (E = R[0] ?? -1), S.key === "End" && (E = R[R.length - 1] ?? -1), E !== -1 && (S.preventDefault(), (B = h.current[E]) == null || B.focus(), Q(A[E].value));
|
|
5750
5795
|
};
|
|
5751
5796
|
return /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...i }, children: [
|
|
5752
5797
|
/* @__PURE__ */ v(
|
|
@@ -5765,26 +5810,26 @@ function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "und
|
|
|
5765
5810
|
}
|
|
5766
5811
|
},
|
|
5767
5812
|
children: [
|
|
5768
|
-
e.map((S,
|
|
5769
|
-
const
|
|
5813
|
+
e.map((S, F) => {
|
|
5814
|
+
const R = F < I, w = S.value === d, E = S.disabled ?? !1;
|
|
5770
5815
|
return /* @__PURE__ */ v(
|
|
5771
5816
|
"button",
|
|
5772
5817
|
{
|
|
5773
5818
|
ref: (B) => {
|
|
5774
|
-
h.current[
|
|
5819
|
+
h.current[F] = B;
|
|
5775
5820
|
},
|
|
5776
5821
|
role: "tab",
|
|
5777
5822
|
"aria-selected": w,
|
|
5778
5823
|
"aria-controls": `lucent-tabpanel-${S.value}`,
|
|
5779
5824
|
id: `lucent-tab-${S.value}`,
|
|
5780
5825
|
disabled: E,
|
|
5781
|
-
tabIndex: w &&
|
|
5826
|
+
tabIndex: w && R ? 0 : -1,
|
|
5782
5827
|
onClick: () => {
|
|
5783
5828
|
E || Q(S.value);
|
|
5784
5829
|
},
|
|
5785
|
-
onKeyDown: (B) =>
|
|
5830
|
+
onKeyDown: (B) => O(B, F),
|
|
5786
5831
|
onMouseEnter: () => {
|
|
5787
|
-
!E &&
|
|
5832
|
+
!E && R && b(F);
|
|
5788
5833
|
},
|
|
5789
5834
|
onMouseLeave: () => b(null),
|
|
5790
5835
|
style: {
|
|
@@ -5799,20 +5844,20 @@ function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "und
|
|
|
5799
5844
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
5800
5845
|
whiteSpace: "nowrap",
|
|
5801
5846
|
outline: "none",
|
|
5802
|
-
position:
|
|
5847
|
+
position: R ? "relative" : "absolute",
|
|
5803
5848
|
zIndex: w ? 1 : 0,
|
|
5804
5849
|
// Hidden overflow tabs are positioned off-screen for measurement
|
|
5805
|
-
...
|
|
5850
|
+
...R ? {} : { visibility: "hidden", pointerEvents: "none", left: -9999 }
|
|
5806
5851
|
},
|
|
5807
5852
|
children: [
|
|
5808
5853
|
/* @__PURE__ */ n("span", { style: {
|
|
5809
5854
|
display: "block",
|
|
5810
5855
|
padding: "var(--lucent-space-1) var(--lucent-space-3)",
|
|
5811
5856
|
borderRadius: "var(--lucent-radius-md)",
|
|
5812
|
-
background: !u && p ===
|
|
5857
|
+
background: !u && p === F && !w && !E ? "var(--lucent-surface-secondary)" : "transparent",
|
|
5813
5858
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
5814
5859
|
}, children: S.label }),
|
|
5815
|
-
u && p ===
|
|
5860
|
+
u && p === F && !w && !E && R && /* @__PURE__ */ n(
|
|
5816
5861
|
"span",
|
|
5817
5862
|
{
|
|
5818
5863
|
"aria-hidden": !0,
|
|
@@ -5838,9 +5883,9 @@ function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "und
|
|
|
5838
5883
|
"button",
|
|
5839
5884
|
{
|
|
5840
5885
|
ref: f,
|
|
5841
|
-
onClick: () =>
|
|
5842
|
-
onMouseEnter: () =>
|
|
5843
|
-
onMouseLeave: () =>
|
|
5886
|
+
onClick: () => P((S) => !S),
|
|
5887
|
+
onMouseEnter: () => M(!0),
|
|
5888
|
+
onMouseLeave: () => M(!1),
|
|
5844
5889
|
style: {
|
|
5845
5890
|
padding: u ? "var(--lucent-space-1) var(--lucent-space-2)" : "var(--lucent-space-1) var(--lucent-space-2) var(--lucent-space-3)",
|
|
5846
5891
|
background: "none",
|
|
@@ -5848,8 +5893,8 @@ function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "und
|
|
|
5848
5893
|
cursor: "pointer",
|
|
5849
5894
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5850
5895
|
fontSize: "var(--lucent-font-size-md)",
|
|
5851
|
-
fontWeight:
|
|
5852
|
-
color:
|
|
5896
|
+
fontWeight: $ ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
5897
|
+
color: $ ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
5853
5898
|
whiteSpace: "nowrap",
|
|
5854
5899
|
outline: "none",
|
|
5855
5900
|
position: "relative",
|
|
@@ -5892,7 +5937,7 @@ function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "und
|
|
|
5892
5937
|
]
|
|
5893
5938
|
}
|
|
5894
5939
|
),
|
|
5895
|
-
q &&
|
|
5940
|
+
q && z && /* @__PURE__ */ n(
|
|
5896
5941
|
"div",
|
|
5897
5942
|
{
|
|
5898
5943
|
ref: C,
|
|
@@ -5909,30 +5954,30 @@ function Ko({ tabs: e, defaultValue: t, value: a, onChange: o, variant: r = "und
|
|
|
5909
5954
|
padding: "var(--lucent-space-1) 0",
|
|
5910
5955
|
minWidth: 140
|
|
5911
5956
|
},
|
|
5912
|
-
children:
|
|
5913
|
-
const
|
|
5957
|
+
children: N.map((S, F) => {
|
|
5958
|
+
const R = S.value === d, w = S.disabled ?? !1, E = W === F;
|
|
5914
5959
|
return /* @__PURE__ */ n(
|
|
5915
5960
|
"button",
|
|
5916
5961
|
{
|
|
5917
5962
|
disabled: w,
|
|
5918
5963
|
onClick: () => {
|
|
5919
|
-
w || (Q(S.value),
|
|
5964
|
+
w || (Q(S.value), P(!1));
|
|
5920
5965
|
},
|
|
5921
5966
|
onMouseEnter: () => {
|
|
5922
|
-
w || L(
|
|
5967
|
+
w || L(F);
|
|
5923
5968
|
},
|
|
5924
5969
|
onMouseLeave: () => L(null),
|
|
5925
5970
|
style: {
|
|
5926
5971
|
display: "block",
|
|
5927
5972
|
width: "100%",
|
|
5928
5973
|
padding: "var(--lucent-space-2) var(--lucent-space-4)",
|
|
5929
|
-
background:
|
|
5974
|
+
background: R || E ? "var(--lucent-surface-secondary)" : "none",
|
|
5930
5975
|
border: "none",
|
|
5931
5976
|
cursor: w ? "not-allowed" : "pointer",
|
|
5932
5977
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5933
5978
|
fontSize: "var(--lucent-font-size-md)",
|
|
5934
|
-
fontWeight:
|
|
5935
|
-
color: w ? "var(--lucent-text-disabled)" :
|
|
5979
|
+
fontWeight: R ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
5980
|
+
color: w ? "var(--lucent-text-disabled)" : R || E ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
5936
5981
|
textAlign: "left",
|
|
5937
5982
|
outline: "none",
|
|
5938
5983
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), color var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
@@ -6226,32 +6271,32 @@ function Zo({
|
|
|
6226
6271
|
emptyState: l,
|
|
6227
6272
|
style: s
|
|
6228
6273
|
}) {
|
|
6229
|
-
const [c, d] = D(null), [p, b] = D(0), [h, g] = D(null), [T, y] = D({}), u = o !== void 0, m = u ? o : p, f = e.some((A) => A.filterable), C = f ? t.filter((A) => e.every((
|
|
6230
|
-
if (!
|
|
6231
|
-
const q = T[
|
|
6274
|
+
const [c, d] = D(null), [p, b] = D(0), [h, g] = D(null), [T, y] = D({}), u = o !== void 0, m = u ? o : p, f = e.some((A) => A.filterable), C = f ? t.filter((A) => e.every((N) => {
|
|
6275
|
+
if (!N.filterable) return !0;
|
|
6276
|
+
const q = T[N.key];
|
|
6232
6277
|
if (!q || q.length === 0) return !0;
|
|
6233
|
-
const
|
|
6234
|
-
return q.includes(
|
|
6235
|
-
})) : t, I = c ? [...C].sort((A,
|
|
6236
|
-
const q = A[c.key],
|
|
6237
|
-
return c.dir === "asc" ?
|
|
6238
|
-
}) : C, x = a > 0 ? I.slice(m * a, (m + 1) * a) : I,
|
|
6278
|
+
const $ = String(A[N.key] ?? "");
|
|
6279
|
+
return q.includes($);
|
|
6280
|
+
})) : t, I = c ? [...C].sort((A, N) => {
|
|
6281
|
+
const q = A[c.key], $ = N[c.key], G = String(q ?? "").localeCompare(String($ ?? ""), void 0, { numeric: !0 });
|
|
6282
|
+
return c.dir === "asc" ? G : -G;
|
|
6283
|
+
}) : C, x = a > 0 ? I.slice(m * a, (m + 1) * a) : I, z = a > 0 ? Math.max(1, Math.ceil(I.length / a)) : 1, P = (A) => {
|
|
6239
6284
|
u || b(A), r == null || r(A);
|
|
6240
6285
|
}, k = (A) => {
|
|
6241
|
-
d((
|
|
6242
|
-
},
|
|
6243
|
-
const q = { ...T, [A]:
|
|
6244
|
-
|
|
6245
|
-
},
|
|
6286
|
+
d((N) => !N || N.key !== A ? { key: A, dir: "asc" } : N.dir === "asc" ? { key: A, dir: "desc" } : null), u || b(0), r == null || r(0);
|
|
6287
|
+
}, M = (A, N) => {
|
|
6288
|
+
const q = { ...T, [A]: N };
|
|
6289
|
+
N.length === 0 && delete q[A], y(q), u || b(0), r == null || r(0), i == null || i(q);
|
|
6290
|
+
}, W = () => {
|
|
6246
6291
|
y({}), u || b(0), r == null || r(0), i == null || i({});
|
|
6247
6292
|
}, L = [];
|
|
6248
|
-
if (
|
|
6249
|
-
for (let A = 0; A <
|
|
6293
|
+
if (z <= 7)
|
|
6294
|
+
for (let A = 0; A < z; A++) L.push(A);
|
|
6250
6295
|
else {
|
|
6251
6296
|
L.push(0), m > 2 && L.push("…");
|
|
6252
|
-
for (let A = Math.max(1, m - 1); A <= Math.min(
|
|
6297
|
+
for (let A = Math.max(1, m - 1); A <= Math.min(z - 2, m + 1); A++)
|
|
6253
6298
|
L.push(A);
|
|
6254
|
-
m <
|
|
6299
|
+
m < z - 3 && L.push("…"), L.push(z - 1);
|
|
6255
6300
|
}
|
|
6256
6301
|
return /* @__PURE__ */ v("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
6257
6302
|
f && /* @__PURE__ */ n("div", { style: { position: "relative", zIndex: 1 }, children: /* @__PURE__ */ n(
|
|
@@ -6260,8 +6305,8 @@ function Zo({
|
|
|
6260
6305
|
columns: e,
|
|
6261
6306
|
rows: t,
|
|
6262
6307
|
filters: T,
|
|
6263
|
-
onFilter:
|
|
6264
|
-
onClearAll:
|
|
6308
|
+
onFilter: M,
|
|
6309
|
+
onClearAll: W
|
|
6265
6310
|
}
|
|
6266
6311
|
) }),
|
|
6267
6312
|
/* @__PURE__ */ n("div", { style: {
|
|
@@ -6275,7 +6320,7 @@ function Zo({
|
|
|
6275
6320
|
fontSize: "var(--lucent-font-size-sm)"
|
|
6276
6321
|
}, children: [
|
|
6277
6322
|
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { style: { borderBottom: "1px solid var(--lucent-border-default)" }, children: e.map((A) => {
|
|
6278
|
-
const
|
|
6323
|
+
const N = (c == null ? void 0 : c.key) === A.key ? c.dir : "none";
|
|
6279
6324
|
return /* @__PURE__ */ n(
|
|
6280
6325
|
"th",
|
|
6281
6326
|
{
|
|
@@ -6294,7 +6339,7 @@ function Zo({
|
|
|
6294
6339
|
},
|
|
6295
6340
|
children: /* @__PURE__ */ v("span", { style: { display: "inline-flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6296
6341
|
A.header,
|
|
6297
|
-
A.sortable && /* @__PURE__ */ n(Da, { state:
|
|
6342
|
+
A.sortable && /* @__PURE__ */ n(Da, { state: N })
|
|
6298
6343
|
] })
|
|
6299
6344
|
},
|
|
6300
6345
|
A.key
|
|
@@ -6307,14 +6352,14 @@ function Zo({
|
|
|
6307
6352
|
style: { padding: "var(--lucent-space-12)", textAlign: "center" },
|
|
6308
6353
|
children: l ?? /* @__PURE__ */ n(U, { color: "secondary", children: "No data" })
|
|
6309
6354
|
}
|
|
6310
|
-
) }) : x.map((A,
|
|
6355
|
+
) }) : x.map((A, N) => /* @__PURE__ */ n(
|
|
6311
6356
|
"tr",
|
|
6312
6357
|
{
|
|
6313
|
-
onMouseEnter: () => g(
|
|
6358
|
+
onMouseEnter: () => g(N),
|
|
6314
6359
|
onMouseLeave: () => g(null),
|
|
6315
6360
|
style: {
|
|
6316
|
-
borderBottom:
|
|
6317
|
-
background: h ===
|
|
6361
|
+
borderBottom: N < x.length - 1 ? "1px solid var(--lucent-border-subtle)" : "none",
|
|
6362
|
+
background: h === N ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
6318
6363
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
6319
6364
|
},
|
|
6320
6365
|
children: e.map((q) => /* @__PURE__ */ n(
|
|
@@ -6326,12 +6371,12 @@ function Zo({
|
|
|
6326
6371
|
textAlign: q.align ?? "left",
|
|
6327
6372
|
verticalAlign: "middle"
|
|
6328
6373
|
},
|
|
6329
|
-
children: q.render ? q.render(A,
|
|
6374
|
+
children: q.render ? q.render(A, N) : String(A[q.key] ?? "")
|
|
6330
6375
|
},
|
|
6331
6376
|
q.key
|
|
6332
6377
|
))
|
|
6333
6378
|
},
|
|
6334
|
-
|
|
6379
|
+
N
|
|
6335
6380
|
)) })
|
|
6336
6381
|
] }) }),
|
|
6337
6382
|
a > 0 && I.length > 0 && /* @__PURE__ */ v("div", { style: {
|
|
@@ -6346,21 +6391,21 @@ function Zo({
|
|
|
6346
6391
|
/* @__PURE__ */ n(
|
|
6347
6392
|
Re,
|
|
6348
6393
|
{
|
|
6349
|
-
onClick: () =>
|
|
6394
|
+
onClick: () => P(m - 1),
|
|
6350
6395
|
disabled: m === 0,
|
|
6351
6396
|
"aria-label": "Previous page",
|
|
6352
6397
|
children: /* @__PURE__ */ n(nt, { dir: "left" })
|
|
6353
6398
|
}
|
|
6354
6399
|
),
|
|
6355
6400
|
L.map(
|
|
6356
|
-
(A,
|
|
6401
|
+
(A, N) => A === "…" ? /* @__PURE__ */ n("span", { style: {
|
|
6357
6402
|
padding: "0 var(--lucent-space-1)",
|
|
6358
6403
|
color: "var(--lucent-text-disabled)",
|
|
6359
6404
|
fontSize: "var(--lucent-font-size-sm)"
|
|
6360
|
-
}, children: "…" }, `ellipsis-${
|
|
6405
|
+
}, children: "…" }, `ellipsis-${N}`) : /* @__PURE__ */ n(
|
|
6361
6406
|
Re,
|
|
6362
6407
|
{
|
|
6363
|
-
onClick: () =>
|
|
6408
|
+
onClick: () => P(A),
|
|
6364
6409
|
active: A === m,
|
|
6365
6410
|
"aria-label": `Page ${A + 1}`,
|
|
6366
6411
|
"aria-current": A === m ? "page" : void 0,
|
|
@@ -6372,8 +6417,8 @@ function Zo({
|
|
|
6372
6417
|
/* @__PURE__ */ n(
|
|
6373
6418
|
Re,
|
|
6374
6419
|
{
|
|
6375
|
-
onClick: () =>
|
|
6376
|
-
disabled: m >=
|
|
6420
|
+
onClick: () => P(m + 1),
|
|
6421
|
+
disabled: m >= z - 1,
|
|
6377
6422
|
"aria-label": "Next page",
|
|
6378
6423
|
children: /* @__PURE__ */ n(nt, { dir: "right" })
|
|
6379
6424
|
}
|
|
@@ -6796,8 +6841,8 @@ function ei({
|
|
|
6796
6841
|
l || c(k), r == null || r(k);
|
|
6797
6842
|
}, [l, r]);
|
|
6798
6843
|
J(() => {
|
|
6799
|
-
const k = (
|
|
6800
|
-
(
|
|
6844
|
+
const k = (M) => {
|
|
6845
|
+
(M.metaKey || M.ctrlKey) && M.key === a && (M.preventDefault(), m(!d));
|
|
6801
6846
|
};
|
|
6802
6847
|
return window.addEventListener("keydown", k), () => window.removeEventListener("keydown", k);
|
|
6803
6848
|
}, [d, a, m]), J(() => {
|
|
@@ -6810,8 +6855,8 @@ function ei({
|
|
|
6810
6855
|
J(() => {
|
|
6811
6856
|
const k = y.current;
|
|
6812
6857
|
if (!k) return;
|
|
6813
|
-
const
|
|
6814
|
-
|
|
6858
|
+
const M = k.querySelector('[data-active="true"]');
|
|
6859
|
+
M == null || M.scrollIntoView({ block: "nearest" });
|
|
6815
6860
|
}, [h]);
|
|
6816
6861
|
const I = (k) => {
|
|
6817
6862
|
k.disabled || (k.onSelect(), m(!1));
|
|
@@ -6820,17 +6865,17 @@ function ei({
|
|
|
6820
6865
|
m(!1);
|
|
6821
6866
|
return;
|
|
6822
6867
|
}
|
|
6823
|
-
if (k.key === "ArrowDown" && (k.preventDefault(), g((
|
|
6824
|
-
const
|
|
6825
|
-
|
|
6868
|
+
if (k.key === "ArrowDown" && (k.preventDefault(), g((M) => Math.min(M + 1, C.length - 1))), k.key === "ArrowUp" && (k.preventDefault(), g((M) => Math.max(M - 1, 0))), k.key === "Enter") {
|
|
6869
|
+
const M = C[h];
|
|
6870
|
+
M && I(M);
|
|
6826
6871
|
}
|
|
6827
|
-
},
|
|
6872
|
+
}, z = [];
|
|
6828
6873
|
for (const k of f) {
|
|
6829
|
-
const
|
|
6830
|
-
|
|
6874
|
+
const M = z[z.length - 1];
|
|
6875
|
+
M && M.group === k.group ? M.items.push(k) : z.push({ group: k.group, items: [k] });
|
|
6831
6876
|
}
|
|
6832
6877
|
if (!d) return null;
|
|
6833
|
-
let
|
|
6878
|
+
let P = 0;
|
|
6834
6879
|
return /* @__PURE__ */ n(
|
|
6835
6880
|
"div",
|
|
6836
6881
|
{
|
|
@@ -6927,21 +6972,21 @@ function ei({
|
|
|
6927
6972
|
'No results for "',
|
|
6928
6973
|
p,
|
|
6929
6974
|
'"'
|
|
6930
|
-
] }) }) :
|
|
6975
|
+
] }) }) : z.map(({ group: k, items: M }, W) => /* @__PURE__ */ v("div", { children: [
|
|
6931
6976
|
k && /* @__PURE__ */ n("div", { style: {
|
|
6932
6977
|
padding: "var(--lucent-space-2) var(--lucent-space-4) var(--lucent-space-1)",
|
|
6933
|
-
...
|
|
6978
|
+
...W > 0 ? { borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-1)" } : {}
|
|
6934
6979
|
}, children: /* @__PURE__ */ n(U, { size: "xs", color: "secondary", weight: "medium", children: k }) }),
|
|
6935
|
-
|
|
6980
|
+
M.map((L) => {
|
|
6936
6981
|
const A = L.disabled ?? !1;
|
|
6937
|
-
let
|
|
6938
|
-
return A || (
|
|
6982
|
+
let N = !1;
|
|
6983
|
+
return A || (N = P === h, P++), /* @__PURE__ */ v(
|
|
6939
6984
|
"div",
|
|
6940
6985
|
{
|
|
6941
6986
|
role: "option",
|
|
6942
|
-
"aria-selected":
|
|
6987
|
+
"aria-selected": N,
|
|
6943
6988
|
"aria-disabled": A,
|
|
6944
|
-
"data-active":
|
|
6989
|
+
"data-active": N,
|
|
6945
6990
|
onClick: () => I(L),
|
|
6946
6991
|
onMouseEnter: () => {
|
|
6947
6992
|
if (!A) {
|
|
@@ -6955,7 +7000,7 @@ function ei({
|
|
|
6955
7000
|
gap: "var(--lucent-space-3)",
|
|
6956
7001
|
padding: "var(--lucent-space-2) var(--lucent-space-4)",
|
|
6957
7002
|
cursor: A ? "not-allowed" : "pointer",
|
|
6958
|
-
background:
|
|
7003
|
+
background: N ? "var(--lucent-surface-secondary)" : "transparent",
|
|
6959
7004
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
6960
7005
|
opacity: A ? 0.5 : 1
|
|
6961
7006
|
},
|
|
@@ -6970,7 +7015,7 @@ function ei({
|
|
|
6970
7015
|
L.id
|
|
6971
7016
|
);
|
|
6972
7017
|
})
|
|
6973
|
-
] },
|
|
7018
|
+
] }, W))
|
|
6974
7019
|
}
|
|
6975
7020
|
),
|
|
6976
7021
|
/* @__PURE__ */ n("div", { style: {
|
|
@@ -6983,7 +7028,7 @@ function ei({
|
|
|
6983
7028
|
["↑↓", "Navigate"],
|
|
6984
7029
|
["↵", "Select"],
|
|
6985
7030
|
["Esc", "Close"]
|
|
6986
|
-
].map(([k,
|
|
7031
|
+
].map(([k, M]) => /* @__PURE__ */ v("span", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
6987
7032
|
/* @__PURE__ */ n("kbd", { style: {
|
|
6988
7033
|
padding: "1px 5px",
|
|
6989
7034
|
borderRadius: "var(--lucent-radius-sm)",
|
|
@@ -6993,7 +7038,7 @@ function ei({
|
|
|
6993
7038
|
fontSize: "var(--lucent-font-size-xs)",
|
|
6994
7039
|
color: "var(--lucent-text-secondary)"
|
|
6995
7040
|
}, children: k }),
|
|
6996
|
-
/* @__PURE__ */ n(U, { size: "xs", color: "secondary", children:
|
|
7041
|
+
/* @__PURE__ */ n(U, { size: "xs", color: "secondary", children: M })
|
|
6997
7042
|
] }, k)) })
|
|
6998
7043
|
]
|
|
6999
7044
|
}
|
|
@@ -7118,35 +7163,35 @@ function ni({
|
|
|
7118
7163
|
errorText: p,
|
|
7119
7164
|
style: b
|
|
7120
7165
|
}) {
|
|
7121
|
-
const h = t !== void 0, [g, T] = D(a), y = h ? t : g, [u, m] = D(!1), [f, C] = D(""), [I, x] = D(0), [
|
|
7166
|
+
const h = t !== void 0, [g, T] = D(a), y = h ? t : g, [u, m] = D(!1), [f, C] = D(""), [I, x] = D(0), [z, P] = D(!1), k = j(null), M = j(null), W = Ce();
|
|
7122
7167
|
J(() => {
|
|
7123
7168
|
if (!u) return;
|
|
7124
|
-
const S = (
|
|
7125
|
-
var
|
|
7126
|
-
(
|
|
7169
|
+
const S = (F) => {
|
|
7170
|
+
var R;
|
|
7171
|
+
(R = k.current) != null && R.contains(F.target) || (m(!1), C(""));
|
|
7127
7172
|
};
|
|
7128
7173
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
7129
7174
|
}, [u]);
|
|
7130
7175
|
const L = (S) => {
|
|
7131
|
-
const
|
|
7132
|
-
h || T(
|
|
7176
|
+
const F = y.includes(S) ? y.filter((R) => R !== S) : l !== void 0 && y.length >= l ? y : [...y, S];
|
|
7177
|
+
h || T(F), o == null || o(F);
|
|
7133
7178
|
}, A = (S) => {
|
|
7134
|
-
const
|
|
7135
|
-
h || T(
|
|
7136
|
-
},
|
|
7179
|
+
const F = y.filter((R) => R !== S);
|
|
7180
|
+
h || T(F), o == null || o(F);
|
|
7181
|
+
}, N = e.filter(
|
|
7137
7182
|
(S) => S.label.toLowerCase().includes(f.toLowerCase())
|
|
7138
7183
|
), q = (S) => {
|
|
7139
7184
|
if (S.key === "Escape") {
|
|
7140
7185
|
m(!1), C("");
|
|
7141
7186
|
return;
|
|
7142
7187
|
}
|
|
7143
|
-
if (S.key === "ArrowDown" && (S.preventDefault(), m(!0), x((
|
|
7188
|
+
if (S.key === "ArrowDown" && (S.preventDefault(), m(!0), x((F) => Math.min(F + 1, N.length - 1))), S.key === "ArrowUp" && (S.preventDefault(), x((F) => Math.max(F - 1, 0))), S.key === "Enter") {
|
|
7144
7189
|
S.preventDefault();
|
|
7145
|
-
const
|
|
7146
|
-
|
|
7190
|
+
const F = N[I];
|
|
7191
|
+
F && !F.disabled && L(F.value);
|
|
7147
7192
|
}
|
|
7148
7193
|
S.key === "Backspace" && f === "" && y.length > 0 && A(y[y.length - 1]);
|
|
7149
|
-
},
|
|
7194
|
+
}, $ = l !== void 0 && y.length >= l, G = !!p, Q = i ? "var(--lucent-border-default)" : G ? "var(--lucent-danger-default)" : z ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", O = z ? `0 0 0 3px ${G ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", K = `lucent-multiselect-${Ce()}`;
|
|
7150
7195
|
return /* @__PURE__ */ v("div", { ref: k, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...b }, children: [
|
|
7151
7196
|
c && /* @__PURE__ */ n(
|
|
7152
7197
|
"label",
|
|
@@ -7167,7 +7212,7 @@ function ni({
|
|
|
7167
7212
|
{
|
|
7168
7213
|
onClick: () => {
|
|
7169
7214
|
var S;
|
|
7170
|
-
i || (m(!0), (S =
|
|
7215
|
+
i || (m(!0), (S = M.current) == null || S.focus());
|
|
7171
7216
|
},
|
|
7172
7217
|
style: {
|
|
7173
7218
|
display: "flex",
|
|
@@ -7182,31 +7227,31 @@ function ni({
|
|
|
7182
7227
|
background: i ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
7183
7228
|
cursor: i ? "not-allowed" : "text",
|
|
7184
7229
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
7185
|
-
boxShadow:
|
|
7230
|
+
boxShadow: O
|
|
7186
7231
|
},
|
|
7187
7232
|
children: [
|
|
7188
7233
|
y.map((S) => {
|
|
7189
|
-
const
|
|
7190
|
-
return
|
|
7234
|
+
const F = e.find((R) => R.value === S);
|
|
7235
|
+
return F ? /* @__PURE__ */ n(Qt, { size: Ra[s], onDismiss: () => A(S), disabled: i, children: F.label }, S) : null;
|
|
7191
7236
|
}),
|
|
7192
7237
|
/* @__PURE__ */ n(
|
|
7193
7238
|
"input",
|
|
7194
7239
|
{
|
|
7195
7240
|
id: K,
|
|
7196
|
-
ref:
|
|
7241
|
+
ref: M,
|
|
7197
7242
|
value: f,
|
|
7198
7243
|
onChange: (S) => {
|
|
7199
7244
|
C(S.target.value), m(!0), x(0);
|
|
7200
7245
|
},
|
|
7201
7246
|
onKeyDown: q,
|
|
7202
|
-
onFocus: () =>
|
|
7203
|
-
onBlur: () =>
|
|
7247
|
+
onFocus: () => P(!0),
|
|
7248
|
+
onBlur: () => P(!1),
|
|
7204
7249
|
disabled: i,
|
|
7205
7250
|
placeholder: y.length === 0 ? r : "",
|
|
7206
7251
|
"aria-autocomplete": "list",
|
|
7207
|
-
"aria-controls":
|
|
7252
|
+
"aria-controls": W,
|
|
7208
7253
|
"aria-expanded": u,
|
|
7209
|
-
"aria-describedby":
|
|
7254
|
+
"aria-describedby": G ? `${K}-error` : d ? `${K}-helper` : void 0,
|
|
7210
7255
|
role: "combobox",
|
|
7211
7256
|
style: {
|
|
7212
7257
|
flex: "1 1 80px",
|
|
@@ -7228,7 +7273,7 @@ function ni({
|
|
|
7228
7273
|
u && !i && /* @__PURE__ */ v(
|
|
7229
7274
|
"div",
|
|
7230
7275
|
{
|
|
7231
|
-
id:
|
|
7276
|
+
id: W,
|
|
7232
7277
|
role: "listbox",
|
|
7233
7278
|
"aria-multiselectable": "true",
|
|
7234
7279
|
style: {
|
|
@@ -7246,18 +7291,18 @@ function ni({
|
|
|
7246
7291
|
padding: xe[s]
|
|
7247
7292
|
},
|
|
7248
7293
|
children: [
|
|
7249
|
-
|
|
7250
|
-
const
|
|
7294
|
+
N.length === 0 ? /* @__PURE__ */ n("div", { style: { padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ n(U, { color: "secondary", size: "sm", children: "No options" }) }) : N.map((S, F) => {
|
|
7295
|
+
const R = y.includes(S.value), w = F === I, E = S.disabled ?? !1, B = $ && !R;
|
|
7251
7296
|
return /* @__PURE__ */ v(
|
|
7252
7297
|
"div",
|
|
7253
7298
|
{
|
|
7254
7299
|
role: "option",
|
|
7255
|
-
"aria-selected":
|
|
7300
|
+
"aria-selected": R,
|
|
7256
7301
|
"aria-disabled": E || B,
|
|
7257
7302
|
onClick: () => {
|
|
7258
7303
|
!E && !B && L(S.value);
|
|
7259
7304
|
},
|
|
7260
|
-
onMouseEnter: () => x(
|
|
7305
|
+
onMouseEnter: () => x(F),
|
|
7261
7306
|
style: {
|
|
7262
7307
|
display: "flex",
|
|
7263
7308
|
alignItems: "center",
|
|
@@ -7272,7 +7317,7 @@ function ni({
|
|
|
7272
7317
|
/* @__PURE__ */ n(
|
|
7273
7318
|
dt,
|
|
7274
7319
|
{
|
|
7275
|
-
checked:
|
|
7320
|
+
checked: R,
|
|
7276
7321
|
disabled: E || B,
|
|
7277
7322
|
size: s,
|
|
7278
7323
|
style: { margin: 0, pointerEvents: "none" },
|
|
@@ -7286,7 +7331,7 @@ function ni({
|
|
|
7286
7331
|
S.value
|
|
7287
7332
|
);
|
|
7288
7333
|
}),
|
|
7289
|
-
|
|
7334
|
+
$ && /* @__PURE__ */ n("div", { style: {
|
|
7290
7335
|
padding: "var(--lucent-space-2)",
|
|
7291
7336
|
borderTop: "1px solid var(--lucent-border-subtle)"
|
|
7292
7337
|
}, children: /* @__PURE__ */ v(U, { size: "xs", color: "secondary", children: [
|
|
@@ -7298,7 +7343,7 @@ function ni({
|
|
|
7298
7343
|
}
|
|
7299
7344
|
)
|
|
7300
7345
|
] }),
|
|
7301
|
-
|
|
7346
|
+
G && /* @__PURE__ */ n(
|
|
7302
7347
|
"span",
|
|
7303
7348
|
{
|
|
7304
7349
|
id: `${K}-error`,
|
|
@@ -7311,7 +7356,7 @@ function ni({
|
|
|
7311
7356
|
children: p
|
|
7312
7357
|
}
|
|
7313
7358
|
),
|
|
7314
|
-
!
|
|
7359
|
+
!G && d && /* @__PURE__ */ n(
|
|
7315
7360
|
"span",
|
|
7316
7361
|
{
|
|
7317
7362
|
id: `${K}-helper`,
|
|
@@ -7548,8 +7593,8 @@ function He({
|
|
|
7548
7593
|
/* @__PURE__ */ n("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: y.map((u, m) => {
|
|
7549
7594
|
if (!u) return /* @__PURE__ */ n("div", {}, m);
|
|
7550
7595
|
const f = new Date(e, t, u), C = a ? Ie(f, a) : !1, I = Ie(f, o), x = (r ? Me(f, r) : !1) || (i ? at(f, i) : !1);
|
|
7551
|
-
let
|
|
7552
|
-
return d != null && d.start && (d != null && d.end) && (
|
|
7596
|
+
let z = !1;
|
|
7597
|
+
return d != null && d.start && (d != null && d.end) && (z = !Me(f, d.start) && !at(f, d.end)), /* @__PURE__ */ n(
|
|
7553
7598
|
"button",
|
|
7554
7599
|
{
|
|
7555
7600
|
type: "button",
|
|
@@ -7571,7 +7616,7 @@ function He({
|
|
|
7571
7616
|
width: "100%",
|
|
7572
7617
|
border: I && !C ? "1px solid var(--lucent-border-strong)" : "1px solid transparent",
|
|
7573
7618
|
borderRadius: "var(--lucent-radius-md)",
|
|
7574
|
-
background: C ? "var(--lucent-accent-default)" :
|
|
7619
|
+
background: C ? "var(--lucent-accent-default)" : z ? "var(--lucent-accent-subtle)" : g === u && !x ? "var(--lucent-surface-secondary)" : "transparent",
|
|
7575
7620
|
color: C ? "var(--lucent-text-on-accent)" : x ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
7576
7621
|
fontSize: "var(--lucent-font-size-sm)",
|
|
7577
7622
|
fontFamily: "var(--lucent-font-family-base)",
|
|
@@ -7600,22 +7645,22 @@ function ri({
|
|
|
7600
7645
|
errorText: p,
|
|
7601
7646
|
style: b
|
|
7602
7647
|
}) {
|
|
7603
|
-
const h = e !== void 0, [g, T] = D(t), y = h ? e : g, u = !!p, m = r, f = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, C = /* @__PURE__ */ new Date(), [I, x] = D((y ?? C).getFullYear()), [
|
|
7648
|
+
const h = e !== void 0, [g, T] = D(t), y = h ? e : g, u = !!p, m = r, f = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, C = /* @__PURE__ */ new Date(), [I, x] = D((y ?? C).getFullYear()), [z, P] = D((y ?? C).getMonth()), [k, M] = D(!1), [W, L] = D(!1), A = j(null);
|
|
7604
7649
|
J(() => {
|
|
7605
7650
|
if (!k) return;
|
|
7606
|
-
const
|
|
7651
|
+
const O = (K) => {
|
|
7607
7652
|
var S;
|
|
7608
|
-
(S = A.current) != null && S.contains(K.target) ||
|
|
7653
|
+
(S = A.current) != null && S.contains(K.target) || M(!1);
|
|
7609
7654
|
};
|
|
7610
|
-
return document.addEventListener("mousedown",
|
|
7655
|
+
return document.addEventListener("mousedown", O), () => document.removeEventListener("mousedown", O);
|
|
7611
7656
|
}, [k]);
|
|
7612
|
-
const
|
|
7613
|
-
h || T(
|
|
7657
|
+
const N = (O) => {
|
|
7658
|
+
h || T(O), a == null || a(O), M(!1);
|
|
7614
7659
|
}, q = () => {
|
|
7615
|
-
|
|
7616
|
-
},
|
|
7617
|
-
|
|
7618
|
-
},
|
|
7660
|
+
z === 0 ? (P(11), x((O) => O - 1)) : P((O) => O - 1);
|
|
7661
|
+
}, $ = () => {
|
|
7662
|
+
z === 11 ? (P(0), x((O) => O + 1)) : P((O) => O + 1);
|
|
7663
|
+
}, G = m ? "transparent" : u ? "var(--lucent-danger-default)" : W ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", Q = W ? `0 0 0 3px ${u ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7619
7664
|
return /* @__PURE__ */ v("div", { ref: A, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", position: "relative", ...b }, children: [
|
|
7620
7665
|
c && /* @__PURE__ */ n(
|
|
7621
7666
|
"label",
|
|
@@ -7636,7 +7681,7 @@ function ri({
|
|
|
7636
7681
|
type: "button",
|
|
7637
7682
|
id: f,
|
|
7638
7683
|
disabled: r,
|
|
7639
|
-
onClick: () => !r &&
|
|
7684
|
+
onClick: () => !r && M((O) => !O),
|
|
7640
7685
|
onFocus: () => L(!0),
|
|
7641
7686
|
onBlur: () => L(!1),
|
|
7642
7687
|
"aria-haspopup": "dialog",
|
|
@@ -7651,7 +7696,7 @@ function ri({
|
|
|
7651
7696
|
boxSizing: "border-box",
|
|
7652
7697
|
padding: `0 ${Ha[s]}`,
|
|
7653
7698
|
borderRadius: "var(--lucent-radius-lg)",
|
|
7654
|
-
border: `1px solid ${
|
|
7699
|
+
border: `1px solid ${G}`,
|
|
7655
7700
|
boxShadow: Q,
|
|
7656
7701
|
background: m ? "var(--lucent-surface-secondary)" : "var(--lucent-surface)",
|
|
7657
7702
|
color: y ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
@@ -7718,14 +7763,14 @@ function ri({
|
|
|
7718
7763
|
He,
|
|
7719
7764
|
{
|
|
7720
7765
|
year: I,
|
|
7721
|
-
month:
|
|
7766
|
+
month: z,
|
|
7722
7767
|
...y !== void 0 && { selected: y },
|
|
7723
7768
|
today: C,
|
|
7724
7769
|
...i !== void 0 && { min: i },
|
|
7725
7770
|
...l !== void 0 && { max: l },
|
|
7726
|
-
onSelect:
|
|
7771
|
+
onSelect: N,
|
|
7727
7772
|
onPrevMonth: q,
|
|
7728
|
-
onNextMonth:
|
|
7773
|
+
onNextMonth: $
|
|
7729
7774
|
}
|
|
7730
7775
|
)
|
|
7731
7776
|
}
|
|
@@ -7877,12 +7922,12 @@ function ii({
|
|
|
7877
7922
|
errorText: p,
|
|
7878
7923
|
style: b
|
|
7879
7924
|
}) {
|
|
7880
|
-
const h = e !== void 0, [g, T] = D(t), y = h ? e : g, u = !!p, m = r, f = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [C, I] = D(null), [x,
|
|
7925
|
+
const h = e !== void 0, [g, T] = D(t), y = h ? e : g, u = !!p, m = r, f = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [C, I] = D(null), [x, z] = D(null), P = /* @__PURE__ */ new Date(), [k, M] = D(((y == null ? void 0 : y.start) ?? P).getFullYear()), [W, L] = D(((y == null ? void 0 : y.start) ?? P).getMonth()), A = W === 11 ? 0 : W + 1, N = W === 11 ? k + 1 : k, [q, $] = D(!1), [G, Q] = D(!1), O = j(null);
|
|
7881
7926
|
J(() => {
|
|
7882
7927
|
if (!q) return;
|
|
7883
|
-
const B = (
|
|
7928
|
+
const B = (H) => {
|
|
7884
7929
|
var X;
|
|
7885
|
-
(X =
|
|
7930
|
+
(X = O.current) != null && X.contains(H.target) || ($(!1), I(null));
|
|
7886
7931
|
};
|
|
7887
7932
|
return document.addEventListener("mousedown", B), () => document.removeEventListener("mousedown", B);
|
|
7888
7933
|
}, [q]);
|
|
@@ -7890,21 +7935,21 @@ function ii({
|
|
|
7890
7935
|
if (!C)
|
|
7891
7936
|
I(B);
|
|
7892
7937
|
else {
|
|
7893
|
-
const [
|
|
7894
|
-
h || T(
|
|
7938
|
+
const [H, X] = Me(B, C) || Ie(B, C) ? [B, C] : [C, B], _ = { start: H, end: X };
|
|
7939
|
+
h || T(_), a == null || a(_), I(null), $(!1);
|
|
7895
7940
|
}
|
|
7896
7941
|
}, S = () => {
|
|
7897
|
-
|
|
7898
|
-
},
|
|
7899
|
-
|
|
7942
|
+
W === 0 ? (L(11), M((B) => B - 1)) : L((B) => B - 1);
|
|
7943
|
+
}, F = () => {
|
|
7944
|
+
W === 11 ? (L(0), M((B) => B + 1)) : L((B) => B + 1);
|
|
7900
7945
|
};
|
|
7901
|
-
let
|
|
7946
|
+
let R;
|
|
7902
7947
|
if (C && x) {
|
|
7903
|
-
const [B,
|
|
7904
|
-
|
|
7905
|
-
} else C ?
|
|
7906
|
-
const w = m ? "transparent" : u ? "var(--lucent-danger-default)" :
|
|
7907
|
-
return /* @__PURE__ */ v("div", { ref:
|
|
7948
|
+
const [B, H] = Me(x, C) ? [x, C] : [C, x];
|
|
7949
|
+
R = { start: B, end: H };
|
|
7950
|
+
} else C ? R = { start: C, end: C } : y && (R = { start: y.start, end: y.end });
|
|
7951
|
+
const w = m ? "transparent" : u ? "var(--lucent-danger-default)" : G ? "var(--lucent-focus-ring)" : "var(--lucent-border-default)", E = G ? `0 0 0 3px ${u ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
|
|
7952
|
+
return /* @__PURE__ */ v("div", { ref: O, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", position: "relative", ...b }, children: [
|
|
7908
7953
|
c && /* @__PURE__ */ n(
|
|
7909
7954
|
"label",
|
|
7910
7955
|
{
|
|
@@ -7924,7 +7969,7 @@ function ii({
|
|
|
7924
7969
|
type: "button",
|
|
7925
7970
|
id: f,
|
|
7926
7971
|
disabled: r,
|
|
7927
|
-
onClick: () => !r &&
|
|
7972
|
+
onClick: () => !r && $((B) => !B),
|
|
7928
7973
|
onFocus: () => Q(!0),
|
|
7929
7974
|
onBlur: () => Q(!1),
|
|
7930
7975
|
"aria-haspopup": "dialog",
|
|
@@ -8008,33 +8053,33 @@ function ii({
|
|
|
8008
8053
|
He,
|
|
8009
8054
|
{
|
|
8010
8055
|
year: k,
|
|
8011
|
-
month:
|
|
8056
|
+
month: W,
|
|
8012
8057
|
...(y == null ? void 0 : y.start) !== void 0 && { selected: y.start },
|
|
8013
|
-
today:
|
|
8058
|
+
today: P,
|
|
8014
8059
|
...i !== void 0 && { min: i },
|
|
8015
8060
|
...l !== void 0 && { max: l },
|
|
8016
8061
|
onSelect: K,
|
|
8017
8062
|
onPrevMonth: S,
|
|
8018
|
-
onNextMonth:
|
|
8019
|
-
...
|
|
8020
|
-
...C && { onDayHover:
|
|
8063
|
+
onNextMonth: F,
|
|
8064
|
+
...R !== void 0 && { highlightRange: R },
|
|
8065
|
+
...C && { onDayHover: z }
|
|
8021
8066
|
}
|
|
8022
8067
|
) }),
|
|
8023
8068
|
/* @__PURE__ */ n("div", { style: { width: 1, background: "var(--lucent-border-subtle)", flexShrink: 0 } }),
|
|
8024
8069
|
/* @__PURE__ */ n("div", { style: { minWidth: 220 }, children: /* @__PURE__ */ n(
|
|
8025
8070
|
He,
|
|
8026
8071
|
{
|
|
8027
|
-
year:
|
|
8072
|
+
year: N,
|
|
8028
8073
|
month: A,
|
|
8029
8074
|
...(y == null ? void 0 : y.end) !== void 0 && { selected: y.end },
|
|
8030
|
-
today:
|
|
8075
|
+
today: P,
|
|
8031
8076
|
...i !== void 0 && { min: i },
|
|
8032
8077
|
...l !== void 0 && { max: l },
|
|
8033
8078
|
onSelect: K,
|
|
8034
8079
|
onPrevMonth: S,
|
|
8035
|
-
onNextMonth:
|
|
8036
|
-
...
|
|
8037
|
-
...C && { onDayHover:
|
|
8080
|
+
onNextMonth: F,
|
|
8081
|
+
...R !== void 0 && { highlightRange: R },
|
|
8082
|
+
...C && { onDayHover: z }
|
|
8038
8083
|
}
|
|
8039
8084
|
) })
|
|
8040
8085
|
]
|
|
@@ -8236,21 +8281,21 @@ function si({
|
|
|
8236
8281
|
}) {
|
|
8237
8282
|
const c = o !== void 0, [d, p] = D([]), b = c ? o : d, [h, g] = D(!1), [T, y] = D(!1), u = j(null), m = ie((x) => {
|
|
8238
8283
|
if (!x || l) return;
|
|
8239
|
-
const
|
|
8284
|
+
const z = [];
|
|
8240
8285
|
for (const k of Array.from(x)) {
|
|
8241
8286
|
if (a && k.size > a) {
|
|
8242
8287
|
i == null || i(`"${k.name}" exceeds the ${Ve(a)} limit.`);
|
|
8243
8288
|
continue;
|
|
8244
8289
|
}
|
|
8245
|
-
if (!t && b.length +
|
|
8246
|
-
|
|
8290
|
+
if (!t && b.length + z.length >= 1) break;
|
|
8291
|
+
z.push({ id: Ka(), file: k });
|
|
8247
8292
|
}
|
|
8248
|
-
if (
|
|
8249
|
-
const
|
|
8250
|
-
c || p(
|
|
8293
|
+
if (z.length === 0) return;
|
|
8294
|
+
const P = t ? [...b, ...z] : z;
|
|
8295
|
+
c || p(P), r == null || r(P);
|
|
8251
8296
|
}, [l, b, c, a, t, r, i]), f = (x) => {
|
|
8252
|
-
const
|
|
8253
|
-
c || p(
|
|
8297
|
+
const z = b.filter((P) => P.id !== x);
|
|
8298
|
+
c || p(z), r == null || r(z);
|
|
8254
8299
|
}, C = (x) => {
|
|
8255
8300
|
x.preventDefault(), g(!1), m(x.dataTransfer.files);
|
|
8256
8301
|
}, I = (x) => {
|
|
@@ -8269,8 +8314,8 @@ function si({
|
|
|
8269
8314
|
return !l && ((x = u.current) == null ? void 0 : x.click());
|
|
8270
8315
|
},
|
|
8271
8316
|
onKeyDown: (x) => {
|
|
8272
|
-
var
|
|
8273
|
-
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), (
|
|
8317
|
+
var z;
|
|
8318
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), (z = u.current) == null || z.click());
|
|
8274
8319
|
},
|
|
8275
8320
|
onFocus: () => y(!0),
|
|
8276
8321
|
onBlur: () => y(!1),
|
|
@@ -8723,7 +8768,7 @@ function ne(e, t, a) {
|
|
|
8723
8768
|
let l = 0, s = 0, c = 0;
|
|
8724
8769
|
return e < 60 ? (l = o, s = r) : e < 120 ? (l = r, s = o) : e < 180 ? (s = o, c = r) : e < 240 ? (s = r, c = o) : e < 300 ? (l = r, c = o) : (l = o, c = r), lr({ r: Math.round((l + i) * 255), g: Math.round((s + i) * 255), b: Math.round((c + i) * 255) });
|
|
8725
8770
|
}
|
|
8726
|
-
function
|
|
8771
|
+
function V(e, t) {
|
|
8727
8772
|
const [a, o, r] = ae(e);
|
|
8728
8773
|
return ne(a, o, Math.min(1, Math.max(0, r + t)));
|
|
8729
8774
|
}
|
|
@@ -8785,19 +8830,19 @@ function ur(e) {
|
|
|
8785
8830
|
accentBorder: e.accentBorder,
|
|
8786
8831
|
// auto-recomputed by LucentProvider
|
|
8787
8832
|
// ── Status: lighten defaults for visibility; darken for subtle bg ─────────
|
|
8788
|
-
successDefault:
|
|
8789
|
-
successSubtle:
|
|
8790
|
-
successText:
|
|
8791
|
-
warningDefault:
|
|
8792
|
-
warningSubtle:
|
|
8793
|
-
warningText:
|
|
8794
|
-
dangerDefault:
|
|
8795
|
-
dangerHover:
|
|
8796
|
-
dangerSubtle:
|
|
8797
|
-
dangerText:
|
|
8798
|
-
infoDefault:
|
|
8799
|
-
infoSubtle:
|
|
8800
|
-
infoText:
|
|
8833
|
+
successDefault: V(e.successDefault, 0.1),
|
|
8834
|
+
successSubtle: V(e.successDefault, -0.25),
|
|
8835
|
+
successText: V(e.successText, 0.15),
|
|
8836
|
+
warningDefault: V(e.warningDefault, 0.1),
|
|
8837
|
+
warningSubtle: V(e.warningDefault, -0.25),
|
|
8838
|
+
warningText: V(e.warningText, 0.15),
|
|
8839
|
+
dangerDefault: V(e.dangerDefault, 0.1),
|
|
8840
|
+
dangerHover: V(e.dangerHover, 0.1),
|
|
8841
|
+
dangerSubtle: V(e.dangerDefault, -0.25),
|
|
8842
|
+
dangerText: V(e.dangerText, 0.15),
|
|
8843
|
+
infoDefault: V(e.infoDefault, 0.1),
|
|
8844
|
+
infoSubtle: V(e.infoDefault, -0.25),
|
|
8845
|
+
infoText: V(e.infoText, 0.15),
|
|
8801
8846
|
// ── Focus ─────────────────────────────────────────────────────────────────
|
|
8802
8847
|
focusRing: pe(e.focusRing)
|
|
8803
8848
|
};
|
|
@@ -8885,14 +8930,14 @@ function ke(e, t) {
|
|
|
8885
8930
|
}
|
|
8886
8931
|
function xt(e, t, a) {
|
|
8887
8932
|
const o = {}, r = a === "light";
|
|
8888
|
-
if ("borderDefault" in e && ("borderSubtle" in e || (o.borderSubtle =
|
|
8933
|
+
if ("borderDefault" in e && ("borderSubtle" in e || (o.borderSubtle = V(t.borderDefault, r ? 0.05 : -0.02)), "borderStrong" in e || (o.borderStrong = V(t.borderDefault, r ? -0.27 : 0.19))), "bgBase" in e && ("bgSubtle" in e || (o.bgSubtle = V(t.bgBase, r ? -0.02 : 0.02)), "surfaceTint" in e || (o.surfaceTint = V(t.bgBase, r ? -0.04 : 0.03)), !("surface" in e))) {
|
|
8889
8934
|
const i = Ir(t.bgBase, r);
|
|
8890
|
-
o.surface = i, "surfaceSecondary" in e || (o.surfaceSecondary =
|
|
8935
|
+
o.surface = i, "surfaceSecondary" in e || (o.surfaceSecondary = V(i, r ? -0.04 : 0.03)), "surfaceRaised" in e || (o.surfaceRaised = V(i, r ? 0 : 0.06)), "surfaceOverlay" in e || (o.surfaceOverlay = V(i, r ? 0 : 0.06));
|
|
8891
8936
|
}
|
|
8892
|
-
return "surface" in e && ("surfaceSecondary" in e || (o.surfaceSecondary =
|
|
8937
|
+
return "surface" in e && ("surfaceSecondary" in e || (o.surfaceSecondary = V(t.surface, r ? -0.04 : 0.03)), "surfaceRaised" in e || (o.surfaceRaised = V(t.surface, r ? 0 : 0.06)), "surfaceOverlay" in e || (o.surfaceOverlay = V(t.surface, r ? 0 : 0.06))), "textPrimary" in e && ("textSecondary" in e || (o.textSecondary = V(t.textPrimary, r ? 0.2 : -0.15)), "textDisabled" in e || (o.textDisabled = V(t.textPrimary, r ? 0.35 : -0.4))), "accentDefault" in e && ("accentHover" in e || (o.accentHover = V(t.accentDefault, r ? 0.05 : -0.07)), "accentActive" in e || (o.accentActive = V(t.accentDefault, r ? 0.13 : -0.14)), "accentSubtle" in e || (o.accentSubtle = V(t.accentDefault, r ? 0.85 : -0.6))), "successDefault" in e && ("successSubtle" in e || (o.successSubtle = we(t.successDefault, r)), "successText" in e || (o.successText = ke(t.successDefault, r))), "warningDefault" in e && ("warningSubtle" in e || (o.warningSubtle = we(t.warningDefault, r)), "warningText" in e || (o.warningText = ke(t.warningDefault, r))), "dangerDefault" in e && ("dangerHover" in e || (o.dangerHover = V(t.dangerDefault, r ? 0.05 : -0.07)), "dangerSubtle" in e || (o.dangerSubtle = we(t.dangerDefault, r)), "dangerText" in e || (o.dangerText = ke(t.dangerDefault, r))), "infoDefault" in e && ("infoSubtle" in e || (o.infoSubtle = we(t.infoDefault, r)), "infoText" in e || (o.infoText = ke(t.infoDefault, r))), o;
|
|
8893
8938
|
}
|
|
8894
8939
|
function wt(e, t = "light") {
|
|
8895
|
-
const o = { ...t === "dark" ? vt : qe, ...e }, r = xt(e, o, t), i = t === "light" ?
|
|
8940
|
+
const o = { ...t === "dark" ? vt : qe, ...e }, r = xt(e, o, t), i = t === "light" ? V(o.accentDefault, -0.15) : V(o.accentDefault, 0.15);
|
|
8896
8941
|
return {
|
|
8897
8942
|
...o,
|
|
8898
8943
|
...r,
|
|
@@ -9390,7 +9435,7 @@ function pi({
|
|
|
9390
9435
|
}
|
|
9391
9436
|
return u;
|
|
9392
9437
|
}
|
|
9393
|
-
const d = e === "dark" ? vt : qe, p = l ? { ...l, ...a } : a, b = p ? { ...d, ...p } : d, h = p ? xt(p, b, e) : {}, g = (p == null ? void 0 : p.accentBorder) ?? (e === "light" ?
|
|
9438
|
+
const d = e === "dark" ? vt : qe, p = l ? { ...l, ...a } : a, b = p ? { ...d, ...p } : d, h = p ? xt(p, b, e) : {}, g = (p == null ? void 0 : p.accentBorder) ?? (e === "light" ? V(b.accentDefault, -0.15) : V(b.accentDefault, 0.15)), T = (p == null ? void 0 : p.textOnAccent) ?? yt(b.accentDefault), y = Cr(b.accentDefault, T);
|
|
9394
9439
|
return {
|
|
9395
9440
|
...b,
|
|
9396
9441
|
...h,
|