@vuer-ai/vuer-uikit 0.0.19 → 0.0.21
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/chunk-2JCULHBM.js +58 -0
- package/dist/chunk-2TRYGIGT.mjs +76 -0
- package/dist/chunk-2YCL2ET2.js +431 -0
- package/dist/chunk-3FR3WKI4.mjs +24 -0
- package/dist/chunk-44KW6PTD.mjs +111 -0
- package/dist/chunk-5OUTEHVX.js +48 -0
- package/dist/chunk-5SR53QBZ.js +143 -0
- package/dist/chunk-5TVG5JK5.js +93 -0
- package/dist/chunk-5ZZC23M7.mjs +60 -0
- package/dist/chunk-6N5422RT.js +110 -0
- package/dist/chunk-AOUGWGQR.js +609 -0
- package/dist/chunk-B2E7AY66.mjs +86 -0
- package/dist/chunk-BOPZFNFS.mjs +54 -0
- package/dist/chunk-CLTLT5XW.js +27 -0
- package/dist/chunk-DDOX4EEM.mjs +46 -0
- package/dist/chunk-DZ4J7I7I.mjs +114 -0
- package/dist/chunk-E33MW663.js +179 -0
- package/dist/chunk-EAZQH4IX.mjs +27 -0
- package/dist/chunk-EFIRD3FN.js +69 -0
- package/dist/chunk-EOFYA6CS.js +53 -0
- package/dist/chunk-EUY74AXP.mjs +341 -0
- package/dist/chunk-EYIFKSU2.mjs +259 -0
- package/dist/chunk-F56ZKT7B.mjs +1 -0
- package/dist/chunk-F776EMXP.mjs +82 -0
- package/dist/chunk-FORVP7XH.js +164 -0
- package/dist/chunk-FP26SRGL.js +377 -0
- package/dist/chunk-FRT225GK.mjs +34 -0
- package/dist/chunk-G5KMD72J.mjs +162 -0
- package/dist/chunk-G6PRZVSE.mjs +71 -0
- package/dist/chunk-H5P4IX7R.js +67 -0
- package/dist/chunk-HLJ7PQA7.mjs +15 -0
- package/dist/chunk-IGBWUFZL.js +79 -0
- package/dist/chunk-IXHMIR5P.js +131 -0
- package/dist/chunk-JAMJUXBY.mjs +45 -0
- package/dist/chunk-JMPVDU2C.mjs +110 -0
- package/dist/chunk-KJ42IGH6.js +2 -0
- package/dist/chunk-KTNZSZ5Y.mjs +23 -0
- package/dist/chunk-LEPXSM36.mjs +46 -0
- package/dist/chunk-LLXRJYQB.mjs +31 -0
- package/dist/chunk-M4IVLZIH.mjs +1 -0
- package/dist/chunk-MRVMXKZO.mjs +106 -0
- package/dist/chunk-MZ4POL3U.js +301 -0
- package/dist/chunk-N7CINZS2.js +2 -0
- package/dist/chunk-NODFVSVC.mjs +39 -0
- package/dist/chunk-OOI3SJDU.mjs +206 -0
- package/dist/chunk-OQ237S4Z.js +94 -0
- package/dist/chunk-OTPUWWEB.js +98 -0
- package/dist/chunk-PIR7EZC6.js +187 -0
- package/dist/chunk-PVRQNCSJ.js +49 -0
- package/dist/chunk-Q5KEB4UK.mjs +51 -0
- package/dist/chunk-QEY7BWIR.js +208 -0
- package/dist/chunk-QJR6MCTR.js +32 -0
- package/dist/chunk-QVUX6LLD.mjs +270 -0
- package/dist/chunk-QYRRQ65X.mjs +115 -0
- package/dist/chunk-SKO72K64.js +118 -0
- package/dist/chunk-T3VSSE2L.mjs +165 -0
- package/dist/chunk-TMBKCIVQ.mjs +148 -0
- package/dist/chunk-U2ZLDPOE.js +261 -0
- package/dist/chunk-U7SNLMJR.js +110 -0
- package/dist/chunk-UFHMEEGL.js +113 -0
- package/dist/chunk-UKFVRXAR.mjs +409 -0
- package/dist/chunk-UPTTGNMB.js +41 -0
- package/dist/chunk-V4KNORQN.js +21 -0
- package/dist/chunk-VAXIFFOT.js +83 -0
- package/dist/chunk-VGCVIHBR.mjs +1 -0
- package/dist/chunk-VXHM7V6F.mjs +92 -0
- package/dist/chunk-WDUTW7HS.mjs +87 -0
- package/dist/chunk-WJ7T7FAH.js +135 -0
- package/dist/chunk-WO3WHXDP.mjs +66 -0
- package/dist/chunk-X55EAYE2.js +94 -0
- package/dist/chunk-XMG3IVGZ.mjs +95 -0
- package/dist/chunk-XWS4SIB5.js +2 -0
- package/dist/chunk-XXWQ4RVP.js +25 -0
- package/dist/chunk-Y5I2GI4V.js +33 -0
- package/dist/chunk-YXDJPCAF.js +99 -0
- package/dist/chunk-ZVG2UKKC.mjs +603 -0
- package/dist/highlight-cursor/cursor-context.d.mts +7 -0
- package/dist/highlight-cursor/cursor-context.d.ts +7 -0
- package/dist/highlight-cursor/cursor-context.js +14 -0
- package/dist/highlight-cursor/cursor-context.mjs +1 -0
- package/dist/highlight-cursor/cursor-provider.d.mts +7 -0
- package/dist/highlight-cursor/cursor-provider.d.ts +7 -0
- package/dist/highlight-cursor/cursor-provider.js +12 -0
- package/dist/highlight-cursor/cursor-provider.mjs +3 -0
- package/dist/highlight-cursor/enhanced-components.d.mts +20 -0
- package/dist/highlight-cursor/enhanced-components.d.ts +20 -0
- package/dist/highlight-cursor/enhanced-components.js +37 -0
- package/dist/highlight-cursor/enhanced-components.mjs +12 -0
- package/dist/highlight-cursor/index.d.mts +16 -0
- package/dist/highlight-cursor/index.d.ts +16 -0
- package/dist/highlight-cursor/index.js +51 -0
- package/dist/highlight-cursor/index.mjs +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.mts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.ts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.js +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.mjs +1 -0
- package/dist/highlight-cursor/types.d.mts +39 -0
- package/dist/highlight-cursor/types.d.ts +39 -0
- package/dist/highlight-cursor/types.js +2 -0
- package/dist/highlight-cursor/types.mjs +1 -0
- package/dist/highlight-cursor/with-cursor.d.mts +7 -0
- package/dist/highlight-cursor/with-cursor.d.ts +7 -0
- package/dist/highlight-cursor/with-cursor.js +11 -0
- package/dist/highlight-cursor/with-cursor.mjs +2 -0
- package/dist/index.css +318 -0
- package/dist/index.d.mts +55 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +131 -131
- package/dist/index.mjs +38 -0
- package/dist/styles/theme.css +192 -0
- package/dist/styles/theme.d.mts +2 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/styles/toast.css +61 -0
- package/dist/styles/toast.d.mts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/styles/variables.css +188 -0
- package/dist/styles/variables.d.mts +2 -0
- package/dist/styles/variables.d.ts +2 -0
- package/dist/ui/avatar.d.mts +16 -0
- package/dist/ui/avatar.d.ts +16 -0
- package/dist/ui/avatar.js +25 -0
- package/dist/ui/avatar.mjs +4 -0
- package/dist/ui/badge.d.mts +14 -0
- package/dist/ui/badge.d.ts +14 -0
- package/dist/ui/badge.js +17 -0
- package/dist/ui/badge.mjs +4 -0
- package/dist/ui/button.d.mts +16 -0
- package/dist/ui/button.d.ts +16 -0
- package/dist/ui/button.js +13 -0
- package/dist/ui/button.mjs +4 -0
- package/dist/ui/card.d.mts +12 -0
- package/dist/ui/card.d.ts +12 -0
- package/dist/ui/card.js +37 -0
- package/dist/ui/card.mjs +4 -0
- package/dist/ui/checkbox.d.mts +11 -0
- package/dist/ui/checkbox.d.ts +11 -0
- package/dist/ui/checkbox.js +13 -0
- package/dist/ui/checkbox.mjs +4 -0
- package/dist/ui/collapsible.d.mts +9 -0
- package/dist/ui/collapsible.d.ts +9 -0
- package/dist/ui/collapsible.js +21 -0
- package/dist/ui/collapsible.mjs +4 -0
- package/dist/ui/dropdown.d.mts +28 -0
- package/dist/ui/dropdown.d.ts +28 -0
- package/dist/ui/dropdown.js +69 -0
- package/dist/ui/dropdown.mjs +4 -0
- package/dist/ui/index.d.mts +47 -0
- package/dist/ui/index.d.ts +47 -0
- package/dist/ui/index.js +414 -0
- package/dist/ui/index.mjs +33 -0
- package/dist/ui/input-numbers.d.mts +15 -0
- package/dist/ui/input-numbers.d.ts +15 -0
- package/dist/ui/input-numbers.js +14 -0
- package/dist/ui/input-numbers.mjs +5 -0
- package/dist/ui/input.d.mts +22 -0
- package/dist/ui/input.d.ts +22 -0
- package/dist/ui/input.js +17 -0
- package/dist/ui/input.mjs +4 -0
- package/dist/ui/layout.d.mts +12 -0
- package/dist/ui/layout.d.ts +12 -0
- package/dist/ui/layout.js +13 -0
- package/dist/ui/layout.mjs +4 -0
- package/dist/ui/modal.d.mts +28 -0
- package/dist/ui/modal.d.ts +28 -0
- package/dist/ui/modal.js +49 -0
- package/dist/ui/modal.mjs +4 -0
- package/dist/ui/popover.d.mts +10 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +25 -0
- package/dist/ui/popover.mjs +4 -0
- package/dist/ui/radio-group.d.mts +8 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/radio-group.js +17 -0
- package/dist/ui/radio-group.mjs +4 -0
- package/dist/ui/select.d.mts +28 -0
- package/dist/ui/select.d.ts +28 -0
- package/dist/ui/select.js +49 -0
- package/dist/ui/select.mjs +4 -0
- package/dist/ui/sheet.d.mts +16 -0
- package/dist/ui/sheet.d.ts +16 -0
- package/dist/ui/sheet.js +39 -0
- package/dist/ui/sheet.mjs +2 -0
- package/dist/ui/slider.d.mts +10 -0
- package/dist/ui/slider.d.ts +10 -0
- package/dist/ui/slider.js +13 -0
- package/dist/ui/slider.mjs +4 -0
- package/dist/ui/switch.d.mts +7 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/switch.js +13 -0
- package/dist/ui/switch.mjs +4 -0
- package/dist/ui/tabs.d.mts +16 -0
- package/dist/ui/tabs.d.ts +16 -0
- package/dist/ui/tabs.js +26 -0
- package/dist/ui/tabs.mjs +5 -0
- package/dist/ui/textarea.d.mts +16 -0
- package/dist/ui/textarea.d.ts +16 -0
- package/dist/ui/textarea.js +13 -0
- package/dist/ui/textarea.mjs +4 -0
- package/dist/ui/theme-context.d.mts +17 -0
- package/dist/ui/theme-context.d.ts +17 -0
- package/dist/ui/theme-context.js +17 -0
- package/dist/ui/theme-context.mjs +4 -0
- package/dist/ui/timeline.d.mts +23 -0
- package/dist/ui/timeline.d.ts +23 -0
- package/dist/ui/timeline.js +15 -0
- package/dist/ui/timeline.mjs +6 -0
- package/dist/ui/toast.d.mts +7 -0
- package/dist/ui/toast.d.ts +7 -0
- package/dist/ui/toast.js +14 -0
- package/dist/ui/toast.mjs +1 -0
- package/dist/ui/toggle-group.d.mts +12 -0
- package/dist/ui/toggle-group.d.ts +12 -0
- package/dist/ui/toggle-group.js +18 -0
- package/dist/ui/toggle-group.mjs +5 -0
- package/dist/ui/toggle.d.mts +13 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.js +17 -0
- package/dist/ui/toggle.mjs +4 -0
- package/dist/ui/tooltip.d.mts +10 -0
- package/dist/ui/tooltip.d.ts +10 -0
- package/dist/ui/tooltip.js +25 -0
- package/dist/ui/tooltip.mjs +4 -0
- package/dist/ui/tree-view-v2.d.mts +25 -0
- package/dist/ui/tree-view-v2.d.ts +25 -0
- package/dist/ui/tree-view-v2.js +14 -0
- package/dist/ui/tree-view-v2.mjs +5 -0
- package/dist/ui/tree-view.d.mts +28 -0
- package/dist/ui/tree-view.d.ts +28 -0
- package/dist/ui/tree-view.js +11 -0
- package/dist/ui/tree-view.mjs +2 -0
- package/dist/ui/version-badge.d.mts +26 -0
- package/dist/ui/version-badge.d.ts +26 -0
- package/dist/ui/version-badge.js +14 -0
- package/dist/ui/version-badge.mjs +5 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +10 -0
- package/dist/utils/cn.mjs +1 -0
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +16 -0
- package/dist/utils/index.mjs +3 -0
- package/dist/utils/use-local-storage.d.mts +3 -0
- package/dist/utils/use-local-storage.d.ts +3 -0
- package/dist/utils/use-local-storage.js +10 -0
- package/dist/utils/use-local-storage.mjs +1 -0
- package/package.json +3 -2
- package/src/ui/version-badge.tsx +5 -2
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { InputRoot, InputSlot } from './chunk-QYRRQ65X.mjs';
|
|
2
|
+
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
3
|
+
import { useGesture } from '@use-gesture/react';
|
|
4
|
+
import { forwardRef, useRef, useCallback } from 'react';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var getHoverElementAndIndex = (element, inputs) => {
|
|
8
|
+
if (!element) return null;
|
|
9
|
+
const container = element == null ? void 0 : element.closest("[data-input]");
|
|
10
|
+
const currentInput = container == null ? void 0 : container.querySelector("input");
|
|
11
|
+
if (!currentInput) return null;
|
|
12
|
+
return Array.from(inputs.values()).indexOf(currentInput);
|
|
13
|
+
};
|
|
14
|
+
var changeElementsHoverState = (inputs, range, changed) => {
|
|
15
|
+
const [first, last] = range;
|
|
16
|
+
Array.from(inputs.values()).forEach((input, i) => {
|
|
17
|
+
const container = input == null ? void 0 : input.closest("[data-input]");
|
|
18
|
+
if (first === null || last === null) {
|
|
19
|
+
container == null ? void 0 : container.setAttribute("data-hover", "none");
|
|
20
|
+
} else if (i >= Math.min(first, last) && i <= Math.max(first, last)) {
|
|
21
|
+
container == null ? void 0 : container.setAttribute("data-hover", changed !== "none" ? changed : "down");
|
|
22
|
+
} else {
|
|
23
|
+
container == null ? void 0 : container.setAttribute("data-hover", "none");
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var InputNumbers = forwardRef(function InputNumbers2({ size, value, onValuesChange, prefix, step = 0.1 }, ref) {
|
|
28
|
+
const inputs = useRef(/* @__PURE__ */ new Map());
|
|
29
|
+
const selectRange = useRef([null, null]);
|
|
30
|
+
const inputChange = useRef(false);
|
|
31
|
+
const stopClick = useCallback(() => {
|
|
32
|
+
if (typeof document === "undefined") return;
|
|
33
|
+
const stopClick2 = (e) => {
|
|
34
|
+
e.stopPropagation();
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
document.removeEventListener("click", stopClick2, true);
|
|
37
|
+
};
|
|
38
|
+
document.addEventListener("click", stopClick2, true);
|
|
39
|
+
}, []);
|
|
40
|
+
const bind = useGesture({
|
|
41
|
+
onDrag: ({ delta: [dx], event, initial, distance: [, oy], xy, memo = 0 }) => {
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
if (selectRange.current[0] === null) {
|
|
45
|
+
selectRange.current[0] = getHoverElementAndIndex(
|
|
46
|
+
typeof document !== "undefined" ? document.elementFromPoint(...initial) : null,
|
|
47
|
+
inputs.current
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
let newMX = memo + dx / 2;
|
|
51
|
+
if (Math.abs(newMX) >= (inputChange.current ? 1 : 5)) {
|
|
52
|
+
const multiplyStep = event.shiftKey ? 5 : event.altKey ? 1 / 5 : 1;
|
|
53
|
+
const newValue = value.map((v, i) => {
|
|
54
|
+
const [first, last] = selectRange.current;
|
|
55
|
+
if (first === null || last === null) {
|
|
56
|
+
return v;
|
|
57
|
+
} else if (i <= Math.max(first, last) && i >= Math.min(first, last)) {
|
|
58
|
+
return Number(((v || 0) + Math.floor(newMX) * step * multiplyStep).toPrecision(6));
|
|
59
|
+
} else {
|
|
60
|
+
return v;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
onValuesChange == null ? void 0 : onValuesChange(newValue);
|
|
64
|
+
newMX = 0;
|
|
65
|
+
inputChange.current = true;
|
|
66
|
+
changeElementsHoverState(inputs.current, selectRange.current, "x");
|
|
67
|
+
stopClick();
|
|
68
|
+
}
|
|
69
|
+
if (!inputChange.current) {
|
|
70
|
+
const currentElement = typeof document !== "undefined" ? document.elementFromPoint(...xy) : null;
|
|
71
|
+
const currentIndex = getHoverElementAndIndex(currentElement, inputs.current);
|
|
72
|
+
selectRange.current[1] = currentIndex ?? selectRange.current[1];
|
|
73
|
+
changeElementsHoverState(inputs.current, selectRange.current, oy !== 0 ? "y" : "none");
|
|
74
|
+
stopClick();
|
|
75
|
+
}
|
|
76
|
+
return newMX;
|
|
77
|
+
},
|
|
78
|
+
onDragEnd: () => {
|
|
79
|
+
selectRange.current = [null, null];
|
|
80
|
+
inputChange.current = false;
|
|
81
|
+
changeElementsHoverState(inputs.current, selectRange.current, "none");
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const valueChangeHandler = useCallback(
|
|
85
|
+
(index) => {
|
|
86
|
+
return (e) => {
|
|
87
|
+
const inputValue = e.target.value;
|
|
88
|
+
if (inputValue === "" || !isNaN(Number(inputValue))) {
|
|
89
|
+
const newValue = value.map((v, i) => {
|
|
90
|
+
if (inputValue === "") {
|
|
91
|
+
return "";
|
|
92
|
+
}
|
|
93
|
+
return i === index ? Number(inputValue) : v;
|
|
94
|
+
});
|
|
95
|
+
onValuesChange == null ? void 0 : onValuesChange(newValue);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
[onValuesChange, value]
|
|
100
|
+
);
|
|
101
|
+
if ((value == null ? void 0 : value.length) === 0) {
|
|
102
|
+
throw new Error("`value` cannot be an empty array");
|
|
103
|
+
}
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
ref,
|
|
108
|
+
...bind(),
|
|
109
|
+
className: cn("gap-xs flex cursor-crosshair touch-none flex-col select-none"),
|
|
110
|
+
children: value.map((item, index) => /* @__PURE__ */ jsx(
|
|
111
|
+
InputRoot,
|
|
112
|
+
{
|
|
113
|
+
ref: (r) => {
|
|
114
|
+
inputs.current.set(index.toString(), r);
|
|
115
|
+
return () => {
|
|
116
|
+
inputs.current.delete(index.toString());
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
size,
|
|
120
|
+
value: item,
|
|
121
|
+
onClick: () => {
|
|
122
|
+
var _a;
|
|
123
|
+
(_a = inputs.current.get(index.toString())) == null ? void 0 : _a.focus();
|
|
124
|
+
},
|
|
125
|
+
onChange: valueChangeHandler(index),
|
|
126
|
+
"data-hover": "none",
|
|
127
|
+
className: cn([
|
|
128
|
+
"group/number-input",
|
|
129
|
+
"cursor-crosshair",
|
|
130
|
+
"data-[hover=down]:bg-bg-tertiary",
|
|
131
|
+
"data-[hover=x]:bg-bg-tertiary",
|
|
132
|
+
"data-[hover=y]:bg-bg-tertiary",
|
|
133
|
+
"data-[hover=down]:cursor-move",
|
|
134
|
+
"data-[hover=x]:cursor-col-resize",
|
|
135
|
+
"data-[hover=y]:cursor-ns-resize"
|
|
136
|
+
]),
|
|
137
|
+
inputClassName: cn([
|
|
138
|
+
"cursor-crosshair",
|
|
139
|
+
"group-data-[hover=down]/number-input:cursor-move",
|
|
140
|
+
"group-data-[hover=x]/number-input:cursor-col-resize",
|
|
141
|
+
"group-data-[hover=y]/number-input:cursor-ns-resize"
|
|
142
|
+
]),
|
|
143
|
+
children: /* @__PURE__ */ jsx(
|
|
144
|
+
InputSlot,
|
|
145
|
+
{
|
|
146
|
+
className: cn(
|
|
147
|
+
"cursor-crosshair",
|
|
148
|
+
"group-data-[hover=down]/number-input:cursor-move",
|
|
149
|
+
"group-data-[hover=x]/number-input:cursor-col-resize",
|
|
150
|
+
"group-data-[hover=y]/number-input:cursor-ns-resize"
|
|
151
|
+
),
|
|
152
|
+
children: prefix == null ? void 0 : prefix[index]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
},
|
|
156
|
+
index
|
|
157
|
+
))
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export { InputNumbers };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
import { CheckIcon } from 'lucide-react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function Checkbox({ className, checkall, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
CheckboxPrimitive.Root,
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "checkbox",
|
|
11
|
+
className: cn(
|
|
12
|
+
"group",
|
|
13
|
+
"relative",
|
|
14
|
+
"w-[16px]",
|
|
15
|
+
"h-[16px]",
|
|
16
|
+
"rounded-[3px]",
|
|
17
|
+
"border-[1.5px]",
|
|
18
|
+
"border-solid",
|
|
19
|
+
"border-bg-tertiary",
|
|
20
|
+
"data-[state=checked]:bg-brand-primary",
|
|
21
|
+
"data-[state=checked]:border-none",
|
|
22
|
+
"disabled:cursor-not-allowed",
|
|
23
|
+
"disabled:bg-bg-secondary",
|
|
24
|
+
"disabled:data-[state=checked]:bg-bg-secondary",
|
|
25
|
+
"disabled:data-[state=checked]:border-[1.5px]",
|
|
26
|
+
"disabled:data-[state=checked]:border-solid",
|
|
27
|
+
"disabled:data-[state=checked]:border-bg-tertiary",
|
|
28
|
+
checkall && [
|
|
29
|
+
"data-[state=checked]:bg-bg-transparent",
|
|
30
|
+
"data-[state=checked]:border-[1.5px]",
|
|
31
|
+
"data-[state=checked]:border-solid",
|
|
32
|
+
"data-[state=checked]:border-bg-tertiary"
|
|
33
|
+
],
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: checkall ? /* @__PURE__ */ jsx(
|
|
38
|
+
CheckboxPrimitive.Indicator,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "checkbox-indicator",
|
|
41
|
+
className: cn(
|
|
42
|
+
"absolute",
|
|
43
|
+
"inset-0",
|
|
44
|
+
"m-auto",
|
|
45
|
+
"w-3/5",
|
|
46
|
+
"h-3/5",
|
|
47
|
+
"bg-brand-primary",
|
|
48
|
+
"group-disabled:bg-bg-tertiary"
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
) : /* @__PURE__ */ jsx(
|
|
52
|
+
CheckboxPrimitive.Indicator,
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "checkbox-indicator",
|
|
55
|
+
className: cn(
|
|
56
|
+
"flex",
|
|
57
|
+
"items-center",
|
|
58
|
+
"justify-center",
|
|
59
|
+
"text-current",
|
|
60
|
+
"transition-none",
|
|
61
|
+
"text-icon-withbg",
|
|
62
|
+
"group-disabled:text-bg-tertiary"
|
|
63
|
+
),
|
|
64
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { Checkbox };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXXWQ4RVP_js = require('./chunk-XXWQ4RVP.js');
|
|
4
|
+
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
26
|
+
|
|
27
|
+
function Switch({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
+
SwitchPrimitive__namespace.Root,
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "switch",
|
|
32
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
33
|
+
"group",
|
|
34
|
+
"w-[32px]",
|
|
35
|
+
"h-[16px]",
|
|
36
|
+
"rounded-[24px]",
|
|
37
|
+
"bg-bg-tertiary",
|
|
38
|
+
"data-[state=checked]:bg-brand-primary",
|
|
39
|
+
"disabled:bg-bg-secondary",
|
|
40
|
+
"disabled:cursor-not-allowed",
|
|
41
|
+
"disabled:data-[state=checked]:bg-bg-secondary",
|
|
42
|
+
"disabled:data-[state=unchecked]:bg-bg-secondary",
|
|
43
|
+
className
|
|
44
|
+
),
|
|
45
|
+
...props,
|
|
46
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
SwitchPrimitive__namespace.Thumb,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "switch-thumb",
|
|
50
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
51
|
+
"block",
|
|
52
|
+
"size-[12px]",
|
|
53
|
+
"rounded-full",
|
|
54
|
+
"bg-icon-withbg",
|
|
55
|
+
"group-disabled:bg-bg-primary",
|
|
56
|
+
"transition-transform",
|
|
57
|
+
"duration-200",
|
|
58
|
+
"translate-x-[2px]",
|
|
59
|
+
"data-[state=checked]:translate-x-[18px]"
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
exports.Switch = Switch;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SelectTrigger } from './chunk-QVUX6LLD.mjs';
|
|
2
|
+
import { Tabs } from './chunk-MRVMXKZO.mjs';
|
|
3
|
+
import { Textarea } from './chunk-DDOX4EEM.mjs';
|
|
4
|
+
import { InputRoot } from './chunk-QYRRQ65X.mjs';
|
|
5
|
+
import { withCursor } from './chunk-44KW6PTD.mjs';
|
|
6
|
+
import { Button } from './chunk-VXHM7V6F.mjs';
|
|
7
|
+
|
|
8
|
+
// src/highlight-cursor/enhanced-components.tsx
|
|
9
|
+
var CursorButton = withCursor(Button);
|
|
10
|
+
var CursorTabs = withCursor(Tabs);
|
|
11
|
+
var CursorInputRoot = withCursor(InputRoot);
|
|
12
|
+
var CursorSelectTrigger = withCursor(SelectTrigger);
|
|
13
|
+
var CursorTextarea = withCursor(Textarea);
|
|
14
|
+
|
|
15
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXXWQ4RVP_js = require('./chunk-XXWQ4RVP.js');
|
|
4
|
+
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
26
|
+
|
|
27
|
+
function Popover({ ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
29
|
+
}
|
|
30
|
+
function PopoverTrigger({ ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
32
|
+
}
|
|
33
|
+
function PopoverContent({
|
|
34
|
+
className,
|
|
35
|
+
align = "center",
|
|
36
|
+
sideOffset = 4,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
PopoverPrimitive__namespace.Content,
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "popover-content",
|
|
43
|
+
align,
|
|
44
|
+
sideOffset,
|
|
45
|
+
className: chunkXXWQ4RVP_js.cn(
|
|
46
|
+
"bg-bg-primary",
|
|
47
|
+
"rounded-uk-lg",
|
|
48
|
+
"p-xl",
|
|
49
|
+
"w-[320px]",
|
|
50
|
+
"shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
|
|
51
|
+
"data-[state=open]:animate-in",
|
|
52
|
+
"data-[state=closed]:animate-out",
|
|
53
|
+
"data-[state=closed]:fade-out-0",
|
|
54
|
+
"data-[state=open]:fade-in-0",
|
|
55
|
+
"data-[state=closed]:zoom-out-95",
|
|
56
|
+
"data-[state=open]:zoom-in-95",
|
|
57
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
58
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
59
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
60
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
61
|
+
"z-50",
|
|
62
|
+
"origin-(--radix-popover-content-transform-origin)",
|
|
63
|
+
"border-none",
|
|
64
|
+
"outline-hidden",
|
|
65
|
+
"liquid:liquid-bg",
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
}
|
|
72
|
+
function PopoverAnchor({ ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
exports.Popover = Popover;
|
|
77
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
78
|
+
exports.PopoverContent = PopoverContent;
|
|
79
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXXWQ4RVP_js = require('./chunk-XXWQ4RVP.js');
|
|
4
|
+
var chunkOTPUWWEB_js = require('./chunk-OTPUWWEB.js');
|
|
5
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var react = require('react');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
29
|
+
|
|
30
|
+
var TabsContext = react.createContext(void 0);
|
|
31
|
+
var useTabsContext = () => {
|
|
32
|
+
const context = react.useContext(TabsContext);
|
|
33
|
+
if (!context) {
|
|
34
|
+
throw new Error("Tabs components must be used within a Tabs component");
|
|
35
|
+
}
|
|
36
|
+
return context;
|
|
37
|
+
};
|
|
38
|
+
function Tabs({ className, size = "base", ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { size }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
TabsPrimitive__namespace.Root,
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "tabs",
|
|
43
|
+
className: chunkXXWQ4RVP_js.cn("flex w-full flex-col", className),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
}
|
|
48
|
+
var tabsListVariants = classVarianceAuthority.cva(["inline-flex", "items-center", "justify-center"], {
|
|
49
|
+
variants: {
|
|
50
|
+
size: {
|
|
51
|
+
sm: "gap-xs",
|
|
52
|
+
base: "gap-sm",
|
|
53
|
+
lg: "gap-md"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
size: "base"
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function TabsList({ className, ...props }) {
|
|
61
|
+
const { setCursorTarget } = chunkOTPUWWEB_js.useTabsCursor();
|
|
62
|
+
const { size } = useTabsContext();
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkOTPUWWEB_js.TabsCursorProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
+
TabsPrimitive__namespace.List,
|
|
65
|
+
{
|
|
66
|
+
onMouseLeave: () => setCursorTarget(null),
|
|
67
|
+
"data-slot": "tabs-list",
|
|
68
|
+
className: chunkXXWQ4RVP_js.cn(tabsListVariants({ size }), "justify-start", className),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
) });
|
|
72
|
+
}
|
|
73
|
+
var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
74
|
+
[
|
|
75
|
+
"inline-flex",
|
|
76
|
+
"items-center",
|
|
77
|
+
"justify-center",
|
|
78
|
+
"font-medium",
|
|
79
|
+
"whitespace-nowrap",
|
|
80
|
+
"transition-all",
|
|
81
|
+
"disabled:pointer-events-none",
|
|
82
|
+
"disabled:bg-bg-tertiary",
|
|
83
|
+
"[&_svg]:pointer-events-none",
|
|
84
|
+
"[&_svg:not([class*='size-'])]:size-xl",
|
|
85
|
+
"shrink-0",
|
|
86
|
+
"[&_svg]:shrink-0",
|
|
87
|
+
"outline-none",
|
|
88
|
+
"text-text-primary",
|
|
89
|
+
"data-[state=active]:bg-bg-secondary"
|
|
90
|
+
],
|
|
91
|
+
{
|
|
92
|
+
variants: {
|
|
93
|
+
size: {
|
|
94
|
+
sm: "text-uk-sm leading-uk-sm px-md py-xs rounded-uk-sm",
|
|
95
|
+
base: "text-uk-md leading-uk-md px-lg py-sm rounded-uk-md",
|
|
96
|
+
lg: "text-uk-lg leading-uk-lg px-xl py-sm rounded-uk-md"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
defaultVariants: {
|
|
100
|
+
size: "base"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
function TabsTrigger({ className, ...props }) {
|
|
105
|
+
const { setCursorTarget } = chunkOTPUWWEB_js.useTabsCursor();
|
|
106
|
+
const { size } = useTabsContext();
|
|
107
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
108
|
+
TabsPrimitive__namespace.Trigger,
|
|
109
|
+
{
|
|
110
|
+
onMouseEnter: (e) => setCursorTarget(e.currentTarget),
|
|
111
|
+
"data-slot": "tabs-trigger",
|
|
112
|
+
className: chunkXXWQ4RVP_js.cn(tabsTriggerVariants({ size }), className),
|
|
113
|
+
...props
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function TabsContent({ className, ...props }) {
|
|
118
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
TabsPrimitive__namespace.Content,
|
|
120
|
+
{
|
|
121
|
+
"data-slot": "tabs-content",
|
|
122
|
+
className: chunkXXWQ4RVP_js.cn("flex-1 outline-none", className),
|
|
123
|
+
...props
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
exports.Tabs = Tabs;
|
|
129
|
+
exports.TabsContent = TabsContent;
|
|
130
|
+
exports.TabsList = TabsList;
|
|
131
|
+
exports.TabsTrigger = TabsTrigger;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Switch({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
SwitchPrimitive.Root,
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "switch",
|
|
10
|
+
className: cn(
|
|
11
|
+
"group",
|
|
12
|
+
"w-[32px]",
|
|
13
|
+
"h-[16px]",
|
|
14
|
+
"rounded-[24px]",
|
|
15
|
+
"bg-bg-tertiary",
|
|
16
|
+
"data-[state=checked]:bg-brand-primary",
|
|
17
|
+
"disabled:bg-bg-secondary",
|
|
18
|
+
"disabled:cursor-not-allowed",
|
|
19
|
+
"disabled:data-[state=checked]:bg-bg-secondary",
|
|
20
|
+
"disabled:data-[state=unchecked]:bg-bg-secondary",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...props,
|
|
24
|
+
children: /* @__PURE__ */ jsx(
|
|
25
|
+
SwitchPrimitive.Thumb,
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "switch-thumb",
|
|
28
|
+
className: cn(
|
|
29
|
+
"block",
|
|
30
|
+
"size-[12px]",
|
|
31
|
+
"rounded-full",
|
|
32
|
+
"bg-icon-withbg",
|
|
33
|
+
"group-disabled:bg-bg-primary",
|
|
34
|
+
"transition-transform",
|
|
35
|
+
"duration-200",
|
|
36
|
+
"translate-x-[2px]",
|
|
37
|
+
"data-[state=checked]:translate-x-[18px]"
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { Switch };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { cn } from './chunk-KTNZSZ5Y.mjs';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function TooltipProvider({
|
|
7
|
+
delayDuration = 0,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
const [isClient, setIsClient] = useState(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
setIsClient(true);
|
|
14
|
+
}, []);
|
|
15
|
+
if (!isClient) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
TooltipPrimitive.Provider,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "tooltip-provider",
|
|
22
|
+
delayDuration,
|
|
23
|
+
...props,
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function Tooltip({ children, ...props }) {
|
|
29
|
+
const [isClient, setIsClient] = useState(false);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
setIsClient(true);
|
|
32
|
+
}, []);
|
|
33
|
+
if (!isClient) {
|
|
34
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props, children }) });
|
|
37
|
+
}
|
|
38
|
+
function TooltipTrigger({ ...props }) {
|
|
39
|
+
const [isClient, setIsClient] = useState(false);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
setIsClient(true);
|
|
42
|
+
}, []);
|
|
43
|
+
if (!isClient) {
|
|
44
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.children });
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
47
|
+
}
|
|
48
|
+
function TooltipContent({
|
|
49
|
+
className,
|
|
50
|
+
sideOffset = 0,
|
|
51
|
+
children,
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
54
|
+
const [isClient, setIsClient] = useState(false);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setIsClient(true);
|
|
57
|
+
}, []);
|
|
58
|
+
if (!isClient) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
62
|
+
TooltipPrimitive.Content,
|
|
63
|
+
{
|
|
64
|
+
"data-slot": "tooltip-content",
|
|
65
|
+
sideOffset,
|
|
66
|
+
className: cn(
|
|
67
|
+
"bg-bg-secondary",
|
|
68
|
+
"text-text-primary",
|
|
69
|
+
"animate-in",
|
|
70
|
+
"text-uk-sm",
|
|
71
|
+
"leading-uk-sm",
|
|
72
|
+
"rounded-uk-md",
|
|
73
|
+
"px-lg",
|
|
74
|
+
"py-md",
|
|
75
|
+
"shadow-[0_8px_24px_0_var(--color-shadow-secondary)]",
|
|
76
|
+
"fade-in-0",
|
|
77
|
+
"zoom-in-95",
|
|
78
|
+
"data-[state=closed]:animate-out",
|
|
79
|
+
"data-[state=closed]:fade-out-0",
|
|
80
|
+
"data-[state=closed]:zoom-out-95",
|
|
81
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
82
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
83
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
84
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
85
|
+
"z-50",
|
|
86
|
+
"w-fit",
|
|
87
|
+
"origin-(--radix-tooltip-content-transform-origin)",
|
|
88
|
+
"text-balance",
|
|
89
|
+
"liquid:liquid-bg",
|
|
90
|
+
className
|
|
91
|
+
),
|
|
92
|
+
...props,
|
|
93
|
+
children: [
|
|
94
|
+
children,
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
TooltipPrimitive.Arrow,
|
|
97
|
+
{
|
|
98
|
+
className: "fill-bg-secondary liquid:liquid-bg z-50 h-[9px] w-[20px] border-none",
|
|
99
|
+
style: {
|
|
100
|
+
clipPath: "polygon(50% 100%, 0% 0%, 100% 0%)",
|
|
101
|
+
borderRadius: "1px 1px 0 0"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
) });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|