@memobit/libs 4.1.0 → 4.2.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.
@@ -0,0 +1 @@
1
+ .WatchLinkModal{gap:var(--spacing-16);flex-direction:column;display:flex}.WatchLinkModal_hint{color:var(--body-text-muted);margin:0}.WatchLinkModal_error{color:var(--body-text-danger);margin:0}.WatchLinkModal_list{gap:var(--spacing-8);flex-direction:column;display:flex}.WatchLinkModal_listTitle{font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--body-text-muted)}.WatchLinkModal_item{justify-content:space-between;align-items:center;gap:var(--spacing-12);display:flex}.WatchLinkModal_itemText{gap:var(--spacing-2);flex-direction:column;min-width:0;display:flex}.WatchLinkModal_itemName{font-weight:var(--font-weight-semibold)}.WatchLinkModal_itemMeta{font-size:var(--font-size-sm);color:var(--body-text-muted)}
@@ -0,0 +1,127 @@
1
+ import './WatchLinkModal.css';
2
+ import { Button as D } from "../../Button/Button2.js";
3
+ import { Modal as S } from "../../Modal/Modal2.js";
4
+ import { formatDate as T } from "../../../helpers/Datetime.js";
5
+ import { InputPIN as $ } from "../../InputPIN/InputPIN2.js";
6
+ import { HttpMethod as k, buildRequestHeaders as H } from "../../../helpers/Http.js";
7
+ import { useAuth as I } from "../../../hooks/useAuth/useAuth.js";
8
+ /* empty css */
9
+ import { useCallback as W, useEffect as A, useState as i } from "react";
10
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
11
+ var f = 6, E = (s) => T(new Date(s.replace(" ", "T")), "DD MMM YYYY, HH:mm:ss");
12
+ function J({ isOpen: s, onClose: L }) {
13
+ const { config: v } = I(), [c, l] = i(""), [_, d] = i(), [b, h] = i(), [m, y] = i(!1), [w, U] = i([]), [M, u] = i(), o = W(async (t, e, N) => {
14
+ const C = await fetch(`${v.apiBaseUrl}${t}`, {
15
+ method: e,
16
+ credentials: "include",
17
+ headers: H(e),
18
+ body: N ? JSON.stringify(N) : void 0
19
+ }), p = await C.json().catch(() => ({}));
20
+ if (!C.ok || !p.success) throw new Error(p.error || "Request failed");
21
+ return p.data;
22
+ }, [v.apiBaseUrl]), r = W(async () => {
23
+ try {
24
+ U(await o("/watch/devices", k.Get) ?? []), u(void 0);
25
+ } catch {
26
+ u("Could not load your linked watches.");
27
+ }
28
+ }, [o]);
29
+ A(() => {
30
+ s && (l(""), d(void 0), h(void 0), r());
31
+ }, [s, r]);
32
+ const g = async (t) => {
33
+ if (!(t.length !== f || m)) {
34
+ y(!0), d(void 0), h(void 0);
35
+ try {
36
+ const e = await o("/watch/link", k.Post, { code: t });
37
+ h(`${e?.label ?? "The watch"} is linked. It will sync in a moment.`), l(""), await r();
38
+ } catch (e) {
39
+ d(e instanceof Error ? e.message : "That code did not work.");
40
+ } finally {
41
+ y(!1);
42
+ }
43
+ }
44
+ }, x = async (t) => {
45
+ try {
46
+ await o(`/watch/unlink/${t.id}`, k.Post), await r();
47
+ } catch {
48
+ u(`Could not sign ${t.label} out.`);
49
+ }
50
+ };
51
+ return /* @__PURE__ */ a(S, {
52
+ isOpen: s,
53
+ onClose: L,
54
+ title: "Link a watch",
55
+ titleIcon: "link",
56
+ size: "small",
57
+ primary: {
58
+ text: "Link",
59
+ icon: "checkmark",
60
+ variant: "info",
61
+ onClick: () => g(c),
62
+ disabled: c.length !== f || m
63
+ },
64
+ secondary: {
65
+ text: "Close",
66
+ variant: "plain",
67
+ onClick: L
68
+ },
69
+ children: /* @__PURE__ */ n("div", {
70
+ className: "WatchLinkModal",
71
+ children: [
72
+ /* @__PURE__ */ a("p", {
73
+ className: "WatchLinkModal_hint",
74
+ children: "Open the app on your watch and type the code it shows."
75
+ }),
76
+ /* @__PURE__ */ a($, {
77
+ autoFocus: !0,
78
+ length: f,
79
+ groupSize: 3,
80
+ type: "alphanumeric",
81
+ value: c,
82
+ error: _,
83
+ success: b,
84
+ disabled: m,
85
+ onChange: (t) => l(t.toUpperCase()),
86
+ onComplete: (t) => g(t.toUpperCase())
87
+ }),
88
+ M && /* @__PURE__ */ a("p", {
89
+ className: "WatchLinkModal_error",
90
+ children: M
91
+ }),
92
+ w.length > 0 && /* @__PURE__ */ n("div", {
93
+ className: "WatchLinkModal_list",
94
+ children: [/* @__PURE__ */ a("span", {
95
+ className: "WatchLinkModal_listTitle",
96
+ children: "Linked watches"
97
+ }), w.map((t) => /* @__PURE__ */ n("div", {
98
+ className: "WatchLinkModal_item",
99
+ children: [/* @__PURE__ */ n("div", {
100
+ className: "WatchLinkModal_itemText",
101
+ children: [/* @__PURE__ */ a("span", {
102
+ className: "WatchLinkModal_itemName",
103
+ children: t.label
104
+ }), /* @__PURE__ */ n("span", {
105
+ className: "WatchLinkModal_itemMeta",
106
+ children: [
107
+ "Linked ",
108
+ E(t.createdAt),
109
+ t.lastUsedAt ? ` · last synced ${E(t.lastUsedAt)}` : ""
110
+ ]
111
+ })]
112
+ }), /* @__PURE__ */ a(D, {
113
+ size: "small",
114
+ variant: "ghost",
115
+ icon: "logout",
116
+ onClick: () => x(t),
117
+ children: "Sign out"
118
+ })]
119
+ }, t.id))]
120
+ })
121
+ ]
122
+ })
123
+ });
124
+ }
125
+ export {
126
+ J as WatchLinkModal
127
+ };
@@ -1,28 +1,29 @@
1
1
  import { Icon as h } from "../Icon/Icon2.js";
