@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
@@ -8,7 +8,7 @@ export interface PageAction {
8
8
  onAction?: () => void;
9
9
  href?: string;
10
10
  isDisabled?: boolean;
11
- tone?: 'default' | 'danger';
11
+ tone?: 'neutral' | 'danger' | /** @deprecated Use neutral. */ 'default';
12
12
  /** PageHeader: keep this action inside the More menu even when there is room for it as a button (a destructive one, for example). */
13
13
  menuOnly?: boolean;
14
14
  }
@@ -36,6 +36,8 @@ export interface PageHeaderProps {
36
36
  secondaryActions?: PageAction[];
37
37
  /** How many secondary actions show as buttons before the rest move into a More menu (0 puts them all in the menu). Default: all of them. Actions with `menuOnly` always go to the menu. */
38
38
  maxVisibleActions?: number;
39
+ /** Writes "More actions" next to the dots of the More menu instead of showing the dots alone, for a header where a bare icon is not clear enough. */
40
+ showMoreLabel?: boolean;
39
41
  /** Tabs or a segmented control under the header. */
40
42
  tabs?: ReactNode;
41
43
  /** Heading level. Default 1. */
@@ -44,11 +46,13 @@ export interface PageHeaderProps {
44
46
  sticky?: boolean;
45
47
  /** Tighter spacing and a smaller title, for dense apps. */
46
48
  compact?: boolean;
49
+ /** Keeps the title for screen readers and the document outline but does not draw it, for a page whose title is already shown elsewhere (the app bar, a tab). The rest of the header stays. */
50
+ hideTitle?: boolean;
47
51
  /** Extra class names. */
48
52
  className?: string;
49
53
  }
50
54
  /** The top of a page: breadcrumbs or back, title, subtitle, meta, actions and tabs. Secondary actions fold into a menu on phones, or past `maxVisibleActions`. */
51
- export declare function PageHeader({ title, subtitle, back, backLabel, breadcrumbs, media, meta, actions, secondaryActions, maxVisibleActions, tabs, headingLevel, sticky, compact, className }: PageHeaderProps): import("react").JSX.Element;
55
+ export declare function PageHeader({ title, subtitle, back, backLabel, breadcrumbs, media, meta, actions, secondaryActions, maxVisibleActions, showMoreLabel, tabs, headingLevel, sticky, compact, hideTitle, className }: PageHeaderProps): import("react").JSX.Element;
52
56
  export interface SaveBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
53
57
  /** Show it while there are unsaved changes. */
54
58
  isVisible: boolean;
@@ -1,117 +1,117 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as e, Fragment as F } from "react/jsx-runtime";
3
- import { useRef as T, useState as P, useEffect as x, createElement as K, forwardRef as C } from "react";
4
- import { Info as R, ArrowLeft as S, MoreHorizontal as $ } from "lucide-react";
5
- import { cx as b } from "../../utils/cx.js";
6
- import { Button as D, IconButton as I } from "../button/Button.js";
7
- import { Breadcrumbs as q, Breadcrumb as G } from "../navigation/Navigation.js";
8
- import { DropdownMenu as J, MenuItem as Q } from "../menu/Menu.js";
9
- import { useStrings as k } from "../../i18n/strings.js";
10
- import { inertProps as U } from "../../utils/inert.js";
11
- function L({ actions: o, label: a, className: i }) {
12
- return /* @__PURE__ */ e("div", { className: i, children: /* @__PURE__ */ e(
13
- J,
2
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
3
+ import { useRef as T, useState as I, useEffect as S, createElement as q, forwardRef as C } from "react";
4
+ import { Info as G, ArrowLeft as H, MoreHorizontal as L } from "lucide-react";
5
+ import { cx as w } from "../../utils/cx.js";
6
+ import { Button as P, IconButton as M } from "../button/Button.js";
7
+ import { Breadcrumbs as J, Breadcrumb as Q } from "../navigation/Navigation.js";
8
+ import { DropdownMenu as U, MenuItem as X } from "../menu/Menu.js";
9
+ import { useStrings as R } from "../../i18n/strings.js";
10
+ import { inertProps as Y } from "../../utils/inert.js";
11
+ import { useMeasured as Z, remPx as V } from "../../utils/measure.js";
12
+ function O({ actions: t, label: a, showLabel: i }) {
13
+ return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
14
+ U,
14
15
  {
15
16
  "aria-label": a,
16
17
  placement: "bottom end",
17
- trigger: /* @__PURE__ */ e(I, { "aria-label": a, size: "sm", children: /* @__PURE__ */ e($, {}) }),
18
- menuProps: { onAction: (r) => {
19
- var t, s;
20
- return (s = (t = o.find((m) => m.id === r)) == null ? void 0 : t.onAction) == null ? void 0 : s.call(t);
18
+ trigger: i ? /* @__PURE__ */ e(P, { variant: "ghost", size: "sm", iconStart: /* @__PURE__ */ e(L, {}), children: a }) : /* @__PURE__ */ e(M, { "aria-label": a, size: "sm", children: /* @__PURE__ */ e(L, {}) }),
19
+ menuProps: { onAction: (n) => {
20
+ var l, h;
21
+ return (h = (l = t.find((u) => u.id === n)) == null ? void 0 : l.onAction) == null ? void 0 : h.call(l);
21
22
  } },
22
- children: o.map((r) => /* @__PURE__ */ e(Q, { id: r.id, icon: r.icon, href: r.href, isDisabled: r.isDisabled, tone: r.tone, children: r.label }, String(r.id)))
23
+ children: t.map((n) => /* @__PURE__ */ e(X, { id: n.id, icon: n.icon, href: n.href, isDisabled: n.isDisabled, tone: n.tone, children: n.label }, String(n.id)))
23
24
  }
24
25
  ) });
25
26
  }
26
- function ne({ title: o, subtitle: a, back: i, backLabel: r, breadcrumbs: t, media: s, meta: m, actions: N, secondaryActions: d, maxVisibleActions: h, tabs: v, headingLevel: p = 1, sticky: c, compact: u, className: y }) {
27
- const f = k(), g = T(null), [H, O] = P(!1);
28
- x(() => {
29
- const n = g.current;
30
- if (!c || !n || typeof IntersectionObserver > "u") return;
31
- const w = document.createElement("div");
32
- n.before(w);
33
- const M = new IntersectionObserver(([A]) => O(!A.isIntersecting));
34
- return M.observe(w), () => {
35
- M.disconnect(), w.remove();
27
+ const ee = 45, ae = (t) => t.clientWidth > 0 && t.clientWidth < ee * V();
28
+ function me({ title: t, subtitle: a, back: i, backLabel: c, breadcrumbs: n, media: l, meta: h, actions: u, secondaryActions: o, maxVisibleActions: p, showMoreLabel: v, tabs: m, headingLevel: f = 1, sticky: s, compact: y, hideTitle: z, className: g }) {
29
+ const b = R(), B = T(null), [W, j] = I(!1);
30
+ S(() => {
31
+ const r = B.current;
32
+ if (!s || !r || typeof IntersectionObserver > "u") return;
33
+ const N = document.createElement("div");
34
+ r.before(N);
35
+ const A = new IntersectionObserver(([F]) => j(!F.isIntersecting));
36
+ return A.observe(N), () => {
37
+ A.disconnect(), N.remove();
36
38
  };
37
- }, [c]);
38
- const j = Math.max(0, h ?? 1 / 0), z = [], B = [];
39
- for (const n of d ?? []) (!n.menuOnly && z.length < j ? z : B).push(n);
40
- const E = d != null && d.length ? /* @__PURE__ */ l(F, { children: [
41
- /* @__PURE__ */ l("div", { className: "alea-page-header-secondary", children: [
42
- z.map((n) => /* @__PURE__ */ e(D, { variant: "ghost", size: "sm", iconStart: n.icon, href: n.href, onPress: n.onAction, isDisabled: n.isDisabled, tone: n.tone === "danger" ? "danger" : void 0, children: n.label }, String(n.id))),
43
- B.length > 0 && /* @__PURE__ */ e(L, { actions: B, label: f.moreActions })
44
- ] }),
45
- /* @__PURE__ */ e(L, { actions: d, label: f.moreActions, className: "alea-page-header-more" })
46
- ] }) : null;
47
- return /* @__PURE__ */ l("header", { ref: g, className: b("alea-page-header", y), "data-sticky": c || void 0, "data-stuck": H || void 0, "data-compact": u || void 0, children: [
48
- t != null && t.length ? /* @__PURE__ */ e("nav", { "aria-label": f.breadcrumb, children: /* @__PURE__ */ e(q, { className: "alea-page-header-crumbs", children: t.map((n, w) => /* @__PURE__ */ e(G, { href: w === t.length - 1 ? void 0 : n.href, children: n.label }, w)) }) }) : null,
49
- /* @__PURE__ */ l("div", { className: "alea-page-header-main", children: [
50
- i && (typeof i == "string" ? /* @__PURE__ */ e(I, { "aria-label": r ?? f.back, variant: "ghost", size: "sm", href: i, className: "alea-page-header-back", children: /* @__PURE__ */ e(S, {}) }) : /* @__PURE__ */ e(I, { "aria-label": r ?? f.back, variant: "ghost", size: "sm", onPress: i, className: "alea-page-header-back", children: /* @__PURE__ */ e(S, {}) })),
51
- s && /* @__PURE__ */ e("span", { className: "alea-page-header-media", children: s }),
52
- /* @__PURE__ */ l("div", { className: "alea-page-header-titles", children: [
53
- /* @__PURE__ */ l("div", { className: "alea-page-header-title-row", children: [
54
- K(`h${p}`, { className: "alea-page-header-title" }, o),
55
- m && /* @__PURE__ */ e("div", { className: "alea-page-header-meta", children: m })
39
+ }, [s]);
40
+ const k = Z(B, ae, !1), K = Math.max(0, p ?? 1 / 0), D = [], E = [];
41
+ for (const r of o ?? []) (!r.menuOnly && D.length < K ? D : E).push(r);
42
+ const x = !!(o != null && o.length), _ = x && !k ? /* @__PURE__ */ d("div", { className: "alea-page-header-secondary", children: [
43
+ D.map((r) => /* @__PURE__ */ e(P, { variant: "ghost", size: "sm", iconStart: r.icon, href: r.href, onPress: r.onAction, isDisabled: r.isDisabled, tone: r.tone === "danger" ? "danger" : void 0, children: r.label }, String(r.id))),
44
+ E.length > 0 && /* @__PURE__ */ e(O, { actions: E, label: b.moreActions, showLabel: v })
45
+ ] }) : null, $ = x && k ? /* @__PURE__ */ e(O, { actions: o, label: b.moreActions, showLabel: v }) : null;
46
+ return /* @__PURE__ */ d("header", { ref: B, className: w("alea-page-header", g), "data-sticky": s || void 0, "data-stuck": W || void 0, "data-compact": y || void 0, children: [
47
+ n != null && n.length ? /* @__PURE__ */ e("nav", { "aria-label": b.breadcrumb, children: /* @__PURE__ */ e(J, { className: "alea-page-header-crumbs", children: n.map((r, N) => /* @__PURE__ */ e(Q, { href: N === n.length - 1 ? void 0 : r.href, children: r.label }, N)) }) }) : null,
48
+ /* @__PURE__ */ d("div", { className: "alea-page-header-main", children: [
49
+ i && (typeof i == "string" ? /* @__PURE__ */ e(M, { "aria-label": c ?? b.back, variant: "ghost", size: "sm", href: i, className: "alea-page-header-back", children: /* @__PURE__ */ e(H, {}) }) : /* @__PURE__ */ e(M, { "aria-label": c ?? b.back, variant: "ghost", size: "sm", onPress: i, className: "alea-page-header-back", children: /* @__PURE__ */ e(H, {}) })),
50
+ l && /* @__PURE__ */ e("span", { className: "alea-page-header-media", children: l }),
51
+ /* @__PURE__ */ d("div", { className: "alea-page-header-titles", children: [
52
+ /* @__PURE__ */ d("div", { className: "alea-page-header-title-row", children: [
53
+ q(`h${f}`, { className: w("alea-page-header-title", z && "alea-visually-hidden") }, t),
54
+ h && /* @__PURE__ */ e("div", { className: "alea-page-header-meta", children: h })
56
55
  ] }),
57
56
  a && /* @__PURE__ */ e("p", { className: "alea-page-header-subtitle", children: a })
58
57
  ] }),
59
- (N || E) && /* @__PURE__ */ l("div", { className: "alea-page-header-actions", children: [
60
- E,
61
- N
58
+ (u || x) && /* @__PURE__ */ d("div", { className: "alea-page-header-actions", children: [
59
+ _,
60
+ u,
61
+ $
62
62
  ] })
63
63
  ] }),
64
- v && /* @__PURE__ */ e("div", { className: "alea-page-header-tabs", children: v })
64
+ m && /* @__PURE__ */ e("div", { className: "alea-page-header-tabs", children: m })
65
65
  ] });
66
66
  }
67
- const te = C(function({ isVisible: a, message: i, onSave: r, onDiscard: t, isSaving: s, saveLabel: m, discardLabel: N, position: d = "top", saveShortcut: h = !0, className: v, ...p }, c) {
68
- const u = k(), y = T(r);
69
- return y.current = r, x(() => {
70
- if (!a || !h) return;
71
- const f = (g) => {
67
+ const ue = C(function({ isVisible: a, message: i, onSave: c, onDiscard: n, isSaving: l, saveLabel: h, discardLabel: u, position: o = "top", saveShortcut: p = !0, className: v, ...m }, f) {
68
+ const s = R(), y = T(c);
69
+ return y.current = c, S(() => {
70
+ if (!a || !p) return;
71
+ const z = (g) => {
72
72
  (g.metaKey || g.ctrlKey) && g.key.toLowerCase() === "s" && (g.preventDefault(), y.current());
73
73
  };
74
- return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
75
- }, [a, h]), /* @__PURE__ */ l("div", { ref: c, ...p, className: b("alea-savebar", v), "data-visible": a || void 0, "data-position": d, role: "region", "aria-label": p["aria-label"] ?? u.unsavedChanges, "aria-hidden": !a || void 0, ...U(!a), children: [
76
- /* @__PURE__ */ e("p", { className: "alea-savebar-message", "aria-live": "polite", children: a ? i ?? u.unsavedChanges : "" }),
77
- /* @__PURE__ */ l("div", { className: "alea-savebar-actions", children: [
78
- t && /* @__PURE__ */ e(D, { variant: "ghost", size: "sm", onPress: t, isDisabled: s, children: N ?? u.discard }),
79
- /* @__PURE__ */ e(D, { size: "sm", variant: "secondary", onPress: r, isLoading: s, shortcut: h ? "⌘S" : void 0, children: m ?? u.save })
74
+ return window.addEventListener("keydown", z), () => window.removeEventListener("keydown", z);
75
+ }, [a, p]), /* @__PURE__ */ d("div", { ref: f, ...m, className: w("alea-savebar", v), "data-visible": a || void 0, "data-position": o, role: "region", "aria-label": m["aria-label"] ?? s.unsavedChanges, "aria-hidden": !a || void 0, ...Y(!a), children: [
76
+ /* @__PURE__ */ e("p", { className: "alea-savebar-message", "aria-live": "polite", children: a ? i ?? s.unsavedChanges : "" }),
77
+ /* @__PURE__ */ d("div", { className: "alea-savebar-actions", children: [
78
+ n && /* @__PURE__ */ e(P, { variant: "ghost", size: "sm", onPress: n, isDisabled: l, children: u ?? s.discard }),
79
+ /* @__PURE__ */ e(P, { size: "sm", variant: "secondary", onPress: c, isLoading: l, shortcut: p ? "⌘S" : void 0, children: h ?? s.save })
80
80
  ] })
81
81
  ] });
82
- }), ie = C(function({ isLoading: a, value: i, "aria-label": r, className: t, ...s }, m) {
83
- const N = k(), [d, h] = P(a), [v, p] = P(!1);
84
- if (x(() => {
82
+ }), pe = C(function({ isLoading: a, value: i, "aria-label": c, className: n, ...l }, h) {
83
+ const u = R(), [o, p] = I(a), [v, m] = I(!1);
84
+ if (S(() => {
85
85
  if (a) {
86
- h(!0), p(!1);
86
+ p(!0), m(!1);
87
87
  return;
88
88
  }
89
- if (!d) return;
90
- p(!0);
91
- const u = setTimeout(() => {
92
- h(!1), p(!1);
89
+ if (!o) return;
90
+ m(!0);
91
+ const s = setTimeout(() => {
92
+ p(!1), m(!1);
93
93
  }, 500);
94
- return () => clearTimeout(u);
95
- }, [a]), !d) return null;
96
- const c = v ? 100 : i;
97
- return /* @__PURE__ */ e("div", { ref: m, ...s, className: b("alea-top-loading", t), role: "progressbar", "aria-label": r ?? N.loading, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": c, "data-done": v || void 0, "data-indeterminate": c == null || void 0, children: /* @__PURE__ */ e("span", { className: "alea-top-loading-bar", style: c != null ? { width: `${c}%` } : void 0 }) });
94
+ return () => clearTimeout(s);
95
+ }, [a]), !o) return null;
96
+ const f = v ? 100 : i;
97
+ return /* @__PURE__ */ e("div", { ref: h, ...l, className: w("alea-top-loading", n), role: "progressbar", "aria-label": c ?? u.loading, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": f, "data-done": v || void 0, "data-indeterminate": f == null || void 0, children: /* @__PURE__ */ e("span", { className: "alea-top-loading-bar", style: f != null ? { width: `${f}%` } : void 0 }) });
98
98
  });
99
- function le({ children: o, className: a }) {
100
- return /* @__PURE__ */ l("p", { className: b("alea-footer-help", a), children: [
101
- /* @__PURE__ */ e(R, { size: 16, "aria-hidden": "true" }),
102
- /* @__PURE__ */ e("span", { children: o })
99
+ function fe({ children: t, className: a }) {
100
+ return /* @__PURE__ */ d("p", { className: w("alea-footer-help", a), children: [
101
+ /* @__PURE__ */ e(G, { size: 16, "aria-hidden": "true" }),
102
+ /* @__PURE__ */ e("span", { children: t })
103
103
  ] });
104
104
  }
105
- function oe({ primary: o, secondary: a, className: i }) {
106
- return /* @__PURE__ */ l("div", { className: b("alea-page-actions", i), children: [
105
+ function ve({ primary: t, secondary: a, className: i }) {
106
+ return /* @__PURE__ */ d("div", { className: w("alea-page-actions", i), children: [
107
107
  /* @__PURE__ */ e("div", { className: "alea-page-actions-secondary", children: a }),
108
- /* @__PURE__ */ e("div", { className: "alea-page-actions-primary", children: o })
108
+ /* @__PURE__ */ e("div", { className: "alea-page-actions-primary", children: t })
109
109
  ] });
110
110
  }
111
111
  export {
112
- le as FooterHelp,
113
- oe as PageActions,
114
- ne as PageHeader,
115
- te as SaveBar,
116
- ie as TopLoadingBar
112
+ fe as FooterHelp,
113
+ ve as PageActions,
114
+ me as PageHeader,
115
+ ue as SaveBar,
116
+ pe as TopLoadingBar
117
117
  };
@@ -24,11 +24,13 @@ export interface AppShellProps {
24
24
  target?: string;
25
25
  label?: ReactNode;
26
26
  };
27
+ /** A bar along the bottom of the screen, usually a BottomNavigation on phones (render it only where it applies). It sticks to the bottom edge and takes its own space under the content, so the end of the page is never hidden behind it, at any text size. A fixed BottomNavigation is laid out in flow here; no extra spacing is needed. */
28
+ bottomBar?: ReactNode;
27
29
  /** Extra class names for the root element. */
28
30
  className?: string;
29
31
  }
30
32
  /** The app frame: sticky header, sidebar, scrollable content and a skip link. */
31
- export declare function AppShell({ brand, headerEnd, sidebar, children, sidebarWidth, collapseBelow, mainAs, layout, contentSize, skipLink, className }: AppShellProps): import("react").JSX.Element;
33
+ export declare function AppShell({ brand, headerEnd, sidebar, children, sidebarWidth, collapseBelow, mainAs, layout, contentSize, skipLink, bottomBar, className }: AppShellProps): import("react").JSX.Element;
32
34
  export interface SidebarNavProps {
33
35
  children: ReactNode;
34
36
  /** Name of the navigation. Default "Sidebar". */
@@ -1,56 +1,57 @@
1
1
  "use client";
2
- import { jsxs as t, jsx as a, Fragment as w } from "react/jsx-runtime";
3
- import { useState as y, forwardRef as M } from "react";
4
- import { Link as O } from "react-aria-components";
5
- import { Menu as j } from "lucide-react";
6
- import { cx as u, withBase as D } from "../../utils/cx.js";
7
- import { useMediaQuery as G } from "../layout/Responsive.js";
8
- import { IconButton as I } from "../button/Button.js";
9
- import { Drawer as $ } from "../overlay/Drawer.js";
10
- import { Dialog as A } from "../overlay/Overlay.js";
11
- import { useStrings as N } from "../../i18n/strings.js";
12
- import { SkipLink as F } from "../more/More.js";
13
- function V({ brand: s, headerEnd: l, sidebar: e, children: r, sidebarWidth: d = 248, collapseBelow: n = 900, mainAs: c = "main", layout: o = "header", contentSize: m, skipLink: i, className: g }) {
14
- const p = N(), b = c, [x, h] = y(!1), S = G(`(max-width: ${n - 0.02}px)`), f = /* @__PURE__ */ t("header", { className: "alea-shell-header", children: [
15
- e && /* @__PURE__ */ a(I, { "aria-label": p.openNavigation, className: "alea-shell-menu", onPress: () => h(!0), children: /* @__PURE__ */ a(j, {}) }),
2
+ import { jsxs as t, jsx as a, Fragment as y } from "react/jsx-runtime";
3
+ import { useState as M, forwardRef as O } from "react";
4
+ import { Link as j } from "react-aria-components";
5
+ import { Menu as D } from "lucide-react";
6
+ import { cx as u, withBase as G } from "../../utils/cx.js";
7
+ import { useMediaQuery as I } from "../layout/Responsive.js";
8
+ import { IconButton as $ } from "../button/Button.js";
9
+ import { Drawer as A } from "../overlay/Drawer.js";
10
+ import { Dialog as F } from "../overlay/Overlay.js";
11
+ import { useStrings as g } from "../../i18n/strings.js";
12
+ import { SkipLink as P } from "../more/More.js";
13
+ function X({ brand: s, headerEnd: l, sidebar: e, children: r, sidebarWidth: d = 248, collapseBelow: n = 900, mainAs: c = "main", layout: o = "header", contentSize: m, skipLink: i, bottomBar: p, className: b }) {
14
+ const f = g(), x = c, [S, h] = M(!1), C = I(`(max-width: ${n - 0.02}px)`), v = /* @__PURE__ */ t("header", { className: "alea-shell-header", children: [
15
+ e && /* @__PURE__ */ a($, { "aria-label": f.openNavigation, className: "alea-shell-menu", onPress: () => h(!0), children: /* @__PURE__ */ a(D, {}) }),
16
16
  s && /* @__PURE__ */ a("div", { className: "alea-shell-brand", children: s }),
17
17
  l && /* @__PURE__ */ a("div", { className: "alea-shell-end", children: l })
18
- ] }), v = /* @__PURE__ */ a(b, { id: "alea-main", className: "alea-shell-main", tabIndex: -1, children: m && m !== "full" ? /* @__PURE__ */ a("div", { className: "alea-shell-content", "data-size": m, children: r }) : r });
19
- return /* @__PURE__ */ t("div", { className: u("alea-shell", g), style: { "--alea-shell-sidebar": `${d}px` }, "data-layout": o, "data-collapse": n, "data-collapsed": S || void 0, "data-custom-collapse": n !== 900 || void 0, children: [
20
- i !== !1 && /* @__PURE__ */ a(F, { target: (i == null ? void 0 : i.target) ?? "alea-main", children: i == null ? void 0 : i.label }),
21
- o === "header" && f,
18
+ ] }), N = /* @__PURE__ */ a(x, { id: "alea-main", className: "alea-shell-main", tabIndex: -1, children: m && m !== "full" ? /* @__PURE__ */ a("div", { className: "alea-shell-content", "data-size": m, children: r }) : r });
19
+ return /* @__PURE__ */ t("div", { className: u("alea-shell", b), style: { "--alea-shell-sidebar": `${d}px` }, "data-layout": o, "data-collapse": n, "data-collapsed": C || void 0, "data-custom-collapse": n !== 900 || void 0, children: [
20
+ i !== !1 && /* @__PURE__ */ a(P, { target: (i == null ? void 0 : i.target) ?? "alea-main", children: i == null ? void 0 : i.label }),
21
+ o === "header" && v,
22
22
  /* @__PURE__ */ t("div", { className: "alea-shell-body", children: [
23
23
  e && /* @__PURE__ */ a("aside", { className: "alea-shell-sidebar", children: e }),
24
24
  o === "sidebar" ? /* @__PURE__ */ t("div", { className: "alea-shell-panel", children: [
25
- f,
26
- v
27
- ] }) : v
25
+ v,
26
+ N
27
+ ] }) : N
28
28
  ] }),
29
- e && /* @__PURE__ */ a($, { isOpen: x, onOpenChange: h, placement: "start", size: 300, children: /* @__PURE__ */ a(A, { "aria-label": p.navigation, hideClose: !0, className: "alea-shell-drawer", children: () => /* @__PURE__ */ a("div", { onClickCapture: (C) => {
30
- C.target.closest("a") && h(!1);
29
+ p && /* @__PURE__ */ a("div", { className: "alea-shell-bottom", children: p }),
30
+ e && /* @__PURE__ */ a(A, { isOpen: S, onOpenChange: h, placement: "start", size: 300, children: /* @__PURE__ */ a(F, { "aria-label": f.navigation, hideClose: !0, className: "alea-shell-drawer", children: () => /* @__PURE__ */ a("div", { onClickCapture: (w) => {
31
+ w.target.closest("a") && h(!1);
31
32
  }, children: e }) }) })
32
33
  ] });
33
34
  }
34
- function W({ children: s, className: l, "aria-label": e }) {
35
- const r = N();
35
+ function Y({ children: s, className: l, "aria-label": e }) {
36
+ const r = g();
36
37
  return e ?? (e = r.mainNav), /* @__PURE__ */ a("nav", { "aria-label": e, className: u("alea-sidenav", l), children: s });
37
38
  }
38
- const X = M(function({ title: l, children: e, className: r, ...d }, n) {
39
+ const Z = O(function({ title: l, children: e, className: r, ...d }, n) {
39
40
  return /* @__PURE__ */ t("div", { ref: n, ...d, className: u("alea-sidenav-group", r), children: [
40
41
  l && /* @__PURE__ */ a("p", { className: "alea-sidenav-title", children: l }),
41
42
  /* @__PURE__ */ a("ul", { children: e })
42
43
  ] });
43
44
  });
44
- function Y({ isCurrent: s, icon: l, end: e, children: r, className: d, ...n }) {
45
- return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(O, { ...n, "aria-current": s ? "page" : void 0, className: D("alea-sidenav-link alea-focus-ring", d), children: (c) => /* @__PURE__ */ t(w, { children: [
45
+ function _({ isCurrent: s, icon: l, end: e, children: r, className: d, ...n }) {
46
+ return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(j, { ...n, "aria-current": s ? "page" : void 0, className: G("alea-sidenav-link alea-focus-ring", d), children: (c) => /* @__PURE__ */ t(y, { children: [
46
47
  l && /* @__PURE__ */ a("span", { className: "alea-sidenav-icon", "aria-hidden": "true", children: l }),
47
48
  /* @__PURE__ */ a("span", { className: "alea-sidenav-label", children: typeof r == "function" ? r(c) : r }),
48
49
  e && /* @__PURE__ */ a("span", { className: "alea-sidenav-end", children: e })
49
50
  ] }) }) });
50
51
  }
51
52
  export {
52
- V as AppShell,
53
- X as SidebarGroup,
54
- Y as SidebarLink,
55
- W as SidebarNav
53
+ X as AppShell,
54
+ Z as SidebarGroup,
55
+ _ as SidebarLink,
56
+ Y as SidebarNav
56
57
  };
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type TableProps as RACTableProps, type TableHeaderProps, type ColumnProps as RACColumnProps, type TableBodyProps, type TableFooterProps as RACTableFooterProps, type RowProps, type CellProps } from 'react-aria-components';
3
3
  import { type SurfaceProps } from '../surface/Surface.js';
4
+ import type { RowMotion } from '@alea-design/motion';
4
5
  export interface TableProps extends RACTableProps, SurfaceProps {
5
6
  /** Header stays visible while the body scrolls (needs a height on the container). */
6
7
  stickyHeader?: boolean;
@@ -18,15 +19,19 @@ export interface TableProps extends RACTableProps, SurfaceProps {
18
19
  stackHideEmpty?: boolean;
19
20
  /** With a TableFooter, keeps the footer (the totals row) visible while the body scrolls. Needs a height on the container (maxHeight), like stickyHeader. */
20
21
  stickyFooter?: boolean;
22
+ /** Keeps every cell and header on one line, so a column is as wide as its longest value and the table scrolls sideways when it does not fit (a ledger of references, dates and amounts). Default: text wraps inside its cell. */
23
+ noWrap?: boolean;
21
24
  /** Names the table's scroll area when the table is wider than its container (a narrow screen). The area then becomes a labelled region that takes focus, so the keyboard can scroll it sideways. Nothing changes while the table fits. */
22
25
  scrollLabel?: string;
26
+ /** Keeps the first column, the last one or both in view while the table scrolls sideways (a Total column that must not be cut off). A soft edge shadow shows on a pinned column only while content scrolls under it. With row selection the checkbox column is the first. */
27
+ stickyColumns?: 'start' | 'end' | 'both';
23
28
  /** Renders only the rows on screen, for thousands of rows: fixed row height in px (needs maxHeight). */
24
29
  virtualized?: {
25
30
  rowHeight: number;
26
31
  headingHeight?: number;
27
32
  };
28
33
  }
29
- export declare function Table({ stickyHeader, density: densityRaw, maxHeight, resizable, variant, stackBelow, stackHideEmpty, stickyFooter, scrollLabel, virtualized, surface, radius, className, ...props }: TableProps): import("react").JSX.Element;
34
+ export declare function Table({ stickyHeader, density: densityRaw, maxHeight, resizable, variant, stackBelow, stackHideEmpty, stickyFooter, stickyColumns, scrollLabel, noWrap, virtualized, surface, radius, className, ...props }: TableProps): import("react").JSX.Element;
30
35
  /** The header row. Adds the select-all checkbox when the table selects multiple rows. */
31
36
  export declare function TableHeader<T extends object>({ columns, children, className, ...props }: TableHeaderProps<T>): import("react").JSX.Element;
32
37
  export interface ColumnProps extends RACColumnProps {
@@ -37,8 +42,8 @@ export interface ColumnProps extends RACColumnProps {
37
42
  /** A column header; allowsSorting shows the sort arrow and makes it pressable. */
38
43
  export declare function Column({ children, align, className, ...props }: ColumnProps): import("react").JSX.Element;
39
44
  export interface AnimatedTableBodyProps<T extends object> extends TableBodyProps<T> {
40
- /** Rows added to `items` rise in (staggered), and rows removed dissolve before they leave. Needs items with an id and a render function as children. The removed row is disabled while it leaves. Off by default; reduced motion keeps only the fades. */
41
- animateRows?: boolean;
45
+ /** Rows added to `items` rise in (staggered), and rows removed dissolve before they leave. Needs items with an id and a render function as children. The removed row is disabled while it leaves. Off by default; reduced motion keeps only the fades. Pass an object to decide when: `max` rows above which nothing animates, `resetOn` values (search, filter, page) whose change is not news, `enter` and `leave` to animate only one of the two. */
46
+ animateRows?: RowMotion;
42
47
  }
43
48
  /** The rows. renderEmptyState shows when there are none. */
44
49
  export declare function TableBody<T extends object>({ className, animateRows, items: itemsIn, children: childrenIn, dependencies: depsIn, ...props }: AnimatedTableBodyProps<T>): import("react").JSX.Element;
@@ -1,82 +1,83 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as h } from "react/jsx-runtime";
3
- import { useContext as w, createContext as H, useRef as S, useEffect as D } from "react";
4
- import { Cell as u, Column as b, useTableOptions as A, Row as F, Collection as x, Table as M, Virtualizer as O, TableLayout as W, ResizableTableContainer as E, TableBody as P, TableFooter as j, TableHeader as V, TableColumnResizeStateContext as L, ColumnResizer as U, Checkbox as q } from "react-aria-components";
5
- import { ArrowUp as G, Minus as I, Check as J } from "lucide-react";
6
- import { surfaceAttrs as T } from "../surface/Surface.js";
7
- import { withBase as m, cx as f } from "../../utils/cx.js";
8
- import { DragHandle as K } from "../list/List.js";
9
- import { useStrings as Q } from "../../i18n/strings.js";
10
- import { renamedValue as X } from "../../utils/vocabulary.js";
11
- import { useAnimatedRows as Y } from "../../utils/animateRows.js";
12
- function R({ slot: a }) {
13
- return /* @__PURE__ */ t(q, { slot: a, className: "alea-check alea-table-check", children: ({ isIndeterminate: r }) => /* @__PURE__ */ t("span", { className: "alea-check-box", "aria-hidden": "true", children: r ? /* @__PURE__ */ t(I, { size: 14, strokeWidth: 3 }) : /* @__PURE__ */ t(J, { size: 14, strokeWidth: 3 }) }) });
2
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
3
+ import { useContext as T, createContext as E, useRef as F, useEffect as M } from "react";
4
+ import { Cell as b, Column as h, useTableOptions as C, Row as O, Collection as A, Table as P, Virtualizer as W, TableLayout as j, ResizableTableContainer as V, TableBody as L, TableFooter as U, TableHeader as q, TableColumnResizeStateContext as G, ColumnResizer as I, Checkbox as J } from "react-aria-components";
5
+ import { ArrowUp as K, Minus as Q, Check as X } from "lucide-react";
6
+ import { surfaceAttrs as Y } from "../surface/Surface.js";
7
+ import { withBase as u, cx as p } from "../../utils/cx.js";
8
+ import { DragHandle as Z } from "../list/List.js";
9
+ import { useStrings as _ } from "../../i18n/strings.js";
10
+ import { renamedValue as ee } from "../../utils/vocabulary.js";
11
+ import { useAnimatedRows as te } from "../../utils/animateRows.js";
12
+ import { useScrollEdges as ae } from "../../utils/scrollEdges.js";
13
+ function x({ slot: a }) {
14
+ return /* @__PURE__ */ t(J, { slot: a, className: "alea-check alea-table-check", children: ({ isIndeterminate: r }) => /* @__PURE__ */ t("span", { className: "alea-check-box", "aria-hidden": "true", children: r ? /* @__PURE__ */ t(Q, { size: 14, strokeWidth: 3 }) : /* @__PURE__ */ t(X, { size: 14, strokeWidth: 3 }) }) });
14
15
  }
15
- function Z(a) {
16
- const r = S(null);
17
- return D(() => {
16
+ function re(a) {
17
+ const r = F(null);
18
+ return M(() => {
18
19
  const e = r.current;
19
20
  if (!a || !e) return;
20
- const o = () => {
21
+ const l = () => {
21
22
  e.scrollWidth > e.clientWidth + 1 ? (e.setAttribute("role", "region"), e.setAttribute("aria-label", a), e.setAttribute("tabindex", "0")) : (e.removeAttribute("role"), e.removeAttribute("aria-label"), e.removeAttribute("tabindex"));
22
23
  };
23
- if (o(), typeof ResizeObserver > "u") return () => {
24
+ if (l(), typeof ResizeObserver > "u") return () => {
24
25
  e.removeAttribute("role"), e.removeAttribute("aria-label"), e.removeAttribute("tabindex");
25
26
  };
26
- const l = new ResizeObserver(o);
27
- return l.observe(e), e.firstElementChild && l.observe(e.firstElementChild), () => {
28
- l.disconnect(), e.removeAttribute("role"), e.removeAttribute("aria-label"), e.removeAttribute("tabindex");
27
+ const o = new ResizeObserver(l);
28
+ return o.observe(e), e.firstElementChild && o.observe(e.firstElementChild), () => {
29
+ o.disconnect(), e.removeAttribute("role"), e.removeAttribute("aria-label"), e.removeAttribute("tabindex");
29
30
  };
30
31
  }, [a]), r;
31
32
  }
32
- function me({ stickyHeader: a, density: r = "comfy", maxHeight: e, resizable: o, variant: l = "default", stackBelow: n, stackHideEmpty: i, stickyFooter: d, scrollLabel: c, virtualized: s, surface: p, radius: v, className: z, ...$ }) {
33
- const B = X("Table", "density", r, { comfortable: "comfy" }) === "compact" ? "compact" : "comfy", g = /* @__PURE__ */ t(M, { ...$, className: m("alea-table", z), "data-density": B, "data-sticky": a || s ? !0 : void 0, "data-variant": l !== "default" ? l : void 0, "data-stack": n, "data-stack-hide-empty": n && i ? !0 : void 0, "data-sticky-footer": d ? !0 : void 0, "data-virtualized": s ? !0 : void 0 }), y = s ? /* @__PURE__ */ t(O, { layout: W, layoutOptions: { rowHeight: s.rowHeight, headingHeight: s.headingHeight ?? 44 }, children: g }) : g, N = e ? { maxHeight: e, ...s ? { height: e } : {} } : void 0, C = Z(c);
34
- return o ? /* @__PURE__ */ t(E, { ref: C, className: "alea-table-wrap", style: N, ...T({ surface: p, radius: v }), children: y }) : /* @__PURE__ */ t("div", { ref: C, className: "alea-table-wrap", style: N, ...T({ surface: p, radius: v }), children: y });
33
+ function ve({ stickyHeader: a, density: r = "comfy", maxHeight: e, resizable: l, variant: o = "default", stackBelow: n, stackHideEmpty: s, stickyFooter: d, stickyColumns: i, scrollLabel: v, noWrap: k, virtualized: c, surface: z, radius: $, className: B, ...H }) {
34
+ const S = ee("Table", "density", r, { comfortable: "comfy" }) === "compact" ? "compact" : "comfy", g = /* @__PURE__ */ t(P, { ...H, className: u("alea-table", B), "data-density": S, "data-sticky": a || c ? !0 : void 0, "data-variant": o !== "default" ? o : void 0, "data-stack": n, "data-stack-hide-empty": n && s ? !0 : void 0, "data-sticky-footer": d ? !0 : void 0, "data-pin": i, "data-virtualized": c ? !0 : void 0, "data-nowrap": k || void 0 }), y = c ? /* @__PURE__ */ t(W, { layout: j, layoutOptions: { rowHeight: c.rowHeight, headingHeight: c.headingHeight ?? 44 }, children: g }) : g, D = e ? { maxHeight: e, ...c ? { height: e } : {} } : void 0, m = re(v), { edges: N } = ae(m, "", !!i), w = { className: "alea-table-wrap", style: D, "data-scrolled-start": N.start || void 0, "data-scrolled-end": N.end || void 0, ...Y({ surface: z, radius: $ }) };
35
+ return l ? /* @__PURE__ */ t(V, { ref: m, ...w, children: y }) : /* @__PURE__ */ t("div", { ref: m, ...w, children: y });
35
36
  }
36
- function ue({ columns: a, children: r, className: e, ...o }) {
37
- const l = Q(), { selectionBehavior: n, selectionMode: i, allowsDragging: d } = A();
38
- return /* @__PURE__ */ h(V, { ...o, className: f("alea-thead", e), children: [
39
- d && /* @__PURE__ */ t(b, { className: "alea-th alea-th-narrow", children: /* @__PURE__ */ t("span", { className: "alea-visually-hidden", children: l.dragToMove }) }),
40
- n === "toggle" && /* @__PURE__ */ t(b, { className: "alea-th alea-th-narrow", children: i === "multiple" && /* @__PURE__ */ t(R, { slot: "selection" }) }),
41
- /* @__PURE__ */ t(x, { items: a, children: r })
37
+ function ge({ columns: a, children: r, className: e, ...l }) {
38
+ const o = _(), { selectionBehavior: n, selectionMode: s, allowsDragging: d } = C();
39
+ return /* @__PURE__ */ f(q, { ...l, className: p("alea-thead", e), children: [
40
+ d && /* @__PURE__ */ t(h, { className: "alea-th alea-th-narrow", children: /* @__PURE__ */ t("span", { className: "alea-visually-hidden", children: o.dragToMove }) }),
41
+ n === "toggle" && /* @__PURE__ */ t(h, { className: "alea-th alea-th-narrow", children: s === "multiple" && /* @__PURE__ */ t(x, { slot: "selection" }) }),
42
+ /* @__PURE__ */ t(A, { items: a, children: r })
42
43
  ] });
43
44
  }
44
- function be({ children: a, align: r = "start", className: e, ...o }) {
45
- return /* @__PURE__ */ t(b, { ...o, className: m("alea-th", e), "data-align": r, children: ({ allowsSorting: l, sortDirection: n }) => /* @__PURE__ */ h("div", { className: "alea-th-inner", children: [
45
+ function ye({ children: a, align: r = "start", className: e, ...l }) {
46
+ return /* @__PURE__ */ t(h, { ...l, className: u("alea-th", e), "data-align": r, children: ({ allowsSorting: o, sortDirection: n }) => /* @__PURE__ */ f("div", { className: "alea-th-inner", children: [
46
47
  /* @__PURE__ */ t("span", { className: "alea-th-label", children: a }),
47
- l && /* @__PURE__ */ t(G, { size: 14, "aria-hidden": "true", className: "alea-sort", "data-direction": n }),
48
- /* @__PURE__ */ t(_, {})
48
+ o && /* @__PURE__ */ t(K, { size: 14, "aria-hidden": "true", className: "alea-sort", "data-direction": n }),
49
+ /* @__PURE__ */ t(oe, {})
49
50
  ] }) });
50
51
  }
51
- function _() {
52
- return w(L) ? /* @__PURE__ */ t(U, { className: "alea-col-resizer" }) : null;
52
+ function oe() {
53
+ return T(G) ? /* @__PURE__ */ t(I, { className: "alea-col-resizer" }) : null;
53
54
  }
54
- function he({ className: a, animateRows: r, items: e, children: o, dependencies: l, ...n }) {
55
- const i = Y(e, o, r);
56
- return /* @__PURE__ */ t(P, { ...n, items: i.items, dependencies: i.dependencies ? [...l ?? [], ...i.dependencies] : l, className: f("alea-tbody", a), children: i.children });
55
+ function Ne({ className: a, animateRows: r, items: e, children: l, dependencies: o, ...n }) {
56
+ const s = te(e, l, r);
57
+ return /* @__PURE__ */ t(L, { ...n, items: s.items, dependencies: s.dependencies ? [...o ?? [], ...s.dependencies] : o, className: p("alea-tbody", a), children: s.children });
57
58
  }
58
- const k = H(!1);
59
- function fe({ className: a, children: r, ...e }) {
60
- return /* @__PURE__ */ t(j, { ...e, className: f("alea-tfoot", a), children: /* @__PURE__ */ t(k.Provider, { value: !0, children: r }) });
59
+ const R = E(!1);
60
+ function we({ className: a, children: r, ...e }) {
61
+ return /* @__PURE__ */ t(U, { ...e, className: p("alea-tfoot", a), children: /* @__PURE__ */ t(R.Provider, { value: !0, children: r }) });
61
62
  }
62
- function pe({ id: a, columns: r, children: e, className: o, ...l }) {
63
- const { selectionBehavior: n, allowsDragging: i, selectionMode: d } = A(), c = w(k);
64
- return /* @__PURE__ */ h(F, { id: a, ...c && d !== "none" ? { isDisabled: !0 } : {}, ...l, className: m("alea-tr", o), "data-footer": c ? !0 : void 0, children: [
65
- i && /* @__PURE__ */ t(u, { className: "alea-td alea-td-narrow", children: c ? null : /* @__PURE__ */ t(K, {}) }),
66
- n === "toggle" && /* @__PURE__ */ t(u, { className: "alea-td alea-td-narrow", children: c ? null : /* @__PURE__ */ t(R, { slot: "selection" }) }),
67
- /* @__PURE__ */ t(x, { items: r, dependencies: l.dependencies, children: e })
63
+ function Te({ id: a, columns: r, children: e, className: l, ...o }) {
64
+ const { selectionBehavior: n, allowsDragging: s, selectionMode: d } = C(), i = T(R);
65
+ return /* @__PURE__ */ f(O, { id: a, ...i && d !== "none" ? { isDisabled: !0 } : {}, ...o, className: u("alea-tr", l), "data-footer": i ? !0 : void 0, children: [
66
+ s && /* @__PURE__ */ t(b, { className: "alea-td alea-td-narrow", children: i ? null : /* @__PURE__ */ t(Z, {}) }),
67
+ n === "toggle" && /* @__PURE__ */ t(b, { className: "alea-td alea-td-narrow", children: i ? null : /* @__PURE__ */ t(x, { slot: "selection" }) }),
68
+ /* @__PURE__ */ t(A, { items: r, dependencies: o.dependencies, children: e })
68
69
  ] });
69
70
  }
70
- function ve({ className: a, ...r }) {
71
- const { align: e, label: o, ...l } = r;
72
- return /* @__PURE__ */ t(u, { ...l, "data-align": e, "data-label": o, className: m("alea-td", a) });
71
+ function Ce({ className: a, ...r }) {
72
+ const { align: e, label: l, ...o } = r;
73
+ return /* @__PURE__ */ t(b, { ...o, "data-align": e, "data-label": l, className: u("alea-td", a) });
73
74
  }
74
75
  export {
75
- ve as Cell,
76
- be as Column,
77
- pe as Row,
78
- me as Table,
79
- he as TableBody,
80
- fe as TableFooter,
81
- ue as TableHeader
76
+ Ce as Cell,
77
+ ye as Column,
78
+ Te as Row,
79
+ ve as Table,
80
+ Ne as TableBody,
81
+ we as TableFooter,
82
+ ge as TableHeader
82
83
  };
@@ -70,6 +70,10 @@ export interface ThemeProviderProps {
70
70
  contrast?: 'system' | 'more' | 'normal';
71
71
  /** decorated (default) keeps the background orbs and aurora; plain turns them off for a flat page, in any look and contrast. */
72
72
  background?: 'decorated' | 'plain';
73
+ /** Underline every text link (links, breadcrumbs, side navigation links and menu links), not only on hover, so a link never depends on its color alone. For a "links are underlined" setting or an AAA context. Default false. */
74
+ underlineLinks?: boolean;
75
+ /** Let every Button below break a long label onto lines instead of cutting it with an ellipsis (what `wrap` does on one button). Short labels look the same; a label wider than its container wraps, which keeps 375 px with large text from overflowing. Default false. */
76
+ wrapButtons?: boolean;
73
77
  /** The glass look's liquid edge (Chromium; others keep the frost): how much what is behind a glass surface bends at its edge,
74
78
  * 'off', 'subtle', 'medium' (default) or 'strong', or a multiplier; lensSelector adds your own surfaces (CSS selector).
75
79
  * The lens rests while the page scrolls and comes back ~150 ms after it stops (the frost stays); pauseOnScroll={false} keeps it on always. Surfaces over 400 x 300 px keep the frost only. */
@@ -96,7 +100,7 @@ export declare function ThemeScript({ storageKey, defaultTheme }: {
96
100
  }): import("react").JSX.Element;
97
101
  /** A router's useHref that leaves absolute URLs, protocol-relative URLs and #anchors alone (routers would turn https://… into /current/https:/…). */
98
102
  export declare function keepAbsolute(useHref: (href: string) => string): (href: string) => string;
99
- export declare function ThemeProvider({ children, dir: dirProp, defaultTheme, theme: controlled, onThemeChange, storageKey, scope, className, brand, density, navigate, useHref, locale, motion, preset, surface, contrast, background, strings, glass }: ThemeProviderProps): import("react").JSX.Element;
103
+ export declare function ThemeProvider({ children, dir: dirProp, defaultTheme, theme: controlled, onThemeChange, storageKey, scope, className, brand, density, navigate, useHref, locale, motion, preset, surface, contrast, background, underlineLinks, wrapButtons, strings, glass }: ThemeProviderProps): import("react").JSX.Element;
100
104
  /** The current theme and a setter. Works without a provider (reads the document). */
101
105
  export declare function useTheme(): ThemeContextValue;
102
106
  export {};