@alea-design/ui 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/components/button/Button.d.ts +3 -1
  2. package/dist/components/button/Button.js +64 -63
  3. package/dist/components/card/Card.d.ts +6 -2
  4. package/dist/components/card/Card.js +20 -20
  5. package/dist/components/combobox/Autocomplete.d.ts +4 -0
  6. package/dist/components/combobox/Autocomplete.js +89 -87
  7. package/dist/components/command/CommandPalette.d.ts +10 -0
  8. package/dist/components/command/CommandPalette.js +82 -56
  9. package/dist/components/data/Data.d.ts +11 -7
  10. package/dist/components/data/Data.js +65 -55
  11. package/dist/components/date/Date.d.ts +16 -2
  12. package/dist/components/date/Date.js +80 -69
  13. package/dist/components/display/Display.d.ts +3 -1
  14. package/dist/components/display/Display.js +27 -27
  15. package/dist/components/display/Display2.d.ts +2 -2
  16. package/dist/components/display/Display2.js +28 -27
  17. package/dist/components/feedback/Feedback.d.ts +3 -1
  18. package/dist/components/feedback/Feedback.js +102 -102
  19. package/dist/components/feedback/PageSkeleton.d.ts +19 -0
  20. package/dist/components/feedback/PageSkeleton.js +58 -0
  21. package/dist/components/field/Field.d.ts +3 -1
  22. package/dist/components/field/Field.js +82 -82
  23. package/dist/components/filter/FilterBar.d.ts +5 -2
  24. package/dist/components/filter/FilterBar.js +97 -66
  25. package/dist/components/form/Form.d.ts +8 -2
  26. package/dist/components/form/Form.js +53 -40
  27. package/dist/components/icon/icon-names.d.ts +2 -2
  28. package/dist/components/icon/icon-names.js +4 -2
  29. package/dist/components/list/List.d.ts +6 -2
  30. package/dist/components/list/List.js +65 -62
  31. package/dist/components/list/Lists2.d.ts +4 -0
  32. package/dist/components/list/Lists2.js +35 -35
  33. package/dist/components/media/Media.d.ts +5 -1
  34. package/dist/components/media/Media.js +115 -113
  35. package/dist/components/more/More.d.ts +2 -2
  36. package/dist/components/more/More.js +46 -45
  37. package/dist/components/navigation/Navigation.d.ts +11 -5
  38. package/dist/components/navigation/Navigation.js +97 -80
  39. package/dist/components/navigation/Navigation2.d.ts +9 -3
  40. package/dist/components/navigation/Navigation2.js +208 -194
  41. package/dist/components/notification/NotificationCenter.js +70 -70
  42. package/dist/components/overlay/Drawer.d.ts +6 -1
  43. package/dist/components/overlay/Drawer.js +27 -25
  44. package/dist/components/overlay/Modal.d.ts +5 -0
  45. package/dist/components/overlay/Modal.js +16 -15
  46. package/dist/components/overlay/Overlay.d.ts +14 -1
  47. package/dist/components/overlay/Overlay.js +52 -50
  48. package/dist/components/overlay/Sheet.d.ts +2 -0
  49. package/dist/components/overlay/Sheet.js +30 -30
  50. package/dist/components/page/PageParts.d.ts +6 -2
  51. package/dist/components/page/PageParts.js +92 -84
  52. package/dist/components/select/Select.js +75 -70
  53. package/dist/components/settings/Settings.d.ts +29 -0
  54. package/dist/components/settings/Settings.js +31 -0
  55. package/dist/components/shell/AccountMenu.d.ts +20 -0
  56. package/dist/components/shell/AccountMenu.js +32 -0
  57. package/dist/components/shell/AppShell.d.ts +9 -2
  58. package/dist/components/shell/AppShell.js +37 -37
  59. package/dist/components/shell/AppSidebar.d.ts +9 -3
  60. package/dist/components/shell/AppSidebar.js +45 -39
  61. package/dist/components/table/Table.d.ts +18 -4
  62. package/dist/components/table/Table.js +70 -46
  63. package/dist/components/tabs/Tabs.js +105 -94
  64. package/dist/components/theme/Theme.d.ts +7 -4
  65. package/dist/components/theme/Theme.js +127 -130
  66. package/dist/components/upload/Upload.js +62 -54
  67. package/dist/css/base.css +1 -1
  68. package/dist/css/button.css +1 -1
  69. package/dist/css/card.css +1 -1
  70. package/dist/css/command.css +1 -1
  71. package/dist/css/data.css +1 -1
  72. package/dist/css/date.css +1 -1
  73. package/dist/css/display.css +1 -1
  74. package/dist/css/feedback.css +1 -1
  75. package/dist/css/field.css +1 -1
  76. package/dist/css/form.css +1 -1
  77. package/dist/css/groups.json +37 -21
  78. package/dist/css/list.css +1 -1
  79. package/dist/css/menu.css +1 -1
  80. package/dist/css/navigation.css +1 -1
  81. package/dist/css/notification.css +1 -1
  82. package/dist/css/overlay.css +1 -1
  83. package/dist/css/page.css +1 -1
  84. package/dist/css/select.css +1 -1
  85. package/dist/css/settings.css +1 -0
  86. package/dist/css/shell.css +1 -1
  87. package/dist/css/table.css +1 -1
  88. package/dist/css/tabs.css +1 -1
  89. package/dist/css/upload.css +1 -1
  90. package/dist/i18n/strings.d.ts +9 -0
  91. package/dist/i18n/strings.js +18 -0
  92. package/dist/index.d.ts +4 -0
  93. package/dist/index.js +318 -306
  94. package/dist/styles.css +1 -1
  95. package/dist/utils/animateRows.d.ts +11 -0
  96. package/dist/utils/animateRows.js +23 -0
  97. package/dist/utils/decimal.d.ts +12 -0
  98. package/dist/utils/decimal.js +48 -0
  99. package/dist/utils/initialFocus.d.ts +6 -0
  100. package/dist/utils/initialFocus.js +24 -0
  101. package/dist/utils/refs.d.ts +2 -0
  102. package/dist/utils/refs.js +14 -6
  103. package/package.json +3 -3
@@ -1,153 +1,155 @@
1
1
  "use client";
2
- import { jsxs as h, jsx as e, Fragment as B } from "react/jsx-runtime";
3
- import { useRef as H, useState as C, useId as U, useCallback as X, useEffect as L, forwardRef as F, useMemo as O, useLayoutEffect as _ } from "react";
4
- import { Pause as G, Play as J, ChevronLeft as K, ChevronRight as Y, ImageOff as V, ZoomOut as ee, ZoomIn as ae, X as te } from "lucide-react";
5
- import { cx as z } from "../../utils/cx.js";
6
- import { IconButton as P, Button as S } from "../button/Button.js";
7
- import { DialogModal as W, Dialog as j } from "../overlay/Overlay.js";
2
+ import { jsxs as f, jsx as e, Fragment as B } from "react/jsx-runtime";
3
+ import { useRef as U, useState as x, useId as X, useCallback as _, useEffect as L, forwardRef as O, useMemo as W, useLayoutEffect as G } from "react";
4
+ import { Pause as J, Play as K, ChevronLeft as Y, ChevronRight as V, ImageOff as ee, ZoomOut as ae, ZoomIn as te, X as le } from "lucide-react";
5
+ import { cx as I } from "../../utils/cx.js";
6
+ import { IconButton as z, Button as S } from "../button/Button.js";
7
+ import { DialogModal as j, Dialog as Q } from "../overlay/Overlay.js";
8
8
  import { useStrings as R } from "../../i18n/strings.js";
