@vuer-ai/vuer-uikit 0.0.53 → 0.0.55

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 (71) hide show
  1. package/dist/chunk-6M5BGKUO.mjs +200 -0
  2. package/dist/{chunk-LF2XWR4S.js → chunk-7Z2DUNCM.js} +0 -2
  3. package/dist/{chunk-56JBJR5O.mjs → chunk-BUDNM66N.mjs} +0 -4
  4. package/dist/chunk-BX7MGCJP.mjs +241 -0
  5. package/dist/{chunk-YP4XKYIP.mjs → chunk-DZXMZBAQ.mjs} +1 -1
  6. package/dist/{chunk-CZBGKVGH.js → chunk-FOMVNZ3W.js} +0 -2
  7. package/dist/{chunk-FSFUZ7Y6.js → chunk-GDW2K5OF.js} +85 -21
  8. package/dist/{chunk-N5V4HWT4.js → chunk-GIXFQKLS.js} +2 -2
  9. package/dist/{chunk-HKWVLJ7G.js → chunk-GJW5EH5E.js} +25 -9
  10. package/dist/{chunk-VYYH27HC.mjs → chunk-GVO43E7E.mjs} +1 -1
  11. package/dist/{chunk-WSQ2D6H6.mjs → chunk-IJIZFHQU.mjs} +0 -1
  12. package/dist/chunk-JQ332WTL.js +267 -0
  13. package/dist/{chunk-EW34OO4H.js → chunk-RIKTZHE7.js} +0 -4
  14. package/dist/{chunk-TZLILQLV.mjs → chunk-RWPYQFVD.mjs} +0 -2
  15. package/dist/{chunk-GL6WU4QP.mjs → chunk-UX4ECKZ3.mjs} +0 -2
  16. package/dist/{chunk-57AHWBIP.js → chunk-VYBGHEHX.js} +1 -1
  17. package/dist/{chunk-5ZAPRYIX.mjs → chunk-ZDZM3RJ3.mjs} +25 -9
  18. package/dist/{chunk-PVQWUU6F.js → chunk-ZWHGRBDM.js} +0 -1
  19. package/dist/highlight-cursor/enhanced-components.js +7 -7
  20. package/dist/highlight-cursor/enhanced-components.mjs +2 -2
  21. package/dist/highlight-cursor/index.js +7 -7
  22. package/dist/highlight-cursor/index.mjs +2 -2
  23. package/dist/index.d.mts +3 -2
  24. package/dist/index.d.ts +3 -2
  25. package/dist/index.js +118 -93
  26. package/dist/index.mjs +13 -12
  27. package/dist/ui/card.js +8 -8
  28. package/dist/ui/card.mjs +1 -1
  29. package/dist/ui/dropdown.js +16 -16
  30. package/dist/ui/dropdown.mjs +1 -1
  31. package/dist/ui/form/index.js +5 -5
  32. package/dist/ui/form/index.mjs +1 -1
  33. package/dist/ui/index.d.mts +3 -2
  34. package/dist/ui/index.d.ts +3 -2
  35. package/dist/ui/index.js +112 -87
  36. package/dist/ui/index.mjs +12 -11
  37. package/dist/ui/modal.js +11 -11
  38. package/dist/ui/modal.mjs +1 -1
  39. package/dist/ui/select.js +32 -32
  40. package/dist/ui/select.mjs +1 -1
  41. package/dist/ui/theme/ThemeToggles.d.mts +8 -3
  42. package/dist/ui/theme/ThemeToggles.d.ts +8 -3
  43. package/dist/ui/theme/ThemeToggles.js +3 -3
  44. package/dist/ui/theme/ThemeToggles.mjs +1 -1
  45. package/dist/ui/theme/index.d.mts +3 -0
  46. package/dist/ui/theme/index.d.ts +3 -0
  47. package/dist/ui/theme/index.js +3 -3
  48. package/dist/ui/theme/index.mjs +1 -1
  49. package/dist/ui/toggle-buttons.d.mts +32 -0
  50. package/dist/ui/toggle-buttons.d.ts +32 -0
  51. package/dist/ui/toggle-buttons.js +33 -0
  52. package/dist/ui/toggle-buttons.mjs +8 -0
  53. package/dist/ui/toggle-group.d.mts +16 -8
  54. package/dist/ui/toggle-group.d.ts +16 -8
  55. package/dist/ui/toggle-group.js +7 -4
  56. package/dist/ui/toggle-group.mjs +1 -2
  57. package/dist/ui/version-badge.js +2 -2
  58. package/dist/ui/version-badge.mjs +1 -1
  59. package/package.json +1 -1
  60. package/src/ui/button.tsx +6 -4
  61. package/src/ui/card.tsx +0 -1
  62. package/src/ui/dropdown.tsx +0 -4
  63. package/src/ui/index.ts +1 -0
  64. package/src/ui/modal.tsx +0 -2
  65. package/src/ui/select.tsx +0 -2
  66. package/src/ui/theme/ThemeToggles.tsx +37 -20
  67. package/src/ui/toggle-buttons.tsx +288 -0
  68. package/src/ui/toggle-group.tsx +101 -28
  69. package/dist/chunk-G6CSH3FC.mjs +0 -137
  70. /package/dist/{chunk-ZFWQLAQA.mjs → chunk-BF5C2QUL.mjs} +0 -0
  71. /package/dist/{chunk-GLGYNU3Q.js → chunk-C6R5HMUP.js} +0 -0
