@devalok/shilp-sutra 0.27.2 → 0.29.0

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 (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -1,46 +1,47 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as h, Fragment as E } from "react/jsx-runtime";
3
3
  import { S as v } from "../_chunks/primitives.js";
4
- import { c as T } from "../_chunks/vendor-utils.js";
4
+ import { a as T } from "../_chunks/vendor-utils.js";
5
5
  import { IconLayoutSidebarLeftCollapse as A } from "@tabler/icons-react";
6
6
  import { useIsMobile as D } from "../hooks/use-mobile.js";
7
7
  import { springs as O } from "./lib/motion.js";
8
8
  import { cn as r } from "./lib/utils.js";
9
- import { Button as R } from "./button.js";
10
- import { Input as G } from "./input.js";
11
- import { Separator as L } from "./separator.js";
12
- import { Sheet as H, SheetContent as K } from "./sheet.js";
9
+ import { Icon as R } from "./icon.js";
10
+ import { Button as G } from "./button.js";
11
+ import { Input as L } from "./input.js";
12
+ import { Separator as H } from "./separator.js";
13
+ import { Sheet as K, SheetContent as j } from "./sheet.js";
13
14
  import { Skeleton as _ } from "./skeleton.js";
14
- import { TooltipProvider as j, Tooltip as $, TooltipTrigger as F, TooltipContent as P } from "./tooltip.js";
15
- import { createContext as V, forwardRef as i, useState as I, useCallback as C, useEffect as W, useMemo as k, useContext as q } from "react";
16
- import { m as U } from "../_chunks/framer.js";
17
- const X = "sidebar:state", Y = 60 * 60 * 24 * 7, J = "16rem", Q = "18rem", Z = "3rem", ee = "b", z = V(null);
15
+ import { TooltipProvider as $, Tooltip as F, TooltipTrigger as P, TooltipContent as V } from "./tooltip.js";
16
+ import { createContext as W, forwardRef as d, useState as C, useCallback as I, useEffect as q, useMemo as k, useContext as U } from "react";
17
+ import { m as X } from "../_chunks/framer.js";
18
+ const Y = "sidebar:state", J = 3600 * 24 * 7, Q = "16rem", Z = "18rem", ee = "3rem", ae = "b", z = W(null);
18
19
  function N() {
19
- const a = q(z);
20
- if (!a)
20
+ const e = U(z);
21
+ if (!e)
21
22
  throw new Error("useSidebar must be used within a SidebarProvider.");
22
- return a;
23
+ return e;
23
24
  }
