@memobit/libs 3.29.0 → 3.30.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.
@@ -1,139 +1,142 @@
1
- import { Icon as b } from "../Icon/Icon2.js";
2
- import { libMessages as B } from "../../contexts/LanguageContext/libMessages.js";
3
- import { useMessages as M } from "../../hooks/useLanguage.js";
4
- import { Button as C } from "../Button/Button2.js";
5
- import { InputSearch as j } from "../InputSearch/InputSearch2.js";
6
- import { useAppFrame as I } from "./useAppFrame.js";
7
- import { countActiveFilters as L } from "./filterRules.js";
8
- import { AppliedFilters as P, FilterSections as z } from "./FilterSections.js";
9
- import { toMenuItems as O } from "./menuItems.js";
10
- import { getHeadingText as W, getResultLabel as D } from "./shellText.js";
11
- import { AppMark as V, PageMenu as H, PagePager as R, SortSheetBody as T } from "./PageParts.js";
12
- import { BottomSheet as k } from "./BottomSheet.js";
13
- import { useCallback as $, useState as q } from "react";
14
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
15
- var ne = (i) => {
16
- const { title: N, counts: c, primaryAction: t, actions: w = [], search: n, sort: o, view: p, filters: s = [], values: h = {}, onFilterChange: _ = () => {
17
- }, onClearFilters: m, pagination: d, children: S } = i, l = M(B), u = I(), [v, g] = q(null), r = $(() => g(null), []), f = L(s, h), A = D(i, l), y = o?.fields.find((x) => x.value === o.value.field)?.label, F = [W(i, l), y].filter(Boolean).join(" · ");
18
- return /* @__PURE__ */ a("div", {
1
+ import { Icon as v } from "../Icon/Icon2.js";
2
+ import { libMessages as j } from "../../contexts/LanguageContext/libMessages.js";
3
+ import { useMessages as L } from "../../hooks/useLanguage.js";
4
+ import { Button as N } from "../Button/Button2.js";
5
+ import { InputSearch as P } from "../InputSearch/InputSearch2.js";
6
+ import { useAppFrame as T } from "./useAppFrame.js";
7
+ import { countActiveFilters as z } from "./filterRules.js";
8
+ import { getHeadingText as O, getResultLabel as W } from "./shellText.js";
9
+ import { AppMark as D, PageMenu as V, PagePager as H, SortSheetBody as R } from "./PageParts.js";
10
+ import { TabBar as $ } from "./AppNav.js";
11
+ import { AppliedFilters as q, FilterSections as E } from "./FilterSections.js";
12
+ import { getMenuItems as G, navToMenuItems as J } from "./menuItems.js";
13
+ import { BottomSheet as w } from "./BottomSheet.js";
14
+ import { useCallback as K, useState as Q } from "react";
15
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
16
+ var pe = (h) => {
17
+ const { title: S, counts: p, primaryAction: l, actions: A = [], search: n, sort: a, view: m, filters: s = [], values: d = {}, onFilterChange: C = () => {
18
+ }, onClearFilters: u, pagination: g, children: y } = h, t = L(j), r = T(), [k, f] = Q(null), i = K(() => f(null), []), b = z(s, d), B = W(h, t), F = a?.fields.find((x) => x.value === a.value.field)?.label, I = [O(h, t), F].filter(Boolean).join(" · "), c = r?.nav ?? [], _ = c.length > 1 && c.length <= 5, M = [..._ ? [] : J(c), ...G(A, r?.menuItems ?? [], !0)];
19
+ return /* @__PURE__ */ o("div", {
19
20
  className: [
20
21
  "page-shell",
21
22
  "page-shell--workbench",
22
23
  "page-shell--phone",
23
- t?.variant ? `page-shell--fab-${t.variant}` : ""
24
+ _ ? "page-shell--with-tabs" : "",
25
+ l?.variant ? `page-shell--fab-${l.variant}` : ""
24
26
  ].filter(Boolean).join(" "),
25
27
  children: [
26
- /* @__PURE__ */ a("header", {
28
+ /* @__PURE__ */ o("header", {
27
29
  className: "page-shell__topbar",
28
30
  children: [
29
- u && /* @__PURE__ */ e(V, {
30
- app: u.app,
31
+ r && /* @__PURE__ */ e(D, {
32
+ app: r.app,
31
33
  logoOnly: !0
32
34
  }),
33
35
  /* @__PURE__ */ e("h1", {
34
36
  className: "page-shell__title",
35
- children: N
37
+ children: S
36
38
  }),
37
39
  /* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
38
- s.length > 0 && /* @__PURE__ */ a("button", {
40
+ s.length > 0 && /* @__PURE__ */ o("button", {
39
41
  type: "button",
40
42
  className: "page-shell__icon-button",
41
- onClick: () => g("filters"),
42
- children: [/* @__PURE__ */ e(b, {
43
+ onClick: () => f("filters"),
44
+ children: [/* @__PURE__ */ e(v, {
43
45
  name: "tune",
44
46
  size: "md"
45
- }), f > 0 && /* @__PURE__ */ e("span", {
47
+ }), b > 0 && /* @__PURE__ */ e("span", {
46
48
  className: "page-shell__badge page-shell__badge--corner",
47
- children: f
49
+ children: b
48
50
  })]
49
51
  }),
50
- /* @__PURE__ */ e(H, { items: [...O(w), ...u?.menuItems ?? []] })
52
+ /* @__PURE__ */ e(V, { items: M })
51
53
  ]
52
54
  }),
53
55
  n && /* @__PURE__ */ e("div", {
54
56
  className: "page-shell__search-row",
55
- children: /* @__PURE__ */ e(j, {
57
+ children: /* @__PURE__ */ e(P, {
56
58
  value: n.value,
57
- placeholder: n.placeholder ?? l.search,
59
+ placeholder: n.placeholder ?? t.search,
58
60
  onChange: n.onChange
59
61
  })
60
62
  }),
61
- /* @__PURE__ */ e(P, {
63
+ /* @__PURE__ */ e(q, {
62
64
  filters: s,
63
- values: h,
64
- onFilterChange: _,
65
- onClearFilters: m,
65
+ values: d,
66
+ onFilterChange: C,
67
+ onClearFilters: u,
66
68
  scroll: !0
67
69
  }),
68
- (o || p || d && d.pageCount > 1) && /* @__PURE__ */ a("div", {
70
+ (a || m || g && g.pageCount > 1) && /* @__PURE__ */ o("div", {
69
71
  className: "page-shell__result-row",
70
- children: [(o || p) && /* @__PURE__ */ a("button", {
72
+ children: [(a || m) && /* @__PURE__ */ o("button", {
71
73
  type: "button",
72
74
  className: "page-shell__result-line",
73
- onClick: () => g("sort"),
74
- children: [/* @__PURE__ */ e("span", { children: F || l.pageSortAndView }), /* @__PURE__ */ e(b, {
75
+ onClick: () => f("sort"),
76
+ children: [/* @__PURE__ */ e("span", { children: I || t.pageSortAndView }), /* @__PURE__ */ e(v, {
75
77
  name: "caret-down",
76
78
  size: "sm"
77
79
  })]
78
- }), /* @__PURE__ */ e(R, { pagination: d })]
80
+ }), /* @__PURE__ */ e(H, { pagination: g })]
79
81
  }),
80
82
  /* @__PURE__ */ e("div", {
81
83
  className: "page-shell__content",
82
- children: S
84
+ children: y
83
85
  }),
84
- t && /* @__PURE__ */ e("button", {
86
+ l && /* @__PURE__ */ e("button", {
85
87
  type: "button",
86
88
  className: "page-shell__fab",
87
- disabled: t.disabled,
88
- onClick: t.onClick,
89
- children: /* @__PURE__ */ e(b, {
90
- name: t.icon ?? "plus",
89
+ disabled: l.disabled,
90
+ onClick: l.onClick,
91
+ children: /* @__PURE__ */ e(v, {
92
+ name: l.icon ?? "plus",
91
93
  size: "lg"
92
94
  })
93
95
  }),
94
- /* @__PURE__ */ e(k, {
95
- isOpen: v === "filters",
96
+ _ && /* @__PURE__ */ e($, { nav: c }),
97
+ /* @__PURE__ */ e(w, {
98
+ isOpen: k === "filters",
96
99
  tall: !0,
97
- title: l.filters,
98
- onClose: r,
99
- end: f > 0 && m ? /* @__PURE__ */ e("button", {
100
+ title: t.filters,
101
+ onClose: i,
102
+ end: b > 0 && u ? /* @__PURE__ */ e("button", {
100
103
  type: "button",
101
104
  className: "page-shell__link",
102
- onClick: m,
103
- children: l.pageClearAll
105
+ onClick: u,
106
+ children: t.pageClearAll
104
107
  }) : void 0,
105
- footer: /* @__PURE__ */ e(C, {
108
+ footer: /* @__PURE__ */ e(N, {
106
109
  variant: "info",
107
110
  fullWidth: !0,
108
- disabled: c?.shown === 0,
109
- onClick: r,
110
- children: c ? A(c.shown) : l.pageDone
111
+ disabled: p?.shown === 0,
112
+ onClick: i,
113
+ children: p ? B(p.shown) : t.pageDone
111
114
  }),
112
- children: /* @__PURE__ */ e(z, {
115
+ children: /* @__PURE__ */ e(E, {
113
116
  filters: s,
114
- values: h,
117
+ values: d,
115
118
  context: "sheet",
116
- onFilterChange: _
119
+ onFilterChange: C
117
120
  })
118
121
  }),
119
- /* @__PURE__ */ e(k, {
120
- isOpen: v === "sort",
121
- title: l.pageSortAndView,
122
- onClose: r,
123
- footer: /* @__PURE__ */ e(C, {
122
+ /* @__PURE__ */ e(w, {
123
+ isOpen: k === "sort",
124
+ title: t.pageSortAndView,
125
+ onClose: i,
126
+ footer: /* @__PURE__ */ e(N, {
124
127
  variant: "info",
125
128
  fullWidth: !0,
126
- onClick: r,
127
- children: l.pageDone
129
+ onClick: i,
130
+ children: t.pageDone
128
131
  }),
129
- children: /* @__PURE__ */ e(T, {
130
- sort: o,
131
- view: p
132
+ children: /* @__PURE__ */ e(R, {
133
+ sort: a,
134
+ view: m
132
135
  })
133
136
  })
134
137
  ]
135
138
  });
136
139
  };
137
140
  export {
138
- ne as WorkbenchPhone
141
+ pe as WorkbenchPhone
139
142
  };
@@ -1,30 +1,31 @@
1
- import { libMessages as W } from "../../contexts/LanguageContext/libMessages.js";
2
- import { useMessages as j } from "../../hooks/useLanguage.js";
1
+ import { libMessages as V } from "../../contexts/LanguageContext/libMessages.js";
2
+ import { useMessages as L } from "../../hooks/useLanguage.js";
3
3
  import { Button as _ } from "../Button/Button2.js";
4
- import { InputSearch as B } from "../InputSearch/InputSearch2.js";
5
- import { useBreakpoint as L } from "../../hooks/useBreakpoint.js";
6
- import { Drawer as V } from "../Drawer/Drawer2.js";
7
- import { useAppFrame as H } from "./useAppFrame.js";
8
- import { countActiveFilters as R } from "./filterRules.js";
9
- import { AppliedFilters as q, FilterSections as z } from "./FilterSections.js";
10
- import { toMenuItems as E } from "./menuItems.js";
4
+ import { InputSearch as R } from "../InputSearch/InputSearch2.js";
5
+ import { useBreakpoint as E } from "../../hooks/useBreakpoint.js";
6
+ import { Drawer as H } from "../Drawer/Drawer2.js";
7
+ import { useAppFrame as q } from "./useAppFrame.js";
8
+ import { countActiveFilters as z } from "./filterRules.js";
11
9
  import { getHeadingText as G, getResultLabel as J } from "./shellText.js";
12
- import { ActionButton as u, AppMark as M, PageMenu as x, PagePager as K, SortDropdown as Q, ViewOptions as I, ViewToggle as U } from "./PageParts.js";
13
- import { WorkbenchPhone as X } from "./WorkbenchPhone.js";
14
- import { useState as Y } from "react";
10
+ import { ActionButton as v, AppMark as B, PageMenu as M, PagePager as K, SortDropdown as Q, ViewOptions as S, ViewToggle as U } from "./PageParts.js";
11
+ import { NavRail as X, SideNav as Y } from "./AppNav.js";
12
+ import { AppliedFilters as Z, FilterSections as $ } from "./FilterSections.js";
13
+ import { getButtonActions as ee, getMenuItems as y } from "./menuItems.js";
14
+ import { WorkbenchPhone as le } from "./WorkbenchPhone.js";
15
+ import { useState as ae } from "react";
15
16
  import { jsx as e, jsxs as a } from "react/jsx-runtime";
16
- var de = (o) => {
17
- const { isMobile: O, isTablet: l } = L(), s = j(W), r = H(), [S, m] = Y(!1);
18
- if (O) return /* @__PURE__ */ e(X, { ...o });
19
- const { title: y, counts: f, primaryAction: n, actions: v = [], search: c, sort: N, view: t, filters: p = [], values: d = {}, onFilterChange: b = () => {
20
- }, onClearFilters: i, pagination: D, children: P } = o, k = G(o, s), T = J(o, s), h = R(p, d), g = p.length > 0, w = r?.menuItems ?? [], C = /* @__PURE__ */ e(z, {
21
- filters: p,
22
- values: d,
17
+ var Ne = (n) => {
18
+ const { isMobile: I, isTablet: l } = E(), t = L(V), r = q(), [O, g] = ae(!1);
19
+ if (I) return /* @__PURE__ */ e(le, { ...n });
20
+ const { title: D, counts: N, primaryAction: c, actions: d = [], search: p, sort: b, view: s, filters: h = [], values: u = {}, onFilterChange: w = () => {
21
+ }, onClearFilters: i, pagination: P, children: T } = n, k = G(n, t), W = J(n, t), m = z(h, u), f = h.length > 0, C = r?.menuItems ?? [], o = r?.nav ?? [], j = !!(s && (s.columns || s.groupBy || s.toggles?.length)), A = /* @__PURE__ */ e($, {
22
+ filters: h,
23
+ values: u,
23
24
  context: "panel",
24
- onFilterChange: b
25
- }), A = h > 0 && /* @__PURE__ */ e("span", {
25
+ onFilterChange: w
26
+ }), F = m > 0 && /* @__PURE__ */ e("span", {
26
27
  className: "page-shell__badge",
27
- children: h
28
+ children: m
28
29
  });
29
30
  return /* @__PURE__ */ a("div", {
30
31
  className: [
@@ -36,47 +37,52 @@ var de = (o) => {
36
37
  !l && /* @__PURE__ */ a("aside", {
37
38
  className: "page-shell__side",
38
39
  children: [
39
- r && /* @__PURE__ */ e(M, { app: r.app }),
40
- n && /* @__PURE__ */ e(u, {
41
- action: n,
40
+ r && /* @__PURE__ */ e(B, { app: r.app }),
41
+ c && /* @__PURE__ */ e(v, {
42
+ action: c,
42
43
  fullWidth: !0
43
44
  }),
44
- g && /* @__PURE__ */ a("div", {
45
+ o.length > 1 && /* @__PURE__ */ e(Y, { nav: o }),
46
+ f && /* @__PURE__ */ a("div", {
45
47
  className: "page-shell__side-group",
46
48
  children: [/* @__PURE__ */ a("div", {
47
49
  className: "page-shell__side-head",
48
50
  children: [
49
51
  /* @__PURE__ */ e("span", {
50
52
  className: "page-shell__group-title",
51
- children: s.filters
53
+ children: t.filters
52
54
  }),
53
- A,
55
+ F,
54
56
  /* @__PURE__ */ e("span", { className: "page-shell__spacer" }),
55
- h > 0 && i && /* @__PURE__ */ e("button", {
57
+ m > 0 && i && /* @__PURE__ */ e("button", {
56
58
  type: "button",
57
59
  className: "page-shell__link",
58
60
  onClick: i,
59
- children: s.pageClearAll
61
+ children: t.pageClearAll
60
62
  })
61
63
  ]
62
- }), C]
64
+ }), A]
63
65
  }),
64
- t && /* @__PURE__ */ e(I, { view: t })
66
+ s && /* @__PURE__ */ e(S, { view: s })
65
67
  ]
66
68
  }),
69
+ l && o.length > 1 && /* @__PURE__ */ e(X, {
70
+ app: r?.app,
71
+ nav: o
72
+ }),
67
73
  /* @__PURE__ */ a("div", {
68
74
  className: "page-shell__main",
69
75
  children: [
70
76
  /* @__PURE__ */ a("header", {
71
77
  className: "page-shell__toolbar",
72
78
  children: [
73
- l && g && /* @__PURE__ */ a(_, {
79
+ l && f && /* @__PURE__ */ a(_, {
74
80
  icon: "tune",
75
81
  variant: "default",
76
- onClick: () => m(!0),
77
- children: [s.filters, A]
82
+ onClick: () => g(!0),
83
+ children: [t.filters, F]
78
84
  }),
79
- l && r && /* @__PURE__ */ e(M, {
85
+ l && r && o.length <= 1 && /* @__PURE__ */ e(B, {
80
86
  app: r.app,
81
87
  logoOnly: !0
82
88
  }),
@@ -84,64 +90,64 @@ var de = (o) => {
84
90
  className: "page-shell__titles",
85
91
  children: [/* @__PURE__ */ e("h1", {
86
92
  className: "page-shell__title",
87
- children: y
93
+ children: D
88
94
  }), k && /* @__PURE__ */ e("p", {
89
95
  className: "page-shell__heading",
90
96
  children: k
91
97
  })]
92
98
  }),
93
- l && n && /* @__PURE__ */ e(u, { action: n }),
94
- l && /* @__PURE__ */ e(x, { items: [...E(v), ...w] }),
99
+ l && c && /* @__PURE__ */ e(v, { action: c }),
100
+ l && /* @__PURE__ */ e(M, { items: y(d, C, !0) }),
95
101
  l && /* @__PURE__ */ e("span", { className: "page-shell__break" }),
96
- c && /* @__PURE__ */ e(B, {
102
+ p && /* @__PURE__ */ e(R, {
97
103
  className: "page-shell__search",
98
- value: c.value,
99
- placeholder: c.placeholder ?? s.search,
100
- onChange: c.onChange
104
+ value: p.value,
105
+ placeholder: p.placeholder ?? t.search,
106
+ onChange: p.onChange
101
107
  }),
102
- N && /* @__PURE__ */ e(Q, { sort: N }),
103
- l && t && /* @__PURE__ */ e(U, { view: t }),
104
- !l && v.map((F) => /* @__PURE__ */ e(u, { action: F }, F.id)),
105
- !l && /* @__PURE__ */ e(x, { items: w })
108
+ b && /* @__PURE__ */ e(Q, { sort: b }),
109
+ l && s && /* @__PURE__ */ e(U, { view: s }),
110
+ !l && ee(d).map((x) => /* @__PURE__ */ e(v, { action: x }, x.id)),
111
+ !l && /* @__PURE__ */ e(M, { items: y(d, C, !1) })
106
112
  ]
107
113
  }),
108
114
  /* @__PURE__ */ a("div", {
109
115
  className: "page-shell__status",
110
- children: [/* @__PURE__ */ e(q, {
111
- filters: p,
112
- values: d,
113
- onFilterChange: b,
116
+ children: [/* @__PURE__ */ e(Z, {
117
+ filters: h,
118
+ values: u,
119
+ onFilterChange: w,
114
120
  onClearFilters: i
115
- }), /* @__PURE__ */ e(K, { pagination: D })]
121
+ }), /* @__PURE__ */ e(K, { pagination: P })]
116
122
  }),
117
123
  /* @__PURE__ */ e("div", {
118
124
  className: "page-shell__content",
119
- children: P
125
+ children: T
120
126
  })
121
127
  ]
122
128
  }),
123
- l && g && /* @__PURE__ */ e(V, {
124
- isOpen: S,
125
- onClose: () => m(!1),
129
+ l && f && /* @__PURE__ */ e(H, {
130
+ isOpen: O,
131
+ onClose: () => g(!1),
126
132
  position: "left",
127
- title: s.filters,
133
+ title: t.filters,
128
134
  footer: /* @__PURE__ */ a("div", {
129
135
  className: "page-shell__drawer-footer",
130
- children: [h > 0 && i && /* @__PURE__ */ e(_, {
136
+ children: [m > 0 && i && /* @__PURE__ */ e(_, {
131
137
  variant: "default",
132
138
  onClick: i,
133
- children: s.pageClearAll
134
- }), f && /* @__PURE__ */ e(_, {
139
+ children: t.pageClearAll
140
+ }), N && /* @__PURE__ */ e(_, {
135
141
  variant: "info",
136
142
  fullWidth: !0,
137
- onClick: () => m(!1),
138
- children: T(f.shown)
143
+ onClick: () => g(!1),
144
+ children: W(N.shown)
139
145
  })]
140
146
  }),
141
147
  children: /* @__PURE__ */ a("div", {
142
148
  className: "page-shell__drawer-body",
143
- children: [C, t?.columns && /* @__PURE__ */ e(I, {
144
- view: t,
149
+ children: [A, s && j && /* @__PURE__ */ e(S, {
150
+ view: s,
145
151
  showToggle: !1
146
152
  })]
147
153
  })
@@ -150,5 +156,5 @@ var de = (o) => {
150
156
  });
151
157
  };
152
158
  export {
153
- de as WorkbenchShell
159
+ Ne as WorkbenchShell
154
160
  };
@@ -1,9 +1,17 @@
1
- var i = (l) => l.map((e) => ({
1
+ var o = (l) => l.map((e) => ({
2
2
  label: e.label,
3
3
  icon: e.icon,
4
4
  onClick: e.onClick,
5
- isActive: !1
5
+ isActive: !1,
6
+ separator: e.separator
7
+ })), r = (l) => l.filter((e) => !e.menu), t = (l, e, a) => [...o(a ? l : l.filter((n) => n.menu)), ...e], i = (l) => l.map((e) => ({
8
+ label: e.label,
9
+ icon: e.icon,
10
+ onClick: e.onSelect,
11
+ isActive: e.isActive
6
12
  }));
7
13
  export {
8
- i as toMenuItems
14
+ r as getButtonActions,
15
+ t as getMenuItems,
16
+ i as navToMenuItems
9
17
  };
@@ -0,0 +1,37 @@
1
+ import { AppFrame as m } from "../PageShell/AppFrame.js";
2
+ import { useMemo as p } from "react";
3
+ import { jsx as s } from "react/jsx-runtime";
4
+ import { matchPath as l, useLocation as u, useNavigate as d } from "react-router";
5
+ var g = ({ nav: n, app: e, ...r }) => {
6
+ const { pathname: t } = u(), a = d(), h = p(() => n.map((o) => ({
7
+ id: o.path,
8
+ label: o.label,
9
+ icon: o.icon,
10
+ count: o.count,
11
+ isActive: l({
12
+ path: o.path,
13
+ end: o.end ?? o.path === "/"
14
+ }, t) !== null,
15
+ onSelect: () => a(o.path)
16
+ })), [
17
+ n,
18
+ t,
19
+ a
20
+ ]), c = n[0]?.path ?? "/", i = p(() => ({
21
+ ...e,
22
+ onHomeClick: e.onHomeClick ?? (t === c ? void 0 : () => a(c))
23
+ }), [
24
+ e,
25
+ t,
26
+ c,
27
+ a
28
+ ]);
29
+ return /* @__PURE__ */ s(m, {
30
+ ...r,
31
+ app: i,
32
+ nav: h
33
+ });
34
+ };
35
+ export {
36
+ g as RouterAppFrame
37
+ };
@@ -1 +1 @@
1
- .scroll-to-top{bottom:var(--spacing-24);right:var(--spacing-24);z-index:999;width:var(--spacing-48);height:var(--spacing-48);border-radius:var(--radius-full);background-color:var(--card-background-color);color:var(--body-accent-color);border:var(--spacing-1) solid var(--card-border-color);cursor:pointer;box-shadow:0 var(--spacing-4) var(--spacing-12) var(--box-shadow);transition:transform var(--transition-fast);animation:scrollToTopFadeIn var(--transition-moderate);justify-content:center;align-items:center;display:flex;position:fixed}.scroll-to-top:hover{transform:scale(1.1)}.scroll-to-top:active{transform:scale(.95)}body:has(.float-button-container) .scroll-to-top{right:calc(var(--spacing-24) + var(--spacing-4));bottom:calc(var(--spacing-24) + 66px)}body:has(.page-shell__fab) .scroll-to-top{right:calc(var(--spacing-16) + var(--spacing-6));bottom:calc(var(--spacing-16) + var(--spacing-60) + var(--spacing-12) + env(safe-area-inset-bottom,0px))}@keyframes scrollToTopFadeIn{0%{opacity:0;transform:translateY(var(--spacing-12))}to{opacity:1;transform:translateY(0)}}@media (width<=768px){.scroll-to-top{bottom:var(--spacing-16);right:var(--spacing-16)}body:has(.float-button-container) .scroll-to-top{bottom:calc(var(--spacing-16) + 58px)}}
1
+ .scroll-to-top{bottom:var(--spacing-24);right:var(--spacing-24);z-index:999;width:var(--spacing-48);height:var(--spacing-48);border-radius:var(--radius-full);background-color:var(--card-background-color);color:var(--body-accent-color);border:var(--spacing-1) solid var(--card-border-color);cursor:pointer;box-shadow:0 var(--spacing-4) var(--spacing-12) var(--box-shadow);transition:transform var(--transition-fast);animation:scrollToTopFadeIn var(--transition-moderate);justify-content:center;align-items:center;display:flex;position:fixed}.scroll-to-top:hover{transform:scale(1.1)}.scroll-to-top:active{transform:scale(.95)}body:has(.float-button-container) .scroll-to-top{right:calc(var(--spacing-24) + var(--spacing-4));bottom:calc(var(--spacing-24) + 66px)}body:has(.page-shell__fab) .scroll-to-top{right:calc(var(--spacing-16) + var(--spacing-6));bottom:calc(var(--spacing-16) + var(--spacing-60) + var(--spacing-12) + env(safe-area-inset-bottom,0px))}@keyframes scrollToTopFadeIn{0%{opacity:0;transform:translateY(var(--spacing-12))}to{opacity:1;transform:translateY(0)}}@media (width<=768px){.scroll-to-top{bottom:var(--spacing-16);right:var(--spacing-16)}body:has(.float-button-container) .scroll-to-top{bottom:calc(var(--spacing-16) + 58px)}}body:has(.page-shell--with-tabs) .scroll-to-top{bottom:calc(var(--spacing-60) + var(--spacing-16) + env(safe-area-inset-bottom,0px))}body:has(.page-shell--with-tabs .page-shell__fab) .scroll-to-top{bottom:calc(var(--spacing-60) + var(--spacing-16) + var(--spacing-60) + var(--spacing-12) + env(safe-area-inset-bottom,0px))}
@@ -75,6 +75,7 @@ var l = {
75
75
  pageAllWords: "All words",
76
76
  pageViewCalendar: "Calendar",
77
77
  pageViewMap: "Map",
78
+ pageGroupNone: "None",
78
79
  selectDate: "Select date...",
79
80
  monthNames: [
80
81
  "January",
@@ -215,6 +216,7 @@ var l = {
215
216
  pageAllWords: "Toate cuvintele",
216
217
  pageViewCalendar: "Calendar",
217
218
  pageViewMap: "Hartă",
219
+ pageGroupNone: "Fără grupare",
218
220
  selectDate: "Alege data...",
219
221
  monthNames: [
220
222
  "Ianuarie",
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 649,
26
+ libBuildNumber: 653,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
package/dist/index.d.ts CHANGED
@@ -163,6 +163,8 @@ declare type AppFrameContextValue = Omit<AppFrameProps, 'children'>;
163
163
 
164
164
  export declare interface AppFrameProps {
165
165
  app: AppIdentity;
166
+ /** The app's sections. With react-router, RouterAppFrame from '@memobit/libs/router' builds these from paths. */
167
+ nav?: AppNavItem[];
166
168
  /** Adds the account menu (theme, password, two-factor, logout) and mounts the dialogs it opens. Needs an AuthProvider above. */
167
169
  account?: UseAccountMenuOptions;
168
170
  /** App-specific menu entries, listed before the account ones. Page actions join them on small screens. */
@@ -191,6 +193,16 @@ export declare interface AppIdentity {
191
193
  onHomeClick?: () => void;
192
194
  }
193
195
 
196
+ /** One of the app's sections. Shown as a side list on desktop, an icon rail on tablet and a bottom tab bar on phone. */
197
+ export declare interface AppNavItem {
198
+ id: string;
199
+ label: string;
200
+ icon: IconName;
201
+ count?: number;
202
+ isActive: boolean;
203
+ onSelect: () => void;
204
+ }
205
+
194
206
  export declare interface AppPersistenceDefaults<TPages, TTheme> {
195
207
  pages?: TPages;
196
208
  theme: TTheme;
@@ -2971,6 +2983,10 @@ export declare interface PageAction {
2971
2983
  icon?: IconName;
2972
2984
  variant?: ButtonVariant;
2973
2985
  disabled?: boolean;
2986
+ /** Always listed in the page menu, never as a button: for occasional actions such as "Manage locations". */
2987
+ menu?: boolean;
2988
+ /** In the menu, draws a divider above this action to start a new group. */
2989
+ separator?: boolean;
2974
2990
  onClick: () => void;
2975
2991
  }
2976
2992
 
@@ -2993,6 +3009,16 @@ export declare interface PageCounts {
2993
3009
 
2994
3010
  export declare type PageFilterValues = Record<string, FilterValue | undefined>;
2995
3011
 
3012
+ export declare interface PageGroupBy {
3013
+ options: Array<{
3014
+ value: string;
3015
+ label: string;
3016
+ }>;
3017
+ /** The grouping field, or null for no grouping. */
3018
+ value: string | null;
3019
+ onChange: (value: string | null) => void;
3020
+ }
3021
+
2996
3022
  /** What the list holds, singular and plural, in the app's language: { one: 'recipe', other: 'recipes' }. */
2997
3023
  export declare interface PageNoun {
2998
3024
  one: string;
@@ -3067,6 +3093,8 @@ export declare interface PageView {
3067
3093
  onChange: (value: string) => void;
3068
3094
  /** Optional fields the user can show or hide. Listed with the view options, closed until opened. */
3069
3095
  columns?: PageColumns;
3096
+ groupBy?: PageGroupBy;
3097
+ toggles?: PageViewToggle[];
3070
3098
  }
3071
3099
 
3072
3100
  export declare interface PageViewMode {
@@ -3075,6 +3103,14 @@ export declare interface PageViewMode {
3075
3103
  icon: IconName;
3076
3104
  }
3077
3105
 
3106
+ /** An on/off display preference shown with the view options, e.g. "Hide empty fields in cards". */
3107
+ export declare interface PageViewToggle {
3108
+ id: string;
3109
+ label: string;
3110
+ value: boolean;
3111
+ onChange: (value: boolean) => void;
3112
+ }
3113
+
3078
3114
  export declare const Pagination: FC<PaginationProps>;
3079
3115
 
3080
3116
  declare interface PaginationProps {