@@ -4,11 +4,14 @@ var chunk37WZTN4K_js = require('./chunk-37WZTN4K.js');
4
4
  var chunkER6XHUS7_js = require('./chunk-ER6XHUS7.js');
5
5
  var chunkX6APNY5D_js = require('./chunk-X6APNY5D.js');
6
6
  var chunkQG7ZF6TO_js = require('./chunk-QG7ZF6TO.js');
7
+ var chunkOASPTOVZ_js = require('./chunk-OASPTOVZ.js');
8
+ var chunk7KYAICHB_js = require('./chunk-7KYAICHB.js');
7
9
  var lucideReact = require('lucide-react');
8
10
  var jsxRuntime = require('react/jsx-runtime');
9
11
 
10
- var LiquidToggleButton = () => {
12
+ var LiquidToggleButton = ({ className, ...props }) => {
11
13
  const { theme, setTheme, storageKey } = chunk37WZTN4K_js.useTheme();
14
+ const document = chunkOASPTOVZ_js.useDocument();
12
15
  const handleLiquidToggle = () => {
13
16
  let newTheme;
14
17
  if (theme === "light") {
@@ -24,7 +27,9 @@ var LiquidToggleButton = () => {
24
27
  } else {
25
28
  newTheme = "liquid-light";
26
29
  }
27
- document.cookie = `${storageKey}=${newTheme}`;
30
+ if (document) {
31
+ document.cookie = `${storageKey}=${newTheme}`;
32
+ }
28
33
  setTheme(newTheme);
29
34
  };
30
35
  const isLiquid = theme === "liquid-light" || theme === "liquid-dark";
@@ -34,11 +39,12 @@ var LiquidToggleButton = () => {
34
39
  chunkX6APNY5D_js.Button,
35
40
  {
36
41
  icon: true,
37
- onClick: handleLiquidToggle,
38
42
  variant: "ghost",
39
43
  value: isLiquid,
40
44
  "aria-label": `Toggle liquid theme: ${isSystem ? "disabled (system mode)" : isLiquid ? "on" : "off"}`,
41
- className: isSystem ? "cursor-not-allowed opacity-50" : "",
45
+ ...props,
46
+ onClick: handleLiquidToggle,
47
+ className: chunk7KYAICHB_js.cn(className, isSystem && "cursor-not-allowed opacity-50"),
42
48
  disabled: isSystem,
43
49
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Droplet, { size: 20 })
44
50
  }
@@ -46,8 +52,9 @@ var LiquidToggleButton = () => {
46
52
  /* @__PURE__ */ jsxRuntime.jsx(chunkER6XHUS7_js.TooltipContent, { children: "Toggle liquid theme" })
47
53
  ] });
48
54
  };
49
- var ThemeToggleButton = () => {
55
+ var ThemeToggleButton = (props) => {
50
56
  const { theme, setTheme, storageKey } = chunk37WZTN4K_js.useTheme();
57
+ const document = chunkOASPTOVZ_js.useDocument();
51
58
  const handleThemeChange = () => {
52
59
  let newTheme;
53
60
  if (theme === "light") {
@@ -63,7 +70,9 @@ var ThemeToggleButton = () => {
63
70
  } else {
64
71
  newTheme = "light";
65
72
  }
66
- document.cookie = `${storageKey}=${newTheme}`;
73
+ if (document) {
74
+ document.cookie = `${storageKey}=${newTheme}`;
75
+ }
67
76
  setTheme(newTheme);
68
77
  };
69
78
  const isDark = theme === "dark" || theme === "liquid-dark";
@@ -72,15 +81,22 @@ var ThemeToggleButton = () => {
72
81
  chunkX6APNY5D_js.Button,
73
82
  {
74
83
  icon: true,
75
- onClick: handleThemeChange,
76
84
  variant: "ghost",
77
85
  "aria-label": `Current theme: ${isSystem ? "system" : isDark ? "dark" : "light"}`,
86
+ ...props,
87
+ onClick: handleThemeChange,
78
88
  children: isSystem ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunMoon, { size: 20 }) : isDark ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { size: 20 })
79
89
  }
80
90
  );
81
91
  };
