@memobit/libs 3.28.1 → 3.29.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 (36) hide show
  1. package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal2.js +7 -7
  2. package/dist/components/Auth/Login/Login2.js +4 -4
  3. package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +6 -6
  4. package/dist/components/DataView/DataView.CardView.js +84 -84
  5. package/dist/components/MenuHamburger/MenuHamburger2.js +14 -14
  6. package/dist/components/PageShell/AppFrame.js +27 -0
  7. package/dist/components/PageShell/BottomSheet.js +45 -0
  8. package/dist/components/PageShell/FilterField.css +1 -0
  9. package/dist/components/PageShell/FilterField2.js +294 -0
  10. package/dist/components/PageShell/FilterSections.js +86 -0
  11. package/dist/components/PageShell/PageParts.js +257 -0
  12. package/dist/components/PageShell/PageShell.css +1 -0
  13. package/dist/components/PageShell/PageShell2.js +11 -0
  14. package/dist/components/PageShell/WorkbenchPhone.js +139 -0
  15. package/dist/components/PageShell/WorkbenchShell.js +154 -0
  16. package/dist/components/PageShell/filterRules.js +123 -0
  17. package/dist/components/PageShell/filterValues.js +30 -0
  18. package/dist/components/PageShell/menuItems.js +9 -0
  19. package/dist/components/PageShell/shellText.js +39 -0
  20. package/dist/components/PageShell/useAppFrame.js +6 -0
  21. package/dist/components/PageShell/usePaging.js +23 -0
  22. package/dist/components/PageShell/usePruneStaleFilters.js +17 -0
  23. package/dist/components/PageShell/useSummaryMessages.js +17 -0
  24. package/dist/components/Pagination/Pagination.css +1 -1
  25. package/dist/components/Pagination/Pagination2.js +14 -13
  26. package/dist/components/Popover/Popover2.js +77 -67
  27. package/dist/components/ScrollToTop/ScrollToTop.css +1 -1
  28. package/dist/components/ScrollToTop/ScrollToTop2.js +20 -19
  29. package/dist/contexts/LanguageContext/libMessages.js +55 -7
  30. package/dist/helpers/VersionInfo.js +1 -1
  31. package/dist/hooks/useAccountMenu.js +6 -6
  32. package/dist/index.d.ts +299 -0
  33. package/dist/index.js +235 -213
  34. package/dist/version.js +1 -1
  35. package/dist/version.json +4 -4
  36. package/package.json +147 -147
@@ -1,14 +1,14 @@
1
1
  import './ChangePasswordModal.css';
2
2
  import { Modal as y } from "../../Modal/Modal2.js";
3
3
  import { InputPassword as h } from "../../InputPassword/InputPassword2.js";
4
- import { Toast as v } from "../../Toast/Toast2.js";
5
- import { HttpMethod as C, buildRequestHeaders as E, readErrorMessage as x } from "../../../helpers/Http.js";
6
- import { useAuth as F } from "../../../hooks/useAuth/useAuth.js";
4
+ import { HttpMethod as C, buildRequestHeaders as v, readErrorMessage as E } from "../../../helpers/Http.js";
5
+ import { useAuth as x } from "../../../hooks/useAuth/useAuth.js";
6
+ import { Toast as F } from "../../Toast/Toast2.js";
7
7
  /* empty css */
8
8
  import { useEffect as k, useState as o } from "react";
