xertica-ui 2.5.1 → 2.5.2

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 (535) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +14 -16
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/generate-tokens.ts +262 -262
  6. package/bin/language-config.ts +359 -358
  7. package/components/assistant/code-block/CodeBlock.tsx +268 -268
  8. package/components/assistant/formatted-document/FormattedDocument.tsx +147 -147
  9. package/components/assistant/modern-chat-input/ModernChatInput.tsx +564 -564
  10. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -99
  11. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -104
  12. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -81
  13. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +88 -88
  14. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -75
  15. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +564 -564
  16. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -67
  17. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -103
  18. package/components/assistant/xertica-assistant/use-assistant.ts +615 -615
  19. package/components/assistant/xertica-assistant/xertica-assistant.tsx +611 -611
  20. package/components/blocks/card-patterns/ActivityCard.tsx +100 -100
  21. package/components/blocks/card-patterns/ActivityCardSkeleton.tsx +56 -56
  22. package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +58 -58
  23. package/components/blocks/card-patterns/NotificationCard.tsx +140 -140
  24. package/components/blocks/card-patterns/NotificationCardSkeleton.tsx +81 -81
  25. package/components/blocks/card-patterns/ProfileCard.tsx +112 -112
  26. package/components/blocks/card-patterns/ProfileCardSkeleton.tsx +69 -69
  27. package/components/blocks/card-patterns/ProjectCard.tsx +123 -123
  28. package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +67 -67
  29. package/components/blocks/card-patterns/QuickActionCardSkeleton.tsx +44 -44
  30. package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -594
  31. package/components/blocks/card-patterns/index.ts +29 -29
  32. package/components/brand/language-selector/LanguageSelector.tsx +102 -102
  33. package/components/brand/language-selector/language-selector.stories.tsx +111 -111
  34. package/components/brand/language-selector/language-selector.test.tsx +101 -101
  35. package/components/brand/theme-toggle/ThemeToggle.tsx +74 -74
  36. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  37. package/components/index.ts +86 -86
  38. package/components/layout/sidebar/sidebar.mdx +1 -1
  39. package/components/layout/sidebar/sidebar.stories.tsx +1033 -787
  40. package/components/layout/sidebar/sidebar.tsx +338 -1
  41. package/components/media/FloatingMediaWrapper.tsx +371 -371
  42. package/components/media/audio-player/AudioPlayer.tsx +768 -768
  43. package/components/media/video-player/VideoPlayer.tsx +310 -310
  44. package/components/pages/home-content/HomeContent.tsx +120 -120
  45. package/components/pages/home-content/home-content.mdx +62 -62
  46. package/components/pages/home-page/HomePage.tsx +78 -78
  47. package/components/pages/home-page/home-page.mdx +53 -53
  48. package/components/pages/template-content/TemplateContent.tsx +1354 -1354
  49. package/components/pages/template-content/template-content.mdx +61 -61
  50. package/components/pages/template-page/TemplatePage.stories.tsx +32 -32
  51. package/components/pages/template-page/template-page.mdx +53 -53
  52. package/components/shared/error-boundary.stories.tsx +114 -114
  53. package/components/shared/error-boundary.tsx +150 -150
  54. package/components/shared/error-fallbacks.tsx +222 -222
  55. package/components/ui/accordion/accordion.mdx +8 -8
  56. package/components/ui/alert/alert.mdx +8 -8
  57. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  58. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  59. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  60. package/components/ui/avatar/avatar.mdx +8 -8
  61. package/components/ui/badge/badge.mdx +8 -8
  62. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  63. package/components/ui/button/button.mdx +8 -8
  64. package/components/ui/calendar/calendar.mdx +8 -8
  65. package/components/ui/card/card.mdx +8 -8
  66. package/components/ui/carousel/carousel.mdx +8 -8
  67. package/components/ui/chart/chart.mdx +8 -8
  68. package/components/ui/chart/chart.test.tsx +178 -178
  69. package/components/ui/chart/chart.tsx +2245 -2239
  70. package/components/ui/checkbox/checkbox.mdx +8 -8
  71. package/components/ui/collapsible/collapsible.mdx +8 -8
  72. package/components/ui/command/command.mdx +8 -8
  73. package/components/ui/context-menu/context-menu.mdx +8 -8
  74. package/components/ui/dialog/dialog.mdx +8 -8
  75. package/components/ui/drawer/drawer.mdx +8 -8
  76. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  77. package/components/ui/empty/empty.mdx +8 -8
  78. package/components/ui/file-upload/file-upload.mdx +8 -8
  79. package/components/ui/hover-card/hover-card.mdx +8 -8
  80. package/components/ui/input/input.mdx +8 -8
  81. package/components/ui/input-otp/input-otp.mdx +8 -8
  82. package/components/ui/label/label.mdx +8 -8
  83. package/components/ui/map/map.mdx +8 -8
  84. package/components/ui/menubar/menubar.mdx +8 -8
  85. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  86. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  87. package/components/ui/pagination/pagination.mdx +8 -8
  88. package/components/ui/popover/popover.mdx +8 -8
  89. package/components/ui/progress/progress.mdx +8 -8
  90. package/components/ui/radio-group/radio-group.mdx +8 -8
  91. package/components/ui/rating/rating.mdx +8 -8
  92. package/components/ui/resizable/resizable.mdx +8 -8
  93. package/components/ui/route-map/route-map.mdx +8 -8
  94. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  95. package/components/ui/search/search.mdx +8 -8
  96. package/components/ui/select/select.mdx +8 -8
  97. package/components/ui/separator/separator.mdx +8 -8
  98. package/components/ui/sheet/sheet.mdx +8 -8
  99. package/components/ui/simple-map/simple-map.mdx +8 -8
  100. package/components/ui/skeleton/skeleton.mdx +8 -8
  101. package/components/ui/slider/slider.mdx +8 -8
  102. package/components/ui/sonner/sonner.mdx +8 -8
  103. package/components/ui/stats-card/index.ts +2 -2
  104. package/components/ui/stats-card/stats-card-skeleton.tsx +60 -60
  105. package/components/ui/stats-card/stats-card.mdx +8 -8
  106. package/components/ui/stats-card/stats-card.tsx +109 -109
  107. package/components/ui/stepper/stepper.mdx +8 -8
  108. package/components/ui/switch/switch.mdx +8 -8
  109. package/components/ui/table/table.mdx +8 -8
  110. package/components/ui/tabs/tabs.mdx +8 -8
  111. package/components/ui/textarea/textarea.mdx +8 -8
  112. package/components/ui/timeline/timeline.mdx +8 -8
  113. package/components/ui/toggle/toggle.mdx +8 -8
  114. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  115. package/components/ui/tooltip/tooltip.mdx +8 -8
  116. package/components/ui/tree-view/tree-view.mdx +8 -8
  117. package/components.json +511 -511
  118. package/contexts/AuthContext.tsx +121 -121
  119. package/contexts/BrandColorsContext.tsx +282 -282
  120. package/contexts/LanguageContext.test.tsx +121 -121
  121. package/contexts/LanguageContext.tsx +250 -250
  122. package/contexts/theme-data.ts +391 -391
  123. package/dist/{AssistantChart-DoZCyS5r.cjs → AssistantChart-9w31gdAb.cjs} +4 -4
  124. package/dist/{AssistantChart-CldVCVDe.cjs → AssistantChart-BAudAfne.cjs} +5 -5
  125. package/dist/{AssistantChart-Bdd44uBn.cjs → AssistantChart-BAx9VQvb.cjs} +127 -388
  126. package/dist/{AssistantChart-Cu3m7RBo.js → AssistantChart-BP8upjMk.js} +5 -5
  127. package/dist/{AssistantChart-CFhDdGyU.js → AssistantChart-CVko2A1W.js} +130 -391
  128. package/dist/{AssistantChart-C_hwFRRr.js → AssistantChart-CVzmmhx4.js} +4 -4
  129. package/dist/{AudioPlayer-IAU5q5T1.cjs → AudioPlayer-1ypwE2Wh.cjs} +1 -1
  130. package/dist/{AudioPlayer-CGRUtUdN.js → AudioPlayer-DuKXrCfy.js} +1 -1
  131. package/dist/{LanguageContext-CS14yCpi.js → LanguageContext-BwhwC3G2.js} +2 -2
  132. package/dist/{LanguageContext-B_KFTCzT.cjs → LanguageContext-DvUt5jBg.cjs} +2 -2
  133. package/dist/{ThemeContext-C2EwAPDt.js → ThemeContext-BbBNoFTG.js} +2 -2
  134. package/dist/{ThemeContext-Bmod0Cg2.cjs → ThemeContext-BblcjQup.cjs} +13 -8
  135. package/dist/{ThemeContext-BWq9ACPo.js → ThemeContext-Bo-W2WZH.js} +13 -8
  136. package/dist/{ThemeContext-j5aGtPky.cjs → ThemeContext-CP3a0jxy.cjs} +193 -262
  137. package/dist/{ThemeContext-vTjumZeM.cjs → ThemeContext-Cmr8Ex8H.cjs} +2 -2
  138. package/dist/ThemeContext-CpqYShLq.cjs +324 -0
  139. package/dist/{ThemeContext-CQSo4Iwc.js → ThemeContext-D3LzacmG.js} +8 -1
  140. package/dist/ThemeContext-Du2nE1PL.js +325 -0
  141. package/dist/ThemeContext-GeEBTJ3q.cjs +1621 -0
  142. package/dist/ThemeContext-JyLK9B1o.js +1622 -0
  143. package/dist/{ThemeContext-CGk3KK0k.cjs → ThemeContext-U4dEYc6C.cjs} +8 -1
  144. package/dist/{ThemeContext-BXjrgUjW.js → ThemeContext-ept8jhXI.js} +200 -261
  145. package/dist/{VerifyEmailPage-CGIwmWrm.js → VerifyEmailPage-B31mCrMc.js} +1 -1
  146. package/dist/{VerifyEmailPage-C0c2e5n0.js → VerifyEmailPage-BE-L9mB7.js} +7 -7
  147. package/dist/{VerifyEmailPage-DSBMRHtl.js → VerifyEmailPage-BIBOKV7Z.js} +41 -36
  148. package/dist/{VerifyEmailPage-DgIid028.js → VerifyEmailPage-BJjAMUTW.js} +4 -4
  149. package/dist/{VerifyEmailPage--1Vurewl.cjs → VerifyEmailPage-BRSP-Pwt.cjs} +3 -3
  150. package/dist/{VerifyEmailPage-Cwi3kbol.cjs → VerifyEmailPage-Bae2cBXT.cjs} +7 -7
  151. package/dist/{VerifyEmailPage-De6bQjrz.cjs → VerifyEmailPage-BiRm7Nh4.cjs} +41 -36
  152. package/dist/{VerifyEmailPage-ByerOcm4.cjs → VerifyEmailPage-Bv8Ah_TK.cjs} +23 -20
  153. package/dist/VerifyEmailPage-Bvfv8HVQ.js +3214 -0
  154. package/dist/{VerifyEmailPage-BComraR7.cjs → VerifyEmailPage-CR7kb5df.cjs} +22 -12
  155. package/dist/{VerifyEmailPage-CpqqpLpo.cjs → VerifyEmailPage-C_Zk6Gen.cjs} +1 -1
  156. package/dist/{VerifyEmailPage-MTD7AG1Z.js → VerifyEmailPage-C_ihbcth.js} +4 -4
  157. package/dist/{VerifyEmailPage-1WwWczAn.js → VerifyEmailPage-CbgjOF0v.js} +22 -12
  158. package/dist/{VerifyEmailPage-DvMLZgFt.js → VerifyEmailPage-CdYPSJoO.js} +1 -1
  159. package/dist/{VerifyEmailPage-By3Jf__L.cjs → VerifyEmailPage-CkBYfsNy.cjs} +4 -4
  160. package/dist/{VerifyEmailPage-CJLz3jrn.js → VerifyEmailPage-Cyl55sJb.js} +23 -20
  161. package/dist/VerifyEmailPage-D-FRj5TU.cjs +3213 -0
  162. package/dist/{VerifyEmailPage-B4peJjAT.cjs → VerifyEmailPage-DF2ilhum.cjs} +334 -356
  163. package/dist/{VerifyEmailPage-CYXtbKi3.cjs → VerifyEmailPage-DMBh4NM9.cjs} +1 -1
  164. package/dist/{VerifyEmailPage-CgMxRb4z.js → VerifyEmailPage-DTtFfC-J.js} +3 -3
  165. package/dist/{VerifyEmailPage-CFLMls1p.cjs → VerifyEmailPage-Dt7zgA4w.cjs} +4 -4
  166. package/dist/{VerifyEmailPage-C5TNQTBa.js → VerifyEmailPage-EhudUdqF.js} +343 -355
  167. package/dist/{VerifyEmailPage-DGhuIqkb.js → VerifyEmailPage-X14vhdyl.js} +4 -4
  168. package/dist/VerifyEmailPage-hdB8JQGv.cjs +3213 -0
  169. package/dist/{VerifyEmailPage-Bp1XXl3H.cjs → VerifyEmailPage-u_Dn7t1U.cjs} +4 -4
  170. package/dist/VerifyEmailPage-vYHbYK3q.js +3214 -0
  171. package/dist/{XerticaProvider-CBGc4EMA.cjs → XerticaProvider-AChwphCO.cjs} +4 -4
  172. package/dist/{XerticaProvider-BIrqfZ-i.cjs → XerticaProvider-AbWlr7Af.cjs} +8 -11
  173. package/dist/{XerticaProvider-D-yNhF94.cjs → XerticaProvider-B8CaV7xu.cjs} +1 -1
  174. package/dist/{XerticaProvider-CEoWMTxu.js → XerticaProvider-BITjgC5p.js} +2 -2
  175. package/dist/{XerticaProvider-CllrbMEJ.cjs → XerticaProvider-By8q3Roe.cjs} +2 -2
  176. package/dist/{XerticaProvider-C1DKnvLh.js → XerticaProvider-CUYJZc32.js} +4 -4
  177. package/dist/{XerticaProvider-ET0ihewn.cjs → XerticaProvider-CW9hpCdF.cjs} +2 -2
  178. package/dist/{XerticaProvider-Dt5HEzbQ.js → XerticaProvider-CWgby5mY.js} +10 -10
  179. package/dist/XerticaProvider-CWs6EwNa.js +49 -0
  180. package/dist/XerticaProvider-CjQAQPcn.cjs +48 -0
  181. package/dist/XerticaProvider-D5lLumH-.js +49 -0
  182. package/dist/{XerticaProvider-DYq4JWtg.js → XerticaProvider-DQtvJU7m.js} +1 -1
  183. package/dist/XerticaProvider-qQUDop71.cjs +48 -0
  184. package/dist/{XerticaProvider-B7EVH-NF.js → XerticaProvider-siSt9uG2.js} +2 -2
  185. package/dist/{XerticaXLogo-Zw2B276b.cjs → XerticaXLogo-8TTzBjHw.cjs} +1 -1
  186. package/dist/{XerticaXLogo-B7xQ5dhi.js → XerticaXLogo-BWaag64t.js} +1 -1
  187. package/dist/{XerticaXLogo-DZbo4vOE.js → XerticaXLogo-CFuIlYFH.js} +12 -12
  188. package/dist/{XerticaXLogo-bvZSgwGF.cjs → XerticaXLogo-CU-U-GP4.cjs} +7 -13
  189. package/dist/XerticaXLogo-ChryA6xj.js +252 -0
  190. package/dist/{XerticaXLogo-CQUUjXoH.cjs → XerticaXLogo-CziKMQil.cjs} +8 -8
  191. package/dist/XerticaXLogo-DHz5SugF.js +252 -0
  192. package/dist/XerticaXLogo-DTee_y8X.cjs +251 -0
  193. package/dist/{XerticaXLogo-Cmsp-Eey.js → XerticaXLogo-DfUvz-lD.js} +9 -9
  194. package/dist/XerticaXLogo-kslQ8Tk_.cjs +251 -0
  195. package/dist/{alert-dialog-s-vmNkJ_.js → alert-dialog-iDe5VE5o.js} +3 -3
  196. package/dist/{alert-dialog-DSKByiKZ.cjs → alert-dialog-yckpaOpy.cjs} +3 -3
  197. package/dist/cli.js +2 -1
  198. package/dist/components/ui/chart/chart.d.ts +7 -5
  199. package/dist/{google-maps-loader-Y-QkD-Li.cjs → google-maps-loader-BqsYL48U.cjs} +0 -5
  200. package/dist/{google-maps-loader-CTYySAun.js → google-maps-loader-t2IlYBzw.js} +0 -4
  201. package/dist/index-CkTUgOwX.js +8 -0
  202. package/dist/{index-COtD8bRW.cjs → index-D3RLKRAs.cjs} +1 -1
  203. package/dist/index.cjs.js +2 -2
  204. package/dist/index.es.js +2 -2
  205. package/dist/index.umd.js +454 -1027
  206. package/dist/layout.cjs.js +1 -1
  207. package/dist/layout.es.js +1 -1
  208. package/dist/pages.cjs.js +1 -1
  209. package/dist/pages.es.js +1 -1
  210. package/dist/{sidebar-DAaY8bRU.cjs → sidebar-B3EYhli0.cjs} +33 -24
  211. package/dist/{sidebar-nzPoVHBQ.cjs → sidebar-B9NR0lCe.cjs} +46 -41
  212. package/dist/{sidebar-CeTMuzOx.cjs → sidebar-BvF5I2Ue.cjs} +47 -128
  213. package/dist/{sidebar-q7P2Godd.cjs → sidebar-C5B_LHek.cjs} +1 -1
  214. package/dist/{sidebar-CrQDDdcz.js → sidebar-CA6_ek3f.js} +33 -24
  215. package/dist/sidebar-CLmIjgNd.cjs +1136 -0
  216. package/dist/{sidebar-BxGXsDAd.cjs → sidebar-CVUGHOS_.cjs} +8 -16
  217. package/dist/{sidebar-BViy8Eeu.js → sidebar-CmvwjnVb.js} +9 -17
  218. package/dist/{sidebar-B6SlKZYN.js → sidebar-CplprZpM.js} +49 -40
  219. package/dist/sidebar-Duermn32.js +1133 -0
  220. package/dist/{sidebar-BbVIQvlP.js → sidebar-Dz7bd3zP.js} +1 -1
  221. package/dist/{sidebar-0ocFLSks.js → sidebar-KIS0C2JH.js} +50 -127
  222. package/dist/sidebar-OTO_up7Z.js +801 -0
  223. package/dist/sidebar-zowjejT2.cjs +800 -0
  224. package/dist/{use-audio-player-nv8ZSGa1.js → use-audio-player-Bkh23vQ3.js} +3 -7
  225. package/dist/{use-audio-player-NKsWyjWu.cjs → use-audio-player-Dn1NR9xN.cjs} +3 -7
  226. package/dist/{xertica-assistant-dyP7KHM5.cjs → xertica-assistant-B1IaHXnB.cjs} +388 -529
  227. package/dist/{xertica-assistant-ciJaWqm1.js → xertica-assistant-BMqdyRVi.js} +10 -28
  228. package/dist/{xertica-assistant-V_IdW4WF.cjs → xertica-assistant-Bj3vBCq_.cjs} +9 -27
  229. package/dist/{xertica-assistant-yX1CFBBo.js → xertica-assistant-DPsESB6t.js} +390 -531
  230. package/dist/{CodeBlock-7TTgmdGG.cjs → xertica-assistant-Qp3ydksa.cjs} +51 -263
  231. package/dist/{CodeBlock-BeSt1h5P.js → xertica-assistant-gnCJdcZY.js} +7 -219
  232. package/dist/xertica-ui.css +2 -2
  233. package/docs/architecture-improvements.md +456 -456
  234. package/docs/architecture.md +312 -312
  235. package/docs/components/assistant.md +428 -428
  236. package/docs/components/branding.md +252 -252
  237. package/docs/components/card-patterns.md +447 -447
  238. package/docs/components/error-boundary.md +201 -201
  239. package/docs/components/hooks.md +432 -432
  240. package/docs/components/language-selector.md +176 -176
  241. package/docs/components/pages.md +323 -323
  242. package/docs/components/sidebar.md +331 -331
  243. package/docs/components/stats-card.md +138 -138
  244. package/docs/doc-audit.md +244 -244
  245. package/docs/getting-started.md +616 -616
  246. package/docs/guidelines.md +330 -330
  247. package/docs/i18n.md +480 -480
  248. package/docs/installation.md +268 -268
  249. package/docs/llms.md +295 -295
  250. package/docs/state-management.md +289 -289
  251. package/guidelines/Guidelines.md +409 -409
  252. package/llms-compact.txt +1 -1
  253. package/llms-full.txt +10688 -10688
  254. package/llms.txt +1 -1
  255. package/package.json +1 -1
  256. package/styles/xertica/base.css +90 -90
  257. package/styles/xertica/tokens.css +240 -240
  258. package/templates/.prettierignore +4 -4
  259. package/templates/.prettierrc +10 -10
  260. package/templates/CLAUDE.md +180 -180
  261. package/templates/package.json +2 -2
  262. package/templates/src/app/App.tsx +46 -46
  263. package/templates/src/app/components/AuthGuard.tsx +131 -131
  264. package/templates/src/features/assistant/data/mock.ts +75 -75
  265. package/templates/src/features/assistant/hooks/useAssistantConfig.ts +20 -20
  266. package/templates/src/features/assistant/index.ts +5 -5
  267. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  268. package/templates/src/features/auth/ui/LoginContent.tsx +92 -92
  269. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +183 -183
  270. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +78 -78
  271. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +80 -80
  272. package/templates/src/features/home/data/mock.ts +41 -41
  273. package/templates/src/features/home/hooks/useFeatureCards.ts +20 -20
  274. package/templates/src/features/home/index.ts +11 -11
  275. package/templates/src/features/home/ui/HomeContent.tsx +117 -117
  276. package/templates/src/features/template/ui/CrudTemplate.tsx +112 -112
  277. package/templates/src/features/template/ui/DashboardTemplate.tsx +110 -110
  278. package/templates/src/features/template/ui/FormTemplate.tsx +117 -117
  279. package/templates/src/features/template/ui/LoginTemplate.tsx +59 -59
  280. package/templates/src/features/template/ui/TemplateContent.tsx +1322 -1322
  281. package/templates/src/i18n.ts +124 -124
  282. package/templates/src/locales/en/common.json +21 -21
  283. package/templates/src/locales/en/components/activityCard.json +10 -10
  284. package/templates/src/locales/en/components/assistant.json +119 -119
  285. package/templates/src/locales/en/components/media.json +29 -29
  286. package/templates/src/locales/en/components/notificationCard.json +5 -5
  287. package/templates/src/locales/en/components/profileCard.json +8 -8
  288. package/templates/src/locales/en/components/projectCard.json +10 -10
  289. package/templates/src/locales/en/components/sidebar.json +14 -14
  290. package/templates/src/locales/en/components/stats.json +8 -8
  291. package/templates/src/locales/en/components/team.json +14 -14
  292. package/templates/src/locales/en/errors.json +9 -9
  293. package/templates/src/locales/en/languageSelector.json +7 -7
  294. package/templates/src/locales/en/nav.json +6 -6
  295. package/templates/src/locales/en/pages/crudTemplate.json +25 -25
  296. package/templates/src/locales/en/pages/dashboardTemplate.json +20 -20
  297. package/templates/src/locales/en/pages/forgotPassword.json +10 -10
  298. package/templates/src/locales/en/pages/formTemplate.json +16 -16
  299. package/templates/src/locales/en/pages/home.json +7 -7
  300. package/templates/src/locales/en/pages/login.json +15 -15
  301. package/templates/src/locales/en/pages/loginTemplate.json +9 -9
  302. package/templates/src/locales/en/pages/resetPassword.json +18 -18
  303. package/templates/src/locales/en/pages/templates.json +317 -317
  304. package/templates/src/locales/en/pages/verifyEmail.json +12 -12
  305. package/templates/src/locales/en/themeToggle.json +6 -6
  306. package/templates/src/locales/es/common.json +21 -21
  307. package/templates/src/locales/es/components/activityCard.json +10 -10
  308. package/templates/src/locales/es/components/assistant.json +119 -119
  309. package/templates/src/locales/es/components/media.json +29 -29
  310. package/templates/src/locales/es/components/notificationCard.json +5 -5
  311. package/templates/src/locales/es/components/profileCard.json +8 -8
  312. package/templates/src/locales/es/components/projectCard.json +10 -10
  313. package/templates/src/locales/es/components/sidebar.json +14 -14
  314. package/templates/src/locales/es/components/stats.json +8 -8
  315. package/templates/src/locales/es/components/team.json +14 -14
  316. package/templates/src/locales/es/errors.json +9 -9
  317. package/templates/src/locales/es/languageSelector.json +7 -7
  318. package/templates/src/locales/es/nav.json +6 -6
  319. package/templates/src/locales/es/pages/crudTemplate.json +25 -25
  320. package/templates/src/locales/es/pages/dashboardTemplate.json +20 -20
  321. package/templates/src/locales/es/pages/forgotPassword.json +10 -10
  322. package/templates/src/locales/es/pages/formTemplate.json +16 -16
  323. package/templates/src/locales/es/pages/home.json +7 -7
  324. package/templates/src/locales/es/pages/login.json +15 -15
  325. package/templates/src/locales/es/pages/loginTemplate.json +9 -9
  326. package/templates/src/locales/es/pages/resetPassword.json +18 -18
  327. package/templates/src/locales/es/pages/templates.json +317 -317
  328. package/templates/src/locales/es/pages/verifyEmail.json +12 -12
  329. package/templates/src/locales/es/themeToggle.json +6 -6
  330. package/templates/src/locales/pt-BR/common.json +21 -21
  331. package/templates/src/locales/pt-BR/components/activityCard.json +10 -10
  332. package/templates/src/locales/pt-BR/components/assistant.json +119 -119
  333. package/templates/src/locales/pt-BR/components/media.json +29 -29
  334. package/templates/src/locales/pt-BR/components/notificationCard.json +5 -5
  335. package/templates/src/locales/pt-BR/components/profileCard.json +8 -8
  336. package/templates/src/locales/pt-BR/components/projectCard.json +10 -10
  337. package/templates/src/locales/pt-BR/components/sidebar.json +14 -14
  338. package/templates/src/locales/pt-BR/components/stats.json +8 -8
  339. package/templates/src/locales/pt-BR/components/team.json +14 -14
  340. package/templates/src/locales/pt-BR/errors.json +9 -9
  341. package/templates/src/locales/pt-BR/languageSelector.json +7 -7
  342. package/templates/src/locales/pt-BR/nav.json +6 -6
  343. package/templates/src/locales/pt-BR/pages/crudTemplate.json +25 -25
  344. package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +20 -20
  345. package/templates/src/locales/pt-BR/pages/forgotPassword.json +10 -10
  346. package/templates/src/locales/pt-BR/pages/formTemplate.json +16 -16
  347. package/templates/src/locales/pt-BR/pages/home.json +7 -7
  348. package/templates/src/locales/pt-BR/pages/login.json +15 -15
  349. package/templates/src/locales/pt-BR/pages/loginTemplate.json +9 -9
  350. package/templates/src/locales/pt-BR/pages/resetPassword.json +18 -18
  351. package/templates/src/locales/pt-BR/pages/templates.json +317 -317
  352. package/templates/src/locales/pt-BR/pages/verifyEmail.json +12 -12
  353. package/templates/src/locales/pt-BR/themeToggle.json +6 -6
  354. package/templates/src/pages/AssistantPage.tsx +470 -470
  355. package/templates/src/pages/HomePage.tsx +53 -53
  356. package/templates/src/shared/error-boundary.tsx +150 -150
  357. package/templates/src/shared/error-fallbacks.tsx +222 -222
  358. package/templates/src/styles/xertica/tokens.css +240 -240
  359. package/templates/vite.config.js +20 -20
  360. package/templates/vite.config.ts +55 -55
  361. package/dist/AssistantChart-BKVtGUKF.js +0 -3383
  362. package/dist/AssistantChart-CxGjH7Qk.js +0 -3477
  363. package/dist/AssistantChart-DIpshm3i.js +0 -4784
  364. package/dist/AssistantChart-D_PTeu8P.cjs +0 -3503
  365. package/dist/AssistantChart-WeycT5Pd.cjs +0 -3551
  366. package/dist/AssistantChart-zjsy2GaZ.cjs +0 -4810
  367. package/dist/AudioPlayer-B1lt5cPl.cjs +0 -989
  368. package/dist/AudioPlayer-BZ7bibzU.cjs +0 -982
  369. package/dist/AudioPlayer-BpRPS4-1.cjs +0 -1277
  370. package/dist/AudioPlayer-C12BjQBV.cjs +0 -997
  371. package/dist/AudioPlayer-CFeV8t-5.cjs +0 -936
  372. package/dist/AudioPlayer-Coly3q5R.js +0 -1278
  373. package/dist/AudioPlayer-CySJIyvL.js +0 -937
  374. package/dist/AudioPlayer-DMcG_c7L.js +0 -990
  375. package/dist/AudioPlayer-DcFKRJE_.js +0 -998
  376. package/dist/AudioPlayer-e8LfNoqO.js +0 -983
  377. package/dist/BrandColorsContext-565dDHd5.js +0 -660
  378. package/dist/BrandColorsContext-BcJbtkqn.cjs +0 -659
  379. package/dist/CodeBlock-BgfYL_rD.cjs +0 -2094
  380. package/dist/CodeBlock-BlcqlA9M.cjs +0 -2094
  381. package/dist/CodeBlock-Bnmeu5ez.cjs +0 -2094
  382. package/dist/CodeBlock-BtfPlbAI.js +0 -2078
  383. package/dist/CodeBlock-CIySIuYr.js +0 -2078
  384. package/dist/CodeBlock-CuPtUM-7.cjs +0 -2094
  385. package/dist/CodeBlock-D6ffWXgc.js +0 -2078
  386. package/dist/CodeBlock-D8dcwbit.cjs +0 -2094
  387. package/dist/CodeBlock-DMZrFnlw.cjs +0 -2094
  388. package/dist/CodeBlock-DlBehYN8.js +0 -2078
  389. package/dist/CodeBlock-DnYNI8rQ.js +0 -2078
  390. package/dist/CodeBlock-DvKWbSnE.cjs +0 -2094
  391. package/dist/CodeBlock-DwMCfkFY.js +0 -2078
  392. package/dist/CodeBlock-Dy6CNYyj.js +0 -2078
  393. package/dist/CodeBlock-U1pPOQI7.cjs +0 -2094
  394. package/dist/CodeBlock-f_GpNhEB.js +0 -2078
  395. package/dist/CodeBlock-oB6u8nI1.js +0 -2078
  396. package/dist/CodeBlock-tZC31B73.cjs +0 -2094
  397. package/dist/FeatureCard-CxC-7C-C.cjs +0 -300
  398. package/dist/FeatureCard-DbHWCb4E.js +0 -301
  399. package/dist/ImageWithFallback-CGtidP6B.cjs +0 -4542
  400. package/dist/ImageWithFallback-lsg3pdFg.js +0 -4508
  401. package/dist/LanguageSelector-B5YfbHra.js +0 -231
  402. package/dist/LanguageSelector-D6uacAIM.cjs +0 -230
  403. package/dist/LayoutContext-B45-e9DI.cjs +0 -93
  404. package/dist/LayoutContext-BAql6ZRY.js +0 -97
  405. package/dist/LayoutContext-Bav3UMEA.js +0 -94
  406. package/dist/LayoutContext-BvK-ggDa.cjs +0 -96
  407. package/dist/ThemeContext-BoH4NLfN.js +0 -734
  408. package/dist/ThemeContext-r69W20Xg.cjs +0 -733
  409. package/dist/VerifyEmailPage-COiyNl1y.js +0 -2825
  410. package/dist/VerifyEmailPage-CqKsR2v8.js +0 -2827
  411. package/dist/VerifyEmailPage-DjQKRlUS.cjs +0 -2824
  412. package/dist/VerifyEmailPage-s-1X3LDJ.cjs +0 -2826
  413. package/dist/XerticaOrbe-KL1RBHzw.cjs +0 -1354
  414. package/dist/XerticaOrbe-zwS1p2a8.js +0 -1355
  415. package/dist/XerticaProvider-6btlAlzc.js +0 -17
  416. package/dist/XerticaProvider-BNoNOxQ5.cjs +0 -16
  417. package/dist/XerticaProvider-BlY2limY.cjs +0 -38
  418. package/dist/XerticaProvider-DDuiIcKo.js +0 -39
  419. package/dist/XerticaProvider-cI9hSs27.cjs +0 -38
  420. package/dist/XerticaProvider-hSwhNQex.js +0 -39
  421. package/dist/alert-dialog-BOje--vD.js +0 -847
  422. package/dist/alert-dialog-BtEuQqrg.cjs +0 -870
  423. package/dist/breadcrumb-CqJ7bHY5.js +0 -161
  424. package/dist/breadcrumb-m9Hb2_XN.cjs +0 -177
  425. package/dist/components/assistant/xertica-assistant/hooks/index.d.ts +0 -6
  426. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-conversations.d.ts +0 -21
  427. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-messages.d.ts +0 -49
  428. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-suggestions.d.ts +0 -16
  429. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +0 -35
  430. package/dist/components/blocks/audio-player/index.d.ts +0 -1
  431. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +0 -26
  432. package/dist/components/blocks/document-editor/index.d.ts +0 -1
  433. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +0 -41
  434. package/dist/components/blocks/podcast-player/index.d.ts +0 -1
  435. package/dist/components/ui/chart/parts/chart-dashboard.d.ts +0 -113
  436. package/dist/components/ui/chart/parts/chart-metric.d.ts +0 -118
  437. package/dist/components/ui/chart/parts/chart-primitives.d.ts +0 -101
  438. package/dist/components/ui/chart/parts/chart-shared.d.ts +0 -20
  439. package/dist/components/ui/chart/parts/chart-utils.d.ts +0 -12
  440. package/dist/components/ui/chart/parts/index.d.ts +0 -5
  441. package/dist/dropdown-menu-BDB5CmQs.cjs +0 -247
  442. package/dist/dropdown-menu-DQidbKBD.js +0 -231
  443. package/dist/google-maps-loader-BFWp6VPd.js +0 -287
  444. package/dist/google-maps-loader-BKcdgFbu.cjs +0 -312
  445. package/dist/google-maps-loader-CumCNXeG.js +0 -312
  446. package/dist/google-maps-loader-eS3uQ5TA.cjs +0 -287
  447. package/dist/header-Cgy6vYPk.cjs +0 -731
  448. package/dist/header-DRlT4jgI.js +0 -715
  449. package/dist/header-Dux00SI4.cjs +0 -731
  450. package/dist/header-EkGKXPsD.js +0 -715
  451. package/dist/header-WfEywpyc.cjs +0 -731
  452. package/dist/header-tifNQn2U.js +0 -715
  453. package/dist/index-BhapVLVj.js +0 -8
  454. package/dist/index-D6fxYEY8.cjs +0 -7
  455. package/dist/index-DAIp0_HK.js +0 -8
  456. package/dist/index-DW5tYe26.js +0 -8
  457. package/dist/index-GA__GvnG.cjs +0 -7
  458. package/dist/input-2R4loU86.js +0 -127
  459. package/dist/input-DWANSKGb.cjs +0 -145
  460. package/dist/progress-DPtzoVV8.js +0 -175
  461. package/dist/progress-EeaoqqUs.cjs +0 -191
  462. package/dist/rich-text-editor-0mraWT5y.cjs +0 -2376
  463. package/dist/rich-text-editor-B-IkcPD0.js +0 -2874
  464. package/dist/rich-text-editor-B6jMRLzk.cjs +0 -1939
  465. package/dist/rich-text-editor-B8_oYcIR.js +0 -1730
  466. package/dist/rich-text-editor-B9UbSXNb.js +0 -1203
  467. package/dist/rich-text-editor-BYuRBNBU.js +0 -2373
  468. package/dist/rich-text-editor-Bb9pySTs.cjs +0 -2374
  469. package/dist/rich-text-editor-BcL6L3cm.cjs +0 -2374
  470. package/dist/rich-text-editor-BoVZYtTs.cjs +0 -2391
  471. package/dist/rich-text-editor-Bp3zQqMC.js +0 -2954
  472. package/dist/rich-text-editor-CMgSN_w2.js +0 -1189
  473. package/dist/rich-text-editor-CPV1lEPH.cjs +0 -1748
  474. package/dist/rich-text-editor-CeucBdIv.cjs +0 -2971
  475. package/dist/rich-text-editor-CoKqbCtu.cjs +0 -1799
  476. package/dist/rich-text-editor-Cw56T_mB.js +0 -2356
  477. package/dist/rich-text-editor-Cyt8qs2b.js +0 -1921
  478. package/dist/rich-text-editor-D6H84OcX.cjs +0 -1220
  479. package/dist/rich-text-editor-D76gD-QI.js +0 -2328
  480. package/dist/rich-text-editor-DKkokOnA.js +0 -1781
  481. package/dist/rich-text-editor-DNsdpN64.cjs +0 -2359
  482. package/dist/rich-text-editor-DfG8bCyY.js +0 -2358
  483. package/dist/rich-text-editor-Dxjw31Z4.js +0 -2341
  484. package/dist/rich-text-editor-DzP0Epmb.js +0 -2356
  485. package/dist/rich-text-editor-bRkNoeZY.cjs +0 -2891
  486. package/dist/rich-text-editor-lyYE2ZG5.cjs +0 -1207
  487. package/dist/rich-text-editor-skplNlBM.cjs +0 -2345
  488. package/dist/select-Bkbr0f-Z.cjs +0 -162
  489. package/dist/select-CvIVdX2n.js +0 -145
  490. package/dist/sidebar-CK_0ZQHj.cjs +0 -803
  491. package/dist/sidebar-CUuOvYhK.js +0 -787
  492. package/dist/sidebar-DQj1z3jG.cjs +0 -758
  493. package/dist/sidebar-Djn5syhi.cjs +0 -786
  494. package/dist/sidebar-LluMXfam.js +0 -759
  495. package/dist/sidebar-_rT7rBMk.js +0 -787
  496. package/dist/slider-Bc5Hd0y1.js +0 -56
  497. package/dist/slider-N7hFFj6X.cjs +0 -73
  498. package/dist/tooltip-Ded96neP.cjs +0 -137
  499. package/dist/tooltip-HDOoD2-0.js +0 -120
  500. package/dist/use-audio-player-B31J-aqh.cjs +0 -187
  501. package/dist/use-audio-player-BkmEmj8Q.js +0 -185
  502. package/dist/use-audio-player-CLFTWFW1.cjs +0 -184
  503. package/dist/use-audio-player-CLLn00I6.js +0 -188
  504. package/dist/use-file-upload-BcjEo2S5.js +0 -404
  505. package/dist/use-file-upload-CRJR68Tj.cjs +0 -403
  506. package/dist/use-mobile-B0hNy_Y6.cjs +0 -4303
  507. package/dist/use-mobile-BXuYROXM.js +0 -4202
  508. package/dist/use-mobile-Bbd51ASU.cjs +0 -4392
  509. package/dist/use-mobile-Bk6CX-TC.js +0 -4359
  510. package/dist/use-mobile-BvYdisLP.js +0 -4202
  511. package/dist/use-mobile-BzuxjzNX.cjs +0 -4392
  512. package/dist/use-mobile-CG2-SdXV.cjs +0 -4235
  513. package/dist/use-mobile-CKb5pqTs.js +0 -4269
  514. package/dist/use-mobile-CYuAuGDl.js +0 -4202
  515. package/dist/use-mobile-CaENcqm-.js +0 -4508
  516. package/dist/use-mobile-CbrYgJGJ.js +0 -4203
  517. package/dist/use-mobile-Cd4xPrKq.cjs +0 -46
  518. package/dist/use-mobile-DMOvImGQ.cjs +0 -4542
  519. package/dist/use-mobile-DRB3BQgD.cjs +0 -4235
  520. package/dist/use-mobile-DZvv7QMR.js +0 -4359
  521. package/dist/use-mobile-DdI_TXam.cjs +0 -4235
  522. package/dist/use-mobile-DlceKf8a.js +0 -4359
  523. package/dist/use-mobile-DsOnow1o.cjs +0 -4236
  524. package/dist/use-mobile-Kcj6jSnK.cjs +0 -4392
  525. package/dist/use-mobile-bnKcua_i.js +0 -4202
  526. package/dist/use-mobile-j4w2Jrf1.js +0 -30
  527. package/dist/use-mobile-ncXBeE2z.cjs +0 -4235
  528. package/dist/use-rich-text-editor-DjiddBGv.js +0 -282
  529. package/dist/use-rich-text-editor-lpeswbCs.cjs +0 -281
  530. package/dist/xertica-assistant-BdiZag0h.js +0 -2187
  531. package/dist/xertica-assistant-CrgTb6Hs.cjs +0 -2155
  532. package/dist/xertica-assistant-DCsnQyi5.js +0 -2156
  533. package/dist/xertica-assistant-DUBpmEgo.cjs +0 -2186
  534. package/dist/{rich-text-editor-DgF8s7xW.js → rich-text-editor-BmsjY03B.js} +26 -26
  535. package/dist/{rich-text-editor-mWoaSCE4.cjs → rich-text-editor-GS2kpTAK.cjs} +26 -26
