@unizap/uniui 1.0.32 → 1.0.33
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/index.d.ts +1 -0
- package/dist/uniui.css +1 -1
- package/dist/uniui.js +103 -102
- package/dist/uniui.umd.cjs +36 -36
- package/package.json +2 -2
package/dist/uniui.js
CHANGED
|
@@ -191,7 +191,7 @@ function Jr() {
|
|
|
191
191
|
var P = C.children;
|
|
192
192
|
if (P !== void 0)
|
|
193
193
|
if (L)
|
|
194
|
-
if (
|
|
194
|
+
if (X(P)) {
|
|
195
195
|
for (L = 0; L < P.length; L++)
|
|
196
196
|
g(P[L]);
|
|
197
197
|
Object.freeze && Object.freeze(P);
|
|
@@ -205,7 +205,7 @@ function Jr() {
|
|
|
205
205
|
var B = Object.keys(C).filter(function(S) {
|
|
206
206
|
return S !== "key";
|
|
207
207
|
});
|
|
208
|
-
L = 0 < B.length ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
208
|
+
L = 0 < B.length ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}", J[P + L] || (B = 0 < B.length ? "{" + B.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
|
P,
|
|
217
217
|
B,
|
|
218
218
|
P
|
|
219
|
-
),
|
|
219
|
+
), J[P + L] = !0);
|
|
220
220
|
}
|
|
221
221
|
if (P = null, M !== void 0 && (t(M), P = "" + M), i(C) && (t(C.key), P = "" + C.key), "key" in C) {
|
|
222
222
|
M = {};
|
|
@@ -240,7 +240,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
240
240
|
function g(x) {
|
|
241
241
|
typeof x == "object" && x !== null && x.$$typeof === f && x._store && (x._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var p = je, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), b = Symbol.for("react.context"), $ = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), ae = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ue = Object.prototype.hasOwnProperty,
|
|
243
|
+
var p = je, f = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), b = Symbol.for("react.context"), $ = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), ae = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ue = Object.prototype.hasOwnProperty, X = Array.isArray, H = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
246
|
p = {
|
|
@@ -251,7 +251,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
251
251
|
var Y, T = {}, te = p["react-stack-bottom-frame"].bind(
|
|
252
252
|
p,
|
|
253
253
|
a
|
|
254
|
-
)(), pe = H(r(a)),
|
|
254
|
+
)(), pe = H(r(a)), J = {};
|
|
255
255
|
Be.Fragment = m, Be.jsx = function(x, C, M, L, N) {
|
|
256
256
|
var I = 1e4 > ae.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return d(
|
|
@@ -748,12 +748,12 @@ const ve = {
|
|
|
748
748
|
l.current && !l.current.contains(u.target) && i(!1);
|
|
749
749
|
};
|
|
750
750
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
751
|
-
}, []), /* @__PURE__ */ s.jsxs("div", { ref: l, className: "relative inline-block", children: [
|
|
751
|
+
}, []), /* @__PURE__ */ s.jsxs("div", { ref: l, className: "relative inline-block w-full", children: [
|
|
752
752
|
/* @__PURE__ */ s.jsxs(
|
|
753
753
|
"button",
|
|
754
754
|
{
|
|
755
755
|
onClick: () => i(!a),
|
|
756
|
-
className: `flex items-center cursor-pointer justify-between w-
|
|
756
|
+
className: `flex items-center cursor-pointer justify-between w-full px-4 py-3 bg-color-white rounded-sm border border-color-gray-200 text-sm font-medium text-color-gray-700 hover:bg-color-gray-50 focus:outline-none ${t}`,
|
|
757
757
|
children: [
|
|
758
758
|
(e == null ? void 0 : e.label) || "Select",
|
|
759
759
|
a ? /* @__PURE__ */ s.jsx("svg", { className: "ml-2 text-color-gray-500 size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ s.jsx("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" }) }) : /* @__PURE__ */ s.jsx("svg", { className: "ml-2 text-color-gray-500 size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ s.jsx("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }) })
|
|
@@ -763,7 +763,7 @@ const ve = {
|
|
|
763
763
|
a && /* @__PURE__ */ s.jsx(
|
|
764
764
|
"ul",
|
|
765
765
|
{
|
|
766
|
-
className: `absolute mt-2 right-0 z-10 w-
|
|
766
|
+
className: `absolute mt-2 right-0 z-10 w-full rounded-xl bg-color-white shadow-lg shadow-color-zinc-200 border border-color-gray-100 py-2 ${r}`,
|
|
767
767
|
children: n.map((c, u) => {
|
|
768
768
|
const d = c.label === (e == null ? void 0 : e.label);
|
|
769
769
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -885,17 +885,17 @@ function to() {
|
|
|
885
885
|
var _ = j.$$typeof;
|
|
886
886
|
switch (_) {
|
|
887
887
|
case n:
|
|
888
|
-
var
|
|
889
|
-
switch (
|
|
888
|
+
var Q = j.type;
|
|
889
|
+
switch (Q) {
|
|
890
890
|
case c:
|
|
891
891
|
case u:
|
|
892
892
|
case r:
|
|
893
893
|
case a:
|
|
894
894
|
case o:
|
|
895
895
|
case g:
|
|
896
|
-
return
|
|
896
|
+
return Q;
|
|
897
897
|
default:
|
|
898
|
-
var ee =
|
|
898
|
+
var ee = Q && Q.$$typeof;
|
|
899
899
|
switch (ee) {
|
|
900
900
|
case l:
|
|
901
901
|
case d:
|
|
@@ -912,8 +912,8 @@ function to() {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
var y = c, O = u, D = l, V = i, F = n, Z = d, ae = r, ue = v,
|
|
916
|
-
function
|
|
915
|
+
var y = c, O = u, D = l, V = i, F = n, Z = d, ae = r, ue = v, X = f, H = t, Y = a, T = o, te = g, pe = !1;
|
|
916
|
+
function J(j) {
|
|
917
917
|
return pe || (pe = !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(j) || $(j) === c;
|
|
918
918
|
}
|
|
919
919
|
function x(j) {
|
|
@@ -952,7 +952,7 @@ function to() {
|
|
|
952
952
|
function S(j) {
|
|
953
953
|
return $(j) === g;
|
|
954
954
|
}
|
|
955
|
-
re.AsyncMode = y, re.ConcurrentMode = O, re.ContextConsumer = D, re.ContextProvider = V, re.Element = F, re.ForwardRef = Z, re.Fragment = ae, re.Lazy = ue, re.Memo =
|
|
955
|
+
re.AsyncMode = y, re.ConcurrentMode = O, re.ContextConsumer = D, re.ContextProvider = V, re.Element = F, re.ForwardRef = Z, re.Fragment = ae, re.Lazy = ue, re.Memo = X, re.Portal = H, re.Profiler = Y, re.StrictMode = T, re.Suspense = te, re.isAsyncMode = J, re.isConcurrentMode = x, re.isContextConsumer = C, re.isContextProvider = M, re.isElement = L, re.isForwardRef = N, re.isFragment = I, re.isLazy = z, re.isMemo = E, re.isPortal = P, re.isProfiler = B, re.isStrictMode = q, re.isSuspense = S, re.isValidElementType = b, re.typeOf = $;
|
|
956
956
|
}()), re;
|
|
957
957
|
}
|
|
958
958
|
var yn;
|
|
@@ -1113,7 +1113,7 @@ function oo() {
|
|
|
1113
1113
|
oneOf: D,
|
|
1114
1114
|
oneOfType: F,
|
|
1115
1115
|
shape: ue,
|
|
1116
|
-
exact:
|
|
1116
|
+
exact: X
|
|
1117
1117
|
};
|
|
1118
1118
|
function v(x, C) {
|
|
1119
1119
|
return x === C ? x !== 0 || 1 / x === 1 / C : x !== x && C !== C;
|
|
@@ -1205,7 +1205,7 @@ function oo() {
|
|
|
1205
1205
|
function O(x) {
|
|
1206
1206
|
function C(M, L, N, I, z) {
|
|
1207
1207
|
if (!(M[L] instanceof x)) {
|
|
1208
|
-
var E = x.name || p, P =
|
|
1208
|
+
var E = x.name || p, P = J(M[L]);
|
|
1209
1209
|
return new m("Invalid " + I + " `" + z + "` of type " + ("`" + P + "` supplied to `" + N + "`, expected ") + ("instance of `" + E + "`."));
|
|
1210
1210
|
}
|
|
1211
1211
|
return null;
|
|
@@ -1296,7 +1296,7 @@ function oo() {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return w(C);
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function X(x) {
|
|
1300
1300
|
function C(M, L, N, I, z) {
|
|
1301
1301
|
var E = M[L], P = T(E);
|
|
1302
1302
|
if (P !== "object")
|
|
@@ -1385,7 +1385,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1385
1385
|
return C;
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function J(x) {
|
|
1389
1389
|
return !x.constructor || !x.constructor.name ? p : x.constructor.name;
|
|
1390
1390
|
}
|
|
1391
1391
|
return f.checkPropTypes = o, f.resetWarningCache = o.resetWarningCache, f.PropTypes = f, f;
|
|
@@ -3356,15 +3356,15 @@ function mr() {
|
|
|
3356
3356
|
return Vo(t);
|
|
3357
3357
|
}, [t]), ue = Te(function() {
|
|
3358
3358
|
return typeof w == "function" ? w : In;
|
|
3359
|
-
}, [w]),
|
|
3359
|
+
}, [w]), X = Te(function() {
|
|
3360
3360
|
return typeof m == "function" ? m : In;
|
|
3361
|
-
}, [m]), H = se(null), Y = se(null), T = Ur(ra, Kt), te = At(T, 2), pe = te[0],
|
|
3361
|
+
}, [m]), H = se(null), Y = se(null), T = Ur(ra, Kt), te = At(T, 2), pe = te[0], J = te[1], x = pe.isFocused, C = pe.isFileDialogActive, M = se(typeof window < "u" && window.isSecureContext && h && Io()), L = function() {
|
|
3362
3362
|
!M.current && C && setTimeout(function() {
|
|
3363
3363
|
if (Y.current) {
|
|
3364
3364
|
var G = Y.current.files;
|
|
3365
|
-
G.length || (
|
|
3365
|
+
G.length || (J({
|
|
3366
3366
|
type: "closeDialog"
|
|
3367
|
-
}),
|
|
3367
|
+
}), X());
|
|
3368
3368
|
}
|
|
3369
3369
|
}, 300);
|
|
3370
3370
|
};
|
|
@@ -3372,7 +3372,7 @@ function mr() {
|
|
|
3372
3372
|
return window.addEventListener("focus", L, !1), function() {
|
|
3373
3373
|
window.removeEventListener("focus", L, !1);
|
|
3374
3374
|
};
|
|
3375
|
-
}, [Y, C,
|
|
3375
|
+
}, [Y, C, X, M]);
|
|
3376
3376
|
var N = se([]), I = function(G) {
|
|
3377
3377
|
H.current && H.current.contains(G.target) || (G.preventDefault(), N.current = []);
|
|
3378
3378
|
};
|
|
@@ -3398,7 +3398,7 @@ function mr() {
|
|
|
3398
3398
|
maxFiles: c,
|
|
3399
3399
|
validator: F
|
|
3400
3400
|
}), be = me > 0 && !ge;
|
|
3401
|
-
|
|
3401
|
+
J({
|
|
3402
3402
|
isDragAccept: ge,
|
|
3403
3403
|
isDragReject: be,
|
|
3404
3404
|
isDragActive: !0,
|
|
@@ -3422,7 +3422,7 @@ function mr() {
|
|
|
3422
3422
|
var G = N.current.filter(function(ge) {
|
|
3423
3423
|
return H.current && H.current.contains(ge);
|
|
3424
3424
|
}), me = G.indexOf(A.target);
|
|
3425
|
-
me !== -1 && G.splice(me, 1), N.current = G, !(G.length > 0) && (
|
|
3425
|
+
me !== -1 && G.splice(me, 1), N.current = G, !(G.length > 0) && (J({
|
|
3426
3426
|
type: "setDraggedFiles",
|
|
3427
3427
|
isDragActive: !1,
|
|
3428
3428
|
isDragAccept: !1,
|
|
@@ -3448,23 +3448,23 @@ function mr() {
|
|
|
3448
3448
|
file: be,
|
|
3449
3449
|
errors: [No]
|
|
3450
3450
|
});
|
|
3451
|
-
}), me.splice(0)),
|
|
3451
|
+
}), me.splice(0)), J({
|
|
3452
3452
|
acceptedFiles: me,
|
|
3453
3453
|
fileRejections: ge,
|
|
3454
3454
|
isDragReject: ge.length > 0,
|
|
3455
3455
|
type: "setFiles"
|
|
3456
3456
|
}), p && p(me, ge, G), ge.length > 0 && v && v(ge, G), me.length > 0 && f && f(me, G);
|
|
3457
|
-
}, [
|
|
3457
|
+
}, [J, l, Z, i, a, c, p, f, v, F]), S = oe(function(A) {
|
|
3458
3458
|
A.preventDefault(), A.persist(), Je(A), N.current = [], ot(A) && Promise.resolve(o(A)).then(function(G) {
|
|
3459
3459
|
ft(A) && !D || q(G, A);
|
|
3460
3460
|
}).catch(function(G) {
|
|
3461
3461
|
return z(G);
|
|
3462
|
-
}),
|
|
3462
|
+
}), J({
|
|
3463
3463
|
type: "reset"
|
|
3464
3464
|
});
|
|
3465
3465
|
}, [o, q, z, D]), j = oe(function() {
|
|
3466
3466
|
if (M.current) {
|
|
3467
|
-
|
|
3467
|
+
J({
|
|
3468
3468
|
type: "openDialog"
|
|
3469
3469
|
}), ue();
|
|
3470
3470
|
var A = {
|
|
@@ -3474,27 +3474,27 @@ function mr() {
|
|
|
3474
3474
|
window.showOpenFilePicker(A).then(function(G) {
|
|
3475
3475
|
return o(G);
|
|
3476
3476
|
}).then(function(G) {
|
|
3477
|
-
q(G, null),
|
|
3477
|
+
q(G, null), J({
|
|
3478
3478
|
type: "closeDialog"
|
|
3479
3479
|
});
|
|
3480
3480
|
}).catch(function(G) {
|
|
3481
|
-
Bo(G) ? (
|
|
3481
|
+
Bo(G) ? (X(G), J({
|
|
3482
3482
|
type: "closeDialog"
|
|
3483
3483
|
})) : qo(G) ? (M.current = !1, Y.current ? (Y.current.value = null, Y.current.click()) : z(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."))) : z(G);
|
|
3484
3484
|
});
|
|
3485
3485
|
return;
|
|
3486
3486
|
}
|
|
3487
|
-
Y.current && (
|
|
3487
|
+
Y.current && (J({
|
|
3488
3488
|
type: "openDialog"
|
|
3489
3489
|
}), ue(), Y.current.value = null, Y.current.click());
|
|
3490
|
-
}, [
|
|
3490
|
+
}, [J, ue, X, h, q, z, ae, l]), _ = oe(function(A) {
|
|
3491
3491
|
!H.current || !H.current.isEqualNode(A.target) || (A.key === " " || A.key === "Enter" || A.keyCode === 32 || A.keyCode === 13) && (A.preventDefault(), j());
|
|
3492
|
-
}, [H, j]),
|
|
3493
|
-
|
|
3492
|
+
}, [H, j]), Q = oe(function() {
|
|
3493
|
+
J({
|
|
3494
3494
|
type: "focus"
|
|
3495
3495
|
});
|
|
3496
3496
|
}, []), ee = oe(function() {
|
|
3497
|
-
|
|
3497
|
+
J({
|
|
3498
3498
|
type: "blur"
|
|
3499
3499
|
});
|
|
3500
3500
|
}, []), de = oe(function() {
|
|
@@ -3512,7 +3512,7 @@ function mr() {
|
|
|
3512
3512
|
var A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, G = A.refKey, me = G === void 0 ? "ref" : G, ge = A.role, be = A.onKeyDown, Ve = A.onFocus, ze = A.onBlur, bt = A.onClick, yt = A.onDragEnter, Ct = A.onDragOver, Qe = A.onDragLeave, St = A.onDrop, jt = mt(A, Uo);
|
|
3513
3513
|
return le(le(Zt({
|
|
3514
3514
|
onKeyDown: we(Se(be, _)),
|
|
3515
|
-
onFocus: we(Se(Ve,
|
|
3515
|
+
onFocus: we(Se(Ve, Q)),
|
|
3516
3516
|
onBlur: we(Se(ze, ee)),
|
|
3517
3517
|
onClick: fe(Se(bt, de)),
|
|
3518
3518
|
onDragEnter: Xe(Se(yt, E)),
|
|
@@ -3524,7 +3524,7 @@ function mr() {
|
|
|
3524
3524
|
tabIndex: 0
|
|
3525
3525
|
} : {}), jt);
|
|
3526
3526
|
};
|
|
3527
|
-
}, [H, _,
|
|
3527
|
+
}, [H, _, Q, ee, de, E, P, B, S, y, O, r]), qr = oe(function(A) {
|
|
3528
3528
|
A.stopPropagation();
|
|
3529
3529
|
}, []), Gr = Te(function() {
|
|
3530
3530
|
return function() {
|
|
@@ -3629,10 +3629,10 @@ const Tl = ({
|
|
|
3629
3629
|
}) => {
|
|
3630
3630
|
const [b, $] = K(h), [y, O] = K([]);
|
|
3631
3631
|
ce(() => {
|
|
3632
|
-
$(h);
|
|
3632
|
+
(h.length !== b.length || h.some((X, H) => X !== b[H])) && $(h);
|
|
3633
3633
|
}, [h]);
|
|
3634
3634
|
const D = oe(
|
|
3635
|
-
(
|
|
3635
|
+
(X, H) => {
|
|
3636
3636
|
const Y = [];
|
|
3637
3637
|
if (H.length > 0 && H.forEach((T) => {
|
|
3638
3638
|
T.errors.forEach((te) => {
|
|
@@ -3642,16 +3642,16 @@ const Tl = ({
|
|
|
3642
3642
|
`${T.file.name} has an invalid file type`
|
|
3643
3643
|
);
|
|
3644
3644
|
});
|
|
3645
|
-
}), a !== void 0 && (r ? b.length : 0) +
|
|
3645
|
+
}), a !== void 0 && (r ? b.length : 0) + X.length > a && Y.push(
|
|
3646
3646
|
`You can only upload up to ${a} file${a > 1 ? "s" : ""}.`
|
|
3647
3647
|
), Y.length > 0) {
|
|
3648
3648
|
O(Y), n == null || n(Y);
|
|
3649
3649
|
return;
|
|
3650
3650
|
} else
|
|
3651
3651
|
O([]);
|
|
3652
|
-
|
|
3653
|
-
(T) => r ? [...T, ...
|
|
3654
|
-
), e(
|
|
3652
|
+
X.length > 0 && ($(
|
|
3653
|
+
(T) => r ? [...T, ...X] : X
|
|
3654
|
+
), e(X));
|
|
3655
3655
|
},
|
|
3656
3656
|
[
|
|
3657
3657
|
e,
|
|
@@ -3661,8 +3661,8 @@ const Tl = ({
|
|
|
3661
3661
|
b,
|
|
3662
3662
|
r
|
|
3663
3663
|
]
|
|
3664
|
-
), V = (
|
|
3665
|
-
$((H) => H.filter((Y, T) => T !==
|
|
3664
|
+
), V = (X) => {
|
|
3665
|
+
$((H) => H.filter((Y, T) => T !== X)), k(b);
|
|
3666
3666
|
}, { getRootProps: F, getInputProps: Z, isDragActive: ae, isDragReject: ue } = mr({
|
|
3667
3667
|
onDrop: D,
|
|
3668
3668
|
accept: t,
|
|
@@ -3694,15 +3694,15 @@ const Tl = ({
|
|
|
3694
3694
|
]
|
|
3695
3695
|
}
|
|
3696
3696
|
),
|
|
3697
|
-
y.length > 0 && /* @__PURE__ */ s.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: y.map((
|
|
3697
|
+
y.length > 0 && /* @__PURE__ */ s.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: y.map((X, H) => /* @__PURE__ */ s.jsxs("p", { children: [
|
|
3698
3698
|
"• ",
|
|
3699
|
-
|
|
3699
|
+
X
|
|
3700
3700
|
] }, H)) }),
|
|
3701
3701
|
v && b.length > 0 && /* @__PURE__ */ s.jsx(
|
|
3702
3702
|
"ul",
|
|
3703
3703
|
{
|
|
3704
3704
|
className: `w-full ${m ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
|
|
3705
|
-
children: b.map((
|
|
3705
|
+
children: b.map((X, H) => /* @__PURE__ */ s.jsxs(
|
|
3706
3706
|
"li",
|
|
3707
3707
|
{
|
|
3708
3708
|
className: "flex items-center justify-between bg-color-white rounded-md px-4 py-2 shadow-sm",
|
|
@@ -3711,16 +3711,16 @@ const Tl = ({
|
|
|
3711
3711
|
w && /* @__PURE__ */ s.jsx("div", { className: "w-10 h-10 rounded bg-color-gray-100 overflow-hidden flex-shrink-0", children: /* @__PURE__ */ s.jsx(
|
|
3712
3712
|
"img",
|
|
3713
3713
|
{
|
|
3714
|
-
src:
|
|
3714
|
+
src: X.type.startsWith("image/") ? URL.createObjectURL(X) : "https://img.icons8.com/ios-filled/50/pdf-2.png",
|
|
3715
3715
|
className: "w-full h-full object-cover",
|
|
3716
3716
|
alt: "preview"
|
|
3717
3717
|
}
|
|
3718
3718
|
) }),
|
|
3719
|
-
/* @__PURE__ */ s.jsx("div", { className: "text-sm max-w-[200px]", children: /* @__PURE__ */ s.jsx("p", { className: "font-medium truncate text-xs text-color-gray-700", children:
|
|
3719
|
+
/* @__PURE__ */ s.jsx("div", { className: "text-sm max-w-[200px]", children: /* @__PURE__ */ s.jsx("p", { className: "font-medium truncate text-xs text-color-gray-700", children: X.name }) })
|
|
3720
3720
|
] }),
|
|
3721
3721
|
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
3722
3722
|
/* @__PURE__ */ s.jsxs("p", { className: "text-xs text-color-gray-400", children: [
|
|
3723
|
-
(
|
|
3723
|
+
(X.size / 1024).toFixed(2),
|
|
3724
3724
|
" KB"
|
|
3725
3725
|
] }),
|
|
3726
3726
|
/* @__PURE__ */ s.jsx(
|
|
@@ -6099,19 +6099,19 @@ const Ul = Zr(function({
|
|
|
6099
6099
|
const h = n !== void 0, [k, b] = K(() => t !== void 0 ? t : m ? [a, i] : a), $ = h ? n : k, y = Array.isArray($) ? $[0] : $, [O, D] = Array.isArray($) ? $ : [$, $], V = qt[c] || qt.blue, F = qn[u] ?? qn.medium, Z = oe(
|
|
6100
6100
|
(_) => (_ - a) / (i - a) * 100,
|
|
6101
6101
|
[a, i]
|
|
6102
|
-
), ae = Z(y), ue = Z(O),
|
|
6103
|
-
(_,
|
|
6104
|
-
h || b(_),
|
|
6102
|
+
), ae = Z(y), ue = Z(O), X = Z(D), H = oe((_) => Math.max(a, Math.min(i, _)), [a, i]), Y = oe((_) => Math.round(_ / l) * l, [l]), T = oi(r), te = oe(
|
|
6103
|
+
(_, Q = !0) => {
|
|
6104
|
+
h || b(_), Q ? T.schedule(_) : T.flush(_);
|
|
6105
6105
|
},
|
|
6106
6106
|
[h, T]
|
|
6107
6107
|
), pe = oe(() => {
|
|
6108
6108
|
const _ = T.last.current;
|
|
6109
6109
|
_ != null && (T.flush(_), o == null || o(_));
|
|
6110
|
-
}, [T, o]),
|
|
6111
|
-
(_,
|
|
6110
|
+
}, [T, o]), J = oe(
|
|
6111
|
+
(_, Q) => {
|
|
6112
6112
|
if (m && Array.isArray(_)) {
|
|
6113
6113
|
let [ee, de] = _, fe = Y(H(ee)), we = Y(H(de));
|
|
6114
|
-
return we - fe < w && (
|
|
6114
|
+
return we - fe < w && (Q === "min" ? we = H(fe + w) : Q === "max" && (fe = H(we - w))), fe > we && (Q === "min" ? fe = we : we = fe), [fe, we];
|
|
6115
6115
|
} else if (!m && typeof _ == "number")
|
|
6116
6116
|
return Y(H(_));
|
|
6117
6117
|
return _;
|
|
@@ -6120,36 +6120,36 @@ const Ul = Zr(function({
|
|
|
6120
6120
|
), x = se(null), C = oe(
|
|
6121
6121
|
(_) => {
|
|
6122
6122
|
var de;
|
|
6123
|
-
const
|
|
6124
|
-
if (!
|
|
6125
|
-
const ee = Math.max(0, Math.min(1, (_ -
|
|
6123
|
+
const Q = (de = x.current) == null ? void 0 : de.getBoundingClientRect();
|
|
6124
|
+
if (!Q) return m ? a : y;
|
|
6125
|
+
const ee = Math.max(0, Math.min(1, (_ - Q.left) / Q.width));
|
|
6126
6126
|
return a + ee * (i - a);
|
|
6127
6127
|
},
|
|
6128
6128
|
[a, i, m, y]
|
|
6129
6129
|
), M = oe(
|
|
6130
6130
|
(_) => {
|
|
6131
|
-
const
|
|
6132
|
-
return
|
|
6131
|
+
const Q = Math.abs(_ - O), ee = Math.abs(_ - D);
|
|
6132
|
+
return Q <= ee ? "min" : "max";
|
|
6133
6133
|
},
|
|
6134
6134
|
[O, D]
|
|
6135
6135
|
), [L, N] = K(null), [I, z] = K(null), [E, P] = K(null), B = oe(
|
|
6136
|
-
(_,
|
|
6136
|
+
(_, Q) => {
|
|
6137
6137
|
var de, fe;
|
|
6138
6138
|
if (d) return;
|
|
6139
6139
|
_.preventDefault(), (fe = (de = _.currentTarget).setPointerCapture) == null || fe.call(de, _.pointerId), P(_.pointerId);
|
|
6140
6140
|
const ee = C(_.clientX);
|
|
6141
6141
|
if (m) {
|
|
6142
|
-
const we =
|
|
6143
|
-
N(we), te(we === "min" ?
|
|
6142
|
+
const we = Q || M(ee);
|
|
6143
|
+
N(we), te(we === "min" ? J([ee, D], "min") : J([O, ee], "max"));
|
|
6144
6144
|
} else
|
|
6145
|
-
N("single"), te(
|
|
6145
|
+
N("single"), te(J(ee, "single"));
|
|
6146
6146
|
},
|
|
6147
6147
|
[
|
|
6148
6148
|
d,
|
|
6149
6149
|
m,
|
|
6150
6150
|
C,
|
|
6151
6151
|
M,
|
|
6152
|
-
|
|
6152
|
+
J,
|
|
6153
6153
|
O,
|
|
6154
6154
|
D,
|
|
6155
6155
|
te
|
|
@@ -6157,8 +6157,8 @@ const Ul = Zr(function({
|
|
|
6157
6157
|
), q = oe(
|
|
6158
6158
|
(_) => {
|
|
6159
6159
|
if (d || E == null || L == null) return;
|
|
6160
|
-
const
|
|
6161
|
-
m ? L === "min" ? te(
|
|
6160
|
+
const Q = C(_.clientX);
|
|
6161
|
+
m ? L === "min" ? te(J([Q, D], "min")) : L === "max" && te(J([O, Q], "max")) : te(J(Q, "single"));
|
|
6162
6162
|
},
|
|
6163
6163
|
[
|
|
6164
6164
|
d,
|
|
@@ -6166,7 +6166,7 @@ const Ul = Zr(function({
|
|
|
6166
6166
|
L,
|
|
6167
6167
|
m,
|
|
6168
6168
|
C,
|
|
6169
|
-
|
|
6169
|
+
J,
|
|
6170
6170
|
O,
|
|
6171
6171
|
D,
|
|
6172
6172
|
te
|
|
@@ -6174,9 +6174,9 @@ const Ul = Zr(function({
|
|
|
6174
6174
|
), S = oe(() => {
|
|
6175
6175
|
L != null && (N(null), P(null), pe());
|
|
6176
6176
|
}, [L, pe]), j = oe(
|
|
6177
|
-
(_,
|
|
6177
|
+
(_, Q) => {
|
|
6178
6178
|
if (d) return;
|
|
6179
|
-
const ee = m ?
|
|
6179
|
+
const ee = m ? Q === "min" ? O : D : y;
|
|
6180
6180
|
let de = ee;
|
|
6181
6181
|
const fe = (i - a) / 10;
|
|
6182
6182
|
switch (_.key) {
|
|
@@ -6203,7 +6203,7 @@ const Ul = Zr(function({
|
|
|
6203
6203
|
default:
|
|
6204
6204
|
return;
|
|
6205
6205
|
}
|
|
6206
|
-
_.preventDefault(), te(m ?
|
|
6206
|
+
_.preventDefault(), te(m ? Q === "min" ? J([de, D], "min") : J([O, de], "max") : J(de, "single"), !1), o == null || o(h ? n : $);
|
|
6207
6207
|
},
|
|
6208
6208
|
[
|
|
6209
6209
|
d,
|
|
@@ -6214,7 +6214,7 @@ const Ul = Zr(function({
|
|
|
6214
6214
|
l,
|
|
6215
6215
|
a,
|
|
6216
6216
|
i,
|
|
6217
|
-
|
|
6217
|
+
J,
|
|
6218
6218
|
te,
|
|
6219
6219
|
o,
|
|
6220
6220
|
h,
|
|
@@ -6248,7 +6248,7 @@ const Ul = Zr(function({
|
|
|
6248
6248
|
"div",
|
|
6249
6249
|
{
|
|
6250
6250
|
className: `absolute top-0 ${F.track} ${V.progress} rounded-full ${L ? "" : "transition-all duration-150"}`,
|
|
6251
|
-
style: { left: `${ue}%`, width: `${
|
|
6251
|
+
style: { left: `${ue}%`, width: `${X - ue}%` }
|
|
6252
6252
|
}
|
|
6253
6253
|
) : /* @__PURE__ */ s.jsx(
|
|
6254
6254
|
"div",
|
|
@@ -6257,7 +6257,7 @@ const Ul = Zr(function({
|
|
|
6257
6257
|
style: { width: `${ae}%` }
|
|
6258
6258
|
}
|
|
6259
6259
|
),
|
|
6260
|
-
f && v.map((_,
|
|
6260
|
+
f && v.map((_, Q) => {
|
|
6261
6261
|
const ee = Z(_.value);
|
|
6262
6262
|
return /* @__PURE__ */ s.jsx(
|
|
6263
6263
|
"div",
|
|
@@ -6265,7 +6265,7 @@ const Ul = Zr(function({
|
|
|
6265
6265
|
className: "absolute top-1/2 transform -translate-y-1/2 w-1 h-1 bg-gray-400 rounded-full",
|
|
6266
6266
|
style: { left: `${ee}%` }
|
|
6267
6267
|
},
|
|
6268
|
-
|
|
6268
|
+
Q
|
|
6269
6269
|
);
|
|
6270
6270
|
}),
|
|
6271
6271
|
!m && /* @__PURE__ */ s.jsx(
|
|
@@ -6331,7 +6331,7 @@ const Ul = Zr(function({
|
|
|
6331
6331
|
${I === "max" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6332
6332
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6333
6333
|
`,
|
|
6334
|
-
style: { left: `${
|
|
6334
|
+
style: { left: `${X}%` },
|
|
6335
6335
|
tabIndex: d ? -1 : 0,
|
|
6336
6336
|
role: "slider",
|
|
6337
6337
|
"aria-orientation": "horizontal",
|
|
@@ -6354,7 +6354,7 @@ const Ul = Zr(function({
|
|
|
6354
6354
|
"div",
|
|
6355
6355
|
{
|
|
6356
6356
|
className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
|
|
6357
|
-
children: v.map((_,
|
|
6357
|
+
children: v.map((_, Q) => {
|
|
6358
6358
|
const ee = Z(_.value);
|
|
6359
6359
|
return /* @__PURE__ */ s.jsx(
|
|
6360
6360
|
"div",
|
|
@@ -6363,7 +6363,7 @@ const Ul = Zr(function({
|
|
|
6363
6363
|
style: { left: `${ee}%` },
|
|
6364
6364
|
children: _.label || _.value
|
|
6365
6365
|
},
|
|
6366
|
-
|
|
6366
|
+
Q
|
|
6367
6367
|
);
|
|
6368
6368
|
})
|
|
6369
6369
|
}
|
|
@@ -6643,9 +6643,9 @@ const Ul = Zr(function({
|
|
|
6643
6643
|
prevIcon: h,
|
|
6644
6644
|
className: k
|
|
6645
6645
|
}) => {
|
|
6646
|
-
const b = e.length, $ = Math.min(Math.max(c, 0.1), b), [y, O] = K(0), [D, V] = K(!1), [F, Z] = K(!1), [ae, ue] = K(0),
|
|
6646
|
+
const b = e.length, $ = Math.min(Math.max(c, 0.1), b), [y, O] = K(0), [D, V] = K(!1), [F, Z] = K(!1), [ae, ue] = K(0), X = se(null), H = se(0), Y = se(0), T = $ >= b ? 0 : Math.max(0, b - $), te = (E) => Math.max(0, Math.min(E, T)), pe = (E) => O(
|
|
6647
6647
|
l && T > 0 ? (E % (T + 1) + (T + 1)) % (T + 1) : te(E)
|
|
6648
|
-
),
|
|
6648
|
+
), J = () => {
|
|
6649
6649
|
l && T > 0 ? O(y === 0 ? T : y - 1) : pe(y - 1);
|
|
6650
6650
|
}, x = () => {
|
|
6651
6651
|
l && T > 0 ? O(y >= T ? 0 : y + 1) : pe(y + 1);
|
|
@@ -6675,13 +6675,13 @@ const Ul = Zr(function({
|
|
|
6675
6675
|
F && (Y.current = m === "horizontal" ? E : P, ue(Y.current - H.current));
|
|
6676
6676
|
}, L = () => {
|
|
6677
6677
|
if (!F) return;
|
|
6678
|
-
Math.abs(Y.current - H.current) > 50 && (Y.current < H.current ? x() :
|
|
6678
|
+
Math.abs(Y.current - H.current) > 50 && (Y.current < H.current ? x() : J()), Z(!1), ue(0);
|
|
6679
6679
|
}, N = () => {
|
|
6680
6680
|
const E = m === "horizontal" ? "X" : "Y";
|
|
6681
6681
|
let P = 0;
|
|
6682
|
-
if (F &&
|
|
6683
|
-
const
|
|
6684
|
-
P = ae /
|
|
6682
|
+
if (F && X.current && T > 0) {
|
|
6683
|
+
const Q = m === "horizontal" ? X.current.offsetWidth : X.current.offsetHeight;
|
|
6684
|
+
P = ae / Q * 100 * ($ / b);
|
|
6685
6685
|
}
|
|
6686
6686
|
const q = Math.min(y, T) * (100 / b) - P, S = y >= T, _ = y <= 0 ? 0 : S ? u / (c / 2) : u / c;
|
|
6687
6687
|
return `translate${E}(calc(-${q}% - ${_}px))`;
|
|
@@ -6697,7 +6697,7 @@ const Ul = Zr(function({
|
|
|
6697
6697
|
/* @__PURE__ */ s.jsxs(
|
|
6698
6698
|
"div",
|
|
6699
6699
|
{
|
|
6700
|
-
ref:
|
|
6700
|
+
ref: X,
|
|
6701
6701
|
className: `w-full overflow-hidden relative ${f && T > 0 ? F ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
|
|
6702
6702
|
style: {
|
|
6703
6703
|
height: g ? `calc(${t} - ${v + 20}px)` : t
|
|
@@ -6743,7 +6743,7 @@ const Ul = Zr(function({
|
|
|
6743
6743
|
"button",
|
|
6744
6744
|
{
|
|
6745
6745
|
"aria-label": "prev",
|
|
6746
|
-
onClick:
|
|
6746
|
+
onClick: J,
|
|
6747
6747
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
|
|
6748
6748
|
${m === "horizontal" ? "left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-2 -translate-x-1/2"}`,
|
|
6749
6749
|
children: h || (m === "horizontal" ? "‹" : "↑")
|
|
@@ -7366,8 +7366,8 @@ const di = ({
|
|
|
7366
7366
|
h.key === "Escape" && (n == null || n());
|
|
7367
7367
|
};
|
|
7368
7368
|
return e && document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
7369
|
-
}, [e, n]), ce(() => (e ?
|
|
7370
|
-
document.body.style.overflow = ""
|
|
7369
|
+
}, [e, n]), ce(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7370
|
+
document.body.style.overflow = "";
|
|
7371
7371
|
}), [e]), !u) return null;
|
|
7372
7372
|
const v = {
|
|
7373
7373
|
left: "left-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
@@ -7581,7 +7581,7 @@ const di = ({
|
|
|
7581
7581
|
buttonClass: i = ""
|
|
7582
7582
|
}) => {
|
|
7583
7583
|
let l = "flex justify-around items-center bg-color-white shadow-sm text-color-gray-600 py-2 px-4";
|
|
7584
|
-
return e === "fixed" ? l += " fixed bottom-0 left-0 right-0" : e === "floating" ? l += " fixed bottom-4 left-4 right-4 rounded-full" : e === "static" && (l += " static"), /* @__PURE__ */ s.jsx("nav", { className: `${l} ${o}`, children: t.map((c) => {
|
|
7584
|
+
return e === "fixed" ? l += " fixed bottom-0 left-0 right-0" : e === "floating" ? l += " fixed bottom-4 left-4 right-4 rounded-full" : e === "static" && (l += " static w-full"), /* @__PURE__ */ s.jsx("nav", { className: `${l} ${o}`, children: t.map((c) => {
|
|
7585
7585
|
const u = c.label === n;
|
|
7586
7586
|
return /* @__PURE__ */ s.jsxs(
|
|
7587
7587
|
"a",
|
|
@@ -7622,15 +7622,15 @@ const di = ({
|
|
|
7622
7622
|
}) => {
|
|
7623
7623
|
const [g, p] = K(!1), [f, v] = K(null), [m, w] = K(/* @__PURE__ */ new Date()), [h, k] = K(
|
|
7624
7624
|
d ? new Date(d) : null
|
|
7625
|
-
), [b, $] = K(null), [y, O] = K(null), [D, V] = K(null), [F, Z] = K({ hour: 12, minute: 0, ampm: "AM" }), ae = se(null), [ue,
|
|
7625
|
+
), [b, $] = K(null), [y, O] = K(null), [D, V] = K(null), [F, Z] = K({ hour: 12, minute: 0, ampm: "AM" }), ae = se(null), [ue, X] = K(
|
|
7626
7626
|
d ? new Date(d) : null
|
|
7627
7627
|
), [H, Y] = K(null), [T, te] = K(null);
|
|
7628
7628
|
ce(() => {
|
|
7629
|
-
k(d ? new Date(d) : null),
|
|
7629
|
+
k(d ? new Date(d) : null), X(d ? new Date(d) : null);
|
|
7630
7630
|
}, [d]);
|
|
7631
7631
|
const pe = (S) => {
|
|
7632
7632
|
S.stopPropagation(), v(S.currentTarget), p(!0);
|
|
7633
|
-
},
|
|
7633
|
+
}, J = () => {
|
|
7634
7634
|
p(!1);
|
|
7635
7635
|
}, x = (S) => !!(c && S.getTime() < c || u && S.getTime() > u), C = (S) => {
|
|
7636
7636
|
n === "inline" && ae.current && !ae.current.contains(S.target) && (e === "single" ? h || k(null) : e === "range" && (!b || !y) && ($(null), O(null)), p(!1));
|
|
@@ -7657,14 +7657,14 @@ const di = ({
|
|
|
7657
7657
|
F.ampm === "PM" && F.hour !== 12 ? F.hour + 12 : F.ampm === "AM" && F.hour === 12 ? 0 : F.hour,
|
|
7658
7658
|
F.minute
|
|
7659
7659
|
) : null;
|
|
7660
|
-
|
|
7660
|
+
X(j), a == null || a(j ? j.getTime() : null);
|
|
7661
7661
|
} else e === "range" && (Y(b), te(y), a == null || a({
|
|
7662
7662
|
startDate: b ? b.getTime() : null,
|
|
7663
7663
|
endDate: y ? y.getTime() : null
|
|
7664
7664
|
}));
|
|
7665
7665
|
}, z = () => {
|
|
7666
|
-
const S = new Date(m.getFullYear(), m.getMonth(), 1), j = new Date(m.getFullYear(), m.getMonth() + 1, 0), _ = [],
|
|
7667
|
-
for (let ee = 0; ee <
|
|
7666
|
+
const S = new Date(m.getFullYear(), m.getMonth(), 1), j = new Date(m.getFullYear(), m.getMonth() + 1, 0), _ = [], Q = S.getDay();
|
|
7667
|
+
for (let ee = 0; ee < Q; ee++)
|
|
7668
7668
|
_.push(null);
|
|
7669
7669
|
for (let ee = 1; ee <= j.getDate(); ee++)
|
|
7670
7670
|
_.push(new Date(m.getFullYear(), m.getMonth(), ee));
|
|
@@ -7686,8 +7686,8 @@ const di = ({
|
|
|
7686
7686
|
return e === "range" ? j === "end" ? "End Date" : "Start Date" : r ? `${String(F.hour).padStart(2, "0")}:${String(F.minute).padStart(2, "0")} ${F.ampm}` : i;
|
|
7687
7687
|
if (r)
|
|
7688
7688
|
return `${String(F.hour).padStart(2, "0")}:${String(F.minute).padStart(2, "0")} ${F.ampm}`;
|
|
7689
|
-
const _ = S.getDate().toString().padStart(2, "0"),
|
|
7690
|
-
return `${_} ${
|
|
7689
|
+
const _ = S.getDate().toString().padStart(2, "0"), Q = Kn[S.getMonth()], ee = S.getFullYear(), de = t ? ` ${String(F.hour).padStart(2, "0")}:${String(F.minute).padStart(2, "0")} ${F.ampm}` : "";
|
|
7690
|
+
return `${_} ${Q} ${ee}${de}`;
|
|
7691
7691
|
}, B = /* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-between w-full border border-color-gray-300 rounded-md p-2", children: [
|
|
7692
7692
|
/* @__PURE__ */ s.jsx(
|
|
7693
7693
|
"select",
|
|
@@ -7830,7 +7830,7 @@ const di = ({
|
|
|
7830
7830
|
]
|
|
7831
7831
|
}
|
|
7832
7832
|
),
|
|
7833
|
-
n === "inline" ? /* @__PURE__ */ s.jsx(s.Fragment, { children: g && Ze(q, document.body) }) : /* @__PURE__ */ s.jsx(ci, { open: g, title: r ? "Select Time" : i, onClose:
|
|
7833
|
+
n === "inline" ? /* @__PURE__ */ s.jsx(s.Fragment, { children: g && Ze(q, document.body) }) : /* @__PURE__ */ s.jsx(ci, { open: g, title: r ? "Select Time" : i, onClose: J, children: /* @__PURE__ */ s.jsx("div", { className: "w-72", children: q }) })
|
|
7834
7834
|
] });
|
|
7835
7835
|
}, ps = ({
|
|
7836
7836
|
tabs: e,
|
|
@@ -9262,6 +9262,7 @@ export {
|
|
|
9262
9262
|
da as PasswordInput,
|
|
9263
9263
|
Ol as Pill,
|
|
9264
9264
|
Il as ProfileImageShowcase,
|
|
9265
|
+
Il as ProfileShowcase,
|
|
9265
9266
|
Zl as Progress,
|
|
9266
9267
|
qt as RANGE_COLOR_MAP,
|
|
9267
9268
|
ns as RadioGroup,
|