9
9
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
10
10
  function z({ isOpen: n, onClose: l }) {
11
- const { config: b } = F(), [i, m] = o(""), [d, u] = o(""), [c, f] = o(""), [g, a] = o(""), [r, p] = o(!1), [w, P] = o(null);
11
+ const { config: b } = x(), [i, m] = o(""), [d, u] = o(""), [c, f] = o(""), [g, a] = o(""), [r, p] = o(!1), [w, P] = o(null);
12
12
  k(() => {
13
13
  n && (m(""), u(""), f(""), a(""));
14
14
  }, [n]);
@@ -30,13 +30,13 @@ function z({ isOpen: n, onClose: l }) {
30
30
  const s = await fetch(`${b.apiBaseUrl}/auth/changePassword`, {
31
31
  method: C.Post,
32
32
  credentials: "include",
33
- headers: E(C.Post),
33
+ headers: v(C.Post),
34
34
  body: JSON.stringify({
35
35
  currentPassword: i,
36
36
  newPassword: d
37
37
  })
38
38
  });
39
- if (!s.ok) throw new Error(await x(s));
39
+ if (!s.ok) throw new Error(await E(s));
40
40
  P({
41
41
  message: "Password changed successfully!",
42
42
  type: "success"
@@ -122,7 +122,7 @@ function z({ isOpen: n, onClose: l }) {
122
122
  children: g
123
123
  })
124
124
  ]
125
- }), w && /* @__PURE__ */ e(v, {
125
+ }), w && /* @__PURE__ */ e(F, {
126
126
  message: w.message,
127
127
  type: w.type,
128
128
  onClose: _
@@ -3,13 +3,13 @@ import { Button as f } from "../../Button/Button2.js";
3
3
  import { Checkbox as b } from "../../Checkbox/Checkbox2.js";
4
4
  import { InputText as _ } from "../../InputText/InputText2.js";
5
5
  import { InputPassword as V } from "../../InputPassword/InputPassword2.js";
6
- import { Toast as W } from "../../Toast/Toast2.js";
7
- import { useAuth as Y } from "../../../hooks/useAuth/useAuth.js";
6
+ import { useAuth as W } from "../../../hooks/useAuth/useAuth.js";
7
+ import { Toast as Y } from "../../Toast/Toast2.js";
8
8
  /* empty css */
9
9
  import { useEffect as L, useState as r } from "react";
10
10
  import { Fragment as j, jsx as a, jsxs as c } from "react/jsx-runtime";
11
11
  function X({ redirectPath: h = "/" }) {
12
- const { login: P, verifyMfa: C, config: S, isAuthenticated: g } = Y(), [x, p] = r("credentials"), [l, E] = r(""), [d, N] = r(""), [y, k] = r(!1), [M, T] = r("totp"), [m, u] = r(""), [w, q] = r(!1), [n, i] = r(""), [o, s] = r(!1), [U, v] = r(!1);
12
+ const { login: P, verifyMfa: C, config: S, isAuthenticated: g } = W(), [x, p] = r("credentials"), [l, E] = r(""), [d, N] = r(""), [y, k] = r(!1), [M, T] = r("totp"), [m, u] = r(""), [w, q] = r(!1), [n, i] = r(""), [o, s] = r(!1), [U, v] = r(!1);
13
13
  L(() => {
14
14
  g && (window.location.href = h);
15
15
  }, [g, h]), L(() => {
@@ -144,7 +144,7 @@ function X({ redirectPath: h = "/" }) {
144
144
  ]
145
145
  })]
146
146
  })
