xertica-ui 2.5.1 → 2.5.3

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