@memobit/libs 3.4.2 → 3.5.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/AngleSlider/AngleSlider2.js +27 -27
- package/dist/components/AppHeader/AppHeader2.js +39 -36
- package/dist/components/Blockquote/Blockquote2.js +14 -14
- package/dist/components/BulkActionBar/BulkActionBar2.js +34 -30
- package/dist/components/Calendar/Calendar2.js +10 -8
- package/dist/components/Card/Card.css +1 -1
- package/dist/components/Confetti/Confetti2.js +2 -3
- package/dist/components/ControlPanel/ControlPanelFilter.js +26 -26
- package/dist/components/DataView/DataView.CardView.js +8 -4
- package/dist/components/DataView/DataView.ColumnSelector.js +24 -21
- package/dist/components/DataView/DataView.MiniSort.js +18 -16
- package/dist/components/DataView/DataView2.js +90 -86
- package/dist/components/DiffViewer/DiffViewer2.js +124 -118
- package/dist/components/Dropdown/Dropdown.css +1 -1
- package/dist/components/Dropdown/Dropdown2.js +69 -72
- package/dist/components/EventCalendar/EventCalendar.Chip.js +21 -21
- package/dist/components/EventCalendar/EventCalendar.Month.js +19 -19
- package/dist/components/FloatingWindow/FloatingWindow2.js +60 -60
- package/dist/components/Grid/Grid2.js +18 -18
- package/dist/components/InputPIN/InputPIN2.js +42 -42
- package/dist/components/MiniSort/MiniSort2.js +47 -43
- package/dist/components/MiniStatsCard/MiniStatsCard2.js +20 -20
- package/dist/components/Pagination/Pagination2.js +18 -18
- package/dist/components/Popover/Popover2.js +23 -21
- package/dist/components/RangeSlider/RangeSlider2.js +25 -25
- package/dist/components/Rating/RatingIcon.js +9 -9
- package/dist/components/RichTextEditor/hooks/useLinkPrompt.js +7 -6
- package/dist/components/RollingNumber/RollingNumber2.js +33 -31
- package/dist/components/Separator/Separator2.js +27 -23
- package/dist/components/Skeleton/Skeleton2.js +6 -8
- package/dist/components/Slider/Slider2.js +32 -32
- package/dist/components/Splitter/Splitter2.js +34 -34
- package/dist/components/StackedBar/StackedBar2.js +36 -34
- package/dist/components/Stats/Stats2.js +20 -16
- package/dist/components/StickyBar/StickyBar2.js +26 -22
- package/dist/components/Timeline/Timeline2.js +53 -47
- package/dist/components/Tooltip/Tooltip2.js +7 -8
- package/dist/components/TourHud/TourHud2.js +20 -20
- package/dist/components/Transition/Transition2.js +20 -20
- package/dist/components/Tree/Tree2.js +23 -23
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/node_modules/qrcode.react/lib/esm/index.js +2 -2
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +24 -23
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import './Transition.css';
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { useCallback as f, useEffect as h, useRef as n, useState as A } from "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
const H = p ? C ? "entering" : "entered" : "unmounted", [r, x] = A(H), [S, e] = A("auto"),
|
|
4
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
5
|
+
var I = ({ appear: C = !1, as: j = "div", children: q, className: D = "", delay: m = 0, duration: o = 250, easing: b = "ease", keepMounted: F = !1, onEntered: g, onExited: d, show: p, type: a = "fade" }) => {
|
|
6
|
+
const H = p ? C ? "entering" : "entered" : "unmounted", [r, x] = A(H), [S, e] = A("auto"), s = n(null), R = n(H), $ = n(g), v = n(d), u = n(null), i = n(null);
|
|
7
7
|
h(() => {
|
|
8
8
|
$.current = g, v.current = d;
|
|
9
9
|
}, [g, d]);
|
|
10
10
|
const c = f((t) => {
|
|
11
11
|
R.current = t, x(t);
|
|
12
12
|
}, []), l = f(() => {
|
|
13
|
-
|
|
13
|
+
u.current !== null && (clearTimeout(u.current), u.current = null), i.current !== null && (cancelAnimationFrame(i.current), i.current = null);
|
|
14
14
|
}, []), T = f((t) => {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
i.current = requestAnimationFrame(() => {
|
|
16
|
+
i.current = requestAnimationFrame(t);
|
|
17
17
|
});
|
|
18
18
|
}, []);
|
|
19
19
|
h(() => l, [l]), h(() => {
|
|
@@ -22,13 +22,13 @@ var G = ({ appear: C = !1, as: j = "div", children: q, className: D = "", delay:
|
|
|
22
22
|
if (p) {
|
|
23
23
|
if (R.current === "entered") return;
|
|
24
24
|
c("entering"), t && e(0), T(() => {
|
|
25
|
-
c("entered"), t &&
|
|
26
|
-
}),
|
|
25
|
+
c("entered"), t && s.current && e(s.current.scrollHeight);
|
|
26
|
+
}), u.current = setTimeout(() => {
|
|
27
27
|
t && e("auto"), $.current?.();
|
|
28
28
|
}, o + m);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
R.current !== "unmounted" && (t &&
|
|
31
|
+
R.current !== "unmounted" && (t && s.current && (e(s.current.scrollHeight), T(() => e(0))), c("exiting"), u.current = setTimeout(() => {
|
|
32
32
|
c("unmounted"), e("auto"), v.current?.();
|
|
33
33
|
}, o));
|
|
34
34
|
}, [
|
|
@@ -41,7 +41,7 @@ var G = ({ appear: C = !1, as: j = "div", children: q, className: D = "", delay:
|
|
|
41
41
|
a
|
|
42
42
|
]);
|
|
43
43
|
const B = f((t) => {
|
|
44
|
-
|
|
44
|
+
s.current = t;
|
|
45
45
|
}, []);
|
|
46
46
|
if (r === "unmounted" && !F) return null;
|
|
47
47
|
const N = {
|
|
@@ -49,20 +49,20 @@ var G = ({ appear: C = !1, as: j = "div", children: q, className: D = "", delay:
|
|
|
49
49
|
transitionDuration: `${o}ms`,
|
|
50
50
|
transitionTimingFunction: b,
|
|
51
51
|
...a === "collapse" && S !== "auto" ? { height: S } : {}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
}, P = [
|
|
53
|
+
"transition",
|
|
54
|
+
`transition--${a}`,
|
|
55
|
+
`transition--${r}`,
|
|
56
|
+
F && r === "unmounted" ? "transition--hidden" : "",
|
|
57
|
+
D
|
|
58
|
+
].filter(Boolean).join(" ");
|
|
59
|
+
return /* @__PURE__ */ k(j, {
|
|
60
|
+
className: P,
|
|
61
61
|
ref: B,
|
|
62
62
|
style: N,
|
|
63
63
|
children: q
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
I as Transition
|
|
68
68
|
};
|
|
@@ -2,7 +2,7 @@ import './Tree.css';
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { useCallback as f, useState as v } from "react";
|
|
4
4
|
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
5
|
+
var b = ({ open: e }) => /* @__PURE__ */ r("svg", {
|
|
6
6
|
className: `tree__chevron ${e ? "tree__chevron--open" : ""}`,
|
|
7
7
|
viewBox: "0 0 16 16",
|
|
8
8
|
width: "12",
|
|
@@ -15,22 +15,22 @@ var N = ({ open: e }) => /* @__PURE__ */ r("svg", {
|
|
|
15
15
|
strokeLinecap: "round",
|
|
16
16
|
strokeLinejoin: "round"
|
|
17
17
|
})
|
|
18
|
-
}), g = ({ node: e, depth: i, selectable: t, showGuides: c, animated: d, selectedId:
|
|
19
|
-
const [
|
|
20
|
-
e.disabled || "key" in l && l.key !== "Enter" && l.key !== " " || (
|
|
18
|
+
}), g = ({ node: e, depth: i, selectable: t, showGuides: c, animated: d, selectedId: o, onSelect: n }) => {
|
|
19
|
+
const [_, p] = v(e.defaultExpanded ?? !1), s = Array.isArray(e.children) && e.children.length > 0, a = t && o === e.id, m = f((l) => {
|
|
20
|
+
e.disabled || "key" in l && l.key !== "Enter" && l.key !== " " || (s && p((h) => !h), t && n(e));
|
|
21
21
|
}, [
|
|
22
|
-
|
|
22
|
+
s,
|
|
23
23
|
e,
|
|
24
24
|
t,
|
|
25
|
-
|
|
26
|
-
])
|
|
25
|
+
n
|
|
26
|
+
]), N = [
|
|
27
|
+
"tree__row",
|
|
28
|
+
a ? "tree__row--selected" : "",
|
|
29
|
+
e.disabled ? "tree__row--disabled" : "",
|
|
30
|
+
e.variant && e.variant !== "default" ? `tree__row--${e.variant}` : ""
|
|
31
|
+
].filter(Boolean).join(" ");
|
|
27
32
|
return /* @__PURE__ */ u("li", { children: [/* @__PURE__ */ u("div", {
|
|
28
|
-
className:
|
|
29
|
-
"tree__row",
|
|
30
|
-
a ? "tree__row--selected" : "",
|
|
31
|
-
e.disabled ? "tree__row--disabled" : "",
|
|
32
|
-
e.variant && e.variant !== "default" ? `tree__row--${e.variant}` : ""
|
|
33
|
-
].filter(Boolean).join(" "),
|
|
33
|
+
className: N,
|
|
34
34
|
style: { "--depth": i },
|
|
35
35
|
tabIndex: e.disabled ? -1 : 0,
|
|
36
36
|
onClick: m,
|
|
@@ -42,7 +42,7 @@ var N = ({ open: e }) => /* @__PURE__ */ r("svg", {
|
|
|
42
42
|
}, h)),
|
|
43
43
|
/* @__PURE__ */ r("span", {
|
|
44
44
|
className: "tree__toggle",
|
|
45
|
-
children:
|
|
45
|
+
children: s ? /* @__PURE__ */ r(b, { open: _ }) : /* @__PURE__ */ r("span", { className: "tree__leaf-dot" })
|
|
46
46
|
}),
|
|
47
47
|
e.icon && /* @__PURE__ */ r("span", {
|
|
48
48
|
className: "tree__icon",
|
|
@@ -57,10 +57,10 @@ var N = ({ open: e }) => /* @__PURE__ */ r("svg", {
|
|
|
57
57
|
children: e.badge
|
|
58
58
|
})
|
|
59
59
|
]
|
|
60
|
-
}),
|
|
60
|
+
}), s && /* @__PURE__ */ r("ul", {
|
|
61
61
|
className: [
|
|
62
62
|
"tree__children",
|
|
63
|
-
|
|
63
|
+
_ ? "tree__children--open" : "",
|
|
64
64
|
d ? "tree__children--animated" : ""
|
|
65
65
|
].filter(Boolean).join(" "),
|
|
66
66
|
children: e.children.map((l) => /* @__PURE__ */ r(g, {
|
|
@@ -69,24 +69,24 @@ var N = ({ open: e }) => /* @__PURE__ */ r("svg", {
|
|
|
69
69
|
selectable: t,
|
|
70
70
|
showGuides: c,
|
|
71
71
|
animated: d,
|
|
72
|
-
selectedId:
|
|
73
|
-
onSelect:
|
|
72
|
+
selectedId: o,
|
|
73
|
+
onSelect: n
|
|
74
74
|
}, l.id))
|
|
75
75
|
})] });
|
|
76
|
-
}, j = ({ nodes: e, selectable: i = !1, onSelect: t, showGuides: c = !0, animated: d = !0, defaultSelectedId:
|
|
77
|
-
const [
|
|
76
|
+
}, j = ({ nodes: e, selectable: i = !1, onSelect: t, showGuides: c = !0, animated: d = !0, defaultSelectedId: o = null, className: n = "" }) => {
|
|
77
|
+
const [_, p] = v(o), s = f((a) => {
|
|
78
78
|
a.disabled || (p(a.id), t?.(a));
|
|
79
79
|
}, [t]);
|
|
80
80
|
return /* @__PURE__ */ r("ul", {
|
|
81
|
-
className: ["tree",
|
|
81
|
+
className: ["tree", n].filter(Boolean).join(" "),
|
|
82
82
|
children: e.map((a) => /* @__PURE__ */ r(g, {
|
|
83
83
|
node: a,
|
|
84
84
|
depth: 0,
|
|
85
85
|
selectable: i,
|
|
86
86
|
showGuides: c,
|
|
87
87
|
animated: d,
|
|
88
|
-
selectedId:
|
|
89
|
-
onSelect:
|
|
88
|
+
selectedId: _,
|
|
89
|
+
onSelect: s
|
|
90
90
|
}, a.id))
|
|
91
91
|
});
|
|
92
92
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { FocusEvent as FocusEvent_2 } from 'react';
|
|
|
8
8
|
import { ForwardRefExoticComponent } from 'react';
|
|
9
9
|
import { getThemeConfig } from '@memobit/themes';
|
|
10
10
|
import { IconName } from '@memobit/icons';
|
|
11
|
-
import { JSX } from 'react
|
|
11
|
+
import { JSX } from 'react';
|
|
12
12
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
13
13
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
14
14
|
import { ReactElement } from 'react';
|
|
@@ -164,7 +164,7 @@ export declare interface AuthContextValue {
|
|
|
164
164
|
|
|
165
165
|
export declare function AuthLogin({ redirectPath }: LoginProps): ReactElement;
|
|
166
166
|
|
|
167
|
-
export declare function AuthProvider({ children, config }: AuthProviderProps): JSX.Element;
|
|
167
|
+
export declare function AuthProvider({ children, config }: AuthProviderProps): default_2.JSX.Element;
|
|
168
168
|
|
|
169
169
|
declare interface AuthProviderProps {
|
|
170
170
|
children: default_2.ReactNode;
|
|
@@ -977,7 +977,7 @@ declare interface CountryWithFlagProps {
|
|
|
977
977
|
className?: string;
|
|
978
978
|
}
|
|
979
979
|
|
|
980
|
-
declare function DataView_2<T>({ columns, data, rowKey, pinnedIds, selectable, onSelectionChange, selectedIds: controlledSelectedIds, pageSizeOptions, initialPageSize, showPageSize, card, actions, actionsWidth, timeline, onRowClick, rowHref, rowClassName, rowDetail, empty, initialSortKey, initialSortDirection, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSortChange, miniSort, showCardSortControls, desktopView, cardMaxWidth, className, onPageChange, onPageSizeChange, currentPage: controlledCurrentPage, totalItems: controlledTotalItems, group, showResultsCount, totalCount, itemNoun, columnSelector, }: DataViewProps<T>): JSX.Element;
|
|
980
|
+
declare function DataView_2<T>({ columns, data, rowKey, pinnedIds, selectable, onSelectionChange, selectedIds: controlledSelectedIds, pageSizeOptions, initialPageSize, showPageSize, card, actions, actionsWidth, timeline, onRowClick, rowHref, rowClassName, rowDetail, empty, initialSortKey, initialSortDirection, sortKey: controlledSortKey, sortDirection: controlledSortDirection, onSortChange, miniSort, showCardSortControls, desktopView, cardMaxWidth, className, onPageChange, onPageSizeChange, currentPage: controlledCurrentPage, totalItems: controlledTotalItems, group, showResultsCount, totalCount, itemNoun, columnSelector, }: DataViewProps<T>): default_2.JSX.Element;
|
|
981
981
|
export { DataView_2 as DataView }
|
|
982
982
|
|
|
983
983
|
export declare interface DataViewCardConfig<T> {
|
|
@@ -2676,7 +2676,7 @@ declare interface RatingProps {
|
|
|
2676
2676
|
|
|
2677
2677
|
export declare type RatingVariant = 'success' | 'info' | 'warning' | 'danger';
|
|
2678
2678
|
|
|
2679
|
-
export declare const RichTextEditor: ({ advanced, error, format, id, label, onBlur, onChange, placeholder, required, value, }: RichTextEditorProps) => JSX.Element;
|
|
2679
|
+
export declare const RichTextEditor: ({ advanced, error, format, id, label, onBlur, onChange, placeholder, required, value, }: RichTextEditorProps) => default_2.JSX.Element;
|
|
2680
2680
|
|
|
2681
2681
|
declare interface RichTextEditorProps {
|
|
2682
2682
|
advanced?: boolean;
|
|
@@ -3178,7 +3178,7 @@ export declare interface ToastAction {
|
|
|
3178
3178
|
onClick: () => void;
|
|
3179
3179
|
}
|
|
3180
3180
|
|
|
3181
|
-
export declare const ToastContainer: ({ position, showDismissButton }: ToastContainerProps) => JSX.Element;
|
|
3181
|
+
export declare const ToastContainer: ({ position, showDismissButton }: ToastContainerProps) => default_2.JSX.Element;
|
|
3182
3182
|
|
|
3183
3183
|
export declare type ToastContainerPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'top' | 'bottom' | 'left' | 'right';
|
|
3184
3184
|
|
|
@@ -667,8 +667,8 @@ var ie = Object.defineProperty, D = Object.getOwnPropertySymbols, Y = Object.pro
|
|
|
667
667
|
}
|
|
668
668
|
static makeAlphanumeric(e) {
|
|
669
669
|
if (!M.isAlphanumeric(e)) throw new RangeError("String contains unencodable characters in alphanumeric mode");
|
|
670
|
-
let n = [], t;
|
|
671
|
-
for (
|
|
670
|
+
let n = [], t = 0;
|
|
671
|
+
for (; t + 2 <= e.length; t += 2) {
|
|
672
672
|
let r = M.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)) * 45;
|
|
673
673
|
r += M.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t + 1)), s(r, 11, n);
|
|
674
674
|
}
|
package/dist/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var I = "3.
|
|
1
|
+
var I = "3.5.0", B = 479, L = "40a4ef2", _ = "2026-10-09T09:09:41.310Z", a = "479";
|
|
2
2
|
export {
|
|
3
3
|
_ as LIB_BUILD_DATE,
|
|
4
|
-
|
|
4
|
+
a as LIB_BUILD_ID,
|
|
5
5
|
B as LIB_BUILD_NUMBER,
|
|
6
6
|
L as LIB_COMMIT,
|
|
7
7
|
I as LIB_VERSION
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memobit/libs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.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",
|
|
@@ -74,48 +74,49 @@
|
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@memobit/icons": "^1.0.0",
|
|
76
76
|
"@memobit/themes": "^1.0.0",
|
|
77
|
-
"react": "19.
|
|
78
|
-
"react-dom": "19.
|
|
77
|
+
"react": "19.3.0",
|
|
78
|
+
"react-dom": "19.3.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@eslint/js": "9.39.4",
|
|
82
82
|
"@memobit/icons": "file:../memobit-react-icons",
|
|
83
83
|
"@memobit/themes": "file:../memobit-react-themes",
|
|
84
|
-
"@microsoft/api-extractor": "7.
|
|
85
|
-
"@types/react": "19.
|
|
86
|
-
"@types/react-dom": "19.
|
|
87
|
-
"@vitejs/plugin-react": "6.
|
|
88
|
-
"esbuild": "0.28.
|
|
84
|
+
"@microsoft/api-extractor": "7.59.2",
|
|
85
|
+
"@types/react": "19.3.0",
|
|
86
|
+
"@types/react-dom": "19.3.0",
|
|
87
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
88
|
+
"esbuild": "0.28.2",
|
|
89
89
|
"eslint": "9.39.4",
|
|
90
90
|
"eslint-config-prettier": "10.1.8",
|
|
91
91
|
"eslint-plugin-import-x": "4.17.1",
|
|
92
|
-
"eslint-plugin-prettier": "5.5.
|
|
92
|
+
"eslint-plugin-prettier": "5.5.6",
|
|
93
93
|
"eslint-plugin-react": "7.37.5",
|
|
94
|
-
"eslint-plugin-simple-import-sort": "
|
|
95
|
-
"globals": "17.
|
|
96
|
-
"prettier": "3.
|
|
94
|
+
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
95
|
+
"globals": "17.12.0",
|
|
96
|
+
"prettier": "3.9.9",
|
|
97
97
|
"qrcode.react": "4.2.0",
|
|
98
|
-
"react": "19.
|
|
99
|
-
"react-dom": "19.
|
|
100
|
-
"react-router": "8.
|
|
101
|
-
"sass": "1.
|
|
102
|
-
"terser": "5.
|
|
98
|
+
"react": "19.3.0",
|
|
99
|
+
"react-dom": "19.3.0",
|
|
100
|
+
"react-router": "8.4.0",
|
|
101
|
+
"sass": "1.105.0",
|
|
102
|
+
"terser": "5.51.2",
|
|
103
103
|
"typescript": "6.0.3",
|
|
104
|
-
"typescript-eslint": "8.
|
|
105
|
-
"vite": "8.1
|
|
106
|
-
"vite-plugin-dts": "5.
|
|
107
|
-
"vite-plugin-static-copy": "
|
|
104
|
+
"typescript-eslint": "8.70.1",
|
|
105
|
+
"vite": "8.3.1",
|
|
106
|
+
"vite-plugin-dts": "5.1.1",
|
|
107
|
+
"vite-plugin-static-copy": "4.1.1"
|
|
108
108
|
},
|
|
109
109
|
"overrides": {
|
|
110
110
|
"brace-expansion@1": "1.1.21",
|
|
111
111
|
"brace-expansion@5": "5.0.12",
|
|
112
|
+
"esbuild": "0.28.2",
|
|
112
113
|
"fast-uri@3": "3.1.8",
|
|
113
114
|
"immutable": "5.1.9",
|
|
114
115
|
"js-yaml": "4.3.2",
|
|
115
116
|
"minimatch@10": "10.2.6",
|
|
116
117
|
"nanoid@3": "3.3.18",
|
|
117
118
|
"picomatch@2": "2.3.2",
|
|
118
|
-
"postcss": "8.5.
|
|
119
|
-
"
|
|
119
|
+
"postcss": "8.5.28",
|
|
120
|
+
"source-map-js": "1.2.2"
|
|
120
121
|
}
|
|
121
122
|
}
|