lucent-ui 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,15 @@
1
1
  import { jsxs as T, jsx as f, Fragment as Ye } from "react/jsx-runtime";
2
- import { forwardRef as he, useState as F, useRef as j, useEffect as re, useLayoutEffect as ve, useId as Ze, useCallback as fe, useContext as Dt, createContext as St } from "react";
2
+ import { forwardRef as he, useState as F, useRef as U, useEffect as re, useLayoutEffect as ve, useId as Ze, useCallback as fe, useContext as Dt, createContext as St } from "react";
3
3
  import { createPortal as kt } from "react-dom";
4
- const Mt = {
4
+ function Mt(e) {
5
+ if (e === void 0) return;
6
+ const t = e.replace(/[\s\u0000-\u001F]+/g, "").toLowerCase();
7
+ if (t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("#") || t.startsWith("/") || t.startsWith("?") || t.startsWith("."))
8
+ return e;
9
+ if (!/^[a-z][a-z0-9+.-]*:/i.test(t))
10
+ return e;
11
+ }
12
+ const zt = {
5
13
  primary: {
6
14
  background: "var(--lucent-accent-default)",
7
15
  color: "var(--lucent-accent-fg)",
@@ -37,15 +45,15 @@ const Mt = {
37
45
  color: "var(--lucent-danger-text)",
38
46
  border: "1px solid transparent"
39
47
  }
40
- }, zt = {
48
+ }, Tt = {
41
49
  "2xs": { height: "22px", padding: "0 var(--lucent-space-2)", fontSize: "var(--lucent-font-size-xs)", borderRadius: "var(--lucent-radius-md)" },
42
50
  xs: { height: "26px", padding: "0 var(--lucent-space-3)", fontSize: "var(--lucent-font-size-xs)" },
43
51
  sm: { height: "calc(var(--lucent-space-8) * 0.5 + 18px)", padding: "0 var(--lucent-space-4)", fontSize: "var(--lucent-font-size-sm)" },
44
52
  md: { height: "calc(var(--lucent-space-10) * 0.5 + 22px)", padding: "0 var(--lucent-space-5)", fontSize: "var(--lucent-font-size-md)" },
45
53
  lg: { height: "calc(var(--lucent-space-12) * 0.5 + 26px)", padding: "0 var(--lucent-space-6)", fontSize: "var(--lucent-font-size-lg)" }
46
54
  }, Je = he(
47
- ({ variant: e = "primary", size: t = "md", loading: o = !1, fullWidth: a = !1, spread: n = !1, leftIcon: r, rightIcon: s, chevron: c = !1, disableHoverStyles: i = !1, bordered: d = !0, href: u, target: x, rel: h, children: b, disabled: v, style: B, type: I, onClick: k, ...p }, m) => {
48
- const S = v ?? o, $ = !b && !o && (!!r || !!s), C = u !== void 0, O = C ? "a" : "button", N = {
55
+ ({ variant: e = "primary", size: t = "md", loading: s = !1, fullWidth: a = !1, spread: n = !1, leftIcon: r, rightIcon: o, chevron: c = !1, disableHoverStyles: i = !1, bordered: d = !0, href: u, target: m, rel: h, children: b, disabled: v, style: B, type: I, onClick: S, ...p }, x) => {
56
+ const D = v ?? s, $ = !b && !s && (!!r || !!o), E = Mt(u), A = E !== void 0, H = A ? "a" : "button", N = {
49
57
  display: "inline-flex",
50
58
  alignItems: "center",
51
59
  justifyContent: n ? "space-between" : "center",
@@ -55,91 +63,91 @@ const Mt = {
55
63
  lineHeight: 1,
56
64
  letterSpacing: "0.01em",
57
65
  borderRadius: "var(--lucent-radius-lg)",
58
- cursor: S ? "not-allowed" : "pointer",
66
+ cursor: D ? "not-allowed" : "pointer",
59
67
  width: a ? "100%" : void 0,
60
68
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default), transform 80ms var(--lucent-easing-default)",
61
69
  whiteSpace: "nowrap",
62
70
  boxSizing: "border-box",
63
71
  outline: "none",
64
72
  margin: 0,
65
- ...zt[t],
73
+ ...Tt[t],
66
74
  ...$ && { padding: 0, aspectRatio: "1" },
67
- ...Mt[e],
75
+ ...zt[e],
68
76
  // Anchor reset — browsers underline <a> by default
69
- ...C && { textDecoration: "none" },
77
+ ...A && { textDecoration: "none" },
70
78
  ...B,
71
- ...S && {
79
+ ...D && {
72
80
  background: "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)",
73
81
  color: "var(--lucent-text-disabled)",
74
82
  borderColor: "transparent",
75
- ...C && { pointerEvents: "none" }
83
+ ...A && { pointerEvents: "none" }
76
84
  },
77
85
  // hide border entirely when bordered prop is false
78
86
  ...d === !1 && { border: "none" }
79
87
  };
80
88
  return /* @__PURE__ */ T(
81
- O,
89
+ H,
82
90
  {
83
- ref: m,
84
- "aria-busy": o,
91
+ ref: x,
92
+ "aria-busy": s,
85
93
  style: N,
86
- ...C ? {
94
+ ...A ? {
87
95
  role: "link",
88
- ...S ? { "aria-disabled": !0, tabIndex: -1 } : { href: u },
89
- ...x !== void 0 && { target: x },
96
+ ...D ? { "aria-disabled": !0, tabIndex: -1 } : { href: E },
97
+ ...m !== void 0 && { target: m },
90
98
  ...h !== void 0 && { rel: h }
91
99
  } : {
92
- disabled: S,
100
+ disabled: D,
93
101
  ...I !== void 0 && { type: I }
94
102
  },
95
- onMouseEnter: (D) => {
103
+ onMouseEnter: (k) => {
96
104
  var R;
97
- !S && !i && It(D.currentTarget, e, d), (R = p.onMouseEnter) == null || R.call(p, D);
105
+ !D && !i && Bt(k.currentTarget, e, d), (R = p.onMouseEnter) == null || R.call(p, k);
98
106
  },
99
- onMouseLeave: (D) => {
107
+ onMouseLeave: (k) => {
100
108
  var R;
101
- !S && !i && Bt(D.currentTarget, e, d), (R = p.onMouseLeave) == null || R.call(p, D);
109
+ !D && !i && $t(k.currentTarget, e, d), (R = p.onMouseLeave) == null || R.call(p, k);
102
110
  },
103
- onMouseDown: (D) => {
111
+ onMouseDown: (k) => {
104
112
  var R;
105
- if (!S) {
106
- const P = e === "danger" || e === "danger-outline" || e === "danger-ghost" ? "color-mix(in srgb, var(--lucent-danger-default) 40%, transparent)" : "color-mix(in srgb, var(--lucent-accent-default) 40%, transparent)";
107
- D.currentTarget.style.transform = "translateY(1px)", D.currentTarget.style.boxShadow = `0 0 0 4px ${P}`, D.currentTarget.dataset.pressed = "1";
113
+ if (!D) {
114
+ const O = e === "danger" || e === "danger-outline" || e === "danger-ghost" ? "color-mix(in srgb, var(--lucent-danger-default) 40%, transparent)" : "color-mix(in srgb, var(--lucent-accent-default) 40%, transparent)";
115
+ k.currentTarget.style.transform = "translateY(1px)", k.currentTarget.style.boxShadow = `0 0 0 4px ${O}`, k.currentTarget.dataset.pressed = "1";
108
116
  }
109
- (R = p.onMouseDown) == null || R.call(p, D);
117
+ (R = p.onMouseDown) == null || R.call(p, k);
110
118
  },
111
- onMouseUp: (D) => {
119
+ onMouseUp: (k) => {
112
120
  var R;
113
- D.currentTarget.style.transform = "", D.currentTarget.style.boxShadow = "", delete D.currentTarget.dataset.pressed, (R = p.onMouseUp) == null || R.call(p, D);
121
+ k.currentTarget.style.transform = "", k.currentTarget.style.boxShadow = "", delete k.currentTarget.dataset.pressed, (R = p.onMouseUp) == null || R.call(p, k);
114
122
  },
115
- onFocus: (D) => {
123
+ onFocus: (k) => {
116
124
  var R;
117
- D.currentTarget.dataset.pressed || (D.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)"), (R = p.onFocus) == null || R.call(p, D);
125
+ k.currentTarget.dataset.pressed || (k.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)"), (R = p.onFocus) == null || R.call(p, k);
118
126
  },
119
- onBlur: (D) => {
127
+ onBlur: (k) => {
120
128
  var R;
121
- D.currentTarget.style.boxShadow = "", (R = p.onBlur) == null || R.call(p, D);
129
+ k.currentTarget.style.boxShadow = "", (R = p.onBlur) == null || R.call(p, k);
122
130
  },
123
- onClick: (D) => {
124
- if (C && S) {
125
- D.preventDefault();
131
+ onClick: (k) => {
132
+ if (A && D) {
133
+ k.preventDefault();
126
134
  return;
127
135
  }
128
- k == null || k(D);
136
+ S == null || S(k);
129
137
  },
130
138
  ...p,
131
139
  children: [
132
140
  r,
133
- o ? /* @__PURE__ */ f(Lt, {}) : b,
134
- !o && s,
135
- !o && c && /* @__PURE__ */ f(Pt, { size: t })
141
+ s ? /* @__PURE__ */ f(Rt, {}) : b,
142
+ !s && o,
143
+ !s && c && /* @__PURE__ */ f(Lt, { size: t })
136
144
  ]
137
145
  }
138
146
  );
139
147
  }
140
148
  );
141
149
  Je.displayName = "Button";
142
- const Tt = {
150
+ const It = {
143
151
  primary: "0 4px 14px -2px color-mix(in srgb, var(--lucent-accent-default) 25%, transparent)",
144
152
  secondary: "0 4px 14px -2px color-mix(in srgb, var(--lucent-accent-default) 20%, transparent)",
145
153
  outline: "0 4px 14px -2px color-mix(in srgb, var(--lucent-accent-default) 20%, transparent)",
@@ -148,24 +156,24 @@ const Tt = {
148
156
  "danger-outline": "0 4px 14px -2px color-mix(in srgb, var(--lucent-danger-default) 20%, transparent)",
149
157
  "danger-ghost": "0 4px 14px -2px color-mix(in srgb, var(--lucent-danger-default) 15%, transparent)"
150
158
  };
151
- function It(e, t, o) {
152
- e.style.transform = "translateY(-1px)", e.style.boxShadow = Tt[t], t === "primary" ? e.style.background = "var(--lucent-accent-hover)" : t === "secondary" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 22%, transparent)" : t === "outline" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 10%, transparent)" : t === "ghost" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 8%, transparent)" : t === "danger" ? (e.style.background = "var(--lucent-danger-hover)", o !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)")) : t === "danger-outline" ? (e.style.background = "color-mix(in srgb, var(--lucent-danger-default) 10%, var(--lucent-surface))", o !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)")) : t === "danger-ghost" && (e.style.background = "color-mix(in srgb, var(--lucent-danger-default) 8%, var(--lucent-surface))");
159
+ function Bt(e, t, s) {
160
+ e.style.transform = "translateY(-1px)", e.style.boxShadow = It[t], t === "primary" ? e.style.background = "var(--lucent-accent-hover)" : t === "secondary" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 22%, transparent)" : t === "outline" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 10%, transparent)" : t === "ghost" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 8%, transparent)" : t === "danger" ? (e.style.background = "var(--lucent-danger-hover)", s !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)")) : t === "danger-outline" ? (e.style.background = "color-mix(in srgb, var(--lucent-danger-default) 10%, var(--lucent-surface))", s !== !1 && (e.style.borderColor = "var(--lucent-danger-hover)")) : t === "danger-ghost" && (e.style.background = "color-mix(in srgb, var(--lucent-danger-default) 8%, var(--lucent-surface))");
153
161
  }
154
- function Bt(e, t, o) {
155
- e.style.transform = "", e.style.boxShadow = "", t === "primary" ? e.style.background = "var(--lucent-accent-default)" : t === "secondary" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 16%, transparent)" : t === "outline" || t === "ghost" ? e.style.background = "transparent" : t === "danger" ? (e.style.background = "var(--lucent-danger-default)", o !== !1 && (e.style.borderColor = "var(--lucent-danger-default)")) : t === "danger-outline" ? (e.style.background = "transparent", o !== !1 && (e.style.borderColor = "var(--lucent-danger-default)")) : t === "danger-ghost" && (e.style.background = "transparent");
162
+ function $t(e, t, s) {
163
+ e.style.transform = "", e.style.boxShadow = "", t === "primary" ? e.style.background = "var(--lucent-accent-default)" : t === "secondary" ? e.style.background = "color-mix(in srgb, var(--lucent-accent-default) 16%, transparent)" : t === "outline" || t === "ghost" ? e.style.background = "transparent" : t === "danger" ? (e.style.background = "var(--lucent-danger-default)", s !== !1 && (e.style.borderColor = "var(--lucent-danger-default)")) : t === "danger-outline" ? (e.style.background = "transparent", s !== !1 && (e.style.borderColor = "var(--lucent-danger-default)")) : t === "danger-ghost" && (e.style.background = "transparent");
156
164
  }
157
- const $t = { "2xs": 8, xs: 10, sm: 12, md: 14, lg: 16 };
158
- function Pt({ size: e }) {
159
- const t = $t[e];
165
+ const Pt = { "2xs": 8, xs: 10, sm: 12, md: 14, lg: 16 };
166
+ function Lt({ size: e }) {
167
+ const t = Pt[e];
160
168
  return /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, style: { flexShrink: 0, marginLeft: -2 }, children: /* @__PURE__ */ f("polyline", { points: "6 9 12 15 18 9" }) });
161
169
  }
162
- function Lt() {
170
+ function Rt() {
163
171
  return /* @__PURE__ */ T("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", "aria-hidden": !0, style: { animation: "lucent-spin 0.7s linear infinite", flexShrink: 0 }, children: [
164
172
  /* @__PURE__ */ f("style", { children: "@keyframes lucent-spin { to { transform: rotate(360deg); } }" }),
165
173
  /* @__PURE__ */ f("path", { d: "M12 2a10 10 0 0 1 10 10" })
166
174
  ] });
167
175
  }
168
- const Rt = {
176
+ const Ft = {
169
177
  sm: "calc(var(--lucent-space-8) * 0.5 + 16px)",
170
178
  md: "calc(var(--lucent-space-10) * 0.5 + 20px)",
171
179
  lg: "calc(var(--lucent-space-12) * 0.5 + 24px)"
@@ -189,17 +197,17 @@ const Rt = {
189
197
  ({
190
198
  size: e = "md",
191
199
  label: t,
192
- helperText: o,
200
+ helperText: s,
193
201
  errorText: a,
194
202
  leftElement: n,
195
203
  rightElement: r,
196
- prefix: s,
204
+ prefix: o,
197
205
  suffix: c,
198
206
  id: i,
199
207
  style: d,
200
208
  ...u
201
- }, x) => {
202
- const h = i ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`, b = !!a, v = !!u.disabled, [B, I] = F(!1), [k, p] = F(!1), m = v ? "transparent" : b ? "var(--lucent-danger-default)" : B ? "var(--lucent-accent-border)" : k ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", S = B ? `0 0 0 3px ${b ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", $ = {
209
+ }, m) => {
210
+ const h = i ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`, b = !!a, v = !!u.disabled, [B, I] = F(!1), [S, p] = F(!1), x = v ? "transparent" : b ? "var(--lucent-danger-default)" : B ? "var(--lucent-accent-border)" : S ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", D = B ? `0 0 0 3px ${b ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", $ = {
203
211
  display: "flex",
204
212
  alignItems: "center",
205
213
  color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
@@ -208,7 +216,7 @@ const Rt = {
208
216
  whiteSpace: "nowrap",
209
217
  userSelect: "none",
210
218
  flexShrink: 0
211
- }, C = { ...$, paddingLeft: ee[e], paddingRight: "2px" }, O = { ...$, paddingLeft: "2px", paddingRight: ee[e] };
219
+ }, E = { ...$, paddingLeft: ee[e], paddingRight: "2px" }, A = { ...$, paddingLeft: "2px", paddingRight: ee[e] };
212
220
  return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...d }, children: [
213
221
  t && /* @__PURE__ */ f(
214
222
  "label",
@@ -229,10 +237,10 @@ const Rt = {
229
237
  style: {
230
238
  display: "flex",
231
239
  alignItems: "stretch",
232
- height: Rt[e],
233
- border: `1px solid ${m}`,
240
+ height: Ft[e],
241
+ border: `1px solid ${x}`,
234
242
  borderRadius: "var(--lucent-radius-lg)",
235
- boxShadow: S,
243
+ boxShadow: D,
236
244
  background: v ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
237
245
  overflow: "hidden",
238
246
  cursor: v ? "not-allowed" : void 0,
@@ -246,7 +254,7 @@ const Rt = {
246
254
  },
247
255
  onMouseLeave: () => p(!1),
248
256
  children: [
249
- s && /* @__PURE__ */ f("span", { style: C, children: s }),
257
+ o && /* @__PURE__ */ f("span", { style: E, children: o }),
250
258
  /* @__PURE__ */ T("div", { style: { position: "relative", flex: 1, display: "flex", alignItems: "center", minWidth: 0 }, children: [
251
259
  n && /* @__PURE__ */ f("span", { style: {
252
260
  position: "absolute",
@@ -259,10 +267,10 @@ const Rt = {
259
267
  /* @__PURE__ */ f(
260
268
  "input",
261
269
  {
262
- ref: x,
270
+ ref: m,
263
271
  id: h,
264
272
  "aria-invalid": b,
265
- "aria-describedby": b ? `${h}-error` : o ? `${h}-helper` : void 0,
273
+ "aria-describedby": b ? `${h}-error` : s ? `${h}-helper` : void 0,
266
274
  style: {
267
275
  width: "100%",
268
276
  height: "100%",
@@ -278,13 +286,13 @@ const Rt = {
278
286
  boxSizing: "border-box"
279
287
  },
280
288
  ...u,
281
- onFocus: (N) => {
282
- var D;
283
- I(!0), (D = u.onFocus) == null || D.call(u, N);
289
+ onFocus: (H) => {
290
+ var N;
291
+ I(!0), (N = u.onFocus) == null || N.call(u, H);
284
292
  },
285
- onBlur: (N) => {
286
- var D;
287
- I(!1), (D = u.onBlur) == null || D.call(u, N);
293
+ onBlur: (H) => {
294
+ var N;
295
+ I(!1), (N = u.onBlur) == null || N.call(u, H);
288
296
  }
289
297
  }
290
298
  ),
@@ -296,7 +304,7 @@ const Rt = {
296
304
  alignItems: "center"
297
305
  }, children: r })
298
306
  ] }),
299
- c && /* @__PURE__ */ f("span", { style: O, children: c })
307
+ c && /* @__PURE__ */ f("span", { style: A, children: c })
300
308
  ]
301
309
  }
302
310
  ),
@@ -313,7 +321,7 @@ const Rt = {
313
321
  children: a
314
322
  }
315
323
  ),
316
- !b && o && /* @__PURE__ */ f(
324
+ !b && s && /* @__PURE__ */ f(
317
325
  "span",
318
326
  {
319
327
  id: `${h}-helper`,
@@ -322,33 +330,33 @@ const Rt = {
322
330
  color: "var(--lucent-text-secondary)",
323
331
  fontFamily: "var(--lucent-font-family-base)"
324
332
  },
325
- children: o
333
+ children: s
326
334
  }
327
335
  )
328
336
  ] });
329
337
  }
330
338
  );
331
339
  te.displayName = "Input";
332
- const Ft = {
340
+ const Ct = {
333
341
  neutral: { bg: "var(--lucent-surface-secondary)", color: "var(--lucent-text-secondary)", border: "var(--lucent-border-default)" },
334
342
  accent: { bg: "var(--lucent-accent-default)", color: "var(--lucent-accent-fg)", border: "var(--lucent-accent-default)" },
335
343
  success: { bg: "var(--lucent-success-subtle)", color: "var(--lucent-success-text)", border: "var(--lucent-success-subtle)" },
336
344
  warning: { bg: "var(--lucent-warning-subtle)", color: "var(--lucent-warning-text)", border: "var(--lucent-warning-subtle)" },
337
345
  danger: { bg: "var(--lucent-danger-subtle)", color: "var(--lucent-danger-text)", border: "var(--lucent-danger-subtle)" },
338
346
  info: { bg: "var(--lucent-info-subtle)", color: "var(--lucent-info-text)", border: "var(--lucent-info-subtle)" }
339
- }, Ct = {
347
+ }, Wt = {
340
348
  sm: { fontSize: "var(--lucent-font-size-xs)", padding: "0 var(--lucent-space-2)", height: "18px" },
341
349
  md: { fontSize: "var(--lucent-font-size-sm)", padding: "0 var(--lucent-space-2)", height: "22px" }
342
350
  };
343
- function un({ variant: e = "neutral", size: t = "md", dot: o = !1, children: a, style: n }) {
344
- const r = Ft[e], s = Ct[t];
351
+ function fn({ variant: e = "neutral", size: t = "md", dot: s = !1, children: a, style: n }) {
352
+ const r = Ct[e], o = Wt[t];
345
353
  return /* @__PURE__ */ T("span", { style: {
346
354
  display: "inline-flex",
347
355
  alignItems: "center",
348
356
  gap: "var(--lucent-space-1)",
349
- height: s.height,
350
- padding: s.padding,
351
- fontSize: s.fontSize,
357
+ height: o.height,
358
+ padding: o.padding,
359
+ fontSize: o.fontSize,
352
360
  fontFamily: "var(--lucent-font-family-base)",
353
361
  fontWeight: "var(--lucent-font-weight-medium)",
354
362
  lineHeight: 1,
@@ -360,7 +368,7 @@ function un({ variant: e = "neutral", size: t = "md", dot: o = !1, children: a,
360
368
  boxSizing: "border-box",
361
369
  ...n
362
370
  }, children: [
363
- o && /* @__PURE__ */ f("span", { style: {
371
+ s && /* @__PURE__ */ f("span", { style: {
364
372
  width: 6,
365
373
  height: 6,
366
374
  borderRadius: "var(--lucent-radius-full)",
@@ -370,11 +378,11 @@ function un({ variant: e = "neutral", size: t = "md", dot: o = !1, children: a,
370
378
  a
371
379
  ] });
372
380
  }
373
- const Wt = { sm: "calc(var(--lucent-space-8) * 0.5 + 16px)", md: "calc(var(--lucent-space-10) * 0.5 + 20px)", lg: "calc(var(--lucent-space-12) * 0.5 + 24px)" }, Ht = {
381
+ const Ht = { sm: "calc(var(--lucent-space-8) * 0.5 + 16px)", md: "calc(var(--lucent-space-10) * 0.5 + 20px)", lg: "calc(var(--lucent-space-12) * 0.5 + 24px)" }, Nt = {
374
382
  sm: { track: [28, 16], thumb: 12 },
375
383
  md: { track: [36, 20], thumb: 16 },
376
384
  lg: { track: [44, 24], thumb: 20 }
377
- }, Ee = "cubic-bezier(0.34, 1.56, 0.64, 1)", Nt = `
385
+ }, Ee = "cubic-bezier(0.34, 1.56, 0.64, 1)", Et = `
378
386
  @keyframes lucent-toggle-pop {
379
387
  0% { transform: scale(1); }
380
388
  35% { transform: scale(0.94); }
@@ -382,39 +390,39 @@ const Wt = { sm: "calc(var(--lucent-space-8) * 0.5 + 16px)", md: "calc(var(--luc
382
390
  100% { transform: scale(1); }
383
391
  }
384
392
  `;
385
- function dn({
393
+ function pn({
386
394
  label: e,
387
395
  size: t = "md",
388
- checked: o,
396
+ checked: s,
389
397
  defaultChecked: a,
390
398
  contained: n = !1,
391
399
  helperText: r,
392
- align: s = "left",
400
+ align: o = "left",
393
401
  disabled: c,
394
402
  id: i,
395
403
  onChange: d,
396
404
  style: u,
397
- ...x
405
+ ...m
398
406
  }) {
399
- const h = i ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, b = o !== void 0, [v, B] = F(a ?? !1), I = b ? !!o : v, k = j(I), [p, m] = F(0), [S, $] = F(!1);
407
+ const h = i ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, b = s !== void 0, [v, B] = F(a ?? !1), I = b ? !!s : v, S = U(I), [p, x] = F(0), [D, $] = F(!1);
400
408
  re(() => {
401
- if (!c && k.current !== I) {
402
- k.current = I, m((q) => q + 1), $(!0);
403
- const E = setTimeout(() => $(!1), 150);
404
- return () => clearTimeout(E);
409
+ if (!c && S.current !== I) {
410
+ S.current = I, x((G) => G + 1), $(!0);
411
+ const O = setTimeout(() => $(!1), 150);
412
+ return () => clearTimeout(O);
405
413
  }
406
414
  }, [I, c]);
407
- const { track: [C, O], thumb: N } = Ht[t], D = I ? C - N - 2 : 2, R = (E) => {
408
- b || B(E.target.checked), d == null || d(E);
409
- }, V = /* @__PURE__ */ T(
415
+ const { track: [E, A], thumb: H } = Nt[t], N = I ? E - H - 2 : 2, k = (O) => {
416
+ b || B(O.target.checked), d == null || d(O);
417
+ }, R = /* @__PURE__ */ T(
410
418
  "span",
411
419
  {
412
420
  "aria-hidden": !0,
413
421
  style: {
414
422
  position: "relative",
415
- width: C,
416
- height: O,
417
- borderRadius: O / 2,
423
+ width: E,
424
+ height: A,
425
+ borderRadius: A / 2,
418
426
  flexShrink: 0
419
427
  },
420
428
  children: [
@@ -438,10 +446,10 @@ function dn({
438
446
  style: {
439
447
  position: "absolute",
440
448
  top: 2,
441
- left: D,
442
- width: S ? N * 1.3 : N,
443
- height: N,
444
- borderRadius: N,
449
+ left: N,
450
+ width: D ? H * 1.3 : H,
451
+ height: H,
452
+ borderRadius: H,
445
453
  background: "#ffffff",
446
454
  boxShadow: "0 1px 3px rgb(0 0 0 / 0.2)",
447
455
  transition: `left 260ms ${Ee}, width 200ms cubic-bezier(0.22, 1, 0.36, 1)`
@@ -454,10 +462,10 @@ function dn({
454
462
  "label",
455
463
  {
456
464
  style: {
457
- display: s === "right" ? "flex" : "inline-flex",
465
+ display: o === "right" ? "flex" : "inline-flex",
458
466
  alignItems: r ? "flex-start" : "center",
459
467
  gap: "var(--lucent-space-2)",
460
- ...s === "right" ? { width: "100%" } : {},
468
+ ...o === "right" ? { width: "100%" } : {},
461
469
  cursor: c ? "not-allowed" : "pointer",
462
470
  fontFamily: "var(--lucent-font-family-base)",
463
471
  fontSize: t === "sm" ? "var(--lucent-font-size-sm)" : "var(--lucent-font-size-md)",
@@ -472,16 +480,16 @@ function dn({
472
480
  type: "checkbox",
473
481
  role: "switch",
474
482
  id: h,
475
- checked: b ? o : v,
483
+ checked: b ? s : v,
476
484
  disabled: c,
477
- onChange: R,
485
+ onChange: k,
478
486
  "aria-checked": I,
479
487
  style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
480
- ...x
488
+ ...m
481
489
  }
482
490
  ),
483
- s === "left" && V,
484
- e || r ? /* @__PURE__ */ T("span", { style: { display: "flex", flexDirection: "column", flex: s === "right" ? 1 : void 0 }, children: [
491
+ o === "left" && R,
492
+ e || r ? /* @__PURE__ */ T("span", { style: { display: "flex", flexDirection: "column", flex: o === "right" ? 1 : void 0 }, children: [
485
493
  e && /* @__PURE__ */ f("span", { style: {
486
494
  fontWeight: r ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
487
495
  lineHeight: r ? 1.3 : 1
@@ -492,28 +500,28 @@ function dn({
492
500
  marginTop: "2px"
493
501
  }, children: r })
494
502
  ] }) : null,
495
- s === "right" && V
503
+ o === "right" && R
496
504
  ]
497
505
  }
498
506
  );
499
507
  return /* @__PURE__ */ T(Ye, { children: [
500
- /* @__PURE__ */ f("style", { children: Nt }),
508
+ /* @__PURE__ */ f("style", { children: Et }),
501
509
  n ? /* @__PURE__ */ f(
502
510
  "div",
503
511
  {
504
512
  style: {
505
513
  border: "1px solid var(--lucent-border-strong)",
506
514
  borderRadius: "var(--lucent-radius-lg)",
507
- ...r ? { padding: "var(--lucent-space-3)" } : { minHeight: Wt[t], padding: "0 var(--lucent-space-3)", display: "flex", alignItems: "center" },
515
+ ...r ? { padding: "var(--lucent-space-3)" } : { minHeight: Ht[t], padding: "0 var(--lucent-space-3)", display: "flex", alignItems: "center" },
508
516
  background: I && !c ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "transparent",
509
517
  transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)",
510
518
  cursor: c ? "not-allowed" : "pointer",
511
519
  ...u
512
520
  },
513
- onClick: (E) => {
514
- if (!c && E.target === E.currentTarget) {
515
- const q = E.currentTarget.querySelector("input");
516
- q == null || q.click();
521
+ onClick: (O) => {
522
+ if (!c && O.target === O.currentTarget) {
523
+ const G = O.currentTarget.querySelector("input");
524
+ G == null || G.click();
517
525
  }
518
526
  },
519
527
  children: P
@@ -521,11 +529,11 @@ function dn({
521
529
  ) : P
522
530
  ] });
523
531
  }
524
- const Et = {
532
+ const At = {
525
533
  sm: "calc(var(--lucent-space-8) * 0.5 + 16px)",
526
534
  md: "calc(var(--lucent-space-10) * 0.5 + 20px)",
527
535
  lg: "calc(var(--lucent-space-12) * 0.5 + 24px)"
528
- }, At = {
536
+ }, Ot = {
529
537
  sm: "var(--lucent-font-size-sm)",
530
538
  md: "var(--lucent-font-size-md)",
531
539
  lg: "var(--lucent-font-size-md)"
@@ -538,20 +546,20 @@ const Et = {
538
546
  md: "var(--lucent-space-3)",
539
547
  lg: "var(--lucent-space-3)"
540
548
  }, Qe = he(
541
- ({ options: e, size: t = "md", label: o, helperText: a, errorText: n, placeholder: r, disabled: s, id: c, style: i, ...d }, u) => {
542
- const x = c ?? `lucent-select-${Math.random().toString(36).slice(2, 7)}`, h = !!n, b = !!s, [v, B] = F(!1), [I, k] = F(!1), p = b ? "transparent" : h ? "var(--lucent-danger-default)" : v ? "var(--lucent-accent-border)" : I ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", m = v ? `0 0 0 3px ${h ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
549
+ ({ options: e, size: t = "md", label: s, helperText: a, errorText: n, placeholder: r, disabled: o, id: c, style: i, ...d }, u) => {
550
+ const m = c ?? `lucent-select-${Math.random().toString(36).slice(2, 7)}`, h = !!n, b = !!o, [v, B] = F(!1), [I, S] = F(!1), p = b ? "transparent" : h ? "var(--lucent-danger-default)" : v ? "var(--lucent-accent-border)" : I ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", x = v ? `0 0 0 3px ${h ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
543
551
  return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...i }, children: [
544
- o && /* @__PURE__ */ f(
552
+ s && /* @__PURE__ */ f(
545
553
  "label",
546
554
  {
547
- htmlFor: x,
555
+ htmlFor: m,
548
556
  style: {
549
557
  fontSize: Ie[t],
550
558
  fontWeight: "var(--lucent-font-weight-medium)",
551
559
  color: b ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
552
560
  fontFamily: "var(--lucent-font-family-base)"
553
561
  },
554
- children: o
562
+ children: s
555
563
  }
556
564
  ),
557
565
  /* @__PURE__ */ T(
@@ -561,10 +569,10 @@ const Et = {
561
569
  position: "relative",
562
570
  display: "flex",
563
571
  alignItems: "center",
564
- height: Et[t],
572
+ height: At[t],
565
573
  border: `1px solid ${p}`,
566
574
  borderRadius: "var(--lucent-radius-lg)",
567
- boxShadow: m,
575
+ boxShadow: x,
568
576
  background: b ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
569
577
  cursor: b ? "not-allowed" : "pointer",
570
578
  transition: [
@@ -573,23 +581,23 @@ const Et = {
573
581
  ].join(", ")
574
582
  },
575
583
  onMouseEnter: () => {
576
- b || k(!0);
584
+ b || S(!0);
577
585
  },
578
- onMouseLeave: () => k(!1),
586
+ onMouseLeave: () => S(!1),
579
587
  children: [
580
588
  /* @__PURE__ */ T(
581
589
  "select",
582
590
  {
583
591
  ref: u,
584
- id: x,
585
- disabled: s,
592
+ id: m,
593
+ disabled: o,
586
594
  "aria-invalid": h,
587
- "aria-describedby": h ? `${x}-error` : a ? `${x}-helper` : void 0,
595
+ "aria-describedby": h ? `${m}-error` : a ? `${m}-helper` : void 0,
588
596
  style: {
589
597
  width: "100%",
590
598
  height: "100%",
591
599
  padding: `0 var(--lucent-space-8) 0 ${Ae[t]}`,
592
- fontSize: At[t],
600
+ fontSize: Ot[t],
593
601
  fontFamily: "var(--lucent-font-family-base)",
594
602
  color: b ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
595
603
  background: "transparent",
@@ -600,13 +608,13 @@ const Et = {
600
608
  cursor: b ? "not-allowed" : "pointer",
601
609
  boxSizing: "border-box"
602
610
  },
603
- onFocus: (S) => {
611
+ onFocus: (D) => {
604
612
  var $;
605
- b || B(!0), ($ = d.onFocus) == null || $.call(d, S);
613
+ b || B(!0), ($ = d.onFocus) == null || $.call(d, D);
606
614
  },
607
- onBlur: (S) => {
615
+ onBlur: (D) => {
608
616
  var $;
609
- B(!1), ($ = d.onBlur) == null || $.call(d, S);
617
+ B(!1), ($ = d.onBlur) == null || $.call(d, D);
610
618
  },
611
619
  onMouseDown: () => {
612
620
  b || B(!0);
@@ -614,7 +622,7 @@ const Et = {
614
622
  ...d,
615
623
  children: [
616
624
  r && /* @__PURE__ */ f("option", { value: "", disabled: !0, children: r }),
617
- e.map((S) => /* @__PURE__ */ f("option", { value: S.value, disabled: S.disabled, children: S.label }, S.value))
625
+ e.map((D) => /* @__PURE__ */ f("option", { value: D.value, disabled: D.disabled, children: D.label }, D.value))
618
626
  ]
619
627
  }
620
628
  ),
@@ -639,7 +647,7 @@ const Et = {
639
647
  h && /* @__PURE__ */ f(
640
648
  "span",
641
649
  {
642
- id: `${x}-error`,
650
+ id: `${m}-error`,
643
651
  role: "alert",
644
652
  style: {
645
653
  fontSize: Ie[t],
@@ -652,7 +660,7 @@ const Et = {
652
660
  !h && a && /* @__PURE__ */ f(
653
661
  "span",
654
662
  {
655
- id: `${x}-helper`,
663
+ id: `${m}-helper`,
656
664
  style: {
657
665
  fontSize: Ie[t],
658
666
  color: "var(--lucent-text-secondary)",
@@ -665,7 +673,7 @@ const Et = {
665
673
  }
666
674
  );
667
675
  Qe.displayName = "Select";
668
- const Ot = {
676
+ const Xt = {
669
677
  primary: "var(--lucent-text-primary)",
670
678
  secondary: "var(--lucent-text-secondary)",
671
679
  disabled: "var(--lucent-text-disabled)",
@@ -675,7 +683,7 @@ const Ot = {
675
683
  warning: "var(--lucent-warning-text)",
676
684
  danger: "var(--lucent-danger-text)",
677
685
  info: "var(--lucent-info-text)"
678
- }, Xt = {
686
+ }, jt = {
679
687
  xs: "var(--lucent-font-size-xs)",
680
688
  sm: "var(--lucent-font-size-sm)",
681
689
  md: "var(--lucent-font-size-md)",
@@ -683,40 +691,40 @@ const Ot = {
683
691
  xl: "var(--lucent-font-size-xl)",
684
692
  "2xl": "var(--lucent-font-size-2xl)",
685
693
  "3xl": "var(--lucent-font-size-3xl)"
686
- }, jt = {
694
+ }, Ut = {
687
695
  regular: "var(--lucent-font-weight-regular)",
688
696
  medium: "var(--lucent-font-weight-medium)",
689
697
  semibold: "var(--lucent-font-weight-semibold)",
690
698
  bold: "var(--lucent-font-weight-bold)"
691
- }, Ut = {
699
+ }, qt = {
692
700
  tight: "var(--lucent-line-height-tight)",
693
701
  base: "var(--lucent-line-height-base)",
694
702
  relaxed: "var(--lucent-line-height-relaxed)"
695
- }, qt = {
703
+ }, Gt = {
696
704
  base: "var(--lucent-font-family-base)",
697
705
  mono: "var(--lucent-font-family-mono)",
698
706
  display: "var(--lucent-font-family-display)"
699
707
  };
700
- function fn({
708
+ function gn({
701
709
  as: e = "p",
702
710
  size: t = "md",
703
- weight: o = "regular",
711
+ weight: s = "regular",
704
712
  color: a = "primary",
705
713
  align: n,
706
714
  lineHeight: r = "base",
707
- family: s = "base",
715
+ family: o = "base",
708
716
  truncate: c = !1,
709
717
  children: i,
710
718
  style: d,
711
719
  ...u
712
720
  }) {
713
- const x = {
714
- fontSize: Xt[t],
715
- fontWeight: jt[o],
716
- color: Ot[a],
721
+ const m = {
722
+ fontSize: jt[t],
723
+ fontWeight: Ut[s],
724
+ color: Xt[a],
717
725
  ...n !== void 0 && { textAlign: n },
718
- lineHeight: Ut[r],
719
- fontFamily: qt[s],
726
+ lineHeight: qt[r],
727
+ fontFamily: Gt[o],
720
728
  margin: 0,
721
729
  ...c && {
722
730
  overflow: "hidden",
@@ -725,9 +733,9 @@ function fn({
725
733
  },
726
734
  ...d
727
735
  };
728
- return /* @__PURE__ */ f(e, { style: x, ...u, children: i });
736
+ return /* @__PURE__ */ f(e, { style: m, ...u, children: i });
729
737
  }
730
- const Gt = { sm: "3px", md: "4px", lg: "5px" }, _t = { sm: "14px", md: "18px", lg: "22px" }, Vt = `
738
+ const Vt = { sm: "3px", md: "4px", lg: "5px" }, _t = { sm: "14px", md: "18px", lg: "22px" }, Kt = `
731
739
  .lucent-slider {
732
740
  -webkit-appearance: none;
733
741
  appearance: none;
@@ -821,28 +829,28 @@ const Gt = { sm: "3px", md: "4px", lg: "5px" }, _t = { sm: "14px", md: "18px", l
821
829
  cursor: not-allowed;
822
830
  }
823
831
  `;
824
- function pn({
832
+ function bn({
825
833
  label: e,
826
834
  showValue: t = !1,
827
- size: o = "md",
835
+ size: s = "md",
828
836
  min: a = 0,
829
837
  max: n = 100,
830
838
  step: r = 1,
831
- value: s,
839
+ value: o,
832
840
  defaultValue: c,
833
841
  disabled: i,
834
842
  id: d,
835
843
  onChange: u,
836
- style: x,
844
+ style: m,
837
845
  ...h
838
846
  }) {
839
- const b = d ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`, v = s !== void 0, [B, I] = F(
847
+ const b = d ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`, v = o !== void 0, [B, I] = F(
840
848
  c ?? Math.round((a + n) / 2)
841
- ), k = v ? s : B, p = `${(k - a) / (n - a) * 100}%`, m = (S) => {
842
- v || I(Number(S.target.value)), u == null || u(S);
849
+ ), S = v ? o : B, p = `${(S - a) / (n - a) * 100}%`, x = (D) => {
850
+ v || I(Number(D.target.value)), u == null || u(D);
843
851
  };
844
852
  return /* @__PURE__ */ T(Ye, { children: [
845
- /* @__PURE__ */ f("style", { children: Vt }),
853
+ /* @__PURE__ */ f("style", { children: Kt }),
846
854
  /* @__PURE__ */ T(
847
855
  "div",
848
856
  {
@@ -852,7 +860,7 @@ function pn({
852
860
  gap: "var(--lucent-space-1)",
853
861
  width: "100%",
854
862
  fontFamily: "var(--lucent-font-family-base)",
855
- ...x
863
+ ...m
856
864
  },
857
865
  children: [
858
866
  (e || t) && /* @__PURE__ */ T(
@@ -885,7 +893,7 @@ function pn({
885
893
  color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
886
894
  fontVariantNumeric: "tabular-nums"
887
895
  },
888
- children: k
896
+ children: S
889
897
  }
890
898
  )
891
899
  ]
@@ -901,11 +909,11 @@ function pn({
901
909
  max: n,
902
910
  step: r,
903
911
  disabled: i,
904
- value: v ? s : B,
905
- onChange: m,
912
+ value: v ? o : B,
913
+ onChange: x,
906
914
  style: {
907
- "--ls-track-h": Gt[o],
908
- "--ls-thumb": _t[o],
915
+ "--ls-track-h": Vt[s],
916
+ "--ls-thumb": _t[s],
909
917
  "--ls-fill": p
910
918
  },
911
919
  ...h
@@ -920,11 +928,11 @@ const Oe = {
920
928
  sm: "calc(var(--lucent-space-8) * 0.5 + 18px)",
921
929
  md: "calc(var(--lucent-space-10) * 0.5 + 22px)",
922
930
  lg: "calc(var(--lucent-space-12) * 0.5 + 26px)"
923
- }, Kt = {
931
+ }, Yt = {
924
932
  sm: "var(--lucent-font-size-sm)",
925
933
  md: "var(--lucent-font-size-md)",
926
934
  lg: "var(--lucent-font-size-lg)"
927
- }, Yt = {
935
+ }, Zt = {
928
936
  sm: "var(--lucent-space-3)",
929
937
  md: "var(--lucent-space-4)",
930
938
  lg: "var(--lucent-space-5)"
@@ -932,33 +940,33 @@ const Oe = {
932
940
  function et({
933
941
  options: e,
934
942
  value: t,
935
- defaultValue: o,
943
+ defaultValue: s,
936
944
  onChange: a,
937
945
  size: n = "md",
938
946
  disabled: r = !1,
939
- fullWidth: s = !0,
947
+ fullWidth: o = !0,
940
948
  id: c,
941
949
  style: i
942
950
  }) {
943
- var k;
951
+ var S;
944
952
  const [d, u] = F(
945
- o ?? ((k = e[0]) == null ? void 0 : k.value) ?? ""
946
- ), x = t !== void 0 ? t : d, h = j(null), [b, v] = F(null), B = j(!1);
953
+ s ?? ((S = e[0]) == null ? void 0 : S.value) ?? ""
954
+ ), m = t !== void 0 ? t : d, h = U(null), [b, v] = F(null), B = U(!1);
947
955
  ve(() => {
948
956
  const p = h.current;
949
957
  if (!p) return;
950
- const m = () => {
951
- const $ = p.querySelector(`[data-sc-value="${x}"]`);
958
+ const x = () => {
959
+ const $ = p.querySelector(`[data-sc-value="${m}"]`);
952
960
  $ && (v({
953
961
  left: $.offsetLeft,
954
962
  width: $.offsetWidth,
955
963
  animate: B.current
956
964
  }), B.current = !0);
957
965
  };
958
- m();
959
- const S = new ResizeObserver(m);
960
- return S.observe(p), () => S.disconnect();
961
- }, [x, e]);
966
+ x();
967
+ const D = new ResizeObserver(x);
968
+ return D.observe(p), () => D.disconnect();
969
+ }, [m, e]);
962
970
  const I = (p) => {
963
971
  r || p.disabled || (t === void 0 && u(p.value), a == null || a(p.value));
964
972
  };
@@ -972,7 +980,7 @@ function et({
972
980
  position: "relative",
973
981
  display: "flex",
974
982
  alignItems: "center",
975
- width: s ? "100%" : "fit-content",
983
+ width: o ? "100%" : "fit-content",
976
984
  height: Oe[n],
977
985
  // color-mix with transparent produces a relative tint that adapts to any
978
986
  // parent background (white, tinted chrome, dark mode). Baseline 2023.
@@ -1004,15 +1012,15 @@ function et({
1004
1012
  }
1005
1013
  ),
1006
1014
  e.map((p) => {
1007
- const m = p.value === x, S = r || !!p.disabled;
1015
+ const x = p.value === m, D = r || !!p.disabled;
1008
1016
  return /* @__PURE__ */ f(
1009
1017
  "button",
1010
1018
  {
1011
1019
  "data-sc-value": p.value,
1012
1020
  type: "button",
1013
1021
  role: "radio",
1014
- "aria-checked": m,
1015
- disabled: S,
1022
+ "aria-checked": x,
1023
+ disabled: D,
1016
1024
  onClick: () => I(p),
1017
1025
  style: {
1018
1026
  position: "relative",
@@ -1023,15 +1031,15 @@ function et({
1023
1031
  gap: "var(--lucent-space-1)",
1024
1032
  flex: 1,
1025
1033
  height: Oe[n],
1026
- padding: `0 ${Yt[n]}`,
1027
- fontSize: Kt[n],
1034
+ padding: `0 ${Zt[n]}`,
1035
+ fontSize: Yt[n],
1028
1036
  fontFamily: "var(--lucent-font-family-base)",
1029
- fontWeight: m ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1030
- color: S ? "var(--lucent-text-disabled)" : m ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1037
+ fontWeight: x ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1038
+ color: D ? "var(--lucent-text-disabled)" : x ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1031
1039
  background: "transparent",
1032
1040
  border: "none",
1033
1041
  borderRadius: "var(--lucent-radius-lg)",
1034
- cursor: S ? "not-allowed" : "pointer",
1042
+ cursor: D ? "not-allowed" : "pointer",
1035
1043
  outline: "none",
1036
1044
  whiteSpace: "nowrap",
1037
1045
  transition: [
@@ -1055,22 +1063,22 @@ function et({
1055
1063
  );
1056
1064
  }
1057
1065
  et.displayName = "SegmentedControl";
1058
- const Zt = {
1066
+ const Jt = {
1059
1067
  xs: 12,
1060
1068
  sm: 16,
1061
1069
  md: 22,
1062
1070
  lg: 28,
1063
1071
  xl: 36,
1064
1072
  "2xl": 48
1065
- }, Jt = {
1073
+ }, Qt = {
1066
1074
  xs: "var(--lucent-radius-sm)",
1067
1075
  sm: "var(--lucent-radius-sm)",
1068
1076
  md: "var(--lucent-radius-md)",
1069
1077
  lg: "var(--lucent-radius-md)",
1070
1078
  xl: "var(--lucent-radius-lg)",
1071
1079
  "2xl": "var(--lucent-radius-lg)"
1072
- }, Xe = "inset 0 0 0 1px rgba(0,0,0,0.2)", je = "inset 0 0 0 2px rgba(0,0,0,0.5)", Qt = "inset 0 0 0 1px rgba(0,0,0,0.2), 0 0 0 3px var(--lucent-accent-subtle)";
1073
- function ea(e) {
1080
+ }, Xe = "inset 0 0 0 1px rgba(0,0,0,0.2)", je = "inset 0 0 0 2px rgba(0,0,0,0.5)", ea = "inset 0 0 0 1px rgba(0,0,0,0.2), 0 0 0 3px var(--lucent-accent-subtle)";
1081
+ function ta(e) {
1074
1082
  return {
1075
1083
  backgroundImage: [
1076
1084
  `linear-gradient(${e}, ${e})`,
@@ -1087,21 +1095,21 @@ function ea(e) {
1087
1095
  const pe = he(({
1088
1096
  color: e,
1089
1097
  size: t = "md",
1090
- shape: o = "circle",
1098
+ shape: s = "circle",
1091
1099
  showCheckerboard: a = !1,
1092
1100
  selected: n = !1,
1093
1101
  disabled: r = !1,
1094
- style: s,
1102
+ style: o,
1095
1103
  onFocus: c,
1096
1104
  onBlur: i,
1097
1105
  onClick: d,
1098
1106
  ...u
1099
- }, x) => {
1100
- const h = Zt[t], b = o === "circle" ? "50%" : Jt[t];
1107
+ }, m) => {
1108
+ const h = Jt[t], b = s === "circle" ? "50%" : Qt[t];
1101
1109
  return /* @__PURE__ */ f(
1102
1110
  "button",
1103
1111
  {
1104
- ref: x,
1112
+ ref: m,
1105
1113
  type: "button",
1106
1114
  disabled: r,
1107
1115
  onClick: d,
@@ -1109,7 +1117,7 @@ const pe = he(({
1109
1117
  width: h,
1110
1118
  height: h,
1111
1119
  flexShrink: 0,
1112
- ...a ? ea(e) : { background: e },
1120
+ ...a ? ta(e) : { background: e },
1113
1121
  border: "none",
1114
1122
  borderRadius: b,
1115
1123
  cursor: r ? "not-allowed" : d ? "pointer" : "default",
@@ -1118,10 +1126,10 @@ const pe = he(({
1118
1126
  opacity: r ? 0.4 : 1,
1119
1127
  boxShadow: n ? je : Xe,
1120
1128
  transition: "box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
1121
- ...s
1129
+ ...o
1122
1130
  },
1123
1131
  onFocus: (v) => {
1124
- r || (v.currentTarget.style.boxShadow = Qt), c == null || c(v);
1132
+ r || (v.currentTarget.style.boxShadow = ea), c == null || c(v);
1125
1133
  },
1126
1134
  onBlur: (v) => {
1127
1135
  v.currentTarget.style.boxShadow = n ? je : Xe, i == null || i(v);
@@ -1131,30 +1139,30 @@ const pe = he(({
1131
1139
  );
1132
1140
  });
1133
1141
  pe.displayName = "ColorSwatch";
1134
- function be(e, t, o) {
1135
- return Math.max(t, Math.min(o, e));
1142
+ function be(e, t, s) {
1143
+ return Math.max(t, Math.min(s, e));
1136
1144
  }
1137
- function ta(e, t, o) {
1138
- const a = t / 100, n = o / 100, r = n * a, s = r * (1 - Math.abs(e / 60 % 2 - 1)), c = n - r;
1145
+ function aa(e, t, s) {
1146
+ const a = t / 100, n = s / 100, r = n * a, o = r * (1 - Math.abs(e / 60 % 2 - 1)), c = n - r;
1139
1147
  let i = 0, d = 0, u = 0;
1140
- return e < 60 ? (i = r, d = s) : e < 120 ? (i = s, d = r) : e < 180 ? (d = r, u = s) : e < 240 ? (d = s, u = r) : e < 300 ? (i = s, u = r) : (i = r, u = s), { r: Math.round((i + c) * 255), g: Math.round((d + c) * 255), b: Math.round((u + c) * 255) };
1141
- }
1142
- function aa(e, t, o) {
1143
- const a = e / 255, n = t / 255, r = o / 255, s = Math.max(a, n, r), c = Math.min(a, n, r), i = s - c, d = s, u = s === 0 ? 0 : i / s;
1144
- let x = 0;
1145
- return i !== 0 && (s === a ? x = ((n - r) / i + (n < r ? 6 : 0)) / 6 : s === n ? x = ((r - a) / i + 2) / 6 : x = ((a - n) / i + 4) / 6), { h: Math.round(x * 360), s: Math.round(u * 100), v: Math.round(d * 100) };
1146
- }
1147
- function na(e, t, o) {
1148
- const a = e / 255, n = t / 255, r = o / 255, s = Math.max(a, n, r), c = Math.min(a, n, r), i = (s + c) / 2;
1149
- if (s === c) return { h: 0, s: 0, l: Math.round(i * 100) };
1150
- const d = s - c, u = i > 0.5 ? d / (2 - s - c) : d / (s + c);
1151
- let x = 0;
1152
- return s === a ? x = ((n - r) / d + (n < r ? 6 : 0)) / 6 : s === n ? x = ((r - a) / d + 2) / 6 : x = ((a - n) / d + 4) / 6, { h: Math.round(x * 360), s: Math.round(u * 100), l: Math.round(i * 100) };
1153
- }
1154
- function ge(e, t, o) {
1155
- const a = t / 100, n = o / 100, r = (1 - Math.abs(2 * n - 1)) * a, s = r * (1 - Math.abs(e / 60 % 2 - 1)), c = n - r / 2;
1148
+ return e < 60 ? (i = r, d = o) : e < 120 ? (i = o, d = r) : e < 180 ? (d = r, u = o) : e < 240 ? (d = o, u = r) : e < 300 ? (i = o, u = r) : (i = r, u = o), { r: Math.round((i + c) * 255), g: Math.round((d + c) * 255), b: Math.round((u + c) * 255) };
1149
+ }
1150
+ function na(e, t, s) {
1151
+ const a = e / 255, n = t / 255, r = s / 255, o = Math.max(a, n, r), c = Math.min(a, n, r), i = o - c, d = o, u = o === 0 ? 0 : i / o;
1152
+ let m = 0;
1153
+ return i !== 0 && (o === a ? m = ((n - r) / i + (n < r ? 6 : 0)) / 6 : o === n ? m = ((r - a) / i + 2) / 6 : m = ((a - n) / i + 4) / 6), { h: Math.round(m * 360), s: Math.round(u * 100), v: Math.round(d * 100) };
1154
+ }
1155
+ function ra(e, t, s) {
1156
+ const a = e / 255, n = t / 255, r = s / 255, o = Math.max(a, n, r), c = Math.min(a, n, r), i = (o + c) / 2;
1157
+ if (o === c) return { h: 0, s: 0, l: Math.round(i * 100) };
1158
+ const d = o - c, u = i > 0.5 ? d / (2 - o - c) : d / (o + c);
1159
+ let m = 0;
1160
+ return o === a ? m = ((n - r) / d + (n < r ? 6 : 0)) / 6 : o === n ? m = ((r - a) / d + 2) / 6 : m = ((a - n) / d + 4) / 6, { h: Math.round(m * 360), s: Math.round(u * 100), l: Math.round(i * 100) };
1161
+ }
1162
+ function ge(e, t, s) {
1163
+ const a = t / 100, n = s / 100, r = (1 - Math.abs(2 * n - 1)) * a, o = r * (1 - Math.abs(e / 60 % 2 - 1)), c = n - r / 2;
1156
1164
  let i = 0, d = 0, u = 0;
1157
- return e < 60 ? (i = r, d = s) : e < 120 ? (i = s, d = r) : e < 180 ? (d = r, u = s) : e < 240 ? (d = s, u = r) : e < 300 ? (i = s, u = r) : (i = r, u = s), { r: Math.round((i + c) * 255), g: Math.round((d + c) * 255), b: Math.round((u + c) * 255) };
1165
+ return e < 60 ? (i = r, d = o) : e < 120 ? (i = o, d = r) : e < 180 ? (d = r, u = o) : e < 240 ? (d = o, u = r) : e < 300 ? (i = o, u = r) : (i = r, u = o), { r: Math.round((i + c) * 255), g: Math.round((d + c) * 255), b: Math.round((u + c) * 255) };
1158
1166
  }
1159
1167
  function Fe(e) {
1160
1168
  const t = e.replace("#", "");
@@ -1169,15 +1177,15 @@ function tt(e) {
1169
1177
  a: t.length === 9 ? +(parseInt(t.slice(7, 9), 16) / 255).toFixed(2) : 1
1170
1178
  };
1171
1179
  }
1172
- function Le({ r: e, g: t, b: o, a }) {
1173
- const n = (s) => be(Math.round(s), 0, 255).toString(16).padStart(2, "0"), r = `#${n(e)}${n(t)}${n(o)}`;
1180
+ function Le({ r: e, g: t, b: s, a }) {
1181
+ const n = (o) => be(Math.round(o), 0, 255).toString(16).padStart(2, "0"), r = `#${n(e)}${n(t)}${n(s)}`;
1174
1182
  return a < 1 ? `${r}${n(Math.round(a * 255))}` : r;
1175
1183
  }
1176
- function at({ h: e, s: t, v: o, a }) {
1177
- return { ...ta(e, t, o), a };
1184
+ function at({ h: e, s: t, v: s, a }) {
1185
+ return { ...aa(e, t, s), a };
1178
1186
  }
1179
- function U({ r: e, g: t, b: o, a }) {
1180
- return { ...aa(e, t, o), a };
1187
+ function q({ r: e, g: t, b: s, a }) {
1188
+ return { ...na(e, t, s), a };
1181
1189
  }
1182
1190
  function ce(e) {
1183
1191
  return Le(at(e));
@@ -1188,19 +1196,19 @@ function ie(e) {
1188
1196
  const n = Fe(t);
1189
1197
  return /^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n) ? tt(n) : null;
1190
1198
  }
1191
- const o = t.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*([\d.]+))?\s*\)$/);
1192
- if (o) {
1193
- const n = +(o[1] ?? "0"), r = +(o[2] ?? "0"), s = +(o[3] ?? "0"), c = o[4] !== void 0 ? +o[4] : 1;
1194
- return [n, r, s].every((i) => i <= 255) && c >= 0 && c <= 1 ? { r: n, g: r, b: s, a: c } : null;
1199
+ const s = t.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*([\d.]+))?\s*\)$/);
1200
+ if (s) {
1201
+ const n = +(s[1] ?? "0"), r = +(s[2] ?? "0"), o = +(s[3] ?? "0"), c = s[4] !== void 0 ? +s[4] : 1;
1202
+ return [n, r, o].every((i) => i <= 255) && c >= 0 && c <= 1 ? { r: n, g: r, b: o, a: c } : null;
1195
1203
  }
1196
1204
  const a = t.match(/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%?\s*,\s*(\d{1,3})%?\s*\)$/);
1197
1205
  if (a) {
1198
- const n = +(a[1] ?? "0"), r = +(a[2] ?? "0"), s = +(a[3] ?? "0");
1199
- return n <= 360 && r <= 100 && s <= 100 ? { ...ge(n, r, s), a: 1 } : null;
1206
+ const n = +(a[1] ?? "0"), r = +(a[2] ?? "0"), o = +(a[3] ?? "0");
1207
+ return n <= 360 && r <= 100 && o <= 100 ? { ...ge(n, r, o), a: 1 } : null;
1200
1208
  }
1201
1209
  return null;
1202
1210
  }
1203
- const ra = [
1211
+ const sa = [
1204
1212
  {
1205
1213
  label: "Presets",
1206
1214
  colors: [
@@ -1221,21 +1229,21 @@ const ra = [
1221
1229
  "linear-gradient(45deg, transparent 75%, #c0c0c0 75%)",
1222
1230
  "linear-gradient(-45deg, transparent 75%, #c0c0c0 75%)"
1223
1231
  ].join(", ");
1224
- function Ue({ value: e, min: t, max: o, onChange: a, trackStyle: n, formatTooltip: r }) {
1225
- const s = j(null), [c, i] = F(!1), d = fe((x) => {
1226
- const h = s.current.getBoundingClientRect(), b = be((x.clientX - h.left) / h.width, 0, 1);
1227
- a(t + b * (o - t));
1228
- }, [t, o, a]), u = (e - t) / (o - t) * 100;
1232
+ function Ue({ value: e, min: t, max: s, onChange: a, trackStyle: n, formatTooltip: r }) {
1233
+ const o = U(null), [c, i] = F(!1), d = fe((m) => {
1234
+ const h = o.current.getBoundingClientRect(), b = be((m.clientX - h.left) / h.width, 0, 1);
1235
+ a(t + b * (s - t));
1236
+ }, [t, s, a]), u = (e - t) / (s - t) * 100;
1229
1237
  return /* @__PURE__ */ f(
1230
1238
  "div",
1231
1239
  {
1232
- ref: s,
1240
+ ref: o,
1233
1241
  style: { position: "relative", height: 12, borderRadius: 6, cursor: "crosshair", userSelect: "none", ...n },
1234
- onPointerDown: (x) => {
1235
- x.currentTarget.setPointerCapture(x.pointerId), i(!0), d(x);
1242
+ onPointerDown: (m) => {
1243
+ m.currentTarget.setPointerCapture(m.pointerId), i(!0), d(m);
1236
1244
  },
1237
- onPointerMove: (x) => {
1238
- x.buttons > 0 && d(x);
1245
+ onPointerMove: (m) => {
1246
+ m.buttons > 0 && d(m);
1239
1247
  },
1240
1248
  onPointerUp: () => i(!1),
1241
1249
  onPointerCancel: () => i(!1),
@@ -1277,68 +1285,68 @@ function Ue({ value: e, min: t, max: o, onChange: a, trackStyle: n, formatToolti
1277
1285
  }
1278
1286
  );
1279
1287
  }
1280
- function sa() {
1288
+ function la() {
1281
1289
  return /* @__PURE__ */ T("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, children: [
1282
1290
  /* @__PURE__ */ f("path", { d: "M2 22l1-1h3l9-9" }),
1283
1291
  /* @__PURE__ */ f("path", { d: "M3 21v-3l9-9" }),
1284
1292
  /* @__PURE__ */ f("path", { d: "M15 6l3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
1285
1293
  ] });
1286
1294
  }
1287
- function la({
1295
+ function ca({
1288
1296
  value: e,
1289
1297
  onChange: t,
1290
- label: o,
1298
+ label: s,
1291
1299
  size: a = "md",
1292
1300
  inline: n = !1,
1293
1301
  disabled: r = !1,
1294
- presetGroups: s = ra,
1302
+ presetGroups: o = sa,
1295
1303
  portalContainer: c,
1296
1304
  id: i,
1297
1305
  style: d
1298
1306
  }) {
1299
1307
  var w, L;
1300
- const u = a === "sm" ? 24 : 40, x = Ze(), h = i ?? x, [b, v] = F(!1), [B, I] = F("hex"), [k, p] = F(0), [m, S] = F(() => {
1308
+ const u = a === "sm" ? 24 : 40, m = Ze(), h = i ?? m, [b, v] = F(!1), [B, I] = F("hex"), [S, p] = F(0), [x, D] = F(() => {
1301
1309
  const l = e ? ie(e) ?? { r: 0, g: 0, b: 0, a: 1 } : { r: 0, g: 0, b: 0, a: 1 };
1302
- return U(l);
1303
- }), [$, C] = F(() => ce(m).slice(1).toUpperCase()), O = j(null), N = j(null), D = j(null), [R, V] = F({ top: 0, left: 0 });
1310
+ return q(l);
1311
+ }), [$, E] = F(() => ce(x).slice(1).toUpperCase()), A = U(null), H = U(null), N = U(null), [k, R] = F({ top: 0, left: 0 });
1304
1312
  ve(() => {
1305
- if (!b || !O.current) return;
1306
- const l = O.current.getBoundingClientRect();
1313
+ if (!b || !A.current) return;
1314
+ const l = A.current.getBoundingClientRect();
1307
1315
  let g = l.left;
1308
1316
  const y = l.bottom + 8;
1309
- if (D.current) {
1310
- const M = D.current.offsetWidth;
1317
+ if (N.current) {
1318
+ const M = N.current.offsetWidth;
1311
1319
  g + M > window.innerWidth && (g = l.right - M);
1312
1320
  }
1313
- V({ top: y, left: g });
1321
+ R({ top: y, left: g });
1314
1322
  }, [b]), re(() => {
1315
1323
  if (!e) return;
1316
1324
  const l = ie(e);
1317
- l && (S(U(l)), C(Le(l).slice(1).toUpperCase()));
1325
+ l && (D(q(l)), E(Le(l).slice(1).toUpperCase()));
1318
1326
  }, [e]), re(() => {
1319
1327
  if (!b) return;
1320
1328
  const l = (g) => {
1321
- var M, A;
1329
+ var M, X;
1322
1330
  const y = g.target;
1323
- (M = O.current) != null && M.contains(y) || (A = D.current) != null && A.contains(y) || v(!1);
1331
+ (M = A.current) != null && M.contains(y) || (X = N.current) != null && X.contains(y) || v(!1);
1324
1332
  };
1325
1333
  return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
1326
1334
  }, [b]);
1327
1335
  const P = fe((l) => {
1328
- S(l);
1336
+ D(l);
1329
1337
  const g = ce(l);
1330
- C(g.slice(1).toUpperCase()), t == null || t(g);
1331
- }, [t]), E = fe((l) => {
1332
- const g = N.current.getBoundingClientRect(), y = Math.round(be((l.clientX - g.left) / g.width, 0, 1) * 100), M = Math.round((1 - be((l.clientY - g.top) / g.height, 0, 1)) * 100);
1333
- P({ ...m, s: y, v: M });
1334
- }, [m, P]), q = fe(async () => {
1338
+ E(g.slice(1).toUpperCase()), t == null || t(g);
1339
+ }, [t]), O = fe((l) => {
1340
+ const g = H.current.getBoundingClientRect(), y = Math.round(be((l.clientX - g.left) / g.width, 0, 1) * 100), M = Math.round((1 - be((l.clientY - g.top) / g.height, 0, 1)) * 100);
1341
+ P({ ...x, s: y, v: M });
1342
+ }, [x, P]), G = fe(async () => {
1335
1343
  if ("EyeDropper" in window)
1336
1344
  try {
1337
1345
  const l = await new window.EyeDropper().open(), g = ie(l.sRGBHex);
1338
- g && P(U(g));
1346
+ g && P(q(g));
1339
1347
  } catch {
1340
1348
  }
1341
- }, [P]), H = at(m), X = na(H.r, H.g, H.b), ae = ce(m), le = ce({ ...m, a: 1 }), K = Math.round(m.a * 100), ze = [
1349
+ }, [P]), W = at(x), j = ra(W.r, W.g, W.b), ae = ce(x), le = ce({ ...x, a: 1 }), K = Math.round(x.a * 100), ze = [
1342
1350
  { id: "hex", label: "Hex" },
1343
1351
  { id: "rgb", label: "RGB" },
1344
1352
  { id: "hsl", label: "HSL" },
@@ -1347,7 +1355,7 @@ function la({
1347
1355
  return /* @__PURE__ */ T(
1348
1356
  "div",
1349
1357
  {
1350
- ref: O,
1358
+ ref: A,
1351
1359
  style: { display: "inline-flex", flexDirection: n ? "row" : "column", alignItems: n ? "center" : void 0, gap: "var(--lucent-space-1)", position: "relative", ...d },
1352
1360
  children: [
1353
1361
  /* @__PURE__ */ f("style", { children: `
@@ -1355,7 +1363,7 @@ function la({
1355
1363
  .lucent-cp-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
1356
1364
  .lucent-cp-field { -moz-appearance: textfield; }
1357
1365
  ` }),
1358
- o && !n && /* @__PURE__ */ f(
1366
+ s && !n && /* @__PURE__ */ f(
1359
1367
  "label",
1360
1368
  {
1361
1369
  htmlFor: `${h}-swatch`,
@@ -1365,14 +1373,14 @@ function la({
1365
1373
  color: r ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
1366
1374
  fontFamily: "var(--lucent-font-family-base)"
1367
1375
  },
1368
- children: o
1376
+ children: s
1369
1377
  }
1370
1378
  ),
1371
1379
  /* @__PURE__ */ f(
1372
1380
  pe,
1373
1381
  {
1374
1382
  id: `${h}-swatch`,
1375
- color: `rgba(${H.r},${H.g},${H.b},${m.a})`,
1383
+ color: `rgba(${W.r},${W.g},${W.b},${x.a})`,
1376
1384
  shape: "square",
1377
1385
  showCheckerboard: !0,
1378
1386
  disabled: r,
@@ -1387,7 +1395,7 @@ function la({
1387
1395
  }
1388
1396
  }
1389
1397
  ),
1390
- o && n && /* @__PURE__ */ f(
1398
+ s && n && /* @__PURE__ */ f(
1391
1399
  "label",
1392
1400
  {
1393
1401
  htmlFor: `${h}-swatch`,
@@ -1398,20 +1406,20 @@ function la({
1398
1406
  fontFamily: "var(--lucent-font-family-base)",
1399
1407
  cursor: "pointer"
1400
1408
  },
1401
- children: o
1409
+ children: s
1402
1410
  }
1403
1411
  ),
1404
1412
  b && kt(
1405
1413
  /* @__PURE__ */ T(
1406
1414
  "div",
1407
1415
  {
1408
- ref: D,
1416
+ ref: N,
1409
1417
  role: "dialog",
1410
1418
  "aria-label": "Color picker",
1411
1419
  style: {
1412
1420
  position: "fixed",
1413
- top: R.top,
1414
- left: R.left,
1421
+ top: k.top,
1422
+ left: k.left,
1415
1423
  zIndex: 999999,
1416
1424
  background: "color-mix(in srgb, var(--lucent-surface-overlay) 85%, transparent)",
1417
1425
  backdropFilter: "blur(6px)",
@@ -1428,28 +1436,28 @@ function la({
1428
1436
  /* @__PURE__ */ T(
1429
1437
  "div",
1430
1438
  {
1431
- ref: N,
1439
+ ref: H,
1432
1440
  style: {
1433
1441
  position: "relative",
1434
1442
  height: 160,
1435
- background: `hsl(${m.h}, 100%, 50%)`,
1443
+ background: `hsl(${x.h}, 100%, 50%)`,
1436
1444
  cursor: "crosshair",
1437
1445
  userSelect: "none",
1438
1446
  flexShrink: 0
1439
1447
  },
1440
1448
  onPointerDown: (l) => {
1441
- l.currentTarget.setPointerCapture(l.pointerId), E(l);
1449
+ l.currentTarget.setPointerCapture(l.pointerId), O(l);
1442
1450
  },
1443
1451
  onPointerMove: (l) => {
1444
- l.buttons > 0 && E(l);
1452
+ l.buttons > 0 && O(l);
1445
1453
  },
1446
1454
  children: [
1447
1455
  /* @__PURE__ */ f("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to right, #fff, transparent)" } }),
1448
1456
  /* @__PURE__ */ f("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to bottom, transparent, #000)" } }),
1449
1457
  /* @__PURE__ */ f("div", { style: {
1450
1458
  position: "absolute",
1451
- left: `${m.s}%`,
1452
- top: `${100 - m.v}%`,
1459
+ left: `${x.s}%`,
1460
+ top: `${100 - x.v}%`,
1453
1461
  transform: "translate(-50%, -50%)",
1454
1462
  width: 14,
1455
1463
  height: 14,
@@ -1466,7 +1474,7 @@ function la({
1466
1474
  /* @__PURE__ */ f(
1467
1475
  pe,
1468
1476
  {
1469
- color: `rgba(${H.r},${H.g},${H.b},${m.a})`,
1477
+ color: `rgba(${W.r},${W.g},${W.b},${x.a})`,
1470
1478
  shape: "square",
1471
1479
  showCheckerboard: !0,
1472
1480
  style: { width: 44, height: 44, borderRadius: 8 }
@@ -1476,10 +1484,10 @@ function la({
1476
1484
  /* @__PURE__ */ f(
1477
1485
  Ue,
1478
1486
  {
1479
- value: m.h,
1487
+ value: x.h,
1480
1488
  min: 0,
1481
1489
  max: 360,
1482
- onChange: (l) => P({ ...m, h: Math.round(l) }),
1490
+ onChange: (l) => P({ ...x, h: Math.round(l) }),
1483
1491
  trackStyle: { background: "linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)" },
1484
1492
  formatTooltip: (l) => `${Math.round(l)}°`
1485
1493
  }
@@ -1497,10 +1505,10 @@ function la({
1497
1505
  /* @__PURE__ */ f(
1498
1506
  Ue,
1499
1507
  {
1500
- value: m.a,
1508
+ value: x.a,
1501
1509
  min: 0,
1502
1510
  max: 1,
1503
- onChange: (l) => P({ ...m, a: Math.round(l * 100) / 100 }),
1511
+ onChange: (l) => P({ ...x, a: Math.round(l * 100) / 100 }),
1504
1512
  trackStyle: { background: "transparent", position: "relative", zIndex: 1 },
1505
1513
  formatTooltip: (l) => `${Math.round(l * 100)}%`
1506
1514
  }
@@ -1523,10 +1531,10 @@ function la({
1523
1531
  {
1524
1532
  variant: "secondary",
1525
1533
  size: "sm",
1526
- onClick: q,
1534
+ onClick: G,
1527
1535
  disabled: !ne,
1528
1536
  title: ne ? "Pick color from screen" : "Not supported in this browser",
1529
- leftIcon: /* @__PURE__ */ f(sa, {}),
1537
+ leftIcon: /* @__PURE__ */ f(la, {}),
1530
1538
  style: { flexShrink: 0, paddingLeft: 8, paddingRight: 8 }
1531
1539
  }
1532
1540
  ),
@@ -1538,11 +1546,11 @@ function la({
1538
1546
  value: $,
1539
1547
  onChange: (l) => {
1540
1548
  const g = l.target.value.replace(/[^0-9a-fA-F]/g, "");
1541
- if (C(g.toUpperCase()), /^[0-9a-f]{6}$/i.test(g) || /^[0-9a-f]{8}$/i.test(g)) {
1549
+ if (E(g.toUpperCase()), /^[0-9a-f]{6}$/i.test(g) || /^[0-9a-f]{8}$/i.test(g)) {
1542
1550
  const y = ie(`#${g}`);
1543
1551
  if (y) {
1544
- const M = U(y);
1545
- S(M), t == null || t(Le(y));
1552
+ const M = q(y);
1553
+ D(M), t == null || t(Le(y));
1546
1554
  }
1547
1555
  }
1548
1556
  },
@@ -1563,7 +1571,7 @@ function la({
1563
1571
  max: 100,
1564
1572
  onChange: (l) => {
1565
1573
  const g = +l.target.value;
1566
- !isNaN(g) && g >= 0 && g <= 100 && P({ ...m, a: g / 100 });
1574
+ !isNaN(g) && g >= 0 && g <= 100 && P({ ...x, a: g / 100 });
1567
1575
  },
1568
1576
  className: "lucent-cp-field",
1569
1577
  style: { width: 68, flexShrink: 0 }
@@ -1571,65 +1579,65 @@ function la({
1571
1579
  )
1572
1580
  ] }),
1573
1581
  B === "rgb" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
1574
- { label: "R", val: H.r, max: 255, fn: (l) => P(U({ ...H, r: l })) },
1575
- { label: "G", val: H.g, max: 255, fn: (l) => P(U({ ...H, g: l })) },
1576
- { label: "B", val: H.b, max: 255, fn: (l) => P(U({ ...H, b: l })) },
1577
- { label: "A", val: K, max: 100, fn: (l) => P({ ...m, a: l / 100 }) }
1578
- ].map(({ label: l, val: g, max: y, fn: M }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: g, min: 0, max: y, onChange: (A) => {
1579
- const W = +A.target.value;
1580
- !isNaN(W) && W >= 0 && W <= y && M(W);
1582
+ { label: "R", val: W.r, max: 255, fn: (l) => P(q({ ...W, r: l })) },
1583
+ { label: "G", val: W.g, max: 255, fn: (l) => P(q({ ...W, g: l })) },
1584
+ { label: "B", val: W.b, max: 255, fn: (l) => P(q({ ...W, b: l })) },
1585
+ { label: "A", val: K, max: 100, fn: (l) => P({ ...x, a: l / 100 }) }
1586
+ ].map(({ label: l, val: g, max: y, fn: M }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: g, min: 0, max: y, onChange: (X) => {
1587
+ const C = +X.target.value;
1588
+ !isNaN(C) && C >= 0 && C <= y && M(C);
1581
1589
  }, className: "lucent-cp-field", style: { flex: 1 } }, l)) }),
1582
1590
  B === "hsl" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
1583
- { label: "H", val: X.h, max: 360, fn: (l) => {
1584
- const { r: g, g: y, b: M } = ge(l, X.s, X.l);
1585
- P(U({ r: g, g: y, b: M, a: m.a }));
1591
+ { label: "H", val: j.h, max: 360, fn: (l) => {
1592
+ const { r: g, g: y, b: M } = ge(l, j.s, j.l);
1593
+ P(q({ r: g, g: y, b: M, a: x.a }));
1586
1594
  } },
1587
- { label: "S", val: X.s, max: 100, fn: (l) => {
1588
- const { r: g, g: y, b: M } = ge(X.h, l, X.l);
1589
- P(U({ r: g, g: y, b: M, a: m.a }));
1595
+ { label: "S", val: j.s, max: 100, fn: (l) => {
1596
+ const { r: g, g: y, b: M } = ge(j.h, l, j.l);
1597
+ P(q({ r: g, g: y, b: M, a: x.a }));
1590
1598
  } },
1591
- { label: "L", val: X.l, max: 100, fn: (l) => {
1592
- const { r: g, g: y, b: M } = ge(X.h, X.s, l);
1593
- P(U({ r: g, g: y, b: M, a: m.a }));
1599
+ { label: "L", val: j.l, max: 100, fn: (l) => {
1600
+ const { r: g, g: y, b: M } = ge(j.h, j.s, l);
1601
+ P(q({ r: g, g: y, b: M, a: x.a }));
1594
1602
  } },
1595
- { label: "A", val: K, max: 100, fn: (l) => P({ ...m, a: l / 100 }) }
1596
- ].map(({ label: l, val: g, max: y, fn: M }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: g, min: 0, max: y, onChange: (A) => {
1597
- const W = +A.target.value;
1598
- !isNaN(W) && W >= 0 && W <= y && M(W);
1603
+ { label: "A", val: K, max: 100, fn: (l) => P({ ...x, a: l / 100 }) }
1604
+ ].map(({ label: l, val: g, max: y, fn: M }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: g, min: 0, max: y, onChange: (X) => {
1605
+ const C = +X.target.value;
1606
+ !isNaN(C) && C >= 0 && C <= y && M(C);
1599
1607
  }, className: "lucent-cp-field", style: { flex: 1 } }, l)) }),
1600
1608
  B === "hsb" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
1601
- { label: "H", val: m.h, max: 360, fn: (l) => P({ ...m, h: l }) },
1602
- { label: "S", val: m.s, max: 100, fn: (l) => P({ ...m, s: l }) },
1603
- { label: "B", val: m.v, max: 100, fn: (l) => P({ ...m, v: l }) },
1604
- { label: "A", val: K, max: 100, fn: (l) => P({ ...m, a: l / 100 }) }
1605
- ].map(({ label: l, val: g, max: y, fn: M }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: g, min: 0, max: y, onChange: (A) => {
1606
- const W = +A.target.value;
1607
- !isNaN(W) && W >= 0 && W <= y && M(W);
1609
+ { label: "H", val: x.h, max: 360, fn: (l) => P({ ...x, h: l }) },
1610
+ { label: "S", val: x.s, max: 100, fn: (l) => P({ ...x, s: l }) },
1611
+ { label: "B", val: x.v, max: 100, fn: (l) => P({ ...x, v: l }) },
1612
+ { label: "A", val: K, max: 100, fn: (l) => P({ ...x, a: l / 100 }) }
1613
+ ].map(({ label: l, val: g, max: y, fn: M }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: g, min: 0, max: y, onChange: (X) => {
1614
+ const C = +X.target.value;
1615
+ !isNaN(C) && C >= 0 && C <= y && M(C);
1608
1616
  }, className: "lucent-cp-field", style: { flex: 1 } }, l)) }),
1609
- s.length > 0 && /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1610
- s.length > 1 && /* @__PURE__ */ f(
1617
+ o.length > 0 && /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1618
+ o.length > 1 && /* @__PURE__ */ f(
1611
1619
  Qe,
1612
1620
  {
1613
1621
  size: "sm",
1614
- value: String(k),
1622
+ value: String(S),
1615
1623
  onChange: (l) => p(Number(l.target.value)),
1616
- options: s.map((l, g) => ({ value: String(g), label: l.label }))
1624
+ options: o.map((l, g) => ({ value: String(g), label: l.label }))
1617
1625
  }
1618
1626
  ),
1619
- s.length === 1 && /* @__PURE__ */ f("span", { style: {
1627
+ o.length === 1 && /* @__PURE__ */ f("span", { style: {
1620
1628
  fontSize: "var(--lucent-font-size-xs)",
1621
1629
  fontWeight: "var(--lucent-font-weight-medium)",
1622
1630
  color: "var(--lucent-text-secondary)",
1623
1631
  fontFamily: "var(--lucent-font-family-base)"
1624
- }, children: (w = s[0]) == null ? void 0 : w.label }),
1625
- /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((L = s[k]) == null ? void 0 : L.colors) ?? []).map((l) => {
1632
+ }, children: (w = o[0]) == null ? void 0 : w.label }),
1633
+ /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((L = o[S]) == null ? void 0 : L.colors) ?? []).map((l) => {
1626
1634
  const g = Fe(l).toLowerCase() === ae.slice(0, 7).toLowerCase();
1627
1635
  return /* @__PURE__ */ f(
1628
1636
  pe,
1629
1637
  {
1630
1638
  color: l,
1631
1639
  selected: g,
1632
- onClick: () => P(U(tt(l)))
1640
+ onClick: () => P(q(tt(l)))
1633
1641
  },
1634
1642
  l
1635
1643
  );
@@ -1645,8 +1653,8 @@ function la({
1645
1653
  }
1646
1654
  );
1647
1655
  }
1648
- la.displayName = "ColorPicker";
1649
- const ca = {
1656
+ ca.displayName = "ColorPicker";
1657
+ const ia = {
1650
1658
  sm: {
1651
1659
  fontSize: "var(--lucent-font-size-sm)",
1652
1660
  buttonPadding: "var(--lucent-space-1) var(--lucent-space-1)",
@@ -1664,16 +1672,16 @@ const ca = {
1664
1672
  dropdownPadding: "var(--lucent-space-2) var(--lucent-space-4)"
1665
1673
  }
1666
1674
  };
1667
- function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "underline", size: r = "md", style: s }) {
1675
+ function mn({ tabs: e, defaultValue: t, value: s, onChange: a, variant: n = "underline", size: r = "md", style: o }) {
1668
1676
  var ne;
1669
- const c = o !== void 0, [i, d] = F(t ?? ((ne = e[0]) == null ? void 0 : ne.value) ?? ""), u = c ? o : i, [x, h] = F(null), b = j([]), [v, B] = F(null), I = j(!1), k = n === "pills", p = ca[r], m = j(null), S = j(null), $ = j(null), [C, O] = F(e.length), [N, D] = F(!1), [R, V] = F(!1), [P, E] = F(null), q = e.slice(0, C), H = e.slice(C), X = H.length > 0, ae = H.some((w) => w.value === u), le = () => {
1677
+ const c = s !== void 0, [i, d] = F(t ?? ((ne = e[0]) == null ? void 0 : ne.value) ?? ""), u = c ? s : i, [m, h] = F(null), b = U([]), [v, B] = F(null), I = U(!1), S = n === "pills", p = ia[r], x = U(null), D = U(null), $ = U(null), [E, A] = F(e.length), [H, N] = F(!1), [k, R] = F(!1), [P, O] = F(null), G = e.slice(0, E), W = e.slice(E), j = W.length > 0, ae = W.some((w) => w.value === u), le = () => {
1670
1678
  if (ae) {
1671
1679
  B(null);
1672
1680
  return;
1673
1681
  }
1674
- const w = e.findIndex((l, g) => g < C && l.value === u), L = b.current[w];
1682
+ const w = e.findIndex((l, g) => g < E && l.value === u), L = b.current[w];
1675
1683
  if (L) {
1676
- if (k) {
1684
+ if (S) {
1677
1685
  const l = L.querySelector("span");
1678
1686
  if (!l) return;
1679
1687
  B({ left: l.offsetLeft + L.offsetLeft, width: l.offsetWidth, animate: I.current });
@@ -1684,12 +1692,12 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1684
1692
  };
1685
1693
  ve(() => {
1686
1694
  le(), document.fonts.ready.then(le);
1687
- }, [u, C, k]), re(() => {
1688
- const w = m.current;
1695
+ }, [u, E, S]), re(() => {
1696
+ const w = x.current;
1689
1697
  if (!w) return;
1690
1698
  const L = () => {
1691
- const M = w.clientWidth, A = 70;
1692
- let W = 0, Y = 0;
1699
+ const M = w.clientWidth, X = 70;
1700
+ let C = 0, Y = 0;
1693
1701
  for (let Z = 0; Z < e.length; Z++) {
1694
1702
  const J = b.current[Z];
1695
1703
  if (!J) {
@@ -1698,9 +1706,9 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1698
1706
  }
1699
1707
  const Q = J.offsetWidth;
1700
1708
  if (Z < e.length - 1) {
1701
- if (W + Q + A > M) break;
1702
- } else if (W + Q > M) break;
1703
- W += Q, Y++;
1709
+ if (C + Q + X > M) break;
1710
+ } else if (C + Q > M) break;
1711
+ C += Q, Y++;
1704
1712
  }
1705
1713
  if (Y >= e.length - 1 && Y < e.length) {
1706
1714
  let Z = 0;
@@ -1710,7 +1718,7 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1710
1718
  }
1711
1719
  Z <= M && (Y = e.length);
1712
1720
  }
1713
- O(Y < 1 ? 1 : Y);
1721
+ A(Y < 1 ? 1 : Y);
1714
1722
  };
1715
1723
  let l;
1716
1724
  (() => {
@@ -1723,31 +1731,31 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1723
1731
  y.disconnect(), cancelAnimationFrame(l);
1724
1732
  };
1725
1733
  }, [e]), re(() => {
1726
- if (!N) return;
1734
+ if (!H) return;
1727
1735
  const w = (L) => {
1728
- $.current && !$.current.contains(L.target) && S.current && !S.current.contains(L.target) && (D(!1), E(null));
1736
+ $.current && !$.current.contains(L.target) && D.current && !D.current.contains(L.target) && (N(!1), O(null));
1729
1737
  };
1730
1738
  return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
1731
- }, [N]);
1739
+ }, [H]);
1732
1740
  const K = (w) => {
1733
1741
  c || d(w), a == null || a(w);
1734
1742
  }, ze = (w, L) => {
1735
1743
  var M;
1736
- const l = q.map((A, W) => A.disabled ? -1 : W).filter((A) => A !== -1), g = l.indexOf(L);
1744
+ const l = G.map((X, C) => X.disabled ? -1 : C).filter((X) => X !== -1), g = l.indexOf(L);
1737
1745
  let y = -1;
1738
- w.key === "ArrowRight" && (y = l[(g + 1) % l.length] ?? -1), w.key === "ArrowLeft" && (y = l[(g - 1 + l.length) % l.length] ?? -1), w.key === "Home" && (y = l[0] ?? -1), w.key === "End" && (y = l[l.length - 1] ?? -1), y !== -1 && (w.preventDefault(), (M = b.current[y]) == null || M.focus(), K(q[y].value));
1746
+ w.key === "ArrowRight" && (y = l[(g + 1) % l.length] ?? -1), w.key === "ArrowLeft" && (y = l[(g - 1 + l.length) % l.length] ?? -1), w.key === "Home" && (y = l[0] ?? -1), w.key === "End" && (y = l[l.length - 1] ?? -1), y !== -1 && (w.preventDefault(), (M = b.current[y]) == null || M.focus(), K(G[y].value));
1739
1747
  };
1740
- return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...s }, children: [
1748
+ return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...o }, children: [
1741
1749
  /* @__PURE__ */ T(
1742
1750
  "div",
1743
1751
  {
1744
- ref: m,
1752
+ ref: x,
1745
1753
  role: "tablist",
1746
1754
  style: {
1747
1755
  position: "relative",
1748
1756
  display: "flex",
1749
1757
  overflow: "hidden",
1750
- ...k ? {
1758
+ ...S ? {
1751
1759
  padding: "var(--lucent-space-1)"
1752
1760
  } : {
1753
1761
  borderBottom: "1px solid var(--lucent-border-default)"
@@ -1755,7 +1763,7 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1755
1763
  },
1756
1764
  children: [
1757
1765
  e.map((w, L) => {
1758
- const l = L < C, g = w.value === u, y = w.disabled ?? !1;
1766
+ const l = L < E, g = w.value === u, y = w.disabled ?? !1;
1759
1767
  return /* @__PURE__ */ T(
1760
1768
  "button",
1761
1769
  {
@@ -1777,14 +1785,14 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1777
1785
  },
1778
1786
  onMouseLeave: () => h(null),
1779
1787
  style: {
1780
- padding: k ? p.buttonPadding : p.buttonPaddingUnderline,
1788
+ padding: S ? p.buttonPadding : p.buttonPaddingUnderline,
1781
1789
  background: "none",
1782
1790
  border: "none",
1783
1791
  cursor: y ? "not-allowed" : "pointer",
1784
1792
  fontFamily: "var(--lucent-font-family-base)",
1785
1793
  fontSize: p.fontSize,
1786
1794
  fontWeight: g ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1787
- color: y ? "var(--lucent-text-disabled)" : k && g ? "var(--lucent-accent-fg)" : g ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1795
+ color: y ? "var(--lucent-text-disabled)" : S && g ? "var(--lucent-accent-fg)" : g ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1788
1796
  transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
1789
1797
  whiteSpace: "nowrap",
1790
1798
  outline: "none",
@@ -1798,10 +1806,10 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1798
1806
  display: "block",
1799
1807
  padding: p.innerPadding,
1800
1808
  borderRadius: "var(--lucent-radius-md)",
1801
- background: !k && x === L && !g && !y ? "var(--lucent-surface-secondary)" : "transparent",
1809
+ background: !S && m === L && !g && !y ? "var(--lucent-surface-secondary)" : "transparent",
1802
1810
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
1803
1811
  }, children: w.label }),
1804
- k && x === L && !g && !y && l && /* @__PURE__ */ f(
1812
+ S && m === L && !g && !y && l && /* @__PURE__ */ f(
1805
1813
  "span",
1806
1814
  {
1807
1815
  "aria-hidden": !0,
@@ -1823,15 +1831,15 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1823
1831
  w.value
1824
1832
  );
1825
1833
  }),
1826
- X && /* @__PURE__ */ f(
1834
+ j && /* @__PURE__ */ f(
1827
1835
  "button",
1828
1836
  {
1829
- ref: S,
1830
- onClick: () => D((w) => !w),
1831
- onMouseEnter: () => V(!0),
1832
- onMouseLeave: () => V(!1),
1837
+ ref: D,
1838
+ onClick: () => N((w) => !w),
1839
+ onMouseEnter: () => R(!0),
1840
+ onMouseLeave: () => R(!1),
1833
1841
  style: {
1834
- padding: k ? p.buttonPadding : p.buttonPaddingUnderline,
1842
+ padding: S ? p.buttonPadding : p.buttonPaddingUnderline,
1835
1843
  background: "none",
1836
1844
  border: "none",
1837
1845
  cursor: "pointer",
@@ -1848,7 +1856,7 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1848
1856
  display: "block",
1849
1857
  padding: p.innerPadding,
1850
1858
  borderRadius: "var(--lucent-radius-md)",
1851
- background: R ? "var(--lucent-surface-secondary)" : "transparent",
1859
+ background: k ? "var(--lucent-surface-secondary)" : "transparent",
1852
1860
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
1853
1861
  }, children: "More…" })
1854
1862
  }
@@ -1857,7 +1865,7 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1857
1865
  "span",
1858
1866
  {
1859
1867
  "aria-hidden": !0,
1860
- style: k ? {
1868
+ style: S ? {
1861
1869
  position: "absolute",
1862
1870
  top: "var(--lucent-space-1)",
1863
1871
  bottom: "var(--lucent-space-1)",
@@ -1881,7 +1889,7 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1881
1889
  ]
1882
1890
  }
1883
1891
  ),
1884
- X && N && /* @__PURE__ */ f(
1892
+ j && H && /* @__PURE__ */ f(
1885
1893
  "div",
1886
1894
  {
1887
1895
  ref: $,
@@ -1898,19 +1906,19 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1898
1906
  padding: "var(--lucent-space-1) 0",
1899
1907
  minWidth: 140
1900
1908
  },
1901
- children: H.map((w, L) => {
1909
+ children: W.map((w, L) => {
1902
1910
  const l = w.value === u, g = w.disabled ?? !1, y = P === L;
1903
1911
  return /* @__PURE__ */ f(
1904
1912
  "button",
1905
1913
  {
1906
1914
  disabled: g,
1907
1915
  onClick: () => {
1908
- g || (K(w.value), D(!1));
1916
+ g || (K(w.value), N(!1));
1909
1917
  },
1910
1918
  onMouseEnter: () => {
1911
- g || E(L);
1919
+ g || O(L);
1912
1920
  },
1913
- onMouseLeave: () => E(null),
1921
+ onMouseLeave: () => O(null),
1914
1922
  style: {
1915
1923
  display: "block",
1916
1924
  width: "100%",
@@ -1948,7 +1956,7 @@ function gn({ tabs: e, defaultValue: t, value: o, onChange: a, variant: n = "und
1948
1956
  ))
1949
1957
  ] });
1950
1958
  }
1951
- const ia = {
1959
+ const ua = {
1952
1960
  fontFamilyBase: '"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
1953
1961
  fontFamilyMono: '"DM Mono", "Fira Code", "Cascadia Code", monospace',
1954
1962
  fontFamilyDisplay: '"Georama", "DM Sans", sans-serif',
@@ -1969,7 +1977,7 @@ const ia = {
1969
1977
  letterSpacingTight: "-0.02em",
1970
1978
  letterSpacingBase: "0em",
1971
1979
  letterSpacingWide: "0.04em"
1972
- }, ua = {
1980
+ }, da = {
1973
1981
  space0: "0px",
1974
1982
  space1: "0.25rem",
1975
1983
  space2: "0.5rem",
@@ -1983,38 +1991,38 @@ const ia = {
1983
1991
  space16: "4rem",
1984
1992
  space20: "5rem",
1985
1993
  space24: "6rem"
1986
- }, da = {
1994
+ }, fa = {
1987
1995
  radiusNone: "0px",
1988
1996
  radiusSm: "0.25rem",
1989
1997
  radiusMd: "0.375rem",
1990
1998
  radiusLg: "0.5rem",
1991
1999
  radiusXl: "0.75rem",
1992
2000
  radiusFull: "9999px"
1993
- }, fa = {
2001
+ }, pa = {
1994
2002
  durationFast: "100ms",
1995
2003
  durationBase: "200ms",
1996
2004
  durationSlow: "350ms",
1997
2005
  easingDefault: "cubic-bezier(0.4, 0, 0.2, 1)",
1998
2006
  easingEmphasized: "cubic-bezier(0.2, 0, 0, 1)",
1999
2007
  easingDecelerate: "cubic-bezier(0, 0, 0.2, 1)"
2000
- }, pa = {
2008
+ }, ga = {
2001
2009
  shadowNone: "none",
2002
2010
  shadowSm: "0 1px 2px rgb(0 0 0 / 0.12)",
2003
2011
  shadowMd: "0 2px 4px rgb(0 0 0 / 0.18)",
2004
2012
  shadowLg: "0 3px 8px rgb(0 0 0 / 0.18)",
2005
2013
  shadowXl: "0 5px 14px rgb(0 0 0 / 0.2)"
2006
- }, ga = {
2014
+ }, ba = {
2007
2015
  shadowNone: "none",
2008
2016
  shadowSm: "inset 0 1px 0 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.4)",
2009
2017
  shadowMd: "inset 0 1px 0 0 rgba(255, 255, 255, 0.06), 0 1px 4px rgba(0, 0, 0, 0.45)",
2010
2018
  shadowLg: "inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.45)",
2011
2019
  shadowXl: "inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 4px 14px rgba(0, 0, 0, 0.5)"
2012
2020
  }, ye = {
2013
- ...ia,
2014
2021
  ...ua,
2015
2022
  ...da,
2016
2023
  ...fa,
2017
2024
  ...pa,
2025
+ ...ga,
2018
2026
  // Navigation — chrome/shell (sidebar, header, footer)
2019
2027
  navigation: "#f4f6f8",
2020
2028
  // Backgrounds — main content area
@@ -2058,95 +2066,95 @@ const ia = {
2058
2066
  infoSubtle: "#eff6ff",
2059
2067
  infoText: "#1d4ed8"
2060
2068
  };
2061
- function ba(e) {
2062
- const t = parseInt(e.slice(1, 3), 16), o = parseInt(e.slice(3, 5), 16), a = parseInt(e.slice(5, 7), 16);
2063
- return { r: t, g: o, b: a };
2069
+ function ma(e) {
2070
+ const t = parseInt(e.slice(1, 3), 16), s = parseInt(e.slice(3, 5), 16), a = parseInt(e.slice(5, 7), 16);
2071
+ return { r: t, g: s, b: a };
2064
2072
  }
2065
- function xa({ r: e, g: t, b: o }) {
2073
+ function xa({ r: e, g: t, b: s }) {
2066
2074
  const a = (n) => n.toString(16).padStart(2, "0");
2067
- return `#${a(e)}${a(t)}${a(o)}`;
2075
+ return `#${a(e)}${a(t)}${a(s)}`;
2068
2076
  }
2069
2077
  function _(e) {
2070
- const { r: t, g: o, b: a } = ba(e), n = t / 255, r = o / 255, s = a / 255, c = Math.max(n, r, s), i = Math.min(n, r, s);
2078
+ const { r: t, g: s, b: a } = ma(e), n = t / 255, r = s / 255, o = a / 255, c = Math.max(n, r, o), i = Math.min(n, r, o);
2071
2079
  let d = 0, u = 0;
2072
- const x = (c + i) / 2;
2080
+ const m = (c + i) / 2;
2073
2081
  if (c !== i) {
2074
2082
  const h = c - i;
2075
- switch (u = x > 0.5 ? h / (2 - c - i) : h / (c + i), c) {
2083
+ switch (u = m > 0.5 ? h / (2 - c - i) : h / (c + i), c) {
2076
2084
  case n:
2077
- d = (r - s) / h + (r < s ? 6 : 0);
2085
+ d = (r - o) / h + (r < o ? 6 : 0);
2078
2086
  break;
2079
2087
  case r:
2080
- d = (s - n) / h + 2;
2088
+ d = (o - n) / h + 2;
2081
2089
  break;
2082
- case s:
2090
+ case o:
2083
2091
  d = (n - r) / h + 4;
2084
2092
  break;
2085
2093
  }
2086
2094
  d /= 6;
2087
2095
  }
2088
- return [d * 360, u, x];
2096
+ return [d * 360, u, m];
2089
2097
  }
2090
- function G(e, t, o) {
2091
- e = (e % 360 + 360) % 360, t = Math.min(1, Math.max(0, t)), o = Math.min(1, Math.max(0, o));
2092
- const a = (1 - Math.abs(2 * o - 1)) * t, n = a * (1 - Math.abs(e / 60 % 2 - 1)), r = o - a / 2;
2093
- let s = 0, c = 0, i = 0;
2094
- return e < 60 ? (s = a, c = n) : e < 120 ? (s = n, c = a) : e < 180 ? (c = a, i = n) : e < 240 ? (c = n, i = a) : e < 300 ? (s = n, i = a) : (s = a, i = n), xa({ r: Math.round((s + r) * 255), g: Math.round((c + r) * 255), b: Math.round((i + r) * 255) });
2098
+ function V(e, t, s) {
2099
+ e = (e % 360 + 360) % 360, t = Math.min(1, Math.max(0, t)), s = Math.min(1, Math.max(0, s));
2100
+ const a = (1 - Math.abs(2 * s - 1)) * t, n = a * (1 - Math.abs(e / 60 % 2 - 1)), r = s - a / 2;
2101
+ let o = 0, c = 0, i = 0;
2102
+ return e < 60 ? (o = a, c = n) : e < 120 ? (o = n, c = a) : e < 180 ? (c = a, i = n) : e < 240 ? (c = n, i = a) : e < 300 ? (o = n, i = a) : (o = a, i = n), xa({ r: Math.round((o + r) * 255), g: Math.round((c + r) * 255), b: Math.round((i + r) * 255) });
2095
2103
  }
2096
2104
  function z(e, t) {
2097
- const [o, a, n] = _(e);
2098
- return G(o, a, Math.min(1, Math.max(0, n + t)));
2105
+ const [s, a, n] = _(e);
2106
+ return V(s, a, Math.min(1, Math.max(0, n + t)));
2099
2107
  }
2100
- const ma = 222, ha = 0.12;
2108
+ const ha = 222, va = 0.12;
2101
2109
  function nt(e, t) {
2102
- return t < 0.04 ? [ma, ha] : [e, t];
2110
+ return t < 0.04 ? [ha, va] : [e, t];
2103
2111
  }
2104
2112
  function qe(e) {
2105
- const [t, o, a] = _(e), [n, r] = nt(t, o);
2106
- return G(n, r, Math.max(0.04, Math.min(0.2, 0.07 + (1 - a))));
2113
+ const [t, s, a] = _(e), [n, r] = nt(t, s);
2114
+ return V(n, r, Math.max(0.04, Math.min(0.2, 0.07 + (1 - a))));
2107
2115
  }
2108
2116
  function Be(e) {
2109
- const [t, o, a] = _(e), [n, r] = nt(t, o);
2110
- return G(n, r, Math.max(0.06, Math.min(0.5, (1 - a) * 0.6 + 0.06)));
2117
+ const [t, s, a] = _(e), [n, r] = nt(t, s);
2118
+ return V(n, r, Math.max(0.06, Math.min(0.5, (1 - a) * 0.6 + 0.06)));
2111
2119
  }
2112
2120
  function $e(e) {
2113
- const [t, o, a] = _(e);
2114
- return G(t, o, Math.max(0.04, Math.min(0.97, 1 - a + 0.04)));
2121
+ const [t, s, a] = _(e);
2122
+ return V(t, s, Math.max(0.04, Math.min(0.97, 1 - a + 0.04)));
2115
2123
  }
2116
2124
  function Pe(e) {
2117
- const [t, o, a] = _(e);
2118
- return G(t, o, Math.max(0.02, Math.min(0.98, 1 - a)));
2125
+ const [t, s, a] = _(e);
2126
+ return V(t, s, Math.max(0.02, Math.min(0.98, 1 - a)));
2119
2127
  }
2120
- function va(e) {
2121
- const t = qe(e.navigation), o = qe(e.bgBase), [a, n, r] = _(o), s = (c) => G(a, n, Math.min(0.25, r + c));
2128
+ function ya(e) {
2129
+ const t = qe(e.navigation), s = qe(e.bgBase), [a, n, r] = _(s), o = (c) => V(a, n, Math.min(0.25, r + c));
2122
2130
  return {
2123
2131
  // ── Non-color tokens: carry over from light unchanged ──────────────────
2124
2132
  ...e,
2125
2133
  // ── Shadows: dark variants have higher opacity for visibility ───────────
2126
- ...ga,
2134
+ ...ba,
2127
2135
  // ── Navigation ──────────────────────────────────────────────────────────
2128
2136
  navigation: t,
2129
2137
  // ── Backgrounds ─────────────────────────────────────────────────────────
2130
- bgBase: o,
2131
- bgSubtle: s(0.02),
2138
+ bgBase: s,
2139
+ bgSubtle: o(0.02),
2132
2140
  bgOverlay: "rgb(0 0 0 / 0.6)",
2133
2141
  // ── Surfaces: slight elevation steps above bgBase ────────────────────────
2134
- surface: s(0.02),
2135
- surfaceSecondary: s(0.05),
2136
- surfaceRaised: s(0.08),
2137
- surfaceOverlay: s(0.08),
2138
- surfaceTint: s(0.03),
2142
+ surface: o(0.02),
2143
+ surfaceSecondary: o(0.05),
2144
+ surfaceRaised: o(0.08),
2145
+ surfaceOverlay: o(0.08),
2146
+ surfaceTint: o(0.03),
2139
2147
  // ── Borders ──────────────────────────────────────────────────────────────
2140
2148
  borderDefault: Be(e.borderDefault),
2141
2149
  borderSubtle: Be(e.borderSubtle),
2142
2150
  borderStrong: Be(e.borderStrong),
2143
- controlTrack: s(0.1),
2151
+ controlTrack: o(0.1),
2144
2152
  // ── Text ─────────────────────────────────────────────────────────────────
2145
2153
  textPrimary: $e(e.textPrimary),
2146
2154
  textSecondary: $e(e.textSecondary),
2147
2155
  textDisabled: $e(e.textDisabled),
2148
2156
  // textInverse flips to dark bg so it reads on light accent surfaces
2149
- textInverse: o,
2157
+ textInverse: s,
2150
2158
  // ── Accent ───────────────────────────────────────────────────────────────
2151
2159
  accentDefault: Pe(e.accentDefault),
2152
2160
  accentHover: Pe(e.accentHover),
@@ -2171,110 +2179,113 @@ function va(e) {
2171
2179
  infoText: z(e.infoText, 0.15)
2172
2180
  };
2173
2181
  }
2174
- const rt = va(ye);
2175
- function ya(e) {
2176
- return "--lucent-" + e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`).replace(/([a-z])(\d)/g, (t, o, a) => `${o}-${a}`);
2182
+ const rt = ya(ye);
2183
+ function wa(e) {
2184
+ return "--lucent-" + e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`).replace(/([a-z])(\d)/g, (t, s, a) => `${s}-${a}`);
2185
+ }
2186
+ function Da(e) {
2187
+ return e.replace(/[{}<>;@\\]/g, "");
2177
2188
  }
2178
- function wa(e, t = ":root") {
2179
- const o = Object.entries(e).map(([a, n]) => ` ${ya(a)}: ${n};`).join(`
2189
+ function Sa(e, t = ":root") {
2190
+ const s = Object.entries(e).map(([a, n]) => ` ${wa(a)}: ${Da(n)};`).join(`
2180
2191
  `);
2181
2192
  return `${t} {
2182
- ${o}
2193
+ ${s}
2183
2194
  }`;
2184
2195
  }
2185
- function Da(e) {
2186
- const t = parseInt(e.slice(1, 3), 16) / 255, o = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = (r) => r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
2187
- return 0.2126 * n(t) + 0.7152 * n(o) + 0.0722 * n(a);
2196
+ function ka(e) {
2197
+ const t = parseInt(e.slice(1, 3), 16) / 255, s = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = (r) => r <= 0.03928 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
2198
+ return 0.2126 * n(t) + 0.7152 * n(s) + 0.0722 * n(a);
2188
2199
  }
2189
- const Sa = 0.2126729, ka = 0.7151522, Ma = 0.072175, za = 0.56, Ta = 0.57, Ia = 0.65, Ba = 0.62, Ge = 0.022, $a = 1.414, Pa = 1.14, La = 1.14, _e = 0.027, Ve = 0.027;
2200
+ const Ma = 0.2126729, za = 0.7151522, Ta = 0.072175, Ia = 0.56, Ba = 0.57, $a = 0.65, Pa = 0.62, Ge = 0.022, La = 1.414, Ra = 1.14, Fa = 1.14, Ve = 0.027, _e = 0.027;
2190
2201
  function Ke(e) {
2191
- const t = parseInt(e.slice(1, 3), 16) / 255, o = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = Math.pow(t, 2.4), r = Math.pow(o, 2.4), s = Math.pow(a, 2.4);
2192
- let c = Sa * n + ka * r + Ma * s;
2193
- return c < 0 && (c = 0), c < Ge ? c + Math.pow(Ge - c, $a) : c;
2202
+ const t = parseInt(e.slice(1, 3), 16) / 255, s = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = Math.pow(t, 2.4), r = Math.pow(s, 2.4), o = Math.pow(a, 2.4);
2203
+ let c = Ma * n + za * r + Ta * o;
2204
+ return c < 0 && (c = 0), c < Ge ? c + Math.pow(Ge - c, La) : c;
2194
2205
  }
2195
- function xe(e, t) {
2196
- const o = Ke(e), a = Ke(t);
2206
+ function me(e, t) {
2207
+ const s = Ke(e), a = Ke(t);
2197
2208
  let n;
2198
- if (o > a) {
2199
- const r = (Math.pow(o, za) - Math.pow(a, Ta)) * Pa;
2200
- n = r < _e ? 0 : r - _e;
2209
+ if (s > a) {
2210
+ const r = (Math.pow(s, Ia) - Math.pow(a, Ba)) * Ra;
2211
+ n = r < Ve ? 0 : r - Ve;
2201
2212
  } else {
2202
- const r = (Math.pow(o, Ia) - Math.pow(a, Ba)) * La;
2203
- n = r > -Ve ? 0 : r + Ve;
2213
+ const r = (Math.pow(s, $a) - Math.pow(a, Pa)) * Fa;
2214
+ n = r > -_e ? 0 : r + _e;
2204
2215
  }
2205
2216
  return n * 100;
2206
2217
  }
2207
- function Ra(e) {
2208
- const t = Math.abs(xe(e, "#ffffff")), o = Math.abs(xe(e, "#000000"));
2209
- return t >= o ? "#ffffff" : "#000000";
2218
+ function Ca(e) {
2219
+ const t = Math.abs(me(e, "#ffffff")), s = Math.abs(me(e, "#000000"));
2220
+ return t >= s ? "#ffffff" : "#000000";
2210
2221
  }
2211
- function ot(e) {
2212
- const t = parseInt(e.slice(1, 3), 16) / 255, o = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = Math.max(t, o, a), r = Math.min(t, o, a);
2213
- let s = 0, c = 0;
2222
+ function st(e) {
2223
+ const t = parseInt(e.slice(1, 3), 16) / 255, s = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = Math.max(t, s, a), r = Math.min(t, s, a);
2224
+ let o = 0, c = 0;
2214
2225
  if (n !== r) {
2215
2226
  const d = n - r;
2216
- c = (n + r) / 2 > 0.5 ? d / (2 - n - r) : d / (n + r), n === t ? s = ((o - a) / d + (o < a ? 6 : 0)) / 6 : n === o ? s = ((a - t) / d + 2) / 6 : s = ((t - o) / d + 4) / 6;
2227
+ c = (n + r) / 2 > 0.5 ? d / (2 - n - r) : d / (n + r), n === t ? o = ((s - a) / d + (s < a ? 6 : 0)) / 6 : n === s ? o = ((a - t) / d + 2) / 6 : o = ((t - s) / d + 4) / 6;
2217
2228
  }
2218
- return Ra(e) === "#000000" ? Re(s, Math.min(c, 0.6), 0.12) : Re(s, Math.min(c, 0.2), 0.95);
2219
- }
2220
- function Fa(e, t, o = 60) {
2221
- if (Math.abs(xe(e, t)) >= o) return e;
2222
- const a = parseInt(e.slice(1, 3), 16) / 255, n = parseInt(e.slice(3, 5), 16) / 255, r = parseInt(e.slice(5, 7), 16) / 255, s = Math.max(a, n, r), c = Math.min(a, n, r);
2223
- let i = 0, d = 0, u = (s + c) / 2;
2224
- if (s !== c) {
2225
- const b = s - c;
2226
- d = u > 0.5 ? b / (2 - s - c) : b / (s + c), s === a ? i = ((n - r) / b + (n < r ? 6 : 0)) / 6 : s === n ? i = ((r - a) / b + 2) / 6 : i = ((a - n) / b + 4) / 6;
2229
+ return Ca(e) === "#000000" ? Re(o, Math.min(c, 0.6), 0.12) : Re(o, Math.min(c, 0.2), 0.95);
2230
+ }
2231
+ function Wa(e, t, s = 60) {
2232
+ if (Math.abs(me(e, t)) >= s) return e;
2233
+ const a = parseInt(e.slice(1, 3), 16) / 255, n = parseInt(e.slice(3, 5), 16) / 255, r = parseInt(e.slice(5, 7), 16) / 255, o = Math.max(a, n, r), c = Math.min(a, n, r);
2234
+ let i = 0, d = 0, u = (o + c) / 2;
2235
+ if (o !== c) {
2236
+ const b = o - c;
2237
+ d = u > 0.5 ? b / (2 - o - c) : b / (o + c), o === a ? i = ((n - r) / b + (n < r ? 6 : 0)) / 6 : o === n ? i = ((r - a) / b + 2) / 6 : i = ((a - n) / b + 4) / 6;
2227
2238
  }
2228
- const h = Da(t) > 0.5 ? -5e-3 : 5e-3;
2239
+ const h = ka(t) > 0.5 ? -5e-3 : 5e-3;
2229
2240
  for (let b = 0; b < 100; b++) {
2230
2241
  u = Math.min(1, Math.max(0, u + h));
2231
2242
  const v = Re(i, d, u);
2232
- if (Math.abs(xe(v, t)) >= o) return v;
2243
+ if (Math.abs(me(v, t)) >= s) return v;
2233
2244
  }
2234
2245
  return e;
2235
2246
  }
2236
- function Re(e, t, o) {
2247
+ function Re(e, t, s) {
2237
2248
  const a = (i, d, u) => (u < 0 && (u += 1), u > 1 && (u -= 1), u < 0.16666666666666666 ? i + (d - i) * 6 * u : u < 0.5 ? d : u < 0.6666666666666666 ? i + (d - i) * (0.6666666666666666 - u) * 6 : i);
2238
- let n, r, s;
2249
+ let n, r, o;
2239
2250
  if (t === 0)
2240
- n = r = s = o;
2251
+ n = r = o = s;
2241
2252
  else {
2242
- const i = o < 0.5 ? o * (1 + t) : o + t - o * t, d = 2 * o - i;
2243
- n = a(d, i, e + 1 / 3), r = a(d, i, e), s = a(d, i, e - 1 / 3);
2253
+ const i = s < 0.5 ? s * (1 + t) : s + t - s * t, d = 2 * s - i;
2254
+ n = a(d, i, e + 1 / 3), r = a(d, i, e), o = a(d, i, e - 1 / 3);
2244
2255
  }
2245
2256
  const c = (i) => Math.round(i * 255).toString(16).padStart(2, "0");
2246
- return `#${c(n)}${c(r)}${c(s)}`;
2257
+ return `#${c(n)}${c(r)}${c(o)}`;
2247
2258
  }
2248
- function Ca(e, t) {
2249
- const [o, a, n] = _(e);
2250
- return t ? G(o, a * 0.3, Math.min(1, n + (1 - n) * 0.85)) : G(o, a, Math.min(0.25, n + 0.04));
2259
+ function Ha(e, t) {
2260
+ const [s, a, n] = _(e);
2261
+ return t ? V(s, a * 0.3, Math.min(1, n + (1 - n) * 0.85)) : V(s, a, Math.min(0.25, n + 0.04));
2251
2262
  }
2252
- const me = {
2263
+ const xe = {
2253
2264
  subtle: { light: 0.95, dark: 0.12 },
2254
2265
  text: { light: 0.28, dark: 0.78 }
2255
2266
  };
2256
2267
  function ue(e, t) {
2257
- const [o, a] = _(e);
2258
- return G(o, a * 0.5, t ? me.subtle.light : me.subtle.dark);
2268
+ const [s, a] = _(e);
2269
+ return V(s, a * 0.5, t ? xe.subtle.light : xe.subtle.dark);
2259
2270
  }
2260
2271
  function de(e, t) {
2261
- const [o, a] = _(e);
2262
- return G(o, a, t ? me.text.light : me.text.dark);
2272
+ const [s, a] = _(e);
2273
+ return V(s, a, t ? xe.text.light : xe.text.dark);
2263
2274
  }
2264
- function st(e, t, o) {
2265
- const a = {}, n = o === "light";
2275
+ function ot(e, t, s) {
2276
+ const a = {}, n = s === "light";
2266
2277
  if ("borderDefault" in e && ("borderSubtle" in e || (a.borderSubtle = z(t.borderDefault, n ? 0.05 : -0.02)), "borderStrong" in e || (a.borderStrong = z(t.borderDefault, n ? -0.27 : 0.19))), "bgBase" in e && ("bgSubtle" in e || (a.bgSubtle = z(t.bgBase, n ? -0.02 : 0.02)), "surfaceTint" in e || (a.surfaceTint = z(t.bgBase, n ? -0.04 : 0.03)), !("surface" in e))) {
2267
- const r = Ca(t.bgBase, n);
2278
+ const r = Ha(t.bgBase, n);
2268
2279
  a.surface = r, "surfaceSecondary" in e || (a.surfaceSecondary = z(r, n ? -0.04 : 0.03)), "surfaceRaised" in e || (a.surfaceRaised = z(r, n ? 0 : 0.06)), "surfaceOverlay" in e || (a.surfaceOverlay = z(r, n ? 0 : 0.06));
2269
2280
  }
2270
2281
  return "surface" in e && ("surfaceSecondary" in e || (a.surfaceSecondary = z(t.surface, n ? -0.04 : 0.03)), "surfaceRaised" in e || (a.surfaceRaised = z(t.surface, n ? 0 : 0.06)), "surfaceOverlay" in e || (a.surfaceOverlay = z(t.surface, n ? 0 : 0.06))), "textPrimary" in e && ("textSecondary" in e || (a.textSecondary = z(t.textPrimary, n ? 0.2 : -0.15)), "textDisabled" in e || (a.textDisabled = z(t.textPrimary, n ? 0.58 : -0.62))), "accentDefault" in e && ("accentHover" in e || (a.accentHover = z(t.accentDefault, n ? 0.05 : -0.07)), "accentSubtle" in e || (a.accentSubtle = z(t.accentDefault, n ? 0.85 : -0.6))), "successDefault" in e && ("successSubtle" in e || (a.successSubtle = ue(t.successDefault, n)), "successText" in e || (a.successText = de(t.successDefault, n))), "warningDefault" in e && ("warningSubtle" in e || (a.warningSubtle = ue(t.warningDefault, n)), "warningText" in e || (a.warningText = de(t.warningDefault, n))), "dangerDefault" in e && ("dangerHover" in e || (a.dangerHover = z(t.dangerDefault, n ? 0.05 : -0.07)), "dangerSubtle" in e || (a.dangerSubtle = ue(t.dangerDefault, n)), "dangerText" in e || (a.dangerText = de(t.dangerDefault, n))), "infoDefault" in e && ("infoSubtle" in e || (a.infoSubtle = ue(t.infoDefault, n)), "infoText" in e || (a.infoText = de(t.infoDefault, n))), a;
2271
2282
  }
2272
2283
  function lt(e, t = "light") {
2273
- const a = { ...t === "dark" ? rt : ye, ...e }, n = st(e, a, t), r = t === "light" ? z(a.accentDefault, -0.15) : z(a.accentDefault, 0.15);
2284
+ const a = { ...t === "dark" ? rt : ye, ...e }, n = ot(e, a, t), r = t === "light" ? z(a.accentDefault, -0.15) : z(a.accentDefault, 0.15);
2274
2285
  return {
2275
2286
  ...a,
2276
2287
  ...n,
2277
- accentFg: ot(a.accentDefault),
2288
+ accentFg: st(a.accentDefault),
2278
2289
  accentBorder: r
2279
2290
  };
2280
2291
  }
@@ -2302,7 +2313,7 @@ const ct = {
2302
2313
  dangerDefault: "#ef4444",
2303
2314
  infoDefault: "#3b82f6"
2304
2315
  }
2305
- }, Wa = {
2316
+ }, Na = {
2306
2317
  name: "brand",
2307
2318
  light: {
2308
2319
  navigation: "#fffefb",
@@ -2398,7 +2409,7 @@ const ct = {
2398
2409
  dangerDefault: "#ef4444",
2399
2410
  infoDefault: "#3b82f6"
2400
2411
  }
2401
- }, Ha = {
2412
+ }, Ea = {
2402
2413
  name: "teal",
2403
2414
  light: {
2404
2415
  navigation: "#f9fbfc",
@@ -2470,7 +2481,7 @@ const ct = {
2470
2481
  dangerDefault: "#ef4444",
2471
2482
  infoDefault: "#3b82f6"
2472
2483
  }
2473
- }, Na = {
2484
+ }, Aa = {
2474
2485
  name: "amber",
2475
2486
  light: {
2476
2487
  navigation: "#fffdf6",
@@ -2542,7 +2553,7 @@ const ct = {
2542
2553
  dangerDefault: "#ef4444",
2543
2554
  infoDefault: "#3b82f6"
2544
2555
  }
2545
- }, Ea = {
2556
+ }, Oa = {
2546
2557
  name: "sage",
2547
2558
  light: {
2548
2559
  navigation: "#f4f8f4",
@@ -2576,7 +2587,7 @@ const ct = {
2576
2587
  radiusXl: "0.375rem",
2577
2588
  radiusFull: "9999px"
2578
2589
  }
2579
- }, oe = {
2590
+ }, se = {
2580
2591
  name: "rounded",
2581
2592
  tokens: {
2582
2593
  radiusNone: "0px",
@@ -2613,7 +2624,7 @@ const ct = {
2613
2624
  space20: "4rem",
2614
2625
  space24: "4.8rem"
2615
2626
  }
2616
- }, se = {
2627
+ }, oe = {
2617
2628
  name: "default",
2618
2629
  tokens: {
2619
2630
  space0: "0px",
@@ -2679,7 +2690,7 @@ const ct = {
2679
2690
  shadowLg: "0 0 40px color-mix(in srgb, var(--lucent-accent-default) 9%, transparent), inset 0 1px 0 0 rgba(255, 255, 255, 0.05)",
2680
2691
  shadowXl: "0 0 56px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), inset 0 1px 0 0 rgba(255, 255, 255, 0.06)"
2681
2692
  }
2682
- }, xt = {
2693
+ }, mt = {
2683
2694
  name: "elevated",
2684
2695
  light: {
2685
2696
  shadowNone: "none",
@@ -2695,7 +2706,7 @@ const ct = {
2695
2706
  shadowLg: "inset 0 1px 0 0 rgba(255, 255, 255, 0.1), inset 0 0 28px rgba(255, 255, 255, 0.04), 0 0 1px rgba(255, 255, 255, 0.08)",
2696
2707
  shadowXl: "inset 0 1px 0 0 rgba(255, 255, 255, 0.12), inset 0 0 36px rgba(255, 255, 255, 0.05), 0 0 1px rgba(255, 255, 255, 0.1)"
2697
2708
  }
2698
- }, mt = {
2709
+ }, xt = {
2699
2710
  name: "liquidGlass",
2700
2711
  light: {
2701
2712
  shadowNone: "none",
@@ -2775,167 +2786,167 @@ const ct = {
2775
2786
  shadowLg: "0 0 36px color-mix(in srgb, var(--lucent-accent-default) 35%, transparent)",
2776
2787
  shadowXl: "0 0 50px color-mix(in srgb, var(--lucent-accent-default) 40%, transparent)"
2777
2788
  }
2778
- }, Aa = {
2789
+ }, Xa = {
2779
2790
  name: "modern",
2780
2791
  palette: we,
2781
- shape: oe,
2782
- density: se,
2792
+ shape: se,
2793
+ density: oe,
2783
2794
  shadow: bt
2784
- }, Oa = {
2795
+ }, ja = {
2785
2796
  name: "enterprise",
2786
2797
  palette: ct,
2787
2798
  shape: De,
2788
2799
  density: ke,
2789
2800
  shadow: Ce
2790
- }, Xa = {
2801
+ }, Ua = {
2791
2802
  name: "playful",
2792
2803
  palette: dt,
2793
2804
  shape: Se,
2794
2805
  density: Me,
2795
- shadow: xt
2796
- }, ja = {
2806
+ shadow: mt
2807
+ }, qa = {
2797
2808
  name: "liquidGlass",
2798
2809
  palette: pt,
2799
2810
  shape: Se,
2800
2811
  density: Me,
2801
- shadow: mt
2802
- }, Ua = {
2812
+ shadow: xt
2813
+ }, Ga = {
2803
2814
  name: "bento",
2804
2815
  palette: we,
2805
- shape: oe,
2806
- density: se,
2816
+ shape: se,
2817
+ density: oe,
2807
2818
  shadow: yt
2808
- }, qa = {
2819
+ }, Va = {
2809
2820
  name: "brutalist",
2810
2821
  palette: ft,
2811
2822
  shape: De,
2812
2823
  density: ke,
2813
2824
  shadow: ht
2814
- }, Ga = {
2825
+ }, _a = {
2815
2826
  name: "terminal",
2816
2827
  palette: ut,
2817
2828
  shape: De,
2818
2829
  density: ke,
2819
2830
  shadow: We
2820
- }, _a = {
2831
+ }, Ka = {
2821
2832
  name: "softUI",
2822
2833
  palette: it,
2823
2834
  shape: Se,
2824
- density: se,
2835
+ density: oe,
2825
2836
  shadow: vt
2826
- }, Va = {
2837
+ }, Ya = {
2827
2838
  name: "bloom",
2828
2839
  palette: we,
2829
- shape: oe,
2840
+ shape: se,
2830
2841
  density: Me,
2831
2842
  shadow: We
2832
- }, Ka = {
2843
+ }, Za = {
2833
2844
  name: "minimal",
2834
2845
  palette: gt,
2835
- shape: oe,
2836
- density: se,
2846
+ shape: se,
2847
+ density: oe,
2837
2848
  shadow: Ce
2838
- }, Ya = {
2849
+ }, Ja = {
2839
2850
  default: ct,
2840
- brand: Wa,
2851
+ brand: Na,
2841
2852
  indigo: we,
2842
2853
  violet: it,
2843
2854
  emerald: ut,
2844
- teal: Ha,
2855
+ teal: Ea,
2845
2856
  rose: dt,
2846
2857
  coral: ft,
2847
- amber: Na,
2858
+ amber: Aa,
2848
2859
  ocean: pt,
2849
2860
  slate: gt,
2850
- sage: Ea
2851
- }, Za = {
2861
+ sage: Oa
2862
+ }, Qa = {
2852
2863
  sharp: De,
2853
- rounded: oe,
2864
+ rounded: se,
2854
2865
  pill: Se
2855
- }, Ja = {
2866
+ }, en = {
2856
2867
  compact: ke,
2857
- default: se,
2868
+ default: oe,
2858
2869
  spacious: Me
2859
- }, Qa = {
2870
+ }, tn = {
2860
2871
  flat: Ce,
2861
2872
  subtle: bt,
2862
- elevated: xt,
2863
- liquidGlass: mt,
2873
+ elevated: mt,
2874
+ liquidGlass: xt,
2864
2875
  brutalist: ht,
2865
2876
  neumorphic: vt,
2866
2877
  natural: yt,
2867
2878
  glow: We
2868
- }, en = {
2869
- modern: Aa,
2870
- enterprise: Oa,
2871
- playful: Xa,
2872
- liquidGlass: ja,
2873
- bento: Ua,
2874
- brutalist: qa,
2875
- terminal: Ga,
2876
- softUI: _a,
2877
- bloom: Va,
2878
- minimal: Ka
2879
+ }, an = {
2880
+ modern: Xa,
2881
+ enterprise: ja,
2882
+ playful: Ua,
2883
+ liquidGlass: qa,
2884
+ bento: Ga,
2885
+ brutalist: Va,
2886
+ terminal: _a,
2887
+ softUI: Ka,
2888
+ bloom: Ya,
2889
+ minimal: Za
2879
2890
  };
2880
- function tn(e) {
2881
- return typeof e == "string" ? Ya[e] : e;
2882
- }
2883
- function an(e) {
2884
- return typeof e == "string" ? Za[e] : e;
2885
- }
2886
2891
  function nn(e) {
2887
2892
  return typeof e == "string" ? Ja[e] : e;
2888
2893
  }
2889
2894
  function rn(e) {
2890
2895
  return typeof e == "string" ? Qa[e] : e;
2891
2896
  }
2892
- function on(e, t) {
2893
- let o, a, n, r;
2897
+ function sn(e) {
2898
+ return typeof e == "string" ? en[e] : e;
2899
+ }
2900
+ function on(e) {
2901
+ return typeof e == "string" ? tn[e] : e;
2902
+ }
2903
+ function ln(e, t) {
2904
+ let s, a, n, r;
2894
2905
  if (typeof e == "string") {
2895
- const c = en[e];
2906
+ const c = an[e];
2896
2907
  if (!c) return {};
2897
- o = c.palette, a = c.shape, n = c.density, r = c.shadow;
2908
+ s = c.palette, a = c.shape, n = c.density, r = c.shadow;
2898
2909
  } else
2899
- e.palette !== void 0 && (o = tn(e.palette)), e.shape !== void 0 && (a = an(e.shape)), e.density !== void 0 && (n = nn(e.density)), e.shadow !== void 0 && (r = rn(e.shadow));
2900
- const s = {};
2901
- if (o) {
2902
- const c = lt(o[t], t);
2903
- Object.assign(s, c);
2910
+ e.palette !== void 0 && (s = nn(e.palette)), e.shape !== void 0 && (a = rn(e.shape)), e.density !== void 0 && (n = sn(e.density)), e.shadow !== void 0 && (r = on(e.shadow));
2911
+ const o = {};
2912
+ if (s) {
2913
+ const c = lt(s[t], t);
2914
+ Object.assign(o, c);
2904
2915
  }
2905
- return a && Object.assign(s, a.tokens), n && Object.assign(s, n.tokens), r && Object.assign(s, r[t]), s;
2916
+ return a && Object.assign(o, a.tokens), n && Object.assign(o, n.tokens), r && Object.assign(o, r[t]), o;
2906
2917
  }
2907
2918
  const wt = St({
2908
2919
  theme: "light",
2909
2920
  tokens: ye
2910
2921
  });
2911
- function bn({
2922
+ function xn({
2912
2923
  theme: e = "light",
2913
2924
  preset: t,
2914
- tokens: o,
2925
+ tokens: s,
2915
2926
  anchors: a,
2916
2927
  children: n
2917
2928
  }) {
2918
- const r = Ze().replace(/:/g, ""), s = t ? on(t, e) : void 0, c = (() => {
2929
+ const r = Ze().replace(/:/g, ""), o = t ? ln(t, e) : void 0, c = (() => {
2919
2930
  if (a) {
2920
2931
  const I = lt(a, e);
2921
- if (s) {
2922
- const k = {};
2923
- for (const [p, m] of Object.entries(s))
2924
- (p.startsWith("space") || p.startsWith("radius") || p.startsWith("shadow") || p.startsWith("duration") || p.startsWith("easing")) && (k[p] = m);
2925
- return { ...I, ...k };
2932
+ if (o) {
2933
+ const S = {};
2934
+ for (const [p, x] of Object.entries(o))
2935
+ (p.startsWith("space") || p.startsWith("radius") || p.startsWith("shadow") || p.startsWith("duration") || p.startsWith("easing")) && (S[p] = x);
2936
+ return { ...I, ...S };
2926
2937
  }
2927
2938
  return I;
2928
2939
  }
2929
- const d = e === "dark" ? rt : ye, u = s ? { ...s, ...o } : o, x = u ? { ...d, ...u } : d, h = u ? st(u, x, e) : {}, b = (u == null ? void 0 : u.accentBorder) ?? (e === "light" ? z(x.accentDefault, -0.15) : z(x.accentDefault, 0.15)), v = (u == null ? void 0 : u.accentFg) ?? ot(x.accentDefault), B = Fa(x.accentDefault, v);
2940
+ const d = e === "dark" ? rt : ye, u = o ? { ...o, ...s } : s, m = u ? { ...d, ...u } : d, h = u ? ot(u, m, e) : {}, b = (u == null ? void 0 : u.accentBorder) ?? (e === "light" ? z(m.accentDefault, -0.15) : z(m.accentDefault, 0.15)), v = (u == null ? void 0 : u.accentFg) ?? st(m.accentDefault), B = Wa(m.accentDefault, v);
2930
2941
  return {
2931
- ...x,
2942
+ ...m,
2932
2943
  ...h,
2933
2944
  accentDefault: B,
2934
2945
  accentFg: v,
2935
2946
  accentBorder: b
2936
2947
  };
2937
2948
  })(), i = `html { font-size: 14px; }
2938
- ` + wa(c, ":root");
2949
+ ` + Sa(c, ":root");
2939
2950
  return ve(() => {
2940
2951
  let d = document.getElementById(`lucent-tokens-${r}`);
2941
2952
  return d || (d = document.createElement("style"), d.id = `lucent-tokens-${r}`, document.head.appendChild(d)), d.textContent = i, () => {
@@ -2944,65 +2955,66 @@ function bn({
2944
2955
  };
2945
2956
  }, [r, i]), /* @__PURE__ */ f(wt.Provider, { value: { theme: e, tokens: c }, children: n });
2946
2957
  }
2947
- function xn() {
2958
+ function hn() {
2948
2959
  return Dt(wt);
2949
2960
  }
2950
2961
  export {
2951
- ya as $,
2952
- we as A,
2962
+ hn as $,
2963
+ We as A,
2953
2964
  Je as B,
2954
- la as C,
2955
- ye as D,
2956
- ja as E,
2957
- mt as F,
2958
- wa as G,
2959
- Ka as H,
2965
+ ca as C,
2966
+ we as D,
2967
+ ye as E,
2968
+ qa as F,
2969
+ xt as G,
2970
+ Sa as H,
2960
2971
  te as I,
2961
- Aa as J,
2962
- yt as K,
2963
- bn as L,
2964
- vt as M,
2965
- pt as N,
2966
- Se as O,
2967
- Xa as P,
2968
- on as Q,
2969
- dt as R,
2972
+ Za as J,
2973
+ Xa as K,
2974
+ xn as L,
2975
+ yt as M,
2976
+ vt as N,
2977
+ pt as O,
2978
+ Se as P,
2979
+ Ua as Q,
2980
+ ln as R,
2970
2981
  et as S,
2971
- fn as T,
2972
- oe as U,
2973
- De as V,
2974
- _a as W,
2975
- Me as X,
2976
- bt as Y,
2977
- Ga as Z,
2978
- xn as _,
2982
+ gn as T,
2983
+ dt as U,
2984
+ se as V,
2985
+ De as W,
2986
+ Ka as X,
2987
+ Me as Y,
2988
+ bt as Z,
2989
+ _a as _,
2979
2990
  z as a,
2980
- ga as a0,
2981
- pa as a1,
2982
- Fa as a2,
2983
- un as b,
2991
+ wa as a0,
2992
+ ba as a1,
2993
+ ga as a2,
2994
+ Wa as a3,
2995
+ fn as b,
2984
2996
  pe as c,
2985
2997
  Qe as d,
2986
- pn as e,
2987
- gn as f,
2988
- ot as g,
2989
- dn as h,
2990
- Ua as i,
2991
- Va as j,
2992
- Wa as k,
2993
- qa as l,
2998
+ bn as e,
2999
+ mn as f,
3000
+ st as g,
3001
+ pn as h,
3002
+ Ga as i,
3003
+ Ya as j,
3004
+ Na as k,
3005
+ Va as l,
2994
3006
  ht as m,
2995
3007
  ke as n,
2996
3008
  lt as o,
2997
3009
  rt as p,
2998
- se as q,
3010
+ oe as q,
2999
3011
  ct as r,
3000
- va as s,
3001
- st as t,
3002
- xt as u,
3003
- ut as v,
3004
- Oa as w,
3005
- Ce as x,
3006
- Ra as y,
3007
- We as z
3012
+ Mt as s,
3013
+ ya as t,
3014
+ ot as u,
3015
+ mt as v,
3016
+ ut as w,
3017
+ ja as x,
3018
+ Ce as y,
3019
+ Ca as z
3008
3020
  };