@ichaingo/tooltip 1.4.39 → 1.4.41
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.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ type TooltipProps = {
|
|
|
6
6
|
triggerClassName?: string;
|
|
7
7
|
delayDuration?: number;
|
|
8
8
|
needClick?: boolean;
|
|
9
|
+
arrowClassName?: string;
|
|
9
10
|
};
|
|
10
|
-
export default function CustomTooltip({ children, trigger, side, contentClassName, triggerClassName, delayDuration, needClick }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default function CustomTooltip({ children, trigger, side, contentClassName, triggerClassName, delayDuration, needClick, arrowClassName }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAIA,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAA;AACD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAmB,EAAE,SAAgB,EAAE,cAAc,EAAE,EAAE,YAAY,2CAwBjL"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import { TooltipProvider as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { twMerge as
|
|
6
|
-
function
|
|
7
|
-
const [
|
|
8
|
-
d &&
|
|
2
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { TooltipProvider as g, Tooltip as h, TooltipTrigger as u, TooltipPortal as T, TooltipContent as x, TooltipArrow as C } from "@radix-ui/react-tooltip";
|
|
4
|
+
import { useState as k } from "react";
|
|
5
|
+
import { twMerge as e } from "tailwind-merge";
|
|
6
|
+
function j({ children: n, trigger: r, side: s = "top", contentClassName: a, triggerClassName: c, delayDuration: p = 300, needClick: d = !0, arrowClassName: f }) {
|
|
7
|
+
const [t, i] = k(!1), m = () => {
|
|
8
|
+
d && i(!t);
|
|
9
9
|
};
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
11
|
-
/* @__PURE__ */ o(
|
|
12
|
-
/* @__PURE__ */ o(
|
|
10
|
+
return /* @__PURE__ */ o(g, { delayDuration: p, children: /* @__PURE__ */ l(h, { open: t, onOpenChange: i, children: [
|
|
11
|
+
/* @__PURE__ */ o(u, { asChild: !0, children: /* @__PURE__ */ o("span", { className: e("inline-block", c), onClick: m, children: r }) }),
|
|
12
|
+
/* @__PURE__ */ o(T, { children: /* @__PURE__ */ l(x, { side: s, align: "center", sideOffset: 10, className: e("bg-icg-black text-icg-white rounded-lg w-[200px] p-2 z-[1000] text-xs fade-in-5 transition-all duration-3000 [&_[role='tooltip']]:select-none", a), children: [
|
|
13
13
|
n,
|
|
14
|
-
/* @__PURE__ */ o(
|
|
14
|
+
/* @__PURE__ */ o(C, { className: e("fill-icg-black", f) })
|
|
15
15
|
] }) })
|
|
16
16
|
] }) });
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
j as default
|
|
20
20
|
};
|