@0xchain/tooltip 1.1.0-beta.1 → 1.1.0-beta.3

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  'use client';
2
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
- import { TooltipProvider as g, Tooltip as h, TooltipTrigger as T, TooltipPortal as x, TooltipContent as k, TooltipArrow as C } from "@radix-ui/react-tooltip";
4
- import { useState as b, useEffect as w } from "react";
5
- import { twMerge as t } from "tailwind-merge";
6
- function v({ children: n, trigger: s, side: c = "top", contentClassName: a, triggerClassName: p, delayDuration: d = 300, needClick: f = !0, arrowClassName: m, onChange: i }) {
7
- const [o, l] = b(!1), u = () => {
8
- f && l(!o);
2
+ import { jsx as o, jsxs as r } from "react/jsx-runtime";
3
+ import { TooltipProvider as h, Tooltip as T, TooltipTrigger as g, TooltipPortal as x, TooltipContent as C, TooltipArrow as k } from "@radix-ui/react-tooltip";
4
+ import { useState as w, useEffect as N } from "react";
5
+ import { twMerge as e } from "tailwind-merge";
6
+ function v({ children: n, trigger: s, side: p = "top", contentClassName: a, triggerClassName: c, delayDuration: d = 300, needClick: f = !0, arrowClassName: m, onChange: i }) {
7
+ const [t, l] = w(!1), u = () => {
8
+ f && l(!t);
9
9
  };
10
- return w(() => {
11
- i && i(o);
12
- }, [o]), /* @__PURE__ */ e(g, { delayDuration: d, children: /* @__PURE__ */ r(h, { open: o, onOpenChange: l, children: [
13
- /* @__PURE__ */ e(T, { asChild: !0, children: /* @__PURE__ */ e("span", { className: t("inline-block", p), onClick: u, children: s }) }),
14
- /* @__PURE__ */ e(x, { children: /* @__PURE__ */ r(k, { side: c, align: "center", sideOffset: 10, className: t("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: [
10
+ return N(() => {
11
+ i && i(t);
12
+ }, [t]), /* @__PURE__ */ o(h, { delayDuration: d, children: /* @__PURE__ */ r(T, { open: t, onOpenChange: l, children: [
13
+ /* @__PURE__ */ o(g, { asChild: !0, children: /* @__PURE__ */ o("span", { className: e("inline-block", c), onClick: u, children: s }) }),
14
+ /* @__PURE__ */ o(x, { children: /* @__PURE__ */ r(C, { side: p, align: "center", sideOffset: 10, className: e("bg-tooltip text-tooltip-foreground rounded-lg w-[200px] p-2 z-[1000] text-xs fade-in-5 transition-all duration-3000 [&_[role='tooltip']]:select-none", a), children: [
15
15
  n,
16
- /* @__PURE__ */ e(C, { className: t("fill-icg-black", m) })
16
+ /* @__PURE__ */ o(k, { className: e("fill-tooltip", m) })
17
17
  ] }) })
18
18
  ] }) });
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xchain/tooltip",
3
- "version": "1.1.0-beta.1",
3
+ "version": "1.1.0-beta.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",