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