UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

57 lines (56 loc) 1.67 kB
"use client"; import { jsx as o, jsxs as a } from "react/jsx-runtime"; import { Root as n, Trigger as d, Portal as l, Content as s, Arrow as m, Provider as p } from "../../node_modules/@radix-ui/react-tooltip/dist/index.js"; import { cn as c } from "../../lib/utils.js"; function f({ delayDuration: t = 0, ...r }) { return /* @__PURE__ */ o( p, { "data-slot": "tooltip-provider", delayDuration: t, ...r } ); } function y({ ...t }) { return /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(n, { "data-slot": "tooltip", ...t }) }); } function T({ ...t }) { return /* @__PURE__ */ o(d, { "data-slot": "tooltip-trigger", ...t }); } function b({ className: t, sideOffset: r = 0, children: i, ...e }) { return /* @__PURE__ */ o(l, { children: /* @__PURE__ */ a( s, { "data-slot": "tooltip-content", sideOffset: r, className: c( "bg-d-primary text-d-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", t ), ...e, children: [ i, /* @__PURE__ */ o(m, { className: "bg-d-primary fill-d-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) ] } ) }); } export { y as Tooltip, b as TooltipContent, f as TooltipProvider, T as TooltipTrigger };