@alea-design/ui 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) 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 +76 -52
  9. package/dist/components/data/Data.d.ts +6 -4
  10. package/dist/components/data/Data.js +66 -56
  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.js +27 -27
  34. package/dist/components/more/More.d.ts +2 -2
  35. package/dist/components/more/More.js +46 -45
  36. package/dist/components/navigation/Navigation.d.ts +7 -5
  37. package/dist/components/navigation/Navigation.js +91 -74
  38. package/dist/components/navigation/Navigation2.d.ts +9 -3
  39. package/dist/components/navigation/Navigation2.js +209 -195
  40. package/dist/components/notification/NotificationCenter.js +70 -70
  41. package/dist/components/overlay/Drawer.d.ts +6 -1
  42. package/dist/components/overlay/Drawer.js +27 -25
  43. package/dist/components/overlay/Modal.d.ts +5 -0
  44. package/dist/components/overlay/Modal.js +16 -15
  45. package/dist/components/overlay/Overlay.d.ts +10 -1
  46. package/dist/components/overlay/Overlay.js +54 -52
  47. package/dist/components/overlay/Sheet.d.ts +2 -0
  48. package/dist/components/overlay/Sheet.js +30 -30
  49. package/dist/components/page/PageParts.js +20 -20
  50. package/dist/components/select/Select.js +75 -70
  51. package/dist/components/settings/Settings.d.ts +29 -0
  52. package/dist/components/settings/Settings.js +31 -0
  53. package/dist/components/shell/AccountMenu.d.ts +20 -0
  54. package/dist/components/shell/AccountMenu.js +32 -0
  55. package/dist/components/shell/AppShell.d.ts +9 -2
  56. package/dist/components/shell/AppShell.js +37 -37
  57. package/dist/components/shell/AppSidebar.d.ts +9 -3
  58. package/dist/components/shell/AppSidebar.js +45 -39
  59. package/dist/components/table/Table.d.ts +18 -4
  60. package/dist/components/table/Table.js +70 -46
  61. package/dist/components/tabs/Tabs.js +105 -94
  62. package/dist/components/theme/Theme.d.ts +7 -4
  63. package/dist/components/theme/Theme.js +127 -130
  64. package/dist/components/upload/Upload.js +62 -54
  65. package/dist/css/base.css +1 -1
  66. package/dist/css/button.css +1 -1
  67. package/dist/css/card.css +1 -1
  68. package/dist/css/command.css +1 -1
  69. package/dist/css/date.css +1 -1
  70. package/dist/css/display.css +1 -1
  71. package/dist/css/feedback.css +1 -1
  72. package/dist/css/field.css +1 -1
  73. package/dist/css/form.css +1 -1
  74. package/dist/css/groups.json +36 -20
  75. package/dist/css/list.css +1 -1
  76. package/dist/css/menu.css +1 -1
  77. package/dist/css/navigation.css +1 -1
  78. package/dist/css/notification.css +1 -1
  79. package/dist/css/overlay.css +1 -1
  80. package/dist/css/page.css +1 -1
  81. package/dist/css/select.css +1 -1
  82. package/dist/css/settings.css +1 -0
  83. package/dist/css/shell.css +1 -1
  84. package/dist/css/table.css +1 -1
  85. package/dist/css/tabs.css +1 -1
  86. package/dist/css/upload.css +1 -1
  87. package/dist/i18n/strings.d.ts +7 -0
  88. package/dist/i18n/strings.js +14 -0
  89. package/dist/index.d.ts +4 -0
  90. package/dist/index.js +318 -306
  91. package/dist/styles.css +1 -1
  92. package/dist/utils/animateRows.d.ts +11 -0
  93. package/dist/utils/animateRows.js +23 -0
  94. package/dist/utils/decimal.d.ts +12 -0
  95. package/dist/utils/decimal.js +48 -0
  96. package/dist/utils/initialFocus.d.ts +6 -0
  97. package/dist/utils/initialFocus.js +24 -0
  98. package/dist/utils/refs.d.ts +2 -0
  99. package/dist/utils/refs.js +14 -6
  100. package/package.json +3 -3
