highsoft-ui 1.0.3 → 1.0.4

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.
@@ -116,7 +116,7 @@ function q(...e) {
116
116
  return a.useCallback(fr(...e), e);
117
117
  }
118
118
  // @__NO_SIDE_EFFECTS__
119
- function Ut(e) {
119
+ function jt(e) {
120
120
  const t = /* @__PURE__ */ dr(e), n = a.forwardRef((r, o) => {
121
121
  const { children: i, ...c } = r, s = a.Children.toArray(i), u = s.find(pr);
122
122
  if (u) {
@@ -178,7 +178,7 @@ var gr = [
178
178
  "svg",
179
179
  "ul"
180
180
  ], G = gr.reduce((e, t) => {
181
- const n = /* @__PURE__ */ Ut(`Primitive.${t}`), r = a.forwardRef((o, i) => {
181
+ const n = /* @__PURE__ */ jt(`Primitive.${t}`), r = a.forwardRef((o, i) => {
182
182
  const { asChild: c, ...s } = o, u = c ? n : t;
183
183
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ C(u, { ...s, ref: i });
184
184
  });
@@ -187,7 +187,7 @@ var gr = [
187
187
  function yr(e, t) {
188
188
  e && ot.flushSync(() => e.dispatchEvent(t));
189
189
  }
190
- function zt(e, t = []) {
190
+ function Ut(e, t = []) {
191
191
  let n = [];
192
192
  function r(i, c) {
193
193
  const s = a.createContext(c), u = n.length;
@@ -500,7 +500,7 @@ function Kt(e, t, n, { discrete: r }) {
500
500
  const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
501
501
  t && o.addEventListener(e, t, { once: !0 }), r ? yr(o, i) : o.dispatchEvent(i);
502
502
  }
503
- var je = "focusScope.autoFocusOnMount", Ue = "focusScope.autoFocusOnUnmount", At = { bubbles: !1, cancelable: !0 }, Wr = "FocusScope", Zt = a.forwardRef((e, t) => {
503
+ var Ve = "focusScope.autoFocusOnMount", je = "focusScope.autoFocusOnUnmount", At = { bubbles: !1, cancelable: !0 }, Wr = "FocusScope", Zt = a.forwardRef((e, t) => {
504
504
  const {
505
505
  loop: n = !1,
506
506
  trapped: r = !1,
@@ -542,13 +542,13 @@ var je = "focusScope.autoFocusOnMount", Ue = "focusScope.autoFocusOnUnmount", At
542
542
  Ot.add(m);
543
543
  const h = document.activeElement;
544
544
  if (!s.contains(h)) {
545
- const y = new CustomEvent(je, At);
546
- s.addEventListener(je, l), s.dispatchEvent(y), y.defaultPrevented || (Br(Ur(qt(s)), { select: !0 }), document.activeElement === h && Q(s));
545
+ const y = new CustomEvent(Ve, At);
546
+ s.addEventListener(Ve, l), s.dispatchEvent(y), y.defaultPrevented || (Br(jr(qt(s)), { select: !0 }), document.activeElement === h && Q(s));
547
547
  }
548
548
  return () => {
549
- s.removeEventListener(je, l), setTimeout(() => {
550
- const y = new CustomEvent(Ue, At);
551
- s.addEventListener(Ue, f), s.dispatchEvent(y), y.defaultPrevented || Q(h ?? document.body, { select: !0 }), s.removeEventListener(Ue, f), Ot.remove(m);
549
+ s.removeEventListener(Ve, l), setTimeout(() => {
550
+ const y = new CustomEvent(je, At);
551
+ s.addEventListener(je, f), s.dispatchEvent(y), y.defaultPrevented || Q(h ?? document.body, { select: !0 }), s.removeEventListener(je, f), Ot.remove(m);
552
552
  }, 0);
553
553
  };
554
554
  }
@@ -599,17 +599,17 @@ function Hr(e, { upTo: t }) {
599
599
  }
600
600
  return !1;
601
601
  }
602
- function Vr(e) {
602
+ function zr(e) {
603
603
  return e instanceof HTMLInputElement && "select" in e;
604
604
  }
605
605
  function Q(e, { select: t = !1 } = {}) {
606
606
  if (e && e.focus) {
607
607
  const n = document.activeElement;
608
- e.focus({ preventScroll: !0 }), e !== n && Vr(e) && t && e.select();
608
+ e.focus({ preventScroll: !0 }), e !== n && zr(e) && t && e.select();
609
609
  }
610
610
  }
611
- var Ot = jr();
612
- function jr() {
611
+ var Ot = Vr();
612
+ function Vr() {
613
613
  let e = [];
614
614
  return {
615
615
  add(t) {
@@ -626,23 +626,23 @@ function Nt(e, t) {
626
626
  const n = [...e], r = n.indexOf(t);
627
627
  return r !== -1 && n.splice(r, 1), n;
628
628
  }
629
- function Ur(e) {
629
+ function jr(e) {
630
630
  return e.filter((t) => t.tagName !== "A");
631
631
  }
632
- var zr = "Portal", Gt = a.forwardRef((e, t) => {
632
+ var Ur = "Portal", Gt = a.forwardRef((e, t) => {
633
633
  var s;
634
634
  const { container: n, ...r } = e, [o, i] = a.useState(!1);
635
635
  te(() => i(!0), []);
636
636
  const c = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
637
637
  return c ? ur.createPortal(/* @__PURE__ */ C(G.div, { ...r, ref: t }), c) : null;
638
638
  });
639
- Gt.displayName = zr;
640
- var ze = 0;
639
+ Gt.displayName = Ur;
640
+ var Ue = 0;
641
641
  function Yr() {
642
642
  a.useEffect(() => {
643
643
  const e = document.querySelectorAll("[data-radix-focus-guard]");
644
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Mt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Mt()), ze++, () => {
645
- ze === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ze--;
644
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Mt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Mt()), Ue++, () => {
645
+ Ue === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ue--;
646
646
  };
647
647
  }, []);
648
648
  }
@@ -650,14 +650,14 @@ function Mt() {
650
650
  const e = document.createElement("span");
651
651
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
652
652
  }
653
- var j = function() {
654
- return j = Object.assign || function(t) {
653
+ var V = function() {
654
+ return V = Object.assign || function(t) {
655
655
  for (var n, r = 1, o = arguments.length; r < o; r++) {
656
656
  n = arguments[r];
657
657
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
658
658
  }
659
659
  return t;
660
- }, j.apply(this, arguments);
660
+ }, V.apply(this, arguments);
661
661
  };
662
662
  function Qt(e, t) {
663
663
  var n = {};
@@ -778,7 +778,7 @@ function eo(e, t) {
778
778
  function to(e) {
779
779
  e === void 0 && (e = {});
780
780
  var t = eo(null);
781
- return t.options = j({ async: !0, ssr: !1 }, e), t;
781
+ return t.options = V({ async: !0, ssr: !1 }, e), t;
782
782
  }
783
783
  var Jt = function(e) {
784
784
  var t = e.sideCar, n = Qt(e, ["sideCar"]);
@@ -787,7 +787,7 @@ var Jt = function(e) {
787
787
  var r = t.read();
788
788
  if (!r)
789
789
  throw new Error("Sidecar medium not found");
790
- return a.createElement(r, j({}, n));
790
+ return a.createElement(r, V({}, n));
791
791
  };
792
792
  Jt.isSideCarExport = !0;
793
793
  function no(e, t) {
@@ -799,12 +799,12 @@ var en = to(), Xe = function() {
799
799
  onScrollCapture: Xe,
800
800
  onWheelCapture: Xe,
801
801
  onTouchMoveCapture: Xe
802
- }), o = r[0], i = r[1], c = e.forwardProps, s = e.children, u = e.className, l = e.removeScrollBar, f = e.enabled, d = e.shards, p = e.sideCar, m = e.noIsolation, g = e.inert, h = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, x = e.gapMode, b = Qt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), w = p, E = Qr([n, t]), S = j(j({}, b), o);
802
+ }), o = r[0], i = r[1], c = e.forwardProps, s = e.children, u = e.className, l = e.removeScrollBar, f = e.enabled, d = e.shards, p = e.sideCar, m = e.noIsolation, g = e.inert, h = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, x = e.gapMode, b = Qt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), w = p, E = Qr([n, t]), S = V(V({}, b), o);
803
803
  return a.createElement(
804
804
  a.Fragment,
805
805
  null,
806
806
  f && a.createElement(w, { sideCar: en, removeScrollBar: l, shards: d, noIsolation: m, inert: g, setCallbacks: i, allowPinchZoom: !!h, lockRef: n, gapMode: x }),
807
- c ? a.cloneElement(a.Children.only(s), j(j({}, S), { ref: E })) : a.createElement(y, j({}, S, { className: u, ref: E }), s)
807
+ c ? a.cloneElement(a.Children.only(s), V(V({}, S), { ref: E })) : a.createElement(y, V({}, S, { className: u, ref: E }), s)
808
808
  );
809
809
  });
810
810
  We.defaultProps = {
@@ -1115,7 +1115,7 @@ function Oo(e) {
1115
1115
  }
1116
1116
  const No = no(en, Ro);
1117
1117
  var sn = a.forwardRef(function(e, t) {
1118
- return a.createElement(We, j({}, e, { ref: t, sideCar: No }));
1118
+ return a.createElement(We, V({}, e, { ref: t, sideCar: No }));
1119
1119
  });
1120
1120
  sn.classNames = We.classNames;
1121
1121
  var Mo = function(e) {
@@ -1189,7 +1189,7 @@ function Do(e) {
1189
1189
  n(void 0);
1190
1190
  }, [e]), t;
1191
1191
  }
1192
- const _o = ["top", "right", "bottom", "left"], ne = Math.min, B = Math.max, De = Math.round, Me = Math.floor, U = (e) => ({
1192
+ const _o = ["top", "right", "bottom", "left"], ne = Math.min, B = Math.max, De = Math.round, Me = Math.floor, j = (e) => ({
1193
1193
  x: e,
1194
1194
  y: e
1195
1195
  }), Fo = {
@@ -1259,7 +1259,7 @@ function Ho(e, t, n, r) {
1259
1259
  function _e(e) {
1260
1260
  return e.replace(/left|right|bottom|top/g, (t) => Fo[t]);
1261
1261
  }
1262
- function Vo(e) {
1262
+ function zo(e) {
1263
1263
  return {
1264
1264
  top: 0,
1265
1265
  right: 0,
@@ -1269,7 +1269,7 @@ function Vo(e) {
1269
1269
  };
1270
1270
  }
1271
1271
  function an(e) {
1272
- return typeof e != "number" ? Vo(e) : {
1272
+ return typeof e != "number" ? zo(e) : {
1273
1273
  top: e,
1274
1274
  right: e,
1275
1275
  bottom: e,
@@ -1342,7 +1342,7 @@ function Ft(e, t, n) {
1342
1342
  }
1343
1343
  return m;
1344
1344
  }
1345
- const jo = async (e, t, n) => {
1345
+ const Vo = async (e, t, n) => {
1346
1346
  const {
1347
1347
  placement: r = "bottom",
1348
1348
  strategy: o = "absolute",
@@ -1448,7 +1448,7 @@ async function we(e, t) {
1448
1448
  right: (E.right - y.right + g.right) / w.x
1449
1449
  };
1450
1450
  }
1451
- const Uo = (e) => ({
1451
+ const jo = (e) => ({
1452
1452
  name: "arrow",
1453
1453
  options: e,
1454
1454
  async fn(t) {
@@ -1485,7 +1485,7 @@ const Uo = (e) => ({
1485
1485
  reset: L
1486
1486
  };
1487
1487
  }
1488
- }), zo = function(e) {
1488
+ }), Uo = function(e) {
1489
1489
  return e === void 0 && (e = {}), {
1490
1490
  name: "flip",
1491
1491
  options: e,
@@ -1830,7 +1830,7 @@ function ln(e) {
1830
1830
  function H(e) {
1831
1831
  return Be() ? e instanceof Element || e instanceof $(e).Element : !1;
1832
1832
  }
1833
- function z(e) {
1833
+ function U(e) {
1834
1834
  return Be() ? e instanceof HTMLElement || e instanceof $(e).HTMLElement : !1;
1835
1835
  }
1836
1836
  function Bt(e) {
@@ -1842,7 +1842,7 @@ function Ee(e) {
1842
1842
  overflowX: n,
1843
1843
  overflowY: r,
1844
1844
  display: o
1845
- } = V(e);
1845
+ } = z(e);
1846
1846
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
1847
1847
  }
1848
1848
  function Qo(e) {
@@ -1858,12 +1858,12 @@ function $e(e) {
1858
1858
  });
1859
1859
  }
1860
1860
  function lt(e) {
1861
- const t = ut(), n = H(e) ? V(e) : e;
1861
+ const t = ut(), n = H(e) ? z(e) : e;
1862
1862
  return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
1863
1863
  }
1864
1864
  function Jo(e) {
1865
1865
  let t = re(e);
1866
- for (; z(t) && !he(t); ) {
1866
+ for (; U(t) && !he(t); ) {
1867
1867
  if (lt(t))
1868
1868
  return t;
1869
1869
  if ($e(t))
@@ -1878,7 +1878,7 @@ function ut() {
1878
1878
  function he(e) {
1879
1879
  return ["html", "body", "#document"].includes(ve(e));
1880
1880
  }
1881
- function V(e) {
1881
+ function z(e) {
1882
1882
  return $(e).getComputedStyle(e);
1883
1883
  }
1884
1884
  function He(e) {
@@ -1904,7 +1904,7 @@ function re(e) {
1904
1904
  }
1905
1905
  function un(e) {
1906
1906
  const t = re(e);
1907
- return he(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : z(t) && Ee(t) ? t : un(t);
1907
+ return he(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && Ee(t) ? t : un(t);
1908
1908
  }
1909
1909
  function be(e, t, n) {
1910
1910
  var r;
@@ -1920,9 +1920,9 @@ function rt(e) {
1920
1920
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1921
1921
  }
1922
1922
  function fn(e) {
1923
- const t = V(e);
1923
+ const t = z(e);
1924
1924
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1925
- const o = z(e), i = o ? e.offsetWidth : n, c = o ? e.offsetHeight : r, s = De(n) !== i || De(r) !== c;
1925
+ const o = U(e), i = o ? e.offsetWidth : n, c = o ? e.offsetHeight : r, s = De(n) !== i || De(r) !== c;
1926
1926
  return s && (n = i, r = c), {
1927
1927
  width: n,
1928
1928
  height: r,
@@ -1934,8 +1934,8 @@ function ft(e) {
1934
1934
  }
1935
1935
  function fe(e) {
1936
1936
  const t = ft(e);
1937
- if (!z(t))
1938
- return U(1);
1937
+ if (!U(t))
1938
+ return j(1);
1939
1939
  const n = t.getBoundingClientRect(), {
1940
1940
  width: r,
1941
1941
  height: o,
@@ -1947,7 +1947,7 @@ function fe(e) {
1947
1947
  y: s
1948
1948
  };
1949
1949
  }
1950
- const ei = /* @__PURE__ */ U(0);
1950
+ const ei = /* @__PURE__ */ j(0);
1951
1951
  function dn(e) {
1952
1952
  const t = $(e);
1953
1953
  return !ut() || !t.visualViewport ? ei : {
@@ -1961,15 +1961,15 @@ function ti(e, t, n) {
1961
1961
  function ie(e, t, n, r) {
1962
1962
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1963
1963
  const o = e.getBoundingClientRect(), i = ft(e);
1964
- let c = U(1);
1964
+ let c = j(1);
1965
1965
  t && (r ? H(r) && (c = fe(r)) : c = fe(e));
1966
- const s = ti(i, n, r) ? dn(i) : U(0);
1966
+ const s = ti(i, n, r) ? dn(i) : j(0);
1967
1967
  let u = (o.left + s.x) / c.x, l = (o.top + s.y) / c.y, f = o.width / c.x, d = o.height / c.y;
1968
1968
  if (i) {
1969
1969
  const p = $(i), m = r && H(r) ? $(r) : r;
1970
1970
  let g = p, h = rt(g);
1971
1971
  for (; h && r && m !== g; ) {
1972
- const v = fe(h), y = h.getBoundingClientRect(), x = V(h), b = y.left + (h.clientLeft + parseFloat(x.paddingLeft)) * v.x, w = y.top + (h.clientTop + parseFloat(x.paddingTop)) * v.y;
1972
+ const v = fe(h), y = h.getBoundingClientRect(), x = z(h), b = y.left + (h.clientLeft + parseFloat(x.paddingLeft)) * v.x, w = y.top + (h.clientTop + parseFloat(x.paddingTop)) * v.y;
1973
1973
  u *= v.x, l *= v.y, f *= v.x, d *= v.y, u += b, l += w, g = $(h), h = rt(g);
1974
1974
  }
1975
1975
  }
@@ -2008,13 +2008,13 @@ function ni(e) {
2008
2008
  let u = {
2009
2009
  scrollLeft: 0,
2010
2010
  scrollTop: 0
2011
- }, l = U(1);
2012
- const f = U(0), d = z(r);
2013
- if ((d || !d && !i) && ((ve(r) !== "body" || Ee(c)) && (u = He(r)), z(r))) {
2011
+ }, l = j(1);
2012
+ const f = j(0), d = U(r);
2013
+ if ((d || !d && !i) && ((ve(r) !== "body" || Ee(c)) && (u = He(r)), U(r))) {
2014
2014
  const m = ie(r);
2015
2015
  l = fe(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop;
2016
2016
  }
2017
- const p = c && !d && !i ? hn(c, u, !0) : U(0);
2017
+ const p = c && !d && !i ? hn(c, u, !0) : j(0);
2018
2018
  return {
2019
2019
  width: n.width * l.x,
2020
2020
  height: n.height * l.y,
@@ -2029,7 +2029,7 @@ function oi(e) {
2029
2029
  const t = Y(e), n = He(e), r = e.ownerDocument.body, o = B(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = B(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
2030
2030
  let c = -n.scrollLeft + dt(e);
2031
2031
  const s = -n.scrollTop;
2032
- return V(r).direction === "rtl" && (c += B(t.clientWidth, r.clientWidth) - o), {
2032
+ return z(r).direction === "rtl" && (c += B(t.clientWidth, r.clientWidth) - o), {
2033
2033
  width: o,
2034
2034
  height: i,
2035
2035
  x: c,
@@ -2052,7 +2052,7 @@ function ii(e, t) {
2052
2052
  };
2053
2053
  }
2054
2054
  function si(e, t) {
2055
- const n = ie(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = z(e) ? fe(e) : U(1), c = e.clientWidth * i.x, s = e.clientHeight * i.y, u = o * i.x, l = r * i.y;
2055
+ const n = ie(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? fe(e) : j(1), c = e.clientWidth * i.x, s = e.clientHeight * i.y, u = o * i.x, l = r * i.y;
2056
2056
  return {
2057
2057
  width: c,
2058
2058
  height: s,
@@ -2081,17 +2081,17 @@ function $t(e, t, n) {
2081
2081
  }
2082
2082
  function pn(e, t) {
2083
2083
  const n = re(e);
2084
- return n === t || !H(n) || he(n) ? !1 : V(n).position === "fixed" || pn(n, t);
2084
+ return n === t || !H(n) || he(n) ? !1 : z(n).position === "fixed" || pn(n, t);
2085
2085
  }
2086
2086
  function ci(e, t) {
2087
2087
  const n = t.get(e);
2088
2088
  if (n)
2089
2089
  return n;
2090
2090
  let r = be(e, [], !1).filter((s) => H(s) && ve(s) !== "body"), o = null;
2091
- const i = V(e).position === "fixed";
2091
+ const i = z(e).position === "fixed";
2092
2092
  let c = i ? re(e) : e;
2093
2093
  for (; H(c) && !he(c); ) {
2094
- const s = V(c), u = lt(c);
2094
+ const s = z(c), u = lt(c);
2095
2095
  !u && s.position === "fixed" && (o = null), (i ? !u && !o : !u && s.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Ee(c) && !u && pn(e, c)) ? r = r.filter((f) => f !== c) : o = s, c = re(c);
2096
2096
  }
2097
2097
  return t.set(e, r), r;
@@ -2125,12 +2125,12 @@ function li(e) {
2125
2125
  };
2126
2126
  }
2127
2127
  function ui(e, t, n) {
2128
- const r = z(t), o = Y(t), i = n === "fixed", c = ie(e, !0, i, t);
2128
+ const r = U(t), o = Y(t), i = n === "fixed", c = ie(e, !0, i, t);
2129
2129
  let s = {
2130
2130
  scrollLeft: 0,
2131
2131
  scrollTop: 0
2132
2132
  };
2133
- const u = U(0);
2133
+ const u = j(0);
2134
2134
  function l() {
2135
2135
  u.x = dt(o);
2136
2136
  }
@@ -2140,7 +2140,7 @@ function ui(e, t, n) {
2140
2140
  u.x = m.x + t.clientLeft, u.y = m.y + t.clientTop;
2141
2141
  } else o && l();
2142
2142
  i && !r && o && l();
2143
- const f = o && !r && !i ? hn(o, s) : U(0), d = c.left + s.scrollLeft - u.x - f.x, p = c.top + s.scrollTop - u.y - f.y;
2143
+ const f = o && !r && !i ? hn(o, s) : j(0), d = c.left + s.scrollLeft - u.x - f.x, p = c.top + s.scrollTop - u.y - f.y;
2144
2144
  return {
2145
2145
  x: d,
2146
2146
  y: p,
@@ -2149,10 +2149,10 @@ function ui(e, t, n) {
2149
2149
  };
2150
2150
  }
2151
2151
  function qe(e) {
2152
- return V(e).position === "static";
2152
+ return z(e).position === "static";
2153
2153
  }
2154
2154
  function Ht(e, t) {
2155
- if (!z(e) || V(e).position === "fixed")
2155
+ if (!U(e) || z(e).position === "fixed")
2156
2156
  return null;
2157
2157
  if (t)
2158
2158
  return t(e);
@@ -2163,7 +2163,7 @@ function mn(e, t) {
2163
2163
  const n = $(e);
2164
2164
  if ($e(e))
2165
2165
  return n;
2166
- if (!z(e)) {
2166
+ if (!U(e)) {
2167
2167
  let o = re(e);
2168
2168
  for (; o && !he(o); ) {
2169
2169
  if (H(o) && !qe(o))
@@ -2190,7 +2190,7 @@ const fi = async function(e) {
2190
2190
  };
2191
2191
  };
2192
2192
  function di(e) {
2193
- return V(e).direction === "rtl";
2193
+ return z(e).direction === "rtl";
2194
2194
  }
2195
2195
  const hi = {
2196
2196
  convertOffsetParentRelativeRectToViewportRelativeRect: ni,
@@ -2289,7 +2289,7 @@ function mi(e, t, n, r) {
2289
2289
  }), d == null || d(), (y = m) == null || y.disconnect(), m = null, u && cancelAnimationFrame(g);
2290
2290
  };
2291
2291
  }
2292
- const vi = Ko, gi = Zo, yi = zo, wi = Go, bi = Yo, Vt = Uo, xi = qo, Ei = (e, t, n) => {
2292
+ const vi = Ko, gi = Zo, yi = Uo, wi = Go, bi = Yo, zt = jo, xi = qo, Ei = (e, t, n) => {
2293
2293
  const r = /* @__PURE__ */ new Map(), o = {
2294
2294
  platform: hi,
2295
2295
  ...n
@@ -2297,7 +2297,7 @@ const vi = Ko, gi = Zo, yi = zo, wi = Go, bi = Yo, Vt = Uo, xi = qo, Ei = (e, t,
2297
2297
  ...o.platform,
2298
2298
  _c: r
2299
2299
  };
2300
- return jo(e, t, {
2300
+ return Vo(e, t, {
2301
2301
  ...o,
2302
2302
  platform: i
2303
2303
  });
@@ -2336,7 +2336,7 @@ function Ie(e, t) {
2336
2336
  function gn(e) {
2337
2337
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
2338
2338
  }
2339
- function jt(e, t) {
2339
+ function Vt(e, t) {
2340
2340
  const n = gn(e);
2341
2341
  return Math.round(t * n) / n;
2342
2342
  }
@@ -2427,7 +2427,7 @@ function Ci(e) {
2427
2427
  };
2428
2428
  if (!L.floating)
2429
2429
  return A;
2430
- const T = jt(L.floating, f.x), _ = jt(L.floating, f.y);
2430
+ const T = Vt(L.floating, f.x), _ = Vt(L.floating, f.y);
2431
2431
  return s ? {
2432
2432
  ...A,
2433
2433
  transform: "translate(" + T + "px, " + _ + "px)",
@@ -2460,10 +2460,10 @@ const Pi = (e) => {
2460
2460
  element: r,
2461
2461
  padding: o
2462
2462
  } = typeof e == "function" ? e(n) : e;
2463
- return r && t(r) ? r.current != null ? Vt({
2463
+ return r && t(r) ? r.current != null ? zt({
2464
2464
  element: r.current,
2465
2465
  padding: o
2466
- }).fn(n) : {} : r ? Vt({
2466
+ }).fn(n) : {} : r ? zt({
2467
2467
  element: r,
2468
2468
  padding: o
2469
2469
  }).fn(n) : {};
@@ -2507,7 +2507,7 @@ var ki = "Arrow", yn = a.forwardRef((e, t) => {
2507
2507
  );
2508
2508
  });
2509
2509
  yn.displayName = ki;
2510
- var Li = yn, ht = "Popper", [wn, bn] = zt(ht), [Di, xn] = wn(ht), En = (e) => {
2510
+ var Li = yn, ht = "Popper", [wn, bn] = Ut(ht), [Di, xn] = wn(ht), En = (e) => {
2511
2511
  const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
2512
2512
  return /* @__PURE__ */ C(Di, { scope: t, anchor: r, onAnchorChange: o, children: n });
2513
2513
  };
@@ -2578,9 +2578,9 @@ var pt = "PopperContent", [_i, Fi] = wn(pt), Sn = a.forwardRef(
2578
2578
  te(() => {
2579
2579
  D && (se == null || se());
2580
2580
  }, [D, se]);
2581
- const Hn = (vt = A.arrow) == null ? void 0 : vt.x, Vn = (gt = A.arrow) == null ? void 0 : gt.y, jn = ((yt = A.arrow) == null ? void 0 : yt.centerOffset) !== 0, [Un, zn] = a.useState();
2581
+ const Hn = (vt = A.arrow) == null ? void 0 : vt.x, zn = (gt = A.arrow) == null ? void 0 : gt.y, Vn = ((yt = A.arrow) == null ? void 0 : yt.centerOffset) !== 0, [jn, Un] = a.useState();
2582
2582
  return te(() => {
2583
- y && zn(window.getComputedStyle(y).zIndex);
2583
+ y && Un(window.getComputedStyle(y).zIndex);
2584
2584
  }, [y]), /* @__PURE__ */ C(
2585
2585
  "div",
2586
2586
  {
@@ -2591,7 +2591,7 @@ var pt = "PopperContent", [_i, Fi] = wn(pt), Sn = a.forwardRef(
2591
2591
  transform: D ? k.transform : "translate(0, -200%)",
2592
2592
  // keep off the page when measuring
2593
2593
  minWidth: "max-content",
2594
- zIndex: Un,
2594
+ zIndex: jn,
2595
2595
  "--radix-popper-transform-origin": [
2596
2596
  (wt = A.transformOrigin) == null ? void 0 : wt.x,
2597
2597
  (bt = A.transformOrigin) == null ? void 0 : bt.y
@@ -2612,8 +2612,8 @@ var pt = "PopperContent", [_i, Fi] = wn(pt), Sn = a.forwardRef(
2612
2612
  placedSide: T,
2613
2613
  onArrowChange: E,
2614
2614
  arrowX: Hn,
2615
- arrowY: Vn,
2616
- shouldHideArrow: jn,
2615
+ arrowY: zn,
2616
+ shouldHideArrow: Vn,
2617
2617
  children: /* @__PURE__ */ C(
2618
2618
  G.div,
2619
2619
  {
@@ -2704,9 +2704,9 @@ function On(e) {
2704
2704
  const [t, n = "center"] = e.split("-");
2705
2705
  return [t, n];
2706
2706
  }
2707
- var $i = En, Nn = Pn, Hi = Sn, Vi = Rn, Ve = "Popover", [Mn, ms] = zt(Ve, [
2707
+ var $i = En, Nn = Pn, Hi = Sn, zi = Rn, ze = "Popover", [Mn, ms] = Ut(ze, [
2708
2708
  bn
2709
- ]), Ce = bn(), [ji, oe] = Mn(Ve), Tn = (e) => {
2709
+ ]), Ce = bn(), [Vi, oe] = Mn(ze), Tn = (e) => {
2710
2710
  const {
2711
2711
  __scopePopover: t,
2712
2712
  children: n,
@@ -2718,10 +2718,10 @@ var $i = En, Nn = Pn, Hi = Sn, Vi = Rn, Ve = "Popover", [Mn, ms] = zt(Ve, [
2718
2718
  prop: r,
2719
2719
  defaultProp: o ?? !1,
2720
2720
  onChange: i,
2721
- caller: Ve
2721
+ caller: ze
2722
2722
  });
2723
2723
  return /* @__PURE__ */ C($i, { ...s, children: /* @__PURE__ */ C(
2724
- ji,
2724
+ Vi,
2725
2725
  {
2726
2726
  scope: t,
2727
2727
  contentId: Nr(),
@@ -2737,7 +2737,7 @@ var $i = En, Nn = Pn, Hi = Sn, Vi = Rn, Ve = "Popover", [Mn, ms] = zt(Ve, [
2737
2737
  }
2738
2738
  ) });
2739
2739
  };
2740
- Tn.displayName = Ve;
2740
+ Tn.displayName = ze;
2741
2741
  var kn = "PopoverAnchor", Ln = a.forwardRef(
2742
2742
  (e, t) => {
2743
2743
  const { __scopePopover: n, ...r } = e, o = oe(kn, n), i = Ce(n), { onCustomAnchorAdd: c, onCustomAnchorRemove: s } = o;
@@ -2764,21 +2764,21 @@ var Dn = "PopoverTrigger", _n = a.forwardRef(
2764
2764
  }
2765
2765
  );
2766
2766
  _n.displayName = Dn;
2767
- var mt = "PopoverPortal", [Ui, zi] = Mn(mt, {
2767
+ var mt = "PopoverPortal", [ji, Ui] = Mn(mt, {
2768
2768
  forceMount: void 0
2769
2769
  }), Fn = (e) => {
2770
2770
  const { __scopePopover: t, forceMount: n, children: r, container: o } = e, i = oe(mt, t);
2771
- return /* @__PURE__ */ C(Ui, { scope: t, forceMount: n, children: /* @__PURE__ */ C(it, { present: n || i.open, children: /* @__PURE__ */ C(Gt, { asChild: !0, container: o, children: r }) }) });
2771
+ return /* @__PURE__ */ C(ji, { scope: t, forceMount: n, children: /* @__PURE__ */ C(it, { present: n || i.open, children: /* @__PURE__ */ C(Gt, { asChild: !0, container: o, children: r }) }) });
2772
2772
  };
2773
2773
  Fn.displayName = mt;
2774
2774
  var pe = "PopoverContent", In = a.forwardRef(
2775
2775
  (e, t) => {
2776
- const n = zi(pe, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, i = oe(pe, e.__scopePopover);
2776
+ const n = Ui(pe, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, i = oe(pe, e.__scopePopover);
2777
2777
  return /* @__PURE__ */ C(it, { present: r || i.open, children: i.modal ? /* @__PURE__ */ C(Xi, { ...o, ref: t }) : /* @__PURE__ */ C(Ki, { ...o, ref: t }) });
2778
2778
  }
2779
2779
  );
2780
2780
  In.displayName = pe;
2781
- var Yi = /* @__PURE__ */ Ut("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
2781
+ var Yi = /* @__PURE__ */ jt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
2782
2782
  (e, t) => {
2783
2783
  const n = oe(pe, e.__scopePopover), r = a.useRef(null), o = q(t, r), i = a.useRef(!1);
2784
2784
  return a.useEffect(() => {
@@ -2908,7 +2908,7 @@ Zi.displayName = Bn;
2908
2908
  var qi = "PopoverArrow", Gi = a.forwardRef(
2909
2909
  (e, t) => {
2910
2910
  const { __scopePopover: n, ...r } = e, o = Ce(n);
2911
- return /* @__PURE__ */ C(Vi, { ...o, ...r, ref: t });
2911
+ return /* @__PURE__ */ C(zi, { ...o, ...r, ref: t });
2912
2912
  }
2913
2913
  );
2914
2914
  Gi.displayName = qi;
@@ -2916,7 +2916,7 @@ function $n(e) {
2916
2916
  return e ? "open" : "closed";
2917
2917
  }
2918
2918
  var Qi = Tn, Ji = Ln, es = _n, ts = Fn, ns = In;
2919
- const rs = "_anchor_12muw_17", os = "_container_12muw_22", is = "_radio_12muw_38", ss = "_check_12muw_50", cs = "_radioInput_12muw_58", ye = {
2919
+ const rs = "_anchor_14hmz_17", os = "_container_14hmz_22", is = "_radio_14hmz_39", ss = "_check_14hmz_51", cs = "_radioInput_14hmz_59", ye = {
2920
2920
  anchor: rs,
2921
2921
  container: os,
2922
2922
  radio: is,
@@ -2942,59 +2942,56 @@ function Qe({ children: e, id: t, ...n }) {
2942
2942
  }
2943
2943
  function vs() {
2944
2944
  const { theme: e, systemTheme: t, setTheme: n } = Gn();
2945
- return (
2946
- // TODO: Find out why focus doesnt return to trigger after closing (probably need to forwardRef <Button>)
2947
- /* @__PURE__ */ J(Qi, { children: [
2948
- /* @__PURE__ */ C(es, { asChild: !0, children: /* @__PURE__ */ J(nr, { variant: "transparent", children: [
2949
- /* @__PURE__ */ C(ar, {}),
2950
- /* @__PURE__ */ C(Ji, { className: ye.anchor })
2951
- ] }) }),
2952
- /* @__PURE__ */ C(ts, { children: /* @__PURE__ */ J(ns, { sideOffset: 8, className: ye.container, children: [
2953
- /* @__PURE__ */ C("span", { children: "Appearance" }),
2954
- /* @__PURE__ */ J(
2955
- Qe,
2956
- {
2957
- id: "system",
2958
- name: "theme",
2959
- checked: e === "system",
2960
- onChange: () => n("system"),
2961
- children: [
2962
- /* @__PURE__ */ C(sr, {}),
2963
- "Auto (",
2964
- t,
2965
- ")"
2966
- ]
2967
- }
2968
- ),
2969
- /* @__PURE__ */ J(
2970
- Qe,
2971
- {
2972
- id: "light",
2973
- name: "theme",
2974
- checked: e === "light",
2975
- onChange: () => n("light"),
2976
- children: [
2977
- /* @__PURE__ */ C(lr, {}),
2978
- "Light"
2979
- ]
2980
- }
2981
- ),
2982
- /* @__PURE__ */ J(
2983
- Qe,
2984
- {
2985
- id: "dark",
2986
- name: "theme",
2987
- checked: e === "dark",
2988
- onChange: () => n("dark"),
2989
- children: [
2990
- /* @__PURE__ */ C(cr, {}),
2991
- "Dark"
2992
- ]
2993
- }
2994
- )
2995
- ] }) })
2996
- ] })
2997
- );
2945
+ return /* @__PURE__ */ J(Qi, { children: [
2946
+ /* @__PURE__ */ C(es, { asChild: !0, children: /* @__PURE__ */ J(nr, { variant: "transparent", children: [
2947
+ /* @__PURE__ */ C(ar, {}),
2948
+ /* @__PURE__ */ C(Ji, { className: ye.anchor })
2949
+ ] }) }),
2950
+ /* @__PURE__ */ C(ts, { children: /* @__PURE__ */ J(ns, { sideOffset: 8, className: ye.container, children: [
2951
+ /* @__PURE__ */ C("span", { children: "Appearance" }),
2952
+ /* @__PURE__ */ J(
2953
+ Qe,
2954
+ {
2955
+ id: "system",
2956
+ name: "theme",
2957
+ checked: e === "system",
2958
+ onChange: () => n("system"),
2959
+ children: [
2960
+ /* @__PURE__ */ C(sr, {}),
2961
+ "Auto (",
2962
+ t,
2963
+ ")"
2964
+ ]
2965
+ }
2966
+ ),
2967
+ /* @__PURE__ */ J(
2968
+ Qe,
2969
+ {
2970
+ id: "light",
2971
+ name: "theme",
2972
+ checked: e === "light",
2973
+ onChange: () => n("light"),
2974
+ children: [
2975
+ /* @__PURE__ */ C(lr, {}),
2976
+ "Light"
2977
+ ]
2978
+ }
2979
+ ),
2980
+ /* @__PURE__ */ J(
2981
+ Qe,
2982
+ {
2983
+ id: "dark",
2984
+ name: "theme",
2985
+ checked: e === "dark",
2986
+ onChange: () => n("dark"),
2987
+ children: [
2988
+ /* @__PURE__ */ C(cr, {}),
2989
+ "Dark"
2990
+ ]
2991
+ }
2992
+ )
2993
+ ] }) })
2994
+ ] });
2998
2995
  }
2999
2996
  export {
3000
2997
  vs as PrefPanel,