@g4rcez/components 2.2.6 → 2.2.8

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.mjs CHANGED
@@ -3925,8 +3925,11 @@ const Yk = (e, t) => {
3925
3925
  const t = () => e.setAttribute("data-initialized", "true");
3926
3926
  return e.addEventListener("focus", t), () => e.removeEventListener("focus", t);
3927
3927
  }, LC = (e) => e.scrollHeight > e.clientHeight, ol = (e, t) => {
3928
- const n = e.getBoundingClientRect();
3929
- return Math.abs(t - n.bottom);
3928
+ if (e && e.getBoundingClientRect) {
3929
+ const n = e.getBoundingClientRect();
3930
+ return Math.abs(t - n.bottom);
3931
+ }
3932
+ return 320;
3930
3933
  }, EW = (e, t) => {
3931
3934
  const n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
3932
3935
  return { top: Math.round(n.top - r.top), left: Math.round(n.left - r.left) };
@@ -29614,9 +29617,9 @@ const AE = dn([null, () => {
29614
29617
  }), Array.from(r.values());
29615
29618
  }, s3 = (e) => /* @__PURE__ */ x(Qe, { children: e.children }), l3 = {
29616
29619
  duration: 200,
29617
- initial: { transform: "scaleY(0)", opacity: 0.2 },
29618
29620
  open: { transform: "scaleY(1)", opacity: 1 },
29619
- close: { transform: "scaleY(0)", opacity: 0 }
29621
+ close: { transform: "scaleY(0)", opacity: 0 },
29622
+ initial: { transform: "scaleY(0)", opacity: 0.2 }
29620
29623
  }, c3 = [], u3 = ut(function(t, n) {
29621
29624
  return /* @__PURE__ */ x(
29622
29625
  Ge.ul,
@@ -29670,7 +29673,7 @@ const AE = dn([null, () => {
29670
29673
  padding: 10,
29671
29674
  elementContext: "reference",
29672
29675
  apply($) {
29673
- const he = $.elements.floating.querySelector("ul")?.getBoundingClientRect().height || 0, be = ol(G.reference.current, window.innerHeight), Re = Math.min(he < Zo ? be : he, be, $.availableHeight), Fe = B.length === 0 ? Zo : Math.min(Re, be, he), Le = `${v.current.getBoundingClientRect().width}px`;
29676
+ const he = $.elements.floating.querySelector("ul")?.getBoundingClientRect().height || 0, be = ol(G.reference.current, window.innerHeight), Re = Math.min(he < Zo ? be : he, be, $.availableHeight), Fe = B.length === 0 ? Zo : Math.min(Re, be, he), Le = `${v.current?.getBoundingClientRect().width || be}px`;
29674
29677
  Object.assign($.elements.floating.style, { width: Le, maxWidth: Le, height: Fe });
29675
29678
  }
29676
29679
  })