@vuer-ai/vuer-uikit 0.0.2 → 0.0.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 (212) hide show
  1. package/README.md +80 -0
  2. package/dist/chunk-263CMARJ.mjs +155 -0
  3. package/dist/chunk-277NQUJD.js +99 -0
  4. package/dist/chunk-3FR3WKI4.mjs +24 -0
  5. package/dist/chunk-3HXPIWL3.js +51 -0
  6. package/dist/chunk-3Q75Z2CT.mjs +76 -0
  7. package/dist/chunk-5BIQ3IN7.js +93 -0
  8. package/dist/chunk-5JP4AZ4C.js +302 -0
  9. package/dist/chunk-5U4NWZMT.mjs +78 -0
  10. package/dist/chunk-75QDQ67T.js +56 -0
  11. package/dist/chunk-7IYL2AR4.js +375 -0
  12. package/dist/chunk-ATDHGFVI.mjs +82 -0
  13. package/dist/chunk-CFXL2XYO.mjs +339 -0
  14. package/dist/chunk-CLTLT5XW.js +27 -0
  15. package/dist/chunk-CN6ISLZA.js +102 -0
  16. package/dist/chunk-CP7QYV4N.mjs +110 -0
  17. package/dist/chunk-CZSRIDXN.mjs +165 -0
  18. package/dist/chunk-D4C5V4EN.mjs +53 -0
  19. package/dist/chunk-DQGTWUID.js +186 -0
  20. package/dist/chunk-DWIK2CUV.mjs +45 -0
  21. package/dist/chunk-FXIL4NQZ.js +58 -0
  22. package/dist/chunk-FYEZTS4S.mjs +90 -0
  23. package/dist/chunk-GA2JCN3F.mjs +111 -0
  24. package/dist/chunk-HW6SLBO3.mjs +9 -0
  25. package/dist/chunk-I6VKLSAJ.js +163 -0
  26. package/dist/chunk-J4RFFBDJ.mjs +94 -0
  27. package/dist/chunk-JIXJTLEO.js +93 -0
  28. package/dist/chunk-JOBQTBEM.mjs +49 -0
  29. package/dist/chunk-JZ7V43ZL.js +136 -0
  30. package/dist/chunk-KAPV3EZO.mjs +271 -0
  31. package/dist/chunk-KJ42IGH6.js +2 -0
  32. package/dist/chunk-KO7BQ6RR.js +83 -0
  33. package/dist/chunk-KVDEBKWR.mjs +106 -0
  34. package/dist/chunk-KVFK3YC7.js +187 -0
  35. package/dist/chunk-KYKEJFJT.js +110 -0
  36. package/dist/chunk-LBFO3QAA.js +202 -0
  37. package/dist/chunk-MASRZTZC.mjs +34 -0
  38. package/dist/chunk-NA7TVYOP.js +21 -0
  39. package/dist/chunk-OE56M4MX.js +93 -0
  40. package/dist/chunk-PKGNHHWG.mjs +60 -0
  41. package/dist/chunk-Q3APPCB2.mjs +91 -0
  42. package/dist/chunk-QNTUEKYQ.mjs +19 -0
  43. package/dist/chunk-QS7WS6DD.mjs +1 -0
  44. package/dist/chunk-RPXWKB6F.js +103 -0
  45. package/dist/chunk-SDN2OTHS.js +78 -0
  46. package/dist/chunk-SKWTWHB7.mjs +53 -0
  47. package/dist/chunk-ST4P6AN6.js +2 -0
  48. package/dist/chunk-SUU4Z6E5.mjs +200 -0
  49. package/dist/chunk-SZU2TX5H.js +24 -0
  50. package/dist/chunk-TOZYLDAL.mjs +72 -0
  51. package/dist/chunk-UFR656UY.mjs +87 -0
  52. package/dist/chunk-UWO6RBCE.js +11 -0
  53. package/dist/chunk-VGCVIHBR.mjs +1 -0
  54. package/dist/chunk-WI2J7NIV.mjs +161 -0
  55. package/dist/chunk-WK3M4X72.js +2 -0
  56. package/dist/chunk-WOG6UIG5.mjs +71 -0
  57. package/dist/chunk-XACRGXGF.js +75 -0
  58. package/dist/chunk-YQORMF34.js +110 -0
  59. package/dist/chunk-Z37VNICQ.js +67 -0
  60. package/dist/chunk-ZCYBA6YN.mjs +1 -0
  61. package/dist/chunk-ZJXBC33M.js +112 -0
  62. package/dist/chunk-ZKYQYCKN.mjs +15 -0
  63. package/dist/chunk-ZYBSCTBR.js +109 -0
  64. package/dist/highlight-cursor/cursor-context.d.mts +7 -0
  65. package/dist/highlight-cursor/cursor-context.d.ts +7 -0
  66. package/dist/highlight-cursor/cursor-context.js +14 -0
  67. package/dist/highlight-cursor/cursor-context.mjs +1 -0
  68. package/dist/highlight-cursor/cursor-provider.d.mts +7 -0
  69. package/dist/highlight-cursor/cursor-provider.d.ts +7 -0
  70. package/dist/highlight-cursor/cursor-provider.js +12 -0
  71. package/dist/highlight-cursor/cursor-provider.mjs +3 -0
  72. package/dist/highlight-cursor/enhanced-components.d.mts +20 -0
  73. package/dist/highlight-cursor/enhanced-components.d.ts +20 -0
  74. package/dist/highlight-cursor/enhanced-components.js +36 -0
  75. package/dist/highlight-cursor/enhanced-components.mjs +11 -0
  76. package/dist/highlight-cursor/index.d.mts +16 -0
  77. package/dist/highlight-cursor/index.d.ts +16 -0
  78. package/dist/highlight-cursor/index.js +50 -0
  79. package/dist/highlight-cursor/index.mjs +13 -0
  80. package/dist/highlight-cursor/tabs-cursor-context.d.mts +14 -0
  81. package/dist/highlight-cursor/tabs-cursor-context.d.ts +14 -0
  82. package/dist/highlight-cursor/tabs-cursor-context.js +14 -0
  83. package/dist/highlight-cursor/tabs-cursor-context.mjs +1 -0
  84. package/dist/highlight-cursor/types.d.mts +39 -0
  85. package/dist/highlight-cursor/types.d.ts +39 -0
  86. package/dist/highlight-cursor/types.js +2 -0
  87. package/dist/highlight-cursor/types.mjs +1 -0
  88. package/dist/highlight-cursor/with-cursor.d.mts +7 -0
  89. package/dist/highlight-cursor/with-cursor.d.ts +7 -0
  90. package/dist/highlight-cursor/with-cursor.js +11 -0
  91. package/dist/highlight-cursor/with-cursor.mjs +2 -0
  92. package/dist/index.css +294 -0
  93. package/dist/index.d.mts +48 -0
  94. package/dist/index.d.ts +48 -0
  95. package/dist/index.js +382 -6744
  96. package/dist/index.mjs +31 -0
  97. package/dist/styles/theme.css +185 -0
  98. package/dist/styles/theme.d.mts +2 -0
  99. package/dist/styles/theme.d.ts +2 -0
  100. package/dist/styles/toast.css +44 -0
  101. package/dist/styles/toast.d.mts +2 -0
  102. package/dist/styles/toast.d.ts +2 -0
  103. package/dist/styles/variables.css +184 -0
  104. package/dist/styles/variables.d.mts +2 -0
  105. package/dist/styles/variables.d.ts +2 -0
  106. package/dist/ui/avatar.d.mts +16 -0
  107. package/dist/ui/avatar.d.ts +16 -0
  108. package/dist/ui/avatar.js +23 -0
  109. package/dist/ui/avatar.mjs +2 -0
  110. package/dist/ui/badge.d.mts +14 -0
  111. package/dist/ui/badge.d.ts +14 -0
  112. package/dist/ui/badge.js +16 -0
  113. package/dist/ui/badge.mjs +3 -0
  114. package/dist/ui/button.d.mts +16 -0
  115. package/dist/ui/button.d.ts +16 -0
  116. package/dist/ui/button.js +12 -0
  117. package/dist/ui/button.mjs +3 -0
  118. package/dist/ui/card.d.mts +12 -0
  119. package/dist/ui/card.d.ts +12 -0
  120. package/dist/ui/card.js +36 -0
  121. package/dist/ui/card.mjs +3 -0
  122. package/dist/ui/checkbox.d.mts +11 -0
  123. package/dist/ui/checkbox.d.ts +11 -0
  124. package/dist/ui/checkbox.js +12 -0
  125. package/dist/ui/checkbox.mjs +3 -0
  126. package/dist/ui/collapsible.d.mts +9 -0
  127. package/dist/ui/collapsible.d.ts +9 -0
  128. package/dist/ui/collapsible.js +20 -0
  129. package/dist/ui/collapsible.mjs +3 -0
  130. package/dist/ui/dropdown.d.mts +28 -0
  131. package/dist/ui/dropdown.d.ts +28 -0
  132. package/dist/ui/dropdown.js +68 -0
  133. package/dist/ui/dropdown.mjs +3 -0
  134. package/dist/ui/index.d.mts +41 -0
  135. package/dist/ui/index.d.ts +41 -0
  136. package/dist/ui/index.js +355 -0
  137. package/dist/ui/index.mjs +26 -0
  138. package/dist/ui/input-numbers.d.mts +15 -0
  139. package/dist/ui/input-numbers.d.ts +15 -0
  140. package/dist/ui/input-numbers.js +13 -0
  141. package/dist/ui/input-numbers.mjs +4 -0
  142. package/dist/ui/input.d.mts +22 -0
  143. package/dist/ui/input.d.ts +22 -0
  144. package/dist/ui/input.js +16 -0
  145. package/dist/ui/input.mjs +3 -0
  146. package/dist/ui/modal.d.mts +28 -0
  147. package/dist/ui/modal.d.ts +28 -0
  148. package/dist/ui/modal.js +48 -0
  149. package/dist/ui/modal.mjs +3 -0
  150. package/dist/ui/popover.d.mts +10 -0
  151. package/dist/ui/popover.d.ts +10 -0
  152. package/dist/ui/popover.js +23 -0
  153. package/dist/ui/popover.mjs +2 -0
  154. package/dist/ui/radio-group.d.mts +8 -0
  155. package/dist/ui/radio-group.d.ts +8 -0
  156. package/dist/ui/radio-group.js +16 -0
  157. package/dist/ui/radio-group.mjs +3 -0
  158. package/dist/ui/select.d.mts +28 -0
  159. package/dist/{types/ui → ui}/select.d.ts +18 -14
  160. package/dist/ui/select.js +48 -0
  161. package/dist/ui/select.mjs +3 -0
  162. package/dist/ui/slider.d.mts +10 -0
  163. package/dist/ui/slider.d.ts +10 -0
  164. package/dist/ui/slider.js +12 -0
  165. package/dist/ui/slider.mjs +3 -0
  166. package/dist/ui/switch.d.mts +7 -0
  167. package/dist/ui/switch.d.ts +7 -0
  168. package/dist/ui/switch.js +12 -0
  169. package/dist/ui/switch.mjs +3 -0
  170. package/dist/ui/tabs.d.mts +16 -0
  171. package/dist/ui/tabs.d.ts +16 -0
  172. package/dist/ui/tabs.js +25 -0
  173. package/dist/ui/tabs.mjs +4 -0
  174. package/dist/ui/textarea.d.mts +16 -0
  175. package/dist/ui/textarea.d.ts +16 -0
  176. package/dist/ui/textarea.js +12 -0
  177. package/dist/ui/textarea.mjs +3 -0
  178. package/dist/ui/theme-context.d.mts +17 -0
  179. package/dist/{types/ui → ui}/theme-context.d.ts +5 -3
  180. package/dist/ui/theme-context.js +14 -0
  181. package/dist/ui/theme-context.mjs +1 -0
  182. package/dist/ui/toast.d.mts +7 -0
  183. package/dist/ui/toast.d.ts +7 -0
  184. package/dist/ui/toast.js +14 -0
  185. package/dist/ui/toast.mjs +1 -0
  186. package/dist/ui/toggle-group.d.mts +12 -0
  187. package/dist/ui/toggle-group.d.ts +12 -0
  188. package/dist/ui/toggle-group.js +17 -0
  189. package/dist/ui/toggle-group.mjs +4 -0
  190. package/dist/ui/toggle.d.mts +13 -0
  191. package/dist/ui/toggle.d.ts +13 -0
  192. package/dist/ui/toggle.js +16 -0
  193. package/dist/ui/toggle.mjs +3 -0
  194. package/dist/ui/tooltip.d.mts +10 -0
  195. package/dist/ui/tooltip.d.ts +10 -0
  196. package/dist/ui/tooltip.js +23 -0
  197. package/dist/ui/tooltip.mjs +2 -0
  198. package/dist/utils/cn.d.mts +5 -0
  199. package/dist/utils/cn.d.ts +5 -0
  200. package/dist/utils/cn.js +10 -0
  201. package/dist/utils/cn.mjs +1 -0
  202. package/dist/utils/index.d.mts +2 -0
  203. package/dist/utils/index.d.ts +2 -0
  204. package/dist/utils/index.js +11 -0
  205. package/dist/utils/index.mjs +2 -0
  206. package/package.json +48 -27
  207. package/dist/index.umd.js +0 -74
  208. package/dist/types/index.d.ts +0 -4
  209. package/dist/types/lib/utils.d.ts +0 -2
  210. package/dist/types/ui/button.d.ts +0 -13
  211. package/dist/types/ui/input.d.ts +0 -19
  212. package/dist/vuer-uikit.css +0 -1
