@memobit/libs 3.4.3 → 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.
Files changed (45) hide show
  1. package/dist/components/AngleSlider/AngleSlider2.js +27 -27
  2. package/dist/components/AppHeader/AppHeader2.js +39 -36
  3. package/dist/components/Blockquote/Blockquote2.js +14 -14
  4. package/dist/components/BulkActionBar/BulkActionBar2.js +34 -30
  5. package/dist/components/Calendar/Calendar2.js +10 -8
  6. package/dist/components/Card/Card.css +1 -1
  7. package/dist/components/Confetti/Confetti2.js +2 -3
  8. package/dist/components/ControlPanel/ControlPanelFilter.js +26 -26
  9. package/dist/components/DataView/DataView.CardView.js +8 -4
  10. package/dist/components/DataView/DataView.ColumnSelector.js +24 -21
  11. package/dist/components/DataView/DataView.MiniSort.js +18 -16
  12. package/dist/components/DataView/DataView2.js +90 -86
  13. package/dist/components/DiffViewer/DiffViewer2.js +124 -118
  14. package/dist/components/Dropdown/Dropdown2.js +0 -3
  15. package/dist/components/EventCalendar/EventCalendar.Chip.js +21 -21
  16. package/dist/components/EventCalendar/EventCalendar.Month.js +19 -19
  17. package/dist/components/FloatingWindow/FloatingWindow2.js +60 -60
  18. package/dist/components/Grid/Grid2.js +18 -18
  19. package/dist/components/InputPIN/InputPIN2.js +42 -42
  20. package/dist/components/MiniSort/MiniSort2.js +47 -43
  21. package/dist/components/MiniStatsCard/MiniStatsCard2.js +20 -20
  22. package/dist/components/Pagination/Pagination2.js +18 -18
  23. package/dist/components/Popover/Popover2.js +23 -21
  24. package/dist/components/RangeSlider/RangeSlider2.js +25 -25
  25. package/dist/components/Rating/RatingIcon.js +9 -9
  26. package/dist/components/RichTextEditor/hooks/useLinkPrompt.js +7 -6
  27. package/dist/components/RollingNumber/RollingNumber2.js +33 -31
  28. package/dist/components/Separator/Separator2.js +27 -23
  29. package/dist/components/Skeleton/Skeleton2.js +6 -8
  30. package/dist/components/Slider/Slider2.js +32 -32
  31. package/dist/components/Splitter/Splitter2.js +34 -34
  32. package/dist/components/StackedBar/StackedBar2.js +36 -34
  33. package/dist/components/Stats/Stats2.js +20 -16
  34. package/dist/components/StickyBar/StickyBar2.js +26 -22
  35. package/dist/components/Timeline/Timeline2.js +53 -47
  36. package/dist/components/Tooltip/Tooltip2.js +7 -8
  37. package/dist/components/TourHud/TourHud2.js +20 -20
  38. package/dist/components/Transition/Transition2.js +20 -20
  39. package/dist/components/Tree/Tree2.js +23 -23
  40. package/dist/helpers/VersionInfo.js +1 -1
  41. package/dist/index.d.ts +5 -5
  42. package/dist/node_modules/qrcode.react/lib/esm/index.js +2 -2
  43. package/dist/version.js +2 -2
  44. package/dist/version.json +4 -4
  45. package/package.json +24 -23
@@ -1,39 +1,39 @@
1
1
  import './Slider.css';
2
2
  /* empty css */
3
- import { jsx as n, jsxs as v } from "react/jsx-runtime";
4
- var x = (e) => !Number.isFinite(e) || e >= 1 ? 0 : String(e).split(".")[1]?.length ?? 0, F = ({ disabled: e = !1, largeValueState: s = "info", min: c = 0, max: m = 100, step: l = 1, value: i, onChange: p, showValues: h = !0, showValueAtTheRight: f = !1, valueSize: r, thin: u = !1, vertical: a = !1 }) => {
5
- const g = (N) => {
6
- p(parseFloat(N.target.value));
7
- }, t = x(l), o = t > 0 ? i.toFixed(t) : String(i), d = f && !a;
8
- return /* @__PURE__ */ v("div", {
9
- className: [
10
- "slider-component",
11
- d ? "slider-component--inline" : "",
12
- u ? "slider-component--thin" : "",
13
- a ? "slider-component--vertical" : "",
14
- r ? `slider-component--value-${r}` : ""
15
- ].filter(Boolean).join(" "),
16
- children: [/* @__PURE__ */ n("input", {
17
- type: "range",
18
- min: c,
19
- max: m,
20
- value: i,
21
- step: l,
22
- onChange: g,
23
- className: "slider-input",
24
- disabled: e
25
- }), h && (d ? /* @__PURE__ */ n("span", {
26
- className: `slider-value-inline slider-state-${s}`,
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
- }) : /* @__PURE__ */ n("div", {
29
- className: "slider-display",
30
- children: /* @__PURE__ */ n("span", {
31
- className: `slider-value slider-state-${s}`,
32
- children: o
33
- })
34
- }))]
30
+ })
31
+ }));
32
+ return /* @__PURE__ */ j("div", {
33
+ className: v,
34
+ children: [N, x]
35
35
  });
