@axtec/components 0.1.4 → 0.1.6
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/README.md +6 -0
- package/dist/components/OptionDivider/OptionDivider.d.ts +5 -0
- package/dist/components/OptionDivider/index.d.ts +1 -0
- package/dist/components/SelectionCard/SelectionCard.d.ts +12 -0
- package/dist/components/SelectionCard/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +106 -102
- package/dist/index.js.map +1 -1
- package/dist/index12.js +1 -1
- package/dist/index3.js +2 -2
- package/dist/index43.js +12 -14
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +11 -87
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +91 -69
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +68 -121
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +118 -36
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +40 -44
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +44 -56
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +56 -16
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +16 -65
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +62 -51
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +54 -37
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +37 -66
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +63 -19
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +19 -101
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +99 -213
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +58 -62
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +206 -224
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +62 -96
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +233 -33
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +98 -14
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +35 -59
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +16 -59
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +57 -72
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +58 -106
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +70 -43
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +101 -40
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +44 -72
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +47 -53
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +70 -62
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +46 -28
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +67 -13
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +35 -2263
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +17 -0
- package/dist/index75.js.map +1 -0
- package/dist/index76.js +2267 -0
- package/dist/index76.js.map +1 -0
- package/package.json +1 -1
package/dist/index73.js
CHANGED
|
@@ -1,17 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as s, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n } from "react";
|
|
3
|
+
import { cn as i } from "./index3.js";
|
|
4
|
+
const x = {
|
|
5
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
6
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
7
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
8
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
9
|
+
}, h = {
|
|
10
|
+
top: "top-full left-1/2 -translate-x-1/2 border-t-slate-800 border-x-transparent border-b-transparent",
|
|
11
|
+
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-slate-800 border-x-transparent border-t-transparent",
|
|
12
|
+
left: "left-full top-1/2 -translate-y-1/2 border-l-slate-800 border-y-transparent border-r-transparent",
|
|
13
|
+
right: "right-full top-1/2 -translate-y-1/2 border-r-slate-800 border-y-transparent border-l-transparent"
|
|
14
|
+
};
|
|
15
|
+
function T({
|
|
16
|
+
content: p,
|
|
17
|
+
children: u,
|
|
18
|
+
position: t = "top",
|
|
19
|
+
delay: b = 200,
|
|
20
|
+
className: d
|
|
21
|
+
}) {
|
|
22
|
+
const [f, e] = n(!1), [r, o] = n(null), l = () => {
|
|
23
|
+
const m = setTimeout(() => e(!0), b);
|
|
24
|
+
o(m);
|
|
25
|
+
}, a = () => {
|
|
26
|
+
r && (clearTimeout(r), o(null)), e(!1);
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ s(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: "relative inline-flex",
|
|
32
|
+
onMouseEnter: l,
|
|
33
|
+
onMouseLeave: a,
|
|
34
|
+
onFocus: l,
|
|
35
|
+
onBlur: a,
|
|
36
|
+
children: [
|
|
37
|
+
u,
|
|
38
|
+
f && /* @__PURE__ */ s(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: i(
|
|
42
|
+
"absolute z-50 px-3 py-1.5",
|
|
43
|
+
"bg-slate-800 text-white text-sm rounded-lg",
|
|
44
|
+
"whitespace-nowrap",
|
|
45
|
+
"animate-in fade-in-0 zoom-in-95 duration-150",
|
|
46
|
+
x[t],
|
|
47
|
+
d
|
|
48
|
+
),
|
|
49
|
+
role: "tooltip",
|
|
50
|
+
children: [
|
|
51
|
+
p,
|
|
52
|
+
/* @__PURE__ */ c(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
className: i(
|
|
56
|
+
"absolute w-0 h-0 border-4",
|
|
57
|
+
h[t]
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
13
67
|
}
|
|
14
68
|
export {
|
|
15
|
-
|
|
69
|
+
T as Tooltip
|
|
16
70
|
};
|
|
17
71
|
//# sourceMappingURL=index73.js.map
|
package/dist/index73.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index73.js","sources":["../
|
|
1
|
+
{"version":3,"file":"index73.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { useState, type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface TooltipProps {\n content: ReactNode\n children: ReactNode\n position?: 'top' | 'bottom' | 'left' | 'right'\n delay?: number\n className?: string\n}\n\nconst positionStyles = {\n top: 'bottom-full left-1/2 -translate-x-1/2 mb-2',\n bottom: 'top-full left-1/2 -translate-x-1/2 mt-2',\n left: 'right-full top-1/2 -translate-y-1/2 mr-2',\n right: 'left-full top-1/2 -translate-y-1/2 ml-2',\n}\n\nconst arrowStyles = {\n top: 'top-full left-1/2 -translate-x-1/2 border-t-slate-800 border-x-transparent border-b-transparent',\n bottom: 'bottom-full left-1/2 -translate-x-1/2 border-b-slate-800 border-x-transparent border-t-transparent',\n left: 'left-full top-1/2 -translate-y-1/2 border-l-slate-800 border-y-transparent border-r-transparent',\n right: 'right-full top-1/2 -translate-y-1/2 border-r-slate-800 border-y-transparent border-l-transparent',\n}\n\nexport function Tooltip({\n content,\n children,\n position = 'top',\n delay = 200,\n className,\n}: TooltipProps) {\n const [isVisible, setIsVisible] = useState(false)\n const [timeoutId, setTimeoutId] = useState<ReturnType<typeof setTimeout> | null>(null)\n\n const showTooltip = () => {\n const id = setTimeout(() => setIsVisible(true), delay)\n setTimeoutId(id)\n }\n\n const hideTooltip = () => {\n if (timeoutId) {\n clearTimeout(timeoutId)\n setTimeoutId(null)\n }\n setIsVisible(false)\n }\n\n return (\n <div\n className=\"relative inline-flex\"\n onMouseEnter={showTooltip}\n onMouseLeave={hideTooltip}\n onFocus={showTooltip}\n onBlur={hideTooltip}\n >\n {children}\n {isVisible && (\n <div\n className={cn(\n 'absolute z-50 px-3 py-1.5',\n 'bg-slate-800 text-white text-sm rounded-lg',\n 'whitespace-nowrap',\n 'animate-in fade-in-0 zoom-in-95 duration-150',\n positionStyles[position],\n className\n )}\n role=\"tooltip\"\n >\n {content}\n <span\n className={cn(\n 'absolute w-0 h-0 border-4',\n arrowStyles[position]\n )}\n />\n </div>\n )}\n </div>\n )\n}\n"],"names":["positionStyles","arrowStyles","Tooltip","content","children","position","delay","className","isVisible","setIsVisible","useState","timeoutId","setTimeoutId","showTooltip","id","hideTooltip","jsxs","cn","jsx"],"mappings":";;;AAWA,MAAMA,IAAiB;AAAA,EACrB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT,GAEMC,IAAc;AAAA,EAClB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;AAEO,SAASC,EAAQ;AAAA,EACtB,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,WAAAC;AACF,GAAiB;AACf,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAWC,CAAY,IAAIF,EAA+C,IAAI,GAE/EG,IAAc,MAAM;AACxB,UAAMC,IAAK,WAAW,MAAML,EAAa,EAAI,GAAGH,CAAK;AACrD,IAAAM,EAAaE,CAAE;AAAA,EACjB,GAEMC,IAAc,MAAM;AACxB,IAAIJ,MACF,aAAaA,CAAS,GACtBC,EAAa,IAAI,IAEnBH,EAAa,EAAK;AAAA,EACpB;AAEA,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAcH;AAAA,MACd,cAAcE;AAAA,MACd,SAASF;AAAA,MACT,QAAQE;AAAA,MAEP,UAAA;AAAA,QAAAX;AAAA,QACAI,KACC,gBAAAQ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACAjB,EAAeK,CAAQ;AAAA,cACvBE;AAAA,YAAA;AAAA,YAEF,MAAK;AAAA,YAEJ,UAAA;AAAA,cAAAJ;AAAA,cACD,gBAAAe;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWD;AAAA,oBACT;AAAA,oBACAhB,EAAYI,CAAQ;AAAA,kBAAA;AAAA,gBACtB;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|