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