@@ -1,115 +1,126 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as A, Fragment as M } from "react/jsx-runtime";
3
- import { useRef as k, useEffect as $, useState as B, useId as F, useLayoutEffect as K } from "react";
4
- import { Tab as C, SelectionIndicator as H, TabList as U, Link as X, TabPanel as G, Tabs as J } from "react-aria-components";
5
- import { X as Q, ChevronLeft as V, ChevronRight as W } from "lucide-react";
6
- import { withBase as L } from "../../utils/cx.js";
7
- import { tabIcon as Y } from "../icon/icon-contexts.js";
8
- import { useScrollEdges as Z } from "../../utils/scrollEdges.js";
9
- import { useStrings as j } from "../../i18n/strings.js";
10
- function ie({ variant: b = "underline", size: s, fitted: l, justify: f, className: i, ...m }) {
11
- const r = k(null);
12
- return K(() => {
13
- const o = r.current;
2
+ import { jsx as a, jsxs as k, Fragment as $ } from "react/jsx-runtime";
3
+ import { useRef as y, useEffect as E, useState as K, useId as W, useLayoutEffect as H } from "react";
4
+ import { Tab as U, SelectionIndicator as X, TabList as G, Link as J, TabPanel as Q, Tabs as V } from "react-aria-components";
5
+ import { X as Y, ChevronLeft as j, ChevronRight as B } from "lucide-react";
6
+ import { withBase as A } from "../../utils/cx.js";
7
+ import { tabIcon as Z } from "../icon/icon-contexts.js";
8
+ import { useScrollEdges as C } from "../../utils/scrollEdges.js";
9
+ import { useStrings as F } from "../../i18n/strings.js";
10
+ function ie({ variant: m = "underline", size: i, fitted: c, justify: v, className: l, ...h }) {
11
+ const d = y(null);
12
+ return H(() => {
13
+ const o = d.current;
14
14
  if (!o) return;
15
- const v = () => o.querySelectorAll('[role="tab"][aria-controls]').forEach((c) => {
16
- document.getElementById(c.getAttribute("aria-controls")) || c.removeAttribute("aria-controls");
15
+ const u = () => o.querySelectorAll('[role="tab"][aria-controls]').forEach((n) => {
16
+ document.getElementById(n.getAttribute("aria-controls")) || n.removeAttribute("aria-controls");
17
17
  });
18
- if (v(), typeof MutationObserver > "u") return;
19
- const d = new MutationObserver(v);
20
- return d.observe(o, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["aria-controls"] }), () => d.disconnect();
21
- }, []), /* @__PURE__ */ t(J, { ...m, ref: r, "data-variant": b, "data-size": s, "data-fitted": l || void 0, "data-justify": f, className: L("alea-tabs", i) });
18
+ if (u(), typeof MutationObserver > "u") return;
19
+ const e = new MutationObserver(u);
20
+ return e.observe(o, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["aria-controls"] }), () => e.disconnect();
21
+ }, []), /* @__PURE__ */ a(V, { ...h, ref: d, "data-variant": m, "data-size": i, "data-fitted": c || void 0, "data-justify": v, className: A("alea-tabs", l) });
22
22
  }
23
- function le({ className: b, extra: s, onReorder: l, ...f }) {
24
- const i = j(), m = k(null), { edges: r, scroll: o } = Z(m, ".alea-tab-list"), [v, d] = B(""), c = F(), h = k(l);
25
- return h.current = l, $(() => {
26
- var q;
27
- const a = (q = m.current) == null ? void 0 : q.querySelector(".alea-tab-list");
28
- if (!a || !l) return;
29
- const p = () => Array.from(a.querySelectorAll('[role="tab"]')), w = () => p().forEach((e) => {
30
- e.setAttribute("draggable", "true"), e.setAttribute("aria-describedby", c), e.setAttribute("aria-keyshortcuts", "Alt+Shift+ArrowLeft Alt+Shift+ArrowRight");
23
+ function le({ className: m, extra: i, onReorder: c, ...v }) {
24
+ const l = F(), h = y(null), { edges: d, scroll: o } = C(h, ".alea-tab-list"), [u, e] = K(""), n = W(), b = y(c);
25
+ return b.current = c, E(() => {
26
+ var P;
27
+ const r = (P = h.current) == null ? void 0 : P.querySelector(".alea-tab-list");
28
+ if (!r || !c) return;
29
+ const g = () => Array.from(r.querySelectorAll('[role="tab"]')), S = () => g().forEach((t) => {
30
+ t.setAttribute("draggable", "true"), t.setAttribute("aria-describedby", n), t.setAttribute("aria-keyshortcuts", "Alt+Shift+ArrowLeft Alt+Shift+ArrowRight");
31
31
  });
32
- w();
33
- const S = new MutationObserver(w);
34
- S.observe(a, { childList: !0 });
35
- const E = () => a.getAttribute("aria-orientation") === "vertical", T = (e, n) => {
32
+ S();
33
+ const x = new MutationObserver(S);
34
+ x.observe(r, { childList: !0 });
35
+ const w = () => r.getAttribute("aria-orientation") === "vertical", T = (t, s) => {
36
36
  var N;
37
- const y = p(), g = e.dataset.key;
38
- n = Math.max(0, Math.min(y.length - 1, n)), n !== y.indexOf(e) && ((N = h.current) == null || N.call(h, g, n), d(i.movedTo(e.textContent ?? g, n + 1, y.length)), requestAnimationFrame(() => {
39
- var z;
40
- return (z = a.querySelector(`[data-key="${CSS.escape(g)}"]`)) == null ? void 0 : z.focus();
37
+ const L = g(), p = t.dataset.key;
38
+ s = Math.max(0, Math.min(L.length - 1, s)), s !== L.indexOf(t) && ((N = b.current) == null || N.call(b, p, s), e(l.movedTo(t.textContent ?? p, s + 1, L.length)), requestAnimationFrame(() => {
39
+ var M;
40
+ return (M = r.querySelector(`[data-key="${CSS.escape(p)}"]`)) == null ? void 0 : M.focus();
41
41
  }));
42
- }, x = (e) => {
43
- const n = e.target.closest('[role="tab"]');
44
- if (!n || !e.altKey || !e.shiftKey) return;
45
- const y = E() ? "ArrowUp" : "ArrowLeft", g = E() ? "ArrowDown" : "ArrowRight";
46
- if (e.key !== y && e.key !== g) return;
47
- e.preventDefault(), e.stopPropagation();
48
- const N = getComputedStyle(a).direction === "rtl" && !E();
49
- T(n, p().indexOf(n) + (e.key === g !== N ? 1 : -1));
42
+ }, D = (t) => {
43
+ const s = t.target.closest('[role="tab"]');
44
+ if (!s || !t.altKey || !t.shiftKey) return;
45
+ const L = w() ? "ArrowUp" : "ArrowLeft", p = w() ? "ArrowDown" : "ArrowRight";
46
+ if (t.key !== L && t.key !== p) return;
47
+ t.preventDefault(), t.stopPropagation();
48
+ const N = getComputedStyle(r).direction === "rtl" && !w();
49
+ T(s, g().indexOf(s) + (t.key === p !== N ? 1 : -1));
50
50
  };
51
- let u = null;
52
- const D = (e) => {
53
- var n;
54
- u = e.target.closest('[role="tab"]'), u && ((n = e.dataTransfer) == null || n.setData("text/plain", u.dataset.key ?? ""), u.dataset.dragging = "true");
55
- }, O = (e) => {
56
- u && e.preventDefault();
57
- }, P = (e) => {
58
- const n = e.target.closest('[role="tab"]');
59
- u && n && n !== u && (e.preventDefault(), T(u, p().indexOf(n)));
60
- }, I = () => {
61
- u && delete u.dataset.dragging, u = null;
51
+ let f = null;
52
+ const I = (t) => {
53
+ var s;
54
+ f = t.target.closest('[role="tab"]'), f && ((s = t.dataTransfer) == null || s.setData("text/plain", f.dataset.key ?? ""), f.dataset.dragging = "true");
55
+ }, q = (t) => {
56
+ f && t.preventDefault();
57
+ }, z = (t) => {
58
+ const s = t.target.closest('[role="tab"]');
59
+ f && s && s !== f && (t.preventDefault(), T(f, g().indexOf(s)));
60
+ }, O = () => {
61
+ f && delete f.dataset.dragging, f = null;
62
62
  };
63
- return a.addEventListener("keydown", x, !0), a.addEventListener("dragstart", D), a.addEventListener("dragover", O), a.addEventListener("drop", P), a.addEventListener("dragend", I), () => {
64
- S.disconnect(), a.removeEventListener("keydown", x, !0), a.removeEventListener("dragstart", D), a.removeEventListener("dragover", O), a.removeEventListener("drop", P), a.removeEventListener("dragend", I), p().forEach((e) => {
65
- e.removeAttribute("draggable"), e.removeAttribute("aria-describedby"), e.removeAttribute("aria-keyshortcuts");
63
+ return r.addEventListener("keydown", D, !0), r.addEventListener("dragstart", I), r.addEventListener("dragover", q), r.addEventListener("drop", z), r.addEventListener("dragend", O), () => {
64
+ x.disconnect(), r.removeEventListener("keydown", D, !0), r.removeEventListener("dragstart", I), r.removeEventListener("dragover", q), r.removeEventListener("drop", z), r.removeEventListener("dragend", O), g().forEach((t) => {
65
+ t.removeAttribute("draggable"), t.removeAttribute("aria-describedby"), t.removeAttribute("aria-keyshortcuts");
66
66
  });
67
67
  };
68
- }, [!!l, c]), /* @__PURE__ */ A("div", { ref: m, className: "alea-tab-bar", "data-overflow-start": r.start || void 0, "data-overflow-end": r.end || void 0, "data-reorderable": l ? !0 : void 0, children: [
69
- r.start && /* @__PURE__ */ t("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "start", onClick: () => o(-1), children: /* @__PURE__ */ t(V, { size: 16 }) }),
70
- /* @__PURE__ */ t(U, { ...f, "aria-label": f["aria-label"], className: L("alea-tab-list", b) }),
71
- r.end && /* @__PURE__ */ t("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "end", onClick: () => o(1), children: /* @__PURE__ */ t(W, { size: 16 }) }),
72
- s && /* @__PURE__ */ t("div", { className: "alea-tab-extra", children: s }),
73
- l && /* @__PURE__ */ A(M, { children: [
74
- /* @__PURE__ */ t("span", { id: c, hidden: !0, children: i.reorderHint }),
75
- /* @__PURE__ */ t("span", { className: "alea-visually-hidden", role: "status", children: v })
68
+ }, [!!c, n]), /* @__PURE__ */ k("div", { ref: h, className: "alea-tab-bar", "data-overflow-start": d.start || void 0, "data-overflow-end": d.end || void 0, "data-reorderable": c ? !0 : void 0, children: [
69
+ d.start && /* @__PURE__ */ a("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "start", onClick: () => o(-1), children: /* @__PURE__ */ a(j, { size: 16 }) }),
70
+ /* @__PURE__ */ a(G, { ...v, "aria-label": v["aria-label"], className: A("alea-tab-list", m) }),
71
+ d.end && /* @__PURE__ */ a("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "end", onClick: () => o(1), children: /* @__PURE__ */ a(B, { size: 16 }) }),
72
+ i && /* @__PURE__ */ a("div", { className: "alea-tab-extra", children: i }),
73
+ c && /* @__PURE__ */ k($, { children: [
74
+ /* @__PURE__ */ a("span", { id: n, hidden: !0, children: l.reorderHint }),
75
+ /* @__PURE__ */ a("span", { className: "alea-visually-hidden", role: "status", children: u })
76
76
  ] })
77
77
  ] });
78
78
  }
79
- function oe({ className: b, children: s, icon: l, badge: f, onClose: i, ...m }) {
80
- const r = j(), o = k(null), v = k(i);
81
- return v.current = i, $(() => {
82
- const d = o.current;
83
- if (!d || !i) return;
84
- d.setAttribute("aria-keyshortcuts", "Delete");
85
- const c = (h) => {
86
- var a;
87
- (h.key === "Delete" || h.key === "Backspace") && (h.preventDefault(), (a = v.current) == null || a.call(v));
79
+ function oe({ className: m, children: i, icon: c, badge: v, onClose: l, ...h }) {
80
+ const d = F(), o = y(null), u = y(l);
81
+ return u.current = l, E(() => {
82
+ const e = o.current;
83
+ if (!e || !l) return;
84
+ e.setAttribute("aria-keyshortcuts", "Delete");
85
+ const n = (b) => {
86
+ var r;
87
+ (b.key === "Delete" || b.key === "Backspace") && (b.preventDefault(), (r = u.current) == null || r.call(u));
88
88
  };
89
- return d.addEventListener("keydown", c), () => d.removeEventListener("keydown", c);
90
- }, [!!i]), /* @__PURE__ */ t(C, { ...m, ref: o, className: L("alea-tab alea-focus-ring", b), "data-closable": i ? !0 : void 0, children: (d) => /* @__PURE__ */ A(M, { children: [
91
- l && /* @__PURE__ */ t("span", { className: "alea-tab-icon", "aria-hidden": "true", ...Y(d.isSelected), children: l }),
92
- /* @__PURE__ */ t("span", { className: "alea-tab-label", children: typeof s == "function" ? s(d) : s }),
93
- f != null && /* @__PURE__ */ t("span", { className: "alea-tab-badge", children: f }),
94
- i && /* @__PURE__ */ t("span", { className: "alea-tab-close", "aria-hidden": "true", title: r.close, onPointerDown: (c) => c.stopPropagation(), onClick: (c) => {
95
- c.stopPropagation(), i();
96
- }, children: /* @__PURE__ */ t(Q, { size: 12 }) }),
97
- /* @__PURE__ */ t(H, { className: "alea-sel-indicator" })
89
+ return e.addEventListener("keydown", n), () => e.removeEventListener("keydown", n);
90
+ }, [!!l]), /* @__PURE__ */ a(U, { ...h, ref: o, className: A("alea-tab alea-focus-ring", m), "data-closable": l ? !0 : void 0, children: (e) => /* @__PURE__ */ k($, { children: [
91
+ c && /* @__PURE__ */ a("span", { className: "alea-tab-icon", "aria-hidden": "true", ...Z(e.isSelected), children: c }),
92
+ /* @__PURE__ */ a("span", { className: "alea-tab-label", children: typeof i == "function" ? i(e) : i }),
93
+ v != null && /* @__PURE__ */ a("span", { className: "alea-tab-badge", children: v }),
94
+ l && /* @__PURE__ */ a("span", { className: "alea-tab-close", "aria-hidden": "true", title: d.close, onPointerDown: (n) => n.stopPropagation(), onClick: (n) => {
95
+ n.stopPropagation(), l();
96
+ }, children: /* @__PURE__ */ a(Y, { size: 12 }) }),
97
+ /* @__PURE__ */ a(X, { className: "alea-sel-indicator" })
98
98
  ] }) });
99
99
  }
100
- function ce({ className: b, ...s }) {
101
- return s.children == null || s.children === !1 ? null : /* @__PURE__ */ t(G, { ...s, className: L("alea-tab-panel alea-focus-ring", b) });
100
+ function ce({ className: m, ...i }) {
101
+ return i.children == null || i.children === !1 ? null : /* @__PURE__ */ a(Q, { ...i, className: A("alea-tab-panel alea-focus-ring", m) });
102
102
  }
103
- function de({ items: b, current: s, variant: l = "underline", size: f, className: i, "aria-label": m }) {
104
- return /* @__PURE__ */ t("nav", { "aria-label": m, className: ["alea-tabs alea-tab-nav", i].filter(Boolean).join(" "), "data-variant": l, "data-size": f, children: /* @__PURE__ */ t("div", { className: "alea-tab-bar", children: /* @__PURE__ */ t("div", { className: "alea-tab-list", children: b.map((r) => {
105
- const o = r.id === s;
106
- return /* @__PURE__ */ A(X, { href: r.href, "aria-current": o ? "page" : void 0, "data-selected": o || void 0, className: "alea-tab alea-focus-ring", children: [
107
- r.icon && /* @__PURE__ */ t("span", { className: "alea-tab-icon", "aria-hidden": "true", children: r.icon }),
108
- /* @__PURE__ */ t("span", { className: "alea-tab-label", children: r.label }),
109
- r.badge != null && /* @__PURE__ */ t("span", { className: "alea-tab-badge", children: r.badge }),
110
- o && /* @__PURE__ */ t("span", { className: "alea-sel-indicator" })
111
- ] }, r.id);
112
- }) }) }) });
103
+ function de({ items: m, current: i, variant: c = "underline", size: v, className: l, "aria-label": h }) {
104
+ const d = y(null), { edges: o, scroll: u } = C(d, ".alea-tab-list");
105
+ return E(() => {
106
+ var g;
107
+ const e = (g = d.current) == null ? void 0 : g.querySelector(".alea-tab-list"), n = e == null ? void 0 : e.querySelector('[aria-current="page"]');
108
+ if (!e || !n) return;
109
+ const b = n.offsetLeft - e.offsetLeft, r = b + n.offsetWidth;
110
+ r > e.scrollLeft + e.clientWidth ? e.scrollLeft = r - e.clientWidth + 8 : b < e.scrollLeft && (e.scrollLeft = Math.max(0, b - 8));
111
+ }, [i]), /* @__PURE__ */ a("nav", { "aria-label": h, className: ["alea-tabs alea-tab-nav", l].filter(Boolean).join(" "), "data-variant": c, "data-size": v, children: /* @__PURE__ */ k("div", { ref: d, className: "alea-tab-bar", "data-overflow-start": o.start || void 0, "data-overflow-end": o.end || void 0, children: [
112
+ o.start && /* @__PURE__ */ a("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "start", onClick: () => u(-1), children: /* @__PURE__ */ a(j, { size: 16 }) }),
113
+ /* @__PURE__ */ a("div", { className: "alea-tab-list", children: m.map((e) => {
114
+ const n = e.id === i;
115
+ return /* @__PURE__ */ k(J, { href: e.href, "aria-current": n ? "page" : void 0, "data-selected": n || void 0, className: "alea-tab alea-focus-ring", children: [
116
+ e.icon && /* @__PURE__ */ a("span", { className: "alea-tab-icon", "aria-hidden": "true", children: e.icon }),
117
+ /* @__PURE__ */ a("span", { className: "alea-tab-label", children: e.label }),
118
+ e.badge != null && /* @__PURE__ */ a("span", { className: "alea-tab-badge", children: e.badge }),
119
+ n && /* @__PURE__ */ a("span", { className: "alea-sel-indicator" })
120
+ ] }, e.id);
121
+ }) }),
122
+ o.end && /* @__PURE__ */ a("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "alea-tab-scroll", "data-side": "end", onClick: () => u(1), children: /* @__PURE__ */ a(B, { size: 16 }) })
123
+ ] }) });
113
124
  }
114
125
  export {
115
126
  oe as Tab,
@@ -8,13 +8,16 @@ export interface BrandTheme {
8
8
  accent?: string;
9
9
  /** Text on solid accent surfaces. Default the kit's (near black). */
10
10
  accentOn?: string;
11
+ /** Focus ring color (any CSS color). Default: the strong accent, which is darker than the accent in Light and lighter in Dark, so a light brand color still gives a ring of at least 3:1 on the page. Set it only when you have checked your own pair. */
12
+ focus?: string;
11
13
  /** Multiplies every radius: 0 square, 0.5 tight, 1 the Alea default, 1.4 rounder. */
12
14
  radius?: number;
13
- /** compact (controls 8 px shorter and the Compact space scale: base 2 px) or comfy (default). To change the space scale only, use the density prop of ThemeProvider. 'comfortable' is a deprecated alias of 'comfy'. */
15
+ /** compact (controls 4 px shorter, the Compact space scale with base 2 px, and control padding that stays wide: horizontal at or above vertical; 44 px controls on a touch pointer) or comfy (default). Same as the density prop of ThemeProvider. 'comfortable' is a deprecated alias of 'comfy'. */
14
16
  density?: 'comfy' | 'compact' | /** @deprecated Use comfy. */ 'comfortable';
15
- /** Font stacks: body (UI and text), display (big titles), mono (code). Load the fonts yourself. */
17
+ /** Font stacks, a runtime override of the font.family tokens: body (--alea-font-family-body: all text and every control), heading (--alea-font-family-display: titles; display is the same thing), mono (--alea-font-family-mono: code, left alone unless set). Load the font files yourself. */
16
18
  fonts?: {
17
19
  body?: string;
20
+ heading?: string; /** Same as heading. If both are set, heading wins. */
18
21
  display?: string;
19
22
  mono?: string;
20
23
  };
@@ -48,8 +51,8 @@ export interface ThemeProviderProps {
48
51
  className?: string;
49
52
  /** Brand changes: accent color, radius, density, fonts. */
50
53
  brand?: BrandTheme;
51
- /** Space density: "comfy" (default, base 4 px; "comfortable" is a deprecated alias) or "compact" (base 2 px: every space token halves, odd results rounded up to even). Sets data-density on the root or the wrapper; controls keep their size (use brand.density for shorter controls too). */
52
- density?: 'comfy' | 'compact' | /** @deprecated Use comfy. */ 'comfortable';
54
+ /** Space density: "comfy" (default, base 4 px; "comfortable" is a deprecated alias) or "compact" (base 2 px: every space token halves, odd results rounded up to even). Sets data-density on the root or the wrapper: the control heights go down 4 px, the control padding stays wide (never narrower than the vertical air) and a touch pointer keeps every control at 44 px or more. */
55
+ density?: 'comfy' | 'compact' | /** Comfy spacing with every control at least 44 px tall and a 44 px hit area on small targets (checks, breadcrumb links, the side navigation), whatever the pointer: for apps used on phones and tablets. */ 'touch' | /** @deprecated Use comfy. */ 'comfortable';
53
56
  /** Your router's navigate function (React Router's useNavigate(), Next's router.push): links in the kit then navigate without a reload. */
54
57
  navigate?: (path: string, options?: any) => void;
55
58
  /** Your router's useHref, for routers with a base path. */