9
- import { DotField as le } from "../../utils/DotField.js";
10
- import { inertProps as re } from "../../utils/inert.js";
11
- function ve({ items: f, pending: r, mode: s = "start", reverse: d, size: b, className: k }) {
12
- const u = d ? [...f].reverse() : f;
13
- return /* @__PURE__ */ h("ol", { className: z("alea-timeline", k), "data-mode": s !== "start" ? s : void 0, "data-size": b, children: [
14
- u.map((t) => /* @__PURE__ */ h("li", { className: "alea-tl-item", "data-tone": t.tone || "neutral", "data-active": t.isActive || void 0, children: [
9
+ import { DotField as re } from "../../utils/DotField.js";
10
+ import { inertProps as ne } from "../../utils/inert.js";
11
+ const F = (c) => c.time && (c.dateTime ? /* @__PURE__ */ e("time", { className: "alea-tl-time", dateTime: c.dateTime, children: c.time }) : /* @__PURE__ */ e("span", { className: "alea-tl-time", children: c.time }));
12
+ function pe({ items: c, pending: r, mode: s = "start", reverse: m, size: b, timePlacement: w = "above", className: h, "aria-label": p }) {
13
+ const o = m ? [...c].reverse() : c;
14
+ return /* @__PURE__ */ f("ol", { "aria-label": p, className: I("alea-timeline", h), "data-mode": s !== "start" ? s : void 0, "data-size": b, children: [
15
+ o.map((t) => /* @__PURE__ */ f("li", { className: "alea-tl-item", "data-tone": t.tone || "neutral", "data-active": t.isActive || void 0, children: [
15
16
  /* @__PURE__ */ e("span", { className: "alea-tl-dot", "aria-hidden": "true", children: t.dot }),
16
- /* @__PURE__ */ h("div", { className: "alea-tl-body", children: [
17
- t.time && (t.dateTime ? /* @__PURE__ */ e("time", { className: "alea-tl-time", dateTime: t.dateTime, children: t.time }) : /* @__PURE__ */ e("span", { className: "alea-tl-time", children: t.time })),
17
+ /* @__PURE__ */ f("div", { className: "alea-tl-body", children: [
18
+ w === "above" && F(t),
18
19
  t.href ? /* @__PURE__ */ e("p", { className: "alea-tl-title", children: /* @__PURE__ */ e("a", { className: "alea-tl-link alea-focus-ring", href: t.href, children: t.title }) }) : t.onPress ? /* @__PURE__ */ e("p", { className: "alea-tl-title", children: /* @__PURE__ */ e("button", { type: "button", className: "alea-tl-link alea-focus-ring", onClick: t.onPress, children: t.title }) }) : /* @__PURE__ */ e("p", { className: "alea-tl-title", children: t.title }),
20
+ w === "below" && F(t),
19
21
  t.description && /* @__PURE__ */ e("div", { className: "alea-tl-desc", children: t.description })
20
22
  ] })
21
23
  ] }, t.id)),
22
- r && /* @__PURE__ */ h("li", { className: "alea-tl-item", "data-pending": !0, children: [
24
+ r && /* @__PURE__ */ f("li", { className: "alea-tl-item", "data-pending": !0, children: [
23
25
  /* @__PURE__ */ e("span", { className: "alea-tl-dot", "aria-hidden": "true" }),
24
26
  /* @__PURE__ */ e("div", { className: "alea-tl-body", children: /* @__PURE__ */ e("p", { className: "alea-tl-title alea-tl-pending", children: r }) })
25
27
  ] })
26
28
  ] });
27
29
  }
28
- function pe({ children: f, "aria-label": r, autoplay: s, perView: d = 1, showDots: b = !0, className: k }) {
29
- const u = R(), t = H(null), [i, v] = C(0), [g, p] = C(!!s), [y, o] = C(!1), N = f.length, m = Math.max(1, Math.ceil(N - d + 1)), n = U(), l = X((c) => {
30
+ function be({ children: c, "aria-label": r, autoplay: s, perView: m = 1, showDots: b = !0, className: w }) {
31
+ const h = R(), p = U(null), [o, t] = x(0), [g, v] = x(!!s), [y, i] = x(!1), N = c.length, u = Math.max(1, Math.ceil(N - m + 1)), n = X(), l = _((d) => {
30
32
  var E;
31
- const a = t.current;
33
+ const a = p.current;
32
34
  if (!a) return;
33
- const w = (c + m) % m, x = a.children[w], I = getComputedStyle(a).direction === "rtl", M = x ? a.scrollLeft + (I ? x.getBoundingClientRect().right - a.getBoundingClientRect().right : x.getBoundingClientRect().left - a.getBoundingClientRect().left) : 0, $ = ((E = window.matchMedia) == null ? void 0 : E.call(window, "(prefers-reduced-motion: reduce)").matches) && document.documentElement.getAttribute("data-alea-reduced") !== "never" || ["off", "reduced"].includes(document.documentElement.getAttribute("data-alea-motion") || "");
34
- typeof a.scrollTo == "function" ? a.scrollTo({ left: M, behavior: $ ? "auto" : "smooth" }) : a.scrollLeft = M, v(w);
35
- }, [m]);
35
+ const k = (d + u) % u, C = a.children[k], P = getComputedStyle(a).direction === "rtl", M = C ? a.scrollLeft + (P ? C.getBoundingClientRect().right - a.getBoundingClientRect().right : C.getBoundingClientRect().left - a.getBoundingClientRect().left) : 0, $ = ((E = window.matchMedia) == null ? void 0 : E.call(window, "(prefers-reduced-motion: reduce)").matches) && document.documentElement.getAttribute("data-alea-reduced") !== "never" || ["off", "reduced"].includes(document.documentElement.getAttribute("data-alea-motion") || "");
36
+ typeof a.scrollTo == "function" ? a.scrollTo({ left: M, behavior: $ ? "auto" : "smooth" }) : a.scrollLeft = M, t(k);
37
+ }, [u]);
36
38
  return L(() => {
37
- const c = t.current;
38
- if (!c) return;
39
+ const d = p.current;
40
+ if (!d) return;
39
41
  const a = () => {
40
- const w = c.clientWidth / d;
41
- v(Math.min(m - 1, Math.round(Math.abs(c.scrollLeft) / Math.max(1, w))));
42
+ const k = d.clientWidth / m;
43
+ t(Math.min(u - 1, Math.round(Math.abs(d.scrollLeft) / Math.max(1, k))));
42
44
  };
43
- return c.addEventListener("scroll", a, { passive: !0 }), () => c.removeEventListener("scroll", a);
44
- }, [d, m]), L(() => {
45
+ return d.addEventListener("scroll", a, { passive: !0 }), () => d.removeEventListener("scroll", a);
46
+ }, [m, u]), L(() => {
45
47
  var a;
46
48
  if (!s || !g || y || typeof window < "u" && ((a = window.matchMedia) != null && a.call(window, "(prefers-reduced-motion: reduce)").matches)) return;
47
- const c = setInterval(() => l(i + 1), s);
48
- return () => clearInterval(c);
49
- }, [s, g, y, i, l]), /* @__PURE__ */ h(
49
+ const d = setInterval(() => l(o + 1), s);
50
+ return () => clearInterval(d);
51
+ }, [s, g, y, o, l]), /* @__PURE__ */ f(
50
52
  "section",
51
53
  {
52
- className: z("alea-carousel", k),
54
+ className: I("alea-carousel", w),
53
55
  "aria-roledescription": "carousel",
54
56
  "aria-label": r,
55
- onMouseEnter: () => o(!0),
56
- onMouseLeave: () => o(!1),
57
- onFocusCapture: () => o(!0),
58
- onBlurCapture: () => o(!1),
57
+ onMouseEnter: () => i(!0),
58
+ onMouseLeave: () => i(!1),
59
+ onFocusCapture: () => i(!0),
60
+ onBlurCapture: () => i(!1),
59
61
  children: [
60
- /* @__PURE__ */ h("div", { className: "alea-carousel-controls", children: [
61
- s && /* @__PURE__ */ e(P, { size: "sm", "aria-label": g ? u.stopSlides : u.playSlides, onPress: () => p((c) => !c), children: g ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ e(J, {}) }),
62
- /* @__PURE__ */ e(P, { size: "sm", "aria-label": u.previousSlide, "aria-controls": `${n}-track`, onPress: () => l(i - 1), children: /* @__PURE__ */ e(K, {}) }),
63
- /* @__PURE__ */ e(P, { size: "sm", "aria-label": u.nextSlide, "aria-controls": `${n}-track`, onPress: () => l(i + 1), children: /* @__PURE__ */ e(Y, {}) })
62
+ /* @__PURE__ */ f("div", { className: "alea-carousel-controls", children: [
63
+ s && /* @__PURE__ */ e(z, { size: "sm", "aria-label": g ? h.stopSlides : h.playSlides, onPress: () => v((d) => !d), children: g ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ e(K, {}) }),
64
+ /* @__PURE__ */ e(z, { size: "sm", "aria-label": h.previousSlide, "aria-controls": `${n}-track`, onPress: () => l(o - 1), children: /* @__PURE__ */ e(Y, {}) }),
65
+ /* @__PURE__ */ e(z, { size: "sm", "aria-label": h.nextSlide, "aria-controls": `${n}-track`, onPress: () => l(o + 1), children: /* @__PURE__ */ e(V, {}) })
64
66
  ] }),
65
- /* @__PURE__ */ e("div", { ref: t, id: `${n}-track`, className: "alea-carousel-track alea-focus-ring", tabIndex: 0, "aria-label": u.slides, "aria-live": g && !y ? "off" : "polite", style: { "--alea-per-view": d }, children: f.map((c, a) => /* @__PURE__ */ e("div", { className: "alea-carousel-slide", role: "group", "aria-roledescription": "slide", "aria-label": u.nOfTotal(a + 1, N), "aria-hidden": a < i || a >= i + d ? !0 : void 0, ...re(a < i || a >= i + d), children: c }, a)) }),
66
- b && m > 1 && /* @__PURE__ */ e("div", { className: "alea-carousel-dots", role: "group", "aria-label": u.chooseSlide, children: Array.from({ length: m }, (c, a) => /* @__PURE__ */ e("button", { type: "button", className: "alea-carousel-dot alea-focus-ring", "aria-label": u.slideN(a + 1), "aria-current": a === i ? "true" : void 0, onClick: () => l(a) }, a)) })
67
+ /* @__PURE__ */ e("div", { ref: p, id: `${n}-track`, className: "alea-carousel-track alea-focus-ring", tabIndex: 0, "aria-label": h.slides, "aria-live": g && !y ? "off" : "polite", style: { "--alea-per-view": m }, children: c.map((d, a) => /* @__PURE__ */ e("div", { className: "alea-carousel-slide", role: "group", "aria-roledescription": "slide", "aria-label": h.nOfTotal(a + 1, N), "aria-hidden": a < o || a >= o + m ? !0 : void 0, ...ne(a < o || a >= o + m), children: d }, a)) }),
68
+ b && u > 1 && /* @__PURE__ */ e("div", { className: "alea-carousel-dots", role: "group", "aria-label": h.chooseSlide, children: Array.from({ length: u }, (d, a) => /* @__PURE__ */ e("button", { type: "button", className: "alea-carousel-dot alea-focus-ring", "aria-label": h.slideN(a + 1), "aria-current": a === o ? "true" : void 0, onClick: () => l(a) }, a)) })
67
69
  ]
68
70
  }
69
71
  );
70
72
  }
71
- function be({ src: f, alt: r, width: s, height: d, preview: b = !0, fallback: k, fit: u = "cover", radius: t = "md", srcSet: i, sizes: v, ratio: g, priority: p, placeholder: y, loadingEffect: o = "shimmer", isLoading: N, className: m }) {
72
- const n = R(), [l, c] = C("loading"), [a, w] = C(!1), [x, I] = C(1), M = o === "matrix", $ = !!N || l === "loading", E = N ? "loading" : l, Q = f ? /* @__PURE__ */ e("img", { src: f, srcSet: i, sizes: v, alt: r, loading: p ? "eager" : "lazy", decoding: p ? "sync" : "async", fetchPriority: p ? "high" : void 0, onLoad: () => c("ok"), onError: () => c("error"), style: { objectFit: u } }) : null, T = y ? /^(data:|https?:|\/)/.test(y) ? { backgroundImage: `url(${y})`, backgroundSize: "cover" } : { background: y } : null, A = /* @__PURE__ */ h("span", { className: z("alea-image", m), "data-state": E, "data-effect": M ? "matrix" : void 0, "aria-busy": $ || void 0, "data-radius": t, "data-placeholder": T ? !0 : void 0, style: { width: s, height: d, aspectRatio: g ? String(g) : void 0, ...l === "loading" && T ? T : {} }, children: [
73
- M && l !== "error" && /* @__PURE__ */ e(le, {}),
73
+ function Ne({ src: c, alt: r, width: s, height: m, preview: b = !0, fallback: w, fit: h = "cover", radius: p = "md", srcSet: o, sizes: t, ratio: g, priority: v, placeholder: y, loadingEffect: i = "shimmer", isLoading: N, className: u }) {
74
+ const n = R(), [l, d] = x("loading"), [a, k] = x(!1), [C, P] = x(1), M = i === "matrix", $ = !!N || l === "loading", E = N ? "loading" : l, Z = c ? /* @__PURE__ */ e("img", { src: c, srcSet: o, sizes: t, alt: r, loading: v ? "eager" : "lazy", decoding: v ? "sync" : "async", fetchPriority: v ? "high" : void 0, onLoad: () => d("ok"), onError: () => d("error"), style: { objectFit: h } }) : null, T = y ? /^(data:|https?:|\/)/.test(y) ? { backgroundImage: `url(${y})`, backgroundSize: "cover" } : { background: y } : null, A = /* @__PURE__ */ f("span", { className: I("alea-image", u), "data-state": E, "data-effect": M ? "matrix" : void 0, "aria-busy": $ || void 0, "data-radius": p, "data-placeholder": T ? !0 : void 0, style: { width: s, height: m, aspectRatio: g ? String(g) : void 0, ...l === "loading" && T ? T : {} }, children: [
75
+ M && l !== "error" && /* @__PURE__ */ e(re, {}),
74
76
  M && /* @__PURE__ */ e("span", { role: "status", className: "alea-visually-hidden", children: $ ? n.loading : "" }),
75
- l === "error" ? k ?? /* @__PURE__ */ h("span", { className: "alea-image-fallback", children: [
76
- /* @__PURE__ */ e(V, { size: 22, "aria-hidden": "true" }),
77
+ l === "error" ? w ?? /* @__PURE__ */ f("span", { className: "alea-image-fallback", children: [
78
+ /* @__PURE__ */ e(ee, { size: 22, "aria-hidden": "true" }),
77
79
  /* @__PURE__ */ e("span", { children: n.imageFailed(r || "") })
78
- ] }) : Q
80
+ ] }) : Z
79
81
  ] });
80
- return !b || l === "error" || N || !f ? A : /* @__PURE__ */ h(B, { children: [
82
+ return !b || l === "error" || N || !c ? A : /* @__PURE__ */ f(B, { children: [
81
83
  /* @__PURE__ */ e("button", { type: "button", className: "alea-image-button alea-focus-ring", onClick: () => {
82
- I(1), w(!0);
83
- }, "aria-label": n.viewLarger(r || n.image.toLowerCase()), style: { width: s, height: d }, children: A }),
84
- /* @__PURE__ */ e(W, { isOpen: a, onOpenChange: w, size: "full", className: "alea-image-overlay", children: /* @__PURE__ */ e(j, { "aria-label": r || n.imagePreview, hideClose: !0, className: "alea-image-dialog", children: ({ close: Z }) => /* @__PURE__ */ h(B, { children: [
85
- /* @__PURE__ */ h("div", { className: "alea-image-tools", children: [
86
- /* @__PURE__ */ e(P, { "aria-label": n.zoomOut, variant: "secondary", isDisabled: x <= 0.5, onPress: () => I((q) => Math.max(0.5, q - 0.25)), children: /* @__PURE__ */ e(ee, {}) }),
87
- /* @__PURE__ */ h("span", { className: "alea-image-zoom", "aria-live": "polite", children: [
88
- Math.round(x * 100),
84
+ P(1), k(!0);
85
+ }, "aria-label": n.viewLarger(r || n.image.toLowerCase()), style: { width: s, height: m }, children: A }),
86
+ /* @__PURE__ */ e(j, { isOpen: a, onOpenChange: k, size: "full", className: "alea-image-overlay", children: /* @__PURE__ */ e(Q, { "aria-label": r || n.imagePreview, hideClose: !0, className: "alea-image-dialog", children: ({ close: H }) => /* @__PURE__ */ f(B, { children: [
87
+ /* @__PURE__ */ f("div", { className: "alea-image-tools", children: [
88
+ /* @__PURE__ */ e(z, { "aria-label": n.zoomOut, variant: "secondary", isDisabled: C <= 0.5, onPress: () => P((q) => Math.max(0.5, q - 0.25)), children: /* @__PURE__ */ e(ae, {}) }),
89
+ /* @__PURE__ */ f("span", { className: "alea-image-zoom", "aria-live": "polite", children: [
90
+ Math.round(C * 100),
89
91
  "%"
90
92
  ] }),
91
- /* @__PURE__ */ e(P, { "aria-label": n.zoomIn, variant: "secondary", isDisabled: x >= 3, onPress: () => I((q) => Math.min(3, q + 0.25)), children: /* @__PURE__ */ e(ae, {}) }),
92
- /* @__PURE__ */ e(P, { "aria-label": n.close, variant: "secondary", onPress: Z, children: /* @__PURE__ */ e(te, {}) })
93
+ /* @__PURE__ */ e(z, { "aria-label": n.zoomIn, variant: "secondary", isDisabled: C >= 3, onPress: () => P((q) => Math.min(3, q + 0.25)), children: /* @__PURE__ */ e(te, {}) }),
94
+ /* @__PURE__ */ e(z, { "aria-label": n.close, variant: "secondary", onPress: H, children: /* @__PURE__ */ e(le, {}) })
93
95
  ] }),
94
- /* @__PURE__ */ e("div", { className: "alea-image-stage", children: /* @__PURE__ */ e("img", { src: f, alt: r, style: { transform: `scale(${x})` } }) })
96
+ /* @__PURE__ */ e("div", { className: "alea-image-stage", children: /* @__PURE__ */ e("img", { src: c, alt: r, style: { transform: `scale(${C})` } }) })
95
97
  ] }) }) })
96
98
  ] });
97
99
  }
98
- let D = null, ne = null;
99
- function se() {
100
- return ne ?? (ne = import("qrcode-generator").then((f) => {
101
- const r = f.default ?? f;
100
+ let D = null, se = null;
101
+ function oe() {
102
+ return se ?? (se = import("qrcode-generator").then((c) => {
103
+ const r = c.default ?? c;
102
104
  return r.stringToBytes = r.stringToBytesFuncs["UTF-8"], D = r;
103
105
  }));
104
106
  }
105
- const Ne = F(function({ value: r, size: s = 160, level: d = "M", logo: b, label: k, color: u = "#111011", background: t = "#ffffff", className: i, style: v, ...g }, p) {
106
- const y = R(), [o, N] = C(D ? { qrcode: D } : null);
107
+ const ye = O(function({ value: r, size: s = 160, level: m = "M", logo: b, label: w, color: h = "#111011", background: p = "#ffffff", className: o, style: t, ...g }, v) {
108
+ const y = R(), [i, N] = x(D ? { qrcode: D } : null);
107
109
  L(() => {
108
- if (o) return;
110
+ if (i) return;
109
111
  let n = !0;
110
- return se().then((l) => {
112
+ return oe().then((l) => {
111
113
  n && N({ qrcode: l });
112
114
  }, () => {
113
115
  }), () => {
114
116
  n = !1;
115
117
  };
116
- }, [o]);
117
- const m = O(() => {
118
- if (!o) return null;
119
- const n = o.qrcode(0, d);
118
+ }, [i]);
119
+ const u = W(() => {
120
+ if (!i) return null;
121
+ const n = i.qrcode(0, m);
120
122
  n.addData(r), n.make();
121
123
  const l = n.getModuleCount();
122
- let c = "";
123
- for (let a = 0; a < l; a++) for (let w = 0; w < l; w++) n.isDark(a, w) && (c += `M${w + 4} ${a + 4}h1v1h-1z`);
124
- return { d: c, n: l + 8 };
125
- }, [o, r, d]);
126
- return /* @__PURE__ */ h("span", { ref: p, ...g, className: z("alea-qr", i), style: { width: s, height: s, ...v }, role: "img", "aria-label": k ?? g["aria-label"] ?? y.qrCode(r), children: [
127
- m && /* @__PURE__ */ h("svg", { viewBox: `0 0 ${m.n} ${m.n}`, width: s, height: s, shapeRendering: "crispEdges", "aria-hidden": "true", children: [
128
- /* @__PURE__ */ e("rect", { width: m.n, height: m.n, fill: t, rx: m.n * 0.06 }),
129
- /* @__PURE__ */ e("path", { d: m.d, fill: u })
124
+ let d = "";
125
+ for (let a = 0; a < l; a++) for (let k = 0; k < l; k++) n.isDark(a, k) && (d += `M${k + 4} ${a + 4}h1v1h-1z`);
126
+ return { d, n: l + 8 };
127
+ }, [i, r, m]);
128
+ return /* @__PURE__ */ f("span", { ref: v, ...g, className: I("alea-qr", o), style: { width: s, height: s, ...t }, role: "img", "aria-label": w ?? g["aria-label"] ?? y.qrCode(r), children: [
129
+ u && /* @__PURE__ */ f("svg", { viewBox: `0 0 ${u.n} ${u.n}`, width: s, height: s, shapeRendering: "crispEdges", "aria-hidden": "true", children: [
130
+ /* @__PURE__ */ e("rect", { width: u.n, height: u.n, fill: p, rx: u.n * 0.06 }),
131
+ /* @__PURE__ */ e("path", { d: u.d, fill: h })
130
132
  ] }),
131
- b && m && /* @__PURE__ */ e("span", { className: "alea-qr-logo", "aria-hidden": "true", style: { background: t }, children: b })
133
+ b && u && /* @__PURE__ */ e("span", { className: "alea-qr-logo", "aria-hidden": "true", style: { background: p }, children: b })
132
134
  ] });
133
135
  });
134
- function ye({ children: f, text: r, rotate: s = -22, gap: d = 120, opacity: b = 0.08, className: k }) {
135
- const u = O(() => {
136
- const t = d + r.length * 7.5, i = d, v = `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${i}"><text x="50%" y="50%" fill="currentColor" font-family="Inter, sans-serif" font-size="14" font-weight="600" text-anchor="middle" dominant-baseline="middle" transform="rotate(${s} ${t / 2} ${i / 2})">${r.replace(/[<&>"]/g, (g) => ({ "<": "&lt;", "&": "&amp;", ">": "&gt;", '"': "&quot;" })[g])}</text></svg>`;
137
- return `url("data:image/svg+xml,${encodeURIComponent(v)}")`;
138
- }, [r, s, d]);
139
- return /* @__PURE__ */ h("div", { className: z("alea-watermark", k), children: [
140
- f,
141
- /* @__PURE__ */ e("span", { className: "alea-watermark-layer", "aria-hidden": "true", style: { WebkitMaskImage: u, maskImage: u, opacity: b } })
136
+ function we({ children: c, text: r, rotate: s = -22, gap: m = 120, opacity: b = 0.08, className: w }) {
137
+ const h = W(() => {
138
+ const p = m + r.length * 7.5, o = m, t = `<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${o}"><text x="50%" y="50%" fill="currentColor" font-family="Inter, sans-serif" font-size="14" font-weight="600" text-anchor="middle" dominant-baseline="middle" transform="rotate(${s} ${p / 2} ${o / 2})">${r.replace(/[<&>"]/g, (g) => ({ "<": "&lt;", "&": "&amp;", ">": "&gt;", '"': "&quot;" })[g])}</text></svg>`;
139
+ return `url("data:image/svg+xml,${encodeURIComponent(t)}")`;
140
+ }, [r, s, m]);
141
+ return /* @__PURE__ */ f("div", { className: I("alea-watermark", w), children: [
142
+ c,
143
+ /* @__PURE__ */ e("span", { className: "alea-watermark-layer", "aria-hidden": "true", style: { WebkitMaskImage: h, maskImage: h, opacity: b } })
142
144
  ] });
143
145
  }
144
- const we = F(function({ steps: r, isOpen: s, onOpenChange: d, onFinish: b, className: k, style: u }, t) {
145
- const i = R(), [v, g] = C(0), [p, y] = C(null), o = r[v];
146
+ const ke = O(function({ steps: r, isOpen: s, onOpenChange: m, onFinish: b, className: w, style: h }, p) {
147
+ const o = R(), [t, g] = x(0), [v, y] = x(null), i = r[t];
146
148
  if (L(() => {
147
149
  s && g(0);
148
- }, [s]), _(() => {
149
- if (!s || !o) return;
150
- const n = typeof o.target == "string" ? document.querySelector(o.target) : o.target || null;
150
+ }, [s]), G(() => {
151
+ if (!s || !i) return;
152
+ const n = typeof i.target == "string" ? document.querySelector(i.target) : i.target || null;
151
153
  if (!n) {
152
154
  y(null);
153
155
  return;
@@ -155,34 +157,34 @@ const we = F(function({ steps: r, isOpen: s, onOpenChange: d, onFinish: b, class
155
157
  n.scrollIntoView({ block: "center", behavior: "smooth" });
156
158
  const l = () => y(n.getBoundingClientRect());
157
159
  l();
158
- const c = setTimeout(l, 350);
160
+ const d = setTimeout(l, 350);
159
161
  return window.addEventListener("resize", l), window.addEventListener("scroll", l, !0), () => {
160
- clearTimeout(c), window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
162
+ clearTimeout(d), window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
161
163
  };
162
- }, [s, v, o]), !o) return null;
163
- const N = 8, m = p ? { top: Math.min(window.innerHeight - 220, p.bottom + N + 12), left: Math.max(16, Math.min(window.innerWidth - 336, p.left)) } : { top: "50%", left: "50%", transform: "translate(-50%, -50%)" };
164
- return /* @__PURE__ */ e(W, { isOpen: s, onOpenChange: d, isDismissable: !1, className: "alea-tour-overlay", children: /* @__PURE__ */ e(j, { ref: t, style: u, "aria-label": typeof o.title == "string" ? o.title : i.stepN(v + 1), hideClose: !0, className: z("alea-tour", k), children: ({ close: n }) => /* @__PURE__ */ h(B, { children: [
165
- p && /* @__PURE__ */ e("span", { className: "alea-tour-spot", "aria-hidden": "true", style: { top: p.top - N, left: p.left - N, width: p.width + N * 2, height: p.height + N * 2 } }),
166
- /* @__PURE__ */ h("div", { className: "alea-tour-card", style: m, children: [
167
- /* @__PURE__ */ e("p", { className: "alea-tour-count", children: i.stepNOfTotal(v + 1, r.length) }),
168
- /* @__PURE__ */ e("h2", { className: "alea-tour-title", children: o.title }),
169
- o.content && /* @__PURE__ */ e("div", { className: "alea-tour-text", children: o.content }),
170
- /* @__PURE__ */ h("div", { className: "alea-tour-actions", children: [
171
- /* @__PURE__ */ e(S, { size: "sm", variant: "ghost", onPress: n, children: i.skip }),
164
+ }, [s, t, i]), !i) return null;
165
+ const N = 8, u = v ? { top: Math.min(window.innerHeight - 220, v.bottom + N + 12), left: Math.max(16, Math.min(window.innerWidth - 336, v.left)) } : { top: "50%", left: "50%", transform: "translate(-50%, -50%)", "--alea-pop-x": "-50%", "--alea-pop-y": "-50%" };
166
+ return /* @__PURE__ */ e(j, { isOpen: s, onOpenChange: m, isDismissable: !1, className: "alea-tour-overlay", children: /* @__PURE__ */ e(Q, { ref: p, style: h, "aria-label": typeof i.title == "string" ? i.title : o.stepN(t + 1), hideClose: !0, className: I("alea-tour", w), children: ({ close: n }) => /* @__PURE__ */ f(B, { children: [
167
+ v && /* @__PURE__ */ e("span", { className: "alea-tour-spot", "aria-hidden": "true", style: { top: v.top - N, left: v.left - N, width: v.width + N * 2, height: v.height + N * 2 } }),
168
+ /* @__PURE__ */ f("div", { className: "alea-tour-card", style: u, "data-centered": v ? void 0 : "", children: [
169
+ /* @__PURE__ */ e("p", { className: "alea-tour-count", children: o.stepNOfTotal(t + 1, r.length) }),
170
+ /* @__PURE__ */ e("h2", { className: "alea-tour-title", children: i.title }),
171
+ i.content && /* @__PURE__ */ e("div", { className: "alea-tour-text", children: i.content }),
172
+ /* @__PURE__ */ f("div", { className: "alea-tour-actions", children: [
173
+ /* @__PURE__ */ e(S, { size: "sm", variant: "ghost", onPress: n, children: o.skip }),
172
174
  /* @__PURE__ */ e("span", { className: "alea-tour-spacer" }),
173
- v > 0 && /* @__PURE__ */ e(S, { size: "sm", variant: "ghost", onPress: () => g((l) => l - 1), children: i.back }),
175
+ t > 0 && /* @__PURE__ */ e(S, { size: "sm", variant: "ghost", onPress: () => g((l) => l - 1), children: o.back }),
174
176
  /* @__PURE__ */ e(S, { size: "sm", autoFocus: !0, onPress: () => {
175
- v < r.length - 1 ? g((l) => l + 1) : (b == null || b(), n());
176
- }, children: v < r.length - 1 ? i.next : i.done })
177
+ t < r.length - 1 ? g((l) => l + 1) : (b == null || b(), n());
178
+ }, children: t < r.length - 1 ? o.next : o.done })
177
179
  ] })
178
180
  ] })
179
181
  ] }) }) });
180
182
  });
181
183
  export {
182
- pe as Carousel,
183
- be as Image,
184
- Ne as QRCode,
185
- ve as Timeline,
186
- we as Tour,
187
- ye as Watermark
184
+ be as Carousel,
185
+ Ne as Image,
186
+ ye as QRCode,
187
+ pe as Timeline,
188
+ ke as Tour,
189
+ we as Watermark
188
190
  };
@@ -48,8 +48,8 @@ export interface EditableProps {
48
48
  /** Text that turns into a field when clicked: rename in place. Enter saves, Escape cancels. */
49
49
  export declare function Editable({ value, defaultValue, onSave, label, placeholder, multiline, className }: EditableProps): import("react").JSX.Element;
50
50
  export interface FormattedNumberProps {
51
- /** The number to format. */
52
- value: number;
51
+ /** The number to format. A decimal string ("1234567890123456.78") is formatted exactly, without going through a float. */
52
+ value: number | string;
53
53
  /** Intl.NumberFormat options: { style: 'currency', currency: 'USD' }, { notation: 'compact' }, { style: 'percent' }. */
54
54
  format?: Intl.NumberFormatOptions;
55
55
  /** A BCP 47 locale. Default the browser's. */
@@ -1,28 +1,29 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as a, Fragment as I } from "react/jsx-runtime";
3
- import { useState as k, useRef as D, useEffect as z, useId as T, forwardRef as M } from "react";
4
- import { Disclosure as j, Button as A, DisclosurePanel as F } from "react-aria-components";
5
- import { X as P, ChevronDown as K, Pencil as O, Check as B } from "lucide-react";
2
+ import { jsxs as u, jsx as a, Fragment as T } from "react/jsx-runtime";
3
+ import { useState as k, useRef as D, useEffect as z, useId as j, forwardRef as M } from "react";
4
+ import { Disclosure as A, Button as I, DisclosurePanel as K } from "react-aria-components";
5
+ import { X as P, ChevronDown as O, Pencil as F, Check as B } from "lucide-react";
6
6
  import { cx as m } from "../../utils/cx.js";
7
- import { Spinner as H } from "../feedback/Spinner.js";
7
+ import { formatDecimal as H } from "../../utils/decimal.js";
8
+ import { Spinner as L } from "../feedback/Spinner.js";
8
9
  import { useStrings as $ } from "../../i18n/strings.js";
9
- import { inertProps as L } from "../../utils/inert.js";
10
- const Z = M(function({ target: t = "main", children: l, className: s, ...c }, r) {
10
+ import { inertProps as R } from "../../utils/inert.js";
11
+ const aa = M(function({ target: t = "main", children: l, className: s, ...c }, r) {
11
12
  const o = $();
12
13
  return l ?? (l = o.skipToContent), /* @__PURE__ */ a("a", { ref: r, href: `#${t}`, ...c, className: m("alea-skip-link", s), children: l });
13
- }), _ = M(function({ children: t, as: l = "span", className: s, ...c }, r) {
14
+ }), ea = M(function({ children: t, as: l = "span", className: s, ...c }, r) {
14
15
  return /* @__PURE__ */ a(l, { ref: r, ...c, className: m("alea-visually-hidden", s), children: t });
15
16
  });
16
- function aa({ title: e, children: t, isExpanded: l, defaultExpanded: s, onExpandedChange: c, className: r }) {
17
- return /* @__PURE__ */ u(j, { isExpanded: l, defaultExpanded: s, onExpandedChange: c, className: m("alea-collapsible", r), children: [
18
- /* @__PURE__ */ u(A, { slot: "trigger", className: "alea-collapsible-trigger alea-focus-ring", children: [
19
- /* @__PURE__ */ a(K, { size: 16, "aria-hidden": "true", className: "alea-collapsible-chevron" }),
17
+ function la({ title: e, children: t, isExpanded: l, defaultExpanded: s, onExpandedChange: c, className: r }) {
18
+ return /* @__PURE__ */ u(A, { isExpanded: l, defaultExpanded: s, onExpandedChange: c, className: m("alea-collapsible", r), children: [
19
+ /* @__PURE__ */ u(I, { slot: "trigger", className: "alea-collapsible-trigger alea-focus-ring", children: [
20
+ /* @__PURE__ */ a(O, { size: 16, "aria-hidden": "true", className: "alea-collapsible-chevron" }),
20
21
  e
21
22
  ] }),
22
- /* @__PURE__ */ a(F, { className: "alea-collapsible-panel", children: /* @__PURE__ */ a("div", { className: "alea-collapsible-content", children: t }) })
23
+ /* @__PURE__ */ a(K, { className: "alea-collapsible-panel", children: /* @__PURE__ */ a("div", { className: "alea-collapsible-content", children: t }) })
23
24
  ] });
24
25
  }
25
- function ea({ value: e, defaultValue: t = "", onSave: l, label: s, placeholder: c = "Empty", multiline: r, className: o }) {
26
+ function ta({ value: e, defaultValue: t = "", onSave: l, label: s, placeholder: c = "Empty", multiline: r, className: o }) {
26
27
  const p = $(), [h, g] = k(t), n = e ?? h, [i, f] = k(!1), [N, C] = k(n), [v, w] = k(!1), x = D(null), b = D(null);
27
28
  z(() => {
28
29
  var d, q;
@@ -48,7 +49,7 @@ function ea({ value: e, defaultValue: t = "", onSave: l, label: s, placeholder:
48
49
  C(n), f(!0);
49
50
  }, children: [
50
51
  /* @__PURE__ */ a("span", { className: "alea-editable-text", children: n || c }),
51
- /* @__PURE__ */ a(O, { size: 14, "aria-hidden": "true", className: "alea-editable-icon" })
52
+ /* @__PURE__ */ a(F, { size: 14, "aria-hidden": "true", className: "alea-editable-icon" })
52
53
  ] });
53
54
  const E = r ? "textarea" : "input";
54
55
  return /* @__PURE__ */ u("span", { className: m("alea-editable-edit", o), children: [
@@ -73,11 +74,11 @@ function ea({ value: e, defaultValue: t = "", onSave: l, label: s, placeholder:
73
74
  /* @__PURE__ */ a("button", { type: "button", className: "alea-editable-btn alea-focus-ring", "aria-label": p.cancel, onClick: S, children: /* @__PURE__ */ a(P, { size: 14 }) })
74
75
  ] });
75
76
  }
76
- function la({ value: e, format: t, locale: l }) {
77
- return /* @__PURE__ */ a(I, { children: new Intl.NumberFormat(l, t).format(e) });
77
+ function na({ value: e, format: t, locale: l }) {
78
+ return /* @__PURE__ */ a(T, { children: H(e, l, t) });
78
79
  }
79
- const R = (e) => String(e).padStart(2, "0");
80
- function ta({ to: e, label: t, onEnd: l, showDays: s, className: c }) {
80
+ const V = (e) => String(e).padStart(2, "0");
81
+ function sa({ to: e, label: t, onEnd: l, showDays: s, className: c }) {
81
82
  const r = $(), o = typeof e == "number" ? e : e.getTime(), [p, h] = k(() => Date.now()), g = D(!1);
82
83
  z(() => {
83
84
  const b = setInterval(() => h(Date.now()), 1e3);
@@ -91,19 +92,19 @@ function ta({ to: e, label: t, onEnd: l, showDays: s, className: c }) {
91
92
  return /* @__PURE__ */ u("div", { className: m("alea-stat alea-countdown", c), children: [
92
93
  /* @__PURE__ */ a("span", { className: "alea-stat-label", children: t }),
93
94
  /* @__PURE__ */ a("span", { className: "alea-stat-value alea-countdown-value", "aria-hidden": "true", children: w.map(([b, y]) => /* @__PURE__ */ u("span", { children: [
94
- /* @__PURE__ */ a("b", { children: y === "d" ? b : R(b) }),
95
+ /* @__PURE__ */ a("b", { children: y === "d" ? b : V(b) }),
95
96
  /* @__PURE__ */ a("small", { children: y })
96
97
  ] }, y)) }),
97
98
  /* @__PURE__ */ a("span", { className: "alea-visually-hidden", "aria-live": "polite", children: n === 0 ? r.ended : x })
98
99
  ] });
99
100
  }
100
- function na({ tone: e = "neutral", children: t, pulse: l, className: s }) {
101
+ function ra({ tone: e = "neutral", children: t, pulse: l, className: s }) {
101
102
  return /* @__PURE__ */ u("span", { className: m("alea-status", s), "data-tone": e, children: [
102
103
  /* @__PURE__ */ a("span", { className: "alea-status-dot", "data-pulse": l || void 0, "aria-hidden": "true" }),
103
104
  t
104
105
  ] });
105
106
  }
106
- function sa({ color: e, label: t, size: l = 28, shape: s = "circle", showValue: c, className: r, style: o }) {
107
+ function ia({ color: e, label: t, size: l = 28, shape: s = "circle", showValue: c, className: r, style: o }) {
107
108
  const p = /* @__PURE__ */ a("span", { className: "alea-swatch", "data-shape": s, role: "img", "aria-label": t, style: { width: l, height: l, "--alea-swatch": e, ...o } });
108
109
  return c ? /* @__PURE__ */ u("span", { className: m("alea-swatch-wrap", r), "data-labeled": !0, children: [
109
110
  p,
@@ -111,15 +112,15 @@ function sa({ color: e, label: t, size: l = 28, shape: s = "circle", showValue:
111
112
  /* @__PURE__ */ a("code", { className: "alea-swatch-value", children: e })
112
113
  ] }) : /* @__PURE__ */ a("span", { className: m("alea-swatch-wrap", r), children: p });
113
114
  }
114
- function ra({ isLoading: e, children: t, label: l, blur: s = !0, className: c }) {
115
+ function ca({ isLoading: e, children: t, label: l, blur: s = !0, className: c }) {
115
116
  const r = $();
116
117
  return l ?? (l = r.loading), /* @__PURE__ */ u("div", { className: m("alea-loading", c), "aria-busy": e || void 0, children: [
117
- /* @__PURE__ */ a("div", { className: "alea-loading-content", ...L(e), children: t }),
118
- e && /* @__PURE__ */ a("div", { className: "alea-loading-overlay", "data-blur": s || void 0, children: /* @__PURE__ */ a(H, { size: "md", "aria-label": l }) })
118
+ /* @__PURE__ */ a("div", { className: "alea-loading-content", ...R(e), children: t }),
119
+ e && /* @__PURE__ */ a("div", { className: "alea-loading-overlay", "data-blur": s || void 0, children: /* @__PURE__ */ a(L, { size: "md", "aria-label": l }) })
119
120
  ] });
120
121
  }
121
- function ia({ segments: e, total: t, label: l, valueFormat: s = (o) => String(o), showLegend: c = !0, className: r }) {
122
- const o = T(), p = t ?? e.reduce((n, i) => n + i.value, 0), h = (n, i) => n.color || `var(--alea-chart-${i % 8 + 1})`, g = e.reduce((n, i) => n + i.value, 0);
122
+ function oa({ segments: e, total: t, label: l, valueFormat: s = (o) => String(o), showLegend: c = !0, className: r }) {
123
+ const o = j(), p = t ?? e.reduce((n, i) => n + i.value, 0), h = (n, i) => n.color || `var(--alea-chart-${i % 8 + 1})`, g = e.reduce((n, i) => n + i.value, 0);
123
124
  return /* @__PURE__ */ u("div", { className: m("alea-progress-seg", r), children: [
124
125
  /* @__PURE__ */ u("div", { className: "alea-progress-seg-head", children: [
125
126
  /* @__PURE__ */ a("span", { id: o, className: "alea-label", children: l }),
@@ -137,22 +138,22 @@ function ia({ segments: e, total: t, label: l, valueFormat: s = (o) => String(o)
137
138
  ] }, n.label)) })
138
139
  ] });
139
140
  }
140
- function ca({ children: e, cite: t, source: l, className: s }) {
141
+ function da({ children: e, cite: t, source: l, className: s }) {
141
142
  return /* @__PURE__ */ u("figure", { className: m("alea-blockquote", s), children: [
142
143
  /* @__PURE__ */ a("blockquote", { cite: l, children: e }),
143
144
  t && /* @__PURE__ */ a("figcaption", { children: t })
144
145
  ] });
145
146
  }
146
- function oa({ items: e, marker: t = "bullet", spacing: l = "md", className: s }) {
147
+ function ua({ items: e, marker: t = "bullet", spacing: l = "md", className: s }) {
147
148
  return /* @__PURE__ */ a(t === "number" ? "ol" : "ul", { className: m("alea-text-list", s), "data-marker": t, "data-spacing": l, children: e.map((r, o) => /* @__PURE__ */ u("li", { children: [
148
149
  t === "check" && /* @__PURE__ */ a(B, { size: 16, "aria-hidden": "true", className: "alea-text-list-check" }),
149
150
  /* @__PURE__ */ a("span", { children: r })
150
151
  ] }, o)) });
151
152
  }
152
- function da({ children: e, size: t = "base", className: l }) {
153
+ function ma({ children: e, size: t = "base", className: l }) {
153
154
  return /* @__PURE__ */ a("div", { className: m("alea-prose alea-markdown", l), "data-size": t, children: e });
154
155
  }
155
- function ua({ children: e, tone: t = "accent", action: l, onDismiss: s, className: c, "aria-label": r }) {
156
+ function pa({ children: e, tone: t = "accent", action: l, onDismiss: s, className: c, "aria-label": r }) {
156
157
  const o = $();
157
158
  r ?? (r = o.announcement);
158
159
  const [p, h] = k(!0);
@@ -165,18 +166,18 @@ function ua({ children: e, tone: t = "accent", action: l, onDismiss: s, classNam
165
166
  ] }) : null;
166
167
  }
167
168
  export {
168
- ua as Banner,
169
- ca as Blockquote,
170
- aa as Collapsible,
171
- sa as ColorSwatch,
172
- ta as Countdown,
173
- ea as Editable,
174
- la as FormattedNumber,
175
- oa as List,
176
- ra as LoadingOverlay,
177
- ia as ProgressSegments,
178
- da as Prose,
179
- Z as SkipLink,
180
- na as Status,
181
- _ as VisuallyHidden
169
+ pa as Banner,
170
+ da as Blockquote,
171
+ la as Collapsible,
172
+ ia as ColorSwatch,
173
+ sa as Countdown,
174
+ ta as Editable,
175
+ na as FormattedNumber,
176
+ ua as List,
177
+ ca as LoadingOverlay,
178
+ oa as ProgressSegments,
179
+ ma as Prose,
180
+ aa as SkipLink,
181
+ ra as Status,
182
+ ea as VisuallyHidden
182
183
  };
@@ -51,12 +51,14 @@ export interface PaginationProps {
51
51
  }
52
52
  /** Move through pages of results. The current page is marked for screen readers. */
53
53
  export declare function Pagination({ page, total, onChange, siblings, appearance, size, showFirstLast, pageSize, pageSizeOptions, onPageSizeChange, totalItems, showJumper, className, 'aria-label': label }: PaginationProps): import("react").JSX.Element;
54
+ /** Every state a step can show. `done`, `current` and `upcoming` come from `current`; the rest are set on the step. */
55
+ export type StepStatus = 'done' | 'current' | 'upcoming' | 'skipped' | 'cancelled' | 'error' | 'warning';
54
56
  export interface Step {
55
57
  id: Key;
56
58
  title: ReactNode;
57
59
  description?: ReactNode;
58
- /** Overrides the status from current: error (something to fix) or warning. */
59
- status?: 'error' | 'warning';
60
+ /** Overrides the status from current: error (something to fix), warning, or skipped (a step the person passed over on purpose; it shows a dash and counts as left behind), or cancelled (a step that will not happen: dotted and muted, with a ban mark). */
61
+ status?: Extract<StepStatus, 'error' | 'warning' | 'skipped' | 'cancelled'>;
60
62
  /** An icon instead of the number (with variant="icons"). */
61
63
  icon?: ReactNode;
62
64
  /** Marks the step as optional. */
@@ -75,8 +77,12 @@ export interface StepsProps {
75
77
  'aria-label'?: string;
76
78
  /** Extra class names for the root element. */
77
79
  className?: string;
78
- /** Horizontal steps turn vertical on phones (below 640 px). Default true. */
79
- responsive?: boolean;
80
+ /** Horizontal steps turn vertical on phones (below 640 px). Default true. Use 'scroll' to keep them horizontal on phones: the row scrolls sideways (focusable for the keyboard) and opens with the current step in view. */
81
+ responsive?: boolean | 'scroll';
82
+ /** Writes each step's status in words under its title (Done, In progress, Pending, Skipped, Has an error, Needs attention), so the color and icon are never the only signal. */
83
+ showStatus?: boolean;
84
+ /** Your own words for this list's states, for the visible status and the hidden one read by screen readers (for example `{ done: 'Completed', current: 'Current stage', cancelled: 'Cancelled here' }`). A state you leave out keeps its default. */
85
+ stateLabels?: Partial<Record<StepStatus, string>>;
80
86
  /** sm (24 px markers) or md (32 px, default). */
81
87
  size?: 'sm' | 'md';
82
88
  /** numbers (default), dots (small markers, for compact flows) or icons (each step's icon). */
@@ -85,4 +91,4 @@ export interface StepsProps {
85
91
  labelPlacement?: 'end' | 'below';
86
92
  }
87
93
  /** Progress through a known sequence: done, current and upcoming steps. */
88
- export declare function Steps({ steps, current, orientation, responsive, onStepPress, size, variant, labelPlacement, className, 'aria-label': label }: StepsProps): import("react").JSX.Element;
94
+ export declare function Steps({ steps, current, orientation, responsive, showStatus, stateLabels, onStepPress, size, variant, labelPlacement, className, 'aria-label': label }: StepsProps): import("react").JSX.Element;