xertica-ui 2.5.2 → 2.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 (577) hide show
  1. package/CHANGELOG.md +687 -656
  2. package/README.md +482 -482
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +1293 -1256
  6. package/bin/generate-tokens.ts +256 -262
  7. package/bin/language-config.test.ts +32 -0
  8. package/bin/language-config.ts +36 -11
  9. package/components/Introduction.mdx +121 -121
  10. package/components/assistant/code-block/CodeBlock.tsx +7 -6
  11. package/components/assistant/code-block/code-block.mdx +38 -38
  12. package/components/assistant/code-block/code-block.test.tsx +2 -1
  13. package/components/assistant/formatted-document/FormattedDocument.tsx +3 -0
  14. package/components/assistant/formatted-document/formatted-document.mdx +31 -31
  15. package/components/assistant/formatted-document/formatted-document.test.tsx +5 -4
  16. package/components/assistant/markdown-message/MarkdownMessage.tsx +1 -1
  17. package/components/assistant/markdown-message/markdown-message.mdx +44 -44
  18. package/components/assistant/modern-chat-input/modern-chat-input.mdx +71 -71
  19. package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +3 -2
  20. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +1 -1
  21. package/components/assistant/xertica-assistant/types.ts +3 -2
  22. package/components/assistant/xertica-assistant/use-assistant.ts +5 -4
  23. package/components/assistant/xertica-assistant/xertica-assistant.mdx +66 -66
  24. package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +2 -1
  25. package/components/blocks/card-patterns/card-patterns.mdx +123 -123
  26. package/components/brand/branding/branding.mdx +27 -27
  27. package/components/brand/language-selector/language-selector.mdx +126 -126
  28. package/components/brand/theme-toggle/theme-toggle.mdx +47 -47
  29. package/components/brand/theme-toggle/theme-toggle.test.tsx +6 -2
  30. package/components/brand/xertica-logo/xertica-logo.mdx +56 -56
  31. package/components/brand/xertica-orbe/xertica-orbe.mdx +38 -38
  32. package/components/brand/xertica-provider/XerticaProvider.tsx +112 -112
  33. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  34. package/components/brand/xertica-provider/xertica-provider.test.tsx +25 -13
  35. package/components/brand/xertica-xlogo/xertica-xlogo.mdx +55 -55
  36. package/components/examples/DrawingMapExample.tsx +1 -4
  37. package/components/layout/header/header.mdx +117 -117
  38. package/components/layout/header/header.test.tsx +2 -1
  39. package/components/layout/sidebar/sidebar.mdx +99 -99
  40. package/components/layout/sidebar/sidebar.stories.tsx +1033 -1033
  41. package/components/layout/sidebar/sidebar.test.tsx +2 -1
  42. package/components/layout/sidebar/sidebar.tsx +1509 -1501
  43. package/components/media/audio-player/AudioPlayer.mdx +67 -67
  44. package/components/media/audio-player/AudioPlayer.test.tsx +2 -1
  45. package/components/media/floating-media-wrapper.mdx +74 -74
  46. package/components/media/video-player/VideoPlayer.mdx +102 -102
  47. package/components/media/video-player/VideoPlayer.test.tsx +3 -2
  48. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
  49. package/components/pages/forgot-password-page/forgot-password-page.mdx +60 -60
  50. package/components/pages/forgot-password-page/forgot-password-page.test.tsx +2 -1
  51. package/components/pages/home-content/HomeContent.tsx +2 -3
  52. package/components/pages/home-content/home-content.mdx +62 -62
  53. package/components/pages/home-page/HomePage.stories.tsx +8 -15
  54. package/components/pages/home-page/home-page.mdx +53 -53
  55. package/components/pages/home-page/home-page.test.tsx +2 -1
  56. package/components/pages/login-page/LoginPage.mdx +31 -31
  57. package/components/pages/login-page/LoginPage.tsx +218 -218
  58. package/components/pages/login-page/login-page.test.tsx +2 -1
  59. package/components/pages/reset-password-page/ResetPasswordPage.tsx +243 -243
  60. package/components/pages/reset-password-page/reset-password-page.mdx +63 -63
  61. package/components/pages/template-content/TemplateContent.tsx +2 -3
  62. package/components/pages/template-content/template-content.mdx +61 -61
  63. package/components/pages/template-page/TemplatePage.stories.tsx +32 -32
  64. package/components/pages/template-page/template-page.mdx +53 -53
  65. package/components/pages/template-page/template-page.test.tsx +2 -1
  66. package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
  67. package/components/pages/verify-email-page/verify-email-page.mdx +55 -55
  68. package/components/public-api-smoke.test.tsx +10 -6
  69. package/components/shared/assistant-utils.ts +3 -2
  70. package/components/shared/navigation.ts +2 -2
  71. package/components/ui/accordion/accordion.mdx +29 -29
  72. package/components/ui/alert/alert.mdx +29 -29
  73. package/components/ui/alert-dialog/alert-dialog.mdx +26 -26
  74. package/components/ui/aspect-ratio/aspect-ratio.mdx +25 -25
  75. package/components/ui/assistant-chart/AssistantChart.tsx +8 -2
  76. package/components/ui/assistant-chart/assistant-chart.mdx +25 -25
  77. package/components/ui/avatar/avatar.mdx +26 -26
  78. package/components/ui/badge/badge.mdx +28 -28
  79. package/components/ui/breadcrumb/breadcrumb.mdx +26 -26
  80. package/components/ui/button/button.mdx +29 -29
  81. package/components/ui/calendar/calendar.mdx +26 -26
  82. package/components/ui/card/card.mdx +26 -26
  83. package/components/ui/carousel/carousel.mdx +26 -26
  84. package/components/ui/chart/chart.mdx +26 -26
  85. package/components/ui/chart/chart.test.tsx +178 -178
  86. package/components/ui/chart/chart.tsx +2252 -2245
  87. package/components/ui/checkbox/checkbox.mdx +26 -26
  88. package/components/ui/collapsible/collapsible.mdx +25 -25
  89. package/components/ui/command/command.mdx +26 -26
  90. package/components/ui/context-menu/context-menu.mdx +26 -26
  91. package/components/ui/dialog/dialog.mdx +26 -26
  92. package/components/ui/drawer/drawer.mdx +26 -26
  93. package/components/ui/dropdown-menu/dropdown-menu.mdx +26 -26
  94. package/components/ui/empty/empty.mdx +26 -26
  95. package/components/ui/file-upload/file-upload.mdx +26 -26
  96. package/components/ui/form/form.mdx +20 -20
  97. package/components/ui/google-maps-loader/google-maps-loader.mdx +68 -68
  98. package/components/ui/hover-card/hover-card.mdx +26 -26
  99. package/components/ui/input/input.mdx +29 -29
  100. package/components/ui/input-otp/input-otp.mdx +26 -26
  101. package/components/ui/label/label.mdx +25 -25
  102. package/components/ui/map/map.mdx +26 -26
  103. package/components/ui/map/map.tsx +6 -1
  104. package/components/ui/menubar/menubar.mdx +26 -26
  105. package/components/ui/navigation-menu/navigation-menu.mdx +26 -26
  106. package/components/ui/notification-badge/notification-badge.mdx +26 -26
  107. package/components/ui/page-header/page-header.mdx +44 -44
  108. package/components/ui/pagination/pagination.mdx +26 -26
  109. package/components/ui/popover/popover.mdx +26 -26
  110. package/components/ui/progress/progress.mdx +25 -25
  111. package/components/ui/radio-group/radio-group.mdx +26 -26
  112. package/components/ui/rating/rating.mdx +26 -26
  113. package/components/ui/resizable/resizable.mdx +26 -26
  114. package/components/ui/resizable/resizable.tsx +13 -8
  115. package/components/ui/rich-text-editor/rich-text-editor.mdx +47 -47
  116. package/components/ui/route-map/route-map.mdx +26 -26
  117. package/components/ui/scroll-area/scroll-area.mdx +25 -25
  118. package/components/ui/search/search.mdx +27 -27
  119. package/components/ui/select/select.mdx +26 -26
  120. package/components/ui/separator/separator.mdx +25 -25
  121. package/components/ui/sheet/sheet.mdx +26 -26
  122. package/components/ui/simple-map/simple-map.mdx +25 -25
  123. package/components/ui/skeleton/skeleton.mdx +25 -25
  124. package/components/ui/slider/slider.mdx +26 -26
  125. package/components/ui/sonner/sonner.mdx +26 -26
  126. package/components/ui/stats-card/stats-card.mdx +26 -26
  127. package/components/ui/stats-card/stats-card.stories.tsx +117 -117
  128. package/components/ui/stats-card/stats-card.tsx +109 -109
  129. package/components/ui/stepper/stepper.mdx +26 -26
  130. package/components/ui/switch/switch.mdx +25 -25
  131. package/components/ui/table/table.mdx +27 -27
  132. package/components/ui/tabs/tabs.mdx +26 -26
  133. package/components/ui/textarea/textarea.mdx +25 -25
  134. package/components/ui/timeline/timeline.mdx +26 -26
  135. package/components/ui/toggle/toggle.mdx +26 -26
  136. package/components/ui/toggle-group/toggle-group.mdx +26 -26
  137. package/components/ui/tooltip/tooltip.mdx +26 -26
  138. package/components/ui/tree-view/tree-view.mdx +26 -26
  139. package/components.json +511 -511
  140. package/contexts/BrandColorsContext.tsx +282 -282
  141. package/contexts/i18n-singleton.test.tsx +57 -0
  142. package/contexts/theme-data.ts +391 -391
  143. package/dist/{AssistantChart-DMJJ_Amf.js → AssistantChart-BMNSA_Pk.js} +5 -5
  144. package/dist/{AssistantChart-D0A1FPYt.cjs → AssistantChart-BzM7plyc.cjs} +150 -114
  145. package/dist/{AssistantChart-BXU1ACnh.js → AssistantChart-C842evTi.js} +134 -240
  146. package/dist/{AssistantChart-BZTPJ5dP.cjs → AssistantChart-CVF2uh37.cjs} +5 -5
  147. package/dist/{AssistantChart-COGiOV-g.cjs → AssistantChart-JooMdVQU.cjs} +17 -7
  148. package/dist/{AssistantChart-CWX1OWNM.js → AssistantChart-KHS-tp-L.js} +17 -7
  149. package/dist/{BrandColorsContext-BwY-b6M4.cjs → BrandColorsContext-B4_81eas.cjs} +2 -2
  150. package/dist/{BrandColorsContext-BMRJ04Wf.js → BrandColorsContext-DbK5LnQ_.js} +2 -2
  151. package/dist/{CodeBlock-CjeFavqV.js → CodeBlock-DiKO8ocT.js} +11 -11
  152. package/dist/{CodeBlock-CV6dtsTM.cjs → CodeBlock-ZYThr7Kn.cjs} +12 -9
  153. package/dist/{XerticaXLogo-mqjoBiLI.js → LanguageSelector-CmTj3lWq.js} +85 -82
  154. package/dist/{XerticaXLogo-BX3ueACh.js → LanguageSelector-DxW6o7bt.js} +81 -81
  155. package/dist/{XerticaXLogo-uQgwns_E.cjs → LanguageSelector-Sw73qvWV.cjs} +84 -81
  156. package/dist/{ThemeContext-BgclCB35.js → ThemeContext-BGeh_Kdr.js} +290 -212
  157. package/dist/{ThemeContext-BblcjQup.cjs → ThemeContext-D50irx5T.cjs} +291 -205
  158. package/dist/{VerifyEmailPage-C_Zk6Gen.cjs → VerifyEmailPage-B6bOrybJ.cjs} +17 -17
  159. package/dist/{VerifyEmailPage-B31mCrMc.js → VerifyEmailPage-BRE5Fz59.js} +8 -8
  160. package/dist/{VerifyEmailPage-BJjAMUTW.js → VerifyEmailPage-BcCluouh.js} +151 -78
  161. package/dist/VerifyEmailPage-Bx1sr0uQ.cjs +3298 -0
  162. package/dist/{VerifyEmailPage-X14vhdyl.js → VerifyEmailPage-DUYyXCX9.js} +12 -12
  163. package/dist/VerifyEmailPage-DXXMHbzq.js +3289 -0
  164. package/dist/{VerifyEmailPage-u_Dn7t1U.cjs → VerifyEmailPage-DpYtFk35.cjs} +21 -21
  165. package/dist/{VerifyEmailPage-Cyl55sJb.js → VerifyEmailPage-NXKWW3Dk.js} +134 -64
  166. package/dist/{VerifyEmailPage-Bv8Ah_TK.cjs → VerifyEmailPage-QrCz4Wqr.cjs} +143 -73
  167. package/dist/{VerifyEmailPage-CkBYfsNy.cjs → VerifyEmailPage-ZmQra0Wi.cjs} +160 -87
  168. package/dist/{XerticaProvider-BErr83Bg.js → XerticaProvider-BF3q_myt.js} +5 -4
  169. package/dist/{XerticaProvider-CeS5G_n5.cjs → XerticaProvider-C_JSOz1U.cjs} +2 -2
  170. package/dist/{XerticaProvider-CwOkHxiT.cjs → XerticaProvider-D5zjrqZq.cjs} +5 -4
  171. package/dist/{XerticaProvider-ra2NciRq.js → XerticaProvider-KTGl4Cn1.js} +2 -2
  172. package/dist/{alert-dialog-DqlRW_An.js → alert-dialog-BrpwXKwS.js} +3 -3
  173. package/dist/{alert-dialog-DhwPioBa.cjs → alert-dialog-CZU1Zase.cjs} +3 -3
  174. package/dist/{alert-dialog-KpoabzJb.js → alert-dialog-ClRoLH7l.js} +40 -56
  175. package/dist/{alert-dialog-B4M3vQKS.cjs → alert-dialog-DBBqvU-V.cjs} +53 -38
  176. package/dist/assistant.cjs.js +2 -2
  177. package/dist/assistant.es.js +2 -2
  178. package/dist/brand.cjs.js +6 -6
  179. package/dist/brand.es.js +2 -2
  180. package/dist/cli.js +63 -21
  181. package/dist/components/assistant/code-block/CodeBlock.d.ts +2 -1
  182. package/dist/components/assistant/formatted-document/FormattedDocument.d.ts +2 -1
  183. package/dist/components/assistant/markdown-message/MarkdownMessage.d.ts +2 -1
  184. package/dist/components/assistant/modern-chat-input/ModernChatInput.d.ts +2 -1
  185. package/dist/components/assistant/xertica-assistant/parts/AssistantCollapsedView.d.ts +2 -1
  186. package/dist/components/assistant/xertica-assistant/parts/AssistantConversationList.d.ts +2 -1
  187. package/dist/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.d.ts +2 -1
  188. package/dist/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.d.ts +2 -1
  189. package/dist/components/assistant/xertica-assistant/parts/AssistantHeader.d.ts +2 -1
  190. package/dist/components/assistant/xertica-assistant/parts/AssistantMessageBubble.d.ts +2 -1
  191. package/dist/components/assistant/xertica-assistant/parts/AssistantTabBar.d.ts +2 -1
  192. package/dist/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.d.ts +2 -1
  193. package/dist/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.d.ts +2 -1
  194. package/dist/components/assistant/xertica-assistant/types.d.ts +3 -2
  195. package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +1 -1
  196. package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +2 -1
  197. package/dist/components/blocks/card-patterns/ActivityCard.d.ts +1 -1
  198. package/dist/components/blocks/card-patterns/ActivityCardSkeleton.d.ts +1 -1
  199. package/dist/components/blocks/card-patterns/FeatureCard.d.ts +1 -1
  200. package/dist/components/blocks/card-patterns/FeatureCardSkeleton.d.ts +1 -1
  201. package/dist/components/blocks/card-patterns/NotificationCard.d.ts +1 -1
  202. package/dist/components/blocks/card-patterns/NotificationCardSkeleton.d.ts +1 -1
  203. package/dist/components/blocks/card-patterns/ProfileCard.d.ts +1 -1
  204. package/dist/components/blocks/card-patterns/ProfileCardSkeleton.d.ts +1 -1
  205. package/dist/components/blocks/card-patterns/ProjectCard.d.ts +1 -1
  206. package/dist/components/blocks/card-patterns/ProjectCardSkeleton.d.ts +1 -1
  207. package/dist/components/blocks/card-patterns/QuickActionCard.d.ts +1 -1
  208. package/dist/components/blocks/card-patterns/QuickActionCardSkeleton.d.ts +1 -1
  209. package/dist/components/brand/language-selector/LanguageSelector.d.ts +2 -1
  210. package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +2 -1
  211. package/dist/components/brand/xertica-logo/XerticaLogo.d.ts +2 -1
  212. package/dist/components/brand/xertica-orbe/XerticaOrbe.d.ts +2 -1
  213. package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +1 -1
  214. package/dist/components/brand/xertica-xlogo/XerticaXLogo.d.ts +2 -1
  215. package/dist/components/examples/DrawingMapExample.d.ts +2 -1
  216. package/dist/components/examples/FilterableMapExample.d.ts +1 -1
  217. package/dist/components/examples/MapShowcase.d.ts +2 -1
  218. package/dist/components/examples/SimpleFilterableMap.d.ts +2 -1
  219. package/dist/components/figma/ImageWithFallback.d.ts +1 -1
  220. package/dist/components/layout/header/header.d.ts +1 -1
  221. package/dist/components/layout/sidebar/sidebar.d.ts +25 -13
  222. package/dist/components/media/FloatingMediaWrapper.d.ts +1 -1
  223. package/dist/components/media/audio-player/AudioPlayer.d.ts +2 -1
  224. package/dist/components/media/video-player/VideoPlayer.d.ts +2 -1
  225. package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +2 -1
  226. package/dist/components/pages/home-content/HomeContent.d.ts +2 -1
  227. package/dist/components/pages/home-page/HomePage.d.ts +2 -1
  228. package/dist/components/pages/login-page/LoginPage.d.ts +2 -1
  229. package/dist/components/pages/reset-password-page/ResetPasswordPage.d.ts +2 -1
  230. package/dist/components/pages/template-content/TemplateContent.d.ts +2 -1
  231. package/dist/components/pages/template-page/TemplatePage.d.ts +2 -1
  232. package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +2 -1
  233. package/dist/components/shared/CustomTooltipContent.d.ts +1 -1
  234. package/dist/components/shared/assistant-utils.d.ts +3 -2
  235. package/dist/components/shared/error-boundary.d.ts +4 -4
  236. package/dist/components/shared/error-fallbacks.d.ts +4 -3
  237. package/dist/components/shared/navigation.d.ts +6 -2
  238. package/dist/components/ui/accordion/accordion.d.ts +4 -4
  239. package/dist/components/ui/alert/alert.d.ts +3 -3
  240. package/dist/components/ui/alert-dialog/alert-dialog.d.ts +10 -10
  241. package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts +1 -1
  242. package/dist/components/ui/assistant-chart/AssistantChart.d.ts +4 -3
  243. package/dist/components/ui/avatar/avatar.d.ts +3 -3
  244. package/dist/components/ui/badge/badge.d.ts +1 -1
  245. package/dist/components/ui/breadcrumb/breadcrumb.d.ts +7 -7
  246. package/dist/components/ui/calendar/calendar.d.ts +2 -2
  247. package/dist/components/ui/card/card.d.ts +7 -7
  248. package/dist/components/ui/carousel/carousel.d.ts +5 -5
  249. package/dist/components/ui/chart/chart.d.ts +16 -16
  250. package/dist/components/ui/collapsible/collapsible.d.ts +3 -3
  251. package/dist/components/ui/command/command.d.ts +9 -9
  252. package/dist/components/ui/context-menu/context-menu.d.ts +15 -15
  253. package/dist/components/ui/dialog/dialog.d.ts +9 -9
  254. package/dist/components/ui/drawer/drawer.d.ts +10 -10
  255. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +15 -15
  256. package/dist/components/ui/form/form.d.ts +7 -7
  257. package/dist/components/ui/google-maps-loader/google-maps-loader.d.ts +3 -3
  258. package/dist/components/ui/hover-card/hover-card.d.ts +3 -3
  259. package/dist/components/ui/input-otp/input-otp.d.ts +4 -4
  260. package/dist/components/ui/label/label.d.ts +1 -1
  261. package/dist/components/ui/menubar/menubar.d.ts +16 -16
  262. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +8 -8
  263. package/dist/components/ui/page-header/page-header.d.ts +3 -3
  264. package/dist/components/ui/pagination/pagination.d.ts +7 -7
  265. package/dist/components/ui/popover/popover.d.ts +4 -4
  266. package/dist/components/ui/progress/progress.d.ts +1 -1
  267. package/dist/components/ui/resizable/resizable.d.ts +11 -7
  268. package/dist/components/ui/rich-text-editor/rich-text-editor.d.ts +1 -1
  269. package/dist/components/ui/scroll-area/scroll-area.d.ts +2 -2
  270. package/dist/components/ui/separator/separator.d.ts +1 -1
  271. package/dist/components/ui/sheet/sheet.d.ts +10 -10
  272. package/dist/components/ui/skeleton/skeleton.d.ts +1 -1
  273. package/dist/components/ui/sonner/sonner.d.ts +2 -1
  274. package/dist/components/ui/stats-card/stats-card-skeleton.d.ts +1 -1
  275. package/dist/components/ui/table/table.d.ts +8 -8
  276. package/dist/components/ui/tabs/tabs.d.ts +4 -4
  277. package/dist/components/ui/tooltip/tooltip.d.ts +4 -4
  278. package/dist/contexts/ApiKeyContext.d.ts +2 -2
  279. package/dist/contexts/AssistenteContext.d.ts +1 -1
  280. package/dist/contexts/AuthContext.d.ts +1 -1
  281. package/dist/contexts/LanguageContext.d.ts +2 -2
  282. package/dist/contexts/LayoutContext.d.ts +2 -2
  283. package/dist/contexts/ThemeContext.d.ts +1 -1
  284. package/dist/features/assistant/hooks/useAssistantConfig.d.ts +1 -1
  285. package/dist/features/home/hooks/useDashboardStats.d.ts +1 -1
  286. package/dist/features/home/hooks/useFeatureCards.d.ts +1 -1
  287. package/dist/features/home/hooks/useTeamMembers.d.ts +1 -1
  288. package/dist/{google-maps-loader-BCe58h9D.js → google-maps-loader-BOug999f.js} +0 -4
  289. package/dist/{google-maps-loader-casMyxlo.cjs → google-maps-loader-DfeBRI8Q.cjs} +0 -5
  290. package/dist/hooks.cjs.js +2 -2
  291. package/dist/hooks.es.js +2 -2
  292. package/dist/{index-9GWd0qxq.cjs → index-BQjx1Mdf.cjs} +1 -1
  293. package/dist/index-Bei5DzAL.js +6 -0
  294. package/dist/index.cjs.js +18 -18
  295. package/dist/index.es.js +12 -12
  296. package/dist/{input-cc-PTD4R.js → input-B0_vbA3g.js} +3 -61
  297. package/dist/{input-C_UiS2Py.cjs → input-ByYuOv8A.cjs} +1 -62
  298. package/dist/layout.cjs.js +1 -1
  299. package/dist/layout.es.js +1 -1
  300. package/dist/pages.cjs.js +1 -1
  301. package/dist/pages.es.js +1 -1
  302. package/dist/{rich-text-editor-DxO1Hz3a.cjs → rich-text-editor-BuqSu718.cjs} +70 -5
  303. package/dist/{rich-text-editor-DqLICivI.js → rich-text-editor-CV8FtA_l.js} +68 -6
  304. package/dist/{rich-text-editor-DloeW0wc.js → rich-text-editor-DV1SixzE.js} +61 -3
  305. package/dist/{rich-text-editor-B2CKz7nx.cjs → rich-text-editor-DnSDglzW.cjs} +63 -2
  306. package/dist/{sidebar-BS1p2V7t.cjs → sidebar-BGJ0j567.cjs} +367 -9
  307. package/dist/{sidebar-3XyzjVBw.js → sidebar-BI6mZlC8.js} +364 -6
  308. package/dist/{sidebar-DyYvgyBj.cjs → sidebar-BtmotOg-.cjs} +367 -9
  309. package/dist/{sidebar-Duermn32.js → sidebar-D3EgGVxF.js} +77 -63
  310. package/dist/{sidebar-CLmIjgNd.cjs → sidebar-DDTqMGnR.cjs} +80 -66
  311. package/dist/{sidebar-B4ZWaMrE.js → sidebar-I7EXyf5D.js} +364 -6
  312. package/dist/ui.cjs.js +7 -7
  313. package/dist/ui.es.js +5 -5
  314. package/dist/{xertica-assistant-QFUnv5I2.cjs → xertica-assistant-BrF9jScR.cjs} +4 -4
  315. package/dist/{xertica-assistant-BbgzsgsG.js → xertica-assistant-CJVnvMqU.js} +55 -45
  316. package/dist/{xertica-assistant-d2qs2Vd9.cjs → xertica-assistant-CKPtc1z5.cjs} +58 -40
  317. package/dist/{xertica-assistant-CyikE3N_.js → xertica-assistant-CsBsxTsI.js} +2 -2
  318. package/dist/{xertica-assistant-CIaUlbIt.cjs → xertica-assistant-DER0brPQ.cjs} +6 -5
  319. package/dist/{xertica-assistant-B1NaSFFj.js → xertica-assistant-DQCjpk5M.js} +4 -3
  320. package/dist/{xertica-assistant-B687qEPU.js → xertica-assistant-Dk-9AJzw.js} +16 -7
  321. package/dist/{xertica-assistant-sOHwTgIP.cjs → xertica-assistant-DxhIKvuY.cjs} +18 -9
  322. package/dist/xertica-ui.css +2 -2
  323. package/docs/components/audio-player.md +1 -1
  324. package/docs/components/sidebar.md +331 -331
  325. package/docs/components/stats-card.md +138 -138
  326. package/docs/components/toggle.md +12 -0
  327. package/docs/doc-audit.md +35 -229
  328. package/docs/i18n.md +31 -10
  329. package/docs/llms.md +6 -4
  330. package/llms-compact.txt +444 -444
  331. package/llms-full.txt +12144 -12144
  332. package/llms.txt +187 -187
  333. package/package.json +223 -219
  334. package/scripts/a11y-audit.mjs +162 -162
  335. package/scripts/fix-stories.cjs +19 -19
  336. package/styles/globals.css +0 -1
  337. package/styles/xertica/base.css +8 -0
  338. package/styles/xertica/tokens.css +240 -240
  339. package/templates/.env.example +2 -2
  340. package/templates/.prettierignore +4 -4
  341. package/templates/.prettierrc +10 -10
  342. package/templates/guidelines/Guidelines.md +865 -865
  343. package/templates/index.html +13 -13
  344. package/templates/package.json +69 -69
  345. package/templates/src/app/components/AuthGuard.tsx +11 -0
  346. package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
  347. package/templates/src/features/home/ui/HomeContent.tsx +2 -3
  348. package/templates/src/features/settings/index.ts +2 -0
  349. package/templates/src/features/settings/ui/SettingsContent.tsx +134 -0
  350. package/templates/src/features/template/ui/TemplateContent.tsx +2 -3
  351. package/templates/src/i18n.ts +36 -13
  352. package/templates/src/locales/en/pages/settings.json +15 -0
  353. package/templates/src/locales/es/pages/settings.json +15 -0
  354. package/templates/src/locales/pt-BR/pages/settings.json +15 -0
  355. package/templates/src/pages/SettingsPage.tsx +28 -0
  356. package/templates/src/shared/config/navigation.ts +2 -2
  357. package/templates/src/styles/xertica/tokens.css +240 -240
  358. package/templates/vite.config.d.ts +2 -2
  359. package/templates/vite.config.js +20 -20
  360. package/utils/gemini.ts +2 -2
  361. package/dist/AssistantChart-9w31gdAb.cjs +0 -3363
  362. package/dist/AssistantChart-BAudAfne.cjs +0 -3591
  363. package/dist/AssistantChart-BAx9VQvb.cjs +0 -3374
  364. package/dist/AssistantChart-BP8upjMk.js +0 -3565
  365. package/dist/AssistantChart-CVko2A1W.js +0 -3348
  366. package/dist/AssistantChart-CVzmmhx4.js +0 -3337
  367. package/dist/AssistantChart-CeU2dIb6.js +0 -3469
  368. package/dist/AssistantChart-DO5UuX4J.cjs +0 -3495
  369. package/dist/AudioPlayer-1ypwE2Wh.cjs +0 -936
  370. package/dist/AudioPlayer-BJ2IuRQW.cjs +0 -1275
  371. package/dist/AudioPlayer-BWDW6TN9.cjs +0 -1279
  372. package/dist/AudioPlayer-CM962GEh.js +0 -1280
  373. package/dist/AudioPlayer-CbZId7cj.cjs +0 -998
  374. package/dist/AudioPlayer-DU8zt8-z.js +0 -999
  375. package/dist/AudioPlayer-DuKXrCfy.js +0 -937
  376. package/dist/AudioPlayer-Xxma6_-H.js +0 -1276
  377. package/dist/BrandColorsContext-DLVJgtmH.js +0 -666
  378. package/dist/BrandColorsContext-DZT7JjeD.js +0 -659
  379. package/dist/BrandColorsContext-GUyFmkX0.cjs +0 -665
  380. package/dist/BrandColorsContext-awnBCmC4.cjs +0 -666
  381. package/dist/CodeBlock-C2ZUXt8V.js +0 -219
  382. package/dist/CodeBlock-C5oYnLQp.cjs +0 -218
  383. package/dist/CodeBlock-DuxdtN-l.js +0 -219
  384. package/dist/CodeBlock-POVYONvC.cjs +0 -218
  385. package/dist/CustomTooltipContent-BT6brkVJ.cjs +0 -49
  386. package/dist/CustomTooltipContent-CfOfikhq.js +0 -33
  387. package/dist/CustomTooltipContent-DHjkY0ww.js +0 -40
  388. package/dist/CustomTooltipContent-c_K-DWRr.cjs +0 -56
  389. package/dist/FeatureCard-9GhnlgL3.js +0 -336
  390. package/dist/FeatureCard-Bcb3Zi54.js +0 -302
  391. package/dist/FeatureCard-Cfs6Ishq.js +0 -485
  392. package/dist/FeatureCard-CkPd2psQ.cjs +0 -301
  393. package/dist/FeatureCard-Dkp-xmzM.cjs +0 -335
  394. package/dist/FeatureCard-ie3L8Fpr.cjs +0 -484
  395. package/dist/FeatureCardSkeleton-CAgu8stE.js +0 -27
  396. package/dist/FeatureCardSkeleton-mO3Bdm_V.cjs +0 -26
  397. package/dist/LanguageContext-BwhwC3G2.js +0 -657
  398. package/dist/LanguageContext-DvUt5jBg.cjs +0 -656
  399. package/dist/LayoutContext-BDmcZfMH.cjs +0 -84
  400. package/dist/LayoutContext-C4kKN9RV.cjs +0 -93
  401. package/dist/LayoutContext-CGEe1oPq.js +0 -94
  402. package/dist/LayoutContext-CwT5KLiW.cjs +0 -104
  403. package/dist/LayoutContext-DVLCsoQn.js +0 -105
  404. package/dist/LayoutContext-dbQvdC4O.js +0 -85
  405. package/dist/ThemeContext-BbBNoFTG.js +0 -735
  406. package/dist/ThemeContext-Bo-W2WZH.js +0 -1856
  407. package/dist/ThemeContext-CP3a0jxy.cjs +0 -1855
  408. package/dist/ThemeContext-Cmr8Ex8H.cjs +0 -734
  409. package/dist/ThemeContext-CpqYShLq.cjs +0 -324
  410. package/dist/ThemeContext-D3LzacmG.js +0 -188
  411. package/dist/ThemeContext-DQUOeziy.cjs +0 -1855
  412. package/dist/ThemeContext-Du2nE1PL.js +0 -325
  413. package/dist/ThemeContext-GeEBTJ3q.cjs +0 -1621
  414. package/dist/ThemeContext-JyLK9B1o.js +0 -1622
  415. package/dist/ThemeContext-RTy1m2Uq.js +0 -82
  416. package/dist/ThemeContext-U4dEYc6C.cjs +0 -187
  417. package/dist/ThemeContext-bSzuOit2.cjs +0 -81
  418. package/dist/ThemeContext-ept8jhXI.js +0 -1856
  419. package/dist/VerifyEmailPage-BE-L9mB7.js +0 -2828
  420. package/dist/VerifyEmailPage-BIBOKV7Z.js +0 -3214
  421. package/dist/VerifyEmailPage-BRSP-Pwt.cjs +0 -3196
  422. package/dist/VerifyEmailPage-Bae2cBXT.cjs +0 -2827
  423. package/dist/VerifyEmailPage-BiRm7Nh4.cjs +0 -3213
  424. package/dist/VerifyEmailPage-Bvfv8HVQ.js +0 -3214
  425. package/dist/VerifyEmailPage-CR7kb5df.cjs +0 -2827
  426. package/dist/VerifyEmailPage-C_ihbcth.js +0 -2828
  427. package/dist/VerifyEmailPage-CbgjOF0v.js +0 -2828
  428. package/dist/VerifyEmailPage-CdYPSJoO.js +0 -2828
  429. package/dist/VerifyEmailPage-D-FRj5TU.cjs +0 -3213
  430. package/dist/VerifyEmailPage-DF2ilhum.cjs +0 -3210
  431. package/dist/VerifyEmailPage-DMBh4NM9.cjs +0 -2827
  432. package/dist/VerifyEmailPage-DTtFfC-J.js +0 -3197
  433. package/dist/VerifyEmailPage-Dt7zgA4w.cjs +0 -2827
  434. package/dist/VerifyEmailPage-EhudUdqF.js +0 -3211
  435. package/dist/VerifyEmailPage-RrUApqBN.js +0 -3214
  436. package/dist/VerifyEmailPage-VoMI7MYH.cjs +0 -3213
  437. package/dist/VerifyEmailPage-hdB8JQGv.cjs +0 -3213
  438. package/dist/VerifyEmailPage-vYHbYK3q.js +0 -3214
  439. package/dist/XerticaOrbe-BCUVSPPB.cjs +0 -1924
  440. package/dist/XerticaOrbe-BGIB1CTK.js +0 -1355
  441. package/dist/XerticaOrbe-By8eEvR-.js +0 -1925
  442. package/dist/XerticaOrbe-FWGjBj0U.cjs +0 -1354
  443. package/dist/XerticaProvider-AChwphCO.cjs +0 -48
  444. package/dist/XerticaProvider-AbWlr7Af.cjs +0 -48
  445. package/dist/XerticaProvider-B8CaV7xu.cjs +0 -39
  446. package/dist/XerticaProvider-BITjgC5p.js +0 -39
  447. package/dist/XerticaProvider-BSyFrmC0.js +0 -49
  448. package/dist/XerticaProvider-By8q3Roe.cjs +0 -38
  449. package/dist/XerticaProvider-CUYJZc32.js +0 -49
  450. package/dist/XerticaProvider-CW9hpCdF.cjs +0 -39
  451. package/dist/XerticaProvider-CWgby5mY.js +0 -49
  452. package/dist/XerticaProvider-CWs6EwNa.js +0 -49
  453. package/dist/XerticaProvider-CiNKjMx1.cjs +0 -48
  454. package/dist/XerticaProvider-CjQAQPcn.cjs +0 -48
  455. package/dist/XerticaProvider-D5lLumH-.js +0 -49
  456. package/dist/XerticaProvider-DQtvJU7m.js +0 -40
  457. package/dist/XerticaProvider-DUOJg9iX.js +0 -49
  458. package/dist/XerticaProvider-Dl_b72_l.cjs +0 -51
  459. package/dist/XerticaProvider-qQUDop71.cjs +0 -48
  460. package/dist/XerticaProvider-siSt9uG2.js +0 -40
  461. package/dist/XerticaXLogo-8TTzBjHw.cjs +0 -251
  462. package/dist/XerticaXLogo-B2svDGZh.cjs +0 -251
  463. package/dist/XerticaXLogo-BWaag64t.js +0 -252
  464. package/dist/XerticaXLogo-CFuIlYFH.js +0 -252
  465. package/dist/XerticaXLogo-CU-U-GP4.cjs +0 -251
  466. package/dist/XerticaXLogo-ChryA6xj.js +0 -252
  467. package/dist/XerticaXLogo-CowGv7BC.js +0 -252
  468. package/dist/XerticaXLogo-CziKMQil.cjs +0 -242
  469. package/dist/XerticaXLogo-D8jf0SNv.cjs +0 -214
  470. package/dist/XerticaXLogo-DHz5SugF.js +0 -252
  471. package/dist/XerticaXLogo-DTee_y8X.cjs +0 -251
  472. package/dist/XerticaXLogo-DfUvz-lD.js +0 -243
  473. package/dist/XerticaXLogo-DzXKZBtG.js +0 -231
  474. package/dist/XerticaXLogo-fAJMy3H4.js +0 -215
  475. package/dist/XerticaXLogo-kslQ8Tk_.cjs +0 -251
  476. package/dist/XerticaXLogo-xWbElCZj.cjs +0 -230
  477. package/dist/alert-dialog-iDe5VE5o.js +0 -842
  478. package/dist/alert-dialog-yckpaOpy.cjs +0 -865
  479. package/dist/avatar-Cq5_E8r9.cjs +0 -78
  480. package/dist/avatar-CuYu2MKt.cjs +0 -72
  481. package/dist/avatar-Cxyofu1H.js +0 -56
  482. package/dist/avatar-DSBfJMRJ.js +0 -62
  483. package/dist/breadcrumb-CVzzzqfo.js +0 -103
  484. package/dist/breadcrumb-DIJ0X3Ot.js +0 -96
  485. package/dist/breadcrumb-DjSxkjlQ.cjs +0 -95
  486. package/dist/breadcrumb-DnDlQFg2.cjs +0 -102
  487. package/dist/button-0CXwCRTm.cjs +0 -85
  488. package/dist/button-Bnv9SvYK.cjs +0 -79
  489. package/dist/button-C6uvh0rV.js +0 -63
  490. package/dist/button-qkz7Icqf.js +0 -69
  491. package/dist/card-B8-Gl5DL.js +0 -73
  492. package/dist/card-Bv_c57KU.cjs +0 -72
  493. package/dist/card-DJTsYhLL.cjs +0 -89
  494. package/dist/card-fi8zAN-I.js +0 -90
  495. package/dist/dropdown-menu-B_uEXNc4.cjs +0 -220
  496. package/dist/dropdown-menu-CFuCssWA.js +0 -204
  497. package/dist/dropdown-menu-Ze1YZFyc.cjs +0 -247
  498. package/dist/dropdown-menu-nc_Lvg-u.js +0 -231
  499. package/dist/google-maps-loader-BVoVhUwA.js +0 -316
  500. package/dist/google-maps-loader-BqsYL48U.cjs +0 -285
  501. package/dist/google-maps-loader-DjJaYhV6.cjs +0 -316
  502. package/dist/google-maps-loader-t2IlYBzw.js +0 -286
  503. package/dist/index-B7A523O_.js +0 -8
  504. package/dist/index-BabBx2pa.js +0 -6
  505. package/dist/index-CkTUgOwX.js +0 -8
  506. package/dist/index-D3RLKRAs.cjs +0 -7
  507. package/dist/index-DmHhnb7a.cjs +0 -7
  508. package/dist/index.umd.js +0 -13712
  509. package/dist/input-CNFHVKvo.cjs +0 -145
  510. package/dist/input-CPl84zAx.cjs +0 -151
  511. package/dist/input-D-6IsAca.js +0 -133
  512. package/dist/input-wPYg0d0P.js +0 -127
  513. package/dist/progress-BLwqortq.cjs +0 -105
  514. package/dist/progress-Cs9i4DPx.js +0 -81
  515. package/dist/progress-D9mtsf6j.js +0 -89
  516. package/dist/progress-DDeuWPZw.cjs +0 -97
  517. package/dist/rich-text-editor-1UW3Y2JK.js +0 -2891
  518. package/dist/rich-text-editor-BM-LPpTh.js +0 -2902
  519. package/dist/rich-text-editor-BmsjY03B.js +0 -2949
  520. package/dist/rich-text-editor-BrdC5evx.js +0 -2244
  521. package/dist/rich-text-editor-CyggTOLQ.cjs +0 -2908
  522. package/dist/rich-text-editor-DbV-S7Fi.cjs +0 -2261
  523. package/dist/rich-text-editor-DoCkKhzk.cjs +0 -2919
  524. package/dist/rich-text-editor-GS2kpTAK.cjs +0 -2966
  525. package/dist/routes.d.ts +0 -10
  526. package/dist/select-Cmb8zF7w.cjs +0 -156
  527. package/dist/select-CprSNX0z.js +0 -139
  528. package/dist/select-DT7Zjn42.cjs +0 -162
  529. package/dist/select-En8DkoaQ.js +0 -145
  530. package/dist/sidebar-B3EYhli0.cjs +0 -800
  531. package/dist/sidebar-B9NR0lCe.cjs +0 -800
  532. package/dist/sidebar-BcJ6LxvX.cjs +0 -733
  533. package/dist/sidebar-BvF5I2Ue.cjs +0 -800
  534. package/dist/sidebar-C5B_LHek.cjs +0 -795
  535. package/dist/sidebar-CA6_ek3f.js +0 -801
  536. package/dist/sidebar-CRMiBtAi.js +0 -801
  537. package/dist/sidebar-CVUGHOS_.cjs +0 -756
  538. package/dist/sidebar-CZ2mWaMM.cjs +0 -800
  539. package/dist/sidebar-CmvwjnVb.js +0 -757
  540. package/dist/sidebar-CplprZpM.js +0 -801
  541. package/dist/sidebar-Dz7bd3zP.js +0 -796
  542. package/dist/sidebar-KIS0C2JH.js +0 -801
  543. package/dist/sidebar-OTO_up7Z.js +0 -801
  544. package/dist/sidebar-WoKvFWCN.js +0 -717
  545. package/dist/sidebar-zowjejT2.cjs +0 -800
  546. package/dist/skeleton-4zoHiFJ_.cjs +0 -83
  547. package/dist/skeleton-C4bHqUBf.js +0 -84
  548. package/dist/slider-C0JKA9k3.js +0 -56
  549. package/dist/slider-CPmwzm_3.cjs +0 -73
  550. package/dist/slider-DcJharR9.cjs +0 -73
  551. package/dist/slider-Pay3fka2.js +0 -56
  552. package/dist/sonner-DeUIj0Zg.cjs +0 -63
  553. package/dist/sonner-g9RIfi35.js +0 -47
  554. package/dist/tooltip-CNtsL5cB.cjs +0 -71
  555. package/dist/tooltip-CTyZCD8h.js +0 -55
  556. package/dist/tooltip-CwgSdy3h.cjs +0 -67
  557. package/dist/tooltip-D-OrYnKO.js +0 -51
  558. package/dist/use-audio-player-BJFV24XW.js +0 -188
  559. package/dist/use-audio-player-Bkh23vQ3.js +0 -177
  560. package/dist/use-audio-player-Dn1NR9xN.cjs +0 -176
  561. package/dist/use-audio-player-DyVYlOnR.cjs +0 -187
  562. package/dist/use-mobile-BB4M_4Ru.cjs +0 -47
  563. package/dist/use-mobile-CLu9nqGL.js +0 -31
  564. package/dist/use-mobile-CNwiBNxu.js +0 -33
  565. package/dist/use-mobile-Dlf74ufz.cjs +0 -49
  566. package/dist/xertica-assistant-B1IaHXnB.cjs +0 -1894
  567. package/dist/xertica-assistant-BMqdyRVi.js +0 -2082
  568. package/dist/xertica-assistant-Bj3vBCq_.cjs +0 -2081
  569. package/dist/xertica-assistant-CfBCo21g.js +0 -2148
  570. package/dist/xertica-assistant-DIM_Do1k.js +0 -1866
  571. package/dist/xertica-assistant-DPsESB6t.js +0 -1878
  572. package/dist/xertica-assistant-DrsRwla1.cjs +0 -2147
  573. package/dist/xertica-assistant-Qp3ydksa.cjs +0 -1882
  574. package/dist/xertica-assistant-gnCJdcZY.js +0 -1866
  575. package/dist/xertica-assistant-yyrR0JKl.cjs +0 -1882
  576. package/styles/xertica/app-overrides/scrollbar.css +0 -33
  577. package/dist/{XerticaXLogo-qBPhwK3g.cjs → LanguageSelector-1cINLJ23.cjs} +80 -80
