@matthiaskrijgsman/mat-ui 0.0.46 → 0.0.47

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.js CHANGED
@@ -10,8 +10,8 @@ import { useDropzone as Pt } from "react-dropzone";
10
10
  import { LexicalComposer as bn } from "@lexical/react/LexicalComposer";
11
11
  import { RichTextPlugin as xn } from "@lexical/react/LexicalRichTextPlugin";
12
12
  import { ContentEditable as wn } from "@lexical/react/LexicalContentEditable";
13
- import { HistoryPlugin as yn } from "@lexical/react/LexicalHistoryPlugin";
14
- import { ListPlugin as Nn } from "@lexical/react/LexicalListPlugin";
13
+ import { HistoryPlugin as Nn } from "@lexical/react/LexicalHistoryPlugin";
14
+ import { ListPlugin as yn } from "@lexical/react/LexicalListPlugin";
15
15
  import { LinkPlugin as kn } from "@lexical/react/LexicalLinkPlugin";
16
16
  import { OnChangePlugin as Cn } from "@lexical/react/LexicalOnChangePlugin";
17
17
  import { AutoFocusPlugin as In } from "@lexical/react/LexicalAutoFocusPlugin";
@@ -451,15 +451,15 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
451
451
  };
452
452
  const p = k.useMemo(() => {
453
453
  const u = (I) => {
454
- const { floatingStyles: b, setFloating: y, placement: N, getFloatingProps: S } = f.current, { className: z, open: L, children: P } = I;
454
+ const { floatingStyles: b, setFloating: N, placement: y, getFloatingProps: S } = f.current, { className: z, open: L, children: P } = I;
455
455
  return /* @__PURE__ */ e(
456
456
  _t,
457
457
  {
458
458
  open: L,
459
459
  className: z,
460
460
  floatingStyles: b,
461
- setFloating: y,
462
- placement: N,
461
+ setFloating: N,
462
+ placement: y,
463
463
  floatingProps: S(),
464
464
  children: P
465
465
  }
@@ -481,7 +481,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
481
481
  document.removeEventListener("keydown", l);
482
482
  };
483
483
  }, [n, t]);
484
- }, sr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", cr = "linear-gradient(to right, #fff, rgba(255,255,255,0))", dr = "linear-gradient(to top, #000, rgba(0,0,0,0))", Ve = "0 0 0 1px rgba(0,0,0,0.15)", ur = 14, hr = 28, fr = 6, mr = 8, Ke = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, Ne = (n) => {
484
+ }, sr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", cr = "linear-gradient(to right, #fff, rgba(255,255,255,0))", dr = "linear-gradient(to top, #000, rgba(0,0,0,0))", Ve = "0 0 0 1px rgba(0,0,0,0.15)", ur = 14, hr = 28, fr = 6, mr = 8, Ke = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, ye = (n) => {
485
485
  const t = n ? hr : ur, l = t / 2;
486
486
  return {
487
487
  width: t,
@@ -490,7 +490,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
490
490
  marginTop: -l,
491
491
  borderRadius: n ? mr : fr
492
492
  };
493
- }, Te = (n) => Math.max(0, Math.min(1, n)), yt = (n, t) => {
493
+ }, Te = (n) => Math.max(0, Math.min(1, n)), Nt = (n, t) => {
494
494
  Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(n, t), n.dispatchEvent(new Event("input", { bubbles: !0 }));
495
495
  }, pr = ({ value: n, onChange: t }) => {
496
496
  const [l, a] = W(() => wt(n) ?? [0, 0, 1]), r = Ce(Re(l[0], l[1], l[2]));
@@ -561,8 +561,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
561
561
  boxShadow: Ve,
562
562
  backgroundColor: w
563
563
  },
564
- initial: Ne(!1),
565
- animate: Ne(m.isDragging),
564
+ initial: ye(!1),
565
+ animate: ye(m.isDragging),
566
566
  transition: Ke
567
567
  }
568
568
  )
@@ -590,8 +590,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
590
590
  backgroundColor: g,
591
591
  boxShadow: Ve
592
592
  },
593
- initial: Ne(!1),
594
- animate: Ne(v.isDragging),
593
+ initial: ye(!1),
594
+ animate: ye(v.isDragging),
595
595
  transition: Ke
596
596
  }
597
597
  )
@@ -618,8 +618,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
618
618
  backgroundColor: w,
619
619
  boxShadow: Ve
620
620
  },
621
- initial: Ne(!1),
622
- animate: Ne(f.isDragging),
621
+ initial: ye(!1),
622
+ animate: ye(f.isDragging),
623
623
  transition: Ke
624
624
  }
625
625
  )
@@ -644,9 +644,9 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
644
644
  ...m
645
645
  } = n, [v, f] = W(
646
646
  s != null ? String(s) : c != null ? String(c) : ""
647
- ), [p, u] = W(!1), I = Ce(null), b = s != null ? String(s) : v, y = b || "white";
647
+ ), [p, u] = W(!1), I = Ce(null), b = s != null ? String(s) : v, N = b || "white";
648
648
  xe(p, () => u(!1));
