@vuer-ai/vuer-uikit 0.0.26 → 0.0.28

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 (152) hide show
  1. package/dist/{chunk-ZTNXAV64.js → chunk-3ZFILFNB.js} +4 -4
  2. package/dist/{chunk-Q3GXSHJV.mjs → chunk-4QERYDMC.mjs} +3 -3
  3. package/dist/{chunk-5TVG5JK5.js → chunk-5CENHVP3.js} +18 -0
  4. package/dist/chunk-7DRJLKR6.js +38 -0
  5. package/dist/{chunk-ZRJ5JCVG.mjs → chunk-7LDFQGYF.mjs} +1 -1
  6. package/dist/chunk-BAAW5VSE.js +142 -0
  7. package/dist/{chunk-G6PRZVSE.mjs → chunk-D6HWHISR.mjs} +18 -0
  8. package/dist/{chunk-CCGCEN7Z.js → chunk-EMHRYI5O.js} +1 -1
  9. package/dist/chunk-KMIPKXV2.mjs +108 -0
  10. package/dist/chunk-SBHPTJE4.mjs +29 -0
  11. package/dist/{chunk-LHWH4GP5.mjs → chunk-YIBD2FEV.mjs} +1 -1
  12. package/dist/{chunk-RTURVQIP.js → chunk-Z3LP6DAV.js} +1 -1
  13. package/dist/highlight-cursor/cursor-context.d.mts +2 -2
  14. package/dist/highlight-cursor/cursor-context.d.ts +2 -2
  15. package/dist/highlight-cursor/enhanced-components.d.mts +4 -4
  16. package/dist/highlight-cursor/enhanced-components.d.ts +4 -4
  17. package/dist/highlight-cursor/enhanced-components.js +2 -1
  18. package/dist/highlight-cursor/enhanced-components.mjs +2 -1
  19. package/dist/highlight-cursor/index.js +2 -1
  20. package/dist/highlight-cursor/index.mjs +2 -1
  21. package/dist/highlight-cursor/with-cursor.d.mts +2 -2
  22. package/dist/highlight-cursor/with-cursor.d.ts +2 -2
  23. package/dist/index.css +2 -2
  24. package/dist/index.d.mts +5 -3
  25. package/dist/index.d.ts +5 -3
  26. package/dist/index.js +60 -15
  27. package/dist/index.mjs +8 -7
  28. package/dist/styles/theme.css +1 -1
  29. package/dist/ui/avatar.d.mts +19 -6
  30. package/dist/ui/avatar.d.ts +19 -6
  31. package/dist/ui/avatar.js +31 -6
  32. package/dist/ui/avatar.mjs +3 -2
  33. package/dist/ui/badge.js +2 -1
  34. package/dist/ui/badge.mjs +2 -1
  35. package/dist/ui/button.d.mts +2 -2
  36. package/dist/ui/button.d.ts +2 -2
  37. package/dist/ui/button.js +2 -1
  38. package/dist/ui/button.mjs +2 -1
  39. package/dist/ui/card.js +2 -1
  40. package/dist/ui/card.mjs +2 -1
  41. package/dist/ui/checkbox.js +4 -3
  42. package/dist/ui/checkbox.mjs +3 -2
  43. package/dist/ui/collapsible.js +2 -1
  44. package/dist/ui/collapsible.mjs +2 -1
  45. package/dist/ui/drawer.d.mts +11 -11
  46. package/dist/ui/drawer.d.ts +11 -11
  47. package/dist/ui/drawer.js +2 -1
  48. package/dist/ui/drawer.mjs +2 -1
  49. package/dist/ui/dropdown.js +2 -1
  50. package/dist/ui/dropdown.mjs +2 -1
  51. package/dist/ui/index.d.mts +4 -3
  52. package/dist/ui/index.d.ts +4 -3
  53. package/dist/ui/index.js +44 -15
  54. package/dist/ui/index.mjs +8 -7
  55. package/dist/ui/input-numbers.d.mts +2 -2
  56. package/dist/ui/input-numbers.d.ts +2 -2
  57. package/dist/ui/input-numbers.js +2 -1
  58. package/dist/ui/input-numbers.mjs +2 -1
  59. package/dist/ui/input.d.mts +4 -4
  60. package/dist/ui/input.d.ts +4 -4
  61. package/dist/ui/input.js +2 -1
  62. package/dist/ui/input.mjs +2 -1
  63. package/dist/ui/layout.js +2 -1
  64. package/dist/ui/layout.mjs +2 -1
  65. package/dist/ui/modal.js +2 -1
  66. package/dist/ui/modal.mjs +2 -1
  67. package/dist/ui/popover.js +2 -1
  68. package/dist/ui/popover.mjs +2 -1
  69. package/dist/ui/radio-group.js +2 -1
  70. package/dist/ui/radio-group.mjs +2 -1
  71. package/dist/ui/select.d.mts +1 -1
  72. package/dist/ui/select.d.ts +1 -1
  73. package/dist/ui/select.js +2 -1
  74. package/dist/ui/select.mjs +2 -1
  75. package/dist/ui/slider.d.mts +2 -2
  76. package/dist/ui/slider.d.ts +2 -2
  77. package/dist/ui/slider.js +2 -1
  78. package/dist/ui/slider.mjs +2 -1
  79. package/dist/ui/switch.js +2 -1
  80. package/dist/ui/switch.mjs +2 -1
  81. package/dist/ui/tabs.js +2 -1
  82. package/dist/ui/tabs.mjs +2 -1
  83. package/dist/ui/textarea.d.mts +1 -1
  84. package/dist/ui/textarea.d.ts +1 -1
  85. package/dist/ui/textarea.js +2 -1
  86. package/dist/ui/textarea.mjs +2 -1
  87. package/dist/ui/{theme-context/theme-context.d.ts → theme/ThemeProvider.d.mts} +1 -1
  88. package/dist/ui/{theme-context/theme-context.d.mts → theme/ThemeProvider.d.ts} +1 -1
  89. package/dist/ui/theme/ThemeProvider.js +15 -0
  90. package/dist/ui/theme/ThemeProvider.mjs +2 -0
  91. package/dist/ui/theme/index.d.mts +5 -0
  92. package/dist/ui/theme/index.d.ts +5 -0
  93. package/dist/ui/theme/index.js +20 -0
  94. package/dist/ui/theme/index.mjs +3 -0
  95. package/dist/ui/{theme-context/theme-script.d.ts → theme/themeScript.d.mts} +10 -4
  96. package/dist/ui/{theme-context/theme-script.d.mts → theme/themeScript.d.ts} +10 -4
  97. package/dist/ui/theme/themeScript.js +10 -0
  98. package/dist/ui/theme/themeScript.mjs +1 -0
  99. package/dist/ui/{theme-context/theme-types.d.mts → theme/types.d.mts} +1 -1
  100. package/dist/ui/{theme-context/theme-types.d.ts → theme/types.d.ts} +1 -1
  101. package/dist/ui/timeline.js +2 -1
  102. package/dist/ui/timeline.mjs +2 -1
  103. package/dist/ui/toggle-group.js +2 -1
  104. package/dist/ui/toggle-group.mjs +2 -1
  105. package/dist/ui/toggle.js +2 -1
  106. package/dist/ui/toggle.mjs +2 -1
  107. package/dist/ui/tooltip.js +2 -1
  108. package/dist/ui/tooltip.mjs +2 -1
  109. package/dist/ui/tree-view-v2.js +2 -1
  110. package/dist/ui/tree-view-v2.mjs +2 -1
  111. package/dist/ui/tree-view.d.mts +3 -3
  112. package/dist/ui/tree-view.d.ts +3 -3
  113. package/dist/ui/tree-view.js +2 -1
  114. package/dist/ui/tree-view.mjs +2 -1
  115. package/dist/ui/version-badge.js +4 -3
  116. package/dist/ui/version-badge.mjs +3 -2
  117. package/dist/utils/client-only.d.mts +27 -0
  118. package/dist/utils/client-only.d.ts +27 -0
  119. package/dist/utils/client-only.js +22 -0
  120. package/dist/utils/client-only.mjs +1 -0
  121. package/dist/utils/index.d.mts +2 -0
  122. package/dist/utils/index.d.ts +2 -0
  123. package/dist/utils/index.js +18 -1
  124. package/dist/utils/index.mjs +2 -1
  125. package/package.json +3 -2
  126. package/src/index.css +1 -1
  127. package/src/ui/avatar.tsx +72 -37
  128. package/src/ui/checkbox.tsx +18 -1
  129. package/src/ui/index.ts +1 -1
  130. package/src/ui/{theme-context/theme-context.tsx → theme/ThemeProvider.tsx} +4 -4
  131. package/src/ui/theme/index.ts +4 -0
  132. package/src/ui/{theme-context/theme-script.tsx → theme/themeScript.tsx} +8 -2
  133. package/src/utils/client-only.ts +54 -0
  134. package/src/utils/index.ts +1 -0
  135. package/dist/chunk-AQXAGOYO.js +0 -107
  136. package/dist/chunk-DYT2FBW5.mjs +0 -79
  137. package/dist/ui/theme-context/index.d.mts +0 -4
  138. package/dist/ui/theme-context/index.d.ts +0 -4
  139. package/dist/ui/theme-context/index.js +0 -16
  140. package/dist/ui/theme-context/index.mjs +0 -3
  141. package/dist/ui/theme-context/theme-context.js +0 -15
  142. package/dist/ui/theme-context/theme-context.mjs +0 -2
  143. package/dist/ui/theme-context/theme-script.js +0 -10
  144. package/dist/ui/theme-context/theme-script.mjs +0 -1
  145. package/src/ui/theme-context/index.ts +0 -3
  146. /package/dist/{chunk-4FOSHIMU.mjs → chunk-AMB2H6WS.mjs} +0 -0
  147. /package/dist/{chunk-M4IVLZIH.mjs → chunk-CMYR6AOY.mjs} +0 -0
  148. /package/dist/{chunk-UOFJLQ72.js → chunk-IJ7QXNIJ.js} +0 -0
  149. /package/dist/{chunk-XWS4SIB5.js → chunk-Y2QBWXB4.js} +0 -0
  150. /package/dist/ui/{theme-context/theme-types.js → theme/types.js} +0 -0
  151. /package/dist/ui/{theme-context/theme-types.mjs → theme/types.mjs} +0 -0
  152. /package/src/ui/{theme-context/theme-types.ts → theme/types.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ require('../../chunk-Y2QBWXB4.js');
4
+ var chunk3ZFILFNB_js = require('../../chunk-3ZFILFNB.js');
5
+ var chunkEMHRYI5O_js = require('../../chunk-EMHRYI5O.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "ThemeProvider", {
10
+ enumerable: true,
11
+ get: function () { return chunk3ZFILFNB_js.ThemeProvider; }
12
+ });
13
+ Object.defineProperty(exports, "useTheme", {
14
+ enumerable: true,
15
+ get: function () { return chunk3ZFILFNB_js.useTheme; }
16
+ });
17
+ Object.defineProperty(exports, "ThemeScript", {
18
+ enumerable: true,
19
+ get: function () { return chunkEMHRYI5O_js.ThemeScript; }
20
+ });
@@ -0,0 +1,3 @@
1
+ import '../../chunk-AMB2H6WS.mjs';
2
+ export { ThemeProvider, useTheme } from '../../chunk-4QERYDMC.mjs';
3
+ export { ThemeScript } from '../../chunk-YIBD2FEV.mjs';
@@ -1,13 +1,19 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { ThemeProviderProps, Attribute } from './theme-types.js';
3
+ import { Attribute } from './types.mjs';
4
4
 