@@ -1,3495 +0,0 @@
1
- "use strict";
2
- const jsxRuntime = require("react/jsx-runtime");
3
- const AspectRatioPrimitive = require("@radix-ui/react-aspect-ratio");
4
- const lucideReact = require("lucide-react");
5
- const React = require("react");
6
- const button = require("./button-Bnv9SvYK.cjs");
7
- const NavigationMenuPrimitive = require("@radix-ui/react-navigation-menu");
8
- const classVarianceAuthority = require("class-variance-authority");
9
- const ToggleGroupPrimitive = require("@radix-ui/react-toggle-group");
10
- const TogglePrimitive = require("@radix-ui/react-toggle");
11
- const inputOtp = require("input-otp");
12
- const reactSlot = require("@radix-ui/react-slot");
13
- const reactHookForm = require("react-hook-form");
14
- const alertDialog = require("./alert-dialog-B4M3vQKS.cjs");
15
- const reactDayPicker = require("react-day-picker");
16
- const DialogPrimitive = require("@radix-ui/react-dialog");
17
- const vaul = require("vaul");
18
- const HoverCardPrimitive = require("@radix-ui/react-hover-card");
19
- const ContextMenuPrimitive = require("@radix-ui/react-context-menu");
20
- const MenubarPrimitive = require("@radix-ui/react-menubar");
21
- const cmdk = require("cmdk");
22
- const richTextEditor = require("./rich-text-editor-DoCkKhzk.cjs");
23
- const card = require("./card-Bv_c57KU.cjs");
24
- const CollapsiblePrimitive = require("@radix-ui/react-collapsible");
25
- const AccordionPrimitive = require("@radix-ui/react-accordion");
26
- const useEmblaCarousel = require("embla-carousel-react");
27
- const googleMapsLoader = require("./google-maps-loader-DjJaYhV6.cjs");
28
- const RechartsPrimitive = require("recharts");
29
- var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
30
- function _interopNamespaceDefault(e) {
31
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
32
- if (e) {
33
- for (const k in e) {
34
- if (k !== "default") {
35
- const d = Object.getOwnPropertyDescriptor(e, k);
36
- Object.defineProperty(n, k, d.get ? d : {
37
- enumerable: true,
38
- get: () => e[k]
39
- });
40
- }
41
- }
42
- }
43
- n.default = e;
44
- return Object.freeze(n);
45
- }
46
- const AspectRatioPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AspectRatioPrimitive);
47
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
48
- const NavigationMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(NavigationMenuPrimitive);
49
- const ToggleGroupPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(ToggleGroupPrimitive);
50
- const TogglePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TogglePrimitive);
51
- const DialogPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DialogPrimitive);
52
- const HoverCardPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(HoverCardPrimitive);
53
- const ContextMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(ContextMenuPrimitive);
54
- const MenubarPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(MenubarPrimitive);
55
- const CollapsiblePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CollapsiblePrimitive);
56
- const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
57
- function AspectRatio({ ...props }) {
58
- return /* @__PURE__ */ jsxRuntime.jsx(AspectRatioPrimitive__namespace.Root, { "data-slot": "aspect-ratio", ...props });
59
- }
60
- const ResizableContext = React__namespace.createContext(null);
61
- const ResizablePanelGroup = ({
62
- children,
63
- className,
64
- direction = "horizontal",
65
- id,
66
- autoSaveId,
67
- storage,
68
- onLayout,
69
- ...props
70
- }) => {
71
- const [panels, setPanels] = React__namespace.useState(/* @__PURE__ */ new Map());
72
- const [handles, setHandles] = React__namespace.useState(/* @__PURE__ */ new Map());
73
- const [sizes, setSizes] = React__namespace.useState(/* @__PURE__ */ new Map());
74
- const [isDragging, setIsDragging] = React__namespace.useState(false);
75
- const containerRef = React__namespace.useRef(null);
76
- const getSortedItems = React__namespace.useCallback(
77
- (items) => {
78
- if (!containerRef.current) return [];
79
- return Array.from(items.values()).sort((a, b) => {
80
- if (!a.ref.current || !b.ref.current) return 0;
81
- const position = a.ref.current.compareDocumentPosition(b.ref.current);
82
- if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
83
- if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
84
- return 0;
85
- });
86
- },
87
- []
88
- );
89
- React__namespace.useEffect(() => {
90
- const sortedPanels = getSortedItems(panels);
91
- if (sortedPanels.length === 0) return;
92
- const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
93
- if (uninitialized) {
94
- const newSizes = new Map(sizes);
95
- const remainingSpace = 100;
96
- const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
97
- let usedSpace = 0;
98
- sortedPanels.forEach((p) => {
99
- if (p.defaultSize) usedSpace += p.defaultSize;
100
- });
101
- const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
102
- const countOthers = sortedPanels.length - defaultSizeCount;
103
- const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
104
- sortedPanels.forEach((p) => {
105
- if (!newSizes.has(p.id)) {
106
- newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
107
- }
108
- });
109
- setSizes(newSizes);
110
- }
111
- }, [panels, sizes, getSortedItems]);
112
- const registerPanel = React__namespace.useCallback((data) => {
113
- setPanels((prev) => {
114
- const next = new Map(prev);
115
- next.set(data.id, data);
116
- return next;
117
- });
118
- }, []);
119
- const unregisterPanel = React__namespace.useCallback((id2) => {
120
- setPanels((prev) => {
121
- const next = new Map(prev);
122
- next.delete(id2);
123
- return next;
124
- });
125
- setSizes((prev) => {
126
- const next = new Map(prev);
127
- next.delete(id2);
128
- return next;
129
- });
130
- }, []);
131
- const registerHandle = React__namespace.useCallback((data) => {
132
- setHandles((prev) => {
133
- const next = new Map(prev);
134
- next.set(data.id, data);
135
- return next;
136
- });
137
- }, []);
138
- const unregisterHandle = React__namespace.useCallback((id2) => {
139
- setHandles((prev) => {
140
- const next = new Map(prev);
141
- next.delete(id2);
142
- return next;
143
- });
144
- }, []);
145
- const startDragging = React__namespace.useCallback(
146
- (handleId, event) => {
147
- var _a, _b;
148
- event.preventDefault();
149
- setIsDragging(true);
150
- const sortedPanels = getSortedItems(panels);
151
- const sortedHandles = getSortedItems(handles);
152
- const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
153
- if (handleIndex === -1) return;
154
- const leftPanel = sortedPanels[handleIndex];
155
- const rightPanel = sortedPanels[handleIndex + 1];
156
- if (!leftPanel || !rightPanel) return;
157
- const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
158
- const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
159
- const startSizeLeft = sizes.get(leftPanel.id) || 0;
160
- const startSizeRight = sizes.get(rightPanel.id) || 0;
161
- const containerSize = direction === "horizontal" ? ((_a = containerRef.current) == null ? void 0 : _a.offsetWidth) || 1 : ((_b = containerRef.current) == null ? void 0 : _b.offsetHeight) || 1;
162
- const onMove = (e) => {
163
- var _a2, _b2;
164
- const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
165
- const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
166
- const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
167
- const deltaPercent = deltaPixels / containerSize * 100;
168
- let finalLeft = startSizeLeft + deltaPercent;
169
- let finalRight = startSizeRight - deltaPercent;
170
- if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
171
- const diff = leftPanel.minSize - finalLeft;
172
- finalLeft = leftPanel.minSize;
173
- finalRight -= diff;
174
- }
175
- if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
176
- const diff = rightPanel.minSize - finalRight;
177
- finalRight = rightPanel.minSize;
178
- finalLeft -= diff;
179
- }
180
- if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
181
- const diff = finalLeft - leftPanel.maxSize;
182
- finalLeft = leftPanel.maxSize;
183
- finalRight += diff;
184
- }
185
- if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
186
- const diff = finalRight - rightPanel.maxSize;
187
- finalRight = rightPanel.maxSize;
188
- finalLeft -= diff;
189
- }
190
- finalLeft = Math.max(0, Math.min(100, finalLeft));
191
- finalRight = Math.max(0, Math.min(100, finalRight));
192
- setSizes((prev) => {
193
- const next = new Map(prev);
194
- next.set(leftPanel.id, finalLeft);
195
- next.set(rightPanel.id, finalRight);
196
- return next;
197
- });
198
- (_a2 = leftPanel.onResize) == null ? void 0 : _a2.call(leftPanel, finalLeft);
199
- (_b2 = rightPanel.onResize) == null ? void 0 : _b2.call(rightPanel, finalRight);
200
- };
201
- const onUp = () => {
202
- setIsDragging(false);
203
- window.removeEventListener("mousemove", onMove);
204
- window.removeEventListener("mouseup", onUp);
205
- window.removeEventListener("touchmove", onMove);
206
- window.removeEventListener("touchend", onUp);
207
- if (onLayout) {
208
- onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
209
- }
210
- };
211
- window.addEventListener("mousemove", onMove);
212
- window.addEventListener("mouseup", onUp);
213
- window.addEventListener("touchmove", onMove);
214
- window.addEventListener("touchend", onUp);
215
- },
216
- [panels, handles, sizes, direction, getSortedItems, onLayout]
217
- );
218
- const getPanelStyle = React__namespace.useCallback(
219
- (id2) => {
220
- const size = sizes.get(id2);
221
- if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
222
- return { flex: `${size} 1 0%`, overflow: "hidden" };
223
- },
224
- [sizes]
225
- );
226
- const contextValue = React__namespace.useMemo(
227
- () => ({
228
- direction,
229
- registerPanel,
230
- unregisterPanel,
231
- registerHandle,
232
- unregisterHandle,
233
- isDragging,
234
- startDragging,
235
- getPanelStyle
236
- }),
237
- [
238
- direction,
239
- registerPanel,
240
- unregisterPanel,
241
- registerHandle,
242
- unregisterHandle,
243
- isDragging,
244
- startDragging,
245
- getPanelStyle
246
- ]
247
- );
248
- return /* @__PURE__ */ jsxRuntime.jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
249
- "div",
250
- {
251
- ref: containerRef,
252
- "data-slot": "resizable-panel-group",
253
- "data-panel-group-direction": direction,
254
- className: button.cn(
255
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
256
- className
257
- ),
258
- ...props,
259
- children
260
- }
261
- ) });
262
- };
263
- const ResizablePanel = ({
264
- className,
265
- defaultSize,
266
- minSize = 0,
267
- maxSize = 100,
268
- collapsible,
269
- collapsedSize,
270
- onCollapse,
271
- onExpand,
272
- onResize,
273
- order,
274
- tagName,
275
- id: propId,
276
- children,
277
- ...props
278
- }) => {
279
- const context = React__namespace.useContext(ResizableContext);
280
- const ref = React__namespace.useRef(null);
281
- const [generatedId] = React__namespace.useState(() => Math.random().toString(36).substr(2, 9));
282
- const id = propId || generatedId;
283
- const registerPanel = context == null ? void 0 : context.registerPanel;
284
- const unregisterPanel = context == null ? void 0 : context.unregisterPanel;
285
- React__namespace.useLayoutEffect(() => {
286
- if (!registerPanel || !unregisterPanel) return;
287
- registerPanel({
288
- id,
289
- ref,
290
- defaultSize,
291
- minSize,
292
- maxSize,
293
- collapsible,
294
- onCollapse,
295
- onExpand,
296
- onResize
297
- });
298
- return () => unregisterPanel(id);
299
- }, [
300
- registerPanel,
301
- unregisterPanel,
302
- id,
303
- defaultSize,
304
- minSize,
305
- maxSize,
306
- collapsible,
307
- onCollapse,
308
- onExpand,
309
- onResize
310
- ]);
311
- if (!context) {
312
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("flex-1", className), ...props, children });
313
- }
314
- return /* @__PURE__ */ jsxRuntime.jsx(
315
- "div",
316
- {
317
- ref,
318
- "data-slot": "resizable-panel",
319
- className: button.cn("relative transition-[flex-grow] duration-0", className),
320
- style: context.getPanelStyle(id),
321
- ...props,
322
- children
323
- }
324
- );
325
- };
326
- const ResizableHandle = ({
327
- withHandle,
328
- className,
329
- id: propId,
330
- tagName,
331
- ...props
332
- }) => {
333
- const context = React__namespace.useContext(ResizableContext);
334
- const ref = React__namespace.useRef(null);
335
- const [generatedId] = React__namespace.useState(() => Math.random().toString(36).substr(2, 9));
336
- const id = propId || generatedId;
337
- const registerHandle = context == null ? void 0 : context.registerHandle;
338
- const unregisterHandle = context == null ? void 0 : context.unregisterHandle;
339
- React__namespace.useLayoutEffect(() => {
340
- if (!registerHandle || !unregisterHandle) return;
341
- registerHandle({ id, ref });
342
- return () => unregisterHandle(id);
343
- }, [registerHandle, unregisterHandle, id]);
344
- const handleMouseDown = (e) => {
345
- if (context) {
346
- context.startDragging(id, e);
347
- }
348
- };
349
- if (!context) return null;
350
- return /* @__PURE__ */ jsxRuntime.jsx(
351
- "div",
352
- {
353
- ref,
354
- "data-slot": "resizable-handle",
355
- className: button.cn(
356
- "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
357
- "touch-none select-none",
358
- context.direction === "vertical" ? "h-px w-full cursor-row-resize after:left-0 after:h-1 after:w-full after:-translate-y-1/2 hover:after:h-4" : "w-px h-full cursor-col-resize after:top-0 after:w-1 after:h-full after:-translate-x-1/2 hover:after:w-4",
359
- "after:absolute after:z-10",
360
- className
361
- ),
362
- onMouseDown: handleMouseDown,
363
- onTouchStart: handleMouseDown,
364
- ...props,
365
- children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVerticalIcon, { className: "size-2.5" }) })
366
- }
367
- );
368
- };
369
- function NavigationMenu({
370
- className,
371
- children,
372
- viewport = true,
373
- ...props
374
- }) {
375
- return /* @__PURE__ */ jsxRuntime.jsxs(
376
- NavigationMenuPrimitive__namespace.Root,
377
- {
378
- "data-slot": "navigation-menu",
379
- className: button.cn("relative z-10 flex w-full flex-1 items-center justify-center", className),
380
- ...props,
381
- children: [
382
- children,
383
- viewport && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuViewport, {})
384
- ]
385
- }
386
- );
387
- }
388
- function NavigationMenuList({
389
- className,
390
- ...props
391
- }) {
392
- return /* @__PURE__ */ jsxRuntime.jsx(
393
- NavigationMenuPrimitive__namespace.List,
394
- {
395
- "data-slot": "navigation-menu-list",
396
- className: button.cn("group flex flex-1 list-none items-center justify-center gap-1", className),
397
- ...props
398
- }
399
- );
400
- }
401
- function NavigationMenuItem({
402
- className,
403
- ...props
404
- }) {
405
- return /* @__PURE__ */ jsxRuntime.jsx(
406
- NavigationMenuPrimitive__namespace.Item,
407
- {
408
- "data-slot": "navigation-menu-item",
409
- className: button.cn("relative", className),
410
- ...props
411
- }
412
- );
413
- }
414
- const navigationMenuTriggerStyle = classVarianceAuthority.cva(
415
- "group inline-flex h-10 w-max items-center justify-center rounded-[var(--radius)] bg-background px-4 py-2 text-[var(--text-p)] font-[var(--font-weight-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]:bg-accent/50 outline-none focus-visible:ring-2 focus-visible:ring-ring"
416
- );
417
- function NavigationMenuTrigger({
418
- className,
419
- children,
420
- ...props
421
- }) {
422
- return /* @__PURE__ */ jsxRuntime.jsxs(
423
- NavigationMenuPrimitive__namespace.Trigger,
424
- {
425
- "data-slot": "navigation-menu-trigger",
426
- className: button.cn(navigationMenuTriggerStyle(), "group", className),
427
- ...props,
428
- children: [
429
- children,
430
- " ",
431
- /* @__PURE__ */ jsxRuntime.jsx(
432
- lucideReact.ChevronDownIcon,
433
- {
434
- className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
435
- "aria-hidden": "true"
436
- }
437
- )
438
- ]
439
- }
440
- );
441
- }
442
- function NavigationMenuContent({
443
- className,
444
- ...props
445
- }) {
446
- return /* @__PURE__ */ jsxRuntime.jsx(
447
- NavigationMenuPrimitive__namespace.Content,
448
- {
449
- "data-slot": "navigation-menu-content",
450
- className: button.cn("left-0 top-0 w-full md:w-auto", className),
451
- ...props
452
- }
453
- );
454
- }
455
- function NavigationMenuViewport({
456
- className,
457
- ...props
458
- }) {
459
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsxRuntime.jsx(
460
- NavigationMenuPrimitive__namespace.Viewport,
461
- {
462
- "data-slot": "navigation-menu-viewport",
463
- className: button.cn(
464
- "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
465
- className
466
- ),
467
- ...props
468
- }
469
- ) });
470
- }
471
- function NavigationMenuLink({
472
- className,
473
- ...props
474
- }) {
475
- return /* @__PURE__ */ jsxRuntime.jsx(
476
- NavigationMenuPrimitive__namespace.Link,
477
- {
478
- "data-slot": "navigation-menu-link",
479
- className: button.cn(
480
- "block select-none space-y-1 rounded-[var(--radius)] p-3 leading-none no-underline outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
481
- className
482
- ),
483
- ...props
484
- }
485
- );
486
- }
487
- function NavigationMenuIndicator({
488
- className,
489
- ...props
490
- }) {
491
- return /* @__PURE__ */ jsxRuntime.jsx(
492
- NavigationMenuPrimitive__namespace.Indicator,
493
- {
494
- "data-slot": "navigation-menu-indicator",
495
- className: button.cn(
496
- "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
497
- className
498
- ),
499
- ...props,
500
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
501
- }
502
- );
503
- }
504
- function Pagination({ className, ...props }) {
505
- return /* @__PURE__ */ jsxRuntime.jsx(
506
- "nav",
507
- {
508
- role: "navigation",
509
- "aria-label": "pagination",
510
- "data-slot": "pagination",
511
- className: button.cn("mx-auto flex w-full justify-center", className),
512
- ...props
513
- }
514
- );
515
- }
516
- function PaginationContent({ className, ...props }) {
517
- return /* @__PURE__ */ jsxRuntime.jsx(
518
- "ul",
519
- {
520
- "data-slot": "pagination-content",
521
- className: button.cn("flex flex-row items-center gap-1", className),
522
- ...props
523
- }
524
- );
525
- }
526
- function PaginationItem({ ...props }) {
527
- return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", ...props });
528
- }
529
- function PaginationLink({
530
- className,
531
- isActive,
532
- disabled,
533
- size = "icon",
534
- href,
535
- ...props
536
- }) {
537
- return /* @__PURE__ */ jsxRuntime.jsx(
538
- "a",
539
- {
540
- "aria-current": isActive ? "page" : void 0,
541
- "aria-disabled": disabled || void 0,
542
- tabIndex: disabled ? -1 : void 0,
543
- "data-slot": "pagination-link",
544
- "data-active": isActive,
545
- href: disabled ? void 0 : href ?? "#",
546
- className: button.cn(
547
- button.buttonVariants({
548
- variant: isActive ? "outline" : "ghost",
549
- size
550
- }),
551
- disabled && "pointer-events-none opacity-50",
552
- className
553
- ),
554
- ...props
555
- }
556
- );
557
- }
558
- function PaginationPrevious({
559
- className,
560
- disabled,
561
- ...props
562
- }) {
563
- return /* @__PURE__ */ jsxRuntime.jsxs(
564
- PaginationLink,
565
- {
566
- "aria-label": "Go to previous page",
567
- size: "default",
568
- disabled,
569
- className: button.cn("gap-1 px-2.5 sm:pl-2.5", className),
570
- ...props,
571
- children: [
572
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, {}),
573
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:block", children: "Previous" })
574
- ]
575
- }
576
- );
577
- }
578
- function PaginationNext({
579
- className,
580
- disabled,
581
- ...props
582
- }) {
583
- return /* @__PURE__ */ jsxRuntime.jsxs(
584
- PaginationLink,
585
- {
586
- "aria-label": "Go to next page",
587
- size: "default",
588
- disabled,
589
- className: button.cn("gap-1 px-2.5 sm:pr-2.5", className),
590
- ...props,
591
- children: [
592
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:block", children: "Next" }),
593
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, {})
594
- ]
595
- }
596
- );
597
- }
598
- function PaginationEllipsis({ className, ...props }) {
599
- return /* @__PURE__ */ jsxRuntime.jsxs(
600
- "span",
601
- {
602
- "aria-hidden": true,
603
- "data-slot": "pagination-ellipsis",
604
- className: button.cn("flex size-9 items-center justify-center", className),
605
- ...props,
606
- children: [
607
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontalIcon, { className: "size-4" }),
608
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "More pages" })
609
- ]
610
- }
611
- );
612
- }
613
- function usePagination({
614
- totalItems,
615
- pageSize = 10,
616
- initialPage = 1,
617
- page: controlledPage,
618
- onPageChange,
619
- siblingCount = 1
620
- }) {
621
- const [internalPage, setInternalPage] = React.useState(initialPage);
622
- const isControlled = controlledPage !== void 0;
623
- const currentPage = isControlled ? controlledPage : internalPage;
624
- const totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
625
- const setPage = React.useCallback(
626
- (p) => {
627
- const clamped = Math.min(Math.max(1, p), totalPages);
628
- if (!isControlled) setInternalPage(clamped);
629
- onPageChange == null ? void 0 : onPageChange(clamped);
630
- },
631
- [isControlled, onPageChange, totalPages]
632
- );
633
- const startIndex = (currentPage - 1) * pageSize;
634
- const endIndex = Math.min(startIndex + pageSize, totalItems);
635
- const canGoPrev = currentPage > 1;
636
- const canGoNext = currentPage < totalPages;
637
- const isFirstPage = currentPage === 1;
638
- const isLastPage = currentPage === totalPages;
639
- const items = React.useMemo(() => {
640
- const pageSet = /* @__PURE__ */ new Set();
641
- pageSet.add(1);
642
- if (totalPages > 1) pageSet.add(totalPages);
643
- for (let p = Math.max(2, currentPage - siblingCount); p <= Math.min(totalPages - 1, currentPage + siblingCount); p++) {
644
- pageSet.add(p);
645
- }
646
- const sorted = Array.from(pageSet).sort((a, b) => a - b);
647
- const result = [];
648
- for (let i = 0; i < sorted.length; i++) {
649
- result.push({ type: "page", page: sorted[i] });
650
- if (i < sorted.length - 1 && sorted[i + 1] - sorted[i] > 1) {
651
- result.push({ type: "ellipsis", key: `ellipsis-${sorted[i]}` });
652
- }
653
- }
654
- return result;
655
- }, [currentPage, siblingCount, totalPages]);
656
- const goTo = React.useCallback((p) => setPage(p), [setPage]);
657
- const next = React.useCallback(() => setPage(currentPage + 1), [currentPage, setPage]);
658
- const prev = React.useCallback(() => setPage(currentPage - 1), [currentPage, setPage]);
659
- const first = React.useCallback(() => setPage(1), [setPage]);
660
- const last = React.useCallback(() => setPage(totalPages), [setPage, totalPages]);
661
- return {
662
- currentPage,
663
- totalPages,
664
- startIndex,
665
- endIndex,
666
- canGoPrev,
667
- canGoNext,
668
- isFirstPage,
669
- isLastPage,
670
- items,
671
- goTo,
672
- next,
673
- prev,
674
- first,
675
- last
676
- };
677
- }
678
- const toggleVariants = classVarianceAuthority.cva(
679
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
680
- {
681
- variants: {
682
- variant: {
683
- default: "bg-transparent",
684
- outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
685
- },
686
- size: {
687
- default: "h-9 px-2 min-w-9",
688
- sm: "h-8 px-1.5 min-w-8",
689
- lg: "h-10 px-2.5 min-w-10"
690
- }
691
- },
692
- defaultVariants: {
693
- variant: "default",
694
- size: "default"
695
- }
696
- }
697
- );
698
- const Toggle = React__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
699
- TogglePrimitive__namespace.Root,
700
- {
701
- ref,
702
- "data-slot": "toggle",
703
- className: button.cn(toggleVariants({ variant, size, className })),
704
- ...props
705
- }
706
- ));
707
- Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
708
- const ToggleGroupContext = React__namespace.createContext({
709
- size: "default",
710
- variant: "default"
711
- });
712
- const ToggleGroup = React__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
713
- ToggleGroupPrimitive__namespace.Root,
714
- {
715
- ref,
716
- "data-slot": "toggle-group",
717
- "data-variant": variant,
718
- "data-size": size,
719
- className: button.cn(
720
- "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
721
- className
722
- ),
723
- ...props,
724
- children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
725
- }
726
- ));
727
- ToggleGroup.displayName = ToggleGroupPrimitive__namespace.Root.displayName;
728
- const ToggleGroupItem = React__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
729
- const context = React__namespace.useContext(ToggleGroupContext);
730
- return /* @__PURE__ */ jsxRuntime.jsx(
731
- ToggleGroupPrimitive__namespace.Item,
732
- {
733
- ref,
734
- "data-slot": "toggle-group-item",
735
- "data-variant": context.variant || variant,
736
- "data-size": context.size || size,
737
- className: button.cn(
738
- toggleVariants({
739
- variant: context.variant || variant,
740
- size: context.size || size
741
- }),
742
- "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
743
- className
744
- ),
745
- ...props,
746
- children
747
- }
748
- );
749
- });
750
- ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
751
- function InputOTP({
752
- className,
753
- containerClassName,
754
- ...props
755
- }) {
756
- return /* @__PURE__ */ jsxRuntime.jsx(
757
- inputOtp.OTPInput,
758
- {
759
- "data-slot": "input-otp",
760
- containerClassName: button.cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
761
- className: button.cn("disabled:cursor-not-allowed", className),
762
- ...props
763
- }
764
- );
765
- }
766
- function InputOTPGroup({ className, ...props }) {
767
- return /* @__PURE__ */ jsxRuntime.jsx(
768
- "div",
769
- {
770
- "data-slot": "input-otp-group",
771
- className: button.cn("flex items-center gap-1", className),
772
- ...props
773
- }
774
- );
775
- }
776
- function InputOTPSlot({
777
- index,
778
- className,
779
- size = "md",
780
- ...props
781
- }) {
782
- const inputOTPContext = React__namespace.useContext(inputOtp.OTPInputContext);
783
- const { char, hasFakeCaret, isActive } = (inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) ?? {};
784
- const sizeClasses = {
785
- sm: "h-8 w-8 text-sm",
786
- md: "h-10 w-10 text-base",
787
- lg: "h-12 w-12 text-lg"
788
- };
789
- return /* @__PURE__ */ jsxRuntime.jsxs(
790
- "div",
791
- {
792
- "data-slot": "input-otp-slot",
793
- "data-active": isActive,
794
- className: button.cn(
795
- "data-[active=true]:border-primary data-[active=true]:ring-primary/20 data-[active=true]:aria-invalid:ring-destructive/20 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex items-center justify-center border border-border rounded-[var(--radius)] bg-background transition-all outline-none data-[active=true]:z-10 data-[active=true]:ring-2",
796
- sizeClasses[size],
797
- className
798
- ),
799
- ...props,
800
- children: [
801
- char,
802
- hasFakeCaret && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
803
- ]
804
- }
805
- );
806
- }
807
- function InputOTPSeparator({ ...props }) {
808
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) });
809
- }
810
- const Form = reactHookForm.FormProvider;
811
- const FormFieldContext = React__namespace.createContext({});
812
- const FormField = ({
813
- ...props
814
- }) => {
815
- return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
816
- };
817
- const useFormField = () => {
818
- const fieldContext = React__namespace.useContext(FormFieldContext);
819
- const itemContext = React__namespace.useContext(FormItemContext);
820
- const { getFieldState } = reactHookForm.useFormContext();
821
- const formState = reactHookForm.useFormState({ name: fieldContext.name });
822
- const fieldState = getFieldState(fieldContext.name, formState);
823
- if (!fieldContext) {
824
- throw new Error("useFormField should be used within <FormField>");
825
- }
826
- const { id } = itemContext;
827
- return {
828
- id,
829
- name: fieldContext.name,
830
- formItemId: `${id}-form-item`,
831
- formDescriptionId: `${id}-form-item-description`,
832
- formMessageId: `${id}-form-item-message`,
833
- ...fieldState
834
- };
835
- };
836
- const FormItemContext = React__namespace.createContext({});
837
- function FormItem({ className, ...props }) {
838
- const id = React__namespace.useId();
839
- return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "form-item", className: button.cn("grid gap-2", className), ...props }) });
840
- }
841
- function FormLabel({ className, ...props }) {
842
- const { error, formItemId } = useFormField();
843
- return /* @__PURE__ */ jsxRuntime.jsx(
844
- alertDialog.Label,
845
- {
846
- "data-slot": "form-label",
847
- "data-error": !!error,
848
- className: button.cn("data-[error=true]:text-destructive", className),
849
- htmlFor: formItemId,
850
- ...props
851
- }
852
- );
853
- }
854
- function FormControl({ ...props }) {
855
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
856
- return /* @__PURE__ */ jsxRuntime.jsx(
857
- reactSlot.Slot,
858
- {
859
- "data-slot": "form-control",
860
- id: formItemId,
861
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
862
- "aria-invalid": !!error,
863
- ...props
864
- }
865
- );
866
- }
867
- function FormDescription({ className, ...props }) {
868
- const { formDescriptionId } = useFormField();
869
- return /* @__PURE__ */ jsxRuntime.jsx(
870
- "p",
871
- {
872
- "data-slot": "form-description",
873
- id: formDescriptionId,
874
- className: button.cn("text-muted-foreground text-sm", className),
875
- ...props
876
- }
877
- );
878
- }
879
- function FormMessage({ className, ...props }) {
880
- const { error, formMessageId } = useFormField();
881
- const body = error ? String((error == null ? void 0 : error.message) ?? "") : props.children;
882
- if (!body) {
883
- return null;
884
- }
885
- return /* @__PURE__ */ jsxRuntime.jsx(
886
- "p",
887
- {
888
- "data-slot": "form-message",
889
- id: formMessageId,
890
- className: button.cn("text-destructive text-sm", className),
891
- ...props,
892
- children: body
893
- }
894
- );
895
- }
896
- function Calendar({
897
- className,
898
- classNames,
899
- showOutsideDays = true,
900
- captionLayout = "label",
901
- buttonVariant = "ghost",
902
- formatters,
903
- components,
904
- ...props
905
- }) {
906
- const defaultClassNames = reactDayPicker.getDefaultClassNames();
907
- const isDropdownCaption = captionLayout.startsWith("dropdown");
908
- return /* @__PURE__ */ jsxRuntime.jsx(
909
- reactDayPicker.DayPicker,
910
- {
911
- showOutsideDays,
912
- className: button.cn(
913
- "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
914
- String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
915
- String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
916
- className
917
- ),
918
- captionLayout,
919
- formatters,
920
- classNames: {
921
- root: button.cn("w-fit", defaultClassNames.root),
922
- months: button.cn("flex gap-6 flex-col md:flex-row relative", defaultClassNames.months),
923
- month: button.cn("flex flex-col w-full gap-5", defaultClassNames.month),
924
- nav: button.cn(
925
- "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
926
- defaultClassNames.nav
927
- ),
928
- button_previous: button.cn(
929
- button.buttonVariants({ variant: buttonVariant }),
930
- "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
931
- defaultClassNames.button_previous
932
- ),
933
- button_next: button.cn(
934
- button.buttonVariants({ variant: buttonVariant }),
935
- "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
936
- defaultClassNames.button_next
937
- ),
938
- month_caption: button.cn(
939
- "flex items-center justify-center w-full",
940
- isDropdownCaption ? "h-auto px-0" : "h-(--cell-size) px-(--cell-size)",
941
- defaultClassNames.month_caption
942
- ),
943
- dropdowns: button.cn(
944
- "w-full flex items-center justify-center gap-2",
945
- isDropdownCaption ? "h-auto" : "h-(--cell-size)",
946
- defaultClassNames.dropdowns
947
- ),
948
- dropdown_root: button.cn(
949
- isDropdownCaption ? "relative flex min-w-[7rem] items-center rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none focus-within:ring-2 focus-within:ring-primary focus-within:border-transparent data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 px-2.5 py-1" : "relative rounded-[var(--radius)] hover:bg-accent transition-colors",
950
- defaultClassNames.dropdown_root
951
- ),
952
- dropdown: button.cn(
953
- isDropdownCaption ? "absolute inset-0 cursor-pointer opacity-0" : "absolute bg-popover inset-0 opacity-0 cursor-pointer",
954
- defaultClassNames.dropdown
955
- ),
956
- caption_label: button.cn(
957
- "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight transition-all duration-200",
958
- captionLayout === "label" ? "rounded-[var(--radius)] px-2 py-1 text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] hover:bg-accent hover:text-accent-foreground" : "flex h-full w-full items-center justify-between gap-2 rounded-[var(--radius)] text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] [&>svg]:text-muted-foreground [&>svg]:size-4",
959
- defaultClassNames.caption_label
960
- ),
961
- table: "w-full border-collapse mt-1",
962
- weekdays: button.cn("flex gap-1", defaultClassNames.weekdays),
963
- weekday: button.cn(
964
- "text-muted-foreground rounded-(--cell-radius) flex-1 select-none text-[length:var(--calendar-weekday-size)] font-[number:var(--font-weight-medium)] uppercase tracking-wider",
965
- defaultClassNames.weekday
966
- ),
967
- week: button.cn("flex w-full gap-1", defaultClassNames.week),
968
- week_number_header: button.cn("select-none w-(--cell-size)", defaultClassNames.week_number_header),
969
- week_number: button.cn(
970
- "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
971
- defaultClassNames.week_number
972
- ),
973
- day: button.cn(
974
- "relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none",
975
- props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
976
- defaultClassNames.day
977
- ),
978
- range_start: button.cn(
979
- "rounded-l-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:right-0 -z-0 isolate",
980
- defaultClassNames.range_start
981
- ),
982
- range_middle: button.cn("rounded-none bg-accent/30", defaultClassNames.range_middle),
983
- range_end: button.cn(
984
- "rounded-r-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:left-0 -z-0 isolate",
985
- defaultClassNames.range_end
986
- ),
987
- today: button.cn(
988
- "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
989
- defaultClassNames.today
990
- ),
991
- outside: button.cn(
992
- "text-muted-foreground aria-selected:text-muted-foreground",
993
- defaultClassNames.outside
994
- ),
995
- disabled: button.cn("text-muted-foreground/30 opacity-40", defaultClassNames.disabled),
996
- hidden: button.cn("invisible", defaultClassNames.hidden),
997
- ...classNames
998
- },
999
- components: {
1000
- Root: ({ className: className2, rootRef, ...props2 }) => {
1001
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "calendar", ref: rootRef, className: button.cn(className2), ...props2 });
1002
- },
1003
- Chevron: ({ className: className2, orientation, ...props2 }) => {
1004
- if (orientation === "left") {
1005
- return /* @__PURE__ */ jsxRuntime.jsx(
1006
- lucideReact.ChevronLeft,
1007
- {
1008
- className: button.cn("size-5 transition-transform group-hover:scale-110", className2),
1009
- ...props2
1010
- }
1011
- );
1012
- }
1013
- if (orientation === "right") {
1014
- return /* @__PURE__ */ jsxRuntime.jsx(
1015
- lucideReact.ChevronRight,
1016
- {
1017
- className: button.cn("size-5 transition-transform group-hover:scale-110", className2),
1018
- ...props2
1019
- }
1020
- );
1021
- }
1022
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: button.cn("size-4", className2), ...props2 });
1023
- },
1024
- DayButton: CalendarDayButton,
1025
- WeekNumber: ({ children, ...props2 }) => {
1026
- return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center font-[number:var(--font-weight-medium)]", children }) });
1027
- },
1028
- ...components
1029
- },
1030
- ...props
1031
- }
1032
- );
1033
- }
1034
- function CalendarDayButton({
1035
- className,
1036
- day,
1037
- modifiers,
1038
- ...props
1039
- }) {
1040
- const defaultClassNames = reactDayPicker.getDefaultClassNames();
1041
- const ref = React__namespace.useRef(null);
1042
- React__namespace.useEffect(() => {
1043
- var _a;
1044
- if (modifiers.focused) (_a = ref.current) == null ? void 0 : _a.focus();
1045
- }, [modifiers.focused]);
1046
- return /* @__PURE__ */ jsxRuntime.jsx(
1047
- button.Button,
1048
- {
1049
- ref,
1050
- variant: "ghost",
1051
- size: "icon",
1052
- "data-day": day.date.toLocaleDateString(),
1053
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1054
- "data-range-start": modifiers.range_start,
1055
- "data-range-end": modifiers.range_end,
1056
- "data-range-middle": modifiers.range_middle,
1057
- className: button.cn(
1058
- "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col items-center justify-center gap-1 border-0 leading-none transition-all duration-200 cursor-pointer disabled:cursor-not-allowed",
1059
- "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
1060
- "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
1061
- "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:font-[number:var(--font-weight-semibold)] data-[selected-single=true]:shadow-sm",
1062
- "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
1063
- "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:font-[number:var(--font-weight-semibold)] data-[range-start=true]:shadow-sm",
1064
- "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:font-[number:var(--font-weight-semibold)] data-[range-end=true]:shadow-sm",
1065
- "group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-offset-2 group-data-[focused=true]/day:ring-offset-background",
1066
- "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
1067
- "data-[range-middle=true]:rounded-none",
1068
- "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
1069
- "[&>span]:opacity-80",
1070
- defaultClassNames.day,
1071
- className
1072
- ),
1073
- ...props,
1074
- children: day.date.getDate()
1075
- }
1076
- );
1077
- }
1078
- function Sheet({ ...props }) {
1079
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
1080
- }
1081
- function SheetTrigger({ ...props }) {
1082
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "sheet-trigger", ...props });
1083
- }
1084
- function SheetClose({ ...props }) {
1085
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "sheet-close", ...props });
1086
- }
1087
- function SheetPortal({ ...props }) {
1088
- return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
1089
- }
1090
- const SheetOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1091
- DialogPrimitive__namespace.Overlay,
1092
- {
1093
- className: button.cn(
1094
- "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",
1095
- className
1096
- ),
1097
- ...props,
1098
- ref
1099
- }
1100
- ));
1101
- SheetOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1102
- function SheetContent({
1103
- className,
1104
- children,
1105
- side = "right",
1106
- ...props
1107
- }) {
1108
- return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
1109
- /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
1110
- /* @__PURE__ */ jsxRuntime.jsxs(
1111
- DialogPrimitive__namespace.Content,
1112
- {
1113
- "data-slot": "sheet-content",
1114
- className: button.cn(
1115
- "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",
1116
- 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",
1117
- 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",
1118
- 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",
1119
- 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",
1120
- className
1121
- ),
1122
- ...props,
1123
- children: [
1124
- children,
1125
- /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.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: [
1126
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "size-4" }),
1127
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
1128
- ] })
1129
- ]
1130
- }
1131
- )
1132
- ] });
1133
- }
1134
- function SheetHeader({ className, ...props }) {
1135
- return /* @__PURE__ */ jsxRuntime.jsx(
1136
- "div",
1137
- {
1138
- "data-slot": "sheet-header",
1139
- className: button.cn("flex flex-col gap-1.5 px-6 pt-6", className),
1140
- ...props
1141
- }
1142
- );
1143
- }
1144
- function SheetBody({ className, ...props }) {
1145
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "sheet-body", className: button.cn("flex-1 overflow-auto px-6", className), ...props });
1146
- }
1147
- function SheetFooter({ className, ...props }) {
1148
- return /* @__PURE__ */ jsxRuntime.jsx(
1149
- "div",
1150
- {
1151
- "data-slot": "sheet-footer",
1152
- className: button.cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
1153
- ...props
1154
- }
1155
- );
1156
- }
1157
- function SheetTitle({ className, ...props }) {
1158
- return /* @__PURE__ */ jsxRuntime.jsx(
1159
- DialogPrimitive__namespace.Title,
1160
- {
1161
- "data-slot": "sheet-title",
1162
- className: button.cn("text-foreground font-semibold", className),
1163
- ...props
1164
- }
1165
- );
1166
- }
1167
- function SheetDescription({
1168
- className,
1169
- ...props
1170
- }) {
1171
- return /* @__PURE__ */ jsxRuntime.jsx(
1172
- DialogPrimitive__namespace.Description,
1173
- {
1174
- "data-slot": "sheet-description",
1175
- className: button.cn("text-muted-foreground text-sm", className),
1176
- ...props
1177
- }
1178
- );
1179
- }
1180
- function Drawer({ ...props }) {
1181
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { "data-slot": "drawer", ...props });
1182
- }
1183
- function DrawerTrigger({ ...props }) {
1184
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Trigger, { "data-slot": "drawer-trigger", ...props });
1185
- }
1186
- function DrawerPortal({ ...props }) {
1187
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
1188
- }
1189
- function DrawerClose({ ...props }) {
1190
- return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
1191
- }
1192
- const DrawerOverlay = React__namespace.forwardRef(({ className, ...props }, ref) => {
1193
- return /* @__PURE__ */ jsxRuntime.jsx(
1194
- vaul.Drawer.Overlay,
1195
- {
1196
- ref,
1197
- "data-slot": "drawer-overlay",
1198
- className: button.cn(
1199
- "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",
1200
- className
1201
- ),
1202
- ...props
1203
- }
1204
- );
1205
- });
1206
- DrawerOverlay.displayName = vaul.Drawer.Overlay.displayName;
1207
- function DrawerContent({
1208
- className,
1209
- children,
1210
- ...props
1211
- }) {
1212
- return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1213
- /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
1214
- /* @__PURE__ */ jsxRuntime.jsxs(
1215
- vaul.Drawer.Content,
1216
- {
1217
- "data-slot": "drawer-content",
1218
- className: button.cn(
1219
- "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1220
- "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
1221
- "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
1222
- "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
1223
- "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
1224
- className
1225
- ),
1226
- ...props,
1227
- children: [
1228
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
1229
- children
1230
- ]
1231
- }
1232
- )
1233
- ] });
1234
- }
1235
- function DrawerHeader({ className, ...props }) {
1236
- return /* @__PURE__ */ jsxRuntime.jsx(
1237
- "div",
1238
- {
1239
- "data-slot": "drawer-header",
1240
- className: button.cn("flex flex-col gap-1.5 p-4", className),
1241
- ...props
1242
- }
1243
- );
1244
- }
1245
- function DrawerFooter({ className, ...props }) {
1246
- return /* @__PURE__ */ jsxRuntime.jsx(
1247
- "div",
1248
- {
1249
- "data-slot": "drawer-footer",
1250
- className: button.cn("mt-auto flex flex-col gap-2 p-4", className),
1251
- ...props
1252
- }
1253
- );
1254
- }
1255
- function DrawerTitle({ className, ...props }) {
1256
- return /* @__PURE__ */ jsxRuntime.jsx(
1257
- vaul.Drawer.Title,
1258
- {
1259
- "data-slot": "drawer-title",
1260
- className: button.cn("text-foreground font-semibold", className),
1261
- ...props
1262
- }
1263
- );
1264
- }
1265
- function DrawerDescription({
1266
- className,
1267
- ...props
1268
- }) {
1269
- return /* @__PURE__ */ jsxRuntime.jsx(
1270
- vaul.Drawer.Description,
1271
- {
1272
- "data-slot": "drawer-description",
1273
- className: button.cn("text-muted-foreground text-sm", className),
1274
- ...props
1275
- }
1276
- );
1277
- }
1278
- function DrawerHandle({ className, ...props }) {
1279
- return /* @__PURE__ */ jsxRuntime.jsx(
1280
- "div",
1281
- {
1282
- "data-slot": "drawer-handle",
1283
- className: button.cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
1284
- ...props
1285
- }
1286
- );
1287
- }
1288
- function HoverCard({ ...props }) {
1289
- return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Root, { "data-slot": "hover-card", ...props });
1290
- }
1291
- function HoverCardTrigger({ ...props }) {
1292
- return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Trigger, { "data-slot": "hover-card-trigger", ...props });
1293
- }
1294
- function HoverCardContent({
1295
- className,
1296
- align = "center",
1297
- sideOffset = 4,
1298
- ...props
1299
- }) {
1300
- return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsxRuntime.jsx(
1301
- HoverCardPrimitive__namespace.Content,
1302
- {
1303
- "data-slot": "hover-card-content",
1304
- align,
1305
- sideOffset,
1306
- className: button.cn(
1307
- "bg-popover text-popover-foreground 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
1308
- className
1309
- ),
1310
- ...props
1311
- }
1312
- ) });
1313
- }
1314
- function ContextMenu({ ...props }) {
1315
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Root, { "data-slot": "context-menu", ...props });
1316
- }
1317
- function ContextMenuTrigger({
1318
- ...props
1319
- }) {
1320
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Trigger, { "data-slot": "context-menu-trigger", ...props });
1321
- }
1322
- function ContextMenuGroup({ ...props }) {
1323
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Group, { "data-slot": "context-menu-group", ...props });
1324
- }
1325
- function ContextMenuPortal({ ...props }) {
1326
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { "data-slot": "context-menu-portal", ...props });
1327
- }
1328
- function ContextMenuSub({ ...props }) {
1329
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Sub, { "data-slot": "context-menu-sub", ...props });
1330
- }
1331
- function ContextMenuRadioGroup({
1332
- ...props
1333
- }) {
1334
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.RadioGroup, { "data-slot": "context-menu-radio-group", ...props });
1335
- }
1336
- function ContextMenuSubTrigger({
1337
- className,
1338
- inset,
1339
- children,
1340
- ...props
1341
- }) {
1342
- return /* @__PURE__ */ jsxRuntime.jsxs(
1343
- ContextMenuPrimitive__namespace.SubTrigger,
1344
- {
1345
- "data-slot": "context-menu-sub-trigger",
1346
- "data-inset": inset,
1347
- className: button.cn(
1348
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1349
- className
1350
- ),
1351
- ...props,
1352
- children: [
1353
- children,
1354
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "ml-auto" })
1355
- ]
1356
- }
1357
- );
1358
- }
1359
- function ContextMenuSubContent({
1360
- className,
1361
- ...props
1362
- }) {
1363
- return /* @__PURE__ */ jsxRuntime.jsx(
1364
- ContextMenuPrimitive__namespace.SubContent,
1365
- {
1366
- "data-slot": "context-menu-sub-content",
1367
- className: button.cn(
1368
- "bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
1369
- className
1370
- ),
1371
- ...props
1372
- }
1373
- );
1374
- }
1375
- function ContextMenuContent({
1376
- className,
1377
- ...props
1378
- }) {
1379
- return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1380
- ContextMenuPrimitive__namespace.Content,
1381
- {
1382
- "data-slot": "context-menu-content",
1383
- className: button.cn(
1384
- "bg-popover text-popover-foreground 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 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
1385
- className
1386
- ),
1387
- ...props
1388
- }
1389
- ) });
1390
- }
1391
- function ContextMenuItem({
1392
- className,
1393
- inset,
1394
- variant = "default",
1395
- ...props
1396
- }) {
1397
- return /* @__PURE__ */ jsxRuntime.jsx(
1398
- ContextMenuPrimitive__namespace.Item,
1399
- {
1400
- "data-slot": "context-menu-item",
1401
- "data-inset": inset,
1402
- "data-variant": variant,
1403
- className: button.cn(
1404
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1405
- className
1406
- ),
1407
- ...props
1408
- }
1409
- );
1410
- }
1411
- function ContextMenuCheckboxItem({
1412
- className,
1413
- children,
1414
- checked,
1415
- ...props
1416
- }) {
1417
- return /* @__PURE__ */ jsxRuntime.jsxs(
1418
- ContextMenuPrimitive__namespace.CheckboxItem,
1419
- {
1420
- "data-slot": "context-menu-checkbox-item",
1421
- className: button.cn(
1422
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1423
- className
1424
- ),
1425
- checked,
1426
- ...props,
1427
- children: [
1428
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
1429
- children
1430
- ]
1431
- }
1432
- );
1433
- }
1434
- function ContextMenuRadioItem({
1435
- className,
1436
- children,
1437
- ...props
1438
- }) {
1439
- return /* @__PURE__ */ jsxRuntime.jsxs(
1440
- ContextMenuPrimitive__namespace.RadioItem,
1441
- {
1442
- "data-slot": "context-menu-radio-item",
1443
- className: button.cn(
1444
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1445
- className
1446
- ),
1447
- ...props,
1448
- children: [
1449
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleIcon, { className: "size-2 fill-current" }) }) }),
1450
- children
1451
- ]
1452
- }
1453
- );
1454
- }
1455
- function ContextMenuLabel({
1456
- className,
1457
- inset,
1458
- ...props
1459
- }) {
1460
- return /* @__PURE__ */ jsxRuntime.jsx(
1461
- ContextMenuPrimitive__namespace.Label,
1462
- {
1463
- "data-slot": "context-menu-label",
1464
- "data-inset": inset,
1465
- className: button.cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
1466
- ...props
1467
- }
1468
- );
1469
- }
1470
- function ContextMenuSeparator({
1471
- className,
1472
- ...props
1473
- }) {
1474
- return /* @__PURE__ */ jsxRuntime.jsx(
1475
- ContextMenuPrimitive__namespace.Separator,
1476
- {
1477
- "data-slot": "context-menu-separator",
1478
- className: button.cn("bg-border -mx-1 my-1 h-px", className),
1479
- ...props
1480
- }
1481
- );
1482
- }
1483
- function ContextMenuShortcut({ className, ...props }) {
1484
- return /* @__PURE__ */ jsxRuntime.jsx(
1485
- "span",
1486
- {
1487
- "data-slot": "context-menu-shortcut",
1488
- className: button.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1489
- ...props
1490
- }
1491
- );
1492
- }
1493
- function Menubar({ className, ...props }) {
1494
- return /* @__PURE__ */ jsxRuntime.jsx(
1495
- MenubarPrimitive__namespace.Root,
1496
- {
1497
- "data-slot": "menubar",
1498
- className: button.cn(
1499
- "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
1500
- className
1501
- ),
1502
- ...props
1503
- }
1504
- );
1505
- }
1506
- function MenubarMenu({ ...props }) {
1507
- return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Menu, { "data-slot": "menubar-menu", ...props });
1508
- }
1509
- function MenubarGroup({ ...props }) {
1510
- return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Group, { "data-slot": "menubar-group", ...props });
1511
- }
1512
- function MenubarPortal({ ...props }) {
1513
- return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { "data-slot": "menubar-portal", ...props });
1514
- }
1515
- function MenubarRadioGroup({ ...props }) {
1516
- return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
1517
- }
1518
- function MenubarTrigger({
1519
- className,
1520
- ...props
1521
- }) {
1522
- return /* @__PURE__ */ jsxRuntime.jsx(
1523
- MenubarPrimitive__namespace.Trigger,
1524
- {
1525
- "data-slot": "menubar-trigger",
1526
- className: button.cn(
1527
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
1528
- className
1529
- ),
1530
- ...props
1531
- }
1532
- );
1533
- }
1534
- function MenubarContent({
1535
- className,
1536
- align = "start",
1537
- alignOffset = -4,
1538
- sideOffset = 8,
1539
- ...props
1540
- }) {
1541
- return /* @__PURE__ */ jsxRuntime.jsx(MenubarPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1542
- MenubarPrimitive__namespace.Content,
1543
- {
1544
- "data-slot": "menubar-content",
1545
- align,
1546
- alignOffset,
1547
- sideOffset,
1548
- className: button.cn(
1549
- "bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
1550
- className
1551
- ),
1552
- ...props
1553
- }
1554
- ) });
1555
- }
1556
- function MenubarItem({
1557
- className,
1558
- inset,
1559
- variant = "default",
1560
- ...props
1561
- }) {
1562
- return /* @__PURE__ */ jsxRuntime.jsx(
1563
- MenubarPrimitive__namespace.Item,
1564
- {
1565
- "data-slot": "menubar-item",
1566
- "data-inset": inset,
1567
- "data-variant": variant,
1568
- className: button.cn(
1569
- "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1570
- className
1571
- ),
1572
- ...props
1573
- }
1574
- );
1575
- }
1576
- function MenubarCheckboxItem({
1577
- className,
1578
- children,
1579
- checked,
1580
- ...props
1581
- }) {
1582
- return /* @__PURE__ */ jsxRuntime.jsxs(
1583
- MenubarPrimitive__namespace.CheckboxItem,
1584
- {
1585
- "data-slot": "menubar-checkbox-item",
1586
- className: button.cn(
1587
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1588
- className
1589
- ),
1590
- checked,
1591
- ...props,
1592
- children: [
1593
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
1594
- children
1595
- ]
1596
- }
1597
- );
1598
- }
1599
- function MenubarRadioItem({
1600
- className,
1601
- children,
1602
- ...props
1603
- }) {
1604
- return /* @__PURE__ */ jsxRuntime.jsxs(
1605
- MenubarPrimitive__namespace.RadioItem,
1606
- {
1607
- "data-slot": "menubar-radio-item",
1608
- className: button.cn(
1609
- "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1610
- className
1611
- ),
1612
- ...props,
1613
- children: [
1614
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleIcon, { className: "size-2 fill-current" }) }) }),
1615
- children
1616
- ]
1617
- }
1618
- );
1619
- }
1620
- function MenubarLabel({
1621
- className,
1622
- inset,
1623
- ...props
1624
- }) {
1625
- return /* @__PURE__ */ jsxRuntime.jsx(
1626
- MenubarPrimitive__namespace.Label,
1627
- {
1628
- "data-slot": "menubar-label",
1629
- "data-inset": inset,
1630
- className: button.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
1631
- ...props
1632
- }
1633
- );
1634
- }
1635
- function MenubarSeparator({
1636
- className,
1637
- ...props
1638
- }) {
1639
- return /* @__PURE__ */ jsxRuntime.jsx(
1640
- MenubarPrimitive__namespace.Separator,
1641
- {
1642
- "data-slot": "menubar-separator",
1643
- className: button.cn("bg-border -mx-1 my-1 h-px", className),
1644
- ...props
1645
- }
1646
- );
1647
- }
1648
- function MenubarShortcut({ className, ...props }) {
1649
- return /* @__PURE__ */ jsxRuntime.jsx(
1650
- "span",
1651
- {
1652
- "data-slot": "menubar-shortcut",
1653
- className: button.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1654
- ...props
1655
- }
1656
- );
1657
- }
1658
- function MenubarSub({ ...props }) {
1659
- return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Sub, { "data-slot": "menubar-sub", ...props });
1660
- }
1661
- function MenubarSubTrigger({
1662
- className,
1663
- inset,
1664
- children,
1665
- ...props
1666
- }) {
1667
- return /* @__PURE__ */ jsxRuntime.jsxs(
1668
- MenubarPrimitive__namespace.SubTrigger,
1669
- {
1670
- "data-slot": "menubar-sub-trigger",
1671
- "data-inset": inset,
1672
- className: button.cn(
1673
- "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
1674
- className
1675
- ),
1676
- ...props,
1677
- children: [
1678
- children,
1679
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "ml-auto h-4 w-4" })
1680
- ]
1681
- }
1682
- );
1683
- }
1684
- function MenubarSubContent({
1685
- className,
1686
- ...props
1687
- }) {
1688
- return /* @__PURE__ */ jsxRuntime.jsx(
1689
- MenubarPrimitive__namespace.SubContent,
1690
- {
1691
- "data-slot": "menubar-sub-content",
1692
- className: button.cn(
1693
- "bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
1694
- className
1695
- ),
1696
- ...props
1697
- }
1698
- );
1699
- }
1700
- function Command({ className, ...props }) {
1701
- return /* @__PURE__ */ jsxRuntime.jsx(
1702
- cmdk.Command,
1703
- {
1704
- "data-slot": "command",
1705
- className: button.cn(
1706
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
1707
- className
1708
- ),
1709
- ...props
1710
- }
1711
- );
1712
- }
1713
- function CommandDialog({
1714
- title = "Command Palette",
1715
- description = "Search for a command to run...",
1716
- children,
1717
- ...props
1718
- }) {
1719
- return /* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.Dialog, { ...props, children: [
1720
- /* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.DialogHeader, { className: "sr-only", children: [
1721
- /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogTitle, { children: title }),
1722
- /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogDescription, { children: description })
1723
- ] }),
1724
- /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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 }) })
1725
- ] });
1726
- }
1727
- function CommandInput({
1728
- className,
1729
- ...props
1730
- }) {
1731
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [
1732
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
1733
- /* @__PURE__ */ jsxRuntime.jsx(
1734
- cmdk.Command.Input,
1735
- {
1736
- "data-slot": "command-input",
1737
- className: button.cn(
1738
- "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
1739
- className
1740
- ),
1741
- ...props
1742
- }
1743
- )
1744
- ] });
1745
- }
1746
- function CommandList({ className, ...props }) {
1747
- return /* @__PURE__ */ jsxRuntime.jsx(
1748
- cmdk.Command.List,
1749
- {
1750
- "data-slot": "command-list",
1751
- role: "listbox",
1752
- className: button.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
1753
- ...props
1754
- }
1755
- );
1756
- }
1757
- function CommandEmpty({ ...props }) {
1758
- return /* @__PURE__ */ jsxRuntime.jsx(
1759
- cmdk.Command.Empty,
1760
- {
1761
- "data-slot": "command-empty",
1762
- className: "py-6 text-center text-sm",
1763
- ...props
1764
- }
1765
- );
1766
- }
1767
- function CommandGroup({
1768
- className,
1769
- ...props
1770
- }) {
1771
- return /* @__PURE__ */ jsxRuntime.jsx(
1772
- cmdk.Command.Group,
1773
- {
1774
- "data-slot": "command-group",
1775
- className: button.cn(
1776
- "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
1777
- className
1778
- ),
1779
- ...props
1780
- }
1781
- );
1782
- }
1783
- function CommandSeparator({
1784
- className,
1785
- ...props
1786
- }) {
1787
- return /* @__PURE__ */ jsxRuntime.jsx(
1788
- cmdk.Command.Separator,
1789
- {
1790
- "data-slot": "command-separator",
1791
- className: button.cn("bg-border -mx-1 h-px", className),
1792
- ...props
1793
- }
1794
- );
1795
- }
1796
- function CommandItem({ className, ...props }) {
1797
- return /* @__PURE__ */ jsxRuntime.jsx(
1798
- cmdk.Command.Item,
1799
- {
1800
- "data-slot": "command-item",
1801
- role: "option",
1802
- className: button.cn(
1803
- "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1804
- className
1805
- ),
1806
- ...props
1807
- }
1808
- );
1809
- }
1810
- function CommandShortcut({ className, ...props }) {
1811
- return /* @__PURE__ */ jsxRuntime.jsx(
1812
- "span",
1813
- {
1814
- "data-slot": "command-shortcut",
1815
- className: button.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1816
- ...props
1817
- }
1818
- );
1819
- }
1820
- const variantStyles = {
1821
- default: "bg-primary text-primary-foreground",
1822
- secondary: "bg-secondary text-secondary-foreground",
1823
- destructive: "bg-destructive text-destructive-foreground",
1824
- outline: "border-2 border-primary bg-background text-primary",
1825
- success: "bg-success text-success-foreground",
1826
- info: "bg-info text-info-foreground",
1827
- warning: "bg-warning text-warning-foreground"
1828
- };
1829
- const NotificationBadge = React__namespace.forwardRef(
1830
- ({
1831
- className,
1832
- count = 0,
1833
- max = 99,
1834
- showZero = false,
1835
- dot = false,
1836
- variant = "destructive",
1837
- children,
1838
- ...props
1839
- }, ref) => {
1840
- const displayCount = count > max ? `${max}+` : count;
1841
- const shouldShow = count > 0 || showZero;
1842
- if (!shouldShow && !dot) {
1843
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children });
1844
- }
1845
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: button.cn("relative inline-block", className), ...props, children: [
1846
- children,
1847
- /* @__PURE__ */ jsxRuntime.jsx(
1848
- "span",
1849
- {
1850
- className: button.cn(
1851
- "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
1852
- variantStyles[variant],
1853
- dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
1854
- ),
1855
- children: !dot && shouldShow && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
1856
- }
1857
- )
1858
- ] });
1859
- }
1860
- );
1861
- NotificationBadge.displayName = "NotificationBadge";
1862
- const StatsCard = React__namespace.forwardRef(
1863
- ({ className, title, value, description, trend, icon, ...props }, ref) => {
1864
- const getTrendIcon = () => {
1865
- if (!trend) return null;
1866
- if (trend.value > 0) {
1867
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-success" });
1868
- } else if (trend.value < 0) {
1869
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-4 w-4 text-destructive" });
1870
- } else {
1871
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "h-4 w-4 text-muted-foreground" });
1872
- }
1873
- };
1874
- const getTrendColor = () => {
1875
- if (!trend) return "";
1876
- if (trend.value > 0) {
1877
- return "text-success";
1878
- } else if (trend.value < 0) {
1879
- return "text-destructive";
1880
- } else {
1881
- return "text-muted-foreground";
1882
- }
1883
- };
1884
- return /* @__PURE__ */ jsxRuntime.jsx(card.Card, { ref, className: button.cn("", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(card.CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1885
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
1886
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
1887
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
1888
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
1889
- trend && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: button.cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
1890
- getTrendIcon(),
1891
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1892
- Math.abs(trend.value),
1893
- "%"
1894
- ] })
1895
- ] })
1896
- ] }),
1897
- (description || (trend == null ? void 0 : trend.label)) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1 text-xs sm:text-sm", children: (trend == null ? void 0 : trend.label) || description })
1898
- ] }),
1899
- icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
1900
- ] }) }) });
1901
- }
1902
- );
1903
- StatsCard.displayName = "StatsCard";
1904
- const Timeline = React__namespace.forwardRef(
1905
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ol", { ref, className: button.cn("relative border-l border-border", className), ...props })
1906
- );
1907
- Timeline.displayName = "Timeline";
1908
- const TimelineItem = React__namespace.forwardRef(
1909
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: button.cn("mb-10 ml-6", className), ...props })
1910
- );
1911
- TimelineItem.displayName = "TimelineItem";
1912
- const TimelineDot = React__namespace.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
1913
- const variantStyles2 = {
1914
- default: "bg-muted border-border",
1915
- primary: "bg-primary border-primary",
1916
- success: "bg-success border-success",
1917
- info: "bg-info border-info",
1918
- warning: "bg-warning border-warning",
1919
- destructive: "bg-destructive border-destructive",
1920
- outline: "bg-background border-border"
1921
- };
1922
- const iconColorStyles = {
1923
- default: "text-muted-foreground",
1924
- primary: "text-primary-foreground",
1925
- success: "text-success-foreground",
1926
- info: "text-info-foreground",
1927
- warning: "text-warning-foreground",
1928
- destructive: "text-destructive-foreground",
1929
- outline: "text-foreground"
1930
- };
1931
- if (icon || children) {
1932
- return /* @__PURE__ */ jsxRuntime.jsx(
1933
- "div",
1934
- {
1935
- ref,
1936
- className: button.cn(
1937
- "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
1938
- variantStyles2[variant],
1939
- className
1940
- ),
1941
- ...props,
1942
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: button.cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
1943
- }
1944
- );
1945
- }
1946
- return /* @__PURE__ */ jsxRuntime.jsx(
1947
- "div",
1948
- {
1949
- ref,
1950
- className: button.cn(
1951
- "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
1952
- variantStyles2[variant],
1953
- className
1954
- ),
1955
- ...props
1956
- }
1957
- );
1958
- });
1959
- TimelineDot.displayName = "TimelineDot";
1960
- const TimelineContent = React__namespace.forwardRef(
1961
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: button.cn("", className), ...props })
1962
- );
1963
- TimelineContent.displayName = "TimelineContent";
1964
- const TimelineHeading = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: button.cn("mb-1 text-foreground", className), ...props }));
1965
- TimelineHeading.displayName = "TimelineHeading";
1966
- const TimelineTime = React__namespace.forwardRef(
1967
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("time", { ref, className: button.cn("mb-2 block text-muted-foreground", className), ...props })
1968
- );
1969
- TimelineTime.displayName = "TimelineTime";
1970
- const TimelineDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: button.cn("text-muted-foreground", className), ...props }));
1971
- TimelineDescription.displayName = "TimelineDescription";
1972
- function useTreeView({
1973
- data,
1974
- defaultExpanded = [],
1975
- selectedNodeId,
1976
- onNodeClick,
1977
- onNodeSelect
1978
- }) {
1979
- const [expanded, setExpanded] = React.useState(new Set(defaultExpanded));
1980
- const [internalSelectedId, setInternalSelectedId] = React.useState(void 0);
1981
- const nodeRefs = React.useRef(/* @__PURE__ */ new Map());
1982
- const isControlled = selectedNodeId !== void 0;
1983
- const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
1984
- const getNodeRef = React.useCallback(
1985
- (nodeId) => (el) => {
1986
- if (el) nodeRefs.current.set(nodeId, el);
1987
- else nodeRefs.current.delete(nodeId);
1988
- },
1989
- []
1990
- );
1991
- const getVisibleNodes = React.useCallback(() => {
1992
- const result = [];
1993
- const traverse = (nodes) => {
1994
- var _a;
1995
- for (const node of nodes) {
1996
- result.push(node);
1997
- if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
1998
- }
1999
- };
2000
- traverse(data);
2001
- return result;
2002
- }, [data, expanded]);
2003
- const findParent = React.useCallback(
2004
- (nodes, targetId) => {
2005
- var _a;
2006
- for (const n of nodes) {
2007
- if ((_a = n.children) == null ? void 0 : _a.some((c) => c.id === targetId)) return n;
2008
- if (n.children) {
2009
- const found = findParent(n.children, targetId);
2010
- if (found) return found;
2011
- }
2012
- }
2013
- return null;
2014
- },
2015
- // findParent is a pure recursive function over `data` — no reactive deps needed
2016
- // eslint-disable-next-line react-hooks/exhaustive-deps
2017
- []
2018
- );
2019
- const toggleExpand = React.useCallback((nodeId) => {
2020
- setExpanded((prev) => {
2021
- const next = new Set(prev);
2022
- next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
2023
- return next;
2024
- });
2025
- }, []);
2026
- const handleSelect = React.useCallback(
2027
- (node) => {
2028
- if (!isControlled) setInternalSelectedId(node.id);
2029
- onNodeSelect == null ? void 0 : onNodeSelect(node);
2030
- onNodeClick == null ? void 0 : onNodeClick(node);
2031
- },
2032
- [isControlled, onNodeClick, onNodeSelect]
2033
- );
2034
- const handleKeyDown = React.useCallback(
2035
- (e, node) => {
2036
- var _a, _b;
2037
- const visibleNodes = getVisibleNodes();
2038
- const idx = visibleNodes.findIndex((n) => n.id === node.id);
2039
- const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
2040
- const isExpanded = expanded.has(node.id);
2041
- const focusNode = (id) => {
2042
- var _a2;
2043
- (_a2 = nodeRefs.current.get(id)) == null ? void 0 : _a2.focus();
2044
- };
2045
- switch (e.key) {
2046
- case "ArrowDown": {
2047
- e.preventDefault();
2048
- const next = visibleNodes[idx + 1];
2049
- if (next) focusNode(next.id);
2050
- break;
2051
- }
2052
- case "ArrowUp": {
2053
- e.preventDefault();
2054
- const prev = visibleNodes[idx - 1];
2055
- if (prev) focusNode(prev.id);
2056
- break;
2057
- }
2058
- case "ArrowRight": {
2059
- e.preventDefault();
2060
- if (hasChildren && !isExpanded) {
2061
- toggleExpand(node.id);
2062
- } else if (hasChildren && isExpanded && ((_b = node.children) == null ? void 0 : _b.length)) {
2063
- focusNode(node.children[0].id);
2064
- }
2065
- break;
2066
- }
2067
- case "ArrowLeft": {
2068
- e.preventDefault();
2069
- if (hasChildren && isExpanded) {
2070
- toggleExpand(node.id);
2071
- } else {
2072
- const parent = findParent(data, node.id);
2073
- if (parent) focusNode(parent.id);
2074
- }
2075
- break;
2076
- }
2077
- case "Home": {
2078
- e.preventDefault();
2079
- if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
2080
- break;
2081
- }
2082
- case "End": {
2083
- e.preventDefault();
2084
- const last = visibleNodes[visibleNodes.length - 1];
2085
- if (last) focusNode(last.id);
2086
- break;
2087
- }
2088
- case " ": {
2089
- e.preventDefault();
2090
- if (hasChildren) {
2091
- toggleExpand(node.id);
2092
- } else {
2093
- handleSelect(node);
2094
- }
2095
- break;
2096
- }
2097
- case "Enter": {
2098
- e.preventDefault();
2099
- if (hasChildren) toggleExpand(node.id);
2100
- handleSelect(node);
2101
- break;
2102
- }
2103
- }
2104
- },
2105
- [data, expanded, findParent, getVisibleNodes, handleSelect, toggleExpand]
2106
- );
2107
- return {
2108
- expanded,
2109
- effectiveSelectedId,
2110
- nodeRefs,
2111
- getNodeRef,
2112
- toggleExpand,
2113
- handleSelect,
2114
- handleKeyDown,
2115
- getVisibleNodes
2116
- };
2117
- }
2118
- const TreeView = React__namespace.forwardRef(
2119
- ({
2120
- className,
2121
- data,
2122
- onNodeClick,
2123
- onNodeSelect,
2124
- defaultExpanded = [],
2125
- selectedNodeId,
2126
- ariaLabel,
2127
- ...props
2128
- }, ref) => {
2129
- var _a;
2130
- const { expanded, effectiveSelectedId, getNodeRef, toggleExpand, handleSelect, handleKeyDown } = useTreeView({ data, defaultExpanded, selectedNodeId, onNodeClick, onNodeSelect });
2131
- const focusableId = effectiveSelectedId ?? ((_a = data[0]) == null ? void 0 : _a.id);
2132
- return /* @__PURE__ */ jsxRuntime.jsx(
2133
- "div",
2134
- {
2135
- ref,
2136
- className: button.cn("w-full", className),
2137
- role: "tree",
2138
- "aria-label": ariaLabel ?? "Navegação em árvore",
2139
- ...props,
2140
- children: data.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
2141
- TreeNodeComponent,
2142
- {
2143
- node,
2144
- level: 0,
2145
- expanded,
2146
- selectedId: effectiveSelectedId,
2147
- focusableId,
2148
- onToggle: toggleExpand,
2149
- onSelect: handleSelect,
2150
- onKeyDown: handleKeyDown,
2151
- getNodeRef
2152
- },
2153
- node.id
2154
- ))
2155
- }
2156
- );
2157
- }
2158
- );
2159
- TreeView.displayName = "TreeView";
2160
- const TreeNodeComponent = ({
2161
- node,
2162
- level,
2163
- expanded,
2164
- selectedId,
2165
- focusableId,
2166
- onToggle,
2167
- onSelect,
2168
- onKeyDown,
2169
- getNodeRef
2170
- }) => {
2171
- var _a;
2172
- const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
2173
- const isExpanded = expanded.has(node.id);
2174
- const isSelected = node.id === selectedId;
2175
- const handleClick = () => {
2176
- if (hasChildren) onToggle(node.id);
2177
- onSelect(node);
2178
- };
2179
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "none", children: [
2180
- /* @__PURE__ */ jsxRuntime.jsxs(
2181
- "button",
2182
- {
2183
- ref: getNodeRef(node.id),
2184
- role: "treeitem",
2185
- "aria-expanded": hasChildren ? isExpanded : void 0,
2186
- "aria-selected": isSelected,
2187
- tabIndex: node.id === focusableId ? 0 : -1,
2188
- onClick: handleClick,
2189
- onKeyDown: (e) => onKeyDown(e, node),
2190
- className: button.cn(
2191
- "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
2192
- "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
2193
- isSelected && "bg-primary/10 text-primary font-medium"
2194
- ),
2195
- style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
2196
- children: [
2197
- hasChildren ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
2198
- node.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
2199
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-foreground", children: node.label })
2200
- ]
2201
- }
2202
- ),
2203
- hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
2204
- TreeNodeComponent,
2205
- {
2206
- node: child,
2207
- level: level + 1,
2208
- expanded,
2209
- selectedId,
2210
- focusableId,
2211
- onToggle,
2212
- onSelect,
2213
- onKeyDown,
2214
- getNodeRef
2215
- },
2216
- child.id
2217
- )) })
2218
- ] });
2219
- };
2220
- function Collapsible({ ...props }) {
2221
- return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Root, { "data-slot": "collapsible", ...props });
2222
- }
2223
- function CollapsibleTrigger({
2224
- ...props
2225
- }) {
2226
- return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
2227
- }
2228
- function CollapsibleContent({
2229
- ...props
2230
- }) {
2231
- return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
2232
- }
2233
- function Accordion({ ...props }) {
2234
- return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
2235
- }
2236
- function AccordionItem({
2237
- className,
2238
- ...props
2239
- }) {
2240
- return /* @__PURE__ */ jsxRuntime.jsx(
2241
- AccordionPrimitive__namespace.Item,
2242
- {
2243
- "data-slot": "accordion-item",
2244
- className: button.cn("border-b last:border-b-0", className),
2245
- ...props
2246
- }
2247
- );
2248
- }
2249
- function AccordionTrigger({
2250
- className,
2251
- children,
2252
- ...props
2253
- }) {
2254
- return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
2255
- AccordionPrimitive__namespace.Trigger,
2256
- {
2257
- "data-slot": "accordion-trigger",
2258
- className: button.cn(
2259
- "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
2260
- className
2261
- ),
2262
- ...props,
2263
- children: [
2264
- children,
2265
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
2266
- ]
2267
- }
2268
- ) });
2269
- }
2270
- function AccordionContent({
2271
- className,
2272
- children,
2273
- ...props
2274
- }) {
2275
- return /* @__PURE__ */ jsxRuntime.jsx(
2276
- AccordionPrimitive__namespace.Content,
2277
- {
2278
- "data-slot": "accordion-content",
2279
- className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
2280
- ...props,
2281
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("pt-0 pb-4", className), children })
2282
- }
2283
- );
2284
- }
2285
- const CarouselContext = React__namespace.createContext(null);
2286
- function useCarousel() {
2287
- const context = React__namespace.useContext(CarouselContext);
2288
- if (!context) {
2289
- throw new Error("useCarousel must be used within a <Carousel />");
2290
- }
2291
- return context;
2292
- }
2293
- function Carousel({
2294
- orientation = "horizontal",
2295
- opts,
2296
- setApi,
2297
- plugins,
2298
- className,
2299
- children,
2300
- ...props
2301
- }) {
2302
- const [carouselRef, api] = useEmblaCarousel(
2303
- {
2304
- ...opts,
2305
- axis: orientation === "horizontal" ? "x" : "y"
2306
- },
2307
- plugins
2308
- );
2309
- const [canScrollPrev, setCanScrollPrev] = React__namespace.useState(false);
2310
- const [canScrollNext, setCanScrollNext] = React__namespace.useState(false);
2311
- const onSelect = React__namespace.useCallback((api2) => {
2312
- if (!api2) return;
2313
- setCanScrollPrev(api2.canScrollPrev());
2314
- setCanScrollNext(api2.canScrollNext());
2315
- }, []);
2316
- const scrollPrev = React__namespace.useCallback(() => {
2317
- api == null ? void 0 : api.scrollPrev();
2318
- }, [api]);
2319
- const scrollNext = React__namespace.useCallback(() => {
2320
- api == null ? void 0 : api.scrollNext();
2321
- }, [api]);
2322
- const handleKeyDown = React__namespace.useCallback(
2323
- (event) => {
2324
- if (event.key === "ArrowLeft") {
2325
- event.preventDefault();
2326
- scrollPrev();
2327
- } else if (event.key === "ArrowRight") {
2328
- event.preventDefault();
2329
- scrollNext();
2330
- }
2331
- },
2332
- [scrollPrev, scrollNext]
2333
- );
2334
- React__namespace.useEffect(() => {
2335
- if (!api || !setApi) return;
2336
- setApi(api);
2337
- }, [api, setApi]);
2338
- React__namespace.useEffect(() => {
2339
- if (!api) return;
2340
- onSelect(api);
2341
- api.on("reInit", onSelect);
2342
- api.on("select", onSelect);
2343
- return () => {
2344
- api == null ? void 0 : api.off("select", onSelect);
2345
- };
2346
- }, [api, onSelect]);
2347
- return /* @__PURE__ */ jsxRuntime.jsx(
2348
- CarouselContext.Provider,
2349
- {
2350
- value: {
2351
- carouselRef,
2352
- api,
2353
- opts,
2354
- orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
2355
- scrollPrev,
2356
- scrollNext,
2357
- canScrollPrev,
2358
- canScrollNext
2359
- },
2360
- children: /* @__PURE__ */ jsxRuntime.jsx(
2361
- "div",
2362
- {
2363
- onKeyDownCapture: handleKeyDown,
2364
- className: button.cn("relative", className),
2365
- role: "region",
2366
- "aria-roledescription": "carousel",
2367
- "data-slot": "carousel",
2368
- ...props,
2369
- children
2370
- }
2371
- )
2372
- }
2373
- );
2374
- }
2375
- function CarouselContent({ className, ...props }) {
2376
- const { carouselRef, orientation } = useCarousel();
2377
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: /* @__PURE__ */ jsxRuntime.jsx(
2378
- "div",
2379
- {
2380
- className: button.cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
2381
- ...props
2382
- }
2383
- ) });
2384
- }
2385
- function CarouselItem({ className, ...props }) {
2386
- const { orientation } = useCarousel();
2387
- return /* @__PURE__ */ jsxRuntime.jsx(
2388
- "div",
2389
- {
2390
- role: "group",
2391
- "aria-roledescription": "slide",
2392
- "data-slot": "carousel-item",
2393
- className: button.cn(
2394
- "min-w-0 shrink-0 grow-0 basis-full",
2395
- orientation === "horizontal" ? "pl-4" : "pt-4",
2396
- className
2397
- ),
2398
- ...props
2399
- }
2400
- );
2401
- }
2402
- function CarouselPrevious({
2403
- className,
2404
- variant = "outline",
2405
- size = "icon",
2406
- ...props
2407
- }) {
2408
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
2409
- return /* @__PURE__ */ jsxRuntime.jsxs(
2410
- button.Button,
2411
- {
2412
- "data-slot": "carousel-previous",
2413
- variant,
2414
- size,
2415
- className: button.cn(
2416
- "absolute size-8 rounded-full",
2417
- orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
2418
- className
2419
- ),
2420
- disabled: !canScrollPrev,
2421
- onClick: scrollPrev,
2422
- ...props,
2423
- children: [
2424
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, {}),
2425
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous slide" })
2426
- ]
2427
- }
2428
- );
2429
- }
2430
- function CarouselNext({
2431
- className,
2432
- variant = "outline",
2433
- size = "icon",
2434
- ...props
2435
- }) {
2436
- const { orientation, scrollNext, canScrollNext } = useCarousel();
2437
- return /* @__PURE__ */ jsxRuntime.jsxs(
2438
- button.Button,
2439
- {
2440
- "data-slot": "carousel-next",
2441
- variant,
2442
- size,
2443
- className: button.cn(
2444
- "absolute size-8 rounded-full",
2445
- orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
2446
- className
2447
- ),
2448
- disabled: !canScrollNext,
2449
- onClick: scrollNext,
2450
- ...props,
2451
- children: [
2452
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, {}),
2453
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Next slide" })
2454
- ]
2455
- }
2456
- );
2457
- }
2458
- const StepperContext = React__namespace.createContext(void 0);
2459
- const useStepperContext = () => {
2460
- const context = React__namespace.useContext(StepperContext);
2461
- if (!context) throw new Error("useStepperContext must be used within a Stepper");
2462
- return context;
2463
- };
2464
- const Stepper = React__namespace.forwardRef(
2465
- ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
2466
- const totalSteps = React__namespace.Children.count(children);
2467
- return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: button.cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
2468
- "div",
2469
- {
2470
- className: button.cn(
2471
- orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
2472
- ),
2473
- role: "list",
2474
- "aria-label": `Progresso: etapa ${currentStep} de ${totalSteps}`,
2475
- children
2476
- }
2477
- ) }) });
2478
- }
2479
- );
2480
- Stepper.displayName = "Stepper";
2481
- const Step = React__namespace.forwardRef(
2482
- ({ step, label, description, error = false, className, ...props }, ref) => {
2483
- const { currentStep, totalSteps, orientation } = useStepperContext();
2484
- const isActive = step === currentStep;
2485
- const isCompleted = step < currentStep && !error;
2486
- const isFirst = step === 1;
2487
- const isLast = step === totalSteps;
2488
- const circleClasses = button.cn(
2489
- "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
2490
- isActive && !error && "border-primary bg-primary text-primary-foreground",
2491
- isCompleted && "border-primary bg-primary text-primary-foreground",
2492
- error && "border-destructive bg-destructive text-destructive-foreground",
2493
- !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
2494
- );
2495
- const connectorClasses = (filled) => button.cn("transition-colors", filled ? "bg-primary" : "bg-muted");
2496
- if (orientation === "vertical") {
2497
- return /* @__PURE__ */ jsxRuntime.jsxs(
2498
- "div",
2499
- {
2500
- ref,
2501
- className: button.cn("flex gap-4", className),
2502
- role: "listitem",
2503
- "aria-current": isActive ? "step" : void 0,
2504
- "aria-label": `Etapa ${step}: ${label}${isCompleted ? ", concluída" : isActive ? ", atual" : ""}`,
2505
- ...props,
2506
- children: [
2507
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
2508
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step }) }),
2509
- !isLast && /* @__PURE__ */ jsxRuntime.jsx(
2510
- "div",
2511
- {
2512
- className: button.cn(
2513
- "w-0.5 flex-1 min-h-[2rem] mt-1",
2514
- connectorClasses(step < currentStep)
2515
- )
2516
- }
2517
- )
2518
- ] }),
2519
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: button.cn("pb-6", isLast && "pb-0"), children: [
2520
- /* @__PURE__ */ jsxRuntime.jsx(
2521
- "div",
2522
- {
2523
- className: button.cn(
2524
- "transition-colors",
2525
- isActive || error ? "text-foreground" : "text-muted-foreground"
2526
- ),
2527
- children: label
2528
- }
2529
- ),
2530
- description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
2531
- ] })
2532
- ]
2533
- }
2534
- );
2535
- }
2536
- return /* @__PURE__ */ jsxRuntime.jsxs(
2537
- "div",
2538
- {
2539
- ref,
2540
- className: button.cn("flex flex-1 flex-col items-center", className),
2541
- role: "listitem",
2542
- "aria-current": isActive ? "step" : void 0,
2543
- "aria-label": `Etapa ${step}: ${label}${isCompleted ? ", concluída" : isActive ? ", atual" : ""}`,
2544
- ...props,
2545
- children: [
2546
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-start", children: [
2547
- step > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
2548
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step }) }),
2549
- step < totalSteps && /* @__PURE__ */ jsxRuntime.jsx("div", { className: button.cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
2550
- ] }),
2551
- /* @__PURE__ */ jsxRuntime.jsxs(
2552
- "div",
2553
- {
2554
- className: button.cn(
2555
- "mt-2 px-1",
2556
- isFirst && "text-left self-start",
2557
- isLast && "text-right self-end",
2558
- !isFirst && !isLast && "text-center w-full"
2559
- ),
2560
- children: [
2561
- /* @__PURE__ */ jsxRuntime.jsx(
2562
- "div",
2563
- {
2564
- className: button.cn(
2565
- "transition-colors",
2566
- isActive || error ? "text-foreground" : "text-muted-foreground"
2567
- ),
2568
- children: label
2569
- }
2570
- ),
2571
- description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
2572
- ]
2573
- }
2574
- )
2575
- ]
2576
- }
2577
- );
2578
- }
2579
- );
2580
- Step.displayName = "Step";
2581
- function useStepper({
2582
- totalSteps,
2583
- initialStep = 1,
2584
- step: controlledStep,
2585
- onStepChange,
2586
- onBeforeNext
2587
- }) {
2588
- const [internalStep, setInternalStep] = React.useState(
2589
- () => Math.min(Math.max(1, initialStep), totalSteps)
2590
- );
2591
- const isControlled = controlledStep !== void 0;
2592
- const currentStep = isControlled ? controlledStep : internalStep;
2593
- const setStep = React.useCallback(
2594
- (s) => {
2595
- const clamped = Math.min(Math.max(1, s), totalSteps);
2596
- if (!isControlled) setInternalStep(clamped);
2597
- onStepChange == null ? void 0 : onStepChange(clamped);
2598
- },
2599
- [isControlled, onStepChange, totalSteps]
2600
- );
2601
- const isFirstStep = currentStep === 1;
2602
- const isLastStep = currentStep === totalSteps;
2603
- const canGoPrev = currentStep > 1;
2604
- const canGoNext = currentStep < totalSteps;
2605
- const next = React.useCallback(async () => {
2606
- if (!canGoNext) return;
2607
- if (onBeforeNext) {
2608
- const allowed = await onBeforeNext(currentStep);
2609
- if (!allowed) return;
2610
- }
2611
- setStep(currentStep + 1);
2612
- }, [canGoNext, currentStep, onBeforeNext, setStep]);
2613
- const prev = React.useCallback(() => {
2614
- if (!canGoPrev) return;
2615
- setStep(currentStep - 1);
2616
- }, [canGoPrev, currentStep, setStep]);
2617
- const goTo = React.useCallback((s) => setStep(s), [setStep]);
2618
- const reset = React.useCallback(() => setStep(1), [setStep]);
2619
- return {
2620
- currentStep,
2621
- totalSteps,
2622
- isFirstStep,
2623
- isLastStep,
2624
- canGoPrev,
2625
- canGoNext,
2626
- next,
2627
- prev,
2628
- goTo,
2629
- reset
2630
- };
2631
- }
2632
- function useFileUpload({
2633
- maxFiles = 1,
2634
- maxSize = 5 * 1024 * 1024,
2635
- onFilesChange,
2636
- onError,
2637
- disabled = false
2638
- } = {}) {
2639
- const [files, setFiles] = React.useState([]);
2640
- const [dragActive, setDragActive] = React.useState(false);
2641
- const [errorMessage, setErrorMessage] = React.useState(null);
2642
- const inputRef = React.useRef(null);
2643
- const handleFiles = React.useCallback(
2644
- (newFiles) => {
2645
- if (!newFiles) return;
2646
- setErrorMessage(null);
2647
- const filesArray = Array.from(newFiles);
2648
- const oversized = filesArray.filter((f) => f.size > maxSize);
2649
- const validFiles = filesArray.filter((f) => f.size <= maxSize);
2650
- if (oversized.length > 0) {
2651
- const limitMB = (maxSize / 1024 / 1024).toFixed(0);
2652
- setErrorMessage(
2653
- `${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`
2654
- );
2655
- onError == null ? void 0 : onError(oversized, "size");
2656
- }
2657
- const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
2658
- const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
2659
- if (countRejected.length > 0) {
2660
- setErrorMessage(
2661
- `Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`
2662
- );
2663
- onError == null ? void 0 : onError(countRejected, "count");
2664
- }
2665
- setFiles(merged);
2666
- onFilesChange == null ? void 0 : onFilesChange(merged);
2667
- },
2668
- // eslint-disable-next-line react-hooks/exhaustive-deps
2669
- [files, maxFiles, maxSize, onError, onFilesChange]
2670
- );
2671
- const handleDrag = React.useCallback((e) => {
2672
- e.preventDefault();
2673
- e.stopPropagation();
2674
- if (e.type === "dragenter" || e.type === "dragover") {
2675
- setDragActive(true);
2676
- } else if (e.type === "dragleave") {
2677
- setDragActive(false);
2678
- }
2679
- }, []);
2680
- const handleDrop = React.useCallback(
2681
- (e) => {
2682
- e.preventDefault();
2683
- e.stopPropagation();
2684
- setDragActive(false);
2685
- if (disabled) return;
2686
- handleFiles(e.dataTransfer.files);
2687
- },
2688
- [disabled, handleFiles]
2689
- );
2690
- const handleChange = React.useCallback(
2691
- (e) => {
2692
- e.preventDefault();
2693
- if (disabled) return;
2694
- handleFiles(e.target.files);
2695
- },
2696
- [disabled, handleFiles]
2697
- );
2698
- const removeFile = React.useCallback(
2699
- (index) => {
2700
- setFiles((prev) => {
2701
- const updated = prev.filter((_, i) => i !== index);
2702
- onFilesChange == null ? void 0 : onFilesChange(updated);
2703
- if (updated.length === 0) setErrorMessage(null);
2704
- return updated;
2705
- });
2706
- },
2707
- [onFilesChange]
2708
- );
2709
- const openFileDialog = React.useCallback(() => {
2710
- var _a;
2711
- if (!disabled) {
2712
- setErrorMessage(null);
2713
- (_a = inputRef.current) == null ? void 0 : _a.click();
2714
- }
2715
- }, [disabled]);
2716
- return {
2717
- files,
2718
- dragActive,
2719
- errorMessage,
2720
- inputRef,
2721
- handleFiles,
2722
- handleDrag,
2723
- handleDrop,
2724
- handleChange,
2725
- removeFile,
2726
- openFileDialog
2727
- };
2728
- }
2729
- const FileUpload = React__namespace.forwardRef(
2730
- ({
2731
- className,
2732
- onFilesChange,
2733
- maxFiles = 1,
2734
- maxSize = 5 * 1024 * 1024,
2735
- // 5MB default
2736
- showPreview = true,
2737
- onError,
2738
- accept,
2739
- disabled,
2740
- ...props
2741
- }, ref) => {
2742
- const {
2743
- files,
2744
- dragActive,
2745
- errorMessage,
2746
- inputRef,
2747
- handleDrag,
2748
- handleDrop,
2749
- handleChange,
2750
- removeFile,
2751
- openFileDialog
2752
- } = useFileUpload({ maxFiles, maxSize, onFilesChange, onError, disabled });
2753
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: button.cn("w-full", className), children: [
2754
- /* @__PURE__ */ jsxRuntime.jsxs(
2755
- "div",
2756
- {
2757
- onDragEnter: handleDrag,
2758
- onDragLeave: handleDrag,
2759
- onDragOver: handleDrag,
2760
- onDrop: handleDrop,
2761
- onClick: openFileDialog,
2762
- className: button.cn(
2763
- "relative flex cursor-pointer flex-col items-center justify-center rounded-[var(--radius)] border-2 border-dashed border-border bg-background p-8 transition-colors hover:bg-muted/50",
2764
- dragActive && "border-primary bg-primary/5",
2765
- errorMessage && "border-destructive/50",
2766
- disabled && "cursor-not-allowed opacity-50"
2767
- ),
2768
- children: [
2769
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
2770
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-2 text-foreground", children: [
2771
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "Click to upload" }),
2772
- " or drag and drop"
2773
- ] }),
2774
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground", children: [
2775
- maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file",
2776
- " • Max",
2777
- " ",
2778
- (maxSize / 1024 / 1024).toFixed(0),
2779
- "MB"
2780
- ] }),
2781
- /* @__PURE__ */ jsxRuntime.jsx(
2782
- "input",
2783
- {
2784
- ...props,
2785
- ref: inputRef,
2786
- type: "file",
2787
- className: "hidden",
2788
- onChange: handleChange,
2789
- multiple: maxFiles > 1,
2790
- accept,
2791
- disabled
2792
- }
2793
- )
2794
- ]
2795
- }
2796
- ),
2797
- errorMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2 rounded-[var(--radius)] border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: [
2798
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4 shrink-0" }),
2799
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: errorMessage })
2800
- ] }),
2801
- showPreview && files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxRuntime.jsxs(
2802
- "div",
2803
- {
2804
- className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
2805
- children: [
2806
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2807
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
2808
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2809
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground", children: file.name }),
2810
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground", children: [
2811
- (file.size / 1024).toFixed(2),
2812
- " KB"
2813
- ] })
2814
- ] })
2815
- ] }),
2816
- /* @__PURE__ */ jsxRuntime.jsx(
2817
- button.Button,
2818
- {
2819
- type: "button",
2820
- variant: "ghost",
2821
- size: "sm",
2822
- onClick: (e) => {
2823
- e.stopPropagation();
2824
- removeFile(index);
2825
- },
2826
- disabled,
2827
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
2828
- }
2829
- )
2830
- ]
2831
- },
2832
- index
2833
- )) })
2834
- ] });
2835
- }
2836
- );
2837
- FileUpload.displayName = "FileUpload";
2838
- const Rating = React__namespace.forwardRef(
2839
- ({
2840
- className,
2841
- value = 0,
2842
- onChange,
2843
- max = 5,
2844
- readonly = false,
2845
- disabled = false,
2846
- size = "md",
2847
- showValue = false,
2848
- allowHalf = false,
2849
- getAriaLabel,
2850
- ...props
2851
- }, ref) => {
2852
- const [hoverValue, setHoverValue] = React__namespace.useState(null);
2853
- const isInteractive = !readonly && !disabled;
2854
- const sizeStyles = {
2855
- sm: "h-4 w-4",
2856
- md: "h-5 w-5",
2857
- lg: "h-6 w-6"
2858
- };
2859
- const handleClick = (rating) => {
2860
- if (isInteractive) onChange == null ? void 0 : onChange(rating);
2861
- };
2862
- const handleMouseMove = (e, rating) => {
2863
- if (!isInteractive) return;
2864
- if (allowHalf) {
2865
- const rect = e.currentTarget.getBoundingClientRect();
2866
- setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
2867
- } else {
2868
- setHoverValue(rating);
2869
- }
2870
- };
2871
- const handleMouseLeave = () => {
2872
- if (isInteractive) setHoverValue(null);
2873
- };
2874
- const handleClickWithHalf = (e, rating) => {
2875
- if (!isInteractive) return;
2876
- if (allowHalf) {
2877
- const rect = e.currentTarget.getBoundingClientRect();
2878
- const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
2879
- onChange == null ? void 0 : onChange(half);
2880
- } else {
2881
- handleClick(rating);
2882
- }
2883
- };
2884
- const displayValue = hoverValue ?? value;
2885
- return /* @__PURE__ */ jsxRuntime.jsxs(
2886
- "div",
2887
- {
2888
- ref,
2889
- className: button.cn("flex items-center gap-1", disabled && "opacity-50", className),
2890
- ...props,
2891
- children: [
2892
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
2893
- const rating = index + 1;
2894
- const isFull = rating <= displayValue;
2895
- const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
2896
- return /* @__PURE__ */ jsxRuntime.jsxs(
2897
- "button",
2898
- {
2899
- type: "button",
2900
- onClick: (e) => handleClickWithHalf(e, rating),
2901
- onMouseMove: (e) => handleMouseMove(e, rating),
2902
- onMouseLeave: handleMouseLeave,
2903
- disabled: readonly || disabled,
2904
- "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
2905
- className: button.cn(
2906
- "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2907
- isInteractive && "cursor-pointer hover:scale-110",
2908
- !isInteractive && "cursor-default"
2909
- ),
2910
- children: [
2911
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { className: button.cn(sizeStyles[size], "fill-none text-muted-foreground") }),
2912
- (isFull || isHalf) && /* @__PURE__ */ jsxRuntime.jsx(
2913
- "span",
2914
- {
2915
- className: button.cn("absolute inset-0 overflow-hidden", isHalf ? "w-1/2" : "w-full"),
2916
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { className: button.cn(sizeStyles[size], "fill-warning text-warning") })
2917
- }
2918
- )
2919
- ]
2920
- },
2921
- index
2922
- );
2923
- }) }),
2924
- showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
2925
- ]
2926
- }
2927
- );
2928
- }
2929
- );
2930
- Rating.displayName = "Rating";
2931
- const Search = React__namespace.forwardRef(
2932
- ({
2933
- className,
2934
- containerClassName,
2935
- onSearch,
2936
- onClear,
2937
- onChange,
2938
- size = "md",
2939
- searchLabel = "Search",
2940
- clearLabel = "Clear search",
2941
- value: controlledValue,
2942
- defaultValue,
2943
- ...props
2944
- }, ref) => {
2945
- const isControlled = controlledValue !== void 0;
2946
- const [internalValue, setInternalValue] = React__namespace.useState(
2947
- isControlled ? "" : defaultValue ?? ""
2948
- );
2949
- const displayValue = isControlled ? controlledValue : internalValue;
2950
- const sizeClasses = {
2951
- sm: "h-8 px-8 py-1 text-sm",
2952
- md: "h-10 px-10 py-2 text-base",
2953
- lg: "h-12 px-12 py-3 text-base"
2954
- };
2955
- const iconSizeClasses = {
2956
- sm: "left-2 h-3.5 w-3.5",
2957
- md: "left-3 h-4 w-4",
2958
- lg: "left-4 h-5 w-5"
2959
- };
2960
- const clearSizeClasses = {
2961
- sm: "right-2",
2962
- md: "right-3",
2963
- lg: "right-4"
2964
- };
2965
- const handleChange = (e) => {
2966
- const newValue = e.target.value;
2967
- if (!isControlled) setInternalValue(newValue);
2968
- onChange == null ? void 0 : onChange(e);
2969
- onSearch == null ? void 0 : onSearch(newValue);
2970
- };
2971
- const handleClear = () => {
2972
- if (!isControlled) setInternalValue("");
2973
- onClear == null ? void 0 : onClear();
2974
- onSearch == null ? void 0 : onSearch("");
2975
- };
2976
- const handleKeyDown = (e) => {
2977
- var _a;
2978
- if (e.key === "Escape") {
2979
- handleClear();
2980
- }
2981
- (_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
2982
- };
2983
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: button.cn("relative w-full", containerClassName), children: [
2984
- /* @__PURE__ */ jsxRuntime.jsx(
2985
- lucideReact.Search,
2986
- {
2987
- "aria-hidden": "true",
2988
- className: button.cn(
2989
- "absolute top-1/2 -translate-y-1/2 text-muted-foreground",
2990
- iconSizeClasses[size]
2991
- )
2992
- }
2993
- ),
2994
- /* @__PURE__ */ jsxRuntime.jsx(
2995
- "input",
2996
- {
2997
- ref,
2998
- type: "text",
2999
- value: displayValue,
3000
- onChange: handleChange,
3001
- onKeyDown: handleKeyDown,
3002
- className: button.cn(
3003
- "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
3004
- "placeholder:text-muted-foreground",
3005
- "focus:ring-2 focus:ring-primary focus:border-transparent",
3006
- "disabled:cursor-not-allowed disabled:opacity-50",
3007
- sizeClasses[size],
3008
- className
3009
- ),
3010
- "aria-label": props.placeholder || searchLabel,
3011
- ...props
3012
- }
3013
- ),
3014
- displayValue && /* @__PURE__ */ jsxRuntime.jsx(
3015
- "button",
3016
- {
3017
- type: "button",
3018
- onClick: handleClear,
3019
- "aria-label": clearLabel,
3020
- className: button.cn(
3021
- "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
3022
- clearSizeClasses[size]
3023
- ),
3024
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
3025
- }
3026
- )
3027
- ] });
3028
- }
3029
- );
3030
- Search.displayName = "Search";
3031
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
3032
- const RouteMapContent = React.forwardRef(
3033
- ({ apiKey, ...props }, ref) => {
3034
- const { isLoaded, loadError, load } = googleMapsLoader.useGoogleMapsLoader();
3035
- const {
3036
- origin,
3037
- destination,
3038
- waypoints = [],
3039
- travelMode = "DRIVING",
3040
- height = "450px",
3041
- mapContainerClassName,
3042
- disableDefaultUI = false,
3043
- zoomControl = true,
3044
- streetViewControl = false,
3045
- mapTypeControl = false,
3046
- fullscreenControl = true,
3047
- onRouteCalculated,
3048
- className,
3049
- ...divProps
3050
- } = props;
3051
- const mapRef = React.useRef(null);
3052
- const gmpMapRef = React.useRef(null);
3053
- const directionsRendererRef = React.useRef(null);
3054
- React.useRef(false);
3055
- const isCalculatingRef = React.useRef(false);
3056
- React.useEffect(() => {
3057
- if (!isLoaded && apiKey && !loadError && load) {
3058
- load(apiKey).catch(console.error);
3059
- }
3060
- }, [isLoaded, apiKey, loadError, load]);
3061
- React.useEffect(() => {
3062
- if (!isLoaded || !gmpMapRef.current) return;
3063
- const setupMap = (map) => {
3064
- mapRef.current = map;
3065
- const computedStyle = getComputedStyle(document.documentElement);
3066
- const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
3067
- if (!directionsRendererRef.current) {
3068
- directionsRendererRef.current = new google.maps.DirectionsRenderer({
3069
- map,
3070
- suppressMarkers: false,
3071
- polylineOptions: {
3072
- strokeColor: primaryColor,
3073
- strokeWeight: 5,
3074
- strokeOpacity: 0.8
3075
- }
3076
- });
3077
- } else {
3078
- directionsRendererRef.current.setMap(map);
3079
- }
3080
- };
3081
- const gmpMap = gmpMapRef.current;
3082
- if (gmpMap.innerMap) {
3083
- setupMap(gmpMap.innerMap);
3084
- } else {
3085
- const interval = setInterval(() => {
3086
- if (gmpMap.innerMap) {
3087
- setupMap(gmpMap.innerMap);
3088
- clearInterval(interval);
3089
- }
3090
- }, 100);
3091
- return () => clearInterval(interval);
3092
- }
3093
- return () => {
3094
- if (directionsRendererRef.current) {
3095
- directionsRendererRef.current.setMap(null);
3096
- }
3097
- mapRef.current = null;
3098
- };
3099
- }, [isLoaded]);
3100
- React.useEffect(() => {
3101
- if (gmpMapRef.current && origin) {
3102
- gmpMapRef.current.center = origin;
3103
- }
3104
- }, [origin.lat, origin.lng]);
3105
- React.useEffect(() => {
3106
- if (gmpMapRef.current) {
3107
- gmpMapRef.current.zoom = 13;
3108
- }
3109
- }, []);
3110
- React.useEffect(() => {
3111
- const map = mapRef.current;
3112
- const renderer = directionsRendererRef.current;
3113
- if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
3114
- if (!origin || !destination) return;
3115
- isCalculatingRef.current = true;
3116
- const directionsService = new google.maps.DirectionsService();
3117
- const request = {
3118
- origin,
3119
- destination,
3120
- waypoints: waypoints.map((wp) => ({
3121
- location: wp,
3122
- stopover: true
3123
- })),
3124
- travelMode: google.maps.TravelMode[travelMode]
3125
- };
3126
- directionsService.route(request, (result, status) => {
3127
- var _a;
3128
- isCalculatingRef.current = false;
3129
- if (status === "OK" && result) {
3130
- renderer.setDirections(result);
3131
- const route = result.routes[0];
3132
- if (((_a = route == null ? void 0 : route.legs) == null ? void 0 : _a.length) > 0 && onRouteCalculated) {
3133
- let totalDistance = 0;
3134
- let totalDuration = 0;
3135
- route.legs.forEach((leg) => {
3136
- if (leg.distance) totalDistance += leg.distance.value;
3137
- if (leg.duration) totalDuration += leg.duration.value;
3138
- });
3139
- const distanceKm = (totalDistance / 1e3).toFixed(1);
3140
- const distanceText = `${distanceKm} km`;
3141
- const hours = Math.floor(totalDuration / 3600);
3142
- const minutes = Math.floor(totalDuration % 3600 / 60);
3143
- const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
3144
- onRouteCalculated(distanceText, durationText);
3145
- }
3146
- }
3147
- });
3148
- }, [
3149
- isLoaded,
3150
- origin.lat,
3151
- origin.lng,
3152
- destination.lat,
3153
- destination.lng,
3154
- travelMode,
3155
- mapRef.current
3156
- ]);
3157
- if (loadError) {
3158
- return /* @__PURE__ */ jsxRuntime.jsx(
3159
- "div",
3160
- {
3161
- ref,
3162
- className: button.cn(
3163
- "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
3164
- className
3165
- ),
3166
- style: { height },
3167
- ...divProps,
3168
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-2 p-6", children: [
3169
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsxRuntime.jsx(
3170
- "svg",
3171
- {
3172
- className: "w-12 h-12 mx-auto",
3173
- fill: "none",
3174
- stroke: "currentColor",
3175
- viewBox: "0 0 24 24",
3176
- children: /* @__PURE__ */ jsxRuntime.jsx(
3177
- "path",
3178
- {
3179
- strokeLinecap: "round",
3180
- strokeLinejoin: "round",
3181
- strokeWidth: 2,
3182
- d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
3183
- }
3184
- )
3185
- }
3186
- ) }),
3187
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: "Failed to load Google Maps" }),
3188
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
3189
- ] }) })
3190
- }
3191
- );
3192
- }
3193
- if (!isLoaded) {
3194
- return /* @__PURE__ */ jsxRuntime.jsx(
3195
- "div",
3196
- {
3197
- ref,
3198
- className: button.cn(
3199
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
3200
- className
3201
- ),
3202
- style: { height },
3203
- ...divProps
3204
- }
3205
- );
3206
- }
3207
- return /* @__PURE__ */ jsxRuntime.jsx(
3208
- "div",
3209
- {
3210
- ref,
3211
- className: button.cn(
3212
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
3213
- className
3214
- ),
3215
- style: { height },
3216
- ...divProps,
3217
- children: /* @__PURE__ */ jsxRuntime.jsx(
3218
- "gmp-map",
3219
- {
3220
- ref: gmpMapRef,
3221
- style: { height: "100%", width: "100%", display: "block" },
3222
- "map-id": props.mapId || "xertica-route-map"
3223
- }
3224
- )
3225
- }
3226
- );
3227
- }
3228
- );
3229
- RouteMapContent.displayName = "RouteMapContent";
3230
- const RouteMap = React.forwardRef((props, ref) => {
3231
- const { isLoaded, loadError } = googleMapsLoader.useGoogleMapsLoader();
3232
- const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("AssistantChart-DO5UuX4J.cjs", document.baseURI).href } !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
3233
- const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
3234
- if (isLoaded || isValidKey || loadError) {
3235
- return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3236
- }
3237
- const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
3238
- if (isScriptInjected) {
3239
- return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3240
- }
3241
- const {
3242
- origin,
3243
- destination,
3244
- waypoints,
3245
- travelMode,
3246
- height,
3247
- apiKey,
3248
- mapContainerClassName,
3249
- disableDefaultUI,
3250
- zoomControl,
3251
- streetViewControl,
3252
- mapTypeControl,
3253
- fullscreenControl,
3254
- onRouteCalculated,
3255
- ...divProps
3256
- } = props;
3257
- return /* @__PURE__ */ jsxRuntime.jsx(
3258
- "div",
3259
- {
3260
- ref,
3261
- className: button.cn(
3262
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
3263
- props.className
3264
- ),
3265
- style: { height: props.height || "450px" },
3266
- ...divProps,
3267
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted/50 to-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-3 p-6", children: [
3268
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
3269
- "svg",
3270
- {
3271
- className: "w-8 h-8 text-primary",
3272
- fill: "none",
3273
- stroke: "currentColor",
3274
- viewBox: "0 0 24 24",
3275
- children: [
3276
- /* @__PURE__ */ jsxRuntime.jsx(
3277
- "path",
3278
- {
3279
- strokeLinecap: "round",
3280
- strokeLinejoin: "round",
3281
- strokeWidth: 2,
3282
- d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
3283
- }
3284
- ),
3285
- /* @__PURE__ */ jsxRuntime.jsx(
3286
- "path",
3287
- {
3288
- strokeLinecap: "round",
3289
- strokeLinejoin: "round",
3290
- strokeWidth: 2,
3291
- d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
3292
- }
3293
- )
3294
- ]
3295
- }
3296
- ) }),
3297
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
3298
- ] }) })
3299
- }
3300
- );
3301
- });
3302
- RouteMap.displayName = "RouteMap";
3303
- const SimpleMap = React.forwardRef(
3304
- ({
3305
- center,
3306
- address,
3307
- markerTitle,
3308
- markerInfo,
3309
- showMarker = true,
3310
- zoom = 15,
3311
- height = "350px",
3312
- ...props
3313
- }, ref) => {
3314
- const markers = showMarker && center ? [
3315
- {
3316
- position: center,
3317
- title: markerTitle || address || "Location",
3318
- info: markerInfo || address
3319
- }
3320
- ] : [];
3321
- return /* @__PURE__ */ jsxRuntime.jsx(alertDialog.Map, { ref, center, zoom, height, markers, ...props });
3322
- }
3323
- );
3324
- SimpleMap.displayName = "SimpleMap";
3325
- function AssistantChart({
3326
- data,
3327
- config,
3328
- categoryKey = "month",
3329
- bars,
3330
- xAxisFormatter,
3331
- className
3332
- }) {
3333
- const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
3334
- const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
3335
- return /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartContainer, { config, className: button.cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs(RechartsPrimitive.BarChart, { accessibilityLayer: true, data, children: [
3336
- /* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.CartesianGrid, { vertical: false }),
3337
- /* @__PURE__ */ jsxRuntime.jsx(
3338
- RechartsPrimitive.XAxis,
3339
- {
3340
- dataKey: categoryKey,
3341
- tickLine: false,
3342
- tickMargin: 10,
3343
- axisLine: false,
3344
- tickFormatter: formatTick
3345
- }
3346
- ),
3347
- /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartTooltipContent, { indicator: "dashed" }) }),
3348
- resolvedBars.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
3349
- RechartsPrimitive.Bar,
3350
- {
3351
- dataKey: bar.dataKey,
3352
- fill: bar.fill ?? `var(--color-${bar.dataKey})`,
3353
- radius: bar.radius ?? 4
3354
- },
3355
- bar.dataKey
3356
- ))
3357
- ] }) });
3358
- }
3359
- exports.Accordion = Accordion;
3360
- exports.AccordionContent = AccordionContent;
3361
- exports.AccordionItem = AccordionItem;
3362
- exports.AccordionTrigger = AccordionTrigger;
3363
- exports.AspectRatio = AspectRatio;
3364
- exports.AssistantChart = AssistantChart;
3365
- exports.Calendar = Calendar;
3366
- exports.CalendarDayButton = CalendarDayButton;
3367
- exports.Carousel = Carousel;
3368
- exports.CarouselContent = CarouselContent;
3369
- exports.CarouselItem = CarouselItem;
3370
- exports.CarouselNext = CarouselNext;
3371
- exports.CarouselPrevious = CarouselPrevious;
3372
- exports.Collapsible = Collapsible;
3373
- exports.CollapsibleContent = CollapsibleContent;
3374
- exports.CollapsibleTrigger = CollapsibleTrigger;
3375
- exports.Command = Command;
3376
- exports.CommandDialog = CommandDialog;
3377
- exports.CommandEmpty = CommandEmpty;
3378
- exports.CommandGroup = CommandGroup;
3379
- exports.CommandInput = CommandInput;
3380
- exports.CommandItem = CommandItem;
3381
- exports.CommandList = CommandList;
3382
- exports.CommandSeparator = CommandSeparator;
3383
- exports.CommandShortcut = CommandShortcut;
3384
- exports.ContextMenu = ContextMenu;
3385
- exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
3386
- exports.ContextMenuContent = ContextMenuContent;
3387
- exports.ContextMenuGroup = ContextMenuGroup;
3388
- exports.ContextMenuItem = ContextMenuItem;
3389
- exports.ContextMenuLabel = ContextMenuLabel;
3390
- exports.ContextMenuPortal = ContextMenuPortal;
3391
- exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
3392
- exports.ContextMenuRadioItem = ContextMenuRadioItem;
3393
- exports.ContextMenuSeparator = ContextMenuSeparator;
3394
- exports.ContextMenuShortcut = ContextMenuShortcut;
3395
- exports.ContextMenuSub = ContextMenuSub;
3396
- exports.ContextMenuSubContent = ContextMenuSubContent;
3397
- exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
3398
- exports.ContextMenuTrigger = ContextMenuTrigger;
3399
- exports.Drawer = Drawer;
3400
- exports.DrawerClose = DrawerClose;
3401
- exports.DrawerContent = DrawerContent;
3402
- exports.DrawerDescription = DrawerDescription;
3403
- exports.DrawerFooter = DrawerFooter;
3404
- exports.DrawerHandle = DrawerHandle;
3405
- exports.DrawerHeader = DrawerHeader;
3406
- exports.DrawerOverlay = DrawerOverlay;
3407
- exports.DrawerPortal = DrawerPortal;
3408
- exports.DrawerTitle = DrawerTitle;
3409
- exports.DrawerTrigger = DrawerTrigger;
3410
- exports.FileUpload = FileUpload;
3411
- exports.Form = Form;
3412
- exports.FormControl = FormControl;
3413
- exports.FormDescription = FormDescription;
3414
- exports.FormField = FormField;
3415
- exports.FormItem = FormItem;
3416
- exports.FormLabel = FormLabel;
3417
- exports.FormMessage = FormMessage;
3418
- exports.HoverCard = HoverCard;
3419
- exports.HoverCardContent = HoverCardContent;
3420
- exports.HoverCardTrigger = HoverCardTrigger;
3421
- exports.InputOTP = InputOTP;
3422
- exports.InputOTPGroup = InputOTPGroup;
3423
- exports.InputOTPSeparator = InputOTPSeparator;
3424
- exports.InputOTPSlot = InputOTPSlot;
3425
- exports.Menubar = Menubar;
3426
- exports.MenubarCheckboxItem = MenubarCheckboxItem;
3427
- exports.MenubarContent = MenubarContent;
3428
- exports.MenubarGroup = MenubarGroup;
3429
- exports.MenubarItem = MenubarItem;
3430
- exports.MenubarLabel = MenubarLabel;
3431
- exports.MenubarMenu = MenubarMenu;
3432
- exports.MenubarPortal = MenubarPortal;
3433
- exports.MenubarRadioGroup = MenubarRadioGroup;
3434
- exports.MenubarRadioItem = MenubarRadioItem;
3435
- exports.MenubarSeparator = MenubarSeparator;
3436
- exports.MenubarShortcut = MenubarShortcut;
3437
- exports.MenubarSub = MenubarSub;
3438
- exports.MenubarSubContent = MenubarSubContent;
3439
- exports.MenubarSubTrigger = MenubarSubTrigger;
3440
- exports.MenubarTrigger = MenubarTrigger;
3441
- exports.NavigationMenu = NavigationMenu;
3442
- exports.NavigationMenuContent = NavigationMenuContent;
3443
- exports.NavigationMenuIndicator = NavigationMenuIndicator;
3444
- exports.NavigationMenuItem = NavigationMenuItem;
3445
- exports.NavigationMenuLink = NavigationMenuLink;
3446
- exports.NavigationMenuList = NavigationMenuList;
3447
- exports.NavigationMenuTrigger = NavigationMenuTrigger;
3448
- exports.NavigationMenuViewport = NavigationMenuViewport;
3449
- exports.NotificationBadge = NotificationBadge;
3450
- exports.Pagination = Pagination;
3451
- exports.PaginationContent = PaginationContent;
3452
- exports.PaginationEllipsis = PaginationEllipsis;
3453
- exports.PaginationItem = PaginationItem;
3454
- exports.PaginationLink = PaginationLink;
3455
- exports.PaginationNext = PaginationNext;
3456
- exports.PaginationPrevious = PaginationPrevious;
3457
- exports.Rating = Rating;
3458
- exports.ResizableHandle = ResizableHandle;
3459
- exports.ResizablePanel = ResizablePanel;
3460
- exports.ResizablePanelGroup = ResizablePanelGroup;
3461
- exports.RouteMap = RouteMap;
3462
- exports.Search = Search;
3463
- exports.Sheet = Sheet;
3464
- exports.SheetBody = SheetBody;
3465
- exports.SheetClose = SheetClose;
3466
- exports.SheetContent = SheetContent;
3467
- exports.SheetDescription = SheetDescription;
3468
- exports.SheetFooter = SheetFooter;
3469
- exports.SheetHeader = SheetHeader;
3470
- exports.SheetPortal = SheetPortal;
3471
- exports.SheetTitle = SheetTitle;
3472
- exports.SheetTrigger = SheetTrigger;
3473
- exports.SimpleMap = SimpleMap;
3474
- exports.StatsCard = StatsCard;
3475
- exports.Step = Step;
3476
- exports.Stepper = Stepper;
3477
- exports.Timeline = Timeline;
3478
- exports.TimelineContent = TimelineContent;
3479
- exports.TimelineDescription = TimelineDescription;
3480
- exports.TimelineDot = TimelineDot;
3481
- exports.TimelineHeading = TimelineHeading;
3482
- exports.TimelineItem = TimelineItem;
3483
- exports.TimelineTime = TimelineTime;
3484
- exports.Toggle = Toggle;
3485
- exports.ToggleGroup = ToggleGroup;
3486
- exports.ToggleGroupItem = ToggleGroupItem;
3487
- exports.TreeView = TreeView;
3488
- exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
3489
- exports.toggleVariants = toggleVariants;
3490
- exports.useFileUpload = useFileUpload;
3491
- exports.useFormField = useFormField;
3492
- exports.usePagination = usePagination;
3493
- exports.useStepper = useStepper;
3494
- exports.useStepperContext = useStepperContext;
3495
- exports.useTreeView = useTreeView;