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.
- package/dist/chunks/{tooltip-DgenLCkC.js → tooltip-3bRhDmbE.js} +40 -10
- package/dist/chunks/{tooltip-DgenLCkC.js.map → tooltip-3bRhDmbE.js.map} +1 -1
- package/dist/chunks/{tooltip-nCIpADfj.js → tooltip-CPJWT4m9.js} +40 -10
- package/dist/chunks/{tooltip-nCIpADfj.js.map → tooltip-CPJWT4m9.js.map} +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.es.js +1 -1
- package/dist/tooltip/index.cjs.js +1 -1
- package/dist/tooltip/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { i as isShadowRoot, d as isHTMLElement, e as isElement, g as getWindow,
|
|
|
5
5
|
import * as ReactDOM from "react-dom";
|
|
6
6
|
import { u as useFloating$1, o as offset, f as flip, s as shift, a as arrow } from "./floating-ui.react-dom-BUZLdP4-.js";
|
|
7
7
|
import { twMerge } from "tailwind-merge";
|
|
8
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
8
9
|
import clsx from "clsx";
|
|
9
10
|
var candidateSelectors = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"];
|
|
10
11
|
var candidateSelector = /* @__PURE__ */ candidateSelectors.join(",");
|
|
@@ -1896,26 +1897,55 @@ const Tooltip = ({ children, content, className, placement = "top", showArrow =
|
|
|
1896
1897
|
const role = useRole(context);
|
|
1897
1898
|
const { getReferenceProps, getFloatingProps } = useInteractions([hover, focus, dismiss, role]);
|
|
1898
1899
|
const mergedClass = twMerge(
|
|
1899
|
-
clsx(
|
|
1900
|
+
clsx(
|
|
1901
|
+
"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",
|
|
1902
|
+
className
|
|
1903
|
+
)
|
|
1900
1904
|
);
|
|
1901
1905
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1902
1906
|
/* @__PURE__ */ jsx("div", { ref: refs.setReference, ...getReferenceProps(), children }),
|
|
1903
|
-
isOpen && /* @__PURE__ */ jsx(FloatingPortal, { children: /* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: isOpen && /* @__PURE__ */ jsx(FloatingPortal, { children: /* @__PURE__ */ jsx(
|
|
1904
1908
|
"div",
|
|
1905
1909
|
{
|
|
1906
1910
|
ref: refs.setFloating,
|
|
1907
|
-
style:
|
|
1911
|
+
style: {
|
|
1912
|
+
...floatingStyles,
|
|
1913
|
+
zIndex: 99
|
|
1914
|
+
// Asegura que el tooltip esté por encima de otros elementos
|
|
1915
|
+
},
|
|
1908
1916
|
...getFloatingProps(),
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1917
|
+
children: (() => {
|
|
1918
|
+
const delta = 8;
|
|
1919
|
+
const isVertical = placement === "top" || placement === "bottom";
|
|
1920
|
+
const initialOffset = isVertical ? { y: placement === "top" ? delta : -delta } : { x: placement === "left" ? delta : -delta };
|
|
1921
|
+
const originStyle = placement === "top" ? { transformOrigin: "bottom center" } : placement === "bottom" ? { transformOrigin: "top center" } : placement === "left" ? { transformOrigin: "center right" } : { transformOrigin: "center left" };
|
|
1922
|
+
return /* @__PURE__ */ jsxs(
|
|
1923
|
+
motion.div,
|
|
1924
|
+
{
|
|
1925
|
+
initial: { opacity: 0, scale: 0.96, ...initialOffset },
|
|
1926
|
+
animate: { opacity: 1, scale: 1, x: 0, y: 0 },
|
|
1927
|
+
exit: { opacity: 0, scale: 0.98, ...initialOffset },
|
|
1928
|
+
transition: {
|
|
1929
|
+
// Entrada elástica y salida rápida
|
|
1930
|
+
type: "spring",
|
|
1931
|
+
stiffness: 550,
|
|
1932
|
+
damping: 28,
|
|
1933
|
+
mass: 0.6
|
|
1934
|
+
},
|
|
1935
|
+
style: originStyle,
|
|
1936
|
+
className: mergedClass,
|
|
1937
|
+
children: [
|
|
1938
|
+
content,
|
|
1939
|
+
showArrow && /* @__PURE__ */ jsx(FloatingArrow, { ref: arrowRef, context, className: "text-content1", fill: "currentColor" })
|
|
1940
|
+
]
|
|
1941
|
+
}
|
|
1942
|
+
);
|
|
1943
|
+
})()
|
|
1914
1944
|
}
|
|
1915
|
-
) })
|
|
1945
|
+
) }) })
|
|
1916
1946
|
] });
|
|
1917
1947
|
};
|
|
1918
1948
|
export {
|
|
1919
1949
|
Tooltip as T
|
|
1920
1950
|
};
|
|
1921
|
-
//# sourceMappingURL=tooltip-
|
|
1951
|
+
//# sourceMappingURL=tooltip-3bRhDmbE.js.map
|