@memobit/libs 3.36.0 → 4.0.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.
- package/dist/components/DataView/DataView2.js +46 -46
- package/dist/components/ThemeSettings/ThemeContext.js +26 -26
- package/dist/components/ThemeSettings/ThemeContextValue.js +2 -1
- package/dist/components/ThemeSettings/getDefaultThemeForApp.js +5 -4
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/version.js +1 -1
- package/dist/version.json +4 -4
- package/package.json +2 -2
|
@@ -20,24 +20,24 @@ import { TableView as Pt } from "./DataView.TableView.js";
|
|
|
20
20
|
/* empty css */
|
|
21
21
|
import { useCallback as Ge, useEffect as Lt, useMemo as D, useRef as Pe, useState as _ } from "react";
|
|
22
22
|
import { Fragment as Vt, jsx as r, jsxs as M } from "react/jsx-runtime";
|
|
23
|
-
function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1, onSelectionChange: Le, selectedIds:
|
|
24
|
-
const f = ht(pt), { language: Ze } = gt(), { isMobile:
|
|
23
|
+
function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1, onSelectionChange: Le, selectedIds: te, pageSizeOptions: Ve = De, initialPageSize: Ae = De[1], showPageSize: U = !0, card: Be, actions: oe, actionsWidth: Re, timeline: h, onRowClick: ne, rowHref: se, rowClassName: re, rowDetail: xe, empty: ie, initialSortKey: $e = null, initialSortDirection: ze = "asc", sortKey: K, sortDirection: ae, onSortChange: Fe, miniSort: B, showCardSortControls: We = !0, desktopView: le = "table", cardMaxWidth: Ue, className: k, onPageChange: ce, onPageSizeChange: Ke, currentPage: X, totalItems: de, group: i, showResultsCount: Xe, totalCount: je, itemNoun: Oe, columnSelector: j, animateChanges: He = !0, highlightIds: v }) {
|
|
24
|
+
const f = ht(pt), { language: Ze } = gt(), { isMobile: ue } = yt(), R = Pe(null), x = _t(R, {
|
|
25
25
|
enabled: He && W !== void 0,
|
|
26
26
|
highlightKeys: v
|
|
27
|
-
}), [qe, Je] = _($e), [Qe, Ye] = _(ze), [Ie, et] = _([]), m =
|
|
27
|
+
}), [qe, Je] = _($e), [Qe, Ye] = _(ze), [Ie, et] = _([]), m = te ?? Ie, [tt, ot] = _(1), O = X ?? tt, [w, nt] = _(Ae), [fe, st] = _(() => l.reduce((e, t) => (t.width && (e[t.key] = t.width), e), {})), [me, rt] = _(/* @__PURE__ */ new Set()), pe = (e) => {
|
|
28
28
|
x.forceNext(), rt((t) => {
|
|
29
29
|
const s = new Set(t);
|
|
30
30
|
return s.has(e) ? s.delete(e) : s.add(e), s;
|
|
31
31
|
});
|
|
32
32
|
}, c = Ge((e, t) => W?.(e, t) ?? t, [W]), P = Ge((e) => {
|
|
33
|
-
e !== O && x.skipNext(), X === void 0 && ot(e),
|
|
33
|
+
e !== O && x.skipNext(), X === void 0 && ot(e), ce?.(e);
|
|
34
34
|
}, [
|
|
35
35
|
X,
|
|
36
36
|
O,
|
|
37
37
|
x,
|
|
38
|
-
|
|
39
|
-
]), d = K !== void 0 ? K : qe, u =
|
|
40
|
-
K === void 0 && Je(e),
|
|
38
|
+
ce
|
|
39
|
+
]), d = K !== void 0 ? K : qe, u = ae ?? Qe, T = (e, t) => {
|
|
40
|
+
K === void 0 && Je(e), ae === void 0 && Ye(t), Fe?.({
|
|
41
41
|
key: e,
|
|
42
42
|
direction: t
|
|
43
43
|
}), P(1);
|
|
@@ -73,7 +73,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
73
73
|
$,
|
|
74
74
|
g,
|
|
75
75
|
c
|
|
76
|
-
]), N =
|
|
76
|
+
]), N = de !== void 0, b = D(() => {
|
|
77
77
|
if (!i || N) return H;
|
|
78
78
|
const e = /* @__PURE__ */ new Map(), t = [];
|
|
79
79
|
H.forEach((o) => {
|
|
@@ -94,7 +94,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
94
94
|
i,
|
|
95
95
|
N,
|
|
96
96
|
H
|
|
97
|
-
]), z = N ?
|
|
97
|
+
]), z = N ? de : b.length, Z = Math.max(1, Math.ceil(z / w)), E = Math.min(O, Z), S = N ? b : b.slice((E - 1) * w, E * w), ge = Pe(void 0);
|
|
98
98
|
Lt(() => {
|
|
99
99
|
if (!v || v.length === 0 || N || ge.current === v) return;
|
|
100
100
|
const e = b.findIndex((s, o) => v.includes(c(s, o)));
|
|
@@ -111,7 +111,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
111
111
|
c,
|
|
112
112
|
E
|
|
113
113
|
]);
|
|
114
|
-
const
|
|
114
|
+
const q = Xe ?? Z > 1 ? Ct(w, z, je ?? z, E, Oe, Ze) : null, J = D(() => {
|
|
115
115
|
if (!i) return null;
|
|
116
116
|
const e = /* @__PURE__ */ new Map();
|
|
117
117
|
return b.forEach((t) => {
|
|
@@ -119,7 +119,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
119
119
|
e.set(s, (e.get(s) ?? 0) + 1);
|
|
120
120
|
}), e;
|
|
121
121
|
}, [i, b]), he = D(() => {
|
|
122
|
-
if (!i || !
|
|
122
|
+
if (!i || !J) return null;
|
|
123
123
|
const e = /* @__PURE__ */ new Map(), t = [];
|
|
124
124
|
S.forEach((o) => {
|
|
125
125
|
const n = i.groupBy(o), a = e.get(n);
|
|
@@ -129,12 +129,12 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
129
129
|
key: o,
|
|
130
130
|
label: i.groupLabel(o),
|
|
131
131
|
items: e.get(o),
|
|
132
|
-
totalCount:
|
|
132
|
+
totalCount: J.get(o) ?? 0
|
|
133
133
|
}));
|
|
134
134
|
return i.sortGroups ? s.sort(i.sortGroups) : s.sort((o, n) => o.key === null ? 1 : n.key === null ? -1 : 0), s;
|
|
135
135
|
}, [
|
|
136
136
|
i,
|
|
137
|
-
|
|
137
|
+
J,
|
|
138
138
|
S
|
|
139
139
|
]), ve = D(() => {
|
|
140
140
|
if (!h) return /* @__PURE__ */ new Map();
|
|
@@ -144,14 +144,14 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
144
144
|
}));
|
|
145
145
|
return Tt(e, h.granularity);
|
|
146
146
|
}, [S, h]), F = (e) => {
|
|
147
|
-
|
|
147
|
+
te === void 0 && et(e), Le?.(A.filter((t, s) => e.includes(c(t, s))));
|
|
148
148
|
}, we = (e, t) => {
|
|
149
149
|
F(t ? [...m, e] : m.filter((s) => s !== e));
|
|
150
150
|
}, it = (e) => {
|
|
151
151
|
e.sortable && (d === e.key ? T(e.key, u === "asc" ? "desc" : "asc") : T(e.key, "asc"));
|
|
152
152
|
}, at = (e, t) => {
|
|
153
153
|
e.preventDefault();
|
|
154
|
-
const s = e.clientX, o =
|
|
154
|
+
const s = e.clientX, o = fe[t] ?? 150, n = (L) => {
|
|
155
155
|
const y = L.clientX - s, V = l.find((C) => C.key === t)?.minWidth ?? 120;
|
|
156
156
|
st((C) => ({
|
|
157
157
|
...C,
|
|
@@ -161,30 +161,30 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
161
161
|
window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", a);
|
|
162
162
|
};
|
|
163
163
|
window.addEventListener("mousemove", n), window.addEventListener("mouseup", a);
|
|
164
|
-
}, be = l.some((e) => e.filter),
|
|
164
|
+
}, be = l.some((e) => e.filter), Q = l.filter((e) => e.sortable), lt = Q.map((e) => ({
|
|
165
165
|
label: Nt(e),
|
|
166
166
|
value: e.key
|
|
167
|
-
})), ct =
|
|
167
|
+
})), ct = Q.length > 0, Y = d ? Q.find((e) => e.key === d) : void 0, dt = B?.align ?? "left", Se = (B?.columns ?? B?.column ?? []).length > 0 ? /* @__PURE__ */ r(Gt, {
|
|
168
168
|
columns: l,
|
|
169
169
|
config: B,
|
|
170
170
|
sortKey: d,
|
|
171
171
|
sortDirection: u,
|
|
172
172
|
onSort: T
|
|
173
|
-
}) : null, ye = j && j.options.length > 0 ? /* @__PURE__ */ r(Dt, { config: j }) : null, p = S.map(c),
|
|
173
|
+
}) : null, ye = j && j.options.length > 0 ? /* @__PURE__ */ r(Dt, { config: j }) : null, p = S.map(c), I = p.filter((e) => m.includes(e)).length, ee = !!G && p.length > 0 && I === p.length, Ce = !!G && I > 0 && I < p.length, _e = (e) => {
|
|
174
174
|
F(e ? [...m, ...p.filter((t) => !m.includes(t))] : m.filter((t) => !p.includes(t)));
|
|
175
175
|
}, ut = G && p.length > 0 ? /* @__PURE__ */ M("label", {
|
|
176
176
|
className: "data-view__select-all",
|
|
177
177
|
children: [/* @__PURE__ */ r(bt, {
|
|
178
|
-
checked:
|
|
178
|
+
checked: ee,
|
|
179
179
|
indeterminate: Ce,
|
|
180
180
|
onChange: _e
|
|
181
|
-
}), /* @__PURE__ */ r("span", { children:
|
|
182
|
-
}) : null, Me = (e) =>
|
|
181
|
+
}), /* @__PURE__ */ r("span", { children: ee ? f.clearSelection : f.selectThese(p.length) })]
|
|
182
|
+
}) : null, Me = (e) => q || Se || ye || e ? /* @__PURE__ */ M("div", {
|
|
183
183
|
className: `data-view__top-row data-view__top-row--mini-${dt}`,
|
|
184
184
|
children: [
|
|
185
|
-
|
|
185
|
+
q && /* @__PURE__ */ r("div", {
|
|
186
186
|
className: "data-view__results-count",
|
|
187
|
-
children:
|
|
187
|
+
children: q
|
|
188
188
|
}),
|
|
189
189
|
e,
|
|
190
190
|
Se,
|
|
@@ -192,7 +192,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
192
192
|
]
|
|
193
193
|
}) : null, ke = Me(), Te = /* @__PURE__ */ r(kt, {
|
|
194
194
|
currentPage: E,
|
|
195
|
-
totalPages:
|
|
195
|
+
totalPages: Z,
|
|
196
196
|
totalItems: z,
|
|
197
197
|
onPageChange: P,
|
|
198
198
|
pageSizeOptions: U ? Ve : void 0,
|
|
@@ -201,7 +201,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
201
201
|
x.skipNext(), nt(e), P(1), Ke?.(e);
|
|
202
202
|
} : void 0
|
|
203
203
|
});
|
|
204
|
-
if (
|
|
204
|
+
if (le !== "cards" && l.length === 0) return /* @__PURE__ */ M("div", {
|
|
205
205
|
className: `data-view${k ? ` ${k}` : ""}`,
|
|
206
206
|
ref: R,
|
|
207
207
|
children: [ke, /* @__PURE__ */ r("div", {
|
|
@@ -212,7 +212,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
212
212
|
})
|
|
213
213
|
})]
|
|
214
214
|
});
|
|
215
|
-
if (
|
|
215
|
+
if (le === "cards") return /* @__PURE__ */ M("div", {
|
|
216
216
|
className: `data-view data-view--cards${k ? ` ${k}` : ""}`,
|
|
217
217
|
ref: R,
|
|
218
218
|
children: [
|
|
@@ -242,9 +242,9 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
242
242
|
title: u === "asc" ? f.sortDescending : f.sortAscending,
|
|
243
243
|
children: /* @__PURE__ */ r(vt, {
|
|
244
244
|
className: "data-view__card-sort-direction",
|
|
245
|
-
disabled: !
|
|
245
|
+
disabled: !Y,
|
|
246
246
|
onClick: () => {
|
|
247
|
-
|
|
247
|
+
Y && T(Y.key, u === "asc" ? "desc" : "asc");
|
|
248
248
|
},
|
|
249
249
|
variant: "ghost",
|
|
250
250
|
children: /* @__PURE__ */ r(mt, { name: u === "asc" ? "arrow-up" : "arrow-down" })
|
|
@@ -263,28 +263,28 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
263
263
|
columns: l,
|
|
264
264
|
rowKey: c,
|
|
265
265
|
card: Be,
|
|
266
|
-
actions:
|
|
266
|
+
actions: oe,
|
|
267
267
|
timeline: h,
|
|
268
|
-
onRowClick:
|
|
269
|
-
rowHref:
|
|
270
|
-
rowClassName:
|
|
271
|
-
empty:
|
|
268
|
+
onRowClick: ne,
|
|
269
|
+
rowHref: se,
|
|
270
|
+
rowClassName: re,
|
|
271
|
+
empty: ie,
|
|
272
272
|
selectable: G,
|
|
273
273
|
selectedIds: m,
|
|
274
274
|
pinnedIds: g,
|
|
275
275
|
cardMaxWidth: Ue,
|
|
276
|
-
isMobile:
|
|
276
|
+
isMobile: ue,
|
|
277
277
|
groups: he ?? void 0,
|
|
278
278
|
showGroupCount: i?.showCount !== !1,
|
|
279
279
|
collapsible: i?.collapsible,
|
|
280
|
-
collapsedGroups:
|
|
281
|
-
onToggleGroup:
|
|
280
|
+
collapsedGroups: me,
|
|
281
|
+
onToggleGroup: pe,
|
|
282
282
|
onToggleSelect: we
|
|
283
283
|
}),
|
|
284
284
|
Te
|
|
285
285
|
]
|
|
286
286
|
});
|
|
287
|
-
const ft = l.filter((e) => !e.hideInTable && !(
|
|
287
|
+
const ft = l.filter((e) => !e.hideInTable && !(ue && e.hideInMobile)), Ne = h && ve.size > 0, Ee = /* @__PURE__ */ M(Vt, { children: [
|
|
288
288
|
ke,
|
|
289
289
|
/* @__PURE__ */ r("div", {
|
|
290
290
|
className: "data-view__wrapper",
|
|
@@ -292,7 +292,7 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
292
292
|
data: S,
|
|
293
293
|
columns: ft,
|
|
294
294
|
rowKey: c,
|
|
295
|
-
columnWidths:
|
|
295
|
+
columnWidths: fe,
|
|
296
296
|
onResizeStart: at,
|
|
297
297
|
sortKey: d,
|
|
298
298
|
sortDirection: u,
|
|
@@ -302,22 +302,22 @@ function oo({ columns: l, data: A, rowKey: W, pinnedIds: g, selectable: G = !1,
|
|
|
302
302
|
timelineMarkers: ve,
|
|
303
303
|
selectable: G,
|
|
304
304
|
selectedIds: m,
|
|
305
|
-
allVisibleSelected:
|
|
305
|
+
allVisibleSelected: ee,
|
|
306
306
|
someVisibleSelected: Ce,
|
|
307
307
|
onToggleVisibleSelection: _e,
|
|
308
308
|
onToggleSelect: we,
|
|
309
309
|
pinnedSet: $,
|
|
310
|
-
actions:
|
|
310
|
+
actions: oe,
|
|
311
311
|
actionsWidth: Re,
|
|
312
|
-
onRowClick:
|
|
313
|
-
rowHref:
|
|
314
|
-
rowClassName:
|
|
312
|
+
onRowClick: ne,
|
|
313
|
+
rowHref: se,
|
|
314
|
+
rowClassName: re,
|
|
315
315
|
rowDetail: xe,
|
|
316
|
-
empty:
|
|
316
|
+
empty: ie,
|
|
317
317
|
groups: he,
|
|
318
318
|
group: i,
|
|
319
|
-
collapsedGroups:
|
|
320
|
-
onToggleGroup:
|
|
319
|
+
collapsedGroups: me,
|
|
320
|
+
onToggleGroup: pe
|
|
321
321
|
})
|
|
322
322
|
}),
|
|
323
323
|
Te
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { ThemeContext as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { DEFAULT_FALLBACK_THEME as F, ThemeContext as R } from "./ThemeContextValue.js";
|
|
2
|
+
import { Tooltip as j } from "../Tooltip/Tooltip2.js";
|
|
3
3
|
import { THEME_CONFIGS as c, getThemeConfig as k } from "./themeConfig.js";
|
|
4
|
-
import { useCallback as m, useEffect as I, useState as
|
|
5
|
-
import { jsx as f, jsxs as
|
|
6
|
-
var
|
|
7
|
-
const [d, l] =
|
|
4
|
+
import { useCallback as m, useEffect as I, useState as E } from "react";
|
|
5
|
+
import { jsx as f, jsxs as v } from "react/jsx-runtime";
|
|
6
|
+
var L = "theme-stylesheet", b = "theme-font-link", w = "theme-font-link-display", C = "theme-font-link-mono", J = ({ children: M, theme: y, effects: N, onSave: g, allowedThemes: s, fallbackTheme: D = F }) => {
|
|
7
|
+
const [d, l] = E(null), [P, a] = E(null), [S, T] = E(!1), U = k(y) === void 0 ? D : y, o = d ?? U, p = P ?? N;
|
|
8
8
|
I(() => {
|
|
9
9
|
document.documentElement.setAttribute("data-theme", o);
|
|
10
10
|
const i = (typeof __MEMOBIT_THEME_URLS__ > "u" ? void 0 : __MEMOBIT_THEME_URLS__)?.[o];
|
|
11
11
|
if (i !== void 0) {
|
|
12
|
-
let e = document.getElementById(
|
|
13
|
-
e || (e = document.createElement("link"), e.id =
|
|
12
|
+
let e = document.getElementById(L);
|
|
13
|
+
e || (e = document.createElement("link"), e.id = L, e.rel = "stylesheet", document.head.appendChild(e));
|
|
14
14
|
const t = new URL(i, import.meta.url).href;
|
|
15
15
|
e.href !== t && (e.href = t);
|
|
16
16
|
}
|
|
17
17
|
const r = k(o);
|
|
18
18
|
if (r) {
|
|
19
|
-
let e = document.getElementById(
|
|
20
|
-
e || (e = document.createElement("link"), e.id =
|
|
21
|
-
let t = document.getElementById(
|
|
22
|
-
r.fontUrlDisplay ? (t || (t = document.createElement("link"), t.id =
|
|
19
|
+
let e = document.getElementById(b);
|
|
20
|
+
e || (e = document.createElement("link"), e.id = b, e.rel = "stylesheet", document.head.appendChild(e)), e.href = r.fontUrl;
|
|
21
|
+
let t = document.getElementById(w);
|
|
22
|
+
r.fontUrlDisplay ? (t || (t = document.createElement("link"), t.id = w, t.rel = "stylesheet", document.head.appendChild(t)), t.href = r.fontUrlDisplay) : t?.remove();
|
|
23
23
|
let n = document.getElementById(C);
|
|
24
24
|
r.fontUrlMono ? (n || (n = document.createElement("link"), n.id = C, n.rel = "stylesheet", document.head.appendChild(n)), n.href = r.fontUrlMono) : n?.remove();
|
|
25
25
|
}
|
|
26
26
|
}, [o]);
|
|
27
|
-
const
|
|
27
|
+
const O = m((i) => {
|
|
28
28
|
l(i);
|
|
29
29
|
}, []), K = m((i) => {
|
|
30
30
|
a(i);
|
|
31
|
-
}, []),
|
|
31
|
+
}, []), A = m(() => {
|
|
32
32
|
l(null), a(null);
|
|
33
33
|
}, []);
|
|
34
34
|
I(() => {
|
|
@@ -42,8 +42,8 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
42
42
|
e.preventDefault();
|
|
43
43
|
const t = c.map((u) => u.value), n = s && s.length > 0 ? t.filter((u) => s.includes(u)) : t;
|
|
44
44
|
if (n.length === 0) return;
|
|
45
|
-
const _ = n.indexOf(o),
|
|
46
|
-
l(n[
|
|
45
|
+
const _ = n.indexOf(o), H = ((_ === -1 ? 0 : _) + (e.key === "]" ? 1 : -1) + n.length) % n.length;
|
|
46
|
+
l(n[H]);
|
|
47
47
|
} else e.key === "Escape" && d && (e.preventDefault(), l(null), a(null));
|
|
48
48
|
};
|
|
49
49
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
@@ -52,7 +52,7 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
52
52
|
d,
|
|
53
53
|
s
|
|
54
54
|
]);
|
|
55
|
-
const h = c.findIndex((i) => i.value === o), x = h >= 0 ? c[h].label : o,
|
|
55
|
+
const h = c.findIndex((i) => i.value === o), x = h >= 0 ? c[h].label : o, B = m(() => {
|
|
56
56
|
g?.({
|
|
57
57
|
theme: o,
|
|
58
58
|
effects: p
|
|
@@ -62,16 +62,16 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
62
62
|
p,
|
|
63
63
|
g
|
|
64
64
|
]);
|
|
65
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ v(R.Provider, {
|
|
66
66
|
value: {
|
|
67
67
|
theme: o,
|
|
68
68
|
effects: p,
|
|
69
|
-
setPreviewTheme:
|
|
69
|
+
setPreviewTheme: O,
|
|
70
70
|
setPreviewEffects: K,
|
|
71
|
-
commitPreview:
|
|
72
|
-
clearPreview:
|
|
71
|
+
commitPreview: B,
|
|
72
|
+
clearPreview: A
|
|
73
73
|
},
|
|
74
|
-
children: [M, d && /* @__PURE__ */
|
|
74
|
+
children: [M, d && /* @__PURE__ */ v("div", {
|
|
75
75
|
style: {
|
|
76
76
|
position: "fixed",
|
|
77
77
|
bottom: 16,
|
|
@@ -85,7 +85,7 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
85
85
|
boxShadow: "0 4px 16px rgba(0, 0, 0, 0.3)"
|
|
86
86
|
},
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */ f(
|
|
88
|
+
/* @__PURE__ */ f(j, {
|
|
89
89
|
title: "Copy theme name",
|
|
90
90
|
children: /* @__PURE__ */ f("span", {
|
|
91
91
|
onClick: () => {
|
|
@@ -95,7 +95,7 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
95
95
|
children: x
|
|
96
96
|
})
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ v("span", {
|
|
99
99
|
style: {
|
|
100
100
|
opacity: 0.6,
|
|
101
101
|
marginLeft: 8,
|
|
@@ -116,7 +116,7 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
116
116
|
},
|
|
117
117
|
children: "[ prev · ] next · Esc revert"
|
|
118
118
|
}),
|
|
119
|
-
|
|
119
|
+
S && /* @__PURE__ */ f("div", {
|
|
120
120
|
style: {
|
|
121
121
|
position: "absolute",
|
|
122
122
|
bottom: "calc(100% + 6px)",
|
|
@@ -136,5 +136,5 @@ var b = "theme-stylesheet", w = "theme-font-link", L = "theme-font-link-display"
|
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
J as ThemeProvider
|
|
140
140
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { DEFAULT_FALLBACK_THEME as a } from "./ThemeContextValue.js";
|
|
2
|
+
import { THEME_CONFIGS as n } from "./themeConfig.js";
|
|
3
|
+
var A = (o, r = a) => {
|
|
4
|
+
const m = o.trim().toLowerCase(), e = n.find((t) => (t.recommendedApps ?? []).some((p) => p.toLowerCase() === m));
|
|
4
5
|
return e ? e.value : r;
|
|
5
6
|
};
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
A as getDefaultThemeForApp
|
|
8
9
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { RefObject } from 'react';
|
|
|
22
22
|
import { SyntheticEvent } from 'react';
|
|
23
23
|
import { THEME_CONFIGS } from '@memobit/themes';
|
|
24
24
|
import { ThemeConfig } from '@memobit/themes';
|
|
25
|
+
import { ThemeName } from '@memobit/themes';
|
|
25
26
|
import { TouchEvent as TouchEvent_2 } from 'react';
|
|
26
27
|
|
|
27
28
|
export declare const Accordion: default_2.FC<AccordionProps>;
|
|
@@ -1346,7 +1347,7 @@ export declare interface DataViewProps<T> {
|
|
|
1346
1347
|
totalItems?: number;
|
|
1347
1348
|
/** Group rows by a key. Rows render in group sections within the paginated slice. */
|
|
1348
1349
|
group?: DataViewGroupConfig<T>;
|
|
1349
|
-
/** Display the "Showing X-Y of Z" results-count label above the data.
|
|
1350
|
+
/** Display the "Showing X-Y of Z" results-count label above the data. When unset, it appears only if the list needs more than one page. `true` and `false` always show or always hide it. */
|
|
1350
1351
|
showResultsCount?: boolean;
|
|
1351
1352
|
/** Unfiltered total used to render the "filtered (... total)" form when smaller than this value. Defaults to `data.length`. */
|
|
1352
1353
|
totalCount?: number;
|
|
@@ -3912,7 +3913,7 @@ export declare interface TextFilterValue {
|
|
|
3912
3913
|
mode?: string;
|
|
3913
3914
|
}
|
|
3914
3915
|
|
|
3915
|
-
export declare type Theme =
|
|
3916
|
+
export declare type Theme = ThemeName;
|
|
3916
3917
|
|
|
3917
3918
|
export { THEME_CONFIGS }
|
|
3918
3919
|
|
package/dist/version.js
CHANGED
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memobit/libs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@memobit/core": "1.0.0",
|
|
88
88
|
"@memobit/icons": "^1.7.0",
|
|
89
|
-
"@memobit/themes": "^
|
|
89
|
+
"@memobit/themes": "^3.0.0",
|
|
90
90
|
"react": "19.3.0",
|
|
91
91
|
"react-dom": "19.3.0",
|
|
92
92
|
"react-router": "8.4.0"
|