@@ -1,4359 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Slot, Slottable } from "@radix-ui/react-slot";
3
- import { cva } from "class-variance-authority";
4
- import { e as cn, B as Button, d as buttonVariants } from "./tooltip-HDOoD2-0.js";
5
- import { XCircle, AlertTriangle, Info, CheckCircle, Check, ChevronLeft, GripVerticalIcon, ChevronDownIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon, MinusIcon, ChevronRight, ChevronDown, XIcon, CheckIcon, CircleIcon, SearchIcon, TrendingUp, TrendingDown, Minus, ArrowRight, ArrowLeft, X, Upload, AlertCircle, FileIcon, Star, Search as Search$1 } from "lucide-react";
6
- import * as React from "react";
7
- import React__default, { useRef, useEffect, useState } from "react";
8
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
9
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
10
- import * as SwitchPrimitive from "@radix-ui/react-switch";
11
- import * as ProgressPrimitive from "@radix-ui/react-progress";
12
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
13
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
14
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
15
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
16
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
17
- import * as TogglePrimitive from "@radix-ui/react-toggle";
18
- import { OTPInput, OTPInputContext } from "input-otp";
19
- import { FormProvider, Controller, useFormContext, useFormState } from "react-hook-form";
20
- import * as LabelPrimitive from "@radix-ui/react-label";
21
- import { getDefaultClassNames, DayPicker } from "react-day-picker";
22
- import * as DialogPrimitive from "@radix-ui/react-dialog";
23
- import { Drawer as Drawer$1 } from "vaul";
24
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
25
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
26
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
27
- import { Command as Command$1 } from "cmdk";
28
- import { o as Dialog, u as DialogHeader, x as DialogTitle, s as DialogDescription, r as DialogContent, C as Card, b as CardContent, h as ChartContainer, l as ChartTooltip, m as ChartTooltipContent } from "./rich-text-editor-DKkokOnA.js";
29
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
30
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
31
- import useEmblaCarousel from "embla-carousel-react";
32
- import { u as useGoogleMapsLoader } from "./google-maps-loader-BFWp6VPd.js";
33
- import { createRoot } from "react-dom/client";
34
- import { BarChart, CartesianGrid, XAxis, Bar } from "recharts";
35
- function Label({
36
- className,
37
- size = "md",
38
- ...props
39
- }) {
40
- const sizeClasses = {
41
- sm: "text-xs",
42
- md: "text-sm",
43
- lg: "text-base"
44
- };
45
- return /* @__PURE__ */ jsx(
46
- LabelPrimitive.Root,
47
- {
48
- "data-slot": "label",
49
- className: cn(
50
- "flex items-center gap-2 leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
51
- sizeClasses[size],
52
- className
53
- ),
54
- ...props
55
- }
56
- );
57
- }
58
- const badgeVariants = cva(
59
- "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
60
- {
61
- variants: {
62
- variant: {
63
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
64
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
65
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
66
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
67
- success: "border-transparent bg-[var(--toast-success-bg)] text-[var(--toast-success-icon)]",
68
- warning: "border-transparent bg-[var(--toast-warning-bg)] text-[var(--toast-warning-icon)]",
69
- info: "border-transparent bg-[var(--toast-info-bg)] text-[var(--toast-info-icon)]"
70
- }
71
- },
72
- defaultVariants: {
73
- variant: "default"
74
- }
75
- }
76
- );
77
- function Badge({
78
- className,
79
- variant,
80
- asChild = false,
81
- children,
82
- ...props
83
- }) {
84
- const Comp = asChild ? Slot : "span";
85
- return /* @__PURE__ */ jsx(
86
- Comp,
87
- {
88
- "data-slot": "badge",
89
- className: cn(badgeVariants({ variant }), className),
90
- ...props,
91
- children: /* @__PURE__ */ jsx(Slottable, { children })
92
- }
93
- );
94
- }
95
- const alertVariants = cva(
96
- "relative w-full rounded-[var(--radius)] border-l-4 px-4 py-3 grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current",
97
- {
98
- variants: {
99
- variant: {
100
- default: "bg-muted/50 border-l-border text-foreground [&>svg]:text-muted-foreground",
101
- success: "bg-[color:var(--success)]/10 dark:bg-[color:var(--success)]/20 border-l-[color:var(--success)] text-foreground [&>svg]:text-[color:var(--success)]",
102
- info: "bg-[color:var(--info)]/10 dark:bg-[color:var(--info)]/20 border-l-[color:var(--info)] text-foreground [&>svg]:text-[color:var(--info)]",
103
- warning: "bg-[color:var(--warning)]/10 dark:bg-[color:var(--warning)]/20 border-l-[color:var(--warning)] text-foreground [&>svg]:text-[color:var(--warning)]",
104
- destructive: "bg-[color:var(--destructive)]/10 dark:bg-[color:var(--destructive)]/20 border-l-[color:var(--destructive)] text-foreground [&>svg]:text-[color:var(--destructive)]"
105
- }
106
- },
107
- defaultVariants: {
108
- variant: "default"
109
- }
110
- }
111
- );
112
- const alertIcons = {
113
- default: Info,
114
- success: CheckCircle,
115
- info: Info,
116
- warning: AlertTriangle,
117
- destructive: XCircle
118
- };
119
- function Alert({
120
- className,
121
- variant,
122
- icon,
123
- children,
124
- ...props
125
- }) {
126
- const alertVariant = variant && variant in alertIcons ? variant : "default";
127
- const DefaultIcon = alertIcons[alertVariant];
128
- return /* @__PURE__ */ jsxs(
129
- "div",
130
- {
131
- "data-slot": "alert",
132
- role: "alert",
133
- className: cn(alertVariants({ variant }), className),
134
- ...props,
135
- children: [
136
- icon !== void 0 ? icon : /* @__PURE__ */ jsx(DefaultIcon, { className: "flex-shrink-0" }),
137
- /* @__PURE__ */ jsx("div", { className: "flex-1", children })
138
- ]
139
- }
140
- );
141
- }
142
- function AlertTitle({ className, ...props }) {
143
- return /* @__PURE__ */ jsx(
144
- "div",
145
- {
146
- "data-slot": "alert-title",
147
- className: cn(
148
- "font-medium mb-1 leading-tight",
149
- className
150
- ),
151
- ...props
152
- }
153
- );
154
- }
155
- function AlertDescription({
156
- className,
157
- ...props
158
- }) {
159
- return /* @__PURE__ */ jsx(
160
- "div",
161
- {
162
- "data-slot": "alert-description",
163
- className: cn(
164
- "leading-relaxed",
165
- className
166
- ),
167
- ...props
168
- }
169
- );
170
- }
171
- const Checkbox = React.forwardRef(({ className, size = "md", ...props }, ref) => {
172
- const sizeClasses = {
173
- sm: "size-3.5",
174
- md: "size-4",
175
- lg: "size-5"
176
- };
177
- const iconSizeClasses = {
178
- sm: "size-3",
179
- md: "size-3.5",
180
- lg: "size-4"
181
- };
182
- return /* @__PURE__ */ jsx(
183
- CheckboxPrimitive.Root,
184
- {
185
- ref,
186
- "data-slot": "checkbox",
187
- className: cn(
188
- "peer border bg-white dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
189
- sizeClasses[size],
190
- className
191
- ),
192
- ...props,
193
- children: /* @__PURE__ */ jsx(
194
- CheckboxPrimitive.Indicator,
195
- {
196
- "data-slot": "checkbox-indicator",
197
- className: "flex items-center justify-center text-current transition-none",
198
- children: /* @__PURE__ */ jsx(Check, { className: iconSizeClasses[size] })
199
- }
200
- )
201
- }
202
- );
203
- });
204
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
205
- const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
206
- RadioGroupPrimitive.Root,
207
- {
208
- className: cn("grid gap-4", className),
209
- ...props,
210
- ref
211
- }
212
- ));
213
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
214
- const RadioGroupItem = React.forwardRef(({ className, size = "md", ...props }, ref) => {
215
- const sizeClasses = {
216
- sm: "size-4",
217
- md: "size-5",
218
- lg: "size-6"
219
- };
220
- const dotSizeClasses = {
221
- sm: "size-2",
222
- md: "size-2.5",
223
- lg: "size-3"
224
- };
225
- return /* @__PURE__ */ jsx(
226
- RadioGroupPrimitive.Item,
227
- {
228
- ref,
229
- "data-slot": "radio-group-item",
230
- className: cn(
231
- // Base styles - Material UI inspired
232
- "relative aspect-square shrink-0 rounded-full border-2 transition-all duration-200 outline-none cursor-pointer",
233
- // Default state - sempre com contorno usando variáveis CSS
234
- "border-muted-foreground bg-background",
235
- // Hover state - usa variável primary
236
- "hover:border-primary hover:shadow-md",
237
- // Focus state - usa variável primary
238
- "focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
239
- // Checked state - mantém contorno com primary
240
- "data-[state=checked]:border-primary data-[state=checked]:bg-background",
241
- // Disabled state
242
- "disabled:cursor-not-allowed disabled:opacity-50 disabled:border-muted",
243
- // Invalid state - usa variável destructive
244
- "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
245
- sizeClasses[size],
246
- className
247
- ),
248
- ...props,
249
- children: /* @__PURE__ */ jsx(
250
- RadioGroupPrimitive.Indicator,
251
- {
252
- "data-slot": "radio-group-indicator",
253
- className: "flex items-center justify-center",
254
- children: /* @__PURE__ */ jsx("div", { className: cn("rounded-full bg-primary transition-all duration-200", dotSizeClasses[size]) })
255
- }
256
- )
257
- }
258
- );
259
- });
260
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
261
- const Switch = React.forwardRef(({ className, size = "md", ...props }, ref) => {
262
- const trackClasses = {
263
- sm: "h-3.5 w-7",
264
- md: "h-[1.15rem] w-8",
265
- lg: "h-[1.375rem] w-10"
266
- };
267
- const thumbClasses = {
268
- sm: "size-3",
269
- md: "size-4",
270
- lg: "size-5"
271
- };
272
- return /* @__PURE__ */ jsx(
273
- SwitchPrimitive.Root,
274
- {
275
- className: cn(
276
- "peer inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50",
277
- "data-[state=checked]:bg-primary",
278
- "data-[state=unchecked]:bg-muted",
279
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
280
- trackClasses[size],
281
- className
282
- ),
283
- ...props,
284
- ref,
285
- children: /* @__PURE__ */ jsx(
286
- SwitchPrimitive.Thumb,
287
- {
288
- className: cn(
289
- "pointer-events-none block rounded-full ring-0 transition-transform shadow-sm",
290
- "bg-background",
291
- "data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0",
292
- thumbClasses[size]
293
- )
294
- }
295
- )
296
- }
297
- );
298
- });
299
- Switch.displayName = SwitchPrimitive.Root.displayName;
300
- const trackVariants = {
301
- default: "bg-primary/20",
302
- success: "bg-success/20",
303
- info: "bg-info/20",
304
- warning: "bg-warning/20",
305
- destructive: "bg-destructive/20"
306
- };
307
- const indicatorVariants = {
308
- default: "bg-primary",
309
- success: "bg-success",
310
- info: "bg-info",
311
- warning: "bg-warning",
312
- destructive: "bg-destructive"
313
- };
314
- function Progress({
315
- className,
316
- value,
317
- variant = "default",
318
- ...props
319
- }) {
320
- return /* @__PURE__ */ jsx(
321
- ProgressPrimitive.Root,
322
- {
323
- "data-slot": "progress",
324
- "aria-label": props["aria-label"] || "Progresso",
325
- className: cn(
326
- "relative h-2 w-full overflow-hidden rounded-full",
327
- trackVariants[variant],
328
- className
329
- ),
330
- ...props,
331
- children: /* @__PURE__ */ jsx(
332
- ProgressPrimitive.Indicator,
333
- {
334
- "data-slot": "progress-indicator",
335
- className: cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
336
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
337
- }
338
- )
339
- }
340
- );
341
- }
342
- function Separator({
343
- className,
344
- orientation = "horizontal",
345
- decorative = true,
346
- ...props
347
- }) {
348
- return /* @__PURE__ */ jsx(
349
- SeparatorPrimitive.Root,
350
- {
351
- "data-slot": "separator-root",
352
- decorative,
353
- orientation,
354
- className: cn(
355
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
356
- className
357
- ),
358
- ...props
359
- }
360
- );
361
- }
362
- function useMapLayers(map, layers) {
363
- const trafficLayerRef = useRef(null);
364
- const transitLayerRef = useRef(null);
365
- const bicyclingLayerRef = useRef(null);
366
- useEffect(() => {
367
- if (!map) return;
368
- if (layers.traffic) {
369
- if (!trafficLayerRef.current) {
370
- trafficLayerRef.current = new google.maps.TrafficLayer();
371
- }
372
- trafficLayerRef.current.setMap(map);
373
- } else {
374
- if (trafficLayerRef.current) {
375
- trafficLayerRef.current.setMap(null);
376
- }
377
- }
378
- return () => {
379
- if (trafficLayerRef.current) {
380
- trafficLayerRef.current.setMap(null);
381
- }
382
- };
383
- }, [map, layers.traffic]);
384
- useEffect(() => {
385
- if (!map) return;
386
- if (layers.transit) {
387
- if (!transitLayerRef.current) {
388
- transitLayerRef.current = new google.maps.TransitLayer();
389
- }
390
- transitLayerRef.current.setMap(map);
391
- } else {
392
- if (transitLayerRef.current) {
393
- transitLayerRef.current.setMap(null);
394
- }
395
- }
396
- return () => {
397
- if (transitLayerRef.current) {
398
- transitLayerRef.current.setMap(null);
399
- }
400
- };
401
- }, [map, layers.transit]);
402
- useEffect(() => {
403
- if (!map) return;
404
- if (layers.bicycling) {
405
- if (!bicyclingLayerRef.current) {
406
- bicyclingLayerRef.current = new google.maps.BicyclingLayer();
407
- }
408
- bicyclingLayerRef.current.setMap(map);
409
- } else {
410
- if (bicyclingLayerRef.current) {
411
- bicyclingLayerRef.current.setMap(null);
412
- }
413
- }
414
- return () => {
415
- if (bicyclingLayerRef.current) {
416
- bicyclingLayerRef.current.setMap(null);
417
- }
418
- };
419
- }, [map, layers.bicycling]);
420
- }
421
- const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
422
- const DEFAULT_CENTER = { lat: -23.5505, lng: -46.6333 };
423
- const DEFAULT_ZOOM = 12;
424
- const MapContent = React__default.forwardRef(
425
- ({ apiKey, ...props }, ref) => {
426
- const { isLoaded, loadError, load } = useGoogleMapsLoader();
427
- const {
428
- center = DEFAULT_CENTER,
429
- zoom = DEFAULT_ZOOM,
430
- markers = [],
431
- circle,
432
- polygon,
433
- layers,
434
- height = "400px",
435
- mapContainerClassName,
436
- disableDefaultUI = false,
437
- zoomControl = true,
438
- streetViewControl = false,
439
- mapTypeControl = false,
440
- fullscreenControl = true,
441
- gestureHandling = "cooperative",
442
- onMapLoad,
443
- className,
444
- ...divProps
445
- } = props;
446
- const [selectedMarker, setSelectedMarker] = useState(null);
447
- const mapRef = useRef(null);
448
- const gmpMapRef = useRef(null);
449
- const infoWindowRef = useRef(null);
450
- const circleRef = useRef(null);
451
- const polygonRef = useRef(null);
452
- const [themeColors, setThemeColors] = useState({
453
- primary: "#4F46E5",
454
- chart2: "#10B981"
455
- });
456
- useEffect(() => {
457
- if (typeof window !== "undefined") {
458
- const styles = getComputedStyle(document.documentElement);
459
- setThemeColors({
460
- primary: styles.getPropertyValue("--primary").trim() || "#4F46E5",
461
- chart2: styles.getPropertyValue("--chart-2").trim() || "#10B981"
462
- });
463
- }
464
- }, []);
465
- useEffect(() => {
466
- if (!isLoaded && apiKey && !loadError && load) {
467
- load(apiKey).catch(console.error);
468
- }
469
- }, [isLoaded, apiKey, loadError, load]);
470
- useEffect(() => {
471
- if (!isLoaded || !gmpMapRef.current) return;
472
- const gmpMap = gmpMapRef.current;
473
- if (gmpMap.innerMap) {
474
- mapRef.current = gmpMap.innerMap;
475
- if (onMapLoad) {
476
- onMapLoad(gmpMap.innerMap);
477
- }
478
- } else {
479
- const interval = setInterval(() => {
480
- if (gmpMap.innerMap) {
481
- mapRef.current = gmpMap.innerMap;
482
- if (onMapLoad) {
483
- onMapLoad(gmpMap.innerMap);
484
- }
485
- clearInterval(interval);
486
- }
487
- }, 100);
488
- return () => clearInterval(interval);
489
- }
490
- return () => {
491
- mapRef.current = null;
492
- };
493
- }, [isLoaded]);
494
- useEffect(() => {
495
- if (gmpMapRef.current) {
496
- if (center) gmpMapRef.current.center = center;
497
- }
498
- }, [center]);
499
- useEffect(() => {
500
- if (gmpMapRef.current) {
501
- if (zoom !== void 0) gmpMapRef.current.zoom = zoom;
502
- }
503
- }, [zoom]);
504
- useEffect(() => {
505
- if (gmpMapRef.current) {
506
- if (props.mapTypeId) gmpMapRef.current.mapTypeId = props.mapTypeId;
507
- }
508
- }, [props.mapTypeId]);
509
- useEffect(() => {
510
- var _a;
511
- const map = mapRef.current;
512
- if (!map || !isLoaded) return;
513
- (_a = circleRef.current) == null ? void 0 : _a.setMap(null);
514
- circleRef.current = null;
515
- if (circle && circle.center && circle.radius) {
516
- circleRef.current = new google.maps.Circle({
517
- map,
518
- center: circle.center,
519
- radius: circle.radius,
520
- fillColor: circle.fillColor || themeColors.primary,
521
- fillOpacity: 0.2,
522
- strokeColor: circle.strokeColor || themeColors.primary,
523
- strokeOpacity: 0.8,
524
- strokeWeight: 2
525
- });
526
- }
527
- return () => {
528
- var _a2;
529
- (_a2 = circleRef.current) == null ? void 0 : _a2.setMap(null);
530
- };
531
- }, [circle, isLoaded, themeColors, mapRef.current]);
532
- useEffect(() => {
533
- var _a;
534
- const map = mapRef.current;
535
- if (!map || !isLoaded) return;
536
- (_a = polygonRef.current) == null ? void 0 : _a.setMap(null);
537
- polygonRef.current = null;
538
- if (polygon && polygon.paths) {
539
- polygonRef.current = new google.maps.Polygon({
540
- map,
541
- paths: polygon.paths,
542
- fillColor: polygon.fillColor || themeColors.chart2,
543
- fillOpacity: 0.2,
544
- strokeColor: polygon.strokeColor || themeColors.chart2,
545
- strokeOpacity: 0.8,
546
- strokeWeight: 2
547
- });
548
- }
549
- return () => {
550
- var _a2;
551
- (_a2 = polygonRef.current) == null ? void 0 : _a2.setMap(null);
552
- };
553
- }, [polygon, isLoaded, themeColors, mapRef.current]);
554
- useMapLayers(mapRef.current, layers || {});
555
- useEffect(() => {
556
- var _a;
557
- const map = mapRef.current;
558
- if (!map || selectedMarker === null) {
559
- (_a = infoWindowRef.current) == null ? void 0 : _a.close();
560
- return;
561
- }
562
- const markerData = markers[selectedMarker];
563
- if (!markerData) return;
564
- }, [selectedMarker, markers]);
565
- const handleMarkerClick = (index, markerElement) => {
566
- setSelectedMarker(index);
567
- const map = mapRef.current;
568
- if (!map) return;
569
- const markerData = markers[index];
570
- if (!markerData) return;
571
- let contentToRender = markerData.richContent;
572
- if (!contentToRender && (markerData.title || markerData.info)) {
573
- contentToRender = /* @__PURE__ */ jsxs("div", { className: "p-4 pr-8 min-w-[200px] max-w-[300px]", children: [
574
- markerData.title && /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base mb-1", children: markerData.title }),
575
- markerData.info && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: markerData.info })
576
- ] });
577
- }
578
- if (contentToRender && markerElement.innerMarker) {
579
- if (!infoWindowRef.current) {
580
- infoWindowRef.current = new google.maps.InfoWindow();
581
- }
582
- const container = document.createElement("div");
583
- const root = createRoot(container);
584
- root.render(contentToRender);
585
- infoWindowRef.current.setContent(container);
586
- infoWindowRef.current.open({
587
- map,
588
- anchor: markerElement.innerMarker
589
- });
590
- infoWindowRef.current.addListener("closeclick", () => {
591
- setSelectedMarker(null);
592
- setTimeout(() => root.unmount(), 0);
593
- });
594
- }
595
- };
596
- if (loadError) {
597
- return /* @__PURE__ */ jsx(
598
- "div",
599
- {
600
- ref,
601
- className: cn(
602
- "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
603
- className
604
- ),
605
- style: { height },
606
- ...divProps,
607
- 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: [
608
- /* @__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" }) }) }),
609
- /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: "Failed to load Google Maps" }),
610
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
611
- ] }) })
612
- }
613
- );
614
- }
615
- if (!isLoaded) {
616
- return /* @__PURE__ */ jsx(
617
- "div",
618
- {
619
- ref,
620
- className: cn(
621
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
622
- className
623
- ),
624
- style: { height },
625
- ...divProps
626
- }
627
- );
628
- }
629
- return /* @__PURE__ */ jsx(
630
- "div",
631
- {
632
- ref,
633
- className: cn(
634
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
635
- className
636
- ),
637
- style: { height },
638
- ...divProps,
639
- children: /* @__PURE__ */ jsx(
640
- "gmp-map",
641
- {
642
- ref: gmpMapRef,
643
- style: { height: "100%", width: "100%", display: "block" },
644
- "map-id": props.mapId || "DEMO_MAP_ID",
645
- children: markers.map((markerData, idx) => {
646
- const markerColor = markerData.customColor || "var(--primary)";
647
- const iconColor = markerData.iconColor || "white";
648
- return (
649
- // @ts-ignore
650
- /* @__PURE__ */ jsx(
651
- "gmp-advanced-marker",
652
- {
653
- title: markerData.title,
654
- ref: (el) => {
655
- if (el) {
656
- el.position = markerData.position;
657
- el.addEventListener("gmp-click", () => handleMarkerClick(idx, el));
658
- }
659
- },
660
- children: /* @__PURE__ */ jsx(
661
- "div",
662
- {
663
- className: "flex items-center justify-center w-8 h-8 border-[3px] border-background shadow-lg cursor-pointer origin-center transition-transform duration-200",
664
- style: {
665
- borderRadius: "50% 50% 50% 0",
666
- transform: "rotate(-45deg)",
667
- backgroundColor: markerColor
668
- },
669
- children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center rotate-45", children: markerData.iconSvg ? /* @__PURE__ */ jsx(
670
- "div",
671
- {
672
- dangerouslySetInnerHTML: { __html: markerData.iconSvg },
673
- style: { color: iconColor, width: 16, height: 16, fill: "currentColor" }
674
- }
675
- ) : /* @__PURE__ */ jsx("span", { className: "font-semibold text-sm", style: { color: iconColor }, children: markerData.icon || markerData.label || "" }) })
676
- }
677
- )
678
- },
679
- idx
680
- )
681
- );
682
- })
683
- }
684
- )
685
- }
686
- );
687
- }
688
- );
689
- MapContent.displayName = "MapContent";
690
- const Map$1 = React__default.forwardRef(
691
- (props, ref) => {
692
- const { isLoaded, loadError } = useGoogleMapsLoader();
693
- const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__$1 && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
694
- const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
695
- if (isLoaded || isValidKey || loadError) {
696
- return /* @__PURE__ */ jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
697
- }
698
- const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
699
- if (isScriptInjected) {
700
- return /* @__PURE__ */ jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
701
- }
702
- return /* @__PURE__ */ jsx(
703
- "div",
704
- {
705
- ref,
706
- className: cn(
707
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
708
- props.className
709
- ),
710
- style: { height: props.height || "400px" },
711
- children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
712
- /* @__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: [
713
- /* @__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" }),
714
- /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
715
- ] }) }),
716
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
717
- ] }) })
718
- }
719
- );
720
- }
721
- );
722
- Map$1.displayName = "Map";
723
- function PageHeader({
724
- title,
725
- subtitle,
726
- backHref,
727
- onBack,
728
- renderBackLink,
729
- actions,
730
- className,
731
- backLabel = "Back"
732
- }) {
733
- const showBack = !!(backHref || onBack || renderBackLink);
734
- const icon = /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5" });
735
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 md:flex-row md:items-center md:justify-between mb-8", className), children: [
736
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
737
- showBack && /* @__PURE__ */ jsx(
738
- Button,
739
- {
740
- variant: "outline",
741
- size: "icon",
742
- className: "h-10 w-10 shrink-0",
743
- onClick: onBack,
744
- asChild: !!renderBackLink || !!backHref,
745
- "aria-label": backLabel,
746
- children: renderBackLink ? renderBackLink(icon) : backHref ? /* @__PURE__ */ jsx("a", { href: backHref, children: icon }) : icon
747
- }
748
- ),
749
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-1", children: [
750
- /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: title }),
751
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: subtitle })
752
- ] })
753
- ] }),
754
- actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions })
755
- ] });
756
- }
757
- function PageHeaderHeading({
758
- className,
759
- ...props
760
- }) {
761
- return /* @__PURE__ */ jsx(
762
- "h1",
763
- {
764
- className: cn(
765
- "text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]",
766
- className
767
- ),
768
- ...props
769
- }
770
- );
771
- }
772
- function PageHeaderDescription({
773
- className,
774
- ...props
775
- }) {
776
- return /* @__PURE__ */ jsx(
777
- "p",
778
- {
779
- className: cn(
780
- "text-lg text-muted-foreground sm:text-xl",
781
- className
782
- ),
783
- ...props
784
- }
785
- );
786
- }
787
- function AlertDialog({
788
- ...props
789
- }) {
790
- return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
791
- }
792
- function AlertDialogTrigger({
793
- ...props
794
- }) {
795
- return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
796
- }
797
- function AlertDialogPortal({
798
- ...props
799
- }) {
800
- return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
801
- }
802
- const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => {
803
- return /* @__PURE__ */ jsx(
804
- AlertDialogPrimitive.Overlay,
805
- {
806
- ref,
807
- "data-slot": "alert-dialog-overlay",
808
- className: cn(
809
- "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",
810
- className
811
- ),
812
- ...props
813
- }
814
- );
815
- });
816
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
817
- function AlertDialogContent({
818
- className,
819
- ...props
820
- }) {
821
- return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
822
- /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
823
- /* @__PURE__ */ jsx(
824
- AlertDialogPrimitive.Content,
825
- {
826
- "data-slot": "alert-dialog-content",
827
- className: cn(
828
- "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
829
- className
830
- ),
831
- ...props
832
- }
833
- )
834
- ] });
835
- }
836
- function AlertDialogHeader({
837
- className,
838
- ...props
839
- }) {
840
- return /* @__PURE__ */ jsx(
841
- "div",
842
- {
843
- "data-slot": "alert-dialog-header",
844
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
845
- ...props
846
- }
847
- );
848
- }
849
- function AlertDialogFooter({
850
- className,
851
- ...props
852
- }) {
853
- return /* @__PURE__ */ jsx(
854
- "div",
855
- {
856
- "data-slot": "alert-dialog-footer",
857
- className: cn(
858
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
859
- className
860
- ),
861
- ...props
862
- }
863
- );
864
- }
865
- function AlertDialogTitle({
866
- className,
867
- ...props
868
- }) {
869
- return /* @__PURE__ */ jsx(
870
- AlertDialogPrimitive.Title,
871
- {
872
- "data-slot": "alert-dialog-title",
873
- className: cn("text-lg font-semibold", className),
874
- ...props
875
- }
876
- );
877
- }
878
- function AlertDialogDescription({
879
- className,
880
- ...props
881
- }) {
882
- return /* @__PURE__ */ jsx(
883
- AlertDialogPrimitive.Description,
884
- {
885
- "data-slot": "alert-dialog-description",
886
- className: cn("text-muted-foreground text-sm", className),
887
- ...props
888
- }
889
- );
890
- }
891
- function AlertDialogAction({
892
- className,
893
- ...props
894
- }) {
895
- return /* @__PURE__ */ jsx(
896
- AlertDialogPrimitive.Action,
897
- {
898
- className: cn(buttonVariants(), className),
899
- ...props
900
- }
901
- );
902
- }
903
- function AlertDialogCancel({
904
- className,
905
- ...props
906
- }) {
907
- return /* @__PURE__ */ jsx(
908
- AlertDialogPrimitive.Cancel,
909
- {
910
- className: cn(buttonVariants({ variant: "outline" }), className),
911
- ...props
912
- }
913
- );
914
- }
915
- const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
916
- function ImageWithFallback(props) {
917
- const [didError, setDidError] = useState(false);
918
- const handleError = () => {
919
- setDidError(true);
920
- };
921
- const { src, alt, style, className, ...rest } = props;
922
- return didError ? /* @__PURE__ */ jsx(
923
- "div",
924
- {
925
- className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
926
- style,
927
- children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
928
- }
929
- ) : /* @__PURE__ */ jsx("img", { src, alt, className, style, ...rest, onError: handleError });
930
- }
931
- function AspectRatio({
932
- ...props
933
- }) {
934
- return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
935
- }
936
- const ResizableContext = React.createContext(null);
937
- const ResizablePanelGroup = ({
938
- children,
939
- className,
940
- direction = "horizontal",
941
- id,
942
- autoSaveId,
943
- storage,
944
- onLayout,
945
- ...props
946
- }) => {
947
- const [panels, setPanels] = React.useState(/* @__PURE__ */ new Map());
948
- const [handles, setHandles] = React.useState(/* @__PURE__ */ new Map());
949
- const [sizes, setSizes] = React.useState(/* @__PURE__ */ new Map());
950
- const [isDragging, setIsDragging] = React.useState(false);
951
- const containerRef = React.useRef(null);
952
- const getSortedItems = React.useCallback((items) => {
953
- if (!containerRef.current) return [];
954
- return Array.from(items.values()).sort((a, b) => {
955
- if (!a.ref.current || !b.ref.current) return 0;
956
- const position = a.ref.current.compareDocumentPosition(b.ref.current);
957
- if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
958
- if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
959
- return 0;
960
- });
961
- }, []);
962
- React.useEffect(() => {
963
- const sortedPanels = getSortedItems(panels);
964
- if (sortedPanels.length === 0) return;
965
- const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
966
- if (uninitialized) {
967
- const newSizes = new Map(sizes);
968
- const remainingSpace = 100;
969
- const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
970
- let usedSpace = 0;
971
- sortedPanels.forEach((p) => {
972
- if (p.defaultSize) usedSpace += p.defaultSize;
973
- });
974
- const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
975
- const countOthers = sortedPanels.length - defaultSizeCount;
976
- const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
977
- sortedPanels.forEach((p) => {
978
- if (!newSizes.has(p.id)) {
979
- newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
980
- }
981
- });
982
- setSizes(newSizes);
983
- }
984
- }, [panels, sizes, getSortedItems]);
985
- const registerPanel = React.useCallback((data) => {
986
- setPanels((prev) => {
987
- const next = new Map(prev);
988
- next.set(data.id, data);
989
- return next;
990
- });
991
- }, []);
992
- const unregisterPanel = React.useCallback((id2) => {
993
- setPanels((prev) => {
994
- const next = new Map(prev);
995
- next.delete(id2);
996
- return next;
997
- });
998
- setSizes((prev) => {
999
- const next = new Map(prev);
1000
- next.delete(id2);
1001
- return next;
1002
- });
1003
- }, []);
1004
- const registerHandle = React.useCallback((data) => {
1005
- setHandles((prev) => {
1006
- const next = new Map(prev);
1007
- next.set(data.id, data);
1008
- return next;
1009
- });
1010
- }, []);
1011
- const unregisterHandle = React.useCallback((id2) => {
1012
- setHandles((prev) => {
1013
- const next = new Map(prev);
1014
- next.delete(id2);
1015
- return next;
1016
- });
1017
- }, []);
1018
- const startDragging = React.useCallback((handleId, event) => {
1019
- var _a, _b;
1020
- event.preventDefault();
1021
- setIsDragging(true);
1022
- const sortedPanels = getSortedItems(panels);
1023
- const sortedHandles = getSortedItems(handles);
1024
- const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
1025
- if (handleIndex === -1) return;
1026
- const leftPanel = sortedPanels[handleIndex];
1027
- const rightPanel = sortedPanels[handleIndex + 1];
1028
- if (!leftPanel || !rightPanel) return;
1029
- const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
1030
- const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
1031
- const startSizeLeft = sizes.get(leftPanel.id) || 0;
1032
- const startSizeRight = sizes.get(rightPanel.id) || 0;
1033
- const containerSize = direction === "horizontal" ? ((_a = containerRef.current) == null ? void 0 : _a.offsetWidth) || 1 : ((_b = containerRef.current) == null ? void 0 : _b.offsetHeight) || 1;
1034
- const onMove = (e) => {
1035
- var _a2, _b2;
1036
- const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
1037
- const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
1038
- const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
1039
- const deltaPercent = deltaPixels / containerSize * 100;
1040
- let finalLeft = startSizeLeft + deltaPercent;
1041
- let finalRight = startSizeRight - deltaPercent;
1042
- if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
1043
- const diff = leftPanel.minSize - finalLeft;
1044
- finalLeft = leftPanel.minSize;
1045
- finalRight -= diff;
1046
- }
1047
- if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
1048
- const diff = rightPanel.minSize - finalRight;
1049
- finalRight = rightPanel.minSize;
1050
- finalLeft -= diff;
1051
- }
1052
- if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
1053
- const diff = finalLeft - leftPanel.maxSize;
1054
- finalLeft = leftPanel.maxSize;
1055
- finalRight += diff;
1056
- }
1057
- if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
1058
- const diff = finalRight - rightPanel.maxSize;
1059
- finalRight = rightPanel.maxSize;
1060
- finalLeft -= diff;
1061
- }
1062
- finalLeft = Math.max(0, Math.min(100, finalLeft));
1063
- finalRight = Math.max(0, Math.min(100, finalRight));
1064
- setSizes((prev) => {
1065
- const next = new Map(prev);
1066
- next.set(leftPanel.id, finalLeft);
1067
- next.set(rightPanel.id, finalRight);
1068
- return next;
1069
- });
1070
- (_a2 = leftPanel.onResize) == null ? void 0 : _a2.call(leftPanel, finalLeft);
1071
- (_b2 = rightPanel.onResize) == null ? void 0 : _b2.call(rightPanel, finalRight);
1072
- };
1073
- const onUp = () => {
1074
- setIsDragging(false);
1075
- window.removeEventListener("mousemove", onMove);
1076
- window.removeEventListener("mouseup", onUp);
1077
- window.removeEventListener("touchmove", onMove);
1078
- window.removeEventListener("touchend", onUp);
1079
- if (onLayout) {
1080
- onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
1081
- }
1082
- };
1083
- window.addEventListener("mousemove", onMove);
1084
- window.addEventListener("mouseup", onUp);
1085
- window.addEventListener("touchmove", onMove);
1086
- window.addEventListener("touchend", onUp);
1087
- }, [panels, handles, sizes, direction, getSortedItems, onLayout]);
1088
- const getPanelStyle = React.useCallback((id2) => {
1089
- const size = sizes.get(id2);
1090
- if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
1091
- return { flex: `${size} 1 0%`, overflow: "hidden" };
1092
- }, [sizes]);
1093
- const contextValue = React.useMemo(() => ({
1094
- direction,
1095
- registerPanel,
1096
- unregisterPanel,
1097
- registerHandle,
1098
- unregisterHandle,
1099
- isDragging,
1100
- startDragging,
1101
- getPanelStyle
1102
- }), [direction, registerPanel, unregisterPanel, registerHandle, unregisterHandle, isDragging, startDragging, getPanelStyle]);
1103
- return /* @__PURE__ */ jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1104
- "div",
1105
- {
1106
- ref: containerRef,
1107
- "data-slot": "resizable-panel-group",
1108
- "data-panel-group-direction": direction,
1109
- className: cn(
1110
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
1111
- className
1112
- ),
1113
- ...props,
1114
- children
1115
- }
1116
- ) });
1117
- };
1118
- const ResizablePanel = ({
1119
- className,
1120
- defaultSize,
1121
- minSize = 0,
1122
- maxSize = 100,
1123
- collapsible,
1124
- collapsedSize,
1125
- onCollapse,
1126
- onExpand,
1127
- onResize,
1128
- order,
1129
- tagName,
1130
- id: propId,
1131
- children,
1132
- ...props
1133
- }) => {
1134
- const context = React.useContext(ResizableContext);
1135
- const ref = React.useRef(null);
1136
- const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1137
- const id = propId || generatedId;
1138
- const registerPanel = context == null ? void 0 : context.registerPanel;
1139
- const unregisterPanel = context == null ? void 0 : context.unregisterPanel;
1140
- React.useLayoutEffect(() => {
1141
- if (!registerPanel || !unregisterPanel) return;
1142
- registerPanel({
1143
- id,
1144
- ref,
1145
- defaultSize,
1146
- minSize,
1147
- maxSize,
1148
- collapsible,
1149
- onCollapse,
1150
- onExpand,
1151
- onResize
1152
- });
1153
- return () => unregisterPanel(id);
1154
- }, [registerPanel, unregisterPanel, id, defaultSize, minSize, maxSize, collapsible, onCollapse, onExpand, onResize]);
1155
- if (!context) {
1156
- return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), ...props, children });
1157
- }
1158
- return /* @__PURE__ */ jsx(
1159
- "div",
1160
- {
1161
- ref,
1162
- "data-slot": "resizable-panel",
1163
- className: cn("relative transition-[flex-grow] duration-0", className),
1164
- style: context.getPanelStyle(id),
1165
- ...props,
1166
- children
1167
- }
1168
- );
1169
- };
1170
- const ResizableHandle = ({
1171
- withHandle,
1172
- className,
1173
- id: propId,
1174
- tagName,
1175
- ...props
1176
- }) => {
1177
- const context = React.useContext(ResizableContext);
1178
- const ref = React.useRef(null);
1179
- const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1180
- const id = propId || generatedId;
1181
- const registerHandle = context == null ? void 0 : context.registerHandle;
1182
- const unregisterHandle = context == null ? void 0 : context.unregisterHandle;
1183
- React.useLayoutEffect(() => {
1184
- if (!registerHandle || !unregisterHandle) return;
1185
- registerHandle({ id, ref });
1186
- return () => unregisterHandle(id);
1187
- }, [registerHandle, unregisterHandle, id]);
1188
- const handleMouseDown = (e) => {
1189
- if (context) {
1190
- context.startDragging(id, e);
1191
- }
1192
- };
1193
- if (!context) return null;
1194
- return /* @__PURE__ */ jsx(
1195
- "div",
1196
- {
1197
- ref,
1198
- "data-slot": "resizable-handle",
1199
- className: cn(
1200
- "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
1201
- "touch-none select-none",
1202
- 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",
1203
- "after:absolute after:z-10",
1204
- className
1205
- ),
1206
- onMouseDown: handleMouseDown,
1207
- onTouchStart: handleMouseDown,
1208
- ...props,
1209
- 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" }) })
1210
- }
1211
- );
1212
- };
1213
- function NavigationMenu({
1214
- className,
1215
- children,
1216
- viewport = true,
1217
- ...props
1218
- }) {
1219
- return /* @__PURE__ */ jsxs(
1220
- NavigationMenuPrimitive.Root,
1221
- {
1222
- "data-slot": "navigation-menu",
1223
- className: cn(
1224
- "relative z-10 flex w-full flex-1 items-center justify-center",
1225
- className
1226
- ),
1227
- ...props,
1228
- children: [
1229
- children,
1230
- viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
1231
- ]
1232
- }
1233
- );
1234
- }
1235
- function NavigationMenuList({
1236
- className,
1237
- ...props
1238
- }) {
1239
- return /* @__PURE__ */ jsx(
1240
- NavigationMenuPrimitive.List,
1241
- {
1242
- "data-slot": "navigation-menu-list",
1243
- className: cn(
1244
- "group flex flex-1 list-none items-center justify-center gap-1",
1245
- className
1246
- ),
1247
- ...props
1248
- }
1249
- );
1250
- }
1251
- function NavigationMenuItem({
1252
- className,
1253
- ...props
1254
- }) {
1255
- return /* @__PURE__ */ jsx(
1256
- NavigationMenuPrimitive.Item,
1257
- {
1258
- "data-slot": "navigation-menu-item",
1259
- className: cn("relative", className),
1260
- ...props
1261
- }
1262
- );
1263
- }
1264
- const navigationMenuTriggerStyle = cva(
1265
- "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"
1266
- );
1267
- function NavigationMenuTrigger({
1268
- className,
1269
- children,
1270
- ...props
1271
- }) {
1272
- return /* @__PURE__ */ jsxs(
1273
- NavigationMenuPrimitive.Trigger,
1274
- {
1275
- "data-slot": "navigation-menu-trigger",
1276
- className: cn(navigationMenuTriggerStyle(), "group", className),
1277
- ...props,
1278
- children: [
1279
- children,
1280
- " ",
1281
- /* @__PURE__ */ jsx(
1282
- ChevronDownIcon,
1283
- {
1284
- className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
1285
- "aria-hidden": "true"
1286
- }
1287
- )
1288
- ]
1289
- }
1290
- );
1291
- }
1292
- function NavigationMenuContent({
1293
- className,
1294
- ...props
1295
- }) {
1296
- return /* @__PURE__ */ jsx(
1297
- NavigationMenuPrimitive.Content,
1298
- {
1299
- "data-slot": "navigation-menu-content",
1300
- className: cn(
1301
- "left-0 top-0 w-full md:w-auto",
1302
- className
1303
- ),
1304
- ...props
1305
- }
1306
- );
1307
- }
1308
- function NavigationMenuViewport({
1309
- className,
1310
- ...props
1311
- }) {
1312
- return /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsx(
1313
- NavigationMenuPrimitive.Viewport,
1314
- {
1315
- "data-slot": "navigation-menu-viewport",
1316
- className: cn(
1317
- "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
1318
- className
1319
- ),
1320
- ...props
1321
- }
1322
- ) });
1323
- }
1324
- function NavigationMenuLink({
1325
- className,
1326
- ...props
1327
- }) {
1328
- return /* @__PURE__ */ jsx(
1329
- NavigationMenuPrimitive.Link,
1330
- {
1331
- "data-slot": "navigation-menu-link",
1332
- className: cn(
1333
- "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",
1334
- className
1335
- ),
1336
- ...props
1337
- }
1338
- );
1339
- }
1340
- function NavigationMenuIndicator({
1341
- className,
1342
- ...props
1343
- }) {
1344
- return /* @__PURE__ */ jsx(
1345
- NavigationMenuPrimitive.Indicator,
1346
- {
1347
- "data-slot": "navigation-menu-indicator",
1348
- className: cn(
1349
- "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
1350
- className
1351
- ),
1352
- ...props,
1353
- children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
1354
- }
1355
- );
1356
- }
1357
- function Pagination({ className, ...props }) {
1358
- return /* @__PURE__ */ jsx(
1359
- "nav",
1360
- {
1361
- role: "navigation",
1362
- "aria-label": "pagination",
1363
- "data-slot": "pagination",
1364
- className: cn("mx-auto flex w-full justify-center", className),
1365
- ...props
1366
- }
1367
- );
1368
- }
1369
- function PaginationContent({
1370
- className,
1371
- ...props
1372
- }) {
1373
- return /* @__PURE__ */ jsx(
1374
- "ul",
1375
- {
1376
- "data-slot": "pagination-content",
1377
- className: cn("flex flex-row items-center gap-1", className),
1378
- ...props
1379
- }
1380
- );
1381
- }
1382
- function PaginationItem({ ...props }) {
1383
- return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
1384
- }
1385
- function PaginationLink({
1386
- className,
1387
- isActive,
1388
- size = "icon",
1389
- ...props
1390
- }) {
1391
- return /* @__PURE__ */ jsx(
1392
- "a",
1393
- {
1394
- "aria-current": isActive ? "page" : void 0,
1395
- "data-slot": "pagination-link",
1396
- "data-active": isActive,
1397
- className: cn(
1398
- buttonVariants({
1399
- variant: isActive ? "outline" : "ghost",
1400
- size
1401
- }),
1402
- className
1403
- ),
1404
- ...props
1405
- }
1406
- );
1407
- }
1408
- function PaginationPrevious({
1409
- className,
1410
- ...props
1411
- }) {
1412
- return /* @__PURE__ */ jsxs(
1413
- PaginationLink,
1414
- {
1415
- "aria-label": "Go to previous page",
1416
- size: "default",
1417
- className: cn("gap-1 px-2.5 sm:pl-2.5", className),
1418
- ...props,
1419
- children: [
1420
- /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
1421
- /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
1422
- ]
1423
- }
1424
- );
1425
- }
1426
- function PaginationNext({
1427
- className,
1428
- ...props
1429
- }) {
1430
- return /* @__PURE__ */ jsxs(
1431
- PaginationLink,
1432
- {
1433
- "aria-label": "Go to next page",
1434
- size: "default",
1435
- className: cn("gap-1 px-2.5 sm:pr-2.5", className),
1436
- ...props,
1437
- children: [
1438
- /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
1439
- /* @__PURE__ */ jsx(ChevronRightIcon, {})
1440
- ]
1441
- }
1442
- );
1443
- }
1444
- function PaginationEllipsis({
1445
- className,
1446
- ...props
1447
- }) {
1448
- return /* @__PURE__ */ jsxs(
1449
- "span",
1450
- {
1451
- "aria-hidden": true,
1452
- "data-slot": "pagination-ellipsis",
1453
- className: cn("flex size-9 items-center justify-center", className),
1454
- ...props,
1455
- children: [
1456
- /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
1457
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
1458
- ]
1459
- }
1460
- );
1461
- }
1462
- const toggleVariants = cva(
1463
- "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",
1464
- {
1465
- variants: {
1466
- variant: {
1467
- default: "bg-transparent",
1468
- outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1469
- },
1470
- size: {
1471
- default: "h-9 px-2 min-w-9",
1472
- sm: "h-8 px-1.5 min-w-8",
1473
- lg: "h-10 px-2.5 min-w-10"
1474
- }
1475
- },
1476
- defaultVariants: {
1477
- variant: "default",
1478
- size: "default"
1479
- }
1480
- }
1481
- );
1482
- const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
1483
- TogglePrimitive.Root,
1484
- {
1485
- ref,
1486
- "data-slot": "toggle",
1487
- className: cn(toggleVariants({ variant, size, className })),
1488
- ...props
1489
- }
1490
- ));
1491
- Toggle.displayName = TogglePrimitive.Root.displayName;
1492
- const ToggleGroupContext = React.createContext({
1493
- size: "default",
1494
- variant: "default"
1495
- });
1496
- const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
1497
- ToggleGroupPrimitive.Root,
1498
- {
1499
- ref,
1500
- "data-slot": "toggle-group",
1501
- "data-variant": variant,
1502
- "data-size": size,
1503
- className: cn(
1504
- "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
1505
- className
1506
- ),
1507
- ...props,
1508
- children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
1509
- }
1510
- ));
1511
- ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
1512
- const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
1513
- const context = React.useContext(ToggleGroupContext);
1514
- return /* @__PURE__ */ jsx(
1515
- ToggleGroupPrimitive.Item,
1516
- {
1517
- ref,
1518
- "data-slot": "toggle-group-item",
1519
- "data-variant": context.variant || variant,
1520
- "data-size": context.size || size,
1521
- className: cn(
1522
- toggleVariants({
1523
- variant: context.variant || variant,
1524
- size: context.size || size
1525
- }),
1526
- "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",
1527
- className
1528
- ),
1529
- ...props,
1530
- children
1531
- }
1532
- );
1533
- });
1534
- ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
1535
- function InputOTP({
1536
- className,
1537
- containerClassName,
1538
- ...props
1539
- }) {
1540
- return /* @__PURE__ */ jsx(
1541
- OTPInput,
1542
- {
1543
- "data-slot": "input-otp",
1544
- containerClassName: cn(
1545
- "flex items-center gap-2 has-disabled:opacity-50",
1546
- containerClassName
1547
- ),
1548
- className: cn("disabled:cursor-not-allowed", className),
1549
- ...props
1550
- }
1551
- );
1552
- }
1553
- function InputOTPGroup({ className, ...props }) {
1554
- return /* @__PURE__ */ jsx(
1555
- "div",
1556
- {
1557
- "data-slot": "input-otp-group",
1558
- className: cn("flex items-center gap-1", className),
1559
- ...props
1560
- }
1561
- );
1562
- }
1563
- function InputOTPSlot({
1564
- index,
1565
- className,
1566
- size = "md",
1567
- ...props
1568
- }) {
1569
- const inputOTPContext = React.useContext(OTPInputContext);
1570
- const { char, hasFakeCaret, isActive } = (inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) ?? {};
1571
- const sizeClasses = {
1572
- sm: "h-8 w-8 text-sm",
1573
- md: "h-10 w-10 text-base",
1574
- lg: "h-12 w-12 text-lg"
1575
- };
1576
- return /* @__PURE__ */ jsxs(
1577
- "div",
1578
- {
1579
- "data-slot": "input-otp-slot",
1580
- "data-active": isActive,
1581
- className: cn(
1582
- "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",
1583
- sizeClasses[size],
1584
- className
1585
- ),
1586
- ...props,
1587
- children: [
1588
- char,
1589
- 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" }) })
1590
- ]
1591
- }
1592
- );
1593
- }
1594
- function InputOTPSeparator({ ...props }) {
1595
- return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
1596
- }
1597
- const Form = FormProvider;
1598
- const FormFieldContext = React.createContext(
1599
- {}
1600
- );
1601
- const FormField = ({
1602
- ...props
1603
- }) => {
1604
- return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1605
- };
1606
- const useFormField = () => {
1607
- const fieldContext = React.useContext(FormFieldContext);
1608
- const itemContext = React.useContext(FormItemContext);
1609
- const { getFieldState } = useFormContext();
1610
- const formState = useFormState({ name: fieldContext.name });
1611
- const fieldState = getFieldState(
1612
- fieldContext.name,
1613
- formState
1614
- );
1615
- if (!fieldContext) {
1616
- throw new Error(
1617
- "useFormField should be used within <FormField>"
1618
- );
1619
- }
1620
- const { id } = itemContext;
1621
- return {
1622
- id,
1623
- name: fieldContext.name,
1624
- formItemId: `${id}-form-item`,
1625
- formDescriptionId: `${id}-form-item-description`,
1626
- formMessageId: `${id}-form-item-message`,
1627
- ...fieldState
1628
- };
1629
- };
1630
- const FormItemContext = React.createContext(
1631
- {}
1632
- );
1633
- function FormItem({
1634
- className,
1635
- ...props
1636
- }) {
1637
- const id = React.useId();
1638
- return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
1639
- "div",
1640
- {
1641
- "data-slot": "form-item",
1642
- className: cn("grid gap-2", className),
1643
- ...props
1644
- }
1645
- ) });
1646
- }
1647
- function FormLabel({
1648
- className,
1649
- ...props
1650
- }) {
1651
- const { error, formItemId } = useFormField();
1652
- return /* @__PURE__ */ jsx(
1653
- Label,
1654
- {
1655
- "data-slot": "form-label",
1656
- "data-error": !!error,
1657
- className: cn(
1658
- "data-[error=true]:text-destructive",
1659
- className
1660
- ),
1661
- htmlFor: formItemId,
1662
- ...props
1663
- }
1664
- );
1665
- }
1666
- function FormControl({
1667
- ...props
1668
- }) {
1669
- const {
1670
- error,
1671
- formItemId,
1672
- formDescriptionId,
1673
- formMessageId
1674
- } = useFormField();
1675
- return /* @__PURE__ */ jsx(
1676
- Slot,
1677
- {
1678
- "data-slot": "form-control",
1679
- id: formItemId,
1680
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1681
- "aria-invalid": !!error,
1682
- ...props
1683
- }
1684
- );
1685
- }
1686
- function FormDescription({
1687
- className,
1688
- ...props
1689
- }) {
1690
- const { formDescriptionId } = useFormField();
1691
- return /* @__PURE__ */ jsx(
1692
- "p",
1693
- {
1694
- "data-slot": "form-description",
1695
- id: formDescriptionId,
1696
- className: cn("text-muted-foreground text-sm", className),
1697
- ...props
1698
- }
1699
- );
1700
- }
1701
- function FormMessage({
1702
- className,
1703
- ...props
1704
- }) {
1705
- const { error, formMessageId } = useFormField();
1706
- const body = error ? String((error == null ? void 0 : error.message) ?? "") : props.children;
1707
- if (!body) {
1708
- return null;
1709
- }
1710
- return /* @__PURE__ */ jsx(
1711
- "p",
1712
- {
1713
- "data-slot": "form-message",
1714
- id: formMessageId,
1715
- className: cn("text-destructive text-sm", className),
1716
- ...props,
1717
- children: body
1718
- }
1719
- );
1720
- }
1721
- function Calendar({
1722
- className,
1723
- classNames,
1724
- showOutsideDays = true,
1725
- captionLayout = "label",
1726
- buttonVariant = "ghost",
1727
- formatters,
1728
- components,
1729
- ...props
1730
- }) {
1731
- const defaultClassNames = getDefaultClassNames();
1732
- return /* @__PURE__ */ jsx(
1733
- DayPicker,
1734
- {
1735
- showOutsideDays,
1736
- className: cn(
1737
- "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
1738
- String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
1739
- String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
1740
- className
1741
- ),
1742
- captionLayout,
1743
- formatters,
1744
- classNames: {
1745
- root: cn("w-fit", defaultClassNames.root),
1746
- months: cn(
1747
- "flex gap-6 flex-col md:flex-row relative",
1748
- defaultClassNames.months
1749
- ),
1750
- month: cn("flex flex-col w-full gap-5", defaultClassNames.month),
1751
- nav: cn(
1752
- "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
1753
- defaultClassNames.nav
1754
- ),
1755
- button_previous: cn(
1756
- buttonVariants({ variant: buttonVariant }),
1757
- "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
1758
- defaultClassNames.button_previous
1759
- ),
1760
- button_next: cn(
1761
- buttonVariants({ variant: buttonVariant }),
1762
- "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
1763
- defaultClassNames.button_next
1764
- ),
1765
- month_caption: cn(
1766
- "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
1767
- defaultClassNames.month_caption
1768
- ),
1769
- dropdowns: cn(
1770
- "w-full flex items-center justify-center h-(--cell-size) gap-2",
1771
- defaultClassNames.dropdowns
1772
- ),
1773
- dropdown_root: cn(
1774
- "relative rounded-[var(--radius)] hover:bg-accent transition-colors",
1775
- defaultClassNames.dropdown_root
1776
- ),
1777
- dropdown: cn(
1778
- "absolute bg-popover inset-0 opacity-0 cursor-pointer",
1779
- defaultClassNames.dropdown
1780
- ),
1781
- caption_label: cn(
1782
- "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight hover:bg-accent hover:text-accent-foreground transition-all duration-200 rounded-[var(--radius)] px-2 py-1",
1783
- captionLayout === "label" ? "text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)]" : "flex items-center gap-1.5 text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] [&>svg]:text-muted-foreground [&>svg]:size-4",
1784
- defaultClassNames.caption_label
1785
- ),
1786
- table: "w-full border-collapse mt-1",
1787
- weekdays: cn("flex gap-1", defaultClassNames.weekdays),
1788
- weekday: cn(
1789
- "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",
1790
- defaultClassNames.weekday
1791
- ),
1792
- week: cn("flex w-full gap-1", defaultClassNames.week),
1793
- week_number_header: cn(
1794
- "select-none w-(--cell-size)",
1795
- defaultClassNames.week_number_header
1796
- ),
1797
- week_number: cn(
1798
- "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
1799
- defaultClassNames.week_number
1800
- ),
1801
- day: cn(
1802
- "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",
1803
- props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
1804
- defaultClassNames.day
1805
- ),
1806
- range_start: cn(
1807
- "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",
1808
- defaultClassNames.range_start
1809
- ),
1810
- range_middle: cn(
1811
- "rounded-none bg-accent/30",
1812
- defaultClassNames.range_middle
1813
- ),
1814
- range_end: cn(
1815
- "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",
1816
- defaultClassNames.range_end
1817
- ),
1818
- today: cn(
1819
- "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
1820
- defaultClassNames.today
1821
- ),
1822
- outside: cn(
1823
- "text-muted-foreground/40 aria-selected:text-muted-foreground/40",
1824
- defaultClassNames.outside
1825
- ),
1826
- disabled: cn(
1827
- "text-muted-foreground/30 opacity-40",
1828
- defaultClassNames.disabled
1829
- ),
1830
- hidden: cn("invisible", defaultClassNames.hidden),
1831
- ...classNames
1832
- },
1833
- components: {
1834
- Root: ({ className: className2, rootRef, ...props2 }) => {
1835
- return /* @__PURE__ */ jsx(
1836
- "div",
1837
- {
1838
- "data-slot": "calendar",
1839
- ref: rootRef,
1840
- className: cn(className2),
1841
- ...props2
1842
- }
1843
- );
1844
- },
1845
- Chevron: ({ className: className2, orientation, ...props2 }) => {
1846
- if (orientation === "left") {
1847
- return /* @__PURE__ */ jsx(
1848
- ChevronLeft,
1849
- {
1850
- className: cn("size-5 transition-transform group-hover:scale-110", className2),
1851
- ...props2
1852
- }
1853
- );
1854
- }
1855
- if (orientation === "right") {
1856
- return /* @__PURE__ */ jsx(
1857
- ChevronRight,
1858
- {
1859
- className: cn("size-5 transition-transform group-hover:scale-110", className2),
1860
- ...props2
1861
- }
1862
- );
1863
- }
1864
- return /* @__PURE__ */ jsx(
1865
- ChevronDown,
1866
- {
1867
- className: cn("size-4", className2),
1868
- ...props2
1869
- }
1870
- );
1871
- },
1872
- DayButton: CalendarDayButton,
1873
- WeekNumber: ({ children, ...props2 }) => {
1874
- 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 }) });
1875
- },
1876
- ...components
1877
- },
1878
- ...props
1879
- }
1880
- );
1881
- }
1882
- function CalendarDayButton({
1883
- className,
1884
- day,
1885
- modifiers,
1886
- ...props
1887
- }) {
1888
- const defaultClassNames = getDefaultClassNames();
1889
- const ref = React.useRef(null);
1890
- React.useEffect(() => {
1891
- var _a;
1892
- if (modifiers.focused) (_a = ref.current) == null ? void 0 : _a.focus();
1893
- }, [modifiers.focused]);
1894
- return /* @__PURE__ */ jsx(
1895
- Button,
1896
- {
1897
- ref,
1898
- variant: "ghost",
1899
- size: "icon",
1900
- "data-day": day.date.toLocaleDateString(),
1901
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1902
- "data-range-start": modifiers.range_start,
1903
- "data-range-end": modifiers.range_end,
1904
- "data-range-middle": modifiers.range_middle,
1905
- className: cn(
1906
- "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",
1907
- "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
1908
- "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
1909
- "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",
1910
- "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
1911
- "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",
1912
- "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",
1913
- "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",
1914
- "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
1915
- "data-[range-middle=true]:rounded-none",
1916
- "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
1917
- "[&>span]:opacity-80",
1918
- defaultClassNames.day,
1919
- className
1920
- ),
1921
- ...props,
1922
- children: day.date.getDate()
1923
- }
1924
- );
1925
- }
1926
- function Sheet({ ...props }) {
1927
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
1928
- }
1929
- function SheetTrigger({
1930
- ...props
1931
- }) {
1932
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
1933
- }
1934
- function SheetPortal({
1935
- ...props
1936
- }) {
1937
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
1938
- }
1939
- const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1940
- DialogPrimitive.Overlay,
1941
- {
1942
- className: cn(
1943
- "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",
1944
- className
1945
- ),
1946
- ...props,
1947
- ref
1948
- }
1949
- ));
1950
- SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
1951
- function SheetContent({
1952
- className,
1953
- children,
1954
- side = "right",
1955
- ...props
1956
- }) {
1957
- return /* @__PURE__ */ jsxs(SheetPortal, { children: [
1958
- /* @__PURE__ */ jsx(SheetOverlay, {}),
1959
- /* @__PURE__ */ jsxs(
1960
- DialogPrimitive.Content,
1961
- {
1962
- "data-slot": "sheet-content",
1963
- className: cn(
1964
- "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",
1965
- 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",
1966
- 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",
1967
- 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",
1968
- 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",
1969
- className
1970
- ),
1971
- ...props,
1972
- children: [
1973
- children,
1974
- /* @__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: [
1975
- /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
1976
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1977
- ] })
1978
- ]
1979
- }
1980
- )
1981
- ] });
1982
- }
1983
- function SheetHeader({ className, ...props }) {
1984
- return /* @__PURE__ */ jsx(
1985
- "div",
1986
- {
1987
- "data-slot": "sheet-header",
1988
- className: cn("flex flex-col gap-1.5 px-6 pt-6", className),
1989
- ...props
1990
- }
1991
- );
1992
- }
1993
- function SheetFooter({ className, ...props }) {
1994
- return /* @__PURE__ */ jsx(
1995
- "div",
1996
- {
1997
- "data-slot": "sheet-footer",
1998
- className: cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
1999
- ...props
2000
- }
2001
- );
2002
- }
2003
- function SheetTitle({
2004
- className,
2005
- ...props
2006
- }) {
2007
- return /* @__PURE__ */ jsx(
2008
- DialogPrimitive.Title,
2009
- {
2010
- "data-slot": "sheet-title",
2011
- className: cn("text-foreground font-semibold", className),
2012
- ...props
2013
- }
2014
- );
2015
- }
2016
- function SheetDescription({
2017
- className,
2018
- ...props
2019
- }) {
2020
- return /* @__PURE__ */ jsx(
2021
- DialogPrimitive.Description,
2022
- {
2023
- "data-slot": "sheet-description",
2024
- className: cn("text-muted-foreground text-sm", className),
2025
- ...props
2026
- }
2027
- );
2028
- }
2029
- function Drawer({
2030
- ...props
2031
- }) {
2032
- return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
2033
- }
2034
- function DrawerTrigger({
2035
- ...props
2036
- }) {
2037
- return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
2038
- }
2039
- function DrawerPortal({
2040
- ...props
2041
- }) {
2042
- return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
2043
- }
2044
- const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => {
2045
- return /* @__PURE__ */ jsx(
2046
- Drawer$1.Overlay,
2047
- {
2048
- ref,
2049
- "data-slot": "drawer-overlay",
2050
- className: cn(
2051
- "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",
2052
- className
2053
- ),
2054
- ...props
2055
- }
2056
- );
2057
- });
2058
- DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
2059
- function DrawerContent({
2060
- className,
2061
- children,
2062
- ...props
2063
- }) {
2064
- return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
2065
- /* @__PURE__ */ jsx(DrawerOverlay, {}),
2066
- /* @__PURE__ */ jsxs(
2067
- Drawer$1.Content,
2068
- {
2069
- "data-slot": "drawer-content",
2070
- className: cn(
2071
- "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
2072
- "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",
2073
- "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",
2074
- "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",
2075
- "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",
2076
- className
2077
- ),
2078
- ...props,
2079
- children: [
2080
- /* @__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" }),
2081
- children
2082
- ]
2083
- }
2084
- )
2085
- ] });
2086
- }
2087
- function DrawerHeader({ className, ...props }) {
2088
- return /* @__PURE__ */ jsx(
2089
- "div",
2090
- {
2091
- "data-slot": "drawer-header",
2092
- className: cn("flex flex-col gap-1.5 p-4", className),
2093
- ...props
2094
- }
2095
- );
2096
- }
2097
- function DrawerFooter({ className, ...props }) {
2098
- return /* @__PURE__ */ jsx(
2099
- "div",
2100
- {
2101
- "data-slot": "drawer-footer",
2102
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
2103
- ...props
2104
- }
2105
- );
2106
- }
2107
- function DrawerTitle({
2108
- className,
2109
- ...props
2110
- }) {
2111
- return /* @__PURE__ */ jsx(
2112
- Drawer$1.Title,
2113
- {
2114
- "data-slot": "drawer-title",
2115
- className: cn("text-foreground font-semibold", className),
2116
- ...props
2117
- }
2118
- );
2119
- }
2120
- function DrawerDescription({
2121
- className,
2122
- ...props
2123
- }) {
2124
- return /* @__PURE__ */ jsx(
2125
- Drawer$1.Description,
2126
- {
2127
- "data-slot": "drawer-description",
2128
- className: cn("text-muted-foreground text-sm", className),
2129
- ...props
2130
- }
2131
- );
2132
- }
2133
- function DrawerHandle({ className, ...props }) {
2134
- return /* @__PURE__ */ jsx(
2135
- "div",
2136
- {
2137
- "data-slot": "drawer-handle",
2138
- className: cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
2139
- ...props
2140
- }
2141
- );
2142
- }
2143
- function HoverCard({
2144
- ...props
2145
- }) {
2146
- return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
2147
- }
2148
- function HoverCardTrigger({
2149
- ...props
2150
- }) {
2151
- return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
2152
- }
2153
- function HoverCardContent({
2154
- className,
2155
- align = "center",
2156
- sideOffset = 4,
2157
- ...props
2158
- }) {
2159
- return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
2160
- HoverCardPrimitive.Content,
2161
- {
2162
- "data-slot": "hover-card-content",
2163
- align,
2164
- sideOffset,
2165
- className: cn(
2166
- "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",
2167
- className
2168
- ),
2169
- ...props
2170
- }
2171
- ) });
2172
- }
2173
- function ContextMenu({
2174
- ...props
2175
- }) {
2176
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
2177
- }
2178
- function ContextMenuTrigger({
2179
- ...props
2180
- }) {
2181
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
2182
- }
2183
- function ContextMenuGroup({
2184
- ...props
2185
- }) {
2186
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
2187
- }
2188
- function ContextMenuPortal({
2189
- ...props
2190
- }) {
2191
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
2192
- }
2193
- function ContextMenuSub({
2194
- ...props
2195
- }) {
2196
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
2197
- }
2198
- function ContextMenuRadioGroup({
2199
- ...props
2200
- }) {
2201
- return /* @__PURE__ */ jsx(
2202
- ContextMenuPrimitive.RadioGroup,
2203
- {
2204
- "data-slot": "context-menu-radio-group",
2205
- ...props
2206
- }
2207
- );
2208
- }
2209
- function ContextMenuSubTrigger({
2210
- className,
2211
- inset,
2212
- children,
2213
- ...props
2214
- }) {
2215
- return /* @__PURE__ */ jsxs(
2216
- ContextMenuPrimitive.SubTrigger,
2217
- {
2218
- "data-slot": "context-menu-sub-trigger",
2219
- "data-inset": inset,
2220
- className: cn(
2221
- "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",
2222
- className
2223
- ),
2224
- ...props,
2225
- children: [
2226
- children,
2227
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
2228
- ]
2229
- }
2230
- );
2231
- }
2232
- function ContextMenuSubContent({
2233
- className,
2234
- ...props
2235
- }) {
2236
- return /* @__PURE__ */ jsx(
2237
- ContextMenuPrimitive.SubContent,
2238
- {
2239
- "data-slot": "context-menu-sub-content",
2240
- className: cn(
2241
- "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",
2242
- className
2243
- ),
2244
- ...props
2245
- }
2246
- );
2247
- }
2248
- function ContextMenuContent({
2249
- className,
2250
- ...props
2251
- }) {
2252
- return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2253
- ContextMenuPrimitive.Content,
2254
- {
2255
- "data-slot": "context-menu-content",
2256
- className: cn(
2257
- "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",
2258
- className
2259
- ),
2260
- ...props
2261
- }
2262
- ) });
2263
- }
2264
- function ContextMenuItem({
2265
- className,
2266
- inset,
2267
- variant = "default",
2268
- ...props
2269
- }) {
2270
- return /* @__PURE__ */ jsx(
2271
- ContextMenuPrimitive.Item,
2272
- {
2273
- "data-slot": "context-menu-item",
2274
- "data-inset": inset,
2275
- "data-variant": variant,
2276
- className: cn(
2277
- "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",
2278
- className
2279
- ),
2280
- ...props
2281
- }
2282
- );
2283
- }
2284
- function ContextMenuCheckboxItem({
2285
- className,
2286
- children,
2287
- checked,
2288
- ...props
2289
- }) {
2290
- return /* @__PURE__ */ jsxs(
2291
- ContextMenuPrimitive.CheckboxItem,
2292
- {
2293
- "data-slot": "context-menu-checkbox-item",
2294
- className: cn(
2295
- "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",
2296
- className
2297
- ),
2298
- checked,
2299
- ...props,
2300
- children: [
2301
- /* @__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" }) }) }),
2302
- children
2303
- ]
2304
- }
2305
- );
2306
- }
2307
- function ContextMenuRadioItem({
2308
- className,
2309
- children,
2310
- ...props
2311
- }) {
2312
- return /* @__PURE__ */ jsxs(
2313
- ContextMenuPrimitive.RadioItem,
2314
- {
2315
- "data-slot": "context-menu-radio-item",
2316
- className: cn(
2317
- "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",
2318
- className
2319
- ),
2320
- ...props,
2321
- children: [
2322
- /* @__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" }) }) }),
2323
- children
2324
- ]
2325
- }
2326
- );
2327
- }
2328
- function ContextMenuLabel({
2329
- className,
2330
- inset,
2331
- ...props
2332
- }) {
2333
- return /* @__PURE__ */ jsx(
2334
- ContextMenuPrimitive.Label,
2335
- {
2336
- "data-slot": "context-menu-label",
2337
- "data-inset": inset,
2338
- className: cn(
2339
- "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2340
- className
2341
- ),
2342
- ...props
2343
- }
2344
- );
2345
- }
2346
- function ContextMenuSeparator({
2347
- className,
2348
- ...props
2349
- }) {
2350
- return /* @__PURE__ */ jsx(
2351
- ContextMenuPrimitive.Separator,
2352
- {
2353
- "data-slot": "context-menu-separator",
2354
- className: cn("bg-border -mx-1 my-1 h-px", className),
2355
- ...props
2356
- }
2357
- );
2358
- }
2359
- function ContextMenuShortcut({
2360
- className,
2361
- ...props
2362
- }) {
2363
- return /* @__PURE__ */ jsx(
2364
- "span",
2365
- {
2366
- "data-slot": "context-menu-shortcut",
2367
- className: cn(
2368
- "text-muted-foreground ml-auto text-xs tracking-widest",
2369
- className
2370
- ),
2371
- ...props
2372
- }
2373
- );
2374
- }
2375
- function Menubar({
2376
- className,
2377
- ...props
2378
- }) {
2379
- return /* @__PURE__ */ jsx(
2380
- MenubarPrimitive.Root,
2381
- {
2382
- "data-slot": "menubar",
2383
- className: cn(
2384
- "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
2385
- className
2386
- ),
2387
- ...props
2388
- }
2389
- );
2390
- }
2391
- function MenubarMenu({
2392
- ...props
2393
- }) {
2394
- return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
2395
- }
2396
- function MenubarGroup({
2397
- ...props
2398
- }) {
2399
- return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
2400
- }
2401
- function MenubarPortal({
2402
- ...props
2403
- }) {
2404
- return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
2405
- }
2406
- function MenubarRadioGroup({
2407
- ...props
2408
- }) {
2409
- return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
2410
- }
2411
- function MenubarTrigger({
2412
- className,
2413
- ...props
2414
- }) {
2415
- return /* @__PURE__ */ jsx(
2416
- MenubarPrimitive.Trigger,
2417
- {
2418
- "data-slot": "menubar-trigger",
2419
- className: cn(
2420
- "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",
2421
- className
2422
- ),
2423
- ...props
2424
- }
2425
- );
2426
- }
2427
- function MenubarContent({
2428
- className,
2429
- align = "start",
2430
- alignOffset = -4,
2431
- sideOffset = 8,
2432
- ...props
2433
- }) {
2434
- return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
2435
- MenubarPrimitive.Content,
2436
- {
2437
- "data-slot": "menubar-content",
2438
- align,
2439
- alignOffset,
2440
- sideOffset,
2441
- className: cn(
2442
- "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",
2443
- className
2444
- ),
2445
- ...props
2446
- }
2447
- ) });
2448
- }
2449
- function MenubarItem({
2450
- className,
2451
- inset,
2452
- variant = "default",
2453
- ...props
2454
- }) {
2455
- return /* @__PURE__ */ jsx(
2456
- MenubarPrimitive.Item,
2457
- {
2458
- "data-slot": "menubar-item",
2459
- "data-inset": inset,
2460
- "data-variant": variant,
2461
- className: cn(
2462
- "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",
2463
- className
2464
- ),
2465
- ...props
2466
- }
2467
- );
2468
- }
2469
- function MenubarCheckboxItem({
2470
- className,
2471
- children,
2472
- checked,
2473
- ...props
2474
- }) {
2475
- return /* @__PURE__ */ jsxs(
2476
- MenubarPrimitive.CheckboxItem,
2477
- {
2478
- "data-slot": "menubar-checkbox-item",
2479
- className: cn(
2480
- "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",
2481
- className
2482
- ),
2483
- checked,
2484
- ...props,
2485
- children: [
2486
- /* @__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" }) }) }),
2487
- children
2488
- ]
2489
- }
2490
- );
2491
- }
2492
- function MenubarRadioItem({
2493
- className,
2494
- children,
2495
- ...props
2496
- }) {
2497
- return /* @__PURE__ */ jsxs(
2498
- MenubarPrimitive.RadioItem,
2499
- {
2500
- "data-slot": "menubar-radio-item",
2501
- className: cn(
2502
- "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",
2503
- className
2504
- ),
2505
- ...props,
2506
- children: [
2507
- /* @__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" }) }) }),
2508
- children
2509
- ]
2510
- }
2511
- );
2512
- }
2513
- function MenubarLabel({
2514
- className,
2515
- inset,
2516
- ...props
2517
- }) {
2518
- return /* @__PURE__ */ jsx(
2519
- MenubarPrimitive.Label,
2520
- {
2521
- "data-slot": "menubar-label",
2522
- "data-inset": inset,
2523
- className: cn(
2524
- "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2525
- className
2526
- ),
2527
- ...props
2528
- }
2529
- );
2530
- }
2531
- function MenubarSeparator({
2532
- className,
2533
- ...props
2534
- }) {
2535
- return /* @__PURE__ */ jsx(
2536
- MenubarPrimitive.Separator,
2537
- {
2538
- "data-slot": "menubar-separator",
2539
- className: cn("bg-border -mx-1 my-1 h-px", className),
2540
- ...props
2541
- }
2542
- );
2543
- }
2544
- function MenubarShortcut({
2545
- className,
2546
- ...props
2547
- }) {
2548
- return /* @__PURE__ */ jsx(
2549
- "span",
2550
- {
2551
- "data-slot": "menubar-shortcut",
2552
- className: cn(
2553
- "text-muted-foreground ml-auto text-xs tracking-widest",
2554
- className
2555
- ),
2556
- ...props
2557
- }
2558
- );
2559
- }
2560
- function MenubarSub({
2561
- ...props
2562
- }) {
2563
- return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
2564
- }
2565
- function MenubarSubTrigger({
2566
- className,
2567
- inset,
2568
- children,
2569
- ...props
2570
- }) {
2571
- return /* @__PURE__ */ jsxs(
2572
- MenubarPrimitive.SubTrigger,
2573
- {
2574
- "data-slot": "menubar-sub-trigger",
2575
- "data-inset": inset,
2576
- className: cn(
2577
- "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",
2578
- className
2579
- ),
2580
- ...props,
2581
- children: [
2582
- children,
2583
- /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
2584
- ]
2585
- }
2586
- );
2587
- }
2588
- function MenubarSubContent({
2589
- className,
2590
- ...props
2591
- }) {
2592
- return /* @__PURE__ */ jsx(
2593
- MenubarPrimitive.SubContent,
2594
- {
2595
- "data-slot": "menubar-sub-content",
2596
- className: cn(
2597
- "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",
2598
- className
2599
- ),
2600
- ...props
2601
- }
2602
- );
2603
- }
2604
- function Command({
2605
- className,
2606
- ...props
2607
- }) {
2608
- return /* @__PURE__ */ jsx(
2609
- Command$1,
2610
- {
2611
- "data-slot": "command",
2612
- className: cn(
2613
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
2614
- className
2615
- ),
2616
- ...props
2617
- }
2618
- );
2619
- }
2620
- function CommandDialog({
2621
- title = "Command Palette",
2622
- description = "Search for a command to run...",
2623
- children,
2624
- ...props
2625
- }) {
2626
- return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
2627
- /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
2628
- /* @__PURE__ */ jsx(DialogTitle, { children: title }),
2629
- /* @__PURE__ */ jsx(DialogDescription, { children: description })
2630
- ] }),
2631
- /* @__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 }) })
2632
- ] });
2633
- }
2634
- function CommandInput({
2635
- className,
2636
- ...props
2637
- }) {
2638
- return /* @__PURE__ */ jsxs(
2639
- "div",
2640
- {
2641
- "data-slot": "command-input-wrapper",
2642
- className: "flex h-9 items-center gap-2 border-b px-3",
2643
- children: [
2644
- /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
2645
- /* @__PURE__ */ jsx(
2646
- Command$1.Input,
2647
- {
2648
- "data-slot": "command-input",
2649
- className: cn(
2650
- "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",
2651
- className
2652
- ),
2653
- ...props
2654
- }
2655
- )
2656
- ]
2657
- }
2658
- );
2659
- }
2660
- function CommandList({
2661
- className,
2662
- ...props
2663
- }) {
2664
- return /* @__PURE__ */ jsx(
2665
- Command$1.List,
2666
- {
2667
- "data-slot": "command-list",
2668
- role: "listbox",
2669
- className: cn(
2670
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
2671
- className
2672
- ),
2673
- ...props
2674
- }
2675
- );
2676
- }
2677
- function CommandEmpty({
2678
- ...props
2679
- }) {
2680
- return /* @__PURE__ */ jsx(
2681
- Command$1.Empty,
2682
- {
2683
- "data-slot": "command-empty",
2684
- className: "py-6 text-center text-sm",
2685
- ...props
2686
- }
2687
- );
2688
- }
2689
- function CommandGroup({
2690
- className,
2691
- ...props
2692
- }) {
2693
- return /* @__PURE__ */ jsx(
2694
- Command$1.Group,
2695
- {
2696
- "data-slot": "command-group",
2697
- className: cn(
2698
- "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",
2699
- className
2700
- ),
2701
- ...props
2702
- }
2703
- );
2704
- }
2705
- function CommandSeparator({
2706
- className,
2707
- ...props
2708
- }) {
2709
- return /* @__PURE__ */ jsx(
2710
- Command$1.Separator,
2711
- {
2712
- "data-slot": "command-separator",
2713
- className: cn("bg-border -mx-1 h-px", className),
2714
- ...props
2715
- }
2716
- );
2717
- }
2718
- function CommandItem({
2719
- className,
2720
- ...props
2721
- }) {
2722
- return /* @__PURE__ */ jsx(
2723
- Command$1.Item,
2724
- {
2725
- "data-slot": "command-item",
2726
- role: "option",
2727
- className: cn(
2728
- "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",
2729
- className
2730
- ),
2731
- ...props
2732
- }
2733
- );
2734
- }
2735
- function CommandShortcut({
2736
- className,
2737
- ...props
2738
- }) {
2739
- return /* @__PURE__ */ jsx(
2740
- "span",
2741
- {
2742
- "data-slot": "command-shortcut",
2743
- className: cn(
2744
- "text-muted-foreground ml-auto text-xs tracking-widest",
2745
- className
2746
- ),
2747
- ...props
2748
- }
2749
- );
2750
- }
2751
- function Skeleton({ className, ...props }) {
2752
- return /* @__PURE__ */ jsx(
2753
- "div",
2754
- {
2755
- "data-slot": "skeleton",
2756
- className: cn("bg-accent animate-pulse rounded-md", className),
2757
- ...props
2758
- }
2759
- );
2760
- }
2761
- const variantStyles = {
2762
- default: "bg-primary text-primary-foreground",
2763
- secondary: "bg-secondary text-secondary-foreground",
2764
- destructive: "bg-destructive text-destructive-foreground",
2765
- outline: "border-2 border-primary bg-background text-primary",
2766
- success: "bg-success text-success-foreground",
2767
- info: "bg-info text-info-foreground",
2768
- warning: "bg-warning text-warning-foreground"
2769
- };
2770
- const NotificationBadge = React.forwardRef(
2771
- ({
2772
- className,
2773
- count = 0,
2774
- max = 99,
2775
- showZero = false,
2776
- dot = false,
2777
- variant = "destructive",
2778
- children,
2779
- ...props
2780
- }, ref) => {
2781
- const displayCount = count > max ? `${max}+` : count;
2782
- const shouldShow = count > 0 || showZero;
2783
- if (!shouldShow && !dot) {
2784
- return /* @__PURE__ */ jsx("div", { ref, className, ...props, children });
2785
- }
2786
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
2787
- children,
2788
- /* @__PURE__ */ jsx(
2789
- "span",
2790
- {
2791
- className: cn(
2792
- "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
2793
- variantStyles[variant],
2794
- dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
2795
- ),
2796
- children: !dot && shouldShow && /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
2797
- }
2798
- )
2799
- ] });
2800
- }
2801
- );
2802
- NotificationBadge.displayName = "NotificationBadge";
2803
- const Empty = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2804
- "div",
2805
- {
2806
- ref,
2807
- className: cn(
2808
- "flex min-h-[400px] flex-col items-center justify-center rounded-[var(--radius-card)] border border-dashed border-border p-8 text-center animate-in fade-in-50",
2809
- className
2810
- ),
2811
- ...props
2812
- }
2813
- ));
2814
- Empty.displayName = "Empty";
2815
- const EmptyIcon = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2816
- "div",
2817
- {
2818
- ref,
2819
- className: cn(
2820
- "mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-muted",
2821
- className
2822
- ),
2823
- ...props
2824
- }
2825
- ));
2826
- EmptyIcon.displayName = "EmptyIcon";
2827
- const EmptyImage = React.forwardRef(({ className, alt, ...props }, ref) => /* @__PURE__ */ jsx(
2828
- "img",
2829
- {
2830
- ref,
2831
- alt,
2832
- className: cn("mx-auto mb-4 h-48 w-48 object-contain opacity-50", className),
2833
- ...props
2834
- }
2835
- ));
2836
- EmptyImage.displayName = "EmptyImage";
2837
- const EmptyTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2838
- "h3",
2839
- {
2840
- ref,
2841
- className: cn("mt-4 font-semibold text-foreground", className),
2842
- ...props
2843
- }
2844
- ));
2845
- EmptyTitle.displayName = "EmptyTitle";
2846
- const EmptyDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2847
- "p",
2848
- {
2849
- ref,
2850
- className: cn("mt-2 text-sm text-muted-foreground max-w-sm mx-auto", className),
2851
- ...props
2852
- }
2853
- ));
2854
- EmptyDescription.displayName = "EmptyDescription";
2855
- const EmptyAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2856
- "div",
2857
- {
2858
- ref,
2859
- className: cn("mt-6 flex flex-col gap-2 sm:flex-row sm:gap-4", className),
2860
- ...props
2861
- }
2862
- ));
2863
- EmptyAction.displayName = "EmptyAction";
2864
- const StatsCard = React.forwardRef(
2865
- ({ className, title, value, description, trend, icon, ...props }, ref) => {
2866
- const getTrendIcon = () => {
2867
- if (!trend) return null;
2868
- if (trend.value > 0) {
2869
- return /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-success" });
2870
- } else if (trend.value < 0) {
2871
- return /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4 text-destructive" });
2872
- } else {
2873
- return /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4 text-muted-foreground" });
2874
- }
2875
- };
2876
- const getTrendColor = () => {
2877
- if (!trend) return "";
2878
- if (trend.value > 0) {
2879
- return "text-success";
2880
- } else if (trend.value < 0) {
2881
- return "text-destructive";
2882
- } else {
2883
- return "text-muted-foreground";
2884
- }
2885
- };
2886
- 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: [
2887
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
2888
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
2889
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
2890
- /* @__PURE__ */ jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
2891
- trend && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
2892
- getTrendIcon(),
2893
- /* @__PURE__ */ jsxs("span", { children: [
2894
- Math.abs(trend.value),
2895
- "%"
2896
- ] })
2897
- ] })
2898
- ] }),
2899
- (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 })
2900
- ] }),
2901
- icon && /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
2902
- ] }) }) });
2903
- }
2904
- );
2905
- StatsCard.displayName = "StatsCard";
2906
- const Timeline = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2907
- "ol",
2908
- {
2909
- ref,
2910
- className: cn("relative border-l border-border", className),
2911
- ...props
2912
- }
2913
- ));
2914
- Timeline.displayName = "Timeline";
2915
- const TimelineItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2916
- "li",
2917
- {
2918
- ref,
2919
- className: cn("mb-10 ml-6", className),
2920
- ...props
2921
- }
2922
- ));
2923
- TimelineItem.displayName = "TimelineItem";
2924
- const TimelineDot = React.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
2925
- const variantStyles2 = {
2926
- default: "bg-muted border-border",
2927
- primary: "bg-primary border-primary",
2928
- success: "bg-success border-success",
2929
- info: "bg-info border-info",
2930
- warning: "bg-warning border-warning",
2931
- destructive: "bg-destructive border-destructive",
2932
- outline: "bg-background border-border"
2933
- };
2934
- const iconColorStyles = {
2935
- default: "text-muted-foreground",
2936
- primary: "text-primary-foreground",
2937
- success: "text-success-foreground",
2938
- info: "text-info-foreground",
2939
- warning: "text-warning-foreground",
2940
- destructive: "text-destructive-foreground",
2941
- outline: "text-foreground"
2942
- };
2943
- if (icon || children) {
2944
- return /* @__PURE__ */ jsx(
2945
- "div",
2946
- {
2947
- ref,
2948
- className: cn(
2949
- "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
2950
- variantStyles2[variant],
2951
- className
2952
- ),
2953
- ...props,
2954
- children: /* @__PURE__ */ jsx("span", { className: cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
2955
- }
2956
- );
2957
- }
2958
- return /* @__PURE__ */ jsx(
2959
- "div",
2960
- {
2961
- ref,
2962
- className: cn(
2963
- "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
2964
- variantStyles2[variant],
2965
- className
2966
- ),
2967
- ...props
2968
- }
2969
- );
2970
- });
2971
- TimelineDot.displayName = "TimelineDot";
2972
- const TimelineContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2973
- "div",
2974
- {
2975
- ref,
2976
- className: cn("", className),
2977
- ...props
2978
- }
2979
- ));
2980
- TimelineContent.displayName = "TimelineContent";
2981
- const TimelineHeading = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2982
- "h3",
2983
- {
2984
- ref,
2985
- className: cn("mb-1 text-foreground", className),
2986
- ...props
2987
- }
2988
- ));
2989
- TimelineHeading.displayName = "TimelineHeading";
2990
- const TimelineTime = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2991
- "time",
2992
- {
2993
- ref,
2994
- className: cn("mb-2 block text-muted-foreground", className),
2995
- ...props
2996
- }
2997
- ));
2998
- TimelineTime.displayName = "TimelineTime";
2999
- const TimelineDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3000
- "p",
3001
- {
3002
- ref,
3003
- className: cn("text-muted-foreground", className),
3004
- ...props
3005
- }
3006
- ));
3007
- TimelineDescription.displayName = "TimelineDescription";
3008
- const TreeView = React.forwardRef(
3009
- ({ className, data, onNodeClick, onNodeSelect, defaultExpanded = [], selectedNodeId, ...props }, ref) => {
3010
- const [expanded, setExpanded] = React.useState(new Set(defaultExpanded));
3011
- const [internalSelectedId, setInternalSelectedId] = React.useState(void 0);
3012
- const nodeRefs = React.useRef(/* @__PURE__ */ new Map());
3013
- const isControlled = selectedNodeId !== void 0;
3014
- const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
3015
- const toggleExpand = (nodeId) => {
3016
- setExpanded((prev) => {
3017
- const next = new Set(prev);
3018
- next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
3019
- return next;
3020
- });
3021
- };
3022
- const getVisibleNodes = React.useCallback(() => {
3023
- const result = [];
3024
- const traverse = (nodes) => {
3025
- var _a;
3026
- for (const node of nodes) {
3027
- result.push(node);
3028
- if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
3029
- }
3030
- };
3031
- traverse(data);
3032
- return result;
3033
- }, [data, expanded]);
3034
- const findParent = (nodes, targetId) => {
3035
- var _a;
3036
- for (const n of nodes) {
3037
- if ((_a = n.children) == null ? void 0 : _a.some((c) => c.id === targetId)) return n;
3038
- if (n.children) {
3039
- const found = findParent(n.children, targetId);
3040
- if (found) return found;
3041
- }
3042
- }
3043
- return null;
3044
- };
3045
- const handleSelect = (node) => {
3046
- if (!isControlled) setInternalSelectedId(node.id);
3047
- onNodeSelect == null ? void 0 : onNodeSelect(node);
3048
- onNodeClick == null ? void 0 : onNodeClick(node);
3049
- };
3050
- const handleKeyDown = (e, node) => {
3051
- var _a, _b;
3052
- const visibleNodes = getVisibleNodes();
3053
- const idx = visibleNodes.findIndex((n) => n.id === node.id);
3054
- const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
3055
- const isExpanded = expanded.has(node.id);
3056
- const focusNode = (id) => {
3057
- var _a2;
3058
- (_a2 = nodeRefs.current.get(id)) == null ? void 0 : _a2.focus();
3059
- };
3060
- switch (e.key) {
3061
- case "ArrowDown": {
3062
- e.preventDefault();
3063
- const next = visibleNodes[idx + 1];
3064
- if (next) focusNode(next.id);
3065
- break;
3066
- }
3067
- case "ArrowUp": {
3068
- e.preventDefault();
3069
- const prev = visibleNodes[idx - 1];
3070
- if (prev) focusNode(prev.id);
3071
- break;
3072
- }
3073
- case "ArrowRight": {
3074
- e.preventDefault();
3075
- if (hasChildren && !isExpanded) {
3076
- toggleExpand(node.id);
3077
- } else if (hasChildren && isExpanded && ((_b = node.children) == null ? void 0 : _b.length)) {
3078
- focusNode(node.children[0].id);
3079
- }
3080
- break;
3081
- }
3082
- case "ArrowLeft": {
3083
- e.preventDefault();
3084
- if (hasChildren && isExpanded) {
3085
- toggleExpand(node.id);
3086
- } else {
3087
- const parent = findParent(data, node.id);
3088
- if (parent) focusNode(parent.id);
3089
- }
3090
- break;
3091
- }
3092
- case "Home": {
3093
- e.preventDefault();
3094
- if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
3095
- break;
3096
- }
3097
- case "End": {
3098
- e.preventDefault();
3099
- const last = visibleNodes[visibleNodes.length - 1];
3100
- if (last) focusNode(last.id);
3101
- break;
3102
- }
3103
- case "Enter":
3104
- case " ": {
3105
- e.preventDefault();
3106
- if (hasChildren) toggleExpand(node.id);
3107
- handleSelect(node);
3108
- break;
3109
- }
3110
- }
3111
- };
3112
- return /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), role: "tree", ...props, children: data.map((node) => /* @__PURE__ */ jsx(
3113
- TreeNodeComponent,
3114
- {
3115
- node,
3116
- level: 0,
3117
- expanded,
3118
- selectedId: effectiveSelectedId,
3119
- onToggle: toggleExpand,
3120
- onSelect: handleSelect,
3121
- onKeyDown: handleKeyDown,
3122
- nodeRefs
3123
- },
3124
- node.id
3125
- )) });
3126
- }
3127
- );
3128
- TreeView.displayName = "TreeView";
3129
- const TreeNodeComponent = ({
3130
- node,
3131
- level,
3132
- expanded,
3133
- selectedId,
3134
- onToggle,
3135
- onSelect,
3136
- onKeyDown,
3137
- nodeRefs
3138
- }) => {
3139
- var _a;
3140
- const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
3141
- const isExpanded = expanded.has(node.id);
3142
- const isSelected = node.id === selectedId;
3143
- const handleClick = () => {
3144
- if (hasChildren) onToggle(node.id);
3145
- onSelect(node);
3146
- };
3147
- const setRef = (el) => {
3148
- if (el) nodeRefs.current.set(node.id, el);
3149
- else nodeRefs.current.delete(node.id);
3150
- };
3151
- return /* @__PURE__ */ jsxs("div", { role: "none", children: [
3152
- /* @__PURE__ */ jsxs(
3153
- "button",
3154
- {
3155
- ref: setRef,
3156
- role: "treeitem",
3157
- "aria-expanded": hasChildren ? isExpanded : void 0,
3158
- "aria-selected": isSelected,
3159
- tabIndex: isSelected ? 0 : -1,
3160
- onClick: handleClick,
3161
- onKeyDown: (e) => onKeyDown(e, node),
3162
- className: cn(
3163
- "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
3164
- "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3165
- isSelected && "bg-primary/10 text-primary font-medium"
3166
- ),
3167
- style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
3168
- children: [
3169
- 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" }),
3170
- node.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
3171
- /* @__PURE__ */ jsx("span", { className: "flex-1 text-foreground", children: node.label })
3172
- ]
3173
- }
3174
- ),
3175
- hasChildren && isExpanded && /* @__PURE__ */ jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsx(
3176
- TreeNodeComponent,
3177
- {
3178
- node: child,
3179
- level: level + 1,
3180
- expanded,
3181
- selectedId,
3182
- onToggle,
3183
- onSelect,
3184
- onKeyDown,
3185
- nodeRefs
3186
- },
3187
- child.id
3188
- )) })
3189
- ] });
3190
- };
3191
- function Collapsible({
3192
- ...props
3193
- }) {
3194
- return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
3195
- }
3196
- function CollapsibleTrigger({
3197
- ...props
3198
- }) {
3199
- return /* @__PURE__ */ jsx(
3200
- CollapsiblePrimitive.CollapsibleTrigger,
3201
- {
3202
- "data-slot": "collapsible-trigger",
3203
- ...props
3204
- }
3205
- );
3206
- }
3207
- function CollapsibleContent({
3208
- ...props
3209
- }) {
3210
- return /* @__PURE__ */ jsx(
3211
- CollapsiblePrimitive.CollapsibleContent,
3212
- {
3213
- "data-slot": "collapsible-content",
3214
- ...props
3215
- }
3216
- );
3217
- }
3218
- function Accordion({
3219
- ...props
3220
- }) {
3221
- return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
3222
- }
3223
- function AccordionItem({
3224
- className,
3225
- ...props
3226
- }) {
3227
- return /* @__PURE__ */ jsx(
3228
- AccordionPrimitive.Item,
3229
- {
3230
- "data-slot": "accordion-item",
3231
- className: cn("border-b last:border-b-0", className),
3232
- ...props
3233
- }
3234
- );
3235
- }
3236
- function AccordionTrigger({
3237
- className,
3238
- children,
3239
- ...props
3240
- }) {
3241
- return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
3242
- AccordionPrimitive.Trigger,
3243
- {
3244
- "data-slot": "accordion-trigger",
3245
- className: cn(
3246
- "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",
3247
- className
3248
- ),
3249
- ...props,
3250
- children: [
3251
- children,
3252
- /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
3253
- ]
3254
- }
3255
- ) });
3256
- }
3257
- function AccordionContent({
3258
- className,
3259
- children,
3260
- ...props
3261
- }) {
3262
- return /* @__PURE__ */ jsx(
3263
- AccordionPrimitive.Content,
3264
- {
3265
- "data-slot": "accordion-content",
3266
- className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
3267
- ...props,
3268
- children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
3269
- }
3270
- );
3271
- }
3272
- const CarouselContext = React.createContext(null);
3273
- function useCarousel() {
3274
- const context = React.useContext(CarouselContext);
3275
- if (!context) {
3276
- throw new Error("useCarousel must be used within a <Carousel />");
3277
- }
3278
- return context;
3279
- }
3280
- function Carousel({
3281
- orientation = "horizontal",
3282
- opts,
3283
- setApi,
3284
- plugins,
3285
- className,
3286
- children,
3287
- ...props
3288
- }) {
3289
- const [carouselRef, api] = useEmblaCarousel(
3290
- {
3291
- ...opts,
3292
- axis: orientation === "horizontal" ? "x" : "y"
3293
- },
3294
- plugins
3295
- );
3296
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
3297
- const [canScrollNext, setCanScrollNext] = React.useState(false);
3298
- const onSelect = React.useCallback((api2) => {
3299
- if (!api2) return;
3300
- setCanScrollPrev(api2.canScrollPrev());
3301
- setCanScrollNext(api2.canScrollNext());
3302
- }, []);
3303
- const scrollPrev = React.useCallback(() => {
3304
- api == null ? void 0 : api.scrollPrev();
3305
- }, [api]);
3306
- const scrollNext = React.useCallback(() => {
3307
- api == null ? void 0 : api.scrollNext();
3308
- }, [api]);
3309
- const handleKeyDown = React.useCallback(
3310
- (event) => {
3311
- if (event.key === "ArrowLeft") {
3312
- event.preventDefault();
3313
- scrollPrev();
3314
- } else if (event.key === "ArrowRight") {
3315
- event.preventDefault();
3316
- scrollNext();
3317
- }
3318
- },
3319
- [scrollPrev, scrollNext]
3320
- );
3321
- React.useEffect(() => {
3322
- if (!api || !setApi) return;
3323
- setApi(api);
3324
- }, [api, setApi]);
3325
- React.useEffect(() => {
3326
- if (!api) return;
3327
- onSelect(api);
3328
- api.on("reInit", onSelect);
3329
- api.on("select", onSelect);
3330
- return () => {
3331
- api == null ? void 0 : api.off("select", onSelect);
3332
- };
3333
- }, [api, onSelect]);
3334
- return /* @__PURE__ */ jsx(
3335
- CarouselContext.Provider,
3336
- {
3337
- value: {
3338
- carouselRef,
3339
- api,
3340
- opts,
3341
- orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
3342
- scrollPrev,
3343
- scrollNext,
3344
- canScrollPrev,
3345
- canScrollNext
3346
- },
3347
- children: /* @__PURE__ */ jsx(
3348
- "div",
3349
- {
3350
- onKeyDownCapture: handleKeyDown,
3351
- className: cn("relative", className),
3352
- role: "region",
3353
- "aria-roledescription": "carousel",
3354
- "data-slot": "carousel",
3355
- ...props,
3356
- children
3357
- }
3358
- )
3359
- }
3360
- );
3361
- }
3362
- function CarouselContent({ className, ...props }) {
3363
- const { carouselRef, orientation } = useCarousel();
3364
- return /* @__PURE__ */ jsx(
3365
- "div",
3366
- {
3367
- ref: carouselRef,
3368
- className: "overflow-hidden",
3369
- "data-slot": "carousel-content",
3370
- children: /* @__PURE__ */ jsx(
3371
- "div",
3372
- {
3373
- className: cn(
3374
- "flex",
3375
- orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
3376
- className
3377
- ),
3378
- ...props
3379
- }
3380
- )
3381
- }
3382
- );
3383
- }
3384
- function CarouselItem({ className, ...props }) {
3385
- const { orientation } = useCarousel();
3386
- return /* @__PURE__ */ jsx(
3387
- "div",
3388
- {
3389
- role: "group",
3390
- "aria-roledescription": "slide",
3391
- "data-slot": "carousel-item",
3392
- className: cn(
3393
- "min-w-0 shrink-0 grow-0 basis-full",
3394
- orientation === "horizontal" ? "pl-4" : "pt-4",
3395
- className
3396
- ),
3397
- ...props
3398
- }
3399
- );
3400
- }
3401
- function CarouselPrevious({
3402
- className,
3403
- variant = "outline",
3404
- size = "icon",
3405
- ...props
3406
- }) {
3407
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
3408
- return /* @__PURE__ */ jsxs(
3409
- Button,
3410
- {
3411
- "data-slot": "carousel-previous",
3412
- variant,
3413
- size,
3414
- className: cn(
3415
- "absolute size-8 rounded-full",
3416
- orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
3417
- className
3418
- ),
3419
- disabled: !canScrollPrev,
3420
- onClick: scrollPrev,
3421
- ...props,
3422
- children: [
3423
- /* @__PURE__ */ jsx(ArrowLeft, {}),
3424
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
3425
- ]
3426
- }
3427
- );
3428
- }
3429
- function CarouselNext({
3430
- className,
3431
- variant = "outline",
3432
- size = "icon",
3433
- ...props
3434
- }) {
3435
- const { orientation, scrollNext, canScrollNext } = useCarousel();
3436
- return /* @__PURE__ */ jsxs(
3437
- Button,
3438
- {
3439
- "data-slot": "carousel-next",
3440
- variant,
3441
- size,
3442
- className: cn(
3443
- "absolute size-8 rounded-full",
3444
- orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
3445
- className
3446
- ),
3447
- disabled: !canScrollNext,
3448
- onClick: scrollNext,
3449
- ...props,
3450
- children: [
3451
- /* @__PURE__ */ jsx(ArrowRight, {}),
3452
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
3453
- ]
3454
- }
3455
- );
3456
- }
3457
- const StepperContext = React.createContext(void 0);
3458
- const useStepper = () => {
3459
- const context = React.useContext(StepperContext);
3460
- if (!context) throw new Error("useStepper must be used within a Stepper");
3461
- return context;
3462
- };
3463
- const Stepper = React.forwardRef(
3464
- ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
3465
- const totalSteps = React.Children.count(children);
3466
- return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsx(
3467
- "div",
3468
- {
3469
- ref,
3470
- className: cn("w-full", className),
3471
- ...props,
3472
- children: /* @__PURE__ */ jsx("div", { className: cn(
3473
- orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
3474
- ), children })
3475
- }
3476
- ) });
3477
- }
3478
- );
3479
- Stepper.displayName = "Stepper";
3480
- const Step = React.forwardRef(
3481
- ({ step, label, description, error = false, className, ...props }, ref) => {
3482
- const { currentStep, totalSteps, orientation } = useStepper();
3483
- const isActive = step === currentStep;
3484
- const isCompleted = step < currentStep && !error;
3485
- const isFirst = step === 1;
3486
- const isLast = step === totalSteps;
3487
- const circleClasses = cn(
3488
- "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
3489
- isActive && !error && "border-primary bg-primary text-primary-foreground",
3490
- isCompleted && "border-primary bg-primary text-primary-foreground",
3491
- error && "border-destructive bg-destructive text-destructive-foreground",
3492
- !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
3493
- );
3494
- const connectorClasses = (filled) => cn("transition-colors", filled ? "bg-primary" : "bg-muted");
3495
- if (orientation === "vertical") {
3496
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex gap-4", className), ...props, children: [
3497
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
3498
- /* @__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 }) }),
3499
- !isLast && /* @__PURE__ */ jsx("div", { className: cn("w-0.5 flex-1 min-h-[2rem] mt-1", connectorClasses(step < currentStep)) })
3500
- ] }),
3501
- /* @__PURE__ */ jsxs("div", { className: cn("pb-6", isLast && "pb-0"), children: [
3502
- /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3503
- description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3504
- ] })
3505
- ] });
3506
- }
3507
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-1 flex-col items-center", className), ...props, children: [
3508
- /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start", children: [
3509
- step > 1 && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
3510
- /* @__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 }) }),
3511
- step < totalSteps && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
3512
- ] }),
3513
- /* @__PURE__ */ jsxs("div", { className: cn(
3514
- "mt-2 px-1",
3515
- isFirst && "text-left self-start",
3516
- isLast && "text-right self-end",
3517
- !isFirst && !isLast && "text-center w-full"
3518
- ), children: [
3519
- /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3520
- description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3521
- ] })
3522
- ] });
3523
- }
3524
- );
3525
- Step.displayName = "Step";
3526
- const FileUpload = React.forwardRef(
3527
- ({
3528
- className,
3529
- onFilesChange,
3530
- maxFiles = 1,
3531
- maxSize = 5 * 1024 * 1024,
3532
- // 5MB default
3533
- showPreview = true,
3534
- onError,
3535
- accept,
3536
- disabled,
3537
- ...props
3538
- }, ref) => {
3539
- const [files, setFiles] = React.useState([]);
3540
- const [dragActive, setDragActive] = React.useState(false);
3541
- const [errorMessage, setErrorMessage] = React.useState(null);
3542
- const inputRef = React.useRef(null);
3543
- const handleFiles = (newFiles) => {
3544
- if (!newFiles) return;
3545
- setErrorMessage(null);
3546
- const filesArray = Array.from(newFiles);
3547
- const oversized = filesArray.filter((f) => f.size > maxSize);
3548
- const validFiles = filesArray.filter((f) => f.size <= maxSize);
3549
- if (oversized.length > 0) {
3550
- const limitMB = (maxSize / 1024 / 1024).toFixed(0);
3551
- setErrorMessage(`${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`);
3552
- onError == null ? void 0 : onError(oversized, "size");
3553
- }
3554
- const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
3555
- const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
3556
- if (countRejected.length > 0) {
3557
- setErrorMessage(`Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`);
3558
- onError == null ? void 0 : onError(countRejected, "count");
3559
- }
3560
- setFiles(merged);
3561
- onFilesChange == null ? void 0 : onFilesChange(merged);
3562
- };
3563
- const handleDrag = (e) => {
3564
- e.preventDefault();
3565
- e.stopPropagation();
3566
- if (e.type === "dragenter" || e.type === "dragover") {
3567
- setDragActive(true);
3568
- } else if (e.type === "dragleave") {
3569
- setDragActive(false);
3570
- }
3571
- };
3572
- const handleDrop = (e) => {
3573
- e.preventDefault();
3574
- e.stopPropagation();
3575
- setDragActive(false);
3576
- if (disabled) return;
3577
- handleFiles(e.dataTransfer.files);
3578
- };
3579
- const handleChange = (e) => {
3580
- e.preventDefault();
3581
- if (disabled) return;
3582
- handleFiles(e.target.files);
3583
- };
3584
- const removeFile = (index) => {
3585
- const updatedFiles = files.filter((_, i) => i !== index);
3586
- setFiles(updatedFiles);
3587
- onFilesChange == null ? void 0 : onFilesChange(updatedFiles);
3588
- if (updatedFiles.length === 0) setErrorMessage(null);
3589
- };
3590
- const openFileDialog = () => {
3591
- var _a;
3592
- if (!disabled) {
3593
- setErrorMessage(null);
3594
- (_a = inputRef.current) == null ? void 0 : _a.click();
3595
- }
3596
- };
3597
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
3598
- /* @__PURE__ */ jsxs(
3599
- "div",
3600
- {
3601
- onDragEnter: handleDrag,
3602
- onDragLeave: handleDrag,
3603
- onDragOver: handleDrag,
3604
- onDrop: handleDrop,
3605
- onClick: openFileDialog,
3606
- className: cn(
3607
- "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",
3608
- dragActive && "border-primary bg-primary/5",
3609
- errorMessage && "border-destructive/50",
3610
- disabled && "cursor-not-allowed opacity-50"
3611
- ),
3612
- children: [
3613
- /* @__PURE__ */ jsx(Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
3614
- /* @__PURE__ */ jsxs("p", { className: "mb-2 text-foreground", children: [
3615
- /* @__PURE__ */ jsx("span", { className: "text-primary", children: "Click to upload" }),
3616
- " or drag and drop"
3617
- ] }),
3618
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3619
- maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file",
3620
- " • Max ",
3621
- (maxSize / 1024 / 1024).toFixed(0),
3622
- "MB"
3623
- ] }),
3624
- /* @__PURE__ */ jsx(
3625
- "input",
3626
- {
3627
- ...props,
3628
- ref: inputRef,
3629
- type: "file",
3630
- className: "hidden",
3631
- onChange: handleChange,
3632
- multiple: maxFiles > 1,
3633
- accept,
3634
- disabled
3635
- }
3636
- )
3637
- ]
3638
- }
3639
- ),
3640
- 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: [
3641
- /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0" }),
3642
- /* @__PURE__ */ jsx("span", { children: errorMessage })
3643
- ] }),
3644
- showPreview && files.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxs(
3645
- "div",
3646
- {
3647
- className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
3648
- children: [
3649
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
3650
- /* @__PURE__ */ jsx(FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
3651
- /* @__PURE__ */ jsxs("div", { children: [
3652
- /* @__PURE__ */ jsx("p", { className: "text-foreground", children: file.name }),
3653
- /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3654
- (file.size / 1024).toFixed(2),
3655
- " KB"
3656
- ] })
3657
- ] })
3658
- ] }),
3659
- /* @__PURE__ */ jsx(
3660
- Button,
3661
- {
3662
- type: "button",
3663
- variant: "ghost",
3664
- size: "sm",
3665
- onClick: (e) => {
3666
- e.stopPropagation();
3667
- removeFile(index);
3668
- },
3669
- disabled,
3670
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
3671
- }
3672
- )
3673
- ]
3674
- },
3675
- index
3676
- )) })
3677
- ] });
3678
- }
3679
- );
3680
- FileUpload.displayName = "FileUpload";
3681
- const Rating = React.forwardRef(
3682
- ({
3683
- className,
3684
- value = 0,
3685
- onChange,
3686
- max = 5,
3687
- readonly = false,
3688
- disabled = false,
3689
- size = "md",
3690
- showValue = false,
3691
- allowHalf = false,
3692
- getAriaLabel,
3693
- ...props
3694
- }, ref) => {
3695
- const [hoverValue, setHoverValue] = React.useState(null);
3696
- const isInteractive = !readonly && !disabled;
3697
- const sizeStyles = {
3698
- sm: "h-4 w-4",
3699
- md: "h-5 w-5",
3700
- lg: "h-6 w-6"
3701
- };
3702
- const handleClick = (rating) => {
3703
- if (isInteractive) onChange == null ? void 0 : onChange(rating);
3704
- };
3705
- const handleMouseMove = (e, rating) => {
3706
- if (!isInteractive) return;
3707
- if (allowHalf) {
3708
- const rect = e.currentTarget.getBoundingClientRect();
3709
- setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
3710
- } else {
3711
- setHoverValue(rating);
3712
- }
3713
- };
3714
- const handleMouseLeave = () => {
3715
- if (isInteractive) setHoverValue(null);
3716
- };
3717
- const handleClickWithHalf = (e, rating) => {
3718
- if (!isInteractive) return;
3719
- if (allowHalf) {
3720
- const rect = e.currentTarget.getBoundingClientRect();
3721
- const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
3722
- onChange == null ? void 0 : onChange(half);
3723
- } else {
3724
- handleClick(rating);
3725
- }
3726
- };
3727
- const displayValue = hoverValue ?? value;
3728
- return /* @__PURE__ */ jsxs(
3729
- "div",
3730
- {
3731
- ref,
3732
- className: cn("flex items-center gap-1", disabled && "opacity-50", className),
3733
- ...props,
3734
- children: [
3735
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
3736
- const rating = index + 1;
3737
- const isFull = rating <= displayValue;
3738
- const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
3739
- return /* @__PURE__ */ jsxs(
3740
- "button",
3741
- {
3742
- type: "button",
3743
- onClick: (e) => handleClickWithHalf(e, rating),
3744
- onMouseMove: (e) => handleMouseMove(e, rating),
3745
- onMouseLeave: handleMouseLeave,
3746
- disabled: readonly || disabled,
3747
- "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
3748
- className: cn(
3749
- "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3750
- isInteractive && "cursor-pointer hover:scale-110",
3751
- !isInteractive && "cursor-default"
3752
- ),
3753
- children: [
3754
- /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-none text-muted-foreground") }),
3755
- (isFull || isHalf) && /* @__PURE__ */ jsx(
3756
- "span",
3757
- {
3758
- className: cn(
3759
- "absolute inset-0 overflow-hidden",
3760
- isHalf ? "w-1/2" : "w-full"
3761
- ),
3762
- children: /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-warning text-warning") })
3763
- }
3764
- )
3765
- ]
3766
- },
3767
- index
3768
- );
3769
- }) }),
3770
- showValue && /* @__PURE__ */ jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
3771
- ]
3772
- }
3773
- );
3774
- }
3775
- );
3776
- Rating.displayName = "Rating";
3777
- const Search = React.forwardRef(
3778
- ({
3779
- className,
3780
- containerClassName,
3781
- onSearch,
3782
- onClear,
3783
- onChange,
3784
- size = "md",
3785
- searchLabel = "Search",
3786
- clearLabel = "Clear search",
3787
- value: controlledValue,
3788
- defaultValue,
3789
- ...props
3790
- }, ref) => {
3791
- const isControlled = controlledValue !== void 0;
3792
- const [internalValue, setInternalValue] = React.useState(
3793
- isControlled ? "" : defaultValue ?? ""
3794
- );
3795
- const displayValue = isControlled ? controlledValue : internalValue;
3796
- const sizeClasses = {
3797
- sm: "h-8 px-8 py-1 text-sm",
3798
- md: "h-10 px-10 py-2 text-base",
3799
- lg: "h-12 px-12 py-3 text-base"
3800
- };
3801
- const iconSizeClasses = {
3802
- sm: "left-2 h-3.5 w-3.5",
3803
- md: "left-3 h-4 w-4",
3804
- lg: "left-4 h-5 w-5"
3805
- };
3806
- const clearSizeClasses = {
3807
- sm: "right-2",
3808
- md: "right-3",
3809
- lg: "right-4"
3810
- };
3811
- const handleChange = (e) => {
3812
- const newValue = e.target.value;
3813
- if (!isControlled) setInternalValue(newValue);
3814
- onChange == null ? void 0 : onChange(e);
3815
- onSearch == null ? void 0 : onSearch(newValue);
3816
- };
3817
- const handleClear = () => {
3818
- if (!isControlled) setInternalValue("");
3819
- onClear == null ? void 0 : onClear();
3820
- onSearch == null ? void 0 : onSearch("");
3821
- };
3822
- const handleKeyDown = (e) => {
3823
- var _a;
3824
- if (e.key === "Escape") {
3825
- handleClear();
3826
- }
3827
- (_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
3828
- };
3829
- return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", containerClassName), children: [
3830
- /* @__PURE__ */ jsx(
3831
- Search$1,
3832
- {
3833
- "aria-hidden": "true",
3834
- className: cn("absolute top-1/2 -translate-y-1/2 text-muted-foreground", iconSizeClasses[size])
3835
- }
3836
- ),
3837
- /* @__PURE__ */ jsx(
3838
- "input",
3839
- {
3840
- ref,
3841
- type: "text",
3842
- value: displayValue,
3843
- onChange: handleChange,
3844
- onKeyDown: handleKeyDown,
3845
- className: cn(
3846
- "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
3847
- "placeholder:text-muted-foreground",
3848
- "focus:ring-2 focus:ring-primary focus:border-transparent",
3849
- "disabled:cursor-not-allowed disabled:opacity-50",
3850
- sizeClasses[size],
3851
- className
3852
- ),
3853
- "aria-label": props.placeholder || searchLabel,
3854
- ...props
3855
- }
3856
- ),
3857
- displayValue && /* @__PURE__ */ jsx(
3858
- "button",
3859
- {
3860
- type: "button",
3861
- onClick: handleClear,
3862
- "aria-label": clearLabel,
3863
- className: cn(
3864
- "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
3865
- clearSizeClasses[size]
3866
- ),
3867
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
3868
- }
3869
- )
3870
- ] });
3871
- }
3872
- );
3873
- Search.displayName = "Search";
3874
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
3875
- const RouteMapContent = React__default.forwardRef(
3876
- ({ apiKey, ...props }, ref) => {
3877
- const { isLoaded, loadError, load } = useGoogleMapsLoader();
3878
- const {
3879
- origin,
3880
- destination,
3881
- waypoints = [],
3882
- travelMode = "DRIVING",
3883
- height = "450px",
3884
- mapContainerClassName,
3885
- disableDefaultUI = false,
3886
- zoomControl = true,
3887
- streetViewControl = false,
3888
- mapTypeControl = false,
3889
- fullscreenControl = true,
3890
- onRouteCalculated,
3891
- className,
3892
- ...divProps
3893
- } = props;
3894
- const mapRef = useRef(null);
3895
- const gmpMapRef = useRef(null);
3896
- const directionsRendererRef = useRef(null);
3897
- useRef(false);
3898
- const isCalculatingRef = useRef(false);
3899
- useEffect(() => {
3900
- if (!isLoaded && apiKey && !loadError && load) {
3901
- load(apiKey).catch(console.error);
3902
- }
3903
- }, [isLoaded, apiKey, loadError, load]);
3904
- useEffect(() => {
3905
- if (!isLoaded || !gmpMapRef.current) return;
3906
- const setupMap = (map) => {
3907
- mapRef.current = map;
3908
- const computedStyle = getComputedStyle(document.documentElement);
3909
- const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
3910
- if (!directionsRendererRef.current) {
3911
- directionsRendererRef.current = new google.maps.DirectionsRenderer({
3912
- map,
3913
- suppressMarkers: false,
3914
- polylineOptions: {
3915
- strokeColor: primaryColor,
3916
- strokeWeight: 5,
3917
- strokeOpacity: 0.8
3918
- }
3919
- });
3920
- } else {
3921
- directionsRendererRef.current.setMap(map);
3922
- }
3923
- };
3924
- const gmpMap = gmpMapRef.current;
3925
- if (gmpMap.innerMap) {
3926
- setupMap(gmpMap.innerMap);
3927
- } else {
3928
- const interval = setInterval(() => {
3929
- if (gmpMap.innerMap) {
3930
- setupMap(gmpMap.innerMap);
3931
- clearInterval(interval);
3932
- }
3933
- }, 100);
3934
- return () => clearInterval(interval);
3935
- }
3936
- return () => {
3937
- if (directionsRendererRef.current) {
3938
- directionsRendererRef.current.setMap(null);
3939
- }
3940
- mapRef.current = null;
3941
- };
3942
- }, [isLoaded]);
3943
- useEffect(() => {
3944
- if (gmpMapRef.current && origin) {
3945
- gmpMapRef.current.center = origin;
3946
- }
3947
- }, [origin.lat, origin.lng]);
3948
- useEffect(() => {
3949
- if (gmpMapRef.current) {
3950
- gmpMapRef.current.zoom = 13;
3951
- }
3952
- }, []);
3953
- useEffect(() => {
3954
- const map = mapRef.current;
3955
- const renderer = directionsRendererRef.current;
3956
- if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
3957
- if (!origin || !destination) return;
3958
- isCalculatingRef.current = true;
3959
- const directionsService = new google.maps.DirectionsService();
3960
- const request = {
3961
- origin,
3962
- destination,
3963
- waypoints: waypoints.map((wp) => ({
3964
- location: wp,
3965
- stopover: true
3966
- })),
3967
- travelMode: google.maps.TravelMode[travelMode]
3968
- };
3969
- directionsService.route(request, (result, status) => {
3970
- var _a;
3971
- isCalculatingRef.current = false;
3972
- if (status === "OK" && result) {
3973
- renderer.setDirections(result);
3974
- const route = result.routes[0];
3975
- if (((_a = route == null ? void 0 : route.legs) == null ? void 0 : _a.length) > 0 && onRouteCalculated) {
3976
- let totalDistance = 0;
3977
- let totalDuration = 0;
3978
- route.legs.forEach((leg) => {
3979
- if (leg.distance) totalDistance += leg.distance.value;
3980
- if (leg.duration) totalDuration += leg.duration.value;
3981
- });
3982
- const distanceKm = (totalDistance / 1e3).toFixed(1);
3983
- const distanceText = `${distanceKm} km`;
3984
- const hours = Math.floor(totalDuration / 3600);
3985
- const minutes = Math.floor(totalDuration % 3600 / 60);
3986
- const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
3987
- onRouteCalculated(distanceText, durationText);
3988
- }
3989
- }
3990
- });
3991
- }, [isLoaded, origin.lat, origin.lng, destination.lat, destination.lng, travelMode, mapRef.current]);
3992
- if (loadError) {
3993
- return /* @__PURE__ */ jsx(
3994
- "div",
3995
- {
3996
- ref,
3997
- className: cn(
3998
- "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
3999
- className
4000
- ),
4001
- style: { height },
4002
- ...divProps,
4003
- 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: [
4004
- /* @__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" }) }) }),
4005
- /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: "Failed to load Google Maps" }),
4006
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
4007
- ] }) })
4008
- }
4009
- );
4010
- }
4011
- if (!isLoaded) {
4012
- return /* @__PURE__ */ jsx(
4013
- "div",
4014
- {
4015
- ref,
4016
- className: cn(
4017
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
4018
- className
4019
- ),
4020
- style: { height },
4021
- ...divProps
4022
- }
4023
- );
4024
- }
4025
- return /* @__PURE__ */ jsx(
4026
- "div",
4027
- {
4028
- ref,
4029
- className: cn(
4030
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
4031
- className
4032
- ),
4033
- style: { height },
4034
- ...divProps,
4035
- children: /* @__PURE__ */ jsx(
4036
- "gmp-map",
4037
- {
4038
- ref: gmpMapRef,
4039
- style: { height: "100%", width: "100%", display: "block" },
4040
- "map-id": props.mapId || "xertica-route-map"
4041
- }
4042
- )
4043
- }
4044
- );
4045
- }
4046
- );
4047
- RouteMapContent.displayName = "RouteMapContent";
4048
- const RouteMap = React__default.forwardRef(
4049
- (props, ref) => {
4050
- const { isLoaded, loadError } = useGoogleMapsLoader();
4051
- const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
4052
- const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
4053
- if (isLoaded || isValidKey || loadError) {
4054
- return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
4055
- }
4056
- const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
4057
- if (isScriptInjected) {
4058
- return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
4059
- }
4060
- const {
4061
- origin,
4062
- destination,
4063
- waypoints,
4064
- travelMode,
4065
- height,
4066
- apiKey,
4067
- mapContainerClassName,
4068
- disableDefaultUI,
4069
- zoomControl,
4070
- streetViewControl,
4071
- mapTypeControl,
4072
- fullscreenControl,
4073
- onRouteCalculated,
4074
- ...divProps
4075
- } = props;
4076
- return /* @__PURE__ */ jsx(
4077
- "div",
4078
- {
4079
- ref,
4080
- className: cn(
4081
- "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
4082
- props.className
4083
- ),
4084
- style: { height: props.height || "450px" },
4085
- ...divProps,
4086
- 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: [
4087
- /* @__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: [
4088
- /* @__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" }),
4089
- /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
4090
- ] }) }),
4091
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
4092
- ] }) })
4093
- }
4094
- );
4095
- }
4096
- );
4097
- RouteMap.displayName = "RouteMap";
4098
- const SimpleMap = React__default.forwardRef(
4099
- ({
4100
- center,
4101
- address,
4102
- markerTitle,
4103
- markerInfo,
4104
- showMarker = true,
4105
- zoom = 15,
4106
- height = "350px",
4107
- ...props
4108
- }, ref) => {
4109
- const markers = showMarker && center ? [
4110
- {
4111
- position: center,
4112
- title: markerTitle || address || "Location",
4113
- info: markerInfo || address
4114
- }
4115
- ] : [];
4116
- return /* @__PURE__ */ jsx(
4117
- Map$1,
4118
- {
4119
- ref,
4120
- center,
4121
- zoom,
4122
- height,
4123
- markers,
4124
- ...props
4125
- }
4126
- );
4127
- }
4128
- );
4129
- SimpleMap.displayName = "SimpleMap";
4130
- function AssistantChart({
4131
- data,
4132
- config,
4133
- categoryKey = "month",
4134
- bars,
4135
- xAxisFormatter,
4136
- className
4137
- }) {
4138
- const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
4139
- const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
4140
- return /* @__PURE__ */ jsx(ChartContainer, { config, className: cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxs(BarChart, { accessibilityLayer: true, data, children: [
4141
- /* @__PURE__ */ jsx(CartesianGrid, { vertical: false }),
4142
- /* @__PURE__ */ jsx(
4143
- XAxis,
4144
- {
4145
- dataKey: categoryKey,
4146
- tickLine: false,
4147
- tickMargin: 10,
4148
- axisLine: false,
4149
- tickFormatter: formatTick
4150
- }
4151
- ),
4152
- /* @__PURE__ */ jsx(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "dashed" }) }),
4153
- resolvedBars.map((bar) => /* @__PURE__ */ jsx(
4154
- Bar,
4155
- {
4156
- dataKey: bar.dataKey,
4157
- fill: bar.fill ?? `var(--color-${bar.dataKey})`,
4158
- radius: bar.radius ?? 4
4159
- },
4160
- bar.dataKey
4161
- ))
4162
- ] }) });
4163
- }
4164
- const MOBILE_BREAKPOINT = 768;
4165
- function useIsMobile() {
4166
- const [isMobile, setIsMobile] = React.useState(
4167
- void 0
4168
- );
4169
- React.useEffect(() => {
4170
- var _a;
4171
- if (typeof window === "undefined") {
4172
- setIsMobile(false);
4173
- return;
4174
- }
4175
- const mql = (_a = window.matchMedia) == null ? void 0 : _a.call(window, `(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
4176
- const onChange = () => {
4177
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4178
- };
4179
- if (mql) {
4180
- mql.addEventListener("change", onChange);
4181
- }
4182
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4183
- return () => {
4184
- if (mql) {
4185
- mql.removeEventListener("change", onChange);
4186
- }
4187
- };
4188
- }, []);
4189
- return !!isMobile;
4190
- }
4191
- const useMobile = useIsMobile;
4192
- export {
4193
- ContextMenuSubTrigger as $,
4194
- Accordion as A,
4195
- Badge as B,
4196
- Calendar as C,
4197
- CollapsibleContent as D,
4198
- CollapsibleTrigger as E,
4199
- Command as F,
4200
- CommandDialog as G,
4201
- CommandEmpty as H,
4202
- CommandGroup as I,
4203
- CommandInput as J,
4204
- CommandItem as K,
4205
- CommandList as L,
4206
- CommandSeparator as M,
4207
- CommandShortcut as N,
4208
- ContextMenu as O,
4209
- ContextMenuCheckboxItem as P,
4210
- ContextMenuContent as Q,
4211
- ContextMenuGroup as R,
4212
- ContextMenuItem as S,
4213
- ContextMenuLabel as T,
4214
- ContextMenuPortal as U,
4215
- ContextMenuRadioGroup as V,
4216
- ContextMenuRadioItem as W,
4217
- ContextMenuSeparator as X,
4218
- ContextMenuShortcut as Y,
4219
- ContextMenuSub as Z,
4220
- ContextMenuSubContent as _,
4221
- AccordionContent as a,
4222
- Pagination as a$,
4223
- ContextMenuTrigger as a0,
4224
- Drawer as a1,
4225
- DrawerContent as a2,
4226
- DrawerDescription as a3,
4227
- DrawerFooter as a4,
4228
- DrawerHandle as a5,
4229
- DrawerHeader as a6,
4230
- DrawerOverlay as a7,
4231
- DrawerPortal as a8,
4232
- DrawerTitle as a9,
4233
- MenubarCheckboxItem as aA,
4234
- MenubarContent as aB,
4235
- MenubarGroup as aC,
4236
- MenubarItem as aD,
4237
- MenubarLabel as aE,
4238
- MenubarMenu as aF,
4239
- MenubarPortal as aG,
4240
- MenubarRadioGroup as aH,
4241
- MenubarRadioItem as aI,
4242
- MenubarSeparator as aJ,
4243
- MenubarShortcut as aK,
4244
- MenubarSub as aL,
4245
- MenubarSubContent as aM,
4246
- MenubarSubTrigger as aN,
4247
- MenubarTrigger as aO,
4248
- NavigationMenu as aP,
4249
- NavigationMenuContent as aQ,
4250
- NavigationMenuIndicator as aR,
4251
- NavigationMenuItem as aS,
4252
- NavigationMenuLink as aT,
4253
- NavigationMenuList as aU,
4254
- NavigationMenuTrigger as aV,
4255
- NavigationMenuViewport as aW,
4256
- NotificationBadge as aX,
4257
- PageHeader as aY,
4258
- PageHeaderDescription as aZ,
4259
- PageHeaderHeading as a_,
4260
- DrawerTrigger as aa,
4261
- Empty as ab,
4262
- EmptyAction as ac,
4263
- EmptyDescription as ad,
4264
- EmptyIcon as ae,
4265
- EmptyImage as af,
4266
- EmptyTitle as ag,
4267
- FileUpload as ah,
4268
- Form as ai,
4269
- FormControl as aj,
4270
- FormDescription as ak,
4271
- FormField as al,
4272
- FormItem as am,
4273
- FormLabel as an,
4274
- FormMessage as ao,
4275
- HoverCard as ap,
4276
- HoverCardContent as aq,
4277
- HoverCardTrigger as ar,
4278
- ImageWithFallback as as,
4279
- InputOTP as at,
4280
- InputOTPGroup as au,
4281
- InputOTPSeparator as av,
4282
- InputOTPSlot as aw,
4283
- Label as ax,
4284
- Map$1 as ay,
4285
- Menubar as az,
4286
- AccordionItem as b,
4287
- PaginationContent as b0,
4288
- PaginationEllipsis as b1,
4289
- PaginationItem as b2,
4290
- PaginationLink as b3,
4291
- PaginationNext as b4,
4292
- PaginationPrevious as b5,
4293
- Progress as b6,
4294
- RadioGroup as b7,
4295
- RadioGroupItem as b8,
4296
- Rating as b9,
4297
- TimelineTime as bA,
4298
- Toggle as bB,
4299
- ToggleGroup as bC,
4300
- ToggleGroupItem as bD,
4301
- TreeView as bE,
4302
- badgeVariants as bF,
4303
- navigationMenuTriggerStyle as bG,
4304
- toggleVariants as bH,
4305
- useFormField as bI,
4306
- useIsMobile as bJ,
4307
- useMobile as bK,
4308
- useStepper as bL,
4309
- ResizableHandle as ba,
4310
- ResizablePanel as bb,
4311
- ResizablePanelGroup as bc,
4312
- RouteMap as bd,
4313
- Search as be,
4314
- Separator as bf,
4315
- Sheet as bg,
4316
- SheetContent as bh,
4317
- SheetDescription as bi,
4318
- SheetFooter as bj,
4319
- SheetHeader as bk,
4320
- SheetPortal as bl,
4321
- SheetTitle as bm,
4322
- SheetTrigger as bn,
4323
- SimpleMap as bo,
4324
- Skeleton as bp,
4325
- StatsCard as bq,
4326
- Step as br,
4327
- Stepper as bs,
4328
- Switch as bt,
4329
- Timeline as bu,
4330
- TimelineContent as bv,
4331
- TimelineDescription as bw,
4332
- TimelineDot as bx,
4333
- TimelineHeading as by,
4334
- TimelineItem as bz,
4335
- AccordionTrigger as c,
4336
- Alert as d,
4337
- AlertDescription as e,
4338
- AlertDialog as f,
4339
- AlertDialogAction as g,
4340
- AlertDialogCancel as h,
4341
- AlertDialogContent as i,
4342
- AlertDialogDescription as j,
4343
- AlertDialogFooter as k,
4344
- AlertDialogHeader as l,
4345
- AlertDialogOverlay as m,
4346
- AlertDialogPortal as n,
4347
- AlertDialogTitle as o,
4348
- AlertDialogTrigger as p,
4349
- AlertTitle as q,
4350
- AspectRatio as r,
4351
- AssistantChart as s,
4352
- Carousel as t,
4353
- CarouselContent as u,
4354
- CarouselItem as v,
4355
- CarouselNext as w,
4356
- CarouselPrevious as x,
4357
- Checkbox as y,
4358
- Collapsible as z
4359
- };