649
- const { anchorRef: N, Popover: S } = ut({
649
+ const { anchorRef: y, Popover: S } = ut({
650
650
  placement: "bottom-start",
651
651
  open: p,
652
652
  onOpenChange: u
@@ -656,9 +656,9 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
656
656
  u(!0), w?.(C);
657
657
  }, P = (C) => {
658
658
  const T = C.target.value, E = or(T);
659
- E && E !== T && I.current && yt(I.current, E), u(!1), R?.(C);
659
+ E && E !== T && I.current && Nt(I.current, E), u(!1), R?.(C);
660
660
  }, O = (C) => {
661
- I.current && yt(I.current, C);
661
+ I.current && Nt(I.current, C);
662
662
  }, x = !!r || !!o;
663
663
  return /* @__PURE__ */ e(q.Provider, { value: i, children: /* @__PURE__ */ d(
664
664
  "div",
@@ -669,7 +669,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
669
669
  ),
670
670
  children: [
671
671
  /* @__PURE__ */ e(Z, { children: l }),
672
- /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: N, children: [
672
+ /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: y, children: [
673
673
  /* @__PURE__ */ e(
674
674
  "div",
675
675
  {
@@ -678,7 +678,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
678
678
  ee[i],
679
679
  Ut[i]
680
680
  ),
681
- style: { backgroundColor: y }
681
+ style: { backgroundColor: N }
682
682
  }
683
683
  ),
684
684
  /* @__PURE__ */ e(
@@ -728,7 +728,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
728
728
  children: /* @__PURE__ */ e(l, { className: h("h-5 w-5 input-icon-button-icon", t && "group-active:scale-[0.8] transition-transform duration-[var(--control-transition-duration)] origin-center") })
729
729
  }
730
730
  );
731
- }, yo = (n) => {
731
+ }, No = (n) => {
732
732
  const {
733
733
  type: t = "password",
734
734
  enableShowPasswordToggle: l = !0,
@@ -744,7 +744,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
744
744
  ...a
745
745
  }
746
746
  );
747
- }, No = (n) => {
747
+ }, yo = (n) => {
748
748
  const {
749
749
  className: t,
750
750
  label: l,
@@ -762,7 +762,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
762
762
  f.style.height = "auto";
763
763
  let p = f.scrollHeight;
764
764
  if (s) {
765
- const u = window.getComputedStyle(f), I = parseFloat(u.lineHeight), b = parseFloat(u.paddingTop), y = parseFloat(u.paddingBottom), N = parseFloat(u.borderTopWidth), S = parseFloat(u.borderBottomWidth), z = I * s + b + y + N + S;
765
+ const u = window.getComputedStyle(f), I = parseFloat(u.lineHeight), b = parseFloat(u.paddingTop), N = parseFloat(u.paddingBottom), y = parseFloat(u.borderTopWidth), S = parseFloat(u.borderBottomWidth), z = I * s + b + N + y + S;
766
766
  p = Math.min(f.scrollHeight, z);
767
767
  }
768
768
  f.style.height = `${p}px`;
@@ -960,8 +960,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
960
960
  const [x] = O;
961
961
  x && await w?.(x);
962
962
  }, {
963
- getRootProps: y,
964
- getInputProps: N,
963
+ getRootProps: N,
964
+ getInputProps: y,
965
965
  open: S,
966
966
  isDragActive: z,
967
967
  isFocused: L
@@ -979,7 +979,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
979
979
  /* @__PURE__ */ d(
980
980
  "div",
981
981
  {
982
- ...y({
982
+ ...N({
983
983
  className: h(
984
984
  "flex flex-row items-center",
985
985
  "border-[length:var(--border-width-input)] input-base rounded-[var(--border-radius-input)] shadow-[var(--shadow-control)] transition-all duration-[var(--control-transition-duration)]",
@@ -993,7 +993,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
993
993
  )
994
994
  }),
995
995
  children: [
996
- /* @__PURE__ */ e("input", { ...N() }),
996
+ /* @__PURE__ */ e("input", { ...y() }),
997
997
  /* @__PURE__ */ e(i, { className: h("input-icon shrink-0", ee[s]) }),
998
998
  /* @__PURE__ */ e(
999
999
  "span",
@@ -1093,14 +1093,14 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1093
1093
  maxFiles: p,
1094
1094
  disabled: u = !1,
1095
1095
  className: I
1096
- } = n, b = Ce(0), [y, N] = W(
1096
+ } = n, b = Ce(0), [N, y] = W(
1097
1097
  () => (s ?? []).map((T) => ({
1098
1098
  id: String(++b.current),
1099
1099
  file: T,
1100
1100
  status: "uploaded"
1101
1101
  }))
1102
1102
  ), S = (T, E) => {
1103
- N((_) => _.map(($) => $.id === T ? { ...$, ...E } : $));
1103
+ y((_) => _.map(($) => $.id === T ? { ...$, ...E } : $));
1104
1104
  }, z = (T) => {
1105
1105
  if (T.length === 0) return;
1106
1106
  const E = T.map((_) => ({
@@ -1108,7 +1108,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1108
1108
  file: _,
1109
1109
  status: c ? "uploading" : "idle"
1110
1110
  }));
1111
- if (N((_) => [..._, ...E]), !!c)
1111
+ if (y((_) => [..._, ...E]), !!c)
1112
1112
  for (const _ of E)
1113
1113
  Promise.resolve().then(() => c(_.file)).then(() => S(_.id, { status: "uploaded" })).catch(($) => {
1114
1114
  S(_.id, {
@@ -1117,8 +1117,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1117
1117
  });
1118
1118
  });
1119
1119
  }, L = (T) => {
1120
- const E = y.find((_) => _.id === T);
1121
- N((_) => _.filter(($) => $.id !== T)), E && g?.(E.file);
1120
+ const E = N.find((_) => _.id === T);
1121
+ y((_) => _.filter(($) => $.id !== T)), E && g?.(E.file);
1122
1122
  }, {
1123
1123
  getRootProps: P,
1124
1124
  getInputProps: O,
@@ -1158,7 +1158,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1158
1158
  ]
1159
1159
  }
1160
1160
  ),
1161
- y.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mt-3", children: y.map((T) => {
1161
+ N.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mt-3", children: N.map((T) => {
1162
1162
  const E = {
1163
1163
  file: T.file,
1164
1164
  isUploading: T.status === "uploading",
@@ -1171,13 +1171,13 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1171
1171
  /* @__PURE__ */ e(V, { children: l }),
1172
1172
  /* @__PURE__ */ e(K, { children: a })
1173
1173
  ] });
1174
- }, yr = [
1174
+ }, Nr = [
1175
1175
  Sn,
1176
1176
  Dn,
1177
1177
  Lt,
1178
1178
  Tn,
1179
1179
  Fn
1180
- ], Nt = {
1180
+ ], yt = {
1181
1181
  paragraph: "lexical-paragraph",
1182
1182
  heading: {
1183
1183
  h1: "lexical-h1",
@@ -1255,7 +1255,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1255
1255
  )
1256
1256
  );
1257
1257
  }, [n]), t;
1258
- }, Vt = Qe(void 0), Nr = () => ({
1258
+ }, Vt = Qe(void 0), yr = () => ({
1259
1259
  dismiss: Ze(Vt) || (() => {
1260
1260
  })
1261
1261
  }), Ue = (n) => {
@@ -1277,7 +1277,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1277
1277
  onClick: o,
1278
1278
  dismissOnClick: i = !0,
1279
1279
  ...s
1280
- } = n, { dismiss: c } = Nr(), g = (R) => {
1280
+ } = n, { dismiss: c } = yr(), g = (R) => {
1281
1281
  o && o(R), i && c();
1282
1282
  };
1283
1283
  return /* @__PURE__ */ d(
@@ -1324,8 +1324,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1324
1324
  l === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1325
1325
  ),
1326
1326
  children: [
1327
- r.label,
1328
- /* @__PURE__ */ e(ve, { className: "h-4 w-4" })
1327
+ /* @__PURE__ */ e("span", { className: "break-all line-clamp-1", children: r.label }),
1328
+ /* @__PURE__ */ e(ve, { className: "h-4 w-4 shrink-0" })
1329
1329
  ]
1330
1330
  }
1331
1331
  ),
@@ -1502,16 +1502,16 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1502
1502
  const { children: t } = n, { state: l, tone: a } = we(), r = Kt(t), o = Ce(null), i = Ce(null), [s, c] = W(r.length), g = Pe(() => {
1503
1503
  const m = o.current, v = i.current;
1504
1504
  if (!m || !v) return;
1505
- const f = m.clientWidth, p = Array.from(v.children).map((y) => y.offsetWidth);
1506
- if (p.reduce((y, N, S) => y + N + (S > 0 ? kt : 0), 0) <= f) {
1505
+ const f = m.clientWidth, p = Array.from(v.children).map((N) => N.offsetWidth);
1506
+ if (p.reduce((N, y, S) => N + y + (S > 0 ? kt : 0), 0) <= f) {
1507
1507
  c(p.length);
1508
1508
  return;
1509
1509
  }
1510
1510
  let I = 0, b = 0;
1511
- for (let y = 0; y < p.length; y++) {
1512
- const N = p[y] + (y > 0 ? kt : 0);
1513
- if (I + N + Tr > f) break;
1514
- I += N, b++;
1511
+ for (let N = 0; N < p.length; N++) {
1512
+ const y = p[N] + (N > 0 ? kt : 0);
1513
+ if (I + y + Tr > f) break;
1514
+ I += y, b++;
1515
1515
  }
1516
1516
  c(b);
1517
1517
  }, []);
@@ -1650,11 +1650,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1650
1650
  autoFocus: u = !1,
1651
1651
  children: I,
1652
1652
  className: b
1653
- } = n, y = se(
1653
+ } = n, N = se(
1654
1654
  () => ({
1655
1655
  namespace: v,
1656
- theme: p ? { ...Nt, ...p } : Nt,
1657
- nodes: [...yr, ...f ?? []],
1656
+ theme: p ? { ...yt, ...p } : yt,
1657
+ nodes: [...Nr, ...f ?? []],
1658
1658
  editorState: o ?? null,
1659
1659
  onError: (O) => {
1660
1660
  throw O;
@@ -1663,7 +1663,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1663
1663
  // Lexical reads initialConfig once on mount; later prop changes are ignored by design.
1664
1664
  // eslint-disable-next-line react-hooks/exhaustive-deps
1665
1665
  []
1666
- ), N = Pe(
1666
+ ), y = Pe(
1667
1667
  (O) => {
1668
1668
  i?.(JSON.stringify(O.toJSON()));
1669
1669
  },
@@ -1671,7 +1671,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1671
1671
  ), S = G[s], z = !!a, L = (O) => `calc(${O} * 1lh + 1.5rem)`, P = m ? { minHeight: L(R), maxHeight: w ? L(w) : void 0 } : { height: L(R) };
1672
1672
  return /* @__PURE__ */ e(q.Provider, { value: s, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", b), children: [
1673
1673
  /* @__PURE__ */ e(Z, { children: t }),
1674
- /* @__PURE__ */ e(bn, { initialConfig: y, children: /* @__PURE__ */ d(
1674
+ /* @__PURE__ */ e(bn, { initialConfig: N, children: /* @__PURE__ */ d(
1675
1675
  "div",
1676
1676
  {
1677
1677
  className: h(
@@ -1707,11 +1707,11 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1707
1707
  ErrorBoundary: Rn
1708
1708
  }
1709
1709
  ) }),
1710
- /* @__PURE__ */ e(yn, {}),
1711
1710
  /* @__PURE__ */ e(Nn, {}),
1711
+ /* @__PURE__ */ e(yn, {}),
1712
1712
  /* @__PURE__ */ e(kn, {}),
1713
1713
  u && /* @__PURE__ */ e(In, {}),
1714
- i && /* @__PURE__ */ e(Cn, { onChange: N }),
1714
+ i && /* @__PURE__ */ e(Cn, { onChange: y }),
1715
1715
  I,
1716
1716
  c === "floating" && /* @__PURE__ */ e(Lr, { render: g })
1717
1717
  ]
@@ -1866,17 +1866,17 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1866
1866
  }), b = zt(p, {
1867
1867
  outsidePress: !0,
1868
1868
  escapeKey: !1
1869
- }), { getReferenceProps: y, getFloatingProps: N, getItemProps: S } = Ot([I, b]), z = k.useRef({
1869
+ }), { getReferenceProps: N, getFloatingProps: y, getItemProps: S } = Ot([I, b]), z = k.useRef({
1870
1870
  floatingStyles: f,
1871
1871
  setFloating: v.setFloating,
1872
1872
  placement: t,
1873
- getFloatingProps: N
1873
+ getFloatingProps: y
1874
1874
  });
1875
1875
  z.current = {
1876
1876
  floatingStyles: f,
1877
1877
  setFloating: v.setFloating,
1878
1878
  placement: u,
1879
- getFloatingProps: N
1879
+ getFloatingProps: y
1880
1880
  };
1881
1881
  const L = k.useMemo(() => {
1882
1882
  const P = (O) => {
@@ -1899,7 +1899,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1899
1899
  return {
1900
1900
  anchorRef: v.setReference,
1901
1901
  Popover: L,
1902
- getReferenceProps: y,
1902
+ getReferenceProps: N,
1903
1903
  getItemProps: S
1904
1904
  };
1905
1905
  }, Er = (n) => {
@@ -1916,7 +1916,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1916
1916
  size: R = "md",
1917
1917
  disabled: w = !1,
1918
1918
  clearable: m = !1
1919
- } = n, [v, f] = W(!1), [p, u] = W(null), I = k.useRef(null), b = k.useRef([]), y = r?.find((x) => H(x) && J(x.value, i)), N = se(
1919
+ } = n, [v, f] = W(!1), [p, u] = W(null), I = k.useRef(null), b = k.useRef([]), N = r?.find((x) => H(x) && J(x.value, i)), y = se(
1920
1920
  () => r.map((x, C) => !H(x) || x.disabled ? C : -1).filter((x) => x !== -1),
1921
1921
  [r]
1922
1922
  );
@@ -1942,7 +1942,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1942
1942
  listRef: b,
1943
1943
  activeIndex: p,
1944
1944
  onNavigate: u,
1945
- disabledIndices: N
1945
+ disabledIndices: y
1946
1946
  }), O = (x) => {
1947
1947
  const C = r[x];
1948
1948
  C && H(C) && !C.disabled && (o(C.value), f(!1));
@@ -1982,8 +1982,8 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
1982
1982
  !w && v && "ring-[length:var(--control-ring-width)]"
1983
1983
  ),
1984
1984
  children: [
1985
- y && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: y.label }),
1986
- !y && s && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: s })
1985
+ N && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: N.label }),
1986
+ !N && s && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: s })
1987
1987
  ]
1988
1988
  }
