@alea-design/ui 0.6.1 → 0.7.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 (52) hide show
  1. package/dist/components/button/Button.d.ts +3 -1
  2. package/dist/components/button/Button.js +58 -57
  3. package/dist/components/button/Groups.js +41 -41
  4. package/dist/components/data/Data.d.ts +6 -4
  5. package/dist/components/data/Data.js +49 -49
  6. package/dist/components/date/Date.d.ts +3 -1
  7. package/dist/components/date/Date.js +74 -74
  8. package/dist/components/form/Form.d.ts +3 -1
  9. package/dist/components/form/Form.js +44 -52
  10. package/dist/components/form/validity.d.ts +22 -0
  11. package/dist/components/form/validity.js +38 -0
  12. package/dist/components/list/List.d.ts +3 -2
  13. package/dist/components/more/More.d.ts +3 -1
  14. package/dist/components/more/More.js +46 -46
  15. package/dist/components/navigation/Navigation.d.ts +4 -4
  16. package/dist/components/navigation/Navigation.js +94 -94
  17. package/dist/components/navigation/Navigation2.d.ts +3 -1
  18. package/dist/components/navigation/Navigation2.js +218 -210
  19. package/dist/components/page/PageParts.d.ts +6 -2
  20. package/dist/components/page/PageParts.js +85 -85
  21. package/dist/components/shell/AppShell.d.ts +3 -1
  22. package/dist/components/shell/AppShell.js +33 -32
  23. package/dist/components/table/Table.d.ts +8 -3
  24. package/dist/components/table/Table.js +58 -57
  25. package/dist/components/theme/Theme.d.ts +5 -1
  26. package/dist/components/theme/Theme.js +63 -63
  27. package/dist/css/base.css +1 -1
  28. package/dist/css/button.css +1 -1
  29. package/dist/css/data.css +1 -1
  30. package/dist/css/date.css +1 -1
  31. package/dist/css/display.css +1 -1
  32. package/dist/css/feedback.css +1 -1
  33. package/dist/css/groups.json +13 -13
  34. package/dist/css/more.css +1 -1
  35. package/dist/css/navigation.css +1 -1
  36. package/dist/css/page.css +1 -1
  37. package/dist/css/shell.css +1 -1
  38. package/dist/css/table.css +1 -1
  39. package/dist/css/tabs.css +1 -1
  40. package/dist/css/typography.css +1 -1
  41. package/dist/i18n/strings.d.ts +1 -0
  42. package/dist/i18n/strings.js +2 -0
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.js +279 -275
  45. package/dist/styles.css +1 -1
  46. package/dist/utils/animateRows.d.ts +3 -2
  47. package/dist/utils/animateRows.js +15 -15
  48. package/dist/utils/measure.d.ts +12 -0
  49. package/dist/utils/measure.js +20 -0
  50. package/dist/utils/scrollEdges.d.ts +1 -1
  51. package/dist/utils/scrollEdges.js +23 -22
  52. package/package.json +3 -3
@@ -77,14 +77,14 @@ export interface StepsProps {
77
77
  'aria-label'?: string;
78
78
  /** Extra class names for the root element. */
79
79
  className?: string;
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';
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. Use 'wrap' for long lists (eight or ten stages): the steps share the width in equal columns and wrap onto more lines when they do not fit, each with its own progress segment, so every step stays in view at any width and text size. */
81
+ responsive?: boolean | 'scroll' | 'wrap';
82
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
83
  showStatus?: boolean;
84
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
85
  stateLabels?: Partial<Record<StepStatus, string>>;
86
- /** sm (24 px markers) or md (32 px, default). */
87
- size?: 'sm' | 'md';
86
+ /** sm (24 px markers), md (28 px, default) or lg (40 px, for a public page where the steps are the focus). */
87
+ size?: 'sm' | 'md' | 'lg';
88
88
  /** numbers (default), dots (small markers, for compact flows) or icons (each step's icon). */
89
89
  variant?: 'numbers' | 'dots' | 'icons';
90
90
  /** Horizontal only: the text beside the marker (end, default) or below it (centered). */
@@ -1,62 +1,62 @@
1
1
  "use client";
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));
2
+ import { jsx as e, jsxs as t, Fragment as O } from "react/jsx-runtime";
3
+ import { Children as j, isValidElement as P, useMemo as W, useRef as T, useState as _, useEffect as q } from "react";
4
+ import { Breadcrumb as E, Link as A, Button as K, Breadcrumbs as V } from "react-aria-components";
5
+ import { ChevronsLeft as X, ChevronLeft as F, ChevronRight as G, ChevronsRight as H, X as Q, Ban as U, Minus as Y, Check as Z } from "lucide-react";
6
+ import { DropdownMenu as J, MenuItem as S } from "../menu/Menu.js";
7
+ import { withBase as I, cx as R } from "../../utils/cx.js";
8
+ import { useStrings as $ } from "../../i18n/strings.js";
9
+ function ta({ separator: n, maxItems: r, size: d, className: i, children: s, ...l }) {
10
+ const h = $();
11
+ let u = s;
12
+ if (r && typeof s != "function") {
13
+ const p = j.toArray(s).filter(P);
14
+ if (p.length > r && r >= 2) {
15
+ const N = p.slice(1, p.length - (r - 1));
16
16
  u = [
17
17
  p[0],
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))
18
+ /* @__PURE__ */ e(E, { className: "alea-crumb", children: /* @__PURE__ */ e(J, { "aria-label": h.showMore, trigger: /* @__PURE__ */ e(K, { className: "alea-crumb-link alea-crumb-more alea-focus-ring", "aria-label": h.showMore, children: "…" }), children: N.map((g, v) => /* @__PURE__ */ e(S, { id: `c${v}`, href: g.props.href, children: g.props.children }, v)) }) }, "__more"),
19
+ ...p.slice(p.length - (r - 1))
20
20
  ];
21
21
  }