5
- interface ThemeScriptProps extends ThemeProviderProps {
5
+ interface ThemeScriptProps {
6
6
  themes: string[];
7
7
  storageKey: string;
8
8
  defaultTheme: string;
9
9
  attribute: Attribute | Attribute[];
10
+ forcedTheme?: string;
11
+ enableSystem?: boolean;
12
+ enableColorScheme?: boolean;
13
+ value?: Record<string, string>;
14
+ nonce?: string;
15
+ scriptProps?: any;
10
16
  }
11
- declare const ThemeScript: react.MemoExoticComponent<({ forcedTheme, storageKey, attribute, enableSystem, enableColorScheme, defaultTheme, value, themes, nonce, scriptProps, }: ThemeScriptProps) => react_jsx_runtime.JSX.Element>;
17
+ declare const ThemeScript: React.MemoExoticComponent<({ forcedTheme, storageKey, attribute, enableSystem, enableColorScheme, defaultTheme, value, themes, nonce, scriptProps, }: ThemeScriptProps) => react_jsx_runtime.JSX.Element>;
12
18
 
13
19
  export { ThemeScript };
@@ -1,13 +1,19 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { ThemeProviderProps, Attribute } from './theme-types.mjs';
3
+ import { Attribute } from './types.js';
4
4
 
5
- interface ThemeScriptProps extends ThemeProviderProps {
5
+ interface ThemeScriptProps {
6
6
  themes: string[];
7
7
  storageKey: string;
8
8
  defaultTheme: string;
9
9
  attribute: Attribute | Attribute[];
10
+ forcedTheme?: string;
11
+ enableSystem?: boolean;
12
+ enableColorScheme?: boolean;
13
+ value?: Record<string, string>;
14
+ nonce?: string;
15
+ scriptProps?: any;
10
16
  }
11
- declare const ThemeScript: react.MemoExoticComponent<({ forcedTheme, storageKey, attribute, enableSystem, enableColorScheme, defaultTheme, value, themes, nonce, scriptProps, }: ThemeScriptProps) => react_jsx_runtime.JSX.Element>;
17
+ declare const ThemeScript: React.MemoExoticComponent<({ forcedTheme, storageKey, attribute, enableSystem, enableColorScheme, defaultTheme, value, themes, nonce, scriptProps, }: ThemeScriptProps) => react_jsx_runtime.JSX.Element>;
12
18
 
13
19
  export { ThemeScript };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var chunkEMHRYI5O_js = require('../../chunk-EMHRYI5O.js');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ThemeScript", {
8
+ enumerable: true,
9
+ get: function () { return chunkEMHRYI5O_js.ThemeScript; }
10
+ });
@@ -0,0 +1 @@
1
+ export { ThemeScript } from '../../chunk-YIBD2FEV.mjs';
@@ -1,4 +1,4 @@
1
- import { DetailedHTMLProps, ScriptHTMLAttributes, Dispatch, SetStateAction } from 'react';
1
+ import { Dispatch, SetStateAction, DetailedHTMLProps, ScriptHTMLAttributes } from 'react';
2
2
 