24
- const ae = i(
25
+ const te = d(
25
26
  ({
26
- defaultOpen: a = !0,
27
- open: e,
27
+ defaultOpen: e = !0,
28
+ open: a,
28
29
  onOpenChange: t,
29
- className: d,
30
+ className: i,
30
31
  style: o,
31
32
  children: n,
32
33
  ...u
33
- }, f) => {
34
- const c = D(), [b, p] = I(!1), [y, x] = I(a), g = e ?? y, S = C(
34
+ }, b) => {
35
+ const c = D(), [f, p] = C(!1), [y, x] = C(e), g = a ?? y, S = I(
35
36
  (l) => {
36
37
  const m = typeof l == "function" ? l(g) : l;
37
- t ? t(m) : x(m), typeof document < "u" && (document.cookie = `${X}=${m}; path=/; max-age=${Y}`);
38
+ t ? t(m) : x(m), typeof document < "u" && (document.cookie = `${Y}=${m}; path=/; max-age=${J}`);
38
39
  },
39
40
  [t, g]
40
- ), w = C(() => c ? p((l) => !l) : S((l) => !l), [c, S, p]);
41
- W(() => {
41
+ ), w = I(() => c ? p((l) => !l) : S((l) => !l), [c, S, p]);
42
+ q(() => {
42
43
  const l = (m) => {
43
- m.key === ee && (m.metaKey || m.ctrlKey) && (m.preventDefault(), w());
44
+ m.key === ae && (m.metaKey || m.ctrlKey) && (m.preventDefault(), w());
44
45
  };
45
46
  return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
46
47
  }, [w]);
@@ -50,7 +51,7 @@ const ae = i(
50
51
  open: g,
51
52
  setOpen: S,
52
53
  isMobile: c,
53
- openMobile: b,
54
+ openMobile: f,
54
55
  setOpenMobile: p,
55
56
  toggleSidebar: w
56
57
  }),
@@ -59,62 +60,62 @@ const ae = i(
59
60
  g,
60
61
  S,
61
62
  c,
62
- b,
63
+ f,
63
64
  p,
64
65
  w
65
66
  ]
66
67
  );
67
- return /* @__PURE__ */ s(z.Provider, { value: B, children: /* @__PURE__ */ s(j, { delayDuration: 0, children: /* @__PURE__ */ s(
68
+ return /* @__PURE__ */ s(z.Provider, { value: B, children: /* @__PURE__ */ s($, { delayDuration: 0, children: /* @__PURE__ */ s(
68
69
  "div",
69
70
  {
70
71
  style: {
71
- "--sidebar-width": J,
72
- "--sidebar-width-icon": Z,
72
+ "--sidebar-width": Q,
73
+ "--sidebar-width-icon": ee,
73
74
  ...o
74
75
  },
75
76
  className: r(
76
77
  "group/sidebar-wrapper flex min-h-svh has-[[data-variant=inset]]:bg-surface-sunken",
77
- d
78
+ i
78
79
  ),
79
- ref: f,
80
+ ref: b,
80
81
  ...u,
81
82
  children: n
82
83
  }
83
84
  ) }) });
84
85
  }
85
86
  );
86
- ae.displayName = "SidebarProvider";
87
- const te = i(
87
+ te.displayName = "SidebarProvider";
88
+ const se = d(
88
89
  ({
89
- side: a = "left",
90
- variant: e = "sidebar",
90
+ side: e = "left",
91
+ variant: a = "sidebar",
91
92
  collapsible: t = "offcanvas",
92
- className: d,
93
+ className: i,
93
94
  children: o,
94
95
  ...n
95
96
  }, u) => {
96
- const { isMobile: f, state: c, openMobile: b, setOpenMobile: p } = N();
97
+ const { isMobile: b, state: c, openMobile: f, setOpenMobile: p } = N();
97
98
  return t === "none" ? /* @__PURE__ */ s(
98
99
  "div",
99
100
  {
100
101
  className: r(
101
102
  "flex h-full w-[--sidebar-width] flex-col bg-surface-raised text-surface-fg",
102
- d
103
+ i
103
104
  ),
104
105
  ref: u,
105
106
  ...n,
106
107
  children: o
107
108
  }
108
- ) : f ? /* @__PURE__ */ s(H, { open: b, onOpenChange: p, ...n, children: /* @__PURE__ */ s(
109
- K,
109
+ ) : b ? /* @__PURE__ */ s(K, { open: f, onOpenChange: p, ...n, children: /* @__PURE__ */ s(
110
+ j,
110
111
  {
111
112
  "data-sidebar": "sidebar",
112
113
  "data-mobile": "true",
113
114
  className: "w-[--sidebar-width] bg-surface-raised p-0 text-surface-fg [&>button]:hidden",
114
115
  style: {
115
- "--sidebar-width": Q
116
+ "--sidebar-width": Z
116
117
  },
117
- side: a,
118
+ side: e,
118
119
  children: /* @__PURE__ */ s("div", { className: "flex h-full w-full flex-col", children: o })
119
120
  }
120
121
  ) }) : /* @__PURE__ */ h(
@@ -124,8 +125,8 @@ const te = i(
124
125
  className: "group peer hidden text-surface-fg md:block",
125
126
  "data-state": c,
126
127
  "data-collapsible": c === "collapsed" ? t : "",
127
- "data-variant": e,
128
- "data-side": a,
128
+ "data-variant": a,
129
+ "data-side": e,
129
130
  children: [
130
131
  /* @__PURE__ */ s(
131
132
  "div",
@@ -134,7 +135,7 @@ const te = i(
134
135
  "relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-moderate-02 ease-productive-exit",
135
136
  "group-data-[collapsible=offcanvas]:w-0",
136
137
  "group-data-[side=right]:rotate-180",
137
- e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
138
+ a === "floating" || a === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
138
139
  )
139
140
  }
140
141
  ),
@@ -143,9 +144,9 @@ const te = i(
143
144
  {
144
145
  className: r(
145
146
  "fixed inset-y-0 z-raised hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-moderate-02 ease-productive-exit md:flex",
146
- a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
147
- e === "floating" || e === "inset" ? "p-ds-03 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
148
- d
147
+ e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
148
+ a === "floating" || a === "inset" ? "p-ds-03 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
149
+ i
149
150
  ),
150
151
  ...n,
151
152
  children: /* @__PURE__ */ s(
@@ -163,32 +164,32 @@ const te = i(
163
164
  );
164
165
  }
165
166
  );
166
- te.displayName = "Sidebar";
167
- const se = i(({ className: a, onClick: e, ...t }, d) => {
167
+ se.displayName = "Sidebar";
168
+ const re = d(({ className: e, onClick: a, ...t }, i) => {
168
169
  const { toggleSidebar: o } = N();
169
170
  return /* @__PURE__ */ h(
170
- R,
171
+ G,
171
172
  {
172
- ref: d,
173
+ ref: i,
173
174
  "data-sidebar": "trigger",
174
175
  variant: "ghost",
175
176
  size: "icon-md",
176
- className: r("h-ds-xs-plus w-ds-xs-plus", a),
177
+ className: r("h-ds-xs-plus w-ds-xs-plus", e),
177
178
  onClick: (n) => {
178
- e == null || e(n), o();
179
+ a?.(n), o();
179
180
  },
180
181
  ...t,
181
182
  children: [
182
- /* @__PURE__ */ s(A, {}),
183
+ /* @__PURE__ */ s(R, { icon: A, size: "sm" }),
183
184
  /* @__PURE__ */ s("span", { className: "sr-only", children: "Toggle Sidebar" })
184
185
  ]
185
186
  }
186
187
  );
187
188
  });
188
- se.displayName = "SidebarTrigger";
189
- const re = i(
190
- ({ className: a, ...e }, t) => {
191
- const { toggleSidebar: d } = N();
189
+ re.displayName = "SidebarTrigger";
190
+ const ie = d(
191
+ ({ className: e, ...a }, t) => {
192
+ const { toggleSidebar: i } = N();
192
193
  return /* @__PURE__ */ s(
193
194
  "button",
194
195
  {
@@ -196,7 +197,7 @@ const re = i(
196
197
  "data-sidebar": "rail",
197
198
  "aria-label": "Toggle Sidebar",
198
199
  tabIndex: -1,
199
- onClick: d,
200
+ onClick: i,
200
201
  title: "Toggle Sidebar",
201
202
  className: r(
202
203
  "hover:after:bg-surface-border-strong absolute inset-y-0 z-raised hidden w-4 -translate-x-1/2 transition-colors ease-productive-standard after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
@@ -205,172 +206,174 @@ const re = i(
205
206
  "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-surface-raised-hover",
206
207
  "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
207
208
  "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
208
- a
209
+ e
209
210
  ),
210
- ...e
211
+ ...a
211
212
  }
212
213
  );
213
214
  }
214
215
  );
215
- re.displayName = "SidebarRail";
216
- const ie = i(
217
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
216
+ ie.displayName = "SidebarRail";
217
+ const de = d(
218
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
218
219
  "main",
219
220
  {
220
221
  ref: t,
221
222
  className: r(
222
223
  "relative flex min-h-svh flex-1 flex-col bg-surface-base",
223
224
  "peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-ds-03 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-ds-03 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-ds-xl md:peer-data-[variant=inset]:shadow",
224
- a
225
+ e
225
226
  ),
226
- ...e
227
+ ...a
227
228
  }
228
229
  )
229
230
  );
230
- ie.displayName = "SidebarInset";
231
- const de = i(({ className: a, ...e }, t) => /* @__PURE__ */ s(
232
- G,
231
+ de.displayName = "SidebarInset";
232
+ const oe = d(({ className: e, wrapperClassName: a, ...t }, i) => /* @__PURE__ */ s(
233
+ L,
233
234
  {
234
- ref: t,
235
+ ref: i,
235
236
  "data-sidebar": "input",
236
- className: r(
237
- "h-ds-sm w-full bg-surface-raised shadow-none focus-visible:ring-2 focus-visible:ring-accent-9",
237
+ size: "sm",
238
+ wrapperClassName: r(
239
+ "bg-surface-raised shadow-none focus-within:ring-2 focus-within:ring-accent-9",
238
240
  a
239
241
  ),
240
- ...e
242
+ className: r("w-full", e),
243
+ ...t
241
244
  }
242
245
  ));
243
- de.displayName = "SidebarInput";
244
- const oe = i(
245
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
246
+ oe.displayName = "SidebarInput";
247
+ const ne = d(
248
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
246
249
  "div",
247
250
  {
248
251
  ref: t,
249
252
  "data-sidebar": "header",
250
- className: r("flex flex-col gap-ds-03 p-ds-03", a),
251
- ...e
253
+ className: r("flex flex-col gap-ds-03 p-ds-03", e),
254
+ ...a
252
255
  }
253
256
  )
254
257
  );
255
- oe.displayName = "SidebarHeader";
256
- const ne = i(
257
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
258
+ ne.displayName = "SidebarHeader";
259
+ const le = d(
260
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
258
261
  "div",
259
262
  {
260
263
  ref: t,
261
264
  "data-sidebar": "footer",
262
- className: r("flex flex-col gap-ds-03 p-ds-03", a),
263
- ...e
265
+ className: r("flex flex-col gap-ds-03 p-ds-03", e),
266
+ ...a
264
267
  }
265
268
  )
266
269
  );
267
- ne.displayName = "SidebarFooter";
268
- const le = i(({ className: a, ...e }, t) => /* @__PURE__ */ s(
269
- L,
270
+ le.displayName = "SidebarFooter";
271
+ const ce = d(({ className: e, ...a }, t) => /* @__PURE__ */ s(
272
+ H,
270
273
  {
271
274
  ref: t,
272
275
  "data-sidebar": "separator",
273
276
  className: r(
274
277
  "bg-surface-border mx-ds-03 w-auto",
275
- a
278
+ e
276
279
  ),
277
- ...e
280
+ ...a
278
281
  }
279
282
  ));
280
- le.displayName = "SidebarSeparator";
281
- const ce = i(
282
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
283
+ ce.displayName = "SidebarSeparator";
284
+ const ue = d(
285
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
283
286
  "div",
284
287
  {
285
288
  ref: t,
286
289
  "data-sidebar": "content",
287
290
  className: r(
288
291
  "flex min-h-0 flex-1 flex-col gap-ds-03 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
289
- a
292
+ e
290
293
  ),
291
- ...e
294
+ ...a
292
295
  }
293
296
  )
294
297
  );
295
- ce.displayName = "SidebarContent";
296
- const ue = i(
297
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
298
+ ue.displayName = "SidebarContent";
299
+ const pe = d(
300
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
298
301
  "div",
299
302
  {
300
303
  ref: t,
301
304
  "data-sidebar": "group",
302
- className: r("relative flex w-full min-w-0 flex-col p-ds-03", a),
303
- ...e
305
+ className: r("relative flex w-full min-w-0 flex-col p-ds-03", e),
306
+ ...a
304
307
  }
305
308
  )
306
309
  );
307
- ue.displayName = "SidebarGroup";
308
- const pe = i(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ s(
309
- e ? v : "div",
310
+ pe.displayName = "SidebarGroup";
311
+ const me = d(({ className: e, asChild: a = !1, ...t }, i) => /* @__PURE__ */ s(
312
+ a ? v : "div",
310
313
  {
311
- ref: d,
314
+ ref: i,
312
315
  "data-sidebar": "group-label",
313
316
  className: r(
314
317
  "flex h-ds-sm shrink-0 items-center rounded-ds-md px-ds-03 text-ds-sm font-medium text-surface-fg-muted outline-none ring-accent-9 transition-[margin,opacity] duration-moderate-02 ease-productive-exit focus-visible:ring-2 [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
315
318
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
316
- a
319
+ e
317
320
  ),
318
321
  ...t
319
322
  }
320
323
  ));
321
- pe.displayName = "SidebarGroupLabel";
322
- const me = i(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ s(
323
- e ? v : "button",
324
+ me.displayName = "SidebarGroupLabel";
325
+ const fe = d(({ className: e, asChild: a = !1, ...t }, i) => /* @__PURE__ */ s(
326
+ a ? v : "button",
324
327
  {
325
- ref: d,
328
+ ref: i,
326
329
  "data-sidebar": "group-action",
327
330
  className: r(
328
331
  "hover:bg-surface-raised-hover absolute right-ds-04 top-ds-04 flex aspect-square w-5 items-center justify-center rounded-ds-md p-0 text-surface-fg outline-none ring-accent-9 transition-transform hover:text-surface-fg focus-visible:ring-2 [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
329
332
  "after:absolute after:-inset-2 after:md:hidden",
330
333
  "group-data-[collapsible=icon]:hidden",
331
- a
334
+ e
332
335
  ),
333
336
  ...t
334
337
  }
335
338
  ));
336
- me.displayName = "SidebarGroupAction";
337
- const be = i(
338
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
339
+ fe.displayName = "SidebarGroupAction";
340
+ const be = d(
341
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
339
342
  "div",
340
343
  {
341
344
  ref: t,
342
345
  "data-sidebar": "group-content",
343
- className: r("w-full text-ds-md", a),
344
- ...e
346
+ className: r("w-full text-ds-md", e),
347
+ ...a
345
348
  }
346
349
  )
347
350
  );
348
351
  be.displayName = "SidebarGroupContent";
349
- const fe = i(
350
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
352
+ const ge = d(
353
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
351
354
  "ul",
352
355
  {
353
356
  ref: t,
354
357
  "data-sidebar": "menu",
355
- className: r("flex w-full min-w-0 flex-col gap-ds-02", a),
356
- ...e
358
+ className: r("flex w-full min-w-0 flex-col gap-ds-02", e),
359
+ ...a
357
360
  }
358
361
  )
359
362
  );
360
- fe.displayName = "SidebarMenu";
361
- const ge = i(
362
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
363
+ ge.displayName = "SidebarMenu";
364
+ const he = d(
365
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
363
366
  "li",
364
367
  {
365
368
  ref: t,
366
369
  "data-sidebar": "menu-item",
367
- className: r("group/menu-item relative", a),
368
- ...e
370
+ className: r("group/menu-item relative", e),
371
+ ...a
369
372
  }
370
373
  )
371
374
  );
372
- ge.displayName = "SidebarMenuItem";
373
- const he = T(
375
+ he.displayName = "SidebarMenuItem";
376
+ const ve = T(
374
377
  "peer/menu-button hover:bg-surface-raised-hover active:bg-accent-2 data-[active=true]:bg-accent-2 data-[state=open]:hover:bg-surface-raised-hover flex w-full items-center gap-ds-03 overflow-hidden rounded-ds-md p-ds-03 text-left outline-none ring-accent-9 transition-[width,height,padding] hover:text-surface-fg focus-visible:ring-2 active:text-surface-fg disabled:pointer-events-none disabled:opacity-action-disabled group-has-[[data-sidebar=menu-action]]/menu-item:pr-ds-07 aria-disabled:pointer-events-none aria-disabled:opacity-action-disabled data-[active=true]:font-medium data-[active=true]:text-surface-fg data-[state=open]:hover:text-surface-fg group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-ds-03 [&>span:last-child]:truncate [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
375
378
  {
376
379
  variants: {
@@ -389,29 +392,29 @@ const he = T(
389
392
  size: "md"
390
393
  }
391
394
  }
392
- ), ve = i(
395
+ ), xe = d(
393
396
  ({
394
- asChild: a = !1,
395
- isActive: e = !1,
397
+ asChild: e = !1,
398
+ isActive: a = !1,
396
399
  variant: t = "default",
397
- size: d = "md",
400
+ size: i = "md",
398
401
  tooltip: o,
399
402
  className: n,
400
403
  children: u,
401
- ...f
404
+ ...b
402
405
  }, c) => {
403
- const b = a ? v : "button", { isMobile: p, state: y } = N(), x = /* @__PURE__ */ s(
404
- b,
406
+ const f = e ? v : "button", { isMobile: p, state: y } = N(), x = /* @__PURE__ */ s(
407
+ f,
405
408
  {
406
409
  ref: c,
407
410
  "data-sidebar": "menu-button",
408
- "data-size": d,
409
- "data-active": e,
410
- className: r(he({ variant: t, size: d }), !a && "relative", n),
411
- ...f,
412
- children: a ? u : /* @__PURE__ */ h(E, { children: [
413
- e && /* @__PURE__ */ s(
414
- U.span,
411
+ "data-size": i,
412
+ "data-active": a,
413
+ className: r(ve({ variant: t, size: i }), !e && "relative", n),
414
+ ...b,
415
+ children: e ? u : /* @__PURE__ */ h(E, { children: [
416
+ a && /* @__PURE__ */ s(
417
+ X.span,
415
418
  {
416
419
  layoutId: "sidebar-active-indicator",
417
420
  className: "absolute inset-0 rounded-ds-md bg-accent-2",
@@ -424,10 +427,10 @@ const he = T(
424
427
  );
425
428
  return o ? (typeof o == "string" && (o = {
426
429
  children: o
427
- }), /* @__PURE__ */ h($, { children: [
428
- /* @__PURE__ */ s(F, { asChild: !0, children: x }),
430
+ }), /* @__PURE__ */ h(F, { children: [
431
+ /* @__PURE__ */ s(P, { asChild: !0, children: x }),
429
432
  /* @__PURE__ */ s(
430
- P,
433
+ V,
431
434
  {
432
435
  side: "right",
433
436
  align: "center",
@@ -438,9 +441,9 @@ const he = T(
438
441
  ] })) : x;
439
442
  }
440
443
  );
441
- ve.displayName = "SidebarMenuButton";
442
- const xe = i(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, o) => /* @__PURE__ */ s(
443
- e ? v : "button",
444
+ xe.displayName = "SidebarMenuButton";
445
+ const Se = d(({ className: e, asChild: a = !1, showOnHover: t = !1, ...i }, o) => /* @__PURE__ */ s(
446
+ a ? v : "button",
444
447
  {
445
448
  ref: o,
446
449
  "data-sidebar": "menu-action",
@@ -452,14 +455,14 @@ const xe = i(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, o) =
452
455
  "peer-data-[size=lg]/menu-button:top-ds-03",
453
456
  "group-data-[collapsible=icon]:hidden",
454
457
  t && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-surface-fg md:opacity-0",
455
- a
458
+ e
456
459
  ),
457
- ...d
460
+ ...i
458
461
  }
459
462
  ));
460
- xe.displayName = "SidebarMenuAction";
461
- const Se = i(
462
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
463
+ Se.displayName = "SidebarMenuAction";
464
+ const we = d(
465
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
463
466
  "div",
464
467
  {
465
468
  ref: t,
@@ -471,24 +474,24 @@ const Se = i(
471
474
  "peer-data-[size=md]/menu-button:top-ds-02b",
472
475
  "peer-data-[size=lg]/menu-button:top-ds-03",
473
476
  "group-data-[collapsible=icon]:hidden",
474
- a
477
+ e
475
478
  ),
476
- ...e
479
+ ...a
477
480
  }
478
481
  )
479
482
  );
480
- Se.displayName = "SidebarMenuBadge";
481
- const we = i(({ className: a, showIcon: e = !1, ...t }, d) => {
483
+ we.displayName = "SidebarMenuBadge";
484
+ const Ne = d(({ className: e, showIcon: a = !1, ...t }, i) => {
482
485
  const o = k(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
483
486
  return /* @__PURE__ */ h(
484
487
  "div",
485
488
  {
486
- ref: d,
489
+ ref: i,
487
490
  "data-sidebar": "menu-skeleton",
488
- className: r("flex h-ds-sm items-center gap-ds-03 rounded-ds-md px-ds-03", a),
491
+ className: r("flex h-ds-sm items-center gap-ds-03 rounded-ds-md px-ds-03", e),
489
492
  ...t,
490
493
  children: [
491
- e && /* @__PURE__ */ s(
494
+ a && /* @__PURE__ */ s(
492
495
  _,
493
496
  {
494
497
  className: "h-ico-sm w-ico-sm rounded-ds-md",
@@ -509,9 +512,9 @@ const we = i(({ className: a, showIcon: e = !1, ...t }, d) => {
509
512
  }
510
513
  );
511
514
  });
512
- we.displayName = "SidebarMenuSkeleton";
513
- const Ne = i(
514
- ({ className: a, ...e }, t) => /* @__PURE__ */ s(
515
+ Ne.displayName = "SidebarMenuSkeleton";
516
+ const ye = d(
517
+ ({ className: e, ...a }, t) => /* @__PURE__ */ s(
515
518
  "ul",
516
519
  {
517
520
  ref: t,
@@ -519,59 +522,59 @@ const Ne = i(
519
522
  className: r(
520
523
  "mx-ds-04 flex min-w-0 translate-x-px flex-col gap-ds-02 border-l border-surface-border px-ds-03 py-ds-01",
521
524
  "group-data-[collapsible=icon]:hidden",
522
- a
525
+ e
523
526
  ),
524
- ...e
527
+ ...a
525
528
  }
526
529
  )
527
530
  );
528
- Ne.displayName = "SidebarMenuSub";
529
- const ye = i(
530
- ({ ...a }, e) => /* @__PURE__ */ s("li", { ref: e, ...a })
531
+ ye.displayName = "SidebarMenuSub";
532
+ const Me = d(
533
+ ({ ...e }, a) => /* @__PURE__ */ s("li", { ref: a, ...e })
531
534
  );
532
- ye.displayName = "SidebarMenuSubItem";
533
- const Me = i(({ asChild: a = !1, size: e = "md", isActive: t, className: d, ...o }, n) => /* @__PURE__ */ s(
534
- a ? v : "a",
535
+ Me.displayName = "SidebarMenuSubItem";
536
+ const _e = d(({ asChild: e = !1, size: a = "md", isActive: t, className: i, ...o }, n) => /* @__PURE__ */ s(
537
+ e ? v : "a",
535
538
  {
536
539
  ref: n,
537
540
  "data-sidebar": "menu-sub-button",
538
- "data-size": e,
541
+ "data-size": a,
539
542
  "data-active": t,
540
543
  className: r(
541
544
  "hover:bg-surface-raised-hover active:bg-accent-2 flex h-ds-xs-plus min-w-0 -translate-x-px items-center gap-ds-03 overflow-hidden rounded-ds-md px-ds-03 text-surface-fg outline-none ring-accent-9 hover:text-surface-fg focus-visible:ring-2 active:text-surface-fg disabled:pointer-events-none disabled:opacity-action-disabled aria-disabled:pointer-events-none aria-disabled:opacity-action-disabled [&>span:last-child]:truncate [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0 [&>svg]:text-surface-fg",
542
545
  "data-[active=true]:bg-accent-2 data-[active=true]:text-surface-fg",
543
- e === "sm" && "text-ds-sm",
544
- e === "md" && "text-ds-md",
546
+ a === "sm" && "text-ds-sm",
547
+ a === "md" && "text-ds-md",
545
548
  "group-data-[collapsible=icon]:hidden",
546
- d
549
+ i
547
550
  ),
548
551
  ...o
549
552
  }
550
553
  ));
551
- Me.displayName = "SidebarMenuSubButton";
554
+ _e.displayName = "SidebarMenuSubButton";
552
555
  export {
553
- te as Sidebar,
554
- ce as SidebarContent,
555
- ne as SidebarFooter,
556
- ue as SidebarGroup,
557
- me as SidebarGroupAction,
556
+ se as Sidebar,
557
+ ue as SidebarContent,
558
+ le as SidebarFooter,
559
+ pe as SidebarGroup,
560
+ fe as SidebarGroupAction,
558
561
  be as SidebarGroupContent,
559
- pe as SidebarGroupLabel,
560
- oe as SidebarHeader,
561
- de as SidebarInput,
562
- ie as SidebarInset,
563
- fe as SidebarMenu,
564
- xe as SidebarMenuAction,
565
- Se as SidebarMenuBadge,
566
- ve as SidebarMenuButton,
567
- ge as SidebarMenuItem,
568
- we as SidebarMenuSkeleton,
569
- Ne as SidebarMenuSub,
570
- Me as SidebarMenuSubButton,
571
- ye as SidebarMenuSubItem,
572
- ae as SidebarProvider,
573
- re as SidebarRail,
574
- le as SidebarSeparator,
575
- se as SidebarTrigger,
562
+ me as SidebarGroupLabel,
563
+ ne as SidebarHeader,
564
+ oe as SidebarInput,
565
+ de as SidebarInset,
566
+ ge as SidebarMenu,
567
+ Se as SidebarMenuAction,
568
+ we as SidebarMenuBadge,
569
+ xe as SidebarMenuButton,
570
+ he as SidebarMenuItem,
571
+ Ne as SidebarMenuSkeleton,
572
+ ye as SidebarMenuSub,
573
+ _e as SidebarMenuSubButton,
574
+ Me as SidebarMenuSubItem,
575
+ te as SidebarProvider,
576
+ ie as SidebarRail,
577
+ ce as SidebarSeparator,
578
+ re as SidebarTrigger,
576
579
  N as useSidebar
577
580
  };