lizaui 9.0.16 → 9.0.17
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-DC9HhJqz.js} +35 -9
- package/dist/chunks/{tooltip-nCIpADfj.js.map → tooltip-DC9HhJqz.js.map} +1 -1
- package/dist/chunks/{tooltip-nCIpADfj.js → tooltip-e0piaL-j.js} +35 -9
- package/dist/chunks/{tooltip-DgenLCkC.js.map → tooltip-e0piaL-j.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,51 @@ 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
1911
|
style: floatingStyles,
|
|
1908
1912
|
...getFloatingProps(),
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1913
|
+
children: (() => {
|
|
1914
|
+
const delta = 8;
|
|
1915
|
+
const isVertical = placement === "top" || placement === "bottom";
|
|
1916
|
+
const initialOffset = isVertical ? { y: placement === "top" ? delta : -delta } : { x: placement === "left" ? delta : -delta };
|
|
1917
|
+
const originStyle = placement === "top" ? { transformOrigin: "bottom center" } : placement === "bottom" ? { transformOrigin: "top center" } : placement === "left" ? { transformOrigin: "center right" } : { transformOrigin: "center left" };
|
|
1918
|
+
return /* @__PURE__ */ jsxs(
|
|
1919
|
+
motion.div,
|
|
1920
|
+
{
|
|
1921
|
+
initial: { opacity: 0, scale: 0.96, ...initialOffset },
|
|
1922
|
+
animate: { opacity: 1, scale: 1, x: 0, y: 0 },
|
|
1923
|
+
exit: { opacity: 0, scale: 0.98, ...initialOffset },
|
|
1924
|
+
transition: {
|
|
1925
|
+
// Entrada elástica y salida rápida
|
|
1926
|
+
type: "spring",
|
|
1927
|
+
stiffness: 550,
|
|
1928
|
+
damping: 28,
|
|
1929
|
+
mass: 0.6
|
|
1930
|
+
},
|
|
1931
|
+
style: originStyle,
|
|
1932
|
+
className: mergedClass,
|
|
1933
|
+
children: [
|
|
1934
|
+
content,
|
|
1935
|
+
showArrow && /* @__PURE__ */ jsx(FloatingArrow, { ref: arrowRef, context, className: "text-content1", fill: "currentColor" })
|
|
1936
|
+
]
|
|
1937
|
+
}
|
|
1938
|
+
);
|
|
1939
|
+
})()
|
|
1914
1940
|
}
|
|
1915
|
-
) })
|
|
1941
|
+
) }) })
|
|
1916
1942
|
] });
|
|
1917
1943
|
};
|
|
1918
1944
|
export {
|
|
1919
1945
|
Tooltip as T
|
|
1920
1946
|
};
|
|
1921
|
-
//# sourceMappingURL=tooltip-
|
|
1947
|
+
//# sourceMappingURL=tooltip-DC9HhJqz.js.map
|