lucent-ui 0.40.0 → 0.42.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.
Files changed (26) hide show
  1. package/dist/LucentProvider-CIiTlQ5E.cjs +109 -0
  2. package/dist/{LucentProvider-Bm39MMvv.js → LucentProvider-tSCR4lQw.js} +969 -939
  3. package/dist/devtools.cjs +1 -1
  4. package/dist/devtools.js +27 -27
  5. package/dist/index.cjs +47 -42
  6. package/dist/index.d.ts +45 -4
  7. package/dist/index.js +2281 -2026
  8. package/dist-server/server/pattern-registry.js +6 -0
  9. package/dist-server/server/recipe-registry.js +18 -0
  10. package/dist-server/src/components/molecules/PageLayout/PageLayout.manifest.js +65 -8
  11. package/dist-server/src/manifest/patterns/index.js +2 -0
  12. package/dist-server/src/manifest/patterns/multi-step-wizard.pattern.js +180 -0
  13. package/dist-server/src/manifest/patterns/search-filter-panel.pattern.js +188 -0
  14. package/dist-server/src/manifest/patterns/tab-page.pattern.js +152 -0
  15. package/dist-server/src/manifest/recipes/action-bar.recipe.js +91 -0
  16. package/dist-server/src/manifest/recipes/collapsible-card.recipe.js +100 -0
  17. package/dist-server/src/manifest/recipes/empty-state-card.recipe.js +72 -0
  18. package/dist-server/src/manifest/recipes/form-layout.recipe.js +98 -0
  19. package/dist-server/src/manifest/recipes/index.js +8 -0
  20. package/dist-server/src/manifest/recipes/profile-card.recipe.js +101 -0
  21. package/dist-server/src/manifest/recipes/search-filter-bar.recipe.js +122 -0
  22. package/dist-server/src/manifest/recipes/settings-panel.recipe.js +167 -0
  23. package/dist-server/src/manifest/recipes/stats-row.recipe.js +106 -0
  24. package/dist-server/src/manifest/validate.test.js +28 -0
  25. package/package.json +5 -1
  26. package/dist/LucentProvider-CzEDW5SL.cjs +0 -109
@@ -1,7 +1,15 @@
1
- import { jsxs as T, jsx as f, Fragment as Ve } from "react/jsx-runtime";
2
- import { forwardRef as xe, useState as P, useRef as q, useEffect as ne, useLayoutEffect as me, useId as Ke, useCallback as ue, useContext as yt, createContext as wt } from "react";
3
- import { createPortal as Dt } from "react-dom";
4
- const kt = {
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 U, useEffect as re, useLayoutEffect as ve, useId as Ze, useCallback as fe, useContext as Dt, createContext as St } from "react";
3
+ import { createPortal as kt } from "react-dom";
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 kt = {
37
45
  color: "var(--lucent-danger-text)",
38
46
  border: "1px solid transparent"
39
47
  }
