@vuer-ai/vuer-uikit 0.0.51 → 0.0.53

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.
@@ -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.51" ;
6
+ var PACKAGE_VERSION = "0.0.53" ;
7
7
  var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
8
8
  function VersionBadge({
9
9
  className,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkYNKO5FOU_js = require('./chunk-YNKO5FOU.js');
3
+ var chunkPONCZ3TF_js = require('./chunk-PONCZ3TF.js');
4
4
  var chunkER6XHUS7_js = require('./chunk-ER6XHUS7.js');
5
5
  var chunk7KYAICHB_js = require('./chunk-7KYAICHB.js');
6
6
  var lucideReact = require('lucide-react');
@@ -510,7 +510,7 @@ function Timeline({
510
510
  }, [viewStart, viewDuration, updateCursor]);
511
511
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-bg-primary text-text-primary border-line-secondary/20 rounded-uk-md mx-auto w-full max-w-7xl overflow-hidden border font-sans shadow-[0_4px_16px_0_var(--color-shadow-secondary)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[minmax(300px,30%)_1fr]", children: [
512
512
  /* @__PURE__ */ jsxRuntime.jsx(
513
- chunkYNKO5FOU_js.TreeView,
513
+ chunkPONCZ3TF_js.TreeView,
514
514
  {
515
515
  data,
516
516
  getIcon,
@@ -2,14 +2,11 @@ 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';
7
5
  import { Droplet, Sun, SunMoon, Moon } from 'lucide-react';
8
6
  import { jsx, jsxs } from 'react/jsx-runtime';
9
7
 
10
- var LiquidToggleButton = (props) => {
8
+ var LiquidToggleButton = () => {
11
9
  const { theme, setTheme, storageKey } = useTheme();
12
- const document = useDocument();
13
10
  const handleLiquidToggle = () => {
14
11
  let newTheme;
15
12
  if (theme === "light") {
@@ -25,9 +22,7 @@ var LiquidToggleButton = (props) => {
25
22
  } else {
26
23
  newTheme = "liquid-light";
27
24
  }
28
- if (document) {
29
- document.cookie = `${storageKey}=${newTheme}`;
30
- }
25
+ document.cookie = `${storageKey}=${newTheme}`;
31
26
  setTheme(newTheme);
32
27
  };
33
28
  const isLiquid = theme === "liquid-light" || theme === "liquid-dark";
@@ -37,12 +32,11 @@ var LiquidToggleButton = (props) => {
37
32
  Button,
38
33
  {
39
34
  icon: true,
35
+ onClick: handleLiquidToggle,
40
36
  variant: "ghost",
41
37
  value: isLiquid,
42
38
  "aria-label": `Toggle liquid theme: ${isSystem ? "disabled (system mode)" : isLiquid ? "on" : "off"}`,
43
- ...props,
44
- onClick: handleLiquidToggle,
45
- className: cn(props.className, isSystem && "cursor-not-allowed opacity-50"),
39
+ className: isSystem ? "cursor-not-allowed opacity-50" : "",
46
40
  disabled: isSystem,
47
41
  children: /* @__PURE__ */ jsx(Droplet, { size: 20 })
48
42
  }
@@ -50,9 +44,8 @@ var LiquidToggleButton = (props) => {
50
44
  /* @__PURE__ */ jsx(TooltipContent, { children: "Toggle liquid theme" })
51
45
  ] });
52
46
  };
53
- var ThemeToggleButton = (props) => {
47
+ var ThemeToggleButton = () => {
54
48
  const { theme, setTheme, storageKey } = useTheme();
55
- const document = useDocument();
56
49
  const handleThemeChange = () => {
57
50
  let newTheme;
58
51
  if (theme === "light") {
@@ -68,9 +61,7 @@ var ThemeToggleButton = (props) => {
68
61
  } else {
69
62
  newTheme = "light";
70
63
  }
71
- if (document) {
72
- document.cookie = `${storageKey}=${newTheme}`;
73
- }
64
+ document.cookie = `${storageKey}=${newTheme}`;
74
65
  setTheme(newTheme);
75
66
  };
76
67
  const isDark = theme === "dark" || theme === "liquid-dark";
@@ -79,15 +70,14 @@ var ThemeToggleButton = (props) => {
79
70
  Button,
80
71
  {
81
72
  icon: true,
73
+ onClick: handleThemeChange,
82
74
  variant: "ghost",
83
75
  "aria-label": `Current theme: ${isSystem ? "system" : isDark ? "dark" : "light"}`,
84
- ...props,
85
- onClick: handleThemeChange,
86
76
  children: isSystem ? /* @__PURE__ */ jsx(SunMoon, { size: 20 }) : isDark ? /* @__PURE__ */ jsx(Moon, { size: 20 }) : /* @__PURE__ */ jsx(Sun, { size: 20 })
87
77
  }
88
78
  );
89
79
  };
90
- var LiquidToggle = createClientOnlyComponent(LiquidToggleButton, (props) => /* @__PURE__ */ jsx(Button, { icon: true, variant: "ghost", "aria-label": "Liquid toggle loading...", ...props, children: /* @__PURE__ */ jsx(Droplet, { size: 20 }) }));
91
- var ThemeToggle = createClientOnlyComponent(ThemeToggleButton, (props) => /* @__PURE__ */ jsx(Button, { icon: true, variant: "ghost", "aria-label": "Theme toggle loading...", ...props, children: /* @__PURE__ */ jsx(Sun, { size: 20 }) }));
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 }) }));
92
82
 
93
83
  export { LiquidToggle, ThemeToggle };
@@ -13,7 +13,8 @@ function TreeView({
13
13
  hoveredId,
14
14
  isSelectable = false,
15
15
  selectedItemId,
16
- onSelectChange
16
+ onSelectChange,
17
+ isSearchable = true
17
18
  }) {
18
19
  const [expandedItems, setExpandedItems] = useState(() => {
19
20
  const initial = /* @__PURE__ */ new Set();
@@ -139,7 +140,7 @@ function TreeView({
139
140
  ) });
140
141
  };
141
142
  return /* @__PURE__ */ jsxs("div", { className: cn("border-line-secondary/20 flex flex-col", className), children: [
142
- /* @__PURE__ */ jsxs("div", { className: "border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2", children: [
143
+ isSearchable && /* @__PURE__ */ jsxs("div", { className: "border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2", children: [
143
144
  /* @__PURE__ */ jsx(Search, { className: "text-text-secondary size-4" }),
144
145
  /* @__PURE__ */ jsx(
145
146
  "input",
@@ -183,13 +184,15 @@ function TreeView({
183
184
  "div",
184
185
  {
185
186
  className: cn(
186
- "group relative flex h-[32px] cursor-pointer items-center",
187
- hoveredId === item.id && "bg-bg-secondary/80",
188
- isSelectable && selectedItemId === item.id && "bg-brand-primary"
187
+ "group relative flex h-[32px] items-center",
188
+ isSelectable && "rounded-uk-md",
189
+ !item.disable && "cursor-pointer",
190
+ hoveredId === item.id && !item.disable && "bg-bg-secondary",
191
+ isSelectable && selectedItemId === item.id && "bg-brand-primary text-text-withbg"
189
192
  ),
190
193
  onMouseEnter: () => onItemHover == null ? void 0 : onItemHover(item.id),
191
194
  onMouseLeave: () => onItemHover == null ? void 0 : onItemHover(null),
192
- onClick: () => handleItemSelect(item.id),
195
+ onClick: () => !item.disable && handleItemSelect(item.id),
193
196
  children: [
194
197
  /* @__PURE__ */ jsxs("div", { className: "absolute top-0 left-[-0.28rem] z-0 flex h-full items-center", children: [
195
198
  item.ancestors.map((ancestor, index) => {
@@ -242,7 +245,8 @@ function TreeView({
242
245
  {
243
246
  className: cn(
244
247
  "size-4 transition-transform",
245
- !expandedItems.has(item.id) && "-rotate-90"
248
+ !expandedItems.has(item.id) && "-rotate-90",
249
+ item.disable && "text-icon-tertiary"
246
250
  )
247
251
  }
248
252
  )
@@ -253,13 +257,14 @@ function TreeView({
253
257
  {
254
258
  className: cn(
255
259
  "cursor-pointer transition-opacity",
256
- item.isCollapsible && "group-hover:opacity-0"
260
+ item.isCollapsible && "group-hover:opacity-0",
261
+ item.disable && "text-icon-tertiary"
257
262
  ),
258
263
  children: getIcon(item)
259
264
  }
260
265
  )
261
266
  ] }),
262
- /* @__PURE__ */ jsx("span", { className: "truncate", children: renderLabel(item.label) })
267
+ /* @__PURE__ */ jsx("span", { className: cn("truncate", item.disable && "text-text-tertiary"), children: renderLabel(item.label) })
263
268
  ] }),
264
269
  item.actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", onClick: (e) => e.stopPropagation(), children: item.actions })
265
270
  ]
@@ -4,14 +4,11 @@ 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');
9
7
  var lucideReact = require('lucide-react');
10
8
  var jsxRuntime = require('react/jsx-runtime');
11
9
 
12
- var LiquidToggleButton = (props) => {
10
+ var LiquidToggleButton = () => {
13
11
  const { theme, setTheme, storageKey } = chunk37WZTN4K_js.useTheme();
14
- const document = chunkOASPTOVZ_js.useDocument();
15
12
  const handleLiquidToggle = () => {
16
13
  let newTheme;
17
14
  if (theme === "light") {
@@ -27,9 +24,7 @@ var LiquidToggleButton = (props) => {
27
24
  } else {
28
25
  newTheme = "liquid-light";
29
26
  }
30
- if (document) {
31
- document.cookie = `${storageKey}=${newTheme}`;
32
- }
27
+ document.cookie = `${storageKey}=${newTheme}`;
33
28
  setTheme(newTheme);
34
29
  };
35
30
  const isLiquid = theme === "liquid-light" || theme === "liquid-dark";
@@ -39,12 +34,11 @@ var LiquidToggleButton = (props) => {
39
34
  chunkX6APNY5D_js.Button,
40
35
  {
41
36
  icon: true,
37
+ onClick: handleLiquidToggle,
42
38
  variant: "ghost",
43
39
  value: isLiquid,
44
40
  "aria-label": `Toggle liquid theme: ${isSystem ? "disabled (system mode)" : isLiquid ? "on" : "off"}`,
45
- ...props,
46
- onClick: handleLiquidToggle,
47
- className: chunk7KYAICHB_js.cn(props.className, isSystem && "cursor-not-allowed opacity-50"),
41
+ className: isSystem ? "cursor-not-allowed opacity-50" : "",
48
42
  disabled: isSystem,
49
43
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Droplet, { size: 20 })
50
44
  }
@@ -52,9 +46,8 @@ var LiquidToggleButton = (props) => {
52
46
  /* @__PURE__ */ jsxRuntime.jsx(chunkER6XHUS7_js.TooltipContent, { children: "Toggle liquid theme" })
53
47
  ] });
54
48
  };
55
- var ThemeToggleButton = (props) => {
49
+ var ThemeToggleButton = () => {
56
50
  const { theme, setTheme, storageKey } = chunk37WZTN4K_js.useTheme();
57
- const document = chunkOASPTOVZ_js.useDocument();
58
51
  const handleThemeChange = () => {
59
52
  let newTheme;
60
53
  if (theme === "light") {
@@ -70,9 +63,7 @@ var ThemeToggleButton = (props) => {
70
63
  } else {
71
64
  newTheme = "light";
72
65
  }
73
- if (document) {
74
- document.cookie = `${storageKey}=${newTheme}`;
75
- }
66
+ document.cookie = `${storageKey}=${newTheme}`;
76
67
  setTheme(newTheme);
77
68
  };
78
69
  const isDark = theme === "dark" || theme === "liquid-dark";
@@ -81,16 +72,15 @@ var ThemeToggleButton = (props) => {
81
72
  chunkX6APNY5D_js.Button,
82
73
  {
83
74
  icon: true,
75
+ onClick: handleThemeChange,
84
76
  variant: "ghost",
85
77
  "aria-label": `Current theme: ${isSystem ? "system" : isDark ? "dark" : "light"}`,
86
- ...props,
87
- onClick: handleThemeChange,
88
78
  children: isSystem ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunMoon, { size: 20 }) : isDark ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { size: 20 })
89
79
  }
90
80
  );
91
81
  };
92
- var LiquidToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(LiquidToggleButton, (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 }) }));
93
- var ThemeToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(ThemeToggleButton, (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 }) }));
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 }) }));
94
84
 
95
85
  exports.LiquidToggle = LiquidToggle;
96
86
  exports.ThemeToggle = ThemeToggle;
@@ -15,7 +15,8 @@ function TreeView({
15
15
  hoveredId,
16
16
  isSelectable = false,
17
17
  selectedItemId,
18
- onSelectChange
18
+ onSelectChange,
19
+ isSearchable = true
19
20
  }) {
20
21
  const [expandedItems, setExpandedItems] = react.useState(() => {
21
22
  const initial = /* @__PURE__ */ new Set();
@@ -141,7 +142,7 @@ function TreeView({
141
142
  ) });
142
143
  };
143
144
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk7KYAICHB_js.cn("border-line-secondary/20 flex flex-col", className), children: [
144
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2", children: [
145
+ isSearchable && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2", children: [
145
146
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "text-text-secondary size-4" }),
146
147
  /* @__PURE__ */ jsxRuntime.jsx(
147
148
  "input",
@@ -185,13 +186,15 @@ function TreeView({
185
186
  "div",
186
187
  {
187
188
  className: chunk7KYAICHB_js.cn(
188
- "group relative flex h-[32px] cursor-pointer items-center",
189
- hoveredId === item.id && "bg-bg-secondary/80",
190
- isSelectable && selectedItemId === item.id && "bg-brand-primary"
189
+ "group relative flex h-[32px] items-center",
190
+ isSelectable && "rounded-uk-md",
191
+ !item.disable && "cursor-pointer",
192
+ hoveredId === item.id && !item.disable && "bg-bg-secondary",
193
+ isSelectable && selectedItemId === item.id && "bg-brand-primary text-text-withbg"
191
194
  ),
192
195
  onMouseEnter: () => onItemHover == null ? void 0 : onItemHover(item.id),
193
196
  onMouseLeave: () => onItemHover == null ? void 0 : onItemHover(null),
194
- onClick: () => handleItemSelect(item.id),
197
+ onClick: () => !item.disable && handleItemSelect(item.id),
195
198
  children: [
196
199
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 left-[-0.28rem] z-0 flex h-full items-center", children: [
197
200
  item.ancestors.map((ancestor, index) => {
@@ -244,7 +247,8 @@ function TreeView({
244
247
  {
245
248
  className: chunk7KYAICHB_js.cn(
246
249
  "size-4 transition-transform",
247
- !expandedItems.has(item.id) && "-rotate-90"
250
+ !expandedItems.has(item.id) && "-rotate-90",
251
+ item.disable && "text-icon-tertiary"
248
252
  )
249
253
  }
250
254
  )
@@ -255,13 +259,14 @@ function TreeView({
255
259
  {
256
260
  className: chunk7KYAICHB_js.cn(
257
261
  "cursor-pointer transition-opacity",
258
- item.isCollapsible && "group-hover:opacity-0"
262
+ item.isCollapsible && "group-hover:opacity-0",
263
+ item.disable && "text-icon-tertiary"
259
264
  ),
260
265
  children: getIcon(item)
261
266
  }
262
267
  )
263
268
  ] }),
264
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: renderLabel(item.label) })
269
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk7KYAICHB_js.cn("truncate", item.disable && "text-text-tertiary"), children: renderLabel(item.label) })
265
270
  ] }),
266
271
  item.actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", onClick: (e) => e.stopPropagation(), children: item.actions })
267
272
  ]
@@ -1,4 +1,4 @@
1
- import { TreeView } from './chunk-VSYSYSVQ.mjs';
1
+ import { TreeView } from './chunk-6Y3BHHH7.mjs';
2
2
  import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from './chunk-TCN3UDQE.mjs';
3
3
  import { cn } from './chunk-WM2VP7MI.mjs';
4
4
  import { Magnet, ChevronLeft, ChevronRight } from 'lucide-react';
@@ -1,7 +1,7 @@
1
1
  import { Badge } from './chunk-IZCHLZ4H.mjs';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
- var PACKAGE_VERSION = "0.0.51" ;
4
+ var PACKAGE_VERSION = "0.0.53" ;
5
5
  var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
6
6
  function VersionBadge({
7
7
  className,
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./chunk-GLGYNU3Q.js');
4
4
  require('./chunk-EDJTVLBN.js');
5
- var chunkWWJYQ2DN_js = require('./chunk-WWJYQ2DN.js');
5
+ var chunkHKWVLJ7G_js = require('./chunk-HKWVLJ7G.js');
6
6
  var chunk37WZTN4K_js = require('./chunk-37WZTN4K.js');
7
7
  var chunkFRMG67QP_js = require('./chunk-FRMG67QP.js');
8
8
  require('./chunk-GVDU3F7X.js');
@@ -24,15 +24,15 @@ var chunk6TMEH2MB_js = require('./chunk-6TMEH2MB.js');
24
24
  var chunkFSFUZ7Y6_js = require('./chunk-FSFUZ7Y6.js');
25
25
  var chunkEAN5SZYQ_js = require('./chunk-EAN5SZYQ.js');
26
26
  var chunkEOTROHFU_js = require('./chunk-EOTROHFU.js');
27
- var chunkHS3WEBRT_js = require('./chunk-HS3WEBRT.js');
27
+ var chunk57AHWBIP_js = require('./chunk-57AHWBIP.js');
28
28
  var chunkWRF3C24J_js = require('./chunk-WRF3C24J.js');
29
29
  var chunk4HJQPZQ2_js = require('./chunk-4HJQPZQ2.js');
30
30
  var chunkUGCFQYE2_js = require('./chunk-UGCFQYE2.js');
31
31
  require('./chunk-QPQSH53G.js');
32
32
  var chunkJ2ZRCEKZ_js = require('./chunk-J2ZRCEKZ.js');
33
33
  var chunkRFFQCDHN_js = require('./chunk-RFFQCDHN.js');
34
- var chunkWEHNW5KY_js = require('./chunk-WEHNW5KY.js');
35
- var chunkYNKO5FOU_js = require('./chunk-YNKO5FOU.js');
34
+ var chunk5EUKKR3Z_js = require('./chunk-5EUKKR3Z.js');
35
+ var chunkPONCZ3TF_js = require('./chunk-PONCZ3TF.js');
36
36
  var chunkER6XHUS7_js = require('./chunk-ER6XHUS7.js');
37
37
  var chunkQJR6MCTR_js = require('./chunk-QJR6MCTR.js');
38
38
  var chunkLF2XWR4S_js = require('./chunk-LF2XWR4S.js');
@@ -75,11 +75,11 @@ var chunkOTPUWWEB_js = require('./chunk-OTPUWWEB.js');
75
75
 
76
76
  Object.defineProperty(exports, "LiquidToggle", {
77
77
  enumerable: true,
78
- get: function () { return chunkWWJYQ2DN_js.LiquidToggle; }
78
+ get: function () { return chunkHKWVLJ7G_js.LiquidToggle; }
79
79
  });
80
80
  Object.defineProperty(exports, "ThemeToggle", {
81
81
  enumerable: true,
82
- get: function () { return chunkWWJYQ2DN_js.ThemeToggle; }
82
+ get: function () { return chunkHKWVLJ7G_js.ThemeToggle; }
83
83
  });
84
84
  Object.defineProperty(exports, "ThemeProvider", {
85
85
  enumerable: true,
@@ -171,7 +171,7 @@ Object.defineProperty(exports, "TreeView", {
171
171
  });
172
172
  Object.defineProperty(exports, "VersionBadge", {
173
173
  enumerable: true,
174
- get: function () { return chunkHS3WEBRT_js.VersionBadge; }
174
+ get: function () { return chunk57AHWBIP_js.VersionBadge; }
175
175
  });
176
176
  Object.defineProperty(exports, "createSelectable", {
177
177
  enumerable: true,
@@ -291,11 +291,11 @@ Object.defineProperty(exports, "Switch", {
291
291
  });
292
292
  Object.defineProperty(exports, "Timeline", {
293
293
  enumerable: true,
294
- get: function () { return chunkWEHNW5KY_js.Timeline; }
294
+ get: function () { return chunk5EUKKR3Z_js.Timeline; }
295
295
  });
296
296
  Object.defineProperty(exports, "TreeViewV2", {
297
297
  enumerable: true,
298
- get: function () { return chunkYNKO5FOU_js.TreeView; }
298
+ get: function () { return chunkPONCZ3TF_js.TreeView; }
299
299
  });
300
300
  Object.defineProperty(exports, "Tooltip", {
301
301
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import './chunk-ZFWQLAQA.mjs';
2
2
  import './chunk-6NK7UMFP.mjs';
3
- export { LiquidToggle, ThemeToggle } from './chunk-6UBBRJGO.mjs';
3
+ export { LiquidToggle, ThemeToggle } from './chunk-5ZAPRYIX.mjs';
4
4
  export { ThemeProvider, useTheme } from './chunk-DCSGUVTI.mjs';
5
5
  export { ThemeScript } from './chunk-NSI47INE.mjs';
6
6
  import './chunk-OJUTHWTF.mjs';
@@ -22,15 +22,15 @@ export { NumberInput } from './chunk-QD6L25T6.mjs';
22
22
  export { ToggleGroup, ToggleGroupItem } from './chunk-G6CSH3FC.mjs';
23
23
  export { Toggle, toggleVariants } from './chunk-K6R7H7R2.mjs';
24
24
  export { TreeView } from './chunk-DDG2W6BX.mjs';
25
- export { VersionBadge } from './chunk-F43NGNKR.mjs';
25
+ export { VersionBadge } from './chunk-YP4XKYIP.mjs';
26
26
  export { createSelectable } from './chunk-TVKPO5VK.mjs';
27
27
  export { DragSelectProvider, useDragSelectContext } from './chunk-JBQP2CBI.mjs';
28
28
  export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from './chunk-SG2PPP7N.mjs';
29
29
  import './chunk-N6DZ364I.mjs';
30
30
  export { Slider } from './chunk-47WYS4WO.mjs';
31
31
  export { Switch } from './chunk-SWGYWILR.mjs';
32
- export { Timeline } from './chunk-PDXJXH4A.mjs';
33
- export { TreeView as TreeViewV2 } from './chunk-VSYSYSVQ.mjs';
32
+ export { Timeline } from './chunk-VWZFOSYU.mjs';
33
+ export { TreeView as TreeViewV2 } from './chunk-6Y3BHHH7.mjs';
34
34
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './chunk-TCN3UDQE.mjs';
35
35
  export { Toaster, toast } from './chunk-EAZQH4IX.mjs';
36
36
  export { Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger } from './chunk-GL6WU4QP.mjs';
package/dist/ui/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('../chunk-GLGYNU3Q.js');
4
4
  require('../chunk-EDJTVLBN.js');
5
- var chunkWWJYQ2DN_js = require('../chunk-WWJYQ2DN.js');
5
+ var chunkHKWVLJ7G_js = require('../chunk-HKWVLJ7G.js');
6
6
  var chunk37WZTN4K_js = require('../chunk-37WZTN4K.js');
7
7
  var chunkFRMG67QP_js = require('../chunk-FRMG67QP.js');
8
8
  require('../chunk-GVDU3F7X.js');
@@ -24,15 +24,15 @@ var chunk6TMEH2MB_js = require('../chunk-6TMEH2MB.js');
24
24
  var chunkFSFUZ7Y6_js = require('../chunk-FSFUZ7Y6.js');
25
25
  var chunkEAN5SZYQ_js = require('../chunk-EAN5SZYQ.js');
26
26
  var chunkEOTROHFU_js = require('../chunk-EOTROHFU.js');
27
- var chunkHS3WEBRT_js = require('../chunk-HS3WEBRT.js');
27
+ var chunk57AHWBIP_js = require('../chunk-57AHWBIP.js');
28
28
  var chunkWRF3C24J_js = require('../chunk-WRF3C24J.js');
29
29
  var chunk4HJQPZQ2_js = require('../chunk-4HJQPZQ2.js');
30
30
  var chunkUGCFQYE2_js = require('../chunk-UGCFQYE2.js');
31
31
  require('../chunk-QPQSH53G.js');
32
32
  var chunkJ2ZRCEKZ_js = require('../chunk-J2ZRCEKZ.js');
33
33
  var chunkRFFQCDHN_js = require('../chunk-RFFQCDHN.js');
34
- var chunkWEHNW5KY_js = require('../chunk-WEHNW5KY.js');
35
- var chunkYNKO5FOU_js = require('../chunk-YNKO5FOU.js');
34
+ var chunk5EUKKR3Z_js = require('../chunk-5EUKKR3Z.js');
35
+ var chunkPONCZ3TF_js = require('../chunk-PONCZ3TF.js');
36
36
  var chunkER6XHUS7_js = require('../chunk-ER6XHUS7.js');
37
37
  var chunkQJR6MCTR_js = require('../chunk-QJR6MCTR.js');
38
38
  var chunkLF2XWR4S_js = require('../chunk-LF2XWR4S.js');
@@ -70,11 +70,11 @@ require('../chunk-OTPUWWEB.js');
70
70
 
71
71
  Object.defineProperty(exports, "LiquidToggle", {
72
72
  enumerable: true,
73
- get: function () { return chunkWWJYQ2DN_js.LiquidToggle; }
73
+ get: function () { return chunkHKWVLJ7G_js.LiquidToggle; }
74
74
  });
75
75
  Object.defineProperty(exports, "ThemeToggle", {
76
76
  enumerable: true,
77
- get: function () { return chunkWWJYQ2DN_js.ThemeToggle; }
77
+ get: function () { return chunkHKWVLJ7G_js.ThemeToggle; }
78
78
  });
79
79
  Object.defineProperty(exports, "ThemeProvider", {
80
80
  enumerable: true,
@@ -166,7 +166,7 @@ Object.defineProperty(exports, "TreeView", {
166
166
  });
167
167
  Object.defineProperty(exports, "VersionBadge", {
168
168
  enumerable: true,
169
- get: function () { return chunkHS3WEBRT_js.VersionBadge; }
169
+ get: function () { return chunk57AHWBIP_js.VersionBadge; }
170
170
  });
171
171
  Object.defineProperty(exports, "createSelectable", {
172
172
  enumerable: true,
@@ -286,11 +286,11 @@ Object.defineProperty(exports, "Switch", {
286
286
  });
287
287
  Object.defineProperty(exports, "Timeline", {
288
288
  enumerable: true,
289
- get: function () { return chunkWEHNW5KY_js.Timeline; }
289
+ get: function () { return chunk5EUKKR3Z_js.Timeline; }
290
290
  });
291
291
  Object.defineProperty(exports, "TreeViewV2", {
292
292
  enumerable: true,
293
- get: function () { return chunkYNKO5FOU_js.TreeView; }
293
+ get: function () { return chunkPONCZ3TF_js.TreeView; }
294
294
  });
295
295
  Object.defineProperty(exports, "Tooltip", {
296
296
  enumerable: true,
package/dist/ui/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import '../chunk-ZFWQLAQA.mjs';
2
2
  import '../chunk-6NK7UMFP.mjs';
3
- export { LiquidToggle, ThemeToggle } from '../chunk-6UBBRJGO.mjs';
3
+ export { LiquidToggle, ThemeToggle } from '../chunk-5ZAPRYIX.mjs';
4
4
  export { ThemeProvider, useTheme } from '../chunk-DCSGUVTI.mjs';
5
5
  export { ThemeScript } from '../chunk-NSI47INE.mjs';
6
6
  import '../chunk-OJUTHWTF.mjs';
@@ -22,15 +22,15 @@ export { NumberInput } from '../chunk-QD6L25T6.mjs';
22
22
  export { ToggleGroup, ToggleGroupItem } from '../chunk-G6CSH3FC.mjs';
23
23
  export { Toggle, toggleVariants } from '../chunk-K6R7H7R2.mjs';
24
24
  export { TreeView } from '../chunk-DDG2W6BX.mjs';
25
- export { VersionBadge } from '../chunk-F43NGNKR.mjs';
25
+ export { VersionBadge } from '../chunk-YP4XKYIP.mjs';
26
26
  export { createSelectable } from '../chunk-TVKPO5VK.mjs';
27
27
  export { DragSelectProvider, useDragSelectContext } from '../chunk-JBQP2CBI.mjs';
28
28
  export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from '../chunk-SG2PPP7N.mjs';
29
29
  import '../chunk-N6DZ364I.mjs';
30
30
  export { Slider } from '../chunk-47WYS4WO.mjs';
31
31
  export { Switch } from '../chunk-SWGYWILR.mjs';
32
- export { Timeline } from '../chunk-PDXJXH4A.mjs';
33
- export { TreeView as TreeViewV2 } from '../chunk-VSYSYSVQ.mjs';
32
+ export { Timeline } from '../chunk-VWZFOSYU.mjs';
33
+ export { TreeView as TreeViewV2 } from '../chunk-6Y3BHHH7.mjs';
34
34
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../chunk-TCN3UDQE.mjs';
35
35
  export { Toaster, toast } from '../chunk-EAZQH4IX.mjs';
36
36
  export { Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger } from '../chunk-GL6WU4QP.mjs';
@@ -1,11 +1,6 @@
1
- import react__default, { ComponentProps } from 'react';
2
- import { Button } from '../button.mjs';
3
- import 'class-variance-authority/types';
4
- import 'class-variance-authority';
1
+ import react__default from 'react';
5
2
 
6
- type LiquidToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
7
- type ThemeToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
8
- declare const LiquidToggle: react__default.ComponentType<LiquidToggleProps>;
9
- declare const ThemeToggle: react__default.ComponentType<ThemeToggleProps>;
3
+ declare const LiquidToggle: react__default.ComponentType<{}>;
4
+ declare const ThemeToggle: react__default.ComponentType<{}>;
10
5
 
11
6
  export { LiquidToggle, ThemeToggle };
@@ -1,11 +1,6 @@
1
- import react__default, { ComponentProps } from 'react';
2
- import { Button } from '../button.js';
3
- import 'class-variance-authority/types';
4
- import 'class-variance-authority';
1
+ import react__default from 'react';
5
2
 
6
- type LiquidToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
7
- type ThemeToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
8
- declare const LiquidToggle: react__default.ComponentType<LiquidToggleProps>;
9
- declare const ThemeToggle: react__default.ComponentType<ThemeToggleProps>;
3
+ declare const LiquidToggle: react__default.ComponentType<{}>;
4
+ declare const ThemeToggle: react__default.ComponentType<{}>;
10
5
 
11
6
  export { LiquidToggle, ThemeToggle };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkWWJYQ2DN_js = require('../../chunk-WWJYQ2DN.js');
3
+ var chunkHKWVLJ7G_js = require('../../chunk-HKWVLJ7G.js');
4
4
  require('../../chunk-37WZTN4K.js');
5
5
  require('../../chunk-FRMG67QP.js');
6
6
  require('../../chunk-ER6XHUS7.js');
@@ -17,9 +17,9 @@ require('../../chunk-7KYAICHB.js');
17
17
 
18
18
  Object.defineProperty(exports, "LiquidToggle", {
19
19
  enumerable: true,
20
- get: function () { return chunkWWJYQ2DN_js.LiquidToggle; }
20
+ get: function () { return chunkHKWVLJ7G_js.LiquidToggle; }
21
21
  });
22
22
  Object.defineProperty(exports, "ThemeToggle", {
23
23
  enumerable: true,
24
- get: function () { return chunkWWJYQ2DN_js.ThemeToggle; }
24
+ get: function () { return chunkHKWVLJ7G_js.ThemeToggle; }
25
25
  });
@@ -1,4 +1,4 @@
1
- export { LiquidToggle, ThemeToggle } from '../../chunk-6UBBRJGO.mjs';
1
+ export { LiquidToggle, ThemeToggle } from '../../chunk-5ZAPRYIX.mjs';
2
2
  import '../../chunk-DCSGUVTI.mjs';
3
3
  import '../../chunk-NSI47INE.mjs';
4
4
  import '../../chunk-TCN3UDQE.mjs';
@@ -4,6 +4,3 @@ export { ThemeScript } from './themeScript.mjs';
4
4
  export { Attribute, ThemeProviderProps, UseThemeProps } from './types.mjs';
5
5
  import 'react/jsx-runtime';
6
6
  import 'react';
7
- import '../button.mjs';
8
- import 'class-variance-authority/types';
9
- import 'class-variance-authority';
@@ -4,6 +4,3 @@ export { ThemeScript } from './themeScript.js';
4
4
  export { Attribute, ThemeProviderProps, UseThemeProps } from './types.js';
5
5
  import 'react/jsx-runtime';
6
6
  import 'react';
7
- import '../button.js';
8
- import 'class-variance-authority/types';
9
- import 'class-variance-authority';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  require('../../chunk-EDJTVLBN.js');
4
- var chunkWWJYQ2DN_js = require('../../chunk-WWJYQ2DN.js');
4
+ var chunkHKWVLJ7G_js = require('../../chunk-HKWVLJ7G.js');
5
5
  var chunk37WZTN4K_js = require('../../chunk-37WZTN4K.js');
6
6
  var chunkFRMG67QP_js = require('../../chunk-FRMG67QP.js');
7
7
  require('../../chunk-ER6XHUS7.js');
@@ -18,11 +18,11 @@ require('../../chunk-7KYAICHB.js');
18
18
 
19
19
  Object.defineProperty(exports, "LiquidToggle", {
20
20
  enumerable: true,
21
- get: function () { return chunkWWJYQ2DN_js.LiquidToggle; }
21
+ get: function () { return chunkHKWVLJ7G_js.LiquidToggle; }
22
22
  });
23
23
  Object.defineProperty(exports, "ThemeToggle", {
24
24
  enumerable: true,
25
- get: function () { return chunkWWJYQ2DN_js.ThemeToggle; }
25
+ get: function () { return chunkHKWVLJ7G_js.ThemeToggle; }
26
26
  });
27
27
  Object.defineProperty(exports, "ThemeProvider", {
28
28
  enumerable: true,
@@ -1,5 +1,5 @@
1
1
  import '../../chunk-6NK7UMFP.mjs';
2
- export { LiquidToggle, ThemeToggle } from '../../chunk-6UBBRJGO.mjs';
2
+ export { LiquidToggle, ThemeToggle } from '../../chunk-5ZAPRYIX.mjs';
3
3
  export { ThemeProvider, useTheme } from '../../chunk-DCSGUVTI.mjs';
4
4
  export { ThemeScript } from '../../chunk-NSI47INE.mjs';
5
5
  import '../../chunk-TCN3UDQE.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkWEHNW5KY_js = require('../chunk-WEHNW5KY.js');
4
- require('../chunk-YNKO5FOU.js');
3
+ var chunk5EUKKR3Z_js = require('../chunk-5EUKKR3Z.js');
4
+ require('../chunk-PONCZ3TF.js');
5
5
  require('../chunk-ER6XHUS7.js');
6
6
  require('../chunk-UBVYEZI3.js');
7
7
  require('../chunk-W3APG27Q.js');
@@ -15,5 +15,5 @@ require('../chunk-7KYAICHB.js');
15
15
 
16
16
  Object.defineProperty(exports, "Timeline", {
17
17
  enumerable: true,
18
- get: function () { return chunkWEHNW5KY_js.Timeline; }
18
+ get: function () { return chunk5EUKKR3Z_js.Timeline; }
19
19
  });
@@ -1,5 +1,5 @@
1
- export { Timeline } from '../chunk-PDXJXH4A.mjs';
2
- import '../chunk-VSYSYSVQ.mjs';
1
+ export { Timeline } from '../chunk-VWZFOSYU.mjs';
2
+ import '../chunk-6Y3BHHH7.mjs';
3
3
  import '../chunk-TCN3UDQE.mjs';
4
4
  import '../chunk-AYKQVWMR.mjs';
5
5
  import '../chunk-PR4VD5F2.mjs';
@@ -10,6 +10,7 @@ type TreeDataItem = {
10
10
  label: string;
11
11
  isCollapsible?: boolean;
12
12
  actions?: ReactNode;
13
+ disable?: boolean;
13
14
  [key: string]: unknown;
14
15
  };
15
16
  /**
@@ -29,11 +30,12 @@ type TreeViewProps<T extends TreeDataItem> = {
29
30
  isSelectable?: boolean;
30
31
  selectedItemId?: string | null;
31
32
  onSelectChange?: (id: string | null) => void;
33
+ isSearchable?: boolean;
32
34
  };
33
35
  /**
34
36
  * Filterable and highlightable tree view with keyboardless interactions.
35
37
  * Supports search (plain or regex), hover highlights, and collapsible nodes.
36
38
  */
37
- declare function TreeView<T extends TreeDataItem>({ data, getIcon, onVisibleDataChange, onItemHover, className, hoveredId, isSelectable, selectedItemId, onSelectChange, }: TreeViewProps<T>): react_jsx_runtime.JSX.Element;
39
+ declare function TreeView<T extends TreeDataItem>({ data, getIcon, onVisibleDataChange, onItemHover, className, hoveredId, isSelectable, selectedItemId, onSelectChange, isSearchable, }: TreeViewProps<T>): react_jsx_runtime.JSX.Element;
38
40
 
39
41
  export { type TreeDataItem as TreeDataItemV2, TreeView as TreeViewV2 };
@@ -10,6 +10,7 @@ type TreeDataItem = {
10
10
  label: string;
11
11
  isCollapsible?: boolean;
12
12
  actions?: ReactNode;
13
+ disable?: boolean;
13
14
  [key: string]: unknown;
14
15
  };
15
16
  /**
@@ -29,11 +30,12 @@ type TreeViewProps<T extends TreeDataItem> = {
29
30
  isSelectable?: boolean;
30
31
  selectedItemId?: string | null;
31
32
  onSelectChange?: (id: string | null) => void;
33
+ isSearchable?: boolean;
32
34
  };
33
35
  /**
34
36
  * Filterable and highlightable tree view with keyboardless interactions.
35
37
  * Supports search (plain or regex), hover highlights, and collapsible nodes.
36
38
  */
37
- declare function TreeView<T extends TreeDataItem>({ data, getIcon, onVisibleDataChange, onItemHover, className, hoveredId, isSelectable, selectedItemId, onSelectChange, }: TreeViewProps<T>): react_jsx_runtime.JSX.Element;
39
+ declare function TreeView<T extends TreeDataItem>({ data, getIcon, onVisibleDataChange, onItemHover, className, hoveredId, isSelectable, selectedItemId, onSelectChange, isSearchable, }: TreeViewProps<T>): react_jsx_runtime.JSX.Element;
38
40
 
39
41
  export { type TreeDataItem as TreeDataItemV2, TreeView as TreeViewV2 };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkYNKO5FOU_js = require('../chunk-YNKO5FOU.js');
3
+ var chunkPONCZ3TF_js = require('../chunk-PONCZ3TF.js');
4
4
  require('../chunk-ER6XHUS7.js');
5
5
  require('../chunk-UBVYEZI3.js');
6
6
  require('../chunk-W3APG27Q.js');
@@ -14,5 +14,5 @@ require('../chunk-7KYAICHB.js');
14
14
 
15
15
  Object.defineProperty(exports, "TreeViewV2", {
16
16
  enumerable: true,
17
- get: function () { return chunkYNKO5FOU_js.TreeView; }
17
+ get: function () { return chunkPONCZ3TF_js.TreeView; }
18
18
  });
@@ -1,4 +1,4 @@
1
- export { TreeView as TreeViewV2 } from '../chunk-VSYSYSVQ.mjs';
1
+ export { TreeView as TreeViewV2 } from '../chunk-6Y3BHHH7.mjs';
2
2
  import '../chunk-TCN3UDQE.mjs';
3
3
  import '../chunk-AYKQVWMR.mjs';
4
4
  import '../chunk-PR4VD5F2.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHS3WEBRT_js = require('../chunk-HS3WEBRT.js');
3
+ var chunk57AHWBIP_js = require('../chunk-57AHWBIP.js');
4
4
  require('../chunk-ILJK43VJ.js');
5
5
  require('../chunk-UBVYEZI3.js');
6
6
  require('../chunk-W3APG27Q.js');
@@ -14,5 +14,5 @@ require('../chunk-7KYAICHB.js');
14
14
 
15
15
  Object.defineProperty(exports, "VersionBadge", {
16
16
  enumerable: true,
17
- get: function () { return chunkHS3WEBRT_js.VersionBadge; }
17
+ get: function () { return chunk57AHWBIP_js.VersionBadge; }
18
18
  });
@@ -1,4 +1,4 @@
1
- export { VersionBadge } from '../chunk-F43NGNKR.mjs';
1
+ export { VersionBadge } from '../chunk-YP4XKYIP.mjs';
2
2
  import '../chunk-IZCHLZ4H.mjs';
3
3
  import '../chunk-AYKQVWMR.mjs';
4
4
  import '../chunk-PR4VD5F2.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuer-ai/vuer-uikit",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "description": "React UI Kit components",
5
5
  "keywords": [
6
6
  "react",
@@ -1,16 +1,14 @@
1
1
  // Liquid toggle component
2
- import React, { type ComponentProps } from "react";
3
2
  import { Droplet, Moon, Sun, SunMoon } from "lucide-react";
3
+ import React from "react";
4
+
4
5
  import { Button } from "../button";
5
6
  import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip";
6
7
  import { useTheme } from "./ThemeProvider";
7
- import { createClientOnlyComponent, useDocument, cn } from "../../hooks";
8
-
9
- type LiquidToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
8
+ import { createClientOnlyComponent } from "../../hooks";
10
9
 
11
- const LiquidToggleButton: React.FC<LiquidToggleProps> = (props) => {
10
+ const LiquidToggleButton: React.FC = () => {
12
11
  const { theme, setTheme, storageKey } = useTheme();
13
- const document = useDocument();
14
12
 
15
13
  const handleLiquidToggle = () => {
16
14
  let newTheme: string;
@@ -29,9 +27,7 @@ const LiquidToggleButton: React.FC<LiquidToggleProps> = (props) => {
29
27
  // Default fallback
30
28
  newTheme = "liquid-light";
31
29
  }
32
- if (document) {
33
- document.cookie = `${storageKey}=${newTheme}`;
34
- }
30
+ document.cookie = `${storageKey}=${newTheme}`;
35
31
  setTheme(newTheme);
36
32
  };
37
33
 
@@ -43,12 +39,11 @@ const LiquidToggleButton: React.FC<LiquidToggleProps> = (props) => {
43
39
  <TooltipTrigger asChild>
44
40
  <Button
45
41
  icon
42
+ onClick={handleLiquidToggle}
46
43
  variant="ghost"
47
44
  value={isLiquid}
48
45
  aria-label={`Toggle liquid theme: ${isSystem ? "disabled (system mode)" : isLiquid ? "on" : "off"}`}
49
- {...props}
50
- onClick={handleLiquidToggle}
51
- className={cn(props.className, isSystem && "cursor-not-allowed opacity-50")}
46
+ className={isSystem ? "cursor-not-allowed opacity-50" : ""}
52
47
  disabled={isSystem}
53
48
  >
54
49
  <Droplet size={20} />
@@ -59,11 +54,8 @@ const LiquidToggleButton: React.FC<LiquidToggleProps> = (props) => {
59
54
  );
60
55
  };
61
56
  // Theme toggle component for light/dark
62
- type ThemeToggleProps = Omit<ComponentProps<typeof Button>, "onClick" | "children">;
63
-
64
- const ThemeToggleButton: React.FC<ThemeToggleProps> = (props) => {
57
+ const ThemeToggleButton: React.FC = () => {
65
58
  const { theme, setTheme, storageKey } = useTheme();
66
- const document = useDocument();
67
59
 
68
60
  const handleThemeChange = () => {
69
61
  let newTheme: string;
@@ -81,9 +73,7 @@ const ThemeToggleButton: React.FC<ThemeToggleProps> = (props) => {
81
73
  // Default fallback
82
74
  newTheme = "light";
83
75
  }
84
- if (document) {
85
- document.cookie = `${storageKey}=${newTheme}`;
86
- }
76
+ document.cookie = `${storageKey}=${newTheme}`;
87
77
  setTheme(newTheme);
88
78
  };
89
79
 
@@ -93,24 +83,23 @@ const ThemeToggleButton: React.FC<ThemeToggleProps> = (props) => {
93
83
  return (
94
84
  <Button
95
85
  icon
86
+ onClick={handleThemeChange}
96
87
  variant="ghost"
97
88
  aria-label={`Current theme: ${isSystem ? "system" : isDark ? "dark" : "light"}`}
98
- {...props}
99
- onClick={handleThemeChange}
100
89
  >
101
90
  {isSystem ? <SunMoon size={20} /> : isDark ? <Moon size={20} /> : <Sun size={20} />}
102
91
  </Button>
103
92
  );
104
93
  };
105
94
  // Create client-only versions to prevent hydration mismatch
106
- export const LiquidToggle = createClientOnlyComponent(LiquidToggleButton, (props: LiquidToggleProps) => (
107
- <Button icon variant="ghost" aria-label="Liquid toggle loading..." {...props}>
95
+ export const LiquidToggle = createClientOnlyComponent(LiquidToggleButton, () => (
96
+ <Button icon variant="ghost" aria-label="Liquid toggle loading...">
108
97
  <Droplet size={20} />
109
98
  </Button>
110
99
  ));
111
100
 
112
- export const ThemeToggle = createClientOnlyComponent(ThemeToggleButton, (props: ThemeToggleProps) => (
113
- <Button icon variant="ghost" aria-label="Theme toggle loading..." {...props}>
101
+ export const ThemeToggle = createClientOnlyComponent(ThemeToggleButton, () => (
102
+ <Button icon variant="ghost" aria-label="Theme toggle loading...">
114
103
  <Sun size={20} />
115
104
  </Button>
116
105
  ));
@@ -13,6 +13,7 @@ type TreeDataItem = {
13
13
  label: string;
14
14
  isCollapsible?: boolean;
15
15
  actions?: ReactNode;
16
+ disable?: boolean;
16
17
  [key: string]: unknown;
17
18
  };
18
19
 
@@ -29,6 +30,7 @@ type TreeViewProps<T extends TreeDataItem> = {
29
30
  isSelectable?: boolean;
30
31
  selectedItemId?: string | null;
31
32
  onSelectChange?: (id: string | null) => void;
33
+ isSearchable?: boolean;
32
34
  };
33
35
 
34
36
  /**
@@ -45,6 +47,7 @@ function TreeView<T extends TreeDataItem>({
45
47
  isSelectable = false,
46
48
  selectedItemId,
47
49
  onSelectChange,
50
+ isSearchable = true,
48
51
  }: TreeViewProps<T>) {
49
52
  const [expandedItems, setExpandedItems] = useState(() => {
50
53
  const initial = new Set<string>();
@@ -201,59 +204,63 @@ function TreeView<T extends TreeDataItem>({
201
204
 
202
205
  return (
203
206
  <div className={cn("border-line-secondary/20 flex flex-col", className)}>
204
- <div className="border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2">
205
- <Search className="text-text-secondary size-4" />
206
- <input
207
- type="text"
208
- placeholder="Search..."
209
- className={cn(
210
- "text-uk-md w-full bg-transparent focus:outline-none",
211
- !isRegexValid && "text-red-500",
212
- )}
213
- value={searchQuery}
214
- onChange={(e) => setSearchQuery(e.target.value)}
215
- />
216
- <TooltipProvider delayDuration={200}>
217
- <Tooltip>
218
- <TooltipTrigger asChild>
219
- <button
220
- onClick={() => setIsCaseSensitive((prev) => !prev)}
221
- className={cn("rounded-uk-sm p-1", isCaseSensitive && "bg-bg-tertiary")}
222
- >
223
- <CaseSensitive className="size-4" />
224
- </button>
225
- </TooltipTrigger>
226
- <TooltipContent>
227
- <p>Case Sensitive</p>
228
- </TooltipContent>
229
- </Tooltip>
230
- <Tooltip>
231
- <TooltipTrigger asChild>
232
- <button
233
- onClick={() => setIsRegex((prev) => !prev)}
234
- className={cn("rounded-uk-sm p-1", isRegex && "bg-bg-tertiary")}
235
- >
236
- <Regex className="size-4" />
237
- </button>
238
- </TooltipTrigger>
239
- <TooltipContent>
240
- <p>Use Regular Expression</p>
241
- </TooltipContent>
242
- </Tooltip>
243
- </TooltipProvider>
244
- </div>
207
+ {isSearchable && (
208
+ <div className="border-line-secondary/20 flex h-[32px] shrink-0 items-center gap-1 border-b px-2">
209
+ <Search className="text-text-secondary size-4" />
210
+ <input
211
+ type="text"
212
+ placeholder="Search..."
213
+ className={cn(
214
+ "text-uk-md w-full bg-transparent focus:outline-none",
215
+ !isRegexValid && "text-red-500",
216
+ )}
217
+ value={searchQuery}
218
+ onChange={(e) => setSearchQuery(e.target.value)}
219
+ />
220
+ <TooltipProvider delayDuration={200}>
221
+ <Tooltip>
222
+ <TooltipTrigger asChild>
223
+ <button
224
+ onClick={() => setIsCaseSensitive((prev) => !prev)}
225
+ className={cn("rounded-uk-sm p-1", isCaseSensitive && "bg-bg-tertiary")}
226
+ >
227
+ <CaseSensitive className="size-4" />
228
+ </button>
229
+ </TooltipTrigger>
230
+ <TooltipContent>
231
+ <p>Case Sensitive</p>
232
+ </TooltipContent>
233
+ </Tooltip>
234
+ <Tooltip>
235
+ <TooltipTrigger asChild>
236
+ <button
237
+ onClick={() => setIsRegex((prev) => !prev)}
238
+ className={cn("rounded-uk-sm p-1", isRegex && "bg-bg-tertiary")}
239
+ >
240
+ <Regex className="size-4" />
241
+ </button>
242
+ </TooltipTrigger>
243
+ <TooltipContent>
244
+ <p>Use Regular Expression</p>
245
+ </TooltipContent>
246
+ </Tooltip>
247
+ </TooltipProvider>
248
+ </div>
249
+ )}
245
250
  <div className="overflow-y-auto">
246
251
  {visibleData.map((item) => (
247
252
  <div
248
253
  key={item.id}
249
254
  className={cn(
250
- "group relative flex h-[32px] cursor-pointer items-center",
251
- hoveredId === item.id && "bg-bg-secondary/80",
252
- isSelectable && selectedItemId === item.id && "bg-brand-primary",
255
+ "group relative flex h-[32px] items-center",
256
+ isSelectable && "rounded-uk-md",
257
+ !item.disable && "cursor-pointer",
258
+ hoveredId === item.id && !item.disable && "bg-bg-secondary",
259
+ isSelectable && selectedItemId === item.id && "bg-brand-primary text-text-withbg",
253
260
  )}
254
261
  onMouseEnter={() => onItemHover?.(item.id)}
255
262
  onMouseLeave={() => onItemHover?.(null)}
256
- onClick={() => handleItemSelect(item.id)}
263
+ onClick={() => !item.disable && handleItemSelect(item.id)}
257
264
  >
258
265
  {/* Guide Lines */}
259
266
  <div className="absolute top-0 left-[-0.28rem] z-0 flex h-full items-center">
@@ -304,6 +311,7 @@ function TreeView<T extends TreeDataItem>({
304
311
  className={cn(
305
312
  "size-4 transition-transform",
306
313
  !expandedItems.has(item.id) && "-rotate-90",
314
+ item.disable && "text-icon-tertiary",
307
315
  )}
308
316
  />
309
317
  </button>
@@ -312,12 +320,15 @@ function TreeView<T extends TreeDataItem>({
312
320
  className={cn(
313
321
  "cursor-pointer transition-opacity",
314
322
  item.isCollapsible && "group-hover:opacity-0",
323
+ item.disable && "text-icon-tertiary",
315
324
  )}
316
325
  >
317
326
  {getIcon(item)}
318
327
  </div>
319
328
  </div>
320
- <span className="truncate">{renderLabel(item.label)}</span>
329
+ <span className={cn("truncate", item.disable && "text-text-tertiary")}>
330
+ {renderLabel(item.label)}
331
+ </span>
321
332
  </div>
322
333
  {item.actions && (
323
334
  <div className="flex items-center gap-1" onClick={(e) => e.stopPropagation()}>