36
36
  };
37
37
  export {
38
- F as Slider
38
+ D as Slider
39
39
  };
@@ -1,55 +1,55 @@
1
1
  import './Splitter.css';
2
2
  /* empty css */
3
- import { Fragment as K, useCallback as h, useEffect as U, useMemo as $, useRef as I, useState as j } from "react";
4
- import { jsx as D, jsxs as E } from "react/jsx-runtime";
5
- var L = 10, F = (c) => {
6
- const m = c.reduce((e, i) => e + (i.size ?? 0), 0), d = c.filter((e) => e.size === void 0).length;
7
- if (d === 0) return m === 0 ? c.map(() => 100 / c.length) : c.map((e) => (e.size ?? 0) / m * 100);
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 c.map((e) => e.size ?? z);
10
- }, Z = ({ className: c = "", collapsible: m = !1, gutterSize: d = 6, keyboardStep: z = 2, onResize: e, orientation: i = "horizontal", panes: g, resetOnDoubleClick: y = !0 }) => {
11
- const f = $(() => F(g), [g]), [o, S] = j(f), B = I(null), P = I(null);
12
- U(() => {
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 ?? L, [g]), _ = h((t, r, n, s) => {
16
- const l = A(t), a = A(t + 1), p = r + n;
17
- let u = r + s;
18
- return u < l && (u = m && u < l / 2 ? 0 : l), p - u < a && (u = m && p - u < a / 2 ? p : p - a), [u, p - 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 s = o.map((l, a) => a === t ? r : a === t + 1 ? n : l);
21
- return S(s), 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: i === "horizontal" ? t.clientX : t.clientY
27
+ startPosition: s === "horizontal" ? t.clientX : t.clientY
28
28
  };
29
- }, [i, o]), C = h((t) => {
29
+ }, [s, o]), C = h((t) => {
30
30
  const r = P.current, n = B.current;
31
31
  if (!r || !n) return;
32
- const s = n.getBoundingClientRect(), l = i === "horizontal" ? s.width : s.height;
33
- if (l === 0) return;
34
- const a = ((i === "horizontal" ? t.clientX : t.clientY) - r.startPosition) / l * 100;
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
- i,
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 = i === "horizontal" ? "ArrowLeft" : "ArrowUp", s = i === "horizontal" ? "ArrowRight" : "ArrowDown";
44
- if (t.key !== n && t.key !== s) return;
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 l = t.key === s ? 1 : -1;
47
- e?.(w(r, _(r, o[r], o[r + 1], l * z)));
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
- i,
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__ */ E(K, { children: [/* @__PURE__ */ D("div", {
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
- Z as Splitter
88
+ b as Splitter
89
89
  };
@@ -1,44 +1,46 @@
1
1
  import './StackedBar.css';
2
- import { Tooltip as $ } from "../Tooltip/Tooltip2.js";
3
- import { format2Digits as x } from "../../helpers/Numbers.js";
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 M } from "react";
6
- import { jsx as s } from "react/jsx-runtime";
7
- var j = (r, o, c) => {
8
- const i = `${x(o)}%`;
9
- return r.label && c ? `${r.label} - ${i}` : r.label ? r.label : i;
10
- }, w = ({ animated: r = !1, height: o, normalize: c = !0, orientation: i = "horizontal", segments: a, separators: m = !1, showLabels: p = !0, showPercentage: b = !0, thin: h = !1, width: d }) => {
11
- const k = M(() => {
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 e = a.reduce((t, l) => t + Math.max(0, l.value), 0);
15
- return e === 0 ? a.map(() => 0) : a.map((t) => Math.max(0, t.value) / e * 100);
16
- }, [a, c]), v = i === "vertical", n = {};
17
- return o !== void 0 && (n.height = o), d !== void 0 && (n.width = d), /* @__PURE__ */ s("div", {
18
- className: [
19
- "stacked-bar",
20
- `stacked-bar--${i}`,
21
- h ? "stacked-bar--thin" : "",
22
- m ? "stacked-bar--separators" : ""
23
- ].filter(Boolean).join(" "),
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((e, t) => {
27
+ children: a.map((r, t) => {
26
28
  const l = k[t];
27
29
  if (l <= 0) return null;
28
- const _ = e.state || "default", u = e.pattern || "solid", f = j(e, l, b);
29
- return /* @__PURE__ */ s($, {
30
- title: f,
31
- children: /* @__PURE__ */ s("div", {
32
- className: [
33
- "stacked-bar__segment",
34
- `stacked-bar__segment--${_}`,
35
- `stacked-bar__segment--${u}`,
36
- r && u !== "solid" ? "stacked-bar__segment--animated" : ""
37
- ].filter(Boolean).join(" "),
38
- style: v ? { height: `${l}%` } : { width: `${l}%` },
39
- children: p && /* @__PURE__ */ s("span", {
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: f
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
- w as StackedBar
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 s, jsxs as d } from "react/jsx-runtime";
5
- var v = ({ items: t, dividers: l = !0, align: e = "left", size: r = "medium", className: i = "" }) => t.length === 0 ? null : /* @__PURE__ */ s("div", {
6
- className: [
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
- children: t.map((a, n) => /* @__PURE__ */ d("div", {
14
- className: "stats__item",
15
- children: [/* @__PURE__ */ s("span", {
16
- className: "stats__label",
17
- children: a.label
18
- }), /* @__PURE__ */ s("span", {
19
- className: `stats__value stats__value--${a.variant ?? "default"}`,
20
- children: a.value
21
- })]
22
- }, `${a.label}-${n}`))
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
- v as Stats
29
+ _ as Stats
26
30
  };
@@ -1,29 +1,33 @@
1
1
  import './StickyBar.css';
2
- import { Button as n } from "../Button/Button2.js";
2
+ import { Button as k } from "../Button/Button2.js";
3
3
  /* empty css */
4
4
  import "react";
5
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
6
- var u = ({ children: c, position: t = "bottom", align: s = "between", visible: l = !0, onClose: r, closeLabel: i = "Close", offset: a = 0, className: o }) => l ? /* @__PURE__ */ m("div", {
7
- className: [
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-${s}`,
11
- o
12
- ].filter(Boolean).join(" "),
13
- style: a ? { [t]: `${a}px` } : void 0,
14
- children: [/* @__PURE__ */ e("div", {
15
- className: "sticky-bar__content",
16
- children: c
17
- }), r && /* @__PURE__ */ e(n, {
18
- className: "sticky-bar__close",
19
- icon: "clear",
20
- onClick: r,
21
- size: "small",
22
- variant: "ghost",
23
- title: i,
24
- children: i
25
- })]
26
- }) : null;
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
- u as StickyBar
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 d = (l = "default") => `timeline__dot timeline__dot--${l}`, v = ({ items: l, orientation: m = "vertical", size: s = "md", connected: a = !0, animated: c = !0, className: r = "" }) => /* @__PURE__ */ i("ol", {
6
- className: [
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
- a ? "timeline--connected" : "",
9
+ `timeline--${m}`,
10
+ t ? "timeline--connected" : "",
11
11
  c ? "timeline--animated" : "",
12
12
  r
13
- ].filter(Boolean).join(" "),
14
- children: l.map((e, t) => /* @__PURE__ */ n("li", {
15
- className: [
16
- "timeline__item",
17
- e.active ? "timeline__item--active" : "",
18
- e.muted ? "timeline__item--muted" : ""
19
- ].filter(Boolean).join(" "),
20
- style: { "--item-index": t },
21
- children: [/* @__PURE__ */ n("div", {
22
- className: "timeline__node",
23
- children: [/* @__PURE__ */ i("div", {
24
- className: d(e.variant),
25
- children: e.icon ? /* @__PURE__ */ i("span", {
26
- className: "timeline__dot-icon",
27
- children: e.icon
28
- }) : null
29
- }), a && t < l.length - 1 && /* @__PURE__ */ i("div", { className: "timeline__connector" })]
30
- }), /* @__PURE__ */ n("div", {
31
- className: "timeline__content",
32
- children: [
33
- /* @__PURE__ */ n("div", {
34
- className: "timeline__header",
35
- children: [/* @__PURE__ */ i("span", {
36
- className: "timeline__title",
37
- children: e.title
38
- }), e.badge && /* @__PURE__ */ i("span", {
39
- className: `timeline__badge timeline__badge--${e.variant ?? "default"}`,
40
- children: e.badge
41
- })]
42
- }),
43
- e.description && /* @__PURE__ */ i("p", {
44
- className: "timeline__description",
45
- children: e.description
46
- }),
47
- e.timestamp && /* @__PURE__ */ i("time", {
48
- className: "timeline__timestamp",
49
- children: e.timestamp
50
- })
51
- ]
52
- })]
53
- }, e.id))
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
- v as Timeline
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 k, jsxs as D } from "react/jsx-runtime";
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: N = 200, children: _, disabled: $ = !1, className: F = "", maxWidth: p, maxHeight: a }) => {
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
- }, N));
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__ */ D(V, { children: [/* @__PURE__ */ k("span", {
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__ */ D("div", {
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__ */ k("div", { className: `tooltip__arrow tooltip__arrow--${T}` })]
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 u } from "../Icon/Icon2.js";
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 y = ({ label: l, stepLabel: n, index: r, total: i, title: s, note: d, 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 };
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: s
28
+ children: u
29
29
  }),
30
- d && /* @__PURE__ */ t("div", {
30
+ i && /* @__PURE__ */ t("div", {
31
31
  className: "tour-hud__note",
32
- children: d
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(u, {
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 >= i - 1,
51
+ disabled: r >= s - 1,
52
52
  onClick: c,
53
- children: ["Next", /* @__PURE__ */ t(u, {
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
- y as TourHud
69
+ j as TourHud
70
70
  };