@taicode/common-web 3.7.7 → 3.7.8

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 (271) hide show
  1. package/output/components/alert-dialog.d.ts +20 -0
  2. package/output/components/alert-dialog.d.ts.map +1 -0
  3. package/output/components/alert-dialog.js +65 -0
  4. package/output/components/alert.d.ts +11 -0
  5. package/output/components/alert.d.ts.map +1 -0
  6. package/output/components/alert.js +38 -0
  7. package/output/components/avatar.d.ts +13 -0
  8. package/output/components/avatar.d.ts.map +1 -0
  9. package/output/components/avatar.js +40 -0
  10. package/output/components/badge.d.ts +11 -0
  11. package/output/components/badge.d.ts.map +1 -0
  12. package/output/components/badge.js +39 -0
  13. package/output/components/button.d.ts +12 -0
  14. package/output/components/button.d.ts.map +1 -0
  15. package/output/components/button.js +48 -0
  16. package/output/components/calendar.d.ts +13 -0
  17. package/output/components/calendar.d.ts.map +1 -0
  18. package/output/components/calendar.js +57 -0
  19. package/output/components/card.d.ts +13 -0
  20. package/output/components/card.d.ts.map +1 -0
  21. package/output/components/card.js +43 -0
  22. package/output/components/chart.d.ts +56 -0
  23. package/output/components/chart.d.ts.map +1 -0
  24. package/output/components/chart.js +127 -0
  25. package/output/components/checkbox.d.ts +5 -0
  26. package/output/components/checkbox.d.ts.map +1 -0
  27. package/output/components/checkbox.js +21 -0
  28. package/output/components/command.d.ts +20 -0
  29. package/output/components/command.d.ts.map +1 -0
  30. package/output/components/command.js +55 -0
  31. package/output/components/dialog.d.ts +20 -0
  32. package/output/components/dialog.d.ts.map +1 -0
  33. package/output/components/dialog.js +58 -0
  34. package/output/components/direction.d.ts +9 -0
  35. package/output/components/direction.d.ts.map +1 -0
  36. package/output/components/direction.js +10 -0
  37. package/output/components/drawer.d.ts +14 -0
  38. package/output/components/drawer.d.ts.map +1 -0
  39. package/output/components/drawer.js +56 -0
  40. package/output/components/dropdown-menu.d.ts +29 -0
  41. package/output/components/dropdown-menu.d.ts.map +1 -0
  42. package/output/components/dropdown-menu.js +78 -0
  43. package/output/components/field.d.ts +39 -0
  44. package/output/components/field.d.ts.map +1 -0
  45. package/output/components/field.js +102 -0
  46. package/output/components/footer/index.d.ts +27 -0
  47. package/output/components/footer/index.d.ts.map +1 -0
  48. package/output/components/footer/index.js +17 -0
  49. package/output/components/form.d.ts +26 -0
  50. package/output/components/form.d.ts.map +1 -0
  51. package/output/components/form.js +69 -0
  52. package/output/components/index.d.ts +46 -0
  53. package/output/components/index.d.ts.map +1 -0
  54. package/output/components/index.js +45 -0
  55. package/output/components/input-group.d.ts +17 -0
  56. package/output/components/input-group.d.ts.map +1 -0
  57. package/output/components/input-group.js +75 -0
  58. package/output/components/input.d.ts +4 -0
  59. package/output/components/input.d.ts.map +1 -0
  60. package/output/components/input.js +19 -0
  61. package/output/components/item.d.ts +25 -0
  62. package/output/components/item.d.ts.map +1 -0
  63. package/output/components/item.js +89 -0
  64. package/output/components/json-view/index.d.ts +11 -0
  65. package/output/components/json-view/index.d.ts.map +1 -0
  66. package/output/components/json-view/index.js +52 -0
  67. package/output/components/json-view/lazy/index.d.ts +18 -0
  68. package/output/components/json-view/lazy/index.d.ts.map +1 -0
  69. package/output/components/json-view/lazy/index.js +22 -0
  70. package/output/components/kbd.d.ts +4 -0
  71. package/output/components/kbd.d.ts.map +1 -0
  72. package/output/components/kbd.js +22 -0
  73. package/output/components/label.d.ts +5 -0
  74. package/output/components/label.d.ts.map +1 -0
  75. package/output/components/label.js +20 -0
  76. package/output/components/list-actions/index.d.ts +23 -0
  77. package/output/components/list-actions/index.d.ts.map +1 -0
  78. package/output/components/list-actions/index.js +15 -0
  79. package/output/components/loading-button/index.d.ts +44 -0
  80. package/output/components/loading-button/index.d.ts.map +1 -0
  81. package/output/components/loading-button/index.js +75 -0
  82. package/output/components/loading-button/index.test.d.ts +2 -0
  83. package/output/components/loading-button/index.test.d.ts.map +1 -0
  84. package/output/components/loading-button/index.test.js +203 -0
  85. package/output/components/native-select.d.ts +9 -0
  86. package/output/components/native-select.d.ts.map +1 -0
  87. package/output/components/native-select.js +28 -0
  88. package/output/components/page-back-button/index.d.ts +8 -0
  89. package/output/components/page-back-button/index.d.ts.map +1 -0
  90. package/output/components/page-back-button/index.js +7 -0
  91. package/output/components/page-state.d.ts +19 -0
  92. package/output/components/page-state.d.ts.map +1 -0
  93. package/output/components/page-state.js +13 -0
  94. package/output/components/pagination/index.d.ts +34 -0
  95. package/output/components/pagination/index.d.ts.map +1 -0
  96. package/output/components/pagination/index.js +75 -0
  97. package/output/components/popover.d.ts +11 -0
  98. package/output/components/popover.d.ts.map +1 -0
  99. package/output/components/popover.js +44 -0
  100. package/output/components/progress.d.ts +5 -0
  101. package/output/components/progress.d.ts.map +1 -0
  102. package/output/components/progress.js +21 -0
  103. package/output/components/radio-group.d.ts +6 -0
  104. package/output/components/radio-group.d.ts.map +1 -0
  105. package/output/components/radio-group.js +25 -0
  106. package/output/components/route-pending-indicator/index.d.ts +20 -0
  107. package/output/components/route-pending-indicator/index.d.ts.map +1 -0
  108. package/output/components/route-pending-indicator/index.js +17 -0
  109. package/output/components/scroll-area.d.ts +6 -0
  110. package/output/components/scroll-area.d.ts.map +1 -0
  111. package/output/components/scroll-area.js +24 -0
  112. package/output/components/searchable-select/index.d.ts +41 -0
  113. package/output/components/searchable-select/index.d.ts.map +1 -0
  114. package/output/components/searchable-select/index.js +46 -0
  115. package/output/components/select.d.ts +17 -0
  116. package/output/components/select.d.ts.map +1 -0
  117. package/output/components/select.js +58 -0
  118. package/output/components/separator.d.ts +5 -0
  119. package/output/components/separator.d.ts.map +1 -0
  120. package/output/components/separator.js +20 -0
  121. package/output/components/sheet.d.ts +16 -0
  122. package/output/components/sheet.d.ts.map +1 -0
  123. package/output/components/sheet.js +58 -0
  124. package/output/components/sidebar.d.ts +78 -0
  125. package/output/components/sidebar.d.ts.map +1 -0
  126. package/output/components/sidebar.js +233 -0
  127. package/output/components/size-provider/index.d.ts +2 -0
  128. package/output/components/size-provider/index.d.ts.map +1 -0
  129. package/output/components/size-provider/index.js +1 -0
  130. package/output/components/size-provider/size-provider.d.ts +9 -0
  131. package/output/components/size-provider/size-provider.d.ts.map +1 -0
  132. package/output/components/size-provider/size-provider.js +29 -0
  133. package/output/components/skeleton.d.ts +3 -0
  134. package/output/components/skeleton.d.ts.map +1 -0
  135. package/output/components/skeleton.js +18 -0
  136. package/output/components/sonner.d.ts +8 -0
  137. package/output/components/sonner.d.ts.map +1 -0
  138. package/output/components/sonner.js +34 -0
  139. package/output/components/spinner.d.ts +3 -0
  140. package/output/components/spinner.d.ts.map +1 -0
  141. package/output/components/spinner.js +19 -0
  142. package/output/components/switch.d.ts +8 -0
  143. package/output/components/switch.d.ts.map +1 -0
  144. package/output/components/switch.js +20 -0
  145. package/output/components/table.d.ts +11 -0
  146. package/output/components/table.d.ts.map +1 -0
  147. package/output/components/table.js +47 -0
  148. package/output/components/tabs.d.ts +12 -0
  149. package/output/components/tabs.d.ts.map +1 -0
  150. package/output/components/tabs.js +45 -0
  151. package/output/components/textarea.d.ts +4 -0
  152. package/output/components/textarea.d.ts.map +1 -0
  153. package/output/components/textarea.js +19 -0
  154. package/output/components/theme-switcher.d.ts +6 -0
  155. package/output/components/theme-switcher.d.ts.map +1 -0
  156. package/output/components/theme-switcher.js +19 -0
  157. package/output/components/toaster/index.d.ts +16 -0
  158. package/output/components/toaster/index.d.ts.map +1 -0
  159. package/output/components/toaster/index.js +70 -0
  160. package/output/components/toggle-group.d.ts +12 -0
  161. package/output/components/toggle-group.d.ts.map +1 -0
  162. package/output/components/toggle-group.js +38 -0
  163. package/output/components/toggle.d.ts +10 -0
  164. package/output/components/toggle.d.ts.map +1 -0
  165. package/output/components/toggle.js +38 -0
  166. package/output/components/tooltip.d.ts +8 -0
  167. package/output/components/tooltip.d.ts.map +1 -0
  168. package/output/components/tooltip.js +33 -0
  169. package/output/features/confirm-dialog/index.d.ts +41 -0
  170. package/output/features/confirm-dialog/index.d.ts.map +1 -0
  171. package/output/features/confirm-dialog/index.js +19 -0
  172. package/output/features/input-confirm/index.d.ts +26 -0
  173. package/output/features/input-confirm/index.d.ts.map +1 -0
  174. package/output/features/input-confirm/index.js +59 -0
  175. package/output/features/signin/context.d.ts +14 -0
  176. package/output/features/signin/context.d.ts.map +1 -0
  177. package/output/features/signin/context.js +13 -0
  178. package/output/features/signin/index.d.ts +58 -0
  179. package/output/features/signin/index.d.ts.map +1 -0
  180. package/output/features/signin/index.js +137 -0
  181. package/output/features/signin/service.d.ts +92 -0
  182. package/output/features/signin/service.d.ts.map +1 -0
  183. package/output/features/signin/service.js +519 -0
  184. package/output/features/signin/service.test.d.ts +2 -0
  185. package/output/features/signin/service.test.d.ts.map +1 -0
  186. package/output/features/signin/service.test.js +211 -0
  187. package/output/features/signin/types.d.ts +63 -0
  188. package/output/features/signin/types.d.ts.map +1 -0
  189. package/output/features/signin/types.js +1 -0
  190. package/output/hooks/use-loading/index.d.ts +6 -0
  191. package/output/hooks/use-loading/index.d.ts.map +1 -0
  192. package/output/hooks/use-loading/index.js +14 -0
  193. package/output/hooks/use-loading/index.test.d.ts +2 -0
  194. package/output/hooks/use-loading/index.test.d.ts.map +1 -0
  195. package/output/hooks/use-loading/index.test.js +24 -0
  196. package/output/hooks/use-mobile/index.d.ts +2 -0
  197. package/output/hooks/use-mobile/index.d.ts.map +1 -0
  198. package/output/hooks/use-mobile/index.js +16 -0
  199. package/output/hooks/use-observer/index.d.ts +2 -0
  200. package/output/hooks/use-observer/index.d.ts.map +1 -0
  201. package/output/hooks/use-observer/index.js +1 -0
  202. package/output/hooks/use-observer/use-observer.d.ts +3 -0
  203. package/output/hooks/use-observer/use-observer.d.ts.map +1 -0
  204. package/output/hooks/use-observer/use-observer.js +16 -0
  205. package/output/hooks/use-observer/use-observer.test.d.ts +2 -0
  206. package/output/hooks/use-observer/use-observer.test.d.ts.map +1 -0
  207. package/output/hooks/use-observer/use-observer.test.js +134 -0
  208. package/output/hooks/use-offline/index.d.ts +6 -0
  209. package/output/hooks/use-offline/index.d.ts.map +1 -0
  210. package/output/hooks/use-offline/index.js +19 -0
  211. package/output/layout/app/index.d.ts +34 -0
  212. package/output/layout/app/index.d.ts.map +1 -0
  213. package/output/layout/app/index.js +34 -0
  214. package/output/layout/dashboard/index.d.ts +76 -0
  215. package/output/layout/dashboard/index.d.ts.map +1 -0
  216. package/output/layout/dashboard/index.js +84 -0
  217. package/output/layout/index.d.ts +3 -0
  218. package/output/layout/index.d.ts.map +1 -0
  219. package/output/layout/index.js +2 -0
  220. package/output/services/cache-api/cache-api.d.ts +23 -0
  221. package/output/services/cache-api/cache-api.d.ts.map +1 -0
  222. package/output/services/cache-api/cache-api.js +145 -0
  223. package/output/services/cache-api/cache-api.test.d.ts +2 -0
  224. package/output/services/cache-api/cache-api.test.d.ts.map +1 -0
  225. package/output/services/cache-api/cache-api.test.js +610 -0
  226. package/output/services/cache-api/index.d.ts +2 -0
  227. package/output/services/cache-api/index.d.ts.map +1 -0
  228. package/output/services/cache-api/index.js +1 -0
  229. package/output/services/cached-fetch/index.d.ts +50 -0
  230. package/output/services/cached-fetch/index.d.ts.map +1 -0
  231. package/output/services/cached-fetch/index.js +196 -0
  232. package/output/services/service/index.d.ts +2 -0
  233. package/output/services/service/index.d.ts.map +1 -0
  234. package/output/services/service/index.js +1 -0
  235. package/output/services/service/service.d.ts +135 -0
  236. package/output/services/service/service.d.ts.map +1 -0
  237. package/output/services/service/service.js +276 -0
  238. package/output/services/service/service.test.d.ts +2 -0
  239. package/output/services/service/service.test.d.ts.map +1 -0
  240. package/output/services/service/service.test.js +1399 -0
  241. package/output/services/side-cache/index.d.ts +2 -0
  242. package/output/services/side-cache/index.d.ts.map +1 -0
  243. package/output/services/side-cache/index.js +1 -0
  244. package/output/services/side-cache/side-cache.d.ts +11 -0
  245. package/output/services/side-cache/side-cache.d.ts.map +1 -0
  246. package/output/services/side-cache/side-cache.js +161 -0
  247. package/output/services/side-cache/side-cache.test.d.ts +2 -0
  248. package/output/services/side-cache/side-cache.test.d.ts.map +1 -0
  249. package/output/services/side-cache/side-cache.test.js +271 -0
  250. package/output/utils/avatar/index.d.ts +28 -0
  251. package/output/utils/avatar/index.d.ts.map +1 -0
  252. package/output/utils/avatar/index.js +35 -0
  253. package/output/utils/delay/index.d.ts +2 -0
  254. package/output/utils/delay/index.d.ts.map +1 -0
  255. package/output/utils/delay/index.js +5 -0
  256. package/output/utils/form/index.d.ts +3 -0
  257. package/output/utils/form/index.d.ts.map +1 -0
  258. package/output/utils/form/index.js +1 -0
  259. package/output/utils/merge-class-names/index.d.ts +3 -0
  260. package/output/utils/merge-class-names/index.d.ts.map +1 -0
  261. package/output/utils/merge-class-names/index.js +5 -0
  262. package/output/utils/merge-class-names/index.test.d.ts +2 -0
  263. package/output/utils/merge-class-names/index.test.d.ts.map +1 -0
  264. package/output/utils/merge-class-names/index.test.js +7 -0
  265. package/output/utils/performance/index.d.ts +82 -0
  266. package/output/utils/performance/index.d.ts.map +1 -0
  267. package/output/utils/performance/index.js +129 -0
  268. package/output/utils/redirect/index.d.ts +6 -0
  269. package/output/utils/redirect/index.d.ts.map +1 -0
  270. package/output/utils/redirect/index.js +32 -0
  271. package/package.json +2 -2
