@carlonicora/nextjs-jsonapi 1.5.0 → 1.6.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 (282) hide show
  1. package/dist/{ApiResponseInterface-DDI7QQPR.d.ts → ApiResponseInterface-CfcC7pPC.d.mts} +11 -2
  2. package/dist/{ApiResponseInterface-BHN5D9r5.d.mts → ApiResponseInterface-DTBJaV5R.d.ts} +11 -2
  3. package/dist/AuthComponent-hxOPs9o8.d.mts +11 -0
  4. package/dist/AuthComponent-hxOPs9o8.d.ts +11 -0
  5. package/dist/{BlockNoteEditor-G6AK2NWA.js → BlockNoteEditor-7FM7B737.js} +19 -22
  6. package/dist/BlockNoteEditor-7FM7B737.js.map +1 -0
  7. package/dist/{BlockNoteEditor-AIEEQM6A.mjs → BlockNoteEditor-RVL76ZAS.mjs} +11 -14
  8. package/dist/BlockNoteEditor-RVL76ZAS.mjs.map +1 -0
  9. package/dist/JsonApiRequest-KOKGVPBI.js +25 -0
  10. package/dist/{JsonApiRequest-UJ7FGIVI.js.map → JsonApiRequest-KOKGVPBI.js.map} +1 -1
  11. package/dist/{JsonApiRequest-6UR7DIAR.mjs → JsonApiRequest-VCCRO732.mjs} +2 -2
  12. package/dist/chunk-2Z56AS2S.js +2723 -0
  13. package/dist/chunk-2Z56AS2S.js.map +1 -0
  14. package/dist/chunk-37NJZ2VD.mjs +637 -0
  15. package/dist/chunk-37NJZ2VD.mjs.map +1 -0
  16. package/dist/{chunk-2K3Q24UF.js → chunk-3ZPK4QOB.js} +24 -14
  17. package/dist/chunk-3ZPK4QOB.js.map +1 -0
  18. package/dist/chunk-AGWQ75PQ.js +142 -0
  19. package/dist/chunk-AGWQ75PQ.js.map +1 -0
  20. package/dist/{chunk-32HM6MDD.js → chunk-CSM6AIAP.js} +1 -1
  21. package/dist/{chunk-32HM6MDD.js.map → chunk-CSM6AIAP.js.map} +1 -1
  22. package/dist/{chunk-IKBA4AHN.mjs → chunk-F4Y3GZG4.mjs} +3 -3
  23. package/dist/{chunk-YF5XQZDR.mjs → chunk-F5UNXZ3J.mjs} +1 -1
  24. package/dist/chunk-F5UNXZ3J.mjs.map +1 -0
  25. package/dist/chunk-IGOWVLJH.mjs +142 -0
  26. package/dist/chunk-IGOWVLJH.mjs.map +1 -0
  27. package/dist/{chunk-HAG77QBV.mjs → chunk-K4W5QXL5.mjs} +1 -1
  28. package/dist/chunk-KFL5ZFM4.mjs +2723 -0
  29. package/dist/chunk-KFL5ZFM4.mjs.map +1 -0
  30. package/dist/{chunk-HR4H2FP7.mjs → chunk-KJ4ETLJB.mjs} +24 -14
  31. package/dist/chunk-KJ4ETLJB.mjs.map +1 -0
  32. package/dist/chunk-LOSPCUCF.js +637 -0
  33. package/dist/chunk-LOSPCUCF.js.map +1 -0
  34. package/dist/{chunk-VET55IZO.js → chunk-SVX7E6RR.js} +10293 -7536
  35. package/dist/chunk-SVX7E6RR.js.map +1 -0
  36. package/dist/{chunk-EFJEWLRL.js → chunk-YUO55Q5A.js} +1 -1
  37. package/dist/chunk-YUO55Q5A.js.map +1 -0
  38. package/dist/chunk-ZQTFZKLJ.mjs +12089 -0
  39. package/dist/chunk-ZQTFZKLJ.mjs.map +1 -0
  40. package/dist/{chunk-PMXG5WBC.js → chunk-ZUEEIQHW.js} +3 -3
  41. package/dist/{chunk-PMXG5WBC.js.map → chunk-ZUEEIQHW.js.map} +1 -1
  42. package/dist/client/index.d.mts +161 -11
  43. package/dist/client/index.d.ts +161 -11
  44. package/dist/client/index.js +74 -11
  45. package/dist/client/index.js.map +1 -1
  46. package/dist/client/index.mjs +73 -10
  47. package/dist/components/index.d.mts +763 -11
  48. package/dist/components/index.d.ts +763 -11
  49. package/dist/components/index.js +465 -11
  50. package/dist/components/index.js.map +1 -1
  51. package/dist/components/index.mjs +466 -12
  52. package/dist/config-B43zxEvn.d.mts +69 -0
  53. package/dist/config-D2OUrI_G.d.ts +69 -0
  54. package/dist/content.fields-Ck5lkQ5d.d.mts +47 -0
  55. package/dist/content.fields-Ck5lkQ5d.d.ts +47 -0
  56. package/dist/{content.interface-CR2aBeAW.d.ts → content.interface-Bs8a7uW6.d.mts} +2 -3
  57. package/dist/{content.interface-FpLfsaRm.d.mts → content.interface-UtsJ-mzs.d.ts} +2 -3
  58. package/dist/contexts/index.d.mts +13 -6
  59. package/dist/contexts/index.d.ts +13 -6
  60. package/dist/contexts/index.js +10 -11
  61. package/dist/contexts/index.js.map +1 -1
  62. package/dist/contexts/index.mjs +9 -10
  63. package/dist/core/index.d.mts +539 -8
  64. package/dist/core/index.d.ts +539 -8
  65. package/dist/core/index.js +104 -2
  66. package/dist/core/index.js.map +1 -1
  67. package/dist/core/index.mjs +105 -3
  68. package/dist/index.d.mts +131 -70
  69. package/dist/index.d.ts +131 -70
  70. package/dist/index.js +97 -7
  71. package/dist/index.js.map +1 -1
  72. package/dist/index.mjs +118 -28
  73. package/dist/notification.interface-BdcwkuQE.d.mts +228 -0
  74. package/dist/notification.interface-BdcwkuQE.d.ts +228 -0
  75. package/dist/request-GBLBPYFM.js +8 -0
  76. package/dist/request-GBLBPYFM.js.map +1 -0
  77. package/dist/request-XABCMU25.mjs +8 -0
  78. package/dist/{AbstractService-wLid8dB0.d.ts → s3.interface-D7ttGatc.d.ts} +36 -26
  79. package/dist/{AbstractService-BsY6W3Ej.d.mts → s3.interface-DlaMDRTn.d.mts} +36 -26
  80. package/dist/server/index.d.mts +299 -4
  81. package/dist/server/index.d.ts +299 -4
  82. package/dist/server/index.js +215 -5
  83. package/dist/server/index.js.map +1 -1
  84. package/dist/server/index.mjs +214 -4
  85. package/dist/server/index.mjs.map +1 -1
  86. package/dist/token-2UWQJY5T.js +8 -0
  87. package/dist/token-2UWQJY5T.js.map +1 -0
  88. package/dist/token-EOK3N45S.mjs +8 -0
  89. package/dist/{useSocket-BV6yMdWS.d.ts → useSocket-8vwK_R_c.d.ts} +1 -1
  90. package/dist/{useSocket-L-An7_Mr.d.mts → useSocket-BWJUXuOl.d.mts} +1 -1
  91. package/package.json +12 -52
  92. package/src/client/JsonApiClient.ts +248 -0
  93. package/src/client/config.ts +78 -0
  94. package/src/client/index.ts +6 -1
  95. package/src/components/containers/TabsContainer.tsx +1 -1
  96. package/src/components/editors/BlockNoteEditor.tsx +3 -1
  97. package/src/components/index.ts +4 -0
  98. package/src/components/navigations/Breadcrumb.tsx +1 -1
  99. package/src/components/navigations/Header.tsx +2 -2
  100. package/src/contexts/CommonContext.tsx +1 -1
  101. package/src/contexts/SocketContext.tsx +1 -1
  102. package/src/contexts/index.ts +3 -0
  103. package/src/core/abstracts/ClientAbstractService.ts +255 -0
  104. package/src/core/abstracts/ServerAbstractService.ts +180 -0
  105. package/src/core/abstracts/index.ts +2 -0
  106. package/src/core/index.ts +32 -3
  107. package/src/discord/config.ts +15 -0
  108. package/src/discord/index.ts +1 -0
  109. package/src/features/auth/components/details/LandingComponent.tsx +2 -2
  110. package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
  111. package/src/features/auth/components/forms/ActivateAccount.tsx +1 -1
  112. package/src/features/auth/components/forms/Cookies.tsx +2 -1
  113. package/src/features/auth/components/forms/ForgotPassword.tsx +1 -1
  114. package/src/features/auth/components/forms/Login.tsx +1 -1
  115. package/src/features/auth/components/forms/Logout.tsx +1 -1
  116. package/src/features/auth/components/forms/RefreshUser.tsx +2 -1
  117. package/src/features/auth/components/forms/Register.tsx +1 -1
  118. package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
  119. package/src/features/auth/data/auth.service.ts +1 -1
  120. package/src/features/auth/data/index.ts +0 -1
  121. package/src/features/auth/utils/AuthCookies.ts +1 -1
  122. package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +4 -2
  123. package/src/features/company/components/forms/CompanyDeleter.tsx +2 -1
  124. package/src/features/company/components/forms/CompanyEditor.tsx +6 -3
  125. package/src/features/company/components/forms/CompanyLicense.tsx +4 -2
  126. package/src/features/company/components/lists/CompaniesList.tsx +2 -1
  127. package/src/features/company/data/index.ts +0 -1
  128. package/src/features/content/components/lists/ContentsListById.tsx +2 -1
  129. package/src/features/content/components/lists/RelevantContentsList.tsx +2 -1
  130. package/src/features/content/data/index.ts +0 -1
  131. package/src/features/feature/data/index.ts +0 -1
  132. package/src/features/notification/components/lists/NotificationsList.tsx +2 -1
  133. package/src/features/notification/contexts/NotificationContext.tsx +2 -1
  134. package/src/features/notification/data/index.ts +0 -1
  135. package/src/features/push/data/index.ts +0 -1
  136. package/src/features/role/components/forms/RemoveUserFromRole.tsx +4 -2
  137. package/src/features/role/components/forms/UserRoleAdd.tsx +2 -1
  138. package/src/features/role/components/lists/RolesList.tsx +2 -1
  139. package/src/features/role/components/lists/UserRolesList.tsx +2 -1
  140. package/src/features/role/data/index.ts +0 -1
  141. package/src/features/s3/data/index.ts +0 -1
  142. package/src/features/user/components/forms/RoleUserAdd.tsx +4 -2
  143. package/src/features/user/components/forms/UserDeleter.tsx +2 -1
  144. package/src/features/user/components/forms/UserEditor.tsx +6 -3
  145. package/src/features/user/components/forms/UserMultiSelect.tsx +2 -1
  146. package/src/features/user/components/forms/UserReactivator.tsx +2 -1
  147. package/src/features/user/components/forms/UserResentInvitationEmail.tsx +2 -1
  148. package/src/features/user/components/forms/UserSelector.tsx +2 -1
  149. package/src/features/user/components/lists/AdminUsersList.tsx +2 -1
  150. package/src/features/user/components/lists/CompanyUsersList.tsx +2 -1
  151. package/src/features/user/components/lists/RelevantUsersList.tsx +2 -1
  152. package/src/features/user/components/lists/RoleUsersList.tsx +2 -1
  153. package/src/features/user/components/lists/UsersListByContentIds.tsx +2 -1
  154. package/src/features/user/data/index.ts +0 -1
  155. package/src/features/user/hooks/useUserSearch.ts +2 -1
  156. package/src/hooks/useDataListRetriever.ts +4 -4
  157. package/src/hooks/usePageTracker.ts +1 -1
  158. package/src/hooks/usePushNotifications.ts +3 -2
  159. package/src/hooks/useSocket.ts +1 -1
  160. package/src/index.ts +7 -2
  161. package/src/roles/config.ts +0 -15
  162. package/src/roles/index.ts +1 -9
  163. package/src/server/JsonApiServer.ts +249 -0
  164. package/src/server/cache.ts +1 -1
  165. package/src/server/index.ts +13 -0
  166. package/src/server/request.ts +32 -18
  167. package/src/server/token.ts +1 -1
  168. package/dist/ApiData-DPKNfY-9.d.mts +0 -10
  169. package/dist/ApiData-DPKNfY-9.d.ts +0 -10
  170. package/dist/ApiDataInterface-DPP8s46n.d.mts +0 -21
  171. package/dist/ApiDataInterface-DPP8s46n.d.ts +0 -21
  172. package/dist/AuthComponent-B_Ps2Vb9.d.ts +0 -78
  173. package/dist/AuthComponent-CxnGgvoh.d.mts +0 -78
  174. package/dist/BlockNoteEditor-AIEEQM6A.mjs.map +0 -1
  175. package/dist/BlockNoteEditor-G6AK2NWA.js.map +0 -1
  176. package/dist/JsonApiRequest-UJ7FGIVI.js +0 -25
  177. package/dist/atoms/index.d.mts +0 -12
  178. package/dist/atoms/index.d.ts +0 -12
  179. package/dist/atoms/index.js +0 -9
  180. package/dist/atoms/index.js.map +0 -1
  181. package/dist/atoms/index.mjs +0 -9
  182. package/dist/chunk-2K3Q24UF.js.map +0 -1
  183. package/dist/chunk-3FBCC4G3.js +0 -8
  184. package/dist/chunk-3FBCC4G3.js.map +0 -1
  185. package/dist/chunk-3UELCPIN.js +0 -46
  186. package/dist/chunk-3UELCPIN.js.map +0 -1
  187. package/dist/chunk-5IET37O4.js +0 -4210
  188. package/dist/chunk-5IET37O4.js.map +0 -1
  189. package/dist/chunk-AYHKQWHH.js +0 -68
  190. package/dist/chunk-AYHKQWHH.js.map +0 -1
  191. package/dist/chunk-DEYKTLA3.js +0 -1131
  192. package/dist/chunk-DEYKTLA3.js.map +0 -1
  193. package/dist/chunk-EFJEWLRL.js.map +0 -1
  194. package/dist/chunk-FMBQZAIP.mjs +0 -490
  195. package/dist/chunk-FMBQZAIP.mjs.map +0 -1
  196. package/dist/chunk-HR4H2FP7.mjs.map +0 -1
  197. package/dist/chunk-J7YDGYSW.mjs +0 -9332
  198. package/dist/chunk-J7YDGYSW.mjs.map +0 -1
  199. package/dist/chunk-JGFWIT2E.mjs +0 -1131
  200. package/dist/chunk-JGFWIT2E.mjs.map +0 -1
  201. package/dist/chunk-P2F54I7Q.mjs +0 -4210
  202. package/dist/chunk-P2F54I7Q.mjs.map +0 -1
  203. package/dist/chunk-Q2N6SQYW.mjs +0 -8
  204. package/dist/chunk-Q2N6SQYW.mjs.map +0 -1
  205. package/dist/chunk-Q4FXESVT.js +0 -490
  206. package/dist/chunk-Q4FXESVT.js.map +0 -1
  207. package/dist/chunk-SM63SZCP.mjs +0 -68
  208. package/dist/chunk-SM63SZCP.mjs.map +0 -1
  209. package/dist/chunk-SZZYEG3P.mjs +0 -46
  210. package/dist/chunk-SZZYEG3P.mjs.map +0 -1
  211. package/dist/chunk-VET55IZO.js.map +0 -1
  212. package/dist/chunk-YF5XQZDR.mjs.map +0 -1
  213. package/dist/config-BmnK65TD.d.mts +0 -35
  214. package/dist/config-BmnK65TD.d.ts +0 -35
  215. package/dist/config-DQeAo9Kf.d.mts +0 -49
  216. package/dist/config-DQeAo9Kf.d.ts +0 -49
  217. package/dist/content.fields-cHPdM8GJ.d.mts +0 -27
  218. package/dist/content.fields-cHPdM8GJ.d.ts +0 -27
  219. package/dist/d3.link.interface-ClC4Irqp.d.mts +0 -21
  220. package/dist/d3.link.interface-ClC4Irqp.d.ts +0 -21
  221. package/dist/features/index.d.mts +0 -477
  222. package/dist/features/index.d.ts +0 -477
  223. package/dist/features/index.js +0 -108
  224. package/dist/features/index.js.map +0 -1
  225. package/dist/features/index.mjs +0 -108
  226. package/dist/hooks/index.d.mts +0 -69
  227. package/dist/hooks/index.d.ts +0 -69
  228. package/dist/hooks/index.js +0 -55
  229. package/dist/hooks/index.js.map +0 -1
  230. package/dist/hooks/index.mjs +0 -55
  231. package/dist/hooks/index.mjs.map +0 -1
  232. package/dist/interfaces/index.d.mts +0 -4
  233. package/dist/interfaces/index.d.ts +0 -4
  234. package/dist/interfaces/index.js +0 -2
  235. package/dist/interfaces/index.js.map +0 -1
  236. package/dist/interfaces/index.mjs +0 -2
  237. package/dist/interfaces/index.mjs.map +0 -1
  238. package/dist/notification.interface-B2BrLoDA.d.mts +0 -14
  239. package/dist/notification.interface-DlZLnAfg.d.ts +0 -14
  240. package/dist/permissions/index.d.mts +0 -41
  241. package/dist/permissions/index.d.ts +0 -41
  242. package/dist/permissions/index.js +0 -14
  243. package/dist/permissions/index.js.map +0 -1
  244. package/dist/permissions/index.mjs +0 -14
  245. package/dist/permissions/index.mjs.map +0 -1
  246. package/dist/request-7FE3LJLV.mjs +0 -9
  247. package/dist/request-7FE3LJLV.mjs.map +0 -1
  248. package/dist/request-QFS7NEIE.js +0 -9
  249. package/dist/request-QFS7NEIE.js.map +0 -1
  250. package/dist/roles/index.d.mts +0 -39
  251. package/dist/roles/index.d.ts +0 -39
  252. package/dist/roles/index.js +0 -18
  253. package/dist/roles/index.js.map +0 -1
  254. package/dist/roles/index.mjs +0 -18
  255. package/dist/roles/index.mjs.map +0 -1
  256. package/dist/shadcnui/index.d.mts +0 -698
  257. package/dist/shadcnui/index.d.ts +0 -698
  258. package/dist/shadcnui/index.js +0 -468
  259. package/dist/shadcnui/index.js.map +0 -1
  260. package/dist/shadcnui/index.mjs +0 -467
  261. package/dist/shadcnui/index.mjs.map +0 -1
  262. package/dist/token-IJSPOMW6.mjs +0 -9
  263. package/dist/token-IJSPOMW6.mjs.map +0 -1
  264. package/dist/token-UYE7CV6X.js +0 -9
  265. package/dist/token-UYE7CV6X.js.map +0 -1
  266. package/dist/types-B2QRyqyK.d.ts +0 -39
  267. package/dist/types-CgvNmxTd.d.mts +0 -39
  268. package/dist/types-t2PyXhDu.d.mts +0 -116
  269. package/dist/types-t2PyXhDu.d.ts +0 -116
  270. package/dist/user.interface-CooB1R79.d.mts +0 -85
  271. package/dist/user.interface-KnIT9pVY.d.ts +0 -85
  272. package/dist/utils/index.d.mts +0 -224
  273. package/dist/utils/index.d.ts +0 -224
  274. package/dist/utils/index.js +0 -46
  275. package/dist/utils/index.js.map +0 -1
  276. package/dist/utils/index.mjs +0 -46
  277. package/dist/utils/index.mjs.map +0 -1
  278. /package/dist/{JsonApiRequest-6UR7DIAR.mjs.map → JsonApiRequest-VCCRO732.mjs.map} +0 -0
  279. /package/dist/{chunk-IKBA4AHN.mjs.map → chunk-F4Y3GZG4.mjs.map} +0 -0
  280. /package/dist/{chunk-HAG77QBV.mjs.map → chunk-K4W5QXL5.mjs.map} +0 -0
  281. /package/dist/{atoms/index.mjs.map → request-XABCMU25.mjs.map} +0 -0
  282. /package/dist/{features/index.mjs.map → token-EOK3N45S.mjs.map} +0 -0
