@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.
- package/dist/{chunk-ZTNXAV64.js → chunk-3ZFILFNB.js} +4 -4
- package/dist/{chunk-Q3GXSHJV.mjs → chunk-4QERYDMC.mjs} +3 -3
- package/dist/{chunk-5TVG5JK5.js → chunk-5CENHVP3.js} +18 -0
- package/dist/chunk-7DRJLKR6.js +38 -0
- package/dist/{chunk-ZRJ5JCVG.mjs → chunk-7LDFQGYF.mjs} +1 -1
- package/dist/chunk-BAAW5VSE.js +142 -0
- package/dist/{chunk-G6PRZVSE.mjs → chunk-D6HWHISR.mjs} +18 -0
- package/dist/{chunk-CCGCEN7Z.js → chunk-EMHRYI5O.js} +1 -1
- package/dist/chunk-KMIPKXV2.mjs +108 -0
- package/dist/chunk-SBHPTJE4.mjs +29 -0
- package/dist/{chunk-LHWH4GP5.mjs → chunk-YIBD2FEV.mjs} +1 -1
- package/dist/{chunk-RTURVQIP.js → chunk-Z3LP6DAV.js} +1 -1
- package/dist/highlight-cursor/cursor-context.d.mts +2 -2
- package/dist/highlight-cursor/cursor-context.d.ts +2 -2
- package/dist/highlight-cursor/enhanced-components.d.mts +4 -4
- package/dist/highlight-cursor/enhanced-components.d.ts +4 -4
- package/dist/highlight-cursor/enhanced-components.js +2 -1
- package/dist/highlight-cursor/enhanced-components.mjs +2 -1
- package/dist/highlight-cursor/index.js +2 -1
- package/dist/highlight-cursor/index.mjs +2 -1
- package/dist/highlight-cursor/with-cursor.d.mts +2 -2
- package/dist/highlight-cursor/with-cursor.d.ts +2 -2
- package/dist/index.css +2 -2
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +60 -15
- package/dist/index.mjs +8 -7
- package/dist/styles/theme.css +1 -1
- package/dist/ui/avatar.d.mts +19 -6
- package/dist/ui/avatar.d.ts +19 -6
- package/dist/ui/avatar.js +31 -6
- package/dist/ui/avatar.mjs +3 -2
- package/dist/ui/badge.js +2 -1
- package/dist/ui/badge.mjs +2 -1
- package/dist/ui/button.d.mts +2 -2
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.js +2 -1
- package/dist/ui/button.mjs +2 -1
- package/dist/ui/card.js +2 -1
- package/dist/ui/card.mjs +2 -1
- package/dist/ui/checkbox.js +4 -3
- package/dist/ui/checkbox.mjs +3 -2
- package/dist/ui/collapsible.js +2 -1
- package/dist/ui/collapsible.mjs +2 -1
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/drawer.d.ts +11 -11
- package/dist/ui/drawer.js +2 -1
- package/dist/ui/drawer.mjs +2 -1
- package/dist/ui/dropdown.js +2 -1
- package/dist/ui/dropdown.mjs +2 -1
- package/dist/ui/index.d.mts +4 -3
- package/dist/ui/index.d.ts +4 -3
- package/dist/ui/index.js +44 -15
- package/dist/ui/index.mjs +8 -7
- package/dist/ui/input-numbers.d.mts +2 -2
- package/dist/ui/input-numbers.d.ts +2 -2
- package/dist/ui/input-numbers.js +2 -1
- package/dist/ui/input-numbers.mjs +2 -1
- package/dist/ui/input.d.mts +4 -4
- package/dist/ui/input.d.ts +4 -4
- package/dist/ui/input.js +2 -1
- package/dist/ui/input.mjs +2 -1
- package/dist/ui/layout.js +2 -1
- package/dist/ui/layout.mjs +2 -1
- package/dist/ui/modal.js +2 -1
- package/dist/ui/modal.mjs +2 -1
- package/dist/ui/popover.js +2 -1
- package/dist/ui/popover.mjs +2 -1
- package/dist/ui/radio-group.js +2 -1
- package/dist/ui/radio-group.mjs +2 -1
- package/dist/ui/select.d.mts +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.js +2 -1
- package/dist/ui/select.mjs +2 -1
- package/dist/ui/slider.d.mts +2 -2
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.js +2 -1
- package/dist/ui/slider.mjs +2 -1
- package/dist/ui/switch.js +2 -1
- package/dist/ui/switch.mjs +2 -1
- package/dist/ui/tabs.js +2 -1
- package/dist/ui/tabs.mjs +2 -1
- package/dist/ui/textarea.d.mts +1 -1
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.js +2 -1
- package/dist/ui/textarea.mjs +2 -1
- package/dist/ui/{theme-context/theme-context.d.ts → theme/ThemeProvider.d.mts} +1 -1
- package/dist/ui/{theme-context/theme-context.d.mts → theme/ThemeProvider.d.ts} +1 -1
- package/dist/ui/theme/ThemeProvider.js +15 -0
- package/dist/ui/theme/ThemeProvider.mjs +2 -0
- package/dist/ui/theme/index.d.mts +5 -0
- package/dist/ui/theme/index.d.ts +5 -0
- package/dist/ui/theme/index.js +20 -0
- package/dist/ui/theme/index.mjs +3 -0
- package/dist/ui/{theme-context/theme-script.d.ts → theme/themeScript.d.mts} +10 -4
- package/dist/ui/{theme-context/theme-script.d.mts → theme/themeScript.d.ts} +10 -4
- package/dist/ui/theme/themeScript.js +10 -0
- package/dist/ui/theme/themeScript.mjs +1 -0
- package/dist/ui/{theme-context/theme-types.d.mts → theme/types.d.mts} +1 -1
- package/dist/ui/{theme-context/theme-types.d.ts → theme/types.d.ts} +1 -1
- package/dist/ui/timeline.js +2 -1
- package/dist/ui/timeline.mjs +2 -1
- package/dist/ui/toggle-group.js +2 -1
- package/dist/ui/toggle-group.mjs +2 -1
- package/dist/ui/toggle.js +2 -1
- package/dist/ui/toggle.mjs +2 -1
- package/dist/ui/tooltip.js +2 -1
- package/dist/ui/tooltip.mjs +2 -1
- package/dist/ui/tree-view-v2.js +2 -1
- package/dist/ui/tree-view-v2.mjs +2 -1
- package/dist/ui/tree-view.d.mts +3 -3
- package/dist/ui/tree-view.d.ts +3 -3
- package/dist/ui/tree-view.js +2 -1
- package/dist/ui/tree-view.mjs +2 -1
- package/dist/ui/version-badge.js +4 -3
- package/dist/ui/version-badge.mjs +3 -2
- package/dist/utils/client-only.d.mts +27 -0
- package/dist/utils/client-only.d.ts +27 -0
- package/dist/utils/client-only.js +22 -0
- package/dist/utils/client-only.mjs +1 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +18 -1
- package/dist/utils/index.mjs +2 -1
- package/package.json +3 -2
- package/src/index.css +1 -1
- package/src/ui/avatar.tsx +72 -37
- package/src/ui/checkbox.tsx +18 -1
- package/src/ui/index.ts +1 -1
- package/src/ui/{theme-context/theme-context.tsx → theme/ThemeProvider.tsx} +4 -4
- package/src/ui/theme/index.ts +4 -0
- package/src/ui/{theme-context/theme-script.tsx → theme/themeScript.tsx} +8 -2
- package/src/utils/client-only.ts +54 -0
- package/src/utils/index.ts +1 -0
- package/dist/chunk-AQXAGOYO.js +0 -107
- package/dist/chunk-DYT2FBW5.mjs +0 -79
- package/dist/ui/theme-context/index.d.mts +0 -4
- package/dist/ui/theme-context/index.d.ts +0 -4
- package/dist/ui/theme-context/index.js +0 -16
- package/dist/ui/theme-context/index.mjs +0 -3
- package/dist/ui/theme-context/theme-context.js +0 -15
- package/dist/ui/theme-context/theme-context.mjs +0 -2
- package/dist/ui/theme-context/theme-script.js +0 -10
- package/dist/ui/theme-context/theme-script.mjs +0 -1
- package/src/ui/theme-context/index.ts +0 -3
- /package/dist/{chunk-4FOSHIMU.mjs → chunk-AMB2H6WS.mjs} +0 -0
- /package/dist/{chunk-M4IVLZIH.mjs → chunk-CMYR6AOY.mjs} +0 -0
- /package/dist/{chunk-UOFJLQ72.js → chunk-IJ7QXNIJ.js} +0 -0
- /package/dist/{chunk-XWS4SIB5.js → chunk-Y2QBWXB4.js} +0 -0
- /package/dist/ui/{theme-context/theme-types.js → theme/types.js} +0 -0
- /package/dist/ui/{theme-context/theme-types.mjs → theme/types.mjs} +0 -0
- /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
|
+
});
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { Attribute } from './types.mjs';
|
|
4
4
|
|
|
5
|
-
interface ThemeScriptProps
|
|
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:
|
|
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
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { Attribute } from './types.js';
|
|
4
4
|
|
|
5
|
-
interface ThemeScriptProps
|
|
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:
|
|
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 @@
|
|
|
1
|
+
export { ThemeScript } from '../../chunk-YIBD2FEV.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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> {
|
package/dist/ui/timeline.js
CHANGED
|
@@ -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-
|
|
6
|
+
require('../chunk-IJ7QXNIJ.js');
|
|
7
|
+
require('../chunk-7DRJLKR6.js');
|
|
7
8
|
require('../chunk-ZX6K2A3O.js');
|
|
8
9
|
require('../chunk-XXWQ4RVP.js');
|
|
9
10
|
|
package/dist/ui/timeline.mjs
CHANGED
|
@@ -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-
|
|
4
|
+
import '../chunk-CMYR6AOY.mjs';
|
|
5
|
+
import '../chunk-SBHPTJE4.mjs';
|
|
5
6
|
import '../chunk-GXZZGOXX.mjs';
|
|
6
7
|
import '../chunk-KTNZSZ5Y.mjs';
|
package/dist/ui/toggle-group.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkSAM2YZFC_js = require('../chunk-SAM2YZFC.js');
|
|
4
4
|
require('../chunk-JSMQMGST.js');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-IJ7QXNIJ.js');
|
|
6
|
+
require('../chunk-7DRJLKR6.js');
|
|
6
7
|
require('../chunk-ZX6K2A3O.js');
|
|
7
8
|
require('../chunk-XXWQ4RVP.js');
|
|
8
9
|
|
package/dist/ui/toggle-group.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ToggleGroup, ToggleGroupItem } from '../chunk-2WJW572X.mjs';
|
|
2
2
|
import '../chunk-66FC5NST.mjs';
|
|
3
|
-
import '../chunk-
|
|
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
package/dist/ui/toggle.mjs
CHANGED
package/dist/ui/tooltip.js
CHANGED
package/dist/ui/tooltip.mjs
CHANGED
package/dist/ui/tree-view-v2.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkTOXM5BPM_js = require('../chunk-TOXM5BPM.js');
|
|
4
4
|
require('../chunk-KJV7RR25.js');
|
|
5
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-IJ7QXNIJ.js');
|
|
6
|
+
require('../chunk-7DRJLKR6.js');
|
|
6
7
|
require('../chunk-ZX6K2A3O.js');
|
|
7
8
|
require('../chunk-XXWQ4RVP.js');
|
|
8
9
|
|
package/dist/ui/tree-view-v2.mjs
CHANGED
package/dist/ui/tree-view.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
-
} &
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
export { type TreeDataItem, TreeView };
|
package/dist/ui/tree-view.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
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:
|
|
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
|
-
} &
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
export { type TreeDataItem, TreeView };
|
package/dist/ui/tree-view.js
CHANGED
package/dist/ui/tree-view.mjs
CHANGED
package/dist/ui/version-badge.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZ3LP6DAV_js = require('../chunk-Z3LP6DAV.js');
|
|
4
4
|
require('../chunk-EFIRD3FN.js');
|
|
5
|
-
require('../chunk-
|
|
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
|
|
14
|
+
get: function () { return chunkZ3LP6DAV_js.VersionBadge; }
|
|
14
15
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { VersionBadge } from '../chunk-
|
|
1
|
+
export { VersionBadge } from '../chunk-7LDFQGYF.mjs';
|
|
2
2
|
import '../chunk-WO3WHXDP.mjs';
|
|
3
|
-
import '../chunk-
|
|
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';
|
package/dist/utils/index.d.mts
CHANGED
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../chunk-
|
|
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; }
|
package/dist/utils/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuer-ai/vuer-uikit",
|
|
3
|
-
"version": "0.0.
|
|
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
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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 };
|
package/src/ui/checkbox.tsx
CHANGED
|
@@ -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