@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,121 +1,138 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as c, Fragment as D } from "react/jsx-runtime";
3
- import { Children as j, isValidElement as E, useMemo as P } from "react";
4
- import { Breadcrumb as B, Link as R, Button as z, Breadcrumbs as L } from "react-aria-components";
5
- import { ChevronsLeft as O, ChevronLeft as T, ChevronRight as _, ChevronsRight as A, X as K, Check as V } from "lucide-react";
6
- import { DropdownMenu as W, MenuItem as X } from "../menu/Menu.js";
7
- import { withBase as q, cx as k } from "../../utils/cx.js";
8
- import { useStrings as M } from "../../i18n/strings.js";
9
- function I({ separator: e, maxItems: n, size: h, className: l, children: u, ...m }) {
10
- const o = M();
11
- let d = u;
12
- if (n && typeof u != "function") {
13
- const p = j.toArray(u).filter(E);
14
- if (p.length > n && n >= 2) {
15
- const f = p.slice(1, p.length - (n - 1));
16
- d = [
2
+ import { jsx as e, jsxs as s, Fragment as E } from "react/jsx-runtime";
3
+ import { Children as O, isValidElement as j, useMemo as P, useRef as W, useState as T, useEffect as _ } from "react";
4
+ import { Breadcrumb as D, Link as q, Button as A, Breadcrumbs as K } from "react-aria-components";
5
+ import { ChevronsLeft as V, ChevronLeft as X, ChevronRight as F, ChevronsRight as G, X as H, Ban as Q, Minus as U, Check as Y } from "lucide-react";
6
+ import { DropdownMenu as Z, MenuItem as J } from "../menu/Menu.js";
7
+ import { withBase as S, cx as R } from "../../utils/cx.js";
8
+ import { useStrings as w } from "../../i18n/strings.js";
9
+ function ce({ separator: a, maxItems: i, size: h, className: t, children: o, ...c }) {
10
+ const m = w();
11
+ let u = o;
12
+ if (i && typeof o != "function") {
13
+ const p = O.toArray(o).filter(j);
14
+ if (p.length > i && i >= 2) {
15
+ const N = p.slice(1, p.length - (i - 1));
16
+ u = [
17
17
  p[0],
18
- /* @__PURE__ */ a(B, { className: "alea-crumb", children: /* @__PURE__ */ a(W, { "aria-label": o.showMore, trigger: /* @__PURE__ */ a(z, { className: "alea-crumb-link alea-crumb-more alea-focus-ring", "aria-label": o.showMore, children: "…" }), children: f.map((s, g) => /* @__PURE__ */ a(X, { id: `c${g}`, href: s.props.href, children: s.props.children }, g)) }) }, "__more"),
19
- ...p.slice(p.length - (n - 1))
18
+ /* @__PURE__ */ e(D, { className: "alea-crumb", children: /* @__PURE__ */ e(Z, { "aria-label": m.showMore, trigger: /* @__PURE__ */ e(A, { className: "alea-crumb-link alea-crumb-more alea-focus-ring", "aria-label": m.showMore, children: "…" }), children: N.map((g, v) => /* @__PURE__ */ e(J, { id: `c${v}`, href: g.props.href, children: g.props.children }, v)) }) }, "__more"),
19
+ ...p.slice(p.length - (i - 1))
20
20
  ];
21
21
  }
22
22
  }
23
- return /* @__PURE__ */ a(L, { ...m, className: k("alea-breadcrumbs", l), "data-size": h, "data-separator": e ? void 0 : "chevron", style: { "--alea-crumb-sep": typeof e == "string" ? `"${e}"` : void 0, ...m.style }, children: d });
23
+ return /* @__PURE__ */ e(K, { ...c, className: R("alea-breadcrumbs", t), "data-size": h, "data-separator": a ? void 0 : "chevron", style: { "--alea-crumb-sep": typeof a == "string" ? `"${a}"` : void 0, ...c.style }, children: u });
24
24
  }
25
- function S({ href: e, icon: n, children: h, className: l, ...u }) {
26
- return /* @__PURE__ */ a(B, { ...u, className: q("alea-crumb", l), children: /* @__PURE__ */ c(R, { href: e, className: "alea-crumb-link alea-focus-ring", children: [
27
- n && /* @__PURE__ */ a("span", { className: "alea-crumb-icon", "aria-hidden": "true", children: n }),
25
+ function te({ href: a, icon: i, children: h, className: t, ...o }) {
26
+ return /* @__PURE__ */ e(D, { ...o, className: S("alea-crumb", t), children: a ? /* @__PURE__ */ s(q, { href: a, className: "alea-crumb-link alea-focus-ring", children: [
27
+ i && /* @__PURE__ */ e("span", { className: "alea-crumb-icon", "aria-hidden": "true", children: i }),
28
+ h
29
+ ] }) : /* @__PURE__ */ s("span", { className: "alea-crumb-link", "data-current": !0, "aria-current": "page", children: [
30
+ i && /* @__PURE__ */ e("span", { className: "alea-crumb-icon", "aria-hidden": "true", children: i }),
28
31
  h
29
32
  ] }) });
30
33
  }
31
- function F(e, n, h) {
32
- const l = [], u = Math.max(2, e - h), m = Math.min(n - 1, e + h);
33
- l.push(1), u > 2 && l.push("gap");
34
- for (let o = u; o <= m; o++) l.push(o);
35
- return m < n - 1 && l.push("gap"), n > 1 && l.push(n), l;
34
+ function I(a, i, h) {
35
+ const t = [], o = Math.max(2, a - h), c = Math.min(i - 1, a + h);
36
+ t.push(1), o > 2 && t.push("gap");
37
+ for (let m = o; m <= c; m++) t.push(m);
38
+ return c < i - 1 && t.push("gap"), i > 1 && t.push(i), t;
36
39
  }
37
- function aa({ page: e, total: n, onChange: h, siblings: l = 1, appearance: u = "pages", size: m, showFirstLast: o, pageSize: d, pageSizeOptions: p = [10, 25, 50, 100], onPageSizeChange: f, totalItems: s, showJumper: g, className: t, "aria-label": N }) {
38
- const r = M();
39
- N ?? (N = r.pagination);
40
- const v = P(() => F(e, Math.max(1, n), l), [e, n, l]), b = (i) => h(Math.min(Math.max(1, i), n)), w = d ? (e - 1) * d + 1 : 0, $ = d && s != null ? Math.min(s, e * d) : 0, C = s != null && d || f || g, x = /* @__PURE__ */ c("nav", { "aria-label": N, className: k("alea-pagination", !C && t), "data-size": m, children: [
41
- o && /* @__PURE__ */ a("button", { type: "button", className: "alea-page alea-focus-ring", "data-far": !0, "aria-label": r.firstPage, disabled: e <= 1, onClick: () => b(1), children: /* @__PURE__ */ a(O, { size: 16, "aria-hidden": "true" }) }),
42
- /* @__PURE__ */ a("button", { type: "button", className: "alea-page alea-focus-ring", "aria-label": r.previousPage, disabled: e <= 1, onClick: () => b(e - 1), children: /* @__PURE__ */ a(T, { size: 16, "aria-hidden": "true" }) }),
43
- u === "compact" ? /* @__PURE__ */ a("span", { className: "alea-page-status", "aria-live": "polite", children: r.nOfTotal(e, n) }) : /* @__PURE__ */ a("ul", { children: v.map((i, y) => i === "gap" ? /* @__PURE__ */ a("li", { className: "alea-page-gap", "aria-hidden": "true", children: "…" }, `g${y}`) : /* @__PURE__ */ a("li", { "data-far": v.length > 5 && Math.abs(i - e) > 1 || void 0, children: /* @__PURE__ */ a("button", { type: "button", className: "alea-page alea-focus-ring", "aria-current": i === e ? "page" : void 0, "aria-label": r.pageN(i), onClick: () => b(i), children: i }) }, i)) }),
44
- /* @__PURE__ */ a("button", { type: "button", className: "alea-page alea-focus-ring", "aria-label": r.nextPage, disabled: e >= n, onClick: () => b(e + 1), children: /* @__PURE__ */ a(_, { size: 16, "aria-hidden": "true" }) }),
45
- o && /* @__PURE__ */ a("button", { type: "button", className: "alea-page alea-focus-ring", "data-far": !0, "aria-label": r.lastPage, disabled: e >= n, onClick: () => b(n), children: /* @__PURE__ */ a(A, { size: 16, "aria-hidden": "true" }) })
40
+ function se({ page: a, total: i, onChange: h, siblings: t = 1, appearance: o = "pages", size: c, showFirstLast: m, pageSize: u, pageSizeOptions: p = [10, 25, 50, 100], onPageSizeChange: N, totalItems: g, showJumper: v, className: f, "aria-label": k }) {
41
+ const d = w();
42
+ k ?? (k = d.pagination);
43
+ const y = P(() => I(a, Math.max(1, i), t), [a, i, t]), b = (r) => h(Math.min(Math.max(1, r), i)), C = u ? (a - 1) * u + 1 : 0, z = u && g != null ? Math.min(g, a * u) : 0, B = g != null && u || N || v, n = /* @__PURE__ */ s("nav", { "aria-label": k, className: R("alea-pagination", !B && f), "data-size": c, children: [
44
+ m && /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "data-far": !0, "aria-label": d.firstPage, disabled: a <= 1, onClick: () => b(1), children: /* @__PURE__ */ e(V, { size: 16, "aria-hidden": "true" }) }),
45
+ /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "aria-label": d.previousPage, disabled: a <= 1, onClick: () => b(a - 1), children: /* @__PURE__ */ e(X, { size: 16, "aria-hidden": "true" }) }),
46
+ o === "compact" ? /* @__PURE__ */ e("span", { className: "alea-page-status", "aria-live": "polite", children: d.nOfTotal(a, i) }) : /* @__PURE__ */ e("ul", { children: y.map((r, l) => r === "gap" ? /* @__PURE__ */ e("li", { className: "alea-page-gap", "aria-hidden": "true", children: "…" }, `g${l}`) : /* @__PURE__ */ e("li", { "data-far": y.length > 5 && Math.abs(r - a) > 1 || void 0, children: /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "aria-current": r === a ? "page" : void 0, "aria-label": d.pageN(r), onClick: () => b(r), children: r }) }, r)) }),
47
+ /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "aria-label": d.nextPage, disabled: a >= i, onClick: () => b(a + 1), children: /* @__PURE__ */ e(F, { size: 16, "aria-hidden": "true" }) }),
48
+ m && /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "data-far": !0, "aria-label": d.lastPage, disabled: a >= i, onClick: () => b(i), children: /* @__PURE__ */ e(G, { size: 16, "aria-hidden": "true" }) })
46
49
  ] });
47
- return C ? /* @__PURE__ */ c("div", { className: k("alea-pagination-bar", t), "data-size": m, children: [
48
- s != null && d ? /* @__PURE__ */ a("span", { className: "alea-pagination-total", "aria-live": "polite", children: r.itemRange(w, $, s) }) : /* @__PURE__ */ a("span", {}),
49
- /* @__PURE__ */ c("div", { className: "alea-pagination-controls", children: [
50
- f && d && /* @__PURE__ */ c("label", { className: "alea-pagination-size", children: [
51
- /* @__PURE__ */ a("span", { children: r.perPage }),
52
- /* @__PURE__ */ a("select", { className: "alea-cal-select alea-focus-ring", value: d, onChange: (i) => f(Number(i.target.value)), children: p.map((i) => /* @__PURE__ */ a("option", { value: i, children: i }, i)) })
50
+ return B ? /* @__PURE__ */ s("div", { className: R("alea-pagination-bar", f), "data-size": c, children: [
51
+ g != null && u ? /* @__PURE__ */ e("span", { className: "alea-pagination-total", "aria-live": "polite", children: d.itemRange(C, z, g) }) : /* @__PURE__ */ e("span", {}),
52
+ /* @__PURE__ */ s("div", { className: "alea-pagination-controls", children: [
53
+ N && u && /* @__PURE__ */ s("label", { className: "alea-pagination-size", children: [
54
+ /* @__PURE__ */ e("span", { children: d.perPage }),
55
+ /* @__PURE__ */ e("select", { className: "alea-cal-select alea-focus-ring", value: u, onChange: (r) => N(Number(r.target.value)), children: p.map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r)) })
53
56
  ] }),
54
- x,
55
- g && /* @__PURE__ */ c("label", { className: "alea-pagination-jump", children: [
56
- /* @__PURE__ */ a("span", { children: r.goToPage }),
57
- /* @__PURE__ */ a(
57
+ n,
58
+ v && /* @__PURE__ */ s("label", { className: "alea-pagination-jump", children: [
59
+ /* @__PURE__ */ e("span", { children: d.goToPage }),
60
+ /* @__PURE__ */ e(
58
61
  "input",
59
62
  {
60
63
  className: "alea-pagination-input alea-focus-ring",
61
64
  type: "number",
62
65
  inputMode: "numeric",
63
66
  min: 1,
64
- max: n,
65
- placeholder: String(e),
66
- onKeyDown: (i) => {
67
- if (i.key === "Enter") {
68
- const y = Number(i.target.value);
69
- y && (b(y), i.target.value = "");
67
+ max: i,
68
+ placeholder: String(a),
69
+ onKeyDown: (r) => {
70
+ if (r.key === "Enter") {
71
+ const l = Number(r.target.value);
72
+ l && (b(l), r.target.value = "");
70
73
  }
71
74
  }
72
75
  }
73
76
  )
74
77
  ] })
75
78
  ] })
76
- ] }) : x;
79
+ ] }) : n;
77
80
  }
78
- function ea({ steps: e, current: n, orientation: h = "horizontal", responsive: l = !0, onStepPress: u, size: m, variant: o = "numbers", labelPlacement: d, className: p, "aria-label": f }) {
79
- const s = M();
80
- f ?? (f = s.progress);
81
- const g = Math.max(0, e.findIndex((t) => t.id === n));
82
- return /* @__PURE__ */ a("ol", { "aria-label": f, className: k("alea-steps", p), "data-orientation": h, "data-responsive": l || void 0, "data-size": m, "data-variant": o !== "numbers" ? o : void 0, "data-label-placement": d !== "end" ? d : void 0, children: e.map((t, N) => {
83
- const r = t.status ?? (N < g ? "done" : N === g ? "current" : "upcoming"), v = r === "error" ? /* @__PURE__ */ a(K, { size: 14 }) : r === "warning" ? "!" : r === "done" ? /* @__PURE__ */ a(V, { size: 14 }) : o === "dots" ? null : o === "icons" && t.icon ? t.icon : N + 1, b = /* @__PURE__ */ c(D, { children: [
84
- /* @__PURE__ */ a("span", { className: "alea-step-dot", "aria-hidden": "true", children: v }),
85
- /* @__PURE__ */ c("span", { className: "alea-step-text", children: [
86
- /* @__PURE__ */ c("span", { className: "alea-step-title", children: [
87
- t.title,
88
- t.isOptional && /* @__PURE__ */ c("span", { className: "alea-step-optional", children: [
81
+ function oe({ steps: a, current: i, orientation: h = "horizontal", responsive: t = !0, showStatus: o, stateLabels: c, onStepPress: m, size: u, variant: p = "numbers", labelPlacement: N, className: g, "aria-label": v }) {
82
+ const f = w();
83
+ v ?? (v = f.progress);
84
+ const k = Math.max(0, a.findIndex((n) => n.id === i)), d = t === "scroll" && h === "horizontal", y = { error: f.stepError, warning: f.stepWarning, skipped: f.stepSkipped, cancelled: f.stepCancelled }, b = (n) => y[n] && ((c == null ? void 0 : c[n]) ?? y[n]), C = W(null), [z, B] = T(!1);
85
+ return _(() => {
86
+ const n = C.current;
87
+ if (!d || !n) return;
88
+ const r = () => B(n.scrollWidth > n.clientWidth + 1);
89
+ r();
90
+ const l = n.querySelector('[aria-current="step"]');
91
+ if (l) {
92
+ const M = n.getBoundingClientRect(), $ = l.getBoundingClientRect();
93
+ n.scrollLeft += $.left + $.width / 2 - (M.left + M.width / 2);
94
+ }
95
+ if (typeof ResizeObserver > "u") return;
96
+ const x = new ResizeObserver(r);
97
+ return x.observe(n), () => x.disconnect();
98
+ }, [d, k, a.length]), /* @__PURE__ */ e("ol", { ref: C, tabIndex: d && z ? 0 : void 0, "aria-label": v, className: R("alea-steps", g), "data-orientation": h, "data-responsive": d ? "scroll" : t ? "true" : void 0, "data-size": u, "data-variant": p !== "numbers" ? p : void 0, "data-label-placement": N !== "end" ? N : void 0, children: a.map((n, r) => {
99
+ const l = n.status ?? (r < k ? "done" : r === k ? "current" : "upcoming"), x = l === "error" ? /* @__PURE__ */ e(H, { size: 14 }) : l === "cancelled" ? /* @__PURE__ */ e(Q, { size: 14 }) : l === "skipped" ? /* @__PURE__ */ e(U, { size: 14 }) : l === "warning" ? "!" : l === "done" ? /* @__PURE__ */ e(Y, { size: 14 }) : p === "dots" ? null : p === "icons" && n.icon ? n.icon : r + 1, M = /* @__PURE__ */ s(E, { children: [
100
+ /* @__PURE__ */ e("span", { className: "alea-step-dot", "aria-hidden": "true", children: x }),
101
+ /* @__PURE__ */ s("span", { className: "alea-step-text", children: [
102
+ /* @__PURE__ */ s("span", { className: "alea-step-title", children: [
103
+ n.title,
104
+ n.isOptional && /* @__PURE__ */ s("span", { className: "alea-step-optional", children: [
89
105
  " (",
90
- s.optional,
106
+ f.optional,
91
107
  ")"
92
108
  ] })
93
109
  ] }),
94
- t.description && /* @__PURE__ */ a("span", { className: "alea-step-desc", children: t.description }),
95
- (r === "error" || r === "warning") && /* @__PURE__ */ c("span", { className: "alea-visually-hidden", children: [
110
+ n.description && /* @__PURE__ */ e("span", { className: "alea-step-desc", children: n.description }),
111
+ o && /* @__PURE__ */ e("span", { className: "alea-step-status", children: (c == null ? void 0 : c[l]) ?? f.stepStatus[l] }),
112
+ !o && b(l) && /* @__PURE__ */ s("span", { className: "alea-visually-hidden", children: [
96
113
  " ",
97
- r === "error" ? s.stepError : s.stepWarning
114
+ b(l)
98
115
  ] })
99
116
  ] })
100
117
  ] });
101
- return /* @__PURE__ */ a("li", { className: "alea-step", "data-status": r, "aria-current": r === "current" ? "step" : void 0, children: u && r === "done" ? /* @__PURE__ */ c("button", { type: "button", className: "alea-step-button alea-focus-ring", onClick: () => u(t.id), children: [
102
- b,
103
- /* @__PURE__ */ c("span", { className: "alea-visually-hidden", children: [
118
+ return /* @__PURE__ */ e("li", { className: "alea-step", "data-status": l, "aria-current": l === "current" ? "step" : void 0, children: m && l === "done" ? /* @__PURE__ */ s("button", { type: "button", className: "alea-step-button alea-focus-ring", onClick: () => m(n.id), children: [
119
+ M,
120
+ !o && /* @__PURE__ */ s("span", { className: "alea-visually-hidden", children: [
104
121
  " ",
105
- s.stepDoneBack
122
+ f.stepDoneBack
106
123
  ] })
107
- ] }) : /* @__PURE__ */ c("div", { className: "alea-step-button", children: [
108
- b,
109
- r === "done" && /* @__PURE__ */ c("span", { className: "alea-visually-hidden", children: [
124
+ ] }) : /* @__PURE__ */ s("div", { className: "alea-step-button", children: [
125
+ M,
126
+ l === "done" && !o && /* @__PURE__ */ s("span", { className: "alea-visually-hidden", children: [
110
127
  " ",
111
- s.stepDone
128
+ (c == null ? void 0 : c.done) ?? f.stepDone
112
129
  ] })
113
- ] }) }, t.id != null ? String(t.id) : N);
130
+ ] }) }, n.id != null ? String(n.id) : r);
114
131
  }) });
115
132
  }
116
133
  export {
117
- S as Breadcrumb,
118
- I as Breadcrumbs,
119
- aa as Pagination,
120
- ea as Steps
134
+ te as Breadcrumb,
135
+ ce as Breadcrumbs,
136
+ se as Pagination,
137
+ oe as Steps
121
138
  };
@@ -119,7 +119,7 @@ export declare function NavigationMenu(props: NavigationMenuProps): import("reac
119
119
  export interface BottomNavigationProps {
120
120
  /** Name of the navigation. Default "Main". */
121
121
  'aria-label'?: string;
122
- /** Three to five destinations: id, label, icon, and an href (links) or none (buttons with onChange). */
122
+ /** Three to five destinations: id, label, icon, and an href (a link that navigates through the ThemeProvider navigate, like Link, with no page reload) or none (a button, with onChange). More than maxItems fold into a More button. */
123
123
  items: Array<{
124
124
  id: string;
125
125
  label: string;
@@ -133,11 +133,17 @@ export interface BottomNavigationProps {
133
133
  onChange?: (id: string) => void;
134
134
  /** Stick to the bottom of the screen. Default true. */
135
135
  fixed?: boolean;
136
+ /** The most places the bar shows, More included. When there are more items, the first maxItems - 1 stay in the bar and the rest go behind a More button that opens a sheet from the bottom. Default: no limit (every item shows). Material and iOS guidance is 5. */
137
+ maxItems?: number;
138
+ /** Text of the More button and the title of its sheet. Default "More". */
139
+ moreLabel?: string;
140
+ /** Icon of the More button. Default three dots. */
141
+ moreIcon?: ReactNode;
136
142
  /** Extra class names for the root element. */
137
143
  className?: string;
138
144
  }
139
- /** The tab bar of a mobile app: three to five destinations with icons and labels. */
140
- export declare function BottomNavigation({ items, value, onChange, fixed, className, 'aria-label': label }: BottomNavigationProps): import("react").JSX.Element;
145
+ /** The tab bar of a mobile app: three to five destinations with icons and labels. With maxItems it folds the extra destinations behind a More button. */
146
+ export declare function BottomNavigation({ items, value, onChange, fixed, maxItems, moreLabel, moreIcon, className, 'aria-label': label }: BottomNavigationProps): import("react").JSX.Element;
141
147
  export interface BurgerProps {
142
148
  /** Whether the menu it controls is open. */
143
149
  isOpen: boolean;