82
- var LiquidToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(LiquidToggleButton, () => /* @__PURE__ */ jsxRuntime.jsx(chunkX6APNY5D_js.Button, { icon: true, variant: "ghost", "aria-label": "Liquid toggle loading...", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Droplet, { size: 20 }) }));
83
- var ThemeToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(ThemeToggleButton, () => /* @__PURE__ */ jsxRuntime.jsx(chunkX6APNY5D_js.Button, { icon: true, variant: "ghost", "aria-label": "Theme toggle loading...", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { size: 20 }) }));
92
+ var LiquidToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(
93
+ LiquidToggleButton,
94
+ (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkX6APNY5D_js.Button, { icon: true, variant: "ghost", "aria-label": "Liquid toggle loading...", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Droplet, { size: 20 }) })
95
+ );
96
+ var ThemeToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(
97
+ ThemeToggleButton,
98
+ (props) => /* @__PURE__ */ jsxRuntime.jsx(chunkX6APNY5D_js.Button, { icon: true, variant: "ghost", "aria-label": "Theme toggle loading...", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { size: 20 }) })
99
+ );
84
100
 
85
101
  exports.LiquidToggle = LiquidToggle;
86
102
  exports.ThemeToggle = ThemeToggle;
@@ -1,6 +1,6 @@
1
1
  import { Tabs } from './chunk-EXM36UYZ.mjs';
2
2
  import { Textarea } from './chunk-MWJQTO2F.mjs';
3
- import { SelectTrigger } from './chunk-TZLILQLV.mjs';
3
+ import { SelectTrigger } from './chunk-RWPYQFVD.mjs';
4
4
  import { InputRoot } from './chunk-INX2EB5H.mjs';
5
5
  import { Button } from './chunk-GY65PGYR.mjs';
6
6
  import { withCursor } from './chunk-44KW6PTD.mjs';