1989
1989
  ),
@@ -2051,7 +2051,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2051
2051
  size: w = "md",
2052
2052
  disabled: m = !1,
2053
2053
  clearable: v = !1
2054
- } = n, [f, p] = W(!1), [u, I] = W(r), [b, y] = W(""), [N, S] = W(null), z = k.useRef(null), L = k.useRef(null), P = k.useRef([]), O = r?.find((F) => H(F) && J(F.value, s)), x = se(() => b !== "" ? u : r, [b, u, r]), C = se(
2054
+ } = n, [f, p] = W(!1), [u, I] = W(r), [b, N] = W(""), [y, S] = W(null), z = k.useRef(null), L = k.useRef(null), P = k.useRef([]), O = r?.find((F) => H(F) && J(F.value, s)), x = se(() => b !== "" ? u : r, [b, u, r]), C = se(
2055
2055
  () => x.map((F, U) => !H(F) || F.disabled ? U : -1).filter((F) => F !== -1),
2056
2056
  [x]
2057
2057
  );
@@ -2068,7 +2068,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2068
2068
  S(U >= 0 ? U : null);
2069
2069
  }
2070
2070
  } else
2071
- S(null), y("");
2071
+ S(null), N("");
2072
2072
  }, [f]), j(() => {
2073
2073
  if (!f) return;
2074
2074
  const F = x.findIndex((U) => H(U) && !U.disabled);
@@ -2081,13 +2081,13 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2081
2081
  open: f,
2082
2082
  onOpenChange: p,
2083
2083
  listRef: P,
2084
- activeIndex: N,
2084
+ activeIndex: y,
2085
2085
  onNavigate: S,
2086
2086
  disabledIndices: C
2087
2087
  }), ae = (F) => {
2088
2088
  const U = x[F];
2089
2089
  U && H(U) && !U.disabled && (o(U.value), p(!1));
2090
- }, ye = x.some((F) => H(F));
2090
+ }, Ne = x.some((F) => H(F));
2091
2091
  return /* @__PURE__ */ e(q.Provider, { value: w, children: /* @__PURE__ */ d(
2092
2092
  "div",
2093
2093
  {
@@ -2143,16 +2143,16 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2143
2143
  placeholder: "Search",
2144
2144
  value: b,
2145
2145
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-[var(--control-transition-duration)] focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2146
- onChange: (F) => y(F.target.value),
2146
+ onChange: (F) => N(F.target.value),
2147
2147
  onKeyDown: (F) => {
2148
- F.key === "Enter" && N != null && (F.preventDefault(), ae(N));
2148
+ F.key === "Enter" && y != null && (F.preventDefault(), ae(y));
2149
2149
  }
2150
2150
  }
2151
2151
  ),
2152
2152
  /* @__PURE__ */ e(Fe, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2153
2153
  ] }),