@@ -0,0 +1,58 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from "react";
14
+ import { Dialog as SheetPrimitive } from "radix-ui";
15
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
16
+ import { Button } from "./button.js";
17
+ import { XIcon } from "lucide-react";
18
+ function Sheet(params) {
19
+ const props = __rest(params, []);
20
+ return _jsx(SheetPrimitive.Root, Object.assign({ "data-slot": "sheet" }, props));
21
+ }
22
+ function SheetTrigger(params) {
23
+ const props = __rest(params, []);
24
+ return _jsx(SheetPrimitive.Trigger, Object.assign({ "data-slot": "sheet-trigger" }, props));
25
+ }
26
+ function SheetClose(params) {
27
+ const props = __rest(params, []);
28
+ return _jsx(SheetPrimitive.Close, Object.assign({ "data-slot": "sheet-close" }, props));
29
+ }
30
+ function SheetPortal(params) {
31
+ const props = __rest(params, []);
32
+ return _jsx(SheetPrimitive.Portal, Object.assign({ "data-slot": "sheet-portal" }, props));
33
+ }
34
+ function SheetOverlay(params) {
35
+ const { className } = params, props = __rest(params, ["className"]);
36
+ return (_jsx(SheetPrimitive.Overlay, Object.assign({ "data-slot": "sheet-overlay", className: mergeClassNames("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className) }, props)));
37
+ }
38
+ function SheetContent(params) {
39
+ const { className, children, side = "right", showCloseButton = true } = params, props = __rest(params, ["className", "children", "side", "showCloseButton"]);
40
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, Object.assign({ "data-slot": "sheet-content", "data-side": side, className: mergeClassNames("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className) }, props, { children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", asChild: true, children: _jsxs(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }) }))] }))] }));
41
+ }
42
+ function SheetHeader(params) {
43
+ const { className } = params, props = __rest(params, ["className"]);
44
+ return (_jsx("div", Object.assign({ "data-slot": "sheet-header", className: mergeClassNames("gap-1.5 p-4 flex flex-col", className) }, props)));
45
+ }
46
+ function SheetFooter(params) {
47
+ const { className } = params, props = __rest(params, ["className"]);
48
+ return (_jsx("div", Object.assign({ "data-slot": "sheet-footer", className: mergeClassNames("gap-2 p-4 mt-auto flex flex-col", className) }, props)));
49
+ }
50
+ function SheetTitle(params) {
51
+ const { className } = params, props = __rest(params, ["className"]);
52
+ return (_jsx(SheetPrimitive.Title, Object.assign({ "data-slot": "sheet-title", className: mergeClassNames("text-foreground font-medium", className) }, props)));
53
+ }
54
+ function SheetDescription(params) {
55
+ const { className } = params, props = __rest(params, ["className"]);
56
+ return (_jsx(SheetPrimitive.Description, Object.assign({ "data-slot": "sheet-description", className: mergeClassNames("text-muted-foreground text-sm", className) }, props)));
57
+ }
58
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,78 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { Button } from './button.js';
4
+ import { Input } from './input.js';
5
+ import { Separator } from './separator.js';
6
+ import { TooltipContent } from './tooltip.js';
7
+ type SidebarGroupActionParams = {
8
+ asChild?: boolean;
9
+ };
10
+ type SidebarGroupLabelParams = {
11
+ asChild?: boolean;
12
+ };
13
+ type SidebarMenuActionParams = {
14
+ asChild?: boolean;
15
+ showOnHover?: boolean;
16
+ };
17
+ type SidebarMenuButtonParams = {
18
+ asChild?: boolean;
19
+ isActive?: boolean;
20
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
21
+ };
22
+ type SidebarMenuSkeletonParams = {
23
+ showIcon?: boolean;
24
+ };
25
+ type SidebarMenuSubButtonParams = {
26
+ asChild?: boolean;
27
+ size?: 'sm' | 'md';
28
+ isActive?: boolean;
29
+ };
30
+ type SidebarParams = {
31
+ side?: 'left' | 'right';
32
+ variant?: 'sidebar' | 'floating' | 'inset';
33
+ collapsible?: 'offcanvas' | 'icon' | 'none';
34
+ };
35
+ type SidebarProviderParams = {
36
+ defaultOpen?: boolean;
37
+ open?: boolean;
38
+ onOpenChange?: (open: boolean) => void;
39
+ };
40
+ type SidebarContextProps = {
41
+ state: 'expanded' | 'collapsed';
42
+ open: boolean;
43
+ setOpen: (open: boolean) => void;
44
+ openMobile: boolean;
45
+ setOpenMobile: (open: boolean) => void;
46
+ isMobile: boolean;
47
+ toggleSidebar: () => void;
48
+ };
49
+ declare function useSidebar(): SidebarContextProps;
50
+ declare function SidebarProvider(params: React.ComponentProps<'div'> & SidebarProviderParams): React.JSX.Element;
51
+ declare function Sidebar(params: React.ComponentProps<'div'> & SidebarParams): React.JSX.Element;
52
+ declare function SidebarTrigger(params: React.ComponentProps<typeof Button>): React.JSX.Element;
53
+ declare function SidebarRail(params: React.ComponentProps<'button'>): React.JSX.Element;
54
+ declare function SidebarInset(params: React.ComponentProps<'main'>): React.JSX.Element;
55
+ declare function SidebarInput(params: React.ComponentProps<typeof Input>): React.JSX.Element;
56
+ declare function SidebarHeader(params: React.ComponentProps<'div'>): React.JSX.Element;
57
+ declare function SidebarFooter(params: React.ComponentProps<'div'>): React.JSX.Element;
58
+ declare function SidebarSeparator(params: React.ComponentProps<typeof Separator>): React.JSX.Element;
59
+ declare function SidebarContent(params: React.ComponentProps<'div'>): React.JSX.Element;
60
+ declare function SidebarGroup(params: React.ComponentProps<'div'>): React.JSX.Element;
61
+ declare function SidebarGroupLabel(params: React.ComponentProps<'div'> & SidebarGroupLabelParams): React.JSX.Element;
62
+ declare function SidebarGroupAction(params: React.ComponentProps<'button'> & SidebarGroupActionParams): React.JSX.Element;
63
+ declare function SidebarGroupContent(params: React.ComponentProps<'div'>): React.JSX.Element;
64
+ declare function SidebarMenu(params: React.ComponentProps<'ul'>): React.JSX.Element;
65
+ declare function SidebarMenuItem(params: React.ComponentProps<'li'>): React.JSX.Element;
66
+ declare const sidebarMenuButtonVariants: (props?: ({
67
+ variant?: "default" | "outline" | null | undefined;
68
+ size?: "default" | "sm" | "lg" | null | undefined;
69
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
70
+ declare function SidebarMenuButton(params: React.ComponentProps<'button'> & SidebarMenuButtonParams & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
71
+ declare function SidebarMenuAction(params: React.ComponentProps<'button'> & SidebarMenuActionParams): React.JSX.Element;
72
+ declare function SidebarMenuBadge(params: React.ComponentProps<'div'>): React.JSX.Element;
73
+ declare function SidebarMenuSkeleton(params: React.ComponentProps<'div'> & SidebarMenuSkeletonParams): React.JSX.Element;
74
+ declare function SidebarMenuSub(params: React.ComponentProps<'ul'>): React.JSX.Element;
75
+ declare function SidebarMenuSubItem(params: React.ComponentProps<'li'>): React.JSX.Element;
76
+ declare function SidebarMenuSubButton(params: React.ComponentProps<'a'> & SidebarMenuSubButtonParams): React.JSX.Element;
77
+ 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, };
78
+ //# sourceMappingURL=sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../source/components/sidebar.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,233 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
15
+ import { cva } from 'class-variance-authority';
16
+ import { Slot } from 'radix-ui';
17
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
18
+ import { Button } from './button.js';
19
+ import { Input } from './input.js';
20
+ import { Separator } from './separator.js';
21
+ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from './sheet.js';
22
+ import { Skeleton } from './skeleton.js';
23
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip.js';
24
+ import { useIsMobile } from '../hooks/use-mobile/index.js';
25
+ import { PanelLeftIcon } from 'lucide-react';
26
+ const SIDEBAR_COOKIE_NAME = 'sidebar_state';
27
+ const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
28
+ const SIDEBAR_WIDTH = '16rem';
29
+ const SIDEBAR_WIDTH_MOBILE = '18rem';
30
+ const SIDEBAR_WIDTH_ICON = '3rem';
31
+ const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
32
+ const SidebarContext = React.createContext(null);
33
+ function useSidebar() {
34
+ const context = useContext(SidebarContext);
35
+ if (!context) {
36
+ throw new Error('useSidebar must be used within a SidebarProvider.');
37
+ }
38
+ return context;
39
+ }
40
+ function SidebarProvider(params) {
41
+ const { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children } = params, props = __rest(params, ["defaultOpen", "open", "onOpenChange", "className", "style", "children"]);
42
+ const isMobile = useIsMobile();
43
+ const [openMobile, setOpenMobile] = useState(false);
44
+ // This is the internal state of the sidebar.
45
+ // We use openProp and setOpenProp for control from outside the component.
46
+ const [_open, _setOpen] = useState(defaultOpen);
47
+ const open = openProp !== null && openProp !== void 0 ? openProp : _open;
48
+ const setOpen = useCallback((value) => {
49
+ const openState = typeof value === 'function' ? value(open) : value;
50
+ if (setOpenProp) {
51
+ setOpenProp(openState);
52
+ }
53
+ else {
54
+ _setOpen(openState);
55
+ }
56
+ // This sets the cookie to keep the sidebar state.
57
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
58
+ }, [setOpenProp, open]);
59
+ // Helper to toggle the sidebar.
60
+ const toggleSidebar = useCallback(() => {
61
+ return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
62
+ }, [isMobile, setOpen, setOpenMobile]);
63
+ // Adds a keyboard shortcut to toggle the sidebar.
64
+ useEffect(() => {
65
+ const handleKeyDown = (event) => {
66
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
67
+ event.preventDefault();
68
+ toggleSidebar();
69
+ }
70
+ };
71
+ window.addEventListener('keydown', handleKeyDown);
72
+ return () => window.removeEventListener('keydown', handleKeyDown);
73
+ }, [toggleSidebar]);
74
+ // We add a state so that we can do data-state="expanded" or "collapsed".
75
+ // This makes it easier to style the sidebar with Tailwind classes.
76
+ const state = open ? 'expanded' : 'collapsed';
77
+ const contextValue = useMemo(() => ({
78
+ state,
79
+ open,
80
+ setOpen,
81
+ isMobile,
82
+ openMobile,
83
+ setOpenMobile,
84
+ toggleSidebar,
85
+ }), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
86
+ return (_jsx(SidebarContext.Provider, { value: contextValue, children: _jsx(TooltipProvider, { delayDuration: 0, children: _jsx("div", Object.assign({ "data-slot": "sidebar-wrapper", style: Object.assign({ '--sidebar-width': SIDEBAR_WIDTH, '--sidebar-width-icon': SIDEBAR_WIDTH_ICON }, style), className: mergeClassNames('group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full', className) }, props, { children: children })) }) }));
87
+ }
88
+ function Sidebar(params) {
89
+ const { side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, dir } = params, props = __rest(params, ["side", "variant", "collapsible", "className", "children", "dir"]);
90
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
91
+ if (collapsible === 'none') {
92
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar", className: mergeClassNames('bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col', className) }, props, { children: children })));
93
+ }
94
+ if (isMobile) {
95
+ return (_jsx(Sheet, Object.assign({ open: openMobile, onOpenChange: setOpenMobile }, props, { children: _jsxs(SheetContent, { dir: dir, "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", style: {
96
+ '--sidebar-width': SIDEBAR_WIDTH_MOBILE,
97
+ }, side: side, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: "Sidebar" }), _jsx(SheetDescription, { children: "Displays the mobile sidebar." })] }), _jsx("div", { className: "flex h-full w-full flex-col", children: children })] }) })));
98
+ }
99
+ return (_jsxs("div", { className: "group peer text-sidebar-foreground hidden md:block", "data-state": state, "data-collapsible": state === 'collapsed' ? collapsible : '', "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [_jsx("div", { "data-slot": "sidebar-gap", className: mergeClassNames('transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent', 'group-data-[collapsible=offcanvas]:w-0', 'group-data-[side=right]:rotate-180', variant === 'floating' || variant === 'inset'
100
+ ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'
101
+ : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)') }), _jsx("div", Object.assign({ "data-slot": "sidebar-container", "data-side": side, className: mergeClassNames('fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex',
102
+ // Adjust the padding for floating and inset variants.
103
+ variant === 'floating' || variant === 'inset'
104
+ ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'
105
+ : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l', className) }, props, { children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col", children: children }) }))] }));
106
+ }
107
+ function SidebarTrigger(params) {
108
+ const { className, onClick } = params, props = __rest(params, ["className", "onClick"]);
109
+ const { toggleSidebar } = useSidebar();
110
+ return (_jsxs(Button, Object.assign({ "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon-sm", className: mergeClassNames(className), onClick: (event) => {
111
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
112
+ toggleSidebar();
113
+ } }, props, { children: [_jsx(PanelLeftIcon, {}), _jsx("span", { className: "sr-only", children: "Toggle Sidebar" })] })));
114
+ }
115
+ function SidebarRail(params) {
116
+ const { className } = params, props = __rest(params, ["className"]);
117
+ const { toggleSidebar } = useSidebar();
118
+ return (_jsx("button", Object.assign({ "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: mergeClassNames('hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2', 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize', '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full', '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', className) }, props)));
119
+ }
120
+ function SidebarInset(params) {
121
+ const { className } = params, props = __rest(params, ["className"]);
122
+ return (_jsx("main", Object.assign({ "data-slot": "sidebar-inset", className: mergeClassNames('bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 relative flex w-full flex-1 flex-col', className) }, props)));
123
+ }
124
+ function SidebarInput(params) {
125
+ const { className } = params, props = __rest(params, ["className"]);
126
+ return (_jsx(Input, Object.assign({ "data-slot": "sidebar-input", "data-sidebar": "input", className: mergeClassNames('bg-background h-8 w-full shadow-none', className) }, props)));
127
+ }
128
+ function SidebarHeader(params) {
129
+ const { className } = params, props = __rest(params, ["className"]);
130
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-header", "data-sidebar": "header", className: mergeClassNames('gap-2 p-2 flex flex-col', className) }, props)));
131
+ }
132
+ function SidebarFooter(params) {
133
+ const { className } = params, props = __rest(params, ["className"]);
134
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-footer", "data-sidebar": "footer", className: mergeClassNames('gap-2 p-2 flex flex-col', className) }, props)));
135
+ }
136
+ function SidebarSeparator(params) {
137
+ const { className } = params, props = __rest(params, ["className"]);
138
+ return (_jsx(Separator, Object.assign({ "data-slot": "sidebar-separator", "data-sidebar": "separator", className: mergeClassNames('bg-sidebar-border mx-2 w-auto', className) }, props)));
139
+ }
140
+ function SidebarContent(params) {
141
+ const { className } = params, props = __rest(params, ["className"]);
142
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-content", "data-sidebar": "content", className: mergeClassNames('no-scrollbar gap-2 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden', className) }, props)));
143
+ }
144
+ function SidebarGroup(params) {
145
+ const { className } = params, props = __rest(params, ["className"]);
146
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-group", "data-sidebar": "group", className: mergeClassNames('p-2 relative flex w-full min-w-0 flex-col', className) }, props)));
147
+ }
148
+ function SidebarGroupLabel(params) {
149
+ const { className, asChild = false } = params, props = __rest(params, ["className", "asChild"]);
150
+ const Comp = asChild ? Slot.Root : 'div';
151
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: mergeClassNames('text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0', className) }, props)));
152
+ }
153
+ function SidebarGroupAction(params) {
154
+ const { className, asChild = false } = params, props = __rest(params, ["className", "asChild"]);
155
+ const Comp = asChild ? Slot.Root : 'button';
156
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: mergeClassNames('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0', className) }, props)));
157
+ }
158
+ function SidebarGroupContent(params) {
159
+ const { className } = params, props = __rest(params, ["className"]);
160
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: mergeClassNames('text-sm w-full', className) }, props)));
161
+ }
162
+ function SidebarMenu(params) {
163
+ const { className } = params, props = __rest(params, ["className"]);
164
+ return (_jsx("ul", Object.assign({ "data-slot": "sidebar-menu", "data-sidebar": "menu", className: mergeClassNames('gap-1 flex w-full min-w-0 flex-col', className) }, props)));
165
+ }
166
+ function SidebarMenuItem(params) {
167
+ const { className } = params, props = __rest(params, ["className"]);
168
+ return (_jsx("li", Object.assign({ "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: mergeClassNames('group/menu-item relative', className) }, props)));
169
+ }
170
+ const sidebarMenuButtonVariants = cva('ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0', {
171
+ variants: {
172
+ variant: {
173
+ default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
174
+ outline: 'bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',
175
+ },
176
+ size: {
177
+ default: 'h-8 text-sm',
178
+ sm: 'h-7 text-xs',
179
+ lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',
180
+ },
181
+ },
182
+ defaultVariants: {
183
+ variant: 'default',
184
+ size: 'default',
185
+ },
186
+ });
187
+ function SidebarMenuButton(params) {
188
+ const { asChild = false, isActive = false, variant = 'default', size = 'default', tooltip: tooltipProp, className } = params, props = __rest(params, ["asChild", "isActive", "variant", "size", "tooltip", "className"]);
189
+ const Comp = asChild ? Slot.Root : 'button';
190
+ const { isMobile, state } = useSidebar();
191
+ const button = (_jsx(Comp, Object.assign({ "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, className: mergeClassNames(sidebarMenuButtonVariants({ variant, size }), className) }, props)));
192
+ if (!tooltipProp) {
193
+ return button;
194
+ }
195
+ const tooltip = typeof tooltipProp === 'string' ? { children: tooltipProp } : tooltipProp;
196
+ return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: button }), _jsx(TooltipContent, Object.assign({ side: "right", align: "center", hidden: state !== 'collapsed' || isMobile }, tooltip))] }));
197
+ }
198
+ function SidebarMenuAction(params) {
199
+ const { className, asChild = false, showOnHover = false } = params, props = __rest(params, ["className", "asChild", "showOnHover"]);
200
+ const Comp = asChild ? Slot.Root : 'button';
201
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: mergeClassNames('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 md:after:hidden [&>svg]:shrink-0', showOnHover &&
202
+ 'peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0', className) }, props)));
203
+ }
204
+ function SidebarMenuBadge(params) {
205
+ const { className } = params, props = __rest(params, ["className"]);
206
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: mergeClassNames('text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 flex items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden', className) }, props)));
207
+ }
208
+ function SidebarMenuSkeleton(params) {
209
+ const { className, showIcon = false } = params, props = __rest(params
210
+ // Random width between 50 to 90%.
211
+ , ["className", "showIcon"]);
212
+ // Random width between 50 to 90%.
213
+ const [width] = useState(() => {
214
+ return `${Math.floor(Math.random() * 40) + 50}%`;
215
+ });
216
+ return (_jsxs("div", Object.assign({ "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: mergeClassNames('h-8 gap-2 rounded-md px-2 flex items-center', className) }, props, { children: [showIcon && _jsx(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }), _jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
217
+ '--skeleton-width': width,
218
+ } })] })));
219
+ }
220
+ function SidebarMenuSub(params) {
221
+ const { className } = params, props = __rest(params, ["className"]);
222
+ return (_jsx("ul", Object.assign({ "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: mergeClassNames('border-sidebar-border mx-3.5 translate-x-px gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col', className) }, props)));
223
+ }
224
+ function SidebarMenuSubItem(params) {
225
+ const { className } = params, props = __rest(params, ["className"]);
226
+ return (_jsx("li", Object.assign({ "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: mergeClassNames('group/menu-sub-item relative', className) }, props)));
227
+ }
228
+ function SidebarMenuSubButton(params) {
229
+ const { asChild = false, size = 'md', isActive = false, className } = params, props = __rest(params, ["asChild", "size", "isActive", "className"]);
230
+ const Comp = asChild ? Slot.Root : 'a';
231
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: mergeClassNames('text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0', className) }, props)));
232
+ }
233
+ 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, };
@@ -0,0 +1,2 @@
1
+ export { SizeProvider } from './size-provider.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/size-provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1 @@
1
+ export { SizeProvider } from './size-provider.js';
@@ -0,0 +1,9 @@
1
+ import React, { type ReactNode } from 'react';
2
+ interface SizeProviderProps {
3
+ className?: string;
4
+ render?: (width: number, height: number) => ReactNode;
5
+ children?: (width: number, height: number) => ReactNode;
6
+ }
7
+ export declare const SizeProvider: React.FC<SizeProviderProps>;
8
+ export {};
9
+ //# sourceMappingURL=size-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size-provider.d.ts","sourceRoot":"","sources":["../../../source/components/size-provider/size-provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1E,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,SAAS,CAAA;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,SAAS,CAAA;CACxD;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuCpD,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ import React, { useRef, useState, useEffect } from 'react';
4
+ export const SizeProvider = (props) => {
5
+ const { children, className } = props;
6
+ const [width, setWidth] = useState(0);
7
+ const [height, setHeight] = useState(0);
8
+ const sizeRef = useRef(null);
9
+ useEffect(() => {
10
+ const resizeObserver = new ResizeObserver((entries) => {
11
+ for (const entry of entries) {
12
+ const { width, height } = entry.contentRect;
13
+ setWidth(width);
14
+ setHeight(height);
15
+ }
16
+ });
17
+ if (sizeRef.current) {
18
+ resizeObserver.observe(sizeRef.current);
19
+ }
20
+ return () => {
21
+ if (sizeRef.current) {
22
+ // eslint-disable-next-line react-hooks/exhaustive-deps
23
+ resizeObserver.unobserve(sizeRef.current);
24
+ }
25
+ };
26
+ }, []);
27
+ const render = props.render || children || null;
28
+ return (_jsxs("div", { className: clsx(className, 'relative w-full h-full overflow-hidden isolate'), children: [_jsx("div", { ref: sizeRef, className: 'absolute flex-shrink-0 w-full h-full z-0 opacity-0', children: "SizeProvider" }), _jsx("div", { className: 'absolute w-full h-full z-1', children: render === null || render === void 0 ? void 0 : render(width, height) })] }));
29
+ };
@@ -0,0 +1,3 @@
1
+ declare function Skeleton(params: React.ComponentProps<'div'>): import("react").JSX.Element;
2
+ export { Skeleton };
3
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../source/components/skeleton.tsx"],"names":[],"mappings":"AAEA,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAGpD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,18 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
14
+ function Skeleton(params) {
15
+ const { className } = params, props = __rest(params, ["className"]);
16
+ return _jsx("div", Object.assign({ "data-slot": "skeleton", className: mergeClassNames('bg-muted rounded-md animate-pulse', className) }, props));
17
+ }
18
+ export { Skeleton };
@@ -0,0 +1,8 @@
1
+ import type * as React from "react";
2
+ import { type ToasterProps } from "sonner";
3
+ type ToasterPropsWithTheme = ToasterProps & {
4
+ theme?: "light" | "dark" | "system";
5
+ };
6
+ declare const Toaster: ({ theme, ...props }: ToasterPropsWithTheme) => React.JSX.Element;
7
+ export { Toaster };
8
+ //# sourceMappingURL=sonner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../source/components/sonner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAA;AAG7D,KAAK,qBAAqB,GAAG,YAAY,GAAG;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;CACpC,CAAA;AAED,QAAA,MAAM,OAAO,GAAI,qBAAgC,qBAAqB,sBAsCrE,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -0,0 +1,34 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { Toaster as Sonner } from "sonner";
14
+ import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react";
15
+ const Toaster = (_a) => {
16
+ var { theme = "system" } = _a, props = __rest(_a, ["theme"]);
17
+ return (_jsx(Sonner, Object.assign({ theme: theme, className: "toaster group", icons: {
18
+ success: (_jsx(CircleCheckIcon, { className: "size-4" })),
19
+ info: (_jsx(InfoIcon, { className: "size-4" })),
20
+ warning: (_jsx(TriangleAlertIcon, { className: "size-4" })),
21
+ error: (_jsx(OctagonXIcon, { className: "size-4" })),
22
+ loading: (_jsx(Loader2Icon, { className: "size-4 animate-spin" })),
23
+ }, style: {
24
+ "--normal-bg": "var(--popover)",
25
+ "--normal-text": "var(--popover-foreground)",
26
+ "--normal-border": "var(--border)",
27
+ "--border-radius": "var(--radius)",
28
+ }, toastOptions: {
29
+ classNames: {
30
+ toast: "cn-toast",
31
+ },
32
+ } }, props)));
33
+ };
34
+ export { Toaster };
@@ -0,0 +1,3 @@
1
+ declare function Spinner(params: React.ComponentProps<"svg">): import("react").JSX.Element;
2
+ export { Spinner };
3
+ //# sourceMappingURL=spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../source/components/spinner.tsx"],"names":[],"mappings":"AAGA,iBAAS,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAKnD;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -0,0 +1,19 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
14
+ import { Loader2Icon } from "lucide-react";
15
+ function Spinner(params) {
16
+ const { className } = params, props = __rest(params, ["className"]);
17
+ return (_jsx(Loader2Icon, Object.assign({ role: "status", "aria-label": "Loading", className: mergeClassNames("size-4 animate-spin", className) }, props)));
18
+ }
19
+ export { Spinner };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Switch as SwitchPrimitive } from 'radix-ui';
3
+ type SwitchParams = {
4
+ size?: 'sm' | 'default';
5
+ };
6
+ declare function Switch(params: React.ComponentProps<typeof SwitchPrimitive.Root> & SwitchParams): React.JSX.Element;
7
+ export { Switch };
8
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../source/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AAIpD,KAAK,YAAY,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CAAE,CAAA;AAE/C,iBAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,YAAY,qBAevF;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -0,0 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { Switch as SwitchPrimitive } from 'radix-ui';
15
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
16
+ function Switch(params) {
17
+ const { className, size = 'default' } = params, props = __rest(params, ["className", "size"]);
18
+ return (_jsx(SwitchPrimitive.Root, Object.assign({ "data-slot": "switch", "data-size": size, className: mergeClassNames('data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50', className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { className: "bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform" }) })));
19
+ }
20
+ export { Switch };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Table(params: React.ComponentProps<"table">): React.JSX.Element;
3
+ declare function TableHeader(params: React.ComponentProps<"thead">): React.JSX.Element;
4
+ declare function TableBody(params: React.ComponentProps<"tbody">): React.JSX.Element;
5
+ declare function TableFooter(params: React.ComponentProps<"tfoot">): React.JSX.Element;
6
+ declare function TableRow(params: React.ComponentProps<"tr">): React.JSX.Element;
7
+ declare function TableHead(params: React.ComponentProps<"th">): React.JSX.Element;
8
+ declare function TableCell(params: React.ComponentProps<"td">): React.JSX.Element;
9
+ declare function TableCaption(params: React.ComponentProps<"caption">): React.JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
11
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../source/components/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAWnD;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBASzD;AAED,iBAAS,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBASvD;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBASzD;AAED,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBASnD;AAED,iBAAS,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBASpD;AAED,iBAAS,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBASpD;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,qBAY5D;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}