@@ -9,7 +9,6 @@ function Card({ className, ...props }) {
9
9
  className: cn(
10
10
  "flex",
11
11
  "flex-col",
12
- "min-w-[300px]",
13
12
  "rounded-uk-lg",
14
13
  "p-lg",
15
14
  "bg-bg-primary",
@@ -0,0 +1,267 @@
1
+ 'use strict';
2
+
3
+ var chunk7KYAICHB_js = require('./chunk-7KYAICHB.js');
4
+ var reactSlot = require('@radix-ui/react-slot');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var React = require('react');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ var toggleButtonsVariants = classVarianceAuthority.cva(
30
+ ["rounded-uk-md", "relative", "inline-flex", "items-center"],
31
+ {
32
+ variants: {
33
+ variant: {
34
+ primary: "bg-bg-secondary",
35
+ secondary: "bg-bg-secondary",
36
+ ghost: "bg-transparent"
37
+ },
38
+ padding: {
39
+ true: "p-xs",
40
+ false: "p-0"
41
+ }
42
+ },
43
+ defaultVariants: {
44
+ variant: "primary",
45
+ padding: true
46
+ }
47
+ }
48
+ );
49
+ var toggleButtonHighlightVariants = classVarianceAuthority.cva(
50
+ ["pointer-events-none", "absolute", "transition-all", "duration-200", "ease-out"],
51
+ {
52
+ variants: {
53
+ variant: {
54
+ primary: ["bg-brand-primary", "shadow-sm", "rounded-uk-sm"],
55
+ secondary: ["bg-bg-primary", "shadow-sm", "rounded-uk-sm"],
56
+ ghost: ["bg-bg-primary", "shadow-sm", "rounded-uk-md"]
57
+ }
58
+ },
59
+ defaultVariants: {
60
+ variant: "primary"
61
+ }
62
+ }
63
+ );
64
+ var toggleButtonVariants = classVarianceAuthority.cva(
65
+ [
66
+ "focus-visible:ring-ring",
67
+ "relative",
68
+ "z-10",
69
+ "inline-flex",
70
+ "items-center",
71
+ "justify-center",
72
+ "font-normal",
73
+ "whitespace-nowrap",
74
+ "transition-colors",
75
+ "focus-visible:ring-2",
76
+ "focus-visible:outline-none",
77
+ "disabled:pointer-events-none",
78
+ "disabled:opacity-50",
79
+ "cursor-pointer"
80
+ ],
81
+ {
82
+ variants: {
83
+ variant: {
84
+ primary: [
85
+ "text-text-primary",
86
+ "hover:text-text-primary",
87
+ "active:text-brand-primary",
88
+ "data-[selected=true]:text-text-withbg"
89
+ ],
90
+ secondary: [
91
+ "text-text-tertiary",
92
+ "hover:text-text-secondary",
93
+ "active:text-brand-primary",
94
+ "data-[selected=true]:text-text-primary"
95
+ ],
96
+ ghost: [
97
+ "text-text-tertiary",
98
+ "hover:text-text-secondary",
99
+ "active:text-brand-primary",
100
+ "data-[selected=true]:text-text-primary"
101
+ ]
102
+ },
103
+ size: {
104
+ sm: "text-uk-sm gap-xxs",
105
+ base: "text-uk-md gap-xs",
106
+ lg: "text-uk-lg gap-xs"
107
+ },
108
+ icon: {
109
+ false: "",
110
+ true: "shrink-0 [&_svg]:shrink-0 [&_svg]:pointer-events-none"
111
+ },
112
+ corner: {
113
+ sm: "rounded-uk-sm",
114
+ md: "rounded-uk-md"
115
+ }
116
+ },
117
+ compoundVariants: [
118
+ // Icon button sizes
119
+ { size: "sm", icon: false, class: "h-6 px-md" },
120
+ { size: "base", icon: false, class: "h-7 px-lg" },
121
+ { size: "lg", icon: false, class: "h-8 px-xl" },
122
+ { size: "sm", icon: true, class: "size-6 p-xs" },
123
+ { size: "base", icon: true, class: "size-8 p-sm" },
124
+ { size: "lg", icon: true, class: "size-9 p-md" }
125
+ ],
126
+ defaultVariants: {
127
+ variant: "primary",
128
+ size: "base",
129
+ icon: false,
130
+ corner: "sm"
131
+ }
132
+ }
133
+ );
134
+ var ToggleButtonsContext = React__namespace.createContext(null);
135
+ var ToggleButtons = React__namespace.forwardRef(
136
+ ({
137
+ value,
138
+ onValueChange,
139
+ children,
140
+ className,
141
+ size = "base",
142
+ padding = true,
143
+ variant = "primary",
144
+ ...props
145
+ }, ref) => {
146
+ const containerRef = React__namespace.useRef(null);
147
+ const [items, setItems] = React__namespace.useState(/* @__PURE__ */ new Map());
148
+ const [highlightStyle, setHighlightStyle] = React__namespace.useState({
149
+ opacity: 0
150
+ });
151
+ const registerItem = React__namespace.useCallback((itemValue, element) => {
152
+ setItems((prev) => new Map(prev).set(itemValue, element));
153
+ }, []);
154
+ const unregisterItem = React__namespace.useCallback((itemValue) => {
155
+ setItems((prev) => {
156
+ const newMap = new Map(prev);
157
+ newMap.delete(itemValue);
158
+ return newMap;
159
+ });
160
+ }, []);
161
+ React__namespace.useEffect(() => {
162
+ const selectedElement = items.get(value);
163
+ const container = containerRef.current;
164
+ if (selectedElement && container) {
165
+ const rafId = requestAnimationFrame(() => {
166
+ const containerRect = container.getBoundingClientRect();
167
+ const selectedRect = selectedElement.getBoundingClientRect();
168
+ const paddingOffset = padding ? 4 : 0;
169
+ const left = selectedRect.left - containerRect.left - paddingOffset;
170
+ const top = selectedRect.top - containerRect.top - paddingOffset;
171
+ setHighlightStyle({
172
+ width: selectedRect.width,
173
+ height: selectedRect.height,
174
+ transform: `translate(${left}px, ${top}px)`,
175
+ opacity: 1
176
+ });
177
+ });
178
+ return () => cancelAnimationFrame(rafId);
179
+ } else {
180
+ setHighlightStyle((prev) => ({ ...prev, opacity: 0 }));
181
+ }
182
+ }, [value, items, padding]);
183
+ return /* @__PURE__ */ jsxRuntime.jsx(
184
+ ToggleButtonsContext.Provider,
185
+ {
186
+ value: { value, onValueChange, size, variant, registerItem, unregisterItem },
187
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
188
+ "div",
189
+ {
190
+ ref: (node) => {
191
+ containerRef.current = node;
192
+ if (typeof ref === "function") ref(node);
193
+ else if (ref) ref.current = node;
194
+ },
195
+ className: chunk7KYAICHB_js.cn(toggleButtonsVariants({ variant, padding }), className),
196
+ ...props,
197
+ children: [
198
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk7KYAICHB_js.cn(toggleButtonHighlightVariants({ variant })), style: highlightStyle }),
199
+ children
200
+ ]
201
+ }
202
+ )
203
+ }
204
+ );
205
+ }
206
+ );
207
+ ToggleButtons.displayName = "ToggleButtons";
208
+ var ToggleButton = React__namespace.forwardRef(
209
+ ({ value, children, className, asChild = false, icon = false, size, variant, corner, ...props }, ref) => {
210
+ const context = React__namespace.useContext(ToggleButtonsContext);
211
+ const itemRef = React__namespace.useRef(null);
212
+ if (!context) {
213
+ throw new Error("ToggleButton must be used within ToggleButtons");
214
+ }
215
+ const {
216
+ value: selectedValue,
217
+ onValueChange,
218
+ size: contextSize,
219
+ variant: contextVariant,
220
+ registerItem,
221
+ unregisterItem
222
+ } = context;
223
+ const isSelected = selectedValue === value;
224
+ const finalSize = size ?? contextSize;
225
+ const finalVariant = variant ?? contextVariant;
226
+ const finalCorner = corner ?? (finalVariant === "ghost" ? "md" : "sm");
227
+ const Comp = asChild ? reactSlot.Slot : "button";
228
+ React__namespace.useEffect(() => {
229
+ const element = itemRef.current;
230
+ if (element) {
231
+ registerItem(value, element);
232
+ return () => unregisterItem(value);
233
+ }
234
+ }, [value, registerItem, unregisterItem]);
235
+ return /* @__PURE__ */ jsxRuntime.jsx(
236
+ Comp,
237
+ {
238
+ ref: (node) => {
239
+ itemRef.current = node;
240
+ if (typeof ref === "function") ref(node);
241
+ else if (ref) ref.current = node;
242
+ },
243
+ ...props,
244
+ "data-selected": isSelected,
245
+ className: chunk7KYAICHB_js.cn(
246
+ toggleButtonVariants({
247
+ variant: finalVariant,
248
+ size: finalSize,
249
+ icon,
250
+ corner: finalCorner
251
+ }),
252
+ className
253
+ ),
254
+ onClick: () => onValueChange(value),
255
+ type: asChild ? void 0 : "button",
256
+ children
257
+ }
258
+ );
259
+ }
260
+ );
261
+ ToggleButton.displayName = "ToggleButton";
262
+
263
+ exports.ToggleButton = ToggleButton;
264
+ exports.ToggleButtons = ToggleButtons;
265
+ exports.toggleButtonHighlightVariants = toggleButtonHighlightVariants;
266
+ exports.toggleButtonVariants = toggleButtonVariants;
267
+ exports.toggleButtonsVariants = toggleButtonsVariants;
@@ -104,7 +104,6 @@ function DropdownMenuContentRoot({
104
104
  "relative",
105
105
  "z-50",
106
106
  "max-h-(--radix-dropdown-menu-content-available-height)",
107
- "min-w-[8rem]",
108
107
  "origin-(--radix-dropdown-menu-content-transform-origin)",
109
108
  "overflow-x-hidden",
110
109
  "overflow-y-auto",
@@ -129,7 +128,6 @@ function DropdownMenuContentFallback({ className, ...props }) {
129
128
  "p-md",
130
129
  "relative",
131
130
  "z-50",
132
- "min-w-[8rem]",
133
131
  "overflow-x-hidden",
134
132
  "overflow-y-auto",
135
133
  "rounded-uk-md",
@@ -645,7 +643,6 @@ function DropdownMenuSubContentRoot({
645
643
  "relative",
646
644
  "z-50",
647
645
  "max-h-(--radix-dropdown-menu-content-available-height)",
648
- "min-w-[8rem]",
649
646
  "origin-(--radix-dropdown-menu-content-transform-origin)",
650
647
  "overflow-x-hidden",
651
648
  "overflow-y-auto",
@@ -668,7 +665,6 @@ function DropdownMenuSubContentFallback({ className, ...props }) {
668
665
  "p-md",
669
666
  "relative",
670
667
  "z-50",
671
- "min-w-[8rem]",
672
668
  "overflow-x-hidden",
673
669
  "overflow-y-auto",
674
670
  "rounded-uk-md",
@@ -152,7 +152,6 @@ function SelectContentRoot({
152
152
  "relative",
153
153
  "z-50",
154
154
  "max-h-(--radix-select-content-available-height)",
155
- "min-w-[8rem]",
156
155
  "origin-(--radix-select-content-transform-origin)",
157
156
  "overflow-x-hidden",
158
157
  "overflow-y-auto",
@@ -193,7 +192,6 @@ function SelectContentFallback({ className, children, ...props }) {
193
192
  "bg-bg-primary",
194
193
  "relative",
195
194
  "z-50",
196
- "min-w-[8rem]",
197
195
  "overflow-x-hidden",
198
196
  "overflow-y-auto",
199
197
  "rounded-uk-md",
@@ -71,8 +71,6 @@ var modalContentVariants = cva([
71
71
  "bg-bg-primary",
72
72
  "rounded-uk-xl",
73
73
  "shadow-[0_4px_16px_0_var(--color-shadow-secondary)]",
74
- "min-w-[280px]",
75
- "max-w-[360px]",
76
74
  "duration-200",
77
75
  "transition-all",
78
76
  "fixed",
@@ -3,7 +3,7 @@
3
3
  var chunkILJK43VJ_js = require('./chunk-ILJK43VJ.js');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
 
6
- var PACKAGE_VERSION = "0.0.53" ;
6
+ var PACKAGE_VERSION = "0.0.55" ;
7
7
  var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
8
8
  function VersionBadge({
9
9
  className,
@@ -2,11 +2,14 @@ import { useTheme } from './chunk-DCSGUVTI.mjs';
2
2
  import { Tooltip, TooltipTrigger, TooltipContent } from './chunk-TCN3UDQE.mjs';
3
3
  import { Button } from './chunk-GY65PGYR.mjs';
4
4
  import { createClientOnlyComponent } from './chunk-4F2GSF2T.mjs';
5
+ import { useDocument } from './chunk-QG5Z4C65.mjs';
6
+ import { cn } from './chunk-WM2VP7MI.mjs';
5
7
  import { Droplet, Sun, SunMoon, Moon } from 'lucide-react';
6
8
  import { jsx, jsxs } from 'react/jsx-runtime';
7
9
 
8
- var LiquidToggleButton = () => {
10
+ var LiquidToggleButton = ({ className, ...props }) => {
9
11
  const { theme, setTheme, storageKey } = useTheme();
12
+ const document = useDocument();
10
13
  const handleLiquidToggle = () => {
11
14
  let newTheme;
12
15
  if (theme === "light") {
@@ -22,7 +25,9 @@ var LiquidToggleButton = () => {
22
25
  } else {
23
26
  newTheme = "liquid-light";
24
27
  }
25
- document.cookie = `${storageKey}=${newTheme}`;
28
+ if (document) {
29
+ document.cookie = `${storageKey}=${newTheme}`;
30
+ }
26
31
  setTheme(newTheme);
27
32
  };
28
33
  const isLiquid = theme === "liquid-light" || theme === "liquid-dark";
@@ -32,11 +37,12 @@ var LiquidToggleButton = () => {
32
37
  Button,
33
38
  {
34
39
  icon: true,
35
- onClick: handleLiquidToggle,
36
40
  variant: "ghost",
37
41
  value: isLiquid,
38
42
  "aria-label": `Toggle liquid theme: ${isSystem ? "disabled (system mode)" : isLiquid ? "on" : "off"}`,
39
- className: isSystem ? "cursor-not-allowed opacity-50" : "",
43
+ ...props,
44
+ onClick: handleLiquidToggle,
45
+ className: cn(className, isSystem && "cursor-not-allowed opacity-50"),
40
46
  disabled: isSystem,
41
47
  children: /* @__PURE__ */ jsx(Droplet, { size: 20 })
42
48
  }
@@ -44,8 +50,9 @@ var LiquidToggleButton = () => {
44
50
  /* @__PURE__ */ jsx(TooltipContent, { children: "Toggle liquid theme" })
45
51
  ] });
46
52
  };
47
- var ThemeToggleButton = () => {
53
+ var ThemeToggleButton = (props) => {
48
54
  const { theme, setTheme, storageKey } = useTheme();
55
+ const document = useDocument();
49
56
  const handleThemeChange = () => {
50
57
  let newTheme;
51
58
  if (theme === "light") {
@@ -61,7 +68,9 @@ var ThemeToggleButton = () => {
61
68
  } else {
62
69
  newTheme = "light";
63
70
  }
64
- document.cookie = `${storageKey}=${newTheme}`;
71
+ if (document) {
72
+ document.cookie = `${storageKey}=${newTheme}`;
73
+ }
65
74
  setTheme(newTheme);
66
75
  };
67
76
  const isDark = theme === "dark" || theme === "liquid-dark";
@@ -70,14 +79,21 @@ var ThemeToggleButton = () => {
70
79
  Button,
71
80
  {
72
81
  icon: true,
73
- onClick: handleThemeChange,
74
82
  variant: "ghost",
75
83
  "aria-label": `Current theme: ${isSystem ? "system" : isDark ? "dark" : "light"}`,
84
+ ...props,
85
+ onClick: handleThemeChange,
76
86
  children: isSystem ? /* @__PURE__ */ jsx(SunMoon, { size: 20 }) : isDark ? /* @__PURE__ */ jsx(Moon, { size: 20 }) : /* @__PURE__ */ jsx(Sun, { size: 20 })
77
87
  }
78
88
  );
79
89
  };
80
- var LiquidToggle = createClientOnlyComponent(LiquidToggleButton, () => /* @__PURE__ */ jsx(Button, { icon: true, variant: "ghost", "aria-label": "Liquid toggle loading...", children: /* @__PURE__ */ jsx(Droplet, { size: 20 }) }));
81
- var ThemeToggle = createClientOnlyComponent(ThemeToggleButton, () => /* @__PURE__ */ jsx(Button, { icon: true, variant: "ghost", "aria-label": "Theme toggle loading...", children: /* @__PURE__ */ jsx(Sun, { size: 20 }) }));
90
+ var LiquidToggle = createClientOnlyComponent(
91
+ LiquidToggleButton,
92
+ (props) => /* @__PURE__ */ jsx(Button, { icon: true, variant: "ghost", "aria-label": "Liquid toggle loading...", ...props, children: /* @__PURE__ */ jsx(Droplet, { size: 20 }) })
93
+ );
94
+ var ThemeToggle = createClientOnlyComponent(
95
+ ThemeToggleButton,
96
+ (props) => /* @__PURE__ */ jsx(Button, { icon: true, variant: "ghost", "aria-label": "Theme toggle loading...", ...props, children: /* @__PURE__ */ jsx(Sun, { size: 20 }) })
97
+ );
82
98
 
83
99
  export { LiquidToggle, ThemeToggle };
@@ -11,7 +11,6 @@ function Card({ className, ...props }) {
11
11
  className: chunk7KYAICHB_js.cn(
12
12
  "flex",
13
13
  "flex-col",
14
- "min-w-[300px]",
15
14
  "rounded-uk-lg",
16
15
  "p-lg",
17
16
  "bg-bg-primary",
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkN5V4HWT4_js = require('../chunk-N5V4HWT4.js');
3
+ var chunkGIXFQKLS_js = require('../chunk-GIXFQKLS.js');
4
4
  require('../chunk-W3AIC7FW.js');
5
5
  require('../chunk-KCA5PXNO.js');
6
- require('../chunk-CZBGKVGH.js');
6
+ require('../chunk-FOMVNZ3W.js');
7
7
  require('../chunk-3YODEBOY.js');
8
8
  require('../chunk-X6APNY5D.js');
9
9
  require('../chunk-UFHMEEGL.js');
@@ -21,21 +21,21 @@ require('../chunk-OTPUWWEB.js');
21
21
 
22
22
  Object.defineProperty(exports, "CursorButton", {
23
23
  enumerable: true,
24
- get: function () { return chunkN5V4HWT4_js.CursorButton; }
24
+ get: function () { return chunkGIXFQKLS_js.CursorButton; }
25
25
  });
26
26
  Object.defineProperty(exports, "CursorInputRoot", {
27
27
  enumerable: true,
28
- get: function () { return chunkN5V4HWT4_js.CursorInputRoot; }
28
+ get: function () { return chunkGIXFQKLS_js.CursorInputRoot; }
29
29
  });
30
30
  Object.defineProperty(exports, "CursorSelectTrigger", {
31
31
  enumerable: true,
32
- get: function () { return chunkN5V4HWT4_js.CursorSelectTrigger; }
32
+ get: function () { return chunkGIXFQKLS_js.CursorSelectTrigger; }
33
33
  });
34
34
  Object.defineProperty(exports, "CursorTabs", {
35
35
  enumerable: true,
36
- get: function () { return chunkN5V4HWT4_js.CursorTabs; }
36
+ get: function () { return chunkGIXFQKLS_js.CursorTabs; }
37
37
  });
38
38
  Object.defineProperty(exports, "CursorTextarea", {
39
39
  enumerable: true,
40
- get: function () { return chunkN5V4HWT4_js.CursorTextarea; }
40
+ get: function () { return chunkGIXFQKLS_js.CursorTextarea; }
41
41
  });
@@ -1,7 +1,7 @@
1
- export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-VYYH27HC.mjs';
1
+ export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-GVO43E7E.mjs';
2
2
  import '../chunk-EXM36UYZ.mjs';
3
3
  import '../chunk-MWJQTO2F.mjs';
4
- import '../chunk-TZLILQLV.mjs';
4
+ import '../chunk-RWPYQFVD.mjs';
5
5
  import '../chunk-INX2EB5H.mjs';
6
6
  import '../chunk-GY65PGYR.mjs';
7
7
  import '../chunk-44KW6PTD.mjs';
@@ -2,10 +2,10 @@
2
2
 
3
3
  require('../chunk-KJ42IGH6.js');
4
4
  var chunkHYVF2TGW_js = require('../chunk-HYVF2TGW.js');
5
- var chunkN5V4HWT4_js = require('../chunk-N5V4HWT4.js');
5
+ var chunkGIXFQKLS_js = require('../chunk-GIXFQKLS.js');
6
6
  require('../chunk-W3AIC7FW.js');
7
7
  require('../chunk-KCA5PXNO.js');
8
- require('../chunk-CZBGKVGH.js');
8
+ require('../chunk-FOMVNZ3W.js');
9
9
  require('../chunk-3YODEBOY.js');
10
10
  require('../chunk-X6APNY5D.js');
11
11
  var chunkUFHMEEGL_js = require('../chunk-UFHMEEGL.js');
@@ -27,23 +27,23 @@ Object.defineProperty(exports, "CursorProvider", {
27
27
  });
28
28
  Object.defineProperty(exports, "CursorButton", {
29
29
  enumerable: true,
30
- get: function () { return chunkN5V4HWT4_js.CursorButton; }
30
+ get: function () { return chunkGIXFQKLS_js.CursorButton; }
31
31
  });
32
32
  Object.defineProperty(exports, "CursorInputRoot", {
33
33
  enumerable: true,
34
- get: function () { return chunkN5V4HWT4_js.CursorInputRoot; }
34
+ get: function () { return chunkGIXFQKLS_js.CursorInputRoot; }
35
35
  });
36
36
  Object.defineProperty(exports, "CursorSelectTrigger", {
37
37
  enumerable: true,
38
- get: function () { return chunkN5V4HWT4_js.CursorSelectTrigger; }
38
+ get: function () { return chunkGIXFQKLS_js.CursorSelectTrigger; }
39
39
  });
40
40
  Object.defineProperty(exports, "CursorTabs", {
41
41
  enumerable: true,
42
- get: function () { return chunkN5V4HWT4_js.CursorTabs; }
42
+ get: function () { return chunkGIXFQKLS_js.CursorTabs; }
43
43
  });
44
44
  Object.defineProperty(exports, "CursorTextarea", {
45
45
  enumerable: true,
46
- get: function () { return chunkN5V4HWT4_js.CursorTextarea; }
46
+ get: function () { return chunkGIXFQKLS_js.CursorTextarea; }
47
47
  });
48
48
  Object.defineProperty(exports, "withCursor", {
49
49
  enumerable: true,
@@ -1,9 +1,9 @@
1
1
  import '../chunk-VGCVIHBR.mjs';
2
2
  export { CursorProvider } from '../chunk-AQENEOV3.mjs';
3
- export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-VYYH27HC.mjs';
3
+ export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-GVO43E7E.mjs';
4
4
  import '../chunk-EXM36UYZ.mjs';
5
5
  import '../chunk-MWJQTO2F.mjs';
6
- import '../chunk-TZLILQLV.mjs';
6
+ import '../chunk-RWPYQFVD.mjs';
7
7
  import '../chunk-INX2EB5H.mjs';
8
8
  import '../chunk-GY65PGYR.mjs';
9
9
  export { withCursor } from '../chunk-44KW6PTD.mjs';
package/dist/index.d.mts CHANGED
@@ -12,7 +12,8 @@ export { Toaster } from './ui/toast.mjs';
12
12
  export { Textarea } from './ui/textarea.mjs';
13
13
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './ui/dropdown.mjs';
14
14
  export { Toggle, toggleVariants } from './ui/toggle.mjs';
15
- export { ToggleGroup, ToggleGroupItem } from './ui/toggle-group.mjs';
15
+ export { ToggleButton, ToggleButtons, toggleButtonHighlightVariants, toggleButtonVariants, toggleButtonsVariants } from './ui/toggle-buttons.mjs';
16
+ export { ToggleGroup, ToggleGroupItem, toggleGroupVariants } from './ui/toggle-group.mjs';
16
17
  export { Badge, badgeVariants } from './ui/badge.mjs';
17
18
  export { RadioGroup, RadioGroupItem } from './ui/radio-group.mjs';
18
19
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './ui/card.mjs';
@@ -60,10 +61,10 @@ export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorT
60
61
  export { TabsCursorProvider } from './highlight-cursor/tabs-cursor-context.mjs';
61
62
  export { withCursor } from './highlight-cursor/with-cursor.mjs';
62
63
  export { toast } from 'sonner';
64
+ export { VariantProps } from 'class-variance-authority';
63
65
  import 'react/jsx-runtime';
64
66
  import 'react';
65
67
  import 'class-variance-authority/types';
66
- import 'class-variance-authority';
67
68
  import './ui/separator.mjs';
68
69
  import '@radix-ui/react-separator';
69
70
  import 'vaul';