22
22
  }
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 });
23
+ return /* @__PURE__ */ e(V, { ...l, className: R("alea-breadcrumbs", i), "data-size": d, "data-separator": n ? void 0 : "chevron", style: { "--alea-crumb-sep": typeof n == "string" ? `"${n}"` : void 0, ...l.style }, children: u });
24
24
  }
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 }),
31
- h
25
+ function sa({ href: n, icon: r, children: d, className: i, ...s }) {
26
+ return /* @__PURE__ */ e(E, { ...s, className: I("alea-crumb", i), children: n ? /* @__PURE__ */ t(A, { href: n, className: "alea-crumb-link alea-focus-ring", children: [
27
+ r && /* @__PURE__ */ e("span", { className: "alea-crumb-icon", "aria-hidden": "true", children: r }),
28
+ d
29
+ ] }) : /* @__PURE__ */ t("span", { className: "alea-crumb-link", "data-current": !0, "aria-current": "page", children: [
30
+ r && /* @__PURE__ */ e("span", { className: "alea-crumb-icon", "aria-hidden": "true", children: r }),
31
+ d
32
32
  ] }) });
33
33
  }
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;
34
+ function L(n, r, d) {
35
+ const i = [], s = Math.max(2, n - d), l = Math.min(r - 1, n + d);
36
+ i.push(1), s > 2 && i.push("gap");
37
+ for (let h = s; h <= l; h++) i.push(h);
38
+ return l < r - 1 && i.push("gap"), r > 1 && i.push(r), i;
39
39
  }
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" }) })
40
+ function oa({ page: n, total: r, onChange: d, siblings: i = 1, appearance: s = "pages", size: l, showFirstLast: h, pageSize: u, pageSizeOptions: p = [10, 25, 50, 100], onPageSizeChange: N, totalItems: g, showJumper: v, className: m, "aria-label": k }) {
41
+ const o = $();
42
+ k ?? (k = o.pagination);
43
+ const M = W(() => L(n, Math.max(1, r), i), [n, r, i]), b = (a) => d(Math.min(Math.max(1, a), r)), C = u ? (n - 1) * u + 1 : 0, B = u && g != null ? Math.min(g, n * u) : 0, x = g != null && u || N || v, w = /* @__PURE__ */ t("nav", { "aria-label": k, className: R("alea-pagination", !x && m), "data-size": l, children: [
44
+ h && /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "data-far": !0, "aria-label": o.firstPage, disabled: n <= 1, onClick: () => b(1), children: /* @__PURE__ */ e(X, { size: 16, "aria-hidden": "true" }) }),
45
+ /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "aria-label": o.previousPage, disabled: n <= 1, onClick: () => b(n - 1), children: /* @__PURE__ */ e(F, { size: 16, "aria-hidden": "true" }) }),
46
+ s === "compact" ? /* @__PURE__ */ e("span", { className: "alea-page-status", "aria-live": "polite", children: o.nOfTotal(n, r) }) : /* @__PURE__ */ e("ul", { children: M.map((a, f) => a === "gap" ? /* @__PURE__ */ e("li", { className: "alea-page-gap", "aria-hidden": "true", children: "…" }, `g${f}`) : /* @__PURE__ */ e("li", { "data-far": M.length > 5 && Math.abs(a - n) > 1 || void 0, children: /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "aria-current": a === n ? "page" : void 0, "aria-label": o.pageN(a), onClick: () => b(a), children: a }) }, a)) }),
47
+ /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "aria-label": o.nextPage, disabled: n >= r, onClick: () => b(n + 1), children: /* @__PURE__ */ e(G, { size: 16, "aria-hidden": "true" }) }),
48
+ h && /* @__PURE__ */ e("button", { type: "button", className: "alea-page alea-focus-ring", "data-far": !0, "aria-label": o.lastPage, disabled: n >= r, onClick: () => b(r), children: /* @__PURE__ */ e(H, { size: 16, "aria-hidden": "true" }) })
49
49
  ] });
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)) })
50
+ return x ? /* @__PURE__ */ t("div", { className: R("alea-pagination-bar", m), "data-size": l, children: [
51
+ g != null && u ? /* @__PURE__ */ e("span", { className: "alea-pagination-total", "aria-live": "polite", children: o.itemRange(C, B, g) }) : /* @__PURE__ */ e("span", {}),
52
+ /* @__PURE__ */ t("div", { className: "alea-pagination-controls", children: [
53
+ N && u && /* @__PURE__ */ t("label", { className: "alea-pagination-size", children: [
54
+ /* @__PURE__ */ e("span", { children: o.perPage }),
55
+ /* @__PURE__ */ e("select", { className: "alea-cal-select alea-focus-ring", value: u, onChange: (a) => N(Number(a.target.value)), children: p.map((a) => /* @__PURE__ */ e("option", { value: a, children: a }, a)) })
56
56
  ] }),
57
- n,
58
- v && /* @__PURE__ */ s("label", { className: "alea-pagination-jump", children: [
59
- /* @__PURE__ */ e("span", { children: d.goToPage }),
57
+ w,
58
+ v && /* @__PURE__ */ t("label", { className: "alea-pagination-jump", children: [
59
+ /* @__PURE__ */ e("span", { children: o.goToPage }),
60
60
  /* @__PURE__ */ e(
61
61
  "input",
62
62
  {
@@ -64,75 +64,75 @@ function se({ page: a, total: i, onChange: h, siblings: t = 1, appearance: o = "
64
64
  type: "number",
65
65
  inputMode: "numeric",
66
66
  min: 1,
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 = "");
67
+ max: r,
68
+ placeholder: String(n),
69
+ onKeyDown: (a) => {
70
+ if (a.key === "Enter") {
71
+ const f = Number(a.target.value);
72
+ f && (b(f), a.target.value = "");
73
73
  }
74
74
  }
75
75
  }
76
76
  )
77
77
  ] })
78
78
  ] })
79
- ] }) : n;
79
+ ] }) : w;
80
80
  }
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);
81
+ function da({ steps: n, current: r, orientation: d = "horizontal", responsive: i = !0, showStatus: s, stateLabels: l, onStepPress: h, size: u, variant: p = "numbers", labelPlacement: N, className: g, "aria-label": v }) {
82
+ const m = $();
83
+ v ?? (v = m.progress);
84
+ const k = Math.max(0, n.findIndex((a) => a.id === r)), o = i === "scroll" && d === "horizontal", M = i === "wrap" && d === "horizontal", b = { error: m.stepError, warning: m.stepWarning, skipped: m.stepSkipped, cancelled: m.stepCancelled }, C = (a) => b[a] && ((l == null ? void 0 : l[a]) ?? b[a]), B = T(null), [x, w] = _(!1);
85
+ return q(() => {
86
+ const a = B.current;
87
+ if (!o || !a) return;
88
+ const f = () => w(a.scrollWidth > a.clientWidth + 1);
89
+ f();
90
+ const c = a.querySelector('[aria-current="step"]');
91
+ if (c) {
92
+ const y = a.getBoundingClientRect(), D = c.getBoundingClientRect();
93
+ a.scrollLeft += D.left + D.width / 2 - (y.left + y.width / 2);
94
94
  }
95
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: [
96
+ const z = new ResizeObserver(f);
97
+ return z.observe(a), () => z.disconnect();
98
+ }, [o, k, n.length]), /* @__PURE__ */ e("ol", { ref: B, tabIndex: o && x ? 0 : void 0, "aria-label": v, className: R("alea-steps", g), "data-orientation": d, "data-responsive": o ? "scroll" : M ? "wrap" : i === !0 ? "true" : void 0, "data-size": u, "data-variant": p !== "numbers" ? p : void 0, "data-label-placement": N !== "end" ? N : void 0, children: n.map((a, f) => {
99
+ const c = a.status ?? (f < k ? "done" : f === k ? "current" : "upcoming"), z = c === "error" ? /* @__PURE__ */ e(Q, { size: 14 }) : c === "cancelled" ? /* @__PURE__ */ e(U, { size: 14 }) : c === "skipped" ? /* @__PURE__ */ e(Y, { size: 14 }) : c === "warning" ? "!" : c === "done" ? /* @__PURE__ */ e(Z, { size: 14 }) : p === "dots" ? null : p === "icons" && a.icon ? a.icon : f + 1, y = /* @__PURE__ */ t(O, { children: [
100
+ /* @__PURE__ */ e("span", { className: "alea-step-dot", "aria-hidden": "true", children: z }),
101
+ /* @__PURE__ */ t("span", { className: "alea-step-text", children: [
102
+ /* @__PURE__ */ t("span", { className: "alea-step-title", children: [
103
+ a.title,
104
+ a.isOptional && /* @__PURE__ */ t("span", { className: "alea-step-optional", children: [
105
105
  " (",
106
- f.optional,
106
+ m.optional,
107
107
  ")"
108
108
  ] })
109
109
  ] }),
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: [
110
+ a.description && /* @__PURE__ */ e("span", { className: "alea-step-desc", children: a.description }),
111
+ s && /* @__PURE__ */ e("span", { className: "alea-step-status", children: (l == null ? void 0 : l[c]) ?? m.stepStatus[c] }),
112
+ !s && C(c) && /* @__PURE__ */ t("span", { className: "alea-visually-hidden", children: [
113
113
  " ",
114
- b(l)
114
+ C(c)
115
115
  ] })
116
116
  ] })
117
117
  ] });
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: [
118
+ return /* @__PURE__ */ e("li", { className: "alea-step", "data-status": c, "aria-current": c === "current" ? "step" : void 0, children: h && c === "done" ? /* @__PURE__ */ t("button", { type: "button", className: "alea-step-button alea-focus-ring", onClick: () => h(a.id), children: [
119
+ y,
120
+ !s && /* @__PURE__ */ t("span", { className: "alea-visually-hidden", children: [
121
121
  " ",
122
- f.stepDoneBack
122
+ m.stepDoneBack
123
123
  ] })
124
- ] }) : /* @__PURE__ */ s("div", { className: "alea-step-button", children: [
125
- M,
126
- l === "done" && !o && /* @__PURE__ */ s("span", { className: "alea-visually-hidden", children: [
124
+ ] }) : /* @__PURE__ */ t("div", { className: "alea-step-button", children: [
125
+ y,
126
+ c === "done" && !s && /* @__PURE__ */ t("span", { className: "alea-visually-hidden", children: [
127
127
  " ",
128
- (c == null ? void 0 : c.done) ?? f.stepDone
128
+ (l == null ? void 0 : l.done) ?? m.stepDone
129
129
  ] })
130
- ] }) }, n.id != null ? String(n.id) : r);
130
+ ] }) }, a.id != null ? String(a.id) : f);
131
131
  }) });
132
132
  }
133
133
  export {
134
- te as Breadcrumb,
135
- ce as Breadcrumbs,
136
- se as Pagination,
137
- oe as Steps
134
+ sa as Breadcrumb,
135
+ ta as Breadcrumbs,
136
+ oa as Pagination,
137
+ da as Steps
138
138
  };
@@ -139,11 +139,13 @@ export interface BottomNavigationProps {
139
139
  moreLabel?: string;
140
140
  /** Icon of the More button. Default three dots. */
141
141
  moreIcon?: ReactNode;
142
+ /** always (default) shows each label under its icon, truncated with an ellipsis when it is too long for its column. auto shows them while every label fits and, when one does not (large text on a narrow screen), drops all of them at once and keeps the icons: the labels stay as the accessible names, every item stays 44 px tall and the More button stays on screen. */
143
+ labels?: 'always' | 'auto';
142
144
  /** Extra class names for the root element. */
143
145
  className?: string;
144
146
  }
145
147
  /** 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;
148
+ export declare function BottomNavigation({ items, value, onChange, fixed, maxItems, moreLabel, moreIcon, labels, className, 'aria-label': label }: BottomNavigationProps): import("react").JSX.Element;
147
149
  export interface BurgerProps {
148
150
  /** Whether the menu it controls is open. */
149
151
  isOpen: boolean;