lizaui 9.0.16 → 9.0.18

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.
@@ -5,6 +5,7 @@ const floatingUi_dom = require("./floating-ui.dom-B9hvXzxg.js");
5
5
  const ReactDOM = require("react-dom");
6
6
  const floatingUi_reactDom = require("./floating-ui.react-dom-CI1b2uK3.js");
7
7
  const tailwindMerge = require("tailwind-merge");
8
+ const framerMotion = require("framer-motion");
8
9
  const clsx = require("clsx");
9
10
  function _interopNamespaceDefault(e) {
10
11
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -1914,24 +1915,53 @@ const Tooltip = ({ children, content, className, placement = "top", showArrow =
1914
1915
  const role = useRole(context);
1915
1916
  const { getReferenceProps, getFloatingProps } = useInteractions([hover, focus, dismiss, role]);
1916
1917
  const mergedClass = tailwindMerge.twMerge(
1917
- clsx("bg-content1 font-normal text-sm rounded-md filter-(--filter-drop-shadow-small) flex justify-center items-center z-99 px-2.5 py-1 outline-none box-border subpixel-antialiased normal-case", className)
1918
+ clsx(
1919
+ "bg-content1 font-normal text-sm rounded-md filter-(--filter-drop-shadow-small) flex justify-center items-center z-99 px-2.5 py-1 outline-none box-border subpixel-antialiased normal-case",
1920
+ className
1921
+ )
1918
1922
  );
1919
1923
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1920
1924
  /* @__PURE__ */ jsxRuntime.jsx("div", { ref: refs.setReference, ...getReferenceProps(), children }),
1921
- isOpen && /* @__PURE__ */ jsxRuntime.jsx(FloatingPortal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
1925
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(FloatingPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1922
1926
  "div",
1923
1927
  {
1924
1928
  ref: refs.setFloating,
1925
- style: floatingStyles,
1929
+ style: {
1930
+ ...floatingStyles,
1931
+ zIndex: 99
1932
+ // Asegura que el tooltip esté por encima de otros elementos
1933
+ },
1926
1934
  ...getFloatingProps(),
1927
- className: mergedClass,
1928
- children: [
1929
- content,
1930
- showArrow && /* @__PURE__ */ jsxRuntime.jsx(FloatingArrow, { ref: arrowRef, context, className: "text-content1", fill: "currentColor" })
1931
- ]
1935
+ children: (() => {
1936
+ const delta = 8;
1937
+ const isVertical = placement === "top" || placement === "bottom";
1938
+ const initialOffset = isVertical ? { y: placement === "top" ? delta : -delta } : { x: placement === "left" ? delta : -delta };
1939
+ const originStyle = placement === "top" ? { transformOrigin: "bottom center" } : placement === "bottom" ? { transformOrigin: "top center" } : placement === "left" ? { transformOrigin: "center right" } : { transformOrigin: "center left" };
1940
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1941
+ framerMotion.motion.div,
1942
+ {
1943
+ initial: { opacity: 0, scale: 0.96, ...initialOffset },
1944
+ animate: { opacity: 1, scale: 1, x: 0, y: 0 },
1945
+ exit: { opacity: 0, scale: 0.98, ...initialOffset },
1946
+ transition: {
1947
+ // Entrada elástica y salida rápida
1948
+ type: "spring",
1949
+ stiffness: 550,
1950
+ damping: 28,
1951
+ mass: 0.6
1952
+ },
1953
+ style: originStyle,
1954
+ className: mergedClass,
1955
+ children: [
1956
+ content,
1957
+ showArrow && /* @__PURE__ */ jsxRuntime.jsx(FloatingArrow, { ref: arrowRef, context, className: "text-content1", fill: "currentColor" })
1958
+ ]
1959
+ }
1960
+ );
1961
+ })()
1932
1962
  }
1933
- ) })
1963
+ ) }) })
1934
1964
  ] });
1935
1965
  };
1936
1966
  exports.Tooltip = Tooltip;
1937
- //# sourceMappingURL=tooltip-nCIpADfj.js.map
1967
+ //# sourceMappingURL=tooltip-CPJWT4m9.js.map