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