3
3
  type DataAttribute = `data-${string}`;
4
4
  interface ScriptProps extends DetailedHTMLProps<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement> {
@@ -1,4 +1,4 @@
1
- import { DetailedHTMLProps, ScriptHTMLAttributes, Dispatch, SetStateAction } from 'react';
1
+ import { Dispatch, SetStateAction, DetailedHTMLProps, ScriptHTMLAttributes } from 'react';
2
2
 
3
3
  type DataAttribute = `data-${string}`;
4
4
  interface ScriptProps extends DetailedHTMLProps<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement> {
@@ -3,7 +3,8 @@
3
3
  var chunkQ42CNAC4_js = require('../chunk-Q42CNAC4.js');
4
4
  require('../chunk-TOXM5BPM.js');
5
5
  require('../chunk-KJV7RR25.js');
6
- require('../chunk-XWS4SIB5.js');
6
+ require('../chunk-IJ7QXNIJ.js');
7
+ require('../chunk-7DRJLKR6.js');
7
8
  require('../chunk-ZX6K2A3O.js');
8
9
  require('../chunk-XXWQ4RVP.js');
9
10
 
@@ -1,6 +1,7 @@
1
1
  export { Timeline } from '../chunk-6YJ6IBWC.mjs';
2
2
  import '../chunk-DD7FIYSP.mjs';
3
3
  import '../chunk-6SBHQBFL.mjs';
4
- import '../chunk-M4IVLZIH.mjs';
4
+ import '../chunk-CMYR6AOY.mjs';
5
+ import '../chunk-SBHPTJE4.mjs';
5
6
  import '../chunk-GXZZGOXX.mjs';
6
7
  import '../chunk-KTNZSZ5Y.mjs';
@@ -2,7 +2,8 @@
2
2
 
3
3
  var chunkSAM2YZFC_js = require('../chunk-SAM2YZFC.js');
4
4
  require('../chunk-JSMQMGST.js');
5
- require('../chunk-XWS4SIB5.js');
5
+ require('../chunk-IJ7QXNIJ.js');
6
+ require('../chunk-7DRJLKR6.js');
6
7
  require('../chunk-ZX6K2A3O.js');
7
8
  require('../chunk-XXWQ4RVP.js');
8
9
 
@@ -1,5 +1,6 @@
1
1
  export { ToggleGroup, ToggleGroupItem } from '../chunk-2WJW572X.mjs';
2
2
  import '../chunk-66FC5NST.mjs';
3
- import '../chunk-M4IVLZIH.mjs';
3
+ import '../chunk-CMYR6AOY.mjs';
4
+ import '../chunk-SBHPTJE4.mjs';
4
5
  import '../chunk-GXZZGOXX.mjs';
5
6
  import '../chunk-KTNZSZ5Y.mjs';
package/dist/ui/toggle.js CHANGED
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkJSMQMGST_js = require('../chunk-JSMQMGST.js');
4
- require('../chunk-XWS4SIB5.js');
4
+ require('../chunk-IJ7QXNIJ.js');
5
+ require('../chunk-7DRJLKR6.js');
5
6
  require('../chunk-ZX6K2A3O.js');
6
7
  require('../chunk-XXWQ4RVP.js');
7
8
 
@@ -1,4 +1,5 @@
1
1
  export { Toggle, toggleVariants } from '../chunk-66FC5NST.mjs';
2
- import '../chunk-M4IVLZIH.mjs';
2
+ import '../chunk-CMYR6AOY.mjs';
3
+ import '../chunk-SBHPTJE4.mjs';
3
4
  import '../chunk-GXZZGOXX.mjs';
4
5
  import '../chunk-KTNZSZ5Y.mjs';
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKJV7RR25_js = require('../chunk-KJV7RR25.js');
4
- require('../chunk-XWS4SIB5.js');
4
+ require('../chunk-IJ7QXNIJ.js');
5
+ require('../chunk-7DRJLKR6.js');
5
6
  require('../chunk-ZX6K2A3O.js');
6
7
  require('../chunk-XXWQ4RVP.js');
7
8
 
@@ -1,4 +1,5 @@
1
1
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../chunk-6SBHQBFL.mjs';
2
- import '../chunk-M4IVLZIH.mjs';
2
+ import '../chunk-CMYR6AOY.mjs';
3
+ import '../chunk-SBHPTJE4.mjs';
3
4
  import '../chunk-GXZZGOXX.mjs';
4
5
  import '../chunk-KTNZSZ5Y.mjs';
@@ -2,7 +2,8 @@
2
2
 
3
3
  var chunkTOXM5BPM_js = require('../chunk-TOXM5BPM.js');
4
4
  require('../chunk-KJV7RR25.js');
5
- require('../chunk-XWS4SIB5.js');
5
+ require('../chunk-IJ7QXNIJ.js');
6
+ require('../chunk-7DRJLKR6.js');
6
7
  require('../chunk-ZX6K2A3O.js');
7
8
  require('../chunk-XXWQ4RVP.js');
8
9
 
@@ -1,5 +1,6 @@
1
1
  export { TreeView as TreeViewV2 } from '../chunk-DD7FIYSP.mjs';
2
2
  import '../chunk-6SBHQBFL.mjs';
3
- import '../chunk-M4IVLZIH.mjs';
3
+ import '../chunk-CMYR6AOY.mjs';
4
+ import '../chunk-SBHPTJE4.mjs';
4
5
  import '../chunk-GXZZGOXX.mjs';
5
6
  import '../chunk-KTNZSZ5Y.mjs';
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { HTMLAttributes, ComponentType, SVGProps, ReactNode } from 'react';
3
3
 
4
4
  type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;
@@ -15,7 +15,7 @@ interface TreeDataItem {
15
15
  droppable?: boolean;
16
16
  disabled?: boolean;
17
17
  }
18
- declare const TreeView: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
18
+ declare const TreeView: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
19
19
  data: TreeDataItem[] | TreeDataItem;
20
20
  initialSelectedItemId?: string;
21
21
  onSelectChange?: (item: TreeDataItem | undefined) => void;
@@ -23,6 +23,6 @@ declare const TreeView: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivEl
23
23
  defaultNodeIcon?: IconComponent;
24
24
  defaultLeafIcon?: IconComponent;
25
25
  onDocumentDrag?: (sourceItem: TreeDataItem, targetItem: TreeDataItem) => void;
26
- } & react.RefAttributes<HTMLDivElement>>;
26
+ } & React.RefAttributes<HTMLDivElement>>;
27
27
 