@@ -1,4210 +0,0 @@
1
- "use client";
2
- import {
3
- cn,
4
- useComposedRefs,
5
- useIsMobile
6
- } from "./chunk-JGFWIT2E.mjs";
7
- import {
8
- __name
9
- } from "./chunk-PAWJFY3S.mjs";
10
-
11
- // src/shadcnui/ui/accordion.tsx
12
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
13
- import { ChevronDownIcon } from "@radix-ui/react-icons";
14
- import * as React from "react";
15
- import { jsx, jsxs } from "react/jsx-runtime";
16
- var Accordion = AccordionPrimitive.Root;
17
- var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ref, className: cn("border-b", className), ...props }));
18
- AccordionItem.displayName = "AccordionItem";
19
- var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", asChild: true, children: /* @__PURE__ */ jsx(
20
- AccordionPrimitive.Trigger,
21
- {
22
- ref,
23
- className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all", className),
24
- ...props,
25
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
26
- children,
27
- /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4 shrink-0 bg-transparent text-muted-foreground transition-transform duration-200 [&[data-state=open]>svg]:rotate-180" })
28
- ] })
29
- }
30
- ) }));
31
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
32
- var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
33
- AccordionPrimitive.Content,
34
- {
35
- ref,
36
- className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
37
- ...props,
38
- children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
39
- }
40
- ));
41
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
42
-
43
- // src/shadcnui/ui/alert.tsx
44
- import { cva } from "class-variance-authority";
45
- import * as React2 from "react";
46
- import { jsx as jsx2 } from "react/jsx-runtime";
47
- var alertVariants = cva(
48
- "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
49
- {
50
- variants: {
51
- variant: {
52
- default: "bg-background text-foreground",
53
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
54
- }
55
- },
56
- defaultVariants: {
57
- variant: "default"
58
- }
59
- }
60
- );
61
- var Alert = React2.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
62
- Alert.displayName = "Alert";
63
- var AlertTitle = React2.forwardRef(
64
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx2("h5", { ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })
65
- );
66
- AlertTitle.displayName = "AlertTitle";
67
- var AlertDescription = React2.forwardRef(
68
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })
69
- );
70
- AlertDescription.displayName = "AlertDescription";
71
-
72
- // src/shadcnui/ui/alert-dialog.tsx
73
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
74
- import * as React3 from "react";
75
-
76
- // src/shadcnui/ui/button.tsx
77
- import { Slot } from "@radix-ui/react-slot";
78
- import { cva as cva2 } from "class-variance-authority";
79
- import { jsx as jsx3 } from "react/jsx-runtime";
80
- var buttonVariants = cva2(
81
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
82
- {
83
- variants: {
84
- variant: {
85
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
86
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
87
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
88
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
89
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
90
- ghostdestructive: "hover:bg-destructive hover:text-primary-foreground",
91
- link: "text-primary underline-offset-4 hover:underline"
92
- },
93
- size: {
94
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
95
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
96
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
97
- icon: "size-9"
98
- }
99
- },
100
- defaultVariants: {
101
- variant: "default",
102
- size: "default"
103
- }
104
- }
105
- );
106
- function Button({
107
- className,
108
- variant,
109
- size,
110
- asChild = false,
111
- ...props
112
- }) {
113
- const Comp = asChild ? Slot : "button";
114
- return /* @__PURE__ */ jsx3(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props });
115
- }
116
- __name(Button, "Button");
117
-
118
- // src/shadcnui/ui/alert-dialog.tsx
119
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
120
- var AlertDialog = AlertDialogPrimitive.Root;
121
- var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
122
- var AlertDialogPortal = AlertDialogPrimitive.Portal;
123
- var AlertDialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
124
- AlertDialogPrimitive.Overlay,
125
- {
126
- className: cn(
127
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
128
- className
129
- ),
130
- ...props,
131
- ref
132
- }
133
- ));
134
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
135
- var AlertDialogContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs2(AlertDialogPortal, { children: [
136
- /* @__PURE__ */ jsx4(AlertDialogOverlay, {}),
137
- /* @__PURE__ */ jsx4(
138
- AlertDialogPrimitive.Content,
139
- {
140
- ref,
141
- className: cn(
142
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
143
- className
144
- ),
145
- ...props
146
- }
147
- )
148
- ] }));
149
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
150
- var AlertDialogHeader = /* @__PURE__ */ __name(({
151
- className,
152
- ...props
153
- }) => /* @__PURE__ */ jsx4(
154
- "div",
155
- {
156
- className: cn(
157
- "flex flex-col space-y-2 text-center sm:text-left",
158
- className
159
- ),
160
- ...props
161
- }
162
- ), "AlertDialogHeader");
163
- AlertDialogHeader.displayName = "AlertDialogHeader";
164
- var AlertDialogFooter = /* @__PURE__ */ __name(({
165
- className,
166
- ...props
167
- }) => /* @__PURE__ */ jsx4(
168
- "div",
169
- {
170
- className: cn(
171
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
172
- className
173
- ),
174
- ...props
175
- }
176
- ), "AlertDialogFooter");
177
- AlertDialogFooter.displayName = "AlertDialogFooter";
178
- var AlertDialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
179
- AlertDialogPrimitive.Title,
180
- {
181
- ref,
182
- className: cn("text-lg font-semibold", className),
183
- ...props
184
- }
185
- ));
186
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
187
- var AlertDialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
188
- AlertDialogPrimitive.Description,
189
- {
190
- ref,
191
- className: cn("text-sm text-muted-foreground", className),
192
- ...props
193
- }
194
- ));
195
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
196
- var AlertDialogAction = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
197
- AlertDialogPrimitive.Action,
198
- {
199
- ref,
200
- className: cn(buttonVariants(), className),
201
- ...props
202
- }
203
- ));
204
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
205
- var AlertDialogCancel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
206
- AlertDialogPrimitive.Cancel,
207
- {
208
- ref,
209
- className: cn(
210
- buttonVariants({ variant: "outline" }),
211
- "mt-2 sm:mt-0",
212
- className
213
- ),
214
- ...props
215
- }
216
- ));
217
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
218
-
219
- // src/shadcnui/ui/avatar.tsx
220
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
221
- import * as React4 from "react";
222
- import { jsx as jsx5 } from "react/jsx-runtime";
223
- var Avatar = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
224
- AvatarPrimitive.Root,
225
- {
226
- ref,
227
- className: cn(
228
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
229
- className
230
- ),
231
- ...props
232
- }
233
- ));
234
- Avatar.displayName = AvatarPrimitive.Root.displayName;
235
- var AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
236
- AvatarPrimitive.Image,
237
- {
238
- ref,
239
- className: cn("aspect-square h-full w-full", className),
240
- ...props
241
- }
242
- ));
243
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
244
- var AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
245
- AvatarPrimitive.Fallback,
246
- {
247
- ref,
248
- className: cn(
249
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
250
- className
251
- ),
252
- ...props
253
- }
254
- ));
255
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
256
-
257
- // src/shadcnui/ui/badge.tsx
258
- import { cva as cva3 } from "class-variance-authority";
259
- import { jsx as jsx6 } from "react/jsx-runtime";
260
- var badgeVariants = cva3(
261
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
262
- {
263
- variants: {
264
- variant: {
265
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
266
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
267
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
268
- outline: "text-foreground",
269
- blue: "border-transparent bg-sky-500 text-primary-foreground rounded-full",
270
- green: "border-transparent bg-emerald-500 text-primary-foreground rounded-full",
271
- red: "border-transparent bg-red-500 text-primary-foreground rounded-full",
272
- yellow: "border-transparent bg-yellow-500 text-primary-foreground rounded-full",
273
- purple: "border-transparent bg-purple-500 text-primary-foreground rounded-full",
274
- pink: "border-transparent bg-pink-500 text-primary-foreground rounded-full",
275
- gray: "border-transparent bg-gray-500 text-primary-foreground rounded-full",
276
- orange: "border-transparent bg-orange-500 text-primary-foreground rounded-full",
277
- teal: "border-transparent bg-teal-500 text-primary-foreground rounded-full",
278
- lime: "border-transparent bg-lime-500 text-primary-foreground rounded-full"
279
- }
280
- },
281
- defaultVariants: {
282
- variant: "default"
283
- }
284
- }
285
- );
286
- function Badge({ className, variant, ...props }) {
287
- return /* @__PURE__ */ jsx6("div", { className: cn(badgeVariants({ variant }), className), ...props });
288
- }
289
- __name(Badge, "Badge");
290
-
291
- // src/shadcnui/ui/breadcrumb.tsx
292
- import { ChevronRightIcon, DotsHorizontalIcon } from "@radix-ui/react-icons";
293
- import { Slot as Slot2 } from "@radix-ui/react-slot";
294
- import * as React5 from "react";
295
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
296
- var Breadcrumb = React5.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx7("nav", { ref, "aria-label": "breadcrumb", ...props }));
297
- Breadcrumb.displayName = "Breadcrumb";
298
- var BreadcrumbList = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
299
- "ol",
300
- {
301
- ref,
302
- className: cn(
303
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
304
- className
305
- ),
306
- ...props
307
- }
308
- ));
309
- BreadcrumbList.displayName = "BreadcrumbList";
310
- var BreadcrumbItem = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
311
- "li",
312
- {
313
- ref,
314
- className: cn("inline-flex items-center gap-1.5", className),
315
- ...props
316
- }
317
- ));
318
- BreadcrumbItem.displayName = "BreadcrumbItem";
319
- var BreadcrumbLink = React5.forwardRef(({ asChild, className, ...props }, ref) => {
320
- const Comp = asChild ? Slot2 : "a";
321
- return /* @__PURE__ */ jsx7(
322
- Comp,
323
- {
324
- ref,
325
- className: cn("transition-colors hover:text-foreground", className),
326
- ...props
327
- }
328
- );
329
- });
330
- BreadcrumbLink.displayName = "BreadcrumbLink";
331
- var BreadcrumbPage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
332
- "span",
333
- {
334
- ref,
335
- role: "link",
336
- "aria-disabled": "true",
337
- "aria-current": "page",
338
- className: cn("font-normal text-foreground", className),
339
- ...props
340
- }
341
- ));
342
- BreadcrumbPage.displayName = "BreadcrumbPage";
343
- var BreadcrumbSeparator = /* @__PURE__ */ __name(({
344
- children,
345
- className,
346
- ...props
347
- }) => /* @__PURE__ */ jsx7(
348
- "li",
349
- {
350
- role: "presentation",
351
- "aria-hidden": "true",
352
- className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
353
- ...props,
354
- children: children ?? /* @__PURE__ */ jsx7(ChevronRightIcon, {})
355
- }
356
- ), "BreadcrumbSeparator");
357
- BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
358
- var BreadcrumbEllipsis = /* @__PURE__ */ __name(({
359
- className,
360
- ...props
361
- }) => /* @__PURE__ */ jsxs3(
362
- "span",
363
- {
364
- role: "presentation",
365
- "aria-hidden": "true",
366
- className: cn("flex h-9 w-9 items-center justify-center", className),
367
- ...props,
368
- children: [
369
- /* @__PURE__ */ jsx7(DotsHorizontalIcon, { className: "h-4 w-4" }),
370
- /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "More" })
371
- ]
372
- }
373
- ), "BreadcrumbEllipsis");
374
- BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
375
-
376
- // src/shadcnui/ui/calendar.tsx
377
- import { DayPicker, getDefaultClassNames } from "react-day-picker";
378
- import { jsx as jsx8 } from "react/jsx-runtime";
379
- function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
380
- const defaultClassNames = getDefaultClassNames();
381
- return /* @__PURE__ */ jsx8(
382
- DayPicker,
383
- {
384
- showOutsideDays,
385
- className: cn("p-3", className),
386
- classNames: {
387
- months: `relative flex ${defaultClassNames.month}`,
388
- month_caption: `relative mx-10 flex h-7 items-center justify-center ${defaultClassNames.month_caption}`,
389
- weekdays: cn("flex flex-row", classNames?.weekdays),
390
- weekday: cn("w-8 text-sm font-normal text-muted-foreground", classNames?.weekday),
391
- month: cn("w-full", classNames?.month),
392
- caption_label: cn("truncate text-sm font-medium", classNames?.caption_label),
393
- button_next: cn(
394
- buttonVariants({ variant: "outline" }),
395
- "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute right-1 [&_svg]:fill-foreground",
396
- classNames?.button_next
397
- ),
398
- button_previous: cn(
399
- buttonVariants({ variant: "outline" }),
400
- "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 absolute left-1 [&_svg]:fill-foreground",
401
- classNames?.button_previous
402
- ),
403
- nav: cn("flex items-start", classNames?.nav),
404
- month_grid: cn("mx-auto mt-4", classNames?.month_grid),
405
- week: cn("mt-2 flex w-max items-start", classNames?.week),
406
- day: cn("flex size-8 flex-1 items-center justify-center p-0 text-sm", classNames?.day),
407
- day_button: cn(
408
- "size-8 rounded-md p-0 font-normal transition-none aria-selected:opacity-100",
409
- classNames?.day_button
410
- ),
411
- range_start: cn(
412
- "bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground day-range-start rounded-s-md",
413
- classNames?.range_start
414
- ),
415
- range_middle: cn(
416
- "bg-accent !text-foreground [&>button]:bg-transparent [&>button]:!text-foreground [&>button]:hover:bg-transparent [&>button]:hover:!text-foreground",
417
- classNames?.range_middle
418
- ),
419
- range_end: cn(
420
- "bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground day-range-end rounded-e-md",
421
- classNames?.range_end
422
- ),
423
- selected: cn(
424
- "[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
425
- classNames?.selected
426
- ),
427
- today: cn("[&>button]:bg-accent [&>button]:text-accent-foreground", classNames?.today),
428
- outside: cn(
429
- "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
430
- classNames?.outside
431
- ),
432
- disabled: cn("text-muted-foreground opacity-50", classNames?.disabled),
433
- hidden: cn("invisible flex-1", classNames?.hidden),
434
- ...classNames
435
- },
436
- ...props
437
- }
438
- );
439
- }
440
- __name(Calendar, "Calendar");
441
- Calendar.displayName = "Calendar";
442
-
443
- // src/shadcnui/ui/card.tsx
444
- import * as React6 from "react";
445
- import { jsx as jsx9 } from "react/jsx-runtime";
446
- var Card = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className), ...props }));
447
- Card.displayName = "Card";
448
- var CardHeader = React6.forwardRef(
449
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
450
- );
451
- CardHeader.displayName = "CardHeader";
452
- var CardTitle = React6.forwardRef(
453
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })
454
- );
455
- CardTitle.displayName = "CardTitle";
456
- var CardDescription = React6.forwardRef(
457
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
458
- );
459
- CardDescription.displayName = "CardDescription";
460
- var CardContent = React6.forwardRef(
461
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("p-6 pt-0", className), ...props })
462
- );
463
- CardContent.displayName = "CardContent";
464
- var CardFooter = React6.forwardRef(
465
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
466
- );
467
- CardFooter.displayName = "CardFooter";
468
-
469
- // src/shadcnui/ui/carousel.tsx
470
- import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons";
471
- import useEmblaCarousel from "embla-carousel-react";
472
- import * as React7 from "react";
473
- import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
474
- var CarouselContext = React7.createContext(null);
475
- function useCarousel() {
476
- const context = React7.useContext(CarouselContext);
477
- if (!context) {
478
- throw new Error("useCarousel must be used within a <Carousel />");
479
- }
480
- return context;
481
- }
482
- __name(useCarousel, "useCarousel");
483
- var Carousel = React7.forwardRef(
484
- ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
485
- const [carouselRef, api] = useEmblaCarousel(
486
- {
487
- ...opts,
488
- axis: orientation === "horizontal" ? "x" : "y"
489
- },
490
- plugins
491
- );
492
- const [canScrollPrev, setCanScrollPrev] = React7.useState(false);
493
- const [canScrollNext, setCanScrollNext] = React7.useState(false);
494
- const onSelect = React7.useCallback((api2) => {
495
- if (!api2) {
496
- return;
497
- }
498
- setCanScrollPrev(api2.canScrollPrev());
499
- setCanScrollNext(api2.canScrollNext());
500
- }, []);
501
- const scrollPrev = React7.useCallback(() => {
502
- api?.scrollPrev();
503
- }, [api]);
504
- const scrollNext = React7.useCallback(() => {
505
- api?.scrollNext();
506
- }, [api]);
507
- const handleKeyDown = React7.useCallback(
508
- (event) => {
509
- if (event.key === "ArrowLeft") {
510
- event.preventDefault();
511
- scrollPrev();
512
- } else if (event.key === "ArrowRight") {
513
- event.preventDefault();
514
- scrollNext();
515
- }
516
- },
517
- [scrollPrev, scrollNext]
518
- );
519
- React7.useEffect(() => {
520
- if (!api || !setApi) {
521
- return;
522
- }
523
- setApi(api);
524
- }, [api, setApi]);
525
- React7.useEffect(() => {
526
- if (!api) {
527
- return;
528
- }
529
- onSelect(api);
530
- api.on("reInit", onSelect);
531
- api.on("select", onSelect);
532
- return () => {
533
- api?.off("select", onSelect);
534
- };
535
- }, [api, onSelect]);
536
- return /* @__PURE__ */ jsx10(
537
- CarouselContext.Provider,
538
- {
539
- value: {
540
- carouselRef,
541
- api,
542
- opts,
543
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
544
- scrollPrev,
545
- scrollNext,
546
- canScrollPrev,
547
- canScrollNext
548
- },
549
- children: /* @__PURE__ */ jsx10(
550
- "div",
551
- {
552
- ref,
553
- onKeyDownCapture: handleKeyDown,
554
- className: cn("relative", className),
555
- role: "region",
556
- "aria-roledescription": "carousel",
557
- ...props,
558
- children
559
- }
560
- )
561
- }
562
- );
563
- }
564
- );
565
- Carousel.displayName = "Carousel";
566
- var CarouselContent = React7.forwardRef(
567
- ({ className, ...props }, ref) => {
568
- const { carouselRef, orientation } = useCarousel();
569
- return /* @__PURE__ */ jsx10("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsx10(
570
- "div",
571
- {
572
- ref,
573
- className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
574
- ...props
575
- }
576
- ) });
577
- }
578
- );
579
- CarouselContent.displayName = "CarouselContent";
580
- var CarouselItem = React7.forwardRef(
581
- ({ className, ...props }, ref) => {
582
- const { orientation } = useCarousel();
583
- return /* @__PURE__ */ jsx10(
584
- "div",
585
- {
586
- ref,
587
- role: "group",
588
- "aria-roledescription": "slide",
589
- className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
590
- ...props
591
- }
592
- );
593
- }
594
- );
595
- CarouselItem.displayName = "CarouselItem";
596
- var CarouselPrevious = React7.forwardRef(
597
- ({ className, variant = "outline", size = "icon", ...props }, ref) => {
598
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
599
- return /* @__PURE__ */ jsxs4(
600
- Button,
601
- {
602
- ref,
603
- variant,
604
- size,
605
- className: cn(
606
- "absolute h-8 w-8 rounded-full",
607
- orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
608
- className
609
- ),
610
- disabled: !canScrollPrev,
611
- onClick: scrollPrev,
612
- ...props,
613
- children: [
614
- /* @__PURE__ */ jsx10(ArrowLeftIcon, { className: "h-4 w-4" }),
615
- /* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Previous slide" })
616
- ]
617
- }
618
- );
619
- }
620
- );
621
- CarouselPrevious.displayName = "CarouselPrevious";
622
- var CarouselNext = React7.forwardRef(
623
- ({ className, variant = "outline", size = "icon", ...props }, ref) => {
624
- const { orientation, scrollNext, canScrollNext } = useCarousel();
625
- return /* @__PURE__ */ jsxs4(
626
- Button,
627
- {
628
- ref,
629
- variant,
630
- size,
631
- className: cn(
632
- "absolute h-8 w-8 rounded-full",
633
- orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
634
- className
635
- ),
636
- disabled: !canScrollNext,
637
- onClick: scrollNext,
638
- ...props,
639
- children: [
640
- /* @__PURE__ */ jsx10(ArrowRightIcon, { className: "h-4 w-4" }),
641
- /* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Next slide" })
642
- ]
643
- }
644
- );
645
- }
646
- );
647
- CarouselNext.displayName = "CarouselNext";
648
-
649
- // src/shadcnui/ui/chart.tsx
650
- import * as React8 from "react";
651
- import * as RechartsPrimitive from "recharts";
652
- import { Fragment, jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
653
- var THEMES = { light: "", dark: ".dark" };
654
- var ChartContext = React8.createContext(null);
655
- function useChart() {
656
- const context = React8.useContext(ChartContext);
657
- if (!context) {
658
- throw new Error("useChart must be used within a <ChartContainer />");
659
- }
660
- return context;
661
- }
662
- __name(useChart, "useChart");
663
- function ChartContainer({
664
- id,
665
- className,
666
- children,
667
- config,
668
- ...props
669
- }) {
670
- const uniqueId = React8.useId();
671
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
672
- return /* @__PURE__ */ jsx11(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs5(
673
- "div",
674
- {
675
- "data-slot": "chart",
676
- "data-chart": chartId,
677
- className: cn(
678
- "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
679
- className
680
- ),
681
- ...props,
682
- children: [
683
- /* @__PURE__ */ jsx11(ChartStyle, { id: chartId, config }),
684
- /* @__PURE__ */ jsx11(RechartsPrimitive.ResponsiveContainer, { children })
685
- ]
686
- }
687
- ) });
688
- }
689
- __name(ChartContainer, "ChartContainer");
690
- var ChartStyle = /* @__PURE__ */ __name(({ id, config }) => {
691
- const colorConfig = Object.entries(config).filter(([, config2]) => config2.theme || config2.color);
692
- if (!colorConfig.length) {
693
- return null;
694
- }
695
- return /* @__PURE__ */ jsx11(
696
- "style",
697
- {
698
- dangerouslySetInnerHTML: {
699
- __html: Object.entries(THEMES).map(
700
- ([theme, prefix]) => `
701
- ${prefix} [data-chart=${id}] {
702
- ${colorConfig.map(([key, itemConfig]) => {
703
- const color = itemConfig.theme?.[theme] || itemConfig.color;
704
- return color ? ` --color-${key}: ${color};` : null;
705
- }).join("\n")}
706
- }
707
- `
708
- ).join("\n")
709
- }
710
- }
711
- );
712
- }, "ChartStyle");
713
- var ChartTooltip = RechartsPrimitive.Tooltip;
714
- function ChartTooltipContent({
715
- active,
716
- payload,
717
- label,
718
- className,
719
- indicator = "dot",
720
- hideLabel = false,
721
- hideIndicator = false,
722
- labelFormatter,
723
- formatter,
724
- labelClassName,
725
- color,
726
- nameKey,
727
- labelKey
728
- }) {
729
- const { config } = useChart();
730
- const tooltipLabel = React8.useMemo(() => {
731
- if (hideLabel || !payload?.length) {
732
- return null;
733
- }
734
- const [item] = payload;
735
- const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
736
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
737
- const value = (() => {
738
- const v = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
739
- return typeof v === "string" || typeof v === "number" ? v : void 0;
740
- })();
741
- if (labelFormatter) {
742
- return /* @__PURE__ */ jsx11("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
743
- }
744
- if (!value) {
745
- return null;
746
- }
747
- return /* @__PURE__ */ jsx11("div", { className: cn("font-medium", labelClassName), children: value });
748
- }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
749
- if (!active || !payload?.length) {
750
- return null;
751
- }
752
- const nestLabel = payload.length === 1 && indicator !== "dot";
753
- return /* @__PURE__ */ jsxs5(
754
- "div",
755
- {
756
- className: cn(
757
- "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
758
- className
759
- ),
760
- children: [
761
- !nestLabel ? tooltipLabel : null,
762
- /* @__PURE__ */ jsx11("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
763
- const key = `${nameKey || item.name || item.dataKey || "value"}`;
764
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
765
- const indicatorColor = color || item.payload.fill || item.color;
766
- return /* @__PURE__ */ jsx11(
767
- "div",
768
- {
769
- className: cn(
770
- "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
771
- indicator === "dot" && "items-center"
772
- ),
773
- children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs5(Fragment, { children: [
774
- itemConfig?.icon ? /* @__PURE__ */ jsx11(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx11(
775
- "div",
776
- {
777
- className: cn("shrink-0 rounded-[2px] border-[var(--color-border)] bg-[var(--color-bg)]", {
778
- "h-2.5 w-2.5": indicator === "dot",
779
- "w-1": indicator === "line",
780
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
781
- "my-0.5": nestLabel && indicator === "dashed"
782
- }),
783
- style: {
784
- "--color-bg": indicatorColor,
785
- "--color-border": indicatorColor
786
- }
787
- }
788
- ),
789
- /* @__PURE__ */ jsxs5(
790
- "div",
791
- {
792
- className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
793
- children: [
794
- /* @__PURE__ */ jsxs5("div", { className: "grid gap-1.5", children: [
795
- nestLabel ? tooltipLabel : null,
796
- /* @__PURE__ */ jsx11("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
797
- ] }),
798
- item.value && /* @__PURE__ */ jsx11("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
799
- ]
800
- }
801
- )
802
- ] })
803
- },
804
- item.dataKey
805
- );
806
- }) })
807
- ]
808
- }
809
- );
810
- }
811
- __name(ChartTooltipContent, "ChartTooltipContent");
812
- var ChartLegend = RechartsPrimitive.Legend;
813
- function ChartLegendContent({
814
- className,
815
- hideIcon = false,
816
- payload,
817
- verticalAlign = "bottom",
818
- nameKey
819
- }) {
820
- const { config } = useChart();
821
- if (!payload?.length) {
822
- return null;
823
- }
824
- return /* @__PURE__ */ jsx11("div", { className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload.map((item) => {
825
- const key = `${nameKey || item.dataKey || "value"}`;
826
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
827
- return /* @__PURE__ */ jsxs5(
828
- "div",
829
- {
830
- className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
831
- children: [
832
- itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx11(itemConfig.icon, {}) : /* @__PURE__ */ jsx11(
833
- "div",
834
- {
835
- className: "h-2 w-2 shrink-0 rounded-[2px]",
836
- style: {
837
- backgroundColor: item.color
838
- }
839
- }
840
- ),
841
- itemConfig?.label
842
- ]
843
- },
844
- item.value
845
- );
846
- }) });
847
- }
848
- __name(ChartLegendContent, "ChartLegendContent");
849
- function getPayloadConfigFromPayload(config, payload, key) {
850
- if (typeof payload !== "object" || payload === null) {
851
- return void 0;
852
- }
853
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
854
- let configLabelKey = key;
855
- if (key in payload && typeof payload[key] === "string") {
856
- configLabelKey = payload[key];
857
- } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
858
- configLabelKey = payloadPayload[key];
859
- }
860
- return configLabelKey in config ? config[configLabelKey] : config[key];
861
- }
862
- __name(getPayloadConfigFromPayload, "getPayloadConfigFromPayload");
863
-
864
- // src/shadcnui/ui/checkbox.tsx
865
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
866
- import { CheckIcon } from "@radix-ui/react-icons";
867
- import * as React9 from "react";
868
- import { jsx as jsx12 } from "react/jsx-runtime";
869
- var Checkbox = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
870
- CheckboxPrimitive.Root,
871
- {
872
- ref,
873
- className: cn(
874
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
875
- className
876
- ),
877
- ...props,
878
- children: /* @__PURE__ */ jsx12(
879
- CheckboxPrimitive.Indicator,
880
- {
881
- className: cn("flex items-center justify-center text-current"),
882
- children: /* @__PURE__ */ jsx12(CheckIcon, { className: "h-4 w-4" })
883
- }
884
- )
885
- }
886
- ));
887
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
888
-
889
- // src/shadcnui/ui/collapsible.tsx
890
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
891
- var Collapsible = CollapsiblePrimitive.Root;
892
- var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
893
- var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
894
-
895
- // src/shadcnui/ui/command.tsx
896
- import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
897
- import { Command as CommandPrimitive } from "cmdk";
898
- import * as React11 from "react";
899
-
900
- // src/shadcnui/ui/dialog.tsx
901
- import * as DialogPrimitive from "@radix-ui/react-dialog";
902
- import { Cross2Icon } from "@radix-ui/react-icons";
903
- import * as React10 from "react";
904
- import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
905
- var Dialog = DialogPrimitive.Root;
906
- var DialogTrigger = DialogPrimitive.Trigger;
907
- var DialogPortal = DialogPrimitive.Portal;
908
- var DialogClose = DialogPrimitive.Close;
909
- var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
910
- DialogPrimitive.Overlay,
911
- {
912
- ref,
913
- className: cn(
914
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
915
- className
916
- ),
917
- ...props
918
- }
919
- ));
920
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
921
- var DialogContent = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(DialogPortal, { children: [
922
- /* @__PURE__ */ jsx13(DialogOverlay, {}),
923
- /* @__PURE__ */ jsxs6(
924
- DialogPrimitive.Content,
925
- {
926
- ref,
927
- className: cn(
928
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
929
- className
930
- ),
931
- ...props,
932
- children: [
933
- children,
934
- /* @__PURE__ */ jsxs6(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
935
- /* @__PURE__ */ jsx13(Cross2Icon, { className: "h-4 w-4" }),
936
- /* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Close" })
937
- ] })
938
- ]
939
- }
940
- )
941
- ] }));
942
- DialogContent.displayName = DialogPrimitive.Content.displayName;
943
- var DialogHeader = /* @__PURE__ */ __name(({ className, ...props }) => /* @__PURE__ */ jsx13("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }), "DialogHeader");
944
- DialogHeader.displayName = "DialogHeader";
945
- var DialogFooter = /* @__PURE__ */ __name(({ className, ...props }) => /* @__PURE__ */ jsx13("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }), "DialogFooter");
946
- DialogFooter.displayName = "DialogFooter";
947
- var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
948
- DialogPrimitive.Title,
949
- {
950
- ref,
951
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
952
- ...props
953
- }
954
- ));
955
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
956
- var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
957
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
958
-
959
- // src/shadcnui/ui/command.tsx
960
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
961
- var Command = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
962
- CommandPrimitive,
963
- {
964
- ref,
965
- className: cn(
966
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
967
- className
968
- ),
969
- ...props
970
- }
971
- ));
972
- Command.displayName = CommandPrimitive.displayName;
973
- var CommandDialog = /* @__PURE__ */ __name(({ children, ...props }) => {
974
- return /* @__PURE__ */ jsx14(Dialog, { ...props, children: /* @__PURE__ */ jsx14(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx14(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
975
- }, "CommandDialog");
976
- var CommandInput = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs7("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
977
- /* @__PURE__ */ jsx14(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
978
- /* @__PURE__ */ jsx14(
979
- CommandPrimitive.Input,
980
- {
981
- ref,
982
- className: cn(
983
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
984
- className
985
- ),
986
- ...props
987
- }
988
- )
989
- ] }));
990
- CommandInput.displayName = CommandPrimitive.Input.displayName;
991
- var CommandList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
992
- CommandPrimitive.List,
993
- {
994
- ref,
995
- className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
996
- ...props
997
- }
998
- ));
999
- CommandList.displayName = CommandPrimitive.List.displayName;
1000
- var CommandEmpty = React11.forwardRef((props, ref) => /* @__PURE__ */ jsx14(
1001
- CommandPrimitive.Empty,
1002
- {
1003
- ref,
1004
- className: "py-6 text-center text-sm",
1005
- ...props
1006
- }
1007
- ));
1008
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
1009
- var CommandGroup = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1010
- CommandPrimitive.Group,
1011
- {
1012
- ref,
1013
- className: cn(
1014
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
1015
- className
1016
- ),
1017
- ...props
1018
- }
1019
- ));
1020
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
1021
- var CommandSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1022
- CommandPrimitive.Separator,
1023
- {
1024
- ref,
1025
- className: cn("-mx-1 h-px bg-border", className),
1026
- ...props
1027
- }
1028
- ));
1029
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
1030
- var CommandItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1031
- CommandPrimitive.Item,
1032
- {
1033
- ref,
1034
- className: cn(
1035
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1036
- className
1037
- ),
1038
- ...props
1039
- }
1040
- ));
1041
- CommandItem.displayName = CommandPrimitive.Item.displayName;
1042
- var CommandShortcut = /* @__PURE__ */ __name(({
1043
- className,
1044
- ...props
1045
- }) => {
1046
- return /* @__PURE__ */ jsx14(
1047
- "span",
1048
- {
1049
- className: cn(
1050
- "ml-auto text-xs tracking-widest text-muted-foreground",
1051
- className
1052
- ),
1053
- ...props
1054
- }
1055
- );
1056
- }, "CommandShortcut");
1057
- CommandShortcut.displayName = "CommandShortcut";
1058
-
1059
- // src/shadcnui/ui/context-menu.tsx
1060
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
1061
- import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon2, DotFilledIcon } from "@radix-ui/react-icons";
1062
- import * as React12 from "react";
1063
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1064
- var ContextMenu = ContextMenuPrimitive.Root;
1065
- var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
1066
- var ContextMenuGroup = ContextMenuPrimitive.Group;
1067
- var ContextMenuPortal = ContextMenuPrimitive.Portal;
1068
- var ContextMenuSub = ContextMenuPrimitive.Sub;
1069
- var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
1070
- var ContextMenuSubTrigger = React12.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
1071
- ContextMenuPrimitive.SubTrigger,
1072
- {
1073
- ref,
1074
- className: cn(
1075
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
1076
- inset && "pl-8",
1077
- className
1078
- ),
1079
- ...props,
1080
- children: [
1081
- children,
1082
- /* @__PURE__ */ jsx15(ChevronRightIcon2, { className: "ml-auto h-4 w-4" })
1083
- ]
1084
- }
1085
- ));
1086
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
1087
- var ContextMenuSubContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
1088
- ContextMenuPrimitive.SubContent,
1089
- {
1090
- ref,
1091
- className: cn(
1092
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1093
- className
1094
- ),
1095
- ...props
1096
- }
1097
- ));
1098
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
1099
- var ContextMenuContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
1100
- ContextMenuPrimitive.Content,
1101
- {
1102
- ref,
1103
- className: cn(
1104
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1105
- className
1106
- ),
1107
- ...props
1108
- }
1109
- ) }));
1110
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
1111
- var ContextMenuItem = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx15(
1112
- ContextMenuPrimitive.Item,
1113
- {
1114
- ref,
1115
- className: cn(
1116
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1117
- inset && "pl-8",
1118
- className
1119
- ),
1120
- ...props
1121
- }
1122
- ));
1123
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
1124
- var ContextMenuCheckboxItem = React12.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs8(
1125
- ContextMenuPrimitive.CheckboxItem,
1126
- {
1127
- ref,
1128
- className: cn(
1129
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1130
- className
1131
- ),
1132
- checked,
1133
- ...props,
1134
- children: [
1135
- /* @__PURE__ */ jsx15("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(CheckIcon2, { className: "h-4 w-4" }) }) }),
1136
- children
1137
- ]
1138
- }
1139
- ));
1140
- ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
1141
- var ContextMenuRadioItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
1142
- ContextMenuPrimitive.RadioItem,
1143
- {
1144
- ref,
1145
- className: cn(
1146
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1147
- className
1148
- ),
1149
- ...props,
1150
- children: [
1151
- /* @__PURE__ */ jsx15("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
1152
- children
1153
- ]
1154
- }
1155
- ));
1156
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
1157
- var ContextMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx15(
1158
- ContextMenuPrimitive.Label,
1159
- {
1160
- ref,
1161
- className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
1162
- ...props
1163
- }
1164
- ));
1165
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
1166
- var ContextMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(ContextMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
1167
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
1168
- var ContextMenuShortcut = /* @__PURE__ */ __name(({ className, ...props }) => {
1169
- return /* @__PURE__ */ jsx15("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
1170
- }, "ContextMenuShortcut");
1171
- ContextMenuShortcut.displayName = "ContextMenuShortcut";
1172
-
1173
- // src/shadcnui/ui/drawer.tsx
1174
- import * as React13 from "react";
1175
- import { Drawer as DrawerPrimitive } from "vaul";
1176
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1177
- var Drawer = /* @__PURE__ */ __name(({ shouldScaleBackground = true, ...props }) => /* @__PURE__ */ jsx16(DrawerPrimitive.Root, { shouldScaleBackground, ...props }), "Drawer");
1178
- Drawer.displayName = "Drawer";
1179
- var DrawerTrigger = DrawerPrimitive.Trigger;
1180
- var DrawerPortal = DrawerPrimitive.Portal;
1181
- var DrawerClose = DrawerPrimitive.Close;
1182
- var DrawerOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(DrawerPrimitive.Overlay, { ref, className: cn("fixed inset-0 z-50 bg-black/80", className), ...props }));
1183
- DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
1184
- var DrawerContent = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs9(DrawerPortal, { children: [
1185
- /* @__PURE__ */ jsx16(DrawerOverlay, {}),
1186
- /* @__PURE__ */ jsxs9(
1187
- DrawerPrimitive.Content,
1188
- {
1189
- ref,
1190
- className: cn(
1191
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
1192
- className
1193
- ),
1194
- ...props,
1195
- children: [
1196
- /* @__PURE__ */ jsx16("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
1197
- children
1198
- ]
1199
- }
1200
- )
1201
- ] }));
1202
- DrawerContent.displayName = "DrawerContent";
1203
- var DrawerHeader = /* @__PURE__ */ __name(({ className, ...props }) => /* @__PURE__ */ jsx16("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props }), "DrawerHeader");
1204
- DrawerHeader.displayName = "DrawerHeader";
1205
- var DrawerFooter = /* @__PURE__ */ __name(({ className, ...props }) => /* @__PURE__ */ jsx16("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }), "DrawerFooter");
1206
- DrawerFooter.displayName = "DrawerFooter";
1207
- var DrawerTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
1208
- DrawerPrimitive.Title,
1209
- {
1210
- ref,
1211
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
1212
- ...props
1213
- }
1214
- ));
1215
- DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
1216
- var DrawerDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(DrawerPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
1217
- DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
1218
-
1219
- // src/shadcnui/ui/dropdown-menu.tsx
1220
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
1221
- import {
1222
- CheckIcon as CheckIcon3,
1223
- ChevronRightIcon as ChevronRightIcon3,
1224
- DotFilledIcon as DotFilledIcon2
1225
- } from "@radix-ui/react-icons";
1226
- import * as React14 from "react";
1227
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
1228
- var DropdownMenu = DropdownMenuPrimitive.Root;
1229
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1230
- var DropdownMenuGroup = DropdownMenuPrimitive.Group;
1231
- var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
1232
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
1233
- var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
1234
- var DropdownMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
1235
- DropdownMenuPrimitive.SubTrigger,
1236
- {
1237
- ref,
1238
- className: cn(
1239
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1240
- inset && "pl-8",
1241
- className
1242
- ),
1243
- ...props,
1244
- children: [
1245
- children,
1246
- /* @__PURE__ */ jsx17(ChevronRightIcon3, { className: "ml-auto h-4 w-4" })
1247
- ]
1248
- }
1249
- ));
1250
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
1251
- var DropdownMenuSubContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1252
- DropdownMenuPrimitive.SubContent,
1253
- {
1254
- ref,
1255
- className: cn(
1256
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1257
- className
1258
- ),
1259
- ...props
1260
- }
1261
- ));
1262
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
1263
- var DropdownMenuContent = React14.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx17(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
1264
- DropdownMenuPrimitive.Content,
1265
- {
1266
- ref,
1267
- sideOffset,
1268
- className: cn(
1269
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1270
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1271
- className
1272
- ),
1273
- ...props
1274
- }
1275
- ) }));
1276
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1277
- var DropdownMenuItem = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
1278
- DropdownMenuPrimitive.Item,
1279
- {
1280
- ref,
1281
- className: cn(
1282
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
1283
- inset && "pl-8",
1284
- className
1285
- ),
1286
- ...props
1287
- }
1288
- ));
1289
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
1290
- var DropdownMenuCheckboxItem = React14.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs10(
1291
- DropdownMenuPrimitive.CheckboxItem,
1292
- {
1293
- ref,
1294
- className: cn(
1295
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1296
- className
1297
- ),
1298
- checked,
1299
- ...props,
1300
- children: [
1301
- /* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(CheckIcon3, { className: "h-4 w-4" }) }) }),
1302
- children
1303
- ]
1304
- }
1305
- ));
1306
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
1307
- var DropdownMenuRadioItem = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
1308
- DropdownMenuPrimitive.RadioItem,
1309
- {
1310
- ref,
1311
- className: cn(
1312
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1313
- className
1314
- ),
1315
- ...props,
1316
- children: [
1317
- /* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(DotFilledIcon2, { className: "h-4 w-4 fill-current" }) }) }),
1318
- children
1319
- ]
1320
- }
1321
- ));
1322
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
1323
- var DropdownMenuLabel = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx17(
1324
- DropdownMenuPrimitive.Label,
1325
- {
1326
- ref,
1327
- className: cn(
1328
- "px-2 py-1.5 text-sm font-semibold",
1329
- inset && "pl-8",
1330
- className
1331
- ),
1332
- ...props
1333
- }
1334
- ));
1335
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1336
- var DropdownMenuSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
1337
- DropdownMenuPrimitive.Separator,
1338
- {
1339
- ref,
1340
- className: cn("-mx-1 my-1 h-px bg-muted", className),
1341
- ...props
1342
- }
1343
- ));
1344
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
1345
- var DropdownMenuShortcut = /* @__PURE__ */ __name(({
1346
- className,
1347
- ...props
1348
- }) => {
1349
- return /* @__PURE__ */ jsx17(
1350
- "span",
1351
- {
1352
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
1353
- ...props
1354
- }
1355
- );
1356
- }, "DropdownMenuShortcut");
1357
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1358
-
1359
- // src/shadcnui/ui/form.tsx
1360
- import { Slot as Slot3 } from "@radix-ui/react-slot";
1361
- import * as React16 from "react";
1362
- import { Controller, FormProvider, useFormContext } from "react-hook-form";
1363
-
1364
- // src/shadcnui/ui/label.tsx
1365
- import * as LabelPrimitive from "@radix-ui/react-label";
1366
- import { cva as cva4 } from "class-variance-authority";
1367
- import * as React15 from "react";
1368
- import { jsx as jsx18 } from "react/jsx-runtime";
1369
- var labelVariants = cva4(
1370
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1371
- );
1372
- var Label3 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
1373
- LabelPrimitive.Root,
1374
- {
1375
- ref,
1376
- className: cn(labelVariants(), className),
1377
- ...props
1378
- }
1379
- ));
1380
- Label3.displayName = LabelPrimitive.Root.displayName;
1381
-
1382
- // src/shadcnui/ui/form.tsx
1383
- import { jsx as jsx19 } from "react/jsx-runtime";
1384
- var Form = FormProvider;
1385
- var FormFieldContext = React16.createContext({});
1386
- var FormField = /* @__PURE__ */ __name(({
1387
- ...props
1388
- }) => {
1389
- return /* @__PURE__ */ jsx19(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx19(Controller, { ...props }) });
1390
- }, "FormField");
1391
- var useFormField = /* @__PURE__ */ __name(() => {
1392
- const fieldContext = React16.useContext(FormFieldContext);
1393
- const itemContext = React16.useContext(FormItemContext);
1394
- const { getFieldState, formState } = useFormContext();
1395
- const fieldState = getFieldState(fieldContext.name, formState);
1396
- if (!fieldContext) {
1397
- throw new Error("useFormField should be used within <FormField>");
1398
- }
1399
- const { id } = itemContext;
1400
- return {
1401
- id,
1402
- name: fieldContext.name,
1403
- formItemId: `${id}-form-item`,
1404
- formDescriptionId: `${id}-form-item-description`,
1405
- formMessageId: `${id}-form-item-message`,
1406
- ...fieldState
1407
- };
1408
- }, "useFormField");
1409
- var FormItemContext = React16.createContext({});
1410
- var FormItem = React16.forwardRef(
1411
- ({ className, ...props }, ref) => {
1412
- const id = React16.useId();
1413
- return /* @__PURE__ */ jsx19(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx19("div", { ref, className: cn("space-y-2", className), ...props }) });
1414
- }
1415
- );
1416
- FormItem.displayName = "FormItem";
1417
- var FormLabel = React16.forwardRef(({ className, ...props }, ref) => {
1418
- const { error, formItemId } = useFormField();
1419
- return /* @__PURE__ */ jsx19(Label3, { ref, className: cn(error && "text-destructive", className), htmlFor: formItemId, ...props });
1420
- });
1421
- FormLabel.displayName = "FormLabel";
1422
- var FormControl = React16.forwardRef(
1423
- ({ ...props }, ref) => {
1424
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
1425
- return /* @__PURE__ */ jsx19(
1426
- Slot3,
1427
- {
1428
- ref,
1429
- id: formItemId,
1430
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1431
- "aria-invalid": !!error,
1432
- ...props
1433
- }
1434
- );
1435
- }
1436
- );
1437
- FormControl.displayName = "FormControl";
1438
- var FormDescription = React16.forwardRef(
1439
- ({ className, ...props }, ref) => {
1440
- const { formDescriptionId } = useFormField();
1441
- return /* @__PURE__ */ jsx19("p", { ref, id: formDescriptionId, className: cn("text-muted-foreground text-[0.8rem]", className), ...props });
1442
- }
1443
- );
1444
- FormDescription.displayName = "FormDescription";
1445
- var FormMessage = React16.forwardRef(
1446
- ({ className, children, ...props }, ref) => {
1447
- const { error, formMessageId } = useFormField();
1448
- const body = error ? String(error?.message) : children;
1449
- if (!body) {
1450
- return null;
1451
- }
1452
- return /* @__PURE__ */ jsx19(
1453
- "p",
1454
- {
1455
- ref,
1456
- id: formMessageId,
1457
- className: cn("text-destructive text-[0.8rem] font-medium", className),
1458
- ...props,
1459
- children: body
1460
- }
1461
- );
1462
- }
1463
- );
1464
- FormMessage.displayName = "FormMessage";
1465
-
1466
- // src/shadcnui/ui/hover-card.tsx
1467
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
1468
- import * as React17 from "react";
1469
- import { jsx as jsx20 } from "react/jsx-runtime";
1470
- var HoverCard = HoverCardPrimitive.Root;
1471
- var HoverCardTrigger = HoverCardPrimitive.Trigger;
1472
- var HoverCardContent = React17.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx20(
1473
- HoverCardPrimitive.Content,
1474
- {
1475
- ref,
1476
- align,
1477
- sideOffset,
1478
- className: cn(
1479
- "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1480
- className
1481
- ),
1482
- ...props
1483
- }
1484
- ));
1485
- HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
1486
-
1487
- // src/shadcnui/ui/input.tsx
1488
- import { jsx as jsx21 } from "react/jsx-runtime";
1489
- function Input({ className, type, ...props }) {
1490
- return /* @__PURE__ */ jsx21(
1491
- "input",
1492
- {
1493
- type,
1494
- "data-slot": "input",
1495
- className: cn(
1496
- "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1497
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
1498
- "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
1499
- className
1500
- ),
1501
- ...props
1502
- }
1503
- );
1504
- }
1505
- __name(Input, "Input");
1506
-
1507
- // src/shadcnui/ui/navigation-menu.tsx
1508
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
1509
- import { cva as cva5 } from "class-variance-authority";
1510
- import { ChevronDownIcon as ChevronDownIcon2 } from "lucide-react";
1511
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
1512
- function NavigationMenu({
1513
- className,
1514
- children,
1515
- viewport = true,
1516
- ...props
1517
- }) {
1518
- return /* @__PURE__ */ jsxs11(
1519
- NavigationMenuPrimitive.Root,
1520
- {
1521
- "data-slot": "navigation-menu",
1522
- "data-viewport": viewport,
1523
- className: cn(
1524
- "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
1525
- className
1526
- ),
1527
- ...props,
1528
- children: [
1529
- children,
1530
- viewport && /* @__PURE__ */ jsx22(NavigationMenuViewport, {})
1531
- ]
1532
- }
1533
- );
1534
- }
1535
- __name(NavigationMenu, "NavigationMenu");
1536
- function NavigationMenuList({
1537
- className,
1538
- ...props
1539
- }) {
1540
- return /* @__PURE__ */ jsx22(
1541
- NavigationMenuPrimitive.List,
1542
- {
1543
- "data-slot": "navigation-menu-list",
1544
- className: cn(
1545
- "group flex flex-1 list-none items-center justify-center gap-1",
1546
- className
1547
- ),
1548
- ...props
1549
- }
1550
- );
1551
- }
1552
- __name(NavigationMenuList, "NavigationMenuList");
1553
- function NavigationMenuItem({
1554
- className,
1555
- ...props
1556
- }) {
1557
- return /* @__PURE__ */ jsx22(
1558
- NavigationMenuPrimitive.Item,
1559
- {
1560
- "data-slot": "navigation-menu-item",
1561
- className: cn("relative", className),
1562
- ...props
1563
- }
1564
- );
1565
- }
1566
- __name(NavigationMenuItem, "NavigationMenuItem");
1567
- var navigationMenuTriggerStyle = cva5(
1568
- "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
1569
- );
1570
- function NavigationMenuTrigger({
1571
- className,
1572
- children,
1573
- ...props
1574
- }) {
1575
- return /* @__PURE__ */ jsxs11(
1576
- NavigationMenuPrimitive.Trigger,
1577
- {
1578
- "data-slot": "navigation-menu-trigger",
1579
- className: cn(navigationMenuTriggerStyle(), "group", className),
1580
- ...props,
1581
- children: [
1582
- children,
1583
- " ",
1584
- /* @__PURE__ */ jsx22(
1585
- ChevronDownIcon2,
1586
- {
1587
- className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
1588
- "aria-hidden": "true"
1589
- }
1590
- )
1591
- ]
1592
- }
1593
- );
1594
- }
1595
- __name(NavigationMenuTrigger, "NavigationMenuTrigger");
1596
- function NavigationMenuContent({
1597
- className,
1598
- ...props
1599
- }) {
1600
- return /* @__PURE__ */ jsx22(
1601
- NavigationMenuPrimitive.Content,
1602
- {
1603
- "data-slot": "navigation-menu-content",
1604
- className: cn(
1605
- "data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
1606
- "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
1607
- className
1608
- ),
1609
- ...props
1610
- }
1611
- );
1612
- }
1613
- __name(NavigationMenuContent, "NavigationMenuContent");
1614
- function NavigationMenuViewport({
1615
- className,
1616
- ...props
1617
- }) {
1618
- return /* @__PURE__ */ jsx22(
1619
- "div",
1620
- {
1621
- className: cn(
1622
- "absolute top-full left-0 isolate z-50 flex justify-center"
1623
- ),
1624
- children: /* @__PURE__ */ jsx22(
1625
- NavigationMenuPrimitive.Viewport,
1626
- {
1627
- "data-slot": "navigation-menu-viewport",
1628
- className: cn(
1629
- "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
1630
- className
1631
- ),
1632
- ...props
1633
- }
1634
- )
1635
- }
1636
- );
1637
- }
1638
- __name(NavigationMenuViewport, "NavigationMenuViewport");
1639
- function NavigationMenuLink({
1640
- className,
1641
- ...props
1642
- }) {
1643
- return /* @__PURE__ */ jsx22(
1644
- NavigationMenuPrimitive.Link,
1645
- {
1646
- "data-slot": "navigation-menu-link",
1647
- className: cn(
1648
- "data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
1649
- className
1650
- ),
1651
- ...props
1652
- }
1653
- );
1654
- }
1655
- __name(NavigationMenuLink, "NavigationMenuLink");
1656
- function NavigationMenuIndicator({
1657
- className,
1658
- ...props
1659
- }) {
1660
- return /* @__PURE__ */ jsx22(
1661
- NavigationMenuPrimitive.Indicator,
1662
- {
1663
- "data-slot": "navigation-menu-indicator",
1664
- className: cn(
1665
- "data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
1666
- className
1667
- ),
1668
- ...props,
1669
- children: /* @__PURE__ */ jsx22("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
1670
- }
1671
- );
1672
- }
1673
- __name(NavigationMenuIndicator, "NavigationMenuIndicator");
1674
-
1675
- // src/shadcnui/ui/popover.tsx
1676
- import * as PopoverPrimitive from "@radix-ui/react-popover";
1677
- import * as React18 from "react";
1678
- import { jsx as jsx23 } from "react/jsx-runtime";
1679
- var Popover = PopoverPrimitive.Root;
1680
- var PopoverTrigger = PopoverPrimitive.Trigger;
1681
- var PopoverAnchor = PopoverPrimitive.Anchor;
1682
- var PopoverContent = React18.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx23(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx23(
1683
- PopoverPrimitive.Content,
1684
- {
1685
- ref,
1686
- align,
1687
- sideOffset,
1688
- className: cn(
1689
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1690
- className
1691
- ),
1692
- ...props
1693
- }
1694
- ) }));
1695
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1696
-
1697
- // src/shadcnui/ui/progress.tsx
1698
- import * as ProgressPrimitive from "@radix-ui/react-progress";
1699
- import * as React19 from "react";
1700
- import { jsx as jsx24 } from "react/jsx-runtime";
1701
- var Progress = React19.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx24(
1702
- ProgressPrimitive.Root,
1703
- {
1704
- ref,
1705
- className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
1706
- ...props,
1707
- children: /* @__PURE__ */ jsx24(
1708
- ProgressPrimitive.Indicator,
1709
- {
1710
- className: "h-full w-full flex-1 bg-primary transition-all",
1711
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
1712
- }
1713
- )
1714
- }
1715
- ));
1716
- Progress.displayName = ProgressPrimitive.Root.displayName;
1717
-
1718
- // src/shadcnui/ui/radio-group.tsx
1719
- import { DotFilledIcon as DotFilledIcon3 } from "@radix-ui/react-icons";
1720
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1721
- import * as React20 from "react";
1722
- import { jsx as jsx25 } from "react/jsx-runtime";
1723
- var RadioGroup3 = React20.forwardRef(({ className, ...props }, ref) => {
1724
- return /* @__PURE__ */ jsx25(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref });
1725
- });
1726
- RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
1727
- var RadioGroupItem = React20.forwardRef(({ className, ...props }, ref) => {
1728
- return /* @__PURE__ */ jsx25(
1729
- RadioGroupPrimitive.Item,
1730
- {
1731
- ref,
1732
- className: cn(
1733
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
1734
- className
1735
- ),
1736
- ...props,
1737
- children: /* @__PURE__ */ jsx25(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx25(DotFilledIcon3, { className: "h-3.5 w-3.5 fill-primary" }) })
1738
- }
1739
- );
1740
- });
1741
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
1742
-
1743
- // src/shadcnui/ui/resizable.tsx
1744
- import { GripVerticalIcon } from "lucide-react";
1745
- import * as ResizablePrimitive from "react-resizable-panels";
1746
- import { jsx as jsx26 } from "react/jsx-runtime";
1747
- function ResizablePanelGroup({ className, ...props }) {
1748
- return /* @__PURE__ */ jsx26(
1749
- ResizablePrimitive.PanelGroup,
1750
- {
1751
- "data-slot": "resizable-panel-group",
1752
- className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
1753
- ...props
1754
- }
1755
- );
1756
- }
1757
- __name(ResizablePanelGroup, "ResizablePanelGroup");
1758
- function ResizablePanel({ ...props }) {
1759
- return /* @__PURE__ */ jsx26(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
1760
- }
1761
- __name(ResizablePanel, "ResizablePanel");
1762
- function ResizableHandle({
1763
- withHandle,
1764
- className,
1765
- ...props
1766
- }) {
1767
- return /* @__PURE__ */ jsx26(
1768
- ResizablePrimitive.PanelResizeHandle,
1769
- {
1770
- "data-slot": "resizable-handle",
1771
- className: cn(
1772
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
1773
- className
1774
- ),
1775
- ...props,
1776
- children: withHandle && /* @__PURE__ */ jsx26("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx26(GripVerticalIcon, { className: "size-2.5" }) })
1777
- }
1778
- );
1779
- }
1780
- __name(ResizableHandle, "ResizableHandle");
1781
-
1782
- // src/shadcnui/ui/scroll-area.tsx
1783
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
1784
- import * as React21 from "react";
1785
- import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
1786
- var ScrollArea = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(ScrollAreaPrimitive.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
1787
- /* @__PURE__ */ jsx27(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
1788
- /* @__PURE__ */ jsx27(ScrollBar, {}),
1789
- /* @__PURE__ */ jsx27(ScrollAreaPrimitive.Corner, {})
1790
- ] }));
1791
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1792
- var ScrollBar = React21.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx27(
1793
- ScrollAreaPrimitive.ScrollAreaScrollbar,
1794
- {
1795
- ref,
1796
- orientation,
1797
- className: cn(
1798
- "flex touch-none select-none transition-colors",
1799
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
1800
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
1801
- className
1802
- ),
1803
- ...props,
1804
- children: /* @__PURE__ */ jsx27(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1805
- }
1806
- ));
1807
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
1808
-
1809
- // src/shadcnui/ui/select.tsx
1810
- import {
1811
- CaretSortIcon,
1812
- CheckIcon as CheckIcon4,
1813
- ChevronDownIcon as ChevronDownIcon3,
1814
- ChevronUpIcon
1815
- } from "@radix-ui/react-icons";
1816
- import * as SelectPrimitive from "@radix-ui/react-select";
1817
- import * as React22 from "react";
1818
- import { jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
1819
- var Select = SelectPrimitive.Root;
1820
- var SelectGroup = SelectPrimitive.Group;
1821
- var SelectValue = SelectPrimitive.Value;
1822
- var SelectTrigger = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
1823
- SelectPrimitive.Trigger,
1824
- {
1825
- ref,
1826
- className: cn(
1827
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
1828
- className
1829
- ),
1830
- ...props,
1831
- children: [
1832
- children,
1833
- /* @__PURE__ */ jsx28(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx28(CaretSortIcon, { className: "h-4 w-4 opacity-50" }) })
1834
- ]
1835
- }
1836
- ));
1837
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
1838
- var SelectScrollUpButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
1839
- SelectPrimitive.ScrollUpButton,
1840
- {
1841
- ref,
1842
- className: cn(
1843
- "flex cursor-default items-center justify-center py-1",
1844
- className
1845
- ),
1846
- ...props,
1847
- children: /* @__PURE__ */ jsx28(ChevronUpIcon, {})
1848
- }
1849
- ));
1850
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
1851
- var SelectScrollDownButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
1852
- SelectPrimitive.ScrollDownButton,
1853
- {
1854
- ref,
1855
- className: cn(
1856
- "flex cursor-default items-center justify-center py-1",
1857
- className
1858
- ),
1859
- ...props,
1860
- children: /* @__PURE__ */ jsx28(ChevronDownIcon3, {})
1861
- }
1862
- ));
1863
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
1864
- var SelectContent = React22.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx28(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs13(
1865
- SelectPrimitive.Content,
1866
- {
1867
- ref,
1868
- className: cn(
1869
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1870
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1871
- className
1872
- ),
1873
- position,
1874
- ...props,
1875
- children: [
1876
- /* @__PURE__ */ jsx28(SelectScrollUpButton, {}),
1877
- /* @__PURE__ */ jsx28(
1878
- SelectPrimitive.Viewport,
1879
- {
1880
- className: cn(
1881
- "p-1",
1882
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
1883
- ),
1884
- children
1885
- }
1886
- ),
1887
- /* @__PURE__ */ jsx28(SelectScrollDownButton, {})
1888
- ]
1889
- }
1890
- ) }));
1891
- SelectContent.displayName = SelectPrimitive.Content.displayName;
1892
- var SelectLabel = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
1893
- SelectPrimitive.Label,
1894
- {
1895
- ref,
1896
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
1897
- ...props
1898
- }
1899
- ));
1900
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
1901
- var SelectItem = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
1902
- SelectPrimitive.Item,
1903
- {
1904
- ref,
1905
- className: cn(
1906
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1907
- className
1908
- ),
1909
- ...props,
1910
- children: [
1911
- /* @__PURE__ */ jsx28("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(CheckIcon4, { className: "h-4 w-4" }) }) }),
1912
- /* @__PURE__ */ jsx28(SelectPrimitive.ItemText, { children })
1913
- ]
1914
- }
1915
- ));
1916
- SelectItem.displayName = SelectPrimitive.Item.displayName;
1917
- var SelectSeparator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
1918
- SelectPrimitive.Separator,
1919
- {
1920
- ref,
1921
- className: cn("-mx-1 my-1 h-px bg-muted", className),
1922
- ...props
1923
- }
1924
- ));
1925
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1926
-
1927
- // src/shadcnui/ui/separator.tsx
1928
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
1929
- import { jsx as jsx29 } from "react/jsx-runtime";
1930
- function Separator4({
1931
- className,
1932
- orientation = "horizontal",
1933
- decorative = true,
1934
- ...props
1935
- }) {
1936
- return /* @__PURE__ */ jsx29(
1937
- SeparatorPrimitive.Root,
1938
- {
1939
- "data-slot": "separator",
1940
- decorative,
1941
- orientation,
1942
- className: cn(
1943
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
1944
- className
1945
- ),
1946
- ...props
1947
- }
1948
- );
1949
- }
1950
- __name(Separator4, "Separator");
1951
-
1952
- // src/shadcnui/ui/sheet.tsx
1953
- import * as SheetPrimitive from "@radix-ui/react-dialog";
1954
- import { XIcon } from "lucide-react";
1955
- import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
1956
- function Sheet({ ...props }) {
1957
- return /* @__PURE__ */ jsx30(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
1958
- }
1959
- __name(Sheet, "Sheet");
1960
- function SheetTrigger({
1961
- ...props
1962
- }) {
1963
- return /* @__PURE__ */ jsx30(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
1964
- }
1965
- __name(SheetTrigger, "SheetTrigger");
1966
- function SheetClose({
1967
- ...props
1968
- }) {
1969
- return /* @__PURE__ */ jsx30(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
1970
- }
1971
- __name(SheetClose, "SheetClose");
1972
- function SheetPortal({
1973
- ...props
1974
- }) {
1975
- return /* @__PURE__ */ jsx30(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
1976
- }
1977
- __name(SheetPortal, "SheetPortal");
1978
- function SheetOverlay({
1979
- className,
1980
- ...props
1981
- }) {
1982
- return /* @__PURE__ */ jsx30(
1983
- SheetPrimitive.Overlay,
1984
- {
1985
- "data-slot": "sheet-overlay",
1986
- className: cn(
1987
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1988
- className
1989
- ),
1990
- ...props
1991
- }
1992
- );
1993
- }
1994
- __name(SheetOverlay, "SheetOverlay");
1995
- function SheetContent({
1996
- className,
1997
- children,
1998
- side = "right",
1999
- ...props
2000
- }) {
2001
- return /* @__PURE__ */ jsxs14(SheetPortal, { children: [
2002
- /* @__PURE__ */ jsx30(SheetOverlay, {}),
2003
- /* @__PURE__ */ jsxs14(
2004
- SheetPrimitive.Content,
2005
- {
2006
- "data-slot": "sheet-content",
2007
- className: cn(
2008
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
2009
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
2010
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
2011
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
2012
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
2013
- className
2014
- ),
2015
- ...props,
2016
- children: [
2017
- children,
2018
- /* @__PURE__ */ jsxs14(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2019
- /* @__PURE__ */ jsx30(XIcon, { className: "size-4" }),
2020
- /* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Close" })
2021
- ] })
2022
- ]
2023
- }
2024
- )
2025
- ] });
2026
- }
2027
- __name(SheetContent, "SheetContent");
2028
- function SheetHeader({ className, ...props }) {
2029
- return /* @__PURE__ */ jsx30(
2030
- "div",
2031
- {
2032
- "data-slot": "sheet-header",
2033
- className: cn("flex flex-col gap-1.5 p-4", className),
2034
- ...props
2035
- }
2036
- );
2037
- }
2038
- __name(SheetHeader, "SheetHeader");
2039
- function SheetFooter({ className, ...props }) {
2040
- return /* @__PURE__ */ jsx30(
2041
- "div",
2042
- {
2043
- "data-slot": "sheet-footer",
2044
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
2045
- ...props
2046
- }
2047
- );
2048
- }
2049
- __name(SheetFooter, "SheetFooter");
2050
- function SheetTitle({
2051
- className,
2052
- ...props
2053
- }) {
2054
- return /* @__PURE__ */ jsx30(
2055
- SheetPrimitive.Title,
2056
- {
2057
- "data-slot": "sheet-title",
2058
- className: cn("text-foreground font-semibold", className),
2059
- ...props
2060
- }
2061
- );
2062
- }
2063
- __name(SheetTitle, "SheetTitle");
2064
- function SheetDescription({
2065
- className,
2066
- ...props
2067
- }) {
2068
- return /* @__PURE__ */ jsx30(
2069
- SheetPrimitive.Description,
2070
- {
2071
- "data-slot": "sheet-description",
2072
- className: cn("text-muted-foreground text-sm", className),
2073
- ...props
2074
- }
2075
- );
2076
- }
2077
- __name(SheetDescription, "SheetDescription");
2078
-
2079
- // src/shadcnui/ui/sidebar.tsx
2080
- import { Slot as Slot4 } from "@radix-ui/react-slot";
2081
- import { cva as cva6 } from "class-variance-authority";
2082
- import { PanelLeftIcon } from "lucide-react";
2083
- import * as React23 from "react";
2084
-
2085
- // src/shadcnui/ui/skeleton.tsx
2086
- import { jsx as jsx31 } from "react/jsx-runtime";
2087
- function Skeleton({ className, ...props }) {
2088
- return /* @__PURE__ */ jsx31(
2089
- "div",
2090
- {
2091
- "data-slot": "skeleton",
2092
- className: cn("bg-accent animate-pulse rounded-md", className),
2093
- ...props
2094
- }
2095
- );
2096
- }
2097
- __name(Skeleton, "Skeleton");
2098
-
2099
- // src/shadcnui/ui/tooltip.tsx
2100
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2101
- import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
2102
- function TooltipProvider({
2103
- delayDuration = 0,
2104
- ...props
2105
- }) {
2106
- return /* @__PURE__ */ jsx32(
2107
- TooltipPrimitive.Provider,
2108
- {
2109
- "data-slot": "tooltip-provider",
2110
- delayDuration,
2111
- ...props
2112
- }
2113
- );
2114
- }
2115
- __name(TooltipProvider, "TooltipProvider");
2116
- function Tooltip2({
2117
- ...props
2118
- }) {
2119
- return /* @__PURE__ */ jsx32(TooltipProvider, { children: /* @__PURE__ */ jsx32(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
2120
- }
2121
- __name(Tooltip2, "Tooltip");
2122
- function TooltipTrigger({
2123
- ...props
2124
- }) {
2125
- return /* @__PURE__ */ jsx32(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
2126
- }
2127
- __name(TooltipTrigger, "TooltipTrigger");
2128
- function TooltipContent({
2129
- className,
2130
- sideOffset = 0,
2131
- children,
2132
- ...props
2133
- }) {
2134
- return /* @__PURE__ */ jsx32(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs15(
2135
- TooltipPrimitive.Content,
2136
- {
2137
- "data-slot": "tooltip-content",
2138
- sideOffset,
2139
- className: cn(
2140
- "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
2141
- className
2142
- ),
2143
- ...props,
2144
- children: [
2145
- children,
2146
- /* @__PURE__ */ jsx32(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
2147
- ]
2148
- }
2149
- ) });
2150
- }
2151
- __name(TooltipContent, "TooltipContent");
2152
-
2153
- // src/shadcnui/ui/sidebar.tsx
2154
- import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
2155
- var SIDEBAR_COOKIE_NAME = "sidebar_state";
2156
- var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
2157
- var SIDEBAR_WIDTH = "16rem";
2158
- var SIDEBAR_WIDTH_MOBILE = "18rem";
2159
- var SIDEBAR_WIDTH_ICON = "3rem";
2160
- var SIDEBAR_KEYBOARD_SHORTCUT = "";
2161
- var SidebarContext = React23.createContext(null);
2162
- function useSidebar() {
2163
- const context = React23.useContext(SidebarContext);
2164
- if (!context) {
2165
- throw new Error("useSidebar must be used within a SidebarProvider.");
2166
- }
2167
- return context;
2168
- }
2169
- __name(useSidebar, "useSidebar");
2170
- function SidebarProvider({
2171
- defaultOpen = true,
2172
- open: openProp,
2173
- onOpenChange: setOpenProp,
2174
- className,
2175
- style,
2176
- children,
2177
- ...props
2178
- }) {
2179
- const isMobile = useIsMobile();
2180
- const [openMobile, setOpenMobile] = React23.useState(false);
2181
- const [_open, _setOpen] = React23.useState(defaultOpen);
2182
- const open = openProp ?? _open;
2183
- const setOpen = React23.useCallback(
2184
- (value) => {
2185
- const openState = typeof value === "function" ? value(open) : value;
2186
- if (setOpenProp) {
2187
- setOpenProp(openState);
2188
- } else {
2189
- _setOpen(openState);
2190
- }
2191
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
2192
- },
2193
- [setOpenProp, open]
2194
- );
2195
- const toggleSidebar = React23.useCallback(() => {
2196
- return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
2197
- }, [isMobile, setOpen, setOpenMobile]);
2198
- React23.useEffect(() => {
2199
- const handleKeyDown = /* @__PURE__ */ __name((event) => {
2200
- if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
2201
- event.preventDefault();
2202
- toggleSidebar();
2203
- }
2204
- }, "handleKeyDown");
2205
- window.addEventListener("keydown", handleKeyDown);
2206
- return () => window.removeEventListener("keydown", handleKeyDown);
2207
- }, [toggleSidebar]);
2208
- const state = open ? "expanded" : "collapsed";
2209
- const contextValue = React23.useMemo(
2210
- () => ({
2211
- state,
2212
- open,
2213
- setOpen,
2214
- isMobile,
2215
- openMobile,
2216
- setOpenMobile,
2217
- toggleSidebar
2218
- }),
2219
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
2220
- );
2221
- return /* @__PURE__ */ jsx33(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx33(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx33(
2222
- "div",
2223
- {
2224
- "data-slot": "sidebar-wrapper",
2225
- style: {
2226
- "--sidebar-width": SIDEBAR_WIDTH,
2227
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
2228
- ...style
2229
- },
2230
- className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className),
2231
- ...props,
2232
- children
2233
- }
2234
- ) }) });
2235
- }
2236
- __name(SidebarProvider, "SidebarProvider");
2237
- function Sidebar({
2238
- side = "left",
2239
- variant = "sidebar",
2240
- collapsible = "offcanvas",
2241
- className,
2242
- children,
2243
- ...props
2244
- }) {
2245
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
2246
- if (collapsible === "none") {
2247
- return /* @__PURE__ */ jsx33(
2248
- "div",
2249
- {
2250
- "data-slot": "sidebar",
2251
- className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
2252
- ...props,
2253
- children
2254
- }
2255
- );
2256
- }
2257
- if (isMobile) {
2258
- return /* @__PURE__ */ jsx33(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs16(
2259
- SheetContent,
2260
- {
2261
- "data-sidebar": "sidebar",
2262
- "data-slot": "sidebar",
2263
- "data-mobile": "true",
2264
- className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
2265
- style: {
2266
- "--sidebar-width": SIDEBAR_WIDTH_MOBILE
2267
- },
2268
- side,
2269
- children: [
2270
- /* @__PURE__ */ jsxs16(SheetHeader, { className: "sr-only", children: [
2271
- /* @__PURE__ */ jsx33(SheetTitle, { children: "Sidebar" }),
2272
- /* @__PURE__ */ jsx33(SheetDescription, { children: "Displays the mobile sidebar." })
2273
- ] }),
2274
- /* @__PURE__ */ jsx33("div", { className: "flex h-full w-full flex-col", children })
2275
- ]
2276
- }
2277
- ) });
2278
- }
2279
- return /* @__PURE__ */ jsxs16(
2280
- "div",
2281
- {
2282
- className: "group peer text-sidebar-foreground hidden md:block",
2283
- "data-state": state,
2284
- "data-collapsible": state === "collapsed" ? collapsible : "",
2285
- "data-variant": variant,
2286
- "data-side": side,
2287
- "data-slot": "sidebar",
2288
- children: [
2289
- /* @__PURE__ */ jsx33(
2290
- "div",
2291
- {
2292
- "data-slot": "sidebar-gap",
2293
- className: cn(
2294
- "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
2295
- "group-data-[collapsible=offcanvas]:w-0",
2296
- "group-data-[side=right]:rotate-180",
2297
- variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
2298
- )
2299
- }
2300
- ),
2301
- /* @__PURE__ */ jsx33(
2302
- "div",
2303
- {
2304
- "data-slot": "sidebar-container",
2305
- className: cn(
2306
- "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
2307
- side === "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)]",
2308
- // Adjust the padding for floating and inset variants.
2309
- variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
2310
- className
2311
- ),
2312
- ...props,
2313
- children: /* @__PURE__ */ jsx33(
2314
- "div",
2315
- {
2316
- "data-sidebar": "sidebar",
2317
- "data-slot": "sidebar-inner",
2318
- className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
2319
- children
2320
- }
2321
- )
2322
- }
2323
- )
2324
- ]
2325
- }
2326
- );
2327
- }
2328
- __name(Sidebar, "Sidebar");
2329
- function SidebarTrigger({ className, onClick, ...props }) {
2330
- const { toggleSidebar } = useSidebar();
2331
- return /* @__PURE__ */ jsxs16(
2332
- Button,
2333
- {
2334
- "data-sidebar": "trigger",
2335
- "data-slot": "sidebar-trigger",
2336
- variant: "ghost",
2337
- size: "icon",
2338
- className: cn("size-7", className),
2339
- onClick: (event) => {
2340
- onClick?.(event);
2341
- toggleSidebar();
2342
- },
2343
- ...props,
2344
- children: [
2345
- /* @__PURE__ */ jsx33(PanelLeftIcon, {}),
2346
- /* @__PURE__ */ jsx33("span", { className: "sr-only", children: "Toggle Sidebar" })
2347
- ]
2348
- }
2349
- );
2350
- }
2351
- __name(SidebarTrigger, "SidebarTrigger");
2352
- function SidebarRail({ className, ...props }) {
2353
- const { toggleSidebar } = useSidebar();
2354
- return /* @__PURE__ */ jsx33(
2355
- "button",
2356
- {
2357
- "data-sidebar": "rail",
2358
- "data-slot": "sidebar-rail",
2359
- "aria-label": "Toggle Sidebar",
2360
- tabIndex: -1,
2361
- onClick: toggleSidebar,
2362
- title: "Toggle Sidebar",
2363
- className: cn(
2364
- "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
2365
- "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
2366
- "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
2367
- "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
2368
- "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
2369
- "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
2370
- className
2371
- ),
2372
- ...props
2373
- }
2374
- );
2375
- }
2376
- __name(SidebarRail, "SidebarRail");
2377
- function SidebarInset({ className, ...props }) {
2378
- return /* @__PURE__ */ jsx33(
2379
- "main",
2380
- {
2381
- "data-slot": "sidebar-inset",
2382
- className: cn(
2383
- "bg-background relative flex w-full flex-1 flex-col",
2384
- "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",
2385
- className
2386
- ),
2387
- ...props
2388
- }
2389
- );
2390
- }
2391
- __name(SidebarInset, "SidebarInset");
2392
- function SidebarInput({ className, ...props }) {
2393
- return /* @__PURE__ */ jsx33(
2394
- Input,
2395
- {
2396
- "data-slot": "sidebar-input",
2397
- "data-sidebar": "input",
2398
- className: cn("bg-background h-8 w-full shadow-none", className),
2399
- ...props
2400
- }
2401
- );
2402
- }
2403
- __name(SidebarInput, "SidebarInput");
2404
- function SidebarHeader({ className, ...props }) {
2405
- return /* @__PURE__ */ jsx33(
2406
- "div",
2407
- {
2408
- "data-slot": "sidebar-header",
2409
- "data-sidebar": "header",
2410
- className: cn("flex flex-col gap-2 p-2", className),
2411
- ...props
2412
- }
2413
- );
2414
- }
2415
- __name(SidebarHeader, "SidebarHeader");
2416
- function SidebarFooter({ className, ...props }) {
2417
- return /* @__PURE__ */ jsx33(
2418
- "div",
2419
- {
2420
- "data-slot": "sidebar-footer",
2421
- "data-sidebar": "footer",
2422
- className: cn("flex flex-col gap-2 p-2", className),
2423
- ...props
2424
- }
2425
- );
2426
- }
2427
- __name(SidebarFooter, "SidebarFooter");
2428
- function SidebarSeparator({ className, ...props }) {
2429
- return /* @__PURE__ */ jsx33(
2430
- Separator4,
2431
- {
2432
- "data-slot": "sidebar-separator",
2433
- "data-sidebar": "separator",
2434
- className: cn("bg-sidebar-border mx-2 w-auto", className),
2435
- ...props
2436
- }
2437
- );
2438
- }
2439
- __name(SidebarSeparator, "SidebarSeparator");
2440
- function SidebarContent({ className, ...props }) {
2441
- return /* @__PURE__ */ jsx33(
2442
- "div",
2443
- {
2444
- "data-slot": "sidebar-content",
2445
- "data-sidebar": "content",
2446
- className: cn(
2447
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
2448
- className
2449
- ),
2450
- ...props
2451
- }
2452
- );
2453
- }
2454
- __name(SidebarContent, "SidebarContent");
2455
- function SidebarGroup({ className, ...props }) {
2456
- return /* @__PURE__ */ jsx33(
2457
- "div",
2458
- {
2459
- "data-slot": "sidebar-group",
2460
- "data-sidebar": "group",
2461
- className: cn("relative flex w-full min-w-0 flex-col p-2", className),
2462
- ...props
2463
- }
2464
- );
2465
- }
2466
- __name(SidebarGroup, "SidebarGroup");
2467
- function SidebarGroupLabel({
2468
- className,
2469
- asChild = false,
2470
- ...props
2471
- }) {
2472
- const Comp = asChild ? Slot4 : "div";
2473
- return /* @__PURE__ */ jsx33(
2474
- Comp,
2475
- {
2476
- "data-slot": "sidebar-group-label",
2477
- "data-sidebar": "group-label",
2478
- className: cn(
2479
- "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2480
- "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
2481
- className
2482
- ),
2483
- ...props
2484
- }
2485
- );
2486
- }
2487
- __name(SidebarGroupLabel, "SidebarGroupLabel");
2488
- function SidebarGroupAction({
2489
- className,
2490
- asChild = false,
2491
- ...props
2492
- }) {
2493
- const Comp = asChild ? Slot4 : "button";
2494
- return /* @__PURE__ */ jsx33(
2495
- Comp,
2496
- {
2497
- "data-slot": "sidebar-group-action",
2498
- "data-sidebar": "group-action",
2499
- className: cn(
2500
- "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2501
- // Increases the hit area of the button on mobile.
2502
- "after:absolute after:-inset-2 md:after:hidden",
2503
- "group-data-[collapsible=icon]:hidden",
2504
- className
2505
- ),
2506
- ...props
2507
- }
2508
- );
2509
- }
2510
- __name(SidebarGroupAction, "SidebarGroupAction");
2511
- function SidebarGroupContent({ className, ...props }) {
2512
- return /* @__PURE__ */ jsx33(
2513
- "div",
2514
- {
2515
- "data-slot": "sidebar-group-content",
2516
- "data-sidebar": "group-content",
2517
- className: cn("w-full text-sm", className),
2518
- ...props
2519
- }
2520
- );
2521
- }
2522
- __name(SidebarGroupContent, "SidebarGroupContent");
2523
- function SidebarMenu({ className, ...props }) {
2524
- return /* @__PURE__ */ jsx33(
2525
- "ul",
2526
- {
2527
- "data-slot": "sidebar-menu",
2528
- "data-sidebar": "menu",
2529
- className: cn("flex w-full min-w-0 flex-col gap-1", className),
2530
- ...props
2531
- }
2532
- );
2533
- }
2534
- __name(SidebarMenu, "SidebarMenu");
2535
- function SidebarMenuItem({ className, ...props }) {
2536
- return /* @__PURE__ */ jsx33(
2537
- "li",
2538
- {
2539
- "data-slot": "sidebar-menu-item",
2540
- "data-sidebar": "menu-item",
2541
- className: cn("group/menu-item relative", className),
2542
- ...props
2543
- }
2544
- );
2545
- }
2546
- __name(SidebarMenuItem, "SidebarMenuItem");
2547
- var sidebarMenuButtonVariants = cva6(
2548
- "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
2549
- {
2550
- variants: {
2551
- variant: {
2552
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
2553
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
2554
- },
2555
- size: {
2556
- default: "h-8 text-sm",
2557
- sm: "h-7 text-xs",
2558
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
2559
- }
2560
- },
2561
- defaultVariants: {
2562
- variant: "default",
2563
- size: "default"
2564
- }
2565
- }
2566
- );
2567
- function SidebarMenuButton({
2568
- asChild = false,
2569
- isActive = false,
2570
- variant = "default",
2571
- size = "default",
2572
- tooltip,
2573
- className,
2574
- ...props
2575
- }) {
2576
- const Comp = asChild ? Slot4 : "button";
2577
- const { isMobile, state } = useSidebar();
2578
- const button = /* @__PURE__ */ jsx33(
2579
- Comp,
2580
- {
2581
- "data-slot": "sidebar-menu-button",
2582
- "data-sidebar": "menu-button",
2583
- "data-size": size,
2584
- "data-active": isActive,
2585
- className: cn(sidebarMenuButtonVariants({ variant, size }), className),
2586
- ...props
2587
- }
2588
- );
2589
- if (!tooltip) {
2590
- return button;
2591
- }
2592
- if (typeof tooltip === "string") {
2593
- tooltip = {
2594
- children: tooltip
2595
- };
2596
- }
2597
- return /* @__PURE__ */ jsxs16(Tooltip2, { children: [
2598
- /* @__PURE__ */ jsx33(TooltipTrigger, { asChild: true, children: button }),
2599
- /* @__PURE__ */ jsx33(TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })
2600
- ] });
2601
- }
2602
- __name(SidebarMenuButton, "SidebarMenuButton");
2603
- function SidebarMenuAction({
2604
- className,
2605
- asChild = false,
2606
- showOnHover = false,
2607
- ...props
2608
- }) {
2609
- const Comp = asChild ? Slot4 : "button";
2610
- return /* @__PURE__ */ jsx33(
2611
- Comp,
2612
- {
2613
- "data-slot": "sidebar-menu-action",
2614
- "data-sidebar": "menu-action",
2615
- className: cn(
2616
- "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 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2617
- // Increases the hit area of the button on mobile.
2618
- "after:absolute after:-inset-2 md:after:hidden",
2619
- "peer-data-[size=sm]/menu-button:top-1",
2620
- "peer-data-[size=default]/menu-button:top-1.5",
2621
- "peer-data-[size=lg]/menu-button:top-2.5",
2622
- "group-data-[collapsible=icon]:hidden",
2623
- showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
2624
- className
2625
- ),
2626
- ...props
2627
- }
2628
- );
2629
- }
2630
- __name(SidebarMenuAction, "SidebarMenuAction");
2631
- function SidebarMenuBadge({ className, ...props }) {
2632
- return /* @__PURE__ */ jsx33(
2633
- "div",
2634
- {
2635
- "data-slot": "sidebar-menu-badge",
2636
- "data-sidebar": "menu-badge",
2637
- className: cn(
2638
- "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
2639
- "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
2640
- "peer-data-[size=sm]/menu-button:top-1",
2641
- "peer-data-[size=default]/menu-button:top-1.5",
2642
- "peer-data-[size=lg]/menu-button:top-2.5",
2643
- "group-data-[collapsible=icon]:hidden",
2644
- className
2645
- ),
2646
- ...props
2647
- }
2648
- );
2649
- }
2650
- __name(SidebarMenuBadge, "SidebarMenuBadge");
2651
- function SidebarMenuSkeleton({
2652
- className,
2653
- showIcon = false,
2654
- ...props
2655
- }) {
2656
- const width = React23.useMemo(() => {
2657
- return `${Math.floor(Math.random() * 40) + 50}%`;
2658
- }, []);
2659
- return /* @__PURE__ */ jsxs16(
2660
- "div",
2661
- {
2662
- "data-slot": "sidebar-menu-skeleton",
2663
- "data-sidebar": "menu-skeleton",
2664
- className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
2665
- ...props,
2666
- children: [
2667
- showIcon && /* @__PURE__ */ jsx33(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
2668
- /* @__PURE__ */ jsx33(
2669
- Skeleton,
2670
- {
2671
- className: "h-4 max-w-(--skeleton-width) flex-1",
2672
- "data-sidebar": "menu-skeleton-text",
2673
- style: {
2674
- "--skeleton-width": width
2675
- }
2676
- }
2677
- )
2678
- ]
2679
- }
2680
- );
2681
- }
2682
- __name(SidebarMenuSkeleton, "SidebarMenuSkeleton");
2683
- function SidebarMenuSub({ className, ...props }) {
2684
- return /* @__PURE__ */ jsx33(
2685
- "ul",
2686
- {
2687
- "data-slot": "sidebar-menu-sub",
2688
- "data-sidebar": "menu-sub",
2689
- className: cn(
2690
- "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
2691
- "group-data-[collapsible=icon]:hidden",
2692
- className
2693
- ),
2694
- ...props
2695
- }
2696
- );
2697
- }
2698
- __name(SidebarMenuSub, "SidebarMenuSub");
2699
- function SidebarMenuSubItem({ className, ...props }) {
2700
- return /* @__PURE__ */ jsx33(
2701
- "li",
2702
- {
2703
- "data-slot": "sidebar-menu-sub-item",
2704
- "data-sidebar": "menu-sub-item",
2705
- className: cn("group/menu-sub-item relative", className),
2706
- ...props
2707
- }
2708
- );
2709
- }
2710
- __name(SidebarMenuSubItem, "SidebarMenuSubItem");
2711
- function SidebarMenuSubButton({
2712
- asChild = false,
2713
- size = "md",
2714
- isActive = false,
2715
- className,
2716
- ...props
2717
- }) {
2718
- const Comp = asChild ? Slot4 : "a";
2719
- return /* @__PURE__ */ jsx33(
2720
- Comp,
2721
- {
2722
- "data-slot": "sidebar-menu-sub-button",
2723
- "data-sidebar": "menu-sub-button",
2724
- "data-size": size,
2725
- "data-active": isActive,
2726
- className: cn(
2727
- "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 flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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",
2728
- "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
2729
- size === "sm" && "text-xs",
2730
- size === "md" && "text-sm",
2731
- "group-data-[collapsible=icon]:hidden",
2732
- className
2733
- ),
2734
- ...props
2735
- }
2736
- );
2737
- }
2738
- __name(SidebarMenuSubButton, "SidebarMenuSubButton");
2739
-
2740
- // src/shadcnui/ui/slider.tsx
2741
- import * as SliderPrimitive from "@radix-ui/react-slider";
2742
- import * as React24 from "react";
2743
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
2744
- var Slider = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs17(
2745
- SliderPrimitive.Root,
2746
- {
2747
- ref,
2748
- className: cn("relative flex w-full touch-none select-none items-center", className),
2749
- ...props,
2750
- children: [
2751
- /* @__PURE__ */ jsx34(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx34(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
2752
- /* @__PURE__ */ jsx34(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
2753
- ]
2754
- }
2755
- ));
2756
- Slider.displayName = SliderPrimitive.Root.displayName;
2757
-
2758
- // src/shadcnui/ui/sonner.tsx
2759
- import { useTheme } from "next-themes";
2760
- import { Toaster as Sonner } from "sonner";
2761
- import { jsx as jsx35 } from "react/jsx-runtime";
2762
- var Toaster = /* @__PURE__ */ __name(({ ...props }) => {
2763
- const { theme = "system" } = useTheme();
2764
- return /* @__PURE__ */ jsx35(
2765
- Sonner,
2766
- {
2767
- theme,
2768
- className: "toaster group",
2769
- style: {
2770
- "--normal-bg": "var(--popover)",
2771
- "--normal-text": "var(--popover-foreground)",
2772
- "--normal-border": "var(--border)"
2773
- },
2774
- ...props
2775
- }
2776
- );
2777
- }, "Toaster");
2778
-
2779
- // src/shadcnui/ui/switch.tsx
2780
- import * as SwitchPrimitives from "@radix-ui/react-switch";
2781
- import * as React25 from "react";
2782
- import { jsx as jsx36 } from "react/jsx-runtime";
2783
- var Switch = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx36(
2784
- SwitchPrimitives.Root,
2785
- {
2786
- className: cn(
2787
- "bg-accent focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-accent peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2788
- className
2789
- ),
2790
- ...props,
2791
- ref,
2792
- children: /* @__PURE__ */ jsx36(
2793
- SwitchPrimitives.Thumb,
2794
- {
2795
- className: cn(
2796
- "text-title pointer-events-none block flex h-5 w-5 items-center justify-center rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
2797
- ),
2798
- children
2799
- }
2800
- )
2801
- }
2802
- ));
2803
- Switch.displayName = SwitchPrimitives.Root.displayName;
2804
-
2805
- // src/shadcnui/ui/table.tsx
2806
- import * as React26 from "react";
2807
- import { jsx as jsx37 } from "react/jsx-runtime";
2808
- var Table = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx37(
2809
- "table",
2810
- {
2811
- ref,
2812
- className: cn("w-full caption-bottom text-sm", className),
2813
- ...props
2814
- }
2815
- ) }));
2816
- Table.displayName = "Table";
2817
- var TableHeader = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
2818
- TableHeader.displayName = "TableHeader";
2819
- var TableBody = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2820
- "tbody",
2821
- {
2822
- ref,
2823
- className: cn("[&_tr:last-child]:border-0", className),
2824
- ...props
2825
- }
2826
- ));
2827
- TableBody.displayName = "TableBody";
2828
- var TableFooter = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2829
- "tfoot",
2830
- {
2831
- ref,
2832
- className: cn(
2833
- "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
2834
- className
2835
- ),
2836
- ...props
2837
- }
2838
- ));
2839
- TableFooter.displayName = "TableFooter";
2840
- var TableRow = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2841
- "tr",
2842
- {
2843
- ref,
2844
- className: cn(
2845
- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
2846
- className
2847
- ),
2848
- ...props
2849
- }
2850
- ));
2851
- TableRow.displayName = "TableRow";
2852
- var TableHead = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2853
- "th",
2854
- {
2855
- ref,
2856
- className: cn(
2857
- "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
2858
- className
2859
- ),
2860
- ...props
2861
- }
2862
- ));
2863
- TableHead.displayName = "TableHead";
2864
- var TableCell = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2865
- "td",
2866
- {
2867
- ref,
2868
- className: cn(
2869
- "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
2870
- className
2871
- ),
2872
- ...props
2873
- }
2874
- ));
2875
- TableCell.displayName = "TableCell";
2876
- var TableCaption = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
2877
- "caption",
2878
- {
2879
- ref,
2880
- className: cn("mt-4 text-sm text-muted-foreground", className),
2881
- ...props
2882
- }
2883
- ));
2884
- TableCaption.displayName = "TableCaption";
2885
-
2886
- // src/shadcnui/ui/tabs.tsx
2887
- import * as TabsPrimitive from "@radix-ui/react-tabs";
2888
- import * as React27 from "react";
2889
- import { jsx as jsx38 } from "react/jsx-runtime";
2890
- var Tabs = TabsPrimitive.Root;
2891
- var TabsList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2892
- TabsPrimitive.List,
2893
- {
2894
- ref,
2895
- className: cn(
2896
- "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
2897
- className
2898
- ),
2899
- ...props
2900
- }
2901
- ));
2902
- TabsList.displayName = TabsPrimitive.List.displayName;
2903
- var TabsTrigger = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2904
- TabsPrimitive.Trigger,
2905
- {
2906
- ref,
2907
- className: cn(
2908
- "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
2909
- className
2910
- ),
2911
- ...props
2912
- }
2913
- ));
2914
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
2915
- var TabsContent = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
2916
- TabsPrimitive.Content,
2917
- {
2918
- ref,
2919
- className: cn(
2920
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2921
- className
2922
- ),
2923
- ...props
2924
- }
2925
- ));
2926
- TabsContent.displayName = TabsPrimitive.Content.displayName;
2927
-
2928
- // src/shadcnui/ui/textarea.tsx
2929
- import * as React28 from "react";
2930
- import { jsx as jsx39 } from "react/jsx-runtime";
2931
- var Textarea = React28.forwardRef(
2932
- ({ className, ...props }, ref) => {
2933
- return /* @__PURE__ */ jsx39(
2934
- "textarea",
2935
- {
2936
- className: cn(
2937
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2938
- className
2939
- ),
2940
- ref,
2941
- ...props
2942
- }
2943
- );
2944
- }
2945
- );
2946
- Textarea.displayName = "Textarea";
2947
-
2948
- // src/shadcnui/ui/toggle.tsx
2949
- import * as TogglePrimitive from "@radix-ui/react-toggle";
2950
- import { cva as cva7 } from "class-variance-authority";
2951
- import * as React29 from "react";
2952
- import { jsx as jsx40 } from "react/jsx-runtime";
2953
- var toggleVariants = cva7(
2954
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
2955
- {
2956
- variants: {
2957
- variant: {
2958
- default: "bg-transparent",
2959
- outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
2960
- },
2961
- size: {
2962
- default: "h-9 px-2 min-w-9",
2963
- sm: "h-8 px-1.5 min-w-8",
2964
- lg: "h-10 px-2.5 min-w-10"
2965
- }
2966
- },
2967
- defaultVariants: {
2968
- variant: "default",
2969
- size: "default"
2970
- }
2971
- }
2972
- );
2973
- var Toggle = React29.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx40(TogglePrimitive.Root, { ref, className: cn(toggleVariants({ variant, size, className })), ...props }));
2974
- Toggle.displayName = TogglePrimitive.Root.displayName;
2975
-
2976
- // src/shadcnui/custom/kanban.tsx
2977
- import {
2978
- DndContext,
2979
- DragOverlay,
2980
- KeyboardCode,
2981
- KeyboardSensor,
2982
- MeasuringStrategy,
2983
- MouseSensor,
2984
- TouchSensor,
2985
- closestCenter,
2986
- closestCorners,
2987
- defaultDropAnimationSideEffects,
2988
- getFirstCollision,
2989
- pointerWithin,
2990
- rectIntersection,
2991
- useSensor,
2992
- useSensors
2993
- } from "@dnd-kit/core";
2994
- import {
2995
- SortableContext,
2996
- arrayMove,
2997
- defaultAnimateLayoutChanges,
2998
- horizontalListSortingStrategy,
2999
- useSortable,
3000
- verticalListSortingStrategy
3001
- } from "@dnd-kit/sortable";
3002
- import { CSS } from "@dnd-kit/utilities";
3003
- import { Slot as Slot5 } from "@radix-ui/react-slot";
3004
- import * as React30 from "react";
3005
- import * as ReactDOM from "react-dom";
3006
- import { jsx as jsx41 } from "react/jsx-runtime";
3007
- var directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
3008
- var coordinateGetter = /* @__PURE__ */ __name((event, { context }) => {
3009
- const { active, droppableRects, droppableContainers, collisionRect } = context;
3010
- if (directions.includes(event.code)) {
3011
- event.preventDefault();
3012
- if (!active || !collisionRect) return;
3013
- const filteredContainers = [];
3014
- for (const entry of droppableContainers.getEnabled()) {
3015
- if (!entry || entry?.disabled) return;
3016
- const rect = droppableRects.get(entry.id);
3017
- if (!rect) return;
3018
- const data = entry.data.current;
3019
- if (data) {
3020
- const { type, children } = data;
3021
- if (type === "container" && children?.length > 0) {
3022
- if (active.data.current?.type !== "container") {
3023
- return;
3024
- }
3025
- }
3026
- }
3027
- switch (event.code) {
3028
- case KeyboardCode.Down:
3029
- if (collisionRect.top < rect.top) {
3030
- filteredContainers.push(entry);
3031
- }
3032
- break;
3033
- case KeyboardCode.Up:
3034
- if (collisionRect.top > rect.top) {
3035
- filteredContainers.push(entry);
3036
- }
3037
- break;
3038
- case KeyboardCode.Left:
3039
- if (collisionRect.left >= rect.left + rect.width) {
3040
- filteredContainers.push(entry);
3041
- }
3042
- break;
3043
- case KeyboardCode.Right:
3044
- if (collisionRect.left + collisionRect.width <= rect.left) {
3045
- filteredContainers.push(entry);
3046
- }
3047
- break;
3048
- }
3049
- }
3050
- const collisions = closestCorners({
3051
- active,
3052
- collisionRect,
3053
- droppableRects,
3054
- droppableContainers: filteredContainers,
3055
- pointerCoordinates: null
3056
- });
3057
- const closestId = getFirstCollision(collisions, "id");
3058
- if (closestId != null) {
3059
- const newDroppable = droppableContainers.get(closestId);
3060
- const newNode = newDroppable?.node.current;
3061
- const newRect = newDroppable?.rect.current;
3062
- if (newNode && newRect) {
3063
- if (newDroppable.id === "placeholder") {
3064
- return {
3065
- x: newRect.left + (newRect.width - collisionRect.width) / 2,
3066
- y: newRect.top + (newRect.height - collisionRect.height) / 2
3067
- };
3068
- }
3069
- if (newDroppable.data.current?.type === "container") {
3070
- return {
3071
- x: newRect.left + 20,
3072
- y: newRect.top + 74
3073
- };
3074
- }
3075
- return {
3076
- x: newRect.left,
3077
- y: newRect.top
3078
- };
3079
- }
3080
- }
3081
- }
3082
- return void 0;
3083
- }, "coordinateGetter");
3084
- var ROOT_NAME = "Kanban";
3085
- var BOARD_NAME = "KanbanBoard";
3086
- var COLUMN_NAME = "KanbanColumn";
3087
- var COLUMN_HANDLE_NAME = "KanbanColumnHandle";
3088
- var ITEM_NAME = "KanbanItem";
3089
- var ITEM_HANDLE_NAME = "KanbanItemHandle";
3090
- var OVERLAY_NAME = "KanbanOverlay";
3091
- var KanbanContext = React30.createContext(null);
3092
- KanbanContext.displayName = ROOT_NAME;
3093
- function useKanbanContext(consumerName) {
3094
- const context = React30.useContext(KanbanContext);
3095
- if (!context) {
3096
- throw new Error(`\`${consumerName}\` must be used within \`${ROOT_NAME}\``);
3097
- }
3098
- return context;
3099
- }
3100
- __name(useKanbanContext, "useKanbanContext");
3101
- function KanbanRoot(props) {
3102
- const {
3103
- value,
3104
- onValueChange,
3105
- modifiers,
3106
- strategy = verticalListSortingStrategy,
3107
- orientation = "horizontal",
3108
- onMove,
3109
- getItemValue: getItemValueProp,
3110
- accessibility,
3111
- flatCursor = false,
3112
- ...kanbanProps
3113
- } = props;
3114
- const id = React30.useId();
3115
- const [activeId, setActiveId] = React30.useState(null);
3116
- const lastOverIdRef = React30.useRef(null);
3117
- const hasMovedRef = React30.useRef(false);
3118
- const sensors = useSensors(
3119
- useSensor(MouseSensor),
3120
- useSensor(TouchSensor),
3121
- useSensor(KeyboardSensor, {
3122
- coordinateGetter
3123
- })
3124
- );
3125
- const getItemValue = React30.useCallback(
3126
- (item) => {
3127
- if (typeof item === "object" && !getItemValueProp) {
3128
- throw new Error("getItemValue is required when using array of objects");
3129
- }
3130
- return getItemValueProp ? getItemValueProp(item) : item;
3131
- },
3132
- [getItemValueProp]
3133
- );
3134
- const getColumn = React30.useCallback(
3135
- (id2) => {
3136
- if (id2 in value) return id2;
3137
- for (const [columnId, items] of Object.entries(value)) {
3138
- if (items.some((item) => getItemValue(item) === id2)) {
3139
- return columnId;
3140
- }
3141
- }
3142
- return null;
3143
- },
3144
- [value, getItemValue]
3145
- );
3146
- const collisionDetection = React30.useCallback(
3147
- (args) => {
3148
- if (activeId && activeId in value) {
3149
- return closestCenter({
3150
- ...args,
3151
- droppableContainers: args.droppableContainers.filter((container) => container.id in value)
3152
- });
3153
- }
3154
- const pointerIntersections = pointerWithin(args);
3155
- const intersections = pointerIntersections.length > 0 ? pointerIntersections : rectIntersection(args);
3156
- let overId = getFirstCollision(intersections, "id");
3157
- if (!overId) {
3158
- if (hasMovedRef.current) {
3159
- lastOverIdRef.current = activeId;
3160
- }
3161
- return lastOverIdRef.current ? [{ id: lastOverIdRef.current }] : [];
3162
- }
3163
- if (overId in value) {
3164
- const containerItems = value[overId];
3165
- if (containerItems && containerItems.length > 0) {
3166
- const closestItem = closestCenter({
3167
- ...args,
3168
- droppableContainers: args.droppableContainers.filter(
3169
- (container) => container.id !== overId && containerItems.some((item) => getItemValue(item) === container.id)
3170
- )
3171
- });
3172
- if (closestItem.length > 0) {
3173
- overId = closestItem[0]?.id ?? overId;
3174
- }
3175
- }
3176
- }
3177
- lastOverIdRef.current = overId;
3178
- return [{ id: overId }];
3179
- },
3180
- [activeId, value, getItemValue]
3181
- );
3182
- const onDragStart = React30.useCallback(
3183
- (event) => {
3184
- kanbanProps.onDragStart?.(event);
3185
- if (event.activatorEvent.defaultPrevented) return;
3186
- setActiveId(event.active.id);
3187
- },
3188
- [kanbanProps.onDragStart]
3189
- );
3190
- const onDragOver = React30.useCallback(
3191
- (event) => {
3192
- kanbanProps.onDragOver?.(event);
3193
- if (event.activatorEvent.defaultPrevented) return;
3194
- const { active, over } = event;
3195
- if (!over) return;
3196
- const activeColumn = getColumn(active.id);
3197
- const overColumn = getColumn(over.id);
3198
- if (!activeColumn || !overColumn) return;
3199
- if (activeColumn === overColumn) {
3200
- const items = value[activeColumn];
3201
- if (!items) return;
3202
- const activeIndex = items.findIndex((item) => getItemValue(item) === active.id);
3203
- const overIndex = items.findIndex((item) => getItemValue(item) === over.id);
3204
- if (activeIndex !== overIndex) {
3205
- const newColumns = { ...value };
3206
- newColumns[activeColumn] = arrayMove(items, activeIndex, overIndex);
3207
- onValueChange?.(newColumns);
3208
- }
3209
- } else {
3210
- const activeItems = value[activeColumn];
3211
- const overItems = value[overColumn];
3212
- if (!activeItems || !overItems) return;
3213
- const activeIndex = activeItems.findIndex((item) => getItemValue(item) === active.id);
3214
- if (activeIndex === -1) return;
3215
- const activeItem = activeItems[activeIndex];
3216
- if (!activeItem) return;
3217
- const updatedItems = {
3218
- ...value,
3219
- [activeColumn]: activeItems.filter((item) => getItemValue(item) !== active.id),
3220
- [overColumn]: [...overItems, activeItem]
3221
- };
3222
- onValueChange?.(updatedItems);
3223
- hasMovedRef.current = true;
3224
- }
3225
- },
3226
- [value, getColumn, getItemValue, onValueChange, kanbanProps.onDragOver]
3227
- );
3228
- const onDragEnd = React30.useCallback(
3229
- (event) => {
3230
- kanbanProps.onDragEnd?.(event);
3231
- if (event.activatorEvent.defaultPrevented) return;
3232
- const { active, over } = event;
3233
- if (!over) {
3234
- setActiveId(null);
3235
- return;
3236
- }
3237
- if (active.id in value && over.id in value) {
3238
- const activeIndex = Object.keys(value).indexOf(active.id);
3239
- const overIndex = Object.keys(value).indexOf(over.id);
3240
- if (activeIndex !== overIndex) {
3241
- const orderedColumns = Object.keys(value);
3242
- const newOrder = arrayMove(orderedColumns, activeIndex, overIndex);
3243
- const newColumns = {};
3244
- for (const key of newOrder) {
3245
- const items = value[key];
3246
- if (items) {
3247
- newColumns[key] = items;
3248
- }
3249
- }
3250
- if (onMove) {
3251
- onMove({ ...event, activeIndex, overIndex });
3252
- } else {
3253
- onValueChange?.(newColumns);
3254
- }
3255
- }
3256
- } else {
3257
- const activeColumn = getColumn(active.id);
3258
- const overColumn = getColumn(over.id);
3259
- if (!activeColumn || !overColumn) {
3260
- setActiveId(null);
3261
- return;
3262
- }
3263
- if (activeColumn === overColumn) {
3264
- const items = value[activeColumn];
3265
- if (!items) {
3266
- setActiveId(null);
3267
- return;
3268
- }
3269
- const activeIndex = items.findIndex((item) => getItemValue(item) === active.id);
3270
- const overIndex = items.findIndex((item) => getItemValue(item) === over.id);
3271
- if (activeIndex !== overIndex) {
3272
- const newColumns = { ...value };
3273
- newColumns[activeColumn] = arrayMove(items, activeIndex, overIndex);
3274
- if (onMove) {
3275
- onMove({
3276
- ...event,
3277
- activeIndex,
3278
- overIndex
3279
- });
3280
- } else {
3281
- onValueChange?.(newColumns);
3282
- }
3283
- }
3284
- }
3285
- }
3286
- setActiveId(null);
3287
- hasMovedRef.current = false;
3288
- },
3289
- [value, getColumn, getItemValue, onValueChange, onMove, kanbanProps.onDragEnd]
3290
- );
3291
- const onDragCancel = React30.useCallback(
3292
- (event) => {
3293
- kanbanProps.onDragCancel?.(event);
3294
- if (event.activatorEvent.defaultPrevented) return;
3295
- setActiveId(null);
3296
- hasMovedRef.current = false;
3297
- },
3298
- [kanbanProps.onDragCancel]
3299
- );
3300
- const announcements = React30.useMemo(
3301
- () => ({
3302
- onDragStart({ active }) {
3303
- const isColumn = active.id in value;
3304
- const itemType = isColumn ? "column" : "item";
3305
- const position = isColumn ? Object.keys(value).indexOf(active.id) + 1 : (() => {
3306
- const column = getColumn(active.id);
3307
- if (!column || !value[column]) return 1;
3308
- return value[column].findIndex((item) => getItemValue(item) === active.id) + 1;
3309
- })();
3310
- const total = isColumn ? Object.keys(value).length : (() => {
3311
- const column = getColumn(active.id);
3312
- return column ? value[column]?.length ?? 0 : 0;
3313
- })();
3314
- return `Picked up ${itemType} at position ${position} of ${total}`;
3315
- },
3316
- onDragOver({ active, over }) {
3317
- if (!over) return;
3318
- const isColumn = active.id in value;
3319
- const itemType = isColumn ? "column" : "item";
3320
- const position = isColumn ? Object.keys(value).indexOf(over.id) + 1 : (() => {
3321
- const column = getColumn(over.id);
3322
- if (!column || !value[column]) return 1;
3323
- return value[column].findIndex((item) => getItemValue(item) === over.id) + 1;
3324
- })();
3325
- const total = isColumn ? Object.keys(value).length : (() => {
3326
- const column = getColumn(over.id);
3327
- return column ? value[column]?.length ?? 0 : 0;
3328
- })();
3329
- const overColumn = getColumn(over.id);
3330
- const activeColumn = getColumn(active.id);
3331
- if (isColumn) {
3332
- return `${itemType} is now at position ${position} of ${total}`;
3333
- }
3334
- if (activeColumn !== overColumn) {
3335
- return `${itemType} is now at position ${position} of ${total} in ${overColumn}`;
3336
- }
3337
- return `${itemType} is now at position ${position} of ${total}`;
3338
- },
3339
- onDragEnd({ active, over }) {
3340
- if (!over) return;
3341
- const isColumn = active.id in value;
3342
- const itemType = isColumn ? "column" : "item";
3343
- const position = isColumn ? Object.keys(value).indexOf(over.id) + 1 : (() => {
3344
- const column = getColumn(over.id);
3345
- if (!column || !value[column]) return 1;
3346
- return value[column].findIndex((item) => getItemValue(item) === over.id) + 1;
3347
- })();
3348
- const total = isColumn ? Object.keys(value).length : (() => {
3349
- const column = getColumn(over.id);
3350
- return column ? value[column]?.length ?? 0 : 0;
3351
- })();
3352
- const overColumn = getColumn(over.id);
3353
- const activeColumn = getColumn(active.id);
3354
- if (isColumn) {
3355
- return `${itemType} was dropped at position ${position} of ${total}`;
3356
- }
3357
- if (activeColumn !== overColumn) {
3358
- return `${itemType} was dropped at position ${position} of ${total} in ${overColumn}`;
3359
- }
3360
- return `${itemType} was dropped at position ${position} of ${total}`;
3361
- },
3362
- onDragCancel({ active }) {
3363
- const isColumn = active.id in value;
3364
- const itemType = isColumn ? "column" : "item";
3365
- return `Dragging was cancelled. ${itemType} was dropped.`;
3366
- }
3367
- }),
3368
- [value, getColumn, getItemValue]
3369
- );
3370
- const contextValue = React30.useMemo(
3371
- () => ({
3372
- id,
3373
- items: value,
3374
- modifiers,
3375
- strategy,
3376
- orientation,
3377
- activeId,
3378
- setActiveId,
3379
- getItemValue,
3380
- flatCursor
3381
- }),
3382
- [id, value, activeId, modifiers, strategy, orientation, getItemValue, flatCursor]
3383
- );
3384
- return /* @__PURE__ */ jsx41(KanbanContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx41(
3385
- DndContext,
3386
- {
3387
- collisionDetection,
3388
- modifiers,
3389
- sensors,
3390
- ...kanbanProps,
3391
- id,
3392
- measuring: {
3393
- droppable: {
3394
- strategy: MeasuringStrategy.Always
3395
- }
3396
- },
3397
- onDragStart,
3398
- onDragOver,
3399
- onDragEnd,
3400
- onDragCancel,
3401
- accessibility: {
3402
- announcements,
3403
- screenReaderInstructions: {
3404
- draggable: `
3405
- To pick up a kanban item or column, press space or enter.
3406
- While dragging, use the arrow keys to move the item.
3407
- Press space or enter again to drop the item in its new position, or press escape to cancel.
3408
- `
3409
- },
3410
- ...accessibility
3411
- }
3412
- }
3413
- ) });
3414
- }
3415
- __name(KanbanRoot, "KanbanRoot");
3416
- var KanbanBoardContext = React30.createContext(false);
3417
- KanbanBoardContext.displayName = BOARD_NAME;
3418
- var KanbanBoard = React30.forwardRef((props, forwardedRef) => {
3419
- const { asChild, className, ...boardProps } = props;
3420
- const context = useKanbanContext(BOARD_NAME);
3421
- const columns = React30.useMemo(() => {
3422
- return Object.keys(context.items);
3423
- }, [context.items]);
3424
- const BoardPrimitive = asChild ? Slot5 : "div";
3425
- return /* @__PURE__ */ jsx41(KanbanBoardContext.Provider, { value: true, children: /* @__PURE__ */ jsx41(
3426
- SortableContext,
3427
- {
3428
- items: columns,
3429
- strategy: context.orientation === "horizontal" ? horizontalListSortingStrategy : verticalListSortingStrategy,
3430
- children: /* @__PURE__ */ jsx41(
3431
- BoardPrimitive,
3432
- {
3433
- "aria-orientation": context.orientation,
3434
- "data-orientation": context.orientation,
3435
- "data-slot": "kanban-board",
3436
- ...boardProps,
3437
- ref: forwardedRef,
3438
- className: cn(
3439
- "flex size-full gap-4",
3440
- context.orientation === "horizontal" ? "flex-row" : "flex-col",
3441
- className
3442
- )
3443
- }
3444
- )
3445
- }
3446
- ) });
3447
- });
3448
- KanbanBoard.displayName = BOARD_NAME;
3449
- var KanbanColumnContext = React30.createContext(null);
3450
- KanbanColumnContext.displayName = COLUMN_NAME;
3451
- function useKanbanColumnContext(consumerName) {
3452
- const context = React30.useContext(KanbanColumnContext);
3453
- if (!context) {
3454
- throw new Error(`\`${consumerName}\` must be used within \`${COLUMN_NAME}\``);
3455
- }
3456
- return context;
3457
- }
3458
- __name(useKanbanColumnContext, "useKanbanColumnContext");
3459
- var animateLayoutChanges = /* @__PURE__ */ __name((args) => defaultAnimateLayoutChanges({ ...args, wasDragging: true }), "animateLayoutChanges");
3460
- var KanbanColumn = React30.forwardRef((props, forwardedRef) => {
3461
- const { value, asChild, asHandle, disabled, className, style, ...columnProps } = props;
3462
- const id = React30.useId();
3463
- const context = useKanbanContext(COLUMN_NAME);
3464
- const inBoard = React30.useContext(KanbanBoardContext);
3465
- const inOverlay = React30.useContext(KanbanOverlayContext);
3466
- if (!inBoard && !inOverlay) {
3467
- throw new Error(`\`${COLUMN_NAME}\` must be used within \`${BOARD_NAME}\` or \`${OVERLAY_NAME}\``);
3468
- }
3469
- if (value === "") {
3470
- throw new Error(`\`${COLUMN_NAME}\` value cannot be an empty string`);
3471
- }
3472
- const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable({
3473
- id: value,
3474
- disabled,
3475
- animateLayoutChanges
3476
- });
3477
- const composedRef = useComposedRefs(forwardedRef, (node) => {
3478
- if (disabled) return;
3479
- setNodeRef(node);
3480
- });
3481
- const composedStyle = React30.useMemo(() => {
3482
- return {
3483
- transform: CSS.Transform.toString(transform),
3484
- transition,
3485
- ...style
3486
- };
3487
- }, [transform, transition, style]);
3488
- const items = React30.useMemo(() => {
3489
- const items2 = context.items[value] ?? [];
3490
- return items2.map((item) => context.getItemValue(item));
3491
- }, [context.items, value, context.getItemValue]);
3492
- const columnContext = React30.useMemo(
3493
- () => ({
3494
- id,
3495
- attributes,
3496
- listeners,
3497
- setActivatorNodeRef,
3498
- isDragging,
3499
- disabled
3500
- }),
3501
- [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
3502
- );
3503
- const ColumnPrimitive = asChild ? Slot5 : "div";
3504
- return /* @__PURE__ */ jsx41(KanbanColumnContext.Provider, { value: columnContext, children: /* @__PURE__ */ jsx41(
3505
- SortableContext,
3506
- {
3507
- items,
3508
- strategy: context.orientation === "horizontal" ? horizontalListSortingStrategy : verticalListSortingStrategy,
3509
- children: /* @__PURE__ */ jsx41(
3510
- ColumnPrimitive,
3511
- {
3512
- id,
3513
- "data-disabled": disabled,
3514
- "data-dragging": isDragging ? "" : void 0,
3515
- "data-slot": "kanban-column",
3516
- ...columnProps,
3517
- ...asHandle && !disabled ? attributes : {},
3518
- ...asHandle && !disabled ? listeners : {},
3519
- ref: composedRef,
3520
- style: composedStyle,
3521
- className: cn(
3522
- "flex size-full w-full flex-col gap-2 rounded-lg border bg-zinc-100 p-2.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:bg-zinc-900",
3523
- {
3524
- "touch-none select-none": asHandle,
3525
- "cursor-default": context.flatCursor,
3526
- "data-dragging:cursor-grabbing": !context.flatCursor,
3527
- "cursor-grab": !isDragging && asHandle && !context.flatCursor,
3528
- "opacity-50": isDragging,
3529
- "pointer-events-none opacity-50": disabled
3530
- },
3531
- className
3532
- )
3533
- }
3534
- )
3535
- }
3536
- ) });
3537
- });
3538
- KanbanColumn.displayName = COLUMN_NAME;
3539
- var KanbanColumnHandle = React30.forwardRef((props, forwardedRef) => {
3540
- const { asChild, disabled, className, ...columnHandleProps } = props;
3541
- const context = useKanbanContext(COLUMN_NAME);
3542
- const columnContext = useKanbanColumnContext(COLUMN_HANDLE_NAME);
3543
- const isDisabled = disabled ?? columnContext.disabled;
3544
- const composedRef = useComposedRefs(forwardedRef, (node) => {
3545
- if (isDisabled) return;
3546
- columnContext.setActivatorNodeRef(node);
3547
- });
3548
- const HandlePrimitive = asChild ? Slot5 : "button";
3549
- return /* @__PURE__ */ jsx41(
3550
- HandlePrimitive,
3551
- {
3552
- type: "button",
3553
- "aria-controls": columnContext.id,
3554
- "data-disabled": isDisabled,
3555
- "data-dragging": columnContext.isDragging ? "" : void 0,
3556
- "data-slot": "kanban-column-handle",
3557
- ...columnHandleProps,
3558
- ...isDisabled ? {} : columnContext.attributes,
3559
- ...isDisabled ? {} : columnContext.listeners,
3560
- ref: composedRef,
3561
- className: cn(
3562
- "select-none disabled:pointer-events-none disabled:opacity-50",
3563
- context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
3564
- className
3565
- ),
3566
- disabled: isDisabled
3567
- }
3568
- );
3569
- });
3570
- KanbanColumnHandle.displayName = COLUMN_HANDLE_NAME;
3571
- var KanbanItemContext = React30.createContext(null);
3572
- KanbanItemContext.displayName = ITEM_NAME;
3573
- function useKanbanItemContext(consumerName) {
3574
- const context = React30.useContext(KanbanItemContext);
3575
- if (!context) {
3576
- throw new Error(`\`${consumerName}\` must be used within \`${ITEM_NAME}\``);
3577
- }
3578
- return context;
3579
- }
3580
- __name(useKanbanItemContext, "useKanbanItemContext");
3581
- var KanbanItem = React30.forwardRef((props, forwardedRef) => {
3582
- const { value, style, asHandle, asChild, disabled, className, ...itemProps } = props;
3583
- const id = React30.useId();
3584
- const context = useKanbanContext(ITEM_NAME);
3585
- const inBoard = React30.useContext(KanbanBoardContext);
3586
- const inOverlay = React30.useContext(KanbanOverlayContext);
3587
- if (!inBoard && !inOverlay) {
3588
- throw new Error(`\`${ITEM_NAME}\` must be used within \`${BOARD_NAME}\``);
3589
- }
3590
- const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable({
3591
- id: value,
3592
- disabled
3593
- });
3594
- if (value === "") {
3595
- throw new Error(`\`${ITEM_NAME}\` value cannot be an empty string`);
3596
- }
3597
- const composedRef = useComposedRefs(forwardedRef, (node) => {
3598
- if (disabled) return;
3599
- setNodeRef(node);
3600
- });
3601
- const composedStyle = React30.useMemo(() => {
3602
- return {
3603
- transform: CSS.Transform.toString(transform),
3604
- transition,
3605
- ...style
3606
- };
3607
- }, [transform, transition, style]);
3608
- const itemContext = React30.useMemo(
3609
- () => ({
3610
- id,
3611
- attributes,
3612
- listeners,
3613
- setActivatorNodeRef,
3614
- isDragging,
3615
- disabled
3616
- }),
3617
- [id, attributes, listeners, setActivatorNodeRef, isDragging, disabled]
3618
- );
3619
- const ItemPrimitive = asChild ? Slot5 : "div";
3620
- return /* @__PURE__ */ jsx41(KanbanItemContext.Provider, { value: itemContext, children: /* @__PURE__ */ jsx41(
3621
- ItemPrimitive,
3622
- {
3623
- id,
3624
- "data-disabled": disabled,
3625
- "data-dragging": isDragging ? "" : void 0,
3626
- "data-slot": "kanban-item",
3627
- ...itemProps,
3628
- ...asHandle && !disabled ? attributes : {},
3629
- ...asHandle && !disabled ? listeners : {},
3630
- ref: composedRef,
3631
- style: composedStyle,
3632
- className: cn(
3633
- "focus-visible:ring-ring focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden",
3634
- {
3635
- "touch-none select-none": asHandle,
3636
- "cursor-default": context.flatCursor,
3637
- "data-dragging:cursor-grabbing": !context.flatCursor,
3638
- "cursor-grab": !isDragging && asHandle && !context.flatCursor,
3639
- "opacity-50": isDragging,
3640
- "pointer-events-none opacity-50": disabled
3641
- },
3642
- className
3643
- )
3644
- }
3645
- ) });
3646
- });
3647
- KanbanItem.displayName = ITEM_NAME;
3648
- var KanbanItemHandle = React30.forwardRef((props, forwardedRef) => {
3649
- const { asChild, disabled, className, ...itemHandleProps } = props;
3650
- const context = useKanbanContext(ITEM_HANDLE_NAME);
3651
- const itemContext = useKanbanItemContext(ITEM_HANDLE_NAME);
3652
- const isDisabled = disabled ?? itemContext.disabled;
3653
- const composedRef = useComposedRefs(forwardedRef, (node) => {
3654
- if (isDisabled) return;
3655
- itemContext.setActivatorNodeRef(node);
3656
- });
3657
- const HandlePrimitive = asChild ? Slot5 : "button";
3658
- return /* @__PURE__ */ jsx41(
3659
- HandlePrimitive,
3660
- {
3661
- type: "button",
3662
- "aria-controls": itemContext.id,
3663
- "data-disabled": isDisabled,
3664
- "data-dragging": itemContext.isDragging ? "" : void 0,
3665
- "data-slot": "kanban-item-handle",
3666
- ...itemHandleProps,
3667
- ...isDisabled ? {} : itemContext.attributes,
3668
- ...isDisabled ? {} : itemContext.listeners,
3669
- ref: composedRef,
3670
- className: cn(
3671
- "select-none disabled:pointer-events-none disabled:opacity-50",
3672
- context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
3673
- className
3674
- ),
3675
- disabled: isDisabled
3676
- }
3677
- );
3678
- });
3679
- KanbanItemHandle.displayName = ITEM_HANDLE_NAME;
3680
- var KanbanOverlayContext = React30.createContext(false);
3681
- KanbanOverlayContext.displayName = OVERLAY_NAME;
3682
- var dropAnimation = {
3683
- sideEffects: defaultDropAnimationSideEffects({
3684
- styles: {
3685
- active: {
3686
- opacity: "0.4"
3687
- }
3688
- }
3689
- })
3690
- };
3691
- function KanbanOverlay(props) {
3692
- const { container: containerProp, children, ...overlayProps } = props;
3693
- const context = useKanbanContext(OVERLAY_NAME);
3694
- const [mounted, setMounted] = React30.useState(false);
3695
- React30.useLayoutEffect(() => setMounted(true), []);
3696
- const container = containerProp ?? (mounted ? globalThis.document?.body : null);
3697
- if (!container) return null;
3698
- const variant = context.activeId && context.activeId in context.items ? "column" : "item";
3699
- return ReactDOM.createPortal(
3700
- /* @__PURE__ */ jsx41(
3701
- DragOverlay,
3702
- {
3703
- dropAnimation,
3704
- modifiers: context.modifiers,
3705
- className: cn(!context.flatCursor && "cursor-grabbing"),
3706
- ...overlayProps,
3707
- children: /* @__PURE__ */ jsx41(KanbanOverlayContext.Provider, { value: true, children: context.activeId && children ? typeof children === "function" ? children({
3708
- value: context.activeId,
3709
- variant
3710
- }) : children : null })
3711
- }
3712
- ),
3713
- container
3714
- );
3715
- }
3716
- __name(KanbanOverlay, "KanbanOverlay");
3717
-
3718
- // src/shadcnui/custom/link.tsx
3719
- import NextLink from "next/link";
3720
- import * as React31 from "react";
3721
- import { jsx as jsx42 } from "react/jsx-runtime";
3722
- var Link2 = React31.forwardRef(({ className, ...props }, ref) => {
3723
- return /* @__PURE__ */ jsx42(NextLink, { ref, className: cn(`font-medium`, className), ...props });
3724
- });
3725
- Link2.displayName = "Link";
3726
-
3727
- // src/shadcnui/custom/multi-select.tsx
3728
- import { cva as cva8 } from "class-variance-authority";
3729
- import { CheckIcon as CheckIcon5, ChevronDown, WandSparkles, XCircle, XIcon as XIcon2 } from "lucide-react";
3730
- import * as React32 from "react";
3731
- import { Fragment as Fragment2, jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
3732
- var multiSelectVariants = cva8(
3733
- "m-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300",
3734
- {
3735
- variants: {
3736
- variant: {
3737
- default: "border-foreground/10 text-foreground bg-card hover:bg-card/80",
3738
- secondary: "border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",
3739
- destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
3740
- inverted: "inverted"
3741
- }
3742
- },
3743
- defaultVariants: {
3744
- variant: "default"
3745
- }
3746
- }
3747
- );
3748
- var MultiSelect = React32.forwardRef(
3749
- ({
3750
- options,
3751
- onValueChange,
3752
- variant,
3753
- defaultValue = [],
3754
- value,
3755
- placeholder = "Select options",
3756
- animation = 0,
3757
- maxCount = 3,
3758
- modalPopover = false,
3759
- asChild = false,
3760
- className,
3761
- onSearchChange,
3762
- ...props
3763
- }, ref) => {
3764
- const [internalSelectedValues, setInternalSelectedValues] = React32.useState(defaultValue);
3765
- const selectedValues = value !== void 0 ? value : internalSelectedValues;
3766
- const [isPopoverOpen, setIsPopoverOpen] = React32.useState(false);
3767
- const [isAnimating, setIsAnimating] = React32.useState(false);
3768
- const handleInputKeyDown = /* @__PURE__ */ __name((event) => {
3769
- if (event.key === "Enter") {
3770
- setIsPopoverOpen(true);
3771
- } else if (event.key === "Backspace" && !event.currentTarget.value) {
3772
- const newSelectedValues = [...selectedValues];
3773
- newSelectedValues.pop();
3774
- if (value === void 0) {
3775
- setInternalSelectedValues(newSelectedValues);
3776
- }
3777
- onValueChange(newSelectedValues);
3778
- }
3779
- }, "handleInputKeyDown");
3780
- const toggleOption = /* @__PURE__ */ __name((option) => {
3781
- const newSelectedValues = selectedValues.includes(option) ? selectedValues.filter((value2) => value2 !== option) : [...selectedValues, option];
3782
- if (value === void 0) {
3783
- setInternalSelectedValues(newSelectedValues);
3784
- }
3785
- onValueChange(newSelectedValues);
3786
- }, "toggleOption");
3787
- const handleClear = /* @__PURE__ */ __name(() => {
3788
- if (value === void 0) {
3789
- setInternalSelectedValues([]);
3790
- }
3791
- onValueChange([]);
3792
- }, "handleClear");
3793
- const handleTogglePopover = /* @__PURE__ */ __name(() => {
3794
- setIsPopoverOpen((prev) => !prev);
3795
- }, "handleTogglePopover");
3796
- const clearExtraOptions = /* @__PURE__ */ __name(() => {
3797
- const newSelectedValues = selectedValues.slice(0, maxCount);
3798
- if (value === void 0) {
3799
- setInternalSelectedValues(newSelectedValues);
3800
- }
3801
- onValueChange(newSelectedValues);
3802
- }, "clearExtraOptions");
3803
- const toggleAll = /* @__PURE__ */ __name(() => {
3804
- let newSelectedValues;
3805
- if (selectedValues.length === options.length) {
3806
- newSelectedValues = [];
3807
- } else {
3808
- newSelectedValues = options.map((option) => option.value);
3809
- }
3810
- if (value === void 0) {
3811
- setInternalSelectedValues(newSelectedValues);
3812
- }
3813
- onValueChange(newSelectedValues);
3814
- }, "toggleAll");
3815
- return /* @__PURE__ */ jsxs18(Popover, { open: isPopoverOpen, onOpenChange: setIsPopoverOpen, modal: modalPopover, children: [
3816
- /* @__PURE__ */ jsx43(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx43(
3817
- Button,
3818
- {
3819
- ref,
3820
- ...props,
3821
- onClick: handleTogglePopover,
3822
- className: cn(
3823
- "flex h-auto min-h-10 w-full items-center justify-between rounded-md border bg-inherit p-1 hover:bg-inherit [&_svg]:pointer-events-auto",
3824
- className
3825
- ),
3826
- children: selectedValues.length > 0 ? /* @__PURE__ */ jsxs18("div", { className: "flex w-full items-center justify-between", children: [
3827
- /* @__PURE__ */ jsxs18("div", { className: "flex flex-wrap items-center", children: [
3828
- selectedValues.slice(0, maxCount).map((value2) => {
3829
- const option = options.find((o) => o.value === value2);
3830
- const IconComponent = option?.icon;
3831
- return /* @__PURE__ */ jsxs18(
3832
- Badge,
3833
- {
3834
- className: cn(isAnimating ? "animate-bounce" : "", multiSelectVariants({ variant })),
3835
- style: { animationDuration: `${animation}s` },
3836
- children: [
3837
- IconComponent && /* @__PURE__ */ jsx43(IconComponent, { className: "mr-2 h-4 w-4" }),
3838
- option?.label,
3839
- /* @__PURE__ */ jsx43(
3840
- XCircle,
3841
- {
3842
- className: "ml-2 h-4 w-4 cursor-pointer",
3843
- onClick: (event) => {
3844
- event.stopPropagation();
3845
- toggleOption(value2);
3846
- }
3847
- }
3848
- )
3849
- ]
3850
- },
3851
- value2
3852
- );
3853
- }),
3854
- selectedValues.length > maxCount && /* @__PURE__ */ jsxs18(
3855
- Badge,
3856
- {
3857
- className: cn(
3858
- "text-foreground border-foreground/1 bg-transparent hover:bg-transparent",
3859
- isAnimating ? "animate-bounce" : "",
3860
- multiSelectVariants({ variant })
3861
- ),
3862
- style: { animationDuration: `${animation}s` },
3863
- children: [
3864
- `+ ${selectedValues.length - maxCount} more`,
3865
- /* @__PURE__ */ jsx43(
3866
- XCircle,
3867
- {
3868
- className: "ml-2 h-4 w-4 cursor-pointer",
3869
- onClick: (event) => {
3870
- event.stopPropagation();
3871
- clearExtraOptions();
3872
- }
3873
- }
3874
- )
3875
- ]
3876
- }
3877
- )
3878
- ] }),
3879
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
3880
- /* @__PURE__ */ jsx43(
3881
- XIcon2,
3882
- {
3883
- className: "text-muted-foreground mx-2 h-4 cursor-pointer",
3884
- onClick: (event) => {
3885
- event.stopPropagation();
3886
- handleClear();
3887
- }
3888
- }
3889
- ),
3890
- /* @__PURE__ */ jsx43(Separator4, { orientation: "vertical", className: "flex h-full min-h-6" }),
3891
- /* @__PURE__ */ jsx43(ChevronDown, { className: "text-muted-foreground mx-2 h-4 cursor-pointer" })
3892
- ] })
3893
- ] }) : /* @__PURE__ */ jsxs18("div", { className: "mx-auto flex w-full items-center justify-between", children: [
3894
- /* @__PURE__ */ jsx43("span", { className: "text-muted-foreground mx-3 text-sm", children: placeholder }),
3895
- /* @__PURE__ */ jsx43(ChevronDown, { className: "text-muted-foreground mx-2 h-4 cursor-pointer" })
3896
- ] })
3897
- }
3898
- ) }),
3899
- /* @__PURE__ */ jsx43(PopoverContent, { className: "w-auto p-0", align: "start", onEscapeKeyDown: () => setIsPopoverOpen(false), children: /* @__PURE__ */ jsxs18(Command, { children: [
3900
- /* @__PURE__ */ jsx43(
3901
- CommandInput,
3902
- {
3903
- autoFocus: true,
3904
- placeholder: "Search...",
3905
- onKeyDown: handleInputKeyDown,
3906
- onValueChange: onSearchChange
3907
- }
3908
- ),
3909
- /* @__PURE__ */ jsxs18(CommandList, { children: [
3910
- /* @__PURE__ */ jsx43(CommandEmpty, { children: "No results found." }),
3911
- /* @__PURE__ */ jsxs18(CommandGroup, { children: [
3912
- /* @__PURE__ */ jsxs18(CommandItem, { onSelect: toggleAll, className: "cursor-pointer", children: [
3913
- /* @__PURE__ */ jsx43(
3914
- "div",
3915
- {
3916
- className: cn(
3917
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
3918
- selectedValues.length === options.length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
3919
- ),
3920
- children: /* @__PURE__ */ jsx43(CheckIcon5, { className: "h-4 w-4" })
3921
- }
3922
- ),
3923
- /* @__PURE__ */ jsx43("span", { children: "(Select All)" })
3924
- ] }, "all"),
3925
- options.map((option) => {
3926
- const isSelected = selectedValues.includes(option.value);
3927
- return /* @__PURE__ */ jsxs18(
3928
- CommandItem,
3929
- {
3930
- onSelect: () => toggleOption(option.value),
3931
- className: "cursor-pointer",
3932
- children: [
3933
- /* @__PURE__ */ jsx43(
3934
- "div",
3935
- {
3936
- className: cn(
3937
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
3938
- isSelected ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
3939
- ),
3940
- children: /* @__PURE__ */ jsx43(CheckIcon5, { className: "h-4 w-4" })
3941
- }
3942
- ),
3943
- option.icon && /* @__PURE__ */ jsx43(option.icon, { className: "text-muted-foreground mr-2 h-4 w-4" }),
3944
- /* @__PURE__ */ jsx43("span", { children: option.label })
3945
- ]
3946
- },
3947
- option.value
3948
- );
3949
- })
3950
- ] }),
3951
- /* @__PURE__ */ jsx43(CommandSeparator, {}),
3952
- /* @__PURE__ */ jsx43(CommandGroup, { children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
3953
- selectedValues.length > 0 && /* @__PURE__ */ jsxs18(Fragment2, { children: [
3954
- /* @__PURE__ */ jsx43(CommandItem, { onSelect: handleClear, className: "flex-1 cursor-pointer justify-center", children: "Clear" }),
3955
- /* @__PURE__ */ jsx43(Separator4, { orientation: "vertical", className: "flex h-full min-h-6" })
3956
- ] }),
3957
- /* @__PURE__ */ jsx43(
3958
- CommandItem,
3959
- {
3960
- onSelect: () => setIsPopoverOpen(false),
3961
- className: "max-w-full flex-1 cursor-pointer justify-center",
3962
- children: "Close"
3963
- }
3964
- )
3965
- ] }) })
3966
- ] })
3967
- ] }) }),
3968
- animation > 0 && selectedValues.length > 0 && /* @__PURE__ */ jsx43(
3969
- WandSparkles,
3970
- {
3971
- className: cn(
3972
- "text-foreground bg-background my-2 h-3 w-3 cursor-pointer",
3973
- isAnimating ? "" : "text-muted-foreground"
3974
- ),
3975
- onClick: () => setIsAnimating(!isAnimating)
3976
- }
3977
- )
3978
- ] });
3979
- }
3980
- );
3981
- MultiSelect.displayName = "MultiSelect";
3982
-
3983
- export {
3984
- Accordion,
3985
- AccordionItem,
3986
- AccordionTrigger,
3987
- AccordionContent,
3988
- Alert,
3989
- AlertTitle,
3990
- AlertDescription,
3991
- buttonVariants,
3992
- Button,
3993
- AlertDialog,
3994
- AlertDialogTrigger,
3995
- AlertDialogPortal,
3996
- AlertDialogOverlay,
3997
- AlertDialogContent,
3998
- AlertDialogHeader,
3999
- AlertDialogFooter,
4000
- AlertDialogTitle,
4001
- AlertDialogDescription,
4002
- AlertDialogAction,
4003
- AlertDialogCancel,
4004
- Avatar,
4005
- AvatarImage,
4006
- AvatarFallback,
4007
- badgeVariants,
4008
- Badge,
4009
- Breadcrumb,
4010
- BreadcrumbList,
4011
- BreadcrumbItem,
4012
- BreadcrumbLink,
4013
- BreadcrumbPage,
4014
- BreadcrumbSeparator,
4015
- BreadcrumbEllipsis,
4016
- Calendar,
4017
- Card,
4018
- CardHeader,
4019
- CardTitle,
4020
- CardDescription,
4021
- CardContent,
4022
- CardFooter,
4023
- Carousel,
4024
- CarouselContent,
4025
- CarouselItem,
4026
- CarouselPrevious,
4027
- CarouselNext,
4028
- ChartContainer,
4029
- ChartStyle,
4030
- ChartTooltip,
4031
- ChartTooltipContent,
4032
- ChartLegend,
4033
- ChartLegendContent,
4034
- Checkbox,
4035
- Collapsible,
4036
- CollapsibleTrigger2 as CollapsibleTrigger,
4037
- CollapsibleContent2 as CollapsibleContent,
4038
- Dialog,
4039
- DialogTrigger,
4040
- DialogPortal,
4041
- DialogClose,
4042
- DialogOverlay,
4043
- DialogContent,
4044
- DialogHeader,
4045
- DialogFooter,
4046
- DialogTitle,
4047
- DialogDescription,
4048
- Command,
4049
- CommandDialog,
4050
- CommandInput,
4051
- CommandList,
4052
- CommandEmpty,
4053
- CommandGroup,
4054
- CommandSeparator,
4055
- CommandItem,
4056
- CommandShortcut,
4057
- ContextMenu,
4058
- ContextMenuTrigger,
4059
- ContextMenuGroup,
4060
- ContextMenuPortal,
4061
- ContextMenuSub,
4062
- ContextMenuRadioGroup,
4063
- ContextMenuSubTrigger,
4064
- ContextMenuSubContent,
4065
- ContextMenuContent,
4066
- ContextMenuItem,
4067
- ContextMenuCheckboxItem,
4068
- ContextMenuRadioItem,
4069
- ContextMenuLabel,
4070
- ContextMenuSeparator,
4071
- ContextMenuShortcut,
4072
- Drawer,
4073
- DrawerTrigger,
4074
- DrawerPortal,
4075
- DrawerClose,
4076
- DrawerOverlay,
4077
- DrawerContent,
4078
- DrawerHeader,
4079
- DrawerFooter,
4080
- DrawerTitle,
4081
- DrawerDescription,
4082
- DropdownMenu,
4083
- DropdownMenuTrigger,
4084
- DropdownMenuGroup,
4085
- DropdownMenuPortal,
4086
- DropdownMenuSub,
4087
- DropdownMenuRadioGroup,
4088
- DropdownMenuSubTrigger,
4089
- DropdownMenuSubContent,
4090
- DropdownMenuContent,
4091
- DropdownMenuItem,
4092
- DropdownMenuCheckboxItem,
4093
- DropdownMenuRadioItem,
4094
- DropdownMenuLabel,
4095
- DropdownMenuSeparator,
4096
- DropdownMenuShortcut,
4097
- Label3 as Label,
4098
- Form,
4099
- FormField,
4100
- useFormField,
4101
- FormItem,
4102
- FormLabel,
4103
- FormControl,
4104
- FormDescription,
4105
- FormMessage,
4106
- HoverCard,
4107
- HoverCardTrigger,
4108
- HoverCardContent,
4109
- Input,
4110
- NavigationMenu,
4111
- NavigationMenuList,
4112
- NavigationMenuItem,
4113
- navigationMenuTriggerStyle,
4114
- NavigationMenuTrigger,
4115
- NavigationMenuContent,
4116
- NavigationMenuViewport,
4117
- NavigationMenuLink,
4118
- NavigationMenuIndicator,
4119
- Popover,
4120
- PopoverTrigger,
4121
- PopoverAnchor,
4122
- PopoverContent,
4123
- Progress,
4124
- RadioGroup3 as RadioGroup,
4125
- RadioGroupItem,
4126
- ResizablePanelGroup,
4127
- ResizablePanel,
4128
- ResizableHandle,
4129
- ScrollArea,
4130
- ScrollBar,
4131
- Select,
4132
- SelectGroup,
4133
- SelectValue,
4134
- SelectTrigger,
4135
- SelectScrollUpButton,
4136
- SelectScrollDownButton,
4137
- SelectContent,
4138
- SelectLabel,
4139
- SelectItem,
4140
- SelectSeparator,
4141
- Separator4 as Separator,
4142
- Sheet,
4143
- SheetTrigger,
4144
- SheetClose,
4145
- SheetContent,
4146
- SheetHeader,
4147
- SheetFooter,
4148
- SheetTitle,
4149
- SheetDescription,
4150
- Skeleton,
4151
- TooltipProvider,
4152
- Tooltip2 as Tooltip,
4153
- TooltipTrigger,
4154
- TooltipContent,
4155
- SIDEBAR_WIDTH,
4156
- SIDEBAR_WIDTH_MOBILE,
4157
- SIDEBAR_WIDTH_ICON,
4158
- useSidebar,
4159
- SidebarProvider,
4160
- Sidebar,
4161
- SidebarTrigger,
4162
- SidebarRail,
4163
- SidebarInset,
4164
- SidebarInput,
4165
- SidebarHeader,
4166
- SidebarFooter,
4167
- SidebarSeparator,
4168
- SidebarContent,
4169
- SidebarGroup,
4170
- SidebarGroupLabel,
4171
- SidebarGroupAction,
4172
- SidebarGroupContent,
4173
- SidebarMenu,
4174
- SidebarMenuItem,
4175
- SidebarMenuButton,
4176
- SidebarMenuAction,
4177
- SidebarMenuBadge,
4178
- SidebarMenuSkeleton,
4179
- SidebarMenuSub,
4180
- SidebarMenuSubItem,
4181
- SidebarMenuSubButton,
4182
- Slider,
4183
- Toaster,
4184
- Switch,
4185
- Table,
4186
- TableHeader,
4187
- TableBody,
4188
- TableFooter,
4189
- TableRow,
4190
- TableHead,
4191
- TableCell,
4192
- TableCaption,
4193
- Tabs,
4194
- TabsList,
4195
- TabsTrigger,
4196
- TabsContent,
4197
- Textarea,
4198
- toggleVariants,
4199
- Toggle,
4200
- KanbanRoot,
4201
- KanbanBoard,
4202
- KanbanColumn,
4203
- KanbanColumnHandle,
4204
- KanbanItem,
4205
- KanbanItemHandle,
4206
- KanbanOverlay,
4207
- Link2 as Link,
4208
- MultiSelect
4209
- };
4210
- //# sourceMappingURL=chunk-P2F54I7Q.mjs.map