@plitzi/plitzi-ui 1.6.17 → 1.6.19
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/Accordion/helpers/AccordionManager.js +2 -1
- package/dist/components/Cache/CacheProvider.js +7 -4
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/CodeMirror/CodeMirror.js +21 -21
- package/dist/components/ContainerDraggable/ContainerDraggable.js +9 -9
- package/dist/components/ContainerFloating/ContainerFloating.js +15 -15
- package/dist/components/ContainerResizable/ContainerResizable.js +1 -1
- package/dist/components/ContainerShadow/ContainerShadowStyle.js +8 -5
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/FileUpload/components/DrawTypes/DrawTypes.js +16 -13
- package/dist/components/FileUpload/components/FileUploadMessage/FileUploadMessage.js +24 -21
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/KVInput/KVInput.js +2 -2
- package/dist/components/MenuList/MenuList.js +14 -12
- package/dist/components/MenuList/MenuListContainer.js +8 -6
- package/dist/components/MetricInput/MetricInput.js +1 -4
- package/dist/components/Modal/ModalProvider.js +5 -5
- package/dist/components/Popup/PopupProvider.js +61 -61
- package/dist/components/Provider/providers/ThemeProvider/ThemeProvider.js +12 -12
- package/dist/components/QueryBuilder/QueryBuilderProvider.js +30 -30
- package/dist/components/QueryBuilder/RuleValue.js +7 -1
- package/dist/components/QueryBuilder/helpers/QueryBuilderEvaluator.js +1 -5
- package/dist/components/Sidebar/SidebarProvider.js +7 -4
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/TextArea/TextArea.js +2 -2
- package/dist/components/Toast/ToastProvider.js +2 -2
- package/dist/helpers/formatDate.js +5 -1
- package/dist/helpers/lodash/throttle.js +3 -2
- package/dist/hooks/useStorage/useStorageHelper.js +1 -1
- package/dist/plitzi-ui.css +1 -1
- package/package.json +26 -26
|
@@ -2,9 +2,12 @@ import e from "./CacheContext.js";
|
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Cache/CacheProvider.tsx
|
|
5
|
-
var r = ({ children: r, cacheId: i = "" }) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
var r = ({ children: r, cacheId: i = "" }) => {
|
|
6
|
+
let a = t(() => ({ cacheId: i }), [i]);
|
|
7
|
+
return /* @__PURE__ */ n(e, {
|
|
8
|
+
value: a,
|
|
9
|
+
children: r
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
//#endregion
|
|
10
13
|
export { r as default };
|
|
@@ -21,9 +21,9 @@ var s = r(({ ref: r, children: s, id: c, loading: l = !1, disabled: u = !1, clas
|
|
|
21
21
|
disabled: u,
|
|
22
22
|
error: !!p
|
|
23
23
|
}
|
|
24
|
-
});
|
|
24
|
+
}), y = i(() => e(v, ["input"]), [v]);
|
|
25
25
|
return /* @__PURE__ */ o(n, {
|
|
26
|
-
className:
|
|
26
|
+
className: y,
|
|
27
27
|
id: c,
|
|
28
28
|
label: f,
|
|
29
29
|
error: p,
|
|
@@ -102,22 +102,22 @@ var _ = [], v = ({ ref: v, className: y, id: b, label: x = "", loading: S = !1,
|
|
|
102
102
|
e = !1;
|
|
103
103
|
};
|
|
104
104
|
}, [D, J]);
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
let Z = o(() => {
|
|
106
|
+
let e = [
|
|
107
|
+
K(),
|
|
108
|
+
g.of([{
|
|
109
|
+
key: "Tab",
|
|
110
|
+
run: u
|
|
111
|
+
}]),
|
|
112
|
+
g.of([f])
|
|
113
|
+
];
|
|
114
|
+
return Y && e.push(...Y), M && e.push(h.lineWrapping), e;
|
|
115
|
+
}, [
|
|
116
|
+
K,
|
|
117
|
+
M,
|
|
118
|
+
Y
|
|
119
|
+
]), { editorRef: Q } = r({
|
|
120
|
+
extensions: Z,
|
|
121
121
|
theme: O,
|
|
122
122
|
style: W,
|
|
123
123
|
basicSetup: U,
|
|
@@ -127,9 +127,9 @@ var _ = [], v = ({ ref: v, className: y, id: b, label: x = "", loading: S = !1,
|
|
|
127
127
|
value: T,
|
|
128
128
|
onChange: A,
|
|
129
129
|
ref: v
|
|
130
|
-
}),
|
|
130
|
+
}), $ = i((e) => {
|
|
131
131
|
e.stopPropagation();
|
|
132
|
-
}, []);
|
|
132
|
+
}, []), ee = i(() => A?.(""), [A]);
|
|
133
133
|
return /* @__PURE__ */ l(n, {
|
|
134
134
|
className: H,
|
|
135
135
|
id: b,
|
|
@@ -141,11 +141,11 @@ var _ = [], v = ({ ref: v, className: y, id: b, label: x = "", loading: S = !1,
|
|
|
141
141
|
loading: S,
|
|
142
142
|
clearable: w,
|
|
143
143
|
value: T,
|
|
144
|
-
onClear:
|
|
144
|
+
onClear: ee,
|
|
145
145
|
children: /* @__PURE__ */ l("div", {
|
|
146
146
|
className: V.input,
|
|
147
|
-
ref:
|
|
148
|
-
onKeyDown:
|
|
147
|
+
ref: Q,
|
|
148
|
+
onKeyDown: $,
|
|
149
149
|
onBlur: j
|
|
150
150
|
})
|
|
151
151
|
});
|
|
@@ -20,14 +20,14 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
|
|
|
20
20
|
}), se = c(void 0), M = c(void 0), N = c(!1), P = c(m), F = c(h), [I, L] = l(!1), [R, z] = l(m), [B, V] = l(h), [H, U] = l(0), [W, G] = l(0), [ce, K] = l(!1), [le] = l(g), [ue] = l(_ - v), [q, de] = l({
|
|
21
21
|
width: 0,
|
|
22
22
|
height: 0
|
|
23
|
-
}), J = o(() => !C?.current && typeof document < "u" ? document.body : C?.current, [C]), fe =
|
|
23
|
+
}), J = o(() => !C?.current && typeof document < "u" ? document.body : C?.current, [C]), fe = o(() => {
|
|
24
24
|
if (!N.current) {
|
|
25
25
|
let e = M.current.getBoundingClientRect(), t = P.current, n = F.current;
|
|
26
26
|
e.x + e.width > window.innerWidth ? t = window.innerWidth - e.width : e.x < 0 && (t = 0), e.y + e.height > window.innerHeight ? n = window.innerHeight - e.height : e.y < 0 && (n = 0), (P.current !== t || F.current !== n) && (P.current = t, F.current = n, z(t), V(n));
|
|
27
27
|
}
|
|
28
|
-
}, []), 250));
|
|
28
|
+
}, []), pe = c(e(fe, 250));
|
|
29
29
|
s(() => {
|
|
30
|
-
let e =
|
|
30
|
+
let e = pe.current;
|
|
31
31
|
return window.addEventListener("resize", e), () => {
|
|
32
32
|
N.current = !0, window.removeEventListener("resize", e);
|
|
33
33
|
};
|
|
@@ -52,7 +52,7 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
|
|
|
52
52
|
s(() => (I && (window.addEventListener("mousemove", Y, !1), window.addEventListener("mouseup", X, !1), window.addEventListener("touchmove", Z, !1), window.addEventListener("touchend", Q, !1)), () => {
|
|
53
53
|
I && (window.removeEventListener("mousemove", Y, !1), window.removeEventListener("mouseup", X, !1), window.removeEventListener("touchmove", Z, !1), window.removeEventListener("touchend", Q, !1));
|
|
54
54
|
}), [I, q]);
|
|
55
|
-
let
|
|
55
|
+
let me = (e) => {
|
|
56
56
|
let t;
|
|
57
57
|
p === "parent" ? (M.current.parentNode || (t = {
|
|
58
58
|
height: window.innerHeight,
|
|
@@ -61,7 +61,7 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
|
|
|
61
61
|
height: window.innerHeight,
|
|
62
62
|
width: window.innerWidth
|
|
63
63
|
}, e.button === 0 ? (J()?.classList.add("moving"), L(!0), de(t), U(e.clientX), G(e.clientY), D?.(e)) : (L(!1), z(P.current), V(F.current));
|
|
64
|
-
},
|
|
64
|
+
}, he = () => K((e) => !e), Z = o((e) => {
|
|
65
65
|
if (e.stopPropagation(), e.changedTouches.length > 1 && e.preventDefault(), I) {
|
|
66
66
|
let t = M.current.getBoundingClientRect(), { clientX: n, clientY: r } = e.touches[0], i = R + n - H, a = B + r - W;
|
|
67
67
|
i + t.width > window.innerWidth ? i = window.innerWidth - t.width : i < 0 && (i = 0), a + t.height > window.innerHeight ? a = window.innerHeight - t.height : a < 0 && (a = 0), P.current = i, F.current = a, M.current.style.left = `${i}px`, M.current.style.top = `${a}px`;
|
|
@@ -74,11 +74,11 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
|
|
|
74
74
|
B
|
|
75
75
|
]), Q = o(() => {
|
|
76
76
|
L(!1), z(P.current), V(F.current);
|
|
77
|
-
}, []),
|
|
77
|
+
}, []), ge = o((e) => {
|
|
78
78
|
e.stopPropagation(), L(!0), U(e.touches[0].clientX), G(e.touches[0].clientY), D?.(e);
|
|
79
79
|
}, [D]);
|
|
80
80
|
if (ce) return /* @__PURE__ */ u(r, {
|
|
81
|
-
onClose:
|
|
81
|
+
onClose: he,
|
|
82
82
|
width: g,
|
|
83
83
|
height: _ - v,
|
|
84
84
|
top: F.current,
|
|
@@ -119,8 +119,8 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
|
|
|
119
119
|
setExternalWindow: K,
|
|
120
120
|
onClose: E,
|
|
121
121
|
onCollapse: O,
|
|
122
|
-
onMouseDown:
|
|
123
|
-
onTouchStart:
|
|
122
|
+
onMouseDown: me,
|
|
123
|
+
onTouchStart: ge
|
|
124
124
|
}), /* @__PURE__ */ u(i, {
|
|
125
125
|
ref: se,
|
|
126
126
|
parentRef: C,
|
|
@@ -49,23 +49,23 @@ var m = ({ ref: m, children: h, containerTopOffset: g = 0, containerLeftOffset:
|
|
|
49
49
|
C,
|
|
50
50
|
A,
|
|
51
51
|
j
|
|
52
|
+
]), P = l(() => ({
|
|
53
|
+
placement: C,
|
|
54
|
+
triggerRef: A,
|
|
55
|
+
container: w,
|
|
56
|
+
containerTopOffset: g,
|
|
57
|
+
containerLeftOffset: _,
|
|
58
|
+
setOpen: O
|
|
59
|
+
}), [
|
|
60
|
+
C,
|
|
61
|
+
A,
|
|
62
|
+
w,
|
|
63
|
+
g,
|
|
64
|
+
_,
|
|
65
|
+
O
|
|
52
66
|
]);
|
|
53
67
|
return /* @__PURE__ */ p(d, { children: [M, /* @__PURE__ */ f(e, {
|
|
54
|
-
value:
|
|
55
|
-
placement: C,
|
|
56
|
-
triggerRef: A,
|
|
57
|
-
container: w,
|
|
58
|
-
containerTopOffset: g,
|
|
59
|
-
containerLeftOffset: _,
|
|
60
|
-
setOpen: O
|
|
61
|
-
}), [
|
|
62
|
-
C,
|
|
63
|
-
A,
|
|
64
|
-
w,
|
|
65
|
-
g,
|
|
66
|
-
_,
|
|
67
|
-
O
|
|
68
|
-
]),
|
|
68
|
+
value: P,
|
|
69
69
|
children: /* @__PURE__ */ f(t, {
|
|
70
70
|
ref: E,
|
|
71
71
|
open: D,
|
|
@@ -37,7 +37,7 @@ var f = ["se"], p = ({ ref: p, className: m, parentRef: h, hoverMode: g = !1, au
|
|
|
37
37
|
let t = e.clientX, n = e.clientY, i = (t - L) / S, a = (n - U) / S, o = (C === "both" || C === "x") && ["n", "s"].indexOf(z ?? "") === -1, s = (C === "both" || C === "y") && ["e", "w"].indexOf(z ?? "") === -1, c = z?.includes("w") || z?.includes("n");
|
|
38
38
|
if (Array.isArray(b) && ([i, a] = r(i, a, b), !i && !a)) return;
|
|
39
39
|
let l = V + (o ? i : 0), u = H + (s ? a : 0);
|
|
40
|
-
c && (l = V - (o ? i : 0), u = H - (s ? a : 0)),
|
|
40
|
+
c && (l = V - (o ? i : 0), u = H - (s ? a : 0)), (l !== V || u !== H) && ([l, u] = J(l, u, c), K?.(l, u), V !== Infinity && G.current && (G.current.style.width = `${l}px`), H !== Infinity && G.current && (G.current.style.height = `${u}px`));
|
|
41
41
|
}, [
|
|
42
42
|
C,
|
|
43
43
|
L,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { useRef as e } from "react";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/ContainerShadow/ContainerShadowStyle.tsx
|
|
4
|
-
var n = ({ children: n, ...r }) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
var n = ({ children: n, ...r }) => {
|
|
5
|
+
let i = e(null);
|
|
6
|
+
return /* @__PURE__ */ t("style", {
|
|
7
|
+
ref: i,
|
|
8
|
+
...r,
|
|
9
|
+
children: n
|
|
10
|
+
});
|
|
11
|
+
};
|
|
9
12
|
//#endregion
|
|
10
13
|
export { n as default };
|
|
@@ -6,24 +6,27 @@ var r = [
|
|
|
6
6
|
"jpeg",
|
|
7
7
|
"jpg",
|
|
8
8
|
"png"
|
|
9
|
-
], i = ({ className: i = "", minSize: a = 0, maxSize: o = Infinity, types: s = r }) =>
|
|
10
|
-
|
|
9
|
+
], i = ({ className: i = "", minSize: a = 0, maxSize: o = Infinity, types: s = r }) => {
|
|
10
|
+
let c = t(() => {
|
|
11
11
|
let t = [];
|
|
12
12
|
return o && t.push(`Max size: ${e(o)}`), a && t.push(`Min size: ${e(a)}`), t.push(`types: ${s.join(", ")}`), t.join(" | ");
|
|
13
13
|
}, [
|
|
14
14
|
o,
|
|
15
15
|
a,
|
|
16
16
|
s
|
|
17
|
-
])
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className:
|
|
21
|
-
children: [
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
]);
|
|
18
|
+
return /* @__PURE__ */ n("div", {
|
|
19
|
+
title: c,
|
|
20
|
+
className: i,
|
|
21
|
+
children: [s.join(", "), o && o !== Infinity && /* @__PURE__ */ n("span", {
|
|
22
|
+
className: "inline-block uppercase mx-1 text-inherit",
|
|
23
|
+
children: [
|
|
24
|
+
"(",
|
|
25
|
+
e(o),
|
|
26
|
+
")"
|
|
27
|
+
]
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
};
|
|
28
31
|
//#endregion
|
|
29
32
|
export { i as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import e from "../../../../hooks/useTheme/index.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/FileUpload/components/FileUploadMessage/FileUploadMessage.tsx
|
|
4
|
-
var r = ({ className: r = "", label: i = "", hasFiles: a = !1, disabled: o = !1, error: s, intent: c, size: l, canDragAndDrop: u }) =>
|
|
5
|
-
|
|
4
|
+
var r = ({ className: r = "", label: i = "", hasFiles: a = !1, disabled: o = !1, error: s, intent: c, size: l, canDragAndDrop: u }) => {
|
|
5
|
+
let d = e("FileUpload", {
|
|
6
6
|
className: r,
|
|
7
7
|
componentKey: ["label"],
|
|
8
8
|
variants: {
|
|
@@ -12,25 +12,28 @@ var r = ({ className: r = "", label: i = "", hasFiles: a = !1, disabled: o = !1,
|
|
|
12
12
|
disabled: o,
|
|
13
13
|
canDragAndDrop: u
|
|
14
14
|
}
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}),
|
|
21
|
-
/* @__PURE__ */ n("span", {
|
|
22
|
-
className: "text-inherit",
|
|
23
|
-
children: [/* @__PURE__ */ t("span", {
|
|
24
|
-
className: "font-bold underline text-inherit",
|
|
25
|
-
children: "Click to Upload"
|
|
26
|
-
}), /* @__PURE__ */ t("span", {
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ n("div", {
|
|
17
|
+
className: d.label,
|
|
18
|
+
children: [
|
|
19
|
+
i && /* @__PURE__ */ t("span", {
|
|
27
20
|
className: "text-inherit",
|
|
28
|
-
children:
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
children: i
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ n("span", {
|
|
24
|
+
className: "text-inherit",
|
|
25
|
+
children: [/* @__PURE__ */ t("span", {
|
|
26
|
+
className: "font-bold underline text-inherit",
|
|
27
|
+
children: "Click to Upload"
|
|
28
|
+
}), /* @__PURE__ */ t("span", {
|
|
29
|
+
className: "text-inherit",
|
|
30
|
+
children: " or drop a file here"
|
|
31
|
+
})]
|
|
32
|
+
}),
|
|
33
|
+
a && /* @__PURE__ */ t("span", { children: "Added Successfully!. Add another?" }),
|
|
34
|
+
s && /* @__PURE__ */ t("span", { children: typeof s == "boolean" ? "This field is invalid" : s })
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
};
|
|
35
38
|
//#endregion
|
|
36
39
|
export { r as default };
|
|
@@ -14,7 +14,7 @@ var s = Object.assign(r(({ ref: t, children: r, className: s = "", id: c, label:
|
|
|
14
14
|
error: !!b,
|
|
15
15
|
inline: m
|
|
16
16
|
}
|
|
17
|
-
}), T = i((e) => S?.(e.target.value), [S]);
|
|
17
|
+
}), T = i((e) => S?.(e.target.value), [S]), E = i(() => S?.(""), [S]);
|
|
18
18
|
return /* @__PURE__ */ o(n, {
|
|
19
19
|
className: s,
|
|
20
20
|
id: c,
|
|
@@ -27,7 +27,7 @@ var s = Object.assign(r(({ ref: t, children: r, className: s = "", id: c, label:
|
|
|
27
27
|
error: b,
|
|
28
28
|
intent: v,
|
|
29
29
|
size: _,
|
|
30
|
-
onClear:
|
|
30
|
+
onClear: E,
|
|
31
31
|
...x,
|
|
32
32
|
children: [r, /* @__PURE__ */ a("input", {
|
|
33
33
|
ref: t,
|
|
@@ -27,8 +27,8 @@ var u = ({ className: u, id: d, size: f, value: p, disabled: m = !1, label: h, e
|
|
|
27
27
|
w
|
|
28
28
|
]), O = o((e) => {
|
|
29
29
|
if (!b) return;
|
|
30
|
-
let t = E.filter((t, n) => n !== e), r =
|
|
31
|
-
w?.(t,
|
|
30
|
+
let t = E.filter((t, n) => n !== e), r = t.map(([e, t]) => [...e.split("."), t]), i = n(r);
|
|
31
|
+
w?.(t, i);
|
|
32
32
|
}, [
|
|
33
33
|
E,
|
|
34
34
|
b,
|
|
@@ -42,21 +42,23 @@ var v = ({ ref: e, className: r, children: v, open: y, disabled: b = !1, testId:
|
|
|
42
42
|
A,
|
|
43
43
|
x
|
|
44
44
|
]);
|
|
45
|
-
|
|
45
|
+
u(() => {
|
|
46
46
|
if (T) return document.addEventListener("mousedown", k), () => {
|
|
47
47
|
document.removeEventListener("mousedown", k);
|
|
48
48
|
};
|
|
49
|
-
}, [k, T])
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
}, [k, T]);
|
|
50
|
+
let N = f(() => ({
|
|
51
|
+
open: T,
|
|
52
|
+
placement: S,
|
|
53
|
+
triggerRef: D,
|
|
54
|
+
container: C
|
|
55
|
+
}), [
|
|
56
|
+
T,
|
|
57
|
+
S,
|
|
58
|
+
C
|
|
59
|
+
]);
|
|
60
|
+
return /* @__PURE__ */ _(h, { children: [j, /* @__PURE__ */ g(t, {
|
|
61
|
+
value: N,
|
|
60
62
|
children: /* @__PURE__ */ g(n, {
|
|
61
63
|
open: T,
|
|
62
64
|
className: r,
|
|
@@ -39,18 +39,20 @@ var d = ({ className: d, children: f, open: p = !1, asSubMenu: m = !1 }) => {
|
|
|
39
39
|
_,
|
|
40
40
|
m
|
|
41
41
|
]), T = r(() => p && w(), [p, w]);
|
|
42
|
-
|
|
42
|
+
i(() => {
|
|
43
43
|
if (p) return document.addEventListener("scroll", T, !0), window.addEventListener("resize", T), () => {
|
|
44
44
|
document.removeEventListener("scroll", T, !0), window.removeEventListener("resize", T);
|
|
45
45
|
};
|
|
46
46
|
}, [p, T]), i(() => {
|
|
47
47
|
p && w();
|
|
48
|
-
}, [p, w])
|
|
48
|
+
}, [p, w]);
|
|
49
|
+
let E = a(() => ({
|
|
50
|
+
top: S.top,
|
|
51
|
+
left: S.left
|
|
52
|
+
}), [S]);
|
|
53
|
+
return u(/* @__PURE__ */ c("div", {
|
|
49
54
|
ref: y,
|
|
50
|
-
style:
|
|
51
|
-
top: S.top,
|
|
52
|
-
left: S.left
|
|
53
|
-
}), [S]),
|
|
55
|
+
style: E,
|
|
54
56
|
className: l("menu", d, {
|
|
55
57
|
"opacity-0 pointer-events-none": S.top === void 0 || S.left === void 0 || !p,
|
|
56
58
|
"-translate-x-full": m && (b === "top-right" || b === "bottom-right")
|
|
@@ -101,10 +101,7 @@ var _ = ({ ref: _, children: v, className: y = "", placeholder: b = "", loading:
|
|
|
101
101
|
case "ArrowUp":
|
|
102
102
|
(t + M <= P || P === Infinity) && (t = Number((t + M).toFixed(r(M))));
|
|
103
103
|
break;
|
|
104
|
-
case "ArrowDown":
|
|
105
|
-
(t - M >= N || N === Infinity) && (t = Number((t - M).toFixed(r(M))));
|
|
106
|
-
break;
|
|
107
|
-
default:
|
|
104
|
+
case "ArrowDown": (t - M >= N || N === Infinity) && (t = Number((t - M).toFixed(r(M))));
|
|
108
105
|
}
|
|
109
106
|
Number.isNaN(t) && (t = N), H !== `${t}` && F?.(U ? `${t}${U}` : `${t}${R[0].value}`);
|
|
110
107
|
}, [
|
|
@@ -57,12 +57,12 @@ var l = ({ children: l }) => {
|
|
|
57
57
|
size: a?.size,
|
|
58
58
|
children: "Cancel"
|
|
59
59
|
})]
|
|
60
|
-
}), p(e, r, i, a)), [p])
|
|
60
|
+
}), p(e, r, i, a)), [p]), h = a(() => ({
|
|
61
|
+
showModal: p,
|
|
62
|
+
showDialog: m
|
|
63
|
+
}), [p, m]);
|
|
61
64
|
return /* @__PURE__ */ c(r, {
|
|
62
|
-
value:
|
|
63
|
-
showModal: p,
|
|
64
|
-
showDialog: m
|
|
65
|
-
}), [p, m]),
|
|
65
|
+
value: h,
|
|
66
66
|
children: [l, Object.values(u).map((e, t) => /* @__PURE__ */ s(n, { ...e }, e?.id ?? t))]
|
|
67
67
|
});
|
|
68
68
|
};
|
|
@@ -27,70 +27,70 @@ var h = ({ children: h, floatingClassName: g = "h-screen w-screen", floatingFixe
|
|
|
27
27
|
});
|
|
28
28
|
}, [F]), R = s((e) => {
|
|
29
29
|
F.getPlacement(e) && F.remove(e);
|
|
30
|
-
}, [F]), z = s((e) => F.exists(e), [F])
|
|
30
|
+
}, [F]), z = s((e) => F.exists(e), [F]), B = l(() => ({
|
|
31
|
+
popupManager: F,
|
|
32
|
+
multi: x,
|
|
33
|
+
multiExpanded: S,
|
|
34
|
+
popups: F.get("floating"),
|
|
35
|
+
popupIds: F.get("floating").map((e) => e.id),
|
|
36
|
+
popupActiveIds: F.get("floating").filter((e) => e.active).map((e) => e.id),
|
|
37
|
+
limitMode: T,
|
|
38
|
+
addPopup: L,
|
|
39
|
+
existsPopup: z,
|
|
40
|
+
removePopup: R
|
|
41
|
+
}), [
|
|
42
|
+
L,
|
|
43
|
+
z,
|
|
44
|
+
R,
|
|
45
|
+
T,
|
|
46
|
+
x,
|
|
47
|
+
S,
|
|
48
|
+
F.lastUpdate.floating
|
|
49
|
+
]), V = l(() => ({
|
|
50
|
+
popupManager: F,
|
|
51
|
+
multi: x,
|
|
52
|
+
multiExpanded: S,
|
|
53
|
+
popups: F.get("left"),
|
|
54
|
+
popupIds: F.get("left").map((e) => e.id),
|
|
55
|
+
popupActiveIds: F.get("left").filter((e) => e.active).map((e) => e.id),
|
|
56
|
+
limitMode: T,
|
|
57
|
+
addPopup: L,
|
|
58
|
+
existsPopup: z,
|
|
59
|
+
removePopup: R
|
|
60
|
+
}), [
|
|
61
|
+
L,
|
|
62
|
+
z,
|
|
63
|
+
R,
|
|
64
|
+
T,
|
|
65
|
+
x,
|
|
66
|
+
S,
|
|
67
|
+
F.lastUpdate.left
|
|
68
|
+
]), H = l(() => ({
|
|
69
|
+
popupManager: F,
|
|
70
|
+
multi: x,
|
|
71
|
+
multiExpanded: S,
|
|
72
|
+
popups: F.get("right"),
|
|
73
|
+
popupIds: F.get("right").map((e) => e.id),
|
|
74
|
+
popupActiveIds: F.get("right").filter((e) => e.active).map((e) => e.id),
|
|
75
|
+
limitMode: T,
|
|
76
|
+
addPopup: L,
|
|
77
|
+
existsPopup: z,
|
|
78
|
+
removePopup: R
|
|
79
|
+
}), [
|
|
80
|
+
L,
|
|
81
|
+
z,
|
|
82
|
+
R,
|
|
83
|
+
T,
|
|
84
|
+
x,
|
|
85
|
+
S,
|
|
86
|
+
F.lastUpdate.right
|
|
87
|
+
]);
|
|
31
88
|
return /* @__PURE__ */ f(t, {
|
|
32
|
-
value:
|
|
33
|
-
popupManager: F,
|
|
34
|
-
multi: x,
|
|
35
|
-
multiExpanded: S,
|
|
36
|
-
popups: F.get("floating"),
|
|
37
|
-
popupIds: F.get("floating").map((e) => e.id),
|
|
38
|
-
popupActiveIds: F.get("floating").filter((e) => e.active).map((e) => e.id),
|
|
39
|
-
limitMode: T,
|
|
40
|
-
addPopup: L,
|
|
41
|
-
existsPopup: z,
|
|
42
|
-
removePopup: R
|
|
43
|
-
}), [
|
|
44
|
-
L,
|
|
45
|
-
z,
|
|
46
|
-
R,
|
|
47
|
-
T,
|
|
48
|
-
x,
|
|
49
|
-
S,
|
|
50
|
-
F.lastUpdate.floating
|
|
51
|
-
]),
|
|
89
|
+
value: B,
|
|
52
90
|
children: /* @__PURE__ */ f(n, {
|
|
53
|
-
value:
|
|
54
|
-
popupManager: F,
|
|
55
|
-
multi: x,
|
|
56
|
-
multiExpanded: S,
|
|
57
|
-
popups: F.get("left"),
|
|
58
|
-
popupIds: F.get("left").map((e) => e.id),
|
|
59
|
-
popupActiveIds: F.get("left").filter((e) => e.active).map((e) => e.id),
|
|
60
|
-
limitMode: T,
|
|
61
|
-
addPopup: L,
|
|
62
|
-
existsPopup: z,
|
|
63
|
-
removePopup: R
|
|
64
|
-
}), [
|
|
65
|
-
L,
|
|
66
|
-
z,
|
|
67
|
-
R,
|
|
68
|
-
T,
|
|
69
|
-
x,
|
|
70
|
-
S,
|
|
71
|
-
F.lastUpdate.left
|
|
72
|
-
]),
|
|
91
|
+
value: V,
|
|
73
92
|
children: /* @__PURE__ */ p(r, {
|
|
74
|
-
value:
|
|
75
|
-
popupManager: F,
|
|
76
|
-
multi: x,
|
|
77
|
-
multiExpanded: S,
|
|
78
|
-
popups: F.get("right"),
|
|
79
|
-
popupIds: F.get("right").map((e) => e.id),
|
|
80
|
-
popupActiveIds: F.get("right").filter((e) => e.active).map((e) => e.id),
|
|
81
|
-
limitMode: T,
|
|
82
|
-
addPopup: L,
|
|
83
|
-
existsPopup: z,
|
|
84
|
-
removePopup: R
|
|
85
|
-
}), [
|
|
86
|
-
L,
|
|
87
|
-
z,
|
|
88
|
-
R,
|
|
89
|
-
T,
|
|
90
|
-
x,
|
|
91
|
-
S,
|
|
92
|
-
F.lastUpdate.right
|
|
93
|
-
]),
|
|
93
|
+
value: H,
|
|
94
94
|
children: [
|
|
95
95
|
v && !!F.getCount("left") && /* @__PURE__ */ f(i, {
|
|
96
96
|
placement: "left",
|
|
@@ -37,19 +37,19 @@ var c = ({ children: t, components: c, defaultColorMode: l = "light", colorModeS
|
|
|
37
37
|
if (!p && (h(e), u)) try {
|
|
38
38
|
localStorage.setItem(u, e);
|
|
39
39
|
} catch {}
|
|
40
|
-
}, [p, u])
|
|
40
|
+
}, [p, u]), v = i(() => ({
|
|
41
|
+
theme: { components: c && Object.keys(c).length > 0 ? c : {} },
|
|
42
|
+
colorMode: m,
|
|
43
|
+
toggleColorMode: g,
|
|
44
|
+
setColorMode: _
|
|
45
|
+
}), [
|
|
46
|
+
c,
|
|
47
|
+
m,
|
|
48
|
+
g,
|
|
49
|
+
_
|
|
50
|
+
]);
|
|
41
51
|
return /* @__PURE__ */ o(s, {
|
|
42
|
-
value:
|
|
43
|
-
theme: { components: c && Object.keys(c).length > 0 ? c : {} },
|
|
44
|
-
colorMode: m,
|
|
45
|
-
toggleColorMode: g,
|
|
46
|
-
setColorMode: _
|
|
47
|
-
}), [
|
|
48
|
-
c,
|
|
49
|
-
m,
|
|
50
|
-
g,
|
|
51
|
-
_
|
|
52
|
-
]),
|
|
52
|
+
value: v,
|
|
53
53
|
children: t
|
|
54
54
|
});
|
|
55
55
|
};
|