28
28
  export { type TreeDataItem, TreeView };
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { HTMLAttributes, ComponentType, SVGProps, ReactNode } from 'react';
3
3
 
4
4
  type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;
@@ -15,7 +15,7 @@ interface TreeDataItem {
15
15
  droppable?: boolean;
16
16
  disabled?: boolean;
17
17
  }
18
- declare const TreeView: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
18
+ declare const TreeView: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
19
19
  data: TreeDataItem[] | TreeDataItem;
20
20
  initialSelectedItemId?: string;
21
21
  onSelectChange?: (item: TreeDataItem | undefined) => void;
@@ -23,6 +23,6 @@ declare const TreeView: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivEl
23
23
  defaultNodeIcon?: IconComponent;
24
24
  defaultLeafIcon?: IconComponent;
25
25
  onDocumentDrag?: (sourceItem: TreeDataItem, targetItem: TreeDataItem) => void;
26
- } & react.RefAttributes<HTMLDivElement>>;
26
+ } & React.RefAttributes<HTMLDivElement>>;
27
27
 
28
28
  export { type TreeDataItem, TreeView };
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXPPJVYYS_js = require('../chunk-XPPJVYYS.js');
4
- require('../chunk-XWS4SIB5.js');
4
+ require('../chunk-IJ7QXNIJ.js');
5
+ require('../chunk-7DRJLKR6.js');
5
6
  require('../chunk-ZX6K2A3O.js');
