@vuer-ai/vuer-uikit 0.0.49 → 0.0.50

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 (260) hide show
  1. package/dist/{chunk-GFPXAGJY.js → chunk-2GFFK54M.js} +10 -2
  2. package/dist/chunk-2QG7LH4Z.js +11 -0
  3. package/dist/{chunk-TBFX36YV.mjs → chunk-2XYF6PKB.mjs} +2 -9
  4. package/dist/chunk-36Q5EL3V.mjs +9 -0
  5. package/dist/{chunk-KEVAPLWO.js → chunk-37WZTN4K.js} +16 -4
  6. package/dist/{chunk-A77ETENM.js → chunk-3EC5RXZ4.js} +2 -9
  7. package/dist/chunk-4GZZAQRD.js +20 -0
  8. package/dist/chunk-6TMEH2MB.js +14 -0
  9. package/dist/{chunk-GCIH5IMQ.mjs → chunk-6TXFW7SC.mjs} +2 -6
  10. package/dist/chunk-73RTYZNL.mjs +9 -0
  11. package/dist/chunk-7E25WN6I.js +22 -0
  12. package/dist/chunk-7GCEJU5S.mjs +20 -0
  13. package/dist/{chunk-2FCKLHWA.js → chunk-CSRGTGG7.js} +1 -1
  14. package/dist/chunk-CV4KQETB.mjs +11 -0
  15. package/dist/{chunk-3QG5RA46.mjs → chunk-DCSGUVTI.mjs} +6 -4
  16. package/dist/chunk-EPHUL35Z.js +87 -0
  17. package/dist/{chunk-AJKD26TR.mjs → chunk-FIEU3WRH.mjs} +1 -1
  18. package/dist/chunk-FJ6UQH5F.mjs +9 -0
  19. package/dist/{chunk-ZBG3KB7B.mjs → chunk-GL6WU4QP.mjs} +10 -2
  20. package/dist/{chunk-PZ3FWTMB.mjs → chunk-GY65PGYR.mjs} +9 -4
  21. package/dist/{chunk-VAEPAW5L.js → chunk-HGT65KY2.js} +3 -7
  22. package/dist/chunk-HIY4N3LF.js +13 -0
  23. package/dist/chunk-JENUY5GL.js +11 -0
  24. package/dist/chunk-JOWWKLBU.js +11 -0
  25. package/dist/{chunk-5CWWM4L7.mjs → chunk-JXDPS6DY.mjs} +1 -4
  26. package/dist/{chunk-ADOYBPJS.mjs → chunk-KBG56PQD.mjs} +2 -9
  27. package/dist/{chunk-JIRSHP3D.js → chunk-L3BY6UPD.js} +1 -4
  28. package/dist/{chunk-QJPJVF7K.js → chunk-LF2XWR4S.js} +10 -2
  29. package/dist/{chunk-Q7JNDXDJ.mjs → chunk-MDYTJECN.mjs} +5 -1
  30. package/dist/chunk-MK2FKGWF.mjs +9 -0
  31. package/dist/chunk-MZPSV4QX.js +11 -0
  32. package/dist/{chunk-XBKQWS7J.js → chunk-N5V4HWT4.js} +2 -2
  33. package/dist/chunk-QD6L25T6.mjs +12 -0
  34. package/dist/chunk-QL3COLR6.js +20 -0
  35. package/dist/{chunk-PF36CKO7.mjs → chunk-SG2PPP7N.mjs} +3 -3
  36. package/dist/chunk-SOYKPBRO.mjs +9 -0
  37. package/dist/chunk-SWG7LAW5.mjs +9 -0
  38. package/dist/chunk-TF7YO6KP.mjs +9 -0
  39. package/dist/chunk-TOWQT55R.js +11 -0
  40. package/dist/{chunk-YOKGP5F7.js → chunk-UGCFQYE2.js} +9 -9
  41. package/dist/chunk-UY5QRJIG.mjs +18 -0
  42. package/dist/{chunk-TC4RAHDO.js → chunk-VI2VLWC6.js} +5 -1
  43. package/dist/{chunk-VSFCQCKQ.mjs → chunk-VYYH27HC.mjs} +1 -1
  44. package/dist/chunk-WZ6GCPO6.mjs +84 -0
  45. package/dist/chunk-X4ATCXSD.js +11 -0
  46. package/dist/{chunk-DWK23X7J.js → chunk-X6APNY5D.js} +9 -4
  47. package/dist/{chunk-NBG65POR.js → chunk-YKL2SFIC.js} +2 -9
  48. package/dist/{chunk-KAUA4ODT.mjs → chunk-ZKWN7MB4.mjs} +10 -2
  49. package/dist/chunk-ZLYXB2BN.js +11 -0
  50. package/dist/chunk-ZRS4RQCJ.mjs +18 -0
  51. package/dist/highlight-cursor/enhanced-components.d.mts +1 -1
  52. package/dist/highlight-cursor/enhanced-components.d.ts +1 -1
  53. package/dist/highlight-cursor/enhanced-components.js +8 -8
  54. package/dist/highlight-cursor/enhanced-components.mjs +3 -3
  55. package/dist/highlight-cursor/index.js +8 -8
  56. package/dist/highlight-cursor/index.mjs +3 -3
  57. package/dist/hooks/clientOnly.d.mts +1 -1
  58. package/dist/hooks/clientOnly.d.ts +1 -1
  59. package/dist/hooks/index.js +2 -2
  60. package/dist/hooks/index.mjs +1 -1
  61. package/dist/hooks/useDragSelect.d.mts +1 -1
  62. package/dist/hooks/useDragSelect.d.ts +1 -1
  63. package/dist/hooks/useDragSelect.js +2 -2
  64. package/dist/hooks/useDragSelect.mjs +1 -1
  65. package/dist/index.d.mts +1 -0
  66. package/dist/index.d.ts +1 -0
  67. package/dist/index.js +114 -105
  68. package/dist/index.mjs +27 -26
  69. package/dist/ui/avatar.js +1 -1
  70. package/dist/ui/avatar.mjs +1 -1
  71. package/dist/ui/badge.js +1 -1
  72. package/dist/ui/badge.mjs +1 -1
  73. package/dist/ui/button.d.mts +3 -1
  74. package/dist/ui/button.d.ts +3 -1
  75. package/dist/ui/button.js +4 -4
  76. package/dist/ui/button.mjs +2 -2
  77. package/dist/ui/card.js +1 -1
  78. package/dist/ui/card.mjs +1 -1
  79. package/dist/ui/checkbox.js +1 -1
  80. package/dist/ui/checkbox.mjs +1 -1
  81. package/dist/ui/collapsible.d.mts +3 -1
  82. package/dist/ui/collapsible.d.ts +3 -1
  83. package/dist/ui/collapsible.js +1 -1
  84. package/dist/ui/collapsible.mjs +1 -1
  85. package/dist/ui/drawer.js +1 -1
  86. package/dist/ui/drawer.mjs +1 -1
  87. package/dist/ui/dropdown.d.mts +12 -4
  88. package/dist/ui/dropdown.d.ts +12 -4
  89. package/dist/ui/dropdown.js +1 -1
  90. package/dist/ui/dropdown.mjs +1 -1
  91. package/dist/ui/form/CmInput.js +4 -4
  92. package/dist/ui/form/CmInput.mjs +3 -3
  93. package/dist/ui/form/DegInput.js +4 -4
  94. package/dist/ui/form/DegInput.mjs +3 -3
  95. package/dist/ui/form/EulerDegInput.js +5 -5
  96. package/dist/ui/form/EulerDegInput.mjs +4 -4
  97. package/dist/ui/form/EulerInput.js +4 -4
  98. package/dist/ui/form/EulerInput.mjs +3 -3
  99. package/dist/ui/form/EulerRadInput.js +5 -5
  100. package/dist/ui/form/EulerRadInput.mjs +4 -4
  101. package/dist/ui/form/InchInput.js +4 -4
  102. package/dist/ui/form/InchInput.mjs +3 -3
  103. package/dist/ui/form/IntInput.js +4 -4
  104. package/dist/ui/form/IntInput.mjs +3 -3
  105. package/dist/ui/form/KVectorInput.js +4 -4
  106. package/dist/ui/form/KVectorInput.mjs +3 -3
  107. package/dist/ui/form/NumberInput.js +3 -3
  108. package/dist/ui/form/NumberInput.mjs +2 -2
  109. package/dist/ui/form/QuaternionInput.js +4 -4
  110. package/dist/ui/form/QuaternionInput.mjs +3 -3
  111. package/dist/ui/form/RadInput.js +4 -4
  112. package/dist/ui/form/RadInput.mjs +3 -3
  113. package/dist/ui/form/TimeInput.js +4 -4
  114. package/dist/ui/form/TimeInput.mjs +3 -3
  115. package/dist/ui/form/Vec3Input.js +4 -4
  116. package/dist/ui/form/Vec3Input.mjs +3 -3
  117. package/dist/ui/form/VectorInput.js +3 -3
  118. package/dist/ui/form/VectorInput.mjs +2 -2
  119. package/dist/ui/form/index.js +29 -29
  120. package/dist/ui/form/index.mjs +15 -15
  121. package/dist/ui/index.d.mts +1 -0
  122. package/dist/ui/index.d.ts +1 -0
  123. package/dist/ui/index.js +107 -98
  124. package/dist/ui/index.mjs +26 -25
  125. package/dist/ui/input-numbers.js +1 -1
  126. package/dist/ui/input-numbers.mjs +1 -1
  127. package/dist/ui/input.js +1 -1
  128. package/dist/ui/input.mjs +1 -1
  129. package/dist/ui/layout.js +1 -1
  130. package/dist/ui/layout.mjs +1 -1
  131. package/dist/ui/modal.d.mts +7 -3
  132. package/dist/ui/modal.d.ts +7 -3
  133. package/dist/ui/modal.js +12 -12
  134. package/dist/ui/modal.mjs +2 -2
  135. package/dist/ui/pagination.js +10 -10
  136. package/dist/ui/pagination.mjs +3 -3
  137. package/dist/ui/popover.d.mts +3 -1
  138. package/dist/ui/popover.d.ts +3 -1
  139. package/dist/ui/popover.js +6 -6
  140. package/dist/ui/popover.mjs +2 -2
  141. package/dist/ui/radio-group.js +1 -1
  142. package/dist/ui/radio-group.mjs +1 -1
  143. package/dist/ui/resizable.js +1 -1
  144. package/dist/ui/resizable.mjs +1 -1
  145. package/dist/ui/select.d.mts +1 -1
  146. package/dist/ui/select.d.ts +1 -1
  147. package/dist/ui/select.js +1 -1
  148. package/dist/ui/select.mjs +1 -1
  149. package/dist/ui/separator.js +1 -1
  150. package/dist/ui/separator.mjs +1 -1
  151. package/dist/ui/sheet.d.mts +6 -2
  152. package/dist/ui/sheet.d.ts +6 -2
  153. package/dist/ui/sheet.js +10 -10
  154. package/dist/ui/sheet.mjs +2 -2
  155. package/dist/ui/sidebar.js +28 -28
  156. package/dist/ui/sidebar.mjs +4 -4
  157. package/dist/ui/skeleton.js +1 -1
  158. package/dist/ui/skeleton.mjs +1 -1
  159. package/dist/ui/slider.d.mts +1 -1
  160. package/dist/ui/slider.d.ts +1 -1
  161. package/dist/ui/slider.js +1 -1
  162. package/dist/ui/slider.mjs +1 -1
  163. package/dist/ui/switch.js +1 -1
  164. package/dist/ui/switch.mjs +1 -1
  165. package/dist/ui/tabs.d.mts +4 -4
  166. package/dist/ui/tabs.d.ts +4 -4
  167. package/dist/ui/tabs.js +1 -1
  168. package/dist/ui/tabs.mjs +1 -1
  169. package/dist/ui/textarea.js +1 -1
  170. package/dist/ui/textarea.mjs +1 -1
  171. package/dist/ui/theme/ThemeProvider.d.mts +16 -1
  172. package/dist/ui/theme/ThemeProvider.d.ts +16 -1
  173. package/dist/ui/theme/ThemeProvider.js +44 -4
  174. package/dist/ui/theme/ThemeProvider.mjs +2 -2
  175. package/dist/ui/theme/ThemeToggles.d.mts +6 -0
  176. package/dist/ui/theme/ThemeToggles.d.ts +6 -0
  177. package/dist/ui/theme/ThemeToggles.js +25 -0
  178. package/dist/ui/theme/ThemeToggles.mjs +12 -0
  179. package/dist/ui/theme/index.d.mts +1 -0
  180. package/dist/ui/theme/index.d.ts +1 -0
  181. package/dist/ui/theme/index.js +24 -6
  182. package/dist/ui/theme/index.mjs +13 -3
  183. package/dist/ui/theme/themeScript.js +2 -2
  184. package/dist/ui/theme/themeScript.mjs +1 -1
  185. package/dist/ui/theme/types.d.mts +2 -0
  186. package/dist/ui/theme/types.d.ts +2 -0
  187. package/dist/ui/timeline.js +1 -1
  188. package/dist/ui/timeline.mjs +1 -1
  189. package/dist/ui/toggle-group.js +1 -1
  190. package/dist/ui/toggle-group.mjs +1 -1
  191. package/dist/ui/toggle.js +1 -1
  192. package/dist/ui/toggle.mjs +1 -1
  193. package/dist/ui/tooltip.js +1 -1
  194. package/dist/ui/tooltip.mjs +1 -1
  195. package/dist/ui/tree-view-v2.js +1 -1
  196. package/dist/ui/tree-view-v2.mjs +1 -1
  197. package/dist/ui/tree-view.js +1 -1
  198. package/dist/ui/tree-view.mjs +1 -1
  199. package/dist/ui/version-badge.js +3 -3
  200. package/dist/ui/version-badge.mjs +2 -2
  201. package/package.json +1 -1
  202. package/src/hooks/clientOnly.tsx +4 -4
  203. package/src/hooks/useDragSelect.ts +15 -18
  204. package/src/ui/avatar.tsx +8 -8
  205. package/src/ui/button.tsx +9 -3
  206. package/src/ui/drag-selectable/createSelectable.tsx +1 -0
  207. package/src/ui/dropdown.tsx +4 -4
  208. package/src/ui/form/CmInput.tsx +5 -12
  209. package/src/ui/form/DegInput.tsx +5 -12
  210. package/src/ui/form/EulerDegInput.tsx +4 -9
  211. package/src/ui/form/EulerInput.tsx +19 -17
  212. package/src/ui/form/EulerRadInput.tsx +4 -9
  213. package/src/ui/form/InchInput.tsx +5 -12
  214. package/src/ui/form/IntInput.tsx +5 -12
  215. package/src/ui/form/KVectorInput.tsx +11 -16
  216. package/src/ui/form/NumberInput.tsx +13 -15
  217. package/src/ui/form/QuaternionInput.tsx +18 -15
  218. package/src/ui/form/RadInput.tsx +5 -12
  219. package/src/ui/form/TimeInput.tsx +5 -12
  220. package/src/ui/form/Vec3Input.tsx +16 -14
  221. package/src/ui/form/VectorInput.tsx +8 -12
  222. package/src/ui/form/index.ts +1 -1
  223. package/src/ui/modal.tsx +10 -2
  224. package/src/ui/pagination.tsx +1 -5
  225. package/src/ui/popover.tsx +5 -1
  226. package/src/ui/sheet.tsx +10 -2
  227. package/src/ui/sidebar.tsx +1 -1
  228. package/src/ui/theme/ThemeProvider.tsx +14 -15
  229. package/src/ui/theme/ThemeToggles.tsx +105 -0
  230. package/src/ui/theme/index.ts +1 -0
  231. package/src/ui/theme/themeScript.tsx +4 -3
  232. package/src/ui/theme/types.ts +2 -0
  233. package/dist/chunk-2QBMOSVM.js +0 -22
  234. package/dist/chunk-3LJI6I2O.mjs +0 -20
  235. package/dist/chunk-43FK6CBY.mjs +0 -18
  236. package/dist/chunk-4PWIOKV6.mjs +0 -18
  237. package/dist/chunk-4UGXCXXM.mjs +0 -18
  238. package/dist/chunk-5UHOCEWC.mjs +0 -18
  239. package/dist/chunk-6AWSAY7A.js +0 -24
  240. package/dist/chunk-6N2Q4EQ2.js +0 -20
  241. package/dist/chunk-6N3UJ4AX.mjs +0 -20
  242. package/dist/chunk-7KVGTDDO.js +0 -20
  243. package/dist/chunk-AB4GGLJ5.mjs +0 -18
  244. package/dist/chunk-CPZIDU2J.js +0 -20
  245. package/dist/chunk-E2UGNYWU.js +0 -22
  246. package/dist/chunk-EGYK5FED.mjs +0 -18
  247. package/dist/chunk-EJ7D53ZF.js +0 -20
  248. package/dist/chunk-ICRVQLUS.mjs +0 -22
  249. package/dist/chunk-IOVNKUJ6.js +0 -16
  250. package/dist/chunk-JHHA2CGJ.mjs +0 -14
  251. package/dist/chunk-LCS67P4A.mjs +0 -18
  252. package/dist/chunk-LD32BCCX.js +0 -20
  253. package/dist/chunk-MYRZ2ZV5.mjs +0 -21
  254. package/dist/chunk-TPX5AJ7Z.js +0 -23
  255. package/dist/chunk-TWQSUO5Q.js +0 -20
  256. package/dist/chunk-UQQPHWTA.js +0 -20
  257. /package/dist/{chunk-AMB2H6WS.mjs → chunk-6NK7UMFP.mjs} +0 -0
  258. /package/dist/{chunk-Y2QBWXB4.js → chunk-EDJTVLBN.js} +0 -0
  259. /package/dist/{chunk-72PCXNEI.js → chunk-FRMG67QP.js} +0 -0
  260. /package/dist/{chunk-MS5G6UZ4.mjs → chunk-NSI47INE.mjs} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuer-ai/vuer-uikit",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "React UI Kit components",
