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