6
7
  require('../chunk-XXWQ4RVP.js');
7
8
 
@@ -1,4 +1,5 @@
1
1
  export { TreeView } from '../chunk-YGIU2WQY.mjs';
2
- import '../chunk-M4IVLZIH.mjs';
2
+ import '../chunk-CMYR6AOY.mjs';
3
+ import '../chunk-SBHPTJE4.mjs';
3
4
  import '../chunk-GXZZGOXX.mjs';
4
5
  import '../chunk-KTNZSZ5Y.mjs';
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkRTURVQIP_js = require('../chunk-RTURVQIP.js');
3
+ var chunkZ3LP6DAV_js = require('../chunk-Z3LP6DAV.js');
4
4
  require('../chunk-EFIRD3FN.js');
5
- require('../chunk-XWS4SIB5.js');
5
+ require('../chunk-IJ7QXNIJ.js');
6
+ require('../chunk-7DRJLKR6.js');
6
7
  require('../chunk-ZX6K2A3O.js');
7
8
  require('../chunk-XXWQ4RVP.js');
8
9
 
@@ -10,5 +11,5 @@ require('../chunk-XXWQ4RVP.js');
10
11
 
11
12
  Object.defineProperty(exports, "VersionBadge", {
12
13
  enumerable: true,
13
- get: function () { return chunkRTURVQIP_js.VersionBadge; }
14
+ get: function () { return chunkZ3LP6DAV_js.VersionBadge; }
14
15
  });