5
5
  "keywords": [
6
6
  "react",
@@ -18,9 +18,9 @@ export function clientOnly<T>(fn: () => T): T | undefined {
18
18
  * @param fallback - Optional fallback to render server-side
19
19
  * @returns A component that avoids hydration mismatches
20
20
  */
21
- export function createClientOnlyComponent<P = any>(
21
+ export function createClientOnlyComponent<P extends object = Record<string, unknown>>(
22
22
  Component: React.ComponentType<P>,
23
- fallback?: React.ComponentType<any>,
23
+ fallback?: React.ComponentType<P>,
24
24
  ): React.ComponentType<P> {
25
25
  return function ClientOnlyWrapper(props: P) {
26
26
  const [isClient, setIsClient] = React.useState(false);
@@ -30,10 +30,10 @@ export function createClientOnlyComponent<P = any>(
30
30
  }, []);
31
31
 
32
32
  if (!isClient) {
33
- return fallback ? React.createElement(fallback as any, props as any) : null;
33
+ return fallback ? React.createElement(fallback, props) : null;
34
34
  }
35
35
 
36
- return React.createElement(Component as any, props as any);
36
+ return React.createElement(Component, props);
37
37
  } as React.ComponentType<P>;
38
38
  }
39
39
 
@@ -1,4 +1,4 @@
1
- import { useState, useCallback, useEffect } from 'react';
1
+ import { useState, useCallback, useEffect } from "react";
2
2
 
3
3
  export interface UseDragSelectOptions {
4
4
  onSelectionChange?: (selectedItems: Set<string>) => void;
@@ -7,7 +7,7 @@ export interface UseDragSelectOptions {
7
7
  export function useDragSelect(options: UseDragSelectOptions = {}) {
8
8
  const [selectedItems, setSelectedItems] = useState<Set<string>>(new Set());
9
9
  const [isDragging, setIsDragging] = useState(false);
10
- const [dragMode, setDragMode] = useState<'toggle' | 'replace'>('toggle');
10
+ const [dragMode, setDragMode] = useState<"toggle" | "replace">("toggle");
11
11
  const [dragStartItem, setDragStartItem] = useState<string | null>(null);
12
12
 
13
13
  // Notify when selection changes
@@ -21,10 +21,10 @@ export function useDragSelect(options: UseDragSelectOptions = {}) {
21
21
  setDragStartItem(id);
22
22
 
23
23
  // Determine drag mode based on modifier keys
24
- const mode = e.ctrlKey || e.metaKey ? 'replace' : 'toggle';
24
+ const mode = e.ctrlKey || e.metaKey ? "replace" : "toggle";
25
25
  setDragMode(mode);
26
26
 
27
- if (mode === 'replace') {
27
+ if (mode === "replace") {
28
28
  // In replace mode, start fresh selection
29
29
  setSelectedItems(new Set([id]));
30
30
  } else {
@@ -46,7 +46,7 @@ export function useDragSelect(options: UseDragSelectOptions = {}) {
46
46
  if (!isDragging) return;
47
47
  if (id === dragStartItem) return; // Don't re-process the starting item
48
48
 
49
- if (dragMode === 'replace') {
49
+ if (dragMode === "replace") {
50
50
  setSelectedItems((prev) => new Set([...prev, id]));
51
51
  } else {
52
52
  // In toggle mode, each item toggles its own state
@@ -61,7 +61,7 @@ export function useDragSelect(options: UseDragSelectOptions = {}) {
61
61
  });
62
62
  }
63
63
  },
64
- [isDragging, dragMode, dragStartItem]
64
+ [isDragging, dragMode, dragStartItem],
65
65
  );
66
66
 
67
67
  const handleMouseUp = useCallback(() => {
@@ -73,18 +73,15 @@ export function useDragSelect(options: UseDragSelectOptions = {}) {
73
73
  setSelectedItems(new Set());
74
74
  }, []);
75
75
 
76
- const isSelected = useCallback(
77
- (id: string) => selectedItems.has(id),
78
- [selectedItems]
79
- );
76
+ const isSelected = useCallback((id: string) => selectedItems.has(id), [selectedItems]);
80
77
 
81
78
  const getItemProps = useCallback(
82
79
  (id: string) => ({
83
- 'data-selected': selectedItems.has(id),
80
+ "data-selected": selectedItems.has(id),
84
81
  onMouseDown: (e: React.MouseEvent) => handleMouseDown(id, e),
85
82
  onMouseEnter: () => handleMouseEnter(id),
86
83
  }),
87
- [selectedItems, handleMouseDown, handleMouseEnter]
84
+ [selectedItems, handleMouseDown, handleMouseEnter],
88
85
  );
89
86
 
90
87
  // Handle global mouse up and escape key
@@ -94,17 +91,17 @@ export function useDragSelect(options: UseDragSelectOptions = {}) {
94
91
  setDragStartItem(null);
95
92
  };
96
93
  const handleEscape = (e: KeyboardEvent) => {
97
- if (e.key === 'Escape') {
94
+ if (e.key === "Escape") {
98
95
  clearSelection();
99
96
  }
100
97
  };
101
98
 
102
- document.addEventListener('mouseup', handleGlobalMouseUp);
103
- document.addEventListener('keydown', handleEscape);
99
+ document.addEventListener("mouseup", handleGlobalMouseUp);
100
+ document.addEventListener("keydown", handleEscape);
104
101
 
105
102
  return () => {
106
- document.removeEventListener('mouseup', handleGlobalMouseUp);
107
- document.removeEventListener('keydown', handleEscape);
103
+ document.removeEventListener("mouseup", handleGlobalMouseUp);
104
+ document.removeEventListener("keydown", handleEscape);
108
105
  };
109
106
  }, [clearSelection]);
110
107
 
@@ -114,4 +111,4 @@ export function useDragSelect(options: UseDragSelectOptions = {}) {
114
111
  clearSelection,
115
112
  getItemProps,
116
113
  };
117
- }
114
+ }
package/src/ui/avatar.tsx CHANGED
@@ -6,7 +6,7 @@ import { cn, createClientOnlyComponent } from "../hooks";
6
6
  /**
7
7
  * Avatar root component that displays a user's profile image with fallback support.
8
8
  * Based on Radix UI Avatar primitive with default styling for a circular avatar.
9
- *
9
+ *
10
10
  * @param className - Additional CSS classes to apply
11
11
  * @param props - All standard Radix Avatar.Root props are supported
12
12
  */
@@ -35,7 +35,7 @@ export const AvatarSSRFallback = ({ className }: { className?: string }) => (
35
35
  /**
36
36
  * Main Avatar component with client-side rendering support and SSR fallback.
37
37
  * Use this as the container for AvatarImage and AvatarFallback components.
38
- *
38
+ *
39
39
  * @example
40
40
  * ```tsx
41
41
  * <Avatar>
@@ -49,7 +49,7 @@ export const Avatar = createClientOnlyComponent(AvatarRoot, AvatarSSRFallback);
49
49
  /**
50
50
  * Avatar image component for displaying the actual user image.
51
51
  * If the image fails to load, it will automatically fall back to AvatarFallback.
52
- *
52
+ *
53
53
  * @param src - Image source URL
54
54
  * @param alt - Alternative text for the image
55
55
  * @param className - Additional CSS classes to apply
@@ -77,7 +77,7 @@ export const AvatarImageFallback = ({ className }: { className?: string }) => (
77
77
  /**
78
78
  * Avatar image component with client-side rendering support and SSR fallback.
79
79
  * Displays the user's profile image with automatic fallback support.
80
- *
80
+ *
81
81
  * @example
82
82
  * ```tsx
83
83
  * <AvatarImage src="/user-avatar.jpg" alt="John Doe" />
@@ -88,7 +88,7 @@ export const AvatarImage = createClientOnlyComponent(AvatarImageRoot, AvatarImag
88
88
  /**
89
89
  * Avatar fallback component that displays when the image fails to load.
90
90
  * Typically contains user initials or a default icon.
91
- *
91
+ *
92
92
  * @param className - Additional CSS classes to apply
93
93
  * @param children - Content to display (usually initials)
94
94
  * @param props - All standard Radix Avatar.Fallback props are supported
@@ -132,7 +132,7 @@ export const AvatarFallbackSSR = ({
132
132
  /**
133
133
  * Avatar fallback component with client-side rendering support and SSR fallback.
134
134
  * Displays fallback content when the avatar image fails to load.
135
- *
135
+ *
136
136
  * @example
137
137
  * ```tsx
138
138
  * <AvatarFallback>JD</AvatarFallback>
@@ -157,12 +157,12 @@ export interface AvatarGroupProps {
157
157
  /**
158
158
  * Avatar group component for displaying multiple avatars in a stacked layout.
159
159
  * Supports configurable spacing and a maximum count with overflow indicator.
160
- *
160
+ *
161
161
  * @param children - Avatar components to display
162
162
  * @param className - Additional CSS classes to apply
163
163
  * @param spacing - Spacing between avatars ("tight" | "normal" | "loose"), defaults to "normal"
164
164
  * @param max - Maximum number of avatars to show, remaining count will be shown as "+N"
165
- *
165
+ *
166
166
  * @example
167
167
  * ```tsx
168
168
  * <AvatarGroup spacing="tight" max={3}>
package/src/ui/button.tsx CHANGED
@@ -62,6 +62,10 @@ export const buttonVariants = cva(
62
62
  lg: ["text-uk-lg", "h-9", " gap-xs", "px-xl", "[&_svg:not([class*='size-'])]:size-5"],
63
63
  },
64
64
  icon: { false: null, true: null },
65
+ value: {
66
+ false: null,
67
+ true: ["text-brand-primary", "[&_svg]:text-brand-primary"]
68
+ },
65
69
  },
66
70
  compoundVariants: [
67
71
  { size: "sm", icon: true, class: ["px-xs", "py-xs", " size-6"] },
@@ -72,12 +76,14 @@ export const buttonVariants = cva(
72
76
  variant: "primary",
73
77
  size: "base",
74
78
  icon: false,
79
+ value: false,
75
80
  },
76
81
  },
77
82
  );
78
83
 
79
- interface ButtonProps extends ComponentProps<"button">, VariantProps<typeof buttonVariants> {
84
+ interface ButtonProps extends Omit<ComponentProps<"button">, "value">, VariantProps<typeof buttonVariants> {
80
85
  asChild?: boolean;
86
+ value?: boolean;
81
87
  }
82
88
 
83
89
  /**
@@ -90,7 +96,7 @@ interface ButtonProps extends ComponentProps<"button">, VariantProps<typeof butt
90
96
  * @param asChild - When true, renders the child element instead of a button using Slot
91
97
  */
92
98
  const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(
93
- { className, variant, size, icon, asChild = false, ...props },
99
+ { className, variant, size, icon, value, asChild = false, ...props },
94
100
  ref,
95
101
  ) {
96
102
  const Comp = asChild ? Slot : "button";
@@ -99,7 +105,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(
99
105
  <Comp
100
106
  ref={ref}
101
107
  data-slot="button"
102
- className={cn(buttonVariants({ variant, size, icon, className }))}
108
+ className={cn(buttonVariants({ variant, size, icon, value, className }))}
103
109
  {...props}
104
110
  />
105
111
  );
@@ -1,4 +1,5 @@
1
1
  import React, { ComponentType, useEffect } from "react";
2
+
2
3
  import { useDragSelectContext } from "./DragSelectProvider";
3
4
 
4
5
  interface SelectableProps {
@@ -47,7 +47,7 @@ function DropdownMenuTriggerFallback({
47
47
  if (asChild) {
48
48
  return <>{children}</>;
49
49
  }
50
-
50
+
51
51
  return (
52
52
  <button
53
53
  data-slot="dropdown-menu-trigger"
@@ -252,7 +252,7 @@ function DropdownMenuItemFallback({
252
252
  );
253
253
  }
254
254
 
255
- const DropdownMenuItem = createClientOnlyComponent(DropdownMenuItemRoot, DropdownMenuItemFallback);
255
+ const DropdownMenuItem = createClientOnlyComponent(DropdownMenuItemRoot as any, DropdownMenuItemFallback);
256
256
 
257
257
  function DropdownMenuCheckboxItemRoot({
258
258
  className,
@@ -349,7 +349,7 @@ function DropdownMenuCheckboxItemFallback({
349
349
  }
350
350
 
351
351
  const DropdownMenuCheckboxItem = createClientOnlyComponent(
352
- DropdownMenuCheckboxItemRoot,
352
+ DropdownMenuCheckboxItemRoot as any,
353
353
  DropdownMenuCheckboxItemFallback,
354
354
  );
355
355
 
@@ -460,7 +460,7 @@ function DropdownMenuRadioItemFallback({
460
460
  }
461
461
 
462
462
  const DropdownMenuRadioItem = createClientOnlyComponent(
463
- DropdownMenuRadioItemRoot,
463
+ DropdownMenuRadioItemRoot as any,
464
464
  DropdownMenuRadioItemFallback,
465
465
  );
466
466
 
@@ -1,19 +1,12 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { NumberInput, NumberInputProps } from "./NumberInput";
3
4
 
4
5
  interface CmInputProps extends Omit<NumberInputProps, "unit"> {}
5
6
 
6
- const CmInput = forwardRef<HTMLInputElement, CmInputProps>(
7
- function CmInput(props, ref) {
8
- return (
9
- <NumberInput
10
- ref={ref}
11
- unit="cm"
12
- {...props}
13
- />
14
- );
15
- }
16
- );
7
+ const CmInput = forwardRef<HTMLInputElement, CmInputProps>(function CmInput(props, ref) {
8
+ return <NumberInput ref={ref} unit="cm" {...props} />;
9
+ });
17
10
 
18
11
  export { CmInput };
19
- export type { CmInputProps };
12
+ export type { CmInputProps };
@@ -1,19 +1,12 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { NumberInput, NumberInputProps } from "./NumberInput";
3
4
 
4
5
  interface DegInputProps extends Omit<NumberInputProps, "unit"> {}
5
6
 
6
- const DegInput = forwardRef<HTMLInputElement, DegInputProps>(
7
- function DegInput(props, ref) {
8
- return (
9
- <NumberInput
10
- ref={ref}
11
- unit="°"
12
- {...props}
13
- />
14
- );
15
- }
16
- );
7
+ const DegInput = forwardRef<HTMLInputElement, DegInputProps>(function DegInput(props, ref) {
8
+ return <NumberInput ref={ref} unit="°" {...props} />;
9
+ });
17
10
 
18
11
  export { DegInput };
19
- export type { DegInputProps };
12
+ export type { DegInputProps };
@@ -1,19 +1,14 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { EulerInput, EulerInputProps } from "./EulerInput";
3
4
 
4
5
  interface EulerDegInputProps extends Omit<EulerInputProps, "unit"> {}
5
6
 
6
7
  const EulerDegInput = forwardRef<HTMLDivElement, EulerDegInputProps>(
7
8
  function EulerDegInput(props, ref) {
8
- return (
9
- <EulerInput
10
- ref={ref}
11
- unit="deg"
12
- {...props}
13
- />
14
- );
15
- }
9
+ return <EulerInput ref={ref} unit="deg" {...props} />;
10
+ },
16
11
  );
17
12
 
18
13
  export { EulerDegInput };
19
- export type { EulerDegInputProps };
14
+ export type { EulerDegInputProps };
@@ -1,4 +1,5 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { VectorInput, VectorInputProps } from "./VectorInput";
3
4
 
4
5
  interface EulerInputProps extends Omit<VectorInputProps, "value" | "labels" | "onValuesChange"> {
@@ -7,22 +8,23 @@ interface EulerInputProps extends Omit<VectorInputProps, "value" | "labels" | "o
7
8
  unit?: "deg" | "rad";
8
9
  }
9
10
 
10
- const EulerInput = forwardRef<HTMLDivElement, EulerInputProps>(
11
- function EulerInput({ value, onValuesChange, unit = "deg", ...props }, ref) {
12
- const unitSymbol = unit === "deg" ? "°" : "rad";
13
- const labels = [`x${unitSymbol}`, `y${unitSymbol}`, `z${unitSymbol}`];
14
-
15
- return (
16
- <VectorInput
17
- ref={ref}
18
- value={value}
19
- onValuesChange={onValuesChange as (value: number[]) => void}
20
- labels={labels}
21
- {...props}
22
- />
23
- );
24
- }
25
- );
11
+ const EulerInput = forwardRef<HTMLDivElement, EulerInputProps>(function EulerInput(
12
+ { value, onValuesChange, unit = "deg", ...props },
13
+ ref,
14
+ ) {
15
+ const unitSymbol = unit === "deg" ? "°" : "rad";
16
+ const labels = [`x${unitSymbol}`, `y${unitSymbol}`, `z${unitSymbol}`];
17
+
18
+ return (
19
+ <VectorInput
20
+ ref={ref}
21
+ value={value}
22
+ onValuesChange={onValuesChange as (value: number[]) => void}
23
+ labels={labels}
24
+ {...props}
25
+ />
26
+ );
27
+ });
26
28
 
27
29
  export { EulerInput };
28
- export type { EulerInputProps };
30
+ export type { EulerInputProps };
@@ -1,19 +1,14 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { EulerInput, EulerInputProps } from "./EulerInput";
3
4
 
4
5
  interface EulerRadInputProps extends Omit<EulerInputProps, "unit"> {}
5
6
 
6
7
  const EulerRadInput = forwardRef<HTMLDivElement, EulerRadInputProps>(
7
8
  function EulerRadInput(props, ref) {
8
- return (
9
- <EulerInput
10
- ref={ref}
11
- unit="rad"
12
- {...props}
13
- />
14
- );
15
- }
9
+ return <EulerInput ref={ref} unit="rad" {...props} />;
10
+ },
16
11
  );
17
12
 
18
13
  export { EulerRadInput };
19
- export type { EulerRadInputProps };
14
+ export type { EulerRadInputProps };
@@ -1,19 +1,12 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { NumberInput, NumberInputProps } from "./NumberInput";
3
4
 
4
5
  interface InchInputProps extends Omit<NumberInputProps, "unit"> {}
5
6
 
6
- const InchInput = forwardRef<HTMLInputElement, InchInputProps>(
7
- function InchInput(props, ref) {
8
- return (
9
- <NumberInput
10
- ref={ref}
11
- unit="in"
12
- {...props}
13
- />
14
- );
15
- }
16
- );
7
+ const InchInput = forwardRef<HTMLInputElement, InchInputProps>(function InchInput(props, ref) {
8
+ return <NumberInput ref={ref} unit="in" {...props} />;
9
+ });
17
10
 
18
11
  export { InchInput };
19
- export type { InchInputProps };
12
+ export type { InchInputProps };
@@ -1,19 +1,12 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { NumberInput, NumberInputProps } from "./NumberInput";
3
4
 
4
5
  interface IntInputProps extends Omit<NumberInputProps, "step"> {}
5
6
 
6
- const IntInput = forwardRef<HTMLInputElement, IntInputProps>(
7
- function IntInput(props, ref) {
8
- return (
9
- <NumberInput
10
- ref={ref}
11
- step={1}
12
- {...props}
13
- />
14
- );
15
- }
16
- );
7
+ const IntInput = forwardRef<HTMLInputElement, IntInputProps>(function IntInput(props, ref) {
8
+ return <NumberInput ref={ref} step={1} {...props} />;
9
+ });
17
10
 
18
11
  export { IntInput };
19
- export type { IntInputProps };
12
+ export type { IntInputProps };
@@ -1,25 +1,20 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { VectorInput, VectorInputProps } from "./VectorInput";
3
4
 
4
5
  interface KVectorInputProps extends Omit<VectorInputProps, "labels"> {
5
6
  dimensions?: number;
6
7
  }
7
8
 
8
- const KVectorInput = forwardRef<HTMLDivElement, KVectorInputProps>(
9
- function KVectorInput({ value, dimensions, ...props }, ref) {
10
- const k = dimensions || value.length;
11
- const labels = Array.from({ length: k }, (_, i) => `${i}`);
12
-
13
- return (
14
- <VectorInput
15
- ref={ref}
16
- value={value}
17
- labels={labels}
18
- {...props}
19
- />
20
- );
21
- }
22
- );
9
+ const KVectorInput = forwardRef<HTMLDivElement, KVectorInputProps>(function KVectorInput(
10
+ { value, dimensions, ...props },
11
+ ref,
12
+ ) {
13
+ const k = dimensions || value.length;
14
+ const labels = Array.from({ length: k }, (_, i) => `${i}`);
15
+
16
+ return <VectorInput ref={ref} value={value} labels={labels} {...props} />;
17
+ });
23
18
 
24
19
  export { KVectorInput };
25
- export type { KVectorInputProps };
20
+ export type { KVectorInputProps };
@@ -1,24 +1,22 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { InputRoot, InputRootProps, InputSlot } from "../input";
3
4
 
4
5
  interface NumberInputProps extends Omit<InputRootProps, "type"> {
5
6
  unit?: string;
6
7
  }
7
8
 
8
- const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
9
- function NumberInput({ unit, children, ...props }, ref) {
10
- return (
11
- <InputRoot ref={ref} type="number" {...props}>
12
- {children}
13
- {unit && (
14
- <InputSlot side="right">
15
- {unit}
16
- </InputSlot>
17
- )}
18
- </InputRoot>
19
- );
20
- }
21
- );
9
+ const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(function NumberInput(
10
+ { unit, children, ...props },
11
+ ref,
12
+ ) {
13
+ return (
14
+ <InputRoot ref={ref} type="number" {...props}>
15
+ {children}
16
+ {unit && <InputSlot side="right">{unit}</InputSlot>}
17
+ </InputRoot>
18
+ );
19
+ });
22
20
 
23
21
  export { NumberInput };
24
- export type { NumberInputProps };
22
+ export type { NumberInputProps };
@@ -1,24 +1,27 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { VectorInput, VectorInputProps } from "./VectorInput";
3
4
 
4
- interface QuaternionInputProps extends Omit<VectorInputProps, "value" | "labels" | "onValuesChange"> {
5
+ interface QuaternionInputProps
6
+ extends Omit<VectorInputProps, "value" | "labels" | "onValuesChange"> {
5
7
  value: [number, number, number, number];
6
8
  onValuesChange?: (value: [number, number, number, number]) => void;
7
9
  }
8
10
 
9
- const QuaternionInput = forwardRef<HTMLDivElement, QuaternionInputProps>(
10
- function QuaternionInput({ value, onValuesChange, ...props }, ref) {
11
- return (
12
- <VectorInput
13
- ref={ref}
14
- value={value}
15
- onValuesChange={onValuesChange as (value: number[]) => void}
16
- labels={["w", "x", "y", "z"]}
17
- {...props}
18
- />
19
- );
20
- }
21
- );
11
+ const QuaternionInput = forwardRef<HTMLDivElement, QuaternionInputProps>(function QuaternionInput(
12
+ { value, onValuesChange, ...props },
13
+ ref,
14
+ ) {
15
+ return (
16
+ <VectorInput
17
+ ref={ref}
18
+ value={value}
19
+ onValuesChange={onValuesChange as (value: number[]) => void}
20
+ labels={["w", "x", "y", "z"]}
21
+ {...props}
22
+ />
23
+ );
24
+ });
22
25
 
23
26
  export { QuaternionInput };
24
- export type { QuaternionInputProps };
27
+ export type { QuaternionInputProps };
@@ -1,19 +1,12 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { NumberInput, NumberInputProps } from "./NumberInput";
3
4
 
4
5
  interface RadInputProps extends Omit<NumberInputProps, "unit"> {}
5
6
 
6
- const RadInput = forwardRef<HTMLInputElement, RadInputProps>(
7
- function RadInput(props, ref) {
8
- return (
9
- <NumberInput
10
- ref={ref}
11
- unit="rad"
12
- {...props}
13
- />
14
- );
15
- }
16
- );
7
+ const RadInput = forwardRef<HTMLInputElement, RadInputProps>(function RadInput(props, ref) {
8
+ return <NumberInput ref={ref} unit="rad" {...props} />;
9
+ });
17
10
 
18
11
  export { RadInput };
19
- export type { RadInputProps };
12
+ export type { RadInputProps };
@@ -1,19 +1,12 @@
1
1
  import { forwardRef } from "react";
2
+
2
3
  import { NumberInput, NumberInputProps } from "./NumberInput";
3
4
 
4
5
  interface TimeInputProps extends Omit<NumberInputProps, "unit"> {}
5
6
 
6
- const TimeInput = forwardRef<HTMLInputElement, TimeInputProps>(
7
- function TimeInput(props, ref) {
8
- return (
9
- <NumberInput
10
- ref={ref}
11
- unit="s"
12
- {...props}
13
- />
14
- );
15
- }
16
- );
7
+ const TimeInput = forwardRef<HTMLInputElement, TimeInputProps>(function TimeInput(props, ref) {
8
+ return <NumberInput ref={ref} unit="s" {...props} />;
9
+ });
17
10
 
18
11
  export { TimeInput };
19
- export type { TimeInputProps };
12
+ export type { TimeInputProps };