@@ -0,0 +1,165 @@
1
+ import { cn } from './chunk-HW6SLBO3.mjs';
2
+ import * as SliderPrimitive from '@radix-ui/react-slider';
3
+ import { forwardRef, useState, useMemo } from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var Slider = forwardRef(function Slider2({
7
+ className,
8
+ defaultValue,
9
+ value,
10
+ onValueChange,
11
+ showStep = false,
12
+ step = 1,
13
+ min = 0,
14
+ max = 100,
15
+ ...props
16
+ }, ref) {
17
+ const [currentValue, setCurrentValue] = useState(value ?? defaultValue ?? [0]);
18
+ const _values = useMemo(
19
+ () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
20
+ [value, defaultValue, min, max]
21
+ );
22
+ return /* @__PURE__ */ jsxs(
23
+ SliderPrimitive.Root,
24
+ {
25
+ "data-slot": "slider",
26
+ value,
27
+ defaultValue,
28
+ onValueChange: (v) => {
29
+ onValueChange == null ? void 0 : onValueChange(v);
30
+ setCurrentValue(v);
31
+ },
32
+ ref,
33
+ min,
34
+ max,
35
+ step,
36
+ className: cn(
37
+ "relative",
38
+ "flex",
39
+ "w-full",
40
+ "touch-none",
41
+ "select-none",
42
+ "items-center",
43
+ "data-[orientation=vertical]:h-full",
44
+ "data-[orientation=vertical]:min-h-44",
45
+ "data-[orientation=vertical]:w-auto",
46
+ "data-[orientation=vertical]:flex-col",
47
+ className
48
+ ),
49
+ ...props,
50
+ children: [
51
+ /* @__PURE__ */ jsx(
52
+ SliderPrimitive.Track,
53
+ {
54
+ "data-slot": "slider-track",
55
+ className: cn(
56
+ "peer/slider-track",
57
+ "bg-line-primary",
58
+ "relative",
59
+ "grow",
60
+ "overflow-hidden",
61
+ "rounded-full",
62
+ "data-[disabled]:bg-bg-secondary",
63
+ "data-[orientation=vertical]:w-0.5",
64
+ "data-[orientation=vertical]:h-full",
65
+ "data-[orientation=horizontal]:h-0.5",
66
+ "data-[orientation=horizontal]:w-full"
67
+ ),
68
+ children: /* @__PURE__ */ jsx(
69
+ SliderPrimitive.Range,
70
+ {
71
+ "data-slot": "slider-range",
72
+ className: cn(
73
+ "bg-brand-primary",
74
+ "absolute",
75
+ "data-[disabled]:bg-bg-secondary",
76
+ "data-[orientation=vertical]:w-full",
77
+ "data-[orientation=horizontal]:h-full"
78
+ )
79
+ }
80
+ )
81
+ }
82
+ ),
83
+ showStep && /* @__PURE__ */ jsx(SliderSteps, { currentValue, max, min, step }),
84
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(
85
+ SliderPrimitive.Thumb,
86
+ {
87
+ "data-slot": "slider-thumb",
88
+ className: cn(
89
+ "ring-brand-primary/50",
90
+ "bg-brand-primary",
91
+ "block",
92
+ "h-4",
93
+ "w-[0.6rem]",
94
+ "shrink-0",
95
+ "rounded-[3px]",
96
+ "transition-[color,box-shadow]",
97
+ "hover:ring-4",
98
+ "hover:cursor-ew-resize",
99
+ "focus-visible:ring-4",
100
+ "focus-visible:outline-hidden",
101
+ "data-[disabled]:bg-bg-tertiary",
102
+ "data-[disabled]:pointer-events-none"
103
+ )
104
+ },
105
+ index
106
+ ))
107
+ ]
108
+ }
109
+ );
110
+ });
111
+ function SliderSteps({ step, min, max, currentValue }) {
112
+ const steps = useMemo(() => {
113
+ const value = max - min;
114
+ const stepCount = Math.ceil(value / step);
115
+ return Array.from({ length: stepCount + 1 }, (_, i) => {
116
+ return { position: Math.min(100 / value * (i * step), 100), v: i * step + min };
117
+ });
118
+ }, [max, min, step]);
119
+ const [minRange, maxRange] = useMemo(() => {
120
+ if (currentValue.length > 1) {
121
+ return [Math.min(...currentValue), Math.max(...currentValue)];
122
+ } else {
123
+ return [0, ...currentValue];
124
+ }
125
+ }, [currentValue]);
126
+ return steps.map((step2, i) => {
127
+ const thumbInBoundsOffset = getThumbInBoundsOffset(9.6, step2.position, 1);
128
+ return /* @__PURE__ */ jsx(
129
+ "span",
130
+ {
131
+ "data-slot": "slider-step",
132
+ style: { left: `calc(${step2.position}% + ${thumbInBoundsOffset}px)` },
133
+ className: cn(
134
+ "absolute",
135
+ "top-1/2",
136
+ "translate-y-[-50%]",
137
+ "translate-x-[-50%]",
138
+ "bg-brand-primary",
139
+ "block",
140
+ "h-[5pt]",
141
+ "w-[1pt]",
142
+ "shrink-0",
143
+ "rounded-[1px]",
144
+ "peer-has-data-[disabled]/slider-track:bg-bg-tertiary",
145
+ { "bg-bg-tertiary": step2.v < minRange || step2.v > maxRange }
146
+ )
147
+ },
148
+ i
149
+ );
150
+ });
151
+ }
152
+ function getThumbInBoundsOffset(width, left, direction) {
153
+ const halfWidth = width / 2;
154
+ const halfPercent = 50;
155
+ const offset = linearScale([0, halfPercent], [0, halfWidth]);
156
+ return (halfWidth - offset(left) * direction) * direction;
157
+ }
158
+ function linearScale(input, output) {
159
+ return (value) => {
160
+ const ratio = (output[1] - output[0]) / (input[1] - input[0]);
161
+ return output[0] + ratio * (value - input[0]);
162
+ };
163
+ }
164
+
165
+ export { Slider };
@@ -0,0 +1,53 @@
1
+ import { createContext, useState, useEffect, useMemo, useContext } from 'react';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/ui/theme-context.tsx
5
+ var initialState = {
6
+ theme: "system",
7
+ setTheme: () => null
8
+ };
9
+ var ThemeProviderContext = createContext(initialState);
10
+ function ThemeProvider({
11
+ children,
12
+ defaultTheme = "system",
13
+ storageKey = "vuer-theme",
14
+ ...props
15
+ }) {
16
+ const [theme, setTheme] = useState(() => {
17
+ return localStorage.getItem(storageKey) || defaultTheme;
18
+ });
19
+ useEffect(() => {
20
+ const root = window.document.documentElement;
21
+ root.classList.remove("light", "dark", "liquidlight", "liquiddark", "system");
22
+ if (theme === "system") {
23
+ const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
24
+ root.classList.add(systemTheme);
25
+ return;
26
+ }
27
+ root.classList.add(theme);
28
+ }, [theme]);
29
+ return /* @__PURE__ */ jsx(
30
+ ThemeProviderContext.Provider,
31
+ {
32
+ ...props,
33
+ value: useMemo(
34
+ () => ({
35
+ theme,
36
+ setTheme: (theme2) => {
37
+ localStorage.setItem(storageKey, theme2);
38
+ setTheme(theme2);
39
+ }
40
+ }),
41
+ [storageKey, theme]
42
+ ),
43
+ children
44
+ }
45
+ );
46
+ }
47
+ var useTheme = () => {
48
+ const context = useContext(ThemeProviderContext);
49
+ if (context === void 0) throw new Error("useTheme must be used within a ThemeProvider");
50
+ return context;
51
+ };
52
+
53
+ export { ThemeProvider, useTheme };
@@ -0,0 +1,186 @@
1
+ 'use strict';
2
+
3
+ var chunkUWO6RBCE_js = require('./chunk-UWO6RBCE.js');
4
+ var DialogPrimitive = require('@radix-ui/react-dialog');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var lucideReact = require('lucide-react');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
28
+
29
+ function Modal({ ...props }) {
30
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "modal", ...props });
31
+ }
32
+ function ModalTrigger({ ...props }) {
33
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "modal-trigger", ...props });
34
+ }
35
+ function ModalPortal({ ...props }) {
36
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "modal-portal", ...props });
37
+ }
38
+ function ModalClose({ ...props }) {
39
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "modal-close", ...props });
40
+ }
41
+ var modalOverlayVariants = classVarianceAuthority.cva([
42
+ "fixed",
43
+ "inset-0",
44
+ "z-100",
45
+ "bg-bg-mask",
46
+ "transition-all",
47
+ "duration-200"
48
+ ]);
49
+ function ModalOverlay({ className, ...props }) {
50
+ return /* @__PURE__ */ jsxRuntime.jsx(
51
+ DialogPrimitive__namespace.Overlay,
52
+ {
53
+ "data-slot": "modal-overlay",
54
+ className: chunkUWO6RBCE_js.cn(modalOverlayVariants(), className),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ var modalContentVariants = classVarianceAuthority.cva([
60
+ "px-xl",
61
+ "pb-xl",
62
+ "bg-bg-primary",
63
+ "rounded-xl",
64
+ "shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
65
+ "w-[320px]",
66
+ "min-w-[280px]",
67
+ "duration-200",
68
+ "transition-all",
69
+ "fixed",
70
+ "translate-x-[-50%]",
71
+ "translate-y-[-50%]",
72
+ "z-101",
73
+ "left-1/2",
74
+ "top-1/2",
75
+ "data-[state=open]:animate-in",
76
+ "data-[state=closed]:animate-out",
77
+ "data-[state=closed]:fade-out-0",
78
+ "data-[state=open]:fade-in-0",
79
+ "data-[state=closed]:zoom-out-95",
80
+ "data-[state=open]:zoom-in-95"
81
+ ]);
82
+ function ModalContent({
83
+ className,
84
+ children,
85
+ showCloseButton = true,
86
+ ...props
87
+ }) {
88
+ return /* @__PURE__ */ jsxRuntime.jsxs(ModalPortal, { children: [
89
+ /* @__PURE__ */ jsxRuntime.jsx(ModalOverlay, {}),
90
+ /* @__PURE__ */ jsxRuntime.jsxs(
91
+ DialogPrimitive__namespace.Content,
92
+ {
93
+ "data-slot": "modal-content",
94
+ className: chunkUWO6RBCE_js.cn(modalContentVariants(), className),
95
+ ...props,
96
+ children: [
97
+ children,
98
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
99
+ DialogPrimitive__namespace.Close,
100
+ {
101
+ "data-slot": "modal-close",
102
+ className: chunkUWO6RBCE_js.cn(
103
+ "absolute",
104
+ "right-[16px]",
105
+ "top-[16px]",
106
+ "w-[16px]",
107
+ "h-[16px]",
108
+ "rounded-sm",
109
+ "cursor-pointer",
110
+ "hover:bg-bg-tertiary",
111
+ "text-text-primary",
112
+ "flex",
113
+ "items-center",
114
+ "justify-center"
115
+ ),
116
+ children: [
117
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
118
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
119
+ ]
120
+ }
121
+ )
122
+ ]
123
+ }
124
+ )
125
+ ] });
126
+ }
127
+ function ModalHeader({ className, ...props }) {
128
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "modal-header", className: chunkUWO6RBCE_js.cn("flex flex-col", className), ...props });
129
+ }
130
+ function ModalTitle({ className, ...props }) {
131
+ return /* @__PURE__ */ jsxRuntime.jsx(
132
+ DialogPrimitive__namespace.Title,
133
+ {
134
+ "data-slot": "modal-title",
135
+ className: chunkUWO6RBCE_js.cn(
136
+ "text-text-highlight",
137
+ "text-[14px]",
138
+ "leading-[20px]",
139
+ "font-medium",
140
+ "py-lg",
141
+ "text-center",
142
+ className
143
+ ),
144
+ ...props
145
+ }
146
+ );
147
+ }
148
+ function ModalDescription({ className, ...props }) {
149
+ return /* @__PURE__ */ jsxRuntime.jsx(
150
+ DialogPrimitive__namespace.Description,
151
+ {
152
+ "data-slot": "modal-description",
153
+ className: chunkUWO6RBCE_js.cn(
154
+ "text-text-primary",
155
+ "text-[14px]",
156
+ "leading-[20px]",
157
+ "font-normal",
158
+ "pb-lg",
159
+ "text-start",
160
+ className
161
+ ),
162
+ ...props
163
+ }
164
+ );
165
+ }
166
+ function ModalFooter({ className, ...props }) {
167
+ return /* @__PURE__ */ jsxRuntime.jsx(
168
+ "div",
169
+ {
170
+ "data-slot": "modal-footer",
171
+ className: chunkUWO6RBCE_js.cn("w-full", "flex", "justify-end", "gap-[8px]", className),
172
+ ...props
173
+ }
174
+ );
175
+ }
176
+
177
+ exports.Modal = Modal;
178
+ exports.ModalClose = ModalClose;
179
+ exports.ModalContent = ModalContent;
180
+ exports.ModalDescription = ModalDescription;
181
+ exports.ModalFooter = ModalFooter;
182
+ exports.ModalHeader = ModalHeader;
183
+ exports.ModalOverlay = ModalOverlay;
184
+ exports.ModalPortal = ModalPortal;
185
+ exports.ModalTitle = ModalTitle;
186
+ exports.ModalTrigger = ModalTrigger;
@@ -0,0 +1,45 @@
1
+ import { cn } from './chunk-HW6SLBO3.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,58 @@
1
+ 'use strict';
2
+
3
+ var chunkUWO6RBCE_js = require('./chunk-UWO6RBCE.js');
4
+ var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
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 CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
26
+
27
+ function Collapsible({ ...props }) {
28
+ return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Root, { "data-slot": "collapsible", ...props });
29
+ }
30
+ function CollapsibleTrigger2({
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
34
+ }
35
+ function CollapsibleContent2({
36
+ className,
37
+ ...props
38
+ }) {
39
+ return /* @__PURE__ */ jsxRuntime.jsx(
40
+ CollapsiblePrimitive__namespace.CollapsibleContent,
41
+ {
42
+ "data-slot": "collapsible-content",
43
+ className: chunkUWO6RBCE_js.cn(
44
+ [
45
+ "overflow-hidden",
46
+ "data-[state=open]:animate-collapsible-down",
47
+ "data-[state=closed]:animate-collapsible-up"
48
+ ],
49
+ className
50
+ ),
51
+ ...props
52
+ }
53
+ );
54
+ }
55
+
56
+ exports.Collapsible = Collapsible;
57
+ exports.CollapsibleContent = CollapsibleContent2;
58
+ exports.CollapsibleTrigger = CollapsibleTrigger2;
@@ -0,0 +1,90 @@
1
+ import { motion } from 'framer-motion';
2
+ import { createContext, useState, useEffect, useCallback, useContext } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ // src/highlight-cursor/tabs-cursor-context.tsx
7
+ var TabsCursorContext = createContext(null);
8
+ var TabsCursorProvider = ({
9
+ children,
10
+ className,
11
+ ...props
12
+ }) => {
13
+ const [cursorTarget, setCursorTarget] = useState(null);
14
+ const [targetRect, setTargetRect] = useState(null);
15
+ const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
16
+ const [isMouseInside, setIsMouseInside] = useState(false);
17
+ useEffect(() => {
18
+ const handleMouseMove = (e) => {
19
+ setMousePosition({ x: e.clientX, y: e.clientY });
20
+ };
21
+ document.addEventListener("mousemove", handleMouseMove);
22
+ return () => document.removeEventListener("mousemove", handleMouseMove);
23
+ }, []);
24
+ useEffect(() => {
25
+ if (cursorTarget) {
26
+ setTargetRect(cursorTarget.getBoundingClientRect());
27
+ } else {
28
+ setTargetRect(null);
29
+ }
30
+ }, [cursorTarget]);
31
+ const handleMouseEnter = useCallback(() => {
32
+ setIsMouseInside(true);
33
+ }, []);
34
+ const handleMouseLeave = useCallback(() => {
35
+ setIsMouseInside(false);
36
+ setCursorTarget(null);
37
+ }, []);
38
+ const contextValue = { setCursorTarget };
39
+ return /* @__PURE__ */ jsx(
40
+ "div",
41
+ {
42
+ ...props,
43
+ className,
44
+ style: {
45
+ cursor: isMouseInside && !cursorTarget ? "none" : "auto",
46
+ ...props.style
47
+ },
48
+ onMouseEnter: handleMouseEnter,
49
+ onMouseLeave: handleMouseLeave,
50
+ children: /* @__PURE__ */ jsxs(TabsCursorContext.Provider, { value: contextValue, children: [
51
+ children,
52
+ isMouseInside && createPortal(
53
+ /* @__PURE__ */ jsx(
54
+ motion.div,
55
+ {
56
+ className: "pointer-events-none",
57
+ initial: false,
58
+ animate: {
59
+ x: targetRect ? targetRect.left : mousePosition.x - 8,
60
+ y: targetRect ? targetRect.top : mousePosition.y - 8,
61
+ width: targetRect ? targetRect.width : 16,
62
+ height: targetRect ? targetRect.height : 16,
63
+ borderRadius: targetRect && cursorTarget ? getComputedStyle(cursorTarget).borderRadius : "50%"
64
+ },
65
+ transition: { type: "spring", stiffness: 1e3, damping: 60, mass: 1 },
66
+ style: {
67
+ position: "fixed",
68
+ top: 0,
69
+ left: 0,
70
+ backgroundColor: "var(--bg-secondary)",
71
+ zIndex: 9999
72
+ }
73
+ }
74
+ ),
75
+ document.body
76
+ )
77
+ ] })
78
+ }
79
+ );
80
+ };
81
+ var useTabsCursor = () => {
82
+ const context = useContext(TabsCursorContext);
83
+ if (!context) {
84
+ return { setCursorTarget: () => {
85
+ } };
86
+ }
87
+ return context;
88
+ };
89
+
90
+ export { TabsCursorProvider, useTabsCursor };