@memobit/libs 3.4.3 → 3.6.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/Auth/ChangePasswordModal/ChangePasswordModal2.js +48 -52
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +64 -65
- 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/Dropdown2.js +0 -3
- 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/ProtectedRoute/ProtectedRoute.css +1 -0
- package/dist/components/ProtectedRoute/ProtectedRoute2.js +19 -0
- 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/contexts/AuthContext/AuthContext.js +33 -32
- package/dist/helpers/Charts.js +18 -0
- package/dist/helpers/Http.js +102 -0
- package/dist/helpers/Images.js +19 -0
- package/dist/helpers/Numbers.js +5 -4
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/hooks/useAccountMenu.js +58 -0
- package/dist/http.d.ts +97 -0
- package/dist/http.js +14 -0
- package/dist/index.d.ts +152 -5
- package/dist/index.js +334 -309
- package/dist/node_modules/qrcode.react/lib/esm/index.js +2 -2
- package/dist/router.d.ts +18 -0
- package/dist/router.js +4 -0
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +38 -23
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import './Slider.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { jsx as n, jsxs as
|
|
4
|
-
var
|
|
5
|
-
const g = (
|
|
6
|
-
p(parseFloat(
|
|
7
|
-
}, t =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
3
|
+
import { jsx as n, jsxs as j } from "react/jsx-runtime";
|
|
4
|
+
var F = (e) => !Number.isFinite(e) || e >= 1 ? 0 : String(e).split(".")[1]?.length ?? 0, D = ({ disabled: e = !1, largeValueState: i = "info", min: d = 0, max: m = 100, step: l = 1, value: s, onChange: p, showValues: u = !0, showValueAtTheRight: h = !1, valueSize: r, thin: f = !1, vertical: a = !1 }) => {
|
|
5
|
+
const g = (y) => {
|
|
6
|
+
p(parseFloat(y.target.value));
|
|
7
|
+
}, t = F(l), o = t > 0 ? s.toFixed(t) : String(s), c = h && !a, v = [
|
|
8
|
+
"slider-component",
|
|
9
|
+
c ? "slider-component--inline" : "",
|
|
10
|
+
f ? "slider-component--thin" : "",
|
|
11
|
+
a ? "slider-component--vertical" : "",
|
|
12
|
+
r ? `slider-component--value-${r}` : ""
|
|
13
|
+
].filter(Boolean).join(" "), N = /* @__PURE__ */ n("input", {
|
|
14
|
+
type: "range",
|
|
15
|
+
min: d,
|
|
16
|
+
max: m,
|
|
17
|
+
value: s,
|
|
18
|
+
step: l,
|
|
19
|
+
onChange: g,
|
|
20
|
+
className: "slider-input",
|
|
21
|
+
disabled: e
|
|
22
|
+
}), x = u && (c ? /* @__PURE__ */ n("span", {
|
|
23
|
+
className: `slider-value-inline slider-state-${i}`,
|
|
24
|
+
children: o
|
|
25
|
+
}) : /* @__PURE__ */ n("div", {
|
|
26
|
+
className: "slider-display",
|
|
27
|
+
children: /* @__PURE__ */ n("span", {
|
|
28
|
+
className: `slider-value slider-state-${i}`,
|
|
27
29
|
children: o
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
}))]
|
|
30
|
+
})
|
|
31
|
+
}));
|
|
32
|
+
return /* @__PURE__ */ j("div", {
|
|
33
|
+
className: v,
|
|
34
|
+
children: [N, x]
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
D as Slider
|
|
39
39
|
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import './Splitter.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { jsx as D, jsxs as
|
|
5
|
-
var
|
|
6
|
-
const m =
|
|
7
|
-
if (d === 0) return m === 0 ?
|
|
3
|
+
import { Fragment as U, useCallback as h, useEffect as $, useMemo as j, useRef as I, useState as E } from "react";
|
|
4
|
+
import { jsx as D, jsxs as L } from "react/jsx-runtime";
|
|
5
|
+
var F = 10, X = (l) => {
|
|
6
|
+
const m = l.reduce((e, s) => e + (s.size ?? 0), 0), d = l.filter((e) => e.size === void 0).length;
|
|
7
|
+
if (d === 0) return m === 0 ? l.map(() => 100 / l.length) : l.map((e) => (e.size ?? 0) / m * 100);
|
|
8
8
|
const z = Math.max(0, 100 - m) / d;
|
|
9
|
-
return
|
|
10
|
-
},
|
|
11
|
-
const f =
|
|
12
|
-
|
|
9
|
+
return l.map((e) => e.size ?? z);
|
|
10
|
+
}, b = ({ className: l = "", collapsible: m = !1, gutterSize: d = 6, keyboardStep: z = 2, onResize: e, orientation: s = "horizontal", panes: g, resetOnDoubleClick: y = !0 }) => {
|
|
11
|
+
const f = j(() => X(g), [g]), [o, S] = E(f), B = I(null), P = I(null);
|
|
12
|
+
$(() => {
|
|
13
13
|
S((t) => t.length === f.length ? t : f);
|
|
14
14
|
}, [f]);
|
|
15
|
-
const A = h((t) => g[t]?.minSize ??
|
|
16
|
-
const
|
|
17
|
-
let u = r +
|
|
18
|
-
return u <
|
|
15
|
+
const A = h((t) => g[t]?.minSize ?? F, [g]), _ = h((t, r, n, i) => {
|
|
16
|
+
const c = A(t), a = A(t + 1), p = r + n;
|
|
17
|
+
let u = r + i;
|
|
18
|
+
return u < c && (u = m && u < c / 2 ? 0 : c), p - u < a && (u = m && p - u < a / 2 ? p : p - a), [u, p - u];
|
|
19
19
|
}, [m, A]), w = h((t, [r, n]) => {
|
|
20
|
-
const
|
|
21
|
-
return S(
|
|
20
|
+
const i = o.map((c, a) => a === t ? r : a === t + 1 ? n : c);
|
|
21
|
+
return S(i), i;
|
|
22
22
|
}, [o]), M = h((t, r) => {
|
|
23
23
|
t.preventDefault(), t.currentTarget.setPointerCapture(t.pointerId), P.current = {
|
|
24
24
|
index: r,
|
|
25
25
|
startA: o[r],
|
|
26
26
|
startB: o[r + 1],
|
|
27
|
-
startPosition:
|
|
27
|
+
startPosition: s === "horizontal" ? t.clientX : t.clientY
|
|
28
28
|
};
|
|
29
|
-
}, [
|
|
29
|
+
}, [s, o]), C = h((t) => {
|
|
30
30
|
const r = P.current, n = B.current;
|
|
31
31
|
if (!r || !n) return;
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
const a = ((
|
|
32
|
+
const i = n.getBoundingClientRect(), c = s === "horizontal" ? i.width : i.height;
|
|
33
|
+
if (c === 0) return;
|
|
34
|
+
const a = ((s === "horizontal" ? t.clientX : t.clientY) - r.startPosition) / c * 100;
|
|
35
35
|
w(r.index, _(r.index, r.startA, r.startB, a));
|
|
36
36
|
}, [
|
|
37
37
|
w,
|
|
38
|
-
|
|
38
|
+
s,
|
|
39
39
|
_
|
|
40
40
|
]), N = h((t) => {
|
|
41
41
|
P.current && (t.currentTarget.releasePointerCapture(t.pointerId), P.current = null, e?.(o));
|
|
42
42
|
}, [e, o]), T = h((t, r) => {
|
|
43
|
-
const n =
|
|
44
|
-
if (t.key !== n && t.key !==
|
|
43
|
+
const n = s === "horizontal" ? "ArrowLeft" : "ArrowUp", i = s === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
44
|
+
if (t.key !== n && t.key !== i) return;
|
|
45
45
|
t.preventDefault();
|
|
46
|
-
const
|
|
47
|
-
e?.(w(r, _(r, o[r], o[r + 1],
|
|
46
|
+
const c = t.key === i ? 1 : -1;
|
|
47
|
+
e?.(w(r, _(r, o[r], o[r + 1], c * z)));
|
|
48
48
|
}, [
|
|
49
49
|
w,
|
|
50
50
|
z,
|
|
51
51
|
e,
|
|
52
|
-
|
|
52
|
+
s,
|
|
53
53
|
_,
|
|
54
54
|
o
|
|
55
55
|
]), k = h(() => {
|
|
@@ -58,16 +58,16 @@ var L = 10, F = (c) => {
|
|
|
58
58
|
f,
|
|
59
59
|
e,
|
|
60
60
|
y
|
|
61
|
-
]), v = { "--_splitter-gutter": `${d}px` }
|
|
61
|
+
]), v = { "--_splitter-gutter": `${d}px` }, K = [
|
|
62
|
+
"splitter",
|
|
63
|
+
`splitter--${s}`,
|
|
64
|
+
l
|
|
65
|
+
].filter(Boolean).join(" ");
|
|
62
66
|
return /* @__PURE__ */ D("div", {
|
|
63
|
-
className:
|
|
64
|
-
"splitter",
|
|
65
|
-
`splitter--${i}`,
|
|
66
|
-
c
|
|
67
|
-
].filter(Boolean).join(" "),
|
|
67
|
+
className: K,
|
|
68
68
|
ref: B,
|
|
69
69
|
style: v,
|
|
70
|
-
children: g.map((t, r) => /* @__PURE__ */
|
|
70
|
+
children: g.map((t, r) => /* @__PURE__ */ L(U, { children: [/* @__PURE__ */ D("div", {
|
|
71
71
|
className: `splitter__pane${o[r] === 0 ? " splitter__pane--collapsed" : ""}`,
|
|
72
72
|
style: { flexBasis: `${o[r]}%` },
|
|
73
73
|
children: t.content
|
|
@@ -85,5 +85,5 @@ var L = 10, F = (c) => {
|
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
b as Splitter
|
|
89
89
|
};
|
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
import './StackedBar.css';
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import { format2Digits as
|
|
2
|
+
import { Tooltip as y } from "../Tooltip/Tooltip2.js";
|
|
3
|
+
import { format2Digits as M } from "../../helpers/Numbers.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { jsx as
|
|
7
|
-
var j = (
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
},
|
|
11
|
-
const k =
|
|
5
|
+
import { useMemo as S } from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
var j = (e, o, c) => {
|
|
8
|
+
const s = `${M(o)}%`;
|
|
9
|
+
return e.label && c ? `${e.label} - ${s}` : e.label ? e.label : s;
|
|
10
|
+
}, D = ({ animated: e = !1, height: o, normalize: c = !0, orientation: s = "horizontal", segments: a, separators: f = !1, showLabels: p = !0, showPercentage: b = !0, thin: h = !1, width: d }) => {
|
|
11
|
+
const k = S(() => {
|
|
12
12
|
if (a.length === 0) return [];
|
|
13
13
|
if (!c) return a.map((t) => Math.max(0, t.value));
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
}, [a, c]), v =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
const r = a.reduce((t, l) => t + Math.max(0, l.value), 0);
|
|
15
|
+
return r === 0 ? a.map(() => 0) : a.map((t) => Math.max(0, t.value) / r * 100);
|
|
16
|
+
}, [a, c]), v = s === "vertical", n = {};
|
|
17
|
+
o !== void 0 && (n.height = o), d !== void 0 && (n.width = d);
|
|
18
|
+
const _ = [
|
|
19
|
+
"stacked-bar",
|
|
20
|
+
`stacked-bar--${s}`,
|
|
21
|
+
h ? "stacked-bar--thin" : "",
|
|
22
|
+
f ? "stacked-bar--separators" : ""
|
|
23
|
+
].filter(Boolean).join(" ");
|
|
24
|
+
return /* @__PURE__ */ i("div", {
|
|
25
|
+
className: _,
|
|
24
26
|
style: n,
|
|
25
|
-
children: a.map((
|
|
27
|
+
children: a.map((r, t) => {
|
|
26
28
|
const l = k[t];
|
|
27
29
|
if (l <= 0) return null;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
style:
|
|
39
|
-
children: p && /* @__PURE__ */
|
|
30
|
+
const $ = r.state || "default", m = r.pattern || "solid", u = j(r, l, b), x = [
|
|
31
|
+
"stacked-bar__segment",
|
|
32
|
+
`stacked-bar__segment--${$}`,
|
|
33
|
+
`stacked-bar__segment--${m}`,
|
|
34
|
+
e && m !== "solid" ? "stacked-bar__segment--animated" : ""
|
|
35
|
+
].filter(Boolean).join(" "), N = v ? { height: `${l}%` } : { width: `${l}%` };
|
|
36
|
+
return /* @__PURE__ */ i(y, {
|
|
37
|
+
title: u,
|
|
38
|
+
children: /* @__PURE__ */ i("div", {
|
|
39
|
+
className: x,
|
|
40
|
+
style: N,
|
|
41
|
+
children: p && /* @__PURE__ */ i("span", {
|
|
40
42
|
className: "stacked-bar__segment-label",
|
|
41
|
-
children:
|
|
43
|
+
children: u
|
|
42
44
|
})
|
|
43
45
|
})
|
|
44
46
|
}, `stacked-bar-segment-${t}`);
|
|
@@ -46,5 +48,5 @@ var j = (r, o, c) => {
|
|
|
46
48
|
});
|
|
47
49
|
};
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
D as StackedBar
|
|
50
52
|
};
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import './Stats.css';
|
|
2
2
|
/* empty css */
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
|
|
4
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
var _ = ({ items: t, dividers: l = !0, align: e = "left", size: r = "medium", className: i = "" }) => {
|
|
6
|
+
if (t.length === 0) return null;
|
|
7
|
+
const n = [
|
|
7
8
|
"stats",
|
|
8
9
|
`stats--align-${e}`,
|
|
9
10
|
`stats--size-${r}`,
|
|
10
11
|
l ? "stats--dividers" : "",
|
|
11
12
|
i
|
|
12
|
-
].filter(Boolean).join(" ")
|
|
13
|
-
|
|
14
|
-
className:
|
|
15
|
-
children:
|
|
16
|
-
className: "
|
|
17
|
-
children: a
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})
|
|
13
|
+
].filter(Boolean).join(" ");
|
|
14
|
+
return /* @__PURE__ */ a("div", {
|
|
15
|
+
className: n,
|
|
16
|
+
children: t.map((s, c) => /* @__PURE__ */ d("div", {
|
|
17
|
+
className: "stats__item",
|
|
18
|
+
children: [/* @__PURE__ */ a("span", {
|
|
19
|
+
className: "stats__label",
|
|
20
|
+
children: s.label
|
|
21
|
+
}), /* @__PURE__ */ a("span", {
|
|
22
|
+
className: `stats__value stats__value--${s.variant ?? "default"}`,
|
|
23
|
+
children: s.value
|
|
24
|
+
})]
|
|
25
|
+
}, `${s.label}-${c}`))
|
|
26
|
+
});
|
|
27
|
+
};
|
|
24
28
|
export {
|
|
25
|
-
|
|
29
|
+
_ as Stats
|
|
26
30
|
};
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import './StickyBar.css';
|
|
2
|
-
import { Button as
|
|
2
|
+
import { Button as k } from "../Button/Button2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "react";
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
|
|
5
|
+
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
6
|
+
var x = ({ children: e, position: t = "bottom", align: o = "between", visible: c = !0, onClose: r, closeLabel: i = "Close", offset: a = 0, className: l }) => {
|
|
7
|
+
if (!c) return null;
|
|
8
|
+
const n = [
|
|
8
9
|
"sticky-bar",
|
|
9
10
|
`sticky-bar--${t}`,
|
|
10
|
-
`sticky-bar--align-${
|
|
11
|
-
|
|
12
|
-
].filter(Boolean).join(" "),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
children:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
`sticky-bar--align-${o}`,
|
|
12
|
+
l
|
|
13
|
+
].filter(Boolean).join(" "), m = a ? { [t]: `${a}px` } : void 0;
|
|
14
|
+
return /* @__PURE__ */ y("div", {
|
|
15
|
+
className: n,
|
|
16
|
+
style: m,
|
|
17
|
+
children: [/* @__PURE__ */ s("div", {
|
|
18
|
+
className: "sticky-bar__content",
|
|
19
|
+
children: e
|
|
20
|
+
}), r && /* @__PURE__ */ s(k, {
|
|
21
|
+
className: "sticky-bar__close",
|
|
22
|
+
icon: "clear",
|
|
23
|
+
onClick: r,
|
|
24
|
+
size: "small",
|
|
25
|
+
variant: "ghost",
|
|
26
|
+
title: i,
|
|
27
|
+
children: i
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
27
31
|
export {
|
|
28
|
-
|
|
32
|
+
x as StickyBar
|
|
29
33
|
};
|
|
@@ -2,56 +2,62 @@ import './Timeline.css';
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as i, jsxs as n } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
6
|
-
|
|
5
|
+
var _ = (l = "default") => `timeline__dot timeline__dot--${l}`, u = ({ items: l, orientation: s = "vertical", size: m = "md", connected: t = !0, animated: c = !0, className: r = "" }) => {
|
|
6
|
+
const d = [
|
|
7
7
|
"timeline",
|
|
8
|
-
`timeline--${m}`,
|
|
9
8
|
`timeline--${s}`,
|
|
10
|
-
|
|
9
|
+
`timeline--${m}`,
|
|
10
|
+
t ? "timeline--connected" : "",
|
|
11
11
|
c ? "timeline--animated" : "",
|
|
12
12
|
r
|
|
13
|
-
].filter(Boolean).join(" ")
|
|
14
|
-
|
|
15
|
-
className:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children:
|
|
26
|
-
className: "
|
|
27
|
-
children:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})
|
|
13
|
+
].filter(Boolean).join(" ");
|
|
14
|
+
return /* @__PURE__ */ i("ol", {
|
|
15
|
+
className: d,
|
|
16
|
+
children: l.map((e, a) => {
|
|
17
|
+
const o = [
|
|
18
|
+
"timeline__item",
|
|
19
|
+
e.active ? "timeline__item--active" : "",
|
|
20
|
+
e.muted ? "timeline__item--muted" : ""
|
|
21
|
+
].filter(Boolean).join(" ");
|
|
22
|
+
return /* @__PURE__ */ n("li", {
|
|
23
|
+
className: o,
|
|
24
|
+
style: { "--item-index": a },
|
|
25
|
+
children: [/* @__PURE__ */ n("div", {
|
|
26
|
+
className: "timeline__node",
|
|
27
|
+
children: [/* @__PURE__ */ i("div", {
|
|
28
|
+
className: _(e.variant),
|
|
29
|
+
children: e.icon ? /* @__PURE__ */ i("span", {
|
|
30
|
+
className: "timeline__dot-icon",
|
|
31
|
+
children: e.icon
|
|
32
|
+
}) : null
|
|
33
|
+
}), t && a < l.length - 1 && /* @__PURE__ */ i("div", { className: "timeline__connector" })]
|
|
34
|
+
}), /* @__PURE__ */ n("div", {
|
|
35
|
+
className: "timeline__content",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ n("div", {
|
|
38
|
+
className: "timeline__header",
|
|
39
|
+
children: [/* @__PURE__ */ i("span", {
|
|
40
|
+
className: "timeline__title",
|
|
41
|
+
children: e.title
|
|
42
|
+
}), e.badge && /* @__PURE__ */ i("span", {
|
|
43
|
+
className: `timeline__badge timeline__badge--${e.variant ?? "default"}`,
|
|
44
|
+
children: e.badge
|
|
45
|
+
})]
|
|
46
|
+
}),
|
|
47
|
+
e.description && /* @__PURE__ */ i("p", {
|
|
48
|
+
className: "timeline__description",
|
|
49
|
+
children: e.description
|
|
50
|
+
}),
|
|
51
|
+
e.timestamp && /* @__PURE__ */ i("time", {
|
|
52
|
+
className: "timeline__timestamp",
|
|
53
|
+
children: e.timestamp
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
})]
|
|
57
|
+
}, e.id);
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
};
|
|
55
61
|
export {
|
|
56
|
-
|
|
62
|
+
u as Timeline
|
|
57
63
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import './Tooltip.css';
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { useEffect as b, useRef as h, useState as B } from "react";
|
|
4
|
-
import { Fragment as V, jsx as
|
|
4
|
+
import { Fragment as V, jsx as D, jsxs as N } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal as O } from "react-dom";
|
|
6
|
-
var K = ({ title: L, position: T = "top", delay:
|
|
6
|
+
var K = ({ title: L, position: T = "top", delay: _ = 200, children: k, disabled: $ = !1, className: F = "", maxWidth: p, maxHeight: a }) => {
|
|
7
7
|
const [f, s] = B(!1), [M, I] = B({
|
|
8
8
|
top: 0,
|
|
9
9
|
left: 0
|
|
@@ -31,7 +31,6 @@ var K = ({ title: L, position: T = "top", delay: N = 200, children: _, disabled:
|
|
|
31
31
|
break;
|
|
32
32
|
case "right":
|
|
33
33
|
o = e.top + e.height / 2 - n.height / 2, i = e.right + v;
|
|
34
|
-
break;
|
|
35
34
|
}
|
|
36
35
|
const u = 8;
|
|
37
36
|
i < u && (i = u), i + n.width > window.innerWidth - u && (i = window.innerWidth - n.width - u), o < u && (o = u), o + n.height > window.innerHeight - u && (o = window.innerHeight - n.height - u), I({
|
|
@@ -41,7 +40,7 @@ var K = ({ title: L, position: T = "top", delay: N = 200, children: _, disabled:
|
|
|
41
40
|
}, P = () => {
|
|
42
41
|
$ || w.current || (t.current && (clearTimeout(t.current), t.current = null), c.current = setTimeout(() => {
|
|
43
42
|
s(!0);
|
|
44
|
-
},
|
|
43
|
+
}, _));
|
|
45
44
|
}, y = () => {
|
|
46
45
|
w.current || (c.current && clearTimeout(c.current), R > 0 ? t.current = setTimeout(() => s(!1), R) : s(!1));
|
|
47
46
|
}, j = (r) => {
|
|
@@ -65,7 +64,7 @@ var K = ({ title: L, position: T = "top", delay: N = 200, children: _, disabled:
|
|
|
65
64
|
}, z = () => {
|
|
66
65
|
m && (t.current = setTimeout(() => s(!1), R));
|
|
67
66
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ N(V, { children: [/* @__PURE__ */ D("span", {
|
|
69
68
|
ref: l,
|
|
70
69
|
className: "tooltip-trigger",
|
|
71
70
|
onMouseEnter: P,
|
|
@@ -73,8 +72,8 @@ var K = ({ title: L, position: T = "top", delay: N = 200, children: _, disabled:
|
|
|
73
72
|
onFocus: P,
|
|
74
73
|
onBlur: y,
|
|
75
74
|
onPointerDown: j,
|
|
76
|
-
children:
|
|
77
|
-
}), f && L && O(/* @__PURE__ */
|
|
75
|
+
children: k
|
|
76
|
+
}), f && L && O(/* @__PURE__ */ N("div", {
|
|
78
77
|
ref: g,
|
|
79
78
|
className: `tooltip tooltip--${T} ${m ? "tooltip--scrollable" : ""} ${F}`,
|
|
80
79
|
style: {
|
|
@@ -85,7 +84,7 @@ var K = ({ title: L, position: T = "top", delay: N = 200, children: _, disabled:
|
|
|
85
84
|
},
|
|
86
85
|
onMouseEnter: x,
|
|
87
86
|
onMouseLeave: z,
|
|
88
|
-
children: [L, /* @__PURE__ */
|
|
87
|
+
children: [L, /* @__PURE__ */ D("div", { className: `tooltip__arrow tooltip__arrow--${T}` })]
|
|
89
88
|
}), document.body)] });
|
|
90
89
|
};
|
|
91
90
|
export {
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import './TourHud.css';
|
|
2
|
-
import { Icon as
|
|
2
|
+
import { Icon as n } from "../Icon/Icon2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
7
|
-
const _ = o === void 0 ? void 0 : { "--tour-hud-width": typeof o == "number" ? `${o}px` : o }
|
|
6
|
+
var j = ({ label: d, stepLabel: l, index: r, total: s, title: u, note: i, onPrev: a, onNext: c, onExit: m, width: o, className: h = "" }) => {
|
|
7
|
+
const _ = o === void 0 ? void 0 : { "--tour-hud-width": typeof o == "number" ? `${o}px` : o }, b = [
|
|
8
|
+
"tour-hud",
|
|
9
|
+
o !== void 0 && "tour-hud--fixed-width",
|
|
10
|
+
h
|
|
11
|
+
].filter(Boolean).join(" "), p = [
|
|
12
|
+
d,
|
|
13
|
+
`Stop ${r + 1} / ${s}`,
|
|
14
|
+
l
|
|
15
|
+
].filter(Boolean);
|
|
8
16
|
return /* @__PURE__ */ e("div", {
|
|
9
|
-
className:
|
|
10
|
-
"tour-hud",
|
|
11
|
-
o !== void 0 && "tour-hud--fixed-width",
|
|
12
|
-
h
|
|
13
|
-
].filter(Boolean).join(" "),
|
|
17
|
+
className: b,
|
|
14
18
|
style: _,
|
|
15
19
|
children: [/* @__PURE__ */ e("div", {
|
|
16
20
|
className: "tour-hud__body",
|
|
17
21
|
children: [
|
|
18
22
|
/* @__PURE__ */ t("div", {
|
|
19
23
|
className: "tour-hud__context",
|
|
20
|
-
children:
|
|
21
|
-
l,
|
|
22
|
-
`Stop ${r + 1} / ${i}`,
|
|
23
|
-
n
|
|
24
|
-
].filter(Boolean).join(" · ")
|
|
24
|
+
children: p.join(" · ")
|
|
25
25
|
}),
|
|
26
26
|
/* @__PURE__ */ t("div", {
|
|
27
27
|
className: "tour-hud__title",
|
|
28
|
-
children:
|
|
28
|
+
children: u
|
|
29
29
|
}),
|
|
30
|
-
|
|
30
|
+
i && /* @__PURE__ */ t("div", {
|
|
31
31
|
className: "tour-hud__note",
|
|
32
|
-
children:
|
|
32
|
+
children: i
|
|
33
33
|
})
|
|
34
34
|
]
|
|
35
35
|
}), /* @__PURE__ */ e("div", {
|
|
@@ -40,7 +40,7 @@ var y = ({ label: l, stepLabel: n, index: r, total: i, title: s, note: d, onPrev
|
|
|
40
40
|
className: "tour-hud__btn",
|
|
41
41
|
disabled: r === 0,
|
|
42
42
|
onClick: a,
|
|
43
|
-
children: [/* @__PURE__ */ t(
|
|
43
|
+
children: [/* @__PURE__ */ t(n, {
|
|
44
44
|
name: "arrow-left",
|
|
45
45
|
size: "sm"
|
|
46
46
|
}), "Prev"]
|
|
@@ -48,9 +48,9 @@ var y = ({ label: l, stepLabel: n, index: r, total: i, title: s, note: d, onPrev
|
|
|
48
48
|
/* @__PURE__ */ e("button", {
|
|
49
49
|
type: "button",
|
|
50
50
|
className: "tour-hud__btn",
|
|
51
|
-
disabled: r >=
|
|
51
|
+
disabled: r >= s - 1,
|
|
52
52
|
onClick: c,
|
|
53
|
-
children: ["Next", /* @__PURE__ */ t(
|
|
53
|
+
children: ["Next", /* @__PURE__ */ t(n, {
|
|
54
54
|
name: "arrow-right",
|
|
55
55
|
size: "sm"
|
|
56
56
|
})]
|
|
@@ -66,5 +66,5 @@ var y = ({ label: l, stepLabel: n, index: r, total: i, title: s, note: d, onPrev
|
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
j as TourHud
|
|
70
70
|
};
|