@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.
- 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/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/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,11 +1,11 @@
|
|
|
1
1
|
import './AngleSlider.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { useCallback as c, useMemo as
|
|
3
|
+
import { useCallback as c, useMemo as L, useRef as A } from "react";
|
|
4
4
|
import { jsx as f, jsxs as m } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
6
|
-
x: o +
|
|
7
|
-
y: o -
|
|
8
|
-
}),
|
|
5
|
+
var y = 42, o = 50, U = 2 * Math.PI * y, D = 360, $ = (e) => e * Math.PI / 180, w = (e, d) => ({
|
|
6
|
+
x: o + d * Math.sin($(e)),
|
|
7
|
+
y: o - d * Math.cos($(e))
|
|
8
|
+
}), J = ({ disabled: e = !1, label: d, max: i = D, min: a = 0, onChange: u, size: j = 120, step: l = 1, tickStep: h = 45, keyboardStep: N, showValue: T = !0, value: p, variant: B = "accent" }) => {
|
|
9
9
|
const R = A(null), g = A(!1), P = Math.max(1, i - a), _ = c((r) => {
|
|
10
10
|
const n = l > 0 ? Math.round(r / l) * l : r;
|
|
11
11
|
return Math.min(i, Math.max(a, n));
|
|
@@ -33,7 +33,7 @@ var d = 42, o = 50, U = 2 * Math.PI * d, D = 360, $ = (e) => e * Math.PI / 180,
|
|
|
33
33
|
g.current && (r.currentTarget.releasePointerCapture(r.pointerId), g.current = !1);
|
|
34
34
|
}, []), X = c((r) => {
|
|
35
35
|
if (e) return;
|
|
36
|
-
const n =
|
|
36
|
+
const n = N ?? (l > 0 ? l : 1), t = r.key === "PageUp" ? n * 10 : r.key === "PageDown" ? -n * 10 : 0, s = r.key === "ArrowRight" || r.key === "ArrowUp" ? n : r.key === "ArrowLeft" || r.key === "ArrowDown" ? -n : 0;
|
|
37
37
|
if (r.key === "Home") {
|
|
38
38
|
r.preventDefault(), u(a);
|
|
39
39
|
return;
|
|
@@ -42,33 +42,33 @@ var d = 42, o = 50, U = 2 * Math.PI * d, D = 360, $ = (e) => e * Math.PI / 180,
|
|
|
42
42
|
r.preventDefault(), u(i);
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
|
-
t === 0 && s === 0 || (r.preventDefault(), u(_(
|
|
45
|
+
t === 0 && s === 0 || (r.preventDefault(), u(_(p + t + s)));
|
|
46
46
|
}, [
|
|
47
47
|
_,
|
|
48
48
|
e,
|
|
49
|
-
|
|
49
|
+
N,
|
|
50
50
|
i,
|
|
51
51
|
a,
|
|
52
52
|
u,
|
|
53
53
|
l,
|
|
54
|
-
|
|
55
|
-
]), Y =
|
|
56
|
-
if (!
|
|
54
|
+
p
|
|
55
|
+
]), Y = L(() => {
|
|
56
|
+
if (!h || h <= 0) return [];
|
|
57
57
|
const r = [];
|
|
58
|
-
for (let n = a; n < a + P; n +=
|
|
58
|
+
for (let n = a; n < a + P; n += h) r.push(n);
|
|
59
59
|
return r;
|
|
60
60
|
}, [
|
|
61
61
|
a,
|
|
62
62
|
P,
|
|
63
|
-
|
|
64
|
-
]), z = (Math.min(i, Math.max(a,
|
|
63
|
+
h
|
|
64
|
+
]), z = (Math.min(i, Math.max(a, p)) - a) / P, M = w(p, y), G = [
|
|
65
|
+
"angle-slider",
|
|
66
|
+
`angle-slider--${B}`,
|
|
67
|
+
e ? "angle-slider--disabled" : ""
|
|
68
|
+
].filter(Boolean).join(" "), H = { "--_angle-size": `${j}px` };
|
|
65
69
|
return /* @__PURE__ */ m("div", {
|
|
66
|
-
className:
|
|
67
|
-
|
|
68
|
-
`angle-slider--${B}`,
|
|
69
|
-
e ? "angle-slider--disabled" : ""
|
|
70
|
-
].filter(Boolean).join(" "),
|
|
71
|
-
style: { "--_angle-size": `${j}px` },
|
|
70
|
+
className: G,
|
|
71
|
+
style: H,
|
|
72
72
|
children: [
|
|
73
73
|
/* @__PURE__ */ m("svg", {
|
|
74
74
|
className: "angle-slider__dial",
|
|
@@ -84,10 +84,10 @@ var d = 42, o = 50, U = 2 * Math.PI * d, D = 360, $ = (e) => e * Math.PI / 180,
|
|
|
84
84
|
className: "angle-slider__track",
|
|
85
85
|
cx: o,
|
|
86
86
|
cy: o,
|
|
87
|
-
r:
|
|
87
|
+
r: y
|
|
88
88
|
}),
|
|
89
89
|
Y.map((r) => {
|
|
90
|
-
const n =
|
|
90
|
+
const n = w(r, y), t = w(r, 36);
|
|
91
91
|
return /* @__PURE__ */ f("line", {
|
|
92
92
|
className: "angle-slider__tick",
|
|
93
93
|
x1: t.x,
|
|
@@ -100,7 +100,7 @@ var d = 42, o = 50, U = 2 * Math.PI * d, D = 360, $ = (e) => e * Math.PI / 180,
|
|
|
100
100
|
className: "angle-slider__progress",
|
|
101
101
|
cx: o,
|
|
102
102
|
cy: o,
|
|
103
|
-
r:
|
|
103
|
+
r: y,
|
|
104
104
|
strokeDasharray: `${U * z} ${U}`,
|
|
105
105
|
transform: `rotate(-90 ${o} ${o})`
|
|
106
106
|
}),
|
|
@@ -121,15 +121,15 @@ var d = 42, o = 50, U = 2 * Math.PI * d, D = 360, $ = (e) => e * Math.PI / 180,
|
|
|
121
121
|
}),
|
|
122
122
|
T && /* @__PURE__ */ m("span", {
|
|
123
123
|
className: "angle-slider__value",
|
|
124
|
-
children: [Math.round(
|
|
124
|
+
children: [Math.round(p), "°"]
|
|
125
125
|
}),
|
|
126
|
-
|
|
126
|
+
d && /* @__PURE__ */ f("span", {
|
|
127
127
|
className: "angle-slider__label",
|
|
128
|
-
children:
|
|
128
|
+
children: d
|
|
129
129
|
})
|
|
130
130
|
]
|
|
131
131
|
});
|
|
132
132
|
};
|
|
133
133
|
export {
|
|
134
|
-
|
|
134
|
+
J as AngleSlider
|
|
135
135
|
};
|
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
import './AppHeader.css';
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { Separator as
|
|
2
|
+
import { Icon as h } from "../Icon/Icon2.js";
|
|
3
|
+
import { Separator as o } from "../Separator/Separator2.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import "react";
|
|
6
|
-
import { Fragment as
|
|
7
|
-
var
|
|
8
|
-
|
|
6
|
+
import { Fragment as t, jsx as a, jsxs as e } from "react/jsx-runtime";
|
|
7
|
+
var v = ({ emoji: r, icon: p, svg: s, appName: c, heading: n, onClick: d, className: l = "", showSeparator: m = !0 }) => {
|
|
8
|
+
const i = [
|
|
9
9
|
"app-header",
|
|
10
10
|
d ? "app-header--clickable" : "",
|
|
11
11
|
l
|
|
12
|
-
].filter(Boolean).join(" ")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
className: "app-
|
|
31
|
-
children: c
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
12
|
+
].filter(Boolean).join(" ");
|
|
13
|
+
return /* @__PURE__ */ e(t, { children: [/* @__PURE__ */ e("div", {
|
|
14
|
+
className: i,
|
|
15
|
+
onClick: d,
|
|
16
|
+
children: [
|
|
17
|
+
r && /* @__PURE__ */ a("span", {
|
|
18
|
+
className: "app-header__icon",
|
|
19
|
+
children: r
|
|
20
|
+
}),
|
|
21
|
+
s && /* @__PURE__ */ a("span", {
|
|
22
|
+
className: "app-header__icon",
|
|
23
|
+
children: s
|
|
24
|
+
}),
|
|
25
|
+
p && /* @__PURE__ */ a("span", {
|
|
26
|
+
className: "app-header__icon",
|
|
27
|
+
children: /* @__PURE__ */ a(h, { name: p })
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ e("div", {
|
|
30
|
+
className: "app-header__copy",
|
|
31
|
+
children: [c && /* @__PURE__ */ a("span", {
|
|
32
|
+
className: "app-header__app-name",
|
|
33
|
+
children: c
|
|
34
|
+
}), n && /* @__PURE__ */ a("span", {
|
|
35
|
+
className: "app-header__headline",
|
|
36
|
+
children: n
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}), m && /* @__PURE__ */ a(o, {
|
|
41
|
+
className: "app-header__separator",
|
|
42
|
+
spacing: 0
|
|
43
|
+
})] });
|
|
44
|
+
};
|
|
42
45
|
export {
|
|
43
|
-
|
|
46
|
+
v as AppHeader
|
|
44
47
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import './Blockquote.css';
|
|
2
|
-
import { Icon as
|
|
2
|
+
import { Icon as d } from "../Icon/Icon2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
6
|
-
const k = !!(l || o), q = r ?? (a === "pull" ? "center" : "left")
|
|
5
|
+
var g = ({ align: r, appearance: a = "bar", author: l, children: i, className: u = "", href: t, icon: s, showQuoteMark: n = !1, size: b = "md", source: o, variant: m = "default" }) => {
|
|
6
|
+
const k = !!(l || o), q = r ?? (a === "pull" ? "center" : "left"), _ = [
|
|
7
|
+
"blockquote",
|
|
8
|
+
`blockquote--${a}`,
|
|
9
|
+
`blockquote--${m}`,
|
|
10
|
+
`blockquote--${b}`,
|
|
11
|
+
`blockquote--align-${q}`,
|
|
12
|
+
n ? "blockquote--marked" : "",
|
|
13
|
+
u
|
|
14
|
+
].filter(Boolean).join(" ");
|
|
7
15
|
return /* @__PURE__ */ c("figure", {
|
|
8
|
-
className:
|
|
9
|
-
"blockquote",
|
|
10
|
-
`blockquote--${a}`,
|
|
11
|
-
`blockquote--${m}`,
|
|
12
|
-
`blockquote--${b}`,
|
|
13
|
-
`blockquote--align-${q}`,
|
|
14
|
-
n ? "blockquote--marked" : "",
|
|
15
|
-
u
|
|
16
|
-
].filter(Boolean).join(" "),
|
|
16
|
+
className: _,
|
|
17
17
|
children: [
|
|
18
18
|
n && /* @__PURE__ */ e("span", {
|
|
19
19
|
className: "blockquote__mark",
|
|
@@ -22,7 +22,7 @@ var p = ({ align: r, appearance: a = "bar", author: l, children: i, className: u
|
|
|
22
22
|
/* @__PURE__ */ c("blockquote", {
|
|
23
23
|
className: "blockquote__quote",
|
|
24
24
|
cite: t,
|
|
25
|
-
children: [s && /* @__PURE__ */ e(
|
|
25
|
+
children: [s && /* @__PURE__ */ e(d, {
|
|
26
26
|
className: "blockquote__icon",
|
|
27
27
|
name: s,
|
|
28
28
|
size: "sm"
|
|
@@ -51,5 +51,5 @@ var p = ({ align: r, appearance: a = "bar", author: l, children: i, className: u
|
|
|
51
51
|
});
|
|
52
52
|
};
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
g as Blockquote
|
|
55
55
|
};
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
import './BulkActionBar.css';
|
|
2
|
-
import { Button as
|
|
2
|
+
import { Button as o } from "../Button/Button2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "react";
|
|
5
|
-
import { jsx as e, jsxs as
|
|
6
|
-
var
|
|
7
|
-
|
|
5
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
6
|
+
var s = (i) => i.label ? `${i.label} ${i.done}/${i.total}` : `Running ${i.done}/${i.total}`, _ = ({ selectionCount: i, visible: n, label: d, progress: a, actions: r, onClear: t, clearLabel: b = "Clear", position: c = "bottom", className: u }) => {
|
|
7
|
+
if (!(n ?? i > 0)) return null;
|
|
8
|
+
const v = [
|
|
8
9
|
"memobit-bulk-action-bar",
|
|
9
10
|
`memobit-bulk-action-bar--${c}`,
|
|
10
11
|
u
|
|
11
|
-
].filter(Boolean).join(" "),
|
|
12
|
-
|
|
13
|
-
className:
|
|
14
|
-
children:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
l.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
12
|
+
].filter(Boolean).join(" "), k = a ? s(a) : d ?? `${i} selected`;
|
|
13
|
+
return /* @__PURE__ */ m("div", {
|
|
14
|
+
className: v,
|
|
15
|
+
children: [/* @__PURE__ */ e("div", {
|
|
16
|
+
className: "memobit-bulk-action-bar__label",
|
|
17
|
+
children: k
|
|
18
|
+
}), /* @__PURE__ */ m("div", {
|
|
19
|
+
className: "memobit-bulk-action-bar__actions",
|
|
20
|
+
children: [r.map((l) => /* @__PURE__ */ e(o, {
|
|
21
|
+
disabled: l.disabled,
|
|
22
|
+
icon: l.icon,
|
|
23
|
+
onClick: () => {
|
|
24
|
+
l.onClick();
|
|
25
|
+
},
|
|
26
|
+
size: "medium",
|
|
27
|
+
title: l.title,
|
|
28
|
+
variant: l.variant ?? "default",
|
|
29
|
+
children: l.label
|
|
30
|
+
}, l.key)), t && /* @__PURE__ */ e(o, {
|
|
31
|
+
disabled: a !== void 0,
|
|
32
|
+
icon: "clear",
|
|
33
|
+
onClick: t,
|
|
34
|
+
size: "medium",
|
|
35
|
+
variant: "ghost",
|
|
36
|
+
children: b
|
|
37
|
+
})]
|
|
34
38
|
})]
|
|
35
|
-
})
|
|
36
|
-
}
|
|
39
|
+
});
|
|
40
|
+
};
|
|
37
41
|
export {
|
|
38
|
-
|
|
42
|
+
_ as BulkActionBar
|
|
39
43
|
};
|
|
@@ -61,14 +61,16 @@ var d = 12, T = [
|
|
|
61
61
|
}, K = (e) => i === "range" && o ? e.getTime() > o.getTime() : !1, L = (e) => e.getMonth() === a.getMonth(), Q = (e) => {
|
|
62
62
|
if (!k(e)) {
|
|
63
63
|
if (i === "single") m?.(e);
|
|
64
|
-
else if (i === "range")
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
else if (i === "range")
|
|
65
|
+
if (!o)
|
|
66
|
+
Y ? Y(e) : (E(e), m?.(void 0));
|
|
67
|
+
else {
|
|
68
|
+
const t = x(e, o) ? e : o, l = x(e, o) ? o : e;
|
|
69
|
+
m?.({
|
|
70
|
+
start: t,
|
|
71
|
+
end: l
|
|
72
|
+
}), Y ? Y(null) : E(null);
|
|
73
|
+
}
|
|
72
74
|
else if (i === "multiple") {
|
|
73
75
|
const t = Array.isArray(r) ? r : [], l = t.findIndex((s) => _(s, e));
|
|
74
76
|
if (l >= 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.card{background:var(--card-background-color);-webkit-backdrop-filter:var(--card-backdrop-filter,none);border:var(--spacing-1) solid;border-color:var(--card-border-color);column-gap:var(--spacing-16);padding:var(--spacing-16);border-radius:var(--radius);color:var(--card-color);box-shadow:var(--card-surface-box-shadow,var(--card-box-shadow));flex-direction:column;display:flex;position:relative}.card:hover{border-color:var(--card-hover-border-color)}.card.no-padding{padding:0}.card.is-highlighted{background-color:var(--card-background-accent-color);border-left:var(--spacing-4) solid var(--card-border-accent-color);color:var(--card-accent-color)}.card.card-variant-success{border-left:var(--spacing-4) solid var(--rating-color-success);background-image:var(--card-tint-success-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-success) 14%, transparent) 0%, transparent 70%))}.card.card-variant-warning{border-left:var(--spacing-4) solid var(--rating-color-warning);background-image:var(--card-tint-warning-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-warning) 14%, transparent) 0%, transparent 70%))}.card.card-variant-danger{border-left:var(--spacing-4) solid var(--rating-color-danger);background-image:var(--card-tint-danger-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-danger) 14%, transparent) 0%, transparent 70%))}.card.card-variant-info{border-left:var(--spacing-4) solid var(--rating-color-info);background-image:var(--card-tint-info-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-info) 14%, transparent) 0%, transparent 70%))}.card.is-clickable:hover{cursor:pointer}.card h3{margin:0 0 var(--spacing-16) 0;color:var(--card-title-color,inherit);font-family:var(--card-title-font-family,var(--font-family,sans-serif));font-size:var(--card-title-font-size,var(--font-size-md));font-style:var(--card-title-font-style,normal);font-weight:var(--card-title-font-weight,var(--font-weight-bold));letter-spacing:var(--card-title-letter-spacing,normal);text-transform:var(--card-title-text-transform,none);column-gap:var(--spacing-16);flex-direction:row;justify-content:space-between;align-items:center;display:flex}.card h3 .card-title-content{align-items:center;gap:var(--spacing-8);min-width:0;display:inline-flex}.card h3.card-content-hidden{margin:0}.card h3 .opener-button:hover{cursor:pointer}.card h3 .opener-button svg{transition:transform .2s ease-in-out}.card h3 .opener-button.opener-button-extended svg{transform:rotate(180deg)}.card .card-content{height:fit-content;transition:all .5s}.card .card-content.card-content-collapsed{height:0;overflow:hidden}.card .card-footer{background-color:var(--card-footer-background-color);border-radius:0 0 var(--radius) var(--radius)}.card .card-footer.card-footer-collapsed{display:none}@media (width<=768px){.card{padding:var(--spacing-8)}}
|
|
1
|
+
.card{background:var(--card-background-color);-webkit-backdrop-filter:var(--card-backdrop-filter,none);border:var(--spacing-1) solid;border-color:var(--card-border-color);column-gap:var(--spacing-16);padding:var(--spacing-16);border-radius:var(--radius);color:var(--card-color);box-shadow:var(--card-surface-box-shadow,var(--card-box-shadow));transition:border-color var(--transition-slow);flex-direction:column;display:flex;position:relative}.card:hover{border-color:var(--card-hover-border-color)}.card:has(.card:hover){border-color:var(--card-border-color)}.card.no-padding{padding:0}.card.is-highlighted{background-color:var(--card-background-accent-color);border-left:var(--spacing-4) solid var(--card-border-accent-color);color:var(--card-accent-color)}.card.card-variant-success{border-left:var(--spacing-4) solid var(--rating-color-success);background-image:var(--card-tint-success-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-success) 14%, transparent) 0%, transparent 70%))}.card.card-variant-warning{border-left:var(--spacing-4) solid var(--rating-color-warning);background-image:var(--card-tint-warning-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-warning) 14%, transparent) 0%, transparent 70%))}.card.card-variant-danger{border-left:var(--spacing-4) solid var(--rating-color-danger);background-image:var(--card-tint-danger-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-danger) 14%, transparent) 0%, transparent 70%))}.card.card-variant-info{border-left:var(--spacing-4) solid var(--rating-color-info);background-image:var(--card-tint-info-background,radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--rating-color-info) 14%, transparent) 0%, transparent 70%))}.card.is-clickable:hover{cursor:pointer}.card h3{margin:0 0 var(--spacing-16) 0;color:var(--card-title-color,inherit);font-family:var(--card-title-font-family,var(--font-family,sans-serif));font-size:var(--card-title-font-size,var(--font-size-md));font-style:var(--card-title-font-style,normal);font-weight:var(--card-title-font-weight,var(--font-weight-bold));letter-spacing:var(--card-title-letter-spacing,normal);text-transform:var(--card-title-text-transform,none);column-gap:var(--spacing-16);flex-direction:row;justify-content:space-between;align-items:center;display:flex}.card h3 .card-title-content{align-items:center;gap:var(--spacing-8);min-width:0;display:inline-flex}.card h3.card-content-hidden{margin:0}.card h3 .opener-button:hover{cursor:pointer}.card h3 .opener-button svg{transition:transform .2s ease-in-out}.card h3 .opener-button.opener-button-extended svg{transform:rotate(180deg)}.card .card-content{height:fit-content;transition:all .5s}.card .card-content.card-content-collapsed{height:0;overflow:hidden}.card .card-footer{background-color:var(--card-footer-background-color);border-radius:0 0 var(--radius) var(--radius)}.card .card-footer.card-footer-collapsed{display:none}@media (width<=768px){.card{padding:var(--spacing-8)}}
|
|
@@ -100,10 +100,9 @@ var _ = [
|
|
|
100
100
|
break;
|
|
101
101
|
case "star":
|
|
102
102
|
U(t, 0, 0, a.size / 2);
|
|
103
|
-
break;
|
|
104
103
|
}
|
|
105
104
|
t.restore();
|
|
106
|
-
},
|
|
105
|
+
}, J = B(({ colors: t, duration: a = 3e3, scope: s = "fullscreen", variant: o = "confetti", particleCount: c }, P) => {
|
|
107
106
|
const h = v(null), f = v(0), d = v(0), M = v(!1), V = {
|
|
108
107
|
confetti: 150,
|
|
109
108
|
burst: 200,
|
|
@@ -171,5 +170,5 @@ var _ = [
|
|
|
171
170
|
});
|
|
172
171
|
});
|
|
173
172
|
export {
|
|
174
|
-
|
|
173
|
+
J as Confetti
|
|
175
174
|
};
|
|
@@ -40,18 +40,18 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
40
40
|
e.icon && /* @__PURE__ */ n(b, { name: e.icon }),
|
|
41
41
|
e.label
|
|
42
42
|
]
|
|
43
|
-
})
|
|
43
|
+
}), l = [
|
|
44
|
+
"control-panel__filter",
|
|
45
|
+
e.type === "checkbox" ? "control-panel__filter--checkbox" : "",
|
|
46
|
+
t ? "control-panel__filter--collapsible" : "",
|
|
47
|
+
t && !s ? "control-panel__filter--collapsed" : ""
|
|
48
|
+
].filter(Boolean).join(" ");
|
|
44
49
|
return /* @__PURE__ */ _("div", {
|
|
45
|
-
className:
|
|
46
|
-
"control-panel__filter",
|
|
47
|
-
e.type === "checkbox" ? "control-panel__filter--checkbox" : "",
|
|
48
|
-
t ? "control-panel__filter--collapsible" : "",
|
|
49
|
-
t && !s ? "control-panel__filter--collapsed" : ""
|
|
50
|
-
].filter(Boolean).join(" "),
|
|
50
|
+
className: l,
|
|
51
51
|
children: [t ? /* @__PURE__ */ _("button", {
|
|
52
52
|
className: "control-panel__filter-toggle",
|
|
53
53
|
type: "button",
|
|
54
|
-
onClick: () => d((
|
|
54
|
+
onClick: () => d((p) => !p),
|
|
55
55
|
children: [
|
|
56
56
|
i,
|
|
57
57
|
!s && a && /* @__PURE__ */ n("span", {
|
|
@@ -151,7 +151,7 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
151
151
|
})
|
|
152
152
|
});
|
|
153
153
|
if (e.type === "range") {
|
|
154
|
-
const a = Array.isArray(e.value) ? e.value : [], i = a[0], l = a[1],
|
|
154
|
+
const a = Array.isArray(e.value) ? e.value : [], i = a[0], l = a[1], p = i !== void 0 && l !== void 0 && i > l, m = (u, v) => r({
|
|
155
155
|
filterId: e.id,
|
|
156
156
|
type: e.type,
|
|
157
157
|
value: [u, v]
|
|
@@ -165,8 +165,8 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
165
165
|
step: e.step,
|
|
166
166
|
placeholder: "Min",
|
|
167
167
|
value: i,
|
|
168
|
-
error:
|
|
169
|
-
onChange: (u) =>
|
|
168
|
+
error: p ? "Min exceeds max" : void 0,
|
|
169
|
+
onChange: (u) => m(u, l)
|
|
170
170
|
}),
|
|
171
171
|
/* @__PURE__ */ n("span", {
|
|
172
172
|
className: "control-panel__filter-range-sep",
|
|
@@ -178,14 +178,14 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
178
178
|
step: e.step,
|
|
179
179
|
placeholder: "Max",
|
|
180
180
|
value: l,
|
|
181
|
-
error:
|
|
182
|
-
onChange: (u) =>
|
|
181
|
+
error: p ? "Max is below min" : void 0,
|
|
182
|
+
onChange: (u) => m(i, u)
|
|
183
183
|
})
|
|
184
184
|
]
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
if (e.type === "date-range") {
|
|
188
|
-
const a = Array.isArray(e.value) ? e.value : [], i = a[0] || void 0, l = a[1] || void 0,
|
|
188
|
+
const a = Array.isArray(e.value) ? e.value : [], i = a[0] || void 0, l = a[1] || void 0, p = e.presets ?? T, m = (c) => {
|
|
189
189
|
if (!c) return;
|
|
190
190
|
const [h, g, $] = c.split("-").map(Number);
|
|
191
191
|
return new Date(h, g - 1, $);
|
|
@@ -194,16 +194,16 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
194
194
|
type: e.type,
|
|
195
195
|
value: [c ?? "", h ?? ""]
|
|
196
196
|
}), y = (c) => {
|
|
197
|
-
const h = e.maxDate ?
|
|
197
|
+
const h = e.maxDate ? m(e.maxDate) : /* @__PURE__ */ new Date();
|
|
198
198
|
if (!h) return;
|
|
199
199
|
const g = new Date(h);
|
|
200
200
|
g.setDate(g.getDate() - c), v(u(g), u(h));
|
|
201
201
|
};
|
|
202
202
|
return /* @__PURE__ */ _("div", {
|
|
203
203
|
className: "control-panel__filter-date-range",
|
|
204
|
-
children: [
|
|
204
|
+
children: [p.length > 0 && /* @__PURE__ */ n("div", {
|
|
205
205
|
className: "control-panel__filter-date-presets",
|
|
206
|
-
children:
|
|
206
|
+
children: p.map((c) => /* @__PURE__ */ n(C, {
|
|
207
207
|
size: "small",
|
|
208
208
|
variant: "default",
|
|
209
209
|
onClick: () => y(c.days),
|
|
@@ -211,12 +211,12 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
211
211
|
}, c.days))
|
|
212
212
|
}), /* @__PURE__ */ n(R, {
|
|
213
213
|
mode: "range",
|
|
214
|
-
minDate:
|
|
215
|
-
maxDate:
|
|
214
|
+
minDate: m(e.minDate),
|
|
215
|
+
maxDate: m(e.maxDate),
|
|
216
216
|
placeholder: e.placeholder ?? "Select range",
|
|
217
217
|
value: i && l ? {
|
|
218
|
-
start:
|
|
219
|
-
end:
|
|
218
|
+
start: m(i),
|
|
219
|
+
end: m(l)
|
|
220
220
|
} : void 0,
|
|
221
221
|
onChange: (c) => {
|
|
222
222
|
if (c && typeof c == "object" && !Array.isArray(c) && "start" in c) {
|
|
@@ -306,15 +306,15 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
306
306
|
overflowY: "auto"
|
|
307
307
|
} : void 0,
|
|
308
308
|
children: i.map((l) => {
|
|
309
|
-
const
|
|
309
|
+
const p = o.includes(l.value), m = /* @__PURE__ */ _(S, {
|
|
310
310
|
color: l.color,
|
|
311
311
|
count: l.count,
|
|
312
312
|
disabled: l.disabled,
|
|
313
313
|
icon: l.icon,
|
|
314
|
-
selected:
|
|
314
|
+
selected: p,
|
|
315
315
|
onClick: () => {
|
|
316
316
|
if (l.disabled) return;
|
|
317
|
-
const u = e.multiple === !1, v = u ?
|
|
317
|
+
const u = e.multiple === !1, v = u ? p ? [] : [l.value] : p ? o.filter((y) => y !== l.value) : [...o, l.value];
|
|
318
318
|
r({
|
|
319
319
|
filterId: e.id,
|
|
320
320
|
type: e.type,
|
|
@@ -331,8 +331,8 @@ var H = 3, f = (e) => Array.isArray(e) ? e : e == null || typeof e == "boolean"
|
|
|
331
331
|
});
|
|
332
332
|
return l.tooltip ? /* @__PURE__ */ n(k, {
|
|
333
333
|
title: l.tooltip,
|
|
334
|
-
children:
|
|
335
|
-
}, l.value) : /* @__PURE__ */ n(P, { children:
|
|
334
|
+
children: m
|
|
335
|
+
}, l.value) : /* @__PURE__ */ n(P, { children: m }, l.value);
|
|
336
336
|
})
|
|
337
337
|
})]
|
|
338
338
|
});
|
|
@@ -31,10 +31,14 @@ var la = [
|
|
|
31
31
|
}) : n;
|
|
32
32
|
};
|
|
33
33
|
function _a({ data: t, columns: l, rowKey: h, card: n, actions: g, timeline: o, onRowClick: _, rowHref: j, rowClassName: D, empty: r, selectable: w, selectedIds: V = [], pinnedIds: $, onToggleSelect: p, cardMaxWidth: C, isMobile: G = !1, groups: I, showGroupCount: T = !0, collapsible: N = !1, collapsedGroups: U, onToggleGroup: Z }) {
|
|
34
|
-
const P = l.filter((e) => !e.hideInCard && !(G && e.hideInMobile)), q = M(() => new Set($ ?? []), [$]), S = `data-view__cards${C !== void 0 ? " data-view__cards--grid" : ""}`, A = C !== void 0 ? { "--data-view-card-max-width": W(C) } : void 0, B = M(() =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const P = l.filter((e) => !e.hideInCard && !(G && e.hideInMobile)), q = M(() => new Set($ ?? []), [$]), S = `data-view__cards${C !== void 0 ? " data-view__cards--grid" : ""}`, A = C !== void 0 ? { "--data-view-card-max-width": W(C) } : void 0, B = M(() => {
|
|
35
|
+
if (!o) return /* @__PURE__ */ new Map();
|
|
36
|
+
const e = t.map((s) => ({
|
|
37
|
+
id: o.idAccessor(s),
|
|
38
|
+
date: o.dateAccessor(s)
|
|
39
|
+
}));
|
|
40
|
+
return X(e, o.granularity);
|
|
41
|
+
}, [t, o]);
|
|
38
42
|
if (t.length === 0)
|
|
39
43
|
return r ? /* @__PURE__ */ a(L, {
|
|
40
44
|
title: r.title,
|
|
@@ -2,46 +2,49 @@ import { Icon as h } from "../Icon/Icon2.js";
|
|
|
2
2
|
import { Button as b } from "../Button/Button2.js";
|
|
3
3
|
import { Checkbox as p } from "../Checkbox/Checkbox2.js";
|
|
4
4
|
import { Popover as v } from "../Popover/Popover2.js";
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { jsx as l, jsxs as
|
|
7
|
-
function j({ config:
|
|
8
|
-
const { options:
|
|
9
|
-
if (
|
|
10
|
-
const
|
|
5
|
+
import { useRef as C, useState as _ } from "react";
|
|
6
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
function j({ config: m }) {
|
|
8
|
+
const { options: r, selectedKeys: t, onChange: c, label: u = "Columns" } = m, a = C(null), [d, i] = _(!1);
|
|
9
|
+
if (r.length === 0) return null;
|
|
10
|
+
const f = (e, n) => {
|
|
11
11
|
if (n) {
|
|
12
12
|
if (t.includes(e)) return;
|
|
13
|
-
|
|
14
|
-
} else
|
|
13
|
+
c([...t, e]);
|
|
14
|
+
} else c(t.filter((o) => o !== e));
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ s("div", {
|
|
17
17
|
className: "data-view__column-selector",
|
|
18
18
|
children: [/* @__PURE__ */ l(b, {
|
|
19
19
|
ref: a,
|
|
20
20
|
variant: "ghost",
|
|
21
21
|
size: "small",
|
|
22
22
|
icon: "table",
|
|
23
|
-
onClick: () =>
|
|
24
|
-
children: /* @__PURE__ */
|
|
23
|
+
onClick: () => i((e) => !e),
|
|
24
|
+
children: /* @__PURE__ */ s("span", {
|
|
25
25
|
className: "data-view__column-selector-label",
|
|
26
|
-
children: [
|
|
26
|
+
children: [u, /* @__PURE__ */ l(h, {
|
|
27
27
|
name: "caret-down",
|
|
28
28
|
size: "sm"
|
|
29
29
|
})]
|
|
30
30
|
})
|
|
31
31
|
}), /* @__PURE__ */ l(v, {
|
|
32
|
-
visible:
|
|
33
|
-
onClose: () =>
|
|
32
|
+
visible: d,
|
|
33
|
+
onClose: () => i(!1),
|
|
34
34
|
anchorEl: a.current,
|
|
35
35
|
placement: "bottom",
|
|
36
36
|
children: /* @__PURE__ */ l("div", {
|
|
37
37
|
className: "data-view__column-selector-list",
|
|
38
|
-
children:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
children: r.map((e) => {
|
|
39
|
+
const n = t.includes(e.key);
|
|
40
|
+
return /* @__PURE__ */ s("label", {
|
|
41
|
+
className: "data-view__column-selector-item",
|
|
42
|
+
children: [/* @__PURE__ */ l(p, {
|
|
43
|
+
checked: n,
|
|
44
|
+
onChange: (o) => f(e.key, o)
|
|
45
|
+
}), /* @__PURE__ */ l("span", { children: e.label })]
|
|
46
|
+
}, e.key);
|
|
47
|
+
})
|
|
45
48
|
})
|
|
46
49
|
})]
|
|
47
50
|
});
|