@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,103 @@
1
+ 'use strict';
2
+
3
+ var chunkUWO6RBCE_js = require('./chunk-UWO6RBCE.js');
4
+ var TooltipPrimitive = require('@radix-ui/react-tooltip');
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 TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
26
+
27
+ function TooltipProvider({
28
+ delayDuration = 0,
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsxRuntime.jsx(
32
+ TooltipPrimitive__namespace.Provider,
33
+ {
34
+ "data-slot": "tooltip-provider",
35
+ delayDuration,
36
+ ...props
37
+ }
38
+ );
39
+ }
40
+ function Tooltip({ ...props }) {
41
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
42
+ }
43
+ function TooltipTrigger({ ...props }) {
44
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
45
+ }
46
+ function TooltipContent({
47
+ className,
48
+ sideOffset = 0,
49
+ children,
50
+ ...props
51
+ }) {
52
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
53
+ TooltipPrimitive__namespace.Content,
54
+ {
55
+ "data-slot": "tooltip-content",
56
+ sideOffset,
57
+ className: chunkUWO6RBCE_js.cn(
58
+ "bg-bg-secondary",
59
+ "text-text-primary",
60
+ "animate-in",
61
+ "text-sm",
62
+ "rounded-uk-md",
63
+ "px-lg",
64
+ "py-md",
65
+ "shadow-[0_8px_24px_0_var(--color-shadow-secondary)]",
66
+ "fade-in-0",
67
+ "zoom-in-95",
68
+ "data-[state=closed]:animate-out",
69
+ "data-[state=closed]:fade-out-0",
70
+ "data-[state=closed]:zoom-out-95",
71
+ "data-[side=bottom]:slide-in-from-top-2",
72
+ "data-[side=left]:slide-in-from-right-2",
73
+ "data-[side=right]:slide-in-from-left-2",
74
+ "data-[side=top]:slide-in-from-bottom-2",
75
+ "z-50",
76
+ "w-fit",
77
+ "origin-(--radix-tooltip-content-transform-origin)",
78
+ "text-balance",
79
+ className
80
+ ),
81
+ ...props,
82
+ children: [
83
+ children,
84
+ /* @__PURE__ */ jsxRuntime.jsx(
85
+ TooltipPrimitive__namespace.Arrow,
86
+ {
87
+ className: "fill-bg-secondary z-50 h-[14px] w-[20px] border-none",
88
+ style: {
89
+ clipPath: "polygon(50% 100%, 0% 0%, 100% 0%)",
90
+ borderRadius: "1px 1px 0 0",
91
+ transform: "translateY(-5px)"
92
+ }
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ ) });
98
+ }
99
+
100
+ exports.Tooltip = Tooltip;
101
+ exports.TooltipContent = TooltipContent;
102
+ exports.TooltipProvider = TooltipProvider;
103
+ exports.TooltipTrigger = TooltipTrigger;
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ var chunkUWO6RBCE_js = require('./chunk-UWO6RBCE.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: chunkUWO6RBCE_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
+ className
66
+ ),
67
+ ...props
68
+ }
69
+ ) });
70
+ }
71
+ function PopoverAnchor({ ...props }) {
72
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { "data-slot": "popover-anchor", ...props });
73
+ }
74
+
75
+ exports.Popover = Popover;
76
+ exports.PopoverAnchor = PopoverAnchor;
77
+ exports.PopoverContent = PopoverContent;
78
+ exports.PopoverTrigger = PopoverTrigger;
@@ -0,0 +1,53 @@
1
+ import { cn } from './chunk-HW6SLBO3.mjs';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ function Popover({ ...props }) {
6
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
7
+ }
8
+ function PopoverTrigger({ ...props }) {
9
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
10
+ }
11
+ function PopoverContent({
12
+ className,
13
+ align = "center",
14
+ sideOffset = 4,
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
18
+ PopoverPrimitive.Content,
19
+ {
20
+ "data-slot": "popover-content",
21
+ align,
22
+ sideOffset,
23
+ className: cn(
24
+ "bg-bg-primary",
25
+ "rounded-uk-lg",
26
+ "p-xl",
27
+ "w-[320px]",
28
+ "shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
29
+ "data-[state=open]:animate-in",
30
+ "data-[state=closed]:animate-out",
31
+ "data-[state=closed]:fade-out-0",
32
+ "data-[state=open]:fade-in-0",
33
+ "data-[state=closed]:zoom-out-95",
34
+ "data-[state=open]:zoom-in-95",
35
+ "data-[side=bottom]:slide-in-from-top-2",
36
+ "data-[side=left]:slide-in-from-right-2",
37
+ "data-[side=right]:slide-in-from-left-2",
38
+ "data-[side=top]:slide-in-from-bottom-2",
39
+ "z-50",
40
+ "origin-(--radix-popover-content-transform-origin)",
41
+ "border-none",
42
+ "outline-hidden",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ ) });
48
+ }
49
+ function PopoverAnchor({ ...props }) {
50
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
51
+ }
52
+
53
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,200 @@
1
+ import { cn } from './chunk-HW6SLBO3.mjs';
2
+ import { CursorContext } from './chunk-3FR3WKI4.mjs';
3
+ import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
4
+ import { createPortal } from 'react-dom';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+
7
+ var CursorProvider = ({
8
+ children,
9
+ maxOffsetX = 5,
10
+ maxOffsetY = 20,
11
+ cursorSize = 20,
12
+ transitionDuration = 100,
13
+ cursorClassName,
14
+ className,
15
+ as: Component = "div",
16
+ ...props
17
+ }) => {
18
+ const [isMouseInside, setIsMouseInside] = useState(false);
19
+ const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
20
+ const [hoveredElementId, setHoveredElementId] = useState(null);
21
+ const [elementDimensions, setElementDimensions] = useState({
22
+ width: 0,
23
+ height: 0,
24
+ x: 0,
25
+ y: 0,
26
+ right: 0,
27
+ bottom: 0
28
+ });
29
+ const hoveredElementRef = useRef(null);
30
+ useEffect(() => {
31
+ const handleMouseMove = (e) => {
32
+ setMousePosition({ x: e.clientX, y: e.clientY });
33
+ };
34
+ document.addEventListener("mousemove", handleMouseMove);
35
+ return () => document.removeEventListener("mousemove", handleMouseMove);
36
+ }, []);
37
+ const handleMouseEnter = useCallback(() => {
38
+ setIsMouseInside(true);
39
+ }, []);
40
+ const handleMouseLeave = useCallback(() => {
41
+ setIsMouseInside(false);
42
+ setHoveredElementId(null);
43
+ hoveredElementRef.current = null;
44
+ }, []);
45
+ const checkMouseInElement = useCallback(() => {
46
+ if (!hoveredElementRef.current || !hoveredElementId) {
47
+ return;
48
+ }
49
+ const rect = hoveredElementRef.current.getBoundingClientRect();
50
+ setElementDimensions({
51
+ width: rect.width,
52
+ height: rect.height,
53
+ x: rect.left,
54
+ y: rect.top,
55
+ right: rect.right,
56
+ bottom: rect.bottom
57
+ });
58
+ const isInside = mousePosition.x >= rect.left && mousePosition.x <= rect.right && mousePosition.y >= rect.top && mousePosition.y <= rect.bottom;
59
+ if (!isInside) {
60
+ setHoveredElementId(null);
61
+ hoveredElementRef.current = null;
62
+ }
63
+ }, [mousePosition, hoveredElementId]);
64
+ useEffect(() => {
65
+ const handleScroll = () => {
66
+ checkMouseInElement();
67
+ };
68
+ document.addEventListener("scroll", handleScroll, { passive: true, capture: true });
69
+ return () => {
70
+ document.removeEventListener("scroll", handleScroll, { capture: true });
71
+ };
72
+ }, [checkMouseInElement]);
73
+ const registerHoveredElement = useCallback(
74
+ (id, dimensions, element) => {
75
+ setHoveredElementId(id);
76
+ setElementDimensions({
77
+ width: dimensions.width,
78
+ height: dimensions.height,
79
+ x: dimensions.left,
80
+ y: dimensions.top,
81
+ right: dimensions.right,
82
+ bottom: dimensions.bottom
83
+ });
84
+ if (element) {
85
+ hoveredElementRef.current = element;
86
+ }
87
+ },
88
+ []
89
+ );
90
+ const unregisterHoveredElement = useCallback(() => {
91
+ setHoveredElementId(null);
92
+ hoveredElementRef.current = null;
93
+ }, []);
94
+ const updateElementDimensions = useCallback(
95
+ (dimensions) => {
96
+ if (hoveredElementId) {
97
+ setElementDimensions({
98
+ width: dimensions.width,
99
+ height: dimensions.height,
100
+ x: dimensions.left,
101
+ y: dimensions.top,
102
+ right: dimensions.right,
103
+ bottom: dimensions.bottom
104
+ });
105
+ }
106
+ },
107
+ [hoveredElementId]
108
+ );
109
+ const getCursorPosition = () => {
110
+ if (!hoveredElementId) {
111
+ return {
112
+ x: mousePosition.x - cursorSize / 2,
113
+ y: mousePosition.y - cursorSize / 2
114
+ };
115
+ }
116
+ const elementCenterX = elementDimensions.x + elementDimensions.width / 2;
117
+ const elementCenterY = elementDimensions.y + elementDimensions.height / 2;
118
+ const offsetX = (mousePosition.x - elementCenterX) * 0.1;
119
+ const offsetY = (mousePosition.y - elementCenterY) * 0.1;
120
+ const boundedOffsetX = Math.max(-maxOffsetX, Math.min(maxOffsetX, offsetX));
121
+ const boundedOffsetY = Math.max(-maxOffsetY, Math.min(maxOffsetY, offsetY));
122
+ return {
123
+ x: elementDimensions.x + boundedOffsetX,
124
+ y: elementDimensions.y + boundedOffsetY
125
+ };
126
+ };
127
+ const contextValue = useMemo(
128
+ () => ({
129
+ // State values that change during component lifecycle
130
+ mousePosition,
131
+ hoveredElementId,
132
+ elementDimensions,
133
+ // Callbacks that should be stable references
134
+ registerHoveredElement,
135
+ unregisterHoveredElement,
136
+ updateElementDimensions
137
+ }),
138
+ [
139
+ mousePosition,
140
+ hoveredElementId,
141
+ elementDimensions,
142
+ registerHoveredElement,
143
+ unregisterHoveredElement,
144
+ updateElementDimensions
145
+ ]
146
+ );
147
+ const cursorPosition = getCursorPosition();
148
+ const cursorStyleObject = useMemo(
149
+ () => ({
150
+ left: cursorPosition.x,
151
+ top: cursorPosition.y,
152
+ width: hoveredElementId ? elementDimensions.width > 0 ? elementDimensions.width : cursorSize : cursorSize,
153
+ height: hoveredElementId ? elementDimensions.height > 0 ? elementDimensions.height : cursorSize : cursorSize,
154
+ willChange: "transform, width, height"
155
+ }),
156
+ [
157
+ cursorPosition.x,
158
+ cursorPosition.y,
159
+ hoveredElementId,
160
+ elementDimensions.width,
161
+ elementDimensions.height,
162
+ cursorSize
163
+ ]
164
+ );
165
+ let styleClass;
166
+ if (hoveredElementId) {
167
+ styleClass = `opacity-[0.05] rounded-md transition-[width,height,left,top] duration-${transitionDuration} ease-out`;
168
+ } else {
169
+ styleClass = `opacity-90 rounded-xl z-10 transition-[width,height,left,top] duration-${transitionDuration} ease-out transition-opacity duration-${transitionDuration}`;
170
+ }
171
+ const cursorElement = isMouseInside && /* @__PURE__ */ jsx(
172
+ "div",
173
+ {
174
+ className: `pointer-events-none fixed ${styleClass} ${hoveredElementId ? "" : cursorClassName || ""}`,
175
+ style: {
176
+ ...cursorStyleObject,
177
+ backgroundColor: "var(--shadow-secondary)"
178
+ }
179
+ }
180
+ );
181
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
182
+ typeof document !== "undefined" && document.body && cursorElement && createPortal(cursorElement, document.body),
183
+ /* @__PURE__ */ jsx(CursorContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
184
+ Component,
185
+ {
186
+ ...props,
187
+ className: cn(className),
188
+ style: {
189
+ cursor: isMouseInside && !hoveredElementId ? "none" : "auto",
190
+ ...props.style
191
+ },
192
+ onMouseEnter: handleMouseEnter,
193
+ onMouseLeave: handleMouseLeave,
194
+ children
195
+ }
196
+ ) })
197
+ ] });
198
+ };
199
+
200
+ export { CursorProvider };
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var sonner = require('sonner');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ // src/ui/toast.tsx
7
+ var Toaster = ({ ...props }) => {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(
9
+ sonner.Toaster,
10
+ {
11
+ toastOptions: {
12
+ className: "vk-toast",
13
+ descriptionClassName: "vk-toast-description"
14
+ },
15
+ ...props
16
+ }
17
+ );
18
+ };
19
+
20
+ Object.defineProperty(exports, "toast", {
21
+ enumerable: true,
22
+ get: function () { return sonner.toast; }
23
+ });
24
+ exports.Toaster = Toaster;
@@ -0,0 +1,72 @@
1
+ import { cn } from './chunk-HW6SLBO3.mjs';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import { cva } from 'class-variance-authority';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ var badgeVariants = cva(
7
+ [
8
+ "inline-flex",
9
+ "items-center",
10
+ "justify-center",
11
+ "rounded-md",
12
+ "px-md",
13
+ "py-xxs",
14
+ "align-middle",
15
+ "text-xs",
16
+ "font-normal",
17
+ "w-fit",
18
+ "whitespace-nowrap",
19
+ "shrink-0",
20
+ "[&>svg]:size-3",
21
+ "gap-1",
22
+ "[&>svg]:pointer-events-none",
23
+ "focus-visible:border-ring",
24
+ "focus-visible:ring-ring/50",
25
+ "focus-visible:ring-[3px]",
26
+ "aria-invalid:ring-destructive/20",
27
+ "dark:aria-invalid:ring-destructive/40",
28
+ "aria-invalid:border-destructive",
29
+ "transition-[color,box-shadow]",
30
+ "overflow-hidden",
31
+ "text-text-withbg"
32
+ ],
33
+ {
34
+ variants: {
35
+ variant: {
36
+ default: "bg-brand-primary text-text-primary",
37
+ secondary: "bg-bg-secondary",
38
+ destructive: "bg-danger-primary",
39
+ success: "bg-accent-success",
40
+ warning: "bg-accent-warning"
41
+ },
42
+ type: {
43
+ default: "",
44
+ circle: "size-[18px] rounded-full",
45
+ dot: "size-[6px] rounded-full !px-0 !py-0 text-transparent"
46
+ }
47
+ },
48
+ defaultVariants: {
49
+ variant: "default",
50
+ type: "default"
51
+ }
52
+ }
53
+ );
54
+ function Badge({
55
+ className,
56
+ variant,
57
+ type,
58
+ asChild = false,
59
+ ...props
60
+ }) {
61
+ const Comp = asChild ? Slot : "span";
62
+ return /* @__PURE__ */ jsx(
63
+ Comp,
64
+ {
65
+ "data-slot": "badge",
66
+ className: cn(badgeVariants({ variant, type }), className),
67
+ ...props
68
+ }
69
+ );
70
+ }
71
+
72
+ export { Badge, badgeVariants };
@@ -0,0 +1,87 @@
1
+ import { cn } from './chunk-HW6SLBO3.mjs';
2
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
3
+ import { cva } from 'class-variance-authority';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ var toggleVariants = cva(
7
+ [
8
+ "inline-flex",
9
+ "items-center",
10
+ "justify-center",
11
+ "shrink-0",
12
+ "whitespace-nowrap",
13
+ "font-normal",
14
+ "transition-all",
15
+ "[&_svg]:shrink-0 ",
16
+ "[&_svg]:pointer-events-none",
17
+ "outline-none",
18
+ "disabled:bg-transparent",
19
+ "disabled:text-bg-tertiary",
20
+ "disabled:cursor-not-allowed"
21
+ ],
22
+ {
23
+ variants: {
24
+ variant: {
25
+ primary: [
26
+ "text-text-primary",
27
+ "data-[state=on]:text-text-highlight",
28
+ "data-[state=on]:bg-brand-primary",
29
+ "hover:bg-bg-secondary"
30
+ ],
31
+ secondary: [
32
+ "text-text-secondary",
33
+ "data-[state=on]:text-text-highlight",
34
+ "data-[state=on]:bg-bg-secondary",
35
+ "hover:bg-bg-secondary "
36
+ ]
37
+ },
38
+ size: {
39
+ sm: [
40
+ "text-xs",
41
+ "h-5.5",
42
+ "gap-xxs",
43
+ "px-md",
44
+ "[&_svg:not([class*='size-'])]:size-3",
45
+ "rounded-uk-xs"
46
+ ],
47
+ base: [
48
+ "text-xs",
49
+ "h-7 ",
50
+ "gap-xs",
51
+ " px-lg",
52
+ "[&_svg:not([class*='size-'])]:size-3.5",
53
+ "rounded-uk-sm"
54
+ ],
55
+ lg: [
56
+ "text-sm",
57
+ "h-8",
58
+ " gap-xs",
59
+ "px-xl",
60
+ "[&_svg:not([class*='size-'])]:size-4",
61
+ "rounded-uk-md"
62
+ ]
63
+ }
64
+ },
65
+ defaultVariants: {
66
+ variant: "primary",
67
+ size: "base"
68
+ }
69
+ }
70
+ );
71
+ function Toggle({
72
+ className,
73
+ variant,
74
+ size,
75
+ ...props
76
+ }) {
77
+ return /* @__PURE__ */ jsx(
78
+ TogglePrimitive.Root,
79
+ {
80
+ "data-slot": "toggle",
81
+ className: cn(toggleVariants({ variant, size, className })),
82
+ ...props
83
+ }
84
+ );
85
+ }
86
+
87
+ export { Toggle, toggleVariants };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var clsx = require('clsx');
4
+ var tailwindMerge = require('tailwind-merge');
5
+
6
+ // src/utils/cn.ts
7
+ function cn(...inputs) {
8
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
9
+ }
10
+
11
+ exports.cn = cn;
@@ -0,0 +1 @@
1
+