@idds/react 1.6.0 → 1.6.1

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/index.es.js CHANGED
@@ -613,8 +613,8 @@ function Dr(e) {
613
613
  _.current.delete(w), f((F) => F.filter((z) => z !== y).map((z) => z > y ? z - 1 : z));
614
614
  const p = /* @__PURE__ */ new Map();
615
615
  let L = 0;
616
- _.current.forEach((F, O) => {
617
- p.set(O, L), L++;
616
+ _.current.forEach((F, U) => {
617
+ p.set(U, L), L++;
618
618
  }), _.current = p;
619
619
  }
620
620
  }, []), A = me(
@@ -672,11 +672,11 @@ function Ir(e) {
672
672
  if (l) return;
673
673
  const z = !y;
674
674
  N && h >= 0 && f ? f.handleItemToggle(h, z) : w || v(z), s == null || s(z);
675
- }, O = S("ina-accordion", c, {
675
+ }, U = S("ina-accordion", c, {
676
676
  "ina-accordion--disabled": l,
677
677
  "ina-accordion--open": y
678
678
  });
679
- return /* @__PURE__ */ b("div", { className: O, children: [
679
+ return /* @__PURE__ */ b("div", { className: U, children: [
680
680
  /* @__PURE__ */ b(
681
681
  "button",
682
682
  {
@@ -689,10 +689,10 @@ function Ir(e) {
689
689
  z.preventDefault();
690
690
  const H = z.currentTarget.closest(".ina-accordion");
691
691
  if (!H) return;
692
- const U = H.closest(".ina-accordion-group") || H.parentElement;
693
- if (!U) return;
692
+ const O = H.closest(".ina-accordion-group") || H.parentElement;
693
+ if (!O) return;
694
694
  const K = Array.from(
695
- U.querySelectorAll(
695
+ O.querySelectorAll(
696
696
  ".ina-accordion__toggle:not([disabled])"
697
697
  )
698
698
  ), ae = K.indexOf(z.currentTarget);
@@ -1641,21 +1641,21 @@ function Br({
1641
1641
  if (V)
1642
1642
  if (t) {
1643
1643
  let H;
1644
- f.includes(V) ? H = f.filter((U) => U !== V) : H = [...f, V], s == null || s(H);
1644
+ f.includes(V) ? H = f.filter((O) => O !== V) : H = [...f, V], s == null || s(H);
1645
1645
  } else
1646
1646
  f.includes(V) ? s == null || s("") : s == null || s(V);
1647
1647
  }, F = () => {
1648
1648
  const V = A.trim();
1649
1649
  if (t) {
1650
1650
  let H = [...f];
1651
- m && h && (H = H.filter((U) => U !== h)), V && (H.includes(V) || H.push(V)), s == null || s(H);
1651
+ m && h && (H = H.filter((O) => O !== h)), V && (H.includes(V) || H.push(V)), s == null || s(H);
1652
1652
  } else
1653
1653
  s == null || s(V);
1654
1654
  E(!1);
1655
- }, O = l ? [...e, { label: c, value: c }] : e, z = S("ina-chip", v);
1655
+ }, U = l ? [...e, { label: c, value: c }] : e, z = S("ina-chip", v);
1656
1656
  return /* @__PURE__ */ b("div", { className: z, children: [
1657
- /* @__PURE__ */ n("div", { className: "ina-chip__list", children: O.map((V, H) => {
1658
- const U = l && V.value === c, K = U ? m : f.includes(V.value);
1657
+ /* @__PURE__ */ n("div", { className: "ina-chip__list", children: U.map((V, H) => {
1658
+ const O = l && V.value === c, K = O ? m : f.includes(V.value);
1659
1659
  return /* @__PURE__ */ n(
1660
1660
  "button",
1661
1661
  {
@@ -1664,22 +1664,22 @@ function Br({
1664
1664
  tabIndex: H === w && !V.disabled ? 0 : -1,
1665
1665
  disabled: V.disabled,
1666
1666
  onClick: () => {
1667
- V.disabled || (y(H), U ? (E(!0), T(!t && !m ? "" : h)) : L(V.value));
1667
+ V.disabled || (y(H), O ? (E(!0), T(!t && !m ? "" : h)) : L(V.value));
1668
1668
  },
1669
1669
  onKeyDown: (ae) => {
1670
1670
  var de, ee, Y, G, W;
1671
1671
  if (!V.disabled) {
1672
1672
  if (ae.key === "ArrowRight" || ae.key === "ArrowDown") {
1673
1673
  ae.preventDefault();
1674
- let P = (H + 1) % O.length;
1675
- for (; (de = O[P]) != null && de.disabled && P !== H; )
1676
- P = (P + 1) % O.length;
1674
+ let P = (H + 1) % U.length;
1675
+ for (; (de = U[P]) != null && de.disabled && P !== H; )
1676
+ P = (P + 1) % U.length;
1677
1677
  y(P), (ee = p.current[P]) == null || ee.focus();
1678
1678
  } else if (ae.key === "ArrowLeft" || ae.key === "ArrowUp") {
1679
1679
  ae.preventDefault();
1680
- let P = (H - 1 + O.length) % O.length;
1681
- for (; (Y = O[P]) != null && Y.disabled && P !== H; )
1682
- P = (P - 1 + O.length) % O.length;
1680
+ let P = (H - 1 + U.length) % U.length;
1681
+ for (; (Y = U[P]) != null && Y.disabled && P !== H; )
1682
+ P = (P - 1 + U.length) % U.length;
1683
1683
  y(P), (G = p.current[P]) == null || G.focus();
1684
1684
  }
1685
1685
  ae.key === " " && (ae.preventDefault(), (W = p.current[H]) == null || W.click());
@@ -2373,7 +2373,7 @@ function Gr({
2373
2373
  onRemove: h,
2374
2374
  ...I
2375
2375
  }) {
2376
- const E = ie(null), [A, T] = X([]), [N, w] = X(!1), [y, p] = X([]), [L, F] = X(!1), O = me(() => {
2376
+ const E = ie(null), [A, T] = X([]), [N, w] = X(!1), [y, p] = X([]), [L, F] = X(!1), U = me(() => {
2377
2377
  var G;
2378
2378
  f || (G = E.current) == null || G.click();
2379
2379
  }, [f]), z = me(
@@ -2482,7 +2482,7 @@ function Gr({
2482
2482
  G.preventDefault(), G.stopPropagation(), f || w(!0);
2483
2483
  },
2484
2484
  [f]
2485
- ), U = me((G) => {
2485
+ ), O = me((G) => {
2486
2486
  G.preventDefault(), G.stopPropagation(), w(!1);
2487
2487
  }, []), K = me(
2488
2488
  async (G) => {
@@ -2523,9 +2523,9 @@ function Gr({
2523
2523
  "div",
2524
2524
  {
2525
2525
  className: Y,
2526
- onClick: O,
2526
+ onClick: U,
2527
2527
  onDragOver: H,
2528
- onDragLeave: U,
2528
+ onDragLeave: O,
2529
2529
  onDrop: K,
2530
2530
  children: [
2531
2531
  /* @__PURE__ */ n(
@@ -2554,7 +2554,7 @@ function Gr({
2554
2554
  className: "ina-file-upload__button",
2555
2555
  disabled: f,
2556
2556
  onClick: (G) => {
2557
- G.stopPropagation(), O();
2557
+ G.stopPropagation(), U();
2558
2558
  },
2559
2559
  children: "Pilih File"
2560
2560
  }
@@ -2776,7 +2776,7 @@ function Kr({
2776
2776
  onRemove: M,
2777
2777
  ...m
2778
2778
  }) {
2779
- const h = ie(null), [I, E] = X(null), [A, T] = X(0), [N, w] = X("idle"), [y, p] = X(!1), L = _ !== void 0 ? _ : A, F = v !== void 0 ? v : N, O = me(() => {
2779
+ const h = ie(null), [I, E] = X(null), [A, T] = X(0), [N, w] = X("idle"), [y, p] = X(!1), L = _ !== void 0 ? _ : A, F = v !== void 0 ? v : N, U = me(() => {
2780
2780
  var W;
2781
2781
  l || I || (W = h.current) == null || W.click();
2782
2782
  }, [l, I]), z = me(
@@ -2835,8 +2835,8 @@ function Kr({
2835
2835
  ), V = me(() => {
2836
2836
  E(null), T(0), w("idle"), p(!1), h.current && (h.current.value = ""), M == null || M(), f == null || f(null, null);
2837
2837
  }, [M, f]), H = me(() => {
2838
- l || I || O();
2839
- }, [l, I, O]), U = me(() => {
2838
+ l || I || U();
2839
+ }, [l, I, U]), O = me(() => {
2840
2840
  l || I || p(!0);
2841
2841
  }, [l, I]), K = me(() => {
2842
2842
  p(!1);
@@ -2938,7 +2938,7 @@ function Kr({
2938
2938
  {
2939
2939
  className: G,
2940
2940
  onClick: H,
2941
- onFocus: U,
2941
+ onFocus: O,
2942
2942
  onBlur: K,
2943
2943
  onDragOver: ae,
2944
2944
  onDragLeave: de,
@@ -3093,7 +3093,7 @@ function pn(e, a, t, r) {
3093
3093
  var A = typeof window < "u", T = !a && a !== 0 && A;
3094
3094
  if (typeof e != "function") throw new TypeError("Expected a function");
3095
3095
  a = +a || 0;
3096
- var N = !!(t = t || {}).leading, w = !("trailing" in t) || !!t.trailing, y = !!t.flushOnExit && w, p = "maxWait" in t, L = "debounceOnServer" in t && !!t.debounceOnServer, F = p ? Math.max(+t.maxWait || 0, a) : null, O = Fe(function() {
3096
+ var N = !!(t = t || {}).leading, w = !("trailing" in t) || !!t.trailing, y = !!t.flushOnExit && w, p = "maxWait" in t, L = "debounceOnServer" in t && !!t.debounceOnServer, F = p ? Math.max(+t.maxWait || 0, a) : null, U = Fe(function() {
3097
3097
  var z = function(ee) {
3098
3098
  var Y = v.current, G = f.current;
3099
3099
  return v.current = f.current = null, l.current = ee, c.current = c.current || ee, M.current = m.current.apply(G, Y);
@@ -3103,11 +3103,11 @@ function pn(e, a, t, r) {
3103
3103
  if (!h.current) return !1;
3104
3104
  var Y = ee - s.current;
3105
3105
  return !s.current || Y >= a || Y < 0 || p && ee - l.current >= F;
3106
- }, U = function(ee) {
3106
+ }, O = function(ee) {
3107
3107
  return _.current = null, w && v.current ? z(ee) : (v.current = f.current = null, M.current);
3108
3108
  }, K = function ee() {
3109
3109
  var Y = Date.now();
3110
- if (N && c.current === l.current && ae(), H(Y)) return U(Y);
3110
+ if (N && c.current === l.current && ae(), H(Y)) return O(Y);
3111
3111
  if (h.current) {
3112
3112
  var G = a - (Y - s.current), W = p ? Math.min(G, F - (Y - l.current)) : G;
3113
3113
  V(ee, W);
@@ -3133,15 +3133,15 @@ function pn(e, a, t, r) {
3133
3133
  }, de.isPending = function() {
3134
3134
  return !!_.current;
3135
3135
  }, de.flush = function() {
3136
- return _.current ? U(Date.now()) : M.current;
3136
+ return _.current ? O(Date.now()) : M.current;
3137
3137
  }, de;
3138
3138
  }, [N, p, a, F, w, y, T, A, L, r]);
3139
- return E.current = O, le(function() {
3139
+ return E.current = U, le(function() {
3140
3140
  return h.current = !0, function() {
3141
3141
  var z;
3142
3142
  y && E.current.flush(), I.current && ((z = global.document) == null || z.removeEventListener == null || z.removeEventListener("visibilitychange", I.current), I.current = null), h.current = !1;
3143
3143
  };
3144
- }, [y]), O;
3144
+ }, [y]), U;
3145
3145
  }
3146
3146
  function mn(e, a) {
3147
3147
  return e === a;
@@ -3293,16 +3293,16 @@ function vn({
3293
3293
  });
3294
3294
  else {
3295
3295
  E(!1), N.current && (N.current.focus(), N.current = null);
3296
- const O = setTimeout(() => {
3296
+ const U = setTimeout(() => {
3297
3297
  h(!1);
3298
3298
  }, 300);
3299
- return () => clearTimeout(O);
3299
+ return () => clearTimeout(U);
3300
3300
  }
3301
3301
  }, [e]), le(() => {
3302
3302
  if (f && m) {
3303
- const O = document.documentElement.style.overflow;
3303
+ const U = document.documentElement.style.overflow;
3304
3304
  return document.documentElement.style.overflow = "hidden", () => {
3305
- document.documentElement.style.overflow = O;
3305
+ document.documentElement.style.overflow = U;
3306
3306
  };
3307
3307
  }
3308
3308
  }, [m, f]), le(() => {
@@ -3311,7 +3311,7 @@ function vn({
3311
3311
  var z;
3312
3312
  (z = A.current) == null || z.focus();
3313
3313
  }, 50);
3314
- const O = (z) => {
3314
+ const U = (z) => {
3315
3315
  if (z.key === "Escape" && I) {
3316
3316
  a();
3317
3317
  return;
@@ -3323,11 +3323,11 @@ function vn({
3323
3323
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
3324
3324
  );
3325
3325
  if (H.length === 0) return;
3326
- const U = H[0], K = H[H.length - 1];
3327
- z.shiftKey ? document.activeElement === U && (z.preventDefault(), K.focus()) : document.activeElement === K && (z.preventDefault(), U.focus());
3326
+ const O = H[0], K = H[H.length - 1];
3327
+ z.shiftKey ? document.activeElement === O && (z.preventDefault(), K.focus()) : document.activeElement === K && (z.preventDefault(), O.focus());
3328
3328
  }
3329
3329
  };
3330
- return document.addEventListener("keydown", O), () => document.removeEventListener("keydown", O);
3330
+ return document.addEventListener("keydown", U), () => document.removeEventListener("keydown", U);
3331
3331
  }, [m, I, f, a]), !m || !f) return null;
3332
3332
  const w = s ?? document.body, y = S(
3333
3333
  "ina-modal",
@@ -3360,7 +3360,7 @@ function vn({
3360
3360
  "div",
3361
3361
  {
3362
3362
  className: p,
3363
- onClick: (O) => O.stopPropagation(),
3363
+ onClick: (U) => U.stopPropagation(),
3364
3364
  tabIndex: -1,
3365
3365
  children: [
3366
3366
  /* @__PURE__ */ b("div", { className: L, children: [
@@ -3467,8 +3467,8 @@ function _n({
3467
3467
  const p = [];
3468
3468
  let L, F;
3469
3469
  e === 1 ? (L = 1, F = Math.min(3, a)) : e === a ? (L = Math.max(1, a - 2), F = a) : (L = e - 1, F = e + 1);
3470
- for (let O = L; O <= F; O++)
3471
- p.push(I(O));
3470
+ for (let U = L; U <= F; U++)
3471
+ p.push(I(U));
3472
3472
  return p;
3473
3473
  }
3474
3474
  const I = (p) => {
@@ -3546,12 +3546,12 @@ function _n({
3546
3546
  p.currentTarget.querySelectorAll("button:not([disabled])")
3547
3547
  );
3548
3548
  if (!F.length) return;
3549
- const O = F.indexOf(
3549
+ const U = F.indexOf(
3550
3550
  document.activeElement
3551
3551
  );
3552
- if (O >= 0) {
3552
+ if (U >= 0) {
3553
3553
  p.preventDefault();
3554
- const z = p.key === "ArrowRight" ? (O + 1) % F.length : (O - 1 + F.length) % F.length;
3554
+ const z = p.key === "ArrowRight" ? (U + 1) % F.length : (U - 1 + F.length) % F.length;
3555
3555
  (L = F[z]) == null || L.focus();
3556
3556
  }
3557
3557
  } else if (p.key === "Enter" || p.key === " ") {
@@ -3807,11 +3807,11 @@ function es({
3807
3807
  const F = (K) => {
3808
3808
  const ae = K.target.value;
3809
3809
  f != null && ae.length > f || (N(ae), a(ae));
3810
- }, O = (K) => {
3810
+ }, U = (K) => {
3811
3811
  E == null || E(K);
3812
3812
  }, z = () => {
3813
3813
  N(""), a(""), r && r("");
3814
- }, V = c !== "neutral" && _ != null ? _ : l, H = (A == null ? void 0 : A.id) || (A == null ? void 0 : A.name) || String(s).toLowerCase(), U = `${H}-status`;
3814
+ }, V = c !== "neutral" && _ != null ? _ : l, H = (A == null ? void 0 : A.id) || (A == null ? void 0 : A.name) || String(s).toLowerCase(), O = `${H}-status`;
3815
3815
  return /* @__PURE__ */ b("div", { className: S("ina-password-input", I), children: [
3816
3816
  s && /* @__PURE__ */ b(
3817
3817
  "label",
@@ -3844,11 +3844,11 @@ function es({
3844
3844
  className: "ina-password-input__input",
3845
3845
  value: T,
3846
3846
  onChange: F,
3847
- onBlur: O,
3847
+ onBlur: U,
3848
3848
  placeholder: m,
3849
3849
  disabled: h,
3850
3850
  maxLength: f,
3851
- "aria-describedby": V ? U : void 0
3851
+ "aria-describedby": V ? O : void 0
3852
3852
  }
3853
3853
  ),
3854
3854
  T !== "" && /* @__PURE__ */ n(
@@ -3880,7 +3880,7 @@ function es({
3880
3880
  ]
3881
3881
  }
3882
3882
  ),
3883
- V && /* @__PURE__ */ b("div", { id: U, className: "ina-password-input__status-area", children: [
3883
+ V && /* @__PURE__ */ b("div", { id: O, className: "ina-password-input__status-area", children: [
3884
3884
  /* @__PURE__ */ n(
3885
3885
  "div",
3886
3886
  {
@@ -4475,9 +4475,9 @@ function ts({
4475
4475
  id: A,
4476
4476
  ...T
4477
4477
  }) {
4478
- const N = Fe(() => A || `phone-input-${Math.random().toString(36).substr(2, 9)}`, [A]), [w, y] = X(a), [p, L] = X(!1), [F, O] = X(""), [z, V] = X(
4478
+ const N = Fe(() => A || `phone-input-${Math.random().toString(36).substr(2, 9)}`, [A]), [w, y] = X(a), [p, L] = X(!1), [F, U] = X(""), [z, V] = X(
4479
4479
  h.find((Q) => Q.code === m) || h[0]
4480
- ), H = ie(null), U = ie(null), K = ie(null), ae = Fe(() => `${N}-helper`, [N]), de = (Q) => {
4480
+ ), H = ie(null), O = ie(null), K = ie(null), ae = Fe(() => `${N}-helper`, [N]), de = (Q) => {
4481
4481
  const se = Q.replace(/\D/g, "");
4482
4482
  return se.length > 7 ? se.replace(/^(\d{3})(\d{4})(.*)/, "$1-$2-$3") : se.length > 3 ? se.replace(/^(\d{3})(.*)/, "$1-$2") : se;
4483
4483
  };
@@ -4506,9 +4506,9 @@ function ts({
4506
4506
  }, [h, F]), Y = () => {
4507
4507
  v || f || L((Q) => {
4508
4508
  const se = !Q;
4509
- return se && (O(""), setTimeout(() => {
4509
+ return se && (U(""), setTimeout(() => {
4510
4510
  var ge;
4511
- (ge = U.current) == null || ge.focus();
4511
+ (ge = O.current) == null || ge.focus();
4512
4512
  }, 0)), se;
4513
4513
  });
4514
4514
  }, G = (Q) => {
@@ -4602,9 +4602,9 @@ function ts({
4602
4602
  /* @__PURE__ */ n("div", { className: "ina-phone-input__country-search", children: /* @__PURE__ */ n(
4603
4603
  "input",
4604
4604
  {
4605
- ref: U,
4605
+ ref: O,
4606
4606
  value: F,
4607
- onChange: (Q) => O(Q.target.value),
4607
+ onChange: (Q) => U(Q.target.value),
4608
4608
  type: "text",
4609
4609
  placeholder: "Cari",
4610
4610
  className: "ina-phone-input__country-search-input"
@@ -4780,25 +4780,25 @@ const ns = ({
4780
4780
  searchDebounceMs: p = 300,
4781
4781
  renderSelectedPreview: L,
4782
4782
  onRemoveSelected: F,
4783
- searchValue: O,
4783
+ searchValue: U,
4784
4784
  onSearchChange: z,
4785
4785
  disabled: V = !1,
4786
4786
  showPreviewValue: H = !0,
4787
- searchable: U = !0,
4787
+ searchable: O = !0,
4788
4788
  onSelectedRawChange: K,
4789
4789
  label: ae,
4790
4790
  required: de,
4791
4791
  selectionTitle: ee
4792
4792
  }) => {
4793
4793
  var D;
4794
- const [Y, G] = X(!1), [W, P] = X(""), [ne, J] = X(-1), j = ie(null), te = ie(null), Q = ie([]), se = ie(null), ge = ie(/* @__PURE__ */ new Map()), oe = O !== void 0, q = oe ? O : W;
4794
+ const [Y, G] = X(!1), [W, P] = X(""), [ne, J] = X(-1), j = ie(null), te = ie(null), Q = ie([]), se = ie(null), ge = ie(/* @__PURE__ */ new Map()), oe = U !== void 0, q = oe ? U : W;
4795
4795
  le(() => (se.current && clearTimeout(se.current), y && q !== "" ? se.current = setTimeout(() => {
4796
4796
  y(q);
4797
4797
  }, p) : y && q === "" && y(""), () => {
4798
4798
  se.current && clearTimeout(se.current);
4799
4799
  }), [q, y, p]), le(() => {
4800
- oe && O !== W && P(O);
4801
- }, [O, oe, W]), le(() => {
4800
+ oe && U !== W && P(U);
4801
+ }, [U, oe, W]), le(() => {
4802
4802
  const d = (C) => {
4803
4803
  j.current && !j.current.contains(C.target) && (G(!1), J(-1), M == null || M());
4804
4804
  };
@@ -4862,7 +4862,7 @@ const ns = ({
4862
4862
  }
4863
4863
  else
4864
4864
  ve = _e(fe) || r;
4865
- const ke = y ? e : U ? e.filter(
4865
+ const ke = y ? e : O ? e.filter(
4866
4866
  (d) => d.label.toLowerCase().includes(q.toLowerCase())
4867
4867
  ) : e;
4868
4868
  le(() => {
@@ -4999,7 +4999,7 @@ const ns = ({
4999
4999
  "aria-haspopup": "listbox",
5000
5000
  children: [
5001
5001
  m && /* @__PURE__ */ n("div", { className: "ina-select-dropdown__trigger-prefix", children: m }),
5002
- U && !V ? /* @__PURE__ */ n(
5002
+ O && !V ? /* @__PURE__ */ n(
5003
5003
  "input",
5004
5004
  {
5005
5005
  type: "text",
@@ -5341,7 +5341,7 @@ function Dn({
5341
5341
  onBlur: y,
5342
5342
  ...p
5343
5343
  }) {
5344
- const L = () => w != null && w.enableXssProtection ? Xe(e).sanitized : e, [F, O] = X(L()), [z] = mt(F, r), V = ie(!0);
5344
+ const L = () => w != null && w.enableXssProtection ? Xe(e).sanitized : e, [F, U] = X(L()), [z] = mt(F, r), V = ie(!0);
5345
5345
  le(() => {
5346
5346
  let W = e;
5347
5347
  if (w != null && w.enableXssProtection) {
@@ -5351,7 +5351,7 @@ function Dn({
5351
5351
  P.threats
5352
5352
  ), w.onSecurityViolation && w.onSecurityViolation(P.threats, e), W = P.sanitized);
5353
5353
  }
5354
- O(W);
5354
+ U(W);
5355
5355
  }, [e, w]), le(() => {
5356
5356
  V.current ? V.current = !1 : r > 0 && i && i(z);
5357
5357
  }, [z, r, i]);
@@ -5362,12 +5362,12 @@ function Dn({
5362
5362
  const ne = Xe(P);
5363
5363
  ne.isValid || (w.logViolations && console.warn("TextField security violation:", ne.threats), w.onSecurityViolation && w.onSecurityViolation(ne.threats, P), P = ne.sanitized);
5364
5364
  }
5365
- O(P), a(P), t == null || t(W);
5365
+ U(P), a(P), t == null || t(W);
5366
5366
  }
5367
- }, U = (W) => {
5367
+ }, O = (W) => {
5368
5368
  y == null || y(W);
5369
5369
  }, K = () => {
5370
- O(""), a(""), i && i(""), E == null || E();
5370
+ U(""), a(""), i && i(""), E == null || E();
5371
5371
  }, ae = S(
5372
5372
  "ina-text-field__wrapper",
5373
5373
  `ina-text-field__wrapper--size-${M}`,
@@ -5400,7 +5400,7 @@ function Dn({
5400
5400
  className: S("ina-text-field__input", N),
5401
5401
  value: F,
5402
5402
  onChange: H,
5403
- onBlur: U,
5403
+ onBlur: O,
5404
5404
  placeholder: A,
5405
5405
  disabled: T,
5406
5406
  maxLength: m,
@@ -5499,13 +5499,13 @@ function ls({
5499
5499
  emptyState: p = "No data found",
5500
5500
  showPagination: L = !0
5501
5501
  }) {
5502
- const [F, O] = X([]), [z, V] = X(0), [H, U] = X(!1), K = ie(null), ae = fa(), [de, ee] = X(t), [Y, G] = X(r), [W, P] = X(s), [ne, J] = X(
5502
+ const [F, U] = X([]), [z, V] = X(0), [H, O] = X(!1), K = ie(null), ae = fa(), [de, ee] = X(t), [Y, G] = X(r), [W, P] = X(s), [ne, J] = X(
5503
5503
  l
5504
5504
  ), [j, te] = X(""), [Q, se] = X(""), [ge, oe] = X({}), q = Object.values(ge).every(Boolean), ye = Object.values(ge).some(Boolean), [ue, fe] = X({}), [_e, Me] = X(null), ve = Math.ceil(z / Y);
5505
5505
  le(() => {
5506
5506
  const k = new AbortController(), Z = k.signal;
5507
5507
  async function ce() {
5508
- U(!0);
5508
+ O(!0);
5509
5509
  try {
5510
5510
  const pe = await a({
5511
5511
  page: de,
@@ -5514,11 +5514,11 @@ function ls({
5514
5514
  sortOrder: ne,
5515
5515
  searchTerm: j
5516
5516
  });
5517
- Z.aborted || (O(pe.data), V(pe.total), oe({}), fe({}), Me(null));
5517
+ Z.aborted || (U(pe.data), V(pe.total), oe({}), fe({}), Me(null));
5518
5518
  } catch (pe) {
5519
5519
  Z.aborted || console.error(pe);
5520
5520
  } finally {
5521
- Z.aborted || U(!1);
5521
+ Z.aborted || O(!1);
5522
5522
  }
5523
5523
  }
5524
5524
  return ce(), () => {
@@ -5801,7 +5801,7 @@ function os({
5801
5801
  onBlur: w,
5802
5802
  ...y
5803
5803
  }) {
5804
- const p = () => N != null && N.enableXssProtection ? Xe(e).sanitized : e, [L, F] = X(p()), [O] = mt(L, t), z = ie(!0), V = ie(null), [H, U] = X(h);
5804
+ const p = () => N != null && N.enableXssProtection ? Xe(e).sanitized : e, [L, F] = X(p()), [U] = mt(L, t), z = ie(!0), V = ie(null), [H, O] = X(h);
5805
5805
  le(() => {
5806
5806
  let J = e;
5807
5807
  if (N != null && N.enableXssProtection) {
@@ -5813,14 +5813,14 @@ function os({
5813
5813
  }
5814
5814
  F(J);
5815
5815
  }, [e, N]), le(() => {
5816
- z.current ? z.current = !1 : t > 0 && r && r(O);
5817
- }, [O, t, r]), le(() => {
5816
+ z.current ? z.current = !1 : t > 0 && r && r(U);
5817
+ }, [U, t, r]), le(() => {
5818
5818
  const J = V.current;
5819
5819
  if (!J) return;
5820
5820
  J.rows = h;
5821
5821
  const j = parseInt(getComputedStyle(J).lineHeight || "0", 10), te = J.scrollHeight;
5822
5822
  let Q = Math.floor(te / j);
5823
- I && (Q = Math.min(Q, I)), U(Math.max(Q, h));
5823
+ I && (Q = Math.min(Q, I)), O(Math.max(Q, h));
5824
5824
  }, [L, h, I]);
5825
5825
  const K = (J) => {
5826
5826
  let j = J.target.value;
@@ -5943,8 +5943,8 @@ function cs({
5943
5943
  const F = N - 1;
5944
5944
  if (m.current[F]) {
5945
5945
  m.current[F].focus();
5946
- const O = e.split("");
5947
- O[F] = "", a(O.join(""));
5946
+ const U = e.split("");
5947
+ U[F] = "", a(U.join(""));
5948
5948
  }
5949
5949
  } else {
5950
5950
  const F = e.split("");
@@ -5954,8 +5954,8 @@ function cs({
5954
5954
  const F = L.replace(/\D/g, "").slice(0, t);
5955
5955
  if (F) {
5956
5956
  a(F);
5957
- const O = Math.min(F.length - 1, t - 1);
5958
- m.current[O] && m.current[O].focus();
5957
+ const U = Math.min(F.length - 1, t - 1);
5958
+ m.current[U] && m.current[U].focus();
5959
5959
  }
5960
5960
  }));
5961
5961
  }, E = (N) => {
@@ -6060,9 +6060,9 @@ const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ b(
6060
6060
  showNowButton: p = !1,
6061
6061
  label: L,
6062
6062
  required: F,
6063
- ...O
6063
+ ...U
6064
6064
  }, z) => {
6065
- const [V, H] = X(!1), [U, K] = X(
6065
+ const [V, H] = X(!1), [O, K] = X(
6066
6066
  e || v || ""
6067
6067
  ), [ae, de] = X(null), [ee, Y] = X(null), [G, W] = X(!1), P = ie(null), ne = ie(null), J = ie(null);
6068
6068
  ma(z, () => ({
@@ -6136,7 +6136,7 @@ const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ b(
6136
6136
  break;
6137
6137
  }
6138
6138
  return g;
6139
- }, oe = j(U || ""), q = ge("hour"), ye = ge("minute"), ue = ge("second"), fe = () => {
6139
+ }, oe = j(O || ""), q = ge("hour"), ye = ge("minute"), ue = ge("second"), fe = () => {
6140
6140
  a || V || (H(!0), W(!0), M == null || M(!0), setTimeout(() => {
6141
6141
  var o;
6142
6142
  return (o = ne.current) == null ? void 0 : o.focus();
@@ -6175,7 +6175,7 @@ const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ b(
6175
6175
  K(""), f == null || f("");
6176
6176
  };
6177
6177
  le(() => {
6178
- v !== void 0 && v !== U && K(v);
6178
+ v !== void 0 && v !== O && K(v);
6179
6179
  }, [v]), le(() => {
6180
6180
  const o = (g) => {
6181
6181
  P.current && !P.current.contains(g.target) && _e();
@@ -6312,7 +6312,7 @@ const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ b(
6312
6312
  ref: ne,
6313
6313
  type: "text",
6314
6314
  className: De,
6315
- value: U,
6315
+ value: O,
6316
6316
  onChange: ke,
6317
6317
  onClick: (o) => {
6318
6318
  o.stopPropagation(), fe();
@@ -6322,14 +6322,13 @@ const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ b(
6322
6322
  },
6323
6323
  placeholder: l,
6324
6324
  disabled: a,
6325
- readOnly: !a,
6326
6325
  onKeyDown: (o) => {
6327
- o.key === "Enter" || o.key === " " ? (o.preventDefault(), Me()) : o.key === "Escape" && V && _e();
6326
+ o.key === "Enter" ? (o.preventDefault(), O ? _e() : Me()) : o.key === "Escape" && V && _e();
6328
6327
  },
6329
- ...O
6328
+ ...U
6330
6329
  }
6331
6330
  ),
6332
- E && U && !a && /* @__PURE__ */ n(
6331
+ E && O && !a && /* @__PURE__ */ n(
6333
6332
  "button",
6334
6333
  {
6335
6334
  type: "button",
@@ -6349,7 +6348,7 @@ const An = ({ size: e = 24, stroke: a = 2, ...t }) => /* @__PURE__ */ b(
6349
6348
  {
6350
6349
  className: "ina-time-picker__suffix-icon",
6351
6350
  style: {
6352
- visibility: E && U && !a ? "hidden" : "visible"
6351
+ visibility: E && O && !a ? "hidden" : "visible"
6353
6352
  },
6354
6353
  children: T
6355
6354
  }
@@ -7026,9 +7025,9 @@ function On(e) {
7026
7025
  ...m.current.rules,
7027
7026
  ...Pe(m.current.disabled) ? { disabled: m.current.disabled } : {}
7028
7027
  });
7029
- const L = (F, O) => {
7028
+ const L = (F, U) => {
7030
7029
  const z = re(i._fields, F);
7031
- z && z._f && (z._f.mount = O);
7030
+ z && z._f && (z._f.mount = U);
7032
7031
  };
7033
7032
  if (L(t, !0), y) {
7034
7033
  const F = Ie(re(i._options.defaultValues, t, m.current.defaultValue));
@@ -7300,20 +7299,20 @@ var Je = (e) => Ae(e) && !pt(e) ? e : {
7300
7299
  const { ref: l, refs: c, required: _, maxLength: v, minLength: f, min: M, max: m, pattern: h, validate: I, name: E, valueAsNumber: A, mount: T } = e._f, N = re(t, E);
7301
7300
  if (!T || a.has(E))
7302
7301
  return {};
7303
- const w = c ? c[0] : l, y = (U) => {
7304
- i && w.reportValidity && (w.setCustomValidity(Pe(U) ? "" : U || ""), w.reportValidity());
7305
- }, p = {}, L = Pt(l), F = rt(l), O = L || F, z = (A || Bt(l)) && xe(l.value) && xe(N) || ft(l) && l.value === "" || N === "" || Array.isArray(N) && !N.length, V = Kn.bind(null, E, r, p), H = (U, K, ae, de = We.maxLength, ee = We.minLength) => {
7306
- const Y = U ? K : ae;
7302
+ const w = c ? c[0] : l, y = (O) => {
7303
+ i && w.reportValidity && (w.setCustomValidity(Pe(O) ? "" : O || ""), w.reportValidity());
7304
+ }, p = {}, L = Pt(l), F = rt(l), U = L || F, z = (A || Bt(l)) && xe(l.value) && xe(N) || ft(l) && l.value === "" || N === "" || Array.isArray(N) && !N.length, V = Kn.bind(null, E, r, p), H = (O, K, ae, de = We.maxLength, ee = We.minLength) => {
7305
+ const Y = O ? K : ae;
7307
7306
  p[E] = {
7308
- type: U ? de : ee,
7307
+ type: O ? de : ee,
7309
7308
  message: Y,
7310
7309
  ref: l,
7311
- ...V(U ? de : ee, Y)
7310
+ ...V(O ? de : ee, Y)
7312
7311
  };
7313
7312
  };
7314
- if (s ? !Array.isArray(N) || !N.length : _ && (!O && (z || Be(N)) || Pe(N) && !N || F && !Ra(c).isValid || L && !Ba(c).isValid)) {
7315
- const { value: U, message: K } = He(_) ? { value: !!_, message: _ } : Je(_);
7316
- if (U && (p[E] = {
7313
+ if (s ? !Array.isArray(N) || !N.length : _ && (!U && (z || Be(N)) || Pe(N) && !N || F && !Ra(c).isValid || L && !Ba(c).isValid)) {
7314
+ const { value: O, message: K } = He(_) ? { value: !!_, message: _ } : Je(_);
7315
+ if (O && (p[E] = {
7317
7316
  type: We.required,
7318
7317
  message: K,
7319
7318
  ref: w,
@@ -7322,26 +7321,26 @@ var Je = (e) => Ae(e) && !pt(e) ? e : {
7322
7321
  return y(K), p;
7323
7322
  }
7324
7323
  if (!z && (!Be(M) || !Be(m))) {
7325
- let U, K;
7324
+ let O, K;
7326
7325
  const ae = Je(m), de = Je(M);
7327
7326
  if (!Be(N) && !isNaN(N)) {
7328
7327
  const ee = l.valueAsNumber || N && +N;
7329
- Be(ae.value) || (U = ee > ae.value), Be(de.value) || (K = ee < de.value);
7328
+ Be(ae.value) || (O = ee > ae.value), Be(de.value) || (K = ee < de.value);
7330
7329
  } else {
7331
7330
  const ee = l.valueAsDate || new Date(N), Y = (P) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + P), G = l.type == "time", W = l.type == "week";
7332
- He(ae.value) && N && (U = G ? Y(N) > Y(ae.value) : W ? N > ae.value : ee > new Date(ae.value)), He(de.value) && N && (K = G ? Y(N) < Y(de.value) : W ? N < de.value : ee < new Date(de.value));
7331
+ He(ae.value) && N && (O = G ? Y(N) > Y(ae.value) : W ? N > ae.value : ee > new Date(ae.value)), He(de.value) && N && (K = G ? Y(N) < Y(de.value) : W ? N < de.value : ee < new Date(de.value));
7333
7332
  }
7334
- if ((U || K) && (H(!!U, ae.message, de.message, We.max, We.min), !r))
7333
+ if ((O || K) && (H(!!O, ae.message, de.message, We.max, We.min), !r))
7335
7334
  return y(p[E].message), p;
7336
7335
  }
7337
7336
  if ((v || f) && !z && (He(N) || s && Array.isArray(N))) {
7338
- const U = Je(v), K = Je(f), ae = !Be(U.value) && N.length > +U.value, de = !Be(K.value) && N.length < +K.value;
7339
- if ((ae || de) && (H(ae, U.message, K.message), !r))
7337
+ const O = Je(v), K = Je(f), ae = !Be(O.value) && N.length > +O.value, de = !Be(K.value) && N.length < +K.value;
7338
+ if ((ae || de) && (H(ae, O.message, K.message), !r))
7340
7339
  return y(p[E].message), p;
7341
7340
  }
7342
7341
  if (h && !z && He(N)) {
7343
- const { value: U, message: K } = Je(h);
7344
- if (pt(U) && !N.match(U) && (p[E] = {
7342
+ const { value: O, message: K } = Je(h);
7343
+ if (pt(O) && !N.match(O) && (p[E] = {
7345
7344
  type: We.pattern,
7346
7345
  message: K,
7347
7346
  ref: l,
@@ -7351,26 +7350,26 @@ var Je = (e) => Ae(e) && !pt(e) ? e : {
7351
7350
  }
7352
7351
  if (I) {
7353
7352
  if (Re(I)) {
7354
- const U = await I(N, t), K = sa(U, w);
7353
+ const O = await I(N, t), K = sa(O, w);
7355
7354
  if (K && (p[E] = {
7356
7355
  ...K,
7357
7356
  ...V(We.validate, K.message)
7358
7357
  }, !r))
7359
7358
  return y(K.message), p;
7360
7359
  } else if (Ae(I)) {
7361
- let U = {};
7360
+ let O = {};
7362
7361
  for (const K in I) {
7363
- if (!$e(U) && !r)
7362
+ if (!$e(O) && !r)
7364
7363
  break;
7365
7364
  const ae = sa(await I[K](N, t), w, K);
7366
- ae && (U = {
7365
+ ae && (O = {
7367
7366
  ...ae,
7368
7367
  ...V(K, ae.message)
7369
- }, y(ae.message), r && (p[E] = U));
7368
+ }, y(ae.message), r && (p[E] = O));
7370
7369
  }
7371
- if (!$e(U) && (p[E] = {
7370
+ if (!$e(O) && (p[E] = {
7372
7371
  ref: w,
7373
- ...U
7372
+ ...O
7374
7373
  }, !r))
7375
7374
  return p;
7376
7375
  }
@@ -7435,7 +7434,7 @@ function sr(e = {}) {
7435
7434
  }, A = async (o) => {
7436
7435
  if (!l.keepIsValid && !a.disabled && (M.isValid || m.isValid || o)) {
7437
7436
  let g;
7438
- a.resolver ? (g = $e((await O()).errors), T()) : g = await V(r, !0), g !== t.isValid && h.state.next({
7437
+ a.resolver ? (g = $e((await U()).errors), T()) : g = await V(r, !0), g !== t.isValid && h.state.next({
7439
7438
  isValid: g
7440
7439
  });
7441
7440
  }
@@ -7462,7 +7461,7 @@ function sr(e = {}) {
7462
7461
  }
7463
7462
  (M.dirtyFields || m.dirtyFields) && (t.dirtyFields = Ze(i, s)), h.state.next({
7464
7463
  name: o,
7465
- isDirty: U(o, g),
7464
+ isDirty: O(o, g),
7466
7465
  dirtyFields: t.dirtyFields,
7467
7466
  errors: t.errors,
7468
7467
  isValid: t.isValid
@@ -7491,7 +7490,7 @@ function sr(e = {}) {
7491
7490
  };
7492
7491
  if (!a.disabled) {
7493
7492
  if (!x || B) {
7494
- (M.isDirty || m.isDirty) && (u = t.isDirty, t.isDirty = D.isDirty = U(), R = u !== D.isDirty);
7493
+ (M.isDirty || m.isDirty) && (u = t.isDirty, t.isDirty = D.isDirty = O(), R = u !== D.isDirty);
7495
7494
  const d = Ue(re(i, o), g);
7496
7495
  u = !!re(t.dirtyFields, o), d ? Ee(t.dirtyFields, o) : Ne(t.dirtyFields, o, !0), D.dirtyFields = t.dirtyFields, R = R || (M.dirtyFields || m.dirtyFields) && u !== !d;
7497
7496
  }
@@ -7516,8 +7515,8 @@ function sr(e = {}) {
7516
7515
  ...u
7517
7516
  }, h.state.next(u);
7518
7517
  }
7519
- }, O = async (o) => (T(o, !0), await a.resolver(s, a.context, Jn(o || c.mount, r, a.criteriaMode, a.shouldUseNativeValidation))), z = async (o) => {
7520
- const { errors: g } = await O(o);
7518
+ }, U = async (o) => (T(o, !0), await a.resolver(s, a.context, Jn(o || c.mount, r, a.criteriaMode, a.shouldUseNativeValidation))), z = async (o) => {
7519
+ const { errors: g } = await U(o);
7521
7520
  if (T(o), o)
7522
7521
  for (const x of o) {
7523
7522
  const B = re(g, x);
@@ -7551,7 +7550,7 @@ function sr(e = {}) {
7551
7550
  g && (g._f.refs ? g._f.refs.every((x) => !wt(x)) : !wt(g._f.ref)) && oe(o);
7552
7551
  }
7553
7552
  c.unMount = /* @__PURE__ */ new Set();
7554
- }, U = (o, g) => !a.disabled && (o && g && Ne(s, o, g), !Ue(ne(), i)), K = (o, g, x) => Dt(o, c, {
7553
+ }, O = (o, g) => !a.disabled && (o && g && Ne(s, o, g), !Ue(ne(), i)), K = (o, g, x) => Dt(o, c, {
7555
7554
  ...l.mount ? s : xe(g) ? i : He(o) ? { [o]: g } : g
7556
7555
  }, x, g), ae = (o) => Tt(re(l.mount ? s : i, o, a.shouldUnregister ? re(i, o, []) : [])), de = (o, g, x = {}) => {
7557
7556
  const B = re(r, o);
@@ -7581,7 +7580,7 @@ function sr(e = {}) {
7581
7580
  }), (M.isDirty || M.dirtyFields || m.isDirty || m.dirtyFields) && x.shouldDirty && h.state.next({
7582
7581
  name: o,
7583
7582
  dirtyFields: Ze(i, s),
7584
- isDirty: U(o, R)
7583
+ isDirty: O(o, R)
7585
7584
  })) : B && !B._f && !Be(R) ? ee(o, R, x) : de(o, R, x), na(o, c) ? h.state.next({
7586
7585
  ...t,
7587
7586
  name: o,
@@ -7609,7 +7608,7 @@ function sr(e = {}) {
7609
7608
  }), ce)
7610
7609
  return (M.isValid || m.isValid) && (a.mode === "onBlur" ? Z && A() : Z || A()), Ve && h.state.next({ name: x, ...pe ? {} : we });
7611
7610
  if (!Z && pe && h.state.next({ ...t }), a.resolver) {
7612
- const { errors: je } = await O([x]);
7611
+ const { errors: je } = await U([x]);
7613
7612
  if (T([x]), R(k), B) {
7614
7613
  const st = ra(t.errors, r, x), it = ra(je, r, st.name || x);
7615
7614
  d = it.error, x = it.name, C = $e(je);
@@ -7689,7 +7688,7 @@ function sr(e = {}) {
7689
7688
  values: Ie(s)
7690
7689
  }), h.state.next({
7691
7690
  ...t,
7692
- ...g.keepDirty ? { isDirty: U() } : {}
7691
+ ...g.keepDirty ? { isDirty: O() } : {}
7693
7692
  }), !g.keepIsValid && A();
7694
7693
  }, q = ({ disabled: o, name: g }) => {
7695
7694
  if (Pe(o) && l.mount || o || c.disabled.has(g)) {
@@ -7760,7 +7759,7 @@ function sr(e = {}) {
7760
7759
  if (h.state.next({
7761
7760
  isSubmitting: !0
7762
7761
  }), a.resolver) {
7763
- const { errors: R, values: u } = await O();
7762
+ const { errors: R, values: u } = await U();
7764
7763
  T(), t.errors = R, $ = Ie(u);
7765
7764
  } else
7766
7765
  await V(r);
@@ -7787,7 +7786,7 @@ function sr(e = {}) {
7787
7786
  }), B)
7788
7787
  throw B;
7789
7788
  }, Me = (o, g = {}) => {
7790
- re(r, o) && (xe(g.defaultValue) ? Y(o, Ie(re(i, o))) : (Y(o, g.defaultValue), Ne(i, o, Ie(g.defaultValue))), g.keepTouched || Ee(t.touchedFields, o), g.keepDirty || (Ee(t.dirtyFields, o), t.isDirty = g.defaultValue ? U(o, Ie(re(i, o))) : U()), g.keepError || (Ee(t.errors, o), M.isValid && A()), h.state.next({ ...t }));
7789
+ re(r, o) && (xe(g.defaultValue) ? Y(o, Ie(re(i, o))) : (Y(o, g.defaultValue), Ne(i, o, Ie(g.defaultValue))), g.keepTouched || Ee(t.touchedFields, o), g.keepDirty || (Ee(t.dirtyFields, o), t.isDirty = g.defaultValue ? O(o, Ie(re(i, o))) : O()), g.keepError || (Ee(t.errors, o), M.isValid && A()), h.state.next({ ...t }));
7791
7790
  }, ve = (o, g = {}) => {
7792
7791
  const x = o ? Ie(o) : i, B = Ie(x), $ = $e(o), R = $ ? i : B;
7793
7792
  if (g.keepDefaultValues || (i = x), !g.keepValues) {
@@ -7867,11 +7866,11 @@ function sr(e = {}) {
7867
7866
  handleSubmit: _e,
7868
7867
  setError: te,
7869
7868
  _subscribe: se,
7870
- _runSchema: O,
7869
+ _runSchema: U,
7871
7870
  _updateIsValidating: T,
7872
7871
  _focusError: ue,
7873
7872
  _getWatch: K,
7874
- _getDirty: U,
7873
+ _getDirty: O,
7875
7874
  _setValid: A,
7876
7875
  _setFieldArray: N,
7877
7876
  _setDisabledField: q,
@@ -8084,7 +8083,7 @@ function la({
8084
8083
  };
8085
8084
  return q(), window.addEventListener("resize", q), () => window.removeEventListener("resize", q);
8086
8085
  }, [s]);
8087
- const L = Fe(() => Math.floor(w / y) * y, [w, y]), [F, O] = X(v), [z, V] = X(null), [H, U] = X(!1), [K, ae] = X({}), de = ie(null), ee = ie(null), Y = ie(null), G = me(
8086
+ const L = Fe(() => Math.floor(w / y) * y, [w, y]), [F, U] = X(v), [z, V] = X(null), [H, O] = X(!1), [K, ae] = X({}), de = ie(null), ee = ie(null), Y = ie(null), G = me(
8088
8087
  (q) => {
8089
8088
  const ye = (/* @__PURE__ */ new Date()).getFullYear();
8090
8089
  if (M && q < ye || m && q > ye)
@@ -8123,15 +8122,15 @@ function la({
8123
8122
  [L, y, r, i, t]
8124
8123
  ), ne = me(
8125
8124
  (q) => {
8126
- t == null || t(q), O(!1), f == null || f(!1);
8125
+ t == null || t(q), U(!1), f == null || f(!1);
8127
8126
  },
8128
8127
  [t, f]
8129
8128
  ), J = me(() => {
8130
8129
  if (c) return;
8131
8130
  const q = !F;
8132
- O(q), f == null || f(q);
8131
+ U(q), f == null || f(q);
8133
8132
  }, [c, F, f]), j = me(() => {
8134
- O(!1), f == null || f(!1);
8133
+ U(!1), f == null || f(!1);
8135
8134
  }, [f]), te = me(
8136
8135
  (q) => {
8137
8136
  q.stopPropagation(), T ? T() : t == null || t((/* @__PURE__ */ new Date()).getFullYear());
@@ -8159,7 +8158,7 @@ function la({
8159
8158
  maxHeight: $,
8160
8159
  zIndex: 10006
8161
8160
  // Higher than MonthPicker panel (10005) and DatePicker panel (10004)
8162
- }), U(De);
8161
+ }), O(De);
8163
8162
  };
8164
8163
  requestAnimationFrame(() => {
8165
8164
  setTimeout(q, 0);
@@ -8171,7 +8170,7 @@ function la({
8171
8170
  window.removeEventListener("resize", ye), window.removeEventListener("scroll", ye, !0);
8172
8171
  };
8173
8172
  } else
8174
- U(!1), ae({});
8173
+ O(!1), ae({});
8175
8174
  }, [F]), le(() => {
8176
8175
  const q = (ye) => {
8177
8176
  de.current && !de.current.contains(ye.target) && j();
@@ -8192,7 +8191,7 @@ function la({
8192
8191
  F && "ina-year-picker__panel--open"
8193
8192
  );
8194
8193
  return le(() => {
8195
- O(v);
8194
+ U(v);
8196
8195
  }, [v]), /* @__PURE__ */ b("div", { ref: de, className: se, children: [
8197
8196
  /* @__PURE__ */ b(
8198
8197
  "button",
@@ -8406,7 +8405,7 @@ function oa({
8406
8405
  ], [_]), N = Fe(() => {
8407
8406
  const J = e ?? a ?? (/* @__PURE__ */ new Date()).getMonth();
8408
8407
  return J == null || isNaN(J) ? (/* @__PURE__ */ new Date()).getMonth() : J;
8409
- }, [e, a]), [w, y] = X(l), [p, L] = X(null), [F, O] = X(!1), [z, V] = X({}), H = ie(null), U = ie(null), K = ie(null), ae = me(
8408
+ }, [e, a]), [w, y] = X(l), [p, L] = X(null), [F, U] = X(!1), [z, V] = X({}), H = ie(null), O = ie(null), K = ie(null), ae = me(
8410
8409
  (J) => {
8411
8410
  const j = (/* @__PURE__ */ new Date()).getMonth();
8412
8411
  return !!(v && J < j || f && J > j || M !== void 0 && J < M || m !== void 0 && J > m);
@@ -8435,10 +8434,10 @@ function oa({
8435
8434
  [E, t]
8436
8435
  );
8437
8436
  le(() => {
8438
- if (w && U.current) {
8437
+ if (w && O.current) {
8439
8438
  const J = () => {
8440
- if (!U.current || !K.current) return;
8441
- const te = U.current.getBoundingClientRect(), Q = K.current.getBoundingClientRect(), se = window.innerWidth, ge = window.innerHeight, q = Q.width || 240, ye = se - te.right;
8439
+ if (!O.current || !K.current) return;
8440
+ const te = O.current.getBoundingClientRect(), Q = K.current.getBoundingClientRect(), se = window.innerWidth, ge = window.innerHeight, q = Q.width || 240, ye = se - te.right;
8442
8441
  let ue, fe, _e = !1;
8443
8442
  _e = q > ye, _e ? (fe = 0, ue = void 0) : (ue = 0, fe = void 0);
8444
8443
  const Me = ge - te.bottom, ve = te.top;
@@ -8455,19 +8454,19 @@ function oa({
8455
8454
  maxHeight: be,
8456
8455
  zIndex: 10005
8457
8456
  // Higher than DatePicker panel (10004)
8458
- }), O(_e);
8457
+ }), U(_e);
8459
8458
  };
8460
8459
  requestAnimationFrame(() => {
8461
8460
  setTimeout(J, 0);
8462
8461
  });
8463
8462
  const j = () => {
8464
- U.current && K.current && J();
8463
+ O.current && K.current && J();
8465
8464
  };
8466
8465
  return window.addEventListener("resize", j), window.addEventListener("scroll", j, !0), () => {
8467
8466
  window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
8468
8467
  };
8469
8468
  } else
8470
- O(!1), V({});
8469
+ U(!1), V({});
8471
8470
  }, [w]), le(() => {
8472
8471
  const J = (j) => {
8473
8472
  H.current && !H.current.contains(j.target) && Y();
@@ -8490,7 +8489,7 @@ function oa({
8490
8489
  /* @__PURE__ */ b(
8491
8490
  "button",
8492
8491
  {
8493
- ref: U,
8492
+ ref: O,
8494
8493
  type: "button",
8495
8494
  onClick: ee,
8496
8495
  className: P,
@@ -8688,10 +8687,10 @@ function _s({
8688
8687
  required: w,
8689
8688
  panelOnly: y = !1
8690
8689
  }) {
8691
- const [p, L] = X(!1), [F, O] = X(/* @__PURE__ */ new Date()), [z, V] = X(() => {
8690
+ const [p, L] = X(!1), [F, U] = X(/* @__PURE__ */ new Date()), [z, V] = X(() => {
8692
8691
  const u = /* @__PURE__ */ new Date();
8693
8692
  return u.setMonth(u.getMonth() + 1), u;
8694
- }), [H, U] = X(null), [K, ae] = X(!1), [de, ee] = X(c), [Y, G] = X(null), W = ie(`datepicker-${Math.random().toString(36).slice(2)}`);
8693
+ }), [H, O] = X(null), [K, ae] = X(!1), [de, ee] = X(c), [Y, G] = X(null), W = ie(`datepicker-${Math.random().toString(36).slice(2)}`);
8695
8694
  ie(`${W.current}-status`);
8696
8695
  const P = ie(null), ne = ie(null), J = ie(null), j = () => {
8697
8696
  if (e === "single") {
@@ -8706,7 +8705,7 @@ function _s({
8706
8705
  le(() => {
8707
8706
  const u = (D) => {
8708
8707
  var d;
8709
- ((d = D.detail) == null ? void 0 : d.exclude) !== P.current && p && (L(!1), U(null), G(null));
8708
+ ((d = D.detail) == null ? void 0 : d.exclude) !== P.current && p && (L(!1), O(null), G(null));
8710
8709
  };
8711
8710
  return document.addEventListener(
8712
8711
  "closeDatePicker",
@@ -8720,7 +8719,7 @@ function _s({
8720
8719
  }, [p]), le(() => {
8721
8720
  const u = (D) => {
8722
8721
  const d = D.target;
8723
- P.current && P.current.contains(d) || (L(!1), U(null), G(null), G(null));
8722
+ P.current && P.current.contains(d) || (L(!1), O(null), G(null), G(null));
8724
8723
  };
8725
8724
  if (p && !y)
8726
8725
  return document.addEventListener("mousedown", u, !0), () => document.removeEventListener("mousedown", u, !0);
@@ -8826,7 +8825,7 @@ function _s({
8826
8825
  1
8827
8826
  ));
8828
8827
  }
8829
- if (D || (D = Q()), D && (O(D), e !== "single")) {
8828
+ if (D || (D = Q()), D && (U(D), e !== "single")) {
8830
8829
  if (d)
8831
8830
  V(d);
8832
8831
  else if (e === "multiple") {
@@ -8888,7 +8887,7 @@ function _s({
8888
8887
  ), q = () => {
8889
8888
  e === "single" ? t("") : e === "range" ? (t(["", ""]), G(null)) : t([]);
8890
8889
  }, ye = (u) => {
8891
- if (U(null), e === "single") {
8890
+ if (O(null), e === "single") {
8892
8891
  const D = Ge(u, s);
8893
8892
  t(D);
8894
8893
  } else if (e === "range") {
@@ -8914,7 +8913,7 @@ function _s({
8914
8913
  const d = u.getFullYear(), C = u.getMonth(), k = D.getFullYear(), Z = D.getMonth();
8915
8914
  return d > k || d === k && C >= Z;
8916
8915
  }, fe = (u) => {
8917
- O((D) => {
8916
+ U((D) => {
8918
8917
  const d = new Date(D);
8919
8918
  if (u === "prev" ? d.setMonth(d.getMonth() - 1) : d.setMonth(d.getMonth() + 1), e !== "single" && ue(d, z)) {
8920
8919
  const C = new Date(d);
@@ -8927,7 +8926,7 @@ function _s({
8927
8926
  const d = new Date(D);
8928
8927
  if (u === "prev" ? d.setMonth(d.getMonth() - 1) : d.setMonth(d.getMonth() + 1), e !== "single" && ue(F, d)) {
8929
8928
  const C = new Date(d);
8930
- C.setMonth(C.getMonth() - 1), O(C);
8929
+ C.setMonth(C.getMonth() - 1), U(C);
8931
8930
  }
8932
8931
  return d;
8933
8932
  });
@@ -8936,10 +8935,10 @@ function _s({
8936
8935
  const C = new Date(d);
8937
8936
  if (C.setMonth(u), e !== "single" && ue(F, C)) {
8938
8937
  const k = new Date(C);
8939
- k.setMonth(k.getMonth() - 1), O(k);
8938
+ k.setMonth(k.getMonth() - 1), U(k);
8940
8939
  }
8941
8940
  return C;
8942
- }) : O((d) => {
8941
+ }) : U((d) => {
8943
8942
  const C = new Date(d);
8944
8943
  if (C.setMonth(u), e !== "single" && ue(C, z)) {
8945
8944
  const k = new Date(C);
@@ -8952,10 +8951,10 @@ function _s({
8952
8951
  const C = new Date(d);
8953
8952
  if (C.setFullYear(u), e !== "single" && ue(F, C)) {
8954
8953
  const k = new Date(C);
8955
- k.setMonth(k.getMonth() - 1), O(k);
8954
+ k.setMonth(k.getMonth() - 1), U(k);
8956
8955
  }
8957
8956
  return C;
8958
- }) : O((d) => {
8957
+ }) : U((d) => {
8959
8958
  const C = new Date(d);
8960
8959
  if (C.setFullYear(u), e !== "single" && ue(C, z)) {
8961
8960
  const k = new Date(C);
@@ -9353,8 +9352,8 @@ function _s({
9353
9352
  }
9354
9353
  }
9355
9354
  },
9356
- onMouseEnter: () => !d.isDisabled && U(u.date),
9357
- onMouseLeave: () => U(null),
9355
+ onMouseEnter: () => !d.isDisabled && O(u.date),
9356
+ onMouseLeave: () => O(null),
9358
9357
  disabled: d.isDisabled,
9359
9358
  className: S(
9360
9359
  d.className,
@@ -9473,8 +9472,8 @@ function _s({
9473
9472
  }
9474
9473
  }
9475
9474
  },
9476
- onMouseEnter: () => !d.isDisabled && U(u.date),
9477
- onMouseLeave: () => U(null),
9475
+ onMouseEnter: () => !d.isDisabled && O(u.date),
9476
+ onMouseLeave: () => O(null),
9478
9477
  disabled: d.isDisabled,
9479
9478
  className: d.className + (!d.isSelected && !d.isInRange && !d.isHovered && !d.isHoveredEnd && !d.isDisabled ? " ina-date-picker__day--hover" : ""),
9480
9479
  children: u.date.getDate()
@@ -9679,7 +9678,7 @@ function ks({
9679
9678
  f
9680
9679
  );
9681
9680
  return /* @__PURE__ */ n("div", { className: T, children: /* @__PURE__ */ n("div", { className: N, role: "tablist", children: e.map((y, p) => {
9682
- const L = I === y.value, F = _ || y.disabled, O = S(
9681
+ const L = I === y.value, F = _ || y.disabled, U = S(
9683
9682
  "ina-tab-horizontal__tab",
9684
9683
  `ina-tab-horizontal__tab--size-${i}`,
9685
9684
  `ina-tab-horizontal__tab--variant-${s}`,
@@ -9698,10 +9697,10 @@ function ks({
9698
9697
  "aria-disabled": F,
9699
9698
  disabled: F,
9700
9699
  tabIndex: L ? 0 : -1,
9701
- className: O,
9700
+ className: U,
9702
9701
  onClick: () => A(y.value, y.disabled),
9703
9702
  onKeyDown: (z) => {
9704
- var H, U;
9703
+ var H, O;
9705
9704
  if (F) return;
9706
9705
  let V;
9707
9706
  if (z.key === "Enter" || z.key === " ")
@@ -9713,7 +9712,7 @@ function ks({
9713
9712
  } else if (z.key === "ArrowLeft") {
9714
9713
  for (z.preventDefault(), V = (p - 1 + e.length) % e.length; e[V].disabled && V !== p; )
9715
9714
  V = (V - 1 + e.length) % e.length;
9716
- (U = E.current[V]) == null || U.focus();
9715
+ (O = E.current[V]) == null || O.focus();
9717
9716
  }
9718
9717
  },
9719
9718
  children: y.label
@@ -9758,12 +9757,12 @@ function Ns({
9758
9757
  width: typeof M == "number" ? `${M}px` : M
9759
9758
  };
9760
9759
  return /* @__PURE__ */ n("div", { className: T, style: w, children: /* @__PURE__ */ n("div", { className: N, role: "tablist", children: e.map((p, L) => {
9761
- const F = I === p.value, O = c || p.disabled, z = S(
9760
+ const F = I === p.value, U = c || p.disabled, z = S(
9762
9761
  "ina-tab-vertical__tab",
9763
9762
  `ina-tab-vertical__tab--size-${i}`,
9764
9763
  `ina-tab-vertical__tab--variant-${s}`,
9765
9764
  F && "ina-tab-vertical__tab--selected",
9766
- O && "ina-tab-vertical__tab--disabled",
9765
+ U && "ina-tab-vertical__tab--disabled",
9767
9766
  f
9768
9767
  );
9769
9768
  return /* @__PURE__ */ n(
@@ -9773,21 +9772,21 @@ function Ns({
9773
9772
  type: "button",
9774
9773
  role: "tab",
9775
9774
  "aria-selected": F,
9776
- "aria-disabled": O,
9777
- disabled: O,
9775
+ "aria-disabled": U,
9776
+ disabled: U,
9778
9777
  tabIndex: F ? 0 : -1,
9779
9778
  className: z,
9780
9779
  onClick: () => A(p.value, p.disabled),
9781
9780
  onKeyDown: (V) => {
9782
- var U, K;
9783
- if (O) return;
9781
+ var O, K;
9782
+ if (U) return;
9784
9783
  let H;
9785
9784
  if (V.key === "Enter" || V.key === " ")
9786
9785
  V.preventDefault(), A(p.value, p.disabled);
9787
9786
  else if (V.key === "ArrowDown") {
9788
9787
  for (V.preventDefault(), H = (L + 1) % e.length; e[H].disabled && H !== L; )
9789
9788
  H = (H + 1) % e.length;
9790
- (U = E.current[H]) == null || U.focus();
9789
+ (O = E.current[H]) == null || O.focus();
9791
9790
  } else if (V.key === "ArrowUp") {
9792
9791
  for (V.preventDefault(), H = (L - 1 + e.length) % e.length; e[H].disabled && H !== L; )
9793
9792
  H = (H - 1 + e.length) % e.length;