lucent-ui 0.34.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -208,19 +208,19 @@ const Ra = {
208
208
  md: "var(--lucent-space-4)",
209
209
  lg: "var(--lucent-space-4)"
210
210
  }, At = pt(
211
- ({ label: t, helperText: r, errorText: n, autoResize: o = !1, maxLength: a, showCount: i = !1, size: l = "md", id: s, value: c, onChange: p, disabled: f, style: u, ...k }, x) => {
212
- const m = $(null), h = x ?? m, d = s ?? `lucent-textarea-${Math.random().toString(36).slice(2, 7)}`, b = !!n, w = !!f, y = typeof c == "string" ? c.length : 0;
211
+ ({ label: t, helperText: r, errorText: n, autoResize: o = !1, maxLength: a, showCount: i = !1, size: s = "md", id: l, value: c, onChange: u, disabled: f, style: p, ...w }, y) => {
212
+ const m = $(null), h = y ?? m, d = l ?? `lucent-textarea-${Math.random().toString(36).slice(2, 7)}`, b = !!n, x = !!f, k = typeof c == "string" ? c.length : 0;
213
213
  H(() => {
214
214
  if (!o) return;
215
215
  const C = h.current;
216
216
  C && (C.style.height = "auto", C.style.height = `${C.scrollHeight}px`);
217
217
  }, [c, o, h]);
218
- const S = w ? "transparent" : b ? "var(--lucent-danger-default)" : "var(--lucent-border-default)";
218
+ const S = x ? "transparent" : b ? "var(--lucent-danger-default)" : "var(--lucent-border-default)";
219
219
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", width: "100%" }, children: [
220
220
  t && /* @__PURE__ */ e("label", { htmlFor: d, style: {
221
- fontSize: zt[l],
221
+ fontSize: zt[s],
222
222
  fontWeight: "var(--lucent-font-weight-medium)",
223
- color: w ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
223
+ color: x ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
224
224
  fontFamily: "var(--lucent-font-family-base)"
225
225
  }, children: t }),
226
226
  /* @__PURE__ */ e(
@@ -230,48 +230,48 @@ const Ra = {
230
230
  id: d,
231
231
  maxLength: a,
232
232
  value: c,
233
- onChange: p,
233
+ onChange: u,
234
234
  disabled: f,
235
235
  "aria-invalid": b,
236
236
  "aria-describedby": b ? `${d}-error` : r ? `${d}-helper` : void 0,
237
237
  style: {
238
238
  width: "100%",
239
239
  minHeight: "100px",
240
- padding: Et[l],
241
- fontSize: Mt[l],
240
+ padding: Et[s],
241
+ fontSize: Mt[s],
242
242
  fontFamily: "var(--lucent-font-family-base)",
243
- color: w ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
244
- background: w ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
243
+ color: x ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
244
+ background: x ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
245
245
  border: `1px solid ${S}`,
246
246
  borderRadius: "var(--lucent-radius-lg)",
247
247
  outline: "none",
248
248
  resize: o ? "none" : "vertical",
249
249
  boxSizing: "border-box",
250
250
  lineHeight: "var(--lucent-line-height-base)",
251
- cursor: w ? "not-allowed" : void 0,
251
+ cursor: x ? "not-allowed" : void 0,
252
252
  transition: [
253
253
  "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
254
254
  "box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)"
255
255
  ].join(", "),
256
- ...u
256
+ ...p
257
257
  },
258
258
  onMouseEnter: (C) => {
259
259
  var v;
260
- !w && C.currentTarget !== document.activeElement && (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (v = k.onMouseEnter) == null || v.call(k, C);
260
+ !x && C.currentTarget !== document.activeElement && (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-border-strong)"), (v = w.onMouseEnter) == null || v.call(w, C);
261
261
  },
262
262
  onMouseLeave: (C) => {
263
263
  var v;
264
- !w && C.currentTarget !== document.activeElement && (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (v = k.onMouseLeave) == null || v.call(k, C);
264
+ !x && C.currentTarget !== document.activeElement && (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-border-default)"), (v = w.onMouseLeave) == null || v.call(w, C);
265
265
  },
266
266
  onFocus: (C) => {
267
267
  var v;
268
- w || (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-accent-border)", C.currentTarget.style.boxShadow = `0 0 0 3px ${b ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (v = k.onFocus) == null || v.call(k, C));
268
+ x || (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-accent-border)", C.currentTarget.style.boxShadow = `0 0 0 3px ${b ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}`, (v = w.onFocus) == null || v.call(w, C));
269
269
  },
270
270
  onBlur: (C) => {
271
271
  var v;
272
- w || (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", C.currentTarget.style.boxShadow = "none", (v = k.onBlur) == null || v.call(k, C));
272
+ x || (C.currentTarget.style.borderColor = b ? "var(--lucent-danger-default)" : "var(--lucent-border-default)", C.currentTarget.style.boxShadow = "none", (v = w.onBlur) == null || v.call(w, C));
273
273
  },
274
- ...k
274
+ ...w
275
275
  }
276
276
  ),
277
277
  /* @__PURE__ */ g("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
@@ -281,12 +281,12 @@ const Ra = {
281
281
  ] }),
282
282
  (i || a) && /* @__PURE__ */ g("span", { style: {
283
283
  fontSize: "var(--lucent-font-size-xs)",
284
- color: a && y >= a ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)",
284
+ color: a && k >= a ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)",
285
285
  fontFamily: "var(--lucent-font-family-mono)",
286
286
  flexShrink: 0,
287
287
  marginLeft: "var(--lucent-space-2)"
288
288
  }, children: [
289
- y,
289
+ k,
290
290
  a ? `/${a}` : ""
291
291
  ] })
292
292
  ] })
