lucent-ui 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +37 -29
- package/dist/index.d.ts +8 -1
- package/dist/index.js +1355 -1074
- package/dist-server/src/components/molecules/DataTable/DataTable.manifest.js +26 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as h, jsx as e, Fragment as
|
|
2
|
-
import { forwardRef as U, useRef as
|
|
1
|
+
import { jsxs as h, jsx as e, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as U, useRef as B, useEffect as $, useState as q, useCallback as Z, useContext as ie, createContext as le, useLayoutEffect as se, useId as ce } from "react";
|
|
3
3
|
const ye = {
|
|
4
4
|
primary: {
|
|
5
5
|
background: "var(--lucent-accent-default)",
|
|
@@ -26,18 +26,18 @@ const ye = {
|
|
|
26
26
|
md: { height: "38px", padding: "0 var(--lucent-space-4)", fontSize: "var(--lucent-font-size-md)" },
|
|
27
27
|
lg: { height: "46px", padding: "0 var(--lucent-space-5)", fontSize: "var(--lucent-font-size-lg)" }
|
|
28
28
|
}, we = U(
|
|
29
|
-
({ variant: t = "primary", size: n = "md", loading:
|
|
30
|
-
const y =
|
|
29
|
+
({ variant: t = "primary", size: n = "md", loading: r = !1, fullWidth: o = !1, spread: a = !1, leftIcon: i, rightIcon: l, chevron: s = !1, disableHoverStyles: d = !1, bordered: m = !0, children: g, disabled: u, style: f, ...c }, x) => {
|
|
30
|
+
const y = u ?? r;
|
|
31
31
|
return /* @__PURE__ */ h(
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
|
-
ref:
|
|
34
|
+
ref: x,
|
|
35
35
|
disabled: y,
|
|
36
|
-
"aria-busy":
|
|
36
|
+
"aria-busy": r,
|
|
37
37
|
style: {
|
|
38
38
|
display: "inline-flex",
|
|
39
39
|
alignItems: "center",
|
|
40
|
-
justifyContent:
|
|
40
|
+
justifyContent: a ? "space-between" : "center",
|
|
41
41
|
gap: "var(--lucent-space-2)",
|
|
42
42
|
fontFamily: "var(--lucent-font-family-base)",
|
|
43
43
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
@@ -53,7 +53,7 @@ const ye = {
|
|
|
53
53
|
margin: 0,
|
|
54
54
|
...xe[n],
|
|
55
55
|
...ye[t],
|
|
56
|
-
...
|
|
56
|
+
...f,
|
|
57
57
|
...y && {
|
|
58
58
|
background: "var(--lucent-bg-muted)",
|
|
59
59
|
color: "var(--lucent-text-disabled)",
|
|
@@ -62,47 +62,47 @@ const ye = {
|
|
|
62
62
|
// hide border entirely when bordered prop is false
|
|
63
63
|
...m === !1 && { border: "none" }
|
|
64
64
|
},
|
|
65
|
-
onMouseEnter: (
|
|
66
|
-
var
|
|
67
|
-
!y && !
|
|
65
|
+
onMouseEnter: (b) => {
|
|
66
|
+
var p;
|
|
67
|
+
!y && !d && ke(b.currentTarget, t, m), (p = c.onMouseEnter) == null || p.call(c, b);
|
|
68
68
|
},
|
|
69
|
-
onMouseLeave: (
|
|
70
|
-
var
|
|
71
|
-
!y && !
|
|
69
|
+
onMouseLeave: (b) => {
|
|
70
|
+
var p;
|
|
71
|
+
!y && !d && Se(b.currentTarget, t, m), (p = c.onMouseLeave) == null || p.call(c, b);
|
|
72
72
|
},
|
|
73
|
-
onMouseDown: (
|
|
74
|
-
var
|
|
75
|
-
y || (
|
|
73
|
+
onMouseDown: (b) => {
|
|
74
|
+
var p;
|
|
75
|
+
y || (b.currentTarget.style.transform = "scale(0.95)"), (p = c.onMouseDown) == null || p.call(c, b);
|
|
76
76
|
},
|
|
77
|
-
onMouseUp: (
|
|
78
|
-
var
|
|
79
|
-
|
|
77
|
+
onMouseUp: (b) => {
|
|
78
|
+
var p;
|
|
79
|
+
b.currentTarget.style.transform = "", (p = c.onMouseUp) == null || p.call(c, b);
|
|
80
80
|
},
|
|
81
|
-
onFocus: (
|
|
82
|
-
var
|
|
83
|
-
|
|
81
|
+
onFocus: (b) => {
|
|
82
|
+
var p;
|
|
83
|
+
b.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)", (p = c.onFocus) == null || p.call(c, b);
|
|
84
84
|
},
|
|
85
|
-
onBlur: (
|
|
86
|
-
var
|
|
87
|
-
|
|
85
|
+
onBlur: (b) => {
|
|
86
|
+
var p;
|
|
87
|
+
b.currentTarget.style.boxShadow = "", (p = c.onBlur) == null || p.call(c, b);
|
|
88
88
|
},
|
|
89
89
|
...c,
|
|
90
90
|
children: [
|
|
91
91
|
i,
|
|
92
|
-
|
|
93
|
-
!
|
|
94
|
-
!
|
|
92
|
+
r ? /* @__PURE__ */ e(Ie, {}) : g,
|
|
93
|
+
!r && l,
|
|
94
|
+
!r && s && /* @__PURE__ */ e(Ce, { size: n })
|
|
95
95
|
]
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
100
|
we.displayName = "Button";
|
|
101
|
-
function ke(t, n,
|
|
102
|
-
n === "primary" ? (t.style.background = "var(--lucent-accent-hover)",
|
|
101
|
+
function ke(t, n, r) {
|
|
102
|
+
n === "primary" ? (t.style.background = "var(--lucent-accent-hover)", r !== !1 && (t.style.borderColor = "var(--lucent-accent-border)")) : n === "secondary" ? t.style.background = "var(--lucent-bg-subtle)" : n === "ghost" ? t.style.background = "var(--lucent-bg-muted)" : n === "danger" && (t.style.background = "var(--lucent-danger-hover)", r !== !1 && (t.style.borderColor = "var(--lucent-danger-hover)"));
|
|
103
103
|
}
|
|
104
|
-
function Se(t, n,
|
|
105
|
-
n === "primary" ? (t.style.background = "var(--lucent-accent-default)",
|
|
104
|
+
function Se(t, n, r) {
|
|
105
|
+
n === "primary" ? (t.style.background = "var(--lucent-accent-default)", r !== !1 && (t.style.borderColor = "var(--lucent-accent-border)")) : n === "secondary" ? t.style.background = "var(--lucent-surface-default)" : n === "ghost" ? t.style.background = "transparent" : n === "danger" && (t.style.background = "var(--lucent-danger-default)", r !== !1 && (t.style.borderColor = "var(--lucent-danger-default)"));
|
|
106
106
|
}
|
|
107
107
|
const Te = { sm: 12, md: 14, lg: 16 };
|
|
108
108
|
function Ce({ size: t }) {
|
|
@@ -115,7 +115,7 @@ function Ie() {
|
|
|
115
115
|
/* @__PURE__ */ e("path", { d: "M12 2a10 10 0 0 1 10 10" })
|
|
116
116
|
] });
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const sn = {
|
|
119
119
|
id: "button",
|
|
120
120
|
name: "Button",
|
|
121
121
|
tier: "atom",
|
|
@@ -238,8 +238,8 @@ const rn = {
|
|
|
238
238
|
keyboardInteractions: ["Enter — activates the button", "Space — activates the button"]
|
|
239
239
|
}
|
|
240
240
|
}, de = U(
|
|
241
|
-
({ label: t, helperText: n, errorText:
|
|
242
|
-
const m = i ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`,
|
|
241
|
+
({ label: t, helperText: n, errorText: r, leftElement: o, rightElement: a, id: i, style: l, ...s }, d) => {
|
|
242
|
+
const m = i ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`, g = !!r, u = !!s.disabled;
|
|
243
243
|
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%" }, children: [
|
|
244
244
|
t && /* @__PURE__ */ e(
|
|
245
245
|
"label",
|
|
@@ -258,7 +258,7 @@ const rn = {
|
|
|
258
258
|
o && /* @__PURE__ */ e("span", { style: {
|
|
259
259
|
position: "absolute",
|
|
260
260
|
left: "var(--lucent-space-3)",
|
|
261
|
-
color:
|
|
261
|
+
color: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
|
|
262
262
|
display: "flex",
|
|
263
263
|
alignItems: "center",
|
|
264
264
|
pointerEvents: "none"
|
|
@@ -266,54 +266,54 @@ const rn = {
|
|
|
266
266
|
/* @__PURE__ */ e(
|
|
267
267
|
"input",
|
|
268
268
|
{
|
|
269
|
-
ref:
|
|
269
|
+
ref: d,
|
|
270
270
|
id: m,
|
|
271
|
-
"aria-invalid":
|
|
272
|
-
"aria-describedby":
|
|
271
|
+
"aria-invalid": g,
|
|
272
|
+
"aria-describedby": g ? `${m}-error` : n ? `${m}-helper` : void 0,
|
|
273
273
|
style: {
|
|
274
274
|
width: "100%",
|
|
275
275
|
height: "40px",
|
|
276
|
-
padding: `0 ${
|
|
276
|
+
padding: `0 ${a ? "var(--lucent-space-10)" : "var(--lucent-space-3)"} 0 ${o ? "var(--lucent-space-10)" : "var(--lucent-space-3)"}`,
|
|
277
277
|
fontSize: "var(--lucent-font-size-md)",
|
|
278
278
|
fontFamily: "var(--lucent-font-family-base)",
|
|
279
|
-
color:
|
|
280
|
-
background:
|
|
281
|
-
border: `1px solid ${
|
|
282
|
-
cursor:
|
|
279
|
+
color: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
280
|
+
background: u ? "var(--lucent-bg-muted)" : "var(--lucent-surface-default)",
|
|
281
|
+
border: `1px solid ${u ? "transparent" : g ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"}`,
|
|
282
|
+
cursor: u ? "not-allowed" : void 0,
|
|
283
283
|
borderRadius: "var(--lucent-radius-lg)",
|
|
284
284
|
outline: "none",
|
|
285
285
|
boxSizing: "border-box",
|
|
286
286
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
287
287
|
...l
|
|
288
288
|
},
|
|
289
|
-
onMouseEnter: (
|
|
289
|
+
onMouseEnter: (f) => {
|
|
290
290
|
var c;
|
|
291
|
-
!s.disabled &&
|
|
291
|
+
!s.disabled && f.currentTarget !== document.activeElement && (f.currentTarget.style.borderColor = g ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (c = s.onMouseEnter) == null || c.call(s, f);
|
|
292
292
|
},
|
|
293
|
-
onMouseLeave: (
|
|
293
|
+
onMouseLeave: (f) => {
|
|
294
294
|
var c;
|
|
295
|
-
!s.disabled &&
|
|
295
|
+
!s.disabled && f.currentTarget !== document.activeElement && (f.currentTarget.style.borderColor = g ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (c = s.onMouseLeave) == null || c.call(s, f);
|
|
296
296
|
},
|
|
297
|
-
onFocus: (
|
|
297
|
+
onFocus: (f) => {
|
|
298
298
|
var c;
|
|
299
|
-
|
|
299
|
+
f.currentTarget.style.borderColor = g ? "var(--lucent-danger-default)" : "var(--lucent-focus-ring)", f.currentTarget.style.boxShadow = `0 0 0 3px ${g ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (c = s.onFocus) == null || c.call(s, f);
|
|
300
300
|
},
|
|
301
|
-
onBlur: (
|
|
301
|
+
onBlur: (f) => {
|
|
302
302
|
var c;
|
|
303
|
-
|
|
303
|
+
f.currentTarget.style.borderColor = g ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", f.currentTarget.style.boxShadow = "none", (c = s.onBlur) == null || c.call(s, f);
|
|
304
304
|
},
|
|
305
305
|
...s
|
|
306
306
|
}
|
|
307
307
|
),
|
|
308
|
-
|
|
308
|
+
a && /* @__PURE__ */ e("span", { style: {
|
|
309
309
|
position: "absolute",
|
|
310
310
|
right: "var(--lucent-space-3)",
|
|
311
|
-
color:
|
|
311
|
+
color: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
|
|
312
312
|
display: "flex",
|
|
313
313
|
alignItems: "center"
|
|
314
|
-
}, children:
|
|
314
|
+
}, children: a })
|
|
315
315
|
] }),
|
|
316
|
-
|
|
316
|
+
g && /* @__PURE__ */ e(
|
|
317
317
|
"span",
|
|
318
318
|
{
|
|
319
319
|
id: `${m}-error`,
|
|
@@ -323,10 +323,10 @@ const rn = {
|
|
|
323
323
|
color: "var(--lucent-danger-text)",
|
|
324
324
|
fontFamily: "var(--lucent-font-family-base)"
|
|
325
325
|
},
|
|
326
|
-
children:
|
|
326
|
+
children: r
|
|
327
327
|
}
|
|
328
328
|
),
|
|
329
|
-
!
|
|
329
|
+
!g && n && /* @__PURE__ */ e(
|
|
330
330
|
"span",
|
|
331
331
|
{
|
|
332
332
|
id: `${m}-helper`,
|
|
@@ -342,7 +342,7 @@ const rn = {
|
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
344
|
de.displayName = "Input";
|
|
345
|
-
const
|
|
345
|
+
const cn = {
|
|
346
346
|
id: "input",
|
|
347
347
|
name: "Input",
|
|
348
348
|
tier: "atom",
|
|
@@ -375,14 +375,14 @@ const on = {
|
|
|
375
375
|
keyboardInteractions: ["Tab — focuses the input"]
|
|
376
376
|
}
|
|
377
377
|
}, Me = U(
|
|
378
|
-
({ label: t, helperText: n, errorText:
|
|
379
|
-
const
|
|
380
|
-
return
|
|
378
|
+
({ label: t, helperText: n, errorText: r, autoResize: o = !1, maxLength: a, showCount: i = !1, id: l, value: s, onChange: d, style: m, ...g }, u) => {
|
|
379
|
+
const f = B(null), c = u ?? f, x = l ?? `lucent-textarea-${Math.random().toString(36).slice(2, 7)}`, y = !!r, b = typeof s == "string" ? s.length : 0;
|
|
380
|
+
return $(() => {
|
|
381
381
|
if (!o) return;
|
|
382
|
-
const
|
|
383
|
-
|
|
382
|
+
const p = c.current;
|
|
383
|
+
p && (p.style.height = "auto", p.style.height = `${p.scrollHeight}px`);
|
|
384
384
|
}, [s, o, c]), /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%" }, children: [
|
|
385
|
-
t && /* @__PURE__ */ e("label", { htmlFor:
|
|
385
|
+
t && /* @__PURE__ */ e("label", { htmlFor: x, style: {
|
|
386
386
|
fontSize: "var(--lucent-font-size-sm)",
|
|
387
387
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
388
388
|
color: "var(--lucent-text-primary)",
|
|
@@ -392,12 +392,12 @@ const on = {
|
|
|
392
392
|
"textarea",
|
|
393
393
|
{
|
|
394
394
|
ref: c,
|
|
395
|
-
id:
|
|
396
|
-
maxLength:
|
|
395
|
+
id: x,
|
|
396
|
+
maxLength: a,
|
|
397
397
|
value: s,
|
|
398
|
-
onChange:
|
|
398
|
+
onChange: d,
|
|
399
399
|
"aria-invalid": y,
|
|
400
|
-
"aria-describedby": y ? `${
|
|
400
|
+
"aria-describedby": y ? `${x}-error` : n ? `${x}-helper` : void 0,
|
|
401
401
|
style: {
|
|
402
402
|
width: "100%",
|
|
403
403
|
minHeight: "100px",
|
|
@@ -415,38 +415,38 @@ const on = {
|
|
|
415
415
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
416
416
|
...m
|
|
417
417
|
},
|
|
418
|
-
onFocus: (
|
|
419
|
-
var
|
|
420
|
-
|
|
418
|
+
onFocus: (p) => {
|
|
419
|
+
var v;
|
|
420
|
+
p.currentTarget.style.borderColor = y ? "var(--lucent-danger-default)" : "var(--lucent-focus-ring)", p.currentTarget.style.boxShadow = `0 0 0 3px ${y ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (v = g.onFocus) == null || v.call(g, p);
|
|
421
421
|
},
|
|
422
|
-
onBlur: (
|
|
423
|
-
var
|
|
424
|
-
|
|
422
|
+
onBlur: (p) => {
|
|
423
|
+
var v;
|
|
424
|
+
p.currentTarget.style.borderColor = y ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", p.currentTarget.style.boxShadow = "none", (v = g.onBlur) == null || v.call(g, p);
|
|
425
425
|
},
|
|
426
|
-
...
|
|
426
|
+
...g
|
|
427
427
|
}
|
|
428
428
|
),
|
|
429
429
|
/* @__PURE__ */ h("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
|
|
430
430
|
/* @__PURE__ */ h("div", { children: [
|
|
431
|
-
y && /* @__PURE__ */ e("span", { id: `${
|
|
432
|
-
!y && n && /* @__PURE__ */ e("span", { id: `${
|
|
431
|
+
y && /* @__PURE__ */ e("span", { id: `${x}-error`, role: "alert", style: { fontSize: "var(--lucent-font-size-sm)", color: "var(--lucent-danger-text)", fontFamily: "var(--lucent-font-family-base)" }, children: r }),
|
|
432
|
+
!y && n && /* @__PURE__ */ e("span", { id: `${x}-helper`, style: { fontSize: "var(--lucent-font-size-sm)", color: "var(--lucent-text-secondary)", fontFamily: "var(--lucent-font-family-base)" }, children: n })
|
|
433
433
|
] }),
|
|
434
|
-
(i ||
|
|
434
|
+
(i || a) && /* @__PURE__ */ h("span", { style: {
|
|
435
435
|
fontSize: "var(--lucent-font-size-xs)",
|
|
436
|
-
color:
|
|
436
|
+
color: a && b >= a ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)",
|
|
437
437
|
fontFamily: "var(--lucent-font-family-mono)",
|
|
438
438
|
flexShrink: 0,
|
|
439
439
|
marginLeft: "var(--lucent-space-2)"
|
|
440
440
|
}, children: [
|
|
441
|
-
|
|
442
|
-
|
|
441
|
+
b,
|
|
442
|
+
a ? `/${a}` : ""
|
|
443
443
|
] })
|
|
444
444
|
] })
|
|
445
445
|
] });
|
|
446
446
|
}
|
|
447
447
|
);
|
|
448
448
|
Me.displayName = "Textarea";
|
|
449
|
-
const
|
|
449
|
+
const dn = {
|
|
450
450
|
id: "textarea",
|
|
451
451
|
name: "Textarea",
|
|
452
452
|
tier: "atom",
|
|
@@ -485,12 +485,12 @@ const ln = {
|
|
|
485
485
|
warning: { bg: "var(--lucent-warning-subtle)", color: "var(--lucent-warning-text)", border: "var(--lucent-warning-subtle)" },
|
|
486
486
|
danger: { bg: "var(--lucent-danger-subtle)", color: "var(--lucent-danger-text)", border: "var(--lucent-danger-subtle)" },
|
|
487
487
|
info: { bg: "var(--lucent-info-subtle)", color: "var(--lucent-info-text)", border: "var(--lucent-info-subtle)" }
|
|
488
|
-
},
|
|
488
|
+
}, Ee = {
|
|
489
489
|
sm: { fontSize: "var(--lucent-font-size-xs)", padding: "0 var(--lucent-space-2)", height: "18px" },
|
|
490
490
|
md: { fontSize: "var(--lucent-font-size-sm)", padding: "0 var(--lucent-space-2)", height: "22px" }
|
|
491
491
|
};
|
|
492
|
-
function
|
|
493
|
-
const i = ze[t], l =
|
|
492
|
+
function un({ variant: t = "neutral", size: n = "md", dot: r = !1, children: o, style: a }) {
|
|
493
|
+
const i = ze[t], l = Ee[n];
|
|
494
494
|
return /* @__PURE__ */ h("span", { style: {
|
|
495
495
|
display: "inline-flex",
|
|
496
496
|
alignItems: "center",
|
|
@@ -507,9 +507,9 @@ function sn({ variant: t = "neutral", size: n = "md", dot: a = !1, children: o,
|
|
|
507
507
|
border: `1px solid ${i.border}`,
|
|
508
508
|
whiteSpace: "nowrap",
|
|
509
509
|
boxSizing: "border-box",
|
|
510
|
-
...
|
|
510
|
+
...a
|
|
511
511
|
}, children: [
|
|
512
|
-
|
|
512
|
+
r && /* @__PURE__ */ e("span", { style: {
|
|
513
513
|
width: 6,
|
|
514
514
|
height: 6,
|
|
515
515
|
borderRadius: "var(--lucent-radius-full)",
|
|
@@ -519,7 +519,7 @@ function sn({ variant: t = "neutral", size: n = "md", dot: a = !1, children: o,
|
|
|
519
519
|
o
|
|
520
520
|
] });
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const pn = {
|
|
523
523
|
id: "badge",
|
|
524
524
|
name: "Badge",
|
|
525
525
|
tier: "atom",
|
|
@@ -544,27 +544,27 @@ const cn = {
|
|
|
544
544
|
role: "status",
|
|
545
545
|
notes: "Use aria-label on the parent element when badge meaning depends on context."
|
|
546
546
|
}
|
|
547
|
-
},
|
|
547
|
+
}, qe = {
|
|
548
548
|
xs: 24,
|
|
549
549
|
sm: 32,
|
|
550
550
|
md: 40,
|
|
551
551
|
lg: 56,
|
|
552
552
|
xl: 80
|
|
553
|
-
},
|
|
553
|
+
}, Ae = {
|
|
554
554
|
xs: "var(--lucent-font-size-xs)",
|
|
555
555
|
sm: "var(--lucent-font-size-xs)",
|
|
556
556
|
md: "var(--lucent-font-size-sm)",
|
|
557
557
|
lg: "var(--lucent-font-size-lg)",
|
|
558
558
|
xl: "var(--lucent-font-size-xl)"
|
|
559
559
|
};
|
|
560
|
-
function
|
|
561
|
-
var o,
|
|
560
|
+
function De(t, n) {
|
|
561
|
+
var o, a, i;
|
|
562
562
|
if (n) return n.slice(0, 2).toUpperCase();
|
|
563
|
-
const
|
|
564
|
-
return
|
|
563
|
+
const r = t.trim().split(/\s+/);
|
|
564
|
+
return r.length === 1 ? (((o = r[0]) == null ? void 0 : o[0]) ?? "").toUpperCase() : ((((a = r[0]) == null ? void 0 : a[0]) ?? "") + (((i = r[r.length - 1]) == null ? void 0 : i[0]) ?? "")).toUpperCase();
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
const l =
|
|
566
|
+
function fn({ src: t, alt: n, size: r = "md", initials: o, style: a, ...i }) {
|
|
567
|
+
const l = qe[r], s = De(n, o), d = {
|
|
568
568
|
width: l,
|
|
569
569
|
height: l,
|
|
570
570
|
borderRadius: "var(--lucent-radius-full)",
|
|
@@ -575,7 +575,7 @@ function dn({ src: t, alt: n, size: a = "md", initials: o, style: r, ...i }) {
|
|
|
575
575
|
overflow: "hidden",
|
|
576
576
|
boxSizing: "border-box",
|
|
577
577
|
userSelect: "none",
|
|
578
|
-
...
|
|
578
|
+
...a
|
|
579
579
|
};
|
|
580
580
|
return t ? /* @__PURE__ */ e(
|
|
581
581
|
"img",
|
|
@@ -584,7 +584,7 @@ function dn({ src: t, alt: n, size: a = "md", initials: o, style: r, ...i }) {
|
|
|
584
584
|
alt: n,
|
|
585
585
|
width: l,
|
|
586
586
|
height: l,
|
|
587
|
-
style: { ...
|
|
587
|
+
style: { ...d, objectFit: "cover" },
|
|
588
588
|
...i
|
|
589
589
|
}
|
|
590
590
|
) : /* @__PURE__ */ e(
|
|
@@ -593,10 +593,10 @@ function dn({ src: t, alt: n, size: a = "md", initials: o, style: r, ...i }) {
|
|
|
593
593
|
role: "img",
|
|
594
594
|
"aria-label": n,
|
|
595
595
|
style: {
|
|
596
|
-
...
|
|
596
|
+
...d,
|
|
597
597
|
background: "var(--lucent-accent-default)",
|
|
598
598
|
color: "var(--lucent-text-on-accent)",
|
|
599
|
-
fontSize:
|
|
599
|
+
fontSize: Ae[r],
|
|
600
600
|
fontWeight: "var(--lucent-font-weight-semibold)",
|
|
601
601
|
fontFamily: "var(--lucent-font-family-base)"
|
|
602
602
|
},
|
|
@@ -604,7 +604,7 @@ function dn({ src: t, alt: n, size: a = "md", initials: o, style: r, ...i }) {
|
|
|
604
604
|
}
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
|
-
const
|
|
607
|
+
const hn = {
|
|
608
608
|
id: "avatar",
|
|
609
609
|
name: "Avatar",
|
|
610
610
|
tier: "atom",
|
|
@@ -641,8 +641,8 @@ const un = {
|
|
|
641
641
|
md: 2,
|
|
642
642
|
lg: 2
|
|
643
643
|
};
|
|
644
|
-
function Re({ size: t = "md", label: n = "Loading…", color:
|
|
645
|
-
const o = Fe[t],
|
|
644
|
+
function Re({ size: t = "md", label: n = "Loading…", color: r }) {
|
|
645
|
+
const o = Fe[t], a = Be[t];
|
|
646
646
|
return /* @__PURE__ */ h("span", { role: "status", "aria-label": n, style: { display: "inline-flex", alignItems: "center", justifyContent: "center" }, children: [
|
|
647
647
|
/* @__PURE__ */ h(
|
|
648
648
|
"svg",
|
|
@@ -652,16 +652,16 @@ function Re({ size: t = "md", label: n = "Loading…", color: a }) {
|
|
|
652
652
|
viewBox: "0 0 24 24",
|
|
653
653
|
fill: "none",
|
|
654
654
|
"aria-hidden": !0,
|
|
655
|
-
style: { animation: "lucent-spin 0.7s linear infinite", color:
|
|
655
|
+
style: { animation: "lucent-spin 0.7s linear infinite", color: r ?? "currentColor" },
|
|
656
656
|
children: [
|
|
657
657
|
/* @__PURE__ */ e("style", { children: "@keyframes lucent-spin { to { transform: rotate(360deg); } }" }),
|
|
658
|
-
/* @__PURE__ */ e("circle", { cx: 12, cy: 12, r: 10, stroke: "currentColor", strokeWidth:
|
|
658
|
+
/* @__PURE__ */ e("circle", { cx: 12, cy: 12, r: 10, stroke: "currentColor", strokeWidth: a, strokeOpacity: 0.2 }),
|
|
659
659
|
/* @__PURE__ */ e(
|
|
660
660
|
"path",
|
|
661
661
|
{
|
|
662
662
|
d: "M12 2a10 10 0 0 1 10 10",
|
|
663
663
|
stroke: "currentColor",
|
|
664
|
-
strokeWidth:
|
|
664
|
+
strokeWidth: a,
|
|
665
665
|
strokeLinecap: "round"
|
|
666
666
|
}
|
|
667
667
|
)
|
|
@@ -671,7 +671,7 @@ function Re({ size: t = "md", label: n = "Loading…", color: a }) {
|
|
|
671
671
|
/* @__PURE__ */ e("span", { style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0,0,0,0)", whiteSpace: "nowrap" }, children: n })
|
|
672
672
|
] });
|
|
673
673
|
}
|
|
674
|
-
const
|
|
674
|
+
const mn = {
|
|
675
675
|
id: "spinner",
|
|
676
676
|
name: "Spinner",
|
|
677
677
|
tier: "atom",
|
|
@@ -696,7 +696,7 @@ const pn = {
|
|
|
696
696
|
notes: 'The visible SVG is aria-hidden. The label is conveyed via a visually-hidden span inside role="status".'
|
|
697
697
|
}
|
|
698
698
|
};
|
|
699
|
-
function
|
|
699
|
+
function gn({ orientation: t = "horizontal", label: n, spacing: r = "var(--lucent-space-4)", style: o }) {
|
|
700
700
|
return t === "vertical" ? /* @__PURE__ */ e(
|
|
701
701
|
"span",
|
|
702
702
|
{
|
|
@@ -707,7 +707,7 @@ function fn({ orientation: t = "horizontal", label: n, spacing: a = "var(--lucen
|
|
|
707
707
|
width: "1px",
|
|
708
708
|
alignSelf: "stretch",
|
|
709
709
|
background: "var(--lucent-border-default)",
|
|
710
|
-
margin: `0 ${
|
|
710
|
+
margin: `0 ${r}`,
|
|
711
711
|
flexShrink: 0,
|
|
712
712
|
...o
|
|
713
713
|
}
|
|
@@ -721,7 +721,7 @@ function fn({ orientation: t = "horizontal", label: n, spacing: a = "var(--lucen
|
|
|
721
721
|
display: "flex",
|
|
722
722
|
alignItems: "center",
|
|
723
723
|
gap: "var(--lucent-space-3)",
|
|
724
|
-
margin: `${
|
|
724
|
+
margin: `${r} 0`,
|
|
725
725
|
...o
|
|
726
726
|
},
|
|
727
727
|
children: [
|
|
@@ -744,14 +744,14 @@ function fn({ orientation: t = "horizontal", label: n, spacing: a = "var(--lucen
|
|
|
744
744
|
style: {
|
|
745
745
|
border: "none",
|
|
746
746
|
borderTop: "1px solid var(--lucent-border-default)",
|
|
747
|
-
margin: `${
|
|
747
|
+
margin: `${r} 0`,
|
|
748
748
|
width: "100%",
|
|
749
749
|
...o
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
);
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const bn = {
|
|
755
755
|
id: "divider",
|
|
756
756
|
name: "Divider",
|
|
757
757
|
tier: "atom",
|
|
@@ -790,31 +790,31 @@ const hn = {
|
|
|
790
790
|
({
|
|
791
791
|
label: t,
|
|
792
792
|
size: n = "md",
|
|
793
|
-
indeterminate:
|
|
793
|
+
indeterminate: r = !1,
|
|
794
794
|
checked: o,
|
|
795
|
-
defaultChecked:
|
|
795
|
+
defaultChecked: a,
|
|
796
796
|
disabled: i,
|
|
797
797
|
id: l,
|
|
798
798
|
onChange: s,
|
|
799
|
-
style:
|
|
799
|
+
style: d,
|
|
800
800
|
...m
|
|
801
|
-
},
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
!i &&
|
|
805
|
-
}, [
|
|
806
|
-
const
|
|
801
|
+
}, g) => {
|
|
802
|
+
const u = B(null), f = l ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, c = Ne[n], x = o !== void 0, [y, b] = q(a ?? !1), p = x ? !!o : y, v = B(p), [M, w] = q(0);
|
|
803
|
+
$(() => {
|
|
804
|
+
!i && v.current !== p && (v.current = p, w((C) => C + 1));
|
|
805
|
+
}, [p, i]);
|
|
806
|
+
const S = Z(
|
|
807
807
|
(C) => {
|
|
808
|
-
|
|
808
|
+
u.current = C, typeof g == "function" ? g(C) : g && (g.current = C);
|
|
809
809
|
},
|
|
810
|
-
[
|
|
810
|
+
[g]
|
|
811
811
|
);
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}, [
|
|
815
|
-
const
|
|
816
|
-
|
|
817
|
-
},
|
|
812
|
+
$(() => {
|
|
813
|
+
u.current && (u.current.indeterminate = r);
|
|
814
|
+
}, [r]);
|
|
815
|
+
const E = (C) => {
|
|
816
|
+
x || b(C.target.checked), s == null || s(C);
|
|
817
|
+
}, F = i ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)", T = {
|
|
818
818
|
width: c,
|
|
819
819
|
height: c,
|
|
820
820
|
// fixed corner so global radius overrides (e.g. via customizer) don't
|
|
@@ -822,17 +822,17 @@ const hn = {
|
|
|
822
822
|
// rounded regardless of theming.
|
|
823
823
|
// bumping up a bit to keep the box from feeling too sharp.
|
|
824
824
|
borderRadius: "4px",
|
|
825
|
-
border: `1.5px solid ${i ? "transparent" :
|
|
826
|
-
background: i ? "var(--lucent-bg-muted)" :
|
|
825
|
+
border: `1.5px solid ${i ? "transparent" : p || r ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
|
|
826
|
+
background: i ? "var(--lucent-bg-muted)" : p || r ? "var(--lucent-accent-default)" : "var(--lucent-surface-default)",
|
|
827
827
|
display: "inline-flex",
|
|
828
828
|
alignItems: "center",
|
|
829
829
|
justifyContent: "center",
|
|
830
830
|
flexShrink: 0,
|
|
831
831
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
832
832
|
// Re-key forces the animation to restart on every toggle.
|
|
833
|
-
animation:
|
|
833
|
+
animation: M > 0 ? "lucent-cb-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
834
834
|
};
|
|
835
|
-
return /* @__PURE__ */ h(
|
|
835
|
+
return /* @__PURE__ */ h(P, { children: [
|
|
836
836
|
/* @__PURE__ */ e("style", { children: Le }),
|
|
837
837
|
/* @__PURE__ */ h(
|
|
838
838
|
"label",
|
|
@@ -846,24 +846,24 @@ const hn = {
|
|
|
846
846
|
fontSize: n === "sm" ? "var(--lucent-font-size-sm)" : "var(--lucent-font-size-md)",
|
|
847
847
|
color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
848
848
|
userSelect: "none",
|
|
849
|
-
...
|
|
849
|
+
...d
|
|
850
850
|
},
|
|
851
851
|
children: [
|
|
852
852
|
/* @__PURE__ */ e(
|
|
853
853
|
"input",
|
|
854
854
|
{
|
|
855
|
-
ref:
|
|
855
|
+
ref: S,
|
|
856
856
|
type: "checkbox",
|
|
857
|
-
id:
|
|
858
|
-
checked:
|
|
857
|
+
id: f,
|
|
858
|
+
checked: x ? o : y,
|
|
859
859
|
disabled: i,
|
|
860
|
-
onChange:
|
|
860
|
+
onChange: E,
|
|
861
861
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
862
862
|
...m
|
|
863
863
|
}
|
|
864
864
|
),
|
|
865
865
|
/* @__PURE__ */ h("span", { "aria-hidden": !0, style: T, children: [
|
|
866
|
-
|
|
866
|
+
p && !r && /* @__PURE__ */ e(
|
|
867
867
|
"svg",
|
|
868
868
|
{
|
|
869
869
|
width: c - 4,
|
|
@@ -871,10 +871,10 @@ const hn = {
|
|
|
871
871
|
viewBox: "0 0 10 10",
|
|
872
872
|
fill: "none",
|
|
873
873
|
style: { animation: "lucent-cb-mark 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" },
|
|
874
|
-
children: /* @__PURE__ */ e("path", { d: "M1.5 5L4 7.5L8.5 2.5", stroke:
|
|
874
|
+
children: /* @__PURE__ */ e("path", { d: "M1.5 5L4 7.5L8.5 2.5", stroke: F, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
875
875
|
}
|
|
876
876
|
),
|
|
877
|
-
|
|
877
|
+
r && /* @__PURE__ */ e(
|
|
878
878
|
"svg",
|
|
879
879
|
{
|
|
880
880
|
width: c - 4,
|
|
@@ -882,10 +882,10 @@ const hn = {
|
|
|
882
882
|
viewBox: "0 0 10 10",
|
|
883
883
|
fill: "none",
|
|
884
884
|
style: { animation: "lucent-cb-mark 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" },
|
|
885
|
-
children: /* @__PURE__ */ e("path", { d: "M2 5H8", stroke:
|
|
885
|
+
children: /* @__PURE__ */ e("path", { d: "M2 5H8", stroke: F, strokeWidth: 1.5, strokeLinecap: "round" })
|
|
886
886
|
}
|
|
887
887
|
)
|
|
888
|
-
] },
|
|
888
|
+
] }, M),
|
|
889
889
|
t
|
|
890
890
|
]
|
|
891
891
|
}
|
|
@@ -894,7 +894,7 @@ const hn = {
|
|
|
894
894
|
}
|
|
895
895
|
);
|
|
896
896
|
ue.displayName = "Checkbox";
|
|
897
|
-
const
|
|
897
|
+
const vn = {
|
|
898
898
|
id: "checkbox",
|
|
899
899
|
name: "Checkbox",
|
|
900
900
|
tier: "atom",
|
|
@@ -976,59 +976,59 @@ const mn = {
|
|
|
976
976
|
100% { opacity: 1; transform: scale(1); }
|
|
977
977
|
}
|
|
978
978
|
`, pe = le(null);
|
|
979
|
-
function
|
|
979
|
+
function We({
|
|
980
980
|
name: t,
|
|
981
981
|
value: n,
|
|
982
|
-
onChange:
|
|
982
|
+
onChange: r,
|
|
983
983
|
disabled: o,
|
|
984
|
-
orientation:
|
|
984
|
+
orientation: a = "vertical",
|
|
985
985
|
label: i,
|
|
986
986
|
children: l
|
|
987
987
|
}) {
|
|
988
|
-
return /* @__PURE__ */ e(pe.Provider, { value: { name: t, value: n, onChange:
|
|
988
|
+
return /* @__PURE__ */ e(pe.Provider, { value: { name: t, value: n, onChange: r, disabled: o ?? !1 }, children: /* @__PURE__ */ e(
|
|
989
989
|
"div",
|
|
990
990
|
{
|
|
991
991
|
role: "radiogroup",
|
|
992
992
|
"aria-label": i,
|
|
993
993
|
style: {
|
|
994
994
|
display: "flex",
|
|
995
|
-
flexDirection:
|
|
996
|
-
gap:
|
|
995
|
+
flexDirection: a === "vertical" ? "column" : "row",
|
|
996
|
+
gap: a === "vertical" ? "var(--lucent-space-3)" : "var(--lucent-space-4)",
|
|
997
997
|
flexWrap: "wrap"
|
|
998
998
|
},
|
|
999
999
|
children: l
|
|
1000
1000
|
}
|
|
1001
1001
|
) });
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1004
|
-
function
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
!
|
|
1008
|
-
}, [
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
},
|
|
1012
|
-
width:
|
|
1013
|
-
height:
|
|
1003
|
+
const Ve = { sm: 14, md: 16 };
|
|
1004
|
+
function yn({ value: t, label: n, size: r = "md", disabled: o, id: a, onChange: i, checked: l, ...s }) {
|
|
1005
|
+
const d = ie(pe), m = a ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, g = Ve[r], u = o ?? (d == null ? void 0 : d.disabled) ?? !1, f = d ? d.value === t : !!l, c = B(f), [x, y] = q(0);
|
|
1006
|
+
$(() => {
|
|
1007
|
+
!u && c.current !== f && (c.current = f, y((M) => M + 1));
|
|
1008
|
+
}, [f, u]);
|
|
1009
|
+
const b = (M) => {
|
|
1010
|
+
d == null || d.onChange(t), i == null || i(M);
|
|
1011
|
+
}, p = {
|
|
1012
|
+
width: g / 2,
|
|
1013
|
+
height: g / 2,
|
|
1014
1014
|
borderRadius: "50%",
|
|
1015
|
-
background:
|
|
1016
|
-
animation:
|
|
1017
|
-
opacity:
|
|
1018
|
-
},
|
|
1019
|
-
width:
|
|
1020
|
-
height:
|
|
1015
|
+
background: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-on-accent)",
|
|
1016
|
+
animation: f ? "lucent-radio-dot 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0,
|
|
1017
|
+
opacity: f ? 1 : 0
|
|
1018
|
+
}, v = {
|
|
1019
|
+
width: g,
|
|
1020
|
+
height: g,
|
|
1021
1021
|
borderRadius: "50%",
|
|
1022
|
-
border: `1.5px solid ${
|
|
1023
|
-
background:
|
|
1022
|
+
border: `1.5px solid ${u ? "transparent" : f ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
|
|
1023
|
+
background: u ? "var(--lucent-bg-muted)" : f ? "var(--lucent-accent-default)" : "var(--lucent-surface-default)",
|
|
1024
1024
|
display: "inline-flex",
|
|
1025
1025
|
alignItems: "center",
|
|
1026
1026
|
justifyContent: "center",
|
|
1027
1027
|
flexShrink: 0,
|
|
1028
1028
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1029
|
-
animation:
|
|
1029
|
+
animation: x > 0 ? "lucent-radio-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0
|
|
1030
1030
|
};
|
|
1031
|
-
return /* @__PURE__ */ h(
|
|
1031
|
+
return /* @__PURE__ */ h(P, { children: [
|
|
1032
1032
|
/* @__PURE__ */ e("style", { children: $e }),
|
|
1033
1033
|
/* @__PURE__ */ h(
|
|
1034
1034
|
"label",
|
|
@@ -1037,10 +1037,10 @@ function gn({ value: t, label: n, size: a = "md", disabled: o, id: r, onChange:
|
|
|
1037
1037
|
display: "inline-flex",
|
|
1038
1038
|
alignItems: "center",
|
|
1039
1039
|
gap: "var(--lucent-space-2)",
|
|
1040
|
-
cursor:
|
|
1040
|
+
cursor: u ? "not-allowed" : "pointer",
|
|
1041
1041
|
fontFamily: "var(--lucent-font-family-base)",
|
|
1042
|
-
fontSize:
|
|
1043
|
-
color:
|
|
1042
|
+
fontSize: r === "sm" ? "var(--lucent-font-size-sm)" : "var(--lucent-font-size-md)",
|
|
1043
|
+
color: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
1044
1044
|
userSelect: "none"
|
|
1045
1045
|
},
|
|
1046
1046
|
children: [
|
|
@@ -1050,39 +1050,39 @@ function gn({ value: t, label: n, size: a = "md", disabled: o, id: r, onChange:
|
|
|
1050
1050
|
type: "radio",
|
|
1051
1051
|
id: m,
|
|
1052
1052
|
value: t,
|
|
1053
|
-
name: (
|
|
1054
|
-
checked:
|
|
1055
|
-
disabled:
|
|
1056
|
-
onChange:
|
|
1053
|
+
name: (d == null ? void 0 : d.name) ?? s.name,
|
|
1054
|
+
checked: f,
|
|
1055
|
+
disabled: u,
|
|
1056
|
+
onChange: b,
|
|
1057
1057
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
1058
1058
|
...s
|
|
1059
1059
|
}
|
|
1060
1060
|
),
|
|
1061
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !0, style:
|
|
1061
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !0, style: v, children: /* @__PURE__ */ e("span", { style: p }) }, x),
|
|
1062
1062
|
n
|
|
1063
1063
|
]
|
|
1064
1064
|
}
|
|
1065
1065
|
)
|
|
1066
1066
|
] });
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function xn({
|
|
1069
1069
|
defaultValue: t = "",
|
|
1070
1070
|
onChange: n,
|
|
1071
|
-
...
|
|
1071
|
+
...r
|
|
1072
1072
|
}) {
|
|
1073
|
-
const [o,
|
|
1073
|
+
const [o, a] = q(t);
|
|
1074
1074
|
return /* @__PURE__ */ e(
|
|
1075
|
-
|
|
1075
|
+
We,
|
|
1076
1076
|
{
|
|
1077
|
-
...
|
|
1077
|
+
...r,
|
|
1078
1078
|
value: o,
|
|
1079
1079
|
onChange: (i) => {
|
|
1080
|
-
|
|
1080
|
+
a(i), n == null || n(i);
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
);
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1085
|
+
const wn = {
|
|
1086
1086
|
id: "radio",
|
|
1087
1087
|
name: "Radio",
|
|
1088
1088
|
tier: "atom",
|
|
@@ -1159,7 +1159,7 @@ const vn = {
|
|
|
1159
1159
|
"Space — selects the focused radio"
|
|
1160
1160
|
]
|
|
1161
1161
|
}
|
|
1162
|
-
},
|
|
1162
|
+
}, Pe = {
|
|
1163
1163
|
sm: { track: [28, 16], thumb: 12 },
|
|
1164
1164
|
md: { track: [36, 20], thumb: 16 },
|
|
1165
1165
|
lg: { track: [44, 24], thumb: 20 }
|
|
@@ -1171,25 +1171,25 @@ const vn = {
|
|
|
1171
1171
|
100% { transform: scale(1); }
|
|
1172
1172
|
}
|
|
1173
1173
|
`;
|
|
1174
|
-
function
|
|
1174
|
+
function kn({
|
|
1175
1175
|
label: t,
|
|
1176
1176
|
size: n = "md",
|
|
1177
|
-
checked:
|
|
1177
|
+
checked: r,
|
|
1178
1178
|
defaultChecked: o,
|
|
1179
|
-
disabled:
|
|
1179
|
+
disabled: a,
|
|
1180
1180
|
id: i,
|
|
1181
1181
|
onChange: l,
|
|
1182
1182
|
style: s,
|
|
1183
|
-
...
|
|
1183
|
+
...d
|
|
1184
1184
|
}) {
|
|
1185
|
-
const m = i ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`,
|
|
1186
|
-
|
|
1187
|
-
!
|
|
1188
|
-
}, [c,
|
|
1189
|
-
const { track: [
|
|
1190
|
-
|
|
1185
|
+
const m = i ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, g = r !== void 0, [u, f] = q(o ?? !1), c = g ? !!r : u, x = B(c), [y, b] = q(0);
|
|
1186
|
+
$(() => {
|
|
1187
|
+
!a && x.current !== c && (x.current = c, b((E) => E + 1));
|
|
1188
|
+
}, [c, a]);
|
|
1189
|
+
const { track: [p, v], thumb: M } = Pe[n], w = c ? p - M - 2 : 2, S = (E) => {
|
|
1190
|
+
g || f(E.target.checked), l == null || l(E);
|
|
1191
1191
|
};
|
|
1192
|
-
return /* @__PURE__ */ h(
|
|
1192
|
+
return /* @__PURE__ */ h(P, { children: [
|
|
1193
1193
|
/* @__PURE__ */ e("style", { children: Oe }),
|
|
1194
1194
|
/* @__PURE__ */ h(
|
|
1195
1195
|
"label",
|
|
@@ -1198,10 +1198,10 @@ function yn({
|
|
|
1198
1198
|
display: "inline-flex",
|
|
1199
1199
|
alignItems: "center",
|
|
1200
1200
|
gap: "var(--lucent-space-2)",
|
|
1201
|
-
cursor:
|
|
1201
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
1202
1202
|
fontFamily: "var(--lucent-font-family-base)",
|
|
1203
1203
|
fontSize: "var(--lucent-font-size-md)",
|
|
1204
|
-
color:
|
|
1204
|
+
color: a ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
1205
1205
|
userSelect: "none",
|
|
1206
1206
|
...s
|
|
1207
1207
|
},
|
|
@@ -1212,12 +1212,12 @@ function yn({
|
|
|
1212
1212
|
type: "checkbox",
|
|
1213
1213
|
role: "switch",
|
|
1214
1214
|
id: m,
|
|
1215
|
-
checked:
|
|
1216
|
-
disabled:
|
|
1217
|
-
onChange:
|
|
1215
|
+
checked: g ? r : u,
|
|
1216
|
+
disabled: a,
|
|
1217
|
+
onChange: S,
|
|
1218
1218
|
"aria-checked": c,
|
|
1219
1219
|
style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
|
|
1220
|
-
...
|
|
1220
|
+
...d
|
|
1221
1221
|
}
|
|
1222
1222
|
),
|
|
1223
1223
|
/* @__PURE__ */ e(
|
|
@@ -1226,10 +1226,10 @@ function yn({
|
|
|
1226
1226
|
"aria-hidden": !0,
|
|
1227
1227
|
style: {
|
|
1228
1228
|
position: "relative",
|
|
1229
|
-
width:
|
|
1230
|
-
height:
|
|
1231
|
-
borderRadius:
|
|
1232
|
-
background:
|
|
1229
|
+
width: p,
|
|
1230
|
+
height: v,
|
|
1231
|
+
borderRadius: v / 2,
|
|
1232
|
+
background: a ? "var(--lucent-bg-muted)" : c ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)",
|
|
1233
1233
|
flexShrink: 0,
|
|
1234
1234
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1235
1235
|
animation: y > 0 ? `lucent-toggle-pop 240ms ${ee} forwards` : void 0
|
|
@@ -1240,9 +1240,9 @@ function yn({
|
|
|
1240
1240
|
style: {
|
|
1241
1241
|
position: "absolute",
|
|
1242
1242
|
top: 2,
|
|
1243
|
-
left:
|
|
1244
|
-
width:
|
|
1245
|
-
height:
|
|
1243
|
+
left: w,
|
|
1244
|
+
width: M,
|
|
1245
|
+
height: M,
|
|
1246
1246
|
borderRadius: "50%",
|
|
1247
1247
|
background: "#ffffff",
|
|
1248
1248
|
boxShadow: "0 1px 3px rgb(0 0 0 / 0.2)",
|
|
@@ -1259,7 +1259,7 @@ function yn({
|
|
|
1259
1259
|
)
|
|
1260
1260
|
] });
|
|
1261
1261
|
}
|
|
1262
|
-
const
|
|
1262
|
+
const Sn = {
|
|
1263
1263
|
id: "toggle",
|
|
1264
1264
|
name: "Toggle",
|
|
1265
1265
|
tier: "atom",
|
|
@@ -1332,31 +1332,31 @@ const xn = {
|
|
|
1332
1332
|
md: "var(--lucent-font-size-md)",
|
|
1333
1333
|
lg: "var(--lucent-font-size-lg)"
|
|
1334
1334
|
}, Ue = U(
|
|
1335
|
-
({ options: t, size: n = "md", label:
|
|
1336
|
-
const
|
|
1335
|
+
({ options: t, size: n = "md", label: r, helperText: o, errorText: a, placeholder: i, disabled: l, id: s, style: d, ...m }, g) => {
|
|
1336
|
+
const u = s ?? `lucent-select-${Math.random().toString(36).slice(2, 7)}`, f = !!a;
|
|
1337
1337
|
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%" }, children: [
|
|
1338
|
-
|
|
1338
|
+
r && /* @__PURE__ */ e(
|
|
1339
1339
|
"label",
|
|
1340
1340
|
{
|
|
1341
|
-
htmlFor:
|
|
1341
|
+
htmlFor: u,
|
|
1342
1342
|
style: {
|
|
1343
1343
|
fontSize: "var(--lucent-font-size-sm)",
|
|
1344
1344
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
1345
1345
|
color: "var(--lucent-text-primary)",
|
|
1346
1346
|
fontFamily: "var(--lucent-font-family-base)"
|
|
1347
1347
|
},
|
|
1348
|
-
children:
|
|
1348
|
+
children: r
|
|
1349
1349
|
}
|
|
1350
1350
|
),
|
|
1351
1351
|
/* @__PURE__ */ h("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
|
|
1352
1352
|
/* @__PURE__ */ h(
|
|
1353
1353
|
"select",
|
|
1354
1354
|
{
|
|
1355
|
-
ref:
|
|
1356
|
-
id:
|
|
1355
|
+
ref: g,
|
|
1356
|
+
id: u,
|
|
1357
1357
|
disabled: l,
|
|
1358
|
-
"aria-invalid":
|
|
1359
|
-
"aria-describedby":
|
|
1358
|
+
"aria-invalid": f,
|
|
1359
|
+
"aria-describedby": f ? `${u}-error` : o ? `${u}-helper` : void 0,
|
|
1360
1360
|
style: {
|
|
1361
1361
|
width: "100%",
|
|
1362
1362
|
height: He[n],
|
|
@@ -1365,30 +1365,30 @@ const xn = {
|
|
|
1365
1365
|
fontFamily: "var(--lucent-font-family-base)",
|
|
1366
1366
|
color: "var(--lucent-text-primary)",
|
|
1367
1367
|
background: "var(--lucent-surface-default)",
|
|
1368
|
-
border: `1px solid ${
|
|
1368
|
+
border: `1px solid ${f ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"}`,
|
|
1369
1369
|
borderRadius: "var(--lucent-radius-lg)",
|
|
1370
1370
|
outline: "none",
|
|
1371
1371
|
boxSizing: "border-box",
|
|
1372
1372
|
appearance: "none",
|
|
1373
1373
|
cursor: l ? "not-allowed" : "pointer",
|
|
1374
1374
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
1375
|
-
...
|
|
1375
|
+
...d
|
|
1376
1376
|
},
|
|
1377
1377
|
onMouseEnter: (c) => {
|
|
1378
|
-
var
|
|
1379
|
-
!l && c.currentTarget !== document.activeElement && (c.currentTarget.style.borderColor =
|
|
1378
|
+
var x;
|
|
1379
|
+
!l && c.currentTarget !== document.activeElement && (c.currentTarget.style.borderColor = f ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (x = m.onMouseEnter) == null || x.call(m, c);
|
|
1380
1380
|
},
|
|
1381
1381
|
onMouseLeave: (c) => {
|
|
1382
|
-
var
|
|
1383
|
-
!l && c.currentTarget !== document.activeElement && (c.currentTarget.style.borderColor =
|
|
1382
|
+
var x;
|
|
1383
|
+
!l && c.currentTarget !== document.activeElement && (c.currentTarget.style.borderColor = f ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (x = m.onMouseLeave) == null || x.call(m, c);
|
|
1384
1384
|
},
|
|
1385
1385
|
onFocus: (c) => {
|
|
1386
|
-
var
|
|
1387
|
-
c.currentTarget.style.borderColor =
|
|
1386
|
+
var x;
|
|
1387
|
+
c.currentTarget.style.borderColor = f ? "var(--lucent-danger-default)" : "var(--lucent-focus-ring)", c.currentTarget.style.boxShadow = `0 0 0 3px ${f ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (x = m.onFocus) == null || x.call(m, c);
|
|
1388
1388
|
},
|
|
1389
1389
|
onBlur: (c) => {
|
|
1390
|
-
var
|
|
1391
|
-
c.currentTarget.style.borderColor =
|
|
1390
|
+
var x;
|
|
1391
|
+
c.currentTarget.style.borderColor = f ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", c.currentTarget.style.boxShadow = "none", (x = m.onBlur) == null || x.call(m, c);
|
|
1392
1392
|
},
|
|
1393
1393
|
...m,
|
|
1394
1394
|
children: [
|
|
@@ -1413,23 +1413,23 @@ const xn = {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
)
|
|
1415
1415
|
] }),
|
|
1416
|
-
|
|
1416
|
+
f && /* @__PURE__ */ e(
|
|
1417
1417
|
"span",
|
|
1418
1418
|
{
|
|
1419
|
-
id: `${
|
|
1419
|
+
id: `${u}-error`,
|
|
1420
1420
|
role: "alert",
|
|
1421
1421
|
style: {
|
|
1422
1422
|
fontSize: "var(--lucent-font-size-sm)",
|
|
1423
1423
|
color: "var(--lucent-danger-text)",
|
|
1424
1424
|
fontFamily: "var(--lucent-font-family-base)"
|
|
1425
1425
|
},
|
|
1426
|
-
children:
|
|
1426
|
+
children: a
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
|
-
!
|
|
1429
|
+
!f && o && /* @__PURE__ */ e(
|
|
1430
1430
|
"span",
|
|
1431
1431
|
{
|
|
1432
|
-
id: `${
|
|
1432
|
+
id: `${u}-helper`,
|
|
1433
1433
|
style: {
|
|
1434
1434
|
fontSize: "var(--lucent-font-size-sm)",
|
|
1435
1435
|
color: "var(--lucent-text-secondary)",
|
|
@@ -1442,7 +1442,7 @@ const xn = {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
);
|
|
1444
1444
|
Ue.displayName = "Select";
|
|
1445
|
-
const
|
|
1445
|
+
const Tn = {
|
|
1446
1446
|
id: "select",
|
|
1447
1447
|
name: "Select",
|
|
1448
1448
|
tier: "atom",
|
|
@@ -1551,8 +1551,8 @@ const wn = {
|
|
|
1551
1551
|
sm: { fontSize: "var(--lucent-font-size-xs)", height: "20px", padding: "0 var(--lucent-space-2)", iconSize: 10, gap: "var(--lucent-space-1)" },
|
|
1552
1552
|
md: { fontSize: "var(--lucent-font-size-sm)", height: "24px", padding: "0 var(--lucent-space-2)", iconSize: 12, gap: "var(--lucent-space-1)" }
|
|
1553
1553
|
};
|
|
1554
|
-
function
|
|
1555
|
-
const i = Ge[n], l = _e[
|
|
1554
|
+
function Cn({ children: t, variant: n = "neutral", size: r = "md", onDismiss: o, disabled: a }) {
|
|
1555
|
+
const i = Ge[n], l = _e[r];
|
|
1556
1556
|
return /* @__PURE__ */ h(
|
|
1557
1557
|
"span",
|
|
1558
1558
|
{
|
|
@@ -1572,7 +1572,7 @@ function kn({ children: t, variant: n = "neutral", size: a = "md", onDismiss: o,
|
|
|
1572
1572
|
border: `1px solid ${i.border}`,
|
|
1573
1573
|
whiteSpace: "nowrap",
|
|
1574
1574
|
boxSizing: "border-box",
|
|
1575
|
-
opacity:
|
|
1575
|
+
opacity: a ? 0.5 : 1
|
|
1576
1576
|
},
|
|
1577
1577
|
children: [
|
|
1578
1578
|
t,
|
|
@@ -1580,8 +1580,8 @@ function kn({ children: t, variant: n = "neutral", size: a = "md", onDismiss: o,
|
|
|
1580
1580
|
"button",
|
|
1581
1581
|
{
|
|
1582
1582
|
type: "button",
|
|
1583
|
-
onClick:
|
|
1584
|
-
disabled:
|
|
1583
|
+
onClick: a ? void 0 : o,
|
|
1584
|
+
disabled: a,
|
|
1585
1585
|
"aria-label": "Dismiss",
|
|
1586
1586
|
style: {
|
|
1587
1587
|
display: "inline-flex",
|
|
@@ -1594,12 +1594,12 @@ function kn({ children: t, variant: n = "neutral", size: a = "md", onDismiss: o,
|
|
|
1594
1594
|
borderRadius: "var(--lucent-radius-full)",
|
|
1595
1595
|
background: "transparent",
|
|
1596
1596
|
color: "inherit",
|
|
1597
|
-
cursor:
|
|
1597
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
1598
1598
|
flexShrink: 0,
|
|
1599
1599
|
lineHeight: 1
|
|
1600
1600
|
},
|
|
1601
1601
|
onMouseEnter: (s) => {
|
|
1602
|
-
|
|
1602
|
+
a || (s.currentTarget.style.background = i.dismissHover + "33");
|
|
1603
1603
|
},
|
|
1604
1604
|
onMouseLeave: (s) => {
|
|
1605
1605
|
s.currentTarget.style.background = "transparent";
|
|
@@ -1611,7 +1611,7 @@ function kn({ children: t, variant: n = "neutral", size: a = "md", onDismiss: o,
|
|
|
1611
1611
|
}
|
|
1612
1612
|
);
|
|
1613
1613
|
}
|
|
1614
|
-
const
|
|
1614
|
+
const In = {
|
|
1615
1615
|
id: "tag",
|
|
1616
1616
|
name: "Tag",
|
|
1617
1617
|
tier: "atom",
|
|
@@ -1668,45 +1668,45 @@ const Sn = {
|
|
|
1668
1668
|
notes: 'The dismiss button has aria-label="Dismiss" and is keyboard-focusable.',
|
|
1669
1669
|
keyboardInteractions: ["Enter / Space — activates the dismiss button when focused"]
|
|
1670
1670
|
}
|
|
1671
|
-
},
|
|
1672
|
-
top: { bottom: "100%", left: "50%", transform: "translateX(-50%)", marginBottom:
|
|
1673
|
-
bottom: { top: "100%", left: "50%", transform: "translateX(-50%)", marginTop:
|
|
1674
|
-
left: { right: "100%", top: "50%", transform: "translateY(-50%)", marginRight:
|
|
1675
|
-
right: { left: "100%", top: "50%", transform: "translateY(-50%)", marginLeft:
|
|
1671
|
+
}, N = 5, Ye = {
|
|
1672
|
+
top: { bottom: "100%", left: "50%", transform: "translateX(-50%)", marginBottom: N + 3 },
|
|
1673
|
+
bottom: { top: "100%", left: "50%", transform: "translateX(-50%)", marginTop: N + 3 },
|
|
1674
|
+
left: { right: "100%", top: "50%", transform: "translateY(-50%)", marginRight: N + 3 },
|
|
1675
|
+
right: { left: "100%", top: "50%", transform: "translateY(-50%)", marginLeft: N + 3 }
|
|
1676
1676
|
}, Ke = {
|
|
1677
1677
|
top: {
|
|
1678
|
-
bottom: -
|
|
1678
|
+
bottom: -N,
|
|
1679
1679
|
left: "50%",
|
|
1680
1680
|
transform: "translateX(-50%)",
|
|
1681
|
-
borderWidth: `${
|
|
1681
|
+
borderWidth: `${N}px ${N}px 0 ${N}px`,
|
|
1682
1682
|
borderColor: "var(--lucent-text-primary) transparent transparent transparent"
|
|
1683
1683
|
},
|
|
1684
1684
|
bottom: {
|
|
1685
|
-
top: -
|
|
1685
|
+
top: -N,
|
|
1686
1686
|
left: "50%",
|
|
1687
1687
|
transform: "translateX(-50%)",
|
|
1688
|
-
borderWidth: `0 ${
|
|
1688
|
+
borderWidth: `0 ${N}px ${N}px ${N}px`,
|
|
1689
1689
|
borderColor: "transparent transparent var(--lucent-text-primary) transparent"
|
|
1690
1690
|
},
|
|
1691
1691
|
left: {
|
|
1692
|
-
right: -
|
|
1692
|
+
right: -N,
|
|
1693
1693
|
top: "50%",
|
|
1694
1694
|
transform: "translateY(-50%)",
|
|
1695
|
-
borderWidth: `${
|
|
1695
|
+
borderWidth: `${N}px 0 ${N}px ${N}px`,
|
|
1696
1696
|
borderColor: "transparent transparent transparent var(--lucent-text-primary)"
|
|
1697
1697
|
},
|
|
1698
1698
|
right: {
|
|
1699
|
-
left: -
|
|
1699
|
+
left: -N,
|
|
1700
1700
|
top: "50%",
|
|
1701
1701
|
transform: "translateY(-50%)",
|
|
1702
|
-
borderWidth: `${
|
|
1702
|
+
borderWidth: `${N}px ${N}px ${N}px 0`,
|
|
1703
1703
|
borderColor: "transparent var(--lucent-text-primary) transparent transparent"
|
|
1704
1704
|
}
|
|
1705
1705
|
};
|
|
1706
|
-
function
|
|
1707
|
-
const [
|
|
1706
|
+
function Mn({ content: t, children: n, placement: r = "top", delay: o = 300 }) {
|
|
1707
|
+
const [a, i] = q(!1), l = B(null), s = () => {
|
|
1708
1708
|
l.current = setTimeout(() => i(!0), o);
|
|
1709
|
-
},
|
|
1709
|
+
}, d = () => {
|
|
1710
1710
|
l.current && clearTimeout(l.current), i(!1);
|
|
1711
1711
|
};
|
|
1712
1712
|
return t ? /* @__PURE__ */ h(
|
|
@@ -1714,18 +1714,18 @@ function Tn({ content: t, children: n, placement: a = "top", delay: o = 300 }) {
|
|
|
1714
1714
|
{
|
|
1715
1715
|
style: { position: "relative", display: "inline-flex" },
|
|
1716
1716
|
onMouseEnter: s,
|
|
1717
|
-
onMouseLeave:
|
|
1717
|
+
onMouseLeave: d,
|
|
1718
1718
|
onFocus: s,
|
|
1719
|
-
onBlur:
|
|
1719
|
+
onBlur: d,
|
|
1720
1720
|
children: [
|
|
1721
1721
|
n,
|
|
1722
|
-
|
|
1722
|
+
a && /* @__PURE__ */ h(
|
|
1723
1723
|
"span",
|
|
1724
1724
|
{
|
|
1725
1725
|
role: "tooltip",
|
|
1726
1726
|
style: {
|
|
1727
1727
|
position: "absolute",
|
|
1728
|
-
...Ye[
|
|
1728
|
+
...Ye[r],
|
|
1729
1729
|
background: "var(--lucent-text-primary)",
|
|
1730
1730
|
color: "var(--lucent-bg-base)",
|
|
1731
1731
|
padding: "5px 10px",
|
|
@@ -1750,7 +1750,7 @@ function Tn({ content: t, children: n, placement: a = "top", delay: o = 300 }) {
|
|
|
1750
1750
|
width: 0,
|
|
1751
1751
|
height: 0,
|
|
1752
1752
|
borderStyle: "solid",
|
|
1753
|
-
...Ke[
|
|
1753
|
+
...Ke[r]
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
1756
|
)
|
|
@@ -1759,9 +1759,9 @@ function Tn({ content: t, children: n, placement: a = "top", delay: o = 300 }) {
|
|
|
1759
1759
|
)
|
|
1760
1760
|
]
|
|
1761
1761
|
}
|
|
1762
|
-
) : /* @__PURE__ */ e(
|
|
1762
|
+
) : /* @__PURE__ */ e(P, { children: n });
|
|
1763
1763
|
}
|
|
1764
|
-
const
|
|
1764
|
+
const zn = {
|
|
1765
1765
|
id: "tooltip",
|
|
1766
1766
|
name: "Tooltip",
|
|
1767
1767
|
tier: "atom",
|
|
@@ -1817,14 +1817,14 @@ const Cn = {
|
|
|
1817
1817
|
lg: 20,
|
|
1818
1818
|
xl: 24
|
|
1819
1819
|
};
|
|
1820
|
-
function
|
|
1820
|
+
function En({ children: t, size: n = "md", label: r, color: o, style: a }) {
|
|
1821
1821
|
const i = Xe[n];
|
|
1822
1822
|
return /* @__PURE__ */ e(
|
|
1823
1823
|
"span",
|
|
1824
1824
|
{
|
|
1825
|
-
role:
|
|
1826
|
-
"aria-label":
|
|
1827
|
-
"aria-hidden":
|
|
1825
|
+
role: r ? "img" : void 0,
|
|
1826
|
+
"aria-label": r,
|
|
1827
|
+
"aria-hidden": r ? void 0 : !0,
|
|
1828
1828
|
style: {
|
|
1829
1829
|
display: "inline-flex",
|
|
1830
1830
|
alignItems: "center",
|
|
@@ -1833,13 +1833,13 @@ function In({ children: t, size: n = "md", label: a, color: o, style: r }) {
|
|
|
1833
1833
|
height: i,
|
|
1834
1834
|
flexShrink: 0,
|
|
1835
1835
|
color: o ?? "currentColor",
|
|
1836
|
-
...
|
|
1836
|
+
...a
|
|
1837
1837
|
},
|
|
1838
1838
|
children: t
|
|
1839
1839
|
}
|
|
1840
1840
|
);
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1842
|
+
const qn = {
|
|
1843
1843
|
id: "icon",
|
|
1844
1844
|
name: "Icon",
|
|
1845
1845
|
tier: "atom",
|
|
@@ -1919,24 +1919,24 @@ const Mn = {
|
|
|
1919
1919
|
mono: "var(--lucent-font-family-mono)",
|
|
1920
1920
|
display: "var(--lucent-font-family-display)"
|
|
1921
1921
|
};
|
|
1922
|
-
function
|
|
1922
|
+
function A({
|
|
1923
1923
|
as: t = "p",
|
|
1924
1924
|
size: n = "md",
|
|
1925
|
-
weight:
|
|
1925
|
+
weight: r = "regular",
|
|
1926
1926
|
color: o = "primary",
|
|
1927
|
-
align:
|
|
1927
|
+
align: a = "left",
|
|
1928
1928
|
lineHeight: i = "base",
|
|
1929
1929
|
family: l = "base",
|
|
1930
1930
|
truncate: s = !1,
|
|
1931
|
-
children:
|
|
1931
|
+
children: d,
|
|
1932
1932
|
style: m,
|
|
1933
|
-
...
|
|
1933
|
+
...g
|
|
1934
1934
|
}) {
|
|
1935
|
-
const
|
|
1935
|
+
const u = {
|
|
1936
1936
|
fontSize: Qe[n],
|
|
1937
|
-
fontWeight: Ze[
|
|
1937
|
+
fontWeight: Ze[r],
|
|
1938
1938
|
color: Je[o],
|
|
1939
|
-
textAlign:
|
|
1939
|
+
textAlign: a,
|
|
1940
1940
|
lineHeight: et[i],
|
|
1941
1941
|
fontFamily: tt[l],
|
|
1942
1942
|
margin: 0,
|
|
@@ -1947,9 +1947,9 @@ function E({
|
|
|
1947
1947
|
},
|
|
1948
1948
|
...m
|
|
1949
1949
|
};
|
|
1950
|
-
return /* @__PURE__ */ e(t, { style:
|
|
1950
|
+
return /* @__PURE__ */ e(t, { style: u, ...g, children: d });
|
|
1951
1951
|
}
|
|
1952
|
-
const
|
|
1952
|
+
const An = {
|
|
1953
1953
|
id: "text",
|
|
1954
1954
|
name: "Text",
|
|
1955
1955
|
tier: "atom",
|
|
@@ -2047,12 +2047,12 @@ const zn = {
|
|
|
2047
2047
|
notes: 'The rendered element determines the implicit ARIA role. Use heading elements (h1–h6) for document headings so screen readers can navigate the page structure. Use `as="label"` with `htmlFor` to associate labels with form controls. Decorative text needs no additional ARIA.'
|
|
2048
2048
|
}
|
|
2049
2049
|
};
|
|
2050
|
-
function
|
|
2050
|
+
function Dn({
|
|
2051
2051
|
children: t,
|
|
2052
2052
|
href: n,
|
|
2053
|
-
isActive:
|
|
2053
|
+
isActive: r = !1,
|
|
2054
2054
|
icon: o,
|
|
2055
|
-
disabled:
|
|
2055
|
+
disabled: a = !1,
|
|
2056
2056
|
onClick: i,
|
|
2057
2057
|
as: l,
|
|
2058
2058
|
style: s
|
|
@@ -2060,33 +2060,33 @@ function qn({
|
|
|
2060
2060
|
return /* @__PURE__ */ h(
|
|
2061
2061
|
l ?? "a",
|
|
2062
2062
|
{
|
|
2063
|
-
href:
|
|
2064
|
-
onClick:
|
|
2065
|
-
"aria-current":
|
|
2066
|
-
"aria-disabled":
|
|
2063
|
+
href: a ? void 0 : n,
|
|
2064
|
+
onClick: a ? void 0 : i,
|
|
2065
|
+
"aria-current": r ? "page" : void 0,
|
|
2066
|
+
"aria-disabled": a || void 0,
|
|
2067
2067
|
style: {
|
|
2068
2068
|
display: "flex",
|
|
2069
2069
|
alignItems: "center",
|
|
2070
2070
|
gap: "var(--lucent-space-2)",
|
|
2071
2071
|
padding: "var(--lucent-space-2) var(--lucent-space-3) var(--lucent-space-2) var(--lucent-space-4)",
|
|
2072
2072
|
borderRadius: "var(--lucent-radius-md)",
|
|
2073
|
-
background:
|
|
2074
|
-
color:
|
|
2073
|
+
background: a ? "transparent" : r ? "var(--lucent-accent-default)" : "transparent",
|
|
2074
|
+
color: a ? "var(--lucent-text-disabled)" : r ? "var(--lucent-text-on-accent)" : "var(--lucent-text-secondary)",
|
|
2075
2075
|
fontFamily: "var(--lucent-font-family-base)",
|
|
2076
2076
|
fontSize: "var(--lucent-font-size-md)",
|
|
2077
|
-
fontWeight:
|
|
2077
|
+
fontWeight: r ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
2078
2078
|
textDecoration: "none",
|
|
2079
|
-
cursor:
|
|
2079
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
2080
2080
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
2081
2081
|
userSelect: "none",
|
|
2082
2082
|
boxSizing: "border-box",
|
|
2083
2083
|
...s
|
|
2084
2084
|
},
|
|
2085
2085
|
onMouseEnter: (m) => {
|
|
2086
|
-
!
|
|
2086
|
+
!a && !r && (m.currentTarget.style.background = "var(--lucent-bg-muted)");
|
|
2087
2087
|
},
|
|
2088
2088
|
onMouseLeave: (m) => {
|
|
2089
|
-
!
|
|
2089
|
+
!a && !r && (m.currentTarget.style.background = "transparent");
|
|
2090
2090
|
},
|
|
2091
2091
|
children: [
|
|
2092
2092
|
o != null && /* @__PURE__ */ e("span", { style: { display: "flex", flexShrink: 0, color: "inherit" }, children: o }),
|
|
@@ -2095,7 +2095,7 @@ function qn({
|
|
|
2095
2095
|
}
|
|
2096
2096
|
);
|
|
2097
2097
|
}
|
|
2098
|
-
const nt = { sm: "3px", md: "4px", lg: "5px" },
|
|
2098
|
+
const nt = { sm: "3px", md: "4px", lg: "5px" }, rt = { sm: "14px", md: "18px", lg: "22px" }, at = `
|
|
2099
2099
|
.lucent-slider {
|
|
2100
2100
|
-webkit-appearance: none;
|
|
2101
2101
|
appearance: none;
|
|
@@ -2189,28 +2189,28 @@ const nt = { sm: "3px", md: "4px", lg: "5px" }, at = { sm: "14px", md: "18px", l
|
|
|
2189
2189
|
cursor: not-allowed;
|
|
2190
2190
|
}
|
|
2191
2191
|
`;
|
|
2192
|
-
function
|
|
2192
|
+
function Fn({
|
|
2193
2193
|
label: t,
|
|
2194
2194
|
showValue: n = !1,
|
|
2195
|
-
size:
|
|
2195
|
+
size: r = "md",
|
|
2196
2196
|
min: o = 0,
|
|
2197
|
-
max:
|
|
2197
|
+
max: a = 100,
|
|
2198
2198
|
step: i = 1,
|
|
2199
2199
|
value: l,
|
|
2200
2200
|
defaultValue: s,
|
|
2201
|
-
disabled:
|
|
2201
|
+
disabled: d,
|
|
2202
2202
|
id: m,
|
|
2203
|
-
onChange:
|
|
2204
|
-
style:
|
|
2205
|
-
...
|
|
2203
|
+
onChange: g,
|
|
2204
|
+
style: u,
|
|
2205
|
+
...f
|
|
2206
2206
|
}) {
|
|
2207
|
-
const c = m ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`,
|
|
2208
|
-
s ?? Math.round((o +
|
|
2209
|
-
),
|
|
2210
|
-
|
|
2207
|
+
const c = m ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`, x = l !== void 0, [y, b] = q(
|
|
2208
|
+
s ?? Math.round((o + a) / 2)
|
|
2209
|
+
), p = x ? l : y, v = `${(p - o) / (a - o) * 100}%`, M = (w) => {
|
|
2210
|
+
x || b(Number(w.target.value)), g == null || g(w);
|
|
2211
2211
|
};
|
|
2212
|
-
return /* @__PURE__ */ h(
|
|
2213
|
-
/* @__PURE__ */ e("style", { children:
|
|
2212
|
+
return /* @__PURE__ */ h(P, { children: [
|
|
2213
|
+
/* @__PURE__ */ e("style", { children: at }),
|
|
2214
2214
|
/* @__PURE__ */ h(
|
|
2215
2215
|
"div",
|
|
2216
2216
|
{
|
|
@@ -2220,7 +2220,7 @@ function En({
|
|
|
2220
2220
|
gap: "var(--lucent-space-1)",
|
|
2221
2221
|
width: "100%",
|
|
2222
2222
|
fontFamily: "var(--lucent-font-family-base)",
|
|
2223
|
-
...
|
|
2223
|
+
...u
|
|
2224
2224
|
},
|
|
2225
2225
|
children: [
|
|
2226
2226
|
(t || n) && /* @__PURE__ */ h(
|
|
@@ -2239,8 +2239,8 @@ function En({
|
|
|
2239
2239
|
style: {
|
|
2240
2240
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2241
2241
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
2242
|
-
color:
|
|
2243
|
-
cursor:
|
|
2242
|
+
color: d ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
2243
|
+
cursor: d ? "not-allowed" : "default"
|
|
2244
2244
|
},
|
|
2245
2245
|
children: t
|
|
2246
2246
|
}
|
|
@@ -2250,10 +2250,10 @@ function En({
|
|
|
2250
2250
|
{
|
|
2251
2251
|
style: {
|
|
2252
2252
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2253
|
-
color:
|
|
2253
|
+
color: d ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
|
|
2254
2254
|
fontVariantNumeric: "tabular-nums"
|
|
2255
2255
|
},
|
|
2256
|
-
children:
|
|
2256
|
+
children: p
|
|
2257
2257
|
}
|
|
2258
2258
|
)
|
|
2259
2259
|
]
|
|
@@ -2266,17 +2266,17 @@ function En({
|
|
|
2266
2266
|
id: c,
|
|
2267
2267
|
className: "lucent-slider",
|
|
2268
2268
|
min: o,
|
|
2269
|
-
max:
|
|
2269
|
+
max: a,
|
|
2270
2270
|
step: i,
|
|
2271
|
-
disabled:
|
|
2272
|
-
value:
|
|
2273
|
-
onChange:
|
|
2271
|
+
disabled: d,
|
|
2272
|
+
value: x ? l : y,
|
|
2273
|
+
onChange: M,
|
|
2274
2274
|
style: {
|
|
2275
|
-
"--ls-track-h": nt[
|
|
2276
|
-
"--ls-thumb":
|
|
2277
|
-
"--ls-fill":
|
|
2275
|
+
"--ls-track-h": nt[r],
|
|
2276
|
+
"--ls-thumb": rt[r],
|
|
2277
|
+
"--ls-fill": v
|
|
2278
2278
|
},
|
|
2279
|
-
...
|
|
2279
|
+
...f
|
|
2280
2280
|
}
|
|
2281
2281
|
)
|
|
2282
2282
|
]
|
|
@@ -2284,7 +2284,7 @@ function En({
|
|
|
2284
2284
|
)
|
|
2285
2285
|
] });
|
|
2286
2286
|
}
|
|
2287
|
-
const
|
|
2287
|
+
const Bn = {
|
|
2288
2288
|
id: "slider",
|
|
2289
2289
|
name: "Slider",
|
|
2290
2290
|
tier: "atom",
|
|
@@ -2390,19 +2390,19 @@ function it() {
|
|
|
2390
2390
|
function lt() {
|
|
2391
2391
|
return /* @__PURE__ */ e("svg", { width: 13, height: 13, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: /* @__PURE__ */ e("path", { d: "M20 6L9 17l-5-5" }) });
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2393
|
+
function Rn({
|
|
2394
2394
|
code: t,
|
|
2395
2395
|
language: n,
|
|
2396
|
-
tabs:
|
|
2396
|
+
tabs: r,
|
|
2397
2397
|
variant: o = "code",
|
|
2398
|
-
helperText:
|
|
2398
|
+
helperText: a,
|
|
2399
2399
|
showCopyButton: i = !0,
|
|
2400
2400
|
style: l
|
|
2401
2401
|
}) {
|
|
2402
|
-
var
|
|
2403
|
-
const s = !!(
|
|
2402
|
+
var p, v;
|
|
2403
|
+
const s = !!(r != null && r.length), [d, m] = q(0), [g, u] = q(!1), f = s ? ((p = r[d]) == null ? void 0 : p.code) ?? "" : t ?? "", c = s ? (v = r[d]) == null ? void 0 : v.language : n, x = async () => {
|
|
2404
2404
|
try {
|
|
2405
|
-
await navigator.clipboard.writeText(
|
|
2405
|
+
await navigator.clipboard.writeText(f), u(!0), setTimeout(() => u(!1), ot);
|
|
2406
2406
|
} catch {
|
|
2407
2407
|
}
|
|
2408
2408
|
}, y = {
|
|
@@ -2413,27 +2413,27 @@ function An({
|
|
|
2413
2413
|
border: "1px solid transparent",
|
|
2414
2414
|
borderRadius: "var(--lucent-radius-md)",
|
|
2415
2415
|
background: "transparent",
|
|
2416
|
-
color:
|
|
2416
|
+
color: g ? "var(--lucent-success-default)" : "var(--lucent-text-secondary)",
|
|
2417
2417
|
fontFamily: "var(--lucent-font-family-base)",
|
|
2418
2418
|
fontSize: "var(--lucent-font-size-xs)",
|
|
2419
2419
|
cursor: "pointer",
|
|
2420
2420
|
flexShrink: 0,
|
|
2421
2421
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
2422
|
-
},
|
|
2422
|
+
}, b = () => /* @__PURE__ */ h(
|
|
2423
2423
|
"button",
|
|
2424
2424
|
{
|
|
2425
|
-
onClick:
|
|
2426
|
-
"aria-label":
|
|
2425
|
+
onClick: x,
|
|
2426
|
+
"aria-label": g ? "Copied!" : "Copy code",
|
|
2427
2427
|
style: y,
|
|
2428
|
-
onMouseEnter: (
|
|
2429
|
-
|
|
2428
|
+
onMouseEnter: (M) => {
|
|
2429
|
+
g || (M.currentTarget.style.background = "var(--lucent-bg-hover)", M.currentTarget.style.color = "var(--lucent-text-primary)");
|
|
2430
2430
|
},
|
|
2431
|
-
onMouseLeave: (
|
|
2432
|
-
|
|
2431
|
+
onMouseLeave: (M) => {
|
|
2432
|
+
g || (M.currentTarget.style.background = "transparent", M.currentTarget.style.color = "var(--lucent-text-secondary)");
|
|
2433
2433
|
},
|
|
2434
2434
|
children: [
|
|
2435
|
-
|
|
2436
|
-
|
|
2435
|
+
g ? /* @__PURE__ */ e(lt, {}) : /* @__PURE__ */ e(it, {}),
|
|
2436
|
+
g ? "Copied!" : "Copy"
|
|
2437
2437
|
]
|
|
2438
2438
|
}
|
|
2439
2439
|
);
|
|
@@ -2457,13 +2457,13 @@ function An({
|
|
|
2457
2457
|
borderBottom: "1px solid var(--lucent-border-default)",
|
|
2458
2458
|
padding: "0 var(--lucent-space-2)"
|
|
2459
2459
|
},
|
|
2460
|
-
children:
|
|
2461
|
-
const
|
|
2460
|
+
children: r.map((M, w) => {
|
|
2461
|
+
const S = w === d;
|
|
2462
2462
|
return /* @__PURE__ */ h(
|
|
2463
2463
|
"button",
|
|
2464
2464
|
{
|
|
2465
2465
|
onClick: () => {
|
|
2466
|
-
m(
|
|
2466
|
+
m(w), u(!1);
|
|
2467
2467
|
},
|
|
2468
2468
|
style: {
|
|
2469
2469
|
display: "inline-flex",
|
|
@@ -2471,29 +2471,29 @@ function An({
|
|
|
2471
2471
|
gap: "var(--lucent-space-1)",
|
|
2472
2472
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
2473
2473
|
border: "none",
|
|
2474
|
-
borderBottom:
|
|
2474
|
+
borderBottom: S ? "2px solid var(--lucent-accent-default)" : "2px solid transparent",
|
|
2475
2475
|
marginBottom: -1,
|
|
2476
2476
|
background: "transparent",
|
|
2477
|
-
color:
|
|
2477
|
+
color: S ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
2478
2478
|
fontFamily: "var(--lucent-font-family-base)",
|
|
2479
2479
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2480
|
-
fontWeight:
|
|
2480
|
+
fontWeight: S ? "var(--lucent-font-weight-semibold)" : "var(--lucent-font-weight-regular)",
|
|
2481
2481
|
cursor: "pointer",
|
|
2482
2482
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
2483
2483
|
whiteSpace: "nowrap"
|
|
2484
2484
|
},
|
|
2485
|
-
onMouseEnter: (
|
|
2486
|
-
|
|
2485
|
+
onMouseEnter: (E) => {
|
|
2486
|
+
S || (E.currentTarget.style.color = "var(--lucent-text-primary)");
|
|
2487
2487
|
},
|
|
2488
|
-
onMouseLeave: (
|
|
2489
|
-
|
|
2488
|
+
onMouseLeave: (E) => {
|
|
2489
|
+
S || (E.currentTarget.style.color = "var(--lucent-text-secondary)");
|
|
2490
2490
|
},
|
|
2491
2491
|
children: [
|
|
2492
|
-
|
|
2493
|
-
|
|
2492
|
+
M.icon !== void 0 && /* @__PURE__ */ e("span", { style: { display: "inline-flex", alignItems: "center" }, children: M.icon }),
|
|
2493
|
+
M.label
|
|
2494
2494
|
]
|
|
2495
2495
|
},
|
|
2496
|
-
|
|
2496
|
+
M.label
|
|
2497
2497
|
);
|
|
2498
2498
|
})
|
|
2499
2499
|
}
|
|
@@ -2523,11 +2523,11 @@ function An({
|
|
|
2523
2523
|
children: c
|
|
2524
2524
|
}
|
|
2525
2525
|
),
|
|
2526
|
-
i && /* @__PURE__ */ e(
|
|
2526
|
+
i && /* @__PURE__ */ e(b, {})
|
|
2527
2527
|
]
|
|
2528
2528
|
}
|
|
2529
2529
|
),
|
|
2530
|
-
|
|
2530
|
+
a && /* @__PURE__ */ e(
|
|
2531
2531
|
"div",
|
|
2532
2532
|
{
|
|
2533
2533
|
style: {
|
|
@@ -2538,7 +2538,7 @@ function An({
|
|
|
2538
2538
|
background: "var(--lucent-bg-muted)",
|
|
2539
2539
|
borderBottom: "1px solid var(--lucent-border-default)"
|
|
2540
2540
|
},
|
|
2541
|
-
children:
|
|
2541
|
+
children: a
|
|
2542
2542
|
}
|
|
2543
2543
|
),
|
|
2544
2544
|
o === "code" ? /* @__PURE__ */ h("div", { style: { position: "relative" }, children: [
|
|
@@ -2561,12 +2561,12 @@ function An({
|
|
|
2561
2561
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2562
2562
|
color: "var(--lucent-text-primary)"
|
|
2563
2563
|
},
|
|
2564
|
-
children:
|
|
2564
|
+
children: f
|
|
2565
2565
|
}
|
|
2566
2566
|
)
|
|
2567
2567
|
}
|
|
2568
2568
|
),
|
|
2569
|
-
s && i && /* @__PURE__ */ e("div", { style: { position: "absolute", top: "var(--lucent-space-2)", right: "var(--lucent-space-3)" }, children: /* @__PURE__ */ e(
|
|
2569
|
+
s && i && /* @__PURE__ */ e("div", { style: { position: "absolute", top: "var(--lucent-space-2)", right: "var(--lucent-space-3)" }, children: /* @__PURE__ */ e(b, {}) })
|
|
2570
2570
|
] }) : (
|
|
2571
2571
|
/* ── Prompt area ── */
|
|
2572
2572
|
/* @__PURE__ */ h(
|
|
@@ -2592,10 +2592,10 @@ function An({
|
|
|
2592
2592
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2593
2593
|
color: "var(--lucent-text-primary)"
|
|
2594
2594
|
},
|
|
2595
|
-
children:
|
|
2595
|
+
children: f
|
|
2596
2596
|
}
|
|
2597
2597
|
),
|
|
2598
|
-
i && /* @__PURE__ */ e(
|
|
2598
|
+
i && /* @__PURE__ */ e(b, {})
|
|
2599
2599
|
]
|
|
2600
2600
|
}
|
|
2601
2601
|
)
|
|
@@ -2604,7 +2604,7 @@ function An({
|
|
|
2604
2604
|
}
|
|
2605
2605
|
);
|
|
2606
2606
|
}
|
|
2607
|
-
const
|
|
2607
|
+
const Nn = {
|
|
2608
2608
|
id: "code-block",
|
|
2609
2609
|
name: "CodeBlock",
|
|
2610
2610
|
tier: "atom",
|
|
@@ -2696,7 +2696,7 @@ const Fn = {
|
|
|
2696
2696
|
background: var(--lucent-bg-muted);
|
|
2697
2697
|
}
|
|
2698
2698
|
`;
|
|
2699
|
-
function ct({ children: t, style: n, ...
|
|
2699
|
+
function ct({ children: t, style: n, ...r }) {
|
|
2700
2700
|
return /* @__PURE__ */ e(
|
|
2701
2701
|
"thead",
|
|
2702
2702
|
{
|
|
@@ -2704,7 +2704,7 @@ function ct({ children: t, style: n, ...a }) {
|
|
|
2704
2704
|
background: "var(--lucent-bg-muted)",
|
|
2705
2705
|
...n
|
|
2706
2706
|
},
|
|
2707
|
-
...
|
|
2707
|
+
...r,
|
|
2708
2708
|
children: t
|
|
2709
2709
|
}
|
|
2710
2710
|
);
|
|
@@ -2712,7 +2712,7 @@ function ct({ children: t, style: n, ...a }) {
|
|
|
2712
2712
|
function dt({ children: t, ...n }) {
|
|
2713
2713
|
return /* @__PURE__ */ e("tbody", { ...n, children: t });
|
|
2714
2714
|
}
|
|
2715
|
-
function ut({ children: t, style: n, ...
|
|
2715
|
+
function ut({ children: t, style: n, ...r }) {
|
|
2716
2716
|
return /* @__PURE__ */ e(
|
|
2717
2717
|
"tfoot",
|
|
2718
2718
|
{
|
|
@@ -2720,43 +2720,43 @@ function ut({ children: t, style: n, ...a }) {
|
|
|
2720
2720
|
background: "var(--lucent-bg-muted)",
|
|
2721
2721
|
...n
|
|
2722
2722
|
},
|
|
2723
|
-
...
|
|
2723
|
+
...r,
|
|
2724
2724
|
children: t
|
|
2725
2725
|
}
|
|
2726
2726
|
);
|
|
2727
2727
|
}
|
|
2728
|
-
function pt({ children: t, className: n, ...
|
|
2728
|
+
function pt({ children: t, className: n, ...r }) {
|
|
2729
2729
|
return /* @__PURE__ */ e(
|
|
2730
2730
|
"tr",
|
|
2731
2731
|
{
|
|
2732
2732
|
className: ["lucent-table-row", n].filter(Boolean).join(" "),
|
|
2733
|
-
...
|
|
2733
|
+
...r,
|
|
2734
2734
|
children: t
|
|
2735
2735
|
}
|
|
2736
2736
|
);
|
|
2737
2737
|
}
|
|
2738
|
-
function ft({ as: t, children: n, style:
|
|
2739
|
-
const
|
|
2738
|
+
function ft({ as: t, children: n, style: r, ...o }) {
|
|
2739
|
+
const a = t === "th", i = {
|
|
2740
2740
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
2741
2741
|
fontFamily: "var(--lucent-font-family-base)",
|
|
2742
2742
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2743
2743
|
borderBottom: "1px solid var(--lucent-border-default)",
|
|
2744
2744
|
textAlign: "left",
|
|
2745
2745
|
verticalAlign: "middle",
|
|
2746
|
-
color:
|
|
2747
|
-
fontWeight:
|
|
2748
|
-
whiteSpace:
|
|
2749
|
-
...
|
|
2746
|
+
color: a ? "var(--lucent-text-secondary)" : "var(--lucent-text-primary)",
|
|
2747
|
+
fontWeight: a ? "var(--lucent-font-weight-semibold)" : "var(--lucent-font-weight-regular)",
|
|
2748
|
+
whiteSpace: a ? "nowrap" : void 0,
|
|
2749
|
+
...r
|
|
2750
2750
|
};
|
|
2751
|
-
return
|
|
2751
|
+
return a ? /* @__PURE__ */ e("th", { scope: "col", style: i, ...o, children: n }) : /* @__PURE__ */ e("td", { style: i, ...o, children: n });
|
|
2752
2752
|
}
|
|
2753
|
-
function G({ striped: t = !1, children: n, className:
|
|
2753
|
+
function G({ striped: t = !1, children: n, className: r, style: o, ...a }) {
|
|
2754
2754
|
const i = [
|
|
2755
2755
|
"lucent-table",
|
|
2756
2756
|
t && "lucent-table-striped",
|
|
2757
|
-
|
|
2757
|
+
r
|
|
2758
2758
|
].filter(Boolean).join(" ");
|
|
2759
|
-
return /* @__PURE__ */ h(
|
|
2759
|
+
return /* @__PURE__ */ h(P, { children: [
|
|
2760
2760
|
/* @__PURE__ */ e("style", { children: st }),
|
|
2761
2761
|
/* @__PURE__ */ e("div", { style: { overflowX: "auto", width: "100%" }, children: /* @__PURE__ */ e(
|
|
2762
2762
|
"table",
|
|
@@ -2769,7 +2769,7 @@ function G({ striped: t = !1, children: n, className: a, style: o, ...r }) {
|
|
|
2769
2769
|
fontSize: "var(--lucent-font-size-sm)",
|
|
2770
2770
|
...o
|
|
2771
2771
|
},
|
|
2772
|
-
...
|
|
2772
|
+
...a,
|
|
2773
2773
|
children: n
|
|
2774
2774
|
}
|
|
2775
2775
|
) })
|
|
@@ -2780,7 +2780,7 @@ G.Body = dt;
|
|
|
2780
2780
|
G.Foot = ut;
|
|
2781
2781
|
G.Row = pt;
|
|
2782
2782
|
G.Cell = ft;
|
|
2783
|
-
const
|
|
2783
|
+
const Ln = {
|
|
2784
2784
|
id: "table",
|
|
2785
2785
|
name: "Table",
|
|
2786
2786
|
tier: "atom",
|
|
@@ -2872,26 +2872,26 @@ const Bn = {
|
|
|
2872
2872
|
keyboardInteractions: ["Standard browser table navigation"]
|
|
2873
2873
|
}
|
|
2874
2874
|
};
|
|
2875
|
-
function
|
|
2875
|
+
function $n({
|
|
2876
2876
|
label: t,
|
|
2877
2877
|
htmlFor: n,
|
|
2878
|
-
required:
|
|
2878
|
+
required: r = !1,
|
|
2879
2879
|
helperText: o,
|
|
2880
|
-
errorMessage:
|
|
2880
|
+
errorMessage: a,
|
|
2881
2881
|
children: i,
|
|
2882
2882
|
style: l
|
|
2883
2883
|
}) {
|
|
2884
|
-
const s =
|
|
2884
|
+
const s = a ?? o, d = a ? "danger" : "secondary";
|
|
2885
2885
|
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...l }, children: [
|
|
2886
2886
|
t && /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "baseline", gap: "var(--lucent-space-1)" }, children: [
|
|
2887
|
-
/* @__PURE__ */ e(
|
|
2888
|
-
|
|
2887
|
+
/* @__PURE__ */ e(A, { as: "label", size: "sm", weight: "medium", lineHeight: "tight", ...n !== void 0 && { htmlFor: n }, children: t }),
|
|
2888
|
+
r && /* @__PURE__ */ e(A, { as: "span", size: "sm", color: "danger", lineHeight: "tight", "aria-hidden": "true", children: "*" })
|
|
2889
2889
|
] }),
|
|
2890
2890
|
i,
|
|
2891
|
-
s && /* @__PURE__ */ e(
|
|
2891
|
+
s && /* @__PURE__ */ e(A, { size: "xs", color: d, lineHeight: "tight", children: s })
|
|
2892
2892
|
] });
|
|
2893
2893
|
}
|
|
2894
|
-
const
|
|
2894
|
+
const Wn = {
|
|
2895
2895
|
id: "form-field",
|
|
2896
2896
|
name: "FormField",
|
|
2897
2897
|
tier: "molecule",
|
|
@@ -2981,26 +2981,26 @@ const Nn = {
|
|
|
2981
2981
|
/* @__PURE__ */ e("circle", { cx: "6.5", cy: "6.5", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2982
2982
|
/* @__PURE__ */ e("path", { d: "M9.5 9.5L13 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
2983
2983
|
] }), mt = () => /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
|
|
2984
|
-
function
|
|
2984
|
+
function Vn({
|
|
2985
2985
|
value: t,
|
|
2986
2986
|
onChange: n,
|
|
2987
|
-
placeholder:
|
|
2987
|
+
placeholder: r = "Search…",
|
|
2988
2988
|
results: o = [],
|
|
2989
|
-
onResultSelect:
|
|
2989
|
+
onResultSelect: a,
|
|
2990
2990
|
isLoading: i = !1,
|
|
2991
2991
|
disabled: l = !1,
|
|
2992
2992
|
id: s,
|
|
2993
|
-
style:
|
|
2993
|
+
style: d
|
|
2994
2994
|
}) {
|
|
2995
|
-
const [m,
|
|
2995
|
+
const [m, g] = q(!1), [u, f] = q(null), c = B(null), x = m && o.length > 0, y = () => {
|
|
2996
2996
|
n("");
|
|
2997
|
-
},
|
|
2998
|
-
|
|
2999
|
-
},
|
|
3000
|
-
c.current = setTimeout(() =>
|
|
3001
|
-
},
|
|
3002
|
-
c.current && clearTimeout(c.current),
|
|
3003
|
-
},
|
|
2997
|
+
}, b = (w) => {
|
|
2998
|
+
a == null || a(w), g(!1);
|
|
2999
|
+
}, p = () => {
|
|
3000
|
+
c.current = setTimeout(() => g(!1), 150);
|
|
3001
|
+
}, v = () => {
|
|
3002
|
+
c.current && clearTimeout(c.current), g(!0);
|
|
3003
|
+
}, M = i ? /* @__PURE__ */ e(Re, { size: "sm" }) : t ? /* @__PURE__ */ e(
|
|
3004
3004
|
"button",
|
|
3005
3005
|
{
|
|
3006
3006
|
type: "button",
|
|
@@ -3016,32 +3016,32 @@ function Ln({
|
|
|
3016
3016
|
borderRadius: "var(--lucent-radius-sm)",
|
|
3017
3017
|
color: "var(--lucent-text-secondary)"
|
|
3018
3018
|
},
|
|
3019
|
-
onMouseEnter: (
|
|
3020
|
-
|
|
3019
|
+
onMouseEnter: (w) => {
|
|
3020
|
+
w.currentTarget.style.color = "var(--lucent-text-primary)";
|
|
3021
3021
|
},
|
|
3022
|
-
onMouseLeave: (
|
|
3023
|
-
|
|
3022
|
+
onMouseLeave: (w) => {
|
|
3023
|
+
w.currentTarget.style.color = "var(--lucent-text-secondary)";
|
|
3024
3024
|
},
|
|
3025
3025
|
children: /* @__PURE__ */ e(mt, {})
|
|
3026
3026
|
}
|
|
3027
3027
|
) : null;
|
|
3028
|
-
return /* @__PURE__ */ h("div", { style: { position: "relative", ...
|
|
3028
|
+
return /* @__PURE__ */ h("div", { style: { position: "relative", ...d }, children: [
|
|
3029
3029
|
/* @__PURE__ */ e(
|
|
3030
3030
|
de,
|
|
3031
3031
|
{
|
|
3032
3032
|
id: s,
|
|
3033
3033
|
type: "search",
|
|
3034
3034
|
value: t,
|
|
3035
|
-
onChange: (
|
|
3036
|
-
placeholder:
|
|
3035
|
+
onChange: (w) => n(w.target.value),
|
|
3036
|
+
placeholder: r,
|
|
3037
3037
|
disabled: l,
|
|
3038
3038
|
leftElement: /* @__PURE__ */ e(ht, {}),
|
|
3039
|
-
rightElement:
|
|
3040
|
-
onFocus:
|
|
3041
|
-
onBlur:
|
|
3039
|
+
rightElement: M ?? void 0,
|
|
3040
|
+
onFocus: v,
|
|
3041
|
+
onBlur: p
|
|
3042
3042
|
}
|
|
3043
3043
|
),
|
|
3044
|
-
|
|
3044
|
+
x && /* @__PURE__ */ e(
|
|
3045
3045
|
"div",
|
|
3046
3046
|
{
|
|
3047
3047
|
role: "listbox",
|
|
@@ -3057,29 +3057,29 @@ function Ln({
|
|
|
3057
3057
|
boxShadow: "var(--lucent-shadow-md)",
|
|
3058
3058
|
overflow: "hidden"
|
|
3059
3059
|
},
|
|
3060
|
-
children: o.map((
|
|
3060
|
+
children: o.map((w, S) => /* @__PURE__ */ e(
|
|
3061
3061
|
"div",
|
|
3062
3062
|
{
|
|
3063
3063
|
role: "option",
|
|
3064
3064
|
"aria-selected": !1,
|
|
3065
|
-
onMouseDown: () => w
|
|
3066
|
-
onMouseEnter: () =>
|
|
3067
|
-
onMouseLeave: () =>
|
|
3065
|
+
onMouseDown: () => b(w),
|
|
3066
|
+
onMouseEnter: () => f(S),
|
|
3067
|
+
onMouseLeave: () => f(null),
|
|
3068
3068
|
style: {
|
|
3069
3069
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
3070
3070
|
cursor: "pointer",
|
|
3071
|
-
background:
|
|
3071
|
+
background: u === S ? "var(--lucent-bg-subtle)" : "transparent",
|
|
3072
3072
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
3073
3073
|
},
|
|
3074
|
-
children: /* @__PURE__ */ e(
|
|
3074
|
+
children: /* @__PURE__ */ e(A, { as: "span", size: "md", children: w.label })
|
|
3075
3075
|
},
|
|
3076
|
-
|
|
3076
|
+
w.id
|
|
3077
3077
|
))
|
|
3078
3078
|
}
|
|
3079
3079
|
)
|
|
3080
3080
|
] });
|
|
3081
3081
|
}
|
|
3082
|
-
const
|
|
3082
|
+
const Pn = {
|
|
3083
3083
|
id: "search-input",
|
|
3084
3084
|
name: "SearchInput",
|
|
3085
3085
|
tier: "molecule",
|
|
@@ -3191,16 +3191,16 @@ const [results, setResults] = useState([]);
|
|
|
3191
3191
|
md: "var(--lucent-radius-md)",
|
|
3192
3192
|
lg: "var(--lucent-radius-lg)"
|
|
3193
3193
|
};
|
|
3194
|
-
function
|
|
3194
|
+
function On({
|
|
3195
3195
|
header: t,
|
|
3196
3196
|
footer: n,
|
|
3197
|
-
children:
|
|
3197
|
+
children: r,
|
|
3198
3198
|
padding: o = "md",
|
|
3199
|
-
shadow:
|
|
3199
|
+
shadow: a = "sm",
|
|
3200
3200
|
radius: i = "md",
|
|
3201
3201
|
style: l
|
|
3202
3202
|
}) {
|
|
3203
|
-
const s = gt[o],
|
|
3203
|
+
const s = gt[o], d = vt[i];
|
|
3204
3204
|
return /* @__PURE__ */ h(
|
|
3205
3205
|
"div",
|
|
3206
3206
|
{
|
|
@@ -3209,8 +3209,8 @@ function Pn({
|
|
|
3209
3209
|
flexDirection: "column",
|
|
3210
3210
|
background: "var(--lucent-surface-default)",
|
|
3211
3211
|
border: "1px solid var(--lucent-border-default)",
|
|
3212
|
-
borderRadius:
|
|
3213
|
-
boxShadow: bt[
|
|
3212
|
+
borderRadius: d,
|
|
3213
|
+
boxShadow: bt[a],
|
|
3214
3214
|
overflow: "hidden",
|
|
3215
3215
|
boxSizing: "border-box",
|
|
3216
3216
|
...l
|
|
@@ -3226,7 +3226,7 @@ function Pn({
|
|
|
3226
3226
|
children: t
|
|
3227
3227
|
}
|
|
3228
3228
|
),
|
|
3229
|
-
/* @__PURE__ */ e("div", { style: { padding: s, flex: 1 }, children:
|
|
3229
|
+
/* @__PURE__ */ e("div", { style: { padding: s, flex: 1 }, children: r }),
|
|
3230
3230
|
n != null && /* @__PURE__ */ e(
|
|
3231
3231
|
"div",
|
|
3232
3232
|
{
|
|
@@ -3241,7 +3241,7 @@ function Pn({
|
|
|
3241
3241
|
}
|
|
3242
3242
|
);
|
|
3243
3243
|
}
|
|
3244
|
-
const
|
|
3244
|
+
const Hn = {
|
|
3245
3245
|
id: "card",
|
|
3246
3246
|
name: "Card",
|
|
3247
3247
|
tier: "molecule",
|
|
@@ -3349,15 +3349,15 @@ const Wn = {
|
|
|
3349
3349
|
warning: /* @__PURE__ */ e(kt, {}),
|
|
3350
3350
|
danger: /* @__PURE__ */ e(St, {})
|
|
3351
3351
|
}, Ct = () => /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M3 3L11 11M11 3L3 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
|
|
3352
|
-
function
|
|
3352
|
+
function jn({
|
|
3353
3353
|
variant: t = "info",
|
|
3354
3354
|
title: n,
|
|
3355
|
-
children:
|
|
3355
|
+
children: r,
|
|
3356
3356
|
onDismiss: o,
|
|
3357
|
-
icon:
|
|
3357
|
+
icon: a,
|
|
3358
3358
|
style: i
|
|
3359
3359
|
}) {
|
|
3360
|
-
const l = yt[t], s =
|
|
3360
|
+
const l = yt[t], s = a ?? Tt[t];
|
|
3361
3361
|
return /* @__PURE__ */ h(
|
|
3362
3362
|
"div",
|
|
3363
3363
|
{
|
|
@@ -3388,8 +3388,8 @@ function Vn({
|
|
|
3388
3388
|
}
|
|
3389
3389
|
),
|
|
3390
3390
|
/* @__PURE__ */ h("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)" }, children: [
|
|
3391
|
-
n && /* @__PURE__ */ e(
|
|
3392
|
-
|
|
3391
|
+
n && /* @__PURE__ */ e(A, { as: "span", size: "sm", weight: "semibold", color: l.textColor, lineHeight: "tight", children: n }),
|
|
3392
|
+
r && /* @__PURE__ */ e(A, { as: "span", size: "sm", color: l.textColor, lineHeight: "base", children: r })
|
|
3393
3393
|
] }),
|
|
3394
3394
|
o && /* @__PURE__ */ e(
|
|
3395
3395
|
"button",
|
|
@@ -3409,11 +3409,11 @@ function Vn({
|
|
|
3409
3409
|
color: l.iconColor,
|
|
3410
3410
|
opacity: 0.7
|
|
3411
3411
|
},
|
|
3412
|
-
onMouseEnter: (
|
|
3413
|
-
|
|
3412
|
+
onMouseEnter: (d) => {
|
|
3413
|
+
d.currentTarget.style.opacity = "1";
|
|
3414
3414
|
},
|
|
3415
|
-
onMouseLeave: (
|
|
3416
|
-
|
|
3415
|
+
onMouseLeave: (d) => {
|
|
3416
|
+
d.currentTarget.style.opacity = "0.7";
|
|
3417
3417
|
},
|
|
3418
3418
|
children: /* @__PURE__ */ e(Ct, {})
|
|
3419
3419
|
}
|
|
@@ -3422,7 +3422,7 @@ function Vn({
|
|
|
3422
3422
|
}
|
|
3423
3423
|
);
|
|
3424
3424
|
}
|
|
3425
|
-
const
|
|
3425
|
+
const Un = {
|
|
3426
3426
|
id: "alert",
|
|
3427
3427
|
name: "Alert",
|
|
3428
3428
|
tier: "molecule",
|
|
@@ -3497,12 +3497,12 @@ const On = {
|
|
|
3497
3497
|
notes: 'role="alert" causes screen readers to announce the content immediately when rendered. For non-urgent status messages, consider using role="status" instead by overriding via style/wrapper.'
|
|
3498
3498
|
}
|
|
3499
3499
|
};
|
|
3500
|
-
function
|
|
3500
|
+
function Gn({
|
|
3501
3501
|
illustration: t,
|
|
3502
3502
|
title: n,
|
|
3503
|
-
description:
|
|
3503
|
+
description: r,
|
|
3504
3504
|
action: o,
|
|
3505
|
-
style:
|
|
3505
|
+
style: a
|
|
3506
3506
|
}) {
|
|
3507
3507
|
return /* @__PURE__ */ h(
|
|
3508
3508
|
"div",
|
|
@@ -3514,7 +3514,7 @@ function Hn({
|
|
|
3514
3514
|
gap: "var(--lucent-space-4)",
|
|
3515
3515
|
padding: "var(--lucent-space-8)",
|
|
3516
3516
|
textAlign: "center",
|
|
3517
|
-
...
|
|
3517
|
+
...a
|
|
3518
3518
|
},
|
|
3519
3519
|
children: [
|
|
3520
3520
|
t != null && /* @__PURE__ */ e(
|
|
@@ -3532,15 +3532,15 @@ function Hn({
|
|
|
3532
3532
|
}
|
|
3533
3533
|
),
|
|
3534
3534
|
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: [
|
|
3535
|
-
/* @__PURE__ */ e(
|
|
3536
|
-
|
|
3535
|
+
/* @__PURE__ */ e(A, { as: "h3", size: "lg", weight: "semibold", align: "center", lineHeight: "tight", children: n }),
|
|
3536
|
+
r && /* @__PURE__ */ e(A, { size: "sm", color: "secondary", align: "center", lineHeight: "relaxed", children: r })
|
|
3537
3537
|
] }),
|
|
3538
3538
|
o != null && /* @__PURE__ */ e("div", { children: o })
|
|
3539
3539
|
]
|
|
3540
3540
|
}
|
|
3541
3541
|
);
|
|
3542
3542
|
}
|
|
3543
|
-
const
|
|
3543
|
+
const _n = {
|
|
3544
3544
|
id: "empty-state",
|
|
3545
3545
|
name: "EmptyState",
|
|
3546
3546
|
tier: "molecule",
|
|
@@ -3623,9 +3623,9 @@ const jn = {
|
|
|
3623
3623
|
function te({
|
|
3624
3624
|
width: t,
|
|
3625
3625
|
height: n,
|
|
3626
|
-
radius:
|
|
3626
|
+
radius: r,
|
|
3627
3627
|
animate: o,
|
|
3628
|
-
style:
|
|
3628
|
+
style: a
|
|
3629
3629
|
}) {
|
|
3630
3630
|
return /* @__PURE__ */ e(
|
|
3631
3631
|
"span",
|
|
@@ -3634,58 +3634,58 @@ function te({
|
|
|
3634
3634
|
display: "block",
|
|
3635
3635
|
width: typeof t == "number" ? `${t}px` : t,
|
|
3636
3636
|
height: typeof n == "number" ? `${n}px` : n,
|
|
3637
|
-
borderRadius:
|
|
3637
|
+
borderRadius: r,
|
|
3638
3638
|
background: o ? "linear-gradient(90deg, var(--lucent-bg-muted) 25%, var(--lucent-bg-subtle) 50%, var(--lucent-bg-muted) 75%)" : "var(--lucent-bg-muted)",
|
|
3639
3639
|
backgroundSize: o ? "200% 100%" : void 0,
|
|
3640
3640
|
animation: o ? "lucent-skeleton-shimmer 1.6s ease-in-out infinite" : void 0,
|
|
3641
3641
|
flexShrink: 0,
|
|
3642
|
-
...
|
|
3642
|
+
...a
|
|
3643
3643
|
}
|
|
3644
3644
|
}
|
|
3645
3645
|
);
|
|
3646
3646
|
}
|
|
3647
|
-
function
|
|
3647
|
+
function Yn({
|
|
3648
3648
|
variant: t = "rectangle",
|
|
3649
3649
|
width: n = "100%",
|
|
3650
|
-
height:
|
|
3650
|
+
height: r,
|
|
3651
3651
|
lines: o = 1,
|
|
3652
|
-
animate:
|
|
3652
|
+
animate: a = !0,
|
|
3653
3653
|
radius: i,
|
|
3654
3654
|
style: l
|
|
3655
3655
|
}) {
|
|
3656
|
-
const s =
|
|
3656
|
+
const s = r ?? It[t], d = i ?? Mt[t], m = a ? /* @__PURE__ */ e("style", { children: `
|
|
3657
3657
|
@keyframes lucent-skeleton-shimmer {
|
|
3658
3658
|
0% { background-position: 200% 0; }
|
|
3659
3659
|
100% { background-position: -200% 0; }
|
|
3660
3660
|
}
|
|
3661
3661
|
` }) : null;
|
|
3662
|
-
return t === "text" && o > 1 ? /* @__PURE__ */ h(
|
|
3662
|
+
return t === "text" && o > 1 ? /* @__PURE__ */ h(P, { children: [
|
|
3663
3663
|
m,
|
|
3664
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...l }, children: Array.from({ length: o }).map((
|
|
3664
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...l }, children: Array.from({ length: o }).map((g, u) => /* @__PURE__ */ e(
|
|
3665
3665
|
te,
|
|
3666
3666
|
{
|
|
3667
|
-
width:
|
|
3667
|
+
width: u === o - 1 ? "70%" : n,
|
|
3668
3668
|
height: s,
|
|
3669
|
-
radius:
|
|
3670
|
-
animate:
|
|
3669
|
+
radius: d,
|
|
3670
|
+
animate: a
|
|
3671
3671
|
},
|
|
3672
|
-
|
|
3672
|
+
u
|
|
3673
3673
|
)) })
|
|
3674
|
-
] }) : /* @__PURE__ */ h(
|
|
3674
|
+
] }) : /* @__PURE__ */ h(P, { children: [
|
|
3675
3675
|
m,
|
|
3676
3676
|
/* @__PURE__ */ e(
|
|
3677
3677
|
te,
|
|
3678
3678
|
{
|
|
3679
|
-
width: t === "circle" ?
|
|
3679
|
+
width: t === "circle" ? r ?? 40 : n,
|
|
3680
3680
|
height: s,
|
|
3681
|
-
radius:
|
|
3682
|
-
animate:
|
|
3681
|
+
radius: d,
|
|
3682
|
+
animate: a,
|
|
3683
3683
|
...l !== void 0 && { style: l }
|
|
3684
3684
|
}
|
|
3685
3685
|
)
|
|
3686
3686
|
] });
|
|
3687
3687
|
}
|
|
3688
|
-
const
|
|
3688
|
+
const Kn = {
|
|
3689
3689
|
id: "skeleton",
|
|
3690
3690
|
name: "Skeleton",
|
|
3691
3691
|
tier: "molecule",
|
|
@@ -3772,8 +3772,8 @@ const Gn = {
|
|
|
3772
3772
|
notes: 'Wrap loading regions with aria-busy="true" on the container so screen readers know content is loading. Individual Skeleton elements are presentational and do not need ARIA attributes themselves.'
|
|
3773
3773
|
}
|
|
3774
3774
|
};
|
|
3775
|
-
function
|
|
3776
|
-
return /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", style:
|
|
3775
|
+
function Xn({ items: t, separator: n = "/", style: r }) {
|
|
3776
|
+
return /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", style: r, children: /* @__PURE__ */ e(
|
|
3777
3777
|
"ol",
|
|
3778
3778
|
{
|
|
3779
3779
|
style: {
|
|
@@ -3786,10 +3786,10 @@ function _n({ items: t, separator: n = "/", style: a }) {
|
|
|
3786
3786
|
padding: 0,
|
|
3787
3787
|
fontFamily: "var(--lucent-font-family-base)"
|
|
3788
3788
|
},
|
|
3789
|
-
children: t.map((o,
|
|
3790
|
-
const i =
|
|
3789
|
+
children: t.map((o, a) => {
|
|
3790
|
+
const i = a === t.length - 1;
|
|
3791
3791
|
return /* @__PURE__ */ h("li", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
3792
|
-
i ? /* @__PURE__ */ e(
|
|
3792
|
+
i ? /* @__PURE__ */ e(A, { size: "sm", color: "primary", as: "span", "aria-current": "page", children: o.label }) : o.href != null ? /* @__PURE__ */ e(
|
|
3793
3793
|
"a",
|
|
3794
3794
|
{
|
|
3795
3795
|
href: o.href,
|
|
@@ -3833,27 +3833,27 @@ function _n({ items: t, separator: n = "/", style: a }) {
|
|
|
3833
3833
|
}
|
|
3834
3834
|
),
|
|
3835
3835
|
!i && /* @__PURE__ */ e("span", { "aria-hidden": !0, style: { color: "var(--lucent-text-disabled)", fontSize: "var(--lucent-font-size-sm)", userSelect: "none" }, children: n })
|
|
3836
|
-
] },
|
|
3836
|
+
] }, a);
|
|
3837
3837
|
})
|
|
3838
3838
|
}
|
|
3839
3839
|
) });
|
|
3840
3840
|
}
|
|
3841
|
-
function
|
|
3842
|
-
var
|
|
3843
|
-
const i =
|
|
3841
|
+
function Jn({ tabs: t, defaultValue: n, value: r, onChange: o, style: a }) {
|
|
3842
|
+
var p;
|
|
3843
|
+
const i = r !== void 0, [l, s] = q(n ?? ((p = t[0]) == null ? void 0 : p.value) ?? ""), d = i ? r : l, [m, g] = q(null), u = B([]), [f, c] = q(null), x = B(!1);
|
|
3844
3844
|
se(() => {
|
|
3845
|
-
const
|
|
3846
|
-
|
|
3847
|
-
}, [
|
|
3848
|
-
const y = (
|
|
3849
|
-
i || s(
|
|
3850
|
-
},
|
|
3851
|
-
var
|
|
3852
|
-
const
|
|
3853
|
-
let
|
|
3854
|
-
|
|
3845
|
+
const v = t.findIndex((w) => w.value === d), M = u.current[v];
|
|
3846
|
+
M && (c({ left: M.offsetLeft, width: M.offsetWidth, animate: x.current }), x.current = !0);
|
|
3847
|
+
}, [d, t]);
|
|
3848
|
+
const y = (v) => {
|
|
3849
|
+
i || s(v), o == null || o(v);
|
|
3850
|
+
}, b = (v, M) => {
|
|
3851
|
+
var F;
|
|
3852
|
+
const w = t.map((T, C) => T.disabled ? -1 : C).filter((T) => T !== -1), S = w.indexOf(M);
|
|
3853
|
+
let E = -1;
|
|
3854
|
+
v.key === "ArrowRight" && (E = w[(S + 1) % w.length] ?? -1), v.key === "ArrowLeft" && (E = w[(S - 1 + w.length) % w.length] ?? -1), v.key === "Home" && (E = w[0] ?? -1), v.key === "End" && (E = w[w.length - 1] ?? -1), E !== -1 && (v.preventDefault(), (F = u.current[E]) == null || F.focus(), y(t[E].value));
|
|
3855
3855
|
};
|
|
3856
|
-
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", ...
|
|
3856
|
+
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", ...a }, children: [
|
|
3857
3857
|
/* @__PURE__ */ h(
|
|
3858
3858
|
"div",
|
|
3859
3859
|
{
|
|
@@ -3864,37 +3864,37 @@ function Yn({ tabs: t, defaultValue: n, value: a, onChange: o, style: r }) {
|
|
|
3864
3864
|
borderBottom: "1px solid var(--lucent-border-default)"
|
|
3865
3865
|
},
|
|
3866
3866
|
children: [
|
|
3867
|
-
t.map((
|
|
3868
|
-
const
|
|
3867
|
+
t.map((v, M) => {
|
|
3868
|
+
const w = v.value === d, S = v.disabled ?? !1;
|
|
3869
3869
|
return /* @__PURE__ */ e(
|
|
3870
3870
|
"button",
|
|
3871
3871
|
{
|
|
3872
|
-
ref: (
|
|
3873
|
-
|
|
3872
|
+
ref: (E) => {
|
|
3873
|
+
u.current[M] = E;
|
|
3874
3874
|
},
|
|
3875
3875
|
role: "tab",
|
|
3876
|
-
"aria-selected":
|
|
3877
|
-
"aria-controls": `lucent-tabpanel-${
|
|
3878
|
-
id: `lucent-tab-${
|
|
3879
|
-
disabled:
|
|
3880
|
-
tabIndex:
|
|
3876
|
+
"aria-selected": w,
|
|
3877
|
+
"aria-controls": `lucent-tabpanel-${v.value}`,
|
|
3878
|
+
id: `lucent-tab-${v.value}`,
|
|
3879
|
+
disabled: S,
|
|
3880
|
+
tabIndex: w ? 0 : -1,
|
|
3881
3881
|
onClick: () => {
|
|
3882
|
-
|
|
3882
|
+
S || y(v.value);
|
|
3883
3883
|
},
|
|
3884
|
-
onKeyDown: (
|
|
3884
|
+
onKeyDown: (E) => b(E, M),
|
|
3885
3885
|
onMouseEnter: () => {
|
|
3886
|
-
|
|
3886
|
+
S || g(M);
|
|
3887
3887
|
},
|
|
3888
|
-
onMouseLeave: () =>
|
|
3888
|
+
onMouseLeave: () => g(null),
|
|
3889
3889
|
style: {
|
|
3890
3890
|
padding: "var(--lucent-space-1) var(--lucent-space-2) var(--lucent-space-3)",
|
|
3891
3891
|
background: "none",
|
|
3892
3892
|
border: "none",
|
|
3893
|
-
cursor:
|
|
3893
|
+
cursor: S ? "not-allowed" : "pointer",
|
|
3894
3894
|
fontFamily: "var(--lucent-font-family-base)",
|
|
3895
3895
|
fontSize: "var(--lucent-font-size-md)",
|
|
3896
|
-
fontWeight:
|
|
3897
|
-
color:
|
|
3896
|
+
fontWeight: w ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
3897
|
+
color: S ? "var(--lucent-text-disabled)" : w ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
3898
3898
|
transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
3899
3899
|
whiteSpace: "nowrap",
|
|
3900
3900
|
outline: "none"
|
|
@@ -3903,44 +3903,44 @@ function Yn({ tabs: t, defaultValue: n, value: a, onChange: o, style: r }) {
|
|
|
3903
3903
|
display: "block",
|
|
3904
3904
|
padding: "var(--lucent-space-1) var(--lucent-space-3)",
|
|
3905
3905
|
borderRadius: "var(--lucent-radius-md)",
|
|
3906
|
-
background: m ===
|
|
3906
|
+
background: m === M && !w ? "var(--lucent-bg-subtle)" : "transparent",
|
|
3907
3907
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
3908
|
-
}, children:
|
|
3908
|
+
}, children: v.label })
|
|
3909
3909
|
},
|
|
3910
|
-
|
|
3910
|
+
v.value
|
|
3911
3911
|
);
|
|
3912
3912
|
}),
|
|
3913
|
-
|
|
3913
|
+
f != null && /* @__PURE__ */ e(
|
|
3914
3914
|
"span",
|
|
3915
3915
|
{
|
|
3916
3916
|
"aria-hidden": !0,
|
|
3917
3917
|
style: {
|
|
3918
3918
|
position: "absolute",
|
|
3919
3919
|
bottom: 0,
|
|
3920
|
-
left:
|
|
3921
|
-
width:
|
|
3920
|
+
left: f.left,
|
|
3921
|
+
width: f.width,
|
|
3922
3922
|
height: 2,
|
|
3923
3923
|
background: "var(--lucent-accent-default)",
|
|
3924
3924
|
borderRadius: "var(--lucent-radius-sm)",
|
|
3925
|
-
transition:
|
|
3925
|
+
transition: f.animate ? "left 220ms var(--lucent-easing-default), width 220ms var(--lucent-easing-default)" : "none"
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
3928
|
)
|
|
3929
3929
|
]
|
|
3930
3930
|
}
|
|
3931
3931
|
),
|
|
3932
|
-
t.map((
|
|
3932
|
+
t.map((v) => /* @__PURE__ */ e(
|
|
3933
3933
|
"div",
|
|
3934
3934
|
{
|
|
3935
3935
|
role: "tabpanel",
|
|
3936
|
-
id: `lucent-tabpanel-${
|
|
3937
|
-
"aria-labelledby": `lucent-tab-${
|
|
3938
|
-
hidden:
|
|
3936
|
+
id: `lucent-tabpanel-${v.value}`,
|
|
3937
|
+
"aria-labelledby": `lucent-tab-${v.value}`,
|
|
3938
|
+
hidden: v.value !== d,
|
|
3939
3939
|
style: { padding: "var(--lucent-space-4) 0", outline: "none" },
|
|
3940
3940
|
tabIndex: 0,
|
|
3941
|
-
children:
|
|
3941
|
+
children: v.content
|
|
3942
3942
|
},
|
|
3943
|
-
|
|
3943
|
+
v.value
|
|
3944
3944
|
))
|
|
3945
3945
|
] });
|
|
3946
3946
|
}
|
|
@@ -3950,32 +3950,32 @@ const zt = `
|
|
|
3950
3950
|
to { opacity: 1; transform: translateY(0); }
|
|
3951
3951
|
}
|
|
3952
3952
|
`;
|
|
3953
|
-
function
|
|
3954
|
-
const l = o !== void 0, [s,
|
|
3955
|
-
|
|
3956
|
-
const y =
|
|
3953
|
+
function Qn({ trigger: t, children: n, defaultOpen: r = !1, open: o, onOpenChange: a, style: i }) {
|
|
3954
|
+
const l = o !== void 0, [s, d] = q(r), m = l ? o : s, g = B(null), [u, f] = q(m ? void 0 : 0), c = B(!1);
|
|
3955
|
+
$(() => {
|
|
3956
|
+
const y = g.current;
|
|
3957
3957
|
if (y)
|
|
3958
3958
|
if (m) {
|
|
3959
|
-
const
|
|
3960
|
-
|
|
3961
|
-
const
|
|
3962
|
-
|
|
3959
|
+
const b = y.scrollHeight;
|
|
3960
|
+
f(b), c.current = !0;
|
|
3961
|
+
const p = setTimeout(() => {
|
|
3962
|
+
f(void 0), c.current = !1;
|
|
3963
3963
|
}, 220);
|
|
3964
|
-
return () => clearTimeout(
|
|
3964
|
+
return () => clearTimeout(p);
|
|
3965
3965
|
} else
|
|
3966
|
-
|
|
3966
|
+
f(y.scrollHeight), y.getBoundingClientRect(), f(0);
|
|
3967
3967
|
}, [m]);
|
|
3968
|
-
const
|
|
3968
|
+
const x = () => {
|
|
3969
3969
|
const y = !m;
|
|
3970
|
-
l ||
|
|
3970
|
+
l || d(y), a == null || a(y);
|
|
3971
3971
|
};
|
|
3972
|
-
return /* @__PURE__ */ h(
|
|
3972
|
+
return /* @__PURE__ */ h(P, { children: [
|
|
3973
3973
|
/* @__PURE__ */ e("style", { children: zt }),
|
|
3974
3974
|
/* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", fontFamily: "var(--lucent-font-family-base)", fontSize: "var(--lucent-font-size-md)", ...i }, children: [
|
|
3975
3975
|
/* @__PURE__ */ h(
|
|
3976
3976
|
"button",
|
|
3977
3977
|
{
|
|
3978
|
-
onClick:
|
|
3978
|
+
onClick: x,
|
|
3979
3979
|
"aria-expanded": m,
|
|
3980
3980
|
style: {
|
|
3981
3981
|
display: "flex",
|
|
@@ -3993,18 +3993,18 @@ function Kn({ trigger: t, children: n, defaultOpen: a = !1, open: o, onOpenChang
|
|
|
3993
3993
|
},
|
|
3994
3994
|
children: [
|
|
3995
3995
|
/* @__PURE__ */ e("span", { style: { flex: 1 }, children: t }),
|
|
3996
|
-
/* @__PURE__ */ e(
|
|
3996
|
+
/* @__PURE__ */ e(Et, { open: m })
|
|
3997
3997
|
]
|
|
3998
3998
|
}
|
|
3999
3999
|
),
|
|
4000
4000
|
/* @__PURE__ */ e(
|
|
4001
4001
|
"div",
|
|
4002
4002
|
{
|
|
4003
|
-
ref:
|
|
4003
|
+
ref: g,
|
|
4004
4004
|
"aria-hidden": !m,
|
|
4005
4005
|
style: {
|
|
4006
4006
|
overflow: "hidden",
|
|
4007
|
-
height:
|
|
4007
|
+
height: u !== void 0 ? u : "auto",
|
|
4008
4008
|
transition: "height 200ms var(--lucent-easing-default)"
|
|
4009
4009
|
},
|
|
4010
4010
|
children: /* @__PURE__ */ e(
|
|
@@ -4022,7 +4022,7 @@ function Kn({ trigger: t, children: n, defaultOpen: a = !1, open: o, onOpenChang
|
|
|
4022
4022
|
] })
|
|
4023
4023
|
] });
|
|
4024
4024
|
}
|
|
4025
|
-
function
|
|
4025
|
+
function Et({ open: t }) {
|
|
4026
4026
|
return /* @__PURE__ */ e(
|
|
4027
4027
|
"svg",
|
|
4028
4028
|
{
|
|
@@ -4048,22 +4048,22 @@ function qt({ open: t }) {
|
|
|
4048
4048
|
function _(t) {
|
|
4049
4049
|
return typeof t == "number" ? `${t}px` : t;
|
|
4050
4050
|
}
|
|
4051
|
-
function
|
|
4051
|
+
function Zn({
|
|
4052
4052
|
children: t,
|
|
4053
4053
|
header: n,
|
|
4054
|
-
sidebar:
|
|
4054
|
+
sidebar: r,
|
|
4055
4055
|
sidebarWidth: o = 240,
|
|
4056
|
-
headerHeight:
|
|
4056
|
+
headerHeight: a = 48,
|
|
4057
4057
|
sidebarCollapsed: i = !1,
|
|
4058
4058
|
rightSidebar: l,
|
|
4059
4059
|
rightSidebarWidth: s = 240,
|
|
4060
|
-
rightSidebarCollapsed:
|
|
4060
|
+
rightSidebarCollapsed: d = !1,
|
|
4061
4061
|
footer: m,
|
|
4062
|
-
footerHeight:
|
|
4063
|
-
mainStyle:
|
|
4064
|
-
style:
|
|
4062
|
+
footerHeight: g = 28,
|
|
4063
|
+
mainStyle: u,
|
|
4064
|
+
style: f
|
|
4065
4065
|
}) {
|
|
4066
|
-
const c = _(
|
|
4066
|
+
const c = _(a), x = _(o), y = _(s), b = _(g);
|
|
4067
4067
|
return /* @__PURE__ */ h(
|
|
4068
4068
|
"div",
|
|
4069
4069
|
{
|
|
@@ -4073,7 +4073,7 @@ function Xn({
|
|
|
4073
4073
|
height: "100vh",
|
|
4074
4074
|
overflow: "hidden",
|
|
4075
4075
|
fontFamily: "var(--lucent-font-family-base)",
|
|
4076
|
-
...
|
|
4076
|
+
...f
|
|
4077
4077
|
},
|
|
4078
4078
|
children: [
|
|
4079
4079
|
n != null && /* @__PURE__ */ e(
|
|
@@ -4089,18 +4089,18 @@ function Xn({
|
|
|
4089
4089
|
}
|
|
4090
4090
|
),
|
|
4091
4091
|
/* @__PURE__ */ h("div", { style: { display: "flex", flex: 1, overflow: "hidden" }, children: [
|
|
4092
|
-
|
|
4092
|
+
r != null && /* @__PURE__ */ e(
|
|
4093
4093
|
"div",
|
|
4094
4094
|
{
|
|
4095
4095
|
style: {
|
|
4096
|
-
width: i ? 0 :
|
|
4096
|
+
width: i ? 0 : x,
|
|
4097
4097
|
flexShrink: 0,
|
|
4098
4098
|
overflow: "hidden",
|
|
4099
4099
|
overflowY: i ? "hidden" : "auto",
|
|
4100
4100
|
background: "var(--lucent-surface-default)",
|
|
4101
4101
|
transition: "width 200ms var(--lucent-easing-default)"
|
|
4102
4102
|
},
|
|
4103
|
-
children:
|
|
4103
|
+
children: r
|
|
4104
4104
|
}
|
|
4105
4105
|
),
|
|
4106
4106
|
/* @__PURE__ */ e(
|
|
@@ -4115,7 +4115,7 @@ function Xn({
|
|
|
4115
4115
|
borderRadius: "var(--lucent-radius-lg)",
|
|
4116
4116
|
boxShadow: "var(--lucent-shadow-sm)",
|
|
4117
4117
|
background: "var(--lucent-surface-default)",
|
|
4118
|
-
...
|
|
4118
|
+
...u
|
|
4119
4119
|
},
|
|
4120
4120
|
children: t
|
|
4121
4121
|
}
|
|
@@ -4124,10 +4124,10 @@ function Xn({
|
|
|
4124
4124
|
"aside",
|
|
4125
4125
|
{
|
|
4126
4126
|
style: {
|
|
4127
|
-
width:
|
|
4127
|
+
width: d ? 0 : y,
|
|
4128
4128
|
flexShrink: 0,
|
|
4129
4129
|
overflow: "hidden",
|
|
4130
|
-
overflowY:
|
|
4130
|
+
overflowY: d ? "hidden" : "auto",
|
|
4131
4131
|
background: "var(--lucent-surface-default)",
|
|
4132
4132
|
transition: "width 200ms var(--lucent-easing-default)"
|
|
4133
4133
|
},
|
|
@@ -4140,7 +4140,7 @@ function Xn({
|
|
|
4140
4140
|
{
|
|
4141
4141
|
style: {
|
|
4142
4142
|
flexShrink: 0,
|
|
4143
|
-
height:
|
|
4143
|
+
height: b,
|
|
4144
4144
|
zIndex: 10,
|
|
4145
4145
|
background: "var(--lucent-surface-default)"
|
|
4146
4146
|
},
|
|
@@ -4151,7 +4151,7 @@ function Xn({
|
|
|
4151
4151
|
}
|
|
4152
4152
|
);
|
|
4153
4153
|
}
|
|
4154
|
-
function
|
|
4154
|
+
function qt({ state: t }) {
|
|
4155
4155
|
return /* @__PURE__ */ h(
|
|
4156
4156
|
"svg",
|
|
4157
4157
|
{
|
|
@@ -4194,32 +4194,54 @@ function ne({ dir: t }) {
|
|
|
4194
4194
|
}
|
|
4195
4195
|
) });
|
|
4196
4196
|
}
|
|
4197
|
-
function
|
|
4197
|
+
function er({
|
|
4198
4198
|
columns: t,
|
|
4199
4199
|
rows: n,
|
|
4200
|
-
pageSize:
|
|
4200
|
+
pageSize: r = 10,
|
|
4201
4201
|
page: o,
|
|
4202
|
-
onPageChange:
|
|
4203
|
-
|
|
4204
|
-
|
|
4202
|
+
onPageChange: a,
|
|
4203
|
+
onFilterChange: i,
|
|
4204
|
+
emptyState: l,
|
|
4205
|
+
style: s
|
|
4205
4206
|
}) {
|
|
4206
|
-
const [
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4207
|
+
const [d, m] = q(null), [g, u] = q(0), [f, c] = q(null), [x, y] = q({}), b = o !== void 0, p = b ? o : g, v = t.some((z) => z.filterable), M = v ? n.filter((z) => t.every((k) => {
|
|
4208
|
+
if (!k.filterable) return !0;
|
|
4209
|
+
const I = x[k.key];
|
|
4210
|
+
if (!I || I.length === 0) return !0;
|
|
4211
|
+
const R = String(z[k.key] ?? "");
|
|
4212
|
+
return I.includes(R);
|
|
4213
|
+
})) : n, w = d ? [...M].sort((z, k) => {
|
|
4214
|
+
const I = z[d.key], R = k[d.key], V = String(I ?? "").localeCompare(String(R ?? ""), void 0, { numeric: !0 });
|
|
4215
|
+
return d.dir === "asc" ? V : -V;
|
|
4216
|
+
}) : M, S = r > 0 ? w.slice(p * r, (p + 1) * r) : w, E = r > 0 ? Math.max(1, Math.ceil(w.length / r)) : 1, F = (z) => {
|
|
4217
|
+
b || u(z), a == null || a(z);
|
|
4218
|
+
}, T = (z) => {
|
|
4219
|
+
m((k) => !k || k.key !== z ? { key: z, dir: "asc" } : k.dir === "asc" ? { key: z, dir: "desc" } : null), b || u(0), a == null || a(0);
|
|
4220
|
+
}, C = (z, k) => {
|
|
4221
|
+
const I = { ...x, [z]: k };
|
|
4222
|
+
k.length === 0 && delete I[z], y(I), b || u(0), a == null || a(0), i == null || i(I);
|
|
4223
|
+
}, W = () => {
|
|
4224
|
+
y({}), b || u(0), a == null || a(0), i == null || i({});
|
|
4225
|
+
}, D = [];
|
|
4226
|
+
if (E <= 7)
|
|
4227
|
+
for (let z = 0; z < E; z++) D.push(z);
|
|
4216
4228
|
else {
|
|
4217
|
-
|
|
4218
|
-
for (let
|
|
4219
|
-
|
|
4220
|
-
|
|
4229
|
+
D.push(0), p > 2 && D.push("…");
|
|
4230
|
+
for (let z = Math.max(1, p - 1); z <= Math.min(E - 2, p + 1); z++)
|
|
4231
|
+
D.push(z);
|
|
4232
|
+
p < E - 3 && D.push("…"), D.push(E - 1);
|
|
4221
4233
|
}
|
|
4222
|
-
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...
|
|
4234
|
+
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
4235
|
+
v && /* @__PURE__ */ e("div", { style: { position: "relative", zIndex: 1 }, children: /* @__PURE__ */ e(
|
|
4236
|
+
At,
|
|
4237
|
+
{
|
|
4238
|
+
columns: t,
|
|
4239
|
+
rows: n,
|
|
4240
|
+
filters: x,
|
|
4241
|
+
onFilter: C,
|
|
4242
|
+
onClearAll: W
|
|
4243
|
+
}
|
|
4244
|
+
) }),
|
|
4223
4245
|
/* @__PURE__ */ e("div", { style: {
|
|
4224
4246
|
overflowX: "auto",
|
|
4225
4247
|
borderRadius: "var(--lucent-radius-lg)",
|
|
@@ -4230,105 +4252,106 @@ function Jn({
|
|
|
4230
4252
|
fontFamily: "var(--lucent-font-family-base)",
|
|
4231
4253
|
fontSize: "var(--lucent-font-size-sm)"
|
|
4232
4254
|
}, children: [
|
|
4233
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { style: { borderBottom: "1px solid var(--lucent-border-default)" }, children: t.map((
|
|
4234
|
-
const
|
|
4255
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { style: { borderBottom: "1px solid var(--lucent-border-default)" }, children: t.map((z) => {
|
|
4256
|
+
const k = (d == null ? void 0 : d.key) === z.key ? d.dir : "none";
|
|
4235
4257
|
return /* @__PURE__ */ e(
|
|
4236
4258
|
"th",
|
|
4237
4259
|
{
|
|
4238
|
-
onClick:
|
|
4260
|
+
onClick: z.sortable ? () => T(z.key) : void 0,
|
|
4239
4261
|
style: {
|
|
4240
4262
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
4241
|
-
textAlign:
|
|
4263
|
+
textAlign: z.align ?? "left",
|
|
4242
4264
|
fontWeight: "var(--lucent-font-weight-medium)",
|
|
4243
4265
|
color: "var(--lucent-text-secondary)",
|
|
4244
4266
|
background: "var(--lucent-bg-subtle)",
|
|
4245
|
-
|
|
4267
|
+
borderBottom: "1px solid var(--lucent-border-default)",
|
|
4268
|
+
cursor: z.sortable ? "pointer" : "default",
|
|
4246
4269
|
userSelect: "none",
|
|
4247
4270
|
whiteSpace: "nowrap",
|
|
4248
|
-
...
|
|
4271
|
+
...z.width ? { width: z.width } : {}
|
|
4249
4272
|
},
|
|
4250
4273
|
children: /* @__PURE__ */ h("span", { style: { display: "inline-flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
4251
|
-
|
|
4252
|
-
|
|
4274
|
+
z.header,
|
|
4275
|
+
z.sortable && /* @__PURE__ */ e(qt, { state: k })
|
|
4253
4276
|
] })
|
|
4254
4277
|
},
|
|
4255
|
-
|
|
4278
|
+
z.key
|
|
4256
4279
|
);
|
|
4257
4280
|
}) }) }),
|
|
4258
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
4281
|
+
/* @__PURE__ */ e("tbody", { children: S.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
4259
4282
|
"td",
|
|
4260
4283
|
{
|
|
4261
4284
|
colSpan: t.length,
|
|
4262
4285
|
style: { padding: "var(--lucent-space-12)", textAlign: "center" },
|
|
4263
|
-
children:
|
|
4286
|
+
children: l ?? /* @__PURE__ */ e(A, { color: "secondary", children: "No data" })
|
|
4264
4287
|
}
|
|
4265
|
-
) }) :
|
|
4288
|
+
) }) : S.map((z, k) => /* @__PURE__ */ e(
|
|
4266
4289
|
"tr",
|
|
4267
4290
|
{
|
|
4268
|
-
onMouseEnter: () =>
|
|
4269
|
-
onMouseLeave: () =>
|
|
4291
|
+
onMouseEnter: () => c(k),
|
|
4292
|
+
onMouseLeave: () => c(null),
|
|
4270
4293
|
style: {
|
|
4271
|
-
borderBottom:
|
|
4272
|
-
background:
|
|
4294
|
+
borderBottom: k < S.length - 1 ? "1px solid var(--lucent-border-subtle)" : "none",
|
|
4295
|
+
background: f === k ? "var(--lucent-bg-subtle)" : "var(--lucent-surface-default)",
|
|
4273
4296
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
4274
4297
|
},
|
|
4275
|
-
children: t.map((
|
|
4298
|
+
children: t.map((I) => /* @__PURE__ */ e(
|
|
4276
4299
|
"td",
|
|
4277
4300
|
{
|
|
4278
4301
|
style: {
|
|
4279
4302
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
4280
4303
|
color: "var(--lucent-text-primary)",
|
|
4281
|
-
textAlign:
|
|
4304
|
+
textAlign: I.align ?? "left",
|
|
4282
4305
|
verticalAlign: "middle"
|
|
4283
4306
|
},
|
|
4284
|
-
children:
|
|
4307
|
+
children: I.render ? I.render(z, k) : String(z[I.key] ?? "")
|
|
4285
4308
|
},
|
|
4286
|
-
|
|
4309
|
+
I.key
|
|
4287
4310
|
))
|
|
4288
4311
|
},
|
|
4289
|
-
|
|
4312
|
+
k
|
|
4290
4313
|
)) })
|
|
4291
4314
|
] }) }),
|
|
4292
|
-
|
|
4315
|
+
r > 0 && w.length > 0 && /* @__PURE__ */ h("div", { style: {
|
|
4293
4316
|
display: "flex",
|
|
4294
4317
|
alignItems: "center",
|
|
4295
4318
|
justifyContent: "space-between",
|
|
4296
4319
|
gap: "var(--lucent-space-3)",
|
|
4297
4320
|
flexWrap: "wrap"
|
|
4298
4321
|
}, children: [
|
|
4299
|
-
/* @__PURE__ */ e(
|
|
4322
|
+
/* @__PURE__ */ e(A, { color: "secondary", size: "sm", children: w.length === 0 ? `0 rows${n.length > 0 ? ` (filtered from ${n.length})` : ""}` : w.length === 1 ? `1 row${w.length < n.length ? ` (filtered from ${n.length})` : ""}` : `${p * r + 1}–${Math.min((p + 1) * r, w.length)} of ${w.length} rows${w.length < n.length ? ` (filtered from ${n.length})` : ""}` }),
|
|
4300
4323
|
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
|
|
4301
4324
|
/* @__PURE__ */ e(
|
|
4302
4325
|
K,
|
|
4303
4326
|
{
|
|
4304
|
-
onClick: () =>
|
|
4305
|
-
disabled:
|
|
4327
|
+
onClick: () => F(p - 1),
|
|
4328
|
+
disabled: p === 0,
|
|
4306
4329
|
"aria-label": "Previous page",
|
|
4307
4330
|
children: /* @__PURE__ */ e(ne, { dir: "left" })
|
|
4308
4331
|
}
|
|
4309
4332
|
),
|
|
4310
|
-
|
|
4311
|
-
(
|
|
4333
|
+
D.map(
|
|
4334
|
+
(z, k) => z === "…" ? /* @__PURE__ */ e("span", { style: {
|
|
4312
4335
|
padding: "0 var(--lucent-space-1)",
|
|
4313
4336
|
color: "var(--lucent-text-disabled)",
|
|
4314
4337
|
fontSize: "var(--lucent-font-size-sm)"
|
|
4315
|
-
}, children: "…" }, `ellipsis-${
|
|
4338
|
+
}, children: "…" }, `ellipsis-${k}`) : /* @__PURE__ */ e(
|
|
4316
4339
|
K,
|
|
4317
4340
|
{
|
|
4318
|
-
onClick: () =>
|
|
4319
|
-
active:
|
|
4320
|
-
"aria-label": `Page ${
|
|
4321
|
-
"aria-current":
|
|
4322
|
-
children:
|
|
4341
|
+
onClick: () => F(z),
|
|
4342
|
+
active: z === p,
|
|
4343
|
+
"aria-label": `Page ${z + 1}`,
|
|
4344
|
+
"aria-current": z === p ? "page" : void 0,
|
|
4345
|
+
children: z + 1
|
|
4323
4346
|
},
|
|
4324
|
-
|
|
4347
|
+
z
|
|
4325
4348
|
)
|
|
4326
4349
|
),
|
|
4327
4350
|
/* @__PURE__ */ e(
|
|
4328
4351
|
K,
|
|
4329
4352
|
{
|
|
4330
|
-
onClick: () =>
|
|
4331
|
-
disabled:
|
|
4353
|
+
onClick: () => F(p + 1),
|
|
4354
|
+
disabled: p >= E - 1,
|
|
4332
4355
|
"aria-label": "Next page",
|
|
4333
4356
|
children: /* @__PURE__ */ e(ne, { dir: "right" })
|
|
4334
4357
|
}
|
|
@@ -4337,20 +4360,260 @@ function Jn({
|
|
|
4337
4360
|
] })
|
|
4338
4361
|
] });
|
|
4339
4362
|
}
|
|
4363
|
+
function At({
|
|
4364
|
+
columns: t,
|
|
4365
|
+
rows: n,
|
|
4366
|
+
filters: r,
|
|
4367
|
+
onFilter: o,
|
|
4368
|
+
onClearAll: a
|
|
4369
|
+
}) {
|
|
4370
|
+
const i = t.filter((s) => s.filterable), l = Object.keys(r).length;
|
|
4371
|
+
return /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-2)", flexWrap: "wrap" }, children: [
|
|
4372
|
+
i.map((s) => {
|
|
4373
|
+
const d = Array.from(
|
|
4374
|
+
new Set(n.map((m) => String(m[s.key] ?? "")))
|
|
4375
|
+
).sort();
|
|
4376
|
+
return /* @__PURE__ */ e(
|
|
4377
|
+
Dt,
|
|
4378
|
+
{
|
|
4379
|
+
label: s.header,
|
|
4380
|
+
values: d,
|
|
4381
|
+
value: r[s.key] ?? [],
|
|
4382
|
+
onChange: (m) => o(s.key, m)
|
|
4383
|
+
},
|
|
4384
|
+
s.key
|
|
4385
|
+
);
|
|
4386
|
+
}),
|
|
4387
|
+
l > 0 && /* @__PURE__ */ e(
|
|
4388
|
+
"button",
|
|
4389
|
+
{
|
|
4390
|
+
onClick: a,
|
|
4391
|
+
style: {
|
|
4392
|
+
display: "inline-flex",
|
|
4393
|
+
alignItems: "center",
|
|
4394
|
+
height: 30,
|
|
4395
|
+
padding: "0 var(--lucent-space-2)",
|
|
4396
|
+
border: "none",
|
|
4397
|
+
borderRadius: "var(--lucent-radius-md)",
|
|
4398
|
+
background: "transparent",
|
|
4399
|
+
color: "var(--lucent-text-secondary)",
|
|
4400
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4401
|
+
fontSize: "var(--lucent-font-size-xs)",
|
|
4402
|
+
cursor: "pointer"
|
|
4403
|
+
},
|
|
4404
|
+
children: "Clear all"
|
|
4405
|
+
}
|
|
4406
|
+
)
|
|
4407
|
+
] });
|
|
4408
|
+
}
|
|
4409
|
+
function Dt({
|
|
4410
|
+
label: t,
|
|
4411
|
+
values: n,
|
|
4412
|
+
value: r,
|
|
4413
|
+
onChange: o
|
|
4414
|
+
}) {
|
|
4415
|
+
const [a, i] = q(!1), [l, s] = q(!1), [d, m] = q(""), g = B(null), u = B(null), f = r.length > 0;
|
|
4416
|
+
$(() => {
|
|
4417
|
+
if (!a) {
|
|
4418
|
+
m("");
|
|
4419
|
+
return;
|
|
4420
|
+
}
|
|
4421
|
+
setTimeout(() => {
|
|
4422
|
+
var v;
|
|
4423
|
+
return (v = u.current) == null ? void 0 : v.focus();
|
|
4424
|
+
}, 0);
|
|
4425
|
+
const b = (v) => {
|
|
4426
|
+
g.current && !g.current.contains(v.target) && i(!1);
|
|
4427
|
+
}, p = (v) => {
|
|
4428
|
+
v.key === "Escape" && i(!1);
|
|
4429
|
+
};
|
|
4430
|
+
return document.addEventListener("mousedown", b), document.addEventListener("keydown", p), () => {
|
|
4431
|
+
document.removeEventListener("mousedown", b), document.removeEventListener("keydown", p);
|
|
4432
|
+
};
|
|
4433
|
+
}, [a]);
|
|
4434
|
+
const c = d ? n.filter((b) => b.toLowerCase().includes(d.toLowerCase())) : n, x = (b) => o(r.includes(b) ? r.filter((p) => p !== b) : [...r, b]), y = r.length === 0 ? null : r.length === 1 ? /* @__PURE__ */ h("span", { style: { color: "var(--lucent-text-secondary)", fontWeight: "var(--lucent-font-weight-regular)" }, children: [
|
|
4435
|
+
": ",
|
|
4436
|
+
r[0]
|
|
4437
|
+
] }) : /* @__PURE__ */ h("span", { style: { color: "var(--lucent-accent-default)" }, children: [
|
|
4438
|
+
"(",
|
|
4439
|
+
r.length,
|
|
4440
|
+
")"
|
|
4441
|
+
] });
|
|
4442
|
+
return /* @__PURE__ */ h("div", { ref: g, style: { position: "relative" }, children: [
|
|
4443
|
+
/* @__PURE__ */ h(
|
|
4444
|
+
"button",
|
|
4445
|
+
{
|
|
4446
|
+
onClick: () => i((b) => !b),
|
|
4447
|
+
onMouseEnter: () => s(!0),
|
|
4448
|
+
onMouseLeave: () => s(!1),
|
|
4449
|
+
style: {
|
|
4450
|
+
display: "inline-flex",
|
|
4451
|
+
alignItems: "center",
|
|
4452
|
+
gap: "var(--lucent-space-1)",
|
|
4453
|
+
height: 30,
|
|
4454
|
+
padding: "0 var(--lucent-space-3)",
|
|
4455
|
+
borderRadius: "var(--lucent-radius-md)",
|
|
4456
|
+
border: `1px solid ${f ? "var(--lucent-accent-default)" : l ? "var(--lucent-border-strong)" : "var(--lucent-border-default)"}`,
|
|
4457
|
+
background: f ? "var(--lucent-accent-subtle)" : "var(--lucent-surface-default)",
|
|
4458
|
+
color: f ? "var(--lucent-accent-default)" : "var(--lucent-text-primary)",
|
|
4459
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4460
|
+
fontSize: "var(--lucent-font-size-xs)",
|
|
4461
|
+
fontWeight: f ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
4462
|
+
cursor: "pointer",
|
|
4463
|
+
outline: "none",
|
|
4464
|
+
whiteSpace: "nowrap",
|
|
4465
|
+
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
4466
|
+
},
|
|
4467
|
+
children: [
|
|
4468
|
+
t,
|
|
4469
|
+
y,
|
|
4470
|
+
/* @__PURE__ */ e(
|
|
4471
|
+
"svg",
|
|
4472
|
+
{
|
|
4473
|
+
width: "10",
|
|
4474
|
+
height: "10",
|
|
4475
|
+
viewBox: "0 0 10 10",
|
|
4476
|
+
fill: "none",
|
|
4477
|
+
"aria-hidden": !0,
|
|
4478
|
+
style: { transform: a ? "rotate(180deg)" : "none", transition: "transform var(--lucent-duration-fast) var(--lucent-easing-default)" },
|
|
4479
|
+
children: /* @__PURE__ */ e("path", { d: "M2 3.5L5 6.5L8 3.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4480
|
+
}
|
|
4481
|
+
)
|
|
4482
|
+
]
|
|
4483
|
+
}
|
|
4484
|
+
),
|
|
4485
|
+
a && /* @__PURE__ */ h("div", { style: {
|
|
4486
|
+
position: "absolute",
|
|
4487
|
+
top: "calc(100% + 4px)",
|
|
4488
|
+
left: 0,
|
|
4489
|
+
minWidth: 180,
|
|
4490
|
+
maxHeight: 280,
|
|
4491
|
+
display: "flex",
|
|
4492
|
+
flexDirection: "column",
|
|
4493
|
+
background: "var(--lucent-surface-default)",
|
|
4494
|
+
border: "1px solid var(--lucent-border-default)",
|
|
4495
|
+
borderRadius: "var(--lucent-radius-lg)",
|
|
4496
|
+
boxShadow: "0 4px 16px color-mix(in srgb, var(--lucent-text-primary) 8%, transparent)",
|
|
4497
|
+
zIndex: 50
|
|
4498
|
+
}, children: [
|
|
4499
|
+
/* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-2)", paddingBottom: 0 }, children: /* @__PURE__ */ e(
|
|
4500
|
+
"input",
|
|
4501
|
+
{
|
|
4502
|
+
ref: u,
|
|
4503
|
+
type: "text",
|
|
4504
|
+
value: d,
|
|
4505
|
+
onChange: (b) => m(b.target.value),
|
|
4506
|
+
placeholder: "Search…",
|
|
4507
|
+
style: {
|
|
4508
|
+
width: "100%",
|
|
4509
|
+
boxSizing: "border-box",
|
|
4510
|
+
height: 26,
|
|
4511
|
+
padding: "0 var(--lucent-space-2)",
|
|
4512
|
+
borderRadius: "var(--lucent-radius-md)",
|
|
4513
|
+
border: "1px solid var(--lucent-border-default)",
|
|
4514
|
+
background: "var(--lucent-bg-subtle)",
|
|
4515
|
+
color: "var(--lucent-text-primary)",
|
|
4516
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4517
|
+
fontSize: "var(--lucent-font-size-xs)",
|
|
4518
|
+
outline: "none"
|
|
4519
|
+
}
|
|
4520
|
+
}
|
|
4521
|
+
) }),
|
|
4522
|
+
r.length > 0 && /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-1) var(--lucent-space-2) 0" }, children: /* @__PURE__ */ e(
|
|
4523
|
+
"button",
|
|
4524
|
+
{
|
|
4525
|
+
onClick: () => o([]),
|
|
4526
|
+
style: {
|
|
4527
|
+
display: "inline-flex",
|
|
4528
|
+
padding: "2px var(--lucent-space-2)",
|
|
4529
|
+
border: "none",
|
|
4530
|
+
borderRadius: "var(--lucent-radius-sm)",
|
|
4531
|
+
background: "transparent",
|
|
4532
|
+
color: "var(--lucent-text-secondary)",
|
|
4533
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4534
|
+
fontSize: "var(--lucent-font-size-xs)",
|
|
4535
|
+
cursor: "pointer",
|
|
4536
|
+
textDecoration: "underline"
|
|
4537
|
+
},
|
|
4538
|
+
children: "Clear selection"
|
|
4539
|
+
}
|
|
4540
|
+
) }),
|
|
4541
|
+
/* @__PURE__ */ e("div", { style: { overflowY: "auto", padding: "var(--lucent-space-1)", borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" }, children: c.length === 0 ? /* @__PURE__ */ e("div", { style: {
|
|
4542
|
+
padding: "var(--lucent-space-3)",
|
|
4543
|
+
color: "var(--lucent-text-disabled)",
|
|
4544
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4545
|
+
fontSize: "var(--lucent-font-size-xs)",
|
|
4546
|
+
textAlign: "center"
|
|
4547
|
+
}, children: "No results" }) : c.map((b) => /* @__PURE__ */ e(
|
|
4548
|
+
Ft,
|
|
4549
|
+
{
|
|
4550
|
+
label: b,
|
|
4551
|
+
isSelected: r.includes(b),
|
|
4552
|
+
onClick: () => x(b)
|
|
4553
|
+
},
|
|
4554
|
+
b
|
|
4555
|
+
)) })
|
|
4556
|
+
] })
|
|
4557
|
+
] });
|
|
4558
|
+
}
|
|
4559
|
+
function Ft({ label: t, isSelected: n, onClick: r }) {
|
|
4560
|
+
const [o, a] = q(!1);
|
|
4561
|
+
return /* @__PURE__ */ h(
|
|
4562
|
+
"button",
|
|
4563
|
+
{
|
|
4564
|
+
onClick: r,
|
|
4565
|
+
onMouseEnter: () => a(!0),
|
|
4566
|
+
onMouseLeave: () => a(!1),
|
|
4567
|
+
style: {
|
|
4568
|
+
display: "flex",
|
|
4569
|
+
alignItems: "center",
|
|
4570
|
+
gap: "var(--lucent-space-2)",
|
|
4571
|
+
width: "100%",
|
|
4572
|
+
textAlign: "left",
|
|
4573
|
+
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
4574
|
+
borderRadius: "var(--lucent-radius-md)",
|
|
4575
|
+
border: "none",
|
|
4576
|
+
background: o ? "var(--lucent-bg-subtle)" : "transparent",
|
|
4577
|
+
color: "var(--lucent-text-primary)",
|
|
4578
|
+
fontFamily: "var(--lucent-font-family-base)",
|
|
4579
|
+
fontSize: "var(--lucent-font-size-xs)",
|
|
4580
|
+
fontWeight: n ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
4581
|
+
cursor: "pointer",
|
|
4582
|
+
outline: "none",
|
|
4583
|
+
whiteSpace: "nowrap"
|
|
4584
|
+
},
|
|
4585
|
+
children: [
|
|
4586
|
+
/* @__PURE__ */ e("span", { style: {
|
|
4587
|
+
flexShrink: 0,
|
|
4588
|
+
width: 14,
|
|
4589
|
+
height: 14,
|
|
4590
|
+
borderRadius: "var(--lucent-radius-sm)",
|
|
4591
|
+
border: `1.5px solid ${n ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
|
|
4592
|
+
background: n ? "var(--lucent-accent-default)" : "transparent",
|
|
4593
|
+
display: "flex",
|
|
4594
|
+
alignItems: "center",
|
|
4595
|
+
justifyContent: "center",
|
|
4596
|
+
transition: "border-color var(--lucent-duration-fast), background var(--lucent-duration-fast)"
|
|
4597
|
+
}, children: n && /* @__PURE__ */ e("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e("path", { d: "M1 4L3 6L7 2", stroke: "var(--lucent-text-on-accent)", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
4598
|
+
t
|
|
4599
|
+
]
|
|
4600
|
+
}
|
|
4601
|
+
);
|
|
4602
|
+
}
|
|
4340
4603
|
function K({
|
|
4341
4604
|
children: t,
|
|
4342
4605
|
onClick: n,
|
|
4343
|
-
disabled:
|
|
4606
|
+
disabled: r,
|
|
4344
4607
|
active: o,
|
|
4345
|
-
...
|
|
4608
|
+
...a
|
|
4346
4609
|
}) {
|
|
4347
|
-
const [i, l] =
|
|
4610
|
+
const [i, l] = q(!1);
|
|
4348
4611
|
return /* @__PURE__ */ e(
|
|
4349
4612
|
"button",
|
|
4350
4613
|
{
|
|
4351
|
-
...
|
|
4614
|
+
...a,
|
|
4352
4615
|
onClick: n,
|
|
4353
|
-
disabled:
|
|
4616
|
+
disabled: r,
|
|
4354
4617
|
onMouseEnter: () => l(!0),
|
|
4355
4618
|
onMouseLeave: () => l(!1),
|
|
4356
4619
|
style: {
|
|
@@ -4362,32 +4625,32 @@ function K({
|
|
|
4362
4625
|
padding: "0 var(--lucent-space-2)",
|
|
4363
4626
|
borderRadius: "var(--lucent-radius-md)",
|
|
4364
4627
|
border: o ? "1px solid var(--lucent-accent-default)" : "1px solid transparent",
|
|
4365
|
-
background: o ? "var(--lucent-accent-default)" : i && !
|
|
4366
|
-
color: o ? "var(--lucent-text-on-accent)" :
|
|
4628
|
+
background: o ? "var(--lucent-accent-default)" : i && !r ? "var(--lucent-bg-muted)" : "transparent",
|
|
4629
|
+
color: o ? "var(--lucent-text-on-accent)" : r ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
4367
4630
|
fontSize: "var(--lucent-font-size-sm)",
|
|
4368
4631
|
fontFamily: "var(--lucent-font-family-base)",
|
|
4369
4632
|
fontWeight: "var(--lucent-font-weight-regular)",
|
|
4370
|
-
cursor:
|
|
4633
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
4371
4634
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
|
|
4372
4635
|
},
|
|
4373
4636
|
children: t
|
|
4374
4637
|
}
|
|
4375
4638
|
);
|
|
4376
4639
|
}
|
|
4377
|
-
const
|
|
4640
|
+
const tr = {
|
|
4378
4641
|
id: "data-table",
|
|
4379
4642
|
name: "DataTable",
|
|
4380
4643
|
tier: "molecule",
|
|
4381
4644
|
domain: "neutral",
|
|
4382
4645
|
specVersion: "1.0",
|
|
4383
|
-
description: "A sortable, paginated data table with configurable columns, custom cell renderers, and keyboard-accessible pagination controls.",
|
|
4384
|
-
designIntent:
|
|
4646
|
+
description: "A sortable, filterable, paginated data table with configurable columns, custom cell renderers, and keyboard-accessible pagination controls.",
|
|
4647
|
+
designIntent: 'DataTable is generic over row type T so TypeScript consumers get full type safety on column keys and renderers. Sorting is client-side and composable — each column opts in via sortable:true; clicking a sorted column cycles asc → desc → unsorted. Filtering is per-column — each column opts in via filterable:true, which adds a dropdown button above the table. Each dropdown is searchable and multi-select: a search input filters the option list, and each option is a checkbox that toggles membership in the active set. Filtering uses set-membership: a row passes if its column value is included in the selected values array. A "Clear selection" link inside each dropdown clears that column; a "Clear all" button in the bar appears when any filter is active. Filter → sort → paginate is the fixed pipeline order; any filter change resets the page to 0. Pagination is either controlled (page prop + onPageChange) or uncontrolled (internal state). A pageSize of 0 disables pagination entirely, useful when the parent manages windowing. Row hover uses bg-subtle, not a border change, so the visual weight stays low for dense data views.',
|
|
4385
4648
|
props: [
|
|
4386
4649
|
{
|
|
4387
4650
|
name: "columns",
|
|
4388
4651
|
type: "array",
|
|
4389
4652
|
required: !0,
|
|
4390
|
-
description: "Column definitions. Each column has a key, header, optional render function, optional sortable flag, optional width, and optional text align."
|
|
4653
|
+
description: "Column definitions. Each column has a key, header, optional render function, optional sortable flag, optional filterable flag (renders a text filter input below the header), optional width, and optional text align."
|
|
4391
4654
|
},
|
|
4392
4655
|
{
|
|
4393
4656
|
name: "rows",
|
|
@@ -4412,7 +4675,13 @@ const Qn = {
|
|
|
4412
4675
|
name: "onPageChange",
|
|
4413
4676
|
type: "function",
|
|
4414
4677
|
required: !1,
|
|
4415
|
-
description: "Called with the new page index whenever the page changes (from pagination controls or after a sort reset)."
|
|
4678
|
+
description: "Called with the new page index whenever the page changes (from pagination controls or after a sort/filter reset)."
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
name: "onFilterChange",
|
|
4682
|
+
type: "function",
|
|
4683
|
+
required: !1,
|
|
4684
|
+
description: "Called with the current filter map (Record<string, string[]>) whenever any column filter changes. Keys are column keys; columns with no selection are omitted from the map."
|
|
4416
4685
|
},
|
|
4417
4686
|
{
|
|
4418
4687
|
name: "emptyState",
|
|
@@ -4437,6 +4706,18 @@ const Qn = {
|
|
|
4437
4706
|
{ key: 'status', header: 'Status', render: (row) => <Badge>{row.status}</Badge> },
|
|
4438
4707
|
]}
|
|
4439
4708
|
rows={users}
|
|
4709
|
+
/>`
|
|
4710
|
+
},
|
|
4711
|
+
{
|
|
4712
|
+
title: "Sortable + filterable table",
|
|
4713
|
+
code: `<DataTable
|
|
4714
|
+
columns={[
|
|
4715
|
+
{ key: 'name', header: 'Name', sortable: true, filterable: true },
|
|
4716
|
+
{ key: 'role', header: 'Role', filterable: true },
|
|
4717
|
+
{ key: 'status', header: 'Status', render: (row) => <Badge>{row.status}</Badge> },
|
|
4718
|
+
]}
|
|
4719
|
+
rows={users}
|
|
4720
|
+
onFilterChange={(filters) => console.log(filters)}
|
|
4440
4721
|
/>`
|
|
4441
4722
|
},
|
|
4442
4723
|
{
|
|
@@ -4465,76 +4746,76 @@ const Qn = {
|
|
|
4465
4746
|
keyboardInteractions: ["Tab to pagination controls", "Enter/Space to activate buttons"],
|
|
4466
4747
|
notes: 'Column headers with sortable:true are interactive buttons with aria-sort reflecting the current sort direction. Pagination buttons include aria-label and aria-current="page" for the active page.'
|
|
4467
4748
|
}
|
|
4468
|
-
},
|
|
4749
|
+
}, Bt = `
|
|
4469
4750
|
@keyframes lucent-palette-in {
|
|
4470
4751
|
from { opacity: 0; transform: scale(0.96) translateY(-8px); }
|
|
4471
4752
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
4472
4753
|
}
|
|
4473
4754
|
`;
|
|
4474
|
-
function
|
|
4755
|
+
function Rt(t, n) {
|
|
4475
4756
|
var o;
|
|
4476
|
-
const
|
|
4477
|
-
return t.label.toLowerCase().includes(
|
|
4757
|
+
const r = n.toLowerCase();
|
|
4758
|
+
return t.label.toLowerCase().includes(r) || (((o = t.description) == null ? void 0 : o.toLowerCase().includes(r)) ?? !1);
|
|
4478
4759
|
}
|
|
4479
|
-
function
|
|
4760
|
+
function nr({
|
|
4480
4761
|
commands: t,
|
|
4481
4762
|
placeholder: n = "Search commands…",
|
|
4482
|
-
shortcutKey:
|
|
4763
|
+
shortcutKey: r = "k",
|
|
4483
4764
|
open: o,
|
|
4484
|
-
onOpenChange:
|
|
4765
|
+
onOpenChange: a,
|
|
4485
4766
|
style: i
|
|
4486
4767
|
}) {
|
|
4487
|
-
const l = o !== void 0, [s,
|
|
4488
|
-
if (!
|
|
4768
|
+
const l = o !== void 0, [s, d] = q(!1), m = l ? o : s, [g, u] = q(""), [f, c] = q(0), x = B(null), y = B(null), b = B(!1);
|
|
4769
|
+
if (!b.current) {
|
|
4489
4770
|
const T = document.createElement("style");
|
|
4490
|
-
T.textContent =
|
|
4771
|
+
T.textContent = Bt, document.head.appendChild(T), b.current = !0;
|
|
4491
4772
|
}
|
|
4492
|
-
const
|
|
4493
|
-
l ||
|
|
4494
|
-
}, [l,
|
|
4495
|
-
|
|
4773
|
+
const p = Z((T) => {
|
|
4774
|
+
l || d(T), a == null || a(T);
|
|
4775
|
+
}, [l, a]);
|
|
4776
|
+
$(() => {
|
|
4496
4777
|
const T = (C) => {
|
|
4497
|
-
(C.metaKey || C.ctrlKey) && C.key ===
|
|
4778
|
+
(C.metaKey || C.ctrlKey) && C.key === r && (C.preventDefault(), p(!m));
|
|
4498
4779
|
};
|
|
4499
4780
|
return window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T);
|
|
4500
|
-
}, [m,
|
|
4501
|
-
m && (
|
|
4781
|
+
}, [m, r, p]), $(() => {
|
|
4782
|
+
m && (u(""), c(0), setTimeout(() => {
|
|
4502
4783
|
var T;
|
|
4503
|
-
return (T =
|
|
4784
|
+
return (T = x.current) == null ? void 0 : T.focus();
|
|
4504
4785
|
}, 10));
|
|
4505
4786
|
}, [m]);
|
|
4506
|
-
const
|
|
4507
|
-
|
|
4787
|
+
const v = g ? t.filter((T) => Rt(T, g)) : t, M = v.filter((T) => !T.disabled);
|
|
4788
|
+
$(() => {
|
|
4508
4789
|
const T = y.current;
|
|
4509
4790
|
if (!T) return;
|
|
4510
4791
|
const C = T.querySelector('[data-active="true"]');
|
|
4511
4792
|
C == null || C.scrollIntoView({ block: "nearest" });
|
|
4512
|
-
}, [
|
|
4513
|
-
const
|
|
4514
|
-
T.disabled || (T.onSelect(),
|
|
4515
|
-
},
|
|
4793
|
+
}, [f]);
|
|
4794
|
+
const w = (T) => {
|
|
4795
|
+
T.disabled || (T.onSelect(), p(!1));
|
|
4796
|
+
}, S = (T) => {
|
|
4516
4797
|
if (T.key === "Escape") {
|
|
4517
|
-
|
|
4798
|
+
p(!1);
|
|
4518
4799
|
return;
|
|
4519
4800
|
}
|
|
4520
|
-
if (T.key === "ArrowDown" && (T.preventDefault(), c((C) => Math.min(C + 1,
|
|
4521
|
-
const C =
|
|
4522
|
-
C &&
|
|
4801
|
+
if (T.key === "ArrowDown" && (T.preventDefault(), c((C) => Math.min(C + 1, M.length - 1))), T.key === "ArrowUp" && (T.preventDefault(), c((C) => Math.max(C - 1, 0))), T.key === "Enter") {
|
|
4802
|
+
const C = M[f];
|
|
4803
|
+
C && w(C);
|
|
4523
4804
|
}
|
|
4524
|
-
},
|
|
4525
|
-
for (const T of
|
|
4526
|
-
const C =
|
|
4527
|
-
C && C.group === T.group ? C.items.push(T) :
|
|
4805
|
+
}, E = [];
|
|
4806
|
+
for (const T of v) {
|
|
4807
|
+
const C = E[E.length - 1];
|
|
4808
|
+
C && C.group === T.group ? C.items.push(T) : E.push({ group: T.group, items: [T] });
|
|
4528
4809
|
}
|
|
4529
4810
|
if (!m) return null;
|
|
4530
|
-
let
|
|
4811
|
+
let F = 0;
|
|
4531
4812
|
return /* @__PURE__ */ e(
|
|
4532
4813
|
"div",
|
|
4533
4814
|
{
|
|
4534
4815
|
role: "dialog",
|
|
4535
4816
|
"aria-label": "Command palette",
|
|
4536
4817
|
"aria-modal": "true",
|
|
4537
|
-
onClick: () =>
|
|
4818
|
+
onClick: () => p(!1),
|
|
4538
4819
|
style: {
|
|
4539
4820
|
position: "fixed",
|
|
4540
4821
|
inset: 0,
|
|
@@ -4570,7 +4851,7 @@ function Zn({
|
|
|
4570
4851
|
alignItems: "center",
|
|
4571
4852
|
gap: "var(--lucent-space-3)",
|
|
4572
4853
|
padding: "var(--lucent-space-3) var(--lucent-space-4)",
|
|
4573
|
-
borderBottom:
|
|
4854
|
+
borderBottom: v.length > 0 ? "1px solid var(--lucent-border-subtle)" : "none"
|
|
4574
4855
|
}, children: [
|
|
4575
4856
|
/* @__PURE__ */ h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0, style: { flexShrink: 0, color: "var(--lucent-text-secondary)" }, children: [
|
|
4576
4857
|
/* @__PURE__ */ e("circle", { cx: "7", cy: "7", r: "4.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
@@ -4579,15 +4860,15 @@ function Zn({
|
|
|
4579
4860
|
/* @__PURE__ */ e(
|
|
4580
4861
|
"input",
|
|
4581
4862
|
{
|
|
4582
|
-
ref:
|
|
4863
|
+
ref: x,
|
|
4583
4864
|
role: "searchbox",
|
|
4584
4865
|
"aria-autocomplete": "list",
|
|
4585
4866
|
"aria-controls": "lucent-command-list",
|
|
4586
|
-
value:
|
|
4867
|
+
value: g,
|
|
4587
4868
|
onChange: (T) => {
|
|
4588
|
-
|
|
4869
|
+
u(T.target.value), c(0);
|
|
4589
4870
|
},
|
|
4590
|
-
onKeyDown:
|
|
4871
|
+
onKeyDown: S,
|
|
4591
4872
|
placeholder: n,
|
|
4592
4873
|
style: {
|
|
4593
4874
|
flex: 1,
|
|
@@ -4620,30 +4901,30 @@ function Zn({
|
|
|
4620
4901
|
role: "listbox",
|
|
4621
4902
|
ref: y,
|
|
4622
4903
|
style: { maxHeight: 360, overflowY: "auto", padding: "var(--lucent-space-1) 0" },
|
|
4623
|
-
children:
|
|
4904
|
+
children: v.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-8)", textAlign: "center" }, children: /* @__PURE__ */ h(A, { color: "secondary", children: [
|
|
4624
4905
|
'No results for "',
|
|
4625
|
-
|
|
4906
|
+
g,
|
|
4626
4907
|
'"'
|
|
4627
|
-
] }) }) :
|
|
4908
|
+
] }) }) : E.map(({ group: T, items: C }, W) => /* @__PURE__ */ h("div", { children: [
|
|
4628
4909
|
T && /* @__PURE__ */ e("div", { style: {
|
|
4629
4910
|
padding: "var(--lucent-space-2) var(--lucent-space-4) var(--lucent-space-1)",
|
|
4630
|
-
...
|
|
4631
|
-
}, children: /* @__PURE__ */ e(
|
|
4632
|
-
C.map((
|
|
4633
|
-
const
|
|
4634
|
-
let
|
|
4635
|
-
return
|
|
4911
|
+
...W > 0 ? { borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-1)" } : {}
|
|
4912
|
+
}, children: /* @__PURE__ */ e(A, { size: "xs", color: "secondary", weight: "medium", children: T }) }),
|
|
4913
|
+
C.map((D) => {
|
|
4914
|
+
const z = D.disabled ?? !1;
|
|
4915
|
+
let k = !1;
|
|
4916
|
+
return z || (k = F === f, F++), /* @__PURE__ */ h(
|
|
4636
4917
|
"div",
|
|
4637
4918
|
{
|
|
4638
4919
|
role: "option",
|
|
4639
|
-
"aria-selected":
|
|
4640
|
-
"aria-disabled":
|
|
4641
|
-
"data-active":
|
|
4642
|
-
onClick: () =>
|
|
4920
|
+
"aria-selected": k,
|
|
4921
|
+
"aria-disabled": z,
|
|
4922
|
+
"data-active": k,
|
|
4923
|
+
onClick: () => w(D),
|
|
4643
4924
|
onMouseEnter: () => {
|
|
4644
|
-
if (
|
|
4645
|
-
const
|
|
4646
|
-
|
|
4925
|
+
if (!z) {
|
|
4926
|
+
const I = M.indexOf(D);
|
|
4927
|
+
I !== -1 && c(I);
|
|
4647
4928
|
}
|
|
4648
4929
|
},
|
|
4649
4930
|
style: {
|
|
@@ -4651,23 +4932,23 @@ function Zn({
|
|
|
4651
4932
|
alignItems: "center",
|
|
4652
4933
|
gap: "var(--lucent-space-3)",
|
|
4653
4934
|
padding: "var(--lucent-space-2) var(--lucent-space-4)",
|
|
4654
|
-
cursor:
|
|
4655
|
-
background:
|
|
4935
|
+
cursor: z ? "not-allowed" : "pointer",
|
|
4936
|
+
background: k ? "var(--lucent-bg-muted)" : "transparent",
|
|
4656
4937
|
transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
4657
|
-
opacity:
|
|
4938
|
+
opacity: z ? 0.5 : 1
|
|
4658
4939
|
},
|
|
4659
4940
|
children: [
|
|
4660
|
-
|
|
4941
|
+
D.icon && /* @__PURE__ */ e("span", { style: { flexShrink: 0, color: "var(--lucent-text-secondary)", display: "flex" }, children: D.icon }),
|
|
4661
4942
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4662
|
-
/* @__PURE__ */ e(
|
|
4663
|
-
|
|
4943
|
+
/* @__PURE__ */ e(A, { size: "sm", weight: "medium", truncate: !0, children: D.label }),
|
|
4944
|
+
D.description && /* @__PURE__ */ e(A, { size: "xs", color: "secondary", truncate: !0, children: D.description })
|
|
4664
4945
|
] })
|
|
4665
4946
|
]
|
|
4666
4947
|
},
|
|
4667
|
-
|
|
4948
|
+
D.id
|
|
4668
4949
|
);
|
|
4669
4950
|
})
|
|
4670
|
-
] },
|
|
4951
|
+
] }, W))
|
|
4671
4952
|
}
|
|
4672
4953
|
),
|
|
4673
4954
|
/* @__PURE__ */ e("div", { style: {
|
|
@@ -4690,7 +4971,7 @@ function Zn({
|
|
|
4690
4971
|
fontSize: "var(--lucent-font-size-xs)",
|
|
4691
4972
|
color: "var(--lucent-text-secondary)"
|
|
4692
4973
|
}, children: T }),
|
|
4693
|
-
/* @__PURE__ */ e(
|
|
4974
|
+
/* @__PURE__ */ e(A, { size: "xs", color: "secondary", children: C })
|
|
4694
4975
|
] }, T)) })
|
|
4695
4976
|
]
|
|
4696
4977
|
}
|
|
@@ -4698,7 +4979,7 @@ function Zn({
|
|
|
4698
4979
|
}
|
|
4699
4980
|
);
|
|
4700
4981
|
}
|
|
4701
|
-
const
|
|
4982
|
+
const rr = {
|
|
4702
4983
|
id: "command-palette",
|
|
4703
4984
|
name: "CommandPalette",
|
|
4704
4985
|
tier: "overlay",
|
|
@@ -4781,7 +5062,7 @@ const ea = {
|
|
|
4781
5062
|
notes: 'The backdrop and panel use role="dialog" with aria-modal="true". The input is role="searchbox". The result list is role="listbox" with role="option" items. Focus is moved to the search input on open.'
|
|
4782
5063
|
}
|
|
4783
5064
|
};
|
|
4784
|
-
function
|
|
5065
|
+
function Nt({ label: t, onRemove: n, disabled: r }) {
|
|
4785
5066
|
return /* @__PURE__ */ h("span", { style: {
|
|
4786
5067
|
display: "inline-flex",
|
|
4787
5068
|
alignItems: "center",
|
|
@@ -4797,7 +5078,7 @@ function Ft({ label: t, onRemove: n, disabled: a }) {
|
|
|
4797
5078
|
flexShrink: 0
|
|
4798
5079
|
}, children: [
|
|
4799
5080
|
t,
|
|
4800
|
-
!
|
|
5081
|
+
!r && /* @__PURE__ */ e(
|
|
4801
5082
|
"button",
|
|
4802
5083
|
{
|
|
4803
5084
|
type: "button",
|
|
@@ -4823,52 +5104,52 @@ function Ft({ label: t, onRemove: n, disabled: a }) {
|
|
|
4823
5104
|
)
|
|
4824
5105
|
] });
|
|
4825
5106
|
}
|
|
4826
|
-
function
|
|
5107
|
+
function ar({
|
|
4827
5108
|
options: t,
|
|
4828
5109
|
value: n,
|
|
4829
|
-
defaultValue:
|
|
5110
|
+
defaultValue: r = [],
|
|
4830
5111
|
onChange: o,
|
|
4831
|
-
placeholder:
|
|
5112
|
+
placeholder: a = "Select…",
|
|
4832
5113
|
disabled: i = !1,
|
|
4833
5114
|
max: l,
|
|
4834
5115
|
style: s
|
|
4835
5116
|
}) {
|
|
4836
|
-
const
|
|
4837
|
-
|
|
4838
|
-
if (!
|
|
4839
|
-
const
|
|
5117
|
+
const d = n !== void 0, [m, g] = q(r), u = d ? n : m, [f, c] = q(!1), [x, y] = q(""), [b, p] = q(0), [v, M] = q(!1), w = B(null), S = B(null), E = ce();
|
|
5118
|
+
$(() => {
|
|
5119
|
+
if (!f) return;
|
|
5120
|
+
const k = (I) => {
|
|
4840
5121
|
var R;
|
|
4841
|
-
(R =
|
|
5122
|
+
(R = w.current) != null && R.contains(I.target) || (c(!1), y(""));
|
|
4842
5123
|
};
|
|
4843
|
-
return document.addEventListener("mousedown",
|
|
4844
|
-
}, [
|
|
4845
|
-
const
|
|
4846
|
-
const
|
|
4847
|
-
|
|
4848
|
-
}, T = (
|
|
4849
|
-
const
|
|
4850
|
-
|
|
5124
|
+
return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
|
|
5125
|
+
}, [f]);
|
|
5126
|
+
const F = (k) => {
|
|
5127
|
+
const I = u.includes(k) ? u.filter((R) => R !== k) : l !== void 0 && u.length >= l ? u : [...u, k];
|
|
5128
|
+
d || g(I), o == null || o(I);
|
|
5129
|
+
}, T = (k) => {
|
|
5130
|
+
const I = u.filter((R) => R !== k);
|
|
5131
|
+
d || g(I), o == null || o(I);
|
|
4851
5132
|
}, C = t.filter(
|
|
4852
|
-
(
|
|
4853
|
-
),
|
|
4854
|
-
if (
|
|
5133
|
+
(k) => k.label.toLowerCase().includes(x.toLowerCase())
|
|
5134
|
+
), W = (k) => {
|
|
5135
|
+
if (k.key === "Escape") {
|
|
4855
5136
|
c(!1), y("");
|
|
4856
5137
|
return;
|
|
4857
5138
|
}
|
|
4858
|
-
if (
|
|
4859
|
-
|
|
4860
|
-
const
|
|
4861
|
-
|
|
5139
|
+
if (k.key === "ArrowDown" && (k.preventDefault(), c(!0), p((I) => Math.min(I + 1, C.length - 1))), k.key === "ArrowUp" && (k.preventDefault(), p((I) => Math.max(I - 1, 0))), k.key === "Enter") {
|
|
5140
|
+
k.preventDefault();
|
|
5141
|
+
const I = C[b];
|
|
5142
|
+
I && !I.disabled && F(I.value);
|
|
4862
5143
|
}
|
|
4863
|
-
|
|
4864
|
-
},
|
|
4865
|
-
return /* @__PURE__ */ h("div", { ref:
|
|
5144
|
+
k.key === "Backspace" && x === "" && u.length > 0 && T(u[u.length - 1]);
|
|
5145
|
+
}, D = l !== void 0 && u.length >= l, z = i ? "var(--lucent-border-default)" : v ? "var(--lucent-accent-default)" : "var(--lucent-border-default)";
|
|
5146
|
+
return /* @__PURE__ */ h("div", { ref: w, style: { position: "relative", ...s }, children: [
|
|
4866
5147
|
/* @__PURE__ */ h(
|
|
4867
5148
|
"div",
|
|
4868
5149
|
{
|
|
4869
5150
|
onClick: () => {
|
|
4870
|
-
var
|
|
4871
|
-
i || (c(!0), (
|
|
5151
|
+
var k;
|
|
5152
|
+
i || (c(!0), (k = S.current) == null || k.focus());
|
|
4872
5153
|
},
|
|
4873
5154
|
style: {
|
|
4874
5155
|
display: "flex",
|
|
@@ -4878,34 +5159,34 @@ function ta({
|
|
|
4878
5159
|
minHeight: 38,
|
|
4879
5160
|
padding: "var(--lucent-space-1) var(--lucent-space-3)",
|
|
4880
5161
|
borderRadius: "var(--lucent-radius-md)",
|
|
4881
|
-
border: `1px solid ${
|
|
5162
|
+
border: `1px solid ${z}`,
|
|
4882
5163
|
background: i ? "var(--lucent-bg-muted)" : "var(--lucent-surface-default)",
|
|
4883
5164
|
cursor: i ? "not-allowed" : "text",
|
|
4884
5165
|
transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
|
|
4885
|
-
outline:
|
|
5166
|
+
outline: v ? "2px solid var(--lucent-focus-ring)" : "none",
|
|
4886
5167
|
outlineOffset: 2
|
|
4887
5168
|
},
|
|
4888
5169
|
children: [
|
|
4889
|
-
|
|
4890
|
-
const
|
|
4891
|
-
return
|
|
5170
|
+
u.map((k) => {
|
|
5171
|
+
const I = t.find((R) => R.value === k);
|
|
5172
|
+
return I ? /* @__PURE__ */ e(Nt, { label: I.label, onRemove: () => T(k), disabled: i }, k) : null;
|
|
4892
5173
|
}),
|
|
4893
5174
|
/* @__PURE__ */ e(
|
|
4894
5175
|
"input",
|
|
4895
5176
|
{
|
|
4896
|
-
ref:
|
|
4897
|
-
value:
|
|
4898
|
-
onChange: (
|
|
4899
|
-
y(
|
|
5177
|
+
ref: S,
|
|
5178
|
+
value: x,
|
|
5179
|
+
onChange: (k) => {
|
|
5180
|
+
y(k.target.value), c(!0), p(0);
|
|
4900
5181
|
},
|
|
4901
|
-
onKeyDown:
|
|
4902
|
-
onFocus: () =>
|
|
4903
|
-
onBlur: () =>
|
|
5182
|
+
onKeyDown: W,
|
|
5183
|
+
onFocus: () => M(!0),
|
|
5184
|
+
onBlur: () => M(!1),
|
|
4904
5185
|
disabled: i,
|
|
4905
|
-
placeholder:
|
|
5186
|
+
placeholder: u.length === 0 ? a : "",
|
|
4906
5187
|
"aria-autocomplete": "list",
|
|
4907
|
-
"aria-controls":
|
|
4908
|
-
"aria-expanded":
|
|
5188
|
+
"aria-controls": E,
|
|
5189
|
+
"aria-expanded": f,
|
|
4909
5190
|
role: "combobox",
|
|
4910
5191
|
style: {
|
|
4911
5192
|
flex: "1 1 80px",
|
|
@@ -4924,10 +5205,10 @@ function ta({
|
|
|
4924
5205
|
]
|
|
4925
5206
|
}
|
|
4926
5207
|
),
|
|
4927
|
-
|
|
5208
|
+
f && !i && /* @__PURE__ */ h(
|
|
4928
5209
|
"div",
|
|
4929
5210
|
{
|
|
4930
|
-
id:
|
|
5211
|
+
id: E,
|
|
4931
5212
|
role: "listbox",
|
|
4932
5213
|
"aria-multiselectable": "true",
|
|
4933
5214
|
style: {
|
|
@@ -4945,49 +5226,49 @@ function ta({
|
|
|
4945
5226
|
padding: "var(--lucent-space-1) 0"
|
|
4946
5227
|
},
|
|
4947
5228
|
children: [
|
|
4948
|
-
C.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-3) var(--lucent-space-4)" }, children: /* @__PURE__ */ e(
|
|
4949
|
-
const R =
|
|
5229
|
+
C.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-3) var(--lucent-space-4)" }, children: /* @__PURE__ */ e(A, { color: "secondary", size: "sm", children: "No options" }) }) : C.map((k, I) => {
|
|
5230
|
+
const R = u.includes(k.value), V = I === b, O = k.disabled ?? !1, H = D && !R;
|
|
4950
5231
|
return /* @__PURE__ */ h(
|
|
4951
5232
|
"div",
|
|
4952
5233
|
{
|
|
4953
5234
|
role: "option",
|
|
4954
5235
|
"aria-selected": R,
|
|
4955
|
-
"aria-disabled":
|
|
5236
|
+
"aria-disabled": O || H,
|
|
4956
5237
|
onClick: () => {
|
|
4957
|
-
!
|
|
5238
|
+
!O && !H && F(k.value);
|
|
4958
5239
|
},
|
|
4959
|
-
onMouseEnter: () =>
|
|
5240
|
+
onMouseEnter: () => p(I),
|
|
4960
5241
|
style: {
|
|
4961
5242
|
display: "flex",
|
|
4962
5243
|
alignItems: "center",
|
|
4963
5244
|
gap: "var(--lucent-space-2)",
|
|
4964
5245
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
4965
|
-
cursor:
|
|
4966
|
-
background:
|
|
4967
|
-
opacity:
|
|
5246
|
+
cursor: O || H ? "not-allowed" : "pointer",
|
|
5247
|
+
background: V ? "var(--lucent-bg-subtle)" : "transparent",
|
|
5248
|
+
opacity: O || H ? 0.5 : 1
|
|
4968
5249
|
},
|
|
4969
5250
|
children: [
|
|
4970
5251
|
/* @__PURE__ */ e(
|
|
4971
5252
|
ue,
|
|
4972
5253
|
{
|
|
4973
5254
|
checked: R,
|
|
4974
|
-
disabled:
|
|
5255
|
+
disabled: O || H,
|
|
4975
5256
|
size: "md",
|
|
4976
5257
|
style: { margin: 0, pointerEvents: "none" },
|
|
4977
5258
|
"aria-hidden": !0,
|
|
4978
5259
|
readOnly: !0
|
|
4979
5260
|
}
|
|
4980
5261
|
),
|
|
4981
|
-
/* @__PURE__ */ e(
|
|
5262
|
+
/* @__PURE__ */ e(A, { size: "sm", children: k.label })
|
|
4982
5263
|
]
|
|
4983
5264
|
},
|
|
4984
|
-
|
|
5265
|
+
k.value
|
|
4985
5266
|
);
|
|
4986
5267
|
}),
|
|
4987
|
-
|
|
5268
|
+
D && /* @__PURE__ */ e("div", { style: {
|
|
4988
5269
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
4989
5270
|
borderTop: "1px solid var(--lucent-border-subtle)"
|
|
4990
|
-
}, children: /* @__PURE__ */ h(
|
|
5271
|
+
}, children: /* @__PURE__ */ h(A, { size: "xs", color: "secondary", children: [
|
|
4991
5272
|
"Max ",
|
|
4992
5273
|
l,
|
|
4993
5274
|
" selected"
|
|
@@ -4997,7 +5278,7 @@ function ta({
|
|
|
4997
5278
|
)
|
|
4998
5279
|
] });
|
|
4999
5280
|
}
|
|
5000
|
-
const
|
|
5281
|
+
const or = {
|
|
5001
5282
|
id: "multi-select",
|
|
5002
5283
|
name: "MultiSelect",
|
|
5003
5284
|
tier: "molecule",
|
|
@@ -5092,10 +5373,10 @@ const na = {
|
|
|
5092
5373
|
notes: 'The input carries role="combobox" with aria-expanded and aria-controls pointing to the listbox. Each option has role="option" with aria-selected. Remove buttons on tags have descriptive aria-label.'
|
|
5093
5374
|
}
|
|
5094
5375
|
};
|
|
5095
|
-
function
|
|
5376
|
+
function Lt(t, n) {
|
|
5096
5377
|
return new Date(t, n + 1, 0).getDate();
|
|
5097
5378
|
}
|
|
5098
|
-
function
|
|
5379
|
+
function $t(t, n) {
|
|
5099
5380
|
return new Date(t, n, 1).getDay();
|
|
5100
5381
|
}
|
|
5101
5382
|
function Y(t, n) {
|
|
@@ -5104,10 +5385,10 @@ function Y(t, n) {
|
|
|
5104
5385
|
function X(t, n) {
|
|
5105
5386
|
return new Date(t.getFullYear(), t.getMonth(), t.getDate()) < new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
5106
5387
|
}
|
|
5107
|
-
function
|
|
5388
|
+
function re(t, n) {
|
|
5108
5389
|
return new Date(t.getFullYear(), t.getMonth(), t.getDate()) > new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
5109
5390
|
}
|
|
5110
|
-
const
|
|
5391
|
+
const Wt = [
|
|
5111
5392
|
"January",
|
|
5112
5393
|
"February",
|
|
5113
5394
|
"March",
|
|
@@ -5120,20 +5401,20 @@ const Nt = [
|
|
|
5120
5401
|
"October",
|
|
5121
5402
|
"November",
|
|
5122
5403
|
"December"
|
|
5123
|
-
],
|
|
5404
|
+
], Vt = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
5124
5405
|
function j(t) {
|
|
5125
5406
|
return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
|
|
5126
5407
|
}
|
|
5127
|
-
function
|
|
5128
|
-
const [o,
|
|
5408
|
+
function ae({ dir: t, onClick: n, disabled: r }) {
|
|
5409
|
+
const [o, a] = q(!1);
|
|
5129
5410
|
return /* @__PURE__ */ e(
|
|
5130
5411
|
"button",
|
|
5131
5412
|
{
|
|
5132
5413
|
type: "button",
|
|
5133
5414
|
onClick: n,
|
|
5134
|
-
disabled:
|
|
5135
|
-
onMouseEnter: () =>
|
|
5136
|
-
onMouseLeave: () =>
|
|
5415
|
+
disabled: r,
|
|
5416
|
+
onMouseEnter: () => a(!0),
|
|
5417
|
+
onMouseLeave: () => a(!1),
|
|
5137
5418
|
"aria-label": t === "prev" ? "Previous month" : "Next month",
|
|
5138
5419
|
style: {
|
|
5139
5420
|
display: "inline-flex",
|
|
@@ -5143,9 +5424,9 @@ function re({ dir: t, onClick: n, disabled: a }) {
|
|
|
5143
5424
|
height: 28,
|
|
5144
5425
|
border: "none",
|
|
5145
5426
|
borderRadius: "var(--lucent-radius-md)",
|
|
5146
|
-
background: o && !
|
|
5147
|
-
color:
|
|
5148
|
-
cursor:
|
|
5427
|
+
background: o && !r ? "var(--lucent-bg-muted)" : "transparent",
|
|
5428
|
+
color: r ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
|
|
5429
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
5149
5430
|
transition: "background var(--lucent-duration-fast)"
|
|
5150
5431
|
},
|
|
5151
5432
|
children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e(
|
|
@@ -5164,118 +5445,118 @@ function re({ dir: t, onClick: n, disabled: a }) {
|
|
|
5164
5445
|
function J({
|
|
5165
5446
|
year: t,
|
|
5166
5447
|
month: n,
|
|
5167
|
-
selected:
|
|
5448
|
+
selected: r,
|
|
5168
5449
|
today: o,
|
|
5169
|
-
min:
|
|
5450
|
+
min: a,
|
|
5170
5451
|
max: i,
|
|
5171
5452
|
onSelect: l,
|
|
5172
5453
|
onPrevMonth: s,
|
|
5173
|
-
onNextMonth:
|
|
5454
|
+
onNextMonth: d,
|
|
5174
5455
|
highlightRange: m
|
|
5175
5456
|
}) {
|
|
5176
|
-
const
|
|
5177
|
-
...Array(
|
|
5178
|
-
...Array.from({ length:
|
|
5457
|
+
const g = Lt(t, n), u = $t(t, n), [f, c] = q(null), x = [
|
|
5458
|
+
...Array(u).fill(null),
|
|
5459
|
+
...Array.from({ length: g }, (y, b) => b + 1)
|
|
5179
5460
|
];
|
|
5180
|
-
for (;
|
|
5461
|
+
for (; x.length % 7 !== 0; ) x.push(null);
|
|
5181
5462
|
return /* @__PURE__ */ h("div", { children: [
|
|
5182
5463
|
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "var(--lucent-space-3)" }, children: [
|
|
5183
|
-
/* @__PURE__ */ e(
|
|
5184
|
-
/* @__PURE__ */ h(
|
|
5185
|
-
|
|
5464
|
+
/* @__PURE__ */ e(ae, { dir: "prev", onClick: s }),
|
|
5465
|
+
/* @__PURE__ */ h(A, { weight: "medium", size: "sm", children: [
|
|
5466
|
+
Wt[n],
|
|
5186
5467
|
" ",
|
|
5187
5468
|
t
|
|
5188
5469
|
] }),
|
|
5189
|
-
/* @__PURE__ */ e(
|
|
5470
|
+
/* @__PURE__ */ e(ae, { dir: "next", onClick: d })
|
|
5190
5471
|
] }),
|
|
5191
|
-
/* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children:
|
|
5192
|
-
/* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children:
|
|
5193
|
-
if (!y) return /* @__PURE__ */ e("div", {},
|
|
5194
|
-
const
|
|
5195
|
-
let
|
|
5196
|
-
return m != null && m.start && (m != null && m.end) && (
|
|
5472
|
+
/* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children: Vt.map((y) => /* @__PURE__ */ e("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ e(A, { size: "xs", color: "secondary", children: y }) }, y)) }),
|
|
5473
|
+
/* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: x.map((y, b) => {
|
|
5474
|
+
if (!y) return /* @__PURE__ */ e("div", {}, b);
|
|
5475
|
+
const p = new Date(t, n, y), v = r ? Y(p, r) : !1, M = Y(p, o), w = (a ? X(p, a) : !1) || (i ? re(p, i) : !1);
|
|
5476
|
+
let S = !1;
|
|
5477
|
+
return m != null && m.start && (m != null && m.end) && (S = !X(p, m.start) && !re(p, m.end)), /* @__PURE__ */ e(
|
|
5197
5478
|
"button",
|
|
5198
5479
|
{
|
|
5199
5480
|
type: "button",
|
|
5200
|
-
disabled:
|
|
5201
|
-
onClick: () => !
|
|
5481
|
+
disabled: w,
|
|
5482
|
+
onClick: () => !w && l(p),
|
|
5202
5483
|
onMouseEnter: () => c(y),
|
|
5203
5484
|
onMouseLeave: () => c(null),
|
|
5204
|
-
"aria-label": j(
|
|
5205
|
-
"aria-pressed":
|
|
5485
|
+
"aria-label": j(p),
|
|
5486
|
+
"aria-pressed": v,
|
|
5206
5487
|
style: {
|
|
5207
5488
|
display: "flex",
|
|
5208
5489
|
alignItems: "center",
|
|
5209
5490
|
justifyContent: "center",
|
|
5210
5491
|
height: 32,
|
|
5211
5492
|
width: "100%",
|
|
5212
|
-
border:
|
|
5493
|
+
border: M && !v ? "1px solid var(--lucent-border-strong)" : "1px solid transparent",
|
|
5213
5494
|
borderRadius: "var(--lucent-radius-md)",
|
|
5214
|
-
background:
|
|
5215
|
-
color:
|
|
5495
|
+
background: v ? "var(--lucent-accent-default)" : S ? "var(--lucent-accent-subtle)" : f === y && !w ? "var(--lucent-bg-muted)" : "transparent",
|
|
5496
|
+
color: v ? "var(--lucent-text-on-accent)" : w ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
|
|
5216
5497
|
fontSize: "var(--lucent-font-size-sm)",
|
|
5217
5498
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5218
|
-
fontWeight:
|
|
5219
|
-
cursor:
|
|
5499
|
+
fontWeight: M ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
|
|
5500
|
+
cursor: w ? "not-allowed" : "pointer",
|
|
5220
5501
|
transition: "background var(--lucent-duration-fast)"
|
|
5221
5502
|
},
|
|
5222
5503
|
children: y
|
|
5223
5504
|
},
|
|
5224
|
-
|
|
5505
|
+
b
|
|
5225
5506
|
);
|
|
5226
5507
|
}) })
|
|
5227
5508
|
] });
|
|
5228
5509
|
}
|
|
5229
|
-
function
|
|
5510
|
+
function ir({
|
|
5230
5511
|
value: t,
|
|
5231
5512
|
defaultValue: n,
|
|
5232
|
-
onChange:
|
|
5513
|
+
onChange: r,
|
|
5233
5514
|
placeholder: o = "Pick a date",
|
|
5234
|
-
disabled:
|
|
5515
|
+
disabled: a = !1,
|
|
5235
5516
|
min: i,
|
|
5236
5517
|
max: l,
|
|
5237
5518
|
style: s
|
|
5238
5519
|
}) {
|
|
5239
|
-
const
|
|
5240
|
-
|
|
5241
|
-
if (!
|
|
5242
|
-
const C = (
|
|
5243
|
-
var
|
|
5244
|
-
(
|
|
5520
|
+
const d = t !== void 0, [m, g] = q(n), u = d ? t : m, f = /* @__PURE__ */ new Date(), [c, x] = q((u ?? f).getFullYear()), [y, b] = q((u ?? f).getMonth()), [p, v] = q(!1), [M, w] = q(!1), S = B(null);
|
|
5521
|
+
$(() => {
|
|
5522
|
+
if (!p) return;
|
|
5523
|
+
const C = (W) => {
|
|
5524
|
+
var D;
|
|
5525
|
+
(D = S.current) != null && D.contains(W.target) || v(!1);
|
|
5245
5526
|
};
|
|
5246
5527
|
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
5247
|
-
}, [
|
|
5248
|
-
const
|
|
5249
|
-
|
|
5250
|
-
},
|
|
5251
|
-
y === 0 ? (
|
|
5528
|
+
}, [p]);
|
|
5529
|
+
const E = (C) => {
|
|
5530
|
+
d || g(C), r == null || r(C), v(!1);
|
|
5531
|
+
}, F = () => {
|
|
5532
|
+
y === 0 ? (b(11), x((C) => C - 1)) : b((C) => C - 1);
|
|
5252
5533
|
}, T = () => {
|
|
5253
|
-
y === 11 ? (
|
|
5534
|
+
y === 11 ? (b(0), x((C) => C + 1)) : b((C) => C + 1);
|
|
5254
5535
|
};
|
|
5255
|
-
return /* @__PURE__ */ h("div", { ref:
|
|
5536
|
+
return /* @__PURE__ */ h("div", { ref: S, style: { position: "relative", display: "inline-block", ...s }, children: [
|
|
5256
5537
|
/* @__PURE__ */ h(
|
|
5257
5538
|
"button",
|
|
5258
5539
|
{
|
|
5259
5540
|
type: "button",
|
|
5260
|
-
disabled:
|
|
5261
|
-
onClick: () => !
|
|
5262
|
-
onFocus: () =>
|
|
5263
|
-
onBlur: () =>
|
|
5541
|
+
disabled: a,
|
|
5542
|
+
onClick: () => !a && v((C) => !C),
|
|
5543
|
+
onFocus: () => w(!0),
|
|
5544
|
+
onBlur: () => w(!1),
|
|
5264
5545
|
"aria-haspopup": "dialog",
|
|
5265
|
-
"aria-expanded":
|
|
5546
|
+
"aria-expanded": p,
|
|
5266
5547
|
style: {
|
|
5267
5548
|
display: "inline-flex",
|
|
5268
5549
|
alignItems: "center",
|
|
5269
5550
|
gap: "var(--lucent-space-2)",
|
|
5270
5551
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
5271
5552
|
borderRadius: "var(--lucent-radius-md)",
|
|
5272
|
-
border: `1px solid ${
|
|
5273
|
-
background:
|
|
5274
|
-
color:
|
|
5553
|
+
border: `1px solid ${M ? "var(--lucent-accent-default)" : "var(--lucent-border-default)"}`,
|
|
5554
|
+
background: a ? "var(--lucent-bg-muted)" : "var(--lucent-surface-default)",
|
|
5555
|
+
color: u ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
5275
5556
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5276
5557
|
fontSize: "var(--lucent-font-size-sm)",
|
|
5277
|
-
cursor:
|
|
5278
|
-
outline:
|
|
5558
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
5559
|
+
outline: M ? "2px solid var(--lucent-focus-ring)" : "none",
|
|
5279
5560
|
outlineOffset: 2,
|
|
5280
5561
|
minWidth: 160,
|
|
5281
5562
|
transition: "border-color var(--lucent-duration-fast)"
|
|
@@ -5286,11 +5567,11 @@ function aa({
|
|
|
5286
5567
|
/* @__PURE__ */ e("path", { d: "M1 6h12", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
5287
5568
|
/* @__PURE__ */ e("path", { d: "M4 1v2M10 1v2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
5288
5569
|
] }),
|
|
5289
|
-
/* @__PURE__ */ e("span", { style: { flex: 1, textAlign: "left" }, children:
|
|
5570
|
+
/* @__PURE__ */ e("span", { style: { flex: 1, textAlign: "left" }, children: u ? j(u) : o })
|
|
5290
5571
|
]
|
|
5291
5572
|
}
|
|
5292
5573
|
),
|
|
5293
|
-
|
|
5574
|
+
p && /* @__PURE__ */ e(
|
|
5294
5575
|
"div",
|
|
5295
5576
|
{
|
|
5296
5577
|
role: "dialog",
|
|
@@ -5312,12 +5593,12 @@ function aa({
|
|
|
5312
5593
|
{
|
|
5313
5594
|
year: c,
|
|
5314
5595
|
month: y,
|
|
5315
|
-
...
|
|
5316
|
-
today:
|
|
5596
|
+
...u !== void 0 && { selected: u },
|
|
5597
|
+
today: f,
|
|
5317
5598
|
...i !== void 0 && { min: i },
|
|
5318
5599
|
...l !== void 0 && { max: l },
|
|
5319
|
-
onSelect:
|
|
5320
|
-
onPrevMonth:
|
|
5600
|
+
onSelect: E,
|
|
5601
|
+
onPrevMonth: F,
|
|
5321
5602
|
onNextMonth: T
|
|
5322
5603
|
}
|
|
5323
5604
|
)
|
|
@@ -5325,7 +5606,7 @@ function aa({
|
|
|
5325
5606
|
)
|
|
5326
5607
|
] });
|
|
5327
5608
|
}
|
|
5328
|
-
const
|
|
5609
|
+
const lr = {
|
|
5329
5610
|
id: "date-picker",
|
|
5330
5611
|
name: "DatePicker",
|
|
5331
5612
|
tier: "molecule",
|
|
@@ -5411,64 +5692,64 @@ const ra = {
|
|
|
5411
5692
|
notes: 'The calendar popover is role="dialog". Each day button has aria-label with the full date and aria-pressed for selected state. Full arrow-key navigation within the calendar grid is a planned enhancement.'
|
|
5412
5693
|
}
|
|
5413
5694
|
};
|
|
5414
|
-
function
|
|
5695
|
+
function Pt(t, n) {
|
|
5415
5696
|
return t ? Y(t.start, t.end) ? j(t.start) : `${j(t.start)} → ${j(t.end)}` : n;
|
|
5416
5697
|
}
|
|
5417
|
-
function
|
|
5698
|
+
function sr({
|
|
5418
5699
|
value: t,
|
|
5419
5700
|
defaultValue: n,
|
|
5420
|
-
onChange:
|
|
5701
|
+
onChange: r,
|
|
5421
5702
|
placeholder: o = "Pick a date range",
|
|
5422
|
-
disabled:
|
|
5703
|
+
disabled: a = !1,
|
|
5423
5704
|
min: i,
|
|
5424
5705
|
max: l,
|
|
5425
5706
|
style: s
|
|
5426
5707
|
}) {
|
|
5427
|
-
const
|
|
5428
|
-
|
|
5429
|
-
if (!
|
|
5430
|
-
const
|
|
5431
|
-
var
|
|
5432
|
-
(
|
|
5708
|
+
const d = t !== void 0, [m, g] = q(n), u = d ? t : m, [f, c] = q(null), x = /* @__PURE__ */ new Date(), [y, b] = q(((u == null ? void 0 : u.start) ?? x).getFullYear()), [p, v] = q(((u == null ? void 0 : u.start) ?? x).getMonth()), M = p === 11 ? 0 : p + 1, w = p === 11 ? y + 1 : y, [S, E] = q(!1), [F, T] = q(!1), C = B(null);
|
|
5709
|
+
$(() => {
|
|
5710
|
+
if (!S) return;
|
|
5711
|
+
const I = (R) => {
|
|
5712
|
+
var V;
|
|
5713
|
+
(V = C.current) != null && V.contains(R.target) || (E(!1), c(null));
|
|
5433
5714
|
};
|
|
5434
|
-
return document.addEventListener("mousedown",
|
|
5435
|
-
}, [
|
|
5436
|
-
const
|
|
5437
|
-
if (!
|
|
5438
|
-
c(
|
|
5715
|
+
return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
|
|
5716
|
+
}, [S]);
|
|
5717
|
+
const W = (I) => {
|
|
5718
|
+
if (!f)
|
|
5719
|
+
c(I);
|
|
5439
5720
|
else {
|
|
5440
|
-
const [R,
|
|
5441
|
-
|
|
5721
|
+
const [R, V] = X(I, f) || Y(I, f) ? [I, f] : [f, I], O = { start: R, end: V };
|
|
5722
|
+
d || g(O), r == null || r(O), c(null), E(!1);
|
|
5442
5723
|
}
|
|
5443
|
-
},
|
|
5444
|
-
|
|
5445
|
-
},
|
|
5446
|
-
|
|
5447
|
-
},
|
|
5724
|
+
}, D = () => {
|
|
5725
|
+
p === 0 ? (v(11), b((I) => I - 1)) : v((I) => I - 1);
|
|
5726
|
+
}, z = () => {
|
|
5727
|
+
p === 11 ? (v(0), b((I) => I + 1)) : v((I) => I + 1);
|
|
5728
|
+
}, k = f ? { start: f, end: f } : u ? { start: u.start, end: u.end } : void 0;
|
|
5448
5729
|
return /* @__PURE__ */ h("div", { ref: C, style: { position: "relative", display: "inline-block", ...s }, children: [
|
|
5449
5730
|
/* @__PURE__ */ h(
|
|
5450
5731
|
"button",
|
|
5451
5732
|
{
|
|
5452
5733
|
type: "button",
|
|
5453
|
-
disabled:
|
|
5454
|
-
onClick: () => !
|
|
5734
|
+
disabled: a,
|
|
5735
|
+
onClick: () => !a && E((I) => !I),
|
|
5455
5736
|
onFocus: () => T(!0),
|
|
5456
5737
|
onBlur: () => T(!1),
|
|
5457
5738
|
"aria-haspopup": "dialog",
|
|
5458
|
-
"aria-expanded":
|
|
5739
|
+
"aria-expanded": S,
|
|
5459
5740
|
style: {
|
|
5460
5741
|
display: "inline-flex",
|
|
5461
5742
|
alignItems: "center",
|
|
5462
5743
|
gap: "var(--lucent-space-2)",
|
|
5463
5744
|
padding: "var(--lucent-space-2) var(--lucent-space-3)",
|
|
5464
5745
|
borderRadius: "var(--lucent-radius-md)",
|
|
5465
|
-
border: `1px solid ${
|
|
5466
|
-
background:
|
|
5467
|
-
color:
|
|
5746
|
+
border: `1px solid ${F ? "var(--lucent-accent-default)" : "var(--lucent-border-default)"}`,
|
|
5747
|
+
background: a ? "var(--lucent-bg-muted)" : "var(--lucent-surface-default)",
|
|
5748
|
+
color: u ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
|
|
5468
5749
|
fontFamily: "var(--lucent-font-family-base)",
|
|
5469
5750
|
fontSize: "var(--lucent-font-size-sm)",
|
|
5470
|
-
cursor:
|
|
5471
|
-
outline:
|
|
5751
|
+
cursor: a ? "not-allowed" : "pointer",
|
|
5752
|
+
outline: F ? "2px solid var(--lucent-focus-ring)" : "none",
|
|
5472
5753
|
outlineOffset: 2,
|
|
5473
5754
|
minWidth: 220,
|
|
5474
5755
|
transition: "border-color var(--lucent-duration-fast)"
|
|
@@ -5479,11 +5760,11 @@ function oa({
|
|
|
5479
5760
|
/* @__PURE__ */ e("path", { d: "M1 6h12", stroke: "currentColor", strokeWidth: "1.3" }),
|
|
5480
5761
|
/* @__PURE__ */ e("path", { d: "M4 1v2M10 1v2", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
|
|
5481
5762
|
] }),
|
|
5482
|
-
/* @__PURE__ */ e("span", { style: { flex: 1, textAlign: "left" }, children:
|
|
5763
|
+
/* @__PURE__ */ e("span", { style: { flex: 1, textAlign: "left" }, children: Pt(u, o) })
|
|
5483
5764
|
]
|
|
5484
5765
|
}
|
|
5485
5766
|
),
|
|
5486
|
-
|
|
5767
|
+
S && /* @__PURE__ */ h(
|
|
5487
5768
|
"div",
|
|
5488
5769
|
{
|
|
5489
5770
|
role: "dialog",
|
|
@@ -5506,45 +5787,45 @@ function oa({
|
|
|
5506
5787
|
J,
|
|
5507
5788
|
{
|
|
5508
5789
|
year: y,
|
|
5509
|
-
month:
|
|
5510
|
-
...(
|
|
5511
|
-
today:
|
|
5790
|
+
month: p,
|
|
5791
|
+
...(u == null ? void 0 : u.start) !== void 0 && { selected: u.start },
|
|
5792
|
+
today: x,
|
|
5512
5793
|
...i !== void 0 && { min: i },
|
|
5513
5794
|
...l !== void 0 && { max: l },
|
|
5514
|
-
onSelect:
|
|
5515
|
-
onPrevMonth:
|
|
5516
|
-
onNextMonth:
|
|
5517
|
-
...
|
|
5795
|
+
onSelect: W,
|
|
5796
|
+
onPrevMonth: D,
|
|
5797
|
+
onNextMonth: z,
|
|
5798
|
+
...k !== void 0 && { highlightRange: k }
|
|
5518
5799
|
}
|
|
5519
5800
|
) }),
|
|
5520
5801
|
/* @__PURE__ */ e("div", { style: { width: 1, background: "var(--lucent-border-subtle)", flexShrink: 0 } }),
|
|
5521
5802
|
/* @__PURE__ */ e("div", { style: { minWidth: 220 }, children: /* @__PURE__ */ e(
|
|
5522
5803
|
J,
|
|
5523
5804
|
{
|
|
5524
|
-
year:
|
|
5525
|
-
month:
|
|
5526
|
-
...(
|
|
5527
|
-
today:
|
|
5805
|
+
year: w,
|
|
5806
|
+
month: M,
|
|
5807
|
+
...(u == null ? void 0 : u.end) !== void 0 && { selected: u.end },
|
|
5808
|
+
today: x,
|
|
5528
5809
|
...i !== void 0 && { min: i },
|
|
5529
5810
|
...l !== void 0 && { max: l },
|
|
5530
|
-
onSelect:
|
|
5531
|
-
onPrevMonth:
|
|
5532
|
-
onNextMonth:
|
|
5533
|
-
...
|
|
5811
|
+
onSelect: W,
|
|
5812
|
+
onPrevMonth: D,
|
|
5813
|
+
onNextMonth: z,
|
|
5814
|
+
...k !== void 0 && { highlightRange: k }
|
|
5534
5815
|
}
|
|
5535
5816
|
) })
|
|
5536
5817
|
]
|
|
5537
5818
|
}
|
|
5538
5819
|
),
|
|
5539
|
-
|
|
5540
|
-
|
|
5820
|
+
f && S && /* @__PURE__ */ e("div", { style: { position: "absolute", top: "calc(100% + 4px)", left: 0, zIndex: 1001, pointerEvents: "none" } }),
|
|
5821
|
+
f && S && /* @__PURE__ */ e("div", { style: {
|
|
5541
5822
|
position: "absolute",
|
|
5542
5823
|
bottom: -24,
|
|
5543
5824
|
left: 0
|
|
5544
|
-
}, children: /* @__PURE__ */ e(
|
|
5825
|
+
}, children: /* @__PURE__ */ e(A, { size: "xs", color: "secondary", children: "Now pick the end date" }) })
|
|
5545
5826
|
] });
|
|
5546
5827
|
}
|
|
5547
|
-
const
|
|
5828
|
+
const cr = {
|
|
5548
5829
|
id: "date-range-picker",
|
|
5549
5830
|
name: "DateRangePicker",
|
|
5550
5831
|
tier: "molecule",
|
|
@@ -5629,14 +5910,14 @@ const ia = {
|
|
|
5629
5910
|
function Q(t) {
|
|
5630
5911
|
return t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`;
|
|
5631
5912
|
}
|
|
5632
|
-
function
|
|
5913
|
+
function Ot() {
|
|
5633
5914
|
return Math.random().toString(36).slice(2);
|
|
5634
5915
|
}
|
|
5635
|
-
function
|
|
5916
|
+
function Ht({
|
|
5636
5917
|
item: t,
|
|
5637
5918
|
onRemove: n
|
|
5638
5919
|
}) {
|
|
5639
|
-
const [
|
|
5920
|
+
const [r, o] = q(!1), a = t.progress, i = !!t.error;
|
|
5640
5921
|
return /* @__PURE__ */ h("div", { style: {
|
|
5641
5922
|
display: "flex",
|
|
5642
5923
|
alignItems: "center",
|
|
@@ -5651,9 +5932,9 @@ function Wt({
|
|
|
5651
5932
|
/* @__PURE__ */ e("path", { d: "M12 2v4h4", stroke: "currentColor", strokeWidth: "1.3" })
|
|
5652
5933
|
] }),
|
|
5653
5934
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5654
|
-
/* @__PURE__ */ e(
|
|
5655
|
-
i ? /* @__PURE__ */ e(
|
|
5656
|
-
|
|
5935
|
+
/* @__PURE__ */ e(A, { size: "sm", truncate: !0, children: t.file.name }),
|
|
5936
|
+
i ? /* @__PURE__ */ e(A, { size: "xs", color: "danger", children: t.error }) : /* @__PURE__ */ e(A, { size: "xs", color: "secondary", children: Q(t.file.size) }),
|
|
5937
|
+
a !== void 0 && !i && /* @__PURE__ */ e("div", { style: {
|
|
5657
5938
|
marginTop: 4,
|
|
5658
5939
|
height: 3,
|
|
5659
5940
|
borderRadius: "var(--lucent-radius-full)",
|
|
@@ -5661,9 +5942,9 @@ function Wt({
|
|
|
5661
5942
|
overflow: "hidden"
|
|
5662
5943
|
}, children: /* @__PURE__ */ e("div", { style: {
|
|
5663
5944
|
height: "100%",
|
|
5664
|
-
width: `${
|
|
5945
|
+
width: `${a}%`,
|
|
5665
5946
|
borderRadius: "var(--lucent-radius-full)",
|
|
5666
|
-
background:
|
|
5947
|
+
background: a === 100 ? "var(--lucent-success-default)" : "var(--lucent-accent-default)",
|
|
5667
5948
|
transition: "width 200ms var(--lucent-easing-default)"
|
|
5668
5949
|
} }) })
|
|
5669
5950
|
] }),
|
|
@@ -5684,7 +5965,7 @@ function Wt({
|
|
|
5684
5965
|
height: 24,
|
|
5685
5966
|
border: "none",
|
|
5686
5967
|
borderRadius: "var(--lucent-radius-md)",
|
|
5687
|
-
background:
|
|
5968
|
+
background: r ? "var(--lucent-bg-muted)" : "transparent",
|
|
5688
5969
|
color: "var(--lucent-text-secondary)",
|
|
5689
5970
|
cursor: "pointer",
|
|
5690
5971
|
transition: "background var(--lucent-duration-fast)"
|
|
@@ -5694,37 +5975,37 @@ function Wt({
|
|
|
5694
5975
|
)
|
|
5695
5976
|
] });
|
|
5696
5977
|
}
|
|
5697
|
-
function
|
|
5978
|
+
function dr({
|
|
5698
5979
|
accept: t,
|
|
5699
5980
|
multiple: n = !1,
|
|
5700
|
-
maxSize:
|
|
5981
|
+
maxSize: r,
|
|
5701
5982
|
value: o,
|
|
5702
|
-
onChange:
|
|
5983
|
+
onChange: a,
|
|
5703
5984
|
onError: i,
|
|
5704
5985
|
disabled: l = !1,
|
|
5705
5986
|
style: s
|
|
5706
5987
|
}) {
|
|
5707
|
-
const
|
|
5708
|
-
if (!
|
|
5709
|
-
const
|
|
5710
|
-
for (const T of Array.from(
|
|
5711
|
-
if (
|
|
5712
|
-
i == null || i(`"${T.name}" exceeds the ${Q(
|
|
5988
|
+
const d = o !== void 0, [m, g] = q([]), u = d ? o : m, [f, c] = q(!1), [x, y] = q(!1), b = B(null), p = Z((S) => {
|
|
5989
|
+
if (!S || l) return;
|
|
5990
|
+
const E = [];
|
|
5991
|
+
for (const T of Array.from(S)) {
|
|
5992
|
+
if (r && T.size > r) {
|
|
5993
|
+
i == null || i(`"${T.name}" exceeds the ${Q(r)} limit.`);
|
|
5713
5994
|
continue;
|
|
5714
5995
|
}
|
|
5715
|
-
if (!n &&
|
|
5716
|
-
|
|
5996
|
+
if (!n && u.length + E.length >= 1) break;
|
|
5997
|
+
E.push({ id: Ot(), file: T });
|
|
5717
5998
|
}
|
|
5718
|
-
if (
|
|
5719
|
-
const
|
|
5720
|
-
|
|
5721
|
-
}, [l,
|
|
5722
|
-
const
|
|
5723
|
-
|
|
5724
|
-
},
|
|
5725
|
-
|
|
5726
|
-
},
|
|
5727
|
-
|
|
5999
|
+
if (E.length === 0) return;
|
|
6000
|
+
const F = n ? [...u, ...E] : E;
|
|
6001
|
+
d || g(F), a == null || a(F);
|
|
6002
|
+
}, [l, u, d, r, n, a, i]), v = (S) => {
|
|
6003
|
+
const E = u.filter((F) => F.id !== S);
|
|
6004
|
+
d || g(E), a == null || a(E);
|
|
6005
|
+
}, M = (S) => {
|
|
6006
|
+
S.preventDefault(), c(!1), p(S.dataTransfer.files);
|
|
6007
|
+
}, w = (S) => {
|
|
6008
|
+
p(S.target.files), S.target.value = "";
|
|
5728
6009
|
};
|
|
5729
6010
|
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
|
|
5730
6011
|
/* @__PURE__ */ h(
|
|
@@ -5735,20 +6016,20 @@ function la({
|
|
|
5735
6016
|
"aria-label": "Upload files",
|
|
5736
6017
|
"aria-disabled": l,
|
|
5737
6018
|
onClick: () => {
|
|
5738
|
-
var f;
|
|
5739
|
-
return !l && ((f = w.current) == null ? void 0 : f.click());
|
|
5740
|
-
},
|
|
5741
|
-
onKeyDown: (f) => {
|
|
5742
6019
|
var S;
|
|
5743
|
-
|
|
6020
|
+
return !l && ((S = b.current) == null ? void 0 : S.click());
|
|
6021
|
+
},
|
|
6022
|
+
onKeyDown: (S) => {
|
|
6023
|
+
var E;
|
|
6024
|
+
(S.key === "Enter" || S.key === " ") && (S.preventDefault(), (E = b.current) == null || E.click());
|
|
5744
6025
|
},
|
|
5745
6026
|
onFocus: () => y(!0),
|
|
5746
6027
|
onBlur: () => y(!1),
|
|
5747
|
-
onDragOver: (
|
|
5748
|
-
|
|
6028
|
+
onDragOver: (S) => {
|
|
6029
|
+
S.preventDefault(), l || c(!0);
|
|
5749
6030
|
},
|
|
5750
6031
|
onDragLeave: () => c(!1),
|
|
5751
|
-
onDrop:
|
|
6032
|
+
onDrop: M,
|
|
5752
6033
|
style: {
|
|
5753
6034
|
display: "flex",
|
|
5754
6035
|
flexDirection: "column",
|
|
@@ -5757,8 +6038,8 @@ function la({
|
|
|
5757
6038
|
gap: "var(--lucent-space-2)",
|
|
5758
6039
|
padding: "var(--lucent-space-8) var(--lucent-space-6)",
|
|
5759
6040
|
borderRadius: "var(--lucent-radius-lg)",
|
|
5760
|
-
border: `2px dashed ${l ? "var(--lucent-border-default)" :
|
|
5761
|
-
background:
|
|
6041
|
+
border: `2px dashed ${l ? "var(--lucent-border-default)" : f || x ? "var(--lucent-accent-default)" : "var(--lucent-border-default)"}`,
|
|
6042
|
+
background: f ? "var(--lucent-accent-subtle)" : "var(--lucent-bg-subtle)",
|
|
5762
6043
|
cursor: l ? "not-allowed" : "pointer",
|
|
5763
6044
|
transition: "border-color var(--lucent-duration-fast), background var(--lucent-duration-fast)",
|
|
5764
6045
|
outline: "none"
|
|
@@ -5772,7 +6053,7 @@ function la({
|
|
|
5772
6053
|
viewBox: "0 0 32 32",
|
|
5773
6054
|
fill: "none",
|
|
5774
6055
|
"aria-hidden": !0,
|
|
5775
|
-
style: { color: l ? "var(--lucent-text-disabled)" :
|
|
6056
|
+
style: { color: l ? "var(--lucent-text-disabled)" : f ? "var(--lucent-accent-default)" : "var(--lucent-text-secondary)" },
|
|
5776
6057
|
children: [
|
|
5777
6058
|
/* @__PURE__ */ e("path", { d: "M16 20V10M16 10l-4 4M16 10l4 4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
5778
6059
|
/* @__PURE__ */ e("path", { d: "M8 24h16", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
|
|
@@ -5780,21 +6061,21 @@ function la({
|
|
|
5780
6061
|
}
|
|
5781
6062
|
),
|
|
5782
6063
|
/* @__PURE__ */ h("div", { style: { textAlign: "center" }, children: [
|
|
5783
|
-
/* @__PURE__ */ e(
|
|
5784
|
-
(t ||
|
|
6064
|
+
/* @__PURE__ */ e(A, { color: l ? "disabled" : "primary", weight: "medium", children: f ? "Drop to upload" : "Drop files here or click to browse" }),
|
|
6065
|
+
(t || r) && /* @__PURE__ */ e(A, { size: "xs", color: "secondary", children: [
|
|
5785
6066
|
t && `Accepted: ${t}`,
|
|
5786
|
-
|
|
6067
|
+
r && `Max size: ${Q(r)}`
|
|
5787
6068
|
].filter(Boolean).join(" · ") })
|
|
5788
6069
|
] }),
|
|
5789
6070
|
/* @__PURE__ */ e(
|
|
5790
6071
|
"input",
|
|
5791
6072
|
{
|
|
5792
|
-
ref:
|
|
6073
|
+
ref: b,
|
|
5793
6074
|
type: "file",
|
|
5794
6075
|
accept: t,
|
|
5795
6076
|
multiple: n,
|
|
5796
6077
|
disabled: l,
|
|
5797
|
-
onChange:
|
|
6078
|
+
onChange: w,
|
|
5798
6079
|
style: { display: "none" },
|
|
5799
6080
|
tabIndex: -1
|
|
5800
6081
|
}
|
|
@@ -5802,10 +6083,10 @@ function la({
|
|
|
5802
6083
|
]
|
|
5803
6084
|
}
|
|
5804
6085
|
),
|
|
5805
|
-
|
|
6086
|
+
u.length > 0 && /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: u.map((S) => /* @__PURE__ */ e(Ht, { item: S, onRemove: v }, S.id)) })
|
|
5806
6087
|
] });
|
|
5807
6088
|
}
|
|
5808
|
-
const
|
|
6089
|
+
const ur = {
|
|
5809
6090
|
id: "file-upload",
|
|
5810
6091
|
name: "FileUpload",
|
|
5811
6092
|
tier: "molecule",
|
|
@@ -5903,23 +6184,23 @@ const handleChange = async (updated: UploadFile[]) => {
|
|
|
5903
6184
|
keyboardInteractions: ["Enter/Space to open file picker", "Tab to focus drop zone"],
|
|
5904
6185
|
notes: 'The drop zone has role="button" with tabIndex=0 and responds to Enter/Space. Remove buttons on file rows have aria-label including the filename.'
|
|
5905
6186
|
}
|
|
5906
|
-
},
|
|
6187
|
+
}, jt = {
|
|
5907
6188
|
default: "var(--lucent-border-strong)",
|
|
5908
6189
|
success: "var(--lucent-success-default)",
|
|
5909
6190
|
warning: "var(--lucent-warning-default)",
|
|
5910
6191
|
danger: "var(--lucent-danger-default)",
|
|
5911
6192
|
info: "var(--lucent-info-default)"
|
|
5912
|
-
},
|
|
6193
|
+
}, Ut = {
|
|
5913
6194
|
default: "var(--lucent-bg-muted)",
|
|
5914
6195
|
success: "var(--lucent-success-subtle)",
|
|
5915
6196
|
warning: "var(--lucent-warning-subtle)",
|
|
5916
6197
|
danger: "var(--lucent-danger-subtle)",
|
|
5917
6198
|
info: "var(--lucent-info-subtle)"
|
|
5918
6199
|
};
|
|
5919
|
-
function
|
|
6200
|
+
function Gt({ status: t }) {
|
|
5920
6201
|
return t === "success" ? /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e("path", { d: "M2 5l2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : t === "danger" ? /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e("path", { d: "M2 2l6 6M8 2L2 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) : t === "warning" ? /* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e("path", { d: "M5 2v4M5 7.5v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) : null;
|
|
5921
6202
|
}
|
|
5922
|
-
function
|
|
6203
|
+
function pr({ items: t, style: n }) {
|
|
5923
6204
|
return /* @__PURE__ */ e(
|
|
5924
6205
|
"ol",
|
|
5925
6206
|
{
|
|
@@ -5931,8 +6212,8 @@ function ca({ items: t, style: n }) {
|
|
|
5931
6212
|
flexDirection: "column",
|
|
5932
6213
|
...n
|
|
5933
6214
|
},
|
|
5934
|
-
children: t.map((
|
|
5935
|
-
const
|
|
6215
|
+
children: t.map((r, o) => {
|
|
6216
|
+
const a = r.status ?? "default", i = jt[a], l = Ut[a], s = o === t.length - 1;
|
|
5936
6217
|
return /* @__PURE__ */ h(
|
|
5937
6218
|
"li",
|
|
5938
6219
|
{
|
|
@@ -5961,7 +6242,7 @@ function ca({ items: t, style: n }) {
|
|
|
5961
6242
|
color: i,
|
|
5962
6243
|
flexShrink: 0,
|
|
5963
6244
|
zIndex: 1
|
|
5964
|
-
}, children:
|
|
6245
|
+
}, children: r.icon ?? /* @__PURE__ */ e(Gt, { status: a }) }),
|
|
5965
6246
|
!s && /* @__PURE__ */ e("div", { style: {
|
|
5966
6247
|
flex: 1,
|
|
5967
6248
|
width: 2,
|
|
@@ -5976,20 +6257,20 @@ function ca({ items: t, style: n }) {
|
|
|
5976
6257
|
paddingTop: 4
|
|
5977
6258
|
}, children: [
|
|
5978
6259
|
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: "var(--lucent-space-3)", flexWrap: "wrap" }, children: [
|
|
5979
|
-
/* @__PURE__ */ e(
|
|
5980
|
-
|
|
6260
|
+
/* @__PURE__ */ e(A, { weight: "medium", size: "sm", children: r.title }),
|
|
6261
|
+
r.date && /* @__PURE__ */ e(A, { size: "xs", color: "secondary", children: r.date })
|
|
5981
6262
|
] }),
|
|
5982
|
-
|
|
6263
|
+
r.description && /* @__PURE__ */ e("div", { style: { marginTop: "var(--lucent-space-1)" }, children: /* @__PURE__ */ e(A, { size: "sm", color: "secondary", children: r.description }) })
|
|
5983
6264
|
] })
|
|
5984
6265
|
]
|
|
5985
6266
|
},
|
|
5986
|
-
|
|
6267
|
+
r.id
|
|
5987
6268
|
);
|
|
5988
6269
|
})
|
|
5989
6270
|
}
|
|
5990
6271
|
);
|
|
5991
6272
|
}
|
|
5992
|
-
const
|
|
6273
|
+
const fr = {
|
|
5993
6274
|
id: "timeline",
|
|
5994
6275
|
name: "Timeline",
|
|
5995
6276
|
tier: "molecule",
|
|
@@ -6092,13 +6373,13 @@ const da = {
|
|
|
6092
6373
|
easingDefault: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6093
6374
|
easingEmphasized: "cubic-bezier(0.2, 0, 0, 1)",
|
|
6094
6375
|
easingDecelerate: "cubic-bezier(0, 0, 0.2, 1)"
|
|
6095
|
-
},
|
|
6376
|
+
}, _t = {
|
|
6096
6377
|
shadowNone: "none",
|
|
6097
6378
|
shadowSm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
6098
6379
|
shadowMd: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
6099
6380
|
shadowLg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
6100
6381
|
shadowXl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
|
|
6101
|
-
},
|
|
6382
|
+
}, Yt = {
|
|
6102
6383
|
shadowNone: "none",
|
|
6103
6384
|
shadowSm: "0 1px 2px 0 rgb(0 0 0 / 0.3)",
|
|
6104
6385
|
shadowMd: "0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4)",
|
|
@@ -6109,7 +6390,7 @@ const da = {
|
|
|
6109
6390
|
...he,
|
|
6110
6391
|
...me,
|
|
6111
6392
|
...ge,
|
|
6112
|
-
...
|
|
6393
|
+
..._t,
|
|
6113
6394
|
// Backgrounds
|
|
6114
6395
|
bgBase: "#ffffff",
|
|
6115
6396
|
bgSubtle: "#f9fafb",
|
|
@@ -6154,12 +6435,12 @@ const da = {
|
|
|
6154
6435
|
infoText: "#1d4ed8",
|
|
6155
6436
|
// Focus
|
|
6156
6437
|
focusRing: "#111827"
|
|
6157
|
-
},
|
|
6438
|
+
}, Kt = {
|
|
6158
6439
|
...fe,
|
|
6159
6440
|
...he,
|
|
6160
6441
|
...me,
|
|
6161
6442
|
...ge,
|
|
6162
|
-
...
|
|
6443
|
+
...Yt,
|
|
6163
6444
|
// Backgrounds
|
|
6164
6445
|
bgBase: "#0b0d12",
|
|
6165
6446
|
bgSubtle: "#111318",
|
|
@@ -6205,210 +6486,210 @@ const da = {
|
|
|
6205
6486
|
// Focus
|
|
6206
6487
|
focusRing: "#f9fafb"
|
|
6207
6488
|
};
|
|
6208
|
-
function
|
|
6209
|
-
return "--lucent-" + t.replace(/([A-Z])/g, (n) => `-${n.toLowerCase()}`).replace(/([a-z])(\d)/g, (n,
|
|
6489
|
+
function Xt(t) {
|
|
6490
|
+
return "--lucent-" + t.replace(/([A-Z])/g, (n) => `-${n.toLowerCase()}`).replace(/([a-z])(\d)/g, (n, r, o) => `${r}-${o}`);
|
|
6210
6491
|
}
|
|
6211
|
-
function
|
|
6212
|
-
const
|
|
6492
|
+
function Jt(t, n = ":root") {
|
|
6493
|
+
const r = Object.entries(t).map(([o, a]) => ` ${Xt(o)}: ${a};`).join(`
|
|
6213
6494
|
`);
|
|
6214
6495
|
return `${n} {
|
|
6215
|
-
${
|
|
6496
|
+
${r}
|
|
6216
6497
|
}`;
|
|
6217
6498
|
}
|
|
6218
|
-
function
|
|
6219
|
-
const n = parseInt(t.slice(1, 3), 16) / 255,
|
|
6220
|
-
return 0.2126 *
|
|
6499
|
+
function Qt(t) {
|
|
6500
|
+
const n = parseInt(t.slice(1, 3), 16) / 255, r = parseInt(t.slice(3, 5), 16) / 255, o = parseInt(t.slice(5, 7), 16) / 255, a = (i) => i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
|
|
6501
|
+
return 0.2126 * a(n) + 0.7152 * a(r) + 0.0722 * a(o);
|
|
6221
6502
|
}
|
|
6222
|
-
function
|
|
6223
|
-
return
|
|
6503
|
+
function Zt(t) {
|
|
6504
|
+
return Qt(t) < 0.179 ? "#ffffff" : "#000000";
|
|
6224
6505
|
}
|
|
6225
|
-
function
|
|
6226
|
-
const n = parseInt(t.slice(1, 3), 16),
|
|
6227
|
-
return { r: n, g:
|
|
6506
|
+
function en(t) {
|
|
6507
|
+
const n = parseInt(t.slice(1, 3), 16), r = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
|
|
6508
|
+
return { r: n, g: r, b: o };
|
|
6228
6509
|
}
|
|
6229
|
-
function
|
|
6230
|
-
const o = (
|
|
6231
|
-
return `#${o(t)}${o(n)}${o(
|
|
6510
|
+
function tn({ r: t, g: n, b: r }) {
|
|
6511
|
+
const o = (a) => a.toString(16).padStart(2, "0");
|
|
6512
|
+
return `#${o(t)}${o(n)}${o(r)}`;
|
|
6232
6513
|
}
|
|
6233
|
-
function
|
|
6234
|
-
const { r: n, g:
|
|
6235
|
-
let m = 0,
|
|
6236
|
-
const
|
|
6237
|
-
if (s !==
|
|
6238
|
-
const
|
|
6239
|
-
switch (
|
|
6240
|
-
case
|
|
6241
|
-
m = (i - l) /
|
|
6514
|
+
function nn(t) {
|
|
6515
|
+
const { r: n, g: r, b: o } = en(t), a = n / 255, i = r / 255, l = o / 255, s = Math.max(a, i, l), d = Math.min(a, i, l);
|
|
6516
|
+
let m = 0, g = 0;
|
|
6517
|
+
const u = (s + d) / 2;
|
|
6518
|
+
if (s !== d) {
|
|
6519
|
+
const f = s - d;
|
|
6520
|
+
switch (g = u > 0.5 ? f / (2 - s - d) : f / (s + d), s) {
|
|
6521
|
+
case a:
|
|
6522
|
+
m = (i - l) / f + (i < l ? 6 : 0);
|
|
6242
6523
|
break;
|
|
6243
6524
|
case i:
|
|
6244
|
-
m = (l -
|
|
6525
|
+
m = (l - a) / f + 2;
|
|
6245
6526
|
break;
|
|
6246
6527
|
case l:
|
|
6247
|
-
m = (
|
|
6528
|
+
m = (a - i) / f + 4;
|
|
6248
6529
|
break;
|
|
6249
6530
|
}
|
|
6250
6531
|
m /= 6;
|
|
6251
6532
|
}
|
|
6252
|
-
return [m * 360,
|
|
6533
|
+
return [m * 360, g, u];
|
|
6253
6534
|
}
|
|
6254
|
-
function
|
|
6255
|
-
t = (t % 360 + 360) % 360, n = Math.min(1, Math.max(0, n)),
|
|
6256
|
-
const o = (1 - Math.abs(2 *
|
|
6257
|
-
let l = 0, s = 0,
|
|
6258
|
-
return t < 60 ? (l = o, s =
|
|
6535
|
+
function rn(t, n, r) {
|
|
6536
|
+
t = (t % 360 + 360) % 360, n = Math.min(1, Math.max(0, n)), r = Math.min(1, Math.max(0, r));
|
|
6537
|
+
const o = (1 - Math.abs(2 * r - 1)) * n, a = o * (1 - Math.abs(t / 60 % 2 - 1)), i = r - o / 2;
|
|
6538
|
+
let l = 0, s = 0, d = 0;
|
|
6539
|
+
return t < 60 ? (l = o, s = a) : t < 120 ? (l = a, s = o) : t < 180 ? (s = o, d = a) : t < 240 ? (s = a, d = o) : t < 300 ? (l = a, d = o) : (l = o, d = a), tn({ r: Math.round((l + i) * 255), g: Math.round((s + i) * 255), b: Math.round((d + i) * 255) });
|
|
6259
6540
|
}
|
|
6260
6541
|
function oe(t, n) {
|
|
6261
|
-
const [
|
|
6262
|
-
return
|
|
6542
|
+
const [r, o, a] = nn(t);
|
|
6543
|
+
return rn(r, o, Math.min(1, Math.max(0, a + n)));
|
|
6263
6544
|
}
|
|
6264
6545
|
const ve = le({
|
|
6265
6546
|
theme: "light",
|
|
6266
6547
|
tokens: be
|
|
6267
6548
|
});
|
|
6268
|
-
function
|
|
6549
|
+
function hr({
|
|
6269
6550
|
theme: t = "light",
|
|
6270
6551
|
tokens: n,
|
|
6271
|
-
children:
|
|
6552
|
+
children: r
|
|
6272
6553
|
}) {
|
|
6273
|
-
const o = ce().replace(/:/g, ""),
|
|
6554
|
+
const o = ce().replace(/:/g, ""), a = t === "dark" ? Kt : be, i = n ? { ...a, ...n } : a, l = n != null && n.accentBorder ? n.accentBorder : t === "light" ? oe(i.accentDefault, -0.15) : oe(i.accentDefault, 0.15), s = {
|
|
6274
6555
|
...i,
|
|
6275
|
-
textOnAccent: (n == null ? void 0 : n.textOnAccent) ??
|
|
6556
|
+
textOnAccent: (n == null ? void 0 : n.textOnAccent) ?? Zt(i.accentDefault),
|
|
6276
6557
|
accentBorder: l
|
|
6277
|
-
},
|
|
6278
|
-
` +
|
|
6558
|
+
}, d = `html { font-size: 13px; }
|
|
6559
|
+
` + Jt(s, ":root");
|
|
6279
6560
|
return se(() => {
|
|
6280
6561
|
let m = document.getElementById(`lucent-tokens-${o}`);
|
|
6281
|
-
return m || (m = document.createElement("style"), m.id = `lucent-tokens-${o}`, document.head.appendChild(m)), m.textContent =
|
|
6282
|
-
var
|
|
6283
|
-
(
|
|
6562
|
+
return m || (m = document.createElement("style"), m.id = `lucent-tokens-${o}`, document.head.appendChild(m)), m.textContent = d, () => {
|
|
6563
|
+
var g;
|
|
6564
|
+
(g = document.getElementById(`lucent-tokens-${o}`)) == null || g.remove();
|
|
6284
6565
|
};
|
|
6285
|
-
}, [o,
|
|
6566
|
+
}, [o, d]), /* @__PURE__ */ e(ve.Provider, { value: { theme: t, tokens: s }, children: r });
|
|
6286
6567
|
}
|
|
6287
|
-
function
|
|
6568
|
+
function mr() {
|
|
6288
6569
|
return ie(ve);
|
|
6289
6570
|
}
|
|
6290
|
-
const
|
|
6571
|
+
const gr = {
|
|
6291
6572
|
accentDefault: "#e9c96b",
|
|
6292
6573
|
accentHover: "#ddb84e",
|
|
6293
6574
|
accentActive: "#c9a33b",
|
|
6294
6575
|
accentSubtle: "#fef9ec",
|
|
6295
6576
|
focusRing: "#e9c96b"
|
|
6296
6577
|
};
|
|
6297
|
-
function
|
|
6578
|
+
function L(t, n) {
|
|
6298
6579
|
return { field: t, message: n };
|
|
6299
6580
|
}
|
|
6300
|
-
function
|
|
6581
|
+
function an(t) {
|
|
6301
6582
|
const n = [];
|
|
6302
6583
|
if (typeof t != "object" || t === null)
|
|
6303
|
-
return { valid: !1, errors: [
|
|
6304
|
-
const
|
|
6584
|
+
return { valid: !1, errors: [L("manifest", "Must be a non-null object")] };
|
|
6585
|
+
const r = t, o = ["id", "name", "description", "designIntent", "specVersion"];
|
|
6305
6586
|
for (const i of o)
|
|
6306
|
-
(typeof
|
|
6307
|
-
typeof
|
|
6308
|
-
const
|
|
6309
|
-
return
|
|
6310
|
-
const s = i,
|
|
6311
|
-
(typeof s.name != "string" || s.name === "") && n.push(
|
|
6312
|
-
}) : n.push(
|
|
6313
|
-
const s = i,
|
|
6314
|
-
(typeof s.title != "string" || s.title === "") && n.push(
|
|
6315
|
-
}) : n.push(
|
|
6587
|
+
(typeof r[i] != "string" || r[i].trim() === "") && n.push(L(i, "Must be a non-empty string"));
|
|
6588
|
+
typeof r.id == "string" && !/^[a-z][a-z0-9-]*$/.test(r.id) && n.push(L("id", 'Must be kebab-case (e.g. "button", "form-field")'));
|
|
6589
|
+
const a = ["atom", "molecule", "block", "flow", "overlay"];
|
|
6590
|
+
return a.includes(r.tier) || n.push(L("tier", `Must be one of: ${a.join(", ")}`)), (typeof r.domain != "string" || r.domain.trim() === "") && n.push(L("domain", "Must be a non-empty string")), Array.isArray(r.props) ? r.props.forEach((i, l) => {
|
|
6591
|
+
const s = i, d = `props[${l}]`;
|
|
6592
|
+
(typeof s.name != "string" || s.name === "") && n.push(L(`${d}.name`, "Must be a non-empty string")), (typeof s.type != "string" || s.type === "") && n.push(L(`${d}.type`, "Must be a non-empty string")), typeof s.required != "boolean" && n.push(L(`${d}.required`, "Must be a boolean")), (typeof s.description != "string" || s.description === "") && n.push(L(`${d}.description`, "Must be a non-empty string"));
|
|
6593
|
+
}) : n.push(L("props", "Must be an array")), Array.isArray(r.usageExamples) ? r.usageExamples.length === 0 ? n.push(L("usageExamples", "Must have at least one example")) : r.usageExamples.forEach((i, l) => {
|
|
6594
|
+
const s = i, d = `usageExamples[${l}]`;
|
|
6595
|
+
(typeof s.title != "string" || s.title === "") && n.push(L(`${d}.title`, "Must be a non-empty string")), (typeof s.code != "string" || s.code === "") && n.push(L(`${d}.code`, "Must be a non-empty string"));
|
|
6596
|
+
}) : n.push(L("usageExamples", "Must be an array")), Array.isArray(r.compositionGraph) || n.push(L("compositionGraph", "Must be an array (empty array is fine for atoms)")), typeof r.specVersion == "string" && !/^\d+\.\d+$/.test(r.specVersion) && n.push(L("specVersion", 'Must be "MAJOR.MINOR" format, e.g. "0.1"')), { valid: n.length === 0, errors: n };
|
|
6316
6597
|
}
|
|
6317
|
-
function
|
|
6318
|
-
const n =
|
|
6598
|
+
function br(t) {
|
|
6599
|
+
const n = an(t);
|
|
6319
6600
|
if (!n.valid) {
|
|
6320
|
-
const
|
|
6601
|
+
const r = n.errors.map((o) => ` ${o.field}: ${o.message}`).join(`
|
|
6321
6602
|
`);
|
|
6322
6603
|
throw new Error(`Invalid ComponentManifest:
|
|
6323
|
-
${
|
|
6604
|
+
${r}`);
|
|
6324
6605
|
}
|
|
6325
6606
|
}
|
|
6326
|
-
function
|
|
6607
|
+
function vr(t) {
|
|
6327
6608
|
if (typeof t != "object" || t === null) return !1;
|
|
6328
6609
|
const n = t;
|
|
6329
6610
|
return typeof n.name == "string" && typeof n.type == "string" && typeof n.required == "boolean" && typeof n.description == "string";
|
|
6330
6611
|
}
|
|
6331
|
-
const
|
|
6612
|
+
const yr = "1.0", xr = "0.1.0";
|
|
6332
6613
|
export {
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6614
|
+
jn as Alert,
|
|
6615
|
+
Un as AlertManifest,
|
|
6616
|
+
fn as Avatar,
|
|
6617
|
+
hn as AvatarManifest,
|
|
6618
|
+
un as Badge,
|
|
6619
|
+
pn as BadgeManifest,
|
|
6620
|
+
Xn as Breadcrumb,
|
|
6340
6621
|
we as Button,
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6622
|
+
sn as ButtonManifest,
|
|
6623
|
+
rr as COMMAND_PALETTE_MANIFEST,
|
|
6624
|
+
On as Card,
|
|
6625
|
+
Hn as CardManifest,
|
|
6345
6626
|
ue as Checkbox,
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6627
|
+
vn as CheckboxManifest,
|
|
6628
|
+
Rn as CodeBlock,
|
|
6629
|
+
Nn as CodeBlockManifest,
|
|
6630
|
+
Qn as Collapsible,
|
|
6631
|
+
nr as CommandPalette,
|
|
6632
|
+
tr as DATA_TABLE_MANIFEST,
|
|
6633
|
+
lr as DATE_PICKER_MANIFEST,
|
|
6634
|
+
cr as DATE_RANGE_PICKER_MANIFEST,
|
|
6635
|
+
er as DataTable,
|
|
6636
|
+
ir as DatePicker,
|
|
6637
|
+
sr as DateRangePicker,
|
|
6638
|
+
gn as Divider,
|
|
6639
|
+
bn as DividerManifest,
|
|
6640
|
+
Gn as EmptyState,
|
|
6641
|
+
_n as EmptyStateManifest,
|
|
6642
|
+
ur as FILE_UPLOAD_MANIFEST,
|
|
6643
|
+
dr as FileUpload,
|
|
6644
|
+
$n as FormField,
|
|
6645
|
+
Wn as FormFieldManifest,
|
|
6646
|
+
En as Icon,
|
|
6647
|
+
qn as IconManifest,
|
|
6367
6648
|
de as Input,
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6649
|
+
cn as InputManifest,
|
|
6650
|
+
xr as LUCENT_UI_VERSION,
|
|
6651
|
+
hr as LucentProvider,
|
|
6652
|
+
yr as MANIFEST_SPEC_VERSION,
|
|
6653
|
+
or as MULTI_SELECT_MANIFEST,
|
|
6654
|
+
ar as MultiSelect,
|
|
6655
|
+
Dn as NavLink,
|
|
6656
|
+
Zn as PageLayout,
|
|
6657
|
+
yn as Radio,
|
|
6658
|
+
We as RadioGroup,
|
|
6659
|
+
xn as RadioGroupUncontrolled,
|
|
6660
|
+
wn as RadioManifest,
|
|
6661
|
+
Vn as SearchInput,
|
|
6662
|
+
Pn as SearchInputManifest,
|
|
6382
6663
|
Ue as Select,
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6664
|
+
Tn as SelectManifest,
|
|
6665
|
+
Yn as Skeleton,
|
|
6666
|
+
Kn as SkeletonManifest,
|
|
6667
|
+
Fn as Slider,
|
|
6668
|
+
Bn as SliderManifest,
|
|
6388
6669
|
Re as Spinner,
|
|
6389
|
-
|
|
6390
|
-
|
|
6670
|
+
mn as SpinnerManifest,
|
|
6671
|
+
fr as TIMELINE_MANIFEST,
|
|
6391
6672
|
G as Table,
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6673
|
+
Ln as TableManifest,
|
|
6674
|
+
Jn as Tabs,
|
|
6675
|
+
Cn as Tag,
|
|
6676
|
+
In as TagManifest,
|
|
6677
|
+
A as Text,
|
|
6678
|
+
An as TextManifest,
|
|
6398
6679
|
Me as Textarea,
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6680
|
+
dn as TextareaManifest,
|
|
6681
|
+
pr as Timeline,
|
|
6682
|
+
kn as Toggle,
|
|
6683
|
+
Sn as ToggleManifest,
|
|
6684
|
+
Mn as Tooltip,
|
|
6685
|
+
zn as TooltipManifest,
|
|
6686
|
+
br as assertManifest,
|
|
6687
|
+
gr as brandTokens,
|
|
6688
|
+
Kt as darkTokens,
|
|
6689
|
+
Zt as getContrastText,
|
|
6690
|
+
vr as isValidPropDescriptor,
|
|
6410
6691
|
be as lightTokens,
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6692
|
+
Jt as makeLibraryCSS,
|
|
6693
|
+
mr as useLucent,
|
|
6694
|
+
an as validateManifest
|
|
6414
6695
|
};
|