@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,20 +1,20 @@
|
|
|
1
1
|
import './Pagination.css';
|
|
2
2
|
import { Button as u } from "../Button/Button2.js";
|
|
3
|
-
import { useBreakpoint as
|
|
4
|
-
import { Dropdown as
|
|
3
|
+
import { useBreakpoint as E } from "../../hooks/useBreakpoint.js";
|
|
4
|
+
import { Dropdown as y } from "../Dropdown/Dropdown2.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { useCallback as
|
|
6
|
+
import { useCallback as L, useEffect as R, useRef as I, useState as O } from "react";
|
|
7
7
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
const { isAtLeast: a, isMobile:
|
|
8
|
+
var V = 120, j = 45, C = 8, H = 4, z = ({ currentPage: i, totalPages: r, totalItems: p, onPageChange: d, showPagesNumbers: N = !1, pageSizeOptions: o, pageSize: m, onPageSizeChange: v, pageSizeLabel: x = "Rows", horizontalAlign: D = "left" }) => {
|
|
9
|
+
const { isAtLeast: a, isMobile: k } = E(), f = I(null), [l, w] = O(k ? 0 : 2), h = L(() => {
|
|
10
10
|
const s = f.current, e = s?.parentElement;
|
|
11
11
|
if (!s || !e) return;
|
|
12
12
|
let n = 0;
|
|
13
|
-
for (const
|
|
14
|
-
const
|
|
15
|
-
|
|
13
|
+
for (const _ of e.children) _ !== s && (n += _.offsetWidth + C);
|
|
14
|
+
const T = e.clientWidth - n - ((a("desktop") ? V : j) * 2 + 90 + 90 + 48), W = Math.floor(T / 53), B = Math.min(H, Math.max(0, Math.floor(W / 2)));
|
|
15
|
+
w(B);
|
|
16
16
|
}, [a]);
|
|
17
|
-
|
|
17
|
+
R(() => {
|
|
18
18
|
const s = f.current, e = s?.parentElement;
|
|
19
19
|
if (!s || !e) return;
|
|
20
20
|
const n = new ResizeObserver(() => {
|
|
@@ -22,16 +22,16 @@ var U = 45, V = 120, j = 45, C = 45, D = 8, G = 4, F = ({ currentPage: i, totalP
|
|
|
22
22
|
});
|
|
23
23
|
return n.observe(s), n.observe(e), h(), () => n.disconnect();
|
|
24
24
|
}, [h]);
|
|
25
|
-
const b = o && m !== void 0 && v,
|
|
25
|
+
const b = o && m !== void 0 && v, M = o?.map((s) => ({
|
|
26
26
|
label: `${s}`,
|
|
27
27
|
value: s
|
|
28
|
-
})),
|
|
28
|
+
})), A = () => {
|
|
29
29
|
const s = [], e = [];
|
|
30
30
|
for (let n = Math.max(2, i - l); n <= Math.min(r - 1, i + l); n++) s.push(n);
|
|
31
31
|
return i - l > 2 ? e.push(1, "...") : e.push(1), e.push(...s), i + l < r - 1 ? e.push("...", r) : r > 1 && e.push(r), e;
|
|
32
32
|
};
|
|
33
33
|
return p !== void 0 && o?.length && p <= Math.min(...o) || r <= 1 && !b ? null : /* @__PURE__ */ c("div", {
|
|
34
|
-
className: `pagination pagination--${
|
|
34
|
+
className: `pagination pagination--${D}`,
|
|
35
35
|
children: [
|
|
36
36
|
r > 1 && /* @__PURE__ */ c("div", {
|
|
37
37
|
className: "pagination__pages",
|
|
@@ -45,7 +45,7 @@ var U = 45, V = 120, j = 45, C = 45, D = 8, G = 4, F = ({ currentPage: i, totalP
|
|
|
45
45
|
onClick: () => d(i - 1),
|
|
46
46
|
children: a("desktop") ? "Previous" : ""
|
|
47
47
|
}),
|
|
48
|
-
|
|
48
|
+
A().map((s, e) => /* @__PURE__ */ t(u, {
|
|
49
49
|
borders: "sharp",
|
|
50
50
|
variant: s === i ? "warning" : "default",
|
|
51
51
|
disabled: typeof s == "string",
|
|
@@ -62,11 +62,11 @@ var U = 45, V = 120, j = 45, C = 45, D = 8, G = 4, F = ({ currentPage: i, totalP
|
|
|
62
62
|
})
|
|
63
63
|
]
|
|
64
64
|
}),
|
|
65
|
-
b &&
|
|
65
|
+
b && M && /* @__PURE__ */ c("div", {
|
|
66
66
|
className: "pagination__page-size",
|
|
67
|
-
children: [/* @__PURE__ */ t("span", { children:
|
|
67
|
+
children: [/* @__PURE__ */ t("span", { children: x }), /* @__PURE__ */ t(y, {
|
|
68
68
|
name: "pageSize",
|
|
69
|
-
options:
|
|
69
|
+
options: M,
|
|
70
70
|
value: m,
|
|
71
71
|
searchable: !1,
|
|
72
72
|
usePortal: !1,
|
|
@@ -75,7 +75,7 @@ var U = 45, V = 120, j = 45, C = 45, D = 8, G = 4, F = ({ currentPage: i, totalP
|
|
|
75
75
|
}
|
|
76
76
|
})]
|
|
77
77
|
}),
|
|
78
|
-
|
|
78
|
+
N && /* @__PURE__ */ c("span", {
|
|
79
79
|
className: "page-info",
|
|
80
80
|
children: [
|
|
81
81
|
"Page ",
|
|
@@ -88,5 +88,5 @@ var U = 45, V = 120, j = 45, C = 45, D = 8, G = 4, F = ({ currentPage: i, totalP
|
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
export {
|
|
91
|
-
|
|
91
|
+
z as Pagination
|
|
92
92
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import './Popover.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { jsx as x, jsxs as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
var i = 20, P = 16,
|
|
7
|
-
const m = _(null), v = _(null), [w, A] =
|
|
3
|
+
import { useCallback as N, useEffect as O, useRef as _, useState as M } from "react";
|
|
4
|
+
import { jsx as x, jsxs as z } from "react/jsx-runtime";
|
|
5
|
+
import { createPortal as C } from "react-dom";
|
|
6
|
+
var i = 20, P = 16, G = 8, B = ({ children: y, visible: h, onClose: g, anchorEl: c, offset: u = G, placement: a = "auto" }) => {
|
|
7
|
+
const m = _(null), v = _(null), [w, A] = M({
|
|
8
8
|
top: 0,
|
|
9
9
|
left: 0,
|
|
10
10
|
placement: "bottom",
|
|
11
11
|
arrowOffset: null
|
|
12
|
-
}),
|
|
13
|
-
if (!
|
|
14
|
-
const t =
|
|
12
|
+
}), f = N(() => {
|
|
13
|
+
if (!c || !m.current || !h) return;
|
|
14
|
+
const t = c.getBoundingClientRect(), e = m.current.getBoundingClientRect(), n = {
|
|
15
15
|
width: window.innerWidth,
|
|
16
16
|
height: window.innerHeight
|
|
17
17
|
}, R = (p, d) => p >= i && d >= i && p + e.height <= n.height - i && d + e.width <= n.width - i, l = {
|
|
@@ -56,37 +56,38 @@ var i = 20, P = 16, C = 8, j = ({ children: y, visible: h, onClose: g, anchorEl:
|
|
|
56
56
|
}) || a, { top: r, left: s } = l[o]);
|
|
57
57
|
}
|
|
58
58
|
(o === "top" || o === "bottom") && (s < i && (s = i), s + e.width > n.width - i && (s = n.width - e.width - i)), (o === "left" || o === "right") && (r < i && (r = i), r + e.height > n.height - i && (r = n.height - e.height - i));
|
|
59
|
-
const E = o === "top" || o === "bottom",
|
|
59
|
+
const E = o === "top" || o === "bottom", b = E ? t.left + t.width / 2 - s : t.top + t.height / 2 - r, k = E ? e.width : e.height, I = Math.min(Math.max(b, P), k - P);
|
|
60
60
|
A({
|
|
61
61
|
top: r,
|
|
62
62
|
left: s,
|
|
63
63
|
placement: o,
|
|
64
|
-
arrowOffset:
|
|
64
|
+
arrowOffset: I
|
|
65
65
|
});
|
|
66
66
|
}, [
|
|
67
|
-
|
|
67
|
+
c,
|
|
68
68
|
h,
|
|
69
69
|
u,
|
|
70
70
|
a
|
|
71
71
|
]);
|
|
72
|
-
|
|
72
|
+
if (O(() => (h && (v.current = requestAnimationFrame(f)), () => {
|
|
73
73
|
v.current !== null && cancelAnimationFrame(v.current);
|
|
74
|
-
}), [h,
|
|
74
|
+
}), [h, f]), O(() => {
|
|
75
75
|
if (!h) return;
|
|
76
76
|
const t = (n) => {
|
|
77
|
-
m.current &&
|
|
77
|
+
m.current && c && !m.current.contains(n.target) && !c.contains(n.target) && g();
|
|
78
78
|
}, e = (n) => {
|
|
79
79
|
n.key === "Escape" && g();
|
|
80
80
|
};
|
|
81
|
-
return document.addEventListener("mousedown", t), document.addEventListener("keydown", e), window.addEventListener("resize",
|
|
82
|
-
document.removeEventListener("mousedown", t), document.removeEventListener("keydown", e), window.removeEventListener("resize",
|
|
81
|
+
return document.addEventListener("mousedown", t), document.addEventListener("keydown", e), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
|
|
82
|
+
document.removeEventListener("mousedown", t), document.removeEventListener("keydown", e), window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
|
|
83
83
|
};
|
|
84
84
|
}, [
|
|
85
85
|
h,
|
|
86
86
|
g,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
]), !h || !
|
|
87
|
+
c,
|
|
88
|
+
f
|
|
89
|
+
]), !h || !c) return null;
|
|
90
|
+
const F = /* @__PURE__ */ z("div", {
|
|
90
91
|
ref: m,
|
|
91
92
|
className: `simple-popover simple-popover--${w.placement}`,
|
|
92
93
|
style: {
|
|
@@ -102,8 +103,9 @@ var i = 20, P = 16, C = 8, j = ({ children: y, visible: h, onClose: g, anchorEl:
|
|
|
102
103
|
className: "simple-popover__content",
|
|
103
104
|
children: y
|
|
104
105
|
})]
|
|
105
|
-
})
|
|
106
|
+
});
|
|
107
|
+
return C(F, document.body);
|
|
106
108
|
};
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
B as Popover
|
|
109
111
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './RangeSlider.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { useCallback as a, useMemo as
|
|
3
|
+
import { useCallback as a, useMemo as O, useRef as L } from "react";
|
|
4
4
|
import { jsx as p, jsxs as g } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
6
|
-
const U = L(null), P = L(null), b = Math.max(1, i - o), T = q ?? c, f =
|
|
5
|
+
var Q = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.length ?? 0, Z = ({ disabled: n = !1, formatValue: M, label: N, max: i = 100, min: o = 0, minDistance: q, onChange: h, onChangeEnd: d, showValues: R = !0, step: c = 1, thin: v = !1, tickStep: w = 0, value: D, variant: z = "accent" }) => {
|
|
6
|
+
const U = L(null), P = L(null), b = Math.max(1, i - o), T = q ?? c, f = Q(c), [s, l] = D, _ = a((r) => M ? M(r) : f > 0 ? r.toFixed(f) : String(r), [f, M]), y = a((r) => {
|
|
7
7
|
const e = c > 0 ? o + Math.round((r - o) / c) * c : r, t = Math.min(i, Math.max(o, e));
|
|
8
8
|
return f > 0 ? Number(t.toFixed(f)) : t;
|
|
9
9
|
}, [
|
|
@@ -13,12 +13,12 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
13
13
|
c
|
|
14
14
|
]), m = a((r, e) => {
|
|
15
15
|
const t = y(e);
|
|
16
|
-
return r === "lower" ? [Math.min(t,
|
|
16
|
+
return r === "lower" ? [Math.min(t, l - T), l] : [s, Math.max(t, s + T)];
|
|
17
17
|
}, [
|
|
18
18
|
T,
|
|
19
|
-
|
|
19
|
+
s,
|
|
20
20
|
y,
|
|
21
|
-
|
|
21
|
+
l
|
|
22
22
|
]), k = a((r) => {
|
|
23
23
|
const e = U.current;
|
|
24
24
|
if (!e) return null;
|
|
@@ -42,19 +42,19 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
42
42
|
if (n) return;
|
|
43
43
|
const e = k(r.clientX);
|
|
44
44
|
if (e === null) return;
|
|
45
|
-
const t = Math.abs(e -
|
|
45
|
+
const t = Math.abs(e - s) <= Math.abs(e - l) ? "lower" : "upper", u = m(t, e);
|
|
46
46
|
h(u), d?.(u);
|
|
47
47
|
}, [
|
|
48
48
|
m,
|
|
49
49
|
n,
|
|
50
|
-
|
|
50
|
+
s,
|
|
51
51
|
h,
|
|
52
52
|
d,
|
|
53
|
-
|
|
53
|
+
l,
|
|
54
54
|
k
|
|
55
55
|
]), K = a((r, e) => {
|
|
56
56
|
if (n) return;
|
|
57
|
-
const t = e === "lower" ?
|
|
57
|
+
const t = e === "lower" ? s : l, u = c > 0 ? c : 1, X = r.key === "ArrowLeft" || r.key === "ArrowDown" ? t - u : r.key === "ArrowRight" || r.key === "ArrowUp" ? t + u : r.key === "PageDown" ? t - u * 10 : r.key === "PageUp" ? t + u * 10 : r.key === "Home" ? o : r.key === "End" ? i : null;
|
|
58
58
|
if (X === null) return;
|
|
59
59
|
r.preventDefault();
|
|
60
60
|
const H = m(e, X);
|
|
@@ -62,14 +62,14 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
62
62
|
}, [
|
|
63
63
|
m,
|
|
64
64
|
n,
|
|
65
|
-
|
|
65
|
+
s,
|
|
66
66
|
i,
|
|
67
67
|
o,
|
|
68
68
|
h,
|
|
69
69
|
d,
|
|
70
70
|
c,
|
|
71
|
-
|
|
72
|
-
]), B =
|
|
71
|
+
l
|
|
72
|
+
]), B = O(() => {
|
|
73
73
|
if (!w || w <= 0) return [];
|
|
74
74
|
const r = [];
|
|
75
75
|
for (let e = o; e <= i; e += w) r.push(y(e));
|
|
@@ -79,14 +79,14 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
79
79
|
o,
|
|
80
80
|
y,
|
|
81
81
|
w
|
|
82
|
-
]), $ = (r) => (Math.min(i, Math.max(o, r)) - o) / b * 100, x = $(
|
|
82
|
+
]), $ = (r) => (Math.min(i, Math.max(o, r)) - o) / b * 100, x = $(s), I = $(l), J = [
|
|
83
|
+
"range-slider",
|
|
84
|
+
`range-slider--${z}`,
|
|
85
|
+
v ? "range-slider--thin" : "",
|
|
86
|
+
n ? "range-slider--disabled" : ""
|
|
87
|
+
].filter(Boolean).join(" ");
|
|
83
88
|
return /* @__PURE__ */ g("div", {
|
|
84
|
-
className:
|
|
85
|
-
"range-slider",
|
|
86
|
-
`range-slider--${z}`,
|
|
87
|
-
v ? "range-slider--thin" : "",
|
|
88
|
-
n ? "range-slider--disabled" : ""
|
|
89
|
-
].filter(Boolean).join(" "),
|
|
89
|
+
className: J,
|
|
90
90
|
children: [
|
|
91
91
|
(N || R) && /* @__PURE__ */ g("div", {
|
|
92
92
|
className: "range-slider__header",
|
|
@@ -96,9 +96,9 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
96
96
|
}), R && /* @__PURE__ */ g("span", {
|
|
97
97
|
className: "range-slider__readout",
|
|
98
98
|
children: [
|
|
99
|
-
_(
|
|
99
|
+
_(s),
|
|
100
100
|
" – ",
|
|
101
|
-
_(
|
|
101
|
+
_(l)
|
|
102
102
|
]
|
|
103
103
|
})]
|
|
104
104
|
}),
|
|
@@ -122,7 +122,7 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
122
122
|
onPointerMove: F,
|
|
123
123
|
onPointerUp: j,
|
|
124
124
|
style: { left: `${x}%` },
|
|
125
|
-
title: _(
|
|
125
|
+
title: _(s),
|
|
126
126
|
type: "button"
|
|
127
127
|
}),
|
|
128
128
|
/* @__PURE__ */ p("button", {
|
|
@@ -133,7 +133,7 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
133
133
|
onPointerMove: F,
|
|
134
134
|
onPointerUp: j,
|
|
135
135
|
style: { left: `${I}%` },
|
|
136
|
-
title: _(
|
|
136
|
+
title: _(l),
|
|
137
137
|
type: "button"
|
|
138
138
|
})
|
|
139
139
|
]
|
|
@@ -153,5 +153,5 @@ var O = (n) => !Number.isFinite(n) || n >= 1 ? 0 : String(n).split(".")[1]?.leng
|
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
155
|
export {
|
|
156
|
-
|
|
156
|
+
Z as RangeSlider
|
|
157
157
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useId as
|
|
1
|
+
import { useId as x } from "react";
|
|
2
2
|
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
|
-
var
|
|
3
|
+
var u = {
|
|
4
4
|
success: "var(--rating-color-success)",
|
|
5
5
|
info: "var(--rating-color-info)",
|
|
6
6
|
warning: "var(--rating-color-warning)",
|
|
7
7
|
danger: "var(--rating-color-danger)"
|
|
8
|
-
},
|
|
9
|
-
const h = `rating-grad-${
|
|
8
|
+
}, p = 7.5, m = 16.5, e = 15.5, M = -4, T = ({ type: i, filled: l, variant: w, size: t = 16, mood: v = 1 }) => {
|
|
9
|
+
const h = `rating-grad-${x()}`, g = u[w], d = "var(--rating-empty-color)", a = l === "full" ? g : l === "half" ? `url(#${h})` : d, s = () => l === "half" ? /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ c("linearGradient", {
|
|
10
10
|
id: h,
|
|
11
11
|
x1: "0",
|
|
12
12
|
x2: "1",
|
|
@@ -43,7 +43,7 @@ var p = {
|
|
|
43
43
|
})]
|
|
44
44
|
});
|
|
45
45
|
if (i === "emoji") {
|
|
46
|
-
const n = e + (
|
|
46
|
+
const n = e + (M + 8.5 * Math.min(1, Math.max(0, v))), o = "var(--card-background-color)";
|
|
47
47
|
return /* @__PURE__ */ c("svg", {
|
|
48
48
|
width: t,
|
|
49
49
|
height: t,
|
|
@@ -69,7 +69,7 @@ var p = {
|
|
|
69
69
|
fill: o
|
|
70
70
|
}),
|
|
71
71
|
/* @__PURE__ */ r("path", {
|
|
72
|
-
d: `M ${
|
|
72
|
+
d: `M ${p} ${e} Q 12 ${n} ${m} ${e}`,
|
|
73
73
|
fill: "none",
|
|
74
74
|
stroke: o,
|
|
75
75
|
strokeWidth: "1.6",
|
|
@@ -79,7 +79,7 @@ var p = {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
if (i === "bar") {
|
|
82
|
-
const n = Math.round(t * 1.75), o = Math.round(t * 0.5625),
|
|
82
|
+
const n = Math.round(t * 1.75), o = Math.round(t * 0.5625), f = o / 2;
|
|
83
83
|
return /* @__PURE__ */ c("svg", {
|
|
84
84
|
width: n,
|
|
85
85
|
height: o,
|
|
@@ -90,7 +90,7 @@ var p = {
|
|
|
90
90
|
y: "0",
|
|
91
91
|
width: n,
|
|
92
92
|
height: o,
|
|
93
|
-
rx:
|
|
93
|
+
rx: f,
|
|
94
94
|
fill: a
|
|
95
95
|
})]
|
|
96
96
|
});
|
|
@@ -98,5 +98,5 @@ var p = {
|
|
|
98
98
|
return null;
|
|
99
99
|
};
|
|
100
100
|
export {
|
|
101
|
-
|
|
101
|
+
T as RatingIcon
|
|
102
102
|
};
|
|
@@ -34,12 +34,13 @@ var h = ({ editorRef: m, snapshotForUndo: d, emitChange: g }) => {
|
|
|
34
34
|
} else {
|
|
35
35
|
d();
|
|
36
36
|
const e = window.getSelection();
|
|
37
|
-
if (s.current && (e?.removeAllRanges(), e?.addRange(s.current)), t)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
if (s.current && (e?.removeAllRanges(), e?.addRange(s.current)), t)
|
|
38
|
+
if (o && e?.toString() === "") document.execCommand("insertHTML", !1, `<a href="${t}" target="_blank" rel="noopener noreferrer">${o}</a>`);
|
|
39
|
+
else {
|
|
40
|
+
document.execCommand("createLink", !1, t);
|
|
41
|
+
const l = e?.anchorNode?.parentElement?.closest("a");
|
|
42
|
+
l && (l.setAttribute("target", "_blank"), l.setAttribute("rel", "noopener noreferrer"));
|
|
43
|
+
}
|
|
43
44
|
s.current = null;
|
|
44
45
|
}
|
|
45
46
|
u(!1), i(""), c(""), g();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './RollingNumber.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { useEffect as f, useRef as
|
|
4
|
-
import { jsx as e, jsxs as
|
|
5
|
-
var
|
|
3
|
+
import { useEffect as f, useRef as B, useState as $ } from "react";
|
|
4
|
+
import { jsx as e, jsxs as F } from "react/jsx-runtime";
|
|
5
|
+
var I = [
|
|
6
6
|
"0",
|
|
7
7
|
"1",
|
|
8
8
|
"2",
|
|
@@ -13,51 +13,53 @@ var B = [
|
|
|
13
13
|
"7",
|
|
14
14
|
"8",
|
|
15
15
|
"9"
|
|
16
|
-
],
|
|
17
|
-
const u =
|
|
16
|
+
], S = (s, c, l, m) => {
|
|
17
|
+
const u = s < 0, [t, r] = Math.abs(s).toFixed(c).split("."), i = l ? t.replace(/\B(?=(\d{3})+(?!\d))/g, l) : t, o = r ? `${i}${m}${r}` : i;
|
|
18
18
|
return u ? `-${o}` : o;
|
|
19
|
-
},
|
|
20
|
-
const d =
|
|
19
|
+
}, H = ({ className: s = "", colorByDirection: c = !1, decimals: l = 0, decimalSeparator: m = ".", duration: u = 600, groupSeparator: t = ",", prefix: r, size: i = "xl", stagger: o = 40, suffix: b, value: n, variant: h = "default" }) => {
|
|
20
|
+
const d = B(n), [N, x] = $("none"), [y, j] = $(!1);
|
|
21
21
|
f(() => {
|
|
22
|
-
|
|
22
|
+
j(!0);
|
|
23
23
|
}, []), f(() => {
|
|
24
24
|
n !== d.current && (x(n > d.current ? "up" : "down"), d.current = n);
|
|
25
25
|
}, [n]);
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
const g = S(n, l, t, m).split(""), D = [
|
|
27
|
+
"rolling-number",
|
|
28
|
+
`rolling-number--${i}`,
|
|
29
|
+
c ? `rolling-number--direction-${N}` : `rolling-number--${h}`,
|
|
30
|
+
y ? "rolling-number--animated" : "",
|
|
31
|
+
s
|
|
32
|
+
].filter(Boolean).join(" ");
|
|
33
|
+
return /* @__PURE__ */ F("span", {
|
|
34
|
+
className: D,
|
|
35
35
|
style: { "--_roll-duration": `${u}ms` },
|
|
36
|
-
title:
|
|
36
|
+
title: g.join(""),
|
|
37
37
|
children: [
|
|
38
38
|
r && /* @__PURE__ */ e("span", {
|
|
39
39
|
className: "rolling-number__affix",
|
|
40
40
|
children: r
|
|
41
41
|
}),
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
42
|
+
g.map((a, M) => {
|
|
43
|
+
const R = a >= "0" && a <= "9", p = g.length - 1 - M;
|
|
44
|
+
if (!R) return /* @__PURE__ */ e("span", {
|
|
45
|
+
className: "rolling-number__separator",
|
|
46
|
+
children: a
|
|
47
|
+
}, `sep-${p}`);
|
|
48
|
+
const w = {
|
|
49
|
+
"--_roll-delay": `${p * o}ms`,
|
|
50
|
+
"--_roll-digit": Number(a)
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ e("span", {
|
|
45
53
|
className: "rolling-number__digit",
|
|
46
54
|
children: /* @__PURE__ */ e("span", {
|
|
47
55
|
className: "rolling-number__strip",
|
|
48
|
-
style:
|
|
49
|
-
|
|
50
|
-
"--_roll-digit": Number(a)
|
|
51
|
-
},
|
|
52
|
-
children: B.map((_) => /* @__PURE__ */ e("span", {
|
|
56
|
+
style: w,
|
|
57
|
+
children: I.map((_) => /* @__PURE__ */ e("span", {
|
|
53
58
|
className: "rolling-number__cell",
|
|
54
59
|
children: _
|
|
55
60
|
}, _))
|
|
56
61
|
})
|
|
57
|
-
}, `digit-${
|
|
58
|
-
className: "rolling-number__separator",
|
|
59
|
-
children: a
|
|
60
|
-
}, `sep-${g}`);
|
|
62
|
+
}, `digit-${p}`);
|
|
61
63
|
}),
|
|
62
64
|
b && /* @__PURE__ */ e("span", {
|
|
63
65
|
className: "rolling-number__affix",
|
|
@@ -67,5 +69,5 @@ var B = [
|
|
|
67
69
|
});
|
|
68
70
|
};
|
|
69
71
|
export {
|
|
70
|
-
|
|
72
|
+
H as RollingNumber
|
|
71
73
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './Separator.css';
|
|
2
2
|
/* empty css */
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as a, jsxs as
|
|
5
|
-
var
|
|
6
|
-
const o = `separator separator--${
|
|
4
|
+
import { jsx as a, jsxs as $ } from "react/jsx-runtime";
|
|
5
|
+
var _ = ({ orientation: s = "horizontal", style: l = "solid", thickness: p = 1, spacing: r = 16, label: t, labelAlign: i = "center", className: m = "" }) => {
|
|
6
|
+
const o = `separator separator--${s} separator--${l} ${m}`, e = {
|
|
7
7
|
borderWidth: `${p}px`,
|
|
8
|
-
...
|
|
8
|
+
...s === "horizontal" ? {
|
|
9
9
|
marginTop: `${r}px`,
|
|
10
10
|
marginBottom: `${r}px`
|
|
11
11
|
} : {
|
|
@@ -13,27 +13,31 @@ var x = ({ orientation: e = "horizontal", style: l = "solid", thickness: p = 1,
|
|
|
13
13
|
marginRight: `${r}px`
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
if (t && s === "horizontal") {
|
|
17
|
+
const n = `separator--align-${i}`;
|
|
18
|
+
return /* @__PURE__ */ $("div", {
|
|
19
|
+
className: `${o} separator--with-label ${n}`,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ a("div", {
|
|
22
|
+
className: "separator__line",
|
|
23
|
+
style: e
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ a("span", {
|
|
26
|
+
className: "separator__label",
|
|
27
|
+
children: t
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ a("div", {
|
|
30
|
+
className: "separator__line",
|
|
31
|
+
style: e
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ a("div", {
|
|
33
37
|
className: o,
|
|
34
|
-
style:
|
|
38
|
+
style: e
|
|
35
39
|
});
|
|
36
40
|
};
|
|
37
41
|
export {
|
|
38
|
-
|
|
42
|
+
_ as Separator
|
|
39
43
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './Skeleton.css';
|
|
2
2
|
/* empty css */
|
|
3
3
|
import "react";
|
|
4
|
-
import { Fragment as
|
|
4
|
+
import { Fragment as k, jsx as o } from "react/jsx-runtime";
|
|
5
5
|
var y = ({ variant: a = "text", animation: n = "pulse", width: r, height: s, borderRadius: t, count: c = 1, className: p = "" }) => {
|
|
6
6
|
const i = () => {
|
|
7
7
|
const e = {};
|
|
@@ -18,7 +18,6 @@ var y = ({ variant: a = "text", animation: n = "pulse", width: r, height: s, bor
|
|
|
18
18
|
break;
|
|
19
19
|
case "rounded":
|
|
20
20
|
e.height = "40px";
|
|
21
|
-
break;
|
|
22
21
|
}
|
|
23
22
|
if (t !== void 0) e.borderRadius = typeof t == "number" ? `${t}px` : t;
|
|
24
23
|
else switch (a) {
|
|
@@ -33,17 +32,16 @@ var y = ({ variant: a = "text", animation: n = "pulse", width: r, height: s, bor
|
|
|
33
32
|
break;
|
|
34
33
|
case "rounded":
|
|
35
34
|
e.borderRadius = "8px";
|
|
36
|
-
break;
|
|
37
35
|
}
|
|
38
36
|
return e;
|
|
39
|
-
},
|
|
40
|
-
className:
|
|
41
|
-
style:
|
|
42
|
-
},
|
|
37
|
+
}, m = `skeleton skeleton--${a} skeleton--${n} ${p}`, u = i(), l = Array.from({ length: c }, (e, x) => /* @__PURE__ */ o("div", {
|
|
38
|
+
className: m,
|
|
39
|
+
style: u
|
|
40
|
+
}, x));
|
|
43
41
|
return c > 1 ? /* @__PURE__ */ o("div", {
|
|
44
42
|
className: "skeleton-group",
|
|
45
43
|
children: l
|
|
46
|
-
}) : /* @__PURE__ */ o(
|
|
44
|
+
}) : /* @__PURE__ */ o(k, { children: l });
|
|
47
45
|
};
|
|
48
46
|
export {
|
|
49
47
|
y as Skeleton
|