147
- }), U && /* @__PURE__ */ a(W, {
147
+ }), U && /* @__PURE__ */ a(Y, {
148
148
  message: "Your session has expired. Please log in again.",
149
149
  type: "warning",
150
150
  onClose: () => v(!1)
@@ -3,19 +3,19 @@ import { Button as o } from "../../Button/Button2.js";
3
3
  import { Modal as O } from "../../Modal/Modal2.js";
4
4
  import { InputText as R } from "../../InputText/InputText2.js";
5
5
  import { InputPassword as B } from "../../InputPassword/InputPassword2.js";
6
- import { Toast as X } from "../../Toast/Toast2.js";
7
- import { HttpMethod as F, buildRequestHeaders as Y } from "../../../helpers/Http.js";
8
- import { useAuth as Z } from "../../../hooks/useAuth/useAuth.js";
6
+ import { HttpMethod as F, buildRequestHeaders as X } from "../../../helpers/Http.js";
7
+ import { useAuth as Y } from "../../../hooks/useAuth/useAuth.js";
8
+ import { Toast as Z } from "../../Toast/Toast2.js";
9
9
  import { QRCodeSVG as ee } from "../../../node_modules/qrcode.react/lib/esm/index.js";
10
10
  /* empty css */
11
11
  import { useCallback as U, useEffect as ae, useState as r } from "react";
12
12
  import { Fragment as A, jsx as e, jsxs as s } from "react/jsx-runtime";
13
13
  function pe({ isOpen: M, onClose: D }) {
14
- const { config: f } = Z(), [$, i] = r("loading"), [C, j] = r(!1), [_, x] = r(null), [P, I] = r(""), [b, V] = r(""), [p, c] = r(""), [m, d] = r(""), [S, v] = r([]), [k, u] = r(""), [a, N] = r(!1), [g, y] = r(null), l = U(async (t, h) => {
14
+ const { config: f } = Y(), [$, i] = r("loading"), [C, j] = r(!1), [_, x] = r(null), [P, I] = r(""), [b, V] = r(""), [p, c] = r(""), [m, d] = r(""), [S, v] = r([]), [k, u] = r(""), [a, N] = r(!1), [g, y] = r(null), l = U(async (t, h) => {
15
15
  const E = await fetch(`${f.apiBaseUrl}${t}`, {
16
16
  method: F.Post,
17
17
  credentials: "include",
18
- headers: Y(F.Post),
18
+ headers: X(F.Post),
19
19
  body: h ? JSON.stringify(h) : void 0
20
20
  }), T = await E.json().catch(() => ({}));
21
21
  if (!E.ok) throw new Error(T.error || "Request failed");
@@ -314,7 +314,7 @@ function pe({ isOpen: M, onClose: D }) {
314
314
  className: "MfaSetupModal__error",
315
315
  children: k
316
316
  })]
317
- }), g && /* @__PURE__ */ e(X, {
317
+ }), g && /* @__PURE__ */ e(Z, {
318
318
  message: g.message,
319
319
  type: g.type,
320
320
  onClose: () => y(null)
@@ -1,172 +1,172 @@
1
- import { Icon as k } from "../Icon/Icon2.js";
2
- import { libMessages as X } from "../../contexts/LanguageContext/libMessages.js";
3
- import { useMessages as Y } from "../../hooks/useLanguage.js";
4
- import { Tooltip as Z } from "../Tooltip/Tooltip2.js";
1
+ import { Icon as b } from "../Icon/Icon2.js";
2
+ import { libMessages as Z } from "../../contexts/LanguageContext/libMessages.js";
3
+ import { useMessages as R } from "../../hooks/useLanguage.js";
4
+ import { Tooltip as W } from "../Tooltip/Tooltip2.js";
5
5
  import { Checkbox as F } from "../Checkbox/Checkbox2.js";
6
6
  import { EmptyState as j } from "../EmptyState/EmptyState2.js";
7
- import { calculateTimelineMarkers as R } from "../TimelineMarkers/calculateTimelineMarkers.js";
8
- import { TimelineMobileSeparator as W } from "../TimelineMarkers/TimelineMarkers2.js";
9
- import { groupMotionKey as ee, renderCellContent as ae, renderColumnLabel as te } from "./DataView.helpers.js";
10
- import ie, { useMemo as z } from "react";
11
- import { Fragment as se, jsx as e, jsxs as c } from "react/jsx-runtime";
12
- var ne = (d) => typeof d == "number" ? `${d}px` : d;
13
- function fe({ data: d, columns: D, rowKey: V, card: s, actions: b, timeline: l, onRowClick: o, rowHref: E, rowClassName: L, empty: r, selectable: u, selectedIds: q = [], pinnedIds: g, onToggleSelect: _, cardMaxWidth: f, isMobile: B = !1, groups: $, showGroupCount: G = !0, collapsible: v = !1, collapsedGroups: H, onToggleGroup: J }) {
14
- const N = Y(X), I = D.filter((a) => !a.hideInCard && !(B && a.hideInMobile)), O = z(() => new Set(g ?? []), [g]), M = `data-view__cards${f !== void 0 ? " data-view__cards--grid" : ""}`, K = f !== void 0 ? { "--data-view-card-max-width": ne(f) } : void 0, Q = z(() => {
7
+ import { calculateTimelineMarkers as aa } from "../TimelineMarkers/calculateTimelineMarkers.js";
8
+ import { TimelineMobileSeparator as ea } from "../TimelineMarkers/TimelineMarkers2.js";
9
+ import { groupMotionKey as ta, renderCellContent as ia, renderColumnLabel as sa } from "./DataView.helpers.js";
10
+ import na, { useMemo as z } from "react";
11
+ import { Fragment as ca, jsx as a, jsxs as d } from "react/jsx-runtime";
12
+ var da = (c) => typeof c == "number" ? `${c}px` : c;
13
+ function wa({ data: c, columns: D, rowKey: V, card: s, actions: E, timeline: l, onRowClick: o, rowHref: L, rowClassName: q, empty: r, selectable: f, selectedIds: B = [], pinnedIds: g, onToggleSelect: _, cardMaxWidth: N, isMobile: G = !1, groups: $, showGroupCount: H = !0, collapsible: v = !1, collapsedGroups: J, onToggleGroup: O }) {
14
+ const w = R(Z), I = D.filter((e) => !e.hideInCard && !(G && e.hideInMobile)), Q = z(() => new Set(g ?? []), [g]), M = `data-view__cards${N !== void 0 ? " data-view__cards--grid" : ""}`, A = N !== void 0 ? { "--data-view-card-max-width": da(N) } : void 0, T = z(() => {
15
15
  if (!l) return /* @__PURE__ */ new Map();
16
- const a = d.map((i) => ({
16
+ const e = c.map((i) => ({
17
17
  id: l.idAccessor(i),
18
18
  date: l.dateAccessor(i)
19
19
  }));
20
- return R(a, l.granularity);
21
- }, [d, l]);
22
- if (d.length === 0)
23
- return r ? /* @__PURE__ */ e(j, {
20
+ return aa(e, l.granularity);
21
+ }, [c, l]);
22
+ if (c.length === 0)
23
+ return r ? /* @__PURE__ */ a(j, {
24
24
  title: r.title,
25
25
  description: r.description,
26
26
  icon: r.icon,
27
27
  primary: r.primary,
28
28
  secondary: r.secondary
29
- }) : /* @__PURE__ */ e(j, { title: N.noData });
30
- const P = (a, i) => {
31
- const h = Q.get(i), n = V(a, i), m = u && q.includes(n), p = O.has(n), w = E?.(a), T = !!o || !!w, C = s?.accentColor?.(a), x = `data-view__card ${T ? "data-view__card--clickable" : ""} ${m ? "data-view__card--selected" : ""} ${p ? "data-view__card--pinned" : ""} ${C ? "data-view__card--accent" : ""} ${L?.(a) || ""}`, S = C ? { "--data-view-card-accent-color": C } : void 0, U = (t) => {
32
- t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || t.button !== 0 || o && (t.preventDefault(), o(a, t));
33
- }, A = /* @__PURE__ */ c(se, { children: [
34
- p && /* @__PURE__ */ e(Z, {
35
- title: N.pinned,
36
- children: /* @__PURE__ */ e("span", {
29
+ }) : /* @__PURE__ */ a(j, { title: w.noData });
30
+ const K = (e, i) => {
31
+ const h = T.get(i), n = V(e, i), m = f && B.includes(n), p = Q.has(n), C = L?.(e), U = !!o || !!C, y = s?.accentColor?.(e), P = `data-view__card ${U ? "data-view__card--clickable" : ""} ${m ? "data-view__card--selected" : ""} ${p ? "data-view__card--pinned" : ""} ${y ? "data-view__card--accent" : ""} ${q?.(e) || ""}`, x = y ? { "--data-view-card-accent-color": y } : void 0, u = E?.(e), X = u != null && u !== !1, Y = (t) => {
32
+ t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || t.button !== 0 || o && (t.preventDefault(), o(e, t));
33
+ }, S = /* @__PURE__ */ d(ca, { children: [
34
+ p && /* @__PURE__ */ a(W, {
35
+ title: w.pinned,
36
+ children: /* @__PURE__ */ a("span", {
37
37
  className: "data-view__card-pin",
38
- children: /* @__PURE__ */ e(k, {
38
+ children: /* @__PURE__ */ a(b, {
39
39
  name: "pin",
40
40
  size: "sm"
41
41
  })
42
42
  })
43
43
  }),
44
- u && _ && !s && /* @__PURE__ */ e("div", {
44
+ f && _ && !s && /* @__PURE__ */ a("div", {
45
45
  className: "data-view__card-select",
46
46
  onClick: (t) => t.stopPropagation(),
47
- children: /* @__PURE__ */ e(F, {
47
+ children: /* @__PURE__ */ a(F, {
48
48
  checked: m || !1,
49
49
  onChange: (t) => _(n, t)
50
50
  })
51
51
  }),
52
- s?.media && /* @__PURE__ */ e("div", {
52
+ s?.media && /* @__PURE__ */ a("div", {
53
53
  className: "data-view__card-media",
54
- children: s.media(a)
54
+ children: s.media(e)
55
55
  }),
56
56
  s && (() => {
57
- const t = s.icon?.(a);
58
- return /* @__PURE__ */ c("div", {
57
+ const t = s.icon?.(e);
58
+ return /* @__PURE__ */ d("div", {
59
59
  className: "data-view__card-header",
60
- children: [/* @__PURE__ */ c("div", {
60
+ children: [/* @__PURE__ */ d("div", {
61
61
  className: "data-view__card-title-row",
62
- children: [/* @__PURE__ */ c("div", {
62
+ children: [/* @__PURE__ */ d("div", {
63
63
  className: "data-view__card-title-line",
64
64
  children: [
65
- u && _ && /* @__PURE__ */ e("div", {
65
+ f && _ && /* @__PURE__ */ a("div", {
66
66
  className: "data-view__card-select",
67
- onClick: (y) => y.stopPropagation(),
68
- children: /* @__PURE__ */ e(F, {
67
+ onClick: (k) => k.stopPropagation(),
68
+ children: /* @__PURE__ */ a(F, {
69
69
  checked: m || !1,
70
- onChange: (y) => _(n, y)
70
+ onChange: (k) => _(n, k)
71
71
  })
72
72
  }),
73
- t && /* @__PURE__ */ e(k, {
73
+ t && /* @__PURE__ */ a(b, {
74
74
  className: "data-view__card-icon",
75
75
  name: t
76
76
  }),
77
- /* @__PURE__ */ e("span", {
77
+ /* @__PURE__ */ a("span", {
78
78
  className: "data-view__card-title",
79
- children: s.title(a)
79
+ children: s.title(e)
80
80
  })
81
81
  ]
82
- }), s.subtitle && /* @__PURE__ */ e("span", {
82
+ }), s.subtitle && /* @__PURE__ */ a("span", {
83
83
  className: "data-view__card-subtitle",
84
- children: s.subtitle(a)
84
+ children: s.subtitle(e)
85
85
  })]
86
- }), s.badges && /* @__PURE__ */ e("div", {
86
+ }), s.badges && /* @__PURE__ */ a("div", {
87
87
  className: "data-view__card-badges",
88
- children: s.badges(a)
88
+ children: s.badges(e)
89
89
  })]
90
90
  });
91
91
  })(),
92
- I.length > 0 && /* @__PURE__ */ e("div", {
92
+ I.length > 0 && /* @__PURE__ */ a("div", {
93
93
  className: "data-view__card-body",
94
- children: I.map((t) => /* @__PURE__ */ c("div", {
94
+ children: I.map((t) => /* @__PURE__ */ d("div", {
95
95
  className: "data-view__card-field",
96
- children: [/* @__PURE__ */ e("span", {
96
+ children: [/* @__PURE__ */ a("span", {
97
97
  className: "data-view__card-label",
98
- children: te(t)
99
- }), /* @__PURE__ */ e("span", {
98
+ children: sa(t)
99
+ }), /* @__PURE__ */ a("span", {
100
100
  className: "data-view__card-value",
101
- children: ae(t, a)
101
+ children: ia(t, e)
102
102
  })]
103
103
  }, t.key))
104
104
  }),
105
- b && /* @__PURE__ */ e("div", {
105
+ X && /* @__PURE__ */ a("div", {
106
106
  className: "data-view__card-actions",
107
107
  onClick: (t) => t.stopPropagation(),
108
- children: b(a)
108
+ children: u
109
109
  })
110
110
  ] });
111
- return /* @__PURE__ */ c(ie.Fragment, { children: [h && /* @__PURE__ */ e(W, { marker: h }), w ? /* @__PURE__ */ e("a", {
112
- className: x,
111
+ return /* @__PURE__ */ d(na.Fragment, { children: [h && /* @__PURE__ */ a(ea, { marker: h }), C ? /* @__PURE__ */ a("a", {
112
+ className: P,
113
113
  "data-motion-key": n,
114
- href: w,
115
- style: S,
116
- onClick: U,
117
- children: A
118
- }) : /* @__PURE__ */ e("div", {
119
- className: x,
114
+ href: C,
115
+ style: x,
116
+ onClick: Y,
117
+ children: S
118
+ }) : /* @__PURE__ */ a("div", {
119
+ className: P,
120
120
  "data-motion-key": n,
121
- style: S,
122
- onClick: o ? (t) => o(a, t) : void 0,
123
- children: A
121
+ style: x,
122
+ onClick: o ? (t) => o(e, t) : void 0,
123
+ children: S
124
124
  })] }, n);
125
125
  };
126
126
  if ($) {
127
- let a = 0;
128
- return /* @__PURE__ */ e("div", {
127
+ let e = 0;
128
+ return /* @__PURE__ */ a("div", {
129
129
  className: "data-view__groups",
130
130
  children: $.map((i) => {
131
- const h = a;
132
- a += i.items.length;
133
- const n = v && H?.has(i.key);
134
- return /* @__PURE__ */ c("section", {
131
+ const h = e;
132
+ e += i.items.length;
133
+ const n = v && J?.has(i.key);
134
+ return /* @__PURE__ */ d("section", {
135
135
  className: "data-view__group",
136
- children: [/* @__PURE__ */ c("header", {
136
+ children: [/* @__PURE__ */ d("header", {
137
137
  className: `data-view__group-header${v ? " data-view__group-header--collapsible" : ""}`,
138
- "data-motion-key": ee(i.key),
139
- onClick: v ? () => J?.(i.key) : void 0,
138
+ "data-motion-key": ta(i.key),
139
+ onClick: v ? () => O?.(i.key) : void 0,
140
140
  children: [
141
- /* @__PURE__ */ e("span", {
141
+ /* @__PURE__ */ a("span", {
142
142
  className: "data-view__group-label",
143
143
  children: i.label
144
144
  }),
145
- G && /* @__PURE__ */ e("span", {
145
+ H && /* @__PURE__ */ a("span", {
146
146
  className: "data-view__group-count",
147
- children: i.items.length === i.totalCount ? i.totalCount : N.groupPartCount(i.items.length, i.totalCount)
147
+ children: i.items.length === i.totalCount ? i.totalCount : w.groupPartCount(i.items.length, i.totalCount)
148
148
  }),
149
- v && /* @__PURE__ */ e(k, {
149
+ v && /* @__PURE__ */ a(b, {
150
150
  className: "data-view__group-chevron",
151
151
  name: n ? "caret-down" : "caret-up",
152
152
  size: "sm"
153
153
  })
154
154
  ]
155
- }), !n && /* @__PURE__ */ e("div", {
155
+ }), !n && /* @__PURE__ */ a("div", {
156
156
  className: M,
157
- style: K,
158
- children: i.items.map((m, p) => P(m, h + p))
157
+ style: A,
158
+ children: i.items.map((m, p) => K(m, h + p))
159
159
  })]
160
160
  }, i.key ?? "__null__");
161
161
  })
162
162
  });
163
163
  }
164
- return /* @__PURE__ */ e("div", {
164
+ return /* @__PURE__ */ a("div", {
165
165
  className: M,
166
- style: K,
167
- children: d.map((a, i) => P(a, i))
166
+ style: A,
167
+ children: c.map((e, i) => K(e, i))
168
168
  });
169
169
  }
170
170
  export {
171
- fe as CardView
171
+ wa as CardView
172
172
  };
@@ -6,44 +6,44 @@ import { useBreakpoint as f } from "../../hooks/useBreakpoint.js";
6
6
  /* empty css */
7
7
  import { useState as N } from "react";
8
8
  import { jsx as n, jsxs as i } from "react/jsx-runtime";
9
- var I = ({ icon: b = "menu-hamburger", isCompact: o, items: t, label: c, showLabel: s = !0, disableResponsive: p = !1 }) => {
9
+ var I = ({ icon: d = "menu-hamburger", isCompact: o, items: t, label: c, showLabel: s = !0, disableResponsive: p = !1 }) => {
10
10
  const { isAtLeast: M } = f(), [u, m] = N(null), h = (e) => {
11
11
  m(e.currentTarget);
12
12
  }, g = () => {
13
13
  m(null);
14
- }, r = p ? !0 : M("tablet");
14
+ }, a = p ? !0 : M("tablet");
15
15
  if (t.length === 1) {
16
- const e = t[0], a = r && s;
16
+ const e = t[0], r = a && s;
17
17
  return /* @__PURE__ */ n("div", {
18
18
  className: "MenuHamburger",
19
19
  children: /* @__PURE__ */ n(l, {
20
- variant: o || !r ? "plain" : "default",
20
+ variant: o || !a ? "plain" : "default",
21
21
  onClick: e.onClick,
22
22
  icon: e.icon,
23
- className: `MenuHamburger_single-item ${a ? "" : "MenuHamburger_single-item--icon-only"} ${e.isActive ? "MenuHamburger_item--active" : ""}`,
24
- children: a ? e.label : ""
23
+ className: `MenuHamburger_single-item ${r ? "" : "MenuHamburger_single-item--icon-only"} ${e.isActive ? "MenuHamburger_item--active" : ""}`,
24
+ children: r ? e.label : ""
25
25
  })
26
26
  });
27
27
  }
28
28
  const _ = (e) => {
29
29
  e.onClick(), g();
30
- }, d = r && s && !!c;
30
+ }, b = a && s && !!c;
31
31
  return /* @__PURE__ */ i("div", {
32
32
  className: "MenuHamburger",
33
33
  children: [/* @__PURE__ */ n(l, {
34
- variant: o || !r ? "plain" : "default",
34
+ variant: o || !a ? "plain" : "default",
35
35
  onClick: h,
36
- icon: b,
37
- className: d ? "" : "MenuHamburger_opener--icon-only",
38
- children: d ? c : ""
36
+ icon: d,
37
+ className: b ? "" : "MenuHamburger_opener--icon-only",
38
+ children: b ? c : ""
39
39
  }), u && /* @__PURE__ */ n(v, {
40
40
  target: u,
41
41
  onClose: g,
42
42
  children: /* @__PURE__ */ n("div", {
43
43
  className: "MenuHamburger_dropdown",
44
- children: t.map((e, a) => /* @__PURE__ */ i("div", {
44
+ children: t.map((e, r) => /* @__PURE__ */ i("div", {
45
45
  className: "MenuHamburger_entry",
46
- children: [e.separator && /* @__PURE__ */ n("div", { className: "MenuHamburger_separator" }), /* @__PURE__ */ i(l, {
46
+ children: [e.separator && r > 0 && /* @__PURE__ */ n("div", { className: "MenuHamburger_separator" }), /* @__PURE__ */ i(l, {
47
47
  variant: "plain",
48
48
  className: `MenuHamburger_item ${e.isActive ? "MenuHamburger_item--active" : ""}`,
49
49
  onClick: () => _(e),
@@ -55,7 +55,7 @@ var I = ({ icon: b = "menu-hamburger", isCompact: o, items: t, label: c, showLab
55
55
  children: e.label
56
56
  })]
57
57
  })]
58
- }, a))
58
+ }, r))
59
59
  })
60
60
  })]
61
61
  });
@@ -0,0 +1,27 @@
1
+ import { useAccountMenu as p } from "../../hooks/useAccountMenu.js";
2
+ import { AppFrameContext as u } from "./useAppFrame.js";
3
+ import { useMemo as i } from "react";
4
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
5
+ var a = ({ app: r, menuItems: e, children: o }) => {
6
+ const m = i(() => ({
7
+ app: r,
8
+ menuItems: e
9
+ }), [r, e]);
10
+ return /* @__PURE__ */ t(u.Provider, {
11
+ value: m,
12
+ children: o
13
+ });
14
+ }, c = ({ account: r, menuItems: e = [], children: o, ...m }) => {
15
+ const n = p(r);
16
+ return /* @__PURE__ */ s(a, {
17
+ ...m,
18
+ menuItems: [...e, ...n.items],
19
+ children: [o, n.modals]
20
+ });
21
+ }, x = ({ account: r, ...e }) => r ? /* @__PURE__ */ t(c, {
22
+ account: r,
23
+ ...e
24
+ }) : /* @__PURE__ */ t(a, { ...e });
25
+ export {
26
+ x as AppFrame
27
+ };
@@ -0,0 +1,45 @@
1
+ import { useEffect as p } from "react";
2
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
3
+ import { createPortal as _ } from "react-dom";
4
+ var y = ({ isOpen: t, title: d, onClose: a, start: l, end: n, footer: o, tall: c = !1, children: i }) => (p(() => {
5
+ if (!t) return;
6
+ const r = (h) => {
7
+ h.key === "Escape" && a();
8
+ }, m = document.body.style.overflow;
9
+ return document.body.style.overflow = "hidden", document.addEventListener("keydown", r), () => {
10
+ document.body.style.overflow = m, document.removeEventListener("keydown", r);
11
+ };
12
+ }, [t, a]), t ? _(/* @__PURE__ */ s("div", {
13
+ className: "page-sheet",
14
+ children: [/* @__PURE__ */ e("div", {
15
+ className: "page-sheet__backdrop",
16
+ onClick: a
17
+ }), /* @__PURE__ */ s("div", {
18
+ className: ["page-sheet__panel", c ? "page-sheet__panel--tall" : ""].filter(Boolean).join(" "),
19
+ children: [
20
+ /* @__PURE__ */ e("span", { className: "page-sheet__grab" }),
21
+ /* @__PURE__ */ s("div", {
22
+ className: "page-sheet__header",
23
+ children: [
24
+ l,
25
+ /* @__PURE__ */ e("span", {
26
+ className: "page-sheet__title",
27
+ children: d
28
+ }),
29
+ n
30
+ ]
31
+ }),
32
+ /* @__PURE__ */ e("div", {
33
+ className: "page-sheet__body",
34
+ children: i
35
+ }),
36
+ o && /* @__PURE__ */ e("div", {
37
+ className: "page-sheet__footer",
38
+ children: o
39
+ })
40
+ ]
41
+ })]
42
+ }), document.body) : null);
43
+ export {
44
+ y as BottomSheet
45
+ };
@@ -0,0 +1 @@
1
+ .filter-field,.filter-field__stack{gap:var(--spacing-8);flex-direction:column;min-width:0;display:flex}.filter-field__segmented{gap:var(--spacing-2);padding:var(--spacing-2);border:1px solid var(--form-control-border-color);border-radius:var(--radius);background-color:var(--form-control-background-color);display:flex}.filter-field__segment{min-width:0;padding:var(--spacing-4) var(--spacing-8);border-radius:var(--radius-sm);color:var(--body-color-muted);font:inherit;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);white-space:nowrap;cursor:pointer;transition:background-color var(--transition-fast), color var(--transition-fast);text-overflow:ellipsis;white-space:nowrap;background-color:#0000;border:0;flex:auto;overflow:hidden}.filter-field__segment:hover{color:var(--body-color)}.filter-field__segment--selected,.filter-field__segment--selected:hover{background-color:var(--chip-selected-background-color);color:var(--chip-selected-color)}.filter-field__chips{gap:var(--spacing-6);flex-wrap:wrap;display:flex}.filter-field__rows,.filter-field__options{flex-direction:column;display:flex}.filter-field__options{max-height:var(--spacing-300);overflow-y:auto}.filter-field__row{align-items:center;gap:var(--spacing-8);width:100%;padding:var(--spacing-6) var(--spacing-4);border-radius:var(--radius-sm);color:var(--body-color);font:inherit;font-size:var(--font-size-sm);text-align:left;cursor:pointer;background-color:#0000;border:0;display:flex}.filter-field__row:hover{background-color:var(--list-hover-background-color)}.filter-field__row--empty{color:var(--body-color-muted)}.filter-field__mark{width:var(--spacing-16);height:var(--spacing-16);border:1px solid var(--form-control-border-color);color:var(--card-background-color);flex:none;justify-content:center;align-items:center;display:flex}.filter-field__mark--radio{border-radius:var(--radius-full)}.filter-field__mark--check{border-radius:var(--radius-sm)}.filter-field__row--selected .filter-field__mark{border-color:var(--body-accent-color);background-color:var(--body-accent-color)}.filter-field__row--selected .filter-field__mark--radio{padding:var(--spacing-2);background-clip:content-box}.filter-field__row-label{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.filter-field__count{color:var(--body-color-muted);font-size:var(--font-size-xs);font-variant-numeric:tabular-nums;flex:none}.filter-field__divider{height:1px;margin:var(--spacing-4) 0;background-color:var(--delimiter-color);flex:none}.filter-field__empty{padding:var(--spacing-8) var(--spacing-4);color:var(--body-color-muted);font-size:var(--font-size-sm)}.filter-field__link{padding:var(--spacing-2) 0;color:var(--links-color);font:inherit;font-size:var(--font-size-sm);cursor:pointer;background:0 0;border:0;align-self:flex-start}.filter-field__link:hover{color:var(--links-hover-color)}.filter-field__rating{align-items:center;gap:var(--spacing-8);flex-wrap:wrap;display:flex}.filter-field__switch-row{flex-direction:row;justify-content:space-between;align-items:center}.filter-field__switch-label{min-width:0;padding:var(--spacing-4) 0;color:var(--body-color);font:inherit;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);text-align:left;cursor:pointer;background:0 0;border:0;flex:auto}.filter-field--sheet .filter-field__segment{padding:var(--spacing-8) var(--spacing-6);font-size:var(--font-size-md)}.filter-field--sheet .filter-field__row{padding:var(--spacing-12) var(--spacing-4);font-size:var(--font-size-md)}.filter-field--sheet .filter-field__options{max-height:none}.filter-field--sheet .filter-field__switch-label{padding:var(--spacing-8) 0;font-size:var(--font-size-md)}