xertica-ui 2.5.3 → 2.6.0

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