40
- }, St = {
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
- }, Ye = xe(
47
- ({ variant: e = "primary", size: t = "md", loading: s = !1, fullWidth: a = !1, spread: n = !1, leftIcon: r, rightIcon: o, chevron: c = !1, disableHoverStyles: u = !1, bordered: i = !0, href: d, target: g, rel: h, children: p, disabled: y, style: I, type: k, onClick: L, ...b }, m) => {
48
- const w = y ?? s, R = !p && !s && (!!r || !!o), E = d !== void 0, X = E ? "a" : "button", A = {
54
+ }, Je = he(
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 kt = {
55
63
  lineHeight: 1,
56
64
  letterSpacing: "0.01em",
57
65
  borderRadius: "var(--lucent-radius-lg)",
58
- cursor: w ? "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
- ...St[t],
66
- ...R && { padding: 0, aspectRatio: "1" },
67
- ...kt[e],
73
+ ...Tt[t],
74
+ ...$ && { padding: 0, aspectRatio: "1" },
75
+ ...zt[e],
68
76
  // Anchor reset — browsers underline <a> by default
69
- ...E && { textDecoration: "none" },
70
- ...I,
71
- ...w && {
77
+ ...A && { textDecoration: "none" },
78
+ ...B,
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
- ...E && { pointerEvents: "none" }
83
+ ...A && { pointerEvents: "none" }
76
84
  },
77
85
  // hide border entirely when bordered prop is false
78
- ...i === !1 && { border: "none" }
86
+ ...d === !1 && { border: "none" }
79
87
  };
80
88
  return /* @__PURE__ */ T(
81
- X,
89
+ H,
82
90
  {
83
- ref: m,
91
+ ref: x,
84
92
  "aria-busy": s,
85
- style: A,
86
- ...E ? {
93
+ style: N,
94
+ ...A ? {
87
95
  role: "link",
88
- ...w ? { "aria-disabled": !0, tabIndex: -1 } : { href: d },
89
- ...g !== void 0 && { target: g },
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: w,
93
- ...k !== void 0 && { type: k }
100
+ disabled: D,
101
+ ...I !== void 0 && { type: I }
94
102
  },
95
- onMouseEnter: (D) => {
96
- var C;
97
- !w && !u && zt(D.currentTarget, e, i), (C = b.onMouseEnter) == null || C.call(b, D);
103
+ onMouseEnter: (k) => {
104
+ var R;
105
+ !D && !i && Bt(k.currentTarget, e, d), (R = p.onMouseEnter) == null || R.call(p, k);
98
106
  },
99
- onMouseLeave: (D) => {
100
- var C;
101
- !w && !u && Tt(D.currentTarget, e, i), (C = b.onMouseLeave) == null || C.call(b, D);
107
+ onMouseLeave: (k) => {
108
+ var R;
109
+ !D && !i && $t(k.currentTarget, e, d), (R = p.onMouseLeave) == null || R.call(p, k);
102
110
  },
103
- onMouseDown: (D) => {
104
- var C;
105
- if (!w) {
106
- const B = 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 ${B}`, D.currentTarget.dataset.pressed = "1";
111
+ onMouseDown: (k) => {
112
+ var R;
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
- (C = b.onMouseDown) == null || C.call(b, D);
117
+ (R = p.onMouseDown) == null || R.call(p, k);
110
118
  },
111
- onMouseUp: (D) => {
112
- var C;
113
- D.currentTarget.style.transform = "", D.currentTarget.style.boxShadow = "", delete D.currentTarget.dataset.pressed, (C = b.onMouseUp) == null || C.call(b, D);
119
+ onMouseUp: (k) => {
120
+ var R;
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) => {
116
- var C;
117
- D.currentTarget.dataset.pressed || (D.currentTarget.style.boxShadow = "0 0 0 3px var(--lucent-accent-subtle)"), (C = b.onFocus) == null || C.call(b, D);
123
+ onFocus: (k) => {
124
+ var R;
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) => {
120
- var C;
121
- D.currentTarget.style.boxShadow = "", (C = b.onBlur) == null || C.call(b, D);
127
+ onBlur: (k) => {
128
+ var R;
129
+ k.currentTarget.style.boxShadow = "", (R = p.onBlur) == null || R.call(p, k);
122
130
  },
123
- onClick: (D) => {
124
- if (E && w) {
125
- D.preventDefault();
131
+ onClick: (k) => {
132
+ if (A && D) {
133
+ k.preventDefault();
126
134
  return;
127
135
  }
128
- L == null || L(D);
136
+ S == null || S(k);
129
137
  },
130
- ...b,
138
+ ...p,
131
139
  children: [
132
140
  r,
133
- s ? /* @__PURE__ */ f($t, {}) : p,
141
+ s ? /* @__PURE__ */ f(Rt, {}) : b,
134
142
  !s && o,
135
- !s && c && /* @__PURE__ */ f(Bt, { size: t })
143
+ !s && c && /* @__PURE__ */ f(Lt, { size: t })
136
144
  ]
137
145
  }
138
146
  );
139
147
  }
140
148
  );
141
- Ye.displayName = "Button";
142
- const Mt = {
149
+ Je.displayName = "Button";
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,32 +156,32 @@ const Mt = {
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 zt(e, t, s) {
152
- e.style.transform = "translateY(-1px)", e.style.boxShadow = Mt[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))");
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 Tt(e, t, s) {
162
+ function $t(e, t, s) {
155
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 It = { "2xs": 8, xs: 10, sm: 12, md: 14, lg: 16 };
158
- function Bt({ size: e }) {
159
- const t = It[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 $t() {
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 Lt = {
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)"
172
- }, Pe = {
180
+ }, He = {
173
181
  sm: "var(--lucent-font-size-sm)",
174
182
  md: "var(--lucent-font-size-md)",
175
183
  lg: "var(--lucent-font-size-md)"
176
- }, Me = {
184
+ }, Te = {
177
185
  sm: "var(--lucent-font-size-sm)",
178
186
  md: "var(--lucent-font-size-sm)",
179
187
  lg: "var(--lucent-font-size-md)"
@@ -181,11 +189,11 @@ const Lt = {
181
189
  sm: "var(--lucent-space-3)",
182
190
  md: "var(--lucent-space-4)",
183
191
  lg: "var(--lucent-space-4)"
184
- }, We = {
192
+ }, Ne = {
185
193
  sm: "calc(var(--lucent-space-3) + 14px + var(--lucent-space-2))",
186
194
  md: "calc(var(--lucent-space-4) + 18px + var(--lucent-space-2))",
187
195
  lg: "calc(var(--lucent-space-4) + 20px + var(--lucent-space-3))"
188
- }, te = xe(
196
+ }, te = he(
189
197
  ({
190
198
  size: e = "md",
191
199
  label: t,
@@ -195,29 +203,29 @@ const Lt = {
195
203
  rightElement: r,
196
204
  prefix: o,
197
205
  suffix: c,
198
- id: u,
199
- style: i,
200
- ...d
201
- }, g) => {
202
- const h = u ?? `lucent-input-${Math.random().toString(36).slice(2, 7)}`, p = !!a, y = !!d.disabled, [I, k] = P(!1), [L, b] = P(!1), m = y ? "transparent" : p ? "var(--lucent-danger-default)" : I ? "var(--lucent-accent-border)" : L ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", w = I ? `0 0 0 3px ${p ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", R = {
206
+ id: i,
207
+ style: d,
208
+ ...u
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
- color: y ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
206
- fontSize: Pe[e],
213
+ color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
214
+ fontSize: He[e],
207
215
  fontFamily: "var(--lucent-font-family-base)",
208
216
  whiteSpace: "nowrap",
209
217
  userSelect: "none",
210
218
  flexShrink: 0
211
- }, E = { ...R, paddingLeft: ee[e], paddingRight: "2px" }, X = { ...R, paddingLeft: "2px", paddingRight: ee[e] };
212
- return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...i }, children: [
219
+ }, E = { ...$, paddingLeft: ee[e], paddingRight: "2px" }, A = { ...$, paddingLeft: "2px", paddingRight: ee[e] };
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",
215
223
  {
216
224
  htmlFor: h,
217
225
  style: {
218
- fontSize: Me[e],
226
+ fontSize: Te[e],
219
227
  fontWeight: "var(--lucent-font-weight-medium)",
220
- color: y ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
228
+ color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
221
229
  fontFamily: "var(--lucent-font-family-base)"
222
230
  },
223
231
  children: t
@@ -229,29 +237,29 @@ const Lt = {
229
237
  style: {
230
238
  display: "flex",
231
239
  alignItems: "stretch",
232
- height: Lt[e],
233
- border: `1px solid ${m}`,
240
+ height: Ft[e],
241
+ border: `1px solid ${x}`,
234
242
  borderRadius: "var(--lucent-radius-lg)",
235
- boxShadow: w,
236
- background: y ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
243
+ boxShadow: D,
244
+ background: v ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
237
245
  overflow: "hidden",
238
- cursor: y ? "not-allowed" : void 0,
246
+ cursor: v ? "not-allowed" : void 0,
239
247
  transition: [
240
248
  "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
241
249
  "box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)"
242
250
  ].join(", ")
243
251
  },
244
252
  onMouseEnter: () => {
245
- y || b(!0);
253
+ v || p(!0);
246
254
  },
247
- onMouseLeave: () => b(!1),
255
+ onMouseLeave: () => p(!1),
248
256
  children: [
249
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",
253
261
  left: ee[e],
254
- color: y ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
262
+ color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
255
263
  display: "flex",
256
264
  alignItems: "center",
257
265
  pointerEvents: "none"
@@ -259,66 +267,66 @@ const Lt = {
259
267
  /* @__PURE__ */ f(
260
268
  "input",
261
269
  {
262
- ref: g,
270
+ ref: m,
263
271
  id: h,
264
- "aria-invalid": p,
265
- "aria-describedby": p ? `${h}-error` : s ? `${h}-helper` : void 0,
272
+ "aria-invalid": b,
273
+ "aria-describedby": b ? `${h}-error` : s ? `${h}-helper` : void 0,
266
274
  style: {
267
275
  width: "100%",
268
276
  height: "100%",
269
- paddingLeft: n ? We[e] : ee[e],
270
- paddingRight: r ? We[e] : ee[e],
271
- fontSize: Pe[e],
277
+ paddingLeft: n ? Ne[e] : ee[e],
278
+ paddingRight: r ? Ne[e] : ee[e],
279
+ fontSize: He[e],
272
280
  fontFamily: "var(--lucent-font-family-base)",
273
- color: y ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
281
+ color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
274
282
  background: "transparent",
275
283
  border: "none",
276
284
  outline: "none",
277
- cursor: y ? "not-allowed" : void 0,
285
+ cursor: v ? "not-allowed" : void 0,
278
286
  boxSizing: "border-box"
279
287
  },
280
- ...d,
281
- onFocus: (A) => {
282
- var D;
283
- k(!0), (D = d.onFocus) == null || D.call(d, A);
288
+ ...u,
289
+ onFocus: (H) => {
290
+ var N;
291
+ I(!0), (N = u.onFocus) == null || N.call(u, H);
284
292
  },
285
- onBlur: (A) => {
286
- var D;
287
- k(!1), (D = d.onBlur) == null || D.call(d, A);
293
+ onBlur: (H) => {
294
+ var N;
295
+ I(!1), (N = u.onBlur) == null || N.call(u, H);
288
296
  }
289
297
  }
290
298
  ),
291
299
  r && /* @__PURE__ */ f("span", { style: {
292
300
  position: "absolute",
293
301
  right: ee[e],
294
- color: y ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
302
+ color: v ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
295
303
  display: "flex",
296
304
  alignItems: "center"
297
305
  }, children: r })
298
306
  ] }),
299
- c && /* @__PURE__ */ f("span", { style: X, children: c })
307
+ c && /* @__PURE__ */ f("span", { style: A, children: c })
300
308
  ]
301
309
  }
302
310
  ),
303
- p && /* @__PURE__ */ f(
311
+ b && /* @__PURE__ */ f(
304
312
  "span",
305
313
  {
306
314
  id: `${h}-error`,
307
315
  role: "alert",
308
316
  style: {
309
- fontSize: Me[e],
317
+ fontSize: Te[e],
310
318
  color: "var(--lucent-danger-text)",
311
319
  fontFamily: "var(--lucent-font-family-base)"
312
320
  },
313
321
  children: a
314
322
  }
315
323
  ),
316
- !p && s && /* @__PURE__ */ f(
324
+ !b && s && /* @__PURE__ */ f(
317
325
  "span",
318
326
  {
319
327
  id: `${h}-helper`,
320
328
  style: {
321
- fontSize: Me[e],
329
+ fontSize: Te[e],
322
330
  color: "var(--lucent-text-secondary)",
323
331
  fontFamily: "var(--lucent-font-family-base)"
324
332
  },
@@ -329,19 +337,19 @@ const Lt = {
329
337
  }
330
338
  );
331
339
  te.displayName = "Input";
332
- const Rt = {
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
- }, Ft = {
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 on({ variant: e = "neutral", size: t = "md", dot: s = !1, children: a, style: n }) {
344
- const r = Rt[e], o = Ft[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",
@@ -370,11 +378,11 @@ function on({ variant: e = "neutral", size: t = "md", dot: s = !1, children: a,
370
378
  a
371
379
  ] });
372
380
  }
373
- const Ct = { 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)" }, Pt = {
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
- }, He = "cubic-bezier(0.34, 1.56, 0.64, 1)", Wt = `
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,7 +390,7 @@ const Ct = { 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 ln({
393
+ function pn({
386
394
  label: e,
387
395
  size: t = "md",
388
396
  checked: s,
@@ -391,30 +399,30 @@ function ln({
391
399
  helperText: r,
392
400
  align: o = "left",
393
401
  disabled: c,
394
- id: u,
395
- onChange: i,
396
- style: d,
397
- ...g
402
+ id: i,
403
+ onChange: d,
404
+ style: u,
405
+ ...m
398
406
  }) {
399
- const h = u ?? `lucent-toggle-${Math.random().toString(36).slice(2, 7)}`, p = s !== void 0, [y, I] = P(a ?? !1), k = p ? !!s : y, L = q(k), [b, m] = P(0), [w, R] = P(!1);
400
- ne(() => {
401
- if (!c && L.current !== k) {
402
- L.current = k, m((_) => _ + 1), R(!0);
403
- const j = setTimeout(() => R(!1), 150);
404
- return () => clearTimeout(j);
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);
408
+ re(() => {
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
- }, [k, c]);
407
- const { track: [E, X], thumb: A } = Pt[t], D = k ? E - A - 2 : 2, C = (j) => {
408
- p || I(j.target.checked), i == null || i(j);
409
- }, K = /* @__PURE__ */ T(
414
+ }, [I, c]);
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
423
  width: E,
416
- height: X,
417
- borderRadius: X / 2,
424
+ height: A,
425
+ borderRadius: A / 2,
418
426
  flexShrink: 0
419
427
  },
420
428
  children: [
@@ -425,12 +433,12 @@ function ln({
425
433
  position: "absolute",
426
434
  inset: 0,
427
435
  borderRadius: "inherit",
428
- background: c ? "var(--lucent-surface-secondary)" : k ? "var(--lucent-accent-default)" : "color-mix(in srgb, var(--lucent-text-primary) 12%, transparent)",
436
+ background: c ? "var(--lucent-surface-secondary)" : I ? "var(--lucent-accent-default)" : "color-mix(in srgb, var(--lucent-text-primary) 12%, transparent)",
429
437
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)",
430
- animation: b > 0 ? `lucent-toggle-pop 240ms ${He} forwards` : void 0
438
+ animation: p > 0 ? `lucent-toggle-pop 240ms ${Ee} forwards` : void 0
431
439
  }
432
440
  },
433
- b
441
+ p
434
442
  ),
435
443
  /* @__PURE__ */ f(
436
444
  "span",
@@ -438,19 +446,19 @@ function ln({
438
446
  style: {
439
447
  position: "absolute",
440
448
  top: 2,
441
- left: D,
442
- width: w ? A * 1.3 : A,
443
- height: A,
444
- borderRadius: A,
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
- transition: `left 260ms ${He}, width 200ms cubic-bezier(0.22, 1, 0.36, 1)`
455
+ transition: `left 260ms ${Ee}, width 200ms cubic-bezier(0.22, 1, 0.36, 1)`
448
456
  }
449
457
  }
450
458
  )
451
459
  ]
452
460
  }
453
- ), B = /* @__PURE__ */ T(
461
+ ), P = /* @__PURE__ */ T(
454
462
  "label",
455
463
  {
456
464
  style: {
@@ -463,7 +471,7 @@ function ln({
463
471
  fontSize: t === "sm" ? "var(--lucent-font-size-sm)" : "var(--lucent-font-size-md)",
464
472
  color: c ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
465
473
  userSelect: "none",
466
- ...n ? {} : d
474
+ ...n ? {} : u
467
475
  },
468
476
  children: [
469
477
  /* @__PURE__ */ f(
@@ -472,15 +480,15 @@ function ln({
472
480
  type: "checkbox",
473
481
  role: "switch",
474
482
  id: h,
475
- checked: p ? s : y,
483
+ checked: b ? s : v,
476
484
  disabled: c,
477
- onChange: C,
478
- "aria-checked": k,
485
+ onChange: k,
486
+ "aria-checked": I,
479
487
  style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
480
- ...g
488
+ ...m
481
489
  }
482
490
  ),
483
- o === "left" && K,
491
+ o === "left" && R,
484
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)",
@@ -492,63 +500,63 @@ function ln({
492
500
  marginTop: "2px"
493
501
  }, children: r })
494
502
  ] }) : null,
495
- o === "right" && K
503
+ o === "right" && R
496
504
  ]
497
505
  }
498
506
  );
499
- return /* @__PURE__ */ T(Ve, { children: [
500
- /* @__PURE__ */ f("style", { children: Wt }),
507
+ return /* @__PURE__ */ T(Ye, { children: [
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: Ct[t], padding: "0 var(--lucent-space-3)", display: "flex", alignItems: "center" },
508
- background: k && !c ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "transparent",
515
+ ...r ? { padding: "var(--lucent-space-3)" } : { minHeight: Ht[t], padding: "0 var(--lucent-space-3)", display: "flex", alignItems: "center" },
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
- ...d
519
+ ...u
512
520
  },
513
- onClick: (j) => {
514
- if (!c && j.target === j.currentTarget) {
515
- const _ = j.currentTarget.querySelector("input");
516
- _ == null || _.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
- children: B
527
+ children: P
520
528
  }
521
- ) : B
529
+ ) : P
522
530
  ] });
523
531
  }
524
- const Ht = {
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
- }, Nt = {
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)"
532
- }, ze = {
540
+ }, Ie = {
533
541
  sm: "var(--lucent-font-size-sm)",
534
542
  md: "var(--lucent-font-size-sm)",
535
543
  lg: "var(--lucent-font-size-md)"
536
- }, Ne = {
544
+ }, Ae = {
537
545
  sm: "var(--lucent-space-2)",
538
546
  md: "var(--lucent-space-3)",
539
547
  lg: "var(--lucent-space-3)"
540
- }, Ze = xe(
541
- ({ options: e, size: t = "md", label: s, helperText: a, errorText: n, placeholder: r, disabled: o, id: c, style: u, ...i }, d) => {
542
- const g = c ?? `lucent-select-${Math.random().toString(36).slice(2, 7)}`, h = !!n, p = !!o, [y, I] = P(!1), [k, L] = P(!1), b = p ? "transparent" : h ? "var(--lucent-danger-default)" : y ? "var(--lucent-accent-border)" : k ? "var(--lucent-border-strong)" : "var(--lucent-border-default)", m = y ? `0 0 0 3px ${h ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
543
- return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...u }, children: [
548
+ }, Qe = he(
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";
551
+ return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%", ...i }, children: [
544
552
  s && /* @__PURE__ */ f(
545
553
  "label",
546
554
  {
547
- htmlFor: g,
555
+ htmlFor: m,
548
556
  style: {
549
- fontSize: ze[t],
557
+ fontSize: Ie[t],
550
558
  fontWeight: "var(--lucent-font-weight-medium)",
551
- color: p ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
559
+ color: b ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
552
560
  fontFamily: "var(--lucent-font-family-base)"
553
561
  },
554
562
  children: s
@@ -561,60 +569,60 @@ const Ht = {
561
569
  position: "relative",
562
570
  display: "flex",
563
571
  alignItems: "center",
564
- height: Ht[t],
565
- border: `1px solid ${b}`,
572
+ height: At[t],
573
+ border: `1px solid ${p}`,
566
574
  borderRadius: "var(--lucent-radius-lg)",
567
- boxShadow: m,
568
- background: p ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
569
- cursor: p ? "not-allowed" : "pointer",
575
+ boxShadow: x,
576
+ background: b ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
577
+ cursor: b ? "not-allowed" : "pointer",
570
578
  transition: [
571
579
  "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
572
580
  "box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)"
573
581
  ].join(", ")
574
582
  },
575
583
  onMouseEnter: () => {
576
- p || L(!0);
584
+ b || S(!0);
577
585
  },
578
- onMouseLeave: () => L(!1),
586
+ onMouseLeave: () => S(!1),
579
587
  children: [
580
588
  /* @__PURE__ */ T(
581
589
  "select",
582
590
  {
583
- ref: d,
584
- id: g,
591
+ ref: u,
592
+ id: m,
585
593
  disabled: o,
586
594
  "aria-invalid": h,
587
- "aria-describedby": h ? `${g}-error` : a ? `${g}-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
- padding: `0 var(--lucent-space-8) 0 ${Ne[t]}`,
592
- fontSize: Nt[t],
599
+ padding: `0 var(--lucent-space-8) 0 ${Ae[t]}`,
600
+ fontSize: Ot[t],
593
601
  fontFamily: "var(--lucent-font-family-base)",
594
- color: p ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
602
+ color: b ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
595
603
  background: "transparent",
596
604
  border: "none",
597
605
  borderRadius: "var(--lucent-radius-lg)",
598
606
  outline: "none",
599
607
  appearance: "none",
600
- cursor: p ? "not-allowed" : "pointer",
608
+ cursor: b ? "not-allowed" : "pointer",
601
609
  boxSizing: "border-box"
602
610
  },
603
- onFocus: (w) => {
604
- var R;
605
- p || I(!0), (R = i.onFocus) == null || R.call(i, w);
611
+ onFocus: (D) => {
612
+ var $;
613
+ b || B(!0), ($ = d.onFocus) == null || $.call(d, D);
606
614
  },
607
- onBlur: (w) => {
608
- var R;
609
- I(!1), (R = i.onBlur) == null || R.call(i, w);
615
+ onBlur: (D) => {
616
+ var $;
617
+ B(!1), ($ = d.onBlur) == null || $.call(d, D);
610
618
  },
611
619
  onMouseDown: () => {
612
- p || I(!0);
620
+ b || B(!0);
613
621
  },
614
- ...i,
622
+ ...d,
615
623
  children: [
616
624
  r && /* @__PURE__ */ f("option", { value: "", disabled: !0, children: r }),
617
- e.map((w) => /* @__PURE__ */ f("option", { value: w.value, disabled: w.disabled, children: w.label }, w.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
  ),
@@ -624,9 +632,9 @@ const Ht = {
624
632
  "aria-hidden": !0,
625
633
  style: {
626
634
  position: "absolute",
627
- right: Ne[t],
635
+ right: Ae[t],
628
636
  pointerEvents: "none",
629
- color: p ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
637
+ color: b ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
630
638
  display: "flex",
631
639
  alignItems: "center"
632
640
  },
@@ -639,10 +647,10 @@ const Ht = {
639
647
  h && /* @__PURE__ */ f(
640
648
  "span",
641
649
  {
642
- id: `${g}-error`,
650
+ id: `${m}-error`,
643
651
  role: "alert",
644
652
  style: {
645
- fontSize: ze[t],
653
+ fontSize: Ie[t],
646
654
  color: "var(--lucent-danger-text)",
647
655
  fontFamily: "var(--lucent-font-family-base)"
648
656
  },
@@ -652,9 +660,9 @@ const Ht = {
652
660
  !h && a && /* @__PURE__ */ f(
653
661
  "span",
654
662
  {
655
- id: `${g}-helper`,
663
+ id: `${m}-helper`,
656
664
  style: {
657
- fontSize: ze[t],
665
+ fontSize: Ie[t],
658
666
  color: "var(--lucent-text-secondary)",
659
667
  fontFamily: "var(--lucent-font-family-base)"
660
668
  },
@@ -664,8 +672,8 @@ const Ht = {
664
672
  ] });
665
673
  }
666
674
  );
667
- Ze.displayName = "Select";
668
- const Et = {
675
+ Qe.displayName = "Select";
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 Et = {
675
683
  warning: "var(--lucent-warning-text)",
676
684
  danger: "var(--lucent-danger-text)",
677
685
  info: "var(--lucent-info-text)"
678
- }, At = {
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,21 +691,21 @@ const Et = {
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
- }, Ot = {
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
- }, Xt = {
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
- }, jt = {
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 cn({
708
+ function gn({
701
709
  as: e = "p",
702
710
  size: t = "md",
703
711
  weight: s = "regular",
@@ -706,28 +714,28 @@ function cn({
706
714
  lineHeight: r = "base",
707
715
  family: o = "base",
708
716
  truncate: c = !1,
709
- children: u,
710
- style: i,
711
- ...d
717
+ children: i,
718
+ style: d,
719
+ ...u
712
720
  }) {
713
- const g = {
714
- fontSize: At[t],
715
- fontWeight: Ot[s],
716
- color: Et[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: Xt[r],
719
- fontFamily: jt[o],
726
+ lineHeight: qt[r],
727
+ fontFamily: Gt[o],
720
728
  margin: 0,
721
729
  ...c && {
722
730
  overflow: "hidden",
723
731
  textOverflow: "ellipsis",
724
732
  whiteSpace: "nowrap"
725
733
  },
726
- ...i
734
+ ...d
727
735
  };
728
- return /* @__PURE__ */ f(e, { style: g, ...d, children: u });
736
+ return /* @__PURE__ */ f(e, { style: m, ...u, children: i });
729
737
  }
730
- const Ut = { sm: "3px", md: "4px", lg: "5px" }, qt = { sm: "14px", md: "18px", lg: "22px" }, Gt = `
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,7 +829,7 @@ const Ut = { sm: "3px", md: "4px", lg: "5px" }, qt = { sm: "14px", md: "18px", l
821
829
  cursor: not-allowed;
822
830
  }
823
831
  `;
824
- function un({
832
+ function bn({
825
833
  label: e,
826
834
  showValue: t = !1,
827
835
  size: s = "md",
@@ -830,19 +838,19 @@ function un({
830
838
  step: r = 1,
831
839
  value: o,
832
840
  defaultValue: c,
833
- disabled: u,
834
- id: i,
835
- onChange: d,
836
- style: g,
841
+ disabled: i,
842
+ id: d,
843
+ onChange: u,
844
+ style: m,
837
845
  ...h
838
846
  }) {
839
- const p = i ?? `lucent-slider-${Math.random().toString(36).slice(2, 7)}`, y = o !== void 0, [I, k] = P(
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
- ), L = y ? o : I, b = `${(L - a) / (n - a) * 100}%`, m = (w) => {
842
- y || k(Number(w.target.value)), d == null || d(w);
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
- return /* @__PURE__ */ T(Ve, { children: [
845
- /* @__PURE__ */ f("style", { children: Gt }),
852
+ return /* @__PURE__ */ T(Ye, { children: [
853
+ /* @__PURE__ */ f("style", { children: Kt }),
846
854
  /* @__PURE__ */ T(
847
855
  "div",
848
856
  {
@@ -852,7 +860,7 @@ function un({
852
860
  gap: "var(--lucent-space-1)",
853
861
  width: "100%",
854
862
  fontFamily: "var(--lucent-font-family-base)",
855
- ...g
863
+ ...m
856
864
  },
857
865
  children: [
858
866
  (e || t) && /* @__PURE__ */ T(
@@ -867,12 +875,12 @@ function un({
867
875
  e && /* @__PURE__ */ f(
868
876
  "label",
869
877
  {
870
- htmlFor: p,
878
+ htmlFor: b,
871
879
  style: {
872
880
  fontSize: "var(--lucent-font-size-sm)",
873
881
  fontWeight: "var(--lucent-font-weight-medium)",
874
- color: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
875
- cursor: u ? "not-allowed" : "default"
882
+ color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
883
+ cursor: i ? "not-allowed" : "default"
876
884
  },
877
885
  children: e
878
886
  }
@@ -882,10 +890,10 @@ function un({
882
890
  {
883
891
  style: {
884
892
  fontSize: "var(--lucent-font-size-sm)",
885
- color: u ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
893
+ color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
886
894
  fontVariantNumeric: "tabular-nums"
887
895
  },
888
- children: L
896
+ children: S
889
897
  }
890
898
  )
891
899
  ]
@@ -895,18 +903,18 @@ function un({
895
903
  "input",
896
904
  {
897
905
  type: "range",
898
- id: p,
906
+ id: b,
899
907
  className: "lucent-slider",
900
908
  min: a,
901
909
  max: n,
902
910
  step: r,
903
- disabled: u,
904
- value: y ? o : I,
905
- onChange: m,
911
+ disabled: i,
912
+ value: v ? o : B,
913
+ onChange: x,
906
914
  style: {
907
- "--ls-track-h": Ut[s],
908
- "--ls-thumb": qt[s],
909
- "--ls-fill": b
915
+ "--ls-track-h": Vt[s],
916
+ "--ls-thumb": _t[s],
917
+ "--ls-fill": p
910
918
  },
911
919
  ...h
912
920
  }
@@ -916,20 +924,20 @@ function un({
916
924
  )
917
925
  ] });
918
926
  }
919
- const Ee = {
927
+ 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
- }, _t = {
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
- }, Vt = {
935
+ }, Zt = {
928
936
  sm: "var(--lucent-space-3)",
929
937
  md: "var(--lucent-space-4)",
930
938
  lg: "var(--lucent-space-5)"
931
939
  };
932
- function Je({
940
+ function et({
933
941
  options: e,
934
942
  value: t,
935
943
  defaultValue: s,
@@ -938,29 +946,29 @@ function Je({
938
946
  disabled: r = !1,
939
947
  fullWidth: o = !0,
940
948
  id: c,
941
- style: u
949
+ style: i
942
950
  }) {
943
- var L;
944
- const [i, d] = P(
945
- s ?? ((L = e[0]) == null ? void 0 : L.value) ?? ""
946
- ), g = t !== void 0 ? t : i, h = q(null), [p, y] = P(null), I = q(!1);
947
- me(() => {
948
- const b = h.current;
949
- if (!b) return;
950
- const m = () => {
951
- const R = b.querySelector(`[data-sc-value="${g}"]`);
952
- R && (y({
953
- left: R.offsetLeft,
954
- width: R.offsetWidth,
955
- animate: I.current
956
- }), I.current = !0);
951
+ var S;
952
+ const [d, u] = F(
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);
955
+ ve(() => {
956
+ const p = h.current;
957
+ if (!p) return;
958
+ const x = () => {
959
+ const $ = p.querySelector(`[data-sc-value="${m}"]`);
960
+ $ && (v({
961
+ left: $.offsetLeft,
962
+ width: $.offsetWidth,
963
+ animate: B.current
964
+ }), B.current = !0);
957
965
  };
958
- m();
959
- const w = new ResizeObserver(m);
960
- return w.observe(b), () => w.disconnect();
961
- }, [g, e]);
962
- const k = (b) => {
963
- r || b.disabled || (t === void 0 && d(b.value), a == null || a(b.value));
966
+ x();
967
+ const D = new ResizeObserver(x);
968
+ return D.observe(p), () => D.disconnect();
969
+ }, [m, e]);
970
+ const I = (p) => {
971
+ r || p.disabled || (t === void 0 && u(p.value), a == null || a(p.value));
964
972
  };
965
973
  return /* @__PURE__ */ T(
966
974
  "div",
@@ -973,7 +981,7 @@ function Je({
973
981
  display: "flex",
974
982
  alignItems: "center",
975
983
  width: o ? "100%" : "fit-content",
976
- height: Ee[n],
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.
979
987
  background: "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)",
@@ -981,39 +989,39 @@ function Je({
981
989
  padding: 0,
982
990
  gap: 0,
983
991
  opacity: r ? 0.5 : 1,
984
- ...u
992
+ ...i
985
993
  },
986
994
  children: [
987
- p && /* @__PURE__ */ f(
995
+ b && /* @__PURE__ */ f(
988
996
  "span",
989
997
  {
990
998
  "aria-hidden": !0,
991
999
  style: {
992
1000
  position: "absolute",
993
1001
  top: 3,
994
- left: p.left + 3,
995
- width: p.width - 6,
1002
+ left: b.left + 3,
1003
+ width: b.width - 6,
996
1004
  height: "calc(100% - 6px)",
997
1005
  background: "var(--lucent-surface)",
998
1006
  borderRadius: "var(--lucent-radius-lg)",
999
1007
  boxShadow: "var(--lucent-shadow-sm)",
1000
- transition: p.animate ? "left var(--lucent-duration-base) cubic-bezier(0.34, 1.56, 0.64, 1), width var(--lucent-duration-base) cubic-bezier(0.22, 1, 0.36, 1)" : "none",
1008
+ transition: b.animate ? "left var(--lucent-duration-base) cubic-bezier(0.34, 1.56, 0.64, 1), width var(--lucent-duration-base) cubic-bezier(0.22, 1, 0.36, 1)" : "none",
1001
1009
  zIndex: 0,
1002
1010
  pointerEvents: "none"
1003
1011
  }
1004
1012
  }
1005
1013
  ),
1006
- e.map((b) => {
1007
- const m = b.value === g, w = r || !!b.disabled;
1014
+ e.map((p) => {
1015
+ const x = p.value === m, D = r || !!p.disabled;
1008
1016
  return /* @__PURE__ */ f(
1009
1017
  "button",
1010
1018
  {
1011
- "data-sc-value": b.value,
1019
+ "data-sc-value": p.value,
1012
1020
  type: "button",
1013
1021
  role: "radio",
1014
- "aria-checked": m,
1015
- disabled: w,
1016
- onClick: () => k(b),
1022
+ "aria-checked": x,
1023
+ disabled: D,
1024
+ onClick: () => I(p),
1017
1025
  style: {
1018
1026
  position: "relative",
1019
1027
  zIndex: 1,
@@ -1022,16 +1030,16 @@ function Je({
1022
1030
  justifyContent: "center",
1023
1031
  gap: "var(--lucent-space-1)",
1024
1032
  flex: 1,
1025
- height: Ee[n],
1026
- padding: `0 ${Vt[n]}`,
1027
- fontSize: _t[n],
1033
+ height: Oe[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: w ? "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: w ? "not-allowed" : "pointer",
1042
+ cursor: D ? "not-allowed" : "pointer",
1035
1043
  outline: "none",
1036
1044
  whiteSpace: "nowrap",
1037
1045
  transition: [
@@ -1039,38 +1047,38 @@ function Je({
1039
1047
  "font-weight var(--lucent-duration-fast) var(--lucent-easing-default)"
1040
1048
  ].join(", ")
1041
1049
  },
1042
- onFocus: (R) => {
1043
- R.currentTarget.matches(":focus-visible") && (R.currentTarget.style.boxShadow = "0 0 0 2px var(--lucent-accent-subtle)");
1050
+ onFocus: ($) => {
1051
+ $.currentTarget.matches(":focus-visible") && ($.currentTarget.style.boxShadow = "0 0 0 2px var(--lucent-accent-subtle)");
1044
1052
  },
1045
- onBlur: (R) => {
1046
- R.currentTarget.style.boxShadow = "";
1053
+ onBlur: ($) => {
1054
+ $.currentTarget.style.boxShadow = "";
1047
1055
  },
1048
- children: b.label
1056
+ children: p.label
1049
1057
  },
1050
- b.value
1058
+ p.value
1051
1059
  );
1052
1060
  })
1053
1061
  ]
1054
1062
  }
1055
1063
  );
1056
1064
  }
1057
- Je.displayName = "SegmentedControl";
1058
- const Kt = {
1065
+ et.displayName = "SegmentedControl";
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
- }, Yt = {
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
- }, Ae = "inset 0 0 0 1px rgba(0,0,0,0.2)", Oe = "inset 0 0 0 2px rgba(0,0,0,0.5)", Zt = "inset 0 0 0 1px rgba(0,0,0,0.2), 0 0 0 3px var(--lucent-accent-subtle)";
1073
- function Jt(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})`,
@@ -1084,7 +1092,7 @@ function Jt(e) {
1084
1092
  backgroundColor: "#fff"
1085
1093
  };
1086
1094
  }
1087
- const de = xe(({
1095
+ const pe = he(({
1088
1096
  color: e,
1089
1097
  size: t = "md",
1090
1098
  shape: s = "circle",
@@ -1093,75 +1101,75 @@ const de = xe(({
1093
1101
  disabled: r = !1,
1094
1102
  style: o,
1095
1103
  onFocus: c,
1096
- onBlur: u,
1097
- onClick: i,
1098
- ...d
1099
- }, g) => {
1100
- const h = Kt[t], p = s === "circle" ? "50%" : Yt[t];
1104
+ onBlur: i,
1105
+ onClick: d,
1106
+ ...u
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: g,
1112
+ ref: m,
1105
1113
  type: "button",
1106
1114
  disabled: r,
1107
- onClick: i,
1115
+ onClick: d,
1108
1116
  style: {
1109
1117
  width: h,
1110
1118
  height: h,
1111
1119
  flexShrink: 0,
1112
- ...a ? Jt(e) : { background: e },
1120
+ ...a ? ta(e) : { background: e },
1113
1121
  border: "none",
1114
- borderRadius: p,
1115
- cursor: r ? "not-allowed" : i ? "pointer" : "default",
1122
+ borderRadius: b,
1123
+ cursor: r ? "not-allowed" : d ? "pointer" : "default",
1116
1124
  padding: 0,
1117
1125
  outline: "none",
1118
1126
  opacity: r ? 0.4 : 1,
1119
- boxShadow: n ? Oe : Ae,
1127
+ boxShadow: n ? je : Xe,
1120
1128
  transition: "box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
1121
1129
  ...o
1122
1130
  },
1123
- onFocus: (y) => {
1124
- r || (y.currentTarget.style.boxShadow = Zt), c == null || c(y);
1131
+ onFocus: (v) => {
1132
+ r || (v.currentTarget.style.boxShadow = ea), c == null || c(v);
1125
1133
  },
1126
- onBlur: (y) => {
1127
- y.currentTarget.style.boxShadow = n ? Oe : Ae, u == null || u(y);
1134
+ onBlur: (v) => {
1135
+ v.currentTarget.style.boxShadow = n ? je : Xe, i == null || i(v);
1128
1136
  },
1129
- ...d
1137
+ ...u
1130
1138
  }
1131
1139
  );
1132
1140
  });
1133
- de.displayName = "ColorSwatch";
1134
- function pe(e, t, s) {
1141
+ pe.displayName = "ColorSwatch";
1142
+ function be(e, t, s) {
1135
1143
  return Math.max(t, Math.min(s, e));
1136
1144
  }
1137
- function Qt(e, t, s) {
1145
+ function aa(e, t, s) {
1138
1146
  const a = t / 100, n = s / 100, r = n * a, o = r * (1 - Math.abs(e / 60 % 2 - 1)), c = n - r;
1139
- let u = 0, i = 0, d = 0;
1140
- return e < 60 ? (u = r, i = o) : e < 120 ? (u = o, i = r) : e < 180 ? (i = r, d = o) : e < 240 ? (i = o, d = r) : e < 300 ? (u = o, d = r) : (u = r, d = o), { r: Math.round((u + c) * 255), g: Math.round((i + c) * 255), b: Math.round((d + c) * 255) };
1141
- }
1142
- function ea(e, t, s) {
1143
- const a = e / 255, n = t / 255, r = s / 255, o = Math.max(a, n, r), c = Math.min(a, n, r), u = o - c, i = o, d = o === 0 ? 0 : u / o;
1144
- let g = 0;
1145
- return u !== 0 && (o === a ? g = ((n - r) / u + (n < r ? 6 : 0)) / 6 : o === n ? g = ((r - a) / u + 2) / 6 : g = ((a - n) / u + 4) / 6), { h: Math.round(g * 360), s: Math.round(d * 100), v: Math.round(i * 100) };
1146
- }
1147
- function ta(e, t, s) {
1148
- const a = e / 255, n = t / 255, r = s / 255, o = Math.max(a, n, r), c = Math.min(a, n, r), u = (o + c) / 2;
1149
- if (o === c) return { h: 0, s: 0, l: Math.round(u * 100) };
1150
- const i = o - c, d = u > 0.5 ? i / (2 - o - c) : i / (o + c);
1151
- let g = 0;
1152
- return o === a ? g = ((n - r) / i + (n < r ? 6 : 0)) / 6 : o === n ? g = ((r - a) / i + 2) / 6 : g = ((a - n) / i + 4) / 6, { h: Math.round(g * 360), s: Math.round(d * 100), l: Math.round(u * 100) };
1153
- }
1154
- function fe(e, t, s) {
1147
+ let i = 0, d = 0, u = 0;
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) {
1155
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
- let u = 0, i = 0, d = 0;
1157
- return e < 60 ? (u = r, i = o) : e < 120 ? (u = o, i = r) : e < 180 ? (i = r, d = o) : e < 240 ? (i = o, d = r) : e < 300 ? (u = o, d = r) : (u = r, d = o), { r: Math.round((u + c) * 255), g: Math.round((i + c) * 255), b: Math.round((d + c) * 255) };
1164
+ let i = 0, d = 0, u = 0;
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
- function Re(e) {
1167
+ function Fe(e) {
1160
1168
  const t = e.replace("#", "");
1161
1169
  return t.length === 3 ? `#${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}` : t.length === 6 || t.length === 8 ? `#${t}` : "#000000";
1162
1170
  }
1163
- function Qe(e) {
1164
- const t = Re(e);
1171
+ function tt(e) {
1172
+ const t = Fe(e);
1165
1173
  return {
1166
1174
  r: parseInt(t.slice(1, 3), 16),
1167
1175
  g: parseInt(t.slice(3, 5), 16),
@@ -1169,38 +1177,38 @@ function Qe(e) {
1169
1177
  a: t.length === 9 ? +(parseInt(t.slice(7, 9), 16) / 255).toFixed(2) : 1
1170
1178
  };
1171
1179
  }
1172
- function $e({ r: e, g: t, b: s, a }) {
1173
- const n = (o) => pe(Math.round(o), 0, 255).toString(16).padStart(2, "0"), r = `#${n(e)}${n(t)}${n(s)}`;
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 et({ h: e, s: t, v: s, a }) {
1177
- return { ...Qt(e, t, s), a };
1184
+ function at({ h: e, s: t, v: s, a }) {
1185
+ return { ...aa(e, t, s), a };
1178
1186
  }
1179
- function G({ r: e, g: t, b: s, a }) {
1180
- return { ...ea(e, t, s), a };
1187
+ function q({ r: e, g: t, b: s, a }) {
1188
+ return { ...na(e, t, s), a };
1181
1189
  }
1182
- function oe(e) {
1183
- return $e(et(e));
1190
+ function ce(e) {
1191
+ return Le(at(e));
1184
1192
  }
1185
- function le(e) {
1193
+ function ie(e) {
1186
1194
  const t = e.trim();
1187
1195
  if (t.startsWith("#")) {
1188
- const n = Re(t);
1189
- return /^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n) ? Qe(n) : null;
1196
+ const n = Fe(t);
1197
+ return /^#[0-9a-f]{6}([0-9a-f]{2})?$/i.test(n) ? tt(n) : null;
1190
1198
  }
1191
1199
  const s = t.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*([\d.]+))?\s*\)$/);
1192
1200
  if (s) {
1193
1201
  const n = +(s[1] ?? "0"), r = +(s[2] ?? "0"), o = +(s[3] ?? "0"), c = s[4] !== void 0 ? +s[4] : 1;
1194
- return [n, r, o].every((u) => u <= 255) && c >= 0 && c <= 1 ? { r: n, g: r, b: o, a: c } : null;
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
1206
  const n = +(a[1] ?? "0"), r = +(a[2] ?? "0"), o = +(a[3] ?? "0");
1199
- return n <= 360 && r <= 100 && o <= 100 ? { ...fe(n, r, o), a: 1 } : null;
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 aa = [
1211
+ const sa = [
1204
1212
  {
1205
1213
  label: "Presets",
1206
1214
  colors: [
@@ -1215,36 +1223,36 @@ const aa = [
1215
1223
  "#e11d48"
1216
1224
  ]
1217
1225
  }
1218
- ], na = [
1226
+ ], oa = [
1219
1227
  "linear-gradient(45deg, #c0c0c0 25%, transparent 25%)",
1220
1228
  "linear-gradient(-45deg, #c0c0c0 25%, transparent 25%)",
1221
1229
  "linear-gradient(45deg, transparent 75%, #c0c0c0 75%)",
1222
1230
  "linear-gradient(-45deg, transparent 75%, #c0c0c0 75%)"
1223
1231
  ].join(", ");
1224
- function Xe({ value: e, min: t, max: s, onChange: a, trackStyle: n, formatTooltip: r }) {
1225
- const o = q(null), [c, u] = P(!1), i = ue((g) => {
1226
- const h = o.current.getBoundingClientRect(), p = pe((g.clientX - h.left) / h.width, 0, 1);
1227
- a(t + p * (s - t));
1228
- }, [t, s, a]), d = (e - t) / (s - 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
1240
  ref: o,
1233
1241
  style: { position: "relative", height: 12, borderRadius: 6, cursor: "crosshair", userSelect: "none", ...n },
1234
- onPointerDown: (g) => {
1235
- g.currentTarget.setPointerCapture(g.pointerId), u(!0), i(g);
1242
+ onPointerDown: (m) => {
1243
+ m.currentTarget.setPointerCapture(m.pointerId), i(!0), d(m);
1236
1244
  },
1237
- onPointerMove: (g) => {
1238
- g.buttons > 0 && i(g);
1245
+ onPointerMove: (m) => {
1246
+ m.buttons > 0 && d(m);
1239
1247
  },
1240
- onPointerUp: () => u(!1),
1241
- onPointerCancel: () => u(!1),
1248
+ onPointerUp: () => i(!1),
1249
+ onPointerCancel: () => i(!1),
1242
1250
  children: /* @__PURE__ */ f(
1243
1251
  "div",
1244
1252
  {
1245
1253
  style: {
1246
1254
  position: "absolute",
1247
- left: `${d}%`,
1255
+ left: `${u}%`,
1248
1256
  top: "50%",
1249
1257
  transform: "translate(-50%, -50%)",
1250
1258
  width: 14,
@@ -1277,78 +1285,78 @@ function Xe({ value: e, min: t, max: s, onChange: a, trackStyle: n, formatToolti
1277
1285
  }
1278
1286
  );
1279
1287
  }
1280
- function ra() {
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 sa({
1295
+ function ca({
1288
1296
  value: e,
1289
1297
  onChange: t,
1290
1298
  label: s,
1291
1299
  size: a = "md",
1292
1300
  inline: n = !1,
1293
1301
  disabled: r = !1,
1294
- presetGroups: o = aa,
1302
+ presetGroups: o = sa,
1295
1303
  portalContainer: c,
1296
- id: u,
1297
- style: i
1304
+ id: i,
1305
+ style: d
1298
1306
  }) {
1299
- var S, W;
1300
- const d = a === "sm" ? 24 : 40, g = Ke(), h = u ?? g, [p, y] = P(!1), [I, k] = P("hex"), [L, b] = P(0), [m, w] = P(() => {
1301
- const l = e ? le(e) ?? { r: 0, g: 0, b: 0, a: 1 } : { r: 0, g: 0, b: 0, a: 1 };
1302
- return G(l);
1303
- }), [R, E] = P(() => oe(m).slice(1).toUpperCase()), X = q(null), A = q(null), D = q(null), [C, K] = P({ top: 0, left: 0 });
1304
- me(() => {
1305
- if (!p || !X.current) return;
1306
- const l = X.current.getBoundingClientRect();
1307
- let x = l.left;
1308
- const z = l.bottom + 8;
1309
- if (D.current) {
1310
- const $ = D.current.offsetWidth;
1311
- x + $ > window.innerWidth && (x = l.right - $);
1307
+ var w, L;
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(() => {
1309
+ const l = e ? ie(e) ?? { r: 0, g: 0, b: 0, a: 1 } : { r: 0, g: 0, b: 0, a: 1 };
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 });
1312
+ ve(() => {
1313
+ if (!b || !A.current) return;
1314
+ const l = A.current.getBoundingClientRect();
1315
+ let g = l.left;
1316
+ const y = l.bottom + 8;
1317
+ if (N.current) {
1318
+ const M = N.current.offsetWidth;
1319
+ g + M > window.innerWidth && (g = l.right - M);
1312
1320
  }
1313
- K({ top: z, left: x });
1314
- }, [p]), ne(() => {
1321
+ R({ top: y, left: g });
1322
+ }, [b]), re(() => {
1315
1323
  if (!e) return;
1316
- const l = le(e);
1317
- l && (w(G(l)), E($e(l).slice(1).toUpperCase()));
1318
- }, [e]), ne(() => {
1319
- if (!p) return;
1320
- const l = (x) => {
1321
- var $, O;
1322
- const z = x.target;
1323
- ($ = X.current) != null && $.contains(z) || (O = D.current) != null && O.contains(z) || y(!1);
1324
+ const l = ie(e);
1325
+ l && (D(q(l)), E(Le(l).slice(1).toUpperCase()));
1326
+ }, [e]), re(() => {
1327
+ if (!b) return;
1328
+ const l = (g) => {
1329
+ var M, X;
1330
+ const y = g.target;
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
- }, [p]);
1327
- const B = ue((l) => {
1328
- w(l);
1329
- const x = oe(l);
1330
- E(x.slice(1).toUpperCase()), t == null || t(x);
1331
- }, [t]), j = ue((l) => {
1332
- const x = A.current.getBoundingClientRect(), z = Math.round(pe((l.clientX - x.left) / x.width, 0, 1) * 100), $ = Math.round((1 - pe((l.clientY - x.top) / x.height, 0, 1)) * 100);
1333
- B({ ...m, s: z, v: $ });
1334
- }, [m, B]), _ = ue(async () => {
1334
+ }, [b]);
1335
+ const P = fe((l) => {
1336
+ D(l);
1337
+ const g = ce(l);
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
- const l = await new window.EyeDropper().open(), x = le(l.sRGBHex);
1338
- x && B(G(x));
1345
+ const l = await new window.EyeDropper().open(), g = ie(l.sRGBHex);
1346
+ g && P(q(g));
1339
1347
  } catch {
1340
1348
  }
1341
- }, [B]), N = et(m), U = ta(N.r, N.g, N.b), ae = oe(m), Se = oe({ ...m, a: 1 }), Z = Math.round(m.a * 100), v = [
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" },
1345
1353
  { id: "hsb", label: "HSB" }
1346
- ], F = typeof window < "u" && "EyeDropper" in window;
1354
+ ], ne = typeof window < "u" && "EyeDropper" in window;
1347
1355
  return /* @__PURE__ */ T(
1348
1356
  "div",
1349
1357
  {
1350
- ref: X,
1351
- style: { display: "inline-flex", flexDirection: n ? "row" : "column", alignItems: n ? "center" : void 0, gap: "var(--lucent-space-1)", position: "relative", ...i },
1358
+ ref: A,
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: `
1354
1362
  .lucent-cp-field::-webkit-outer-spin-button,
@@ -1369,21 +1377,21 @@ function sa({
1369
1377
  }
1370
1378
  ),
1371
1379
  /* @__PURE__ */ f(
1372
- de,
1380
+ pe,
1373
1381
  {
1374
1382
  id: `${h}-swatch`,
1375
- color: `rgba(${N.r},${N.g},${N.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,
1379
- onClick: () => y((l) => !l),
1380
- "aria-expanded": p,
1387
+ onClick: () => v((l) => !l),
1388
+ "aria-expanded": b,
1381
1389
  "aria-haspopup": "dialog",
1382
1390
  style: {
1383
- width: d,
1384
- height: d,
1391
+ width: u,
1392
+ height: u,
1385
1393
  borderRadius: a === "sm" ? "var(--lucent-radius-md)" : "var(--lucent-radius-lg)",
1386
- boxShadow: p ? "inset 0 0 0 2px var(--lucent-accent-border), 0 0 0 3px var(--lucent-accent-subtle)" : "inset 0 0 0 1px rgba(0,0,0,0.2)"
1394
+ boxShadow: b ? "inset 0 0 0 2px var(--lucent-accent-border), 0 0 0 3px var(--lucent-accent-subtle)" : "inset 0 0 0 1px rgba(0,0,0,0.2)"
1387
1395
  }
1388
1396
  }
1389
1397
  ),
@@ -1401,17 +1409,17 @@ function sa({
1401
1409
  children: s
1402
1410
  }
1403
1411
  ),
1404
- p && Dt(
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: C.top,
1414
- left: C.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 sa({
1428
1436
  /* @__PURE__ */ T(
1429
1437
  "div",
1430
1438
  {
1431
- ref: A,
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), j(l);
1449
+ l.currentTarget.setPointerCapture(l.pointerId), O(l);
1442
1450
  },
1443
1451
  onPointerMove: (l) => {
1444
- l.buttons > 0 && j(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,
@@ -1464,9 +1472,9 @@ function sa({
1464
1472
  /* @__PURE__ */ T("div", { style: { padding: 12, display: "flex", flexDirection: "column", gap: 10 }, children: [
1465
1473
  /* @__PURE__ */ T("div", { style: { display: "flex", gap: 10, alignItems: "center" }, children: [
1466
1474
  /* @__PURE__ */ f(
1467
- de,
1475
+ pe,
1468
1476
  {
1469
- color: `rgba(${N.r},${N.g},${N.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 }
@@ -1474,12 +1482,12 @@ function sa({
1474
1482
  ),
1475
1483
  /* @__PURE__ */ T("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: 8 }, children: [
1476
1484
  /* @__PURE__ */ f(
1477
- Xe,
1485
+ Ue,
1478
1486
  {
1479
- value: m.h,
1487
+ value: x.h,
1480
1488
  min: 0,
1481
1489
  max: 360,
1482
- onChange: (l) => B({ ...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
  }
@@ -1488,19 +1496,19 @@ function sa({
1488
1496
  /* @__PURE__ */ f("div", { style: {
1489
1497
  position: "absolute",
1490
1498
  inset: 0,
1491
- backgroundImage: na,
1499
+ backgroundImage: oa,
1492
1500
  backgroundSize: "8px 8px",
1493
1501
  backgroundPosition: "0 0, 0 4px, 4px -4px, -4px 0",
1494
1502
  backgroundColor: "#fff"
1495
1503
  } }),
1496
- /* @__PURE__ */ f("div", { style: { position: "absolute", inset: 0, background: `linear-gradient(to right, transparent, ${Se})` } }),
1504
+ /* @__PURE__ */ f("div", { style: { position: "absolute", inset: 0, background: `linear-gradient(to right, transparent, ${le})` } }),
1497
1505
  /* @__PURE__ */ f(
1498
- Xe,
1506
+ Ue,
1499
1507
  {
1500
- value: m.a,
1508
+ value: x.a,
1501
1509
  min: 0,
1502
1510
  max: 1,
1503
- onChange: (l) => B({ ...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
  }
@@ -1509,24 +1517,24 @@ function sa({
1509
1517
  ] })
1510
1518
  ] }),
1511
1519
  /* @__PURE__ */ f(
1512
- Je,
1520
+ et,
1513
1521
  {
1514
1522
  size: "sm",
1515
- value: I,
1516
- onChange: (l) => k(l),
1517
- options: v.map(({ id: l, label: x }) => ({ value: l, label: x }))
1523
+ value: B,
1524
+ onChange: (l) => I(l),
1525
+ options: ze.map(({ id: l, label: g }) => ({ value: l, label: g }))
1518
1526
  }
1519
1527
  ),
1520
- I === "hex" && /* @__PURE__ */ T("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
1528
+ B === "hex" && /* @__PURE__ */ T("div", { style: { display: "flex", gap: 6, alignItems: "center" }, children: [
1521
1529
  /* @__PURE__ */ f(
1522
- Ye,
1530
+ Je,
1523
1531
  {
1524
1532
  variant: "secondary",
1525
1533
  size: "sm",
1526
- onClick: _,
1527
- disabled: !F,
1528
- title: F ? "Pick color from screen" : "Not supported in this browser",
1529
- leftIcon: /* @__PURE__ */ f(ra, {}),
1534
+ onClick: G,
1535
+ disabled: !ne,
1536
+ title: ne ? "Pick color from screen" : "Not supported in this browser",
1537
+ leftIcon: /* @__PURE__ */ f(la, {}),
1530
1538
  style: { flexShrink: 0, paddingLeft: 8, paddingRight: 8 }
1531
1539
  }
1532
1540
  ),
@@ -1535,14 +1543,14 @@ function sa({
1535
1543
  {
1536
1544
  size: "sm",
1537
1545
  prefix: "#",
1538
- value: R,
1546
+ value: $,
1539
1547
  onChange: (l) => {
1540
- const x = l.target.value.replace(/[^0-9a-fA-F]/g, "");
1541
- if (E(x.toUpperCase()), /^[0-9a-f]{6}$/i.test(x) || /^[0-9a-f]{8}$/i.test(x)) {
1542
- const z = le(`#${x}`);
1543
- if (z) {
1544
- const $ = G(z);
1545
- w($), t == null || t($e(z));
1548
+ const g = l.target.value.replace(/[^0-9a-fA-F]/g, "");
1549
+ if (E(g.toUpperCase()), /^[0-9a-f]{6}$/i.test(g) || /^[0-9a-f]{8}$/i.test(g)) {
1550
+ const y = ie(`#${g}`);
1551
+ if (y) {
1552
+ const M = q(y);
1553
+ D(M), t == null || t(Le(y));
1546
1554
  }
1547
1555
  }
1548
1556
  },
@@ -1558,62 +1566,62 @@ function sa({
1558
1566
  size: "sm",
1559
1567
  type: "number",
1560
1568
  suffix: "%",
1561
- value: Z,
1569
+ value: K,
1562
1570
  min: 0,
1563
1571
  max: 100,
1564
1572
  onChange: (l) => {
1565
- const x = +l.target.value;
1566
- !isNaN(x) && x >= 0 && x <= 100 && B({ ...m, a: x / 100 });
1573
+ const g = +l.target.value;
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 }
1570
1578
  }
1571
1579
  )
1572
1580
  ] }),
1573
- I === "rgb" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
1574
- { label: "R", val: N.r, max: 255, fn: (l) => B(G({ ...N, r: l })) },
1575
- { label: "G", val: N.g, max: 255, fn: (l) => B(G({ ...N, g: l })) },
1576
- { label: "B", val: N.b, max: 255, fn: (l) => B(G({ ...N, b: l })) },
1577
- { label: "A", val: Z, max: 100, fn: (l) => B({ ...m, a: l / 100 }) }
1578
- ].map(({ label: l, val: x, max: z, fn: $ }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: x, min: 0, max: z, onChange: (O) => {
1579
- const H = +O.target.value;
1580
- !isNaN(H) && H >= 0 && H <= z && $(H);
1581
+ B === "rgb" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
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
- I === "hsl" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
1583
- { label: "H", val: U.h, max: 360, fn: (l) => {
1584
- const { r: x, g: z, b: $ } = fe(l, U.s, U.l);
1585
- B(G({ r: x, g: z, b: $, a: m.a }));
1590
+ B === "hsl" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
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: U.s, max: 100, fn: (l) => {
1588
- const { r: x, g: z, b: $ } = fe(U.h, l, U.l);
1589
- B(G({ r: x, g: z, b: $, 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: U.l, max: 100, fn: (l) => {
1592
- const { r: x, g: z, b: $ } = fe(U.h, U.s, l);
1593
- B(G({ r: x, g: z, b: $, 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: Z, max: 100, fn: (l) => B({ ...m, a: l / 100 }) }
1596
- ].map(({ label: l, val: x, max: z, fn: $ }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: x, min: 0, max: z, onChange: (O) => {
1597
- const H = +O.target.value;
1598
- !isNaN(H) && H >= 0 && H <= z && $(H);
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
- I === "hsb" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
1601
- { label: "H", val: m.h, max: 360, fn: (l) => B({ ...m, h: l }) },
1602
- { label: "S", val: m.s, max: 100, fn: (l) => B({ ...m, s: l }) },
1603
- { label: "B", val: m.v, max: 100, fn: (l) => B({ ...m, v: l }) },
1604
- { label: "A", val: Z, max: 100, fn: (l) => B({ ...m, a: l / 100 }) }
1605
- ].map(({ label: l, val: x, max: z, fn: $ }) => /* @__PURE__ */ f(te, { size: "sm", type: "number", prefix: l, value: x, min: 0, max: z, onChange: (O) => {
1606
- const H = +O.target.value;
1607
- !isNaN(H) && H >= 0 && H <= z && $(H);
1608
+ B === "hsb" && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6 }, children: [
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
1617
  o.length > 0 && /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1610
1618
  o.length > 1 && /* @__PURE__ */ f(
1611
- Ze,
1619
+ Qe,
1612
1620
  {
1613
1621
  size: "sm",
1614
- value: String(L),
1615
- onChange: (l) => b(Number(l.target.value)),
1616
- options: o.map((l, x) => ({ value: String(x), label: l.label }))
1622
+ value: String(S),
1623
+ onChange: (l) => p(Number(l.target.value)),
1624
+ options: o.map((l, g) => ({ value: String(g), label: l.label }))
1617
1625
  }
1618
1626
  ),
1619
1627
  o.length === 1 && /* @__PURE__ */ f("span", { style: {
@@ -1621,15 +1629,15 @@ function sa({
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: (S = o[0]) == null ? void 0 : S.label }),
1625
- /* @__PURE__ */ f("div", { style: { display: "flex", gap: 6, flexWrap: "wrap" }, children: (((W = o[L]) == null ? void 0 : W.colors) ?? []).map((l) => {
1626
- const x = Re(l).toLowerCase() === ae.slice(0, 7).toLowerCase();
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) => {
1634
+ const g = Fe(l).toLowerCase() === ae.slice(0, 7).toLowerCase();
1627
1635
  return /* @__PURE__ */ f(
1628
- de,
1636
+ pe,
1629
1637
  {
1630
1638
  color: l,
1631
- selected: x,
1632
- onClick: () => B(G(Qe(l)))
1639
+ selected: g,
1640
+ onClick: () => P(q(tt(l)))
1633
1641
  },
1634
1642
  l
1635
1643
  );
@@ -1645,145 +1653,163 @@ function sa({
1645
1653
  }
1646
1654
  );
1647
1655
  }
1648
- sa.displayName = "ColorPicker";
1649
- function dn({ tabs: e, defaultValue: t, value: s, onChange: a, variant: n = "underline", style: r }) {
1650
- var Z;
1651
- const o = s !== void 0, [c, u] = P(t ?? ((Z = e[0]) == null ? void 0 : Z.value) ?? ""), i = o ? s : c, [d, g] = P(null), h = q([]), [p, y] = P(null), I = q(!1), k = n === "pills", L = q(null), b = q(null), m = q(null), [w, R] = P(e.length), [E, X] = P(!1), [A, D] = P(!1), [C, K] = P(null), B = e.slice(0, w), j = e.slice(w), _ = j.length > 0, N = j.some((v) => v.value === i), U = () => {
1652
- if (N) {
1653
- y(null);
1656
+ ca.displayName = "ColorPicker";
1657
+ const ia = {
1658
+ sm: {
1659
+ fontSize: "var(--lucent-font-size-sm)",
1660
+ buttonPadding: "var(--lucent-space-1) var(--lucent-space-1)",
1661
+ buttonPaddingUnderline: "0 var(--lucent-space-1) var(--lucent-space-2)",
1662
+ innerPadding: "var(--lucent-space-1) var(--lucent-space-2)",
1663
+ panelPadding: "var(--lucent-space-3) 0",
1664
+ dropdownPadding: "var(--lucent-space-1) var(--lucent-space-3)"
1665
+ },
1666
+ md: {
1667
+ fontSize: "var(--lucent-font-size-md)",
1668
+ buttonPadding: "var(--lucent-space-1) var(--lucent-space-2)",
1669
+ buttonPaddingUnderline: "var(--lucent-space-1) var(--lucent-space-2) var(--lucent-space-3)",
1670
+ innerPadding: "var(--lucent-space-1) var(--lucent-space-3)",
1671
+ panelPadding: "var(--lucent-space-4) 0",
1672
+ dropdownPadding: "var(--lucent-space-2) var(--lucent-space-4)"
1673
+ }
1674
+ };
1675
+ function mn({ tabs: e, defaultValue: t, value: s, onChange: a, variant: n = "underline", size: r = "md", style: o }) {
1676
+ var ne;
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 = () => {
1678
+ if (ae) {
1679
+ B(null);
1654
1680
  return;
1655
1681
  }
1656
- const v = e.findIndex((S, W) => W < w && S.value === i), F = h.current[v];
1657
- if (F) {
1658
- if (k) {
1659
- const S = F.querySelector("span");
1660
- if (!S) return;
1661
- y({ left: S.offsetLeft + F.offsetLeft, width: S.offsetWidth, animate: I.current });
1682
+ const w = e.findIndex((l, g) => g < E && l.value === u), L = b.current[w];
1683
+ if (L) {
1684
+ if (S) {
1685
+ const l = L.querySelector("span");
1686
+ if (!l) return;
1687
+ B({ left: l.offsetLeft + L.offsetLeft, width: l.offsetWidth, animate: I.current });
1662
1688
  } else
1663
- y({ left: F.offsetLeft, width: F.offsetWidth, animate: I.current });
1689
+ B({ left: L.offsetLeft, width: L.offsetWidth, animate: I.current });
1664
1690
  I.current = !0;
1665
1691
  }
1666
1692
  };
1667
- me(() => {
1668
- U(), document.fonts.ready.then(U);
1669
- }, [i, w, k]), ne(() => {
1670
- const v = L.current;
1671
- if (!v) return;
1672
- const F = () => {
1673
- const x = v.clientWidth, z = 70;
1674
- let $ = 0, O = 0;
1675
- for (let H = 0; H < e.length; H++) {
1676
- const J = h.current[H];
1693
+ ve(() => {
1694
+ le(), document.fonts.ready.then(le);
1695
+ }, [u, E, S]), re(() => {
1696
+ const w = x.current;
1697
+ if (!w) return;
1698
+ const L = () => {
1699
+ const M = w.clientWidth, X = 70;
1700
+ let C = 0, Y = 0;
1701
+ for (let Z = 0; Z < e.length; Z++) {
1702
+ const J = b.current[Z];
1677
1703
  if (!J) {
1678
- O++;
1704
+ Y++;
1679
1705
  continue;
1680
1706
  }
1681
1707
  const Q = J.offsetWidth;
1682
- if (H < e.length - 1) {
1683
- if ($ + Q + z > x) break;
1684
- } else if ($ + Q > x) break;
1685
- $ += Q, O++;
1708
+ if (Z < e.length - 1) {
1709
+ if (C + Q + X > M) break;
1710
+ } else if (C + Q > M) break;
1711
+ C += Q, Y++;
1686
1712
  }
1687
- if (O >= e.length - 1 && O < e.length) {
1688
- let H = 0;
1713
+ if (Y >= e.length - 1 && Y < e.length) {
1714
+ let Z = 0;
1689
1715
  for (let J = 0; J < e.length; J++) {
1690
- const Q = h.current[J];
1691
- Q && (H += Q.offsetWidth);
1716
+ const Q = b.current[J];
1717
+ Q && (Z += Q.offsetWidth);
1692
1718
  }
1693
- H <= x && (O = e.length);
1719
+ Z <= M && (Y = e.length);
1694
1720
  }
1695
- R(O < 1 ? 1 : O);
1721
+ A(Y < 1 ? 1 : Y);
1696
1722
  };
1697
- let S;
1723
+ let l;
1698
1724
  (() => {
1699
- S = requestAnimationFrame(() => {
1700
- S = requestAnimationFrame(F);
1725
+ l = requestAnimationFrame(() => {
1726
+ l = requestAnimationFrame(L);
1701
1727
  });
1702
1728
  })();
1703
- const l = new ResizeObserver(F);
1704
- return l.observe(v), () => {
1705
- l.disconnect(), cancelAnimationFrame(S);
1729
+ const y = new ResizeObserver(L);
1730
+ return y.observe(w), () => {
1731
+ y.disconnect(), cancelAnimationFrame(l);
1706
1732
  };
1707
- }, [e]), ne(() => {
1708
- if (!E) return;
1709
- const v = (F) => {
1710
- m.current && !m.current.contains(F.target) && b.current && !b.current.contains(F.target) && (X(!1), K(null));
1733
+ }, [e]), re(() => {
1734
+ if (!H) return;
1735
+ const w = (L) => {
1736
+ $.current && !$.current.contains(L.target) && D.current && !D.current.contains(L.target) && (N(!1), O(null));
1711
1737
  };
1712
- return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
1713
- }, [E]);
1714
- const ae = (v) => {
1715
- o || u(v), a == null || a(v);
1716
- }, Se = (v, F) => {
1717
- var x;
1718
- const S = B.map((z, $) => z.disabled ? -1 : $).filter((z) => z !== -1), W = S.indexOf(F);
1719
- let l = -1;
1720
- v.key === "ArrowRight" && (l = S[(W + 1) % S.length] ?? -1), v.key === "ArrowLeft" && (l = S[(W - 1 + S.length) % S.length] ?? -1), v.key === "Home" && (l = S[0] ?? -1), v.key === "End" && (l = S[S.length - 1] ?? -1), l !== -1 && (v.preventDefault(), (x = h.current[l]) == null || x.focus(), ae(B[l].value));
1738
+ return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
1739
+ }, [H]);
1740
+ const K = (w) => {
1741
+ c || d(w), a == null || a(w);
1742
+ }, ze = (w, L) => {
1743
+ var M;
1744
+ const l = G.map((X, C) => X.disabled ? -1 : C).filter((X) => X !== -1), g = l.indexOf(L);
1745
+ let y = -1;
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));
1721
1747
  };
1722
- return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...r }, children: [
1748
+ return /* @__PURE__ */ T("div", { style: { display: "flex", flexDirection: "column", position: "relative", ...o }, children: [
1723
1749
  /* @__PURE__ */ T(
1724
1750
  "div",
1725
1751
  {
1726
- ref: L,
1752
+ ref: x,
1727
1753
  role: "tablist",
1728
1754
  style: {
1729
1755
  position: "relative",
1730
1756
  display: "flex",
1731
1757
  overflow: "hidden",
1732
- ...k ? {
1758
+ ...S ? {
1733
1759
  padding: "var(--lucent-space-1)"
1734
1760
  } : {
1735
1761
  borderBottom: "1px solid var(--lucent-border-default)"
1736
1762
  }
1737
1763
  },
1738
1764
  children: [
1739
- e.map((v, F) => {
1740
- const S = F < w, W = v.value === i, l = v.disabled ?? !1;
1765
+ e.map((w, L) => {
1766
+ const l = L < E, g = w.value === u, y = w.disabled ?? !1;
1741
1767
  return /* @__PURE__ */ T(
1742
1768
  "button",
1743
1769
  {
1744
- ref: (x) => {
1745
- h.current[F] = x;
1770
+ ref: (M) => {
1771
+ b.current[L] = M;
1746
1772
  },
1747
1773
  role: "tab",
1748
- "aria-selected": W,
1749
- "aria-controls": `lucent-tabpanel-${v.value}`,
1750
- id: `lucent-tab-${v.value}`,
1751
- disabled: l,
1752
- tabIndex: W && S ? 0 : -1,
1774
+ "aria-selected": g,
1775
+ "aria-controls": `lucent-tabpanel-${w.value}`,
1776
+ id: `lucent-tab-${w.value}`,
1777
+ disabled: y,
1778
+ tabIndex: g && l ? 0 : -1,
1753
1779
  onClick: () => {
1754
- l || ae(v.value);
1780
+ y || K(w.value);
1755
1781
  },
1756
- onKeyDown: (x) => Se(x, F),
1782
+ onKeyDown: (M) => ze(M, L),
1757
1783
  onMouseEnter: () => {
1758
- !l && S && g(F);
1784
+ !y && l && h(L);
1759
1785
  },
1760
- onMouseLeave: () => g(null),
1786
+ onMouseLeave: () => h(null),
1761
1787
  style: {
1762
- padding: k ? "var(--lucent-space-1) var(--lucent-space-2)" : "var(--lucent-space-1) var(--lucent-space-2) var(--lucent-space-3)",
1788
+ padding: S ? p.buttonPadding : p.buttonPaddingUnderline,
1763
1789
  background: "none",
1764
1790
  border: "none",
1765
- cursor: l ? "not-allowed" : "pointer",
1791
+ cursor: y ? "not-allowed" : "pointer",
1766
1792
  fontFamily: "var(--lucent-font-family-base)",
1767
- fontSize: "var(--lucent-font-size-md)",
1768
- fontWeight: W ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1769
- color: l ? "var(--lucent-text-disabled)" : k && W ? "var(--lucent-accent-fg)" : W ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1793
+ fontSize: p.fontSize,
1794
+ fontWeight: g ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1795
+ color: y ? "var(--lucent-text-disabled)" : S && g ? "var(--lucent-accent-fg)" : g ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1770
1796
  transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
1771
1797
  whiteSpace: "nowrap",
1772
1798
  outline: "none",
1773
- position: S ? "relative" : "absolute",
1774
- zIndex: W ? 1 : 0,
1799
+ position: l ? "relative" : "absolute",
1800
+ zIndex: g ? 1 : 0,
1775
1801
  // Hidden overflow tabs are positioned off-screen for measurement
1776
- ...S ? {} : { visibility: "hidden", pointerEvents: "none", left: -9999 }
1802
+ ...l ? {} : { visibility: "hidden", pointerEvents: "none", left: -9999 }
1777
1803
  },
1778
1804
  children: [
1779
1805
  /* @__PURE__ */ f("span", { style: {
1780
1806
  display: "block",
1781
- padding: "var(--lucent-space-1) var(--lucent-space-3)",
1807
+ padding: p.innerPadding,
1782
1808
  borderRadius: "var(--lucent-radius-md)",
1783
- background: !k && d === F && !W && !l ? "var(--lucent-surface-secondary)" : "transparent",
1809
+ background: !S && m === L && !g && !y ? "var(--lucent-surface-secondary)" : "transparent",
1784
1810
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
1785
- }, children: v.label }),
1786
- k && d === F && !W && !l && S && /* @__PURE__ */ f(
1811
+ }, children: w.label }),
1812
+ S && m === L && !g && !y && l && /* @__PURE__ */ f(
1787
1813
  "span",
1788
1814
  {
1789
1815
  "aria-hidden": !0,
@@ -1802,25 +1828,25 @@ function dn({ tabs: e, defaultValue: t, value: s, onChange: a, variant: n = "und
1802
1828
  )
1803
1829
  ]
1804
1830
  },
1805
- v.value
1831
+ w.value
1806
1832
  );
1807
1833
  }),
1808
- _ && /* @__PURE__ */ f(
1834
+ j && /* @__PURE__ */ f(
1809
1835
  "button",
1810
1836
  {
1811
- ref: b,
1812
- onClick: () => X((v) => !v),
1813
- onMouseEnter: () => D(!0),
1814
- onMouseLeave: () => D(!1),
1837
+ ref: D,
1838
+ onClick: () => N((w) => !w),
1839
+ onMouseEnter: () => R(!0),
1840
+ onMouseLeave: () => R(!1),
1815
1841
  style: {
1816
- padding: k ? "var(--lucent-space-1) var(--lucent-space-2)" : "var(--lucent-space-1) var(--lucent-space-2) var(--lucent-space-3)",
1842
+ padding: S ? p.buttonPadding : p.buttonPaddingUnderline,
1817
1843
  background: "none",
1818
1844
  border: "none",
1819
1845
  cursor: "pointer",
1820
1846
  fontFamily: "var(--lucent-font-family-base)",
1821
- fontSize: "var(--lucent-font-size-md)",
1822
- fontWeight: N ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1823
- color: N ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1847
+ fontSize: p.fontSize,
1848
+ fontWeight: ae ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1849
+ color: ae ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1824
1850
  whiteSpace: "nowrap",
1825
1851
  outline: "none",
1826
1852
  position: "relative",
@@ -1828,45 +1854,45 @@ function dn({ tabs: e, defaultValue: t, value: s, onChange: a, variant: n = "und
1828
1854
  },
1829
1855
  children: /* @__PURE__ */ f("span", { style: {
1830
1856
  display: "block",
1831
- padding: "var(--lucent-space-1) var(--lucent-space-3)",
1857
+ padding: p.innerPadding,
1832
1858
  borderRadius: "var(--lucent-radius-md)",
1833
- background: A ? "var(--lucent-surface-secondary)" : "transparent",
1859
+ background: k ? "var(--lucent-surface-secondary)" : "transparent",
1834
1860
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
1835
1861
  }, children: "More…" })
1836
1862
  }
1837
1863
  ),
1838
- p != null && /* @__PURE__ */ f(
1864
+ v != null && /* @__PURE__ */ f(
1839
1865
  "span",
1840
1866
  {
1841
1867
  "aria-hidden": !0,
1842
- style: k ? {
1868
+ style: S ? {
1843
1869
  position: "absolute",
1844
1870
  top: "var(--lucent-space-1)",
1845
1871
  bottom: "var(--lucent-space-1)",
1846
- left: p.left,
1847
- width: p.width,
1872
+ left: v.left,
1873
+ width: v.width,
1848
1874
  background: "var(--lucent-accent-default)",
1849
1875
  borderRadius: "var(--lucent-radius-md)",
1850
- transition: p.animate ? "left 220ms var(--lucent-easing-default), width 220ms var(--lucent-easing-default)" : "none"
1876
+ transition: v.animate ? "left 220ms var(--lucent-easing-default), width 220ms var(--lucent-easing-default)" : "none"
1851
1877
  } : {
1852
1878
  position: "absolute",
1853
1879
  bottom: 0,
1854
- left: p.left,
1855
- width: p.width,
1880
+ left: v.left,
1881
+ width: v.width,
1856
1882
  height: 2,
1857
1883
  background: "var(--lucent-accent-default)",
1858
1884
  borderRadius: "var(--lucent-radius-sm)",
1859
- transition: p.animate ? "left 220ms var(--lucent-easing-default), width 220ms var(--lucent-easing-default)" : "none"
1885
+ transition: v.animate ? "left 220ms var(--lucent-easing-default), width 220ms var(--lucent-easing-default)" : "none"
1860
1886
  }
1861
1887
  }
1862
1888
  )
1863
1889
  ]
1864
1890
  }
1865
1891
  ),
1866
- _ && E && /* @__PURE__ */ f(
1892
+ j && H && /* @__PURE__ */ f(
1867
1893
  "div",
1868
1894
  {
1869
- ref: m,
1895
+ ref: $,
1870
1896
  style: {
1871
1897
  position: "absolute",
1872
1898
  top: "100%",
@@ -1880,57 +1906,57 @@ function dn({ tabs: e, defaultValue: t, value: s, onChange: a, variant: n = "und
1880
1906
  padding: "var(--lucent-space-1) 0",
1881
1907
  minWidth: 140
1882
1908
  },
1883
- children: j.map((v, F) => {
1884
- const S = v.value === i, W = v.disabled ?? !1, l = C === F;
1909
+ children: W.map((w, L) => {
1910
+ const l = w.value === u, g = w.disabled ?? !1, y = P === L;
1885
1911
  return /* @__PURE__ */ f(
1886
1912
  "button",
1887
1913
  {
1888
- disabled: W,
1914
+ disabled: g,
1889
1915
  onClick: () => {
1890
- W || (ae(v.value), X(!1));
1916
+ g || (K(w.value), N(!1));
1891
1917
  },
1892
1918
  onMouseEnter: () => {
1893
- W || K(F);
1919
+ g || O(L);
1894
1920
  },
1895
- onMouseLeave: () => K(null),
1921
+ onMouseLeave: () => O(null),
1896
1922
  style: {
1897
1923
  display: "block",
1898
1924
  width: "100%",
1899
- padding: "var(--lucent-space-2) var(--lucent-space-4)",
1900
- background: S || l ? "var(--lucent-surface-secondary)" : "none",
1925
+ padding: p.dropdownPadding,
1926
+ background: l || y ? "var(--lucent-surface-secondary)" : "none",
1901
1927
  border: "none",
1902
- cursor: W ? "not-allowed" : "pointer",
1928
+ cursor: g ? "not-allowed" : "pointer",
1903
1929
  fontFamily: "var(--lucent-font-family-base)",
1904
- fontSize: "var(--lucent-font-size-md)",
1905
- fontWeight: S ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1906
- color: W ? "var(--lucent-text-disabled)" : S || l ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1930
+ fontSize: p.fontSize,
1931
+ fontWeight: l ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
1932
+ color: g ? "var(--lucent-text-disabled)" : l || y ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
1907
1933
  textAlign: "left",
1908
1934
  outline: "none",
1909
1935
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), color var(--lucent-duration-fast) var(--lucent-easing-default)"
1910
1936
  },
1911
- children: v.label
1937
+ children: w.label
1912
1938
  },
1913
- v.value
1939
+ w.value
1914
1940
  );
1915
1941
  })
1916
1942
  }
1917
1943
  ),
1918
- e.some((v) => v.content != null) && e.map((v) => /* @__PURE__ */ f(
1944
+ e.some((w) => w.content != null) && e.map((w) => /* @__PURE__ */ f(
1919
1945
  "div",
1920
1946
  {
1921
1947
  role: "tabpanel",
1922
- id: `lucent-tabpanel-${v.value}`,
1923
- "aria-labelledby": `lucent-tab-${v.value}`,
1924
- hidden: v.value !== i,
1925
- style: { padding: "var(--lucent-space-4) 0", outline: "none" },
1948
+ id: `lucent-tabpanel-${w.value}`,
1949
+ "aria-labelledby": `lucent-tab-${w.value}`,
1950
+ hidden: w.value !== u,
1951
+ style: { padding: p.panelPadding, outline: "none" },
1926
1952
  tabIndex: 0,
1927
- children: v.content
1953
+ children: w.content
1928
1954
  },
1929
- v.value
1955
+ w.value
1930
1956
  ))
1931
1957
  ] });
1932
1958
  }
1933
- const oa = {
1959
+ const ua = {
1934
1960
  fontFamilyBase: '"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
1935
1961
  fontFamilyMono: '"DM Mono", "Fira Code", "Cascadia Code", monospace',
1936
1962
  fontFamilyDisplay: '"Georama", "DM Sans", sans-serif',
@@ -1951,7 +1977,7 @@ const oa = {
1951
1977
  letterSpacingTight: "-0.02em",
1952
1978
  letterSpacingBase: "0em",
1953
1979
  letterSpacingWide: "0.04em"
1954
- }, la = {
1980
+ }, da = {
1955
1981
  space0: "0px",
1956
1982
  space1: "0.25rem",
1957
1983
  space2: "0.5rem",
@@ -1965,38 +1991,38 @@ const oa = {
1965
1991
  space16: "4rem",
1966
1992
  space20: "5rem",
1967
1993
  space24: "6rem"
1968
- }, ca = {
1994
+ }, fa = {
1969
1995
  radiusNone: "0px",
1970
1996
  radiusSm: "0.25rem",
1971
1997
  radiusMd: "0.375rem",
1972
1998
  radiusLg: "0.5rem",
1973
1999
  radiusXl: "0.75rem",
1974
2000
  radiusFull: "9999px"
1975
- }, ia = {
2001
+ }, pa = {
1976
2002
  durationFast: "100ms",
1977
2003
  durationBase: "200ms",
1978
2004
  durationSlow: "350ms",
1979
2005
  easingDefault: "cubic-bezier(0.4, 0, 0.2, 1)",
1980
2006
  easingEmphasized: "cubic-bezier(0.2, 0, 0, 1)",
1981
2007
  easingDecelerate: "cubic-bezier(0, 0, 0.2, 1)"
1982
- }, ua = {
2008
+ }, ga = {
1983
2009
  shadowNone: "none",
1984
2010
  shadowSm: "0 1px 2px rgb(0 0 0 / 0.12)",
1985
2011
  shadowMd: "0 2px 4px rgb(0 0 0 / 0.18)",
1986
2012
  shadowLg: "0 3px 8px rgb(0 0 0 / 0.18)",
1987
2013
  shadowXl: "0 5px 14px rgb(0 0 0 / 0.2)"
1988
- }, da = {
2014
+ }, ba = {
1989
2015
  shadowNone: "none",
1990
2016
  shadowSm: "inset 0 1px 0 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.4)",
1991
2017
  shadowMd: "inset 0 1px 0 0 rgba(255, 255, 255, 0.06), 0 1px 4px rgba(0, 0, 0, 0.45)",
1992
2018
  shadowLg: "inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.45)",
1993
2019
  shadowXl: "inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 4px 14px rgba(0, 0, 0, 0.5)"
1994
- }, he = {
1995
- ...oa,
1996
- ...la,
1997
- ...ca,
1998
- ...ia,
2020
+ }, ye = {
1999
2021
  ...ua,
2022
+ ...da,
2023
+ ...fa,
2024
+ ...pa,
2025
+ ...ga,
2000
2026
  // Navigation — chrome/shell (sidebar, header, footer)
2001
2027
  navigation: "#f4f6f8",
2002
2028
  // Backgrounds — main content area
@@ -2040,72 +2066,72 @@ const oa = {
2040
2066
  infoSubtle: "#eff6ff",
2041
2067
  infoText: "#1d4ed8"
2042
2068
  };
2043
- function fa(e) {
2069
+ function ma(e) {
2044
2070
  const t = parseInt(e.slice(1, 3), 16), s = parseInt(e.slice(3, 5), 16), a = parseInt(e.slice(5, 7), 16);
2045
2071
  return { r: t, g: s, b: a };
2046
2072
  }
2047
- function pa({ r: e, g: t, b: s }) {
2073
+ function xa({ r: e, g: t, b: s }) {
2048
2074
  const a = (n) => n.toString(16).padStart(2, "0");
2049
2075
  return `#${a(e)}${a(t)}${a(s)}`;
2050
2076
  }
2051
- function Y(e) {
2052
- const { r: t, g: s, b: a } = fa(e), n = t / 255, r = s / 255, o = a / 255, c = Math.max(n, r, o), u = Math.min(n, r, o);
2053
- let i = 0, d = 0;
2054
- const g = (c + u) / 2;
2055
- if (c !== u) {
2056
- const h = c - u;
2057
- switch (d = g > 0.5 ? h / (2 - c - u) : h / (c + u), c) {
2077
+ function _(e) {
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);
2079
+ let d = 0, u = 0;
2080
+ const m = (c + i) / 2;
2081
+ if (c !== i) {
2082
+ const h = c - i;
2083
+ switch (u = m > 0.5 ? h / (2 - c - i) : h / (c + i), c) {
2058
2084
  case n:
2059
- i = (r - o) / h + (r < o ? 6 : 0);
2085
+ d = (r - o) / h + (r < o ? 6 : 0);
2060
2086
  break;
2061
2087
  case r:
2062
- i = (o - n) / h + 2;
2088
+ d = (o - n) / h + 2;
2063
2089
  break;
2064
2090
  case o:
2065
- i = (n - r) / h + 4;
2091
+ d = (n - r) / h + 4;
2066
2092
  break;
2067
2093
  }
2068
- i /= 6;
2094
+ d /= 6;
2069
2095
  }
2070
- return [i * 360, d, g];
2096
+ return [d * 360, u, m];
2071
2097
  }
2072
2098
  function V(e, t, s) {
2073
2099
  e = (e % 360 + 360) % 360, t = Math.min(1, Math.max(0, t)), s = Math.min(1, Math.max(0, s));
2074
2100
  const a = (1 - Math.abs(2 * s - 1)) * t, n = a * (1 - Math.abs(e / 60 % 2 - 1)), r = s - a / 2;
2075
- let o = 0, c = 0, u = 0;
2076
- return e < 60 ? (o = a, c = n) : e < 120 ? (o = n, c = a) : e < 180 ? (c = a, u = n) : e < 240 ? (c = n, u = a) : e < 300 ? (o = n, u = a) : (o = a, u = n), pa({ r: Math.round((o + r) * 255), g: Math.round((c + r) * 255), b: Math.round((u + r) * 255) });
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) });
2077
2103
  }
2078
- function M(e, t) {
2079
- const [s, a, n] = Y(e);
2104
+ function z(e, t) {
2105
+ const [s, a, n] = _(e);
2080
2106
  return V(s, a, Math.min(1, Math.max(0, n + t)));
2081
2107
  }
2082
- const ga = 222, ba = 0.12;
2083
- function tt(e, t) {
2084
- return t < 0.04 ? [ga, ba] : [e, t];
2108
+ const ha = 222, va = 0.12;
2109
+ function nt(e, t) {
2110
+ return t < 0.04 ? [ha, va] : [e, t];
2085
2111
  }
2086
- function je(e) {
2087
- const [t, s, a] = Y(e), [n, r] = tt(t, s);
2112
+ function qe(e) {
2113
+ const [t, s, a] = _(e), [n, r] = nt(t, s);
2088
2114
  return V(n, r, Math.max(0.04, Math.min(0.2, 0.07 + (1 - a))));
2089
2115
  }
2090
- function Te(e) {
2091
- const [t, s, a] = Y(e), [n, r] = tt(t, s);
2116
+ function Be(e) {
2117
+ const [t, s, a] = _(e), [n, r] = nt(t, s);
2092
2118
  return V(n, r, Math.max(0.06, Math.min(0.5, (1 - a) * 0.6 + 0.06)));
2093
2119
  }
2094
- function Ie(e) {
2095
- const [t, s, a] = Y(e);
2120
+ function $e(e) {
2121
+ const [t, s, a] = _(e);
2096
2122
  return V(t, s, Math.max(0.04, Math.min(0.97, 1 - a + 0.04)));
2097
2123
  }
2098
- function Be(e) {
2099
- const [t, s, a] = Y(e);
2124
+ function Pe(e) {
2125
+ const [t, s, a] = _(e);
2100
2126
  return V(t, s, Math.max(0.02, Math.min(0.98, 1 - a)));
2101
2127
  }
2102
- function xa(e) {
2103
- const t = je(e.navigation), s = je(e.bgBase), [a, n, r] = Y(s), o = (c) => V(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));
2104
2130
  return {
2105
2131
  // ── Non-color tokens: carry over from light unchanged ──────────────────
2106
2132
  ...e,
2107
2133
  // ── Shadows: dark variants have higher opacity for visibility ───────────
2108
- ...da,
2134
+ ...ba,
2109
2135
  // ── Navigation ──────────────────────────────────────────────────────────
2110
2136
  navigation: t,
2111
2137
  // ── Backgrounds ─────────────────────────────────────────────────────────
@@ -2119,148 +2145,151 @@ function xa(e) {
2119
2145
  surfaceOverlay: o(0.08),
2120
2146
  surfaceTint: o(0.03),
2121
2147
  // ── Borders ──────────────────────────────────────────────────────────────
2122
- borderDefault: Te(e.borderDefault),
2123
- borderSubtle: Te(e.borderSubtle),
2124
- borderStrong: Te(e.borderStrong),
2148
+ borderDefault: Be(e.borderDefault),
2149
+ borderSubtle: Be(e.borderSubtle),
2150
+ borderStrong: Be(e.borderStrong),
2125
2151
  controlTrack: o(0.1),
2126
2152
  // ── Text ─────────────────────────────────────────────────────────────────
2127
- textPrimary: Ie(e.textPrimary),
2128
- textSecondary: Ie(e.textSecondary),
2129
- textDisabled: Ie(e.textDisabled),
2153
+ textPrimary: $e(e.textPrimary),
2154
+ textSecondary: $e(e.textSecondary),
2155
+ textDisabled: $e(e.textDisabled),
2130
2156
  // textInverse flips to dark bg so it reads on light accent surfaces
2131
2157
  textInverse: s,
2132
2158
  // ── Accent ───────────────────────────────────────────────────────────────
2133
- accentDefault: Be(e.accentDefault),
2134
- accentHover: Be(e.accentHover),
2135
- accentSubtle: Be(e.accentSubtle),
2159
+ accentDefault: Pe(e.accentDefault),
2160
+ accentHover: Pe(e.accentHover),
2161
+ accentSubtle: Pe(e.accentSubtle),
2136
2162
  accentBorder: e.accentBorder,
2137
2163
  // auto-recomputed by LucentProvider
2138
2164
  accentFg: e.accentFg,
2139
2165
  // auto-recomputed by LucentProvider
2140
2166
  // ── Status: lighten defaults for visibility; darken for subtle bg ─────────
2141
- successDefault: M(e.successDefault, 0.1),
2142
- successSubtle: M(e.successDefault, -0.25),
2143
- successText: M(e.successText, 0.15),
2144
- warningDefault: M(e.warningDefault, 0.1),
2145
- warningSubtle: M(e.warningDefault, -0.25),
2146
- warningText: M(e.warningText, 0.15),
2147
- dangerDefault: M(e.dangerDefault, 0.1),
2148
- dangerHover: M(e.dangerHover, 0.1),
2149
- dangerSubtle: M(e.dangerDefault, -0.25),
2150
- dangerText: M(e.dangerText, 0.15),
2151
- infoDefault: M(e.infoDefault, 0.1),
2152
- infoSubtle: M(e.infoDefault, -0.25),
2153
- infoText: M(e.infoText, 0.15)
2167
+ successDefault: z(e.successDefault, 0.1),
2168
+ successSubtle: z(e.successDefault, -0.25),
2169
+ successText: z(e.successText, 0.15),
2170
+ warningDefault: z(e.warningDefault, 0.1),
2171
+ warningSubtle: z(e.warningDefault, -0.25),
2172
+ warningText: z(e.warningText, 0.15),
2173
+ dangerDefault: z(e.dangerDefault, 0.1),
2174
+ dangerHover: z(e.dangerHover, 0.1),
2175
+ dangerSubtle: z(e.dangerDefault, -0.25),
2176
+ dangerText: z(e.dangerText, 0.15),
2177
+ infoDefault: z(e.infoDefault, 0.1),
2178
+ infoSubtle: z(e.infoDefault, -0.25),
2179
+ infoText: z(e.infoText, 0.15)
2154
2180
  };
2155
2181
  }
2156
- const at = xa(he);
2157
- function ma(e) {
2182
+ const rt = ya(ye);
2183
+ function wa(e) {
2158
2184
  return "--lucent-" + e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`).replace(/([a-z])(\d)/g, (t, s, a) => `${s}-${a}`);
2159
2185
  }
2160
- function ha(e, t = ":root") {
2161
- const s = Object.entries(e).map(([a, n]) => ` ${ma(a)}: ${n};`).join(`
2186
+ function Da(e) {
2187
+ return e.replace(/[{}<>;@\\]/g, "");
2188
+ }
2189
+ function Sa(e, t = ":root") {
2190
+ const s = Object.entries(e).map(([a, n]) => ` ${wa(a)}: ${Da(n)};`).join(`
2162
2191
  `);
2163
2192
  return `${t} {
2164
2193
  ${s}
2165
2194
  }`;
2166
2195
  }
2167
- function va(e) {
2196
+ function ka(e) {
2168
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);
2169
2198
  return 0.2126 * n(t) + 0.7152 * n(s) + 0.0722 * n(a);
2170
2199
  }
2171
- const ya = 0.2126729, wa = 0.7151522, Da = 0.072175, ka = 0.56, Sa = 0.57, Ma = 0.65, za = 0.62, Ue = 0.022, Ta = 1.414, Ia = 1.14, Ba = 1.14, qe = 0.027, Ge = 0.027;
2172
- function _e(e) {
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;
2201
+ function Ke(e) {
2173
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);
2174
- let c = ya * n + wa * r + Da * o;
2175
- return c < 0 && (c = 0), c < Ue ? c + Math.pow(Ue - c, Ta) : c;
2203
+ let c = Ma * n + za * r + Ta * o;
2204
+ return c < 0 && (c = 0), c < Ge ? c + Math.pow(Ge - c, La) : c;
2176
2205
  }
2177
- function ge(e, t) {
2178
- const s = _e(e), a = _e(t);
2206
+ function me(e, t) {
2207
+ const s = Ke(e), a = Ke(t);
2179
2208
  let n;
2180
2209
  if (s > a) {
2181
- const r = (Math.pow(s, ka) - Math.pow(a, Sa)) * Ia;
2182
- n = r < qe ? 0 : r - qe;
2210
+ const r = (Math.pow(s, Ia) - Math.pow(a, Ba)) * Ra;
2211
+ n = r < Ve ? 0 : r - Ve;
2183
2212
  } else {
2184
- const r = (Math.pow(s, Ma) - Math.pow(a, za)) * Ba;
2185
- n = r > -Ge ? 0 : r + Ge;
2213
+ const r = (Math.pow(s, $a) - Math.pow(a, Pa)) * Fa;
2214
+ n = r > -_e ? 0 : r + _e;
2186
2215
  }
2187
2216
  return n * 100;
2188
2217
  }
2189
- function $a(e) {
2190
- const t = Math.abs(ge(e, "#ffffff")), s = Math.abs(ge(e, "#000000"));
2218
+ function Ca(e) {
2219
+ const t = Math.abs(me(e, "#ffffff")), s = Math.abs(me(e, "#000000"));
2191
2220
  return t >= s ? "#ffffff" : "#000000";
2192
2221
  }
2193
- function nt(e) {
2222
+ function st(e) {
2194
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);
2195
2224
  let o = 0, c = 0;
2196
2225
  if (n !== r) {
2197
- const i = n - r;
2198
- c = (n + r) / 2 > 0.5 ? i / (2 - n - r) : i / (n + r), n === t ? o = ((s - a) / i + (s < a ? 6 : 0)) / 6 : n === s ? o = ((a - t) / i + 2) / 6 : o = ((t - s) / i + 4) / 6;
2226
+ const d = n - r;
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;
2199
2228
  }
2200
- return $a(e) === "#000000" ? Le(o, Math.min(c, 0.6), 0.12) : Le(o, Math.min(c, 0.2), 0.95);
2229
+ return Ca(e) === "#000000" ? Re(o, Math.min(c, 0.6), 0.12) : Re(o, Math.min(c, 0.2), 0.95);
2201
2230
  }
2202
- function La(e, t, s = 60) {
2203
- if (Math.abs(ge(e, t)) >= s) return e;
2231
+ function Wa(e, t, s = 60) {
2232
+ if (Math.abs(me(e, t)) >= s) return e;
2204
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);
2205
- let u = 0, i = 0, d = (o + c) / 2;
2234
+ let i = 0, d = 0, u = (o + c) / 2;
2206
2235
  if (o !== c) {
2207
- const p = o - c;
2208
- i = d > 0.5 ? p / (2 - o - c) : p / (o + c), o === a ? u = ((n - r) / p + (n < r ? 6 : 0)) / 6 : o === n ? u = ((r - a) / p + 2) / 6 : u = ((a - n) / p + 4) / 6;
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;
2209
2238
  }
2210
- const h = va(t) > 0.5 ? -5e-3 : 5e-3;
2211
- for (let p = 0; p < 100; p++) {
2212
- d = Math.min(1, Math.max(0, d + h));
2213
- const y = Le(u, i, d);
2214
- if (Math.abs(ge(y, t)) >= s) return y;
2239
+ const h = ka(t) > 0.5 ? -5e-3 : 5e-3;
2240
+ for (let b = 0; b < 100; b++) {
2241
+ u = Math.min(1, Math.max(0, u + h));
2242
+ const v = Re(i, d, u);
2243
+ if (Math.abs(me(v, t)) >= s) return v;
2215
2244
  }
2216
2245
  return e;
2217
2246
  }
2218
- function Le(e, t, s) {
2219
- const a = (u, i, d) => (d < 0 && (d += 1), d > 1 && (d -= 1), d < 0.16666666666666666 ? u + (i - u) * 6 * d : d < 0.5 ? i : d < 0.6666666666666666 ? u + (i - u) * (0.6666666666666666 - d) * 6 : u);
2247
+ function Re(e, t, s) {
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);
2220
2249
  let n, r, o;
2221
2250
  if (t === 0)
2222
2251
  n = r = o = s;
2223
2252
  else {
2224
- const u = s < 0.5 ? s * (1 + t) : s + t - s * t, i = 2 * s - u;
2225
- n = a(i, u, e + 1 / 3), r = a(i, u, e), o = a(i, u, 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);
2226
2255
  }
2227
- const c = (u) => Math.round(u * 255).toString(16).padStart(2, "0");
2256
+ const c = (i) => Math.round(i * 255).toString(16).padStart(2, "0");
2228
2257
  return `#${c(n)}${c(r)}${c(o)}`;
2229
2258
  }
2230
- function Ra(e, t) {
2231
- const [s, a, n] = Y(e);
2259
+ function Ha(e, t) {
2260
+ const [s, a, n] = _(e);
2232
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));
2233
2262
  }
2234
- const be = {
2263
+ const xe = {
2235
2264
  subtle: { light: 0.95, dark: 0.12 },
2236
2265
  text: { light: 0.28, dark: 0.78 }
2237
2266
  };
2238
- function ce(e, t) {
2239
- const [s, a] = Y(e);
2240
- return V(s, a * 0.5, t ? be.subtle.light : be.subtle.dark);
2267
+ function ue(e, t) {
2268
+ const [s, a] = _(e);
2269
+ return V(s, a * 0.5, t ? xe.subtle.light : xe.subtle.dark);
2241
2270
  }
2242
- function ie(e, t) {
2243
- const [s, a] = Y(e);
2244
- return V(s, a, t ? be.text.light : be.text.dark);
2271
+ function de(e, t) {
2272
+ const [s, a] = _(e);
2273
+ return V(s, a, t ? xe.text.light : xe.text.dark);
2245
2274
  }
2246
- function rt(e, t, s) {
2275
+ function ot(e, t, s) {
2247
2276
  const a = {}, n = s === "light";
2248
- if ("borderDefault" in e && ("borderSubtle" in e || (a.borderSubtle = M(t.borderDefault, n ? 0.05 : -0.02)), "borderStrong" in e || (a.borderStrong = M(t.borderDefault, n ? -0.27 : 0.19))), "bgBase" in e && ("bgSubtle" in e || (a.bgSubtle = M(t.bgBase, n ? -0.02 : 0.02)), "surfaceTint" in e || (a.surfaceTint = M(t.bgBase, n ? -0.04 : 0.03)), !("surface" in e))) {
2249
- const r = Ra(t.bgBase, n);
2250
- a.surface = r, "surfaceSecondary" in e || (a.surfaceSecondary = M(r, n ? -0.04 : 0.03)), "surfaceRaised" in e || (a.surfaceRaised = M(r, n ? 0 : 0.06)), "surfaceOverlay" in e || (a.surfaceOverlay = M(r, n ? 0 : 0.06));
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))) {
2278
+ const r = Ha(t.bgBase, n);
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));
2251
2280
  }
2252
- return "surface" in e && ("surfaceSecondary" in e || (a.surfaceSecondary = M(t.surface, n ? -0.04 : 0.03)), "surfaceRaised" in e || (a.surfaceRaised = M(t.surface, n ? 0 : 0.06)), "surfaceOverlay" in e || (a.surfaceOverlay = M(t.surface, n ? 0 : 0.06))), "textPrimary" in e && ("textSecondary" in e || (a.textSecondary = M(t.textPrimary, n ? 0.2 : -0.15)), "textDisabled" in e || (a.textDisabled = M(t.textPrimary, n ? 0.58 : -0.62))), "accentDefault" in e && ("accentHover" in e || (a.accentHover = M(t.accentDefault, n ? 0.05 : -0.07)), "accentSubtle" in e || (a.accentSubtle = M(t.accentDefault, n ? 0.85 : -0.6))), "successDefault" in e && ("successSubtle" in e || (a.successSubtle = ce(t.successDefault, n)), "successText" in e || (a.successText = ie(t.successDefault, n))), "warningDefault" in e && ("warningSubtle" in e || (a.warningSubtle = ce(t.warningDefault, n)), "warningText" in e || (a.warningText = ie(t.warningDefault, n))), "dangerDefault" in e && ("dangerHover" in e || (a.dangerHover = M(t.dangerDefault, n ? 0.05 : -0.07)), "dangerSubtle" in e || (a.dangerSubtle = ce(t.dangerDefault, n)), "dangerText" in e || (a.dangerText = ie(t.dangerDefault, n))), "infoDefault" in e && ("infoSubtle" in e || (a.infoSubtle = ce(t.infoDefault, n)), "infoText" in e || (a.infoText = ie(t.infoDefault, n))), a;
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;
2253
2282
  }
2254
- function st(e, t = "light") {
2255
- const a = { ...t === "dark" ? at : he, ...e }, n = rt(e, a, t), r = t === "light" ? M(a.accentDefault, -0.15) : M(a.accentDefault, 0.15);
2283
+ function lt(e, t = "light") {
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);
2256
2285
  return {
2257
2286
  ...a,
2258
2287
  ...n,
2259
- accentFg: nt(a.accentDefault),
2288
+ accentFg: st(a.accentDefault),
2260
2289
  accentBorder: r
2261
2290
  };
2262
2291
  }
2263
- const ot = {
2292
+ const ct = {
2264
2293
  name: "default",
2265
2294
  light: {
2266
2295
  navigation: "#f4f6f8",
@@ -2284,7 +2313,7 @@ const ot = {
2284
2313
  dangerDefault: "#ef4444",
2285
2314
  infoDefault: "#3b82f6"
2286
2315
  }
2287
- }, Fa = {
2316
+ }, Na = {
2288
2317
  name: "brand",
2289
2318
  light: {
2290
2319
  navigation: "#fffefb",
@@ -2308,7 +2337,7 @@ const ot = {
2308
2337
  dangerDefault: "#ef4444",
2309
2338
  infoDefault: "#3b82f6"
2310
2339
  }
2311
- }, ve = {
2340
+ }, we = {
2312
2341
  name: "indigo",
2313
2342
  light: {
2314
2343
  navigation: "#ffffff",
@@ -2332,7 +2361,7 @@ const ot = {
2332
2361
  dangerDefault: "#ef4444",
2333
2362
  infoDefault: "#3b82f6"
2334
2363
  }
2335
- }, lt = {
2364
+ }, it = {
2336
2365
  name: "violet",
2337
2366
  light: {
2338
2367
  navigation: "#f8f4ff",
@@ -2356,7 +2385,7 @@ const ot = {
2356
2385
  dangerDefault: "#ef4444",
2357
2386
  infoDefault: "#3b82f6"
2358
2387
  }
2359
- }, ct = {
2388
+ }, ut = {
2360
2389
  name: "emerald",
2361
2390
  light: {
2362
2391
  navigation: "#f4fcf9",
@@ -2380,7 +2409,7 @@ const ot = {
2380
2409
  dangerDefault: "#ef4444",
2381
2410
  infoDefault: "#3b82f6"
2382
2411
  }
2383
- }, Ca = {
2412
+ }, Ea = {
2384
2413
  name: "teal",
2385
2414
  light: {
2386
2415
  navigation: "#f9fbfc",
@@ -2404,7 +2433,7 @@ const ot = {
2404
2433
  dangerDefault: "#ef4444",
2405
2434
  infoDefault: "#3b82f6"
2406
2435
  }
2407
- }, it = {
2436
+ }, dt = {
2408
2437
  name: "rose",
2409
2438
  light: {
2410
2439
  navigation: "#fff4f6",
@@ -2428,7 +2457,7 @@ const ot = {
2428
2457
  dangerDefault: "#ef4444",
2429
2458
  infoDefault: "#3b82f6"
2430
2459
  }
2431
- }, ut = {
2460
+ }, ft = {
2432
2461
  name: "coral",
2433
2462
  light: {
2434
2463
  navigation: "#fff9f7",
@@ -2452,7 +2481,7 @@ const ot = {
2452
2481
  dangerDefault: "#ef4444",
2453
2482
  infoDefault: "#3b82f6"
2454
2483
  }
2455
- }, Pa = {
2484
+ }, Aa = {
2456
2485
  name: "amber",
2457
2486
  light: {
2458
2487
  navigation: "#fffdf6",
@@ -2476,7 +2505,7 @@ const ot = {
2476
2505
  dangerDefault: "#ef4444",
2477
2506
  infoDefault: "#3b82f6"
2478
2507
  }
2479
- }, dt = {
2508
+ }, pt = {
2480
2509
  name: "ocean",
2481
2510
  light: {
2482
2511
  navigation: "#ebf1ff",
@@ -2500,7 +2529,7 @@ const ot = {
2500
2529
  dangerDefault: "#ef4444",
2501
2530
  infoDefault: "#3b82f6"
2502
2531
  }
2503
- }, ft = {
2532
+ }, gt = {
2504
2533
  name: "slate",
2505
2534
  light: {
2506
2535
  navigation: "#f7f8fa",
@@ -2524,7 +2553,7 @@ const ot = {
2524
2553
  dangerDefault: "#ef4444",
2525
2554
  infoDefault: "#3b82f6"
2526
2555
  }
2527
- }, Wa = {
2556
+ }, Oa = {
2528
2557
  name: "sage",
2529
2558
  light: {
2530
2559
  navigation: "#f4f8f4",
@@ -2548,7 +2577,7 @@ const ot = {
2548
2577
  dangerDefault: "#ef4444",
2549
2578
  infoDefault: "#3b82f6"
2550
2579
  }
2551
- }, ye = {
2580
+ }, De = {
2552
2581
  name: "sharp",
2553
2582
  tokens: {
2554
2583
  radiusNone: "0px",
@@ -2558,7 +2587,7 @@ const ot = {
2558
2587
  radiusXl: "0.375rem",
2559
2588
  radiusFull: "9999px"
2560
2589
  }
2561
- }, re = {
2590
+ }, se = {
2562
2591
  name: "rounded",
2563
2592
  tokens: {
2564
2593
  radiusNone: "0px",
@@ -2568,7 +2597,7 @@ const ot = {
2568
2597
  radiusXl: "0.75rem",
2569
2598
  radiusFull: "9999px"
2570
2599
  }
2571
- }, we = {
2600
+ }, Se = {
2572
2601
  name: "pill",
2573
2602
  tokens: {
2574
2603
  radiusNone: "0px",
@@ -2578,7 +2607,7 @@ const ot = {
2578
2607
  radiusXl: "1.5rem",
2579
2608
  radiusFull: "9999px"
2580
2609
  }
2581
- }, De = {
2610
+ }, ke = {
2582
2611
  name: "compact",
2583
2612
  tokens: {
2584
2613
  space0: "0px",
@@ -2595,7 +2624,7 @@ const ot = {
2595
2624
  space20: "4rem",
2596
2625
  space24: "4.8rem"
2597
2626
  }
2598
- }, se = {
2627
+ }, oe = {
2599
2628
  name: "default",
2600
2629
  tokens: {
2601
2630
  space0: "0px",
@@ -2612,7 +2641,7 @@ const ot = {
2612
2641
  space20: "5rem",
2613
2642
  space24: "6rem"
2614
2643
  }
2615
- }, ke = {
2644
+ }, Me = {
2616
2645
  name: "spacious",
2617
2646
  tokens: {
2618
2647
  space0: "0px",
@@ -2629,7 +2658,7 @@ const ot = {
2629
2658
  space20: "6.25rem",
2630
2659
  space24: "7.5rem"
2631
2660
  }
2632
- }, Fe = {
2661
+ }, Ce = {
2633
2662
  name: "flat",
2634
2663
  light: {
2635
2664
  shadowNone: "none",
@@ -2645,7 +2674,7 @@ const ot = {
2645
2674
  shadowLg: "none",
2646
2675
  shadowXl: "none"
2647
2676
  }
2648
- }, pt = {
2677
+ }, bt = {
2649
2678
  name: "subtle",
2650
2679
  light: {
2651
2680
  shadowNone: "none",
@@ -2661,7 +2690,7 @@ const ot = {
2661
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)",
2662
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)"
2663
2692
  }
2664
- }, gt = {
2693
+ }, mt = {
2665
2694
  name: "elevated",
2666
2695
  light: {
2667
2696
  shadowNone: "none",
@@ -2677,7 +2706,7 @@ const ot = {
2677
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)",
2678
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)"
2679
2708
  }
2680
- }, bt = {
2709
+ }, xt = {
2681
2710
  name: "liquidGlass",
2682
2711
  light: {
2683
2712
  shadowNone: "none",
@@ -2693,7 +2722,7 @@ const ot = {
2693
2722
  shadowLg: "inset 0 1px 0 0 rgba(255, 255, 255, 0.1), inset 0 0 30px rgba(255, 255, 255, 0.03), 0 0 50px rgba(255, 255, 255, 0.04)",
2694
2723
  shadowXl: "inset 0 1px 0 0 rgba(255, 255, 255, 0.12), inset 0 0 40px rgba(255, 255, 255, 0.04), 0 0 70px rgba(255, 255, 255, 0.05)"
2695
2724
  }
2696
- }, xt = {
2725
+ }, ht = {
2697
2726
  name: "brutalist",
2698
2727
  light: {
2699
2728
  shadowNone: "none",
@@ -2709,7 +2738,7 @@ const ot = {
2709
2738
  shadowLg: "0 0 0 3px color-mix(in srgb, var(--lucent-accent-default) 70%, transparent), 6px 6px 0 0 color-mix(in srgb, var(--lucent-accent-default) 40%, transparent)",
2710
2739
  shadowXl: "0 0 0 3px color-mix(in srgb, var(--lucent-accent-default) 75%, transparent), 8px 8px 0 0 color-mix(in srgb, var(--lucent-accent-default) 45%, transparent)"
2711
2740
  }
2712
- }, mt = {
2741
+ }, vt = {
2713
2742
  name: "neumorphic",
2714
2743
  light: {
2715
2744
  shadowNone: "none",
@@ -2725,7 +2754,7 @@ const ot = {
2725
2754
  shadowLg: "0 20px 30px rgba(0, 0, 0, 0.5)",
2726
2755
  shadowXl: "0 28px 40px rgba(0, 0, 0, 0.55)"
2727
2756
  }
2728
- }, ht = {
2757
+ }, yt = {
2729
2758
  name: "natural",
2730
2759
  light: {
2731
2760
  shadowNone: "none",
@@ -2741,7 +2770,7 @@ const ot = {
2741
2770
  shadowLg: "inset 0 1px 0 0 rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 0 16px rgba(255, 255, 255, 0.02), 0 2px 6px rgba(0, 0, 0, 0.15)",
2742
2771
  shadowXl: "inset 0 1px 0 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 24px rgba(255, 255, 255, 0.03), 0 4px 10px rgba(0, 0, 0, 0.15)"
2743
2772
  }
2744
- }, Ce = {
2773
+ }, We = {
2745
2774
  name: "glow",
2746
2775
  light: {
2747
2776
  shadowNone: "none",
@@ -2757,234 +2786,235 @@ const ot = {
2757
2786
  shadowLg: "0 0 36px color-mix(in srgb, var(--lucent-accent-default) 35%, transparent)",
2758
2787
  shadowXl: "0 0 50px color-mix(in srgb, var(--lucent-accent-default) 40%, transparent)"
2759
2788
  }
2760
- }, Ha = {
2789
+ }, Xa = {
2761
2790
  name: "modern",
2762
- palette: ve,
2763
- shape: re,
2764
- density: se,
2765
- shadow: pt
2766
- }, Na = {
2767
- name: "enterprise",
2768
- palette: ot,
2769
- shape: ye,
2770
- density: De,
2771
- shadow: Fe
2772
- }, Ea = {
2773
- name: "playful",
2774
- palette: it,
2775
- shape: we,
2776
- density: ke,
2777
- shadow: gt
2778
- }, Aa = {
2779
- name: "liquidGlass",
2780
- palette: dt,
2781
- shape: we,
2782
- density: ke,
2791
+ palette: we,
2792
+ shape: se,
2793
+ density: oe,
2783
2794
  shadow: bt
2784
- }, Oa = {
2785
- name: "bento",
2786
- palette: ve,
2787
- shape: re,
2788
- density: se,
2789
- shadow: ht
2790
- }, Xa = {
2791
- name: "brutalist",
2792
- palette: ut,
2793
- shape: ye,
2794
- density: De,
2795
- shadow: xt
2796
2795
  }, ja = {
2797
- name: "terminal",
2796
+ name: "enterprise",
2798
2797
  palette: ct,
2799
- shape: ye,
2800
- density: De,
2798
+ shape: De,
2799
+ density: ke,
2801
2800
  shadow: Ce
2802
2801
  }, Ua = {
2803
- name: "softUI",
2804
- palette: lt,
2805
- shape: we,
2806
- density: se,
2802
+ name: "playful",
2803
+ palette: dt,
2804
+ shape: Se,
2805
+ density: Me,
2807
2806
  shadow: mt
2808
2807
  }, qa = {
2809
- name: "bloom",
2810
- palette: ve,
2811
- shape: re,
2812
- density: ke,
2813
- shadow: Ce
2808
+ name: "liquidGlass",
2809
+ palette: pt,
2810
+ shape: Se,
2811
+ density: Me,
2812
+ shadow: xt
2814
2813
  }, Ga = {
2815
- name: "minimal",
2814
+ name: "bento",
2815
+ palette: we,
2816
+ shape: se,
2817
+ density: oe,
2818
+ shadow: yt
2819
+ }, Va = {
2820
+ name: "brutalist",
2816
2821
  palette: ft,
2817
- shape: re,
2818
- density: se,
2819
- shadow: Fe
2822
+ shape: De,
2823
+ density: ke,
2824
+ shadow: ht
2820
2825
  }, _a = {
2821
- default: ot,
2822
- brand: Fa,
2823
- indigo: ve,
2824
- violet: lt,
2825
- emerald: ct,
2826
- teal: Ca,
2827
- rose: it,
2828
- coral: ut,
2829
- amber: Pa,
2830
- ocean: dt,
2831
- slate: ft,
2832
- sage: Wa
2833
- }, Va = {
2834
- sharp: ye,
2835
- rounded: re,
2836
- pill: we
2826
+ name: "terminal",
2827
+ palette: ut,
2828
+ shape: De,
2829
+ density: ke,
2830
+ shadow: We
2837
2831
  }, Ka = {
2838
- compact: De,
2839
- default: se,
2840
- spacious: ke
2832
+ name: "softUI",
2833
+ palette: it,
2834
+ shape: Se,
2835
+ density: oe,
2836
+ shadow: vt
2841
2837
  }, Ya = {
2842
- flat: Fe,
2843
- subtle: pt,
2844
- elevated: gt,
2845
- liquidGlass: bt,
2846
- brutalist: xt,
2847
- neumorphic: mt,
2848
- natural: ht,
2849
- glow: Ce
2838
+ name: "bloom",
2839
+ palette: we,
2840
+ shape: se,
2841
+ density: Me,
2842
+ shadow: We
2850
2843
  }, Za = {
2851
- modern: Ha,
2852
- enterprise: Na,
2853
- playful: Ea,
2854
- liquidGlass: Aa,
2855
- bento: Oa,
2856
- brutalist: Xa,
2857
- terminal: ja,
2858
- softUI: Ua,
2859
- bloom: qa,
2860
- minimal: Ga
2844
+ name: "minimal",
2845
+ palette: gt,
2846
+ shape: se,
2847
+ density: oe,
2848
+ shadow: Ce
2849
+ }, Ja = {
2850
+ default: ct,
2851
+ brand: Na,
2852
+ indigo: we,
2853
+ violet: it,
2854
+ emerald: ut,
2855
+ teal: Ea,
2856
+ rose: dt,
2857
+ coral: ft,
2858
+ amber: Aa,
2859
+ ocean: pt,
2860
+ slate: gt,
2861
+ sage: Oa
2862
+ }, Qa = {
2863
+ sharp: De,
2864
+ rounded: se,
2865
+ pill: Se
2866
+ }, en = {
2867
+ compact: ke,
2868
+ default: oe,
2869
+ spacious: Me
2870
+ }, tn = {
2871
+ flat: Ce,
2872
+ subtle: bt,
2873
+ elevated: mt,
2874
+ liquidGlass: xt,
2875
+ brutalist: ht,
2876
+ neumorphic: vt,
2877
+ natural: yt,
2878
+ glow: We
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
2861
2890
  };
2862
- function Ja(e) {
2863
- return typeof e == "string" ? _a[e] : e;
2891
+ function nn(e) {
2892
+ return typeof e == "string" ? Ja[e] : e;
2864
2893
  }
2865
- function Qa(e) {
2866
- return typeof e == "string" ? Va[e] : e;
2894
+ function rn(e) {
2895
+ return typeof e == "string" ? Qa[e] : e;
2867
2896
  }
2868
- function en(e) {
2869
- return typeof e == "string" ? Ka[e] : e;
2897
+ function sn(e) {
2898
+ return typeof e == "string" ? en[e] : e;
2870
2899
  }
2871
- function tn(e) {
2872
- return typeof e == "string" ? Ya[e] : e;
2900
+ function on(e) {
2901
+ return typeof e == "string" ? tn[e] : e;
2873
2902
  }
2874
- function an(e, t) {
2903
+ function ln(e, t) {
2875
2904
  let s, a, n, r;
2876
2905
  if (typeof e == "string") {
2877
- const c = Za[e];
2906
+ const c = an[e];
2878
2907
  if (!c) return {};
2879
2908
  s = c.palette, a = c.shape, n = c.density, r = c.shadow;
2880
2909
  } else
2881
- e.palette !== void 0 && (s = Ja(e.palette)), e.shape !== void 0 && (a = Qa(e.shape)), e.density !== void 0 && (n = en(e.density)), e.shadow !== void 0 && (r = tn(e.shadow));
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));
2882
2911
  const o = {};
2883
2912
  if (s) {
2884
- const c = st(s[t], t);
2913
+ const c = lt(s[t], t);
2885
2914
  Object.assign(o, c);
2886
2915
  }
2887
2916
  return a && Object.assign(o, a.tokens), n && Object.assign(o, n.tokens), r && Object.assign(o, r[t]), o;
2888
2917
  }
2889
- const vt = wt({
2918
+ const wt = St({
2890
2919
  theme: "light",
2891
- tokens: he
2920
+ tokens: ye
2892
2921
  });
2893
- function fn({
2922
+ function xn({
2894
2923
  theme: e = "light",
2895
2924
  preset: t,
2896
2925
  tokens: s,
2897
2926
  anchors: a,
2898
2927
  children: n
2899
2928
  }) {
2900
- const r = Ke().replace(/:/g, ""), o = t ? an(t, e) : void 0, c = (() => {
2929
+ const r = Ze().replace(/:/g, ""), o = t ? ln(t, e) : void 0, c = (() => {
2901
2930
  if (a) {
2902
- const k = st(a, e);
2931
+ const I = lt(a, e);
2903
2932
  if (o) {
2904
- const L = {};
2905
- for (const [b, m] of Object.entries(o))
2906
- (b.startsWith("space") || b.startsWith("radius") || b.startsWith("shadow") || b.startsWith("duration") || b.startsWith("easing")) && (L[b] = m);
2907
- return { ...k, ...L };
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 };
2908
2937
  }
2909
- return k;
2938
+ return I;
2910
2939
  }
2911
- const i = e === "dark" ? at : he, d = o ? { ...o, ...s } : s, g = d ? { ...i, ...d } : i, h = d ? rt(d, g, e) : {}, p = (d == null ? void 0 : d.accentBorder) ?? (e === "light" ? M(g.accentDefault, -0.15) : M(g.accentDefault, 0.15)), y = (d == null ? void 0 : d.accentFg) ?? nt(g.accentDefault), I = La(g.accentDefault, y);
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);
2912
2941
  return {
2913
- ...g,
2942
+ ...m,
2914
2943
  ...h,
2915
- accentDefault: I,
2916
- accentFg: y,
2917
- accentBorder: p
2944
+ accentDefault: B,
2945
+ accentFg: v,
2946
+ accentBorder: b
2918
2947
  };
2919
- })(), u = `html { font-size: 14px; }
2920
- ` + ha(c, ":root");
2921
- return me(() => {
2922
- let i = document.getElementById(`lucent-tokens-${r}`);
2923
- return i || (i = document.createElement("style"), i.id = `lucent-tokens-${r}`, document.head.appendChild(i)), i.textContent = u, () => {
2924
- var d;
2925
- (d = document.getElementById(`lucent-tokens-${r}`)) == null || d.remove();
2948
+ })(), i = `html { font-size: 14px; }
2949
+ ` + Sa(c, ":root");
2950
+ return ve(() => {
2951
+ let d = document.getElementById(`lucent-tokens-${r}`);
2952
+ return d || (d = document.createElement("style"), d.id = `lucent-tokens-${r}`, document.head.appendChild(d)), d.textContent = i, () => {
2953
+ var u;
2954
+ (u = document.getElementById(`lucent-tokens-${r}`)) == null || u.remove();
2926
2955
  };
2927
- }, [r, u]), /* @__PURE__ */ f(vt.Provider, { value: { theme: e, tokens: c }, children: n });
2956
+ }, [r, i]), /* @__PURE__ */ f(wt.Provider, { value: { theme: e, tokens: c }, children: n });
2928
2957
  }
2929
- function pn() {
2930
- return yt(vt);
2958
+ function hn() {
2959
+ return Dt(wt);
2931
2960
  }
2932
2961
  export {
2933
- ma as $,
2934
- ve as A,
2935
- Ye as B,
2936
- sa as C,
2937
- he as D,
2938
- Aa as E,
2939
- bt as F,
2940
- ha as G,
2941
- Ga as H,
2962
+ hn as $,
2963
+ We as A,
2964
+ Je as B,
2965
+ ca as C,
2966
+ we as D,
2967
+ ye as E,
2968
+ qa as F,
2969
+ xt as G,
2970
+ Sa as H,
2942
2971
  te as I,
2943
- Ha as J,
2944
- ht as K,
2945
- fn as L,
2946
- mt as M,
2947
- dt as N,
2948
- we as O,
2949
- Ea as P,
2950
- an as Q,
2951
- it as R,
2952
- Je as S,
2953
- cn as T,
2954
- re as U,
2955
- ye as V,
2956
- Ua as W,
2957
- ke as X,
2958
- pt as Y,
2959
- ja as Z,
2960
- pn as _,
2961
- M as a,
2962
- da as a0,
2963
- ua as a1,
2964
- La as a2,
2965
- on as b,
2966
- de as c,
2967
- Ze as d,
2968
- un as e,
2969
- dn as f,
2970
- nt as g,
2971
- ln as h,
2972
- Oa as i,
2973
- qa as j,
2974
- Fa as k,
2975
- Xa as l,
2976
- xt as m,
2977
- De as n,
2978
- st as o,
2979
- at as p,
2980
- se as q,
2981
- ot as r,
2982
- xa as s,
2983
- rt as t,
2984
- gt as u,
2985
- ct as v,
2986
- Na as w,
2987
- Fe as x,
2988
- $a as y,
2989
- Ce as z
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,
2981
+ et as S,
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 _,
2990
+ z as a,
2991
+ wa as a0,
2992
+ ba as a1,
2993
+ ga as a2,
2994
+ Wa as a3,
2995
+ fn as b,
2996
+ pe as c,
2997
+ Qe as d,
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,
3006
+ ht as m,
3007
+ ke as n,
3008
+ lt as o,
3009
+ rt as p,
3010
+ oe as q,
3011
+ ct as r,
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
2990
3020
  };