@unizap/uniui 1.0.69 → 1.0.70

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/uniui.js CHANGED
@@ -348,8 +348,8 @@ const ke = {
348
348
  const z = fe(null), x = fe(null), $ = (D) => {
349
349
  const q = z.current;
350
350
  if (!q) return;
351
- const ee = document.createElement("span"), K = q.getBoundingClientRect(), H = Math.max(K.width, K.height);
352
- ee.style.width = ee.style.height = `${H}px`, ee.style.left = `${D.clientX - K.left - H / 2}px`, ee.style.top = `${D.clientY - K.top - H / 2}px`, ee.className = "ripple", q.appendChild(ee), setTimeout(() => ee.remove(), 600), l == null || l(D);
351
+ const ee = document.createElement("span"), K = q.getBoundingClientRect(), B = Math.max(K.width, K.height);
352
+ ee.style.width = ee.style.height = `${B}px`, ee.style.left = `${D.clientX - K.left - B / 2}px`, ee.style.top = `${D.clientY - K.top - B / 2}px`, ee.className = "ripple", q.appendChild(ee), setTimeout(() => ee.remove(), 600), l == null || l(D);
353
353
  }, w = ((O = ke[n]) == null ? void 0 : O[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
354
354
  return /* @__PURE__ */ a(Ce, { children: h ? /* @__PURE__ */ C(
355
355
  "a",
@@ -492,19 +492,19 @@ const ke = {
492
492
  disabled: b = !1,
493
493
  searchOn: y
494
494
  }) => {
495
- const [z, x] = W(!1), [$, w] = W(-1), [O, D] = W("bottom"), [q, ee] = W(""), K = fe(null), H = fe(null), se = fe(null), Z = bn(q, 300), F = l !== void 0 ? l : z, I = (_) => {
495
+ const [z, x] = W(!1), [$, w] = W(-1), [O, D] = W("bottom"), [q, ee] = W(""), K = fe(null), B = fe(null), se = fe(null), Z = bn(q, 300), F = l !== void 0 ? l : z, I = (_) => {
496
496
  l === void 0 && x(_), _ || ee(""), s == null || s(_);
497
497
  }, J = d ? Array.isArray(e) ? e : [] : e && !Array.isArray(e) ? [e] : [], Q = Z ? o.filter((_) => {
498
- const N = typeof _.label == "string" ? _.label : String(_.label), V = _.value ? String(_.value) : "", B = Z.toLowerCase(), ie = y || "label";
498
+ const N = typeof _.label == "string" ? _.label : String(_.label), V = _.value ? String(_.value) : "", H = Z.toLowerCase(), ie = y || "label";
499
499
  if (ie === "label")
500
- return N.toLowerCase().includes(B);
500
+ return N.toLowerCase().includes(H);
501
501
  if (ie === "value")
502
- return V.toLowerCase().includes(B);
502
+ return V.toLowerCase().includes(H);
503
503
  if (ie === "both")
504
- return N.toLowerCase().includes(B) || V.toLowerCase().includes(B);
504
+ return N.toLowerCase().includes(H) || V.toLowerCase().includes(H);
505
505
  {
506
506
  const P = _[ie];
507
- return typeof P == "string" ? P.toLowerCase().includes(B) : !1;
507
+ return typeof P == "string" ? P.toLowerCase().includes(H) : !1;
508
508
  }
509
509
  }) : o, pe = Q.filter(
510
510
  (_) => J.some(
@@ -516,18 +516,18 @@ const ke = {
516
516
  )
517
517
  ), k = [...pe, ...R], S = pe.length > 0 && R.length > 0, A = (_) => {
518
518
  if (d) {
519
- const N = Array.isArray(e) ? e : [], B = N.some(
519
+ const N = Array.isArray(e) ? e : [], H = N.some(
520
520
  (ie) => ie.label === _.label && ie.value === _.value
521
521
  ) ? N.filter(
522
522
  (ie) => !(ie.label === _.label && ie.value === _.value)
523
523
  ) : [...N, _];
524
- r == null || r(B);
524
+ r == null || r(H);
525
525
  } else
526
526
  r == null || r(_), i || (I(!1), ee(""));
527
527
  }, L = (_, N) => {
528
528
  if (N.stopPropagation(), d && Array.isArray(e)) {
529
529
  const V = e.filter(
530
- (B) => !(B.label === _.label && B.value === _.value)
530
+ (H) => !(H.label === _.label && H.value === _.value)
531
531
  );
532
532
  r == null || r(V);
533
533
  }
@@ -542,8 +542,8 @@ const ke = {
542
542
  }, []), ce(() => {
543
543
  if (F && K.current) {
544
544
  if (p === "auto") {
545
- const _ = K.current.getBoundingClientRect(), N = Math.min(o.length * 40, c), V = window.innerHeight - _.bottom, B = _.top;
546
- D(V >= N || V >= B ? "bottom" : "top");
545
+ const _ = K.current.getBoundingClientRect(), N = Math.min(o.length * 40, c), V = window.innerHeight - _.bottom, H = _.top;
546
+ D(V >= N || V >= H ? "bottom" : "top");
547
547
  } else
548
548
  D(p);
549
549
  g && se.current && se.current.focus();
@@ -563,7 +563,7 @@ const ke = {
563
563
  "button",
564
564
  {
565
565
  type: "button",
566
- onClick: (B) => L(N, B),
566
+ onClick: (H) => L(N, H),
567
567
  className: "ml-1 text-color-gray-500 hover:text-color-gray-700",
568
568
  children: /* @__PURE__ */ a("svg", { className: "size-3", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636l4.95 4.95z" }) })
569
569
  }
@@ -633,7 +633,7 @@ const ke = {
633
633
  /* @__PURE__ */ a(
634
634
  "ul",
635
635
  {
636
- ref: H,
636
+ ref: B,
637
637
  className: "overflow-y-auto",
638
638
  style: { maxHeight: `${c}px` },
639
639
  children: k.length > 0 ? /* @__PURE__ */ C(Ce, { children: [
@@ -806,7 +806,7 @@ function kn() {
806
806
  }
807
807
  }
808
808
  }
809
- var w = c, O = p, D = s, q = l, ee = o, K = g, H = n, se = h, Z = d, F = t, I = r, J = i, Q = m, pe = !1;
809
+ var w = c, O = p, D = s, q = l, ee = o, K = g, B = n, se = h, Z = d, F = t, I = r, J = i, Q = m, pe = !1;
810
810
  function R(P) {
811
811
  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.")), k(P) || $(P) === c;
812
812
  }
@@ -840,13 +840,13 @@ function kn() {
840
840
  function V(P) {
841
841
  return $(P) === r;
842
842
  }
843
- function B(P) {
843
+ function H(P) {
844
844
  return $(P) === i;
845
845
  }
846
846
  function ie(P) {
847
847
  return $(P) === m;
848
848
  }
849
- ue.AsyncMode = w, ue.ConcurrentMode = O, ue.ContextConsumer = D, ue.ContextProvider = q, ue.Element = ee, ue.ForwardRef = K, ue.Fragment = H, ue.Lazy = se, ue.Memo = Z, ue.Portal = F, ue.Profiler = I, ue.StrictMode = J, ue.Suspense = Q, ue.isAsyncMode = R, ue.isConcurrentMode = k, ue.isContextConsumer = S, ue.isContextProvider = A, ue.isElement = L, ue.isForwardRef = j, ue.isFragment = G, ue.isLazy = M, ue.isMemo = _, ue.isPortal = N, ue.isProfiler = V, ue.isStrictMode = B, ue.isSuspense = ie, ue.isValidElementType = x, ue.typeOf = $;
849
+ ue.AsyncMode = w, ue.ConcurrentMode = O, ue.ContextConsumer = D, ue.ContextProvider = q, ue.Element = ee, ue.ForwardRef = K, ue.Fragment = B, ue.Lazy = se, ue.Memo = Z, ue.Portal = F, ue.Profiler = I, ue.StrictMode = J, ue.Suspense = Q, ue.isAsyncMode = R, ue.isConcurrentMode = k, ue.isContextConsumer = S, ue.isContextProvider = A, ue.isElement = L, ue.isForwardRef = j, ue.isFragment = G, ue.isLazy = M, ue.isMemo = _, ue.isPortal = N, ue.isProfiler = V, ue.isStrictMode = H, ue.isSuspense = ie, ue.isValidElementType = x, ue.typeOf = $;
850
850
  }()), ue;
851
851
  }
852
852
  var ro;
@@ -1019,8 +1019,8 @@ function _n() {
1019
1019
  function b(k) {
1020
1020
  if (process.env.NODE_ENV !== "production")
1021
1021
  var S = {}, A = 0;
1022
- function L(G, M, _, N, V, B, ie) {
1023
- if (N = N || u, B = B || _, ie !== t) {
1022
+ function L(G, M, _, N, V, H, ie) {
1023
+ if (N = N || u, H = H || _, ie !== t) {
1024
1024
  if (c) {
1025
1025
  var P = new Error(
1026
1026
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
@@ -1030,11 +1030,11 @@ function _n() {
1030
1030
  var E = N + ":" + _;
1031
1031
  !S[E] && // Avoid spamming the console because they are often not actionable except for lib authors
1032
1032
  A < 3 && (r(
1033
- "You are manually calling a React.PropTypes validation function for the `" + B + "` prop on `" + N + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
1033
+ "You are manually calling a React.PropTypes validation function for the `" + H + "` prop on `" + N + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
1034
1034
  ), S[E] = !0, A++);
1035
1035
  }
1036
1036
  }
1037
- return M[_] == null ? G ? M[_] === null ? new f("The " + V + " `" + B + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new f("The " + V + " `" + B + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : k(M, _, N, V, B);
1037
+ return M[_] == null ? G ? M[_] === null ? new f("The " + V + " `" + H + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new f("The " + V + " `" + H + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : k(M, _, N, V, H);
1038
1038
  }
1039
1039
  var j = L.bind(null, !1);
1040
1040
  return j.isRequired = L.bind(null, !0), j;
@@ -1043,9 +1043,9 @@ function _n() {
1043
1043
  function S(A, L, j, G, M, _) {
1044
1044
  var N = A[L], V = J(N);
1045
1045
  if (V !== k) {
1046
- var B = Q(N);
1046
+ var H = Q(N);
1047
1047
  return new f(
1048
- "Invalid " + G + " `" + M + "` of type " + ("`" + B + "` supplied to `" + j + "`, expected ") + ("`" + k + "`."),
1048
+ "Invalid " + G + " `" + M + "` of type " + ("`" + H + "` supplied to `" + j + "`, expected ") + ("`" + k + "`."),
1049
1049
  { expectedType: k }
1050
1050
  );
1051
1051
  }
@@ -1066,9 +1066,9 @@ function _n() {
1066
1066
  return new f("Invalid " + G + " `" + M + "` of type " + ("`" + N + "` supplied to `" + j + "`, expected an array."));
1067
1067
  }
1068
1068
  for (var V = 0; V < _.length; V++) {
1069
- var B = k(_, V, j, G, M + "[" + V + "]", t);
1070
- if (B instanceof Error)
1071
- return B;
1069
+ var H = k(_, V, j, G, M + "[" + V + "]", t);
1070
+ if (H instanceof Error)
1071
+ return H;
1072
1072
  }
1073
1073
  return null;
1074
1074
  }
@@ -1132,9 +1132,9 @@ function _n() {
1132
1132
  return new f("Invalid " + G + " `" + M + "` of type " + ("`" + N + "` supplied to `" + j + "`, expected an object."));
1133
1133
  for (var V in _)
1134
1134
  if (n(_, V)) {
1135
- var B = k(_, V, j, G, M + "." + V, t);
1136
- if (B instanceof Error)
1137
- return B;
1135
+ var H = k(_, V, j, G, M + "." + V, t);
1136
+ if (H instanceof Error)
1137
+ return H;
1138
1138
  }
1139
1139
  return null;
1140
1140
  }
@@ -1151,8 +1151,8 @@ function _n() {
1151
1151
  ), l;
1152
1152
  }
1153
1153
  function L(j, G, M, _, N) {
1154
- for (var V = [], B = 0; B < k.length; B++) {
1155
- var ie = k[B], P = ie(j, G, M, _, N, t);
1154
+ for (var V = [], H = 0; H < k.length; H++) {
1155
+ var ie = k[H], P = ie(j, G, M, _, N, t);
1156
1156
  if (P == null)
1157
1157
  return null;
1158
1158
  P.data && n(P.data, "expectedType") && V.push(P.data.expectedType);
@@ -1168,7 +1168,7 @@ function _n() {
1168
1168
  }
1169
1169
  return b(k);
1170
1170
  }
1171
- function H(k, S, A, L, j) {
1171
+ function B(k, S, A, L, j) {
1172
1172
  return new f(
1173
1173
  (k || "React class") + ": " + S + " type `" + A + "." + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + j + "`."
1174
1174
  );
@@ -1179,10 +1179,10 @@ function _n() {
1179
1179
  if (N !== "object")
1180
1180
  return new f("Invalid " + G + " `" + M + "` of type `" + N + "` " + ("supplied to `" + j + "`, expected `object`."));
1181
1181
  for (var V in k) {
1182
- var B = k[V];
1183
- if (typeof B != "function")
1184
- return H(j, G, M, V, Q(B));
1185
- var ie = B(_, V, j, G, M + "." + V, t);
1182
+ var H = k[V];
1183
+ if (typeof H != "function")
1184
+ return B(j, G, M, V, Q(H));
1185
+ var ie = H(_, V, j, G, M + "." + V, t);
1186
1186
  if (ie)
1187
1187
  return ie;
1188
1188
  }
@@ -1196,16 +1196,16 @@ function _n() {
1196
1196
  if (N !== "object")
1197
1197
  return new f("Invalid " + G + " `" + M + "` of type `" + N + "` " + ("supplied to `" + j + "`, expected `object`."));
1198
1198
  var V = o({}, A[L], k);
1199
- for (var B in V) {
1200
- var ie = k[B];
1201
- if (n(k, B) && typeof ie != "function")
1202
- return H(j, G, M, B, Q(ie));
1199
+ for (var H in V) {
1200
+ var ie = k[H];
1201
+ if (n(k, H) && typeof ie != "function")
1202
+ return B(j, G, M, H, Q(ie));
1203
1203
  if (!ie)
1204
1204
  return new f(
1205
- "Invalid " + G + " `" + M + "` key `" + B + "` supplied to `" + j + "`.\nBad object: " + JSON.stringify(A[L], null, " ") + `
1205
+ "Invalid " + G + " `" + M + "` key `" + H + "` supplied to `" + j + "`.\nBad object: " + JSON.stringify(A[L], null, " ") + `
1206
1206
  Valid keys: ` + JSON.stringify(Object.keys(k), null, " ")
1207
1207
  );
1208
- var P = ie(_, B, j, G, M + "." + B, t);
1208
+ var P = ie(_, H, j, G, M + "." + H, t);
1209
1209
  if (P)
1210
1210
  return P;
1211
1211
  }
@@ -3246,7 +3246,7 @@ var Gt = {
3246
3246
  function Jo() {
3247
3247
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, o = xe(xe({}, Xo), e), t = o.accept, n = o.disabled, i = o.getFilesFromEvent, r = o.maxSize, l = o.minSize, s = o.multiple, c = o.maxFiles, p = o.onDragEnter, g = o.onDragLeave, m = o.onDragOver, u = o.onDrop, d = o.onDropAccepted, h = o.onDropRejected, f = o.onFileDialogCancel, b = o.onFileDialogOpen, y = o.useFsAccessApi, z = o.autoFocus, x = o.preventDropOnDocument, $ = o.noClick, w = o.noKeyboard, O = o.noDrag, D = o.noDragEventsBubbling, q = o.onError, ee = o.validator, K = Ze(function() {
3248
3248
  return si(t);
3249
- }, [t]), H = Ze(function() {
3249
+ }, [t]), B = Ze(function() {
3250
3250
  return li(t);
3251
3251
  }, [t]), se = Ze(function() {
3252
3252
  return typeof b == "function" ? b : _o;
@@ -3322,7 +3322,7 @@ function Jo() {
3322
3322
  isDragAccept: !1,
3323
3323
  isDragReject: !1
3324
3324
  }), ut(T) && g && g(T));
3325
- }, [F, g, D]), B = ge(function(T, X) {
3325
+ }, [F, g, D]), H = ge(function(T, X) {
3326
3326
  var he = [], be = [];
3327
3327
  T.forEach(function(_e) {
3328
3328
  var Ve = Yo(_e, K), Ie = Nt(Ve, 2), Xe = Ie[0], He = Ie[1], Je = Zo(_e, l, r), Ye = Nt(Je, 2), Qe = Ye[0], et = Ye[1], tt = ee ? ee(_e) : null;
@@ -3350,25 +3350,25 @@ function Jo() {
3350
3350
  }), u && u(he, be, X), be.length > 0 && h && h(be, X), he.length > 0 && d && d(he, X);
3351
3351
  }, [R, s, K, l, r, c, u, d, h, ee]), ie = ge(function(T) {
3352
3352
  T.preventDefault(), T.persist(), ye(T), j.current = [], ut(T) && Promise.resolve(i(T)).then(function(X) {
3353
- xt(T) && !D || B(X, T);
3353
+ xt(T) && !D || H(X, T);
3354
3354
  }).catch(function(X) {
3355
3355
  return M(X);
3356
3356
  }), R({
3357
3357
  type: "reset"
3358
3358
  });
3359
- }, [i, B, M, D]), P = ge(function() {
3359
+ }, [i, H, M, D]), P = ge(function() {
3360
3360
  if (A.current) {
3361
3361
  R({
3362
3362
  type: "openDialog"
3363
3363
  }), se();
3364
3364
  var T = {
3365
3365
  multiple: s,
3366
- types: H
3366
+ types: B
3367
3367
  };
3368
3368
  window.showOpenFilePicker(T).then(function(X) {
3369
3369
  return i(X);
3370
3370
  }).then(function(X) {
3371
- B(X, null), R({
3371
+ H(X, null), R({
3372
3372
  type: "closeDialog"
3373
3373
  });
3374
3374
  }).catch(function(X) {
@@ -3381,7 +3381,7 @@ function Jo() {
3381
3381
  I.current && (R({
3382
3382
  type: "openDialog"
3383
3383
  }), se(), I.current.value = null, I.current.click());
3384
- }, [R, se, Z, y, B, M, H, s]), E = ge(function(T) {
3384
+ }, [R, se, Z, y, H, M, B, s]), E = ge(function(T) {
3385
3385
  !F.current || !F.current.isEqualNode(T.target) || (T.key === " " || T.key === "Enter" || T.keyCode === 32 || T.keyCode === 13) && (T.preventDefault(), P());
3386
3386
  }, [F, P]), ae = ge(function() {
3387
3387
  R({
@@ -3557,7 +3557,7 @@ const Qr = ({
3557
3557
  ]
3558
3558
  ), q = (Z) => {
3559
3559
  $((F) => F.filter((I, J) => J !== Z)), z(x);
3560
- }, { getRootProps: ee, getInputProps: K, isDragActive: H, isDragReject: se } = Jo({
3560
+ }, { getRootProps: ee, getInputProps: K, isDragActive: B, isDragReject: se } = Jo({
3561
3561
  onDrop: D,
3562
3562
  accept: t,
3563
3563
  multiple: n,
@@ -3569,7 +3569,7 @@ const Qr = ({
3569
3569
  {
3570
3570
  className: `
3571
3571
  border border-style-dashed rounded-lg p-0 overflow-hidden transition
3572
- ${H ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
3572
+ ${B ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
3573
3573
  ${se ? "border-color-red-500 bg-color-red-50" : ""}
3574
3574
  ${l ? "opacity-50 cursor-not-allowed" : ""}
3575
3575
  ${g}
@@ -4776,8 +4776,8 @@ const Ji = {
4776
4776
  var $, w;
4777
4777
  const O = o.options.columnResizeDirection === "rtl" ? -1 : 1, D = (z - (($ = x == null ? void 0 : x.startOffset) != null ? $ : 0)) * O, q = Math.max(D / ((w = x == null ? void 0 : x.startSize) != null ? w : 0), -0.999999);
4778
4778
  return x.columnSizingStart.forEach((ee) => {
4779
- let [K, H] = ee;
4780
- p[K] = Math.round(Math.max(H + H * q, 0) * 100) / 100;
4779
+ let [K, B] = ee;
4780
+ p[K] = Math.round(Math.max(B + B * q, 0) * 100) / 100;
4781
4781
  }), {
4782
4782
  ...x,
4783
4783
  deltaOffset: D,
@@ -6162,7 +6162,7 @@ const sa = xn(function({
6162
6162
  const y = o !== void 0, [z, x] = W(() => t !== void 0 ? t : f ? [r, l] : r), $ = y ? o : z, w = Array.isArray($) ? $[0] : $, [O, D] = Array.isArray($) ? $ : [$, $], q = jt[c] || jt.blue, ee = No[p] ?? No.medium, K = ge(
6163
6163
  (E) => (E - r) / (l - r) * 100,
6164
6164
  [r, l]
6165
- ), H = K(w), se = K(O), Z = K(D), F = ge((E) => Math.max(r, Math.min(l, E)), [r, l]), I = ge((E) => Math.round(E / s) * s, [s]), J = Pr(n), Q = ge(
6165
+ ), B = K(w), se = K(O), Z = K(D), F = ge((E) => Math.max(r, Math.min(l, E)), [r, l]), I = ge((E) => Math.round(E / s) * s, [s]), J = Pr(n), Q = ge(
6166
6166
  (E, ae = !0) => {
6167
6167
  y || x(E), ae ? J.schedule(E) : J.flush(E);
6168
6168
  },
@@ -6217,7 +6217,7 @@ const sa = xn(function({
6217
6217
  D,
6218
6218
  Q
6219
6219
  ]
6220
- ), B = ge(
6220
+ ), H = ge(
6221
6221
  (E) => {
6222
6222
  if (g || _ == null || L == null) return;
6223
6223
  const ae = S(E.clientX);
@@ -6303,7 +6303,7 @@ const sa = xn(function({
6303
6303
  ${g ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}
6304
6304
  `,
6305
6305
  onPointerDown: (E) => V(E),
6306
- onPointerMove: B,
6306
+ onPointerMove: H,
6307
6307
  onPointerUp: ie,
6308
6308
  onPointerCancel: ie,
6309
6309
  children: [
@@ -6317,7 +6317,7 @@ const sa = xn(function({
6317
6317
  "div",
6318
6318
  {
6319
6319
  className: `absolute top-0 left-0 ${ee.track} ${q.progress} rounded-full ${L ? "" : "transition-all duration-150"}`,
6320
- style: { width: `${H}%` }
6320
+ style: { width: `${B}%` }
6321
6321
  }
6322
6322
  ),
6323
6323
  d && h.map((E, ae) => {
@@ -6342,7 +6342,7 @@ const sa = xn(function({
6342
6342
  ${G === "single" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
6343
6343
  shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
6344
6344
  `,
6345
- style: { left: `${H}%` },
6345
+ style: { left: `${B}%` },
6346
6346
  tabIndex: g ? -1 : 0,
6347
6347
  role: "slider",
6348
6348
  "aria-orientation": "horizontal",
@@ -6745,7 +6745,7 @@ const sa = xn(function({
6745
6745
  w == null ? void 0 : w.showIndicators,
6746
6746
  n,
6747
6747
  O
6748
- ), H = We(
6748
+ ), B = We(
6749
6749
  x == null ? void 0 : x.showThumbs,
6750
6750
  $ == null ? void 0 : $.showThumbs,
6751
6751
  w == null ? void 0 : w.showThumbs,
@@ -6761,7 +6761,7 @@ const sa = xn(function({
6761
6761
  s && M > 0 ? (U % (M + 1) + (M + 1)) % (M + 1) : _(U)
6762
6762
  ), V = () => {
6763
6763
  s && M > 0 ? J(I === 0 ? M : I - 1) : N(I - 1);
6764
- }, B = () => {
6764
+ }, H = () => {
6765
6765
  s && M > 0 ? J(I >= M ? 0 : I + 1) : N(I + 1);
6766
6766
  };
6767
6767
  ce(() => {
@@ -6791,7 +6791,7 @@ const sa = xn(function({
6791
6791
  R && (G.current = f === "horizontal" ? U : re, A(G.current - j.current));
6792
6792
  }, E = () => {
6793
6793
  if (!R) return;
6794
- Math.abs(G.current - j.current) > 50 && (G.current < j.current ? B() : V()), k(!1), A(0);
6794
+ Math.abs(G.current - j.current) > 50 && (G.current < j.current ? H() : V()), k(!1), A(0);
6795
6795
  }, ae = () => {
6796
6796
  const U = f === "horizontal" ? "X" : "Y";
6797
6797
  let re = 0;
@@ -6816,7 +6816,7 @@ const sa = xn(function({
6816
6816
  ref: L,
6817
6817
  className: `w-full overflow-hidden relative ${se && M > 0 ? R ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
6818
6818
  style: {
6819
- height: H ? `calc(${t} - ${h + 20}px)` : t
6819
+ height: B ? `calc(${t} - ${h + 20}px)` : t
6820
6820
  },
6821
6821
  onMouseDown: (U) => {
6822
6822
  U.preventDefault(), ie(U.clientX, U.clientY);
@@ -6869,7 +6869,7 @@ const sa = xn(function({
6869
6869
  "button",
6870
6870
  {
6871
6871
  "aria-label": "next",
6872
- onClick: B,
6872
+ onClick: H,
6873
6873
  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
6874
6874
  ${f === "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"}`,
6875
6875
  children: b || (f === "horizontal" ? "›" : "↓")
@@ -6899,7 +6899,7 @@ const sa = xn(function({
6899
6899
  ]
6900
6900
  }
6901
6901
  ),
6902
- H && /* @__PURE__ */ a("div", { className: "uniui-thumb flex gap-1 md:gap-2 mt-2 md:mt-3 justify-center flex-wrap", children: e.map((U, re) => {
6902
+ B && /* @__PURE__ */ a("div", { className: "uniui-thumb flex gap-1 md:gap-2 mt-2 md:mt-3 justify-center flex-wrap", children: e.map((U, re) => {
6903
6903
  const ze = re === Math.round(I), ye = O === "mobile" ? h * 0.8 : h;
6904
6904
  return /* @__PURE__ */ a(
6905
6905
  "div",
@@ -7203,7 +7203,7 @@ const sa = xn(function({
7203
7203
  tickClassName: q = "",
7204
7204
  tickIconSize: ee = "w-4 h-4",
7205
7205
  showToggleButton: K = !1,
7206
- toggleButtonIcon: H
7206
+ toggleButtonIcon: B
7207
7207
  }) => {
7208
7208
  const [se, Z] = W(-1), F = t ?? n, I = (A) => {
7209
7209
  switch (A) {
@@ -7263,7 +7263,9 @@ const sa = xn(function({
7263
7263
  ${_ ? "" : "hover:shadow-md"}
7264
7264
  ${$}
7265
7265
  `,
7266
- onClick: () => !_ && Q(L, M),
7266
+ onClick: (H) => {
7267
+ H.stopPropagation(), !_ && Q(L, M);
7268
+ },
7267
7269
  children: [
7268
7270
  N && V && /* @__PURE__ */ a("div", { className: "absolute top-2 right-2 w-6 h-6 bg-color-red-500 rounded-full flex items-center justify-center", children: /* @__PURE__ */ a(
7269
7271
  "svg",
@@ -7308,13 +7310,13 @@ const sa = xn(function({
7308
7310
  "button",
7309
7311
  {
7310
7312
  type: "button",
7311
- onClick: (B) => {
7312
- B.stopPropagation(), _ || Q(L, M);
7313
+ onClick: (H) => {
7314
+ H.stopPropagation(), _ || Q(L, M);
7313
7315
  },
7314
7316
  disabled: _,
7315
7317
  className: `mt-1 flex-shrink-0 rounded-full bg-color-gray-300 transition-all duration-150 ${I(u)} ${_ ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
7316
7318
  "aria-checked": N,
7317
- children: N && !V && /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center", children: H || D || /* @__PURE__ */ C(
7319
+ children: N && !V && /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center", children: B || D || /* @__PURE__ */ C(
7318
7320
  "svg",
7319
7321
  {
7320
7322
  xmlns: "http://www.w3.org/2000/svg",
@@ -7392,7 +7394,7 @@ const sa = xn(function({
7392
7394
  checked: N,
7393
7395
  onChange: () => !_ && Q(L, M),
7394
7396
  onBlur: pe,
7395
- onFocus: (B) => R(B, M),
7397
+ onFocus: (H) => R(H, M),
7396
7398
  className: "sr-only peer",
7397
7399
  "aria-invalid": h,
7398
7400
  ...G && { id: G }
@@ -7982,13 +7984,13 @@ const jr = ({
7982
7984
  fromTime: w,
7983
7985
  toTime: O
7984
7986
  }) => {
7985
- const [D, q] = W(!1), [ee, K] = W(null), [H, se] = W(
7987
+ const [D, q] = W(!1), [ee, K] = W(null), [B, se] = W(
7986
7988
  b || y ? /* @__PURE__ */ new Date() : f ? new Date(typeof f == "string" ? parseInt(f) : f) : /* @__PURE__ */ new Date()
7987
7989
  ), [Z, F] = W(
7988
7990
  d ? new Date(d) : f && !d ? new Date(typeof f == "string" ? parseInt(f) : f) : null
7989
7991
  ), [I, J] = W(b ? new Date(b) : null), [Q, pe] = W(y ? new Date(y) : null), [R, k] = W(null), [S, A] = W({ hour: 12, minute: 0, ampm: "AM" }), L = fe(null), [j, G] = W(
7990
7992
  d ? new Date(d) : f && !d ? new Date(typeof f == "string" ? parseInt(f) : f) : null
7991
- ), [M, _] = W(b ? new Date(b) : null), [N, V] = W(y ? new Date(y) : null), [B, ie] = W(!1), [P, E] = W(!1), [ae, le] = W(!1), [ve, U] = W({ hour: 12, minute: 0, ampm: "AM" }), [re, ze] = W({ hour: 12, minute: 0, ampm: "AM" }), [ye, Te] = W(
7993
+ ), [M, _] = W(b ? new Date(b) : null), [N, V] = W(y ? new Date(y) : null), [H, ie] = W(!1), [P, E] = W(!1), [ae, le] = W(!1), [ve, U] = W({ hour: 12, minute: 0, ampm: "AM" }), [re, ze] = W({ hour: 12, minute: 0, ampm: "AM" }), [ye, Te] = W(
7992
7994
  w ? new Date(w) : null
7993
7995
  ), [Ae, qe] = W(
7994
7996
  O ? new Date(O) : null
@@ -8130,36 +8132,36 @@ const jr = ({
8130
8132
  const De = v.getMinutes();
8131
8133
  return `${String(ne).padStart(2, "0")}:${String(De).padStart(2, "0")} ${$e}`;
8132
8134
  }, un = () => {
8133
- const v = new Date(H.getFullYear(), H.getMonth(), 1), Y = new Date(H.getFullYear(), H.getMonth() + 1, 0), ne = (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999), $e = [], De = v.getDay();
8135
+ const v = new Date(B.getFullYear(), B.getMonth(), 1), Y = new Date(B.getFullYear(), B.getMonth() + 1, 0), ne = (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999), $e = [], De = v.getDay();
8134
8136
  for (let we = 0; we < De; we++)
8135
8137
  $e.push(null);
8136
8138
  for (let we = 1; we <= Y.getDate(); we++) {
8137
- const kt = new Date(H.getFullYear(), H.getMonth(), we);
8139
+ const kt = new Date(B.getFullYear(), B.getMonth(), we);
8138
8140
  h && kt.getTime() > ne || $e.push(kt);
8139
8141
  }
8140
8142
  return $e;
8141
8143
  }, pn = () => {
8142
8144
  if (z) {
8143
8145
  const v = typeof z == "string" ? new Date(z) : typeof z == "number" ? new Date(z) : z;
8144
- if (H.getFullYear() < v.getFullYear() || H.getFullYear() === v.getFullYear() && H.getMonth() <= v.getMonth()) return !1;
8146
+ if (B.getFullYear() < v.getFullYear() || B.getFullYear() === v.getFullYear() && B.getMonth() <= v.getMonth()) return !1;
8145
8147
  }
8146
8148
  if (m) {
8147
8149
  const v = new Date(m);
8148
- if (H.getFullYear() < v.getFullYear() || H.getFullYear() === v.getFullYear() && H.getMonth() <= v.getMonth()) return !1;
8150
+ if (B.getFullYear() < v.getFullYear() || B.getFullYear() === v.getFullYear() && B.getMonth() <= v.getMonth()) return !1;
8149
8151
  }
8150
8152
  return !0;
8151
8153
  }, gn = () => {
8152
8154
  if (x) {
8153
8155
  const v = typeof x == "string" ? new Date(x) : typeof x == "number" ? new Date(x) : x;
8154
- if (H.getFullYear() > v.getFullYear() || H.getFullYear() === v.getFullYear() && H.getMonth() >= v.getMonth()) return !1;
8156
+ if (B.getFullYear() > v.getFullYear() || B.getFullYear() === v.getFullYear() && B.getMonth() >= v.getMonth()) return !1;
8155
8157
  }
8156
8158
  if (u) {
8157
8159
  const v = new Date(u);
8158
- if (H.getFullYear() > v.getFullYear() || H.getFullYear() === v.getFullYear() && H.getMonth() >= v.getMonth()) return !1;
8160
+ if (B.getFullYear() > v.getFullYear() || B.getFullYear() === v.getFullYear() && B.getMonth() >= v.getMonth()) return !1;
8159
8161
  }
8160
8162
  if (h) {
8161
8163
  const v = /* @__PURE__ */ new Date();
8162
- if (H.getFullYear() > v.getFullYear() || H.getFullYear() === v.getFullYear() && H.getMonth() >= v.getMonth()) return !1;
8164
+ if (B.getFullYear() > v.getFullYear() || B.getFullYear() === v.getFullYear() && B.getMonth() >= v.getMonth()) return !1;
8163
8165
  }
8164
8166
  return !0;
8165
8167
  }, fn = (v) => {
@@ -8264,7 +8266,7 @@ const jr = ({
8264
8266
  color: "gray",
8265
8267
  roundedFull: !0,
8266
8268
  disabled: !pn(),
8267
- onClick: () => se(new Date(H.getFullYear(), H.getMonth() - 1, 1)),
8269
+ onClick: () => se(new Date(B.getFullYear(), B.getMonth() - 1, 1)),
8268
8270
  icon: /* @__PURE__ */ a("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) })
8269
8271
  }
8270
8272
  ),
@@ -8272,11 +8274,11 @@ const jr = ({
8272
8274
  "select",
8273
8275
  {
8274
8276
  className: "text-sm outline-none",
8275
- value: H.getMonth(),
8276
- onChange: (v) => se(new Date(H.getFullYear(), parseInt(v.target.value), 1)),
8277
+ value: B.getMonth(),
8278
+ onChange: (v) => se(new Date(B.getFullYear(), parseInt(v.target.value), 1)),
8277
8279
  children: [
8278
8280
  To.map((v, Y) => {
8279
- const ne = H.getFullYear(), $e = Y, De = /* @__PURE__ */ new Date();
8281
+ const ne = B.getFullYear(), $e = Y, De = /* @__PURE__ */ new Date();
8280
8282
  if (h && ne === De.getFullYear() && $e > De.getMonth())
8281
8283
  return null;
8282
8284
  if (z) {
@@ -8326,7 +8328,7 @@ const jr = ({
8326
8328
  color: "gray",
8327
8329
  roundedFull: !0,
8328
8330
  disabled: !gn(),
8329
- onClick: () => se(new Date(H.getFullYear(), H.getMonth() + 1, 1)),
8331
+ onClick: () => se(new Date(B.getFullYear(), B.getMonth() + 1, 1)),
8330
8332
  icon: /* @__PURE__ */ a("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
8331
8333
  }
8332
8334
  )
@@ -8423,7 +8425,7 @@ const jr = ({
8423
8425
  }
8424
8426
  ),
8425
8427
  o === "inline" ? /* @__PURE__ */ a(Ce, { children: D && at(oo, document.body) }) : /* @__PURE__ */ a(vt, { open: D, title: n ? "Select Time" : p, onClose: Xe, children: /* @__PURE__ */ a("div", { className: "w-72", children: oo }) }),
8426
- B && /* @__PURE__ */ a(vt, { open: B, onClose: () => ie(!1), title: "Select Time", children: /* @__PURE__ */ C("div", { className: "p-4", children: [
8428
+ H && /* @__PURE__ */ a(vt, { open: H, onClose: () => ie(!1), title: "Select Time", children: /* @__PURE__ */ C("div", { className: "p-4", children: [
8427
8429
  /* @__PURE__ */ C("div", { className: "flex gap-2 mb-4", children: [
8428
8430
  /* @__PURE__ */ C("div", { className: "flex-1", children: [
8429
8431
  /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-color-gray-700 mb-1", children: "Hour" }),
@@ -8886,11 +8888,11 @@ const Io = [
8886
8888
  searchClassName: d = "",
8887
8889
  showClearAll: h = !1
8888
8890
  }) => {
8889
- const [f, b] = W(!1), [y, z] = W(""), [x, $] = W(-1), [w, O] = W("bottom"), D = fe(null), q = fe(null), ee = fe(null), K = t ? Array.isArray(e) ? e : [] : e && !Array.isArray(e) ? [e] : [], H = y ? Io.filter(
8891
+ const [f, b] = W(!1), [y, z] = W(""), [x, $] = W(-1), [w, O] = W("bottom"), D = fe(null), q = fe(null), ee = fe(null), K = t ? Array.isArray(e) ? e : [] : e && !Array.isArray(e) ? [e] : [], B = y ? Io.filter(
8890
8892
  (R) => R.name.toLowerCase().includes(y.toLowerCase()) || R.code.toLowerCase().includes(y.toLowerCase()) || R.dialCode.includes(y)
8891
- ) : Io, se = H.filter(
8893
+ ) : Io, se = B.filter(
8892
8894
  (R) => K.some((k) => k.code === R.code)
8893
- ), Z = H.filter(
8895
+ ), Z = B.filter(
8894
8896
  (R) => !K.some((k) => k.code === R.code)
8895
8897
  ), F = (R) => {
8896
8898
  if (t) {
@@ -8911,15 +8913,15 @@ const Io = [
8911
8913
  }, []), ce(() => {
8912
8914
  if (f && D.current) {
8913
8915
  if (p === "auto") {
8914
- const R = D.current.getBoundingClientRect(), k = Math.min(H.length * 44, c), S = window.innerHeight - R.bottom, A = R.top;
8916
+ const R = D.current.getBoundingClientRect(), k = Math.min(B.length * 44, c), S = window.innerHeight - R.bottom, A = R.top;
8915
8917
  O(S >= k || S >= A ? "bottom" : "top");
8916
8918
  } else
8917
8919
  O(p);
8918
8920
  n && q.current && q.current.focus();
8919
8921
  }
8920
- }, [f, H.length, c, p, n]);
8922
+ }, [f, B.length, c, p, n]);
8921
8923
  const Q = (R) => {
8922
- R.key === "ArrowDown" ? (R.preventDefault(), f ? $((k) => Math.min(k + 1, H.length - 1)) : (b(!0), $(0))) : R.key === "ArrowUp" ? (R.preventDefault(), $((k) => Math.max(k - 1, 0))) : R.key === "Enter" ? (R.preventDefault(), x >= 0 && H[x] && F(H[x])) : R.key === "Escape" && (R.preventDefault(), b(!1), z(""), $(-1));
8924
+ R.key === "ArrowDown" ? (R.preventDefault(), f ? $((k) => Math.min(k + 1, B.length - 1)) : (b(!0), $(0))) : R.key === "ArrowUp" ? (R.preventDefault(), $((k) => Math.max(k - 1, 0))) : R.key === "Enter" ? (R.preventDefault(), x >= 0 && B[x] && F(B[x])) : R.key === "Escape" && (R.preventDefault(), b(!1), z(""), $(-1));
8923
8925
  }, pe = () => {
8924
8926
  if (t) {
8925
8927
  if (K.length === 0)
@@ -9014,7 +9016,7 @@ const Io = [
9014
9016
  ref: ee,
9015
9017
  className: "overflow-y-auto",
9016
9018
  style: { maxHeight: `${c}px` },
9017
- children: H.length > 0 ? /* @__PURE__ */ C(Ce, { children: [
9019
+ children: B.length > 0 ? /* @__PURE__ */ C(Ce, { children: [
9018
9020
  se.map((R, k) => /* @__PURE__ */ C(
9019
9021
  "li",
9020
9022
  {