@@ -435,56 +435,56 @@ function ke({
435
435
  onDismiss: o,
436
436
  onClick: a,
437
437
  leftIcon: i,
438
- swatch: l,
439
- dot: s = !1,
438
+ swatch: s,
439
+ dot: l = !1,
440
440
  pulse: c = !1,
441
- borderless: p = !1,
441
+ borderless: u = !1,
442
442
  ghost: f = !1,
443
- disabled: u = !1,
444
- style: k
443
+ disabled: p = !1,
444
+ style: w
445
445
  }) {
446
- const x = qt[r], m = Dt[n], [h, d] = z(!1), b = s && c, w = s && !t, y = !u && (o || a), S = `color-mix(in srgb, ${x.color} 8%, transparent)`, C = m.dotSize * 3, v = {
446
+ const y = qt[r], m = Dt[n], [h, d] = z(!1), b = l && c, x = l && !t, k = !p && (o || a), S = `color-mix(in srgb, ${y.color} 8%, transparent)`, C = m.dotSize * 3, v = {
447
447
  display: "inline-flex",
448
448
  alignItems: "center",
449
- justifyContent: w ? "center" : void 0,
450
- gap: w ? void 0 : m.gap,
451
- height: w ? C : m.height,
452
- width: w ? C : void 0,
453
- padding: w ? 0 : o ? m.paddingDismiss : m.padding,
449
+ justifyContent: x ? "center" : void 0,
450
+ gap: x ? void 0 : m.gap,
451
+ height: x ? C : m.height,
452
+ width: x ? C : void 0,
453
+ padding: x ? 0 : o ? m.paddingDismiss : m.padding,
454
454
  fontSize: m.fontSize,
455
455
  fontFamily: "var(--lucent-font-family-base)",
456
456
  fontWeight: "var(--lucent-font-weight-medium)",
457
457
  lineHeight: 1,
458
- borderRadius: w ? "var(--lucent-radius-full)" : "var(--lucent-radius-lg)",
459
- background: f ? h && y ? S : "transparent" : h && y ? x.hoverBg : x.bg,
460
- color: x.color,
461
- border: f || p ? "1px solid transparent" : `1px solid ${h && y ? x.hoverBorder : x.border}`,
458
+ borderRadius: x ? "var(--lucent-radius-full)" : "var(--lucent-radius-lg)",
459
+ background: f ? h && k ? S : "transparent" : h && k ? y.hoverBg : y.bg,
460
+ color: y.color,
461
+ border: f || u ? "1px solid transparent" : `1px solid ${h && k ? y.hoverBorder : y.border}`,
462
462
  whiteSpace: "nowrap",
463
463
  boxSizing: "border-box",
464
- opacity: u ? 0.5 : 1,
465
- transform: h && y ? "translateY(-1px)" : "none",
466
- boxShadow: h && y && !f ? `0 2px 4px ${x.hoverBorder}22` : "none",
464
+ opacity: p ? 0.5 : 1,
465
+ transform: h && k ? "translateY(-1px)" : "none",
466
+ boxShadow: h && k && !f ? `0 2px 4px ${y.hoverBorder}22` : "none",
467
467
  transition: [
468
468
  "transform var(--lucent-duration-fast) var(--lucent-easing-default)",
469
469
  "box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
470
470
  "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
471
471
  "background var(--lucent-duration-fast) var(--lucent-easing-default)"
472
472
  ].join(", "),
473
- cursor: y ? "pointer" : "default",
473
+ cursor: k ? "pointer" : "default",
474
474
  // Reset button styles when onClick
475
475
  ...a ? { outline: "none" } : {},
476
- ...k
477
- }, q = /* @__PURE__ */ g(Q, { children: [
476
+ ...w
477
+ }, E = /* @__PURE__ */ g(Q, { children: [
478
478
  b && /* @__PURE__ */ e("style", { children: Bt }),
479
- l && /* @__PURE__ */ e("span", { style: {
479
+ s && /* @__PURE__ */ e("span", { style: {
480
480
  width: m.dotSize + 2,
481
481
  height: m.dotSize + 2,
482
482
  borderRadius: "50%",
483
- background: l,
483
+ background: s,
484
484
  border: "1px solid rgba(0,0,0,0.1)",
485
485
  flexShrink: 0
486
486
  } }),
487
- s && !l && /* @__PURE__ */ g("span", { style: {
487
+ l && !s && /* @__PURE__ */ g("span", { style: {
488
488
  position: "relative",
489
489
  width: m.dotSize,
490
490
  height: m.dotSize,
@@ -504,7 +504,7 @@ function ke({
504
504
  animation: "lucent-chip-pulse 1.5s ease-out infinite"
505
505
  } })
506
506
  ] }),
507
- i && !l && !s && /* @__PURE__ */ e("span", { style: {
507
+ i && !s && !l && /* @__PURE__ */ e("span", { style: {
508
508
  display: "inline-flex",
509
509
  alignItems: "center",
510
510
  justifyContent: "center",
@@ -517,10 +517,10 @@ function ke({
517
517
  "button",
518
518
  {
519
519
  type: "button",
520
- onClick: u ? void 0 : (E) => {
521
- E.stopPropagation(), o();
520
+ onClick: p ? void 0 : (A) => {
521
+ A.stopPropagation(), o();
522
522
  },
523
- disabled: u,
523
+ disabled: p,
524
524
  "aria-label": "Dismiss",
525
525
  style: {
526
526
  display: "inline-flex",
@@ -533,7 +533,7 @@ function ke({
533
533
  borderRadius: "var(--lucent-radius-lg)",
534
534
  background: "transparent",
535
535
  color: "inherit",
536
- cursor: u ? "not-allowed" : "pointer",
536
+ cursor: p ? "not-allowed" : "pointer",
537
537
  flexShrink: 0,
538
538
  lineHeight: 1
539
539
  },
@@ -542,7 +542,7 @@ function ke({
542
542
  )
543
543
  ] }), T = {
544
544
  onMouseEnter: () => {
545
- u || d(!0);
545
+ p || d(!0);
546
546
  },
547
547
  onMouseLeave: () => d(!1)
548
548
  };
@@ -550,13 +550,13 @@ function ke({
550
550
  "button",
551
551
  {
552
552
  type: "button",
553
- onClick: u ? void 0 : a,
554
- disabled: u,
553
+ onClick: p ? void 0 : a,
554
+ disabled: p,
555
555
  style: v,
556
556
  ...T,
557
- children: q
557
+ children: E
558
558
  }
559
- ) : /* @__PURE__ */ e("span", { style: v, ...T, children: q });
559
+ ) : /* @__PURE__ */ e("span", { style: v, ...T, children: E });
560
560
  }
561
561
  const Na = {
562
562
  id: "chip",
@@ -623,9 +623,9 @@ function Pt(t, r) {
623
623
  return n.length === 1 ? (((o = n[0]) == null ? void 0 : o[0]) ?? "").toUpperCase() : ((((a = n[0]) == null ? void 0 : a[0]) ?? "") + (((i = n[n.length - 1]) == null ? void 0 : i[0]) ?? "")).toUpperCase();
624
624
  }
625
625
  function $a({ src: t, alt: r, size: n = "md", initials: o, style: a, ...i }) {
626
- const l = Rt[n], s = Pt(r, o), c = {
627
- width: l,
628
- height: l,
626
+ const s = Rt[n], l = Pt(r, o), c = {
627
+ width: s,
628
+ height: s,
629
629
  borderRadius: "var(--lucent-radius-full)",
630
630
  flexShrink: 0,
631
631
  display: "inline-flex",
@@ -641,8 +641,8 @@ function $a({ src: t, alt: r, size: n = "md", initials: o, style: a, ...i }) {
641
641
  {
642
642
  src: t,
643
643
  alt: r,
644
- width: l,
645
- height: l,
644
+ width: s,
645
+ height: s,
646
646
  style: { ...c, objectFit: "cover" },
647
647
  ...i
648
648
  }
@@ -659,7 +659,7 @@ function $a({ src: t, alt: r, size: n = "md", initials: o, style: a, ...i }) {
659
659
  fontWeight: "var(--lucent-font-weight-semibold)",
660
660
  fontFamily: "var(--lucent-font-family-base)"
661
661
  },
662
- children: s
662
+ children: l
663
663
  }
664
664
  );
665
665
  }
@@ -853,29 +853,29 @@ const Ha = {
853
853
  contained: o = !1,
854
854
  helperText: a,
855
855
  checked: i,
856
- defaultChecked: l,
857
- disabled: s,
856
+ defaultChecked: s,
857
+ disabled: l,
858
858
  id: c,
859
- onChange: p,
859
+ onChange: u,
860
860
  style: f,
861
- ...u
862
- }, k) => {
863
- const x = $(null), m = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, h = Wt[r], d = i !== void 0, [b, w] = z(l ?? !1), y = d ? !!i : b, S = $(y), [C, v] = z(0);
861
+ ...p
862
+ }, w) => {
863
+ const y = $(null), m = c ?? `lucent-checkbox-${Math.random().toString(36).slice(2, 7)}`, h = Wt[r], d = i !== void 0, [b, x] = z(s ?? !1), k = d ? !!i : b, S = $(k), [C, v] = z(0);
864
864
  H(() => {
865
- !s && S.current !== y && (S.current = y, v((I) => I + 1));
866
- }, [y, s]);
867
- const q = J(
865
+ !l && S.current !== k && (S.current = k, v((I) => I + 1));
866
+ }, [k, l]);
867
+ const E = J(
868
868
  (I) => {
869
- x.current = I, typeof k == "function" ? k(I) : k && (k.current = I);
869
+ y.current = I, typeof w == "function" ? w(I) : w && (w.current = I);
870
870
  },
871
- [k]
871
+ [w]
872
872
  );
873
873
  H(() => {
874
- x.current && (x.current.indeterminate = n);
874
+ y.current && (y.current.indeterminate = n);
875
875
  }, [n]);
876
876
  const T = (I) => {
877
- d || w(I.target.checked), p == null || p(I);
878
- }, E = s ? "var(--lucent-text-disabled)" : "var(--lucent-accent-fg)", N = {
877
+ d || x(I.target.checked), u == null || u(I);
878
+ }, A = l ? "var(--lucent-text-disabled)" : "var(--lucent-accent-fg)", N = {
879
879
  width: h,
880
880
  height: h,
881
881
  // fixed corner so global radius overrides (e.g. via customizer) don't
@@ -883,8 +883,8 @@ const Ha = {
883
883
  // rounded regardless of theming.
884
884
  // bumping up a bit to keep the box from feeling too sharp.
885
885
  borderRadius: "4px",
886
- border: `1.5px solid ${s ? "transparent" : y || n ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
887
- background: s ? "var(--lucent-surface-secondary)" : y || n ? "var(--lucent-accent-default)" : "var(--lucent-surface)",
886
+ border: `1.5px solid ${l ? "transparent" : k || n ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
887
+ background: l ? "var(--lucent-surface-secondary)" : k || n ? "var(--lucent-accent-default)" : "var(--lucent-surface)",
888
888
  display: "inline-flex",
889
889
  alignItems: "center",
890
890
  justifyContent: "center",
@@ -899,10 +899,10 @@ const Ha = {
899
899
  display: "inline-flex",
900
900
  alignItems: a ? "flex-start" : "center",
901
901
  gap: "var(--lucent-space-2)",
902
- cursor: s ? "not-allowed" : "pointer",
902
+ cursor: l ? "not-allowed" : "pointer",
903
903
  fontFamily: "var(--lucent-font-family-base)",
904
904
  fontSize: r === "sm" ? "var(--lucent-font-size-sm)" : "var(--lucent-font-size-md)",
905
- color: s ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
905
+ color: l ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
906
906
  userSelect: "none",
907
907
  ...o ? {} : f
908
908
  },
@@ -910,18 +910,18 @@ const Ha = {
910
910
  /* @__PURE__ */ e(
911
911
  "input",
912
912
  {
913
- ref: q,
913
+ ref: E,
914
914
  type: "checkbox",
915
915
  id: m,
916
916
  checked: d ? i : b,
917
- disabled: s,
917
+ disabled: l,
918
918
  onChange: T,
919
919
  style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
920
- ...u
920
+ ...p
921
921
  }
922
922
  ),
923
923
  /* @__PURE__ */ g("span", { "aria-hidden": !0, style: N, children: [
924
- y && !n && /* @__PURE__ */ e(
924
+ k && !n && /* @__PURE__ */ e(
925
925
  "svg",
926
926
  {
927
927
  width: h - 4,
@@ -929,7 +929,7 @@ const Ha = {
929
929
  viewBox: "0 0 10 10",
930
930
  fill: "none",
931
931
  style: { animation: "lucent-cb-mark 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" },
932
- children: /* @__PURE__ */ e("path", { d: "M1.5 5L4 7.5L8.5 2.5", stroke: E, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })
932
+ children: /* @__PURE__ */ e("path", { d: "M1.5 5L4 7.5L8.5 2.5", stroke: A, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })
933
933
  }
934
934
  ),
935
935
  n && /* @__PURE__ */ e(
@@ -940,7 +940,7 @@ const Ha = {
940
940
  viewBox: "0 0 10 10",
941
941
  fill: "none",
942
942
  style: { animation: "lucent-cb-mark 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" },
943
- children: /* @__PURE__ */ e("path", { d: "M2 5H8", stroke: E, strokeWidth: 1.5, strokeLinecap: "round" })
943
+ children: /* @__PURE__ */ e("path", { d: "M2 5H8", stroke: A, strokeWidth: 1.5, strokeLinecap: "round" })
944
944
  }
945
945
  )
946
946
  ] }, C),
@@ -951,7 +951,7 @@ const Ha = {
951
951
  }, children: t }),
952
952
  a && /* @__PURE__ */ e("span", { style: {
953
953
  fontSize: "var(--lucent-font-size-xs)",
954
- color: s ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
954
+ color: l ? "var(--lucent-text-disabled)" : "var(--lucent-text-secondary)",
955
955
  marginTop: "2px"
956
956
  }, children: a })
957
957
  ] })
@@ -970,14 +970,14 @@ const Ha = {
970
970
  padding: a ? "var(--lucent-space-3)" : "0 var(--lucent-space-3)",
971
971
  display: "flex",
972
972
  alignItems: a ? "flex-start" : "center",
973
- background: y && !s ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "transparent",
973
+ background: k && !l ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "transparent",
974
974
  transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)",
975
- cursor: s ? "not-allowed" : "pointer",
975
+ cursor: l ? "not-allowed" : "pointer",
976
976
  ...f
977
977
  },
978
978
  onClick: (I) => {
979
979
  var P;
980
- s || I.target === I.currentTarget && ((P = x.current) == null || P.click());
980
+ l || I.target === I.currentTarget && ((P = y.current) == null || P.click());
981
981
  },
982
982
  children: R
983
983
  }
@@ -1090,7 +1090,7 @@ function Gt({
1090
1090
  disabled: o,
1091
1091
  orientation: a = "vertical",
1092
1092
  label: i,
1093
- children: l
1093
+ children: s
1094
1094
  }) {
1095
1095
  return /* @__PURE__ */ e(ht.Provider, { value: { name: t, value: r, onChange: n, disabled: o ?? !1 }, children: /* @__PURE__ */ e(
1096
1096
  "div",
@@ -1103,7 +1103,7 @@ function Gt({
1103
1103
  gap: a === "vertical" ? "var(--lucent-space-3)" : "var(--lucent-space-4)",
1104
1104
  flexWrap: "wrap"
1105
1105
  },
1106
- children: l
1106
+ children: s
1107
1107
  }
1108
1108
  ) });
1109
1109
  }
@@ -1112,23 +1112,23 @@ const Ut = { sm: 14, md: 16, lg: 20 }, jt = { sm: "calc(var(--lucent-space-8) *
1112
1112
  md: "var(--lucent-font-size-md)",
1113
1113
  lg: "var(--lucent-font-size-md)"
1114
1114
  };
1115
- function Ua({ value: t, label: r, size: n = "md", contained: o = !1, helperText: a, disabled: i, id: l, onChange: s, checked: c, style: p, ...f }) {
1116
- const u = ee(ht), k = l ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, x = Ut[n], m = i ?? (u == null ? void 0 : u.disabled) ?? !1, h = u ? u.value === t : !!c, d = $(h), [b, w] = z(0);
1115
+ function Ua({ value: t, label: r, size: n = "md", contained: o = !1, helperText: a, disabled: i, id: s, onChange: l, checked: c, style: u, ...f }) {
1116
+ const p = ee(ht), w = s ?? `lucent-radio-${Math.random().toString(36).slice(2, 7)}`, y = Ut[n], m = i ?? (p == null ? void 0 : p.disabled) ?? !1, h = p ? p.value === t : !!c, d = $(h), [b, x] = z(0);
1117
1117
  H(() => {
1118
- !m && d.current !== h && (d.current = h, w((q) => q + 1));
1118
+ !m && d.current !== h && (d.current = h, x((E) => E + 1));
1119
1119
  }, [h, m]);
1120
- const y = (q) => {
1121
- u == null || u.onChange(t), s == null || s(q);
1120
+ const k = (E) => {
1121
+ p == null || p.onChange(t), l == null || l(E);
1122
1122
  }, S = {
1123
- width: x / 2,
1124
- height: x / 2,
1123
+ width: y / 2,
1124
+ height: y / 2,
1125
1125
  borderRadius: "50%",
1126
1126
  background: m ? "var(--lucent-text-disabled)" : "var(--lucent-accent-fg)",
1127
1127
  animation: h ? "lucent-radio-dot 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards" : void 0,
1128
1128
  opacity: h ? 1 : 0
1129
1129
  }, C = {
1130
- width: x,
1131
- height: x,
1130
+ width: y,
1131
+ height: y,
1132
1132
  borderRadius: "50%",
1133
1133
  border: `1.5px solid ${m ? "transparent" : h ? "var(--lucent-accent-default)" : "var(--lucent-border-strong)"}`,
1134
1134
  background: m ? "var(--lucent-surface-secondary)" : h ? "var(--lucent-accent-default)" : "var(--lucent-surface)",
@@ -1150,19 +1150,19 @@ function Ua({ value: t, label: r, size: n = "md", contained: o = !1, helperText:
1150
1150
  fontSize: _t[n],
1151
1151
  color: m ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
1152
1152
  userSelect: "none",
1153
- ...o ? {} : p
1153
+ ...o ? {} : u
1154
1154
  },
1155
1155
  children: [
1156
1156
  /* @__PURE__ */ e(
1157
1157
  "input",
1158
1158
  {
1159
1159
  type: "radio",
1160
- id: k,
1160
+ id: w,
1161
1161
  value: t,
1162
- name: (u == null ? void 0 : u.name) ?? f.name,
1162
+ name: (p == null ? void 0 : p.name) ?? f.name,
1163
1163
  checked: h,
1164
1164
  disabled: m,
1165
- onChange: y,
1165
+ onChange: k,
1166
1166
  style: { position: "absolute", opacity: 0, width: 0, height: 0, margin: 0, pointerEvents: "none" },
1167
1167
  ...f
1168
1168
  }
@@ -1194,11 +1194,11 @@ function Ua({ value: t, label: r, size: n = "md", contained: o = !1, helperText:
1194
1194
  background: h && !m ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "transparent",
1195
1195
  transition: "border-color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)",
1196
1196
  cursor: m ? "not-allowed" : "pointer",
1197
- ...p
1197
+ ...u
1198
1198
  },
1199
- onClick: (q) => {
1200
- if (!m && q.target === q.currentTarget) {
1201
- const T = q.currentTarget.querySelector("input");
1199
+ onClick: (E) => {
1200
+ if (!m && E.target === E.currentTarget) {
1201
+ const T = E.currentTarget.querySelector("input");
1202
1202
  T == null || T.click();
1203
1203
  }
1204
1204
  },
@@ -1520,7 +1520,7 @@ const _a = {
1520
1520
  lg: { fontSize: "var(--lucent-font-size-md)", height: "28px", padding: "0 var(--lucent-space-4)", iconSize: 14, gap: "var(--lucent-space-2)" }
1521
1521
  };
1522
1522
  function Xa({ children: t, variant: r = "neutral", size: n = "md", onDismiss: o, disabled: a }) {
1523
- const i = Yt[r], l = Kt[n], [s, c] = z(!1), p = !a && o;
1523
+ const i = Yt[r], s = Kt[n], [l, c] = z(!1), u = !a && o;
1524
1524
  return /* @__PURE__ */ g(
1525
1525
  "span",
1526
1526
  {
@@ -1531,24 +1531,24 @@ function Xa({ children: t, variant: r = "neutral", size: n = "md", onDismiss: o,
1531
1531
  style: {
1532
1532
  display: "inline-flex",
1533
1533
  alignItems: "center",
1534
- gap: l.gap,
1535
- height: l.height,
1536
- padding: o ? `0 var(--lucent-space-2) 0 ${l.padding.split(" ")[1]}` : l.padding,
1537
- fontSize: l.fontSize,
1534
+ gap: s.gap,
1535
+ height: s.height,
1536
+ padding: o ? `0 var(--lucent-space-2) 0 ${s.padding.split(" ")[1]}` : s.padding,
1537
+ fontSize: s.fontSize,
1538
1538
  fontFamily: "var(--lucent-font-family-base)",
1539
1539
  fontWeight: "var(--lucent-font-weight-medium)",
1540
1540
  lineHeight: 1,
1541
1541
  borderRadius: "var(--lucent-radius-lg)",
1542
1542
  background: i.bg,
1543
1543
  color: i.color,
1544
- border: `1px solid ${s && !a ? i.dismissHover : i.border}`,
1544
+ border: `1px solid ${l && !a ? i.dismissHover : i.border}`,
1545
1545
  whiteSpace: "nowrap",
1546
1546
  boxSizing: "border-box",
1547
1547
  opacity: a ? 0.5 : 1,
1548
- transform: s && p ? "translateY(-1px)" : "none",
1549
- boxShadow: s && p ? `0 2px 4px ${i.dismissHover}22` : "none",
1548
+ transform: l && u ? "translateY(-1px)" : "none",
1549
+ boxShadow: l && u ? `0 2px 4px ${i.dismissHover}22` : "none",
1550
1550
  transition: "transform var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default), border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
1551
- cursor: p ? "pointer" : "default"
1551
+ cursor: u ? "pointer" : "default"
1552
1552
  },
1553
1553
  children: [
1554
1554
  t,
@@ -1565,8 +1565,8 @@ function Xa({ children: t, variant: r = "neutral", size: n = "md", onDismiss: o,
1565
1565
  display: "inline-flex",
1566
1566
  alignItems: "center",
1567
1567
  justifyContent: "center",
1568
- width: l.iconSize + 4,
1569
- height: l.iconSize + 4,
1568
+ width: s.iconSize + 4,
1569
+ height: s.iconSize + 4,
1570
1570
  padding: 0,
1571
1571
  border: "none",
1572
1572
  borderRadius: "var(--lucent-radius-lg)",
@@ -1582,7 +1582,7 @@ function Xa({ children: t, variant: r = "neutral", size: n = "md", onDismiss: o,
1582
1582
  onMouseLeave: (f) => {
1583
1583
  f.currentTarget.style.background = "transparent";
1584
1584
  },
1585
- children: /* @__PURE__ */ e("svg", { width: l.iconSize, height: l.iconSize, viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", children: /* @__PURE__ */ e("path", { d: "M2 2L8 8M8 2L2 8" }) })
1585
+ children: /* @__PURE__ */ e("svg", { width: s.iconSize, height: s.iconSize, viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", children: /* @__PURE__ */ e("path", { d: "M2 2L8 8M8 2L2 8" }) })
1586
1586
  }
1587
1587
  )
1588
1588
  ]
@@ -1682,18 +1682,18 @@ const Ja = {
1682
1682
  }
1683
1683
  };
1684
1684
  function Za({ content: t, children: r, placement: n = "top", delay: o = 300 }) {
1685
- const [a, i] = z(!1), l = $(null), s = () => {
1686
- l.current = setTimeout(() => i(!0), o);
1685
+ const [a, i] = z(!1), s = $(null), l = () => {
1686
+ s.current = setTimeout(() => i(!0), o);
1687
1687
  }, c = () => {
1688
- l.current && clearTimeout(l.current), i(!1);
1688
+ s.current && clearTimeout(s.current), i(!1);
1689
1689
  };
1690
1690
  return t ? /* @__PURE__ */ g(
1691
1691
  "span",
1692
1692
  {
1693
1693
  style: { position: "relative", display: "inline-flex" },
1694
- onMouseEnter: s,
1694
+ onMouseEnter: l,
1695
1695
  onMouseLeave: c,
1696
- onFocus: s,
1696
+ onFocus: l,
1697
1697
  onBlur: c,
1698
1698
  children: [
1699
1699
  r,
@@ -1974,15 +1974,15 @@ function ro({
1974
1974
  icon: o,
1975
1975
  disabled: a = !1,
1976
1976
  inverse: i = !1,
1977
- onClick: l,
1978
- as: s,
1977
+ onClick: s,
1978
+ as: l,
1979
1979
  style: c
1980
1980
  }) {
1981
1981
  return /* @__PURE__ */ g(
1982
- s ?? "a",
1982
+ l ?? "a",
1983
1983
  {
1984
1984
  href: a ? void 0 : r,
1985
- onClick: a ? void 0 : l,
1985
+ onClick: a ? void 0 : s,
1986
1986
  "aria-current": n ? "page" : void 0,
1987
1987
  "aria-disabled": a || void 0,
1988
1988
  style: {
@@ -2130,17 +2130,19 @@ function oo({
2130
2130
  language: r,
2131
2131
  tabs: n,
2132
2132
  variant: o = "code",
2133
- helperText: a,
2134
- showCopyButton: i = !0,
2135
- style: l
2133
+ wrap: a,
2134
+ minimal: i,
2135
+ helperText: s,
2136
+ showCopyButton: l = !0,
2137
+ style: c
2136
2138
  }) {
2137
- var b, w;
2138
- const s = !!(n != null && n.length), [c, p] = z(0), [f, u] = z(!1), k = s ? ((b = n[c]) == null ? void 0 : b.code) ?? "" : t ?? "", x = s ? (w = n[c]) == null ? void 0 : w.language : r, m = async () => {
2139
+ var k, S;
2140
+ const u = !!(n != null && n.length), [f, p] = z(0), [w, y] = z(!1), m = u ? ((k = n[f]) == null ? void 0 : k.code) ?? "" : t ?? "", h = u ? (S = n[f]) == null ? void 0 : S.language : r, d = async () => {
2139
2141
  try {
2140
- await navigator.clipboard.writeText(k), u(!0), setTimeout(() => u(!1), Qt);
2142
+ await navigator.clipboard.writeText(m), y(!0), setTimeout(() => y(!1), Qt);
2141
2143
  } catch {
2142
2144
  }
2143
- }, h = {
2145
+ }, b = {
2144
2146
  display: "inline-flex",
2145
2147
  alignItems: "center",
2146
2148
  gap: "var(--lucent-space-1)",
@@ -2148,27 +2150,27 @@ function oo({
2148
2150
  border: "1px solid transparent",
2149
2151
  borderRadius: "var(--lucent-radius-md)",
2150
2152
  background: "transparent",
2151
- color: f ? "var(--lucent-success-default)" : "var(--lucent-text-secondary)",
2153
+ color: w ? "var(--lucent-success-default)" : "var(--lucent-text-secondary)",
2152
2154
  fontFamily: "var(--lucent-font-family-base)",
2153
2155
  fontSize: "var(--lucent-font-size-xs)",
2154
2156
  cursor: "pointer",
2155
2157
  flexShrink: 0,
2156
2158
  transition: "color var(--lucent-duration-fast) var(--lucent-easing-default), background var(--lucent-duration-fast) var(--lucent-easing-default)"
2157
- }, d = () => /* @__PURE__ */ g(
2159
+ }, x = () => /* @__PURE__ */ g(
2158
2160
  "button",
2159
2161
  {
2160
- onClick: m,
2161
- "aria-label": f ? "Copied!" : "Copy code",
2162
- style: h,
2163
- onMouseEnter: (y) => {
2164
- f || (y.currentTarget.style.background = "var(--lucent-surface-secondary)", y.currentTarget.style.color = "var(--lucent-text-primary)");
2162
+ onClick: d,
2163
+ "aria-label": w ? "Copied!" : "Copy code",
2164
+ style: b,
2165
+ onMouseEnter: (C) => {
2166
+ w || (C.currentTarget.style.background = "var(--lucent-surface-secondary)", C.currentTarget.style.color = "var(--lucent-text-primary)");
2165
2167
  },
2166
- onMouseLeave: (y) => {
2167
- f || (y.currentTarget.style.background = "transparent", y.currentTarget.style.color = "var(--lucent-text-secondary)");
2168
+ onMouseLeave: (C) => {
2169
+ w || (C.currentTarget.style.background = "transparent", C.currentTarget.style.color = "var(--lucent-text-secondary)");
2168
2170
  },
2169
2171
  children: [
2170
- f ? /* @__PURE__ */ e(tn, {}) : /* @__PURE__ */ e(en, {}),
2171
- f ? "Copied!" : "Copy"
2172
+ w ? /* @__PURE__ */ e(tn, {}) : /* @__PURE__ */ e(en, {}),
2173
+ w ? "Copied!" : "Copy"
2172
2174
  ]
2173
2175
  }
2174
2176
  );
@@ -2179,10 +2181,10 @@ function oo({
2179
2181
  borderRadius: "var(--lucent-radius-lg)",
2180
2182
  border: "1px solid var(--lucent-border-default)",
2181
2183
  overflow: "hidden",
2182
- ...l
2184
+ ...c
2183
2185
  },
2184
2186
  children: [
2185
- s && /* @__PURE__ */ e(
2187
+ u && /* @__PURE__ */ e(
2186
2188
  "div",
2187
2189
  {
2188
2190
  style: {
@@ -2192,13 +2194,13 @@ function oo({
2192
2194
  borderBottom: "1px solid var(--lucent-border-default)",
2193
2195
  padding: "0 var(--lucent-space-2)"
2194
2196
  },
2195
- children: n.map((y, S) => {
2196
- const C = S === c;
2197
+ children: n.map((C, v) => {
2198
+ const E = v === f;
2197
2199
  return /* @__PURE__ */ g(
2198
2200
  "button",
2199
2201
  {
2200
2202
  onClick: () => {
2201
- p(S), u(!1);
2203
+ p(v), y(!1);
2202
2204
  },
2203
2205
  style: {
2204
2206
  display: "inline-flex",
@@ -2206,47 +2208,47 @@ function oo({
2206
2208
  gap: "var(--lucent-space-1)",
2207
2209
  padding: "var(--lucent-space-2) var(--lucent-space-3)",
2208
2210
  border: "none",
2209
- borderBottom: C ? "2px solid var(--lucent-accent-default)" : "2px solid transparent",
2211
+ borderBottom: E ? "2px solid var(--lucent-accent-default)" : "2px solid transparent",
2210
2212
  marginBottom: -1,
2211
2213
  background: "transparent",
2212
- color: C ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
2214
+ color: E ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
2213
2215
  fontFamily: "var(--lucent-font-family-base)",
2214
2216
  fontSize: "var(--lucent-font-size-sm)",
2215
- fontWeight: C ? "var(--lucent-font-weight-semibold)" : "var(--lucent-font-weight-regular)",
2217
+ fontWeight: E ? "var(--lucent-font-weight-semibold)" : "var(--lucent-font-weight-regular)",
2216
2218
  cursor: "pointer",
2217
2219
  transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)",
2218
2220
  whiteSpace: "nowrap"
2219
2221
  },
2220
- onMouseEnter: (v) => {
2221
- C || (v.currentTarget.style.color = "var(--lucent-text-primary)");
2222
+ onMouseEnter: (T) => {
2223
+ E || (T.currentTarget.style.color = "var(--lucent-text-primary)");
2222
2224
  },
2223
- onMouseLeave: (v) => {
2224
- C || (v.currentTarget.style.color = "var(--lucent-text-secondary)");
2225
+ onMouseLeave: (T) => {
2226
+ E || (T.currentTarget.style.color = "var(--lucent-text-secondary)");
2225
2227
  },
2226
2228
  children: [
2227
- y.icon !== void 0 && /* @__PURE__ */ e("span", { style: { display: "inline-flex", alignItems: "center" }, children: y.icon }),
2228
- y.label
2229
+ C.icon !== void 0 && /* @__PURE__ */ e("span", { style: { display: "inline-flex", alignItems: "center" }, children: C.icon }),
2230
+ C.label
2229
2231
  ]
2230
2232
  },
2231
- y.label
2233
+ C.label
2232
2234
  );
2233
2235
  })
2234
2236
  }
2235
2237
  ),
2236
- !s && (!!x || i) && /* @__PURE__ */ g(
2238
+ !i && !u && (!!h || l) && /* @__PURE__ */ g(
2237
2239
  "div",
2238
2240
  {
2239
2241
  style: {
2240
2242
  display: "flex",
2241
2243
  alignItems: "center",
2242
- justifyContent: x ? "space-between" : "flex-end",
2244
+ justifyContent: h ? "space-between" : "flex-end",
2243
2245
  padding: "0 var(--lucent-space-3)",
2244
2246
  height: 36,
2245
- background: "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)",
2247
+ background: "var(--lucent-surface)",
2246
2248
  borderBottom: "1px solid var(--lucent-border-default)"
2247
2249
  },
2248
2250
  children: [
2249
- x && /* @__PURE__ */ e(
2251
+ h && /* @__PURE__ */ e(
2250
2252
  "span",
2251
2253
  {
2252
2254
  style: {
@@ -2255,14 +2257,14 @@ function oo({
2255
2257
  color: "var(--lucent-text-secondary)",
2256
2258
  letterSpacing: "var(--lucent-letter-spacing-wide)"
2257
2259
  },
2258
- children: x
2260
+ children: h
2259
2261
  }
2260
2262
  ),
2261
- i && /* @__PURE__ */ e(d, {})
2263
+ l && /* @__PURE__ */ e(x, {})
2262
2264
  ]
2263
2265
  }
2264
2266
  ),
2265
- a && /* @__PURE__ */ e(
2267
+ s && /* @__PURE__ */ e(
2266
2268
  "div",
2267
2269
  {
2268
2270
  style: {
@@ -2273,7 +2275,7 @@ function oo({
2273
2275
  background: "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)",
2274
2276
  borderBottom: "1px solid var(--lucent-border-default)"
2275
2277
  },
2276
- children: a
2278
+ children: s
2277
2279
  }
2278
2280
  ),
2279
2281
  o === "code" ? /* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
@@ -2283,10 +2285,11 @@ function oo({
2283
2285
  style: {
2284
2286
  margin: 0,
2285
2287
  padding: "var(--lucent-space-4)",
2286
- paddingRight: s && i ? "var(--lucent-space-16)" : "var(--lucent-space-4)",
2288
+ paddingRight: (u || i) && l ? "var(--lucent-space-16)" : "var(--lucent-space-4)",
2287
2289
  background: "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)",
2288
- overflowX: "auto",
2289
- lineHeight: 1.65
2290
+ overflowX: a ? "hidden" : "auto",
2291
+ lineHeight: 1.65,
2292
+ ...a && { whiteSpace: "pre-wrap", wordBreak: "break-word" }
2290
2293
  },
2291
2294
  children: /* @__PURE__ */ e(
2292
2295
  "code",
@@ -2296,12 +2299,12 @@ function oo({
2296
2299
  fontSize: "var(--lucent-font-size-sm)",
2297
2300
  color: "var(--lucent-text-primary)"
2298
2301
  },
2299
- children: k
2302
+ children: m
2300
2303
  }
2301
2304
  )
2302
2305
  }
2303
2306
  ),
2304
- s && i && /* @__PURE__ */ e("div", { style: { position: "absolute", top: "var(--lucent-space-2)", right: "var(--lucent-space-3)" }, children: /* @__PURE__ */ e(d, {}) })
2307
+ (u || i) && l && /* @__PURE__ */ e("div", { style: { position: "absolute", top: i ? 0 : "var(--lucent-space-2)", bottom: i ? 0 : void 0, right: "var(--lucent-space-3)", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ e(x, {}) })
2305
2308
  ] }) : (
2306
2309
  /* ── Prompt area ── */
2307
2310
  /* @__PURE__ */ g(
@@ -2321,16 +2324,15 @@ function oo({
2321
2324
  style: {
2322
2325
  flex: 1,
2323
2326
  overflow: "hidden",
2324
- whiteSpace: "nowrap",
2325
- textOverflow: "ellipsis",
2327
+ ...a ? { whiteSpace: "pre-wrap", wordBreak: "break-word" } : { whiteSpace: "nowrap", textOverflow: "ellipsis" },
2326
2328
  fontFamily: "var(--lucent-font-family-mono)",
2327
2329
  fontSize: "var(--lucent-font-size-sm)",
2328
2330
  color: "var(--lucent-text-primary)"
2329
2331
  },
2330
- children: k
2332
+ children: m
2331
2333
  }
2332
2334
  ),
2333
- i && /* @__PURE__ */ e(d, {})
2335
+ l && /* @__PURE__ */ e(x, {})
2334
2336
  ]
2335
2337
  }
2336
2338
  )
@@ -2374,6 +2376,20 @@ const io = {
2374
2376
  enumValues: ["code", "prompt"],
2375
2377
  description: '"code" renders a <pre><code> block with horizontal scroll. "prompt" renders a single-line truncated span suited to AI prompts.'
2376
2378
  },
2379
+ {
2380
+ name: "minimal",
2381
+ type: "boolean",
2382
+ required: !1,
2383
+ default: "false",
2384
+ description: "Hides the header bar and shows only a corner copy button overlay."
2385
+ },
2386
+ {
2387
+ name: "wrap",
2388
+ type: "boolean",
2389
+ required: !1,
2390
+ default: "false",
2391
+ description: "When true, wraps long lines instead of scrolling horizontally."
2392
+ },
2377
2393
  {
2378
2394
  name: "helperText",
2379
2395
  type: "string",
@@ -2865,8 +2881,8 @@ function po({
2865
2881
  as: o = "div",
2866
2882
  wrap: a = !1,
2867
2883
  children: i,
2868
- style: l,
2869
- ...s
2884
+ style: s,
2885
+ ...l
2870
2886
  }) {
2871
2887
  const c = {
2872
2888
  display: "flex",
@@ -2875,9 +2891,9 @@ function po({
2875
2891
  alignItems: cn[r],
2876
2892
  justifyContent: dn[n],
2877
2893
  ...a && { flexWrap: "wrap" },
2878
- ...l
2894
+ ...s
2879
2895
  };
2880
- return /* @__PURE__ */ e(o, { style: c, ...s, children: i });
2896
+ return /* @__PURE__ */ e(o, { style: c, ...l, children: i });
2881
2897
  }
2882
2898
  const ho = {
2883
2899
  id: "stack",
@@ -3011,8 +3027,8 @@ function fo({
3011
3027
  as: o = "div",
3012
3028
  wrap: a = !1,
3013
3029
  children: i,
3014
- style: l,
3015
- ...s
3030
+ style: s,
3031
+ ...l
3016
3032
  }) {
3017
3033
  const c = {
3018
3034
  display: "flex",
@@ -3021,9 +3037,9 @@ function fo({
3021
3037
  alignItems: un[r],
3022
3038
  justifyContent: pn[n],
3023
3039
  ...a && { flexWrap: "wrap" },
3024
- ...l
3040
+ ...s
3025
3041
  };
3026
- return /* @__PURE__ */ e(o, { style: c, ...s, children: i });
3042
+ return /* @__PURE__ */ e(o, { style: c, ...l, children: i });
3027
3043
  }
3028
3044
  const mo = {
3029
3045
  id: "row",
@@ -3162,10 +3178,10 @@ function go({
3162
3178
  size: o = "md",
3163
3179
  warnAt: a,
3164
3180
  dangerAt: i,
3165
- label: l,
3166
- style: s
3181
+ label: s,
3182
+ style: l
3167
3183
  }) {
3168
- const c = Math.max(0, Math.min(t, r)), p = r > 0 ? c / r * 100 : 0, f = mn(c, r, n, a, i), u = hn[o], k = fn[f], x = l === !0 ? `${Math.round(p)}%` : l || null;
3184
+ const c = Math.max(0, Math.min(t, r)), u = r > 0 ? c / r * 100 : 0, f = mn(c, r, n, a, i), p = hn[o], w = fn[f], y = s === !0 ? `${Math.round(u)}%` : s || null;
3169
3185
  return /* @__PURE__ */ g(
3170
3186
  "div",
3171
3187
  {
@@ -3174,7 +3190,7 @@ function go({
3174
3190
  alignItems: "center",
3175
3191
  gap: "var(--lucent-space-3)",
3176
3192
  fontFamily: "var(--lucent-font-family-base)",
3177
- ...s
3193
+ ...l
3178
3194
  },
3179
3195
  children: [
3180
3196
  /* @__PURE__ */ e(
@@ -3186,8 +3202,8 @@ function go({
3186
3202
  "aria-valuemax": r,
3187
3203
  style: {
3188
3204
  flex: 1,
3189
- height: u.height,
3190
- borderRadius: u.radius,
3205
+ height: p.height,
3206
+ borderRadius: p.radius,
3191
3207
  background: "color-mix(in srgb, var(--lucent-text-primary) 8%, transparent)",
3192
3208
  overflow: "hidden"
3193
3209
  },
@@ -3195,17 +3211,17 @@ function go({
3195
3211
  "div",
3196
3212
  {
3197
3213
  style: {
3198
- width: `${p}%`,
3214
+ width: `${u}%`,
3199
3215
  height: "100%",
3200
- borderRadius: u.radius,
3201
- background: k,
3216
+ borderRadius: p.radius,
3217
+ background: w,
3202
3218
  transition: "width var(--lucent-duration-base) var(--lucent-easing-default), background var(--lucent-duration-base) var(--lucent-easing-default)"
3203
3219
  }
3204
3220
  }
3205
3221
  )
3206
3222
  }
3207
3223
  ),
3208
- x != null && /* @__PURE__ */ e(
3224
+ y != null && /* @__PURE__ */ e(
3209
3225
  "span",
3210
3226
  {
3211
3227
  style: {
@@ -3215,7 +3231,7 @@ function go({
3215
3231
  whiteSpace: "nowrap",
3216
3232
  flexShrink: 0
3217
3233
  },
3218
- children: x
3234
+ children: y
3219
3235
  }
3220
3236
  )
3221
3237
  ]
@@ -3278,17 +3294,17 @@ const vo = {
3278
3294
  lg: 16
3279
3295
  }, je = fe(null), ve = 4;
3280
3296
  function xn(t, r, n) {
3281
- const o = r.offsetWidth, a = r.offsetHeight, i = window.innerWidth, l = window.innerHeight;
3282
- let s = 0, c = 0, p = n;
3297
+ const o = r.offsetWidth, a = r.offsetHeight, i = window.innerWidth, s = window.innerHeight;
3298
+ let l = 0, c = 0, u = n;
3283
3299
  const f = {
3284
3300
  top: t.top - a - ve,
3285
3301
  bottom: t.bottom + ve,
3286
3302
  left: t.left - o - ve,
3287
3303
  right: t.right + ve
3288
3304
  };
3289
- p.startsWith("bottom") ? (s = f.bottom, s + a > l && f.top >= 0 && (s = f.top, p = p.replace("bottom", "top"))) : p.startsWith("top") ? (s = f.top, s < 0 && f.bottom + a <= l && (s = f.bottom, p = p.replace("top", "bottom"))) : p === "left" ? (s = t.top + t.height / 2 - a / 2, c = f.left, c < 0 && f.right + o <= i && (c = f.right, p = "right")) : p === "right" && (s = t.top + t.height / 2 - a / 2, c = f.right, c + o > i && f.left >= 0 && (c = f.left, p = "left")), (p.startsWith("top") || p.startsWith("bottom")) && (p.endsWith("-start") ? c = t.left : p.endsWith("-end") ? c = t.right - o : c = t.left + t.width / 2 - o / 2), c + o > i && (c = i - o - 8), c < 0 && (c = 8), s + a > l && (s = l - a - 8), s < 0 && (s = 8);
3290
- let u = "top left";
3291
- return p.startsWith("top") ? u = p.endsWith("-end") ? "bottom right" : p.endsWith("-start") ? "bottom left" : "bottom center" : p.startsWith("bottom") ? u = p.endsWith("-end") ? "top right" : p.endsWith("-start") ? "top left" : "top center" : p === "left" ? u = "center right" : p === "right" && (u = "center left"), { top: s, left: c, transformOrigin: u };
3305
+ u.startsWith("bottom") ? (l = f.bottom, l + a > s && f.top >= 0 && (l = f.top, u = u.replace("bottom", "top"))) : u.startsWith("top") ? (l = f.top, l < 0 && f.bottom + a <= s && (l = f.bottom, u = u.replace("top", "bottom"))) : u === "left" ? (l = t.top + t.height / 2 - a / 2, c = f.left, c < 0 && f.right + o <= i && (c = f.right, u = "right")) : u === "right" && (l = t.top + t.height / 2 - a / 2, c = f.right, c + o > i && f.left >= 0 && (c = f.left, u = "left")), (u.startsWith("top") || u.startsWith("bottom")) && (u.endsWith("-start") ? c = t.left : u.endsWith("-end") ? c = t.right - o : c = t.left + t.width / 2 - o / 2), c + o > i && (c = i - o - 8), c < 0 && (c = 8), l + a > s && (l = s - a - 8), l < 0 && (l = 8);
3306
+ let p = "top left";
3307
+ return u.startsWith("top") ? p = u.endsWith("-end") ? "bottom right" : u.endsWith("-start") ? "bottom left" : "bottom center" : u.startsWith("bottom") ? p = u.endsWith("-end") ? "top right" : u.endsWith("-start") ? "top left" : "top center" : u === "left" ? p = "center right" : u === "right" && (p = "center left"), { top: l, left: c, transformOrigin: p };
3292
3308
  }
3293
3309
  function Fe({
3294
3310
  onSelect: t,
@@ -3297,21 +3313,21 @@ function Fe({
3297
3313
  shortcut: o,
3298
3314
  disabled: a = !1,
3299
3315
  danger: i = !1,
3300
- selected: l = !1,
3301
- style: s
3316
+ selected: s = !1,
3317
+ style: l
3302
3318
  }) {
3303
- const c = ee(je), p = $(-1);
3304
- p.current === -1 && c && (p.current = c.getItemIndex(), c.registerItem(p.current, a));
3305
- const f = c ? c.activeIndex === p.current : !1, u = (c == null ? void 0 : c.size) ?? "md", k = Ue[u], x = vn[u], m = yn[u], h = () => {
3319
+ const c = ee(je), u = $(-1);
3320
+ u.current === -1 && c && (u.current = c.getItemIndex(), c.registerItem(u.current, a));
3321
+ const f = c ? c.activeIndex === u.current : !1, p = (c == null ? void 0 : c.size) ?? "md", w = Ue[p], y = vn[p], m = yn[p], h = () => {
3306
3322
  a || (t(), c == null || c.close());
3307
3323
  }, d = () => {
3308
- !a && c && c.setActiveIndex(p.current);
3324
+ !a && c && c.setActiveIndex(u.current);
3309
3325
  }, b = a ? "var(--lucent-text-disabled)" : i ? "var(--lucent-danger-text)" : "var(--lucent-text-primary)";
3310
3326
  return /* @__PURE__ */ g(
3311
3327
  "div",
3312
3328
  {
3313
3329
  role: "menuitemcheckbox",
3314
- "aria-checked": l,
3330
+ "aria-checked": s,
3315
3331
  "aria-disabled": a || void 0,
3316
3332
  "data-active": f || void 0,
3317
3333
  tabIndex: -1,
@@ -3320,16 +3336,16 @@ function Fe({
3320
3336
  style: {
3321
3337
  display: "flex",
3322
3338
  alignItems: "center",
3323
- gap: k,
3324
- padding: k,
3339
+ gap: w,
3340
+ padding: w,
3325
3341
  borderRadius: "var(--lucent-radius-md)",
3326
3342
  cursor: a ? "not-allowed" : "pointer",
3327
- background: l ? "color-mix(in srgb, var(--lucent-accent-default) 12%, var(--lucent-surface-overlay))" : f ? "var(--lucent-surface-secondary)" : "transparent",
3328
- boxShadow: l ? "var(--lucent-shadow-sm)" : "none",
3343
+ background: s ? "color-mix(in srgb, var(--lucent-accent-default) 12%, var(--lucent-surface-overlay))" : f ? "var(--lucent-surface-secondary)" : "transparent",
3344
+ boxShadow: s ? "var(--lucent-shadow-sm)" : "none",
3329
3345
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default), box-shadow var(--lucent-duration-fast) var(--lucent-easing-default)",
3330
3346
  opacity: a ? 0.5 : 1,
3331
3347
  outline: "none",
3332
- ...s
3348
+ ...l
3333
3349
  },
3334
3350
  children: [
3335
3351
  n && /* @__PURE__ */ e("span", { style: {
@@ -3337,9 +3353,9 @@ function Fe({
3337
3353
  display: "flex",
3338
3354
  color: a ? "var(--lucent-text-disabled)" : i ? "var(--lucent-danger-text)" : "var(--lucent-text-secondary)"
3339
3355
  }, children: n }),
3340
- /* @__PURE__ */ e("span", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e(V, { size: x, style: { color: b }, children: r }) }),
3341
- o && /* @__PURE__ */ e(V, { size: u === "lg" ? "sm" : "xs", style: { color: "var(--lucent-text-secondary)", flexShrink: 0 }, children: o }),
3342
- l && /* @__PURE__ */ e("span", { style: {
3356
+ /* @__PURE__ */ e("span", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ e(V, { size: y, style: { color: b }, children: r }) }),
3357
+ o && /* @__PURE__ */ e(V, { size: p === "lg" ? "sm" : "xs", style: { color: "var(--lucent-text-secondary)", flexShrink: 0 }, children: o }),
3358
+ s && /* @__PURE__ */ e("span", { style: {
3343
3359
  flexShrink: 0,
3344
3360
  display: "flex",
3345
3361
  color: "var(--lucent-accent-default)"
@@ -3376,106 +3392,106 @@ function ft({
3376
3392
  size: o = "md",
3377
3393
  open: a,
3378
3394
  onOpenChange: i,
3379
- portalContainer: l,
3380
- style: s
3395
+ portalContainer: s,
3396
+ style: l
3381
3397
  }) {
3382
- const c = a !== void 0, [p, f] = z(!1), u = c ? a : p, [k, x] = z(!1), [m, h] = z("idle"), d = $(null), b = $(null), w = $(null), y = $(!1), [S, C] = z(null), v = $(0), q = $(/* @__PURE__ */ new Map()), [T, E] = z(-1);
3383
- if (!y.current && typeof document < "u") {
3384
- const A = document.createElement("style");
3385
- A.textContent = gn, document.head.appendChild(A), y.current = !0;
3398
+ const c = a !== void 0, [u, f] = z(!1), p = c ? a : u, [w, y] = z(!1), [m, h] = z("idle"), d = $(null), b = $(null), x = $(null), k = $(!1), [S, C] = z(null), v = $(0), E = $(/* @__PURE__ */ new Map()), [T, A] = z(-1);
3399
+ if (!k.current && typeof document < "u") {
3400
+ const q = document.createElement("style");
3401
+ q.textContent = gn, document.head.appendChild(q), k.current = !0;
3386
3402
  }
3387
3403
  H(() => {
3388
- if (u)
3389
- v.current = 0, q.current.clear(), x(!0), h("entering");
3390
- else if (k) {
3404
+ if (p)
3405
+ v.current = 0, E.current.clear(), y(!0), h("entering");
3406
+ else if (w) {
3391
3407
  h("exiting");
3392
- const A = setTimeout(() => {
3393
- x(!1), h("idle");
3408
+ const q = setTimeout(() => {
3409
+ y(!1), h("idle");
3394
3410
  }, ze);
3395
- return () => clearTimeout(A);
3411
+ return () => clearTimeout(q);
3396
3412
  }
3397
- }, [u]);
3398
- const N = J((A) => {
3399
- c || f(A), i == null || i(A);
3413
+ }, [p]);
3414
+ const N = J((q) => {
3415
+ c || f(q), i == null || i(q);
3400
3416
  }, [c, i]), R = J(() => {
3401
- const A = w.current;
3402
- A && (A.querySelector("button, [tabindex]") ?? A).focus();
3417
+ const q = x.current;
3418
+ q && (q.querySelector("button, [tabindex]") ?? q).focus();
3403
3419
  }, []), I = J(() => {
3404
3420
  N(!1), R();
3405
3421
  }, [N, R]);
3406
3422
  te(() => {
3407
- if (!k || m !== "entering" || !d.current) return;
3408
- const A = requestAnimationFrame(() => {
3423
+ if (!w || m !== "entering" || !d.current) return;
3424
+ const q = requestAnimationFrame(() => {
3409
3425
  const L = b.current, M = d.current;
3410
3426
  if (!L || !M) return;
3411
3427
  const O = M.getBoundingClientRect();
3412
3428
  C(xn(O, L, n));
3413
3429
  });
3414
- return () => cancelAnimationFrame(A);
3415
- }, [k, m, n]), H(() => {
3416
- if (!k || m !== "entering") return;
3417
- const A = setTimeout(() => {
3418
- const M = Array.from(q.current.entries()).sort((O, j) => O[0] - j[0]).find(([, O]) => !O.disabled);
3419
- E(M ? M[0] : -1);
3430
+ return () => cancelAnimationFrame(q);
3431
+ }, [w, m, n]), H(() => {
3432
+ if (!w || m !== "entering") return;
3433
+ const q = setTimeout(() => {
3434
+ const M = Array.from(E.current.entries()).sort((O, j) => O[0] - j[0]).find(([, O]) => !O.disabled);
3435
+ A(M ? M[0] : -1);
3420
3436
  }, 0);
3421
- return () => clearTimeout(A);
3422
- }, [k, m]), H(() => {
3423
- if (!u) return;
3424
- const A = (M) => {
3437
+ return () => clearTimeout(q);
3438
+ }, [w, m]), H(() => {
3439
+ if (!p) return;
3440
+ const q = (M) => {
3425
3441
  var j, F;
3426
3442
  const O = M.target;
3427
3443
  (j = d.current) != null && j.contains(O) || (F = b.current) != null && F.contains(O) || I();
3428
3444
  }, L = requestAnimationFrame(() => {
3429
- document.addEventListener("mousedown", A);
3445
+ document.addEventListener("mousedown", q);
3430
3446
  });
3431
3447
  return () => {
3432
- cancelAnimationFrame(L), document.removeEventListener("mousedown", A);
3448
+ cancelAnimationFrame(L), document.removeEventListener("mousedown", q);
3433
3449
  };
3434
- }, [u, I]), H(() => {
3435
- if (!u) return;
3436
- let A = !1;
3450
+ }, [p, I]), H(() => {
3451
+ if (!p) return;
3452
+ let q = !1;
3437
3453
  const L = setTimeout(() => {
3438
- A = !0;
3454
+ q = !0;
3439
3455
  }, 50), M = () => {
3440
- A && I();
3456
+ q && I();
3441
3457
  };
3442
3458
  return window.addEventListener("scroll", M, { passive: !0, capture: !0 }), () => {
3443
3459
  clearTimeout(L), window.removeEventListener("scroll", M, { capture: !0 });
3444
3460
  };
3445
- }, [u, I]);
3446
- const P = J(() => Array.from(q.current.entries()).filter(([, A]) => !A.disabled).map(([A]) => A).sort((A, L) => A - L), []), B = J((A) => {
3447
- if (!u) return;
3461
+ }, [p, I]);
3462
+ const P = J(() => Array.from(E.current.entries()).filter(([, q]) => !q.disabled).map(([q]) => q).sort((q, L) => q - L), []), B = J((q) => {
3463
+ if (!p) return;
3448
3464
  const L = P();
3449
3465
  if (L.length !== 0)
3450
- switch (A.key) {
3466
+ switch (q.key) {
3451
3467
  case "Escape":
3452
- A.preventDefault(), I();
3468
+ q.preventDefault(), I();
3453
3469
  break;
3454
3470
  case "ArrowDown": {
3455
- A.preventDefault(), E((M) => {
3471
+ q.preventDefault(), A((M) => {
3456
3472
  const O = L.indexOf(M);
3457
3473
  return O < L.length - 1 ? L[O + 1] : L[0];
3458
3474
  });
3459
3475
  break;
3460
3476
  }
3461
3477
  case "ArrowUp": {
3462
- A.preventDefault(), E((M) => {
3478
+ q.preventDefault(), A((M) => {
3463
3479
  const O = L.indexOf(M);
3464
3480
  return O > 0 ? L[O - 1] : L[L.length - 1];
3465
3481
  });
3466
3482
  break;
3467
3483
  }
3468
3484
  case "Home": {
3469
- A.preventDefault(), E(L[0]);
3485
+ q.preventDefault(), A(L[0]);
3470
3486
  break;
3471
3487
  }
3472
3488
  case "End": {
3473
- A.preventDefault(), E(L[L.length - 1]);
3489
+ q.preventDefault(), A(L[L.length - 1]);
3474
3490
  break;
3475
3491
  }
3476
3492
  case "Enter":
3477
3493
  case " ": {
3478
- A.preventDefault();
3494
+ q.preventDefault();
3479
3495
  const M = b.current;
3480
3496
  if (M) {
3481
3497
  const O = M.querySelector('[data-active="true"]');
@@ -3488,29 +3504,29 @@ function ft({
3488
3504
  break;
3489
3505
  }
3490
3506
  }
3491
- }, [u, I, P]);
3507
+ }, [p, I, P]);
3492
3508
  H(() => {
3493
- if (u)
3509
+ if (p)
3494
3510
  return document.addEventListener("keydown", B), () => document.removeEventListener("keydown", B);
3495
- }, [u, B]), H(() => {
3496
- if (!u) return;
3497
- const A = b.current;
3498
- if (!A) return;
3499
- const L = A.querySelector('[data-active="true"]');
3511
+ }, [p, B]), H(() => {
3512
+ if (!p) return;
3513
+ const q = b.current;
3514
+ if (!q) return;
3515
+ const L = q.querySelector('[data-active="true"]');
3500
3516
  L == null || L.scrollIntoView({ block: "nearest" });
3501
- }, [T, u]);
3517
+ }, [T, p]);
3502
3518
  const G = () => {
3503
- N(!u);
3504
- }, D = (A) => {
3505
- (A.key === "Enter" || A.key === " " || A.key === "ArrowDown") && (A.preventDefault(), u || N(!0)), A.key === "ArrowUp" && (A.preventDefault(), u || (N(!0), setTimeout(() => {
3519
+ N(!p);
3520
+ }, D = (q) => {
3521
+ (q.key === "Enter" || q.key === " " || q.key === "ArrowDown") && (q.preventDefault(), p || N(!0)), q.key === "ArrowUp" && (q.preventDefault(), p || (N(!0), setTimeout(() => {
3506
3522
  const L = P();
3507
- L.length > 0 && E(L[L.length - 1]);
3523
+ L.length > 0 && A(L[L.length - 1]);
3508
3524
  }, 0)));
3509
3525
  }, W = {
3510
3526
  activeIndex: T,
3511
- setActiveIndex: E,
3512
- registerItem: (A, L) => {
3513
- q.current.set(A, { disabled: L });
3527
+ setActiveIndex: A,
3528
+ registerItem: (q, L) => {
3529
+ E.current.set(q, { disabled: L });
3514
3530
  },
3515
3531
  close: I,
3516
3532
  getItemIndex: () => v.current++,
@@ -3525,19 +3541,19 @@ function ft({
3525
3541
  children: /* @__PURE__ */ e(
3526
3542
  "span",
3527
3543
  {
3528
- ref: w,
3544
+ ref: x,
3529
3545
  onClick: G,
3530
3546
  onKeyDown: D,
3531
3547
  "aria-haspopup": "menu",
3532
- "aria-expanded": u,
3533
- "aria-controls": u ? _ : void 0,
3548
+ "aria-expanded": p,
3549
+ "aria-controls": p ? _ : void 0,
3534
3550
  style: { display: "inline-flex", cursor: "pointer" },
3535
3551
  children: t
3536
3552
  }
3537
3553
  )
3538
3554
  }
3539
3555
  ),
3540
- k && ae(
3556
+ w && ae(
3541
3557
  /* @__PURE__ */ e(je.Provider, { value: W, children: /* @__PURE__ */ e(
3542
3558
  "div",
3543
3559
  {
@@ -3563,12 +3579,12 @@ function ft({
3563
3579
  transformOrigin: (S == null ? void 0 : S.transformOrigin) ?? "top left",
3564
3580
  outline: "none",
3565
3581
  pointerEvents: m === "exiting" ? "none" : "auto",
3566
- ...s
3582
+ ...l
3567
3583
  },
3568
3584
  children: r
3569
3585
  }
3570
3586
  ) }),
3571
- l ?? document.body
3587
+ s ?? document.body
3572
3588
  )
3573
3589
  ] });
3574
3590
  }
@@ -3895,17 +3911,17 @@ function zn({
3895
3911
  variant: o = "primary",
3896
3912
  size: a = "md",
3897
3913
  bordered: i = !0,
3898
- menuPlacement: l = "bottom-end",
3899
- disabled: s,
3914
+ menuPlacement: s = "bottom-end",
3915
+ disabled: l,
3900
3916
  loading: c = !1,
3901
- leftIcon: p,
3917
+ leftIcon: u,
3902
3918
  style: f
3903
3919
  }) {
3904
- const u = s ?? c, [k, x] = z(!1), m = kn[a], h = m.borderRadius ?? "var(--lucent-radius-lg)", d = Sn[a], b = u ? {
3920
+ const p = l ?? c, [w, y] = z(!1), m = kn[a], h = m.borderRadius ?? "var(--lucent-radius-lg)", d = Sn[a], b = p ? {
3905
3921
  background: "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)",
3906
3922
  color: "var(--lucent-text-disabled)",
3907
3923
  borderColor: "transparent"
3908
- } : {}, w = {
3924
+ } : {}, x = {
3909
3925
  display: "inline-flex",
3910
3926
  alignItems: "center",
3911
3927
  justifyContent: "center",
@@ -3914,7 +3930,7 @@ function zn({
3914
3930
  fontWeight: "var(--lucent-font-weight-medium)",
3915
3931
  lineHeight: 1,
3916
3932
  letterSpacing: "0.01em",
3917
- cursor: u ? "not-allowed" : "pointer",
3933
+ cursor: p ? "not-allowed" : "pointer",
3918
3934
  outline: "none",
3919
3935
  margin: 0,
3920
3936
  boxSizing: "border-box",
@@ -3925,7 +3941,7 @@ function zn({
3925
3941
  ...mt[o],
3926
3942
  ...i === !1 && { border: "none" },
3927
3943
  ...b
3928
- }, y = "var(--lucent-radius-sm)", S = `${h} ${y} ${y} ${h}`, C = `${y} ${h} ${h} ${y}`;
3944
+ }, k = "var(--lucent-radius-sm)", S = `${h} ${k} ${k} ${h}`, C = `${k} ${h} ${h} ${k}`;
3929
3945
  return /* @__PURE__ */ g(
3930
3946
  "div",
3931
3947
  {
@@ -3942,17 +3958,17 @@ function zn({
3942
3958
  "button",
3943
3959
  {
3944
3960
  type: "button",
3945
- disabled: u,
3961
+ disabled: p,
3946
3962
  "aria-busy": c,
3947
3963
  onClick: r,
3948
3964
  onMouseEnter: (v) => {
3949
- u || Ye(v.currentTarget, o, i);
3965
+ p || Ye(v.currentTarget, o, i);
3950
3966
  },
3951
3967
  onMouseLeave: (v) => {
3952
- u || Ke(v.currentTarget, o, i);
3968
+ p || Ke(v.currentTarget, o, i);
3953
3969
  },
3954
3970
  onMouseDown: (v) => {
3955
- u || Xe(v.currentTarget, o);
3971
+ p || Xe(v.currentTarget, o);
3956
3972
  },
3957
3973
  onMouseUp: (v) => {
3958
3974
  Je(v.currentTarget);
@@ -3964,12 +3980,12 @@ function zn({
3964
3980
  v.currentTarget.style.boxShadow = "";
3965
3981
  },
3966
3982
  style: {
3967
- ...w,
3983
+ ...x,
3968
3984
  borderRadius: S,
3969
3985
  padding: o === "ghost" || o === "danger-ghost" ? `0 ${m.paddingInner} 0 ${m.paddingOuter}` : `0 ${m.paddingOuter}`
3970
3986
  },
3971
3987
  children: [
3972
- p,
3988
+ u,
3973
3989
  c ? /* @__PURE__ */ e(En, {}) : t
3974
3990
  ]
3975
3991
  }
@@ -3977,24 +3993,24 @@ function zn({
3977
3993
  /* @__PURE__ */ e(
3978
3994
  ft,
3979
3995
  {
3980
- open: k,
3981
- onOpenChange: x,
3982
- placement: l,
3996
+ open: w,
3997
+ onOpenChange: y,
3998
+ placement: s,
3983
3999
  size: Cn[a],
3984
4000
  trigger: /* @__PURE__ */ e(
3985
4001
  "button",
3986
4002
  {
3987
4003
  type: "button",
3988
- disabled: u,
4004
+ disabled: p,
3989
4005
  "aria-label": "More actions",
3990
4006
  onMouseEnter: (v) => {
3991
- u || Ye(v.currentTarget, o, i);
4007
+ p || Ye(v.currentTarget, o, i);
3992
4008
  },
3993
4009
  onMouseLeave: (v) => {
3994
- u || Ke(v.currentTarget, o, i);
4010
+ p || Ke(v.currentTarget, o, i);
3995
4011
  },
3996
4012
  onMouseDown: (v) => {
3997
- u || Xe(v.currentTarget, o);
4013
+ p || Xe(v.currentTarget, o);
3998
4014
  },
3999
4015
  onMouseUp: (v) => {
4000
4016
  Je(v.currentTarget);
@@ -4006,15 +4022,15 @@ function zn({
4006
4022
  v.currentTarget.style.boxShadow = "";
4007
4023
  },
4008
4024
  style: {
4009
- ...w,
4025
+ ...x,
4010
4026
  borderRadius: C,
4011
4027
  padding: 0,
4012
4028
  width: Tn[a]
4013
4029
  },
4014
- children: /* @__PURE__ */ e("svg", { width: d, height: d, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, style: { flexShrink: 0, transition: "transform var(--lucent-duration-fast) var(--lucent-easing-default)", ...k && { transform: "rotate(180deg)" } }, children: /* @__PURE__ */ e("polyline", { points: "6 9 12 15 18 9" }) })
4030
+ children: /* @__PURE__ */ e("svg", { width: d, height: d, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": !0, style: { flexShrink: 0, transition: "transform var(--lucent-duration-fast) var(--lucent-easing-default)", ...w && { transform: "rotate(180deg)" } }, children: /* @__PURE__ */ e("polyline", { points: "6 9 12 15 18 9" }) })
4015
4031
  }
4016
4032
  ),
4017
- children: n.map((v, q) => /* @__PURE__ */ e(
4033
+ children: n.map((v, E) => /* @__PURE__ */ e(
4018
4034
  Fe,
4019
4035
  {
4020
4036
  onSelect: v.onSelect,
@@ -4023,7 +4039,7 @@ function zn({
4023
4039
  ...v.icon !== void 0 && { icon: v.icon },
4024
4040
  children: v.label
4025
4041
  },
4026
- q
4042
+ E
4027
4043
  ))
4028
4044
  }
4029
4045
  )
@@ -4123,15 +4139,15 @@ function An({
4123
4139
  ...r
4124
4140
  },
4125
4141
  children: n.map((a, i) => {
4126
- const l = i === 0, s = i === o - 1;
4142
+ const s = i === 0, l = i === o - 1;
4127
4143
  if (o === 1) return a;
4128
- const p = a.props.style ?? {}, f = p.borderRadius ?? "var(--lucent-radius-lg)";
4129
- let u;
4130
- return l ? u = `${f} ${ue} ${ue} ${f}` : s ? u = `${ue} ${f} ${f} ${ue}` : u = ue, It(a, {
4144
+ const u = a.props.style ?? {}, f = u.borderRadius ?? "var(--lucent-radius-lg)";
4145
+ let p;
4146
+ return s ? p = `${f} ${ue} ${ue} ${f}` : l ? p = `${ue} ${f} ${f} ${ue}` : p = ue, It(a, {
4131
4147
  key: i,
4132
4148
  style: {
4133
- ...p,
4134
- borderRadius: u
4149
+ ...u,
4150
+ borderRadius: p
4135
4151
  }
4136
4152
  });
4137
4153
  })
@@ -4195,16 +4211,16 @@ function ko({
4195
4211
  helperText: o,
4196
4212
  errorMessage: a,
4197
4213
  children: i,
4198
- style: l
4214
+ style: s
4199
4215
  }) {
4200
- const s = a ?? o, c = a ? "danger" : "secondary";
4201
- return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...l }, children: [
4216
+ const l = a ?? o, c = a ? "danger" : "secondary";
4217
+ return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...s }, children: [
4202
4218
  t && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "baseline", gap: "var(--lucent-space-1)" }, children: [
4203
4219
  /* @__PURE__ */ e(V, { as: "label", size: "sm", weight: "medium", lineHeight: "tight", ...r !== void 0 && { htmlFor: r }, children: t }),
4204
4220
  n && /* @__PURE__ */ e(V, { as: "span", size: "sm", color: "danger", lineHeight: "tight", "aria-hidden": "true", children: "*" })
4205
4221
  ] }),
4206
4222
  i,
4207
- s && /* @__PURE__ */ e(V, { size: "xs", color: c, lineHeight: "tight", children: s })
4223
+ l && /* @__PURE__ */ e(V, { size: "xs", color: c, lineHeight: "tight", children: l })
4208
4224
  ] });
4209
4225
  }
4210
4226
  const So = {
@@ -4304,35 +4320,35 @@ function To({
4304
4320
  placeholder: o,
4305
4321
  size: a = "md",
4306
4322
  label: i,
4307
- helperText: l,
4308
- errorText: s,
4323
+ helperText: s,
4324
+ errorText: l,
4309
4325
  results: c = [],
4310
- onResultSelect: p,
4326
+ onResultSelect: u,
4311
4327
  isLoading: f = !1,
4312
- disabled: u = !1,
4313
- id: k,
4314
- style: x
4328
+ disabled: p = !1,
4329
+ id: w,
4330
+ style: y
4315
4331
  }) {
4316
- const m = o ?? (n === "filter" ? "Filter…" : "Search…"), [h, d] = z(!1), [b, w] = z(null), y = $(null), S = $(null), C = $(null), [v, q] = z({ top: 0, left: 0, width: 0 }), T = n === "search" && h && c.length > 0;
4332
+ const m = o ?? (n === "filter" ? "Filter…" : "Search…"), [h, d] = z(!1), [b, x] = z(null), k = $(null), S = $(null), C = $(null), [v, E] = z({ top: 0, left: 0, width: 0 }), T = n === "search" && h && c.length > 0;
4317
4333
  te(() => {
4318
4334
  if (!T || !S.current) return;
4319
4335
  const B = S.current.getBoundingClientRect();
4320
- q({ top: B.bottom + 4, left: B.left, width: B.width });
4336
+ E({ top: B.bottom + 4, left: B.left, width: B.width });
4321
4337
  }, [T]);
4322
- const E = () => {
4338
+ const A = () => {
4323
4339
  r("");
4324
4340
  }, N = (B) => {
4325
- p == null || p(B), d(!1);
4341
+ u == null || u(B), d(!1);
4326
4342
  }, R = () => {
4327
- y.current = setTimeout(() => d(!1), 150);
4343
+ k.current = setTimeout(() => d(!1), 150);
4328
4344
  }, I = () => {
4329
- y.current && clearTimeout(y.current), d(!0);
4345
+ k.current && clearTimeout(k.current), d(!0);
4330
4346
  }, P = f ? /* @__PURE__ */ e($t, { size: "sm" }) : t ? /* @__PURE__ */ e(
4331
4347
  "button",
4332
4348
  {
4333
4349
  type: "button",
4334
4350
  "aria-label": n === "filter" ? "Clear filter" : "Clear search",
4335
- onClick: E,
4351
+ onClick: A,
4336
4352
  style: {
4337
4353
  display: "flex",
4338
4354
  alignItems: "center",
@@ -4352,24 +4368,24 @@ function To({
4352
4368
  children: /* @__PURE__ */ e(Ln, {})
4353
4369
  }
4354
4370
  ) : null;
4355
- return /* @__PURE__ */ g("div", { ref: S, style: { ...x }, children: [
4371
+ return /* @__PURE__ */ g("div", { ref: S, style: { ...y }, children: [
4356
4372
  /* @__PURE__ */ e(
4357
4373
  ut,
4358
4374
  {
4359
- id: k,
4375
+ id: w,
4360
4376
  type: "text",
4361
4377
  size: a,
4362
4378
  value: t,
4363
4379
  onChange: (B) => r(B.target.value),
4364
4380
  placeholder: m,
4365
- disabled: u,
4381
+ disabled: p,
4366
4382
  leftElement: n === "filter" ? /* @__PURE__ */ e(Rn, { size: Ze[a] }) : /* @__PURE__ */ e(Bn, { size: Ze[a] }),
4367
4383
  rightElement: P ?? void 0,
4368
4384
  onFocus: I,
4369
4385
  onBlur: R,
4370
4386
  ...i !== void 0 && { label: i },
4371
- ...l !== void 0 && { helperText: l },
4372
- ...s !== void 0 && { errorText: s }
4387
+ ...s !== void 0 && { helperText: s },
4388
+ ...l !== void 0 && { errorText: l }
4373
4389
  }
4374
4390
  ),
4375
4391
  T && ae(
@@ -4398,8 +4414,8 @@ function To({
4398
4414
  role: "option",
4399
4415
  "aria-selected": !1,
4400
4416
  onMouseDown: () => N(B),
4401
- onMouseEnter: () => w(G),
4402
- onMouseLeave: () => w(null),
4417
+ onMouseEnter: () => x(G),
4418
+ onMouseLeave: () => x(null),
4403
4419
  style: {
4404
4420
  padding: "var(--lucent-space-2)",
4405
4421
  borderRadius: "var(--lucent-radius-md)",
@@ -4624,30 +4640,30 @@ function Io({
4624
4640
  children: o,
4625
4641
  padding: a = "md",
4626
4642
  shadow: i,
4627
- radius: l = "lg",
4628
- style: s,
4643
+ radius: s = "lg",
4644
+ style: l,
4629
4645
  onClick: c,
4630
- href: p,
4646
+ href: u,
4631
4647
  target: f,
4632
- rel: u,
4633
- disabled: k,
4634
- status: x,
4648
+ rel: p,
4649
+ disabled: w,
4650
+ status: y,
4635
4651
  selected: m,
4636
4652
  hoverable: h,
4637
4653
  media: d
4638
4654
  }) {
4639
- const b = $n[t], w = t === "combo", y = i ?? (w ? "md" : b.shadowDefault), { py: S, px: C } = Pn[a], v = `${S} ${C}`, q = Fn[l], T = p != null, E = c != null || T, N = E || (h ?? !1), R = (k ?? !1) && E, I = T ? "a" : E ? "button" : "div", [P, B] = z(!1), [G, D] = z(!1), [W, _] = z(!1), A = (m ?? !1) && !R, L = A ? Un : void 0, M = jn(b, m ?? !1, R), O = x != null ? `inset 3px 0 0 ${Nn[x]}` : void 0;
4655
+ const b = $n[t], x = t === "combo", k = i ?? (x ? "md" : b.shadowDefault), { py: S, px: C } = Pn[a], v = `${S} ${C}`, E = Fn[s], T = u != null, A = c != null || T, N = A || (h ?? !1), R = (w ?? !1) && A, I = T ? "a" : A ? "button" : "div", [P, B] = z(!1), [G, D] = z(!1), [W, _] = z(!1), q = (m ?? !1) && !R, L = q ? Un : void 0, M = jn(b, m ?? !1, R), O = y != null ? `inset 3px 0 0 ${Nn[y]}` : void 0;
4640
4656
  let j;
4641
- w ? j = se(L, O) : N && !R ? W ? j = se(Gn, L, O) : G ? j = se(Hn, L, O) : P ? j = se(E ? On : Vn, be[y], L, O) : j = se(be[y], L, O) : j = se(be[y], L, O);
4657
+ x ? j = se(L, O) : N && !R ? W ? j = se(Gn, L, O) : G ? j = se(Hn, L, O) : P ? j = se(A ? On : Vn, be[k], L, O) : j = se(be[k], L, O) : j = se(be[k], L, O);
4642
4658
  const F = {
4643
4659
  display: "flex",
4644
4660
  flexDirection: "column",
4645
4661
  background: M,
4646
4662
  border: b.border,
4647
- borderRadius: q,
4663
+ borderRadius: E,
4648
4664
  // Only clip overflow when media is present (to round image corners).
4649
4665
  // Default to visible so nested child shadows (e.g. elevated Card inside combo) aren't cut off.
4650
- overflow: d != null && !(A || N && G) ? "hidden" : "visible",
4666
+ overflow: d != null && !(q || N && G) ? "hidden" : "visible",
4651
4667
  boxSizing: "border-box",
4652
4668
  position: "relative",
4653
4669
  ...j !== void 0 && { boxShadow: j },
@@ -4660,7 +4676,7 @@ function Io({
4660
4676
  transition: Wn
4661
4677
  },
4662
4678
  // Button UA reset
4663
- ...E && !T && {
4679
+ ...A && !T && {
4664
4680
  padding: 0,
4665
4681
  font: "inherit",
4666
4682
  textAlign: "inherit",
@@ -4677,7 +4693,7 @@ function Io({
4677
4693
  opacity: 0.6,
4678
4694
  pointerEvents: "none"
4679
4695
  },
4680
- ...s
4696
+ ...l
4681
4697
  };
4682
4698
  return /* @__PURE__ */ g(
4683
4699
  I,
@@ -4696,19 +4712,19 @@ function Io({
4696
4712
  }
4697
4713
  } : {},
4698
4714
  ...T && {
4699
- href: R ? void 0 : p,
4715
+ href: R ? void 0 : u,
4700
4716
  ...f !== void 0 && { target: f },
4701
- ...u !== void 0 && { rel: u }
4717
+ ...p !== void 0 && { rel: p }
4702
4718
  },
4703
- ...!T && E && {
4719
+ ...!T && A && {
4704
4720
  type: "button",
4705
4721
  ...R && { disabled: !0 }
4706
4722
  },
4707
4723
  ...c !== void 0 && !R && { onClick: c },
4708
- ...E && m !== void 0 && { "aria-pressed": m },
4724
+ ...A && m !== void 0 && { "aria-pressed": m },
4709
4725
  ...T && R && { "aria-disabled": !0 },
4710
4726
  children: [
4711
- d != null && /* @__PURE__ */ e("div", { style: { lineHeight: 0, overflow: "hidden", borderRadius: `${q} ${q} 0 0` }, children: d }),
4727
+ d != null && /* @__PURE__ */ e("div", { style: { lineHeight: 0, overflow: "hidden", borderRadius: `${E} ${E} 0 0` }, children: d }),
4712
4728
  r != null && /* @__PURE__ */ e(
4713
4729
  "div",
4714
4730
  {
@@ -4725,11 +4741,11 @@ function Io({
4725
4741
  style: {
4726
4742
  padding: v,
4727
4743
  flex: 1,
4728
- ...w ? {
4744
+ ...x ? {
4729
4745
  background: "var(--lucent-surface)",
4730
4746
  border: "1px solid var(--lucent-border-default)",
4731
- borderRadius: q,
4732
- boxShadow: be[y],
4747
+ borderRadius: E,
4748
+ boxShadow: be[k],
4733
4749
  marginLeft: `calc(${C} / 3)`,
4734
4750
  marginRight: `calc(${C} / 3)`
4735
4751
  } : {}
@@ -5032,7 +5048,7 @@ function Eo({
5032
5048
  icon: a,
5033
5049
  style: i
5034
5050
  }) {
5035
- const l = _n[t], s = a ?? Zn[t];
5051
+ const s = _n[t], l = a ?? Zn[t];
5036
5052
  return /* @__PURE__ */ g(
5037
5053
  "div",
5038
5054
  {
@@ -5042,8 +5058,8 @@ function Eo({
5042
5058
  alignItems: "flex-start",
5043
5059
  gap: "var(--lucent-space-3)",
5044
5060
  padding: "var(--lucent-space-3) var(--lucent-space-4)",
5045
- background: l.bg,
5046
- border: `1px solid ${l.border}`,
5061
+ background: s.bg,
5062
+ border: `1px solid ${s.border}`,
5047
5063
  borderRadius: "var(--lucent-radius-md)",
5048
5064
  boxSizing: "border-box",
5049
5065
  ...i
@@ -5054,17 +5070,17 @@ function Eo({
5054
5070
  {
5055
5071
  style: {
5056
5072
  flexShrink: 0,
5057
- color: l.iconColor,
5073
+ color: s.iconColor,
5058
5074
  display: "flex",
5059
5075
  alignItems: "center",
5060
5076
  paddingTop: 2
5061
5077
  },
5062
- children: s
5078
+ children: l
5063
5079
  }
5064
5080
  ),
5065
5081
  /* @__PURE__ */ g("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)" }, children: [
5066
- r && /* @__PURE__ */ e(V, { as: "span", size: "sm", weight: "semibold", color: l.textColor, lineHeight: "tight", children: r }),
5067
- n && /* @__PURE__ */ e(V, { as: "span", size: "sm", color: l.textColor, lineHeight: "base", children: n })
5082
+ r && /* @__PURE__ */ e(V, { as: "span", size: "sm", weight: "semibold", color: s.textColor, lineHeight: "tight", children: r }),
5083
+ n && /* @__PURE__ */ e(V, { as: "span", size: "sm", color: s.textColor, lineHeight: "base", children: n })
5068
5084
  ] }),
5069
5085
  o && /* @__PURE__ */ e(
5070
5086
  "button",
@@ -5081,7 +5097,7 @@ function Eo({
5081
5097
  cursor: "pointer",
5082
5098
  padding: 2,
5083
5099
  borderRadius: "var(--lucent-radius-sm)",
5084
- color: l.iconColor,
5100
+ color: s.iconColor,
5085
5101
  opacity: 0.7
5086
5102
  },
5087
5103
  onMouseEnter: (c) => {
@@ -5326,36 +5342,36 @@ function Bo({
5326
5342
  lines: o = 1,
5327
5343
  animate: a = !0,
5328
5344
  radius: i,
5329
- style: l
5345
+ style: s
5330
5346
  }) {
5331
- const s = n ?? er[t], c = i ?? tr[t], p = a ? /* @__PURE__ */ e("style", { children: `
5347
+ const l = n ?? er[t], c = i ?? tr[t], u = a ? /* @__PURE__ */ e("style", { children: `
5332
5348
  @keyframes lucent-skeleton-shimmer {
5333
5349
  0% { background-position: 200% 0; }
5334
5350
  100% { background-position: -200% 0; }
5335
5351
  }
5336
5352
  ` }) : null;
5337
5353
  return t === "text" && o > 1 ? /* @__PURE__ */ g(Q, { children: [
5338
- p,
5339
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...l }, children: Array.from({ length: o }).map((f, u) => /* @__PURE__ */ e(
5354
+ u,
5355
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)", ...s }, children: Array.from({ length: o }).map((f, p) => /* @__PURE__ */ e(
5340
5356
  Qe,
5341
5357
  {
5342
- width: u === o - 1 ? "70%" : r,
5343
- height: s,
5358
+ width: p === o - 1 ? "70%" : r,
5359
+ height: l,
5344
5360
  radius: c,
5345
5361
  animate: a
5346
5362
  },
5347
- u
5363
+ p
5348
5364
  )) })
5349
5365
  ] }) : /* @__PURE__ */ g(Q, { children: [
5350
- p,
5366
+ u,
5351
5367
  /* @__PURE__ */ e(
5352
5368
  Qe,
5353
5369
  {
5354
5370
  width: t === "circle" ? n ?? 40 : r,
5355
- height: s,
5371
+ height: l,
5356
5372
  radius: c,
5357
5373
  animate: a,
5358
- ...l !== void 0 && { style: l }
5374
+ ...s !== void 0 && { style: s }
5359
5375
  }
5360
5376
  )
5361
5377
  ] });
@@ -5476,11 +5492,11 @@ function Lo({ items: t, separator: r = "/", style: n }) {
5476
5492
  fontFamily: "var(--lucent-font-family-base)",
5477
5493
  transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)"
5478
5494
  },
5479
- onMouseEnter: (l) => {
5480
- l.currentTarget.style.color = "var(--lucent-text-primary)";
5495
+ onMouseEnter: (s) => {
5496
+ s.currentTarget.style.color = "var(--lucent-text-primary)";
5481
5497
  },
5482
- onMouseLeave: (l) => {
5483
- l.currentTarget.style.color = "var(--lucent-text-secondary)";
5498
+ onMouseLeave: (s) => {
5499
+ s.currentTarget.style.color = "var(--lucent-text-secondary)";
5484
5500
  },
5485
5501
  children: o.label
5486
5502
  }
@@ -5498,11 +5514,11 @@ function Lo({ items: t, separator: r = "/", style: n }) {
5498
5514
  cursor: "pointer",
5499
5515
  transition: "color var(--lucent-duration-fast) var(--lucent-easing-default)"
5500
5516
  },
5501
- onMouseEnter: (l) => {
5502
- l.currentTarget.style.color = "var(--lucent-text-primary)";
5517
+ onMouseEnter: (s) => {
5518
+ s.currentTarget.style.color = "var(--lucent-text-primary)";
5503
5519
  },
5504
- onMouseLeave: (l) => {
5505
- l.currentTarget.style.color = "var(--lucent-text-secondary)";
5520
+ onMouseLeave: (s) => {
5521
+ s.currentTarget.style.color = "var(--lucent-text-secondary)";
5506
5522
  },
5507
5523
  children: o.label
5508
5524
  }
@@ -5530,37 +5546,37 @@ function rr() {
5530
5546
  const t = document.createElement("style");
5531
5547
  t.setAttribute("data-lucent-collapsible", ""), t.textContent = nr, document.head.appendChild(t), nt = !0;
5532
5548
  }
5533
- function Po({ trigger: t, children: r, defaultOpen: n = !1, open: o, onOpenChange: a, padded: i = !0, disabled: l = !1, style: s }) {
5534
- const c = ee(_e), p = c.px !== "0" || c.py !== "0", f = o !== void 0, [u, k] = z(n), x = f ? o : u, m = $(null), h = $(!1), d = $();
5549
+ function Po({ trigger: t, children: r, defaultOpen: n = !1, open: o, onOpenChange: a, padded: i = !0, disabled: s = !1, style: l }) {
5550
+ const c = ee(_e), u = c.px !== "0" || c.py !== "0", f = o !== void 0, [p, w] = z(n), y = f ? o : p, m = $(null), h = $(!1), d = $();
5535
5551
  H(rr, []), H(() => {
5536
5552
  h.current = !0;
5537
5553
  }, []), te(() => {
5538
- const w = m.current;
5539
- if (w)
5540
- if (x) {
5541
- w.style.overflow = "hidden";
5542
- const y = w.scrollHeight;
5543
- w.style.height = `${y}px`, w.style.transition = tt, clearTimeout(d.current), d.current = setTimeout(() => {
5544
- w.style.height = "auto", w.style.overflow = "visible", w.style.transition = "";
5554
+ const x = m.current;
5555
+ if (x)
5556
+ if (y) {
5557
+ x.style.overflow = "hidden";
5558
+ const k = x.scrollHeight;
5559
+ x.style.height = `${k}px`, x.style.transition = tt, clearTimeout(d.current), d.current = setTimeout(() => {
5560
+ x.style.height = "auto", x.style.overflow = "visible", x.style.transition = "";
5545
5561
  }, gt + 20);
5546
- } else h.current && (clearTimeout(d.current), w.style.overflow = "hidden", w.style.transition = "", w.style.height = `${w.scrollHeight}px`, w.getBoundingClientRect(), w.style.transition = tt, w.style.height = "0px");
5547
- }, [x]), H(() => {
5548
- const w = m.current;
5549
- w && !x && !h.current && (w.style.height = "0px");
5562
+ } else h.current && (clearTimeout(d.current), x.style.overflow = "hidden", x.style.transition = "", x.style.height = `${x.scrollHeight}px`, x.getBoundingClientRect(), x.style.transition = tt, x.style.height = "0px");
5563
+ }, [y]), H(() => {
5564
+ const x = m.current;
5565
+ x && !y && !h.current && (x.style.height = "0px");
5550
5566
  }, []), H(() => () => clearTimeout(d.current), []);
5551
5567
  const b = () => {
5552
- if (l) return;
5553
- const w = !x;
5554
- f || k(w), a == null || a(w);
5568
+ if (s) return;
5569
+ const x = !y;
5570
+ f || w(x), a == null || a(x);
5555
5571
  };
5556
- return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", fontFamily: "var(--lucent-font-family-base)", fontSize: "var(--lucent-font-size-md)", ...p && { margin: `calc(-1 * ${c.py}) calc(-1 * ${c.px})` }, ...s }, children: [
5572
+ return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", fontFamily: "var(--lucent-font-family-base)", fontSize: "var(--lucent-font-size-md)", ...u && { margin: `calc(-1 * ${c.py}) calc(-1 * ${c.px})` }, ...l }, children: [
5557
5573
  /* @__PURE__ */ g(
5558
5574
  "button",
5559
5575
  {
5560
5576
  "data-lucent-collapsible-trigger": !0,
5561
5577
  onClick: b,
5562
- disabled: l,
5563
- "aria-expanded": x,
5578
+ disabled: s,
5579
+ "aria-expanded": y,
5564
5580
  style: {
5565
5581
  display: "flex",
5566
5582
  alignItems: "center",
@@ -5570,18 +5586,18 @@ function Po({ trigger: t, children: r, defaultOpen: n = !1, open: o, onOpenChang
5570
5586
  border: "none",
5571
5587
  borderRadius: "var(--lucent-radius-md)",
5572
5588
  padding: "var(--lucent-space-4)",
5573
- cursor: l ? "not-allowed" : "pointer",
5589
+ cursor: s ? "not-allowed" : "pointer",
5574
5590
  textAlign: "left",
5575
5591
  outline: "none",
5576
5592
  color: "inherit",
5577
5593
  fontFamily: "inherit",
5578
5594
  fontSize: "inherit",
5579
- opacity: l ? 0.5 : 1,
5595
+ opacity: s ? 0.5 : 1,
5580
5596
  transition: `background ${Ne} ${le}`
5581
5597
  },
5582
5598
  children: [
5583
5599
  /* @__PURE__ */ e("span", { style: { flex: 1 }, children: t }),
5584
- /* @__PURE__ */ e(ar, { open: x })
5600
+ /* @__PURE__ */ e(ar, { open: y })
5585
5601
  ]
5586
5602
  }
5587
5603
  ),
@@ -5589,15 +5605,15 @@ function Po({ trigger: t, children: r, defaultOpen: n = !1, open: o, onOpenChang
5589
5605
  "div",
5590
5606
  {
5591
5607
  ref: m,
5592
- "aria-hidden": !x,
5593
- style: { overflow: x ? "visible" : "hidden" },
5608
+ "aria-hidden": !y,
5609
+ style: { overflow: y ? "visible" : "hidden" },
5594
5610
  children: /* @__PURE__ */ e(
5595
5611
  "div",
5596
5612
  {
5597
5613
  style: {
5598
5614
  ...i ? { padding: "var(--lucent-space-3) var(--lucent-space-4) var(--lucent-space-4)" } : {},
5599
- opacity: x ? 1 : 0,
5600
- transform: x ? "translateY(0)" : "translateY(-4px)",
5615
+ opacity: y ? 1 : 0,
5616
+ transform: y ? "translateY(0)" : "translateY(-4px)",
5601
5617
  transition: `opacity ${et}ms ${le}, transform ${et}ms ${le}`
5602
5618
  },
5603
5619
  children: r
@@ -5642,21 +5658,21 @@ function Fo({
5642
5658
  sidebarWidth: o = 240,
5643
5659
  headerHeight: a = 48,
5644
5660
  sidebarCollapsed: i = !1,
5645
- rightSidebar: l,
5646
- rightSidebarWidth: s = 240,
5661
+ rightSidebar: s,
5662
+ rightSidebarWidth: l = 240,
5647
5663
  rightSidebarCollapsed: c = !1,
5648
- footer: p,
5664
+ footer: u,
5649
5665
  footerHeight: f = 28,
5650
- chromeBackground: u = "bgBase",
5651
- mainStyle: k,
5652
- style: x
5666
+ chromeBackground: p = "bgBase",
5667
+ mainStyle: w,
5668
+ style: y
5653
5669
  }) {
5654
- const m = ye(a), h = ye(o), d = ye(s), b = ye(f), y = {
5670
+ const m = ye(a), h = ye(o), d = ye(l), b = ye(f), k = {
5655
5671
  bgBase: "var(--lucent-bg-base)",
5656
5672
  bgSubtle: "var(--lucent-bg-subtle)",
5657
5673
  surface: "var(--lucent-surface)",
5658
5674
  surfaceSecondary: "var(--lucent-surface-secondary)"
5659
- }[u] ?? "var(--lucent-bg-base)";
5675
+ }[p] ?? "var(--lucent-bg-base)";
5660
5676
  return /* @__PURE__ */ g(
5661
5677
  "div",
5662
5678
  {
@@ -5665,9 +5681,9 @@ function Fo({
5665
5681
  flexDirection: "column",
5666
5682
  height: "100vh",
5667
5683
  overflow: "hidden",
5668
- background: y,
5684
+ background: k,
5669
5685
  fontFamily: "var(--lucent-font-family-base)",
5670
- ...x
5686
+ ...y
5671
5687
  },
5672
5688
  children: [
5673
5689
  /* @__PURE__ */ e("style", { children: or }),
@@ -5678,7 +5694,7 @@ function Fo({
5678
5694
  flexShrink: 0,
5679
5695
  height: m,
5680
5696
  zIndex: 10,
5681
- background: y
5697
+ background: k
5682
5698
  },
5683
5699
  children: r
5684
5700
  }
@@ -5693,7 +5709,7 @@ function Fo({
5693
5709
  flexShrink: 0,
5694
5710
  overflow: "hidden",
5695
5711
  overflowY: i ? "hidden" : "auto",
5696
- background: y,
5712
+ background: k,
5697
5713
  transition: "width 200ms var(--lucent-easing-default)"
5698
5714
  },
5699
5715
  children: n
@@ -5707,17 +5723,17 @@ function Fo({
5707
5723
  flex: 1,
5708
5724
  overflowY: "auto",
5709
5725
  minWidth: 0,
5710
- margin: l != null ? "0 0 var(--lucent-space-3) 0" : "0 var(--lucent-space-3) var(--lucent-space-3) 0",
5726
+ margin: s != null ? "0 0 var(--lucent-space-3) 0" : "0 var(--lucent-space-3) var(--lucent-space-3) 0",
5711
5727
  border: "1px solid var(--lucent-border-default)",
5712
5728
  borderRadius: "var(--lucent-radius-lg)",
5713
5729
  boxShadow: "var(--lucent-shadow-sm)",
5714
5730
  background: "var(--lucent-surface)",
5715
- ...k
5731
+ ...w
5716
5732
  },
5717
5733
  children: t
5718
5734
  }
5719
5735
  ),
5720
- l != null && /* @__PURE__ */ e(
5736
+ s != null && /* @__PURE__ */ e(
5721
5737
  "aside",
5722
5738
  {
5723
5739
  className: pe,
@@ -5726,23 +5742,23 @@ function Fo({
5726
5742
  flexShrink: 0,
5727
5743
  overflow: "hidden",
5728
5744
  overflowY: c ? "hidden" : "auto",
5729
- background: y,
5745
+ background: k,
5730
5746
  transition: "width 200ms var(--lucent-easing-default)"
5731
5747
  },
5732
- children: l
5748
+ children: s
5733
5749
  }
5734
5750
  )
5735
5751
  ] }),
5736
- p != null && /* @__PURE__ */ e(
5752
+ u != null && /* @__PURE__ */ e(
5737
5753
  "div",
5738
5754
  {
5739
5755
  style: {
5740
5756
  flexShrink: 0,
5741
5757
  height: b,
5742
5758
  zIndex: 10,
5743
- background: y
5759
+ background: k
5744
5760
  },
5745
- children: p
5761
+ children: u
5746
5762
  }
5747
5763
  )
5748
5764
  ]
@@ -5799,27 +5815,27 @@ function No({
5799
5815
  page: o,
5800
5816
  onPageChange: a,
5801
5817
  onFilterChange: i,
5802
- emptyState: l,
5803
- style: s
5818
+ emptyState: s,
5819
+ style: l
5804
5820
  }) {
5805
- const [c, p] = z(null), [f, u] = z(0), [k, x] = z(null), [m, h] = z({}), d = o !== void 0, b = d ? o : f, w = t.some((I) => I.filterable), y = w ? r.filter((I) => t.every((P) => {
5821
+ const [c, u] = z(null), [f, p] = z(0), [w, y] = z(null), [m, h] = z({}), d = o !== void 0, b = d ? o : f, x = t.some((I) => I.filterable), k = x ? r.filter((I) => t.every((P) => {
5806
5822
  if (!P.filterable) return !0;
5807
5823
  const B = m[P.key];
5808
5824
  if (!B || B.length === 0) return !0;
5809
5825
  const G = String(I[P.key] ?? "");
5810
5826
  return B.includes(G);
5811
- })) : r, S = c ? [...y].sort((I, P) => {
5827
+ })) : r, S = c ? [...k].sort((I, P) => {
5812
5828
  const B = I[c.key], G = P[c.key], D = String(B ?? "").localeCompare(String(G ?? ""), void 0, { numeric: !0 });
5813
5829
  return c.dir === "asc" ? D : -D;
5814
- }) : y, C = n > 0 ? S.slice(b * n, (b + 1) * n) : S, v = n > 0 ? Math.max(1, Math.ceil(S.length / n)) : 1, q = (I) => {
5815
- d || u(I), a == null || a(I);
5830
+ }) : k, C = n > 0 ? S.slice(b * n, (b + 1) * n) : S, v = n > 0 ? Math.max(1, Math.ceil(S.length / n)) : 1, E = (I) => {
5831
+ d || p(I), a == null || a(I);
5816
5832
  }, T = (I) => {
5817
- p((P) => !P || P.key !== I ? { key: I, dir: "asc" } : P.dir === "asc" ? { key: I, dir: "desc" } : null), d || u(0), a == null || a(0);
5818
- }, E = (I, P) => {
5833
+ u((P) => !P || P.key !== I ? { key: I, dir: "asc" } : P.dir === "asc" ? { key: I, dir: "desc" } : null), d || p(0), a == null || a(0);
5834
+ }, A = (I, P) => {
5819
5835
  const B = { ...m, [I]: P };
5820
- P.length === 0 && delete B[I], h(B), d || u(0), a == null || a(0), i == null || i(B);
5836
+ P.length === 0 && delete B[I], h(B), d || p(0), a == null || a(0), i == null || i(B);
5821
5837
  }, N = () => {
5822
- h({}), d || u(0), a == null || a(0), i == null || i({});
5838
+ h({}), d || p(0), a == null || a(0), i == null || i({});
5823
5839
  }, R = [];
5824
5840
  if (v <= 7)
5825
5841
  for (let I = 0; I < v; I++) R.push(I);
@@ -5829,14 +5845,14 @@ function No({
5829
5845
  R.push(I);
5830
5846
  b < v - 3 && R.push("…"), R.push(v - 1);
5831
5847
  }
5832
- return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
5833
- w && /* @__PURE__ */ e("div", { style: { position: "relative", zIndex: 1 }, children: /* @__PURE__ */ e(
5848
+ return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...l }, children: [
5849
+ x && /* @__PURE__ */ e("div", { style: { position: "relative", zIndex: 1 }, children: /* @__PURE__ */ e(
5834
5850
  sr,
5835
5851
  {
5836
5852
  columns: t,
5837
5853
  rows: r,
5838
5854
  filters: m,
5839
- onFilter: E,
5855
+ onFilter: A,
5840
5856
  onClearAll: N
5841
5857
  }
5842
5858
  ) }),
@@ -5889,16 +5905,16 @@ function No({
5889
5905
  {
5890
5906
  colSpan: t.length,
5891
5907
  style: { padding: "var(--lucent-space-12)", textAlign: "center" },
5892
- children: l ?? /* @__PURE__ */ e(V, { color: "secondary", children: "No data" })
5908
+ children: s ?? /* @__PURE__ */ e(V, { color: "secondary", children: "No data" })
5893
5909
  }
5894
5910
  ) }) : C.map((I, P) => /* @__PURE__ */ e(
5895
5911
  "tr",
5896
5912
  {
5897
- onMouseEnter: () => x(P),
5898
- onMouseLeave: () => x(null),
5913
+ onMouseEnter: () => y(P),
5914
+ onMouseLeave: () => y(null),
5899
5915
  style: {
5900
5916
  borderBottom: P < C.length - 1 ? "1px solid var(--lucent-border-subtle)" : "none",
5901
- background: k === P ? "color-mix(in srgb, var(--lucent-text-primary) 4%, transparent)" : "transparent",
5917
+ background: w === P ? "color-mix(in srgb, var(--lucent-text-primary) 4%, transparent)" : "transparent",
5902
5918
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
5903
5919
  },
5904
5920
  children: t.map((B) => /* @__PURE__ */ e(
@@ -5930,7 +5946,7 @@ function No({
5930
5946
  /* @__PURE__ */ e(
5931
5947
  Ee,
5932
5948
  {
5933
- onClick: () => q(b - 1),
5949
+ onClick: () => E(b - 1),
5934
5950
  disabled: b === 0,
5935
5951
  "aria-label": "Previous page",
5936
5952
  children: /* @__PURE__ */ e(rt, { dir: "left" })
@@ -5944,7 +5960,7 @@ function No({
5944
5960
  }, children: "…" }, `ellipsis-${P}`) : /* @__PURE__ */ e(
5945
5961
  Ee,
5946
5962
  {
5947
- onClick: () => q(I),
5963
+ onClick: () => E(I),
5948
5964
  active: I === b,
5949
5965
  "aria-label": `Page ${I + 1}`,
5950
5966
  "aria-current": I === b ? "page" : void 0,
@@ -5956,7 +5972,7 @@ function No({
5956
5972
  /* @__PURE__ */ e(
5957
5973
  Ee,
5958
5974
  {
5959
- onClick: () => q(b + 1),
5975
+ onClick: () => E(b + 1),
5960
5976
  disabled: b >= v - 1,
5961
5977
  "aria-label": "Next page",
5962
5978
  children: /* @__PURE__ */ e(rt, { dir: "right" })
@@ -5973,24 +5989,24 @@ function sr({
5973
5989
  onFilter: o,
5974
5990
  onClearAll: a
5975
5991
  }) {
5976
- const i = t.filter((s) => s.filterable), l = Object.keys(n).length;
5992
+ const i = t.filter((l) => l.filterable), s = Object.keys(n).length;
5977
5993
  return /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-2)", flexWrap: "wrap" }, children: [
5978
- i.map((s) => {
5994
+ i.map((l) => {
5979
5995
  const c = Array.from(
5980
- new Set(r.map((p) => String(p[s.key] ?? "")))
5996
+ new Set(r.map((u) => String(u[l.key] ?? "")))
5981
5997
  ).sort();
5982
5998
  return /* @__PURE__ */ e(
5983
5999
  lr,
5984
6000
  {
5985
- label: s.header,
6001
+ label: l.header,
5986
6002
  values: c,
5987
- value: n[s.key] ?? [],
5988
- onChange: (p) => o(s.key, p)
6003
+ value: n[l.key] ?? [],
6004
+ onChange: (u) => o(l.key, u)
5989
6005
  },
5990
- s.key
6006
+ l.key
5991
6007
  );
5992
6008
  }),
5993
- l > 0 && /* @__PURE__ */ e(
6009
+ s > 0 && /* @__PURE__ */ e(
5994
6010
  "button",
5995
6011
  {
5996
6012
  onClick: a,
@@ -6018,26 +6034,26 @@ function lr({
6018
6034
  value: n,
6019
6035
  onChange: o
6020
6036
  }) {
6021
- const [a, i] = z(!1), [l, s] = z(!1), [c, p] = z(""), f = $(null), u = $(null), k = n.length > 0;
6037
+ const [a, i] = z(!1), [s, l] = z(!1), [c, u] = z(""), f = $(null), p = $(null), w = n.length > 0;
6022
6038
  H(() => {
6023
6039
  if (!a) {
6024
- p("");
6040
+ u("");
6025
6041
  return;
6026
6042
  }
6027
6043
  setTimeout(() => {
6028
- var w;
6029
- return (w = u.current) == null ? void 0 : w.focus();
6044
+ var x;
6045
+ return (x = p.current) == null ? void 0 : x.focus();
6030
6046
  }, 0);
6031
- const d = (w) => {
6032
- f.current && !f.current.contains(w.target) && i(!1);
6033
- }, b = (w) => {
6034
- w.key === "Escape" && i(!1);
6047
+ const d = (x) => {
6048
+ f.current && !f.current.contains(x.target) && i(!1);
6049
+ }, b = (x) => {
6050
+ x.key === "Escape" && i(!1);
6035
6051
  };
6036
6052
  return document.addEventListener("mousedown", d), document.addEventListener("keydown", b), () => {
6037
6053
  document.removeEventListener("mousedown", d), document.removeEventListener("keydown", b);
6038
6054
  };
6039
6055
  }, [a]);
6040
- const x = c ? r.filter((d) => d.toLowerCase().includes(c.toLowerCase())) : r, m = (d) => o(n.includes(d) ? n.filter((b) => b !== d) : [...n, d]), h = n.length === 0 ? null : n.length === 1 ? /* @__PURE__ */ g("span", { style: { color: "var(--lucent-text-secondary)", fontWeight: "var(--lucent-font-weight-regular)" }, children: [
6056
+ const y = c ? r.filter((d) => d.toLowerCase().includes(c.toLowerCase())) : r, m = (d) => o(n.includes(d) ? n.filter((b) => b !== d) : [...n, d]), h = n.length === 0 ? null : n.length === 1 ? /* @__PURE__ */ g("span", { style: { color: "var(--lucent-text-secondary)", fontWeight: "var(--lucent-font-weight-regular)" }, children: [
6041
6057
  ": ",
6042
6058
  n[0]
6043
6059
  ] }) : /* @__PURE__ */ g("span", { style: { color: "var(--lucent-accent-default)" }, children: [
@@ -6050,8 +6066,8 @@ function lr({
6050
6066
  "button",
6051
6067
  {
6052
6068
  onClick: () => i((d) => !d),
6053
- onMouseEnter: () => s(!0),
6054
- onMouseLeave: () => s(!1),
6069
+ onMouseEnter: () => l(!0),
6070
+ onMouseLeave: () => l(!1),
6055
6071
  style: {
6056
6072
  display: "inline-flex",
6057
6073
  alignItems: "center",
@@ -6059,12 +6075,12 @@ function lr({
6059
6075
  height: 30,
6060
6076
  padding: "0 var(--lucent-space-3)",
6061
6077
  borderRadius: "var(--lucent-radius-md)",
6062
- border: `1px solid ${k ? "var(--lucent-accent-default)" : l ? "var(--lucent-border-strong)" : "var(--lucent-border-default)"}`,
6063
- background: k ? "var(--lucent-accent-subtle)" : "var(--lucent-surface)",
6064
- color: k ? "var(--lucent-accent-default)" : "var(--lucent-text-primary)",
6078
+ border: `1px solid ${w ? "var(--lucent-accent-default)" : s ? "var(--lucent-border-strong)" : "var(--lucent-border-default)"}`,
6079
+ background: w ? "var(--lucent-accent-subtle)" : "var(--lucent-surface)",
6080
+ color: w ? "var(--lucent-accent-default)" : "var(--lucent-text-primary)",
6065
6081
  fontFamily: "var(--lucent-font-family-base)",
6066
6082
  fontSize: "var(--lucent-font-size-xs)",
6067
- fontWeight: k ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
6083
+ fontWeight: w ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
6068
6084
  cursor: "pointer",
6069
6085
  outline: "none",
6070
6086
  whiteSpace: "nowrap",
@@ -6105,10 +6121,10 @@ function lr({
6105
6121
  /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-2)", paddingBottom: 0 }, children: /* @__PURE__ */ e(
6106
6122
  "input",
6107
6123
  {
6108
- ref: u,
6124
+ ref: p,
6109
6125
  type: "text",
6110
6126
  value: c,
6111
- onChange: (d) => p(d.target.value),
6127
+ onChange: (d) => u(d.target.value),
6112
6128
  placeholder: "Search…",
6113
6129
  style: {
6114
6130
  width: "100%",
@@ -6144,13 +6160,13 @@ function lr({
6144
6160
  children: "Clear selection"
6145
6161
  }
6146
6162
  ) }),
6147
- /* @__PURE__ */ e("div", { style: { overflowY: "auto", padding: "var(--lucent-space-1)", borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" }, children: x.length === 0 ? /* @__PURE__ */ e("div", { style: {
6163
+ /* @__PURE__ */ e("div", { style: { overflowY: "auto", padding: "var(--lucent-space-1)", borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" }, children: y.length === 0 ? /* @__PURE__ */ e("div", { style: {
6148
6164
  padding: "var(--lucent-space-3)",
6149
6165
  color: "var(--lucent-text-disabled)",
6150
6166
  fontFamily: "var(--lucent-font-family-base)",
6151
6167
  fontSize: "var(--lucent-font-size-xs)",
6152
6168
  textAlign: "center"
6153
- }, children: "No results" }) : x.map((d) => /* @__PURE__ */ e(
6169
+ }, children: "No results" }) : y.map((d) => /* @__PURE__ */ e(
6154
6170
  cr,
6155
6171
  {
6156
6172
  label: d,
@@ -6213,15 +6229,15 @@ function Ee({
6213
6229
  active: o,
6214
6230
  ...a
6215
6231
  }) {
6216
- const [i, l] = z(!1);
6232
+ const [i, s] = z(!1);
6217
6233
  return /* @__PURE__ */ e(
6218
6234
  "button",
6219
6235
  {
6220
6236
  ...a,
6221
6237
  onClick: r,
6222
6238
  disabled: n,
6223
- onMouseEnter: () => l(!0),
6224
- onMouseLeave: () => l(!1),
6239
+ onMouseEnter: () => s(!0),
6240
+ onMouseLeave: () => s(!1),
6225
6241
  style: {
6226
6242
  display: "inline-flex",
6227
6243
  alignItems: "center",
@@ -6371,32 +6387,32 @@ function Wo({
6371
6387
  onOpenChange: a,
6372
6388
  style: i
6373
6389
  }) {
6374
- const l = o !== void 0, [s, c] = z(!1), p = l ? o : s, [f, u] = z(""), [k, x] = z(0), m = $(null), h = $(null), d = $(!1);
6390
+ const s = o !== void 0, [l, c] = z(!1), u = s ? o : l, [f, p] = z(""), [w, y] = z(0), m = $(null), h = $(null), d = $(!1);
6375
6391
  if (!d.current) {
6376
6392
  const T = document.createElement("style");
6377
6393
  T.textContent = dr, document.head.appendChild(T), d.current = !0;
6378
6394
  }
6379
6395
  const b = J((T) => {
6380
- l || c(T), a == null || a(T);
6381
- }, [l, a]);
6396
+ s || c(T), a == null || a(T);
6397
+ }, [s, a]);
6382
6398
  H(() => {
6383
- const T = (E) => {
6384
- (E.metaKey || E.ctrlKey) && E.key === n && (E.preventDefault(), b(!p));
6399
+ const T = (A) => {
6400
+ (A.metaKey || A.ctrlKey) && A.key === n && (A.preventDefault(), b(!u));
6385
6401
  };
6386
6402
  return window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T);
6387
- }, [p, n, b]), H(() => {
6388
- p && (u(""), x(0), setTimeout(() => {
6403
+ }, [u, n, b]), H(() => {
6404
+ u && (p(""), y(0), setTimeout(() => {
6389
6405
  var T;
6390
6406
  return (T = m.current) == null ? void 0 : T.focus();
6391
6407
  }, 10));
6392
- }, [p]);
6393
- const w = f ? t.filter((T) => ur(T, f)) : t, y = w.filter((T) => !T.disabled);
6408
+ }, [u]);
6409
+ const x = f ? t.filter((T) => ur(T, f)) : t, k = x.filter((T) => !T.disabled);
6394
6410
  H(() => {
6395
6411
  const T = h.current;
6396
6412
  if (!T) return;
6397
- const E = T.querySelector('[data-active="true"]');
6398
- E == null || E.scrollIntoView({ block: "nearest" });
6399
- }, [k]);
6413
+ const A = T.querySelector('[data-active="true"]');
6414
+ A == null || A.scrollIntoView({ block: "nearest" });
6415
+ }, [w]);
6400
6416
  const S = (T) => {
6401
6417
  T.disabled || (T.onSelect(), b(!1));
6402
6418
  }, C = (T) => {
@@ -6405,20 +6421,20 @@ function Wo({
6405
6421
  return;
6406
6422
  }
6407
6423
  if (T.key === "ArrowDown")
6408
- T.preventDefault(), y.length > 0 && x((E) => (E + 1) % y.length);
6424
+ T.preventDefault(), k.length > 0 && y((A) => (A + 1) % k.length);
6409
6425
  else if (T.key === "ArrowUp")
6410
- T.preventDefault(), y.length > 0 && x((E) => (E - 1 + y.length) % y.length);
6426
+ T.preventDefault(), k.length > 0 && y((A) => (A - 1 + k.length) % k.length);
6411
6427
  else if (T.key === "Enter") {
6412
- const E = y[k];
6413
- E && S(E);
6428
+ const A = k[w];
6429
+ A && S(A);
6414
6430
  }
6415
6431
  }, v = [];
6416
- for (const T of w) {
6417
- const E = v[v.length - 1];
6418
- E && E.group === T.group ? E.items.push(T) : v.push({ group: T.group, items: [T] });
6432
+ for (const T of x) {
6433
+ const A = v[v.length - 1];
6434
+ A && A.group === T.group ? A.items.push(T) : v.push({ group: T.group, items: [T] });
6419
6435
  }
6420
- if (!p) return null;
6421
- let q = 0;
6436
+ if (!u) return null;
6437
+ let E = 0;
6422
6438
  return /* @__PURE__ */ e(
6423
6439
  "div",
6424
6440
  {
@@ -6465,7 +6481,7 @@ function Wo({
6465
6481
  alignItems: "center",
6466
6482
  gap: "var(--lucent-space-3)",
6467
6483
  padding: "var(--lucent-space-3) var(--lucent-space-4)",
6468
- borderBottom: w.length > 0 ? "1px solid var(--lucent-border-subtle)" : "none"
6484
+ borderBottom: x.length > 0 ? "1px solid var(--lucent-border-subtle)" : "none"
6469
6485
  }, children: [
6470
6486
  /* @__PURE__ */ g("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0, style: { flexShrink: 0, color: "var(--lucent-text-secondary)" }, children: [
6471
6487
  /* @__PURE__ */ e("circle", { cx: "7", cy: "7", r: "4.5", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -6480,7 +6496,7 @@ function Wo({
6480
6496
  "aria-controls": "lucent-command-list",
6481
6497
  value: f,
6482
6498
  onChange: (T) => {
6483
- u(T.target.value), x(0);
6499
+ p(T.target.value), y(0);
6484
6500
  },
6485
6501
  onKeyDown: C,
6486
6502
  placeholder: r,
@@ -6505,19 +6521,19 @@ function Wo({
6505
6521
  role: "listbox",
6506
6522
  ref: h,
6507
6523
  style: { maxHeight: 360, overflowY: "auto", padding: "var(--lucent-space-1) var(--lucent-space-2)" },
6508
- children: w.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-8)", textAlign: "center" }, children: /* @__PURE__ */ g(V, { color: "secondary", children: [
6524
+ children: x.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-8)", textAlign: "center" }, children: /* @__PURE__ */ g(V, { color: "secondary", children: [
6509
6525
  'No results for "',
6510
6526
  f,
6511
6527
  '"'
6512
- ] }) }) : v.map(({ group: T, items: E }, N) => /* @__PURE__ */ g("div", { children: [
6528
+ ] }) }) : v.map(({ group: T, items: A }, N) => /* @__PURE__ */ g("div", { children: [
6513
6529
  T && /* @__PURE__ */ e("div", { style: {
6514
6530
  padding: "var(--lucent-space-2) var(--lucent-space-2) var(--lucent-space-1)",
6515
6531
  ...N > 0 ? { borderTop: "1px solid var(--lucent-border-subtle)", marginTop: "var(--lucent-space-2)" } : {}
6516
6532
  }, children: /* @__PURE__ */ e(V, { size: "xs", color: "secondary", weight: "medium", children: T }) }),
6517
- E.map((R) => {
6533
+ A.map((R) => {
6518
6534
  const I = R.disabled ?? !1;
6519
6535
  let P = !1;
6520
- return I || (P = q === k, q++), /* @__PURE__ */ g(
6536
+ return I || (P = E === w, E++), /* @__PURE__ */ g(
6521
6537
  "div",
6522
6538
  {
6523
6539
  role: "option",
@@ -6527,8 +6543,8 @@ function Wo({
6527
6543
  onClick: () => S(R),
6528
6544
  onMouseEnter: () => {
6529
6545
  if (!I) {
6530
- const B = y.indexOf(R);
6531
- B !== -1 && x(B);
6546
+ const B = k.indexOf(R);
6547
+ B !== -1 && y(B);
6532
6548
  }
6533
6549
  },
6534
6550
  style: {
@@ -6566,9 +6582,9 @@ function Wo({
6566
6582
  ["↑↓", "Navigate"],
6567
6583
  ["↵", "Select"],
6568
6584
  ["Esc", "Close"]
6569
- ].map(([T, E]) => /* @__PURE__ */ g("span", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
6585
+ ].map(([T, A]) => /* @__PURE__ */ g("span", { style: { display: "flex", alignItems: "center", gap: "var(--lucent-space-1)" }, children: [
6570
6586
  /* @__PURE__ */ e(ce, { size: "xs", variant: "outline", tabIndex: -1, style: { pointerEvents: "none" }, children: T }),
6571
- /* @__PURE__ */ e(V, { size: "xs", color: "secondary", children: E })
6587
+ /* @__PURE__ */ e(V, { size: "xs", color: "secondary", children: A })
6572
6588
  ] }, T)) })
6573
6589
  ]
6574
6590
  }
@@ -6686,37 +6702,37 @@ function Vo({
6686
6702
  onChange: o,
6687
6703
  placeholder: a = "Select…",
6688
6704
  disabled: i = !1,
6689
- max: l,
6690
- size: s = "md",
6705
+ max: s,
6706
+ size: l = "md",
6691
6707
  label: c,
6692
- helperText: p,
6708
+ helperText: u,
6693
6709
  errorText: f,
6694
- style: u
6710
+ style: p
6695
6711
  }) {
6696
- const k = r !== void 0, [x, m] = z(n), h = k ? r : x, [d, b] = z(!1), [w, y] = z(""), [S, C] = z(0), [v, q] = z(!1), T = $(null), E = $(null), N = $(null), R = $(null), [I, P] = z({ top: 0, left: 0, width: 0 }), B = Pe();
6712
+ const w = r !== void 0, [y, m] = z(n), h = w ? r : y, [d, b] = z(!1), [x, k] = z(""), [S, C] = z(0), [v, E] = z(!1), T = $(null), A = $(null), N = $(null), R = $(null), [I, P] = z({ top: 0, left: 0, width: 0 }), B = Pe();
6697
6713
  H(() => {
6698
6714
  if (!d) return;
6699
6715
  const F = (Y) => {
6700
6716
  var K, oe;
6701
- !((K = T.current) != null && K.contains(Y.target)) && !((oe = R.current) != null && oe.contains(Y.target)) && (b(!1), y(""));
6717
+ !((K = T.current) != null && K.contains(Y.target)) && !((oe = R.current) != null && oe.contains(Y.target)) && (b(!1), k(""));
6702
6718
  };
6703
6719
  return document.addEventListener("mousedown", F), () => document.removeEventListener("mousedown", F);
6704
6720
  }, [d]), te(() => {
6705
6721
  if (!d || !N.current) return;
6706
6722
  const F = N.current.getBoundingClientRect();
6707
6723
  P({ top: F.bottom + 4, left: F.left, width: F.width });
6708
- }, [d, h, w]);
6724
+ }, [d, h, x]);
6709
6725
  const G = (F) => {
6710
- const Y = h.includes(F) ? h.filter((K) => K !== F) : l !== void 0 && h.length >= l ? h : [...h, F];
6711
- k || m(Y), o == null || o(Y);
6726
+ const Y = h.includes(F) ? h.filter((K) => K !== F) : s !== void 0 && h.length >= s ? h : [...h, F];
6727
+ w || m(Y), o == null || o(Y);
6712
6728
  }, D = (F) => {
6713
6729
  const Y = h.filter((K) => K !== F);
6714
- k || m(Y), o == null || o(Y);
6730
+ w || m(Y), o == null || o(Y);
6715
6731
  }, W = t.filter(
6716
- (F) => F.label.toLowerCase().includes(w.toLowerCase())
6732
+ (F) => F.label.toLowerCase().includes(x.toLowerCase())
6717
6733
  ), _ = (F) => {
6718
6734
  if (F.key === "Escape") {
6719
- b(!1), y("");
6735
+ b(!1), k("");
6720
6736
  return;
6721
6737
  }
6722
6738
  if (F.key === "ArrowDown" && (F.preventDefault(), b(!0), C((Y) => Math.min(Y + 1, W.length - 1))), F.key === "ArrowUp" && (F.preventDefault(), C((Y) => Math.max(Y - 1, 0))), F.key === "Enter") {
@@ -6724,15 +6740,15 @@ function Vo({
6724
6740
  const Y = W[S];
6725
6741
  Y && !Y.disabled && G(Y.value);
6726
6742
  }
6727
- F.key === "Backspace" && w === "" && h.length > 0 && D(h[h.length - 1]);
6728
- }, A = l !== void 0 && h.length >= l, L = !!f, M = i ? "var(--lucent-border-default)" : L ? "var(--lucent-danger-default)" : v ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", O = v ? `0 0 0 3px ${L ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", j = `lucent-multiselect-${Pe()}`;
6729
- return /* @__PURE__ */ g("div", { ref: T, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...u }, children: [
6743
+ F.key === "Backspace" && x === "" && h.length > 0 && D(h[h.length - 1]);
6744
+ }, q = s !== void 0 && h.length >= s, L = !!f, M = i ? "var(--lucent-border-default)" : L ? "var(--lucent-danger-default)" : v ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", O = v ? `0 0 0 3px ${L ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none", j = `lucent-multiselect-${Pe()}`;
6745
+ return /* @__PURE__ */ g("div", { ref: T, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...p }, children: [
6730
6746
  c && /* @__PURE__ */ e(
6731
6747
  "label",
6732
6748
  {
6733
6749
  htmlFor: j,
6734
6750
  style: {
6735
- fontSize: Ae[s],
6751
+ fontSize: Ae[l],
6736
6752
  fontWeight: "var(--lucent-font-weight-medium)",
6737
6753
  color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
6738
6754
  fontFamily: "var(--lucent-font-family-base)"
@@ -6746,16 +6762,16 @@ function Vo({
6746
6762
  {
6747
6763
  onClick: () => {
6748
6764
  var F;
6749
- i || (b(!0), (F = E.current) == null || F.focus());
6765
+ i || (b(!0), (F = A.current) == null || F.focus());
6750
6766
  },
6751
6767
  style: {
6752
6768
  display: "flex",
6753
6769
  flexWrap: "wrap",
6754
6770
  alignItems: "center",
6755
- gap: xe[s],
6756
- minHeight: pr[s],
6771
+ gap: xe[l],
6772
+ minHeight: pr[l],
6757
6773
  boxSizing: "border-box",
6758
- padding: fr[s],
6774
+ padding: fr[l],
6759
6775
  borderRadius: "var(--lucent-radius-lg)",
6760
6776
  border: `1px solid ${M}`,
6761
6777
  background: i ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
@@ -6766,26 +6782,26 @@ function Vo({
6766
6782
  children: [
6767
6783
  h.map((F) => {
6768
6784
  const Y = t.find((K) => K.value === F);
6769
- return Y ? /* @__PURE__ */ e(ke, { size: mr[s], onDismiss: () => D(F), disabled: i, children: Y.label }, F) : null;
6785
+ return Y ? /* @__PURE__ */ e(ke, { size: mr[l], onDismiss: () => D(F), disabled: i, children: Y.label }, F) : null;
6770
6786
  }),
6771
6787
  /* @__PURE__ */ e(
6772
6788
  "input",
6773
6789
  {
6774
6790
  id: j,
6775
- ref: E,
6776
- value: w,
6791
+ ref: A,
6792
+ value: x,
6777
6793
  onChange: (F) => {
6778
- y(F.target.value), b(!0), C(0);
6794
+ k(F.target.value), b(!0), C(0);
6779
6795
  },
6780
6796
  onKeyDown: _,
6781
- onFocus: () => q(!0),
6782
- onBlur: () => q(!1),
6797
+ onFocus: () => E(!0),
6798
+ onBlur: () => E(!1),
6783
6799
  disabled: i,
6784
6800
  placeholder: h.length === 0 ? a : "",
6785
6801
  "aria-autocomplete": "list",
6786
6802
  "aria-controls": B,
6787
6803
  "aria-expanded": d,
6788
- "aria-describedby": L ? `${j}-error` : p ? `${j}-helper` : void 0,
6804
+ "aria-describedby": L ? `${j}-error` : u ? `${j}-helper` : void 0,
6789
6805
  role: "combobox",
6790
6806
  style: {
6791
6807
  flex: "1 1 80px",
@@ -6794,7 +6810,7 @@ function Vo({
6794
6810
  outline: "none",
6795
6811
  background: "transparent",
6796
6812
  fontFamily: "var(--lucent-font-family-base)",
6797
- fontSize: hr[s],
6813
+ fontSize: hr[l],
6798
6814
  color: i ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
6799
6815
  cursor: i ? "not-allowed" : "text",
6800
6816
  padding: h.length === 0 ? "2px 0 2px var(--lucent-space-1)" : "2px 0"
@@ -6826,11 +6842,11 @@ function Vo({
6826
6842
  boxShadow: "0 0 24px -4px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), var(--lucent-shadow-md)",
6827
6843
  maxHeight: 240,
6828
6844
  overflowY: "auto",
6829
- padding: xe[s]
6845
+ padding: xe[l]
6830
6846
  },
6831
6847
  children: [
6832
- W.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ e(V, { color: "secondary", size: at[s], children: "No options" }) }) : W.map((F, Y) => {
6833
- const K = h.includes(F.value), oe = Y === S, ne = F.disabled ?? !1, U = A && !K;
6848
+ W.length === 0 ? /* @__PURE__ */ e("div", { style: { padding: "var(--lucent-space-2)" }, children: /* @__PURE__ */ e(V, { color: "secondary", size: at[l], children: "No options" }) }) : W.map((F, Y) => {
6849
+ const K = h.includes(F.value), oe = Y === S, ne = F.disabled ?? !1, U = q && !K;
6834
6850
  return /* @__PURE__ */ g(
6835
6851
  "div",
6836
6852
  {
@@ -6844,8 +6860,8 @@ function Vo({
6844
6860
  style: {
6845
6861
  display: "flex",
6846
6862
  alignItems: "center",
6847
- gap: xe[s],
6848
- padding: xe[s],
6863
+ gap: xe[l],
6864
+ padding: xe[l],
6849
6865
  borderRadius: "var(--lucent-radius-md)",
6850
6866
  cursor: ne || U ? "not-allowed" : "pointer",
6851
6867
  background: oe ? "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)" : "transparent",
@@ -6857,24 +6873,24 @@ function Vo({
6857
6873
  {
6858
6874
  checked: K,
6859
6875
  disabled: ne || U,
6860
- size: s,
6876
+ size: l,
6861
6877
  style: { margin: 0, pointerEvents: "none" },
6862
6878
  "aria-hidden": !0,
6863
6879
  readOnly: !0
6864
6880
  }
6865
6881
  ),
6866
- /* @__PURE__ */ e(V, { size: at[s], children: F.label })
6882
+ /* @__PURE__ */ e(V, { size: at[l], children: F.label })
6867
6883
  ]
6868
6884
  },
6869
6885
  F.value
6870
6886
  );
6871
6887
  }),
6872
- A && /* @__PURE__ */ e("div", { style: {
6888
+ q && /* @__PURE__ */ e("div", { style: {
6873
6889
  padding: "var(--lucent-space-2)",
6874
6890
  borderTop: "1px solid var(--lucent-border-subtle)"
6875
- }, children: /* @__PURE__ */ g(V, { size: s === "lg" ? "sm" : "xs", color: "secondary", children: [
6891
+ }, children: /* @__PURE__ */ g(V, { size: l === "lg" ? "sm" : "xs", color: "secondary", children: [
6876
6892
  "Max ",
6877
- l,
6893
+ s,
6878
6894
  " selected"
6879
6895
  ] }) })
6880
6896
  ]
@@ -6889,23 +6905,23 @@ function Vo({
6889
6905
  id: `${j}-error`,
6890
6906
  role: "alert",
6891
6907
  style: {
6892
- fontSize: Ae[s],
6908
+ fontSize: Ae[l],
6893
6909
  color: "var(--lucent-danger-text)",
6894
6910
  fontFamily: "var(--lucent-font-family-base)"
6895
6911
  },
6896
6912
  children: f
6897
6913
  }
6898
6914
  ),
6899
- !L && p && /* @__PURE__ */ e(
6915
+ !L && u && /* @__PURE__ */ e(
6900
6916
  "span",
6901
6917
  {
6902
6918
  id: `${j}-helper`,
6903
6919
  style: {
6904
- fontSize: Ae[s],
6920
+ fontSize: Ae[l],
6905
6921
  color: "var(--lucent-text-secondary)",
6906
6922
  fontFamily: "var(--lucent-font-family-base)"
6907
6923
  },
6908
- children: p
6924
+ children: u
6909
6925
  }
6910
6926
  )
6911
6927
  ] });
@@ -7065,7 +7081,7 @@ const xr = { sm: "calc(var(--lucent-space-8) * 0.5 + 18px)", md: "calc(var(--luc
7065
7081
  lg: "var(--lucent-space-3)"
7066
7082
  }, Tr = { sm: 28, md: 32, lg: 38 }, Cr = { sm: "var(--lucent-font-size-xs)", md: "var(--lucent-font-size-sm)", lg: "var(--lucent-font-size-md)" }, Ir = { sm: "xs", md: "sm", lg: "md" }, Mr = { sm: "xs", md: "xs", lg: "sm" }, zr = { sm: 24, md: 28, lg: 32 }, Er = { sm: 14, md: 16, lg: 18 }, vt = { sm: "var(--lucent-space-3)", md: "var(--lucent-space-4)", lg: "var(--lucent-space-5)" }, $e = { sm: 220, md: 260, lg: 300 };
7067
7083
  function it({ dir: t, onClick: r, disabled: n, size: o = "md" }) {
7068
- const [a, i] = z(!1), l = zr[o], s = Er[o];
7084
+ const [a, i] = z(!1), s = zr[o], l = Er[o];
7069
7085
  return /* @__PURE__ */ e(
7070
7086
  "button",
7071
7087
  {
@@ -7079,8 +7095,8 @@ function it({ dir: t, onClick: r, disabled: n, size: o = "md" }) {
7079
7095
  display: "inline-flex",
7080
7096
  alignItems: "center",
7081
7097
  justifyContent: "center",
7082
- width: l,
7083
- height: l,
7098
+ width: s,
7099
+ height: s,
7084
7100
  border: "none",
7085
7101
  borderRadius: "var(--lucent-radius-md)",
7086
7102
  background: a && !n ? "color-mix(in srgb, var(--lucent-text-primary) 5%, transparent)" : "transparent",
@@ -7088,7 +7104,7 @@ function it({ dir: t, onClick: r, disabled: n, size: o = "md" }) {
7088
7104
  cursor: n ? "not-allowed" : "pointer",
7089
7105
  transition: "background var(--lucent-duration-fast)"
7090
7106
  },
7091
- children: /* @__PURE__ */ e("svg", { width: s, height: s, viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e(
7107
+ children: /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: "0 0 16 16", fill: "none", "aria-hidden": !0, children: /* @__PURE__ */ e(
7092
7108
  "path",
7093
7109
  {
7094
7110
  d: t === "prev" ? "M10 12L6 8l4-4" : "M6 4l4 4-4 4",
@@ -7108,58 +7124,58 @@ function We({
7108
7124
  today: o,
7109
7125
  min: a,
7110
7126
  max: i,
7111
- onSelect: l,
7112
- onPrevMonth: s,
7127
+ onSelect: s,
7128
+ onPrevMonth: l,
7113
7129
  onNextMonth: c,
7114
- highlightRange: p,
7130
+ highlightRange: u,
7115
7131
  onDayHover: f,
7116
- size: u = "md"
7132
+ size: p = "md"
7117
7133
  }) {
7118
- const k = gr(t, r), x = vr(t, r), [m, h] = z(null), d = [
7119
- ...Array(x).fill(null),
7120
- ...Array.from({ length: k }, (b, w) => w + 1)
7134
+ const w = gr(t, r), y = vr(t, r), [m, h] = z(null), d = [
7135
+ ...Array(y).fill(null),
7136
+ ...Array.from({ length: w }, (b, x) => x + 1)
7121
7137
  ];
7122
7138
  for (; d.length % 7 !== 0; ) d.push(null);
7123
7139
  return /* @__PURE__ */ g("div", { children: [
7124
7140
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "var(--lucent-space-3)" }, children: [
7125
- /* @__PURE__ */ e(it, { dir: "prev", onClick: s, size: u }),
7126
- /* @__PURE__ */ g(V, { weight: "medium", size: Ir[u], children: [
7141
+ /* @__PURE__ */ e(it, { dir: "prev", onClick: l, size: p }),
7142
+ /* @__PURE__ */ g(V, { weight: "medium", size: Ir[p], children: [
7127
7143
  br[r],
7128
7144
  " ",
7129
7145
  t
7130
7146
  ] }),
7131
- /* @__PURE__ */ e(it, { dir: "next", onClick: c, size: u })
7147
+ /* @__PURE__ */ e(it, { dir: "next", onClick: c, size: p })
7132
7148
  ] }),
7133
- /* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children: yr.map((b) => /* @__PURE__ */ e("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ e(V, { size: Mr[u], color: "secondary", children: b }) }, b)) }),
7134
- /* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: d.map((b, w) => {
7135
- if (!b) return /* @__PURE__ */ e("div", {}, w);
7136
- const y = new Date(t, r, b), S = n ? Se(y, n) : !1, C = Se(y, o), v = (a ? Te(y, a) : !1) || (i ? ot(y, i) : !1);
7137
- let q = !1;
7138
- return p != null && p.start && (p != null && p.end) && (q = !Te(y, p.start) && !ot(y, p.end)), /* @__PURE__ */ e(
7149
+ /* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2, marginBottom: "var(--lucent-space-1)" }, children: yr.map((b) => /* @__PURE__ */ e("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ e(V, { size: Mr[p], color: "secondary", children: b }) }, b)) }),
7150
+ /* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)", gap: 2 }, children: d.map((b, x) => {
7151
+ if (!b) return /* @__PURE__ */ e("div", {}, x);
7152
+ const k = new Date(t, r, b), S = n ? Se(k, n) : !1, C = Se(k, o), v = (a ? Te(k, a) : !1) || (i ? ot(k, i) : !1);
7153
+ let E = !1;
7154
+ return u != null && u.start && (u != null && u.end) && (E = !Te(k, u.start) && !ot(k, u.end)), /* @__PURE__ */ e(
7139
7155
  "button",
7140
7156
  {
7141
7157
  type: "button",
7142
7158
  disabled: v,
7143
- onClick: () => !v && l(y),
7159
+ onClick: () => !v && s(k),
7144
7160
  onMouseEnter: () => {
7145
- h(b), f == null || f(y);
7161
+ h(b), f == null || f(k);
7146
7162
  },
7147
7163
  onMouseLeave: () => {
7148
7164
  h(null), f == null || f(null);
7149
7165
  },
7150
- "aria-label": he(y),
7166
+ "aria-label": he(k),
7151
7167
  "aria-pressed": S,
7152
7168
  style: {
7153
7169
  display: "flex",
7154
7170
  alignItems: "center",
7155
7171
  justifyContent: "center",
7156
- height: Tr[u],
7172
+ height: Tr[p],
7157
7173
  width: "100%",
7158
7174
  border: C && !S ? "1px solid var(--lucent-border-strong)" : "1px solid transparent",
7159
7175
  borderRadius: "var(--lucent-radius-md)",
7160
- background: S ? "var(--lucent-accent-default)" : q ? "var(--lucent-accent-subtle)" : m === b && !v ? "color-mix(in srgb, var(--lucent-accent-default) 14%, transparent)" : "transparent",
7176
+ background: S ? "var(--lucent-accent-default)" : E ? "var(--lucent-accent-subtle)" : m === b && !v ? "color-mix(in srgb, var(--lucent-accent-default) 14%, transparent)" : "transparent",
7161
7177
  color: S ? "var(--lucent-accent-fg)" : v ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
7162
- fontSize: Cr[u],
7178
+ fontSize: Cr[p],
7163
7179
  fontFamily: "var(--lucent-font-family-base)",
7164
7180
  fontWeight: C ? "var(--lucent-font-weight-medium)" : "var(--lucent-font-weight-regular)",
7165
7181
  cursor: v ? "not-allowed" : "pointer",
@@ -7167,7 +7183,7 @@ function We({
7167
7183
  },
7168
7184
  children: b
7169
7185
  },
7170
- w
7186
+ x
7171
7187
  );
7172
7188
  }) })
7173
7189
  ] });
@@ -7179,19 +7195,19 @@ function Go({
7179
7195
  placeholder: o = "Pick a date",
7180
7196
  disabled: a = !1,
7181
7197
  min: i,
7182
- max: l,
7183
- size: s = "md",
7198
+ max: s,
7199
+ size: l = "md",
7184
7200
  label: c,
7185
- helperText: p,
7201
+ helperText: u,
7186
7202
  errorText: f,
7187
- style: u
7203
+ style: p
7188
7204
  }) {
7189
- const k = t !== void 0, [x, m] = z(r), h = k ? t : x, d = !!f, b = a, w = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, y = /* @__PURE__ */ new Date(), [S, C] = z((h ?? y).getFullYear()), [v, q] = z((h ?? y).getMonth()), [T, E] = z(!1), [N, R] = z(!1), I = $(null), P = $(null), [B, G] = z({ top: 0, left: 0 });
7205
+ const w = t !== void 0, [y, m] = z(r), h = w ? t : y, d = !!f, b = a, x = `lucent-datepicker-${Math.random().toString(36).slice(2, 7)}`, k = /* @__PURE__ */ new Date(), [S, C] = z((h ?? k).getFullYear()), [v, E] = z((h ?? k).getMonth()), [T, A] = z(!1), [N, R] = z(!1), I = $(null), P = $(null), [B, G] = z({ top: 0, left: 0 });
7190
7206
  H(() => {
7191
7207
  if (!T) return;
7192
7208
  const M = (O) => {
7193
7209
  var j, F;
7194
- !((j = I.current) != null && j.contains(O.target)) && !((F = P.current) != null && F.contains(O.target)) && E(!1);
7210
+ !((j = I.current) != null && j.contains(O.target)) && !((F = P.current) != null && F.contains(O.target)) && A(!1);
7195
7211
  };
7196
7212
  return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
7197
7213
  }, [T]), te(() => {
@@ -7200,19 +7216,19 @@ function Go({
7200
7216
  G({ top: M.bottom + 4, left: M.left });
7201
7217
  }, [T]);
7202
7218
  const D = (M) => {
7203
- k || m(M), n == null || n(M), E(!1);
7219
+ w || m(M), n == null || n(M), A(!1);
7204
7220
  }, W = () => {
7205
- v === 0 ? (q(11), C((M) => M - 1)) : q((M) => M - 1);
7221
+ v === 0 ? (E(11), C((M) => M - 1)) : E((M) => M - 1);
7206
7222
  }, _ = () => {
7207
- v === 11 ? (q(0), C((M) => M + 1)) : q((M) => M + 1);
7208
- }, A = b ? "transparent" : d ? "var(--lucent-danger-default)" : N ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", L = N ? `0 0 0 3px ${d ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
7209
- return /* @__PURE__ */ g("div", { ref: I, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...u }, children: [
7223
+ v === 11 ? (E(0), C((M) => M + 1)) : E((M) => M + 1);
7224
+ }, q = b ? "transparent" : d ? "var(--lucent-danger-default)" : N ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", L = N ? `0 0 0 3px ${d ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
7225
+ return /* @__PURE__ */ g("div", { ref: I, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...p }, children: [
7210
7226
  c && /* @__PURE__ */ e(
7211
7227
  "label",
7212
7228
  {
7213
- htmlFor: w,
7229
+ htmlFor: x,
7214
7230
  style: {
7215
- fontSize: qe[s],
7231
+ fontSize: qe[l],
7216
7232
  fontWeight: "var(--lucent-font-weight-medium)",
7217
7233
  color: b ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
7218
7234
  fontFamily: "var(--lucent-font-family-base)"
@@ -7224,9 +7240,9 @@ function Go({
7224
7240
  "button",
7225
7241
  {
7226
7242
  type: "button",
7227
- id: w,
7243
+ id: x,
7228
7244
  disabled: a,
7229
- onClick: () => !a && E((M) => !M),
7245
+ onClick: () => !a && A((M) => !M),
7230
7246
  onFocus: () => R(!0),
7231
7247
  onBlur: () => R(!1),
7232
7248
  "aria-haspopup": "dialog",
@@ -7235,18 +7251,18 @@ function Go({
7235
7251
  style: {
7236
7252
  display: "flex",
7237
7253
  alignItems: "center",
7238
- gap: Sr[s],
7254
+ gap: Sr[l],
7239
7255
  width: "100%",
7240
- height: xr[s],
7256
+ height: xr[l],
7241
7257
  boxSizing: "border-box",
7242
- padding: `0 ${kr[s]}`,
7258
+ padding: `0 ${kr[l]}`,
7243
7259
  borderRadius: "var(--lucent-radius-lg)",
7244
- border: `1px solid ${A}`,
7260
+ border: `1px solid ${q}`,
7245
7261
  boxShadow: L,
7246
7262
  background: b ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
7247
7263
  color: h ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
7248
7264
  fontFamily: "var(--lucent-font-family-base)",
7249
- fontSize: wr[s],
7265
+ fontSize: wr[l],
7250
7266
  cursor: b ? "not-allowed" : "pointer",
7251
7267
  outline: "none",
7252
7268
  transition: [
@@ -7269,22 +7285,22 @@ function Go({
7269
7285
  {
7270
7286
  role: "alert",
7271
7287
  style: {
7272
- fontSize: qe[s],
7288
+ fontSize: qe[l],
7273
7289
  color: "var(--lucent-danger-text)",
7274
7290
  fontFamily: "var(--lucent-font-family-base)"
7275
7291
  },
7276
7292
  children: f
7277
7293
  }
7278
7294
  ),
7279
- !d && p && /* @__PURE__ */ e(
7295
+ !d && u && /* @__PURE__ */ e(
7280
7296
  "span",
7281
7297
  {
7282
7298
  style: {
7283
- fontSize: qe[s],
7299
+ fontSize: qe[l],
7284
7300
  color: "var(--lucent-text-secondary)",
7285
7301
  fontFamily: "var(--lucent-font-family-base)"
7286
7302
  },
7287
- children: p
7303
+ children: u
7288
7304
  }
7289
7305
  ),
7290
7306
  T && ae(
@@ -7305,8 +7321,8 @@ function Go({
7305
7321
  border: "1px solid color-mix(in srgb, var(--lucent-accent-default) 15%, var(--lucent-border-default))",
7306
7322
  borderRadius: "var(--lucent-radius-lg)",
7307
7323
  boxShadow: "0 0 24px -4px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), var(--lucent-shadow-md)",
7308
- padding: vt[s],
7309
- minWidth: $e[s]
7324
+ padding: vt[l],
7325
+ minWidth: $e[l]
7310
7326
  },
7311
7327
  children: /* @__PURE__ */ e(
7312
7328
  We,
@@ -7314,13 +7330,13 @@ function Go({
7314
7330
  year: S,
7315
7331
  month: v,
7316
7332
  ...h !== void 0 && { selected: h },
7317
- today: y,
7333
+ today: k,
7318
7334
  ...i !== void 0 && { min: i },
7319
- ...l !== void 0 && { max: l },
7335
+ ...s !== void 0 && { max: s },
7320
7336
  onSelect: D,
7321
7337
  onPrevMonth: W,
7322
7338
  onNextMonth: _,
7323
- size: s
7339
+ size: l
7324
7340
  }
7325
7341
  )
7326
7342
  }
@@ -7467,25 +7483,25 @@ function Lr({
7467
7483
  placeholder: o = "Pick a date range",
7468
7484
  disabled: a = !1,
7469
7485
  min: i,
7470
- max: l,
7471
- size: s = "md",
7486
+ max: s,
7487
+ size: l = "md",
7472
7488
  label: c,
7473
- helperText: p,
7489
+ helperText: u,
7474
7490
  errorText: f,
7475
- trigger: u,
7476
- style: k
7491
+ trigger: p,
7492
+ style: w
7477
7493
  }) {
7478
- const x = t !== void 0, [m, h] = z(r), d = x ? t : m, b = !!f, w = a, y = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [S, C] = z(null), [v, q] = z(null), T = /* @__PURE__ */ new Date(), [E, N] = z(((d == null ? void 0 : d.start) ?? T).getFullYear()), [R, I] = z(((d == null ? void 0 : d.start) ?? T).getMonth()), P = R === 11 ? 0 : R + 1, B = R === 11 ? E + 1 : E, [G, D] = z(!1), [W, _] = z(!1), A = $(null), L = $(null), [M, O] = z({ top: 0, left: 0 });
7494
+ const y = t !== void 0, [m, h] = z(r), d = y ? t : m, b = !!f, x = a, k = `lucent-daterangepicker-${Math.random().toString(36).slice(2, 7)}`, [S, C] = z(null), [v, E] = z(null), T = /* @__PURE__ */ new Date(), [A, N] = z(((d == null ? void 0 : d.start) ?? T).getFullYear()), [R, I] = z(((d == null ? void 0 : d.start) ?? T).getMonth()), P = R === 11 ? 0 : R + 1, B = R === 11 ? A + 1 : A, [G, D] = z(!1), [W, _] = z(!1), q = $(null), L = $(null), [M, O] = z({ top: 0, left: 0 });
7479
7495
  H(() => {
7480
7496
  if (!G) return;
7481
7497
  const U = (ie) => {
7482
7498
  var ge, de;
7483
- !((ge = A.current) != null && ge.contains(ie.target)) && !((de = L.current) != null && de.contains(ie.target)) && (D(!1), C(null));
7499
+ !((ge = q.current) != null && ge.contains(ie.target)) && !((de = L.current) != null && de.contains(ie.target)) && (D(!1), C(null));
7484
7500
  };
7485
7501
  return document.addEventListener("mousedown", U), () => document.removeEventListener("mousedown", U);
7486
7502
  }, [G]), te(() => {
7487
- if (!G || !A.current) return;
7488
- const U = A.current.getBoundingClientRect();
7503
+ if (!G || !q.current) return;
7504
+ const U = q.current.getBoundingClientRect();
7489
7505
  O({ top: U.bottom + 4, left: U.left });
7490
7506
  }, [G]);
7491
7507
  const j = (U) => {
@@ -7493,7 +7509,7 @@ function Lr({
7493
7509
  C(U);
7494
7510
  else {
7495
7511
  const [ie, ge] = Te(U, S) || Se(U, S) ? [U, S] : [S, U], de = { start: ie, end: ge };
7496
- x || h(de), n == null || n(de), C(null), D(!1);
7512
+ y || h(de), n == null || n(de), C(null), D(!1);
7497
7513
  }
7498
7514
  }, F = () => {
7499
7515
  R === 0 ? (I(11), N((U) => U - 1)) : I((U) => U - 1);
@@ -7505,35 +7521,35 @@ function Lr({
7505
7521
  const [U, ie] = Te(v, S) ? [v, S] : [S, v];
7506
7522
  K = { start: U, end: ie };
7507
7523
  } else S ? K = { start: S, end: S } : d && (K = { start: d.start, end: d.end });
7508
- const oe = w ? "transparent" : b ? "var(--lucent-danger-default)" : W ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", ne = W ? `0 0 0 3px ${b ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
7509
- return /* @__PURE__ */ g("div", { ref: A, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...k }, children: [
7524
+ const oe = x ? "transparent" : b ? "var(--lucent-danger-default)" : W ? "var(--lucent-accent-border)" : "var(--lucent-border-default)", ne = W ? `0 0 0 3px ${b ? "var(--lucent-danger-subtle)" : "var(--lucent-accent-subtle)"}` : "none";
7525
+ return /* @__PURE__ */ g("div", { ref: q, style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)", ...w }, children: [
7510
7526
  c && /* @__PURE__ */ e(
7511
7527
  "label",
7512
7528
  {
7513
- htmlFor: y,
7529
+ htmlFor: k,
7514
7530
  style: {
7515
- fontSize: De[s],
7531
+ fontSize: De[l],
7516
7532
  fontWeight: "var(--lucent-font-weight-medium)",
7517
- color: w ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
7533
+ color: x ? "var(--lucent-text-disabled)" : "var(--lucent-text-primary)",
7518
7534
  fontFamily: "var(--lucent-font-family-base)"
7519
7535
  },
7520
7536
  children: c
7521
7537
  }
7522
7538
  ),
7523
- u ? /* @__PURE__ */ e(
7539
+ p ? /* @__PURE__ */ e(
7524
7540
  "span",
7525
7541
  {
7526
7542
  onClick: () => !a && D((U) => !U),
7527
7543
  "aria-haspopup": "dialog",
7528
7544
  "aria-expanded": G,
7529
7545
  style: { display: "inline-flex", cursor: a ? "not-allowed" : "pointer" },
7530
- children: u
7546
+ children: p
7531
7547
  }
7532
7548
  ) : /* @__PURE__ */ g(
7533
7549
  "button",
7534
7550
  {
7535
7551
  type: "button",
7536
- id: y,
7552
+ id: k,
7537
7553
  disabled: a,
7538
7554
  onClick: () => !a && D((U) => !U),
7539
7555
  onFocus: () => _(!0),
@@ -7544,19 +7560,19 @@ function Lr({
7544
7560
  style: {
7545
7561
  display: "flex",
7546
7562
  alignItems: "center",
7547
- gap: Br[s],
7563
+ gap: Br[l],
7548
7564
  width: "100%",
7549
- height: Ar[s],
7565
+ height: Ar[l],
7550
7566
  boxSizing: "border-box",
7551
- padding: `0 ${Dr[s]}`,
7567
+ padding: `0 ${Dr[l]}`,
7552
7568
  borderRadius: "var(--lucent-radius-lg)",
7553
7569
  border: `1px solid ${oe}`,
7554
7570
  boxShadow: ne,
7555
- background: w ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
7571
+ background: x ? "color-mix(in srgb, var(--lucent-text-primary) 6%, transparent)" : "var(--lucent-surface)",
7556
7572
  color: d ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
7557
7573
  fontFamily: "var(--lucent-font-family-base)",
7558
- fontSize: qr[s],
7559
- cursor: w ? "not-allowed" : "pointer",
7574
+ fontSize: qr[l],
7575
+ cursor: x ? "not-allowed" : "pointer",
7560
7576
  outline: "none",
7561
7577
  transition: [
7562
7578
  "border-color var(--lucent-duration-fast) var(--lucent-easing-default)",
@@ -7578,22 +7594,22 @@ function Lr({
7578
7594
  {
7579
7595
  role: "alert",
7580
7596
  style: {
7581
- fontSize: De[s],
7597
+ fontSize: De[l],
7582
7598
  color: "var(--lucent-danger-text)",
7583
7599
  fontFamily: "var(--lucent-font-family-base)"
7584
7600
  },
7585
7601
  children: f
7586
7602
  }
7587
7603
  ),
7588
- !b && p && /* @__PURE__ */ e(
7604
+ !b && u && /* @__PURE__ */ e(
7589
7605
  "span",
7590
7606
  {
7591
7607
  style: {
7592
- fontSize: De[s],
7608
+ fontSize: De[l],
7593
7609
  color: "var(--lucent-text-secondary)",
7594
7610
  fontFamily: "var(--lucent-font-family-base)"
7595
7611
  },
7596
- children: p
7612
+ children: u
7597
7613
  }
7598
7614
  ),
7599
7615
  G && ae(
@@ -7614,30 +7630,30 @@ function Lr({
7614
7630
  border: "1px solid color-mix(in srgb, var(--lucent-accent-default) 15%, var(--lucent-border-default))",
7615
7631
  borderRadius: "var(--lucent-radius-lg)",
7616
7632
  boxShadow: "0 0 24px -4px color-mix(in srgb, var(--lucent-accent-default) 12%, transparent), var(--lucent-shadow-md)",
7617
- padding: vt[s],
7633
+ padding: vt[l],
7618
7634
  display: "flex",
7619
7635
  gap: "var(--lucent-space-6)"
7620
7636
  },
7621
7637
  children: [
7622
- /* @__PURE__ */ e("div", { style: { minWidth: $e[s] }, children: /* @__PURE__ */ e(
7638
+ /* @__PURE__ */ e("div", { style: { minWidth: $e[l] }, children: /* @__PURE__ */ e(
7623
7639
  We,
7624
7640
  {
7625
- year: E,
7641
+ year: A,
7626
7642
  month: R,
7627
7643
  ...(d == null ? void 0 : d.start) !== void 0 && { selected: d.start },
7628
7644
  today: T,
7629
7645
  ...i !== void 0 && { min: i },
7630
- ...l !== void 0 && { max: l },
7646
+ ...s !== void 0 && { max: s },
7631
7647
  onSelect: j,
7632
7648
  onPrevMonth: F,
7633
7649
  onNextMonth: Y,
7634
7650
  ...K !== void 0 && { highlightRange: K },
7635
- ...S && { onDayHover: q },
7636
- size: s
7651
+ ...S && { onDayHover: E },
7652
+ size: l
7637
7653
  }
7638
7654
  ) }),
7639
7655
  /* @__PURE__ */ e("div", { style: { width: 1, background: "var(--lucent-border-subtle)", flexShrink: 0 } }),
7640
- /* @__PURE__ */ e("div", { style: { minWidth: $e[s] }, children: /* @__PURE__ */ e(
7656
+ /* @__PURE__ */ e("div", { style: { minWidth: $e[l] }, children: /* @__PURE__ */ e(
7641
7657
  We,
7642
7658
  {
7643
7659
  year: B,
@@ -7645,13 +7661,13 @@ function Lr({
7645
7661
  ...(d == null ? void 0 : d.end) !== void 0 && { selected: d.end },
7646
7662
  today: T,
7647
7663
  ...i !== void 0 && { min: i },
7648
- ...l !== void 0 && { max: l },
7664
+ ...s !== void 0 && { max: s },
7649
7665
  onSelect: j,
7650
7666
  onPrevMonth: F,
7651
7667
  onNextMonth: Y,
7652
7668
  ...K !== void 0 && { highlightRange: K },
7653
- ...S && { onDayHover: q },
7654
- size: s
7669
+ ...S && { onDayHover: E },
7670
+ size: l
7655
7671
  }
7656
7672
  ) })
7657
7673
  ]
@@ -7850,42 +7866,42 @@ function _o({
7850
7866
  value: o,
7851
7867
  onChange: a,
7852
7868
  onError: i,
7853
- disabled: l = !1,
7854
- style: s
7869
+ disabled: s = !1,
7870
+ style: l
7855
7871
  }) {
7856
- const c = o !== void 0, [p, f] = z([]), u = c ? o : p, [k, x] = z(!1), [m, h] = z(!1), d = $(null), b = J((C) => {
7857
- if (!C || l) return;
7872
+ const c = o !== void 0, [u, f] = z([]), p = c ? o : u, [w, y] = z(!1), [m, h] = z(!1), d = $(null), b = J((C) => {
7873
+ if (!C || s) return;
7858
7874
  const v = [];
7859
7875
  for (const T of Array.from(C)) {
7860
7876
  if (n && T.size > n) {
7861
7877
  i == null || i(`"${T.name}" exceeds the ${Oe(n)} limit.`);
7862
7878
  continue;
7863
7879
  }
7864
- if (!r && u.length + v.length >= 1) break;
7880
+ if (!r && p.length + v.length >= 1) break;
7865
7881
  v.push({ id: Pr(), file: T });
7866
7882
  }
7867
7883
  if (v.length === 0) return;
7868
- const q = r ? [...u, ...v] : v;
7869
- c || f(q), a == null || a(q);
7870
- }, [l, u, c, n, r, a, i]), w = (C) => {
7871
- const v = u.filter((q) => q.id !== C);
7884
+ const E = r ? [...p, ...v] : v;
7885
+ c || f(E), a == null || a(E);
7886
+ }, [s, p, c, n, r, a, i]), x = (C) => {
7887
+ const v = p.filter((E) => E.id !== C);
7872
7888
  c || f(v), a == null || a(v);
7873
- }, y = (C) => {
7874
- C.preventDefault(), x(!1), b(C.dataTransfer.files);
7889
+ }, k = (C) => {
7890
+ C.preventDefault(), y(!1), b(C.dataTransfer.files);
7875
7891
  }, S = (C) => {
7876
7892
  b(C.target.files), C.target.value = "";
7877
7893
  };
7878
- return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...s }, children: [
7894
+ return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-3)", ...l }, children: [
7879
7895
  /* @__PURE__ */ g(
7880
7896
  "div",
7881
7897
  {
7882
7898
  role: "button",
7883
- tabIndex: l ? -1 : 0,
7899
+ tabIndex: s ? -1 : 0,
7884
7900
  "aria-label": "Upload files",
7885
- "aria-disabled": l,
7901
+ "aria-disabled": s,
7886
7902
  onClick: () => {
7887
7903
  var C;
7888
- return !l && ((C = d.current) == null ? void 0 : C.click());
7904
+ return !s && ((C = d.current) == null ? void 0 : C.click());
7889
7905
  },
7890
7906
  onKeyDown: (C) => {
7891
7907
  var v;
@@ -7894,10 +7910,10 @@ function _o({
7894
7910
  onFocus: () => h(!0),
7895
7911
  onBlur: () => h(!1),
7896
7912
  onDragOver: (C) => {
7897
- C.preventDefault(), l || x(!0);
7913
+ C.preventDefault(), s || y(!0);
7898
7914
  },
7899
- onDragLeave: () => x(!1),
7900
- onDrop: y,
7915
+ onDragLeave: () => y(!1),
7916
+ onDrop: k,
7901
7917
  style: {
7902
7918
  display: "flex",
7903
7919
  flexDirection: "column",
@@ -7906,9 +7922,9 @@ function _o({
7906
7922
  gap: "var(--lucent-space-2)",
7907
7923
  padding: "var(--lucent-space-8) var(--lucent-space-6)",
7908
7924
  borderRadius: "var(--lucent-radius-lg)",
7909
- border: `2px dashed ${l ? "var(--lucent-border-default)" : k || m ? "var(--lucent-accent-default)" : "var(--lucent-border-default)"}`,
7910
- background: k ? "var(--lucent-accent-subtle)" : "var(--lucent-surface-secondary)",
7911
- cursor: l ? "not-allowed" : "pointer",
7925
+ border: `2px dashed ${s ? "var(--lucent-border-default)" : w || m ? "var(--lucent-accent-default)" : "var(--lucent-border-default)"}`,
7926
+ background: w ? "var(--lucent-accent-subtle)" : "var(--lucent-surface-secondary)",
7927
+ cursor: s ? "not-allowed" : "pointer",
7912
7928
  transition: "border-color var(--lucent-duration-fast), background var(--lucent-duration-fast)",
7913
7929
  outline: "none"
7914
7930
  },
@@ -7921,7 +7937,7 @@ function _o({
7921
7937
  viewBox: "0 0 32 32",
7922
7938
  fill: "none",
7923
7939
  "aria-hidden": !0,
7924
- style: { color: l ? "var(--lucent-text-disabled)" : k ? "var(--lucent-accent-default)" : "var(--lucent-text-secondary)" },
7940
+ style: { color: s ? "var(--lucent-text-disabled)" : w ? "var(--lucent-accent-default)" : "var(--lucent-text-secondary)" },
7925
7941
  children: [
7926
7942
  /* @__PURE__ */ e("path", { d: "M16 20V10M16 10l-4 4M16 10l4 4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }),
7927
7943
  /* @__PURE__ */ e("path", { d: "M8 24h16", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })
@@ -7929,7 +7945,7 @@ function _o({
7929
7945
  }
7930
7946
  ),
7931
7947
  /* @__PURE__ */ g("div", { style: { textAlign: "center", width: "100%" }, children: [
7932
- /* @__PURE__ */ e(V, { color: l ? "disabled" : "primary", weight: "medium", align: "center", children: k ? "Drop to upload" : "Drop files here or click to browse" }),
7948
+ /* @__PURE__ */ e(V, { color: s ? "disabled" : "primary", weight: "medium", align: "center", children: w ? "Drop to upload" : "Drop files here or click to browse" }),
7933
7949
  (t || n) && /* @__PURE__ */ e(V, { size: "xs", color: "secondary", align: "center", children: [
7934
7950
  t && `Accepted: ${t}`,
7935
7951
  n && `Max size: ${Oe(n)}`
@@ -7942,7 +7958,7 @@ function _o({
7942
7958
  type: "file",
7943
7959
  accept: t,
7944
7960
  multiple: r,
7945
- disabled: l,
7961
+ disabled: s,
7946
7962
  onChange: S,
7947
7963
  style: { display: "none" },
7948
7964
  tabIndex: -1
@@ -7951,7 +7967,7 @@ function _o({
7951
7967
  ]
7952
7968
  }
7953
7969
  ),
7954
- u.length > 0 && /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: u.map((C) => /* @__PURE__ */ e(Fr, { item: C, onRemove: w }, C.id)) })
7970
+ p.length > 0 && /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: "var(--lucent-space-2)" }, children: p.map((C) => /* @__PURE__ */ e(Fr, { item: C, onRemove: x }, C.id)) })
7955
7971
  ] });
7956
7972
  }
7957
7973
  const Yo = {
@@ -8078,7 +8094,7 @@ function Ko({ items: t, style: r }) {
8078
8094
  ...r
8079
8095
  },
8080
8096
  children: t.map((n, o) => {
8081
- const a = n.status ?? "default", i = Nr[a], l = o === t.length - 1;
8097
+ const a = n.status ?? "default", i = Nr[a], s = o === t.length - 1;
8082
8098
  return /* @__PURE__ */ g(
8083
8099
  "li",
8084
8100
  {
@@ -8106,7 +8122,7 @@ function Ko({ items: t, style: r }) {
8106
8122
  flexShrink: 0,
8107
8123
  zIndex: 1
8108
8124
  }, children: n.icon ?? /* @__PURE__ */ e($r, { status: a }) }),
8109
- !l && /* @__PURE__ */ e("div", { style: {
8125
+ !s && /* @__PURE__ */ e("div", { style: {
8110
8126
  flex: 1,
8111
8127
  width: 1.5,
8112
8128
  background: "var(--lucent-border-subtle)",
@@ -8115,7 +8131,7 @@ function Ko({ items: t, style: r }) {
8115
8131
  ] }),
8116
8132
  /* @__PURE__ */ g("div", { style: {
8117
8133
  flex: 1,
8118
- paddingBottom: l ? 0 : "var(--lucent-space-5)",
8134
+ paddingBottom: s ? 0 : "var(--lucent-space-5)",
8119
8135
  paddingTop: 1,
8120
8136
  minWidth: 0
8121
8137
  }, children: [
@@ -8240,7 +8256,7 @@ function yt(t) {
8240
8256
  }
8241
8257
  const Kr = 200, Xr = 8, Jr = 0.04, Zr = 0.2, Qr = 3, ea = 356;
8242
8258
  function st({ entry: t, onDismiss: r, hideContent: n, fixedHeight: o }) {
8243
- const { id: a, title: i, description: l, variant: s, action: c, icon: p } = t, f = jr[s], u = p ?? (s !== "default" ? Ur[s] : null), k = (c == null ? void 0 : c.style) ?? "button";
8259
+ const { id: a, title: i, description: s, variant: l, action: c, icon: u } = t, f = jr[l], p = u ?? (l !== "default" ? Ur[l] : null), w = (c == null ? void 0 : c.style) ?? "button";
8244
8260
  return /* @__PURE__ */ e(
8245
8261
  "div",
8246
8262
  {
@@ -8272,15 +8288,15 @@ function st({ entry: t, onDismiss: r, hideContent: n, fixedHeight: o }) {
8272
8288
  transition: "opacity var(--lucent-duration-base) var(--lucent-easing-default)"
8273
8289
  },
8274
8290
  children: [
8275
- u && /* @__PURE__ */ e("span", { style: { flexShrink: 0, color: f.iconColor, display: "flex", alignItems: "center" }, children: u }),
8291
+ p && /* @__PURE__ */ e("span", { style: { flexShrink: 0, color: f.iconColor, display: "flex", alignItems: "center" }, children: p }),
8276
8292
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "var(--lucent-space-1)" }, children: [
8277
8293
  /* @__PURE__ */ e(V, { as: "span", size: "sm", weight: "semibold", color: "primary", lineHeight: "tight", children: i }),
8278
- l && /* @__PURE__ */ e(V, { as: "span", size: "sm", color: "secondary", lineHeight: "base", style: { whiteSpace: "pre-line" }, children: l })
8294
+ s && /* @__PURE__ */ e(V, { as: "span", size: "sm", color: "secondary", lineHeight: "base", style: { whiteSpace: "pre-line" }, children: s })
8279
8295
  ] }),
8280
- c && k === "button" && /* @__PURE__ */ e(ta, { label: c.label, onClick: () => {
8296
+ c && w === "button" && /* @__PURE__ */ e(ta, { label: c.label, onClick: () => {
8281
8297
  c.onClick(), r(a);
8282
8298
  } }),
8283
- c && k === "link" && /* @__PURE__ */ e(na, { label: c.label, iconColor: f.iconColor, onClick: () => {
8299
+ c && w === "link" && /* @__PURE__ */ e(na, { label: c.label, iconColor: f.iconColor, onClick: () => {
8284
8300
  c.onClick(), r(a);
8285
8301
  } }),
8286
8302
  /* @__PURE__ */ e(
@@ -8301,11 +8317,11 @@ function st({ entry: t, onDismiss: r, hideContent: n, fixedHeight: o }) {
8301
8317
  color: "var(--lucent-text-secondary)",
8302
8318
  opacity: n ? 0 : 0.6
8303
8319
  },
8304
- onMouseEnter: (x) => {
8305
- n || (x.currentTarget.style.opacity = "1");
8320
+ onMouseEnter: (y) => {
8321
+ n || (y.currentTarget.style.opacity = "1");
8306
8322
  },
8307
- onMouseLeave: (x) => {
8308
- n || (x.currentTarget.style.opacity = "0.6");
8323
+ onMouseLeave: (y) => {
8324
+ n || (y.currentTarget.style.opacity = "0.6");
8309
8325
  },
8310
8326
  children: /* @__PURE__ */ e(Gr, {})
8311
8327
  }
@@ -8382,56 +8398,56 @@ function oa(t) {
8382
8398
  return yt(t) ? r.top = ra : r.top = `calc(100vh - ${aa}px)`, t.endsWith("left") ? r.left = lt : t.endsWith("right") ? r.right = lt : (r.left = "50%", r.transform = "translateX(-50%)"), r;
8383
8399
  }
8384
8400
  function ia({ toasts: t, position: r, onDismiss: n, portalContainer: o }) {
8385
- const [a, i] = z(!1), [l, s] = z(void 0), c = J((d) => {
8386
- d && s(d.offsetHeight);
8387
- }, []), p = yt(r), f = t.filter((d) => d.phase !== "exiting"), u = t.filter((d) => d.phase === "exiting");
8401
+ const [a, i] = z(!1), [s, l] = z(void 0), c = J((d) => {
8402
+ d && l(d.offsetHeight);
8403
+ }, []), u = yt(r), f = t.filter((d) => d.phase !== "exiting"), p = t.filter((d) => d.phase === "exiting");
8388
8404
  H(() => {
8389
8405
  f.length <= 1 && i(!1);
8390
8406
  }, [f.length]);
8391
- const k = $(null), x = J(() => {
8392
- k.current && (clearTimeout(k.current), k.current = null), f.length > 1 && i(!0);
8407
+ const w = $(null), y = J(() => {
8408
+ w.current && (clearTimeout(w.current), w.current = null), f.length > 1 && i(!0);
8393
8409
  }, [f.length]), m = J(() => {
8394
- k.current = setTimeout(() => {
8395
- i(!1), k.current = null;
8410
+ w.current = setTimeout(() => {
8411
+ i(!1), w.current = null;
8396
8412
  }, 150);
8397
8413
  }, []), h = /* @__PURE__ */ e("div", { style: oa(r), children: /* @__PURE__ */ e(
8398
8414
  "div",
8399
8415
  {
8400
- onMouseEnter: x,
8416
+ onMouseEnter: y,
8401
8417
  onMouseLeave: m,
8402
8418
  style: { margin: "calc(-1 * var(--lucent-space-2))", padding: "var(--lucent-space-2)" },
8403
8419
  children: /* @__PURE__ */ g("div", { style: {
8404
8420
  position: "relative",
8405
8421
  display: "flex",
8406
- flexDirection: p ? "column-reverse" : "column",
8422
+ flexDirection: u ? "column-reverse" : "column",
8407
8423
  gap: a ? "var(--lucent-space-2)" : 0,
8408
- transform: a && !p ? "translateY(-100%)" : void 0,
8409
- marginTop: a && !p ? l ?? 0 : 0,
8424
+ transform: a && !u ? "translateY(-100%)" : void 0,
8425
+ marginTop: a && !u ? s ?? 0 : 0,
8410
8426
  transition: "transform var(--lucent-duration-base) var(--lucent-easing-emphasized), margin var(--lucent-duration-base) var(--lucent-easing-emphasized), gap var(--lucent-duration-base) var(--lucent-easing-emphasized)"
8411
8427
  }, children: [
8412
8428
  f.map((d, b) => {
8413
- const w = f.length - 1 - b, y = !a && w > Qr, S = w * Xr, C = p ? S : -S, v = a ? 1 : 1 - w * Jr, q = a ? 1 : Math.max(0, 1 - w * Zr), T = d.phase === "entering", E = w === 0, N = !a && !E;
8429
+ const x = f.length - 1 - b, k = !a && x > Qr, S = x * Xr, C = u ? S : -S, v = a ? 1 : 1 - x * Jr, E = a ? 1 : Math.max(0, 1 - x * Zr), T = d.phase === "entering", A = x === 0, N = !a && !A;
8414
8430
  return /* @__PURE__ */ e(
8415
8431
  "div",
8416
8432
  {
8417
- ref: E ? c : void 0,
8433
+ ref: A ? c : void 0,
8418
8434
  role: "status",
8419
8435
  "aria-live": "polite",
8420
- "aria-hidden": y,
8436
+ "aria-hidden": k,
8421
8437
  style: {
8422
8438
  // Front toast is relative (sets container height).
8423
8439
  // Stacked toasts overlap via absolute + top: 0.
8424
- position: E || a ? "relative" : "absolute",
8440
+ position: A || a ? "relative" : "absolute",
8425
8441
  // Bottom positions: anchor at top:0 (peek above front toast)
8426
8442
  // Top positions: anchor at bottom:0 (peek below front toast)
8427
- ...!a && !E && (p ? { bottom: 0 } : { top: 0 }),
8428
- zIndex: 100 - w,
8429
- transform: T ? `translateY(${p ? "-20px" : "20px"}) scale(0.96)` : a ? void 0 : `translateY(${C}px) scaleX(${v})`,
8430
- opacity: T || d.phase === "exiting" ? 0 : q,
8431
- transformOrigin: p ? "bottom center" : "top center",
8443
+ ...!a && !A && (u ? { bottom: 0 } : { top: 0 }),
8444
+ zIndex: 100 - x,
8445
+ transform: T ? `translateY(${u ? "-20px" : "20px"}) scale(0.96)` : a ? void 0 : `translateY(${C}px) scaleX(${v})`,
8446
+ opacity: T || d.phase === "exiting" ? 0 : E,
8447
+ transformOrigin: u ? "bottom center" : "top center",
8432
8448
  transition: T ? "none" : "transform var(--lucent-duration-base) var(--lucent-easing-emphasized), opacity var(--lucent-duration-base) var(--lucent-easing-default)",
8433
- pointerEvents: y ? "none" : "auto",
8434
- visibility: y ? "hidden" : "visible"
8449
+ pointerEvents: k ? "none" : "auto",
8450
+ visibility: k ? "hidden" : "visible"
8435
8451
  },
8436
8452
  children: /* @__PURE__ */ e(
8437
8453
  st,
@@ -8439,25 +8455,25 @@ function ia({ toasts: t, position: r, onDismiss: n, portalContainer: o }) {
8439
8455
  entry: d,
8440
8456
  onDismiss: n,
8441
8457
  hideContent: N,
8442
- ...N && l !== void 0 && { fixedHeight: l }
8458
+ ...N && s !== void 0 && { fixedHeight: s }
8443
8459
  }
8444
8460
  )
8445
8461
  },
8446
8462
  d.id
8447
8463
  );
8448
8464
  }),
8449
- u.map((d) => /* @__PURE__ */ e(
8465
+ p.map((d) => /* @__PURE__ */ e(
8450
8466
  "div",
8451
8467
  {
8452
8468
  role: "status",
8453
8469
  "aria-live": "polite",
8454
8470
  style: {
8455
8471
  position: "absolute",
8456
- ...p ? { bottom: 0 } : { top: 0 },
8472
+ ...u ? { bottom: 0 } : { top: 0 },
8457
8473
  zIndex: 200,
8458
- transform: `translateY(${p ? "20px" : "-20px"}) scale(0.96)`,
8474
+ transform: `translateY(${u ? "20px" : "-20px"}) scale(0.96)`,
8459
8475
  opacity: 0,
8460
- transformOrigin: p ? "bottom center" : "top center",
8476
+ transformOrigin: u ? "bottom center" : "top center",
8461
8477
  transition: "transform var(--lucent-duration-base) var(--lucent-easing-default), opacity var(--lucent-duration-base) var(--lucent-easing-default)",
8462
8478
  pointerEvents: "none"
8463
8479
  },
@@ -8477,16 +8493,16 @@ function Zo({
8477
8493
  max: o = 5,
8478
8494
  portalContainer: a
8479
8495
  }) {
8480
- const [i, l] = z([]), s = J((f) => {
8481
- l((u) => {
8482
- const k = u.find((x) => x.id === f);
8483
- return !k || k.phase === "exiting" ? u : u.map((x) => x.id === f ? { ...x, phase: "exiting" } : x);
8496
+ const [i, s] = z([]), l = J((f) => {
8497
+ s((p) => {
8498
+ const w = p.find((y) => y.id === f);
8499
+ return !w || w.phase === "exiting" ? p : p.map((y) => y.id === f ? { ...y, phase: "exiting" } : y);
8484
8500
  }), setTimeout(() => {
8485
- l((u) => u.filter((k) => k.id !== f));
8501
+ s((p) => p.filter((w) => w.id !== f));
8486
8502
  }, Kr);
8487
8503
  }, []), c = J((f) => {
8488
- const u = Yr(), k = {
8489
- id: u,
8504
+ const p = Yr(), w = {
8505
+ id: p,
8490
8506
  title: f.title,
8491
8507
  variant: f.variant ?? "default",
8492
8508
  duration: f.duration ?? n,
@@ -8495,40 +8511,40 @@ function Zo({
8495
8511
  ...f.icon !== void 0 && { icon: f.icon },
8496
8512
  phase: "entering"
8497
8513
  };
8498
- return l((x) => {
8499
- const m = [...x, k], h = m.filter((d) => d.phase !== "exiting");
8514
+ return s((y) => {
8515
+ const m = [...y, w], h = m.filter((d) => d.phase !== "exiting");
8500
8516
  if (h.length > o) {
8501
8517
  const d = h.slice(0, h.length - o);
8502
8518
  for (const b of d)
8503
- setTimeout(() => s(b.id), 0);
8519
+ setTimeout(() => l(b.id), 0);
8504
8520
  }
8505
8521
  return m;
8506
8522
  }), requestAnimationFrame(() => {
8507
8523
  requestAnimationFrame(() => {
8508
- l(
8509
- (x) => x.map((m) => m.id === u && m.phase === "entering" ? { ...m, phase: "visible" } : m)
8524
+ s(
8525
+ (y) => y.map((m) => m.id === p && m.phase === "entering" ? { ...m, phase: "visible" } : m)
8510
8526
  );
8511
8527
  });
8512
- }), u;
8513
- }, [n, o, s]);
8528
+ }), p;
8529
+ }, [n, o, l]);
8514
8530
  H(() => {
8515
8531
  const f = [];
8516
- for (const u of i)
8517
- if (u.phase === "visible" && u.duration !== 1 / 0) {
8518
- const k = setTimeout(() => s(u.id), u.duration);
8519
- f.push(k);
8532
+ for (const p of i)
8533
+ if (p.phase === "visible" && p.duration !== 1 / 0) {
8534
+ const w = setTimeout(() => l(p.id), p.duration);
8535
+ f.push(w);
8520
8536
  }
8521
8537
  return () => f.forEach(clearTimeout);
8522
- }, [i, s]);
8523
- const p = { toast: c, dismiss: s };
8524
- return /* @__PURE__ */ g(bt.Provider, { value: p, children: [
8538
+ }, [i, l]);
8539
+ const u = { toast: c, dismiss: l };
8540
+ return /* @__PURE__ */ g(bt.Provider, { value: u, children: [
8525
8541
  t,
8526
8542
  i.length > 0 && /* @__PURE__ */ e(
8527
8543
  ia,
8528
8544
  {
8529
8545
  toasts: i,
8530
8546
  position: r,
8531
- onDismiss: s,
8547
+ onDismiss: l,
8532
8548
  ...a !== void 0 && { portalContainer: a }
8533
8549
  }
8534
8550
  )
@@ -8793,24 +8809,24 @@ function Ie({
8793
8809
  size: o = "md",
8794
8810
  hasIcons: a = !1,
8795
8811
  style: i,
8796
- "aria-label": l = "Navigation"
8812
+ "aria-label": s = "Navigation"
8797
8813
  }) {
8798
- const s = $(!1);
8799
- if (!s.current && typeof document < "u") {
8814
+ const l = $(!1);
8815
+ if (!l.current && typeof document < "u") {
8800
8816
  const h = document.createElement("style");
8801
- h.textContent = sa, document.head.appendChild(h), s.current = !0;
8817
+ h.textContent = sa, document.head.appendChild(h), l.current = !0;
8802
8818
  }
8803
- const c = Ce[o], p = $(null), f = $(null), u = $(!1), k = $(0), x = J(() => {
8804
- const h = p.current, d = f.current;
8819
+ const c = Ce[o], u = $(null), f = $(null), p = $(!1), w = $(0), y = J(() => {
8820
+ const h = u.current, d = f.current;
8805
8821
  if (!h || !d) return;
8806
- const b = h.querySelector('[data-active="true"]'), w = h.querySelector('[data-active-parent="true"]');
8807
- let y = null, S = !1;
8808
- if (b && !b.closest('[aria-hidden="true"]') ? y = b : w && !w.closest('[aria-hidden="true"]') && (y = w, S = !0), !y) {
8822
+ const b = h.querySelector('[data-active="true"]'), x = h.querySelector('[data-active-parent="true"]');
8823
+ let k = null, S = !1;
8824
+ if (b && !b.closest('[aria-hidden="true"]') ? k = b : x && !x.closest('[aria-hidden="true"]') && (k = x, S = !0), !k) {
8809
8825
  d.style.opacity = "0";
8810
8826
  return;
8811
8827
  }
8812
- const C = h.getBoundingClientRect(), v = y.getBoundingClientRect();
8813
- u.current ? d.style.transition = [
8828
+ const C = h.getBoundingClientRect(), v = k.getBoundingClientRect();
8829
+ p.current ? d.style.transition = [
8814
8830
  `top 150ms ${we}`,
8815
8831
  `left 150ms ${we}`,
8816
8832
  `width 150ms ${we}`,
@@ -8818,12 +8834,12 @@ function Ie({
8818
8834
  "opacity 100ms ease",
8819
8835
  "background 150ms ease",
8820
8836
  "box-shadow 150ms ease"
8821
- ].join(", ") : (d.style.transition = "none", u.current = !0), d.style.top = `${v.top - C.top}px`, d.style.left = `${v.left - C.left}px`, d.style.width = `${v.width}px`, d.style.height = `${v.height}px`, d.style.opacity = "1", S ? (d.style.background = n ? "var(--lucent-surface-secondary)" : "color-mix(in srgb, var(--lucent-accent-default) 12%, transparent)", d.style.boxShadow = "none") : (d.style.background = n ? "var(--lucent-surface)" : "var(--lucent-accent-default)", d.style.boxShadow = n ? "inset -3px 0 0 var(--lucent-accent-default), var(--lucent-shadow-sm)" : "none");
8837
+ ].join(", ") : (d.style.transition = "none", p.current = !0), d.style.top = `${v.top - C.top}px`, d.style.left = `${v.left - C.left}px`, d.style.width = `${v.width}px`, d.style.height = `${v.height}px`, d.style.opacity = "1", S ? (d.style.background = n ? "var(--lucent-surface-secondary)" : "color-mix(in srgb, var(--lucent-accent-default) 12%, transparent)", d.style.boxShadow = "none") : (d.style.background = n ? "var(--lucent-surface)" : "var(--lucent-accent-default)", d.style.boxShadow = n ? "inset -3px 0 0 var(--lucent-accent-default), var(--lucent-shadow-sm)" : "none");
8822
8838
  }, [n]), m = J(() => {
8823
- cancelAnimationFrame(k.current), k.current = requestAnimationFrame(x);
8824
- }, [x]);
8839
+ cancelAnimationFrame(w.current), w.current = requestAnimationFrame(y);
8840
+ }, [y]);
8825
8841
  return H(() => {
8826
- const h = p.current;
8842
+ const h = u.current;
8827
8843
  if (!h) return;
8828
8844
  const d = new MutationObserver(m);
8829
8845
  return d.observe(h, {
@@ -8832,7 +8848,7 @@ function Ie({
8832
8848
  subtree: !0
8833
8849
  }), () => d.disconnect();
8834
8850
  }, [m]), H(() => {
8835
- const h = p.current;
8851
+ const h = u.current;
8836
8852
  if (!h) return;
8837
8853
  const d = new ResizeObserver(m);
8838
8854
  return d.observe(h), () => d.disconnect();
@@ -8843,8 +8859,8 @@ function Ie({
8843
8859
  }, [t, n, o, m]), /* @__PURE__ */ e(re.Provider, { value: { orientation: r, depth: 0, inverse: n, size: o, hasIcons: a, parentHasIcon: !1, requestMeasure: m }, children: /* @__PURE__ */ g(
8844
8860
  "nav",
8845
8861
  {
8846
- ref: p,
8847
- "aria-label": l,
8862
+ ref: u,
8863
+ "aria-label": s,
8848
8864
  style: {
8849
8865
  display: "flex",
8850
8866
  flexDirection: r === "vertical" ? "column" : "row",
@@ -8885,53 +8901,53 @@ function la({
8885
8901
  icon: o,
8886
8902
  badge: a,
8887
8903
  disabled: i = !1,
8888
- onClick: l,
8889
- as: s,
8904
+ onClick: s,
8905
+ as: l,
8890
8906
  style: c
8891
8907
  }) {
8892
- const { orientation: p, depth: f, inverse: u, size: k, parentHasIcon: x, requestMeasure: m } = ee(re), h = Ce[k];
8908
+ const { orientation: u, depth: f, inverse: p, size: w, parentHasIcon: y, requestMeasure: m } = ee(re), h = Ce[w];
8893
8909
  H(() => {
8894
8910
  m();
8895
8911
  }, [n, m]);
8896
8912
  let d = null;
8897
- const b = [], w = Array.isArray(t) ? t : [t];
8898
- for (const S of w)
8913
+ const b = [], x = Array.isArray(t) ? t : [t];
8914
+ for (const S of x)
8899
8915
  S != null && typeof S == "object" && "type" in S && S.type === xt ? d = S : b.push(S);
8900
8916
  return d ? /* @__PURE__ */ e(
8901
8917
  ca,
8902
8918
  {
8903
8919
  subMenu: d,
8904
- orientation: p,
8920
+ orientation: u,
8905
8921
  depth: f,
8906
- inverse: u,
8907
- size: k,
8922
+ inverse: p,
8923
+ size: w,
8908
8924
  isActive: n,
8909
8925
  disabled: i,
8910
8926
  ...o !== void 0 && { icon: o },
8911
8927
  ...a !== void 0 && { badge: a },
8912
- ...l !== void 0 && { onClick: l },
8928
+ ...s !== void 0 && { onClick: s },
8913
8929
  ...c !== void 0 && { style: c },
8914
8930
  children: b
8915
8931
  }
8916
8932
  ) : /* @__PURE__ */ g(
8917
- s ?? "a",
8933
+ l ?? "a",
8918
8934
  {
8919
8935
  "data-lucent-navitem": "",
8920
8936
  "data-active": n || void 0,
8921
8937
  href: i ? void 0 : r,
8922
- onClick: i ? void 0 : l,
8938
+ onClick: i ? void 0 : s,
8923
8939
  "aria-current": n ? "page" : void 0,
8924
8940
  "aria-disabled": i || void 0,
8925
8941
  style: {
8926
8942
  display: "flex",
8927
8943
  alignItems: "center",
8928
8944
  gap: h.gap,
8929
- padding: p === "vertical" ? `${h.paddingY} ${h.paddingX} ${h.paddingY} ${o != null || x ? "var(--lucent-space-2)" : "var(--lucent-space-4)"}` : `${h.paddingY} ${h.paddingX}`,
8945
+ padding: u === "vertical" ? `${h.paddingY} ${h.paddingX} ${h.paddingY} ${o != null || y ? "var(--lucent-space-2)" : "var(--lucent-space-4)"}` : `${h.paddingY} ${h.paddingX}`,
8930
8946
  borderRadius: "var(--lucent-radius-md)",
8931
8947
  background: "transparent",
8932
- color: i ? "var(--lucent-text-disabled)" : n ? u ? "var(--lucent-text-primary)" : "var(--lucent-accent-fg)" : "var(--lucent-text-secondary)",
8948
+ color: i ? "var(--lucent-text-disabled)" : n ? p ? "var(--lucent-text-primary)" : "var(--lucent-accent-fg)" : "var(--lucent-text-secondary)",
8933
8949
  border: 0,
8934
- borderBottom: n && p === "horizontal" ? "2px solid var(--lucent-accent-default)" : p === "horizontal" ? "2px solid transparent" : 0,
8950
+ borderBottom: n && u === "horizontal" ? "2px solid var(--lucent-accent-default)" : u === "horizontal" ? "2px solid transparent" : 0,
8935
8951
  boxShadow: "none",
8936
8952
  fontFamily: "var(--lucent-font-family-base)",
8937
8953
  fontSize: h.fontSize,
@@ -8943,8 +8959,8 @@ function la({
8943
8959
  boxSizing: "border-box",
8944
8960
  position: "relative",
8945
8961
  zIndex: 1,
8946
- whiteSpace: p === "horizontal" ? "nowrap" : void 0,
8947
- width: p === "vertical" ? "100%" : void 0,
8962
+ whiteSpace: u === "horizontal" ? "nowrap" : void 0,
8963
+ width: u === "vertical" ? "100%" : void 0,
8948
8964
  textAlign: "left",
8949
8965
  outline: "none",
8950
8966
  ...c
@@ -8964,29 +8980,29 @@ function ca({
8964
8980
  isActive: o = !1,
8965
8981
  disabled: a = !1,
8966
8982
  onClick: i,
8967
- style: l,
8968
- subMenu: s,
8983
+ style: s,
8984
+ subMenu: l,
8969
8985
  orientation: c,
8970
- depth: p,
8986
+ depth: u,
8971
8987
  inverse: f,
8972
- size: u
8988
+ size: p
8973
8989
  }) {
8974
- const { hasIcons: k, requestMeasure: x } = ee(re), m = Ce[u], [h, d] = z(!1), b = $(null), [w, y] = z(0), S = $(null), C = $(null), v = $(), q = da(s), T = o && !q, E = !T && !h && q, N = o || q;
8990
+ const { hasIcons: w, requestMeasure: y } = ee(re), m = Ce[p], [h, d] = z(!1), b = $(null), [x, k] = z(0), S = $(null), C = $(null), v = $(), E = da(l), T = o && !E, A = !T && !h && E, N = o || E;
8975
8991
  H(() => {
8976
- x();
8977
- }, [h, o, q, x]), H(() => {
8992
+ y();
8993
+ }, [h, o, E, y]), H(() => {
8978
8994
  if (c !== "vertical") return;
8979
8995
  const M = b.current;
8980
8996
  if (M)
8981
8997
  if (h) {
8982
8998
  const O = M.scrollHeight;
8983
- y(O);
8999
+ k(O);
8984
9000
  const j = setTimeout(() => {
8985
- y(void 0);
9001
+ k(void 0);
8986
9002
  }, 130);
8987
9003
  return () => clearTimeout(j);
8988
9004
  } else
8989
- y(M.scrollHeight), M.getBoundingClientRect(), y(0);
9005
+ k(M.scrollHeight), M.getBoundingClientRect(), k(0);
8990
9006
  }, [h, c]), H(() => {
8991
9007
  if (c !== "horizontal" || !h) return;
8992
9008
  const M = (O) => {
@@ -9010,7 +9026,7 @@ function ca({
9010
9026
  a || (c === "horizontal" ? h ? D() : G() : d(!h));
9011
9027
  }, _ = (M) => {
9012
9028
  a || (c === "vertical" ? (M.key === "ArrowRight" && !h && (M.preventDefault(), d(!0)), M.key === "ArrowLeft" && h && (M.preventDefault(), d(!1))) : (M.key === "ArrowDown" && !h && (M.preventDefault(), G()), M.key === "ArrowUp" && h && (M.preventDefault(), D())), (M.key === "Enter" || M.key === " ") && (M.preventDefault(), W()), M.key === "Escape" && h && (M.preventDefault(), c === "horizontal" ? D() : d(!1)));
9013
- }, A = () => {
9029
+ }, q = () => {
9014
9030
  c === "horizontal" && !a && (clearTimeout(v.current), G());
9015
9031
  }, L = () => {
9016
9032
  c === "horizontal" && (v.current = setTimeout(() => D(), 150));
@@ -9020,7 +9036,7 @@ function ca({
9020
9036
  {
9021
9037
  ref: S,
9022
9038
  style: { position: "relative" },
9023
- onMouseEnter: A,
9039
+ onMouseEnter: q,
9024
9040
  onMouseLeave: L,
9025
9041
  children: [
9026
9042
  /* @__PURE__ */ g(
@@ -9053,7 +9069,7 @@ function ca({
9053
9069
  whiteSpace: "nowrap",
9054
9070
  outline: "none",
9055
9071
  boxSizing: "border-box",
9056
- ...l
9072
+ ...s
9057
9073
  },
9058
9074
  children: [
9059
9075
  r != null && /* @__PURE__ */ e("span", { style: { display: "flex", flexShrink: 0, width: m.iconWidth, minWidth: 14, minHeight: 14, alignItems: "center", justifyContent: "center", color: "inherit" }, children: r }),
@@ -9062,7 +9078,7 @@ function ca({
9062
9078
  ]
9063
9079
  }
9064
9080
  ),
9065
- P && /* @__PURE__ */ e(re.Provider, { value: { orientation: "vertical", depth: 0, inverse: f, size: u, hasIcons: k, parentHasIcon: !1, requestMeasure: x }, children: /* @__PURE__ */ e(
9081
+ P && /* @__PURE__ */ e(re.Provider, { value: { orientation: "vertical", depth: 0, inverse: f, size: p, hasIcons: w, parentHasIcon: !1, requestMeasure: y }, children: /* @__PURE__ */ e(
9066
9082
  "div",
9067
9083
  {
9068
9084
  ref: C,
@@ -9080,7 +9096,7 @@ function ca({
9080
9096
  zIndex: 100,
9081
9097
  animation: R === "exiting" ? `lucent-navmenu-dropdown-out ${Be}ms var(--lucent-easing-default) forwards` : `lucent-navmenu-dropdown-in ${Be}ms var(--lucent-easing-default) forwards`
9082
9098
  },
9083
- children: s
9099
+ children: l
9084
9100
  }
9085
9101
  ) })
9086
9102
  ]
@@ -9091,8 +9107,8 @@ function ca({
9091
9107
  {
9092
9108
  "data-lucent-navitem": "",
9093
9109
  "data-active": T || void 0,
9094
- "data-active-parent": E || void 0,
9095
- "data-hint": !T && !E && N || void 0,
9110
+ "data-active-parent": A || void 0,
9111
+ "data-hint": !T && !A && N || void 0,
9096
9112
  onClick: (M) => {
9097
9113
  W(), i == null || i(M);
9098
9114
  },
@@ -9107,7 +9123,7 @@ function ca({
9107
9123
  padding: `${m.paddingY} ${m.paddingX} ${m.paddingY} ${r != null ? "var(--lucent-space-2)" : "var(--lucent-space-4)"}`,
9108
9124
  borderRadius: "var(--lucent-radius-md)",
9109
9125
  background: "transparent",
9110
- color: a ? "var(--lucent-text-disabled)" : T ? f ? "var(--lucent-text-primary)" : "var(--lucent-accent-fg)" : E || N ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
9126
+ color: a ? "var(--lucent-text-disabled)" : T ? f ? "var(--lucent-text-primary)" : "var(--lucent-accent-fg)" : A || N ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
9111
9127
  border: 0,
9112
9128
  boxShadow: "none",
9113
9129
  fontFamily: "var(--lucent-font-family-base)",
@@ -9120,7 +9136,7 @@ function ca({
9120
9136
  userSelect: "none",
9121
9137
  boxSizing: "border-box",
9122
9138
  outline: "none",
9123
- ...l
9139
+ ...s
9124
9140
  },
9125
9141
  children: [
9126
9142
  r != null && /* @__PURE__ */ e("span", { style: { display: "flex", flexShrink: 0, width: m.iconWidth, minWidth: 14, minHeight: 14, alignItems: "center", justifyContent: "center", color: "inherit" }, children: r }),
@@ -9136,10 +9152,10 @@ function ca({
9136
9152
  "aria-hidden": !h,
9137
9153
  style: {
9138
9154
  overflow: "hidden",
9139
- height: w !== void 0 ? w : "auto",
9155
+ height: x !== void 0 ? x : "auto",
9140
9156
  transition: "height 120ms var(--lucent-easing-default)"
9141
9157
  },
9142
- children: /* @__PURE__ */ e(re.Provider, { value: { orientation: c, depth: p + 1, inverse: f, size: u, hasIcons: k, parentHasIcon: r != null, requestMeasure: x }, children: /* @__PURE__ */ e(
9158
+ children: /* @__PURE__ */ e(re.Provider, { value: { orientation: c, depth: u + 1, inverse: f, size: p, hasIcons: w, parentHasIcon: r != null, requestMeasure: y }, children: /* @__PURE__ */ e(
9143
9159
  "div",
9144
9160
  {
9145
9161
  style: {
@@ -9150,7 +9166,7 @@ function ca({
9150
9166
  marginLeft: r != null ? `calc(${m.iconWidth} + ${m.gap})` : "var(--lucent-space-3)",
9151
9167
  animation: h ? "lucent-navmenu-open 200ms var(--lucent-easing-default) forwards" : void 0
9152
9168
  },
9153
- children: s
9169
+ children: l
9154
9170
  }
9155
9171
  ) })
9156
9172
  }
@@ -9180,32 +9196,32 @@ function ua({
9180
9196
  open: o,
9181
9197
  onOpenChange: a,
9182
9198
  collapsible: i,
9183
- style: l
9199
+ style: s
9184
9200
  }) {
9185
- const { orientation: s, inverse: c, size: p, hasIcons: f } = ee(re), u = Ce[p], k = i ?? r != null, x = f ? "var(--lucent-space-2)" : "var(--lucent-space-4)";
9186
- if (s === "horizontal")
9201
+ const { orientation: l, inverse: c, size: u, hasIcons: f } = ee(re), p = Ce[u], w = i ?? r != null, y = f ? "var(--lucent-space-2)" : "var(--lucent-space-4)";
9202
+ if (l === "horizontal")
9187
9203
  return /* @__PURE__ */ e(Q, { children: t });
9188
- const m = o !== void 0, [h, d] = z(n), b = m ? o : h, w = $(null), [y, S] = z(b ? void 0 : 0);
9204
+ const m = o !== void 0, [h, d] = z(n), b = m ? o : h, x = $(null), [k, S] = z(b ? void 0 : 0);
9189
9205
  H(() => {
9190
- if (!k) return;
9191
- const v = w.current;
9206
+ if (!w) return;
9207
+ const v = x.current;
9192
9208
  if (v)
9193
9209
  if (b) {
9194
- const q = v.scrollHeight;
9195
- S(q);
9210
+ const E = v.scrollHeight;
9211
+ S(E);
9196
9212
  const T = setTimeout(() => {
9197
9213
  S(void 0);
9198
9214
  }, 130);
9199
9215
  return () => clearTimeout(T);
9200
9216
  } else
9201
9217
  S(v.scrollHeight), v.getBoundingClientRect(), S(0);
9202
- }, [b, k]);
9218
+ }, [b, w]);
9203
9219
  const C = J(() => {
9204
9220
  const v = !b;
9205
9221
  m || d(v), a == null || a(v);
9206
9222
  }, [b, m, a]);
9207
- return r ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", marginTop: "var(--lucent-space-3)", ...l }, children: [
9208
- k ? /* @__PURE__ */ g(
9223
+ return r ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", marginTop: "var(--lucent-space-3)", ...s }, children: [
9224
+ w ? /* @__PURE__ */ g(
9209
9225
  "button",
9210
9226
  {
9211
9227
  onClick: C,
@@ -9215,7 +9231,7 @@ function ua({
9215
9231
  alignItems: "center",
9216
9232
  justifyContent: "space-between",
9217
9233
  width: "100%",
9218
- padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${x}`,
9234
+ padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${y}`,
9219
9235
  background: "none",
9220
9236
  border: 0,
9221
9237
  cursor: "pointer",
@@ -9240,7 +9256,7 @@ function ua({
9240
9256
  "div",
9241
9257
  {
9242
9258
  style: {
9243
- padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${x}`,
9259
+ padding: `var(--lucent-space-1) var(--lucent-space-3) var(--lucent-space-1) ${y}`,
9244
9260
  fontFamily: "var(--lucent-font-family-base)",
9245
9261
  fontSize: "var(--lucent-font-size-xs)",
9246
9262
  fontWeight: "var(--lucent-font-weight-semibold)",
@@ -9253,14 +9269,14 @@ function ua({
9253
9269
  children: r
9254
9270
  }
9255
9271
  ),
9256
- k ? /* @__PURE__ */ e(
9272
+ w ? /* @__PURE__ */ e(
9257
9273
  "div",
9258
9274
  {
9259
- ref: w,
9275
+ ref: x,
9260
9276
  "aria-hidden": !b,
9261
9277
  style: {
9262
9278
  overflow: "hidden",
9263
- height: y !== void 0 ? y : "auto",
9279
+ height: k !== void 0 ? k : "auto",
9264
9280
  transition: "height 120ms var(--lucent-easing-default)"
9265
9281
  },
9266
9282
  children: /* @__PURE__ */ e(
@@ -9269,14 +9285,14 @@ function ua({
9269
9285
  style: {
9270
9286
  display: "flex",
9271
9287
  flexDirection: "column",
9272
- gap: u.itemGap
9288
+ gap: p.itemGap
9273
9289
  },
9274
9290
  children: t
9275
9291
  }
9276
9292
  )
9277
9293
  }
9278
- ) : /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: u.itemGap }, children: t })
9279
- ] }) : /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: u.itemGap, ...l }, children: t });
9294
+ ) : /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: p.itemGap }, children: t })
9295
+ ] }) : /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: p.itemGap, ...s }, children: t });
9280
9296
  }
9281
9297
  function pa({ style: t }) {
9282
9298
  const { orientation: r } = ee(re);
@@ -9351,8 +9367,8 @@ const ma = {
9351
9367
  }, Le = 4;
9352
9368
  function va(t, r) {
9353
9369
  const n = r.offsetHeight, o = r.offsetWidth, a = window.innerWidth, i = window.innerHeight;
9354
- let l = t.bottom + Le, s = t.left, c = "top left";
9355
- return l + n > i && t.top - n - Le >= 0 && (l = t.top - n - Le, c = "bottom left"), s + o > a && (s = a - o - 8), s < 0 && (s = 8), { top: l, left: s, transformOrigin: c };
9370
+ let s = t.bottom + Le, l = t.left, c = "top left";
9371
+ return s + n > i && t.top - n - Le >= 0 && (s = t.top - n - Le, c = "bottom left"), l + o > a && (l = a - o - 8), l < 0 && (l = 8), { top: s, left: l, transformOrigin: c };
9356
9372
  }
9357
9373
  function ei({
9358
9374
  label: t,
@@ -9361,41 +9377,41 @@ function ei({
9361
9377
  defaultValue: o = [],
9362
9378
  onChange: a,
9363
9379
  variant: i = "secondary",
9364
- size: l = "sm",
9365
- disabled: s = !1,
9380
+ size: s = "sm",
9381
+ disabled: l = !1,
9366
9382
  icon: c,
9367
- style: p
9383
+ style: u
9368
9384
  }) {
9369
- const f = n !== void 0, [u, k] = z(o), x = f ? n : u, [m, h] = z(!1), [d, b] = z(!1), [w, y] = z("idle"), [S, C] = z(null), [v, q] = z(-1), T = $(null), E = $(null);
9385
+ const f = n !== void 0, [p, w] = z(o), y = f ? n : p, [m, h] = z(!1), [d, b] = z(!1), [x, k] = z("idle"), [S, C] = z(null), [v, E] = z(-1), T = $(null), A = $(null);
9370
9386
  if (!ct && typeof document < "u") {
9371
9387
  const D = document.createElement("style");
9372
9388
  D.textContent = fa, document.head.appendChild(D), ct = !0;
9373
9389
  }
9374
9390
  H(() => {
9375
9391
  if (m)
9376
- b(!0), y("entering"), q(-1);
9392
+ b(!0), k("entering"), E(-1);
9377
9393
  else if (d) {
9378
- y("exiting");
9394
+ k("exiting");
9379
9395
  const D = setTimeout(() => {
9380
- b(!1), y("idle");
9396
+ b(!1), k("idle");
9381
9397
  }, Re);
9382
9398
  return () => clearTimeout(D);
9383
9399
  }
9384
9400
  }, [m]), te(() => {
9385
- if (!d || w !== "entering" || !T.current) return;
9401
+ if (!d || x !== "entering" || !T.current) return;
9386
9402
  const D = requestAnimationFrame(() => {
9387
- const W = E.current, _ = T.current;
9403
+ const W = A.current, _ = T.current;
9388
9404
  !W || !_ || C(va(_.getBoundingClientRect(), W));
9389
9405
  });
9390
9406
  return () => cancelAnimationFrame(D);
9391
- }, [d, w]);
9407
+ }, [d, x]);
9392
9408
  const N = J(() => h(!1), []);
9393
9409
  H(() => {
9394
9410
  if (!m) return;
9395
9411
  const D = (_) => {
9396
9412
  var L, M;
9397
- const A = _.target;
9398
- (L = T.current) != null && L.contains(A) || (M = E.current) != null && M.contains(A) || N();
9413
+ const q = _.target;
9414
+ (L = T.current) != null && L.contains(q) || (M = A.current) != null && M.contains(q) || N();
9399
9415
  }, W = requestAnimationFrame(() => {
9400
9416
  document.addEventListener("mousedown", D);
9401
9417
  });
@@ -9410,34 +9426,34 @@ function ei({
9410
9426
  return document.addEventListener("keydown", D), () => document.removeEventListener("keydown", D);
9411
9427
  }, [m, N]);
9412
9428
  const R = (D) => {
9413
- const W = x.includes(D) ? x.filter((_) => _ !== D) : [...x, D];
9414
- f || k(W), a == null || a(W);
9429
+ const W = y.includes(D) ? y.filter((_) => _ !== D) : [...y, D];
9430
+ f || w(W), a == null || a(W);
9415
9431
  }, I = () => {
9416
- f || k([]), a == null || a([]), N();
9432
+ f || w([]), a == null || a([]), N();
9417
9433
  }, P = (D) => {
9418
9434
  if (D.key === "ArrowDown")
9419
- D.preventDefault(), q((W) => (W + 1) % r.length);
9435
+ D.preventDefault(), E((W) => (W + 1) % r.length);
9420
9436
  else if (D.key === "ArrowUp")
9421
- D.preventDefault(), q((W) => (W - 1 + r.length) % r.length);
9437
+ D.preventDefault(), E((W) => (W - 1 + r.length) % r.length);
9422
9438
  else if ((D.key === "Enter" || D.key === " ") && v >= 0) {
9423
9439
  D.preventDefault();
9424
9440
  const W = r[v];
9425
9441
  W && !W.disabled && R(W.value);
9426
9442
  }
9427
- }, B = ma[l], G = ga[l];
9428
- return /* @__PURE__ */ g("span", { ref: T, style: { display: "inline-flex", ...p }, children: [
9443
+ }, B = ma[s], G = ga[s];
9444
+ return /* @__PURE__ */ g("span", { ref: T, style: { display: "inline-flex", ...u }, children: [
9429
9445
  /* @__PURE__ */ g(
9430
9446
  ce,
9431
9447
  {
9432
- variant: i === "outline" && x.length > 0 ? "secondary" : i === "ghost" ? "ghost" : i,
9433
- size: l,
9448
+ variant: i === "outline" && y.length > 0 ? "secondary" : i === "ghost" ? "ghost" : i,
9449
+ size: s,
9434
9450
  ...t ? { chevron: !0 } : {},
9435
- disabled: s,
9436
- onClick: () => !s && h((D) => !D),
9451
+ disabled: l,
9452
+ onClick: () => !l && h((D) => !D),
9437
9453
  ...c !== void 0 && { leftIcon: c },
9438
9454
  children: [
9439
9455
  t || void 0,
9440
- x.length > 0 && /* @__PURE__ */ e(ke, { variant: "accent", size: l === "xs" ? "sm" : l, children: x.length })
9456
+ y.length > 0 && /* @__PURE__ */ e(ke, { variant: "accent", size: s === "xs" ? "sm" : s, children: y.length })
9441
9457
  ]
9442
9458
  }
9443
9459
  ),
@@ -9445,7 +9461,7 @@ function ei({
9445
9461
  /* @__PURE__ */ g(
9446
9462
  "div",
9447
9463
  {
9448
- ref: E,
9464
+ ref: A,
9449
9465
  role: "listbox",
9450
9466
  "aria-multiselectable": !0,
9451
9467
  "aria-label": t,
@@ -9466,15 +9482,15 @@ function ei({
9466
9482
  padding: B,
9467
9483
  maxHeight: "min(320px, calc(100vh - 32px))",
9468
9484
  overflowY: "auto",
9469
- animation: w === "exiting" ? `lucent-filter-ms-out ${Re}ms var(--lucent-easing-default) forwards` : `lucent-filter-ms-in ${Re}ms var(--lucent-easing-decelerate)`,
9485
+ animation: x === "exiting" ? `lucent-filter-ms-out ${Re}ms var(--lucent-easing-default) forwards` : `lucent-filter-ms-in ${Re}ms var(--lucent-easing-decelerate)`,
9470
9486
  transformOrigin: (S == null ? void 0 : S.transformOrigin) ?? "top left",
9471
9487
  outline: "none",
9472
- pointerEvents: w === "exiting" ? "none" : "auto",
9488
+ pointerEvents: x === "exiting" ? "none" : "auto",
9473
9489
  fontFamily: "var(--lucent-font-family-base)"
9474
9490
  },
9475
9491
  children: [
9476
9492
  r.map((D, W) => {
9477
- const _ = x.includes(D.value), A = v === W;
9493
+ const _ = y.includes(D.value), q = v === W;
9478
9494
  return /* @__PURE__ */ g(
9479
9495
  "div",
9480
9496
  {
@@ -9482,7 +9498,7 @@ function ei({
9482
9498
  "aria-selected": _,
9483
9499
  "aria-disabled": D.disabled,
9484
9500
  onClick: () => !D.disabled && R(D.value),
9485
- onMouseEnter: () => q(W),
9501
+ onMouseEnter: () => E(W),
9486
9502
  style: {
9487
9503
  display: "flex",
9488
9504
  alignItems: "center",
@@ -9490,7 +9506,7 @@ function ei({
9490
9506
  padding: `var(--lucent-space-2) ${B}`,
9491
9507
  borderRadius: "var(--lucent-radius-md)",
9492
9508
  cursor: D.disabled ? "not-allowed" : "pointer",
9493
- background: A ? "var(--lucent-surface-secondary)" : "transparent",
9509
+ background: q ? "var(--lucent-surface-secondary)" : "transparent",
9494
9510
  opacity: D.disabled ? 0.5 : 1,
9495
9511
  transition: "background var(--lucent-duration-fast) var(--lucent-easing-default)"
9496
9512
  },
@@ -9505,7 +9521,7 @@ function ei({
9505
9521
  style: { pointerEvents: "none" }
9506
9522
  }
9507
9523
  ),
9508
- D.swatch ? /* @__PURE__ */ e(ke, { size: l === "xs" ? "sm" : l, swatch: D.swatch, children: D.label }) : /* @__PURE__ */ e(V, { size: G, children: D.label })
9524
+ D.swatch ? /* @__PURE__ */ e(ke, { size: s === "xs" ? "sm" : s, swatch: D.swatch, children: D.label }) : /* @__PURE__ */ e(V, { size: G, children: D.label })
9509
9525
  ]
9510
9526
  },
9511
9527
  D.value
@@ -9525,16 +9541,16 @@ function ei({
9525
9541
  /* @__PURE__ */ e(
9526
9542
  "div",
9527
9543
  {
9528
- onClick: x.length > 0 ? I : void 0,
9544
+ onClick: y.length > 0 ? I : void 0,
9529
9545
  style: {
9530
9546
  display: "flex",
9531
9547
  alignItems: "center",
9532
9548
  padding: `var(--lucent-space-2) ${B}`,
9533
9549
  borderRadius: "var(--lucent-radius-md)",
9534
- cursor: x.length > 0 ? "pointer" : "default",
9535
- opacity: x.length > 0 ? 1 : 0.5
9550
+ cursor: y.length > 0 ? "pointer" : "default",
9551
+ opacity: y.length > 0 ? 1 : 0.5
9536
9552
  },
9537
- children: /* @__PURE__ */ e(V, { size: G, color: x.length > 0 ? "secondary" : "disabled", children: "Clear all" })
9553
+ children: /* @__PURE__ */ e(V, { size: G, color: y.length > 0 ? "secondary" : "disabled", children: "Clear all" })
9538
9554
  }
9539
9555
  )
9540
9556
  ]
@@ -9551,16 +9567,16 @@ function ti({
9551
9567
  defaultValue: o,
9552
9568
  onChange: a,
9553
9569
  variant: i = "secondary",
9554
- size: l = "sm",
9555
- disabled: s = !1,
9570
+ size: s = "sm",
9571
+ disabled: l = !1,
9556
9572
  icon: c,
9557
- style: p
9573
+ style: u
9558
9574
  }) {
9559
- var w;
9560
- const f = n !== void 0, [u, k] = z(o), x = f ? n : u, m = (w = r.find((y) => y.value === x)) == null ? void 0 : w.label, h = x !== void 0, d = (y) => {
9561
- f || k(y), a == null || a(y);
9575
+ var x;
9576
+ const f = n !== void 0, [p, w] = z(o), y = f ? n : p, m = (x = r.find((k) => k.value === y)) == null ? void 0 : x.label, h = y !== void 0, d = (k) => {
9577
+ f || w(k), a == null || a(k);
9562
9578
  }, b = () => {
9563
- f || k(void 0), a == null || a(void 0);
9579
+ f || w(void 0), a == null || a(void 0);
9564
9580
  };
9565
9581
  return /* @__PURE__ */ g(
9566
9582
  ft,
@@ -9569,29 +9585,29 @@ function ti({
9569
9585
  ce,
9570
9586
  {
9571
9587
  variant: i === "outline" && h ? "secondary" : i,
9572
- size: l,
9588
+ size: s,
9573
9589
  chevron: !0,
9574
- disabled: s,
9590
+ disabled: l,
9575
9591
  ...c !== void 0 && { leftIcon: c },
9576
9592
  children: m ?? t
9577
9593
  }
9578
9594
  ),
9579
- size: l,
9580
- ...p !== void 0 && { style: p },
9595
+ size: s,
9596
+ ...u !== void 0 && { style: u },
9581
9597
  children: [
9582
- r.map((y) => /* @__PURE__ */ e(
9598
+ r.map((k) => /* @__PURE__ */ e(
9583
9599
  Fe,
9584
9600
  {
9585
- selected: x === y.value,
9586
- ...y.disabled !== void 0 && { disabled: y.disabled },
9587
- onSelect: () => d(y.value),
9588
- children: y.label
9601
+ selected: y === k.value,
9602
+ ...k.disabled !== void 0 && { disabled: k.disabled },
9603
+ onSelect: () => d(k.value),
9604
+ children: k.label
9589
9605
  },
9590
- y.value
9606
+ k.value
9591
9607
  )),
9592
9608
  h && /* @__PURE__ */ g(Q, { children: [
9593
9609
  /* @__PURE__ */ e(wn, {}),
9594
- /* @__PURE__ */ e(Fe, { onSelect: b, children: /* @__PURE__ */ e(V, { size: l === "lg" ? "md" : "sm", color: "secondary", children: "Clear" }) })
9610
+ /* @__PURE__ */ e(Fe, { onSelect: b, children: /* @__PURE__ */ e(V, { size: s === "lg" ? "md" : "sm", color: "secondary", children: "Clear" }) })
9595
9611
  ] })
9596
9612
  ]
9597
9613
  }
@@ -9608,44 +9624,44 @@ function ni({
9608
9624
  placeholder: o = "Search…",
9609
9625
  variant: a = "secondary",
9610
9626
  size: i = "sm",
9611
- width: l = 260,
9612
- disabled: s = !1,
9627
+ width: s = 260,
9628
+ disabled: l = !1,
9613
9629
  style: c
9614
9630
  }) {
9615
- const p = t !== void 0, [f, u] = z(r), k = p ? t : f, [x, m] = z(!!k), h = $(null);
9631
+ const u = t !== void 0, [f, p] = z(r), w = u ? t : f, [y, m] = z(!!w), h = $(null);
9616
9632
  H(() => {
9617
- x && requestAnimationFrame(() => {
9618
- var y;
9619
- return (y = h.current) == null ? void 0 : y.focus();
9633
+ y && requestAnimationFrame(() => {
9634
+ var k;
9635
+ return (k = h.current) == null ? void 0 : k.focus();
9620
9636
  });
9621
- }, [x]);
9622
- const d = (y) => {
9623
- const S = y.target.value;
9624
- p || u(S), n == null || n(S);
9637
+ }, [y]);
9638
+ const d = (k) => {
9639
+ const S = k.target.value;
9640
+ u || p(S), n == null || n(S);
9625
9641
  }, b = () => {
9626
- k || m(!1);
9627
- }, w = () => {
9628
- s || m(!0);
9642
+ w || m(!1);
9643
+ }, x = () => {
9644
+ l || m(!0);
9629
9645
  };
9630
- return x ? /* @__PURE__ */ e(
9646
+ return y ? /* @__PURE__ */ e(
9631
9647
  ut,
9632
9648
  {
9633
9649
  ref: h,
9634
9650
  placeholder: o,
9635
9651
  size: i,
9636
- value: k,
9652
+ value: w,
9637
9653
  onChange: d,
9638
9654
  onBlur: b,
9639
- disabled: s,
9640
- style: { width: l, ...c }
9655
+ disabled: l,
9656
+ style: { width: s, ...c }
9641
9657
  }
9642
9658
  ) : /* @__PURE__ */ e(
9643
9659
  ce,
9644
9660
  {
9645
9661
  variant: a,
9646
9662
  size: i,
9647
- disabled: s,
9648
- onClick: w,
9663
+ disabled: l,
9664
+ onClick: x,
9649
9665
  "aria-label": "Search",
9650
9666
  leftIcon: /* @__PURE__ */ e(ba, {}),
9651
9667
  style: c
@@ -9664,10 +9680,10 @@ function ri({
9664
9680
  onChange: o,
9665
9681
  variant: a = "secondary",
9666
9682
  size: i = "sm",
9667
- min: l,
9668
- max: s,
9683
+ min: s,
9684
+ max: l,
9669
9685
  disabled: c = !1,
9670
- style: p
9686
+ style: u
9671
9687
  }) {
9672
9688
  return /* @__PURE__ */ e(
9673
9689
  Lr,
@@ -9676,8 +9692,8 @@ function ri({
9676
9692
  ...r !== void 0 && { value: r },
9677
9693
  ...n !== void 0 && { defaultValue: n },
9678
9694
  ...o !== void 0 && { onChange: o },
9679
- ...l !== void 0 && { min: l },
9680
- ...s !== void 0 && { max: s },
9695
+ ...s !== void 0 && { min: s },
9696
+ ...l !== void 0 && { max: l },
9681
9697
  disabled: c,
9682
9698
  trigger: /* @__PURE__ */ e(
9683
9699
  ce,
@@ -9689,7 +9705,7 @@ function ri({
9689
9705
  children: ya(r, t)
9690
9706
  }
9691
9707
  ),
9692
- ...p !== void 0 && { style: p }
9708
+ ...u !== void 0 && { style: u }
9693
9709
  }
9694
9710
  );
9695
9711
  }
@@ -9796,30 +9812,30 @@ function Ma({ steps: t, current: r, cfg: n, numbered: o, showStatus: a }) {
9796
9812
  width: t.length > 1 ? `${r / (t.length - 1) * 100}%` : "0%",
9797
9813
  transition: "width 300ms var(--lucent-easing-default)"
9798
9814
  } }) }),
9799
- t.map((i, l) => /* @__PURE__ */ e("div", { style: {
9815
+ t.map((i, s) => /* @__PURE__ */ e("div", { style: {
9800
9816
  flex: 1,
9801
9817
  display: "flex",
9802
- justifyContent: l === 0 ? "flex-start" : l === t.length - 1 ? "flex-end" : "center",
9818
+ justifyContent: s === 0 ? "flex-start" : s === t.length - 1 ? "flex-end" : "center",
9803
9819
  position: "relative",
9804
9820
  zIndex: 1
9805
- }, children: /* @__PURE__ */ e(wt, { index: l, state: He(l, r), step: i, cfg: n }) }, i.label))
9821
+ }, children: /* @__PURE__ */ e(wt, { index: s, state: He(s, r), step: i, cfg: n }) }, i.label))
9806
9822
  ] }),
9807
- /* @__PURE__ */ e("div", { style: { display: "flex" }, children: t.map((i, l) => {
9808
- const s = He(l, r), c = l === t.length - 1;
9823
+ /* @__PURE__ */ e("div", { style: { display: "flex" }, children: t.map((i, s) => {
9824
+ const l = He(s, r), c = s === t.length - 1;
9809
9825
  return /* @__PURE__ */ e("div", { style: {
9810
9826
  flex: 1,
9811
9827
  display: "flex",
9812
9828
  flexDirection: "column",
9813
- alignItems: l === 0 ? "flex-start" : c ? "flex-end" : "center",
9829
+ alignItems: s === 0 ? "flex-start" : c ? "flex-end" : "center",
9814
9830
  gap: "2px",
9815
- textAlign: l === 0 ? "left" : c ? "right" : "center"
9816
- }, children: /* @__PURE__ */ e(Ia, { step: i, state: s, index: l, cfg: n, numbered: o, showStatus: a }) }, i.label);
9831
+ textAlign: s === 0 ? "left" : c ? "right" : "center"
9832
+ }, children: /* @__PURE__ */ e(Ia, { step: i, state: l, index: s, cfg: n, numbered: o, showStatus: a }) }, i.label);
9817
9833
  }) })
9818
9834
  ] });
9819
9835
  }
9820
9836
  function za({ steps: t, current: r, cfg: n, numbered: o, showStatus: a }) {
9821
- return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column" }, children: t.map((i, l) => {
9822
- const s = He(l, r), c = l === t.length - 1;
9837
+ return /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column" }, children: t.map((i, s) => {
9838
+ const l = He(s, r), c = s === t.length - 1;
9823
9839
  return /* @__PURE__ */ g("div", { style: { display: "flex", gap: n.gap }, children: [
9824
9840
  /* @__PURE__ */ g("div", { style: {
9825
9841
  display: "flex",
@@ -9827,13 +9843,13 @@ function za({ steps: t, current: r, cfg: n, numbered: o, showStatus: a }) {
9827
9843
  alignItems: "center",
9828
9844
  flexShrink: 0
9829
9845
  }, children: [
9830
- /* @__PURE__ */ e(wt, { index: l, state: s, step: i, cfg: n }),
9846
+ /* @__PURE__ */ e(wt, { index: s, state: l, step: i, cfg: n }),
9831
9847
  !c && /* @__PURE__ */ e("div", { style: {
9832
9848
  width: n.connector,
9833
9849
  flex: 1,
9834
9850
  minHeight: 24,
9835
9851
  borderRadius: n.connector / 2,
9836
- background: l < r ? "var(--lucent-accent-default)" : "var(--lucent-border-default)",
9852
+ background: s < r ? "var(--lucent-accent-default)" : "var(--lucent-border-default)",
9837
9853
  transition: "background var(--lucent-duration-base) var(--lucent-easing-default)",
9838
9854
  margin: "4px 0"
9839
9855
  } })
@@ -9855,13 +9871,13 @@ function za({ steps: t, current: r, cfg: n, numbered: o, showStatus: a }) {
9855
9871
  letterSpacing: "var(--lucent-letter-spacing-wide)"
9856
9872
  }, children: [
9857
9873
  "Step ",
9858
- l + 1
9874
+ s + 1
9859
9875
  ] }),
9860
9876
  /* @__PURE__ */ e("span", { style: {
9861
9877
  fontSize: n.labelSize,
9862
9878
  fontFamily: "var(--lucent-font-family-base)",
9863
- fontWeight: s === "current" ? "var(--lucent-font-weight-semibold)" : "var(--lucent-font-weight-regular)",
9864
- color: s !== "pending" ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
9879
+ fontWeight: l === "current" ? "var(--lucent-font-weight-semibold)" : "var(--lucent-font-weight-regular)",
9880
+ color: l !== "pending" ? "var(--lucent-text-primary)" : "var(--lucent-text-secondary)",
9865
9881
  transition: "color var(--lucent-duration-base) var(--lucent-easing-default)"
9866
9882
  }, children: i.label }),
9867
9883
  i.description && /* @__PURE__ */ e("span", { style: {
@@ -9869,7 +9885,7 @@ function za({ steps: t, current: r, cfg: n, numbered: o, showStatus: a }) {
9869
9885
  fontFamily: "var(--lucent-font-family-base)",
9870
9886
  color: "var(--lucent-text-secondary)"
9871
9887
  }, children: i.description }),
9872
- a && /* @__PURE__ */ e(kt, { state: s })
9888
+ a && /* @__PURE__ */ e(kt, { state: l })
9873
9889
  ] })
9874
9890
  ] }, i.label);
9875
9891
  }) });
@@ -9881,10 +9897,10 @@ function ai({
9881
9897
  orientation: o = "horizontal",
9882
9898
  numbered: a = !1,
9883
9899
  showStatus: i = !1,
9884
- style: l
9900
+ style: s
9885
9901
  }) {
9886
9902
  H(Ca, []);
9887
- const s = xa[n], c = t.map(wa), p = o === "vertical" ? za : Ma;
9903
+ const l = xa[n], c = t.map(wa), u = o === "vertical" ? za : Ma;
9888
9904
  return /* @__PURE__ */ e(
9889
9905
  "div",
9890
9906
  {
@@ -9892,9 +9908,9 @@ function ai({
9892
9908
  "aria-label": "Progress steps",
9893
9909
  style: {
9894
9910
  fontFamily: "var(--lucent-font-family-base)",
9895
- ...l
9911
+ ...s
9896
9912
  },
9897
- children: /* @__PURE__ */ e(p, { steps: c, current: r, cfg: s, numbered: a, showStatus: i })
9913
+ children: /* @__PURE__ */ e(u, { steps: c, current: r, cfg: l, numbered: a, showStatus: i })
9898
9914
  }
9899
9915
  );
9900
9916
  }
@@ -10259,12 +10275,12 @@ function Ea(t) {
10259
10275
  (typeof n[i] != "string" || n[i].trim() === "") && r.push(Z(i, "Must be a non-empty string"));
10260
10276
  typeof n.id == "string" && !/^[a-z][a-z0-9-]*$/.test(n.id) && r.push(Z("id", 'Must be kebab-case (e.g. "button", "form-field")'));
10261
10277
  const a = ["atom", "molecule", "block", "flow", "overlay", "provider"];
10262
- return a.includes(n.tier) || r.push(Z("tier", `Must be one of: ${a.join(", ")}`)), (typeof n.domain != "string" || n.domain.trim() === "") && r.push(Z("domain", "Must be a non-empty string")), Array.isArray(n.props) ? n.props.forEach((i, l) => {
10263
- const s = i, c = `props[${l}]`;
10264
- (typeof s.name != "string" || s.name === "") && r.push(Z(`${c}.name`, "Must be a non-empty string")), (typeof s.type != "string" || s.type === "") && r.push(Z(`${c}.type`, "Must be a non-empty string")), typeof s.required != "boolean" && r.push(Z(`${c}.required`, "Must be a boolean")), (typeof s.description != "string" || s.description === "") && r.push(Z(`${c}.description`, "Must be a non-empty string"));
10265
- }) : r.push(Z("props", "Must be an array")), Array.isArray(n.usageExamples) ? n.usageExamples.length === 0 ? r.push(Z("usageExamples", "Must have at least one example")) : n.usageExamples.forEach((i, l) => {
10266
- const s = i, c = `usageExamples[${l}]`;
10267
- (typeof s.title != "string" || s.title === "") && r.push(Z(`${c}.title`, "Must be a non-empty string")), (typeof s.code != "string" || s.code === "") && r.push(Z(`${c}.code`, "Must be a non-empty string"));
10278
+ return a.includes(n.tier) || r.push(Z("tier", `Must be one of: ${a.join(", ")}`)), (typeof n.domain != "string" || n.domain.trim() === "") && r.push(Z("domain", "Must be a non-empty string")), Array.isArray(n.props) ? n.props.forEach((i, s) => {
10279
+ const l = i, c = `props[${s}]`;
10280
+ (typeof l.name != "string" || l.name === "") && r.push(Z(`${c}.name`, "Must be a non-empty string")), (typeof l.type != "string" || l.type === "") && r.push(Z(`${c}.type`, "Must be a non-empty string")), typeof l.required != "boolean" && r.push(Z(`${c}.required`, "Must be a boolean")), (typeof l.description != "string" || l.description === "") && r.push(Z(`${c}.description`, "Must be a non-empty string"));
10281
+ }) : r.push(Z("props", "Must be an array")), Array.isArray(n.usageExamples) ? n.usageExamples.length === 0 ? r.push(Z("usageExamples", "Must have at least one example")) : n.usageExamples.forEach((i, s) => {
10282
+ const l = i, c = `usageExamples[${s}]`;
10283
+ (typeof l.title != "string" || l.title === "") && r.push(Z(`${c}.title`, "Must be a non-empty string")), (typeof l.code != "string" || l.code === "") && r.push(Z(`${c}.code`, "Must be a non-empty string"));
10268
10284
  }) : r.push(Z("usageExamples", "Must be an array")), Array.isArray(n.compositionGraph) || r.push(Z("compositionGraph", "Must be an array (empty array is fine for atoms)")), typeof n.specVersion == "string" && !/^\d+\.\d+$/.test(n.specVersion) && r.push(Z("specVersion", 'Must be "MAJOR.MINOR" format, e.g. "0.1"')), { valid: r.length === 0, errors: r };
10269
10285
  }
10270
10286
  function di(t) {