2154
2154
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2155
- b !== "" && !ye && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2155
+ b !== "" && !Ne && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2156
2156
  x.map((F, U) => {
2157
2157
  if (!H(F))
2158
2158
  return F.kind === "header" ? /* @__PURE__ */ e(
@@ -2184,7 +2184,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2184
2184
  }),
2185
2185
  onClick: () => ae(U),
2186
2186
  selected: le,
2187
- active: N === U,
2187
+ active: y === U,
2188
2188
  disabled: F.disabled,
2189
2189
  children: F.label
2190
2190
  },
@@ -2225,36 +2225,36 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2225
2225
  size: m = "md",
2226
2226
  disabled: v = !1,
2227
2227
  clearable: f = !1
2228
- } = n, [p, u] = W(!1), I = k.useRef(null), [b, y] = W(""), [N, S] = W([]), [z, L] = W(null), P = k.useRef(null), [O, x] = W(!1), [C, T] = W(!1), [E, _] = W(null), $ = k.useRef([]), ae = se(
2229
- () => N.map((B, A) => !H(B) || B.disabled ? A : -1).filter((B) => B !== -1),
2230
- [N]
2228
+ } = n, [p, u] = W(!1), I = k.useRef(null), [b, N] = W(""), [y, S] = W([]), [z, L] = W(null), P = k.useRef(null), [O, x] = W(!1), [C, T] = W(!1), [E, _] = W(null), $ = k.useRef([]), ae = se(
2229
+ () => y.map((B, A) => !H(B) || B.disabled ? A : -1).filter((B) => B !== -1),
2230
+ [y]
2231
2231
  );