2
2
  import { libMessages as c } from "../../contexts/LanguageContext/libMessages.js";
3
3
  import { useMessages as o } from "../../hooks/useLanguage.js";
4
- import { Button as u } from "../Button/Button2.js";
4
+ import { Button as m } from "../Button/Button2.js";
5
5
  import { Tooltip as d } from "../Tooltip/Tooltip2.js";
6
6
  import { Chip as N } from "../Chip/Chip2.js";
7
7
  import { Dropdown as w } from "../Dropdown/Dropdown2.js";
8
8
  import { Slider as k } from "../Slider/Slider2.js";
9
9
  import { ToggleSwitch as S } from "../ToggleSwitch/ToggleSwitch2.js";
10
10
  import { MenuHamburger as V } from "../MenuHamburger/MenuHamburger2.js";
11
- import { OptionRow as g, Segmented as p } from "./FilterField2.js";
12
- import { hasViewExtras as y, resolveViewModes as z } from "./shellText.js";
13
- import { useState as A } from "react";
14
- import { Fragment as m, jsx as l, jsxs as r } from "react/jsx-runtime";
15
- var Q = ({ app: e, logoOnly: a = !1 }) => {
16
- const i = typeof e.logo == "string" ? /* @__PURE__ */ l("img", {
11
+ import { fitsSegmented as y } from "./filterRules.js";
12
+ import { OptionRow as u, Segmented as p } from "./FilterField2.js";
13
+ import { hasViewExtras as z, resolveViewModes as A } from "./shellText.js";
14
+ import { useState as R } from "react";
15
+ import { Fragment as g, jsx as l, jsxs as r } from "react/jsx-runtime";
16
+ var W = ({ app: e, logoOnly: i = !1 }) => {
17
+ const a = typeof e.logo == "string" ? /* @__PURE__ */ l("img", {
17
18
  src: e.logo,
18
19
  alt: e.name
19
20
  }) : e.logo ?? (e.icon ? /* @__PURE__ */ l(h, {
20
21
  name: e.icon,
21
22
  size: "lg"
22
- }) : null), s = /* @__PURE__ */ r(m, { children: [i && /* @__PURE__ */ l("span", {
23
+ }) : null), s = /* @__PURE__ */ r(g, { children: [a && /* @__PURE__ */ l("span", {
23
24
  className: "page-shell__logo",
24
- children: i
25
- }), !a && /* @__PURE__ */ l("span", {
25
+ children: a
26
+ }), !i && /* @__PURE__ */ l("span", {
26
27
  className: "page-shell__app-name",
27
28
  children: e.name
28
29
  })] });
@@ -35,31 +36,31 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
35
36
  className: "page-shell__app",
36
37
  children: s
37
38
  });
38
- }, U = ({ action: e, fullWidth: a = !1 }) => {
39
- const i = /* @__PURE__ */ l(u, {
39
+ }, X = ({ action: e, fullWidth: i = !1 }) => {
40
+ const a = /* @__PURE__ */ l(m, {
40
41
  icon: e.icon,
41
42
  variant: e.variant ?? "default",
42
43
  disabled: e.disabled,
43
- fullWidth: a,
44
+ fullWidth: i,
44
45
  onClick: e.onClick,
45
46
  children: e.label
46
47
  });
47
48
  return e.tooltip ? /* @__PURE__ */ l(d, {
48
49
  title: e.tooltip,
49
- children: i
50
- }) : i;
51
- }, W = ({ items: e }) => e.length > 0 ? /* @__PURE__ */ l(V, {
50
+ children: a
51
+ }) : a;
52
+ }, Y = ({ items: e }) => e.length > 0 ? /* @__PURE__ */ l(V, {
52
53
  items: e,
53
54
  disableResponsive: !0,
54
55
  showLabel: !1
55
- }) : null, f = ({ view: e, withLabels: a = !1 }) => {
56
- const i = o(c), { modes: s = [], onChange: n } = e;
56
+ }) : null, f = ({ view: e, withLabels: i = !1 }) => {
57
+ const a = o(c), { modes: s = [], onChange: n } = e;
57
58
  return s.length < 2 || !n ? null : /* @__PURE__ */ l("div", {
58
- className: ["page-shell__view-toggle", a ? "page-shell__view-toggle--labels" : ""].filter(Boolean).join(" "),
59
+ className: ["page-shell__view-toggle", i ? "page-shell__view-toggle--labels" : ""].filter(Boolean).join(" "),
59
60
  children: /* @__PURE__ */ l(p, {
60
- items: z(s, i).map((t) => ({
61
+ items: A(s, a).map((t) => ({
61
62
  value: t.value,
62
- label: a ? /* @__PURE__ */ r("span", {
63
+ label: i ? /* @__PURE__ */ r("span", {
63
64
  className: "page-shell__view-option",
64
65
  children: [/* @__PURE__ */ l(h, {
65
66
  name: t.icon,
@@ -79,11 +80,11 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
79
80
  }
80
81
  })
81
82
  });
82
- }, v = (e, a) => e.onChange({
83
- field: a.value,
84
- direction: a.direction ?? e.value.direction
85
- }), _ = (e) => e.fields.some((a) => a.value === e.value.field && a.direction !== void 0), X = ({ sort: e }) => {
86
- const a = o(c), i = e.value.direction === "asc";
83
+ }, v = (e, i) => e.onChange({
84
+ field: i.value,
85
+ direction: i.direction ?? e.value.direction
86
+ }), _ = (e) => e.fields.some((i) => i.value === e.value.field && i.direction !== void 0), Z = ({ sort: e }) => {
87
+ const i = o(c), a = e.value.direction === "asc";
87
88
  return /* @__PURE__ */ r("div", {
88
89
  className: "page-shell__sort",
89
90
  children: [/* @__PURE__ */ l("div", {
@@ -102,29 +103,29 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
102
103
  }
103
104
  })
104
105
  }), !_(e) && /* @__PURE__ */ l(d, {
105
- title: i ? a.pageAscending : a.pageDescending,
106
- children: /* @__PURE__ */ l(u, {
107
- icon: i ? "arrow-up" : "arrow-down",
106
+ title: a ? i.pageAscending : i.pageDescending,
107
+ children: /* @__PURE__ */ l(m, {
108
+ icon: a ? "arrow-up" : "arrow-down",
108
109
  variant: "default",
109
110
  onClick: () => e.onChange({
110
111
  field: e.value.field,
111
- direction: i ? "desc" : "asc"
112
+ direction: a ? "desc" : "asc"
112
113
  })
113
114
  })
114
115
  })]
115
116
  });
116
- }, Y = ({ sort: e, view: a }) => {
117
- const i = o(c);
117
+ }, ee = ({ sort: e, view: i }) => {
118
+ const a = o(c);
118
119
  return /* @__PURE__ */ r("div", {
119
120
  className: "filter-field filter-field--sheet page-shell__sheet-stack",
120
- children: [e && /* @__PURE__ */ r(m, { children: [
121
+ children: [e && /* @__PURE__ */ r(g, { children: [
121
122
  /* @__PURE__ */ l("span", {
122
123
  className: "page-shell__group-title",
123
- children: i.sortBy
124
+ children: a.sortBy
124
125
  }),
125
126
  /* @__PURE__ */ l("div", {
126
127
  className: "filter-field__rows",
127
- children: e.fields.map((s) => /* @__PURE__ */ l(g, {
128
+ children: e.fields.map((s) => /* @__PURE__ */ l(u, {
128
129
  label: s.label,
129
130
  mark: "radio",
130
131
  selected: e.value.field === s.value,
@@ -134,10 +135,10 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
134
135
  !_(e) && /* @__PURE__ */ l(p, {
135
136
  items: [{
136
137
  value: "asc",
137
- label: i.pageAscending
138
+ label: a.pageAscending
138
139
  }, {
139
140
  value: "desc",
140
- label: i.pageDescending
141
+ label: a.pageDescending
141
142
  }],
142
143
  value: e.value.direction,
143
144
  onSelect: (s) => e.onChange({
@@ -145,23 +146,23 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
145
146
  direction: s === "desc" ? "desc" : "asc"
146
147
  })
147
148
  })
148
- ] }), a && /* @__PURE__ */ r(m, { children: [
149
+ ] }), i && /* @__PURE__ */ r(g, { children: [
149
150
  /* @__PURE__ */ l("span", {
150
151
  className: "page-shell__group-title",
151
- children: i.pageView
152
+ children: a.pageView
152
153
  }),
153
154
  /* @__PURE__ */ l(f, {
154
- view: a,
155
+ view: i,
155
156
  withLabels: !0
156
157
  }),
157
158
  /* @__PURE__ */ l(C, {
158
- view: a,
159
+ view: i,
159
160
  context: "sheet"
160
161
  })
161
162
  ] })]
162
163
  });
163
- }, b = ({ label: e, summary: a, context: i, children: s }) => {
164
- const [n, t] = A(!1);
164
+ }, b = ({ label: e, summary: i, context: a, children: s }) => {
165
+ const [n, t] = R(!1);
165
166
  return /* @__PURE__ */ r("div", {
166
167
  className: "page-filters__section",
167
168
  children: [/* @__PURE__ */ r("button", {
@@ -175,7 +176,7 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
175
176
  }),
176
177
  /* @__PURE__ */ l("span", {
177
178
  className: "page-filters__summary",
178
- children: a
179
+ children: i
179
180
  }),
180
181
  /* @__PURE__ */ l(h, {
181
182
  name: n ? "caret-down" : "caret-right",
@@ -183,19 +184,19 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
183
184
  })
184
185
  ]
185
186
  }), n && /* @__PURE__ */ l("div", {
186
- className: `page-filters__body filter-field filter-field--${i}`,
187
+ className: `page-filters__body filter-field filter-field--${a}`,
187
188
  children: s
188
189
  })]
189
190
  });
190
- }, R = ({ columns: e, context: a }) => {
191
- const i = o(c), s = (n) => e.onChange(e.value.includes(n) ? e.value.filter((t) => t !== n) : [...e.value, n]);
191
+ }, M = ({ columns: e, context: i }) => {
192
+ const a = o(c), s = (n) => e.onChange(e.value.includes(n) ? e.value.filter((t) => t !== n) : [...e.value, n]);
192
193
  return /* @__PURE__ */ l(b, {
193
- label: i.columns,
194
- summary: i.pageColumnsShown(e.value.length, e.options.length),
195
- context: a,
194
+ label: a.columns,
195
+ summary: a.pageColumnsShown(e.value.length, e.options.length),
196
+ context: i,
196
197
  children: /* @__PURE__ */ l("div", {
197
198
  className: "filter-field__rows",
198
- children: e.options.map((n) => /* @__PURE__ */ l(g, {
199
+ children: e.options.map((n) => /* @__PURE__ */ l(u, {
199
200
  label: n.label,
200
201
  mark: "check",
201
202
  selected: e.value.includes(n.value),
@@ -203,20 +204,20 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
203
204
  }, n.value))
204
205
  })
205
206
  });
206
- }, M = ({ groupBy: e, context: a }) => {
207
- const i = o(c), s = e.options.find((n) => n.value === e.value);
207
+ }, T = ({ groupBy: e, context: i }) => {
208
+ const a = o(c), s = e.options.find((n) => n.value === e.value);
208
209
  return /* @__PURE__ */ l(b, {
209
- label: i.groupBy,
210
- summary: s?.label ?? i.pageGroupNone,
211
- context: a,
210
+ label: a.groupBy,
211
+ summary: s?.label ?? a.pageGroupNone,
212
+ context: i,
212
213
  children: /* @__PURE__ */ r("div", {
213
214
  className: "filter-field__rows",
214
- children: [/* @__PURE__ */ l(g, {
215
- label: i.pageGroupNone,
215
+ children: [/* @__PURE__ */ l(u, {
216
+ label: a.pageGroupNone,
216
217
  mark: "radio",
217
218
  selected: e.value === null,
218
219
  onClick: () => e.onChange(null)
219
- }), e.options.map((n) => /* @__PURE__ */ l(g, {
220
+ }), e.options.map((n) => /* @__PURE__ */ l(u, {
220
221
  label: n.label,
221
222
  mark: "radio",
222
223
  selected: e.value === n.value,
@@ -224,10 +225,10 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
224
225
  }, n.value))]
225
226
  })
226
227
  });
227
- }, T = ({ toggle: e, context: a }) => /* @__PURE__ */ l("div", {
228
+ }, $ = ({ toggle: e, context: i }) => /* @__PURE__ */ l("div", {
228
229
  className: "page-filters__flat",
229
230
  children: /* @__PURE__ */ r("div", {
230
- className: `filter-field filter-field--${a} filter-field__switch-row`,
231
+ className: `filter-field filter-field--${i} filter-field__switch-row`,
231
232
  children: [/* @__PURE__ */ l("button", {
232
233
  type: "button",
233
234
  className: "filter-field__switch-label",
@@ -240,25 +241,33 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
240
241
  onChange: e.onChange
241
242
  })]
242
243
  })
243
- }), $ = ({ choice: e, context: a }) => /* @__PURE__ */ l("div", {
244
+ }), D = ({ choice: e, context: i }) => /* @__PURE__ */ l("div", {
244
245
  className: "page-filters__flat",
245
246
  children: /* @__PURE__ */ r("div", {
246
- className: `filter-field filter-field--${a} page-shell__view-choice`,
247
+ className: `filter-field filter-field--${i} page-shell__view-choice`,
247
248
  children: [/* @__PURE__ */ l("span", {
248
249
  className: "page-shell__view-choice-label",
249
250
  children: e.label
250
- }), /* @__PURE__ */ l(p, {
251
+ }), y(e.options.map((a) => a.label)) ? /* @__PURE__ */ l(p, {
251
252
  items: e.options,
252
253
  value: e.value,
253
- onSelect: (i) => {
254
- i !== null && e.onChange(String(i));
254
+ onSelect: (a) => {
255
+ a !== null && e.onChange(String(a));
255
256
  }
257
+ }) : /* @__PURE__ */ l("div", {
258
+ className: "filter-field__rows",
259
+ children: e.options.map((a) => /* @__PURE__ */ l(u, {
260
+ label: a.label,
261
+ mark: "radio",
262
+ selected: e.value === a.value,
263
+ onClick: () => e.onChange(a.value)
264
+ }, a.value))
256
265
  })]
257
266
  })
258
- }), D = ({ slider: e, context: a }) => /* @__PURE__ */ l("div", {
267
+ }), O = ({ slider: e, context: i }) => /* @__PURE__ */ l("div", {
259
268
  className: "page-filters__flat",
260
269
  children: /* @__PURE__ */ r("div", {
261
- className: `filter-field filter-field--${a} page-shell__view-choice`,
270
+ className: `filter-field filter-field--${i} page-shell__view-choice`,
262
271
  children: [/* @__PURE__ */ l("span", {
263
272
  className: "page-shell__view-choice-label",
264
273
  children: e.label
@@ -273,86 +282,86 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
273
282
  onChange: e.onChange
274
283
  })]
275
284
  })
276
- }), C = ({ view: e, context: a }) => y(e) ? /* @__PURE__ */ r("div", {
277
- className: `page-filters page-filters--${a}`,
285
+ }), C = ({ view: e, context: i }) => z(e) ? /* @__PURE__ */ r("div", {
286
+ className: `page-filters page-filters--${i}`,
278
287
  children: [
279
- e.choices?.map((i) => /* @__PURE__ */ l($, {
280
- choice: i,
281
- context: a
282
- }, i.id)),
283
- e.sliders?.map((i) => /* @__PURE__ */ l(D, {
284
- slider: i,
285
- context: a
286
- }, i.id)),
287
- e.columns && /* @__PURE__ */ l(R, {
288
+ e.choices?.map((a) => /* @__PURE__ */ l(D, {
289
+ choice: a,
290
+ context: i
291
+ }, a.id)),
292
+ e.sliders?.map((a) => /* @__PURE__ */ l(O, {
293
+ slider: a,
294
+ context: i
295
+ }, a.id)),
296
+ e.columns && /* @__PURE__ */ l(M, {
288
297
  columns: e.columns,
289
- context: a
298
+ context: i
290
299
  }),
291
- e.groupBy && /* @__PURE__ */ l(M, {
300
+ e.groupBy && /* @__PURE__ */ l(T, {
292
301
  groupBy: e.groupBy,
293
- context: a
302
+ context: i
294
303
  }),
295
- e.toggles?.map((i) => /* @__PURE__ */ l(T, {
296
- toggle: i,
297
- context: a
298
- }, i.id))
304
+ e.toggles?.map((a) => /* @__PURE__ */ l($, {
305
+ toggle: a,
306
+ context: i
307
+ }, a.id))
299
308
  ]
300
- }) : null, Z = ({ pagination: e }) => {
301
- const a = o(c);
309
+ }) : null, le = ({ pagination: e }) => {
310
+ const i = o(c);
302
311
  if (!e || e.pageCount <= 1) return null;
303
- const { page: i, pageCount: s, onChange: n } = e;
312
+ const { page: a, pageCount: s, onChange: n } = e;
304
313
  return /* @__PURE__ */ r("div", {
305
314
  className: "page-shell__pager",
306
315
  children: [
307
316
  /* @__PURE__ */ l(d, {
308
- title: a.previous,
309
- children: /* @__PURE__ */ l(u, {
317
+ title: i.previous,
318
+ children: /* @__PURE__ */ l(m, {
310
319
  icon: "caret-left",
311
320
  variant: "plain",
312
321
  size: "small",
313
- disabled: i <= 1,
314
- onClick: () => n(i - 1)
322
+ disabled: a <= 1,
323
+ onClick: () => n(a - 1)
315
324
  })
316
325
  }),
317
326
  /* @__PURE__ */ l("span", {
318
327
  className: "page-shell__pager-label",
319
- children: a.pageOf(i, s)
328
+ children: i.pageOf(a, s)
320
329
  }),
321
330
  /* @__PURE__ */ l(d, {
322
- title: a.next,
323
- children: /* @__PURE__ */ l(u, {
331
+ title: i.next,
332
+ children: /* @__PURE__ */ l(m, {
324
333
  icon: "caret-right",
325
334
  variant: "plain",
326
335
  size: "small",
327
- disabled: i >= s,
328
- onClick: () => n(i + 1)
336
+ disabled: a >= s,
337
+ onClick: () => n(a + 1)
329
338
  })
330
339
  })
331
340
  ]
332
341
  });
333
- }, ee = ({ tabs: e }) => !e || e.items.length < 2 ? null : /* @__PURE__ */ l("div", {
342
+ }, ae = ({ tabs: e }) => !e || e.items.length < 2 ? null : /* @__PURE__ */ l("div", {
334
343
  className: "page-shell__tabs",
335
- children: e.items.map((a) => {
336
- const i = a.value === e.value;
344
+ children: e.items.map((i) => {
345
+ const a = i.value === e.value;
337
346
  return /* @__PURE__ */ l(N, {
338
- icon: a.icon,
339
- count: a.count,
340
- selected: i,
341
- variant: i ? "default" : a.tone ?? "default",
342
- onClick: () => e.onChange(a.value),
343
- children: a.label
344
- }, a.value);
347
+ icon: i.icon,
348
+ count: i.count,
349
+ selected: a,
350
+ variant: a ? "default" : i.tone ?? "default",
351
+ onClick: () => e.onChange(i.value),
352
+ children: i.label
353
+ }, i.value);
345
354
  })
346
- }), le = ({ view: e, showToggle: a = !0 }) => {
347
- const i = o(c);
355
+ }), ie = ({ view: e, showToggle: i = !0 }) => {
356
+ const a = o(c);
348
357
  return /* @__PURE__ */ r("div", {
349
358
  className: "page-shell__side-group",
350
359
  children: [
351
360
  /* @__PURE__ */ l("span", {
352
361
  className: "page-shell__group-title",
353
- children: i.pageView
362
+ children: a.pageView
354
363
  }),
355
- a && /* @__PURE__ */ l(f, {
364
+ i && /* @__PURE__ */ l(f, {
356
365
  view: e,
357
366
  withLabels: !0
358
367
  }),
@@ -364,14 +373,14 @@ var Q = ({ app: e, logoOnly: a = !1 }) => {
364
373
  });
365
374
  };
366
375
  export {
367
- U as ActionButton,
368
- Q as AppMark,
369
- W as PageMenu,
370
- Z as PagePager,
371
- ee as PageTabsRow,
372
- X as SortDropdown,
373
- Y as SortSheetBody,
376
+ X as ActionButton,
377
+ W as AppMark,
378
+ Y as PageMenu,
379
+ le as PagePager,
380
+ ae as PageTabsRow,
381
+ Z as SortDropdown,
382
+ ee as SortSheetBody,
374
383
  C as ViewExtras,
375
- le as ViewOptions,
384
+ ie as ViewOptions,
376
385
  f as ViewToggle
377
386
  };