@unizap/uniui 1.0.55 → 1.0.56
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/IconButton/IconButton.types.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.types.d.ts +1 -0
- package/dist/components/Typography/Typography.types.d.ts +1 -0
- package/dist/uniui.js +528 -517
- package/dist/uniui.umd.cjs +38 -38
- package/package.json +95 -93
package/dist/uniui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Gt from "react";
|
|
2
|
-
import ke, { useRef as me, useState as
|
|
2
|
+
import ke, { useRef as me, useState as ee, useEffect as pe, useMemo as Ae, useReducer as tr, useCallback as ce, forwardRef as Oe, useImperativeHandle as _n, Fragment as nr, memo as rr, useLayoutEffect as or } from "react";
|
|
3
3
|
import { createPortal as Ge } from "react-dom";
|
|
4
4
|
function Mn(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -52,20 +52,20 @@ function ar() {
|
|
|
52
52
|
function e(x) {
|
|
53
53
|
if (x == null) return null;
|
|
54
54
|
if (typeof x == "function")
|
|
55
|
-
return x.$$typeof ===
|
|
55
|
+
return x.$$typeof === U ? null : x.displayName || x.name || null;
|
|
56
56
|
if (typeof x == "string") return x;
|
|
57
57
|
switch (x) {
|
|
58
58
|
case g:
|
|
59
59
|
return "Fragment";
|
|
60
|
-
case h:
|
|
61
|
-
return "Profiler";
|
|
62
60
|
case w:
|
|
61
|
+
return "Profiler";
|
|
62
|
+
case h:
|
|
63
63
|
return "StrictMode";
|
|
64
64
|
case b:
|
|
65
65
|
return "Suspense";
|
|
66
|
-
case
|
|
66
|
+
case A:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case J:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof x == "object")
|
|
@@ -83,7 +83,7 @@ function ar() {
|
|
|
83
83
|
return x = x.displayName, x || (x = j.displayName || j.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
|
|
84
84
|
case R:
|
|
85
85
|
return j = x.displayName || null, j !== null ? j : e(x.type) || "Memo";
|
|
86
|
-
case
|
|
86
|
+
case O:
|
|
87
87
|
j = x._payload, x = x._init;
|
|
88
88
|
try {
|
|
89
89
|
return e(x(j));
|
|
@@ -114,7 +114,7 @@ function ar() {
|
|
|
114
114
|
}
|
|
115
115
|
function r(x) {
|
|
116
116
|
if (x === g) return "<>";
|
|
117
|
-
if (typeof x == "object" && x !== null && x.$$typeof ===
|
|
117
|
+
if (typeof x == "object" && x !== null && x.$$typeof === O)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
120
|
var j = e(x);
|
|
@@ -124,7 +124,7 @@ function ar() {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function o() {
|
|
127
|
-
var x =
|
|
127
|
+
var x = K.A;
|
|
128
128
|
return x === null ? null : x.getOwner();
|
|
129
129
|
}
|
|
130
130
|
function i() {
|
|
@@ -151,16 +151,16 @@ function ar() {
|
|
|
151
151
|
}
|
|
152
152
|
function c() {
|
|
153
153
|
var x = e(this.type);
|
|
154
|
-
return
|
|
154
|
+
return Q[x] || (Q[x] = !0, console.error(
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), x = this.props.ref, x !== void 0 ? x : null;
|
|
157
157
|
}
|
|
158
|
-
function d(x, j, L, E, P,
|
|
159
|
-
return L =
|
|
158
|
+
function d(x, j, L, E, P, T, k, B) {
|
|
159
|
+
return L = T.ref, x = {
|
|
160
160
|
$$typeof: f,
|
|
161
161
|
type: x,
|
|
162
162
|
key: j,
|
|
163
|
-
props:
|
|
163
|
+
props: T,
|
|
164
164
|
_owner: P
|
|
165
165
|
}, (L !== void 0 ? L : null) !== null ? Object.defineProperty(x, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
@@ -187,7 +187,7 @@ function ar() {
|
|
|
187
187
|
value: B
|
|
188
188
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
189
189
|
}
|
|
190
|
-
function p(x, j, L, E, P,
|
|
190
|
+
function p(x, j, L, E, P, T, k, B) {
|
|
191
191
|
var N = j.children;
|
|
192
192
|
if (N !== void 0)
|
|
193
193
|
if (E)
|
|
@@ -205,7 +205,7 @@ function ar() {
|
|
|
205
205
|
var G = Object.keys(j).filter(function(se) {
|
|
206
206
|
return se !== "key";
|
|
207
207
|
});
|
|
208
|
-
E = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
208
|
+
E = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", X[N + E] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
@@ -216,7 +216,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
216
216
|
N,
|
|
217
217
|
G,
|
|
218
218
|
N
|
|
219
|
-
),
|
|
219
|
+
), X[N + E] = !0);
|
|
220
220
|
}
|
|
221
221
|
if (N = null, L !== void 0 && (t(L), N = "" + L), l(j) && (t(j.key), N = "" + j.key), "key" in j) {
|
|
222
222
|
L = {};
|
|
@@ -229,7 +229,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
229
229
|
), d(
|
|
230
230
|
x,
|
|
231
231
|
N,
|
|
232
|
-
|
|
232
|
+
T,
|
|
233
233
|
P,
|
|
234
234
|
o(),
|
|
235
235
|
L,
|
|
@@ -240,7 +240,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
240
240
|
function m(x) {
|
|
241
241
|
typeof x == "object" && x !== null && x.$$typeof === f && x._store && (x._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var u = ke, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"),
|
|
243
|
+
var u = ke, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), y = Symbol.for("react.context"), $ = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), J = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), K = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, de = Object.prototype.hasOwnProperty, D = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
u = {
|
|
@@ -248,12 +248,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return x();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var q,
|
|
251
|
+
var q, Q = {}, V = u["react-stack-bottom-frame"].bind(
|
|
252
252
|
u,
|
|
253
253
|
i
|
|
254
|
-
)(), ve =
|
|
254
|
+
)(), ve = z(r(i)), X = {};
|
|
255
255
|
Ve.Fragment = g, Ve.jsx = function(x, j, L, E, P) {
|
|
256
|
-
var
|
|
256
|
+
var T = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return p(
|
|
258
258
|
x,
|
|
259
259
|
j,
|
|
@@ -261,11 +261,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
261
261
|
!1,
|
|
262
262
|
E,
|
|
263
263
|
P,
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
T ? Error("react-stack-top-frame") : V,
|
|
265
|
+
T ? z(r(x)) : ve
|
|
266
266
|
);
|
|
267
267
|
}, Ve.jsxs = function(x, j, L, E, P) {
|
|
268
|
-
var
|
|
268
|
+
var T = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return p(
|
|
270
270
|
x,
|
|
271
271
|
j,
|
|
@@ -273,8 +273,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
273
273
|
!0,
|
|
274
274
|
E,
|
|
275
275
|
P,
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
T ? Error("react-stack-top-frame") : V,
|
|
277
|
+
T ? z(r(x)) : ve
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
280
|
}()), Ve;
|
|
@@ -622,24 +622,26 @@ const we = {
|
|
|
622
622
|
autoFocus: f = !1,
|
|
623
623
|
href: v,
|
|
624
624
|
target: g,
|
|
625
|
+
id: h,
|
|
625
626
|
...w
|
|
626
627
|
}) => {
|
|
627
|
-
var
|
|
628
|
-
const
|
|
629
|
-
const
|
|
630
|
-
if (!
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
},
|
|
628
|
+
var A;
|
|
629
|
+
const S = me(null), y = me(null), $ = (R) => {
|
|
630
|
+
const O = S.current;
|
|
631
|
+
if (!O) return;
|
|
632
|
+
const J = document.createElement("span"), U = O.getBoundingClientRect(), K = Math.max(U.width, U.height);
|
|
633
|
+
J.style.width = J.style.height = `${K}px`, J.style.left = `${R.clientX - U.left - K / 2}px`, J.style.top = `${R.clientY - U.top - K / 2}px`, J.className = "ripple", O.appendChild(J), setTimeout(() => J.remove(), 600), l == null || l(R);
|
|
634
|
+
}, b = ((A = we[r]) == null ? void 0 : A[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
|
|
634
635
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: v ? /* @__PURE__ */ a.jsxs(
|
|
635
636
|
"a",
|
|
636
637
|
{
|
|
637
|
-
ref:
|
|
638
|
+
ref: y,
|
|
639
|
+
id: h,
|
|
638
640
|
href: v,
|
|
639
641
|
target: g,
|
|
640
642
|
className: `relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
641
643
|
${t === "outlined" && "border"}
|
|
642
|
-
${
|
|
644
|
+
${b}
|
|
643
645
|
${s}
|
|
644
646
|
${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
645
647
|
${c ? "w-full" : ""}
|
|
@@ -655,13 +657,14 @@ const we = {
|
|
|
655
657
|
) : /* @__PURE__ */ a.jsxs(
|
|
656
658
|
"button",
|
|
657
659
|
{
|
|
658
|
-
ref:
|
|
660
|
+
ref: S,
|
|
661
|
+
id: h,
|
|
659
662
|
type: u,
|
|
660
663
|
disabled: d,
|
|
661
|
-
onClick:
|
|
664
|
+
onClick: $,
|
|
662
665
|
className: `relative leading-none font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
663
666
|
${t === "outlined" && "border"}
|
|
664
|
-
${
|
|
667
|
+
${b}
|
|
665
668
|
${s}
|
|
666
669
|
${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
667
670
|
${c ? "w-full" : ""}
|
|
@@ -742,7 +745,7 @@ const we = {
|
|
|
742
745
|
menuClassName: r = "",
|
|
743
746
|
stayOpenOnSelect: o = !1
|
|
744
747
|
}) => {
|
|
745
|
-
const [i, l] =
|
|
748
|
+
const [i, l] = ee(!1), s = me(null);
|
|
746
749
|
return pe(() => {
|
|
747
750
|
const c = (d) => {
|
|
748
751
|
s.current && !s.current.contains(d.target) && l(!1);
|
|
@@ -801,11 +804,11 @@ var Ut;
|
|
|
801
804
|
function sr() {
|
|
802
805
|
if (Ut) return ae;
|
|
803
806
|
Ut = 1;
|
|
804
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121,
|
|
807
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
|
|
805
808
|
function y(b) {
|
|
806
809
|
if (typeof b == "object" && b !== null) {
|
|
807
|
-
var
|
|
808
|
-
switch (
|
|
810
|
+
var A = b.$$typeof;
|
|
811
|
+
switch (A) {
|
|
809
812
|
case n:
|
|
810
813
|
switch (b = b.type, b) {
|
|
811
814
|
case c:
|
|
@@ -824,11 +827,11 @@ function sr() {
|
|
|
824
827
|
case l:
|
|
825
828
|
return b;
|
|
826
829
|
default:
|
|
827
|
-
return
|
|
830
|
+
return A;
|
|
828
831
|
}
|
|
829
832
|
}
|
|
830
833
|
case t:
|
|
831
|
-
return
|
|
834
|
+
return A;
|
|
832
835
|
}
|
|
833
836
|
}
|
|
834
837
|
}
|
|
@@ -860,7 +863,7 @@ function sr() {
|
|
|
860
863
|
}, ae.isSuspense = function(b) {
|
|
861
864
|
return y(b) === m;
|
|
862
865
|
}, ae.isValidElementType = function(b) {
|
|
863
|
-
return typeof b == "string" || typeof b == "function" || b === r || b === d || b === i || b === o || b === m || b === u || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === f || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof ===
|
|
866
|
+
return typeof b == "string" || typeof b == "function" || b === r || b === d || b === i || b === o || b === m || b === u || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === f || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof === h || b.$$typeof === w || b.$$typeof === S || b.$$typeof === g);
|
|
864
867
|
}, ae.typeOf = y, ae;
|
|
865
868
|
}
|
|
866
869
|
var le = {};
|
|
@@ -875,10 +878,10 @@ var le = {};
|
|
|
875
878
|
var Xt;
|
|
876
879
|
function cr() {
|
|
877
880
|
return Xt || (Xt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
878
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121,
|
|
881
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
|
|
879
882
|
function y(_) {
|
|
880
883
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
881
|
-
_ === r || _ === d || _ === i || _ === o || _ === m || _ === u || typeof _ == "object" && _ !== null && (_.$$typeof === v || _.$$typeof === f || _.$$typeof === l || _.$$typeof === s || _.$$typeof === p || _.$$typeof ===
|
|
884
|
+
_ === r || _ === d || _ === i || _ === o || _ === m || _ === u || typeof _ == "object" && _ !== null && (_.$$typeof === v || _.$$typeof === f || _.$$typeof === l || _.$$typeof === s || _.$$typeof === p || _.$$typeof === h || _.$$typeof === w || _.$$typeof === S || _.$$typeof === g);
|
|
882
885
|
}
|
|
883
886
|
function $(_) {
|
|
884
887
|
if (typeof _ == "object" && _ !== null) {
|
|
@@ -912,8 +915,8 @@ function cr() {
|
|
|
912
915
|
}
|
|
913
916
|
}
|
|
914
917
|
}
|
|
915
|
-
var b = c,
|
|
916
|
-
function
|
|
918
|
+
var b = c, A = d, R = s, O = l, J = n, U = p, K = r, de = v, D = f, z = t, q = i, Q = o, V = m, ve = !1;
|
|
919
|
+
function X(_) {
|
|
917
920
|
return ve || (ve = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(_) || $(_) === c;
|
|
918
921
|
}
|
|
919
922
|
function x(_) {
|
|
@@ -931,7 +934,7 @@ function cr() {
|
|
|
931
934
|
function P(_) {
|
|
932
935
|
return $(_) === p;
|
|
933
936
|
}
|
|
934
|
-
function
|
|
937
|
+
function T(_) {
|
|
935
938
|
return $(_) === r;
|
|
936
939
|
}
|
|
937
940
|
function k(_) {
|
|
@@ -952,7 +955,7 @@ function cr() {
|
|
|
952
955
|
function se(_) {
|
|
953
956
|
return $(_) === m;
|
|
954
957
|
}
|
|
955
|
-
le.AsyncMode = b, le.ConcurrentMode =
|
|
958
|
+
le.AsyncMode = b, le.ConcurrentMode = A, le.ContextConsumer = R, le.ContextProvider = O, le.Element = J, le.ForwardRef = U, le.Fragment = K, le.Lazy = de, le.Memo = D, le.Portal = z, le.Profiler = q, le.StrictMode = Q, le.Suspense = V, le.isAsyncMode = X, le.isConcurrentMode = x, le.isContextConsumer = j, le.isContextProvider = L, le.isElement = E, le.isForwardRef = P, le.isFragment = T, le.isLazy = k, le.isMemo = B, le.isPortal = N, le.isProfiler = G, le.isStrictMode = Y, le.isSuspense = se, le.isValidElementType = y, le.typeOf = $;
|
|
956
959
|
}()), le;
|
|
957
960
|
}
|
|
958
961
|
var Kt;
|
|
@@ -1095,23 +1098,23 @@ function dr() {
|
|
|
1095
1098
|
return j;
|
|
1096
1099
|
}
|
|
1097
1100
|
var u = "<<anonymous>>", f = {
|
|
1098
|
-
array:
|
|
1099
|
-
bigint:
|
|
1100
|
-
bool:
|
|
1101
|
-
func:
|
|
1102
|
-
number:
|
|
1103
|
-
object:
|
|
1104
|
-
string:
|
|
1105
|
-
symbol:
|
|
1101
|
+
array: w("array"),
|
|
1102
|
+
bigint: w("bigint"),
|
|
1103
|
+
bool: w("boolean"),
|
|
1104
|
+
func: w("function"),
|
|
1105
|
+
number: w("number"),
|
|
1106
|
+
object: w("object"),
|
|
1107
|
+
string: w("string"),
|
|
1108
|
+
symbol: w("symbol"),
|
|
1106
1109
|
any: S(),
|
|
1107
1110
|
arrayOf: y,
|
|
1108
1111
|
element: $(),
|
|
1109
1112
|
elementType: b(),
|
|
1110
|
-
instanceOf:
|
|
1111
|
-
node:
|
|
1112
|
-
objectOf:
|
|
1113
|
+
instanceOf: A,
|
|
1114
|
+
node: U(),
|
|
1115
|
+
objectOf: O,
|
|
1113
1116
|
oneOf: R,
|
|
1114
|
-
oneOfType:
|
|
1117
|
+
oneOfType: J,
|
|
1115
1118
|
shape: de,
|
|
1116
1119
|
exact: D
|
|
1117
1120
|
};
|
|
@@ -1122,10 +1125,10 @@ function dr() {
|
|
|
1122
1125
|
this.message = x, this.data = j && typeof j == "object" ? j : {}, this.stack = "";
|
|
1123
1126
|
}
|
|
1124
1127
|
g.prototype = Error.prototype;
|
|
1125
|
-
function
|
|
1128
|
+
function h(x) {
|
|
1126
1129
|
if (process.env.NODE_ENV !== "production")
|
|
1127
1130
|
var j = {}, L = 0;
|
|
1128
|
-
function E(
|
|
1131
|
+
function E(T, k, B, N, G, Y, se) {
|
|
1129
1132
|
if (N = N || u, Y = Y || B, se !== t) {
|
|
1130
1133
|
if (c) {
|
|
1131
1134
|
var _ = new Error(
|
|
@@ -1140,84 +1143,84 @@ function dr() {
|
|
|
1140
1143
|
), j[F] = !0, L++);
|
|
1141
1144
|
}
|
|
1142
1145
|
}
|
|
1143
|
-
return k[B] == null ?
|
|
1146
|
+
return k[B] == null ? T ? k[B] === null ? new g("The " + G + " `" + Y + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new g("The " + G + " `" + Y + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : x(k, B, N, G, Y);
|
|
1144
1147
|
}
|
|
1145
1148
|
var P = E.bind(null, !1);
|
|
1146
1149
|
return P.isRequired = E.bind(null, !0), P;
|
|
1147
1150
|
}
|
|
1148
|
-
function
|
|
1149
|
-
function j(L, E, P,
|
|
1150
|
-
var N = L[E], G =
|
|
1151
|
+
function w(x) {
|
|
1152
|
+
function j(L, E, P, T, k, B) {
|
|
1153
|
+
var N = L[E], G = Q(N);
|
|
1151
1154
|
if (G !== x) {
|
|
1152
1155
|
var Y = V(N);
|
|
1153
1156
|
return new g(
|
|
1154
|
-
"Invalid " +
|
|
1157
|
+
"Invalid " + T + " `" + k + "` of type " + ("`" + Y + "` supplied to `" + P + "`, expected ") + ("`" + x + "`."),
|
|
1155
1158
|
{ expectedType: x }
|
|
1156
1159
|
);
|
|
1157
1160
|
}
|
|
1158
1161
|
return null;
|
|
1159
1162
|
}
|
|
1160
|
-
return
|
|
1163
|
+
return h(j);
|
|
1161
1164
|
}
|
|
1162
1165
|
function S() {
|
|
1163
|
-
return
|
|
1166
|
+
return h(l);
|
|
1164
1167
|
}
|
|
1165
1168
|
function y(x) {
|
|
1166
|
-
function j(L, E, P,
|
|
1169
|
+
function j(L, E, P, T, k) {
|
|
1167
1170
|
if (typeof x != "function")
|
|
1168
1171
|
return new g("Property `" + k + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
1169
1172
|
var B = L[E];
|
|
1170
1173
|
if (!Array.isArray(B)) {
|
|
1171
|
-
var N =
|
|
1172
|
-
return new g("Invalid " +
|
|
1174
|
+
var N = Q(B);
|
|
1175
|
+
return new g("Invalid " + T + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected an array."));
|
|
1173
1176
|
}
|
|
1174
1177
|
for (var G = 0; G < B.length; G++) {
|
|
1175
|
-
var Y = x(B, G, P,
|
|
1178
|
+
var Y = x(B, G, P, T, k + "[" + G + "]", t);
|
|
1176
1179
|
if (Y instanceof Error)
|
|
1177
1180
|
return Y;
|
|
1178
1181
|
}
|
|
1179
1182
|
return null;
|
|
1180
1183
|
}
|
|
1181
|
-
return
|
|
1184
|
+
return h(j);
|
|
1182
1185
|
}
|
|
1183
1186
|
function $() {
|
|
1184
|
-
function x(j, L, E, P,
|
|
1187
|
+
function x(j, L, E, P, T) {
|
|
1185
1188
|
var k = j[L];
|
|
1186
1189
|
if (!s(k)) {
|
|
1187
|
-
var B =
|
|
1188
|
-
return new g("Invalid " + P + " `" +
|
|
1190
|
+
var B = Q(k);
|
|
1191
|
+
return new g("Invalid " + P + " `" + T + "` of type " + ("`" + B + "` supplied to `" + E + "`, expected a single ReactElement."));
|
|
1189
1192
|
}
|
|
1190
1193
|
return null;
|
|
1191
1194
|
}
|
|
1192
|
-
return
|
|
1195
|
+
return h(x);
|
|
1193
1196
|
}
|
|
1194
1197
|
function b() {
|
|
1195
|
-
function x(j, L, E, P,
|
|
1198
|
+
function x(j, L, E, P, T) {
|
|
1196
1199
|
var k = j[L];
|
|
1197
1200
|
if (!e.isValidElementType(k)) {
|
|
1198
|
-
var B =
|
|
1199
|
-
return new g("Invalid " + P + " `" +
|
|
1201
|
+
var B = Q(k);
|
|
1202
|
+
return new g("Invalid " + P + " `" + T + "` of type " + ("`" + B + "` supplied to `" + E + "`, expected a single ReactElement type."));
|
|
1200
1203
|
}
|
|
1201
1204
|
return null;
|
|
1202
1205
|
}
|
|
1203
|
-
return
|
|
1206
|
+
return h(x);
|
|
1204
1207
|
}
|
|
1205
|
-
function
|
|
1206
|
-
function j(L, E, P,
|
|
1208
|
+
function A(x) {
|
|
1209
|
+
function j(L, E, P, T, k) {
|
|
1207
1210
|
if (!(L[E] instanceof x)) {
|
|
1208
|
-
var B = x.name || u, N =
|
|
1209
|
-
return new g("Invalid " +
|
|
1211
|
+
var B = x.name || u, N = X(L[E]);
|
|
1212
|
+
return new g("Invalid " + T + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected ") + ("instance of `" + B + "`."));
|
|
1210
1213
|
}
|
|
1211
1214
|
return null;
|
|
1212
1215
|
}
|
|
1213
|
-
return
|
|
1216
|
+
return h(j);
|
|
1214
1217
|
}
|
|
1215
1218
|
function R(x) {
|
|
1216
1219
|
if (!Array.isArray(x))
|
|
1217
1220
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1218
1221
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1219
1222
|
) : i("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
1220
|
-
function j(L, E, P,
|
|
1223
|
+
function j(L, E, P, T, k) {
|
|
1221
1224
|
for (var B = L[E], N = 0; N < x.length; N++)
|
|
1222
1225
|
if (v(B, x[N]))
|
|
1223
1226
|
return null;
|
|
@@ -1225,28 +1228,28 @@ function dr() {
|
|
|
1225
1228
|
var F = V(_);
|
|
1226
1229
|
return F === "symbol" ? String(_) : _;
|
|
1227
1230
|
});
|
|
1228
|
-
return new g("Invalid " +
|
|
1231
|
+
return new g("Invalid " + T + " `" + k + "` of value `" + String(B) + "` " + ("supplied to `" + P + "`, expected one of " + G + "."));
|
|
1229
1232
|
}
|
|
1230
|
-
return
|
|
1233
|
+
return h(j);
|
|
1231
1234
|
}
|
|
1232
|
-
function
|
|
1233
|
-
function j(L, E, P,
|
|
1235
|
+
function O(x) {
|
|
1236
|
+
function j(L, E, P, T, k) {
|
|
1234
1237
|
if (typeof x != "function")
|
|
1235
1238
|
return new g("Property `" + k + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
1236
|
-
var B = L[E], N =
|
|
1239
|
+
var B = L[E], N = Q(B);
|
|
1237
1240
|
if (N !== "object")
|
|
1238
|
-
return new g("Invalid " +
|
|
1241
|
+
return new g("Invalid " + T + " `" + k + "` of type " + ("`" + N + "` supplied to `" + P + "`, expected an object."));
|
|
1239
1242
|
for (var G in B)
|
|
1240
1243
|
if (r(B, G)) {
|
|
1241
|
-
var Y = x(B, G, P,
|
|
1244
|
+
var Y = x(B, G, P, T, k + "." + G, t);
|
|
1242
1245
|
if (Y instanceof Error)
|
|
1243
1246
|
return Y;
|
|
1244
1247
|
}
|
|
1245
1248
|
return null;
|
|
1246
1249
|
}
|
|
1247
|
-
return
|
|
1250
|
+
return h(j);
|
|
1248
1251
|
}
|
|
1249
|
-
function
|
|
1252
|
+
function J(x) {
|
|
1250
1253
|
if (!Array.isArray(x))
|
|
1251
1254
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
1252
1255
|
for (var j = 0; j < x.length; j++) {
|
|
@@ -1256,9 +1259,9 @@ function dr() {
|
|
|
1256
1259
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ve(L) + " at index " + j + "."
|
|
1257
1260
|
), l;
|
|
1258
1261
|
}
|
|
1259
|
-
function E(P,
|
|
1262
|
+
function E(P, T, k, B, N) {
|
|
1260
1263
|
for (var G = [], Y = 0; Y < x.length; Y++) {
|
|
1261
|
-
var se = x[Y], _ = se(P,
|
|
1264
|
+
var se = x[Y], _ = se(P, T, k, B, N, t);
|
|
1262
1265
|
if (_ == null)
|
|
1263
1266
|
return null;
|
|
1264
1267
|
_.data && r(_.data, "expectedType") && G.push(_.data.expectedType);
|
|
@@ -1266,60 +1269,60 @@ function dr() {
|
|
|
1266
1269
|
var F = G.length > 0 ? ", expected one of type [" + G.join(", ") + "]" : "";
|
|
1267
1270
|
return new g("Invalid " + B + " `" + N + "` supplied to " + ("`" + k + "`" + F + "."));
|
|
1268
1271
|
}
|
|
1269
|
-
return
|
|
1272
|
+
return h(E);
|
|
1270
1273
|
}
|
|
1271
|
-
function
|
|
1272
|
-
function x(j, L, E, P,
|
|
1273
|
-
return
|
|
1274
|
+
function U() {
|
|
1275
|
+
function x(j, L, E, P, T) {
|
|
1276
|
+
return z(j[L]) ? null : new g("Invalid " + P + " `" + T + "` supplied to " + ("`" + E + "`, expected a ReactNode."));
|
|
1274
1277
|
}
|
|
1275
|
-
return
|
|
1278
|
+
return h(x);
|
|
1276
1279
|
}
|
|
1277
|
-
function
|
|
1280
|
+
function K(x, j, L, E, P) {
|
|
1278
1281
|
return new g(
|
|
1279
1282
|
(x || "React class") + ": " + j + " type `" + L + "." + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
1280
1283
|
);
|
|
1281
1284
|
}
|
|
1282
1285
|
function de(x) {
|
|
1283
|
-
function j(L, E, P,
|
|
1284
|
-
var B = L[E], N =
|
|
1286
|
+
function j(L, E, P, T, k) {
|
|
1287
|
+
var B = L[E], N = Q(B);
|
|
1285
1288
|
if (N !== "object")
|
|
1286
|
-
return new g("Invalid " +
|
|
1289
|
+
return new g("Invalid " + T + " `" + k + "` of type `" + N + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1287
1290
|
for (var G in x) {
|
|
1288
1291
|
var Y = x[G];
|
|
1289
1292
|
if (typeof Y != "function")
|
|
1290
|
-
return
|
|
1291
|
-
var se = Y(B, G, P,
|
|
1293
|
+
return K(P, T, k, G, V(Y));
|
|
1294
|
+
var se = Y(B, G, P, T, k + "." + G, t);
|
|
1292
1295
|
if (se)
|
|
1293
1296
|
return se;
|
|
1294
1297
|
}
|
|
1295
1298
|
return null;
|
|
1296
1299
|
}
|
|
1297
|
-
return
|
|
1300
|
+
return h(j);
|
|
1298
1301
|
}
|
|
1299
1302
|
function D(x) {
|
|
1300
|
-
function j(L, E, P,
|
|
1301
|
-
var B = L[E], N =
|
|
1303
|
+
function j(L, E, P, T, k) {
|
|
1304
|
+
var B = L[E], N = Q(B);
|
|
1302
1305
|
if (N !== "object")
|
|
1303
|
-
return new g("Invalid " +
|
|
1306
|
+
return new g("Invalid " + T + " `" + k + "` of type `" + N + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1304
1307
|
var G = n({}, L[E], x);
|
|
1305
1308
|
for (var Y in G) {
|
|
1306
1309
|
var se = x[Y];
|
|
1307
1310
|
if (r(x, Y) && typeof se != "function")
|
|
1308
|
-
return
|
|
1311
|
+
return K(P, T, k, Y, V(se));
|
|
1309
1312
|
if (!se)
|
|
1310
1313
|
return new g(
|
|
1311
|
-
"Invalid " +
|
|
1314
|
+
"Invalid " + T + " `" + k + "` key `" + Y + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(L[E], null, " ") + `
|
|
1312
1315
|
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1313
1316
|
);
|
|
1314
|
-
var _ = se(B, Y, P,
|
|
1317
|
+
var _ = se(B, Y, P, T, k + "." + Y, t);
|
|
1315
1318
|
if (_)
|
|
1316
1319
|
return _;
|
|
1317
1320
|
}
|
|
1318
1321
|
return null;
|
|
1319
1322
|
}
|
|
1320
|
-
return
|
|
1323
|
+
return h(j);
|
|
1321
1324
|
}
|
|
1322
|
-
function
|
|
1325
|
+
function z(x) {
|
|
1323
1326
|
switch (typeof x) {
|
|
1324
1327
|
case "number":
|
|
1325
1328
|
case "string":
|
|
@@ -1329,7 +1332,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1329
1332
|
return !x;
|
|
1330
1333
|
case "object":
|
|
1331
1334
|
if (Array.isArray(x))
|
|
1332
|
-
return x.every(
|
|
1335
|
+
return x.every(z);
|
|
1333
1336
|
if (x === null || s(x))
|
|
1334
1337
|
return !0;
|
|
1335
1338
|
var j = m(x);
|
|
@@ -1337,12 +1340,12 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1337
1340
|
var L = j.call(x), E;
|
|
1338
1341
|
if (j !== x.entries) {
|
|
1339
1342
|
for (; !(E = L.next()).done; )
|
|
1340
|
-
if (!
|
|
1343
|
+
if (!z(E.value))
|
|
1341
1344
|
return !1;
|
|
1342
1345
|
} else
|
|
1343
1346
|
for (; !(E = L.next()).done; ) {
|
|
1344
1347
|
var P = E.value;
|
|
1345
|
-
if (P && !
|
|
1348
|
+
if (P && !z(P[1]))
|
|
1346
1349
|
return !1;
|
|
1347
1350
|
}
|
|
1348
1351
|
} else
|
|
@@ -1355,14 +1358,14 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1355
1358
|
function q(x, j) {
|
|
1356
1359
|
return x === "symbol" ? !0 : j ? j["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && j instanceof Symbol : !1;
|
|
1357
1360
|
}
|
|
1358
|
-
function
|
|
1361
|
+
function Q(x) {
|
|
1359
1362
|
var j = typeof x;
|
|
1360
1363
|
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : q(j, x) ? "symbol" : j;
|
|
1361
1364
|
}
|
|
1362
1365
|
function V(x) {
|
|
1363
1366
|
if (typeof x > "u" || x === null)
|
|
1364
1367
|
return "" + x;
|
|
1365
|
-
var j =
|
|
1368
|
+
var j = Q(x);
|
|
1366
1369
|
if (j === "object") {
|
|
1367
1370
|
if (x instanceof Date)
|
|
1368
1371
|
return "date";
|
|
@@ -1385,7 +1388,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1385
1388
|
return j;
|
|
1386
1389
|
}
|
|
1387
1390
|
}
|
|
1388
|
-
function
|
|
1391
|
+
function X(x) {
|
|
1389
1392
|
return !x.constructor || !x.constructor.name ? u : x.constructor.name;
|
|
1390
1393
|
}
|
|
1391
1394
|
return f.checkPropTypes = o, f.resetWarningCache = o.resetWarningCache, f.PropTypes = f, f;
|
|
@@ -3350,19 +3353,19 @@ var Nt = {
|
|
|
3350
3353
|
fileRejections: []
|
|
3351
3354
|
};
|
|
3352
3355
|
function Hn() {
|
|
3353
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = fe(fe({}, Vn), e), t = n.accept, r = n.disabled, o = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, d = n.onDragEnter, p = n.onDragLeave, m = n.onDragOver, u = n.onDrop, f = n.onDropAccepted, v = n.onDropRejected, g = n.onFileDialogCancel,
|
|
3356
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = fe(fe({}, Vn), e), t = n.accept, r = n.disabled, o = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, d = n.onDragEnter, p = n.onDragLeave, m = n.onDragOver, u = n.onDrop, f = n.onDropAccepted, v = n.onDropRejected, g = n.onFileDialogCancel, h = n.onFileDialogOpen, w = n.useFsAccessApi, S = n.autoFocus, y = n.preventDropOnDocument, $ = n.noClick, b = n.noKeyboard, A = n.noDrag, R = n.noDragEventsBubbling, O = n.onError, J = n.validator, U = Ae(function() {
|
|
3354
3357
|
return Ur(t);
|
|
3355
|
-
}, [t]),
|
|
3358
|
+
}, [t]), K = Ae(function() {
|
|
3356
3359
|
return Wr(t);
|
|
3357
3360
|
}, [t]), de = Ae(function() {
|
|
3358
|
-
return typeof
|
|
3359
|
-
}, [
|
|
3361
|
+
return typeof h == "function" ? h : vn;
|
|
3362
|
+
}, [h]), D = Ae(function() {
|
|
3360
3363
|
return typeof g == "function" ? g : vn;
|
|
3361
|
-
}, [g]),
|
|
3364
|
+
}, [g]), z = me(null), q = me(null), Q = tr(uo, Nt), V = bt(Q, 2), ve = V[0], X = V[1], x = ve.isFocused, j = ve.isFileDialogActive, L = me(typeof window < "u" && window.isSecureContext && w && Zr()), E = function() {
|
|
3362
3365
|
!L.current && j && setTimeout(function() {
|
|
3363
3366
|
if (q.current) {
|
|
3364
3367
|
var I = q.current.files;
|
|
3365
|
-
I.length || (
|
|
3368
|
+
I.length || (X({
|
|
3366
3369
|
type: "closeDialog"
|
|
3367
3370
|
}), D());
|
|
3368
3371
|
}
|
|
@@ -3373,32 +3376,32 @@ function Hn() {
|
|
|
3373
3376
|
window.removeEventListener("focus", E, !1);
|
|
3374
3377
|
};
|
|
3375
3378
|
}, [q, j, D, L]);
|
|
3376
|
-
var P = me([]),
|
|
3377
|
-
|
|
3379
|
+
var P = me([]), T = function(I) {
|
|
3380
|
+
z.current && z.current.contains(I.target) || (I.preventDefault(), P.current = []);
|
|
3378
3381
|
};
|
|
3379
3382
|
pe(function() {
|
|
3380
|
-
return y && (document.addEventListener("dragover", mn, !1), document.addEventListener("drop",
|
|
3381
|
-
y && (document.removeEventListener("dragover", mn), document.removeEventListener("drop",
|
|
3383
|
+
return y && (document.addEventListener("dragover", mn, !1), document.addEventListener("drop", T, !1)), function() {
|
|
3384
|
+
y && (document.removeEventListener("dragover", mn), document.removeEventListener("drop", T));
|
|
3382
3385
|
};
|
|
3383
|
-
}, [
|
|
3384
|
-
return !r && S &&
|
|
3386
|
+
}, [z, y]), pe(function() {
|
|
3387
|
+
return !r && S && z.current && z.current.focus(), function() {
|
|
3385
3388
|
};
|
|
3386
|
-
}, [
|
|
3389
|
+
}, [z, S, r]);
|
|
3387
3390
|
var k = ce(function(M) {
|
|
3388
|
-
|
|
3389
|
-
}, [
|
|
3391
|
+
O ? O(M) : console.error(M);
|
|
3392
|
+
}, [O]), B = ce(function(M) {
|
|
3390
3393
|
M.preventDefault(), M.persist(), Se(M), P.current = [].concat(no(P.current), [M.target]), Ke(M) && Promise.resolve(o(M)).then(function(I) {
|
|
3391
3394
|
if (!(rt(M) && !R)) {
|
|
3392
3395
|
var ne = I.length, xe = ne > 0 && qr({
|
|
3393
3396
|
files: I,
|
|
3394
|
-
accept:
|
|
3397
|
+
accept: U,
|
|
3395
3398
|
minSize: l,
|
|
3396
3399
|
maxSize: i,
|
|
3397
3400
|
multiple: s,
|
|
3398
3401
|
maxFiles: c,
|
|
3399
|
-
validator:
|
|
3402
|
+
validator: J
|
|
3400
3403
|
}), ye = ne > 0 && !xe;
|
|
3401
|
-
|
|
3404
|
+
X({
|
|
3402
3405
|
isDragAccept: xe,
|
|
3403
3406
|
isDragReject: ye,
|
|
3404
3407
|
isDragActive: !0,
|
|
@@ -3408,7 +3411,7 @@ function Hn() {
|
|
|
3408
3411
|
}).catch(function(I) {
|
|
3409
3412
|
return k(I);
|
|
3410
3413
|
});
|
|
3411
|
-
}, [o, d, k, R,
|
|
3414
|
+
}, [o, d, k, R, U, l, i, s, c, J]), N = ce(function(M) {
|
|
3412
3415
|
M.preventDefault(), M.persist(), Se(M);
|
|
3413
3416
|
var I = Ke(M);
|
|
3414
3417
|
if (I && M.dataTransfer)
|
|
@@ -3420,18 +3423,18 @@ function Hn() {
|
|
|
3420
3423
|
}, [m, R]), G = ce(function(M) {
|
|
3421
3424
|
M.preventDefault(), M.persist(), Se(M);
|
|
3422
3425
|
var I = P.current.filter(function(xe) {
|
|
3423
|
-
return
|
|
3426
|
+
return z.current && z.current.contains(xe);
|
|
3424
3427
|
}), ne = I.indexOf(M.target);
|
|
3425
|
-
ne !== -1 && I.splice(ne, 1), P.current = I, !(I.length > 0) && (
|
|
3428
|
+
ne !== -1 && I.splice(ne, 1), P.current = I, !(I.length > 0) && (X({
|
|
3426
3429
|
type: "setDraggedFiles",
|
|
3427
3430
|
isDragActive: !1,
|
|
3428
3431
|
isDragAccept: !1,
|
|
3429
3432
|
isDragReject: !1
|
|
3430
3433
|
}), Ke(M) && p && p(M));
|
|
3431
|
-
}, [
|
|
3434
|
+
}, [z, p, R]), Y = ce(function(M, I) {
|
|
3432
3435
|
var ne = [], xe = [];
|
|
3433
3436
|
M.forEach(function(ye) {
|
|
3434
|
-
var De = zn(ye,
|
|
3437
|
+
var De = zn(ye, U), Ne = bt(De, 2), at = Ne[0], lt = Ne[1], st = Tn(ye, l, i), Ye = bt(st, 2), ct = Ye[0], ut = Ye[1], pt = J ? J(ye) : null;
|
|
3435
3438
|
if (at && ct && !pt)
|
|
3436
3439
|
ne.push(ye);
|
|
3437
3440
|
else {
|
|
@@ -3448,53 +3451,53 @@ function Hn() {
|
|
|
3448
3451
|
file: ye,
|
|
3449
3452
|
errors: [Hr]
|
|
3450
3453
|
});
|
|
3451
|
-
}), ne.splice(0)),
|
|
3454
|
+
}), ne.splice(0)), X({
|
|
3452
3455
|
acceptedFiles: ne,
|
|
3453
3456
|
fileRejections: xe,
|
|
3454
3457
|
isDragReject: xe.length > 0,
|
|
3455
3458
|
type: "setFiles"
|
|
3456
3459
|
}), u && u(ne, xe, I), xe.length > 0 && v && v(xe, I), ne.length > 0 && f && f(ne, I);
|
|
3457
|
-
}, [
|
|
3460
|
+
}, [X, s, U, l, i, c, u, f, v, J]), se = ce(function(M) {
|
|
3458
3461
|
M.preventDefault(), M.persist(), Se(M), P.current = [], Ke(M) && Promise.resolve(o(M)).then(function(I) {
|
|
3459
3462
|
rt(M) && !R || Y(I, M);
|
|
3460
3463
|
}).catch(function(I) {
|
|
3461
3464
|
return k(I);
|
|
3462
|
-
}),
|
|
3465
|
+
}), X({
|
|
3463
3466
|
type: "reset"
|
|
3464
3467
|
});
|
|
3465
3468
|
}, [o, Y, k, R]), _ = ce(function() {
|
|
3466
3469
|
if (L.current) {
|
|
3467
|
-
|
|
3470
|
+
X({
|
|
3468
3471
|
type: "openDialog"
|
|
3469
3472
|
}), de();
|
|
3470
3473
|
var M = {
|
|
3471
3474
|
multiple: s,
|
|
3472
|
-
types:
|
|
3475
|
+
types: K
|
|
3473
3476
|
};
|
|
3474
3477
|
window.showOpenFilePicker(M).then(function(I) {
|
|
3475
3478
|
return o(I);
|
|
3476
3479
|
}).then(function(I) {
|
|
3477
|
-
Y(I, null),
|
|
3480
|
+
Y(I, null), X({
|
|
3478
3481
|
type: "closeDialog"
|
|
3479
3482
|
});
|
|
3480
3483
|
}).catch(function(I) {
|
|
3481
|
-
Xr(I) ? (D(I),
|
|
3484
|
+
Xr(I) ? (D(I), X({
|
|
3482
3485
|
type: "closeDialog"
|
|
3483
3486
|
})) : Kr(I) ? (L.current = !1, q.current ? (q.current.value = null, q.current.click()) : k(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : k(I);
|
|
3484
3487
|
});
|
|
3485
3488
|
return;
|
|
3486
3489
|
}
|
|
3487
|
-
q.current && (
|
|
3490
|
+
q.current && (X({
|
|
3488
3491
|
type: "openDialog"
|
|
3489
3492
|
}), de(), q.current.value = null, q.current.click());
|
|
3490
|
-
}, [
|
|
3491
|
-
!
|
|
3492
|
-
}, [
|
|
3493
|
-
|
|
3493
|
+
}, [X, de, D, w, Y, k, K, s]), F = ce(function(M) {
|
|
3494
|
+
!z.current || !z.current.isEqualNode(M.target) || (M.key === " " || M.key === "Enter" || M.keyCode === 32 || M.keyCode === 13) && (M.preventDefault(), _());
|
|
3495
|
+
}, [z, _]), re = ce(function() {
|
|
3496
|
+
X({
|
|
3494
3497
|
type: "focus"
|
|
3495
3498
|
});
|
|
3496
3499
|
}, []), oe = ce(function() {
|
|
3497
|
-
|
|
3500
|
+
X({
|
|
3498
3501
|
type: "blur"
|
|
3499
3502
|
});
|
|
3500
3503
|
}, []), ge = ce(function() {
|
|
@@ -3504,7 +3507,7 @@ function Hn() {
|
|
|
3504
3507
|
}, te = function(I) {
|
|
3505
3508
|
return b ? null : H(I);
|
|
3506
3509
|
}, je = function(I) {
|
|
3507
|
-
return
|
|
3510
|
+
return A ? null : H(I);
|
|
3508
3511
|
}, Se = function(I) {
|
|
3509
3512
|
R && I.stopPropagation();
|
|
3510
3513
|
}, C = Ae(function() {
|
|
@@ -3520,16 +3523,16 @@ function Hn() {
|
|
|
3520
3523
|
onDragLeave: je(Re(Ye, G)),
|
|
3521
3524
|
onDrop: je(Re(ct, se)),
|
|
3522
3525
|
role: typeof xe == "string" && xe !== "" ? xe : "presentation"
|
|
3523
|
-
}, ne,
|
|
3526
|
+
}, ne, z), !r && !b ? {
|
|
3524
3527
|
tabIndex: 0
|
|
3525
3528
|
} : {}), ut);
|
|
3526
3529
|
};
|
|
3527
|
-
}, [
|
|
3530
|
+
}, [z, F, re, oe, ge, B, N, G, se, b, A, r]), ie = ce(function(M) {
|
|
3528
3531
|
M.stopPropagation();
|
|
3529
3532
|
}, []), he = Ae(function() {
|
|
3530
3533
|
return function() {
|
|
3531
3534
|
var M = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, I = M.refKey, ne = I === void 0 ? "ref" : I, xe = M.onChange, ye = M.onClick, De = ot(M, to), Ne = Pt({
|
|
3532
|
-
accept:
|
|
3535
|
+
accept: U,
|
|
3533
3536
|
multiple: s,
|
|
3534
3537
|
type: "file",
|
|
3535
3538
|
style: {
|
|
@@ -3555,7 +3558,7 @@ function Hn() {
|
|
|
3555
3558
|
isFocused: x && !r,
|
|
3556
3559
|
getRootProps: C,
|
|
3557
3560
|
getInputProps: he,
|
|
3558
|
-
rootRef:
|
|
3561
|
+
rootRef: z,
|
|
3559
3562
|
inputRef: q,
|
|
3560
3563
|
open: H(_)
|
|
3561
3564
|
});
|
|
@@ -3620,37 +3623,37 @@ const Ti = ({
|
|
|
3620
3623
|
subLabelClass: f = "",
|
|
3621
3624
|
showList: v = !0,
|
|
3622
3625
|
listView: g = !0,
|
|
3623
|
-
showListImage:
|
|
3624
|
-
uploadedFiles:
|
|
3626
|
+
showListImage: h = !1,
|
|
3627
|
+
uploadedFiles: w = [],
|
|
3625
3628
|
// New prop for pre-uploaded files
|
|
3626
3629
|
onDeleteCallback: S = () => {
|
|
3627
3630
|
}
|
|
3628
3631
|
//
|
|
3629
3632
|
}) => {
|
|
3630
|
-
const [y, $] =
|
|
3633
|
+
const [y, $] = ee(w), [b, A] = ee([]);
|
|
3631
3634
|
pe(() => {
|
|
3632
|
-
(
|
|
3633
|
-
}, [
|
|
3635
|
+
(w.length !== y.length || w.some((D, z) => D !== y[z])) && $(w);
|
|
3636
|
+
}, [w]);
|
|
3634
3637
|
const R = ce(
|
|
3635
|
-
(D,
|
|
3638
|
+
(D, z) => {
|
|
3636
3639
|
const q = [];
|
|
3637
|
-
if (
|
|
3638
|
-
|
|
3640
|
+
if (z.length > 0 && z.forEach((Q) => {
|
|
3641
|
+
Q.errors.forEach((V) => {
|
|
3639
3642
|
V.code === "file-too-large" && q.push(
|
|
3640
|
-
`${
|
|
3643
|
+
`${Q.file.name} is too large (max ${(o / 1024 / 1024).toFixed(2)}MB)`
|
|
3641
3644
|
), V.code === "file-invalid-type" && q.push(
|
|
3642
|
-
`${
|
|
3645
|
+
`${Q.file.name} has an invalid file type`
|
|
3643
3646
|
);
|
|
3644
3647
|
});
|
|
3645
3648
|
}), i !== void 0 && (r ? y.length : 0) + D.length > i && q.push(
|
|
3646
3649
|
`You can only upload up to ${i} file${i > 1 ? "s" : ""}.`
|
|
3647
3650
|
), q.length > 0) {
|
|
3648
|
-
|
|
3651
|
+
A(q), n == null || n(q);
|
|
3649
3652
|
return;
|
|
3650
3653
|
} else
|
|
3651
|
-
|
|
3654
|
+
A([]);
|
|
3652
3655
|
D.length > 0 && ($(
|
|
3653
|
-
(
|
|
3656
|
+
(Q) => r ? [...Q, ...D] : D
|
|
3654
3657
|
), e(D));
|
|
3655
3658
|
},
|
|
3656
3659
|
[
|
|
@@ -3661,9 +3664,9 @@ const Ti = ({
|
|
|
3661
3664
|
y,
|
|
3662
3665
|
r
|
|
3663
3666
|
]
|
|
3664
|
-
),
|
|
3665
|
-
$((
|
|
3666
|
-
}, { getRootProps:
|
|
3667
|
+
), O = (D) => {
|
|
3668
|
+
$((z) => z.filter((q, Q) => Q !== D)), S(y);
|
|
3669
|
+
}, { getRootProps: J, getInputProps: U, isDragActive: K, isDragReject: de } = Hn({
|
|
3667
3670
|
onDrop: R,
|
|
3668
3671
|
accept: t,
|
|
3669
3672
|
multiple: r,
|
|
@@ -3675,7 +3678,7 @@ const Ti = ({
|
|
|
3675
3678
|
{
|
|
3676
3679
|
className: `
|
|
3677
3680
|
border border-style-dashed rounded-lg p-0 overflow-hidden transition
|
|
3678
|
-
${
|
|
3681
|
+
${K ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
|
|
3679
3682
|
${de ? "border-color-red-500 bg-color-red-50" : ""}
|
|
3680
3683
|
${l ? "opacity-50 cursor-not-allowed" : ""}
|
|
3681
3684
|
${p}
|
|
@@ -3684,31 +3687,31 @@ const Ti = ({
|
|
|
3684
3687
|
/* @__PURE__ */ a.jsxs(
|
|
3685
3688
|
"div",
|
|
3686
3689
|
{
|
|
3687
|
-
...
|
|
3690
|
+
...J(),
|
|
3688
3691
|
className: "flex flex-col items-center justify-center text-center px-6 pt-6 pb-4 cursor-pointer",
|
|
3689
3692
|
children: [
|
|
3690
|
-
/* @__PURE__ */ a.jsx("input", { ...
|
|
3693
|
+
/* @__PURE__ */ a.jsx("input", { ...U() }),
|
|
3691
3694
|
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${m}`, children: d }),
|
|
3692
3695
|
/* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${u}`, children: s }),
|
|
3693
3696
|
c && /* @__PURE__ */ a.jsx("p", { className: `text-xs mt-1 ${f}`, children: c })
|
|
3694
3697
|
]
|
|
3695
3698
|
}
|
|
3696
3699
|
),
|
|
3697
|
-
b.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: b.map((D,
|
|
3700
|
+
b.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: b.map((D, z) => /* @__PURE__ */ a.jsxs("p", { children: [
|
|
3698
3701
|
"• ",
|
|
3699
3702
|
D
|
|
3700
|
-
] },
|
|
3703
|
+
] }, z)) }),
|
|
3701
3704
|
v && y.length > 0 && /* @__PURE__ */ a.jsx(
|
|
3702
3705
|
"ul",
|
|
3703
3706
|
{
|
|
3704
3707
|
className: `w-full ${g ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
|
|
3705
|
-
children: y.map((D,
|
|
3708
|
+
children: y.map((D, z) => /* @__PURE__ */ a.jsxs(
|
|
3706
3709
|
"li",
|
|
3707
3710
|
{
|
|
3708
3711
|
className: "flex items-center justify-between bg-color-white rounded-md px-4 py-2 shadow-sm",
|
|
3709
3712
|
children: [
|
|
3710
3713
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
3711
|
-
|
|
3714
|
+
h && /* @__PURE__ */ a.jsx("div", { className: "w-10 h-10 rounded bg-color-gray-100 overflow-hidden shrink-0", children: /* @__PURE__ */ a.jsx(
|
|
3712
3715
|
"img",
|
|
3713
3716
|
{
|
|
3714
3717
|
src: D.type.startsWith("image/") ? URL.createObjectURL(D) : "https://img.icons8.com/ios-filled/50/pdf-2.png",
|
|
@@ -3727,14 +3730,14 @@ const Ti = ({
|
|
|
3727
3730
|
"button",
|
|
3728
3731
|
{
|
|
3729
3732
|
className: "ml-2 p-1 bg-color-red-50 rounded-full text-color-red-500 hover:text-color-red-700 cursor-pointer",
|
|
3730
|
-
onClick: () =>
|
|
3733
|
+
onClick: () => O(z),
|
|
3731
3734
|
children: /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" }) })
|
|
3732
3735
|
}
|
|
3733
3736
|
)
|
|
3734
3737
|
] })
|
|
3735
3738
|
]
|
|
3736
3739
|
},
|
|
3737
|
-
|
|
3740
|
+
z
|
|
3738
3741
|
))
|
|
3739
3742
|
}
|
|
3740
3743
|
)
|
|
@@ -3749,7 +3752,7 @@ function po({
|
|
|
3749
3752
|
},
|
|
3750
3753
|
placementTop: r
|
|
3751
3754
|
}) {
|
|
3752
|
-
const [o, i] =
|
|
3755
|
+
const [o, i] = ee(!1), l = me(null);
|
|
3753
3756
|
return pe(() => {
|
|
3754
3757
|
function s(c) {
|
|
3755
3758
|
l.current && !l.current.contains(c.target) && i(!1);
|
|
@@ -3815,23 +3818,23 @@ const go = {
|
|
|
3815
3818
|
rounded: d = "medium",
|
|
3816
3819
|
...p
|
|
3817
3820
|
}, m) => {
|
|
3818
|
-
const u = me([]), f = (g,
|
|
3821
|
+
const u = me([]), f = (g, h) => {
|
|
3819
3822
|
var y;
|
|
3820
|
-
const
|
|
3821
|
-
if (!
|
|
3822
|
-
const S = t.substring(0,
|
|
3823
|
-
r == null || r(S),
|
|
3824
|
-
}, v = (g,
|
|
3825
|
-
var
|
|
3826
|
-
g.key === "Backspace" && !t[
|
|
3827
|
-
t.substring(0,
|
|
3828
|
-
), (
|
|
3823
|
+
const w = g.target.value.replace(/[^0-9]/g, "").slice(0, 1);
|
|
3824
|
+
if (!w && t[h] === void 0) return;
|
|
3825
|
+
const S = t.substring(0, h) + w + t.substring(h + 1, i);
|
|
3826
|
+
r == null || r(S), w && h < i - 1 && ((y = u.current[h + 1]) == null || y.focus()), o && S.length === i && !S.split("").some(($) => !$) && o(S);
|
|
3827
|
+
}, v = (g, h) => {
|
|
3828
|
+
var w, S, y;
|
|
3829
|
+
g.key === "Backspace" && !t[h] && h > 0 ? (r == null || r(
|
|
3830
|
+
t.substring(0, h - 1) + "" + t.substring(h, i)
|
|
3831
|
+
), (w = u.current[h - 1]) == null || w.focus(), g.preventDefault()) : g.key === "ArrowLeft" && h > 0 ? ((S = u.current[h - 1]) == null || S.focus(), g.preventDefault()) : g.key === "ArrowRight" && h < i - 1 && ((y = u.current[h + 1]) == null || y.focus(), g.preventDefault());
|
|
3829
3832
|
};
|
|
3830
|
-
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((g,
|
|
3833
|
+
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((g, h) => /* @__PURE__ */ a.jsx(
|
|
3831
3834
|
"input",
|
|
3832
3835
|
{
|
|
3833
|
-
ref: (
|
|
3834
|
-
u.current[
|
|
3836
|
+
ref: (w) => {
|
|
3837
|
+
u.current[h] = w;
|
|
3835
3838
|
},
|
|
3836
3839
|
type: "text",
|
|
3837
3840
|
inputMode: "numeric",
|
|
@@ -3845,12 +3848,12 @@ const go = {
|
|
|
3845
3848
|
${fo[d]}
|
|
3846
3849
|
${n}
|
|
3847
3850
|
`,
|
|
3848
|
-
value: t[
|
|
3849
|
-
onChange: (
|
|
3850
|
-
onKeyDown: (
|
|
3851
|
+
value: t[h] || "",
|
|
3852
|
+
onChange: (w) => f(w, h),
|
|
3853
|
+
onKeyDown: (w) => v(w, h),
|
|
3851
3854
|
...p
|
|
3852
3855
|
},
|
|
3853
|
-
|
|
3856
|
+
h
|
|
3854
3857
|
)) });
|
|
3855
3858
|
}
|
|
3856
3859
|
);
|
|
@@ -3880,8 +3883,8 @@ const vo = {
|
|
|
3880
3883
|
label: f,
|
|
3881
3884
|
labelClass: v = "",
|
|
3882
3885
|
variant: g = "outlined",
|
|
3883
|
-
size:
|
|
3884
|
-
...
|
|
3886
|
+
size: h = "medium",
|
|
3887
|
+
...w
|
|
3885
3888
|
}, S) => {
|
|
3886
3889
|
const y = m ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", $ = m ? "text-color-red-500" : c;
|
|
3887
3890
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
@@ -3891,7 +3894,7 @@ const vo = {
|
|
|
3891
3894
|
/* @__PURE__ */ a.jsx(
|
|
3892
3895
|
"input",
|
|
3893
3896
|
{
|
|
3894
|
-
...
|
|
3897
|
+
...w,
|
|
3895
3898
|
ref: S,
|
|
3896
3899
|
type: o,
|
|
3897
3900
|
inputMode: i,
|
|
@@ -3900,7 +3903,7 @@ const vo = {
|
|
|
3900
3903
|
value: n,
|
|
3901
3904
|
maxLength: u,
|
|
3902
3905
|
onChange: r,
|
|
3903
|
-
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${vo[
|
|
3906
|
+
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${vo[h]} ${s}`
|
|
3904
3907
|
}
|
|
3905
3908
|
),
|
|
3906
3909
|
p && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${$}`, children: p })
|
|
@@ -3911,7 +3914,7 @@ const vo = {
|
|
|
3911
3914
|
);
|
|
3912
3915
|
qn.displayName = "TextInput";
|
|
3913
3916
|
const wo = Oe((e, n) => {
|
|
3914
|
-
const [t, r] =
|
|
3917
|
+
const [t, r] = ee(!1);
|
|
3915
3918
|
return /* @__PURE__ */ a.jsx(
|
|
3916
3919
|
qn,
|
|
3917
3920
|
{
|
|
@@ -3983,8 +3986,8 @@ const Bn = ({
|
|
|
3983
3986
|
const p = me(null), m = (v) => {
|
|
3984
3987
|
const g = p.current;
|
|
3985
3988
|
if (!g) return;
|
|
3986
|
-
const
|
|
3987
|
-
|
|
3989
|
+
const h = document.createElement("span"), w = g.getBoundingClientRect(), S = Math.max(w.width, w.height);
|
|
3990
|
+
h.style.width = h.style.height = `${S}px`, h.style.left = `${v.clientX - w.left - S / 2}px`, h.style.top = `${v.clientY - w.top - S / 2}px`, h.className = "ripple_small", g.appendChild(h), setTimeout(() => h.remove(), 600), r == null || r(v);
|
|
3988
3991
|
}, u = ((f = we[n]) == null ? void 0 : f[e === "filled" ? "filled" : e === "outlined" ? "outline" : "transparent"]) || "";
|
|
3989
3992
|
return /* @__PURE__ */ a.jsx(
|
|
3990
3993
|
"button",
|
|
@@ -4028,8 +4031,8 @@ const Bn = ({
|
|
|
4028
4031
|
avatar: p,
|
|
4029
4032
|
icon: m
|
|
4030
4033
|
}) => {
|
|
4031
|
-
var
|
|
4032
|
-
const u = (
|
|
4034
|
+
var w, S;
|
|
4035
|
+
const u = (w = we[n]) == null ? void 0 : w.filled, f = (S = we[n]) == null ? void 0 : S.outline, v = bo[r], g = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${f}` : u} ${v} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), h = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4033
4036
|
p && /* @__PURE__ */ a.jsx(Bn, { ...typeof p == "object" ? p : {}, className: `-ml-1 mr-1 ${hn[r]}` }),
|
|
4034
4037
|
m && /* @__PURE__ */ a.jsx("span", { className: "mr-1 -ml-1", children: m }),
|
|
4035
4038
|
/* @__PURE__ */ a.jsx("span", { children: e }),
|
|
@@ -4055,14 +4058,14 @@ const Bn = ({
|
|
|
4055
4058
|
target: d,
|
|
4056
4059
|
className: `no-underline ${g} ${o}`,
|
|
4057
4060
|
onClick: i,
|
|
4058
|
-
children:
|
|
4061
|
+
children: h
|
|
4059
4062
|
}
|
|
4060
4063
|
) : /* @__PURE__ */ a.jsx(
|
|
4061
4064
|
"span",
|
|
4062
4065
|
{
|
|
4063
4066
|
className: `${g} ${o}`,
|
|
4064
4067
|
onClick: i,
|
|
4065
|
-
children:
|
|
4068
|
+
children: h
|
|
4066
4069
|
}
|
|
4067
4070
|
);
|
|
4068
4071
|
}, Di = ({
|
|
@@ -4337,22 +4340,22 @@ function Je(e, n, t, r) {
|
|
|
4337
4340
|
id: [r, `${f}`].filter(Boolean).join("_"),
|
|
4338
4341
|
headers: []
|
|
4339
4342
|
}, g = [];
|
|
4340
|
-
u.forEach((
|
|
4341
|
-
const
|
|
4343
|
+
u.forEach((h) => {
|
|
4344
|
+
const w = [...g].reverse()[0], S = h.column.depth === v.depth;
|
|
4342
4345
|
let y, $ = !1;
|
|
4343
|
-
if (S &&
|
|
4344
|
-
|
|
4346
|
+
if (S && h.column.parent ? y = h.column.parent : (y = h.column, $ = !0), w && (w == null ? void 0 : w.column) === y)
|
|
4347
|
+
w.subHeaders.push(h);
|
|
4345
4348
|
else {
|
|
4346
4349
|
const b = wn(t, y, {
|
|
4347
|
-
id: [r, f, y.id,
|
|
4350
|
+
id: [r, f, y.id, h == null ? void 0 : h.id].filter(Boolean).join("_"),
|
|
4348
4351
|
isPlaceholder: $,
|
|
4349
|
-
placeholderId: $ ? `${g.filter((
|
|
4352
|
+
placeholderId: $ ? `${g.filter((A) => A.column === y).length}` : void 0,
|
|
4350
4353
|
depth: f,
|
|
4351
4354
|
index: g.length
|
|
4352
4355
|
});
|
|
4353
|
-
b.subHeaders.push(
|
|
4356
|
+
b.subHeaders.push(h), g.push(b);
|
|
4354
4357
|
}
|
|
4355
|
-
v.headers.push(
|
|
4358
|
+
v.headers.push(h), h.headerGroup = v;
|
|
4356
4359
|
}), c.push(v), f > 0 && d(g, f - 1);
|
|
4357
4360
|
}, p = n.map((u, f) => wn(t, u, {
|
|
4358
4361
|
depth: l,
|
|
@@ -4360,18 +4363,18 @@ function Je(e, n, t, r) {
|
|
|
4360
4363
|
}));
|
|
4361
4364
|
d(p, l - 1), c.reverse();
|
|
4362
4365
|
const m = (u) => u.filter((v) => v.column.getIsVisible()).map((v) => {
|
|
4363
|
-
let g = 0,
|
|
4364
|
-
v.subHeaders && v.subHeaders.length ? (
|
|
4366
|
+
let g = 0, h = 0, w = [0];
|
|
4367
|
+
v.subHeaders && v.subHeaders.length ? (w = [], m(v.subHeaders).forEach((y) => {
|
|
4365
4368
|
let {
|
|
4366
4369
|
colSpan: $,
|
|
4367
4370
|
rowSpan: b
|
|
4368
4371
|
} = y;
|
|
4369
|
-
g += $,
|
|
4372
|
+
g += $, w.push(b);
|
|
4370
4373
|
})) : g = 1;
|
|
4371
|
-
const S = Math.min(...
|
|
4372
|
-
return
|
|
4374
|
+
const S = Math.min(...w);
|
|
4375
|
+
return h = h + S, v.colSpan = g, v.rowSpan = h, {
|
|
4373
4376
|
colSpan: g,
|
|
4374
|
-
rowSpan:
|
|
4377
|
+
rowSpan: h
|
|
4375
4378
|
};
|
|
4376
4379
|
});
|
|
4377
4380
|
return m((o = (i = c[0]) == null ? void 0 : i.headers) != null ? o : []), c;
|
|
@@ -4872,24 +4875,24 @@ const Io = {
|
|
|
4872
4875
|
return (i) => {
|
|
4873
4876
|
if (!r || !o || (i.persist == null || i.persist(), St(i) && i.touches && i.touches.length > 1))
|
|
4874
4877
|
return;
|
|
4875
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((
|
|
4878
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[r.id, r.getSize()]], c = St(i) ? Math.round(i.touches[0].clientX) : i.clientX, d = {}, p = (w, S) => {
|
|
4876
4879
|
typeof S == "number" && (n.setColumnSizingInfo((y) => {
|
|
4877
4880
|
var $, b;
|
|
4878
|
-
const
|
|
4879
|
-
return y.columnSizingStart.forEach((
|
|
4880
|
-
let [
|
|
4881
|
-
d[
|
|
4881
|
+
const A = n.options.columnResizeDirection === "rtl" ? -1 : 1, R = (S - (($ = y == null ? void 0 : y.startOffset) != null ? $ : 0)) * A, O = Math.max(R / ((b = y == null ? void 0 : y.startSize) != null ? b : 0), -0.999999);
|
|
4882
|
+
return y.columnSizingStart.forEach((J) => {
|
|
4883
|
+
let [U, K] = J;
|
|
4884
|
+
d[U] = Math.round(Math.max(K + K * O, 0) * 100) / 100;
|
|
4882
4885
|
}), {
|
|
4883
4886
|
...y,
|
|
4884
4887
|
deltaOffset: R,
|
|
4885
|
-
deltaPercentage:
|
|
4888
|
+
deltaPercentage: O
|
|
4886
4889
|
};
|
|
4887
|
-
}), (n.options.columnResizeMode === "onChange" ||
|
|
4890
|
+
}), (n.options.columnResizeMode === "onChange" || w === "end") && n.setColumnSizing((y) => ({
|
|
4888
4891
|
...y,
|
|
4889
4892
|
...d
|
|
4890
4893
|
})));
|
|
4891
|
-
}, m = (
|
|
4892
|
-
p("end",
|
|
4894
|
+
}, m = (w) => p("move", w), u = (w) => {
|
|
4895
|
+
p("end", w), n.setColumnSizingInfo((S) => ({
|
|
4893
4896
|
...S,
|
|
4894
4897
|
isResizingColumn: !1,
|
|
4895
4898
|
startOffset: null,
|
|
@@ -4899,21 +4902,21 @@ const Io = {
|
|
|
4899
4902
|
columnSizingStart: []
|
|
4900
4903
|
}));
|
|
4901
4904
|
}, f = t || typeof document < "u" ? document : null, v = {
|
|
4902
|
-
moveHandler: (
|
|
4903
|
-
upHandler: (
|
|
4904
|
-
f == null || f.removeEventListener("mousemove", v.moveHandler), f == null || f.removeEventListener("mouseup", v.upHandler), u(
|
|
4905
|
+
moveHandler: (w) => m(w.clientX),
|
|
4906
|
+
upHandler: (w) => {
|
|
4907
|
+
f == null || f.removeEventListener("mousemove", v.moveHandler), f == null || f.removeEventListener("mouseup", v.upHandler), u(w.clientX);
|
|
4905
4908
|
}
|
|
4906
4909
|
}, g = {
|
|
4907
|
-
moveHandler: (
|
|
4908
|
-
upHandler: (
|
|
4910
|
+
moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1),
|
|
4911
|
+
upHandler: (w) => {
|
|
4909
4912
|
var S;
|
|
4910
|
-
f == null || f.removeEventListener("touchmove", g.moveHandler), f == null || f.removeEventListener("touchend", g.upHandler),
|
|
4913
|
+
f == null || f.removeEventListener("touchmove", g.moveHandler), f == null || f.removeEventListener("touchend", g.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), u((S = w.touches[0]) == null ? void 0 : S.clientX);
|
|
4911
4914
|
}
|
|
4912
|
-
},
|
|
4915
|
+
}, h = qo() ? {
|
|
4913
4916
|
passive: !1
|
|
4914
4917
|
} : !1;
|
|
4915
|
-
St(i) ? (f == null || f.addEventListener("touchmove", g.moveHandler,
|
|
4916
|
-
...
|
|
4918
|
+
St(i) ? (f == null || f.addEventListener("touchmove", g.moveHandler, h), f == null || f.addEventListener("touchend", g.upHandler, h)) : (f == null || f.addEventListener("mousemove", v.moveHandler, h), f == null || f.addEventListener("mouseup", v.upHandler, h)), n.setColumnSizingInfo((w) => ({
|
|
4919
|
+
...w,
|
|
4917
4920
|
startOffset: c,
|
|
4918
4921
|
startSize: l,
|
|
4919
4922
|
deltaOffset: 0,
|
|
@@ -5702,8 +5705,8 @@ function ii(e) {
|
|
|
5702
5705
|
},
|
|
5703
5706
|
// footer: props => props.header.column.id,
|
|
5704
5707
|
cell: (v) => {
|
|
5705
|
-
var g,
|
|
5706
|
-
return (g = (
|
|
5708
|
+
var g, h;
|
|
5709
|
+
return (g = (h = v.renderValue()) == null || h.toString == null ? void 0 : h.toString()) != null ? g : null;
|
|
5707
5710
|
},
|
|
5708
5711
|
...o._features.reduce((v, g) => Object.assign(v, g.getDefaultColumnDef == null ? void 0 : g.getDefaultColumnDef()), {}),
|
|
5709
5712
|
...u
|
|
@@ -5711,10 +5714,10 @@ function ii(e) {
|
|
|
5711
5714
|
}, W(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5712
5715
|
_getColumnDefs: () => o.options.columns,
|
|
5713
5716
|
getAllColumns: Z(() => [o._getColumnDefs()], (u) => {
|
|
5714
|
-
const f = function(v, g,
|
|
5715
|
-
return
|
|
5716
|
-
const S = So(o,
|
|
5717
|
-
return S.columns = y.columns ? f(y.columns, S,
|
|
5717
|
+
const f = function(v, g, h) {
|
|
5718
|
+
return h === void 0 && (h = 0), v.map((w) => {
|
|
5719
|
+
const S = So(o, w, h, g), y = w;
|
|
5720
|
+
return S.columns = y.columns ? f(y.columns, S, h + 1) : [], S;
|
|
5718
5721
|
});
|
|
5719
5722
|
};
|
|
5720
5723
|
return f(u);
|
|
@@ -5812,10 +5815,11 @@ const si = {
|
|
|
5812
5815
|
component: n,
|
|
5813
5816
|
className: t = "",
|
|
5814
5817
|
children: r,
|
|
5815
|
-
|
|
5818
|
+
id: o,
|
|
5819
|
+
color: i = "dark"
|
|
5816
5820
|
}) => {
|
|
5817
|
-
var
|
|
5818
|
-
const
|
|
5821
|
+
var c;
|
|
5822
|
+
const s = n || {
|
|
5819
5823
|
h1: "h1",
|
|
5820
5824
|
h2: "h2",
|
|
5821
5825
|
h3: "h3",
|
|
@@ -5829,7 +5833,7 @@ const si = {
|
|
|
5829
5833
|
caption: "span",
|
|
5830
5834
|
overline: "span"
|
|
5831
5835
|
}[e] || "p";
|
|
5832
|
-
return /* @__PURE__ */ a.jsx(
|
|
5836
|
+
return /* @__PURE__ */ a.jsx(s, { className: `${si[e]} ${(c = we[i]) == null ? void 0 : c.text} ${t}`, id: o || "", children: r });
|
|
5833
5837
|
}, ui = ({
|
|
5834
5838
|
total: e,
|
|
5835
5839
|
currentPage: n,
|
|
@@ -5903,78 +5907,81 @@ const si = {
|
|
|
5903
5907
|
] });
|
|
5904
5908
|
}, Vi = ({
|
|
5905
5909
|
data: e,
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5910
|
+
id: n,
|
|
5911
|
+
columns: t = [],
|
|
5912
|
+
pageSize: r,
|
|
5913
|
+
pageIndex: o,
|
|
5914
|
+
onPageSizeChange: i,
|
|
5915
|
+
onPageChange: l,
|
|
5916
|
+
rowOptionArray: s = [5, 10, 15],
|
|
5917
|
+
totalRecords: c = e.length,
|
|
5918
|
+
className: d = "",
|
|
5919
|
+
paginationClassName: p = "",
|
|
5920
|
+
tdClassName: m = "",
|
|
5921
|
+
thClassName: u = "",
|
|
5922
|
+
responsive: f = !1
|
|
5918
5923
|
}) => {
|
|
5919
|
-
const
|
|
5924
|
+
const v = li({
|
|
5920
5925
|
data: e,
|
|
5921
|
-
columns:
|
|
5926
|
+
columns: t,
|
|
5922
5927
|
getCoreRowModel: ai(),
|
|
5923
5928
|
manualPagination: !0,
|
|
5924
|
-
pageCount: Math.ceil(
|
|
5929
|
+
pageCount: Math.ceil(c / r),
|
|
5925
5930
|
state: {
|
|
5926
|
-
pagination: { pageIndex:
|
|
5931
|
+
pagination: { pageIndex: o, pageSize: r }
|
|
5927
5932
|
}
|
|
5928
5933
|
});
|
|
5929
5934
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(
|
|
5930
5935
|
"div",
|
|
5931
5936
|
{
|
|
5932
|
-
className: `relative overflow-y-auto flex flex-col ${
|
|
5937
|
+
className: `relative overflow-y-auto flex flex-col ${d} `,
|
|
5933
5938
|
children: [
|
|
5934
|
-
/* @__PURE__ */ a.jsx("div", { className: `${
|
|
5935
|
-
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children:
|
|
5939
|
+
/* @__PURE__ */ a.jsx("div", { className: `${f ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ a.jsxs("table", { className: "w-full relative border-collapse", id: n, children: [
|
|
5940
|
+
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: v.getHeaderGroups().map((g) => /* @__PURE__ */ a.jsx("tr", { children: g.headers.map((h) => /* @__PURE__ */ a.jsx(
|
|
5936
5941
|
"th",
|
|
5937
5942
|
{
|
|
5938
|
-
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5943
|
+
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${u}`,
|
|
5944
|
+
id: n,
|
|
5945
|
+
children: h.isPlaceholder ? null : h.column.columnDef.header instanceof Function ? h.column.columnDef.header(
|
|
5946
|
+
h.getContext()
|
|
5947
|
+
) : h.column.columnDef.header
|
|
5942
5948
|
},
|
|
5943
|
-
|
|
5944
|
-
)) },
|
|
5945
|
-
/* @__PURE__ */ a.jsx("tbody", { className: "", children:
|
|
5949
|
+
h.id
|
|
5950
|
+
)) }, g.id)) }),
|
|
5951
|
+
/* @__PURE__ */ a.jsx("tbody", { className: "", children: v.getRowModel().rows.map((g) => /* @__PURE__ */ a.jsx(
|
|
5946
5952
|
"tr",
|
|
5947
5953
|
{
|
|
5948
5954
|
className: "border-b border-color-gray-200",
|
|
5949
|
-
children:
|
|
5955
|
+
children: g.getVisibleCells().map((h) => /* @__PURE__ */ a.jsx(
|
|
5950
5956
|
"td",
|
|
5951
5957
|
{
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5958
|
+
id: n,
|
|
5959
|
+
className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${m}`,
|
|
5960
|
+
children: h.column.columnDef.cell instanceof Function ? h.column.columnDef.cell(
|
|
5961
|
+
h.getContext()
|
|
5962
|
+
) : h.getValue()
|
|
5956
5963
|
},
|
|
5957
|
-
|
|
5964
|
+
h.id
|
|
5958
5965
|
))
|
|
5959
5966
|
},
|
|
5960
|
-
|
|
5967
|
+
g.id
|
|
5961
5968
|
)) })
|
|
5962
5969
|
] }) }),
|
|
5963
5970
|
/* @__PURE__ */ a.jsxs(
|
|
5964
5971
|
"div",
|
|
5965
5972
|
{
|
|
5966
|
-
className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${
|
|
5973
|
+
className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${p} sticky bottom-0 z-10`,
|
|
5967
5974
|
children: [
|
|
5968
5975
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5969
5976
|
/* @__PURE__ */ a.jsx(ci, { variant: "body2", className: "hidden md:!flex", children: "Rows per page" }),
|
|
5970
5977
|
/* @__PURE__ */ a.jsx(
|
|
5971
5978
|
po,
|
|
5972
5979
|
{
|
|
5973
|
-
options:
|
|
5974
|
-
selectedValue:
|
|
5980
|
+
options: s,
|
|
5981
|
+
selectedValue: r,
|
|
5975
5982
|
placementTop: !0,
|
|
5976
|
-
onChange: (
|
|
5977
|
-
|
|
5983
|
+
onChange: (g) => {
|
|
5984
|
+
i(g), l(0);
|
|
5978
5985
|
}
|
|
5979
5986
|
}
|
|
5980
5987
|
)
|
|
@@ -5982,10 +5989,10 @@ const si = {
|
|
|
5982
5989
|
/* @__PURE__ */ a.jsx(
|
|
5983
5990
|
ui,
|
|
5984
5991
|
{
|
|
5985
|
-
total:
|
|
5986
|
-
pageSize:
|
|
5987
|
-
currentPage:
|
|
5988
|
-
onPageChange: (
|
|
5992
|
+
total: c,
|
|
5993
|
+
pageSize: r,
|
|
5994
|
+
currentPage: o + 1,
|
|
5995
|
+
onPageChange: (g) => l(g - 1)
|
|
5989
5996
|
}
|
|
5990
5997
|
)
|
|
5991
5998
|
]
|
|
@@ -6043,29 +6050,29 @@ const si = {
|
|
|
6043
6050
|
labelClass: f = "",
|
|
6044
6051
|
variant: v = "outlined",
|
|
6045
6052
|
size: g = "medium",
|
|
6046
|
-
...
|
|
6047
|
-
},
|
|
6048
|
-
const [S, y] =
|
|
6049
|
-
let
|
|
6050
|
-
|
|
6051
|
-
...
|
|
6052
|
-
target: { ...
|
|
6053
|
-
}), $ || y(
|
|
6053
|
+
...h
|
|
6054
|
+
}, w) => {
|
|
6055
|
+
const [S, y] = ee(""), $ = n !== void 0, b = $ ? n : S, A = p ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", R = p ? "text-color-red-500" : s, O = (J) => {
|
|
6056
|
+
let U = J.target.value.replace(/(?!^\+)[^\d]/g, "");
|
|
6057
|
+
U.startsWith("+") && (U = "+" + U.slice(1).replace(/\+/g, "")), U = U.replace(/\s/g, ""), (!m || U.replace(/^\+/, "").length <= m) && (t && t({
|
|
6058
|
+
...J,
|
|
6059
|
+
target: { ...J.target, value: U }
|
|
6060
|
+
}), $ || y(U));
|
|
6054
6061
|
};
|
|
6055
6062
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
6056
6063
|
u && /* @__PURE__ */ a.jsx("label", { className: `text-sm font-medium text-color-gray-700 mb-1 block ${f}`, children: u }),
|
|
6057
|
-
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${
|
|
6064
|
+
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${A} ${di[v]} ${i}`, children: [
|
|
6058
6065
|
c && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${R}`, children: c }),
|
|
6059
6066
|
/* @__PURE__ */ a.jsx(
|
|
6060
6067
|
"input",
|
|
6061
6068
|
{
|
|
6062
|
-
...
|
|
6063
|
-
ref:
|
|
6069
|
+
...h,
|
|
6070
|
+
ref: w,
|
|
6064
6071
|
type: "text",
|
|
6065
6072
|
inputMode: "numeric",
|
|
6066
6073
|
placeholder: e,
|
|
6067
6074
|
value: b,
|
|
6068
|
-
onChange:
|
|
6075
|
+
onChange: O,
|
|
6069
6076
|
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${pi[g]} ${l}`
|
|
6070
6077
|
}
|
|
6071
6078
|
),
|
|
@@ -6228,29 +6235,29 @@ const Yi = rr(function({
|
|
|
6228
6235
|
showMarks: f = !1,
|
|
6229
6236
|
marks: v = [],
|
|
6230
6237
|
range: g = !1,
|
|
6231
|
-
minDistance:
|
|
6238
|
+
minDistance: h = 0
|
|
6232
6239
|
}) {
|
|
6233
|
-
const
|
|
6240
|
+
const w = n !== void 0, [S, y] = ee(() => t !== void 0 ? t : g ? [i, l] : i), $ = w ? n : S, b = Array.isArray($) ? $[0] : $, [A, R] = Array.isArray($) ? $ : [$, $], O = _t[c] || _t.blue, J = yn[d] ?? yn.medium, U = ce(
|
|
6234
6241
|
(F) => (F - i) / (l - i) * 100,
|
|
6235
6242
|
[i, l]
|
|
6236
|
-
),
|
|
6243
|
+
), K = U(b), de = U(A), D = U(R), z = ce((F) => Math.max(i, Math.min(l, F)), [i, l]), q = ce((F) => Math.round(F / s) * s, [s]), Q = vi(r), V = ce(
|
|
6237
6244
|
(F, re = !0) => {
|
|
6238
|
-
|
|
6245
|
+
w || y(F), re ? Q.schedule(F) : Q.flush(F);
|
|
6239
6246
|
},
|
|
6240
|
-
[
|
|
6247
|
+
[w, Q]
|
|
6241
6248
|
), ve = ce(() => {
|
|
6242
|
-
const F =
|
|
6243
|
-
F != null && (
|
|
6244
|
-
}, [
|
|
6249
|
+
const F = Q.last.current;
|
|
6250
|
+
F != null && (Q.flush(F), o == null || o(F));
|
|
6251
|
+
}, [Q, o]), X = ce(
|
|
6245
6252
|
(F, re) => {
|
|
6246
6253
|
if (g && Array.isArray(F)) {
|
|
6247
|
-
let [oe, ge] = F, H = q(
|
|
6248
|
-
return te - H <
|
|
6254
|
+
let [oe, ge] = F, H = q(z(oe)), te = q(z(ge));
|
|
6255
|
+
return te - H < h && (re === "min" ? te = z(H + h) : re === "max" && (H = z(te - h))), H > te && (re === "min" ? H = te : te = H), [H, te];
|
|
6249
6256
|
} else if (!g && typeof F == "number")
|
|
6250
|
-
return q(
|
|
6257
|
+
return q(z(F));
|
|
6251
6258
|
return F;
|
|
6252
6259
|
},
|
|
6253
|
-
[g,
|
|
6260
|
+
[g, z, q, h]
|
|
6254
6261
|
), x = me(null), j = ce(
|
|
6255
6262
|
(F) => {
|
|
6256
6263
|
var ge;
|
|
@@ -6262,11 +6269,11 @@ const Yi = rr(function({
|
|
|
6262
6269
|
[i, l, g, b]
|
|
6263
6270
|
), L = ce(
|
|
6264
6271
|
(F) => {
|
|
6265
|
-
const re = Math.abs(F -
|
|
6272
|
+
const re = Math.abs(F - A), oe = Math.abs(F - R);
|
|
6266
6273
|
return re <= oe ? "min" : "max";
|
|
6267
6274
|
},
|
|
6268
|
-
[
|
|
6269
|
-
), [E, P] =
|
|
6275
|
+
[A, R]
|
|
6276
|
+
), [E, P] = ee(null), [T, k] = ee(null), [B, N] = ee(null), G = ce(
|
|
6270
6277
|
(F, re) => {
|
|
6271
6278
|
var ge, H;
|
|
6272
6279
|
if (p) return;
|
|
@@ -6274,17 +6281,17 @@ const Yi = rr(function({
|
|
|
6274
6281
|
const oe = j(F.clientX);
|
|
6275
6282
|
if (g) {
|
|
6276
6283
|
const te = re || L(oe);
|
|
6277
|
-
P(te), V(te === "min" ?
|
|
6284
|
+
P(te), V(te === "min" ? X([oe, R], "min") : X([A, oe], "max"));
|
|
6278
6285
|
} else
|
|
6279
|
-
P("single"), V(
|
|
6286
|
+
P("single"), V(X(oe, "single"));
|
|
6280
6287
|
},
|
|
6281
6288
|
[
|
|
6282
6289
|
p,
|
|
6283
6290
|
g,
|
|
6284
6291
|
j,
|
|
6285
6292
|
L,
|
|
6286
|
-
|
|
6287
|
-
|
|
6293
|
+
X,
|
|
6294
|
+
A,
|
|
6288
6295
|
R,
|
|
6289
6296
|
V
|
|
6290
6297
|
]
|
|
@@ -6292,7 +6299,7 @@ const Yi = rr(function({
|
|
|
6292
6299
|
(F) => {
|
|
6293
6300
|
if (p || B == null || E == null) return;
|
|
6294
6301
|
const re = j(F.clientX);
|
|
6295
|
-
g ? E === "min" ? V(
|
|
6302
|
+
g ? E === "min" ? V(X([re, R], "min")) : E === "max" && V(X([A, re], "max")) : V(X(re, "single"));
|
|
6296
6303
|
},
|
|
6297
6304
|
[
|
|
6298
6305
|
p,
|
|
@@ -6300,8 +6307,8 @@ const Yi = rr(function({
|
|
|
6300
6307
|
E,
|
|
6301
6308
|
g,
|
|
6302
6309
|
j,
|
|
6303
|
-
|
|
6304
|
-
|
|
6310
|
+
X,
|
|
6311
|
+
A,
|
|
6305
6312
|
R,
|
|
6306
6313
|
V
|
|
6307
6314
|
]
|
|
@@ -6310,7 +6317,7 @@ const Yi = rr(function({
|
|
|
6310
6317
|
}, [E, ve]), _ = ce(
|
|
6311
6318
|
(F, re) => {
|
|
6312
6319
|
if (p) return;
|
|
6313
|
-
const oe = g ? re === "min" ?
|
|
6320
|
+
const oe = g ? re === "min" ? A : R : b;
|
|
6314
6321
|
let ge = oe;
|
|
6315
6322
|
const H = (l - i) / 10;
|
|
6316
6323
|
switch (F.key) {
|
|
@@ -6337,21 +6344,21 @@ const Yi = rr(function({
|
|
|
6337
6344
|
default:
|
|
6338
6345
|
return;
|
|
6339
6346
|
}
|
|
6340
|
-
F.preventDefault(), V(g ? re === "min" ?
|
|
6347
|
+
F.preventDefault(), V(g ? re === "min" ? X([ge, R], "min") : X([A, ge], "max") : X(ge, "single"), !1), o == null || o(w ? n : $);
|
|
6341
6348
|
},
|
|
6342
6349
|
[
|
|
6343
6350
|
p,
|
|
6344
6351
|
g,
|
|
6345
6352
|
b,
|
|
6346
|
-
|
|
6353
|
+
A,
|
|
6347
6354
|
R,
|
|
6348
6355
|
s,
|
|
6349
6356
|
i,
|
|
6350
6357
|
l,
|
|
6351
|
-
|
|
6358
|
+
X,
|
|
6352
6359
|
V,
|
|
6353
6360
|
o,
|
|
6354
|
-
|
|
6361
|
+
w,
|
|
6355
6362
|
n,
|
|
6356
6363
|
$
|
|
6357
6364
|
]
|
|
@@ -6363,14 +6370,14 @@ const Yi = rr(function({
|
|
|
6363
6370
|
document.body.style.userSelect = F;
|
|
6364
6371
|
};
|
|
6365
6372
|
}, [E]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${m}`, children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex items-center", children: [
|
|
6366
|
-
g && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children:
|
|
6373
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children: A }) }) }),
|
|
6367
6374
|
/* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
6368
6375
|
/* @__PURE__ */ a.jsxs(
|
|
6369
6376
|
"div",
|
|
6370
6377
|
{
|
|
6371
6378
|
ref: x,
|
|
6372
6379
|
className: `
|
|
6373
|
-
relative w-full ${
|
|
6380
|
+
relative w-full ${J.track} ${O.track} rounded-full
|
|
6374
6381
|
${p ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}
|
|
6375
6382
|
`,
|
|
6376
6383
|
onPointerDown: (F) => G(F),
|
|
@@ -6381,18 +6388,18 @@ const Yi = rr(function({
|
|
|
6381
6388
|
g ? /* @__PURE__ */ a.jsx(
|
|
6382
6389
|
"div",
|
|
6383
6390
|
{
|
|
6384
|
-
className: `absolute top-0 ${
|
|
6391
|
+
className: `absolute top-0 ${J.track} ${O.progress} rounded-full ${E ? "" : "transition-all duration-150"}`,
|
|
6385
6392
|
style: { left: `${de}%`, width: `${D - de}%` }
|
|
6386
6393
|
}
|
|
6387
6394
|
) : /* @__PURE__ */ a.jsx(
|
|
6388
6395
|
"div",
|
|
6389
6396
|
{
|
|
6390
|
-
className: `absolute top-0 left-0 ${
|
|
6391
|
-
style: { width: `${
|
|
6397
|
+
className: `absolute top-0 left-0 ${J.track} ${O.progress} rounded-full ${E ? "" : "transition-all duration-150"}`,
|
|
6398
|
+
style: { width: `${K}%` }
|
|
6392
6399
|
}
|
|
6393
6400
|
),
|
|
6394
6401
|
f && v.map((F, re) => {
|
|
6395
|
-
const oe =
|
|
6402
|
+
const oe = U(F.value);
|
|
6396
6403
|
return /* @__PURE__ */ a.jsx(
|
|
6397
6404
|
"div",
|
|
6398
6405
|
{
|
|
@@ -6407,13 +6414,13 @@ const Yi = rr(function({
|
|
|
6407
6414
|
{
|
|
6408
6415
|
className: `
|
|
6409
6416
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2
|
|
6410
|
-
${
|
|
6417
|
+
${J.thumb} ${O.thumb} ${O.thumbHover} ${O.thumbActive}
|
|
6411
6418
|
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6412
6419
|
${E === "single" ? "cursor-grabbing scale-110" : E ? "" : "transition-all duration-150"}
|
|
6413
|
-
${
|
|
6420
|
+
${T === "single" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6414
6421
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6415
6422
|
`,
|
|
6416
|
-
style: { left: `${
|
|
6423
|
+
style: { left: `${K}%` },
|
|
6417
6424
|
tabIndex: p ? -1 : 0,
|
|
6418
6425
|
role: "slider",
|
|
6419
6426
|
"aria-orientation": "horizontal",
|
|
@@ -6433,10 +6440,10 @@ const Yi = rr(function({
|
|
|
6433
6440
|
{
|
|
6434
6441
|
className: `
|
|
6435
6442
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6436
|
-
${
|
|
6443
|
+
${J.thumb} ${O.thumb} ${O.thumbHover} ${O.thumbActive}
|
|
6437
6444
|
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6438
6445
|
${E === "min" ? "cursor-grabbing scale-110 z-20" : E ? "" : "transition-all duration-150"}
|
|
6439
|
-
${
|
|
6446
|
+
${T === "min" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6440
6447
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6441
6448
|
`,
|
|
6442
6449
|
style: { left: `${de}%` },
|
|
@@ -6445,7 +6452,7 @@ const Yi = rr(function({
|
|
|
6445
6452
|
"aria-orientation": "horizontal",
|
|
6446
6453
|
"aria-valuemin": i,
|
|
6447
6454
|
"aria-valuemax": l,
|
|
6448
|
-
"aria-valuenow":
|
|
6455
|
+
"aria-valuenow": A,
|
|
6449
6456
|
"aria-disabled": p,
|
|
6450
6457
|
"aria-label": "Minimum value",
|
|
6451
6458
|
onKeyDown: (F) => _(F, "min"),
|
|
@@ -6459,10 +6466,10 @@ const Yi = rr(function({
|
|
|
6459
6466
|
{
|
|
6460
6467
|
className: `
|
|
6461
6468
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6462
|
-
${
|
|
6469
|
+
${J.thumb} ${O.thumb} ${O.thumbHover} ${O.thumbActive}
|
|
6463
6470
|
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6464
6471
|
${E === "max" ? "cursor-grabbing scale-110 z-20" : E ? "" : "transition-all duration-150"}
|
|
6465
|
-
${
|
|
6472
|
+
${T === "max" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6466
6473
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6467
6474
|
`,
|
|
6468
6475
|
style: { left: `${D}%` },
|
|
@@ -6489,7 +6496,7 @@ const Yi = rr(function({
|
|
|
6489
6496
|
{
|
|
6490
6497
|
className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
|
|
6491
6498
|
children: v.map((F, re) => {
|
|
6492
|
-
const oe =
|
|
6499
|
+
const oe = U(F.value);
|
|
6493
6500
|
return /* @__PURE__ */ a.jsx(
|
|
6494
6501
|
"div",
|
|
6495
6502
|
{
|
|
@@ -6697,20 +6704,20 @@ const Yi = rr(function({
|
|
|
6697
6704
|
}) => {
|
|
6698
6705
|
const [f, v] = ke.useState(null), g = (y, $) => {
|
|
6699
6706
|
if (t || r || !n) return;
|
|
6700
|
-
const { left: b, width:
|
|
6701
|
-
let
|
|
6702
|
-
|
|
6703
|
-
},
|
|
6707
|
+
const { left: b, width: A } = y.target.getBoundingClientRect(), R = (y.clientX - b) / A;
|
|
6708
|
+
let O = $ - 1 + Math.ceil(R / o) * o;
|
|
6709
|
+
O = Math.min(i, Math.max(o, Math.round(O / o) * o)), n(O);
|
|
6710
|
+
}, h = (y, $) => {
|
|
6704
6711
|
if (t || r) return;
|
|
6705
|
-
const { left: b, width:
|
|
6706
|
-
let
|
|
6707
|
-
|
|
6708
|
-
},
|
|
6712
|
+
const { left: b, width: A } = y.target.getBoundingClientRect(), R = (y.clientX - b) / A;
|
|
6713
|
+
let O = $ - 1 + Math.ceil(R / o) * o;
|
|
6714
|
+
O = Math.min(i, Math.max(o, Math.round(O / o) * o)), v(O);
|
|
6715
|
+
}, w = () => v(null), S = [];
|
|
6709
6716
|
for (let y = 1; y <= i; y++) {
|
|
6710
|
-
let $ = (f !== null ? f : e) >= y, b = !$ && (f !== null ? f : e) > y - 1,
|
|
6717
|
+
let $ = (f !== null ? f : e) >= y, b = !$ && (f !== null ? f : e) > y - 1, A = $ ? s || ke.cloneElement(Cn, { className: `fill-color-yellow-500 ${tt[l]}` }) : c || ke.cloneElement(jn, { className: `stroke-color-gray-300 ${tt[l]}` });
|
|
6711
6718
|
if (b) {
|
|
6712
6719
|
const R = ((f !== null ? f : e) - (y - 1)) * 100;
|
|
6713
|
-
|
|
6720
|
+
A = /* @__PURE__ */ a.jsxs("span", { className: "relative block", children: [
|
|
6714
6721
|
/* @__PURE__ */ a.jsx(
|
|
6715
6722
|
"span",
|
|
6716
6723
|
{
|
|
@@ -6732,13 +6739,13 @@ const Yi = rr(function({
|
|
|
6732
6739
|
{
|
|
6733
6740
|
className: `inline-block ${r ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6734
6741
|
onClick: (R) => g(R, y),
|
|
6735
|
-
onMouseMove: (R) =>
|
|
6736
|
-
onMouseLeave:
|
|
6742
|
+
onMouseMove: (R) => h(R, y),
|
|
6743
|
+
onMouseLeave: w,
|
|
6737
6744
|
tabIndex: t || r ? -1 : 0,
|
|
6738
6745
|
"aria-label": `Rate ${y}`,
|
|
6739
6746
|
role: "radio",
|
|
6740
6747
|
"aria-checked": e === y,
|
|
6741
|
-
children:
|
|
6748
|
+
children: A
|
|
6742
6749
|
},
|
|
6743
6750
|
y
|
|
6744
6751
|
)
|
|
@@ -6749,7 +6756,7 @@ const Yi = rr(function({
|
|
|
6749
6756
|
p && f !== null ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: u[f] || f }) : m ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: u[e] || e }) : null
|
|
6750
6757
|
] });
|
|
6751
6758
|
}, hi = () => {
|
|
6752
|
-
const [e, n] =
|
|
6759
|
+
const [e, n] = ee("desktop");
|
|
6753
6760
|
return pe(() => {
|
|
6754
6761
|
const t = () => {
|
|
6755
6762
|
const r = window.innerWidth;
|
|
@@ -6785,61 +6792,61 @@ const Yi = rr(function({
|
|
|
6785
6792
|
swipeable: f = !0,
|
|
6786
6793
|
thumbWidth: v = 60,
|
|
6787
6794
|
orientation: g = "horizontal",
|
|
6788
|
-
nextIcon:
|
|
6789
|
-
prevIcon:
|
|
6795
|
+
nextIcon: h,
|
|
6796
|
+
prevIcon: w,
|
|
6790
6797
|
className: S,
|
|
6791
6798
|
mobile: y,
|
|
6792
6799
|
tablet: $,
|
|
6793
6800
|
desktop: b
|
|
6794
6801
|
}) => {
|
|
6795
|
-
const
|
|
6802
|
+
const A = hi(), R = ze(
|
|
6796
6803
|
y == null ? void 0 : y.perview,
|
|
6797
6804
|
$ == null ? void 0 : $.perview,
|
|
6798
6805
|
b == null ? void 0 : b.perview,
|
|
6799
6806
|
c,
|
|
6800
|
-
|
|
6801
|
-
),
|
|
6807
|
+
A
|
|
6808
|
+
), O = ze(
|
|
6802
6809
|
y == null ? void 0 : y.gap,
|
|
6803
6810
|
$ == null ? void 0 : $.gap,
|
|
6804
6811
|
b == null ? void 0 : b.gap,
|
|
6805
6812
|
d,
|
|
6806
|
-
|
|
6807
|
-
),
|
|
6813
|
+
A
|
|
6814
|
+
), J = ze(
|
|
6808
6815
|
y == null ? void 0 : y.showArrows,
|
|
6809
6816
|
$ == null ? void 0 : $.showArrows,
|
|
6810
6817
|
b == null ? void 0 : b.showArrows,
|
|
6811
6818
|
o,
|
|
6812
|
-
|
|
6813
|
-
),
|
|
6819
|
+
A
|
|
6820
|
+
), U = ze(
|
|
6814
6821
|
y == null ? void 0 : y.showIndicators,
|
|
6815
6822
|
$ == null ? void 0 : $.showIndicators,
|
|
6816
6823
|
b == null ? void 0 : b.showIndicators,
|
|
6817
6824
|
r,
|
|
6818
|
-
|
|
6819
|
-
),
|
|
6825
|
+
A
|
|
6826
|
+
), K = ze(
|
|
6820
6827
|
y == null ? void 0 : y.showThumbs,
|
|
6821
6828
|
$ == null ? void 0 : $.showThumbs,
|
|
6822
6829
|
b == null ? void 0 : b.showThumbs,
|
|
6823
6830
|
m,
|
|
6824
|
-
|
|
6831
|
+
A
|
|
6825
6832
|
), de = ze(
|
|
6826
6833
|
y == null ? void 0 : y.swipeable,
|
|
6827
6834
|
$ == null ? void 0 : $.swipeable,
|
|
6828
6835
|
b == null ? void 0 : b.swipeable,
|
|
6829
6836
|
f,
|
|
6830
|
-
|
|
6831
|
-
), D = e.length,
|
|
6837
|
+
A
|
|
6838
|
+
), D = e.length, z = Math.min(Math.max(R, 0.1), D), [q, Q] = ee(0), [V, ve] = ee(!1), [X, x] = ee(!1), [j, L] = ee(0), E = me(null), P = me(0), T = me(0), k = z >= D ? 0 : Math.max(0, D - z), B = (H) => Math.max(0, Math.min(H, k)), N = (H) => Q(
|
|
6832
6839
|
s && k > 0 ? (H % (k + 1) + (k + 1)) % (k + 1) : B(H)
|
|
6833
6840
|
), G = () => {
|
|
6834
|
-
s && k > 0 ?
|
|
6841
|
+
s && k > 0 ? Q(q === 0 ? k : q - 1) : N(q - 1);
|
|
6835
6842
|
}, Y = () => {
|
|
6836
|
-
s && k > 0 ?
|
|
6843
|
+
s && k > 0 ? Q(q >= k ? 0 : q + 1) : N(q + 1);
|
|
6837
6844
|
};
|
|
6838
6845
|
pe(() => {
|
|
6839
|
-
if (!i || u && V ||
|
|
6846
|
+
if (!i || u && V || X || k === 0)
|
|
6840
6847
|
return;
|
|
6841
6848
|
const H = setInterval(() => {
|
|
6842
|
-
|
|
6849
|
+
Q((te) => {
|
|
6843
6850
|
const je = te + 1;
|
|
6844
6851
|
return je > k ? s ? 0 : te : je;
|
|
6845
6852
|
});
|
|
@@ -6850,29 +6857,29 @@ const Yi = rr(function({
|
|
|
6850
6857
|
l,
|
|
6851
6858
|
V,
|
|
6852
6859
|
u,
|
|
6853
|
-
|
|
6860
|
+
X,
|
|
6854
6861
|
k,
|
|
6855
6862
|
s
|
|
6856
6863
|
]), pe(() => {
|
|
6857
|
-
q > k &&
|
|
6864
|
+
q > k && Q(Math.min(q, k));
|
|
6858
6865
|
}, [k, q]);
|
|
6859
6866
|
const se = (H, te) => {
|
|
6860
|
-
!de || k === 0 || (x(!0), P.current = g === "horizontal" ? H : te,
|
|
6867
|
+
!de || k === 0 || (x(!0), P.current = g === "horizontal" ? H : te, T.current = P.current);
|
|
6861
6868
|
}, _ = (H, te) => {
|
|
6862
|
-
|
|
6869
|
+
X && (T.current = g === "horizontal" ? H : te, L(T.current - P.current));
|
|
6863
6870
|
}, F = () => {
|
|
6864
|
-
if (!
|
|
6865
|
-
Math.abs(
|
|
6871
|
+
if (!X) return;
|
|
6872
|
+
Math.abs(T.current - P.current) > 50 && (T.current < P.current ? Y() : G()), x(!1), L(0);
|
|
6866
6873
|
}, re = () => {
|
|
6867
6874
|
const H = g === "horizontal" ? "X" : "Y";
|
|
6868
6875
|
let te = 0;
|
|
6869
|
-
if (
|
|
6876
|
+
if (X && E.current && k > 0) {
|
|
6870
6877
|
const M = g === "horizontal" ? E.current.offsetWidth : E.current.offsetHeight;
|
|
6871
|
-
te = j / M * 100 * (
|
|
6878
|
+
te = j / M * 100 * (z / D);
|
|
6872
6879
|
}
|
|
6873
|
-
const Se = Math.min(q, k) * (100 / D) - te, C = q >= k, he = q <= 0 ? 0 : C ?
|
|
6880
|
+
const Se = Math.min(q, k) * (100 / D) - te, C = q >= k, he = q <= 0 ? 0 : C ? O / (R / 2) : O / R;
|
|
6874
6881
|
return `translate${H}(calc(-${Se}% - ${he}px))`;
|
|
6875
|
-
}, oe = () =>
|
|
6882
|
+
}, oe = () => z >= D ? 1 : Math.floor(k) + 1, ge = () => k === 0 ? 0 : Math.round(q / k * (oe() - 1));
|
|
6876
6883
|
return /* @__PURE__ */ a.jsxs(
|
|
6877
6884
|
"div",
|
|
6878
6885
|
{
|
|
@@ -6885,9 +6892,9 @@ const Yi = rr(function({
|
|
|
6885
6892
|
"div",
|
|
6886
6893
|
{
|
|
6887
6894
|
ref: E,
|
|
6888
|
-
className: `w-full overflow-hidden relative ${de && k > 0 ?
|
|
6895
|
+
className: `w-full overflow-hidden relative ${de && k > 0 ? X ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
|
|
6889
6896
|
style: {
|
|
6890
|
-
height:
|
|
6897
|
+
height: K ? `calc(${t} - ${v + 20}px)` : t
|
|
6891
6898
|
},
|
|
6892
6899
|
onMouseDown: (H) => {
|
|
6893
6900
|
H.preventDefault(), se(H.clientX, H.clientY);
|
|
@@ -6904,28 +6911,28 @@ const Yi = rr(function({
|
|
|
6904
6911
|
{
|
|
6905
6912
|
className: `flex ${g === "horizontal" ? "flex-row" : "flex-col"} transition-all duration-300 ease-in-out`,
|
|
6906
6913
|
style: {
|
|
6907
|
-
width: g === "vertical" ? "100%" : `calc(${D * 100 /
|
|
6908
|
-
height: g === "vertical" ? `${D * 100 /
|
|
6914
|
+
width: g === "vertical" ? "100%" : `calc(${D * 100 / z}% + ${(D - 1) * O}px)`,
|
|
6915
|
+
height: g === "vertical" ? `${D * 100 / z}%` : "100%",
|
|
6909
6916
|
transform: re(),
|
|
6910
|
-
gap: `${
|
|
6911
|
-
transitionProperty:
|
|
6917
|
+
gap: `${O}px`,
|
|
6918
|
+
transitionProperty: X ? "none" : "transform"
|
|
6912
6919
|
},
|
|
6913
6920
|
children: e.map((H, te) => /* @__PURE__ */ a.jsx(
|
|
6914
6921
|
"div",
|
|
6915
6922
|
{
|
|
6916
6923
|
className: "shrink-0 flex items-center justify-center",
|
|
6917
6924
|
style: {
|
|
6918
|
-
width: g === "horizontal" ? `calc(${100 / D}% - ${
|
|
6919
|
-
height: g === "vertical" ? `calc(${100 / D}% - ${
|
|
6925
|
+
width: g === "horizontal" ? `calc(${100 / D}% - ${O / R}px)` : "100%",
|
|
6926
|
+
height: g === "vertical" ? `calc(${100 / D}% - ${O * (D - 1) / D}px)` : "100%"
|
|
6920
6927
|
},
|
|
6921
|
-
onClick: () => !
|
|
6928
|
+
onClick: () => !X && (p == null ? void 0 : p(te)),
|
|
6922
6929
|
children: H
|
|
6923
6930
|
},
|
|
6924
6931
|
te
|
|
6925
6932
|
))
|
|
6926
6933
|
}
|
|
6927
6934
|
),
|
|
6928
|
-
|
|
6935
|
+
J && k > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6929
6936
|
/* @__PURE__ */ a.jsx(
|
|
6930
6937
|
"button",
|
|
6931
6938
|
{
|
|
@@ -6933,7 +6940,7 @@ const Yi = rr(function({
|
|
|
6933
6940
|
onClick: G,
|
|
6934
6941
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-8 h-8 md:w-10 md:h-10 flex items-center justify-center text-sm md:text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
|
|
6935
6942
|
${g === "horizontal" ? "left-1 md:left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-1 md:top-2 -translate-x-1/2"}`,
|
|
6936
|
-
children:
|
|
6943
|
+
children: w || (g === "horizontal" ? "‹" : "↑")
|
|
6937
6944
|
}
|
|
6938
6945
|
),
|
|
6939
6946
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6943,11 +6950,11 @@ const Yi = rr(function({
|
|
|
6943
6950
|
onClick: Y,
|
|
6944
6951
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-8 h-8 md:w-10 md:h-10 flex items-center justify-center text-sm md:text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
|
|
6945
6952
|
${g === "horizontal" ? "right-1 md:right-2 top-1/2 -translate-y-1/2" : "left-1/2 bottom-1 md:bottom-2 -translate-x-1/2"}`,
|
|
6946
|
-
children:
|
|
6953
|
+
children: h || (g === "horizontal" ? "›" : "↓")
|
|
6947
6954
|
}
|
|
6948
6955
|
)
|
|
6949
6956
|
] }),
|
|
6950
|
-
|
|
6957
|
+
U && oe() > 1 && /* @__PURE__ */ a.jsx(
|
|
6951
6958
|
"div",
|
|
6952
6959
|
{
|
|
6953
6960
|
className: `uniui-indicator flex gap-1 mt-2 md:mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${g === "horizontal" ? "bottom-2 md:bottom-3 left-1/2 -translate-x-1/2" : "top-1/2 right-2 md:right-3 -translate-y-1/2 rotate-90"} z-10`,
|
|
@@ -6970,8 +6977,8 @@ const Yi = rr(function({
|
|
|
6970
6977
|
]
|
|
6971
6978
|
}
|
|
6972
6979
|
),
|
|
6973
|
-
|
|
6974
|
-
const je = te === Math.round(q), Se =
|
|
6980
|
+
K && /* @__PURE__ */ a.jsx("div", { className: "uniui-thumb flex gap-1 md:gap-2 mt-2 md:mt-3 justify-center flex-wrap", children: e.map((H, te) => {
|
|
6981
|
+
const je = te === Math.round(q), Se = A === "mobile" ? v * 0.8 : v;
|
|
6975
6982
|
return /* @__PURE__ */ a.jsx(
|
|
6976
6983
|
"div",
|
|
6977
6984
|
{
|
|
@@ -6980,7 +6987,7 @@ const Yi = rr(function({
|
|
|
6980
6987
|
0,
|
|
6981
6988
|
Math.min(
|
|
6982
6989
|
k,
|
|
6983
|
-
te - Math.floor(
|
|
6990
|
+
te - Math.floor(z / 2)
|
|
6984
6991
|
)
|
|
6985
6992
|
);
|
|
6986
6993
|
N(C);
|
|
@@ -7039,39 +7046,41 @@ const Yi = rr(function({
|
|
|
7039
7046
|
disabled: t = !1,
|
|
7040
7047
|
type: r = "button",
|
|
7041
7048
|
color: o = "green",
|
|
7042
|
-
variant: i = "ios"
|
|
7049
|
+
variant: i = "ios",
|
|
7043
7050
|
// <-- default to ios
|
|
7051
|
+
id: l
|
|
7044
7052
|
}) => {
|
|
7045
|
-
var
|
|
7046
|
-
const [
|
|
7047
|
-
if (!(t ||
|
|
7053
|
+
var u, f, v;
|
|
7054
|
+
const [s, c] = ee(e), [d, p] = ee(!1), m = async () => {
|
|
7055
|
+
if (!(t || d))
|
|
7048
7056
|
if (n) {
|
|
7049
|
-
|
|
7057
|
+
p(!0);
|
|
7050
7058
|
try {
|
|
7051
|
-
await n(!
|
|
7052
|
-
} catch (
|
|
7053
|
-
console.error("Toggle failed",
|
|
7059
|
+
await n(!s), c(!s);
|
|
7060
|
+
} catch (g) {
|
|
7061
|
+
console.error("Toggle failed", g);
|
|
7054
7062
|
} finally {
|
|
7055
|
-
|
|
7063
|
+
p(!1);
|
|
7056
7064
|
}
|
|
7057
7065
|
} else
|
|
7058
|
-
|
|
7066
|
+
c(!s);
|
|
7059
7067
|
};
|
|
7060
7068
|
return i === "android" ? /* @__PURE__ */ a.jsxs(
|
|
7061
7069
|
"button",
|
|
7062
7070
|
{
|
|
7063
|
-
onClick:
|
|
7071
|
+
onClick: m,
|
|
7072
|
+
id: l,
|
|
7064
7073
|
type: r,
|
|
7065
7074
|
disabled: t,
|
|
7066
7075
|
className: `relative w-10 h-3 flex items-center transition-color duration-300
|
|
7067
7076
|
} ${t ? "bg-color-gray-200 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
7068
7077
|
children: [
|
|
7069
|
-
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${
|
|
7078
|
+
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${s ? `${(u = we[o]) == null ? void 0 : u.filled}` : "bg-color-gray-400"}` }),
|
|
7070
7079
|
/* @__PURE__ */ a.jsx(
|
|
7071
7080
|
"div",
|
|
7072
7081
|
{
|
|
7073
|
-
className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${
|
|
7074
|
-
children:
|
|
7082
|
+
className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${s ? `translate-x-5 ${(f = we[o]) == null ? void 0 : f.filled}` : "translate-x-0 bg-color-white"}`,
|
|
7083
|
+
children: d ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
|
|
7075
7084
|
}
|
|
7076
7085
|
)
|
|
7077
7086
|
]
|
|
@@ -7079,15 +7088,16 @@ const Yi = rr(function({
|
|
|
7079
7088
|
) : /* @__PURE__ */ a.jsx(
|
|
7080
7089
|
"button",
|
|
7081
7090
|
{
|
|
7082
|
-
onClick:
|
|
7091
|
+
onClick: m,
|
|
7092
|
+
id: l,
|
|
7083
7093
|
type: r,
|
|
7084
7094
|
disabled: t,
|
|
7085
|
-
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${
|
|
7095
|
+
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${s ? (v = we[o]) == null ? void 0 : v.filled : "bg-color-gray-300"} ${t ? "bg-color-gray-300 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
7086
7096
|
children: /* @__PURE__ */ a.jsx(
|
|
7087
7097
|
"div",
|
|
7088
7098
|
{
|
|
7089
|
-
className: `absolute top-[4px] left-1 w-4 h-4 bg-color-white rounded-full flex items-center justify-center transition-all duration-300 ${
|
|
7090
|
-
children:
|
|
7099
|
+
className: `absolute top-[4px] left-1 w-4 h-4 bg-color-white rounded-full flex items-center justify-center transition-all duration-300 ${s ? "translate-x-[19px]" : "-translate-x-0"}`,
|
|
7100
|
+
children: d ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
|
|
7091
7101
|
}
|
|
7092
7102
|
)
|
|
7093
7103
|
}
|
|
@@ -7252,13 +7262,13 @@ const Yi = rr(function({
|
|
|
7252
7262
|
color: l = "blue",
|
|
7253
7263
|
className: s = "",
|
|
7254
7264
|
radioClass: c
|
|
7255
|
-
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${o === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: d, value: p, disabled: m }) => {
|
|
7256
|
-
var
|
|
7257
|
-
const
|
|
7265
|
+
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${o === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: d, value: p, disabled: m, id: u }) => {
|
|
7266
|
+
var v, g;
|
|
7267
|
+
const f = i || m;
|
|
7258
7268
|
return /* @__PURE__ */ a.jsxs(
|
|
7259
7269
|
"label",
|
|
7260
7270
|
{
|
|
7261
|
-
className: `relative flex items-center cursor-pointer select-none transition ${
|
|
7271
|
+
className: `relative flex items-center cursor-pointer select-none transition ${f ? "opacity-50 cursor-not-allowed" : "hover:opacity-90"}`,
|
|
7262
7272
|
children: [
|
|
7263
7273
|
/* @__PURE__ */ a.jsx(
|
|
7264
7274
|
"input",
|
|
@@ -7266,19 +7276,20 @@ const Yi = rr(function({
|
|
|
7266
7276
|
type: "radio",
|
|
7267
7277
|
name: e,
|
|
7268
7278
|
value: p,
|
|
7269
|
-
disabled:
|
|
7279
|
+
disabled: f,
|
|
7270
7280
|
checked: t === p,
|
|
7271
|
-
onChange: () => !
|
|
7272
|
-
className: "sr-only peer"
|
|
7281
|
+
onChange: () => !f && (r == null ? void 0 : r(p)),
|
|
7282
|
+
className: "sr-only peer",
|
|
7283
|
+
...u && { id: u }
|
|
7273
7284
|
}
|
|
7274
7285
|
),
|
|
7275
7286
|
/* @__PURE__ */ a.jsx(
|
|
7276
7287
|
"div",
|
|
7277
7288
|
{
|
|
7278
|
-
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(
|
|
7289
|
+
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(v = we[l]) == null ? void 0 : v.peer} ${c}`
|
|
7279
7290
|
}
|
|
7280
7291
|
),
|
|
7281
|
-
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(
|
|
7292
|
+
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(g = we[l]) == null ? void 0 : g.peer}`, children: d })
|
|
7282
7293
|
]
|
|
7283
7294
|
},
|
|
7284
7295
|
p
|
|
@@ -7330,7 +7341,7 @@ const Yi = rr(function({
|
|
|
7330
7341
|
children: n,
|
|
7331
7342
|
position: t = "top"
|
|
7332
7343
|
}) => {
|
|
7333
|
-
const [r, o] =
|
|
7344
|
+
const [r, o] = ee(!1), [i, l] = ee({ top: 0, left: 0 }), s = me(null), c = me(null);
|
|
7334
7345
|
return pe(() => {
|
|
7335
7346
|
if (r && s.current && c.current) {
|
|
7336
7347
|
const d = s.current.getBoundingClientRect(), p = c.current.getBoundingClientRect();
|
|
@@ -7401,17 +7412,17 @@ const Ci = {
|
|
|
7401
7412
|
fullWidth: d = !1,
|
|
7402
7413
|
maxWidth: p
|
|
7403
7414
|
}, m) => {
|
|
7404
|
-
const [u, f] =
|
|
7415
|
+
const [u, f] = ee(e || !1), [v, g] = ee(!1), [h, w] = ee(!1);
|
|
7405
7416
|
pe(() => {
|
|
7406
7417
|
e !== void 0 && f(e);
|
|
7407
7418
|
}, [e]), _n(m, () => ({
|
|
7408
7419
|
open: () => f(!0),
|
|
7409
7420
|
close: () => {
|
|
7410
|
-
|
|
7421
|
+
w(!1), setTimeout(() => f(!1), 300);
|
|
7411
7422
|
}
|
|
7412
7423
|
})), pe(() => {
|
|
7413
7424
|
let y;
|
|
7414
|
-
return u ? (g(!0), y = setTimeout(() =>
|
|
7425
|
+
return u ? (g(!0), y = setTimeout(() => w(!0), 10)) : w(!1), () => clearTimeout(y);
|
|
7415
7426
|
}, [u]);
|
|
7416
7427
|
const S = () => {
|
|
7417
7428
|
u || g(!1);
|
|
@@ -7429,7 +7440,7 @@ const Ci = {
|
|
|
7429
7440
|
{
|
|
7430
7441
|
className: yi(
|
|
7431
7442
|
"fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300",
|
|
7432
|
-
|
|
7443
|
+
h ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
7433
7444
|
),
|
|
7434
7445
|
children: [
|
|
7435
7446
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7444,7 +7455,7 @@ const Ci = {
|
|
|
7444
7455
|
/* @__PURE__ */ a.jsxs(
|
|
7445
7456
|
"div",
|
|
7446
7457
|
{
|
|
7447
|
-
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${
|
|
7458
|
+
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${h ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${c ? "w-full h-[calc(100%_-_40px)] m-5" : `${d ? "w-full" : "w-auto"} ${p ? Ci[p] : ""} mx-5`} ${r}`,
|
|
7448
7459
|
onTransitionEnd: S,
|
|
7449
7460
|
children: [
|
|
7450
7461
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -7476,8 +7487,8 @@ const Ci = {
|
|
|
7476
7487
|
}
|
|
7477
7488
|
);
|
|
7478
7489
|
function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, positioning: o = "fixed" }) {
|
|
7479
|
-
const [i, l] =
|
|
7480
|
-
g.stopPropagation(), l((
|
|
7490
|
+
const [i, l] = ee(!1), [s, c] = ee({ top: 0, left: 0 }), [d, p] = ee(!1), m = me(null), u = me(null), f = (g) => {
|
|
7491
|
+
g.stopPropagation(), l((h) => !h), p(!1), i || c(o === "fixed" ? {
|
|
7481
7492
|
top: g.clientY,
|
|
7482
7493
|
left: g.clientX
|
|
7483
7494
|
} : {
|
|
@@ -7487,23 +7498,23 @@ function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, position
|
|
|
7487
7498
|
};
|
|
7488
7499
|
or(() => {
|
|
7489
7500
|
if (i && u.current) {
|
|
7490
|
-
const g = u.current.getBoundingClientRect(),
|
|
7501
|
+
const g = u.current.getBoundingClientRect(), h = window.innerWidth, w = window.innerHeight;
|
|
7491
7502
|
let { left: S, top: y } = s;
|
|
7492
7503
|
const $ = S, b = y;
|
|
7493
7504
|
if (o === "fixed")
|
|
7494
|
-
S + g.width >
|
|
7505
|
+
S + g.width > h && (S = h - g.width - 12), S < 12 && (S = 12), y + g.height > w && (y = b - g.height), y < 12 && (y = 12);
|
|
7495
7506
|
else {
|
|
7496
|
-
const
|
|
7497
|
-
S -
|
|
7507
|
+
const A = window.scrollX, R = window.scrollY;
|
|
7508
|
+
S - A + g.width > h && (S = A + h - g.width - 12), S < A + 12 && (S = A + 12), y - R + g.height > w && (y = b - g.height), y < R + 12 && (y = R + 12);
|
|
7498
7509
|
}
|
|
7499
7510
|
(S !== $ || y !== b) && c({ top: y, left: S }), setTimeout(() => {
|
|
7500
7511
|
p(!0);
|
|
7501
7512
|
}, 150);
|
|
7502
7513
|
}
|
|
7503
7514
|
}, [i, o]), pe(() => {
|
|
7504
|
-
const g = (
|
|
7505
|
-
var
|
|
7506
|
-
u.current && !u.current.contains(
|
|
7515
|
+
const g = (h) => {
|
|
7516
|
+
var w;
|
|
7517
|
+
u.current && !u.current.contains(h.target) && !((w = m.current) != null && w.contains(h.target)) && l(!1);
|
|
7507
7518
|
};
|
|
7508
7519
|
return i && document.addEventListener("mousedown", g), () => {
|
|
7509
7520
|
document.removeEventListener("mousedown", g);
|
|
@@ -7518,13 +7529,13 @@ function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, position
|
|
|
7518
7529
|
top: s.top,
|
|
7519
7530
|
left: s.left
|
|
7520
7531
|
},
|
|
7521
|
-
children: e.map((g,
|
|
7532
|
+
children: e.map((g, h) => /* @__PURE__ */ a.jsxs(
|
|
7522
7533
|
"button",
|
|
7523
7534
|
{
|
|
7524
7535
|
disabled: g.disabled,
|
|
7525
7536
|
onClick: () => {
|
|
7526
|
-
var
|
|
7527
|
-
(
|
|
7537
|
+
var w;
|
|
7538
|
+
(w = g.onClick) == null || w.call(g), l(!1);
|
|
7528
7539
|
},
|
|
7529
7540
|
className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${g.disabled ? "opacity-50 hover:bg-color-transparent !cursor-not-allowed" : ""} ${r} ${g.itemClass}`,
|
|
7530
7541
|
children: [
|
|
@@ -7532,7 +7543,7 @@ function oa({ items: e, trigger: n, className: t, dropdownItemClass: r, position
|
|
|
7532
7543
|
/* @__PURE__ */ a.jsx("span", { children: g.label })
|
|
7533
7544
|
]
|
|
7534
7545
|
},
|
|
7535
|
-
|
|
7546
|
+
h
|
|
7536
7547
|
))
|
|
7537
7548
|
}
|
|
7538
7549
|
);
|
|
@@ -7555,21 +7566,21 @@ const $i = ({
|
|
|
7555
7566
|
showCloseIcon: s = !0,
|
|
7556
7567
|
anchor: c = "left"
|
|
7557
7568
|
}) => {
|
|
7558
|
-
const [d, p] =
|
|
7569
|
+
const [d, p] = ee(!1), [m, u] = ee(!1);
|
|
7559
7570
|
pe(() => {
|
|
7560
|
-
let
|
|
7561
|
-
return e ? (p(!0),
|
|
7571
|
+
let h;
|
|
7572
|
+
return e ? (p(!0), h = setTimeout(() => {
|
|
7562
7573
|
u(!0);
|
|
7563
|
-
}, 10)) : u(!1), () => clearTimeout(
|
|
7574
|
+
}, 10)) : u(!1), () => clearTimeout(h);
|
|
7564
7575
|
}, [e]);
|
|
7565
7576
|
const f = () => {
|
|
7566
7577
|
e || p(!1);
|
|
7567
7578
|
};
|
|
7568
7579
|
if (pe(() => {
|
|
7569
|
-
const
|
|
7570
|
-
|
|
7580
|
+
const h = (w) => {
|
|
7581
|
+
w.key === "Escape" && (n == null || n());
|
|
7571
7582
|
};
|
|
7572
|
-
return e && document.addEventListener("keydown",
|
|
7583
|
+
return e && document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
7573
7584
|
}, [e, n]), pe(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7574
7585
|
document.body.style.overflow = "";
|
|
7575
7586
|
}), [e]), !d) return null;
|
|
@@ -7640,7 +7651,7 @@ const $i = ({
|
|
|
7640
7651
|
titleClass: c = "",
|
|
7641
7652
|
contentClass: d = ""
|
|
7642
7653
|
}) => {
|
|
7643
|
-
const [p, m] =
|
|
7654
|
+
const [p, m] = ee(i), u = o !== void 0, f = u ? o : p, v = () => {
|
|
7644
7655
|
const g = !f;
|
|
7645
7656
|
u || m(g), l == null || l(g);
|
|
7646
7657
|
};
|
|
@@ -7692,7 +7703,7 @@ const $i = ({
|
|
|
7692
7703
|
className: o = "",
|
|
7693
7704
|
autoCloseDuration: i = 5e3
|
|
7694
7705
|
}) => {
|
|
7695
|
-
const [l, s] =
|
|
7706
|
+
const [l, s] = ee(!0), c = me(null);
|
|
7696
7707
|
return pe(() => {
|
|
7697
7708
|
let d;
|
|
7698
7709
|
return r && (requestAnimationFrame(() => {
|
|
@@ -7825,62 +7836,62 @@ const $i = ({
|
|
|
7825
7836
|
hideFutureDates: f = !1,
|
|
7826
7837
|
defaultDate: v,
|
|
7827
7838
|
fromDate: g,
|
|
7828
|
-
toDate:
|
|
7829
|
-
minimumDate:
|
|
7839
|
+
toDate: h,
|
|
7840
|
+
minimumDate: w,
|
|
7830
7841
|
maxDate: S
|
|
7831
7842
|
}) => {
|
|
7832
|
-
const [y, $] =
|
|
7833
|
-
g ||
|
|
7834
|
-
), [
|
|
7843
|
+
const [y, $] = ee(!1), [b, A] = ee(null), [R, O] = ee(
|
|
7844
|
+
g || h ? /* @__PURE__ */ new Date() : v ? new Date(typeof v == "string" ? parseInt(v) : v) : /* @__PURE__ */ new Date()
|
|
7845
|
+
), [J, U] = ee(
|
|
7835
7846
|
u ? new Date(u) : v && !u ? new Date(typeof v == "string" ? parseInt(v) : v) : null
|
|
7836
|
-
), [
|
|
7847
|
+
), [K, de] = ee(g ? new Date(g) : null), [D, z] = ee(h ? new Date(h) : null), [q, Q] = ee(null), [V, ve] = ee({ hour: 12, minute: 0, ampm: "AM" }), X = me(null), [x, j] = ee(
|
|
7837
7848
|
u ? new Date(u) : v && !u ? new Date(typeof v == "string" ? parseInt(v) : v) : null
|
|
7838
|
-
), [L, E] =
|
|
7849
|
+
), [L, E] = ee(g ? new Date(g) : null), [P, T] = ee(h ? new Date(h) : null);
|
|
7839
7850
|
pe(() => {
|
|
7840
7851
|
if (u)
|
|
7841
|
-
|
|
7852
|
+
U(new Date(u)), j(new Date(u));
|
|
7842
7853
|
else if (!u && v) {
|
|
7843
7854
|
const C = new Date(typeof v == "string" ? parseInt(v) : v);
|
|
7844
|
-
|
|
7855
|
+
U(C), j(C);
|
|
7845
7856
|
} else
|
|
7846
|
-
|
|
7857
|
+
U(null), j(null);
|
|
7847
7858
|
}, [u, v]), pe(() => {
|
|
7848
|
-
g && (de(new Date(g)), E(new Date(g)),
|
|
7859
|
+
g && (de(new Date(g)), E(new Date(g)), U(new Date(g)), j(new Date(g)));
|
|
7849
7860
|
}, [g]), pe(() => {
|
|
7850
|
-
|
|
7851
|
-
}, [
|
|
7861
|
+
h && (z(new Date(h)), T(new Date(h)), U(new Date(h)), j(new Date(h)));
|
|
7862
|
+
}, [h]);
|
|
7852
7863
|
const k = (C) => {
|
|
7853
|
-
C.stopPropagation(),
|
|
7864
|
+
C.stopPropagation(), A(C.currentTarget), $(!0), x ? O(new Date(x)) : v && !x && O(new Date(typeof v == "string" ? parseInt(v) : v));
|
|
7854
7865
|
}, B = (C) => {
|
|
7855
7866
|
if (p && C.getTime() < p || m && C.getTime() > m || f && C.getTime() > (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) return !0;
|
|
7856
7867
|
if (S) {
|
|
7857
7868
|
const ie = typeof S == "string" ? new Date(S) : typeof S == "number" ? new Date(S) : S;
|
|
7858
7869
|
if (C.getTime() > ie.getTime()) return !0;
|
|
7859
7870
|
}
|
|
7860
|
-
if (
|
|
7861
|
-
const ie = typeof
|
|
7871
|
+
if (w) {
|
|
7872
|
+
const ie = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
|
|
7862
7873
|
if (C.getTime() < ie.getTime()) return !0;
|
|
7863
7874
|
}
|
|
7864
7875
|
return !1;
|
|
7865
7876
|
}, N = (C) => {
|
|
7866
|
-
n === "inline" &&
|
|
7877
|
+
n === "inline" && X.current && !X.current.contains(C.target) && (e === "single" ? J || U(null) : e === "range" && (!K || !D) && (de(null), z(null)), $(!1));
|
|
7867
7878
|
};
|
|
7868
7879
|
pe(() => (y ? document.addEventListener("mousedown", N) : document.removeEventListener("mousedown", N), () => {
|
|
7869
7880
|
document.removeEventListener("mousedown", N);
|
|
7870
7881
|
}), [y]);
|
|
7871
7882
|
const G = (C) => {
|
|
7872
|
-
!C || B(C) || (e === "single" ?
|
|
7883
|
+
!C || B(C) || (e === "single" ? U(C) : e === "range" && (!K || K && D ? (de(C), z(null)) : C >= K ? z(C) : de(C)));
|
|
7873
7884
|
}, Y = (C) => {
|
|
7874
7885
|
if (!C || B(C)) {
|
|
7875
|
-
|
|
7886
|
+
Q(null);
|
|
7876
7887
|
return;
|
|
7877
7888
|
}
|
|
7878
|
-
e === "range" &&
|
|
7889
|
+
e === "range" && K && !D && Q(C);
|
|
7879
7890
|
}, se = () => {
|
|
7880
|
-
|
|
7891
|
+
Q(null);
|
|
7881
7892
|
}, _ = () => {
|
|
7882
7893
|
if ($(!1), e === "single") {
|
|
7883
|
-
const C = r ? /* @__PURE__ */ new Date() :
|
|
7894
|
+
const C = r ? /* @__PURE__ */ new Date() : J, ie = C ? new Date(
|
|
7884
7895
|
C.getFullYear(),
|
|
7885
7896
|
C.getMonth(),
|
|
7886
7897
|
C.getDate(),
|
|
@@ -7891,15 +7902,15 @@ const $i = ({
|
|
|
7891
7902
|
const he = ie ? ie.getTime() : null;
|
|
7892
7903
|
i == null || i(he), l == null || l(he);
|
|
7893
7904
|
} else if (e === "range") {
|
|
7894
|
-
E(
|
|
7905
|
+
E(K), T(D);
|
|
7895
7906
|
const C = {
|
|
7896
|
-
startDate:
|
|
7907
|
+
startDate: K ? K.getTime() : null,
|
|
7897
7908
|
endDate: D ? D.getTime() : null
|
|
7898
7909
|
};
|
|
7899
7910
|
i == null || i(C), l == null || l(C);
|
|
7900
7911
|
}
|
|
7901
7912
|
}, F = () => {
|
|
7902
|
-
$(!1),
|
|
7913
|
+
$(!1), U(x), de(L), z(P), O(x ? new Date(x) : /* @__PURE__ */ new Date()), s == null || s();
|
|
7903
7914
|
}, re = () => {
|
|
7904
7915
|
const C = new Date(R.getFullYear(), R.getMonth(), 1), ie = new Date(R.getFullYear(), R.getMonth() + 1, 0), he = (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999), M = [], I = C.getDay();
|
|
7905
7916
|
for (let ne = 0; ne < I; ne++)
|
|
@@ -7910,8 +7921,8 @@ const $i = ({
|
|
|
7910
7921
|
}
|
|
7911
7922
|
return M;
|
|
7912
7923
|
}, oe = () => {
|
|
7913
|
-
if (
|
|
7914
|
-
const C = typeof
|
|
7924
|
+
if (w) {
|
|
7925
|
+
const C = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
|
|
7915
7926
|
if (R.getFullYear() < C.getFullYear() || R.getFullYear() === C.getFullYear() && R.getMonth() <= C.getMonth()) return !1;
|
|
7916
7927
|
}
|
|
7917
7928
|
if (p) {
|
|
@@ -7936,13 +7947,13 @@ const $i = ({
|
|
|
7936
7947
|
}, H = (C) => {
|
|
7937
7948
|
if (!C) return !1;
|
|
7938
7949
|
if (e === "single")
|
|
7939
|
-
return (
|
|
7950
|
+
return (J == null ? void 0 : J.toDateString()) === C.toDateString();
|
|
7940
7951
|
if (e === "range") {
|
|
7941
|
-
if (
|
|
7942
|
-
const ie =
|
|
7952
|
+
if (K && !D && q) {
|
|
7953
|
+
const ie = K < q ? K : q, he = K < q ? q : K;
|
|
7943
7954
|
return C >= ie && C <= he;
|
|
7944
7955
|
}
|
|
7945
|
-
return
|
|
7956
|
+
return K && D && C >= K && C <= D;
|
|
7946
7957
|
}
|
|
7947
7958
|
return !1;
|
|
7948
7959
|
}, te = (C, ie) => {
|
|
@@ -7986,7 +7997,7 @@ const $i = ({
|
|
|
7986
7997
|
] }), Se = /* @__PURE__ */ a.jsxs(
|
|
7987
7998
|
"div",
|
|
7988
7999
|
{
|
|
7989
|
-
ref:
|
|
8000
|
+
ref: X,
|
|
7990
8001
|
className: `${n === "dialog" ? "relative w-full" : "absolute z-50 mt-2 w-72 rounded-lg border border-color-gray-200 bg-color-white shadow-xl p-4"}`,
|
|
7991
8002
|
style: n === "dialog" ? void 0 : {
|
|
7992
8003
|
position: "absolute",
|
|
@@ -8004,7 +8015,7 @@ const $i = ({
|
|
|
8004
8015
|
color: "gray",
|
|
8005
8016
|
roundedFull: !0,
|
|
8006
8017
|
disabled: !oe(),
|
|
8007
|
-
onClick: () =>
|
|
8018
|
+
onClick: () => O(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
|
|
8008
8019
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) })
|
|
8009
8020
|
}
|
|
8010
8021
|
),
|
|
@@ -8014,13 +8025,13 @@ const $i = ({
|
|
|
8014
8025
|
{
|
|
8015
8026
|
className: "text-sm outline-none",
|
|
8016
8027
|
value: R.getMonth(),
|
|
8017
|
-
onChange: (C) =>
|
|
8028
|
+
onChange: (C) => O(new Date(R.getFullYear(), parseInt(C.target.value), 1)),
|
|
8018
8029
|
children: kn.map((C, ie) => {
|
|
8019
8030
|
const he = R.getFullYear(), M = ie, I = /* @__PURE__ */ new Date();
|
|
8020
8031
|
if (f && he === I.getFullYear() && M > I.getMonth())
|
|
8021
8032
|
return null;
|
|
8022
|
-
if (
|
|
8023
|
-
const ne = typeof
|
|
8033
|
+
if (w) {
|
|
8034
|
+
const ne = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
|
|
8024
8035
|
if (he === ne.getFullYear() && M < ne.getMonth() || he < ne.getFullYear())
|
|
8025
8036
|
return null;
|
|
8026
8037
|
}
|
|
@@ -8038,11 +8049,11 @@ const $i = ({
|
|
|
8038
8049
|
{
|
|
8039
8050
|
className: "text-sm outline-none",
|
|
8040
8051
|
value: R.getFullYear(),
|
|
8041
|
-
onChange: (C) =>
|
|
8052
|
+
onChange: (C) => O(new Date(parseInt(C.target.value), R.getMonth(), 1)),
|
|
8042
8053
|
children: Array.from({ length: 150 }, (C, ie) => (/* @__PURE__ */ new Date()).getFullYear() - 100 + ie).filter((C) => {
|
|
8043
8054
|
if (f && C > (/* @__PURE__ */ new Date()).getFullYear()) return !1;
|
|
8044
|
-
if (
|
|
8045
|
-
const ie = typeof
|
|
8055
|
+
if (w) {
|
|
8056
|
+
const ie = typeof w == "string" ? new Date(w) : typeof w == "number" ? new Date(w) : w;
|
|
8046
8057
|
if (C < ie.getFullYear()) return !1;
|
|
8047
8058
|
}
|
|
8048
8059
|
if (S || m) {
|
|
@@ -8062,7 +8073,7 @@ const $i = ({
|
|
|
8062
8073
|
color: "gray",
|
|
8063
8074
|
roundedFull: !0,
|
|
8064
8075
|
disabled: !ge(),
|
|
8065
|
-
onClick: () =>
|
|
8076
|
+
onClick: () => O(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
|
|
8066
8077
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
|
|
8067
8078
|
}
|
|
8068
8079
|
)
|
|
@@ -8111,8 +8122,8 @@ const $i = ({
|
|
|
8111
8122
|
children: [
|
|
8112
8123
|
e === "single" ? x && u !== null ? te(x) : c : (
|
|
8113
8124
|
// Display rangeStart immediately if set, even if rangeEnd is null
|
|
8114
|
-
|
|
8115
|
-
te(
|
|
8125
|
+
K || L || P ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
8126
|
+
te(K || L, "start"),
|
|
8116
8127
|
" -",
|
|
8117
8128
|
" ",
|
|
8118
8129
|
te(D || P, "end")
|
|
@@ -8207,7 +8218,7 @@ function ga({
|
|
|
8207
8218
|
onItemSelect: l,
|
|
8208
8219
|
className: s = ""
|
|
8209
8220
|
}) {
|
|
8210
|
-
const [c, d] =
|
|
8221
|
+
const [c, d] = ee(r), p = (m) => {
|
|
8211
8222
|
d(m), m.onClick && m.onClick(), l && l(m);
|
|
8212
8223
|
};
|
|
8213
8224
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|