2232
2232
  xe(p, () => u(!1));
2233
- const ye = Fr(b, s);
2233
+ const Ne = Fr(b, s);
2234
2234
  j(() => {
2235
2235
  (async () => {
2236
2236
  x(!0);
2237
- const A = await o(ye);
2237
+ const A = await o(Ne);
2238
2238
  S(A), x(!1);
2239
2239
  })();
2240
- }, [ye, o]), j(() => {
2240
+ }, [Ne, o]), j(() => {
2241
2241
  if (c == null) {
2242
2242
  L(null);
2243
2243
  return;
2244
2244
  }
2245
- const B = N?.find((A) => H(A) && J(A.value, c));
2245
+ const B = y?.find((A) => H(A) && J(A.value, c));
2246
2246
  B ? L(B) : (async () => {
2247
2247
  T(!0);
2248
2248
  const ie = await i(c);
2249
2249
  L(ie), T(!1);
2250
2250
  })();
2251
- }, [i, N, c]), j(() => {
2252
- p ? setTimeout(() => P.current?.focus(), 100) : (_(null), y(""));
2251
+ }, [i, y, c]), j(() => {
2252
+ p ? setTimeout(() => P.current?.focus(), 100) : (_(null), N(""));
2253
2253
  }, [p]), j(() => {
2254
2254
  if (!p) return;
2255
- const B = N.findIndex((A) => H(A) && !A.disabled);
2255
+ const B = y.findIndex((A) => H(A) && !A.disabled);
2256
2256
  _(B >= 0 ? B : null);
2257
- }, [N, p]);
2257
+ }, [y, p]);
2258
2258
  const { anchorRef: F, Popover: U, getReferenceProps: le, getItemProps: re } = _e({
2259
2259
  placement: "bottom",
2260
2260
  fullWidth: !0,
@@ -2266,9 +2266,9 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2266
2266
  onNavigate: _,
2267
2267
  disabledIndices: ae
2268
2268
  }), ze = (B) => {
2269
- const A = N[B];
2269
+ const A = y[B];
2270
2270
  A && H(A) && !A.disabled && (r(A.value), u(!1));
2271
- }, Oe = N.some((B) => H(B));
2271
+ }, Oe = y.some((B) => H(B));
2272
2272
  return /* @__PURE__ */ e(q.Provider, { value: m, children: /* @__PURE__ */ d(
2273
2273
  "div",
2274
2274
  {
@@ -2325,7 +2325,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2325
2325
  placeholder: "Search",
2326
2326
  value: b,
2327
2327
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-[var(--control-transition-duration)] focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2328
- onChange: (B) => y(B.target.value),
2328
+ onChange: (B) => N(B.target.value),
2329
2329
  onKeyDown: (B) => {
2330
2330
  B.key === "Enter" && E != null && (B.preventDefault(), ze(E));
2331
2331
  }
@@ -2336,7 +2336,7 @@ const h = (...n) => n.filter(Boolean).join(" "), jn = [
2336
2336
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2337
2337
  !O && !Oe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2338
2338
  O && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Se, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2339
- !O && N.map((B, A) => {
2339
+ !O && y.map((B, A) => {
2340
2340
  if (!H(B))
2341
2341
  return B.kind === "header" ? /* @__PURE__ */ e(
2342
2342
  He,
@@ -2466,17 +2466,17 @@ function Br(n) {
2466
2466
  }
2467
2467
  const f = window.getComputedStyle(R), p = parseFloat(f.paddingLeft || "0"), u = R.getBoundingClientRect(), I = u.left + p;
2468
2468
  let b = u.right - parseFloat(f.paddingRight || "0");
2469
- const y = r?.current;
2470
- if (y) {
2471
- const x = y.getBoundingClientRect();
2469
+ const N = r?.current;
2470
+ if (N) {
2471
+ const x = N.getBoundingClientRect();
2472
2472
  x.width > 0 && (b = Math.min(b, x.left - s));
2473
2473
  }
2474
- const N = Math.max(0, b - I), S = Array.from(w.children);
2474
+ const y = Math.max(0, b - I), S = Array.from(w.children);
2475
2475
  if (S.length < o + 1) return;
2476
2476
  let z = 0;
2477
2477
  for (let x = 0; x < o; x++)
2478
2478
  z += S[x].offsetWidth + (x > 0 ? s : 0);
2479
- if (z <= N) {
2479
+ if (z <= y) {
2480
2480
  g(o);
2481
2481
  return;
2482
2482
  }
@@ -2484,7 +2484,7 @@ function Br(n) {
2484
2484
  let P = 0, O = 0;
2485
2485
  for (let x = 0; x < o; x++) {
2486
2486
  const C = S[x].offsetWidth, T = P + C + (x > 0 ? s : 0);
2487
- if (T + L + s > N) break;
2487
+ if (T + L + s > y) break;
2488
2488
  P = T, O++;
2489
2489
  }
2490
2490
  g(Math.max(1, O));
@@ -2509,7 +2509,7 @@ const Lo = (n) => {
2509
2509
  color: v = "blue",
2510
2510
  disabled: f = !1,
2511
2511
  clearable: p = !1
2512
- } = n, [u, I] = W(!1), [b, y] = W(r), [N, S] = W(""), [z, L] = W(null), P = k.useRef(null), O = k.useRef(null), x = k.useRef([]), C = k.useRef(null), T = k.useRef(null), E = se(
2512
+ } = n, [u, I] = W(!1), [b, N] = W(r), [y, S] = W(""), [z, L] = W(null), P = k.useRef(null), O = k.useRef(null), x = k.useRef([]), C = k.useRef(null), T = k.useRef(null), E = se(
2513
2513
  () => s.map((D) => r.find((M) => H(M) && J(M.value, D))).filter((D) => D !== void 0),
2514
2514
  [s, r]
2515
2515
  ), _ = (D) => {
@@ -2517,15 +2517,15 @@ const Lo = (n) => {
2517
2517
  const M = D.toLowerCase();
2518
2518
  return r.filter((Ie) => H(Ie) && typeof Ie.label == "string" ? Ie.label.toLowerCase().includes(M) : !0);
2519
2519
  }, $ = se(
2520
- () => N !== "" ? b : r,
2521
- [N, b, r]
2520
+ () => y !== "" ? b : r,
2521
+ [y, b, r]
2522
2522
  ), ae = se(
2523
2523
  () => $.map((D, M) => !H(D) || D.disabled ? M : -1).filter((D) => D !== -1),
2524
2524
  [$]
2525
2525
  );
2526
2526
  xe(u, () => I(!1)), j(() => {
2527
- y((i ?? _)(N));
2528
- }, [N, r, i]), j(() => {
2527
+ N((i ?? _)(y));
2528
+ }, [y, r, i]), j(() => {
2529
2529
  if (u) {
2530
2530
  setTimeout(() => O.current?.focus(), 100);
2531
2531
  const D = r.findIndex((M) => H(M) && !M.disabled);
@@ -2536,8 +2536,8 @@ const Lo = (n) => {
2536
2536
  if (!u) return;
2537
2537
  const D = $.findIndex((M) => H(M) && !M.disabled);
2538
2538
  L(D >= 0 ? D : null);
2539
- }, [N, u, $]);
2540
- const ye = Br({
2539
+ }, [y, u, $]);
2540
+ const Ne = Br({
2541
2541
  enabled: m,
2542
2542
  triggerRef: P,
2543
2543
  measureRef: C,
@@ -2559,7 +2559,7 @@ const Lo = (n) => {
2559
2559
  }, Oe = (D) => {
2560
2560
  const M = $[D];
2561
2561
  M && H(M) && !M.disabled && ze(M.value);
2562
- }, B = $.some((D) => H(D)), A = s.length > 0, ie = m ? ye : E.length, pe = E.slice(0, ie), ft = E.length - ie;
2562
+ }, B = $.some((D) => H(D)), A = s.length > 0, ie = m ? Ne : E.length, pe = E.slice(0, ie), ft = E.length - ie;
2563
2563
  return /* @__PURE__ */ e(q.Provider, { value: w, children: /* @__PURE__ */ d(
2564
2564
  "div",
2565
2565
  {
@@ -2646,18 +2646,18 @@ const Lo = (n) => {
2646
2646
  ref: O,
2647
2647
  type: "text",
2648
2648
  placeholder: "Search",
2649
- value: N,
2649
+ value: y,
2650
2650
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-[var(--control-transition-duration)] focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2651
2651
  onChange: (D) => S(D.target.value),
2652
2652
  onKeyDown: (D) => {
2653
- D.key === "Enter" && z != null ? (D.preventDefault(), Oe(z)) : D.key === "Backspace" && N === "" && A && (D.preventDefault(), o(s.slice(0, -1)));
2653
+ D.key === "Enter" && z != null ? (D.preventDefault(), Oe(z)) : D.key === "Backspace" && y === "" && A && (D.preventDefault(), o(s.slice(0, -1)));
2654
2654
  }
2655
2655
  }
2656
2656
  ),
2657
2657
  /* @__PURE__ */ e(Fe, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2658
2658
  ] }),
2659
2659
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2660
- N !== "" && !B && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2660
+ y !== "" && !B && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(nt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2661
2661
  $.map((D, M) => {
2662
2662
  if (!H(D))
2663
2663
  return D.kind === "header" ? /* @__PURE__ */ e(
@@ -3086,13 +3086,13 @@ const Lo = (n) => {
3086
3086
  const u = R.current, I = w.current;
3087
3087
  if (!u || !I) return;
3088
3088
  let b = !0;
3089
- const y = () => a ? u.scrollWidth - u.clientWidth : u.scrollHeight - u.clientHeight, N = () => a ? u.scrollLeft : u.scrollTop, S = (C) => {
3089
+ const N = () => a ? u.scrollWidth - u.clientWidth : u.scrollHeight - u.clientHeight, y = () => a ? u.scrollLeft : u.scrollTop, S = (C) => {
3090
3090
  a ? u.scrollLeft = C : u.scrollTop = C;
3091
3091
  }, z = (C) => {
3092
3092
  v.current !== C && (v.current = C, p.current?.(C));
3093
3093
  }, L = () => {
3094
3094
  if (r && !v.current) return;
3095
- const C = y(), T = N();
3095
+ const C = N(), T = y();
3096
3096
  if (!(C <= 0 || Math.abs(C - T) < 1)) {
3097
3097
  if (b) {
3098
3098
  b = !1, f.current = !0, S(C), requestAnimationFrame(() => {
@@ -3114,7 +3114,7 @@ const Lo = (n) => {
3114
3114
  }, P = new ResizeObserver(L);
3115
3115
  P.observe(I);
3116
3116
  const O = () => {
3117
- f.current || z(y() - N() <= o);
3117
+ f.current || z(N() - y() <= o);
3118
3118
  }, x = () => {
3119
3119
  m.current?.stop(), f.current = !1;
3120
3120
  };
@@ -3147,27 +3147,27 @@ function Hr(n) {
3147
3147
  k.useEffect(() => {
3148
3148
  p.current = { onDelta: t, onDragStart: l, onDragEnd: a, preventScrollOnMove: i };
3149
3149
  });
3150
- const u = k.useRef({}), I = k.useCallback((y) => {
3150
+ const u = k.useRef({}), I = k.useCallback((N) => {
3151
3151
  if (!g.current) return;
3152
- const N = {
3153
- clientX: y ?? w.current,
3152
+ const y = {
3153
+ clientX: N ?? w.current,
3154
3154
  startX: R.current,
3155
3155
  totalDeltaX: m.current,
3156
3156
  target: v.current
3157
3157
  };
3158
3158
  g.current = !1, c(!1);
3159
3159
  const { move: S, up: z, keydown: L } = u.current;
3160
- S && window.removeEventListener("pointermove", S, !0), z && (window.removeEventListener("pointerup", z, !0), window.removeEventListener("pointercancel", z, !0)), L && window.removeEventListener("keydown", L, !0), u.current = {}, f.current != null && (cancelAnimationFrame(f.current), f.current = null), p.current.onDragEnd?.(N), v.current = null, m.current = 0;
3161
- }, []), b = k.useCallback((y) => {
3162
- if (r || o && y.button !== 0) return;
3163
- y.target.setPointerCapture?.(y.pointerId), R.current = y.clientX, w.current = y.clientX, m.current = 0, v.current = y.target, g.current = !0, c(!0);
3164
- const N = {
3165
- clientX: y.clientX,
3166
- startX: y.clientX,
3160
+ S && window.removeEventListener("pointermove", S, !0), z && (window.removeEventListener("pointerup", z, !0), window.removeEventListener("pointercancel", z, !0)), L && window.removeEventListener("keydown", L, !0), u.current = {}, f.current != null && (cancelAnimationFrame(f.current), f.current = null), p.current.onDragEnd?.(y), v.current = null, m.current = 0;
3161
+ }, []), b = k.useCallback((N) => {
3162
+ if (r || o && N.button !== 0) return;
3163
+ N.target.setPointerCapture?.(N.pointerId), R.current = N.clientX, w.current = N.clientX, m.current = 0, v.current = N.target, g.current = !0, c(!0);
3164
+ const y = {
3165
+ clientX: N.clientX,
3166
+ startX: N.clientX,
3167
3167
  totalDeltaX: 0,
3168
- target: y.target
3168
+ target: N.target
3169
3169
  };
3170
- p.current.onDragStart?.(N);
3170
+ p.current.onDragStart?.(y);
3171
3171
  const S = (P) => {
3172
3172
  g.current && f.current == null && (f.current = requestAnimationFrame(() => {
3173
3173
  f.current = null;
@@ -3271,16 +3271,16 @@ const $r = (n) => {
3271
3271
  } = n, [w, m] = W(() => jr(t));
3272
3272
  j(() => {
3273
3273
  m((b) => {
3274
- const y = {};
3275
- let N = Object.keys(b).length !== t.length;
3274
+ const N = {};
3275
+ let y = Object.keys(b).length !== t.length;
3276
3276
  for (const S of t)
3277
- S.id in b ? y[S.id] = b[S.id] : (y[S.id] = S.defaultWidth ?? ke, N = !0);
3278
- return N ? y : b;
3277
+ S.id in b ? N[S.id] = b[S.id] : (N[S.id] = S.defaultWidth ?? ke, y = !0);
3278
+ return y ? N : b;
3279
3279
  });
3280
3280
  }, [t]);
3281
- const v = Pe((b, y, N) => {
3281
+ const v = Pe((b, N, y) => {
3282
3282
  m((S) => {
3283
- const z = S[b] ?? ke, L = Math.max(N, z + y);
3283
+ const z = S[b] ?? ke, L = Math.max(y, z + N);
3284
3284
  return L === z ? S : { ...S, [b]: L };
3285
3285
  });
3286
3286
  }, []), f = Pe((b) => {
@@ -3296,7 +3296,7 @@ const $r = (n) => {
3296
3296
  i(null);
3297
3297
  }
3298
3298
  }, [o, i]), p = t.reduce(
3299
- (b, y) => b + (w[y.id] ?? y.defaultWidth ?? ke),
3299
+ (b, N) => b + (w[N.id] ?? N.defaultWidth ?? ke),
3300
3300
  0
3301
3301
  ), u = Ce(null), I = (b) => {
3302
3302
  u.current && (u.current.scrollLeft = b.currentTarget.scrollLeft);
@@ -3319,7 +3319,7 @@ const $r = (n) => {
3319
3319
  column: b,
3320
3320
  width: w[b.id] ?? b.defaultWidth ?? ke,
3321
3321
  height: g,
3322
- onResize: (y) => v(b.id, y, b.minWidth ?? _r),
3322
+ onResize: (N) => v(b.id, N, b.minWidth ?? _r),
3323
3323
  sortDirection: o?.columnId === b.id ? o.direction : null,
3324
3324
  onSortClick: () => f(b.id)
3325
3325
  },
@@ -3339,28 +3339,28 @@ const $r = (n) => {
3339
3339
  {
3340
3340
  className: "flex flex-col",
3341
3341
  style: { width: p, minWidth: "100%" },
3342
- children: l.map((b, y) => /* @__PURE__ */ e(
3342
+ children: l.map((b, N) => /* @__PURE__ */ e(
3343
3343
  "div",
3344
3344
  {
3345
3345
  className: h(
3346
3346
  "flex flex-row table-body-row transition-colors duration-[var(--control-transition-duration-fast)]",
3347
3347
  r && "cursor-pointer"
3348
3348
  ),
3349
- onClick: r ? () => r(b, y) : void 0,
3350
- children: t.map((N) => /* @__PURE__ */ e(
3349
+ onClick: r ? () => r(b, N) : void 0,
3350
+ children: t.map((y) => /* @__PURE__ */ e(
3351
3351
  "div",
3352
3352
  {
3353
3353
  className: "shrink-0 content-center px-4 relative",
3354
3354
  style: {
3355
- width: w[N.id] ?? N.defaultWidth ?? ke,
3355
+ width: w[y.id] ?? y.defaultWidth ?? ke,
3356
3356
  height: c
3357
3357
  },
3358
- children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 font-[number:var(--font-weight-table-cell)]", children: N.renderCell(b, y) })
3358
+ children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 font-[number:var(--font-weight-table-cell)]", children: y.renderCell(b, N) })
3359
3359
  },
3360
- N.id
3360
+ y.id
3361
3361
  ))
3362
3362
  },
3363
- a(b, y)
3363
+ a(b, N)
3364
3364
  ))
3365
3365
  }
3366
3366
  )
@@ -3516,7 +3516,7 @@ export {
3516
3516
  me as InputIconButtonTray,
3517
3517
  Z as InputLabel,
3518
3518
  zo as InputLexical,
3519
- yo as InputPassword,
3519
+ No as InputPassword,
3520
3520
  ko as InputRadio,
3521
3521
  Er as InputSelect,
3522
3522
  $e as InputSelectDivider,
@@ -3526,9 +3526,9 @@ export {
3526
3526
  We as InputSelectOption,
3527
3527
  To as InputSelectSearchable,
3528
3528
  Po as InputSelectSearchableAsync,
3529
- No as InputTextArea,
3529
+ yo as InputTextArea,
3530
3530
  Co as InputToggle,
3531
- yr as LEXICAL_NODES,
3531
+ Nr as LEXICAL_NODES,
3532
3532
  Cr as LexicalBlockTypeSelect,
3533
3533
  Do as LexicalDefaultToolbarContent,
3534
3534
  Lr as LexicalFloatingToolbar,
@@ -3557,8 +3557,8 @@ export {
3557
3557
  Uo as Tooltip,
3558
3558
  wr as UploadFileTile,
3559
3559
  H as isSelectOption,
3560
- Nt as lexicalTheme,
3561
- Nr as useDropdownDismiss,
3560
+ yt as lexicalTheme,
3561
+ yr as useDropdownDismiss,
3562
3562
  we as useLexicalToolbar,
3563
3563
  Xt as useLexicalToolbarState,
3564
3564
  ut as usePopover,