@@ -1,5 +1,6 @@
1
- export { VersionBadge } from '../chunk-ZRJ5JCVG.mjs';
1
+ export { VersionBadge } from '../chunk-7LDFQGYF.mjs';
2
2
  import '../chunk-WO3WHXDP.mjs';
3
- import '../chunk-M4IVLZIH.mjs';
3
+ import '../chunk-CMYR6AOY.mjs';
4
+ import '../chunk-SBHPTJE4.mjs';
4
5
  import '../chunk-GXZZGOXX.mjs';
5
6
  import '../chunk-KTNZSZ5Y.mjs';
@@ -0,0 +1,27 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * Executes a function only on the client side (when window is defined)
5
+ * @param fn - Function to execute on client side
6
+ * @returns Result of the function or undefined if on server side
7
+ */
8
+ declare function clientOnly<T>(fn: () => T): T | undefined;
9
+ /**
10
+ * Creates a React component that only renders on the client side after hydration
11
+ * @param Component - The component to render client-side
12
+ * @param fallback - Optional fallback to render server-side
13
+ * @returns A component that avoids hydration mismatches
14
+ */
15
+ declare function createClientOnlyComponent<P extends Record<string, any>>(Component: React__default.ComponentType<P>, fallback?: React__default.ComponentType<P>): React__default.ComponentType<P>;
16
+ /**
17
+ * Checks if code is running on the client side
18
+ * @returns true if running on client, false if on server
19
+ */
20
+ declare function isClient(): boolean;
21
+ /**
22
+ * Checks if code is running on the server side
23
+ * @returns true if running on server, false if on client
24
+ */
25
+ declare function isServer(): boolean;
26
+
27
+ export { clientOnly, createClientOnlyComponent, isClient, isServer };
@@ -0,0 +1,27 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * Executes a function only on the client side (when window is defined)
5
+ * @param fn - Function to execute on client side
6
+ * @returns Result of the function or undefined if on server side
7
+ */
8
+ declare function clientOnly<T>(fn: () => T): T | undefined;
9
+ /**
10
+ * Creates a React component that only renders on the client side after hydration
11
+ * @param Component - The component to render client-side
12
+ * @param fallback - Optional fallback to render server-side
13
+ * @returns A component that avoids hydration mismatches
14
+ */
15
+ declare function createClientOnlyComponent<P extends Record<string, any>>(Component: React__default.ComponentType<P>, fallback?: React__default.ComponentType<P>): React__default.ComponentType<P>;
16
+ /**
17
+ * Checks if code is running on the client side
18
+ * @returns true if running on client, false if on server
19
+ */
20
+ declare function isClient(): boolean;
21
+ /**
22
+ * Checks if code is running on the server side
23
+ * @returns true if running on server, false if on client
24
+ */
25
+ declare function isServer(): boolean;
26
+
27
+ export { clientOnly, createClientOnlyComponent, isClient, isServer };
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var chunk7DRJLKR6_js = require('../chunk-7DRJLKR6.js');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "clientOnly", {
8
+ enumerable: true,
9
+ get: function () { return chunk7DRJLKR6_js.clientOnly; }
10
+ });
11
+ Object.defineProperty(exports, "createClientOnlyComponent", {
12
+ enumerable: true,
13
+ get: function () { return chunk7DRJLKR6_js.createClientOnlyComponent; }
14
+ });
15
+ Object.defineProperty(exports, "isClient", {
16
+ enumerable: true,
17
+ get: function () { return chunk7DRJLKR6_js.isClient; }
18
+ });
19
+ Object.defineProperty(exports, "isServer", {
20
+ enumerable: true,
21
+ get: function () { return chunk7DRJLKR6_js.isServer; }
22
+ });
@@ -0,0 +1 @@
1
+ export { clientOnly, createClientOnlyComponent, isClient, isServer } from '../chunk-SBHPTJE4.mjs';
@@ -1,3 +1,5 @@
1
1
  export { cn } from './cn.mjs';
2
2
  export { useLocalStorage } from './use-local-storage.mjs';
3
+ export { clientOnly, createClientOnlyComponent, isClient, isServer } from './client-only.mjs';
3
4
  import 'clsx';
5
+ import 'react';
@@ -1,3 +1,5 @@
1
1
  export { cn } from './cn.js';
2
2
  export { useLocalStorage } from './use-local-storage.js';
3
+ export { clientOnly, createClientOnlyComponent, isClient, isServer } from './client-only.js';
3
4
  import 'clsx';
5
+ import 'react';
@@ -1,11 +1,28 @@
1
1
  'use strict';
2
2
 
3
- require('../chunk-XWS4SIB5.js');
3
+ require('../chunk-IJ7QXNIJ.js');
4
+ var chunk7DRJLKR6_js = require('../chunk-7DRJLKR6.js');
4
5
  var chunkZX6K2A3O_js = require('../chunk-ZX6K2A3O.js');
5
6
  var chunkXXWQ4RVP_js = require('../chunk-XXWQ4RVP.js');
6
7
 
7
8
 
8
9
 
10
+ Object.defineProperty(exports, "clientOnly", {
11
+ enumerable: true,
12
+ get: function () { return chunk7DRJLKR6_js.clientOnly; }
13
+ });
14
+ Object.defineProperty(exports, "createClientOnlyComponent", {
15
+ enumerable: true,
16
+ get: function () { return chunk7DRJLKR6_js.createClientOnlyComponent; }
17
+ });
18
+ Object.defineProperty(exports, "isClient", {
19
+ enumerable: true,
20
+ get: function () { return chunk7DRJLKR6_js.isClient; }
21
+ });
22
+ Object.defineProperty(exports, "isServer", {
23
+ enumerable: true,
24
+ get: function () { return chunk7DRJLKR6_js.isServer; }
25
+ });
9
26
  Object.defineProperty(exports, "useLocalStorage", {
10
27
  enumerable: true,
11
28
  get: function () { return chunkZX6K2A3O_js.useLocalStorage; }
@@ -1,3 +1,4 @@
1
- import '../chunk-M4IVLZIH.mjs';
1
+ import '../chunk-CMYR6AOY.mjs';
2
+ export { clientOnly, createClientOnlyComponent, isClient, isServer } from '../chunk-SBHPTJE4.mjs';
2
3
  export { useLocalStorage } from '../chunk-GXZZGOXX.mjs';
3
4
  export { cn } from '../chunk-KTNZSZ5Y.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuer-ai/vuer-uikit",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "React UI Kit components",
5
5
  "keywords": [
6
6
  "react",
@@ -57,7 +57,8 @@
57
57
  "framer-motion": "^11.15.0",
58
58
  "sonner": "^2.0.6",
59
59
  "tailwind-merge": "^3.3.1",
60
- "vaul": "^1.1.2"
60
+ "vaul": "^1.1.2",
61
+ "vike-react": "^0.6.5"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@eslint/js": "^9.30.1",
package/src/index.css CHANGED
@@ -1,4 +1,4 @@
1
- @import "tw-animate-css";
1
+ @import "tw-animate-css";
2
2
 
3
3
  @import "./styles/variables.css";
4
4
  @import "./styles/theme.css";
package/src/ui/avatar.tsx CHANGED
@@ -1,49 +1,86 @@
1
1
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
2
2
  import React, { ComponentProps } from "react";
3
3
 
4
- import { cn } from "../utils";
4
+ import { cn, createClientOnlyComponent } from "../utils";
5
5
 
6
- function Avatar({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Root>) {
7
- return (
8
- <AvatarPrimitive.Root
9
- data-slot="avatar"
10
- className={cn("relative flex size-[24px] shrink-0 overflow-hidden rounded-full", className)}
11
- {...props}
12
- />
13
- );
14
- }
6
+ export const AvatarRoot = ({
7
+ className,
8
+ ...props
9
+ }: ComponentProps<typeof AvatarPrimitive.Root>) => (
10
+ <AvatarPrimitive.Root
11
+ data-slot="avatar"
12
+ className={cn("relative flex size-[24px] shrink-0 overflow-hidden rounded-full", className)}
13
+ {...props}
14
+ />
15
+ );
15
16
 
16
- function AvatarImage({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Image>) {
17
- return (
18
- <AvatarPrimitive.Image
19
- data-slot="avatar-image"
20
- className={cn("aspect-square size-full", className)}
21
- {...props}
22
- />
23
- );
24
- }
17
+ export const AvatarSSRFallback = ({ className }: { className?: string }) => (
18
+ <span
19
+ data-slot="avatar"
20
+ className={cn("relative flex size-[24px] shrink-0 overflow-hidden rounded-full", className)}
21
+ />
22
+ );
25
23
 
26
- function AvatarFallback({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Fallback>) {
27
- return (
28
- <AvatarPrimitive.Fallback
29
- data-slot="avatar-fallback"
30
- className={cn(
31
- "bg-bg-tertiary flex size-full items-center justify-center rounded-full",
32
- className,
33
- )}
34
- {...props}
35
- />
36
- );
37
- }
24
+ export const Avatar = createClientOnlyComponent(AvatarRoot, AvatarSSRFallback);
25
+
26
+ export const AvatarImageRoot = ({
27
+ className,
28
+ ...props
29
+ }: ComponentProps<typeof AvatarPrimitive.Image>) => (
30
+ <AvatarPrimitive.Image
31
+ data-slot="avatar-image"
32
+ className={cn("aspect-square size-full", className)}
33
+ {...props}
34
+ />
35
+ );
36
+
37
+ export const AvatarImageFallback = ({ className }: { className?: string }) => (
38
+ <span data-slot="avatar-image" className={cn("aspect-square size-full", className)} />
39
+ );
40
+
41
+ export const AvatarImage = createClientOnlyComponent(AvatarImageRoot, AvatarImageFallback);
42
+
43
+ export const AvatarFallbackRoot = ({
44
+ className,
45
+ ...props
46
+ }: ComponentProps<typeof AvatarPrimitive.Fallback>) => (
47
+ <AvatarPrimitive.Fallback
48
+ data-slot="avatar-fallback"
49
+ className={cn(
50
+ "bg-bg-tertiary flex size-full items-center justify-center rounded-full",
51
+ className,
52
+ )}
53
+ {...props}
54
+ />
55
+ );
38
56
 
39
- interface AvatarGroupProps {
57
+ export const AvatarFallbackSSR = ({
58
+ className,
59
+ ...props
60
+ }: {
61
+ className?: string;
62
+ children?: React.ReactNode;
63
+ }) => (
64
+ <span
65
+ data-slot="avatar-fallback"
66
+ className={cn(
67
+ "bg-bg-tertiary flex size-full items-center justify-center rounded-full",
68
+ className,
69
+ )}
70
+ {...props}
71
+ />
72
+ );
73
+
74
+ export const AvatarFallback = createClientOnlyComponent(AvatarFallbackRoot, AvatarFallbackSSR);
75
+
76
+ export interface AvatarGroupProps {
40
77
  children: React.ReactNode;
41
78
  className?: string;
42
79
  spacing?: "tight" | "normal" | "loose";
43
80
  max?: number;
44
81
  }
45
82
 
46
- function AvatarGroup({ children, className, spacing = "normal", max }: AvatarGroupProps) {
83
+ export function AvatarGroup({ children, className, spacing = "normal", max }: AvatarGroupProps) {
47
84
  const spacingClasses = {
48
85
  tight: "-space-x-1.5",
49
86
  normal: "-space-x-1",
@@ -59,7 +96,7 @@ function AvatarGroup({ children, className, spacing = "normal", max }: AvatarGro
59
96
  {remainingCount > 0 && (
60
97
  <Avatar
61
98
  className={cn(
62
- "ring-background hover:scale-120 relative cursor-default ring-2 transition-all duration-200 ease-in-out hover:z-[100]",
99
+ "ring-background relative cursor-default ring-2 transition-all duration-200 ease-in-out hover:z-[100] hover:scale-120",
63
100
  )}
64
101
  >
65
102
  <AvatarFallback>+{remainingCount}</AvatarFallback>
@@ -74,7 +111,7 @@ function AvatarGroup({ children, className, spacing = "normal", max }: AvatarGro
74
111
  }>,
75
112
  {
76
113
  className: cn(
77
- `ring-background hover:scale-120 relative ring-2 transition-all duration-200 ease-in-out hover:z-[100]`,
114
+ `ring-background relative ring-2 transition-all duration-200 ease-in-out hover:z-[100] hover:scale-120`,
78
115
  (child.props as { className?: string })?.className,
79
116
  ),
80
117
  },
@@ -85,5 +122,3 @@ function AvatarGroup({ children, className, spacing = "normal", max }: AvatarGro
85
122
  </div>
86
123
  );
87
124
  }
88
-
89
- export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
@@ -2,7 +2,7 @@ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2
2
  import { CheckIcon } from "lucide-react";
3
3
  import { type ComponentProps } from "react";
4
4
 
5
- import { cn } from "../utils";
5
+ import { cn, isClient } from "../utils";
6
6
 
7
7
  interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "className"> {
8
8
  checkall?: boolean;
@@ -10,6 +10,23 @@ interface CheckboxProps extends Omit<ComponentProps<typeof CheckboxPrimitive.Roo
10
10
  }
11
11
 
12
12
  function Checkbox({ className, checkall, ...props }: CheckboxProps) {
13
+ if (!isClient()) {
14
+ return (
15
+ <div
16
+ data-slot="checkbox"
17
+ className={cn(
18
+ "w-[16px]",
19
+ "h-[16px]",
20
+ "rounded-[3px]",
21
+ "border-[1.5px]",
22
+ "border-solid",
23
+ "border-bg-tertiary",
24
+ className,
25
+ )}
26
+ />
27
+ );
28
+ }
29
+
13
30
  return (
14
31
  <CheckboxPrimitive.Root
15
32
  data-slot="checkbox"
package/src/ui/index.ts CHANGED
@@ -29,4 +29,4 @@ export * from "./slider";
29
29
  export * from "./layout";
30
30
  export * from "./version-badge";
31
31
 
32
- export * from "./theme-context";
32
+ export * from "./theme";