xertica-ui 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/assets/xertica-logo.svg +37 -37
- package/assets/xertica-x-logo.svg +20 -20
- package/bin/cli.ts +1 -1
- package/bin/generate-tokens.ts +13 -7
- package/components/assistant/index.ts +6 -6
- package/components/assistant/xertica-assistant/index.ts +2 -0
- package/components/assistant/xertica-assistant/use-assistant.ts +564 -0
- package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +200 -0
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +183 -474
- package/components/blocks/card-patterns/ActivityCard.tsx +72 -72
- package/components/blocks/card-patterns/FeatureCard.tsx +100 -100
- package/components/blocks/card-patterns/NotificationCard.tsx +127 -127
- package/components/blocks/card-patterns/ProfileCard.tsx +84 -84
- package/components/blocks/card-patterns/ProjectCard.tsx +89 -89
- package/components/blocks/card-patterns/QuickActionCard.tsx +62 -62
- package/components/blocks/card-patterns/card-patterns.stories.tsx +445 -445
- package/components/blocks/card-patterns/index.ts +17 -17
- package/components/blocks/index.ts +1 -1
- package/components/brand/index.ts +6 -6
- package/components/brand/xertica-provider/XerticaProvider.tsx +48 -48
- package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
- package/components/brand/xertica-provider/xertica-provider.test.tsx +52 -52
- package/components/examples/MapExamples.tsx +282 -282
- package/components/examples/SimpleFilterableMap.tsx +191 -191
- package/components/examples/index.ts +51 -51
- package/components/figma/ImageWithFallback.tsx +27 -27
- package/components/hooks/index.ts +7 -7
- package/components/index.ts +5 -5
- package/components/layout/header/header.test.tsx +8 -8
- package/components/layout/header/header.tsx +4 -4
- package/components/layout/index.ts +2 -2
- package/components/layout/sidebar/index.ts +2 -0
- package/components/layout/sidebar/sidebar.mdx +1 -1
- package/components/layout/sidebar/sidebar.stories.tsx +160 -8
- package/components/layout/sidebar/sidebar.test.tsx +11 -11
- package/components/layout/sidebar/sidebar.tsx +610 -471
- package/components/layout/sidebar/use-sidebar.ts +113 -0
- package/components/media/FloatingMediaWrapper.tsx +11 -11
- package/components/media/audio-player/AudioPlayer.tsx +22 -22
- package/components/media/index.ts +3 -3
- package/components/pages/home-content/HomeContent.tsx +7 -7
- package/components/pages/home-content/home-content.mdx +62 -62
- package/components/pages/home-page/HomePage.stories.tsx +39 -39
- package/components/pages/home-page/HomePage.tsx +1 -1
- package/components/pages/home-page/home-page.mdx +53 -53
- package/components/pages/index.ts +8 -8
- package/components/pages/template-content/TemplateContent.tsx +5 -5
- package/components/pages/template-content/template-content.mdx +61 -61
- package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
- package/components/pages/template-page/TemplatePage.tsx +5 -5
- package/components/pages/template-page/template-page.mdx +53 -53
- package/components/public-api-smoke.test.tsx +52 -52
- package/components/shared/assistant-utils.ts +43 -43
- package/components/shared/layout-constants.ts +1 -1
- package/components/ui/accordion/accordion.mdx +8 -8
- package/components/ui/accordion/accordion.stories.tsx +53 -53
- package/components/ui/alert/alert.mdx +8 -8
- package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
- package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
- package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
- package/components/ui/avatar/avatar.mdx +8 -8
- package/components/ui/badge/badge.mdx +8 -8
- package/components/ui/badge/badge.tsx +9 -9
- package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
- package/components/ui/button/button.mdx +8 -8
- package/components/ui/calendar/calendar.mdx +8 -8
- package/components/ui/calendar/calendar.tsx +258 -258
- package/components/ui/card/card.mdx +8 -8
- package/components/ui/card/card.stories.tsx +245 -245
- package/components/ui/carousel/carousel.mdx +8 -8
- package/components/ui/chart/chart.mdx +8 -8
- package/components/ui/chart/chart.stories.tsx +1303 -344
- package/components/ui/chart/chart.test.tsx +154 -154
- package/components/ui/chart/chart.tsx +2367 -1494
- package/components/ui/checkbox/checkbox.mdx +8 -8
- package/components/ui/checkbox/checkbox.stories.tsx +20 -20
- package/components/ui/collapsible/collapsible.mdx +8 -8
- package/components/ui/command/command.mdx +8 -8
- package/components/ui/context-menu/context-menu.mdx +8 -8
- package/components/ui/dialog/dialog.mdx +8 -8
- package/components/ui/drawer/drawer.mdx +8 -8
- package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
- package/components/ui/empty/empty.mdx +8 -8
- package/components/ui/file-upload/file-upload.mdx +8 -8
- package/components/ui/file-upload/file-upload.stories.tsx +100 -0
- package/components/ui/file-upload/file-upload.tsx +14 -74
- package/components/ui/file-upload/index.ts +1 -0
- package/components/ui/file-upload/use-file-upload.ts +181 -0
- package/components/ui/google-maps-loader/google-maps-loader.tsx +2 -2
- package/components/ui/hover-card/hover-card.mdx +8 -8
- package/components/ui/input/input.mdx +8 -8
- package/components/ui/input-otp/input-otp.mdx +8 -8
- package/components/ui/input-otp/input-otp.stories.tsx +6 -6
- package/components/ui/label/label.mdx +8 -8
- package/components/ui/map/map.mdx +8 -8
- package/components/ui/map/map.stories.tsx +51 -51
- package/components/ui/map/map.tsx +2 -2
- package/components/ui/menubar/menubar.mdx +8 -8
- package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
- package/components/ui/notification-badge/notification-badge.mdx +8 -8
- package/components/ui/pagination/index.ts +2 -0
- package/components/ui/pagination/pagination.mdx +8 -8
- package/components/ui/pagination/pagination.stories.tsx +94 -0
- package/components/ui/pagination/use-pagination.ts +194 -0
- package/components/ui/popover/popover.mdx +8 -8
- package/components/ui/progress/progress.mdx +8 -8
- package/components/ui/progress/progress.tsx +68 -68
- package/components/ui/radio-group/radio-group.mdx +8 -8
- package/components/ui/rating/rating.mdx +8 -8
- package/components/ui/resizable/resizable.mdx +8 -8
- package/components/ui/rich-text-editor/index.ts +2 -0
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +129 -1
- package/components/ui/rich-text-editor/rich-text-editor.tsx +86 -305
- package/components/ui/rich-text-editor/use-rich-text-editor.ts +439 -0
- package/components/ui/route-map/route-map.mdx +8 -8
- package/components/ui/route-map/route-map.stories.tsx +54 -54
- package/components/ui/route-map/route-map.tsx +2 -2
- package/components/ui/scroll-area/scroll-area.mdx +8 -8
- package/components/ui/search/search.mdx +8 -8
- package/components/ui/select/select.mdx +8 -8
- package/components/ui/select/select.stories.tsx +9 -9
- package/components/ui/separator/separator.mdx +8 -8
- package/components/ui/sheet/sheet.mdx +8 -8
- package/components/ui/sheet/sheet.stories.tsx +95 -95
- package/components/ui/simple-map/simple-map.mdx +8 -8
- package/components/ui/simple-map/simple-map.stories.tsx +48 -48
- package/components/ui/skeleton/skeleton.mdx +8 -8
- package/components/ui/slider/slider.mdx +8 -8
- package/components/ui/sonner/sonner.mdx +8 -8
- package/components/ui/stats-card/stats-card.mdx +8 -8
- package/components/ui/stepper/index.ts +3 -1
- package/components/ui/stepper/stepper.mdx +8 -8
- package/components/ui/stepper/stepper.stories.tsx +116 -0
- package/components/ui/stepper/stepper.tsx +4 -4
- package/components/ui/stepper/use-stepper.ts +137 -0
- package/components/ui/switch/switch.mdx +8 -8
- package/components/ui/switch/switch.stories.tsx +20 -20
- package/components/ui/table/table.mdx +8 -8
- package/components/ui/tabs/tabs.mdx +8 -8
- package/components/ui/tabs/tabs.stories.tsx +26 -26
- package/components/ui/textarea/textarea.mdx +8 -8
- package/components/ui/timeline/timeline.mdx +8 -8
- package/components/ui/toggle/toggle.mdx +8 -8
- package/components/ui/toggle-group/toggle-group.mdx +8 -8
- package/components/ui/tooltip/tooltip.mdx +8 -8
- package/components/ui/tree-view/index.ts +4 -1
- package/components/ui/tree-view/tree-view.mdx +8 -8
- package/components/ui/tree-view/tree-view.stories.tsx +110 -4
- package/components/ui/tree-view/tree-view.tsx +17 -125
- package/components/ui/tree-view/use-tree-view.ts +229 -0
- package/components.json +1512 -1512
- package/contexts/ApiKeyContext.tsx +72 -72
- package/contexts/BrandColorsContext.tsx +26 -26
- package/contexts/LanguageContext.tsx +13 -13
- package/contexts/LayoutContext.test.tsx +11 -11
- package/contexts/LayoutContext.tsx +29 -29
- package/contexts/ThemeContext.tsx +26 -26
- package/contexts/theme-data.ts +4 -4
- package/dist/{AssistantChart-CVzmmhx4.js → AssistantChart-C_hwFRRr.js} +4 -4
- package/dist/{AssistantChart-BAx9VQvb.cjs → AssistantChart-CldVCVDe.cjs} +311 -94
- package/dist/{AssistantChart-CVko2A1W.js → AssistantChart-Cu3m7RBo.js} +314 -97
- package/dist/{AssistantChart-9w31gdAb.cjs → AssistantChart-DoZCyS5r.cjs} +4 -4
- package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
- package/dist/AudioPlayer-BZ7bibzU.cjs +982 -0
- package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
- package/dist/AudioPlayer-DMcG_c7L.js +990 -0
- package/dist/AudioPlayer-DcFKRJE_.js +998 -0
- package/dist/AudioPlayer-e8LfNoqO.js +983 -0
- package/dist/{xertica-assistant-Qp3ydksa.cjs → CodeBlock-7TTgmdGG.cjs} +263 -51
- package/dist/{xertica-assistant-gnCJdcZY.js → CodeBlock-BeSt1h5P.js} +219 -7
- package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
- package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
- package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
- package/dist/CodeBlock-BtfPlbAI.js +2078 -0
- package/dist/CodeBlock-CIySIuYr.js +2078 -0
- package/dist/CodeBlock-CuPtUM-7.cjs +2094 -0
- package/dist/CodeBlock-D6ffWXgc.js +2078 -0
- package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
- package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
- package/dist/CodeBlock-DlBehYN8.js +2078 -0
- package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
- package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
- package/dist/CodeBlock-DwMCfkFY.js +2078 -0
- package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
- package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
- package/dist/CodeBlock-f_GpNhEB.js +2078 -0
- package/dist/CodeBlock-oB6u8nI1.js +2078 -0
- package/dist/CodeBlock-tZC31B73.cjs +2094 -0
- package/dist/ImageWithFallback-CGtidP6B.cjs +4542 -0
- package/dist/ImageWithFallback-lsg3pdFg.js +4508 -0
- package/dist/LanguageSelector-B5YfbHra.js +231 -0
- package/dist/LanguageSelector-D6uacAIM.cjs +230 -0
- package/dist/LayoutContext-BAql6ZRY.js +97 -0
- package/dist/LayoutContext-BvK-ggDa.cjs +96 -0
- package/dist/ThemeContext-BoH4NLfN.js +734 -0
- package/dist/{ThemeContext-BbBNoFTG.js → ThemeContext-C2EwAPDt.js} +2 -2
- package/dist/ThemeContext-r69W20Xg.cjs +733 -0
- package/dist/{ThemeContext-Cmr8Ex8H.cjs → ThemeContext-vTjumZeM.cjs} +2 -2
- package/dist/{VerifyEmailPage-BE-L9mB7.js → VerifyEmailPage-C0c2e5n0.js} +7 -7
- package/dist/{VerifyEmailPage-DMBh4NM9.cjs → VerifyEmailPage-CYXtbKi3.cjs} +1 -1
- package/dist/{VerifyEmailPage-CR7kb5df.cjs → VerifyEmailPage-Cwi3kbol.cjs} +7 -7
- package/dist/{VerifyEmailPage-CdYPSJoO.js → VerifyEmailPage-DvMLZgFt.js} +1 -1
- package/dist/XerticaOrbe-KL1RBHzw.cjs +1354 -0
- package/dist/XerticaOrbe-zwS1p2a8.js +1355 -0
- package/dist/XerticaProvider-6btlAlzc.js +17 -0
- package/dist/XerticaProvider-BNoNOxQ5.cjs +16 -0
- package/dist/XerticaProvider-BlY2limY.cjs +38 -0
- package/dist/{XerticaProvider-BITjgC5p.js → XerticaProvider-CEoWMTxu.js} +2 -2
- package/dist/{XerticaProvider-By8q3Roe.cjs → XerticaProvider-CllrbMEJ.cjs} +2 -2
- package/dist/XerticaProvider-DDuiIcKo.js +39 -0
- package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
- package/dist/XerticaProvider-hSwhNQex.js +39 -0
- package/dist/{alert-dialog-yckpaOpy.cjs → alert-dialog-DSKByiKZ.cjs} +3 -3
- package/dist/{alert-dialog-iDe5VE5o.js → alert-dialog-s-vmNkJ_.js} +3 -3
- package/dist/assistant.cjs.js +2 -1
- package/dist/assistant.es.js +3 -2
- package/dist/brand.cjs.js +1 -1
- package/dist/brand.es.js +1 -1
- package/dist/breadcrumb-CqJ7bHY5.js +161 -0
- package/dist/breadcrumb-m9Hb2_XN.cjs +177 -0
- package/dist/cli.js +14 -8
- package/dist/components/assistant/xertica-assistant/index.d.ts +2 -0
- package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +126 -0
- package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +7 -2
- package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
- package/dist/components/blocks/audio-player/index.d.ts +1 -0
- package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
- package/dist/components/blocks/document-editor/index.d.ts +1 -0
- package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
- package/dist/components/blocks/podcast-player/index.d.ts +1 -0
- package/dist/components/layout/sidebar/index.d.ts +2 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +80 -0
- package/dist/components/layout/sidebar/use-sidebar.d.ts +22 -0
- package/dist/components/shared/layout-constants.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/chart/chart.d.ts +162 -5
- package/dist/components/ui/file-upload/file-upload.d.ts +2 -0
- package/dist/components/ui/file-upload/index.d.ts +1 -0
- package/dist/components/ui/file-upload/use-file-upload.d.ts +49 -0
- package/dist/components/ui/pagination/index.d.ts +2 -0
- package/dist/components/ui/pagination/use-pagination.d.ts +78 -0
- package/dist/components/ui/rich-text-editor/index.d.ts +2 -0
- package/dist/components/ui/rich-text-editor/use-rich-text-editor.d.ts +107 -0
- package/dist/components/ui/stepper/index.d.ts +3 -1
- package/dist/components/ui/stepper/stepper.d.ts +2 -2
- package/dist/components/ui/stepper/use-stepper.d.ts +60 -0
- package/dist/components/ui/tree-view/index.d.ts +4 -1
- package/dist/components/ui/tree-view/tree-view.d.ts +4 -6
- package/dist/components/ui/tree-view/use-tree-view.d.ts +60 -0
- package/dist/dropdown-menu-BDB5CmQs.cjs +247 -0
- package/dist/dropdown-menu-DQidbKBD.js +231 -0
- package/dist/google-maps-loader-BFWp6VPd.js +287 -0
- package/dist/{google-maps-loader-t2IlYBzw.js → google-maps-loader-CTYySAun.js} +4 -0
- package/dist/{google-maps-loader-BqsYL48U.cjs → google-maps-loader-Y-QkD-Li.cjs} +5 -0
- package/dist/google-maps-loader-eS3uQ5TA.cjs +287 -0
- package/dist/header-Cgy6vYPk.cjs +731 -0
- package/dist/header-DRlT4jgI.js +715 -0
- package/dist/header-Dux00SI4.cjs +731 -0
- package/dist/header-EkGKXPsD.js +715 -0
- package/dist/header-WfEywpyc.cjs +731 -0
- package/dist/header-tifNQn2U.js +715 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +1 -1
- package/dist/index-BhapVLVj.js +8 -0
- package/dist/{index-D3RLKRAs.cjs → index-COtD8bRW.cjs} +1 -1
- package/dist/index-D6fxYEY8.cjs +7 -0
- package/dist/index-DW5tYe26.js +8 -0
- package/dist/index.cjs.js +19 -8
- package/dist/index.es.js +39 -28
- package/dist/index.umd.js +1043 -470
- package/dist/input-2R4loU86.js +127 -0
- package/dist/input-DWANSKGb.cjs +145 -0
- package/dist/layout.cjs.js +89 -1
- package/dist/layout.es.js +90 -2
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
- package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
- package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
- package/dist/rich-text-editor-B9UbSXNb.js +1203 -0
- package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
- package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
- package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
- package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
- package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
- package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
- package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
- package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
- package/dist/rich-text-editor-D6H84OcX.cjs +1220 -0
- package/dist/rich-text-editor-D76gD-QI.js +2328 -0
- package/dist/rich-text-editor-DKkokOnA.js +1781 -0
- package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
- package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
- package/dist/rich-text-editor-DgF8s7xW.js +2949 -0
- package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
- package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
- package/dist/rich-text-editor-mWoaSCE4.cjs +2966 -0
- package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
- package/dist/select-Bkbr0f-Z.cjs +162 -0
- package/dist/select-CvIVdX2n.js +145 -0
- package/dist/sidebar-CK_0ZQHj.cjs +803 -0
- package/dist/sidebar-CUuOvYhK.js +787 -0
- package/dist/slider-Bc5Hd0y1.js +56 -0
- package/dist/slider-N7hFFj6X.cjs +73 -0
- package/dist/tooltip-Ded96neP.cjs +137 -0
- package/dist/tooltip-HDOoD2-0.js +120 -0
- package/dist/ui.cjs.js +14 -4
- package/dist/ui.es.js +26 -16
- package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
- package/dist/use-mobile-BXuYROXM.js +4202 -0
- package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
- package/dist/use-mobile-Bk6CX-TC.js +4359 -0
- package/dist/use-mobile-BvYdisLP.js +4202 -0
- package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
- package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
- package/dist/use-mobile-CKb5pqTs.js +4269 -0
- package/dist/use-mobile-CYuAuGDl.js +4202 -0
- package/dist/use-mobile-CaENcqm-.js +4508 -0
- package/dist/use-mobile-CbrYgJGJ.js +4203 -0
- package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
- package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
- package/dist/use-mobile-DZvv7QMR.js +4359 -0
- package/dist/use-mobile-DdI_TXam.cjs +4235 -0
- package/dist/use-mobile-DlceKf8a.js +4359 -0
- package/dist/use-mobile-DsOnow1o.cjs +4236 -0
- package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
- package/dist/use-mobile-bnKcua_i.js +4202 -0
- package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
- package/dist/{xertica-assistant-B1IaHXnB.cjs → xertica-assistant-dyP7KHM5.cjs} +533 -392
- package/dist/{xertica-assistant-DPsESB6t.js → xertica-assistant-yX1CFBBo.js} +535 -394
- package/dist/xertica-ui.css +2 -2
- package/docs/ai-usage.md +28 -10
- package/docs/architecture.md +76 -0
- package/docs/components/assistant.md +159 -0
- package/docs/components/calendar.md +154 -154
- package/docs/components/card-patterns.md +337 -337
- package/docs/components/card.md +235 -235
- package/docs/components/chart.md +354 -39
- package/docs/components/file-upload.md +119 -2
- package/docs/components/map.md +84 -84
- package/docs/components/pagination.md +187 -0
- package/docs/components/rich-text-editor.md +164 -0
- package/docs/components/sidebar.md +153 -4
- package/docs/components/stepper.md +157 -12
- package/docs/components/tree-view.md +164 -6
- package/docs/components/xertica-provider.md +24 -24
- package/docs/decision-tree.md +287 -287
- package/docs/getting-started.md +1 -1
- package/docs/guidelines.md +14 -8
- package/docs/layout.md +2 -2
- package/docs/llms.md +4 -4
- package/guidelines/Guidelines.md +252 -250
- package/hooks/useTheme.ts +3 -3
- package/imports/Podcast.tsx +388 -388
- package/imports/XerticaAi.tsx +45 -45
- package/imports/XerticaX.tsx +19 -19
- package/imports/svg-aueiaqngck.ts +11 -11
- package/imports/svg-v9krss1ozd.ts +16 -16
- package/imports/svg-vhrdofe3qe.ts +5 -5
- package/llms-compact.txt +327 -327
- package/llms.txt +160 -160
- package/package.json +203 -203
- package/styles/xertica/app-overrides/chat.css +61 -61
- package/styles/xertica/app-overrides/scrollbar.css +33 -33
- package/styles/xertica/integrations/google-maps.css +76 -76
- package/styles/xertica/integrations/sonner.css +73 -73
- package/styles/xertica/tokens.css +41 -12
- package/templates/CLAUDE.md +182 -172
- package/templates/guidelines/Guidelines.md +325 -313
- package/templates/package.json +3 -3
- package/templates/src/features/auth/index.ts +4 -4
- package/templates/src/features/auth/ui/AuthPageShell.tsx +34 -34
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
- package/templates/src/features/auth/ui/LoginContent.tsx +90 -90
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +151 -151
- package/templates/src/features/auth/ui/SocialLoginButtons.tsx +59 -59
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
- package/templates/src/features/home/index.ts +1 -1
- package/templates/src/features/home/ui/HomeContent.tsx +100 -100
- package/templates/src/features/template/index.ts +5 -5
- package/templates/src/features/template/ui/CrudTemplate.tsx +3 -3
- package/templates/src/features/template/ui/DashboardTemplate.tsx +3 -3
- package/templates/src/features/template/ui/FormTemplate.tsx +120 -120
- package/templates/src/features/template/ui/LoginTemplate.tsx +3 -3
- package/templates/src/pages/AssistantPage.tsx +328 -328
- package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
- package/templates/src/pages/HomePage.tsx +57 -57
- package/templates/src/pages/LoginPage.tsx +10 -10
- package/templates/src/pages/ResetPasswordPage.tsx +6 -6
- package/templates/src/pages/TemplatePage.tsx +30 -30
- package/templates/src/pages/VerifyEmailPage.tsx +6 -6
- package/templates/src/shared/config/navigation.ts +20 -20
- package/templates/src/shared/lib/auth.ts +20 -20
- package/templates/src/shared/types/auth.ts +3 -3
- package/templates/src/styles/xertica/tokens.css +39 -10
- package/templates/tsconfig.json +5 -5
- package/utils/gemini.ts +140 -140
- package/dist/VerifyEmailPage-Bae2cBXT.cjs +0 -2827
- package/dist/VerifyEmailPage-CbgjOF0v.js +0 -2828
- package/dist/index-CkTUgOwX.js +0 -8
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
3
3
|
import { GripVerticalIcon, ChevronDownIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon, MinusIcon, ChevronLeft, ChevronRight, ChevronDown, XIcon, CheckIcon, CircleIcon, SearchIcon, TrendingUp, TrendingDown, Minus, ArrowRight, ArrowLeft, X, Check, Upload, AlertCircle, FileIcon, Star, Search as Search$1 } from "lucide-react";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import React__default, { useRef, useEffect } from "react";
|
|
5
|
+
import React__default, { useState, useCallback, useMemo, useRef, useEffect } from "react";
|
|
6
6
|
import { c as cn, b as buttonVariants, B as Button } from "./button-qkz7Icqf.js";
|
|
7
7
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
@@ -11,7 +11,7 @@ import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
|
11
11
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
12
12
|
import { Slot } from "@radix-ui/react-slot";
|
|
13
13
|
import { FormProvider, Controller, useFormContext, useFormState } from "react-hook-form";
|
|
14
|
-
import { L as Label, M as Map$1 } from "./alert-dialog-
|
|
14
|
+
import { L as Label, M as Map$1 } from "./alert-dialog-s-vmNkJ_.js";
|
|
15
15
|
import { getDefaultClassNames, DayPicker } from "react-day-picker";
|
|
16
16
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
17
17
|
import { Drawer as Drawer$1 } from "vaul";
|
|
@@ -19,12 +19,12 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
|
19
19
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
20
20
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
21
21
|
import { Command as Command$1 } from "cmdk";
|
|
22
|
-
import { k as Dialog, q as DialogHeader, t as DialogTitle, o as DialogDescription, n as DialogContent, c as ChartContainer, g as ChartTooltip, h as ChartTooltipContent } from "./rich-text-editor-
|
|
22
|
+
import { k as Dialog, q as DialogHeader, t as DialogTitle, o as DialogDescription, n as DialogContent, c as ChartContainer, g as ChartTooltip, h as ChartTooltipContent } from "./rich-text-editor-DgF8s7xW.js";
|
|
23
23
|
import { C as Card, b as CardContent } from "./card-fi8zAN-I.js";
|
|
24
24
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
25
25
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
26
26
|
import useEmblaCarousel from "embla-carousel-react";
|
|
27
|
-
import { u as useGoogleMapsLoader } from "./google-maps-loader-
|
|
27
|
+
import { u as useGoogleMapsLoader } from "./google-maps-loader-CTYySAun.js";
|
|
28
28
|
import { BarChart, CartesianGrid, XAxis, Bar } from "recharts";
|
|
29
29
|
function AspectRatio({
|
|
30
30
|
...props
|
|
@@ -557,6 +557,80 @@ function PaginationEllipsis({
|
|
|
557
557
|
}
|
|
558
558
|
);
|
|
559
559
|
}
|
|
560
|
+
function usePagination({
|
|
561
|
+
totalItems,
|
|
562
|
+
pageSize = 10,
|
|
563
|
+
initialPage = 1,
|
|
564
|
+
page: controlledPage,
|
|
565
|
+
onPageChange,
|
|
566
|
+
siblingCount = 1
|
|
567
|
+
}) {
|
|
568
|
+
const [internalPage, setInternalPage] = useState(initialPage);
|
|
569
|
+
const isControlled = controlledPage !== void 0;
|
|
570
|
+
const currentPage = isControlled ? controlledPage : internalPage;
|
|
571
|
+
const totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
|
|
572
|
+
const setPage = useCallback(
|
|
573
|
+
(p) => {
|
|
574
|
+
const clamped = Math.min(Math.max(1, p), totalPages);
|
|
575
|
+
if (!isControlled) setInternalPage(clamped);
|
|
576
|
+
onPageChange == null ? void 0 : onPageChange(clamped);
|
|
577
|
+
},
|
|
578
|
+
[isControlled, onPageChange, totalPages]
|
|
579
|
+
);
|
|
580
|
+
const startIndex = (currentPage - 1) * pageSize;
|
|
581
|
+
const endIndex = Math.min(startIndex + pageSize, totalItems);
|
|
582
|
+
const canGoPrev = currentPage > 1;
|
|
583
|
+
const canGoNext = currentPage < totalPages;
|
|
584
|
+
const isFirstPage = currentPage === 1;
|
|
585
|
+
const isLastPage = currentPage === totalPages;
|
|
586
|
+
const items = useMemo(() => {
|
|
587
|
+
const range = (start, end) => Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
588
|
+
const leftSibling = Math.max(currentPage - siblingCount, 1);
|
|
589
|
+
const rightSibling = Math.min(currentPage + siblingCount, totalPages);
|
|
590
|
+
const showLeftEllipsis = leftSibling > 2;
|
|
591
|
+
const showRightEllipsis = rightSibling < totalPages - 1;
|
|
592
|
+
const result = [];
|
|
593
|
+
result.push({ type: "page", page: 1 });
|
|
594
|
+
if (showLeftEllipsis) {
|
|
595
|
+
result.push({ type: "ellipsis", key: "ellipsis-left" });
|
|
596
|
+
} else if (leftSibling === 2) {
|
|
597
|
+
result.push({ type: "page", page: 2 });
|
|
598
|
+
}
|
|
599
|
+
for (const p of range(Math.max(leftSibling, 2), Math.min(rightSibling, totalPages - 1))) {
|
|
600
|
+
result.push({ type: "page", page: p });
|
|
601
|
+
}
|
|
602
|
+
if (showRightEllipsis) {
|
|
603
|
+
result.push({ type: "ellipsis", key: "ellipsis-right" });
|
|
604
|
+
} else if (rightSibling === totalPages - 1) {
|
|
605
|
+
result.push({ type: "page", page: totalPages - 1 });
|
|
606
|
+
}
|
|
607
|
+
if (totalPages > 1) {
|
|
608
|
+
result.push({ type: "page", page: totalPages });
|
|
609
|
+
}
|
|
610
|
+
return result;
|
|
611
|
+
}, [currentPage, siblingCount, totalPages]);
|
|
612
|
+
const goTo = useCallback((p) => setPage(p), [setPage]);
|
|
613
|
+
const next = useCallback(() => setPage(currentPage + 1), [currentPage, setPage]);
|
|
614
|
+
const prev = useCallback(() => setPage(currentPage - 1), [currentPage, setPage]);
|
|
615
|
+
const first = useCallback(() => setPage(1), [setPage]);
|
|
616
|
+
const last = useCallback(() => setPage(totalPages), [setPage, totalPages]);
|
|
617
|
+
return {
|
|
618
|
+
currentPage,
|
|
619
|
+
totalPages,
|
|
620
|
+
startIndex,
|
|
621
|
+
endIndex,
|
|
622
|
+
canGoPrev,
|
|
623
|
+
canGoNext,
|
|
624
|
+
isFirstPage,
|
|
625
|
+
isLastPage,
|
|
626
|
+
items,
|
|
627
|
+
goTo,
|
|
628
|
+
next,
|
|
629
|
+
prev,
|
|
630
|
+
first,
|
|
631
|
+
last
|
|
632
|
+
};
|
|
633
|
+
}
|
|
560
634
|
const toggleVariants = cva(
|
|
561
635
|
"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",
|
|
562
636
|
{
|
|
@@ -2055,33 +2129,39 @@ const TimelineDescription = React.forwardRef(({ className, ...props }, ref) => /
|
|
|
2055
2129
|
}
|
|
2056
2130
|
));
|
|
2057
2131
|
TimelineDescription.displayName = "TimelineDescription";
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2132
|
+
function useTreeView({
|
|
2133
|
+
data,
|
|
2134
|
+
defaultExpanded = [],
|
|
2135
|
+
selectedNodeId,
|
|
2136
|
+
onNodeClick,
|
|
2137
|
+
onNodeSelect
|
|
2138
|
+
}) {
|
|
2139
|
+
const [expanded, setExpanded] = useState(new Set(defaultExpanded));
|
|
2140
|
+
const [internalSelectedId, setInternalSelectedId] = useState(void 0);
|
|
2141
|
+
const nodeRefs = useRef(/* @__PURE__ */ new Map());
|
|
2142
|
+
const isControlled = selectedNodeId !== void 0;
|
|
2143
|
+
const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
|
|
2144
|
+
const getNodeRef = useCallback(
|
|
2145
|
+
(nodeId) => (el) => {
|
|
2146
|
+
if (el) nodeRefs.current.set(nodeId, el);
|
|
2147
|
+
else nodeRefs.current.delete(nodeId);
|
|
2148
|
+
},
|
|
2149
|
+
[]
|
|
2150
|
+
);
|
|
2151
|
+
const getVisibleNodes = useCallback(() => {
|
|
2152
|
+
const result = [];
|
|
2153
|
+
const traverse = (nodes) => {
|
|
2154
|
+
var _a;
|
|
2155
|
+
for (const node of nodes) {
|
|
2156
|
+
result.push(node);
|
|
2157
|
+
if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
|
|
2158
|
+
}
|
|
2071
2159
|
};
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
result.push(node);
|
|
2078
|
-
if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
|
|
2079
|
-
}
|
|
2080
|
-
};
|
|
2081
|
-
traverse(data);
|
|
2082
|
-
return result;
|
|
2083
|
-
}, [data, expanded]);
|
|
2084
|
-
const findParent = (nodes, targetId) => {
|
|
2160
|
+
traverse(data);
|
|
2161
|
+
return result;
|
|
2162
|
+
}, [data, expanded]);
|
|
2163
|
+
const findParent = useCallback(
|
|
2164
|
+
(nodes, targetId) => {
|
|
2085
2165
|
var _a;
|
|
2086
2166
|
for (const n of nodes) {
|
|
2087
2167
|
if ((_a = n.children) == null ? void 0 : _a.some((c) => c.id === targetId)) return n;
|
|
@@ -2091,13 +2171,28 @@ const TreeView = React.forwardRef(
|
|
|
2091
2171
|
}
|
|
2092
2172
|
}
|
|
2093
2173
|
return null;
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2174
|
+
},
|
|
2175
|
+
// findParent is a pure recursive function over `data` — no reactive deps needed
|
|
2176
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2177
|
+
[]
|
|
2178
|
+
);
|
|
2179
|
+
const toggleExpand = useCallback((nodeId) => {
|
|
2180
|
+
setExpanded((prev) => {
|
|
2181
|
+
const next = new Set(prev);
|
|
2182
|
+
next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
|
|
2183
|
+
return next;
|
|
2184
|
+
});
|
|
2185
|
+
}, []);
|
|
2186
|
+
const handleSelect = useCallback(
|
|
2187
|
+
(node) => {
|
|
2096
2188
|
if (!isControlled) setInternalSelectedId(node.id);
|
|
2097
2189
|
onNodeSelect == null ? void 0 : onNodeSelect(node);
|
|
2098
2190
|
onNodeClick == null ? void 0 : onNodeClick(node);
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2191
|
+
},
|
|
2192
|
+
[isControlled, onNodeClick, onNodeSelect]
|
|
2193
|
+
);
|
|
2194
|
+
const handleKeyDown = useCallback(
|
|
2195
|
+
(e, node) => {
|
|
2101
2196
|
var _a, _b;
|
|
2102
2197
|
const visibleNodes = getVisibleNodes();
|
|
2103
2198
|
const idx = visibleNodes.findIndex((n) => n.id === node.id);
|
|
@@ -2158,7 +2253,30 @@ const TreeView = React.forwardRef(
|
|
|
2158
2253
|
break;
|
|
2159
2254
|
}
|
|
2160
2255
|
}
|
|
2161
|
-
}
|
|
2256
|
+
},
|
|
2257
|
+
[data, expanded, findParent, getVisibleNodes, handleSelect, toggleExpand]
|
|
2258
|
+
);
|
|
2259
|
+
return {
|
|
2260
|
+
expanded,
|
|
2261
|
+
effectiveSelectedId,
|
|
2262
|
+
nodeRefs,
|
|
2263
|
+
getNodeRef,
|
|
2264
|
+
toggleExpand,
|
|
2265
|
+
handleSelect,
|
|
2266
|
+
handleKeyDown,
|
|
2267
|
+
getVisibleNodes
|
|
2268
|
+
};
|
|
2269
|
+
}
|
|
2270
|
+
const TreeView = React.forwardRef(
|
|
2271
|
+
({ className, data, onNodeClick, onNodeSelect, defaultExpanded = [], selectedNodeId, ...props }, ref) => {
|
|
2272
|
+
const {
|
|
2273
|
+
expanded,
|
|
2274
|
+
effectiveSelectedId,
|
|
2275
|
+
getNodeRef,
|
|
2276
|
+
toggleExpand,
|
|
2277
|
+
handleSelect,
|
|
2278
|
+
handleKeyDown
|
|
2279
|
+
} = useTreeView({ data, defaultExpanded, selectedNodeId, onNodeClick, onNodeSelect });
|
|
2162
2280
|
return /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), role: "tree", ...props, children: data.map((node) => /* @__PURE__ */ jsx(
|
|
2163
2281
|
TreeNodeComponent,
|
|
2164
2282
|
{
|
|
@@ -2169,7 +2287,7 @@ const TreeView = React.forwardRef(
|
|
|
2169
2287
|
onToggle: toggleExpand,
|
|
2170
2288
|
onSelect: handleSelect,
|
|
2171
2289
|
onKeyDown: handleKeyDown,
|
|
2172
|
-
|
|
2290
|
+
getNodeRef
|
|
2173
2291
|
},
|
|
2174
2292
|
node.id
|
|
2175
2293
|
)) });
|
|
@@ -2184,7 +2302,7 @@ const TreeNodeComponent = ({
|
|
|
2184
2302
|
onToggle,
|
|
2185
2303
|
onSelect,
|
|
2186
2304
|
onKeyDown,
|
|
2187
|
-
|
|
2305
|
+
getNodeRef
|
|
2188
2306
|
}) => {
|
|
2189
2307
|
var _a;
|
|
2190
2308
|
const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
|
|
@@ -2194,15 +2312,11 @@ const TreeNodeComponent = ({
|
|
|
2194
2312
|
if (hasChildren) onToggle(node.id);
|
|
2195
2313
|
onSelect(node);
|
|
2196
2314
|
};
|
|
2197
|
-
const setRef = (el) => {
|
|
2198
|
-
if (el) nodeRefs.current.set(node.id, el);
|
|
2199
|
-
else nodeRefs.current.delete(node.id);
|
|
2200
|
-
};
|
|
2201
2315
|
return /* @__PURE__ */ jsxs("div", { role: "none", children: [
|
|
2202
2316
|
/* @__PURE__ */ jsxs(
|
|
2203
2317
|
"button",
|
|
2204
2318
|
{
|
|
2205
|
-
ref:
|
|
2319
|
+
ref: getNodeRef(node.id),
|
|
2206
2320
|
role: "treeitem",
|
|
2207
2321
|
"aria-expanded": hasChildren ? isExpanded : void 0,
|
|
2208
2322
|
"aria-selected": isSelected,
|
|
@@ -2232,7 +2346,7 @@ const TreeNodeComponent = ({
|
|
|
2232
2346
|
onToggle,
|
|
2233
2347
|
onSelect,
|
|
2234
2348
|
onKeyDown,
|
|
2235
|
-
|
|
2349
|
+
getNodeRef
|
|
2236
2350
|
},
|
|
2237
2351
|
child.id
|
|
2238
2352
|
)) })
|
|
@@ -2505,9 +2619,9 @@ function CarouselNext({
|
|
|
2505
2619
|
);
|
|
2506
2620
|
}
|
|
2507
2621
|
const StepperContext = React.createContext(void 0);
|
|
2508
|
-
const
|
|
2622
|
+
const useStepperContext = () => {
|
|
2509
2623
|
const context = React.useContext(StepperContext);
|
|
2510
|
-
if (!context) throw new Error("
|
|
2624
|
+
if (!context) throw new Error("useStepperContext must be used within a Stepper");
|
|
2511
2625
|
return context;
|
|
2512
2626
|
};
|
|
2513
2627
|
const Stepper = React.forwardRef(
|
|
@@ -2529,7 +2643,7 @@ const Stepper = React.forwardRef(
|
|
|
2529
2643
|
Stepper.displayName = "Stepper";
|
|
2530
2644
|
const Step = React.forwardRef(
|
|
2531
2645
|
({ step, label, description, error = false, className, ...props }, ref) => {
|
|
2532
|
-
const { currentStep, totalSteps, orientation } =
|
|
2646
|
+
const { currentStep, totalSteps, orientation } = useStepperContext();
|
|
2533
2647
|
const isActive = step === currentStep;
|
|
2534
2648
|
const isCompleted = step < currentStep && !error;
|
|
2535
2649
|
const isFirst = step === 1;
|
|
@@ -2573,24 +2687,68 @@ const Step = React.forwardRef(
|
|
|
2573
2687
|
}
|
|
2574
2688
|
);
|
|
2575
2689
|
Step.displayName = "Step";
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2690
|
+
function useStepper({
|
|
2691
|
+
totalSteps,
|
|
2692
|
+
initialStep = 1,
|
|
2693
|
+
step: controlledStep,
|
|
2694
|
+
onStepChange,
|
|
2695
|
+
onBeforeNext
|
|
2696
|
+
}) {
|
|
2697
|
+
const [internalStep, setInternalStep] = useState(initialStep);
|
|
2698
|
+
const isControlled = controlledStep !== void 0;
|
|
2699
|
+
const currentStep = isControlled ? controlledStep : internalStep;
|
|
2700
|
+
const setStep = useCallback(
|
|
2701
|
+
(s) => {
|
|
2702
|
+
const clamped = Math.min(Math.max(1, s), totalSteps);
|
|
2703
|
+
if (!isControlled) setInternalStep(clamped);
|
|
2704
|
+
onStepChange == null ? void 0 : onStepChange(clamped);
|
|
2705
|
+
},
|
|
2706
|
+
[isControlled, onStepChange, totalSteps]
|
|
2707
|
+
);
|
|
2708
|
+
const isFirstStep = currentStep === 1;
|
|
2709
|
+
const isLastStep = currentStep === totalSteps;
|
|
2710
|
+
const canGoPrev = currentStep > 1;
|
|
2711
|
+
const canGoNext = currentStep < totalSteps;
|
|
2712
|
+
const next = useCallback(async () => {
|
|
2713
|
+
if (!canGoNext) return;
|
|
2714
|
+
if (onBeforeNext) {
|
|
2715
|
+
const allowed = await onBeforeNext(currentStep);
|
|
2716
|
+
if (!allowed) return;
|
|
2717
|
+
}
|
|
2718
|
+
setStep(currentStep + 1);
|
|
2719
|
+
}, [canGoNext, currentStep, onBeforeNext, setStep]);
|
|
2720
|
+
const prev = useCallback(() => {
|
|
2721
|
+
if (!canGoPrev) return;
|
|
2722
|
+
setStep(currentStep - 1);
|
|
2723
|
+
}, [canGoPrev, currentStep, setStep]);
|
|
2724
|
+
const goTo = useCallback((s) => setStep(s), [setStep]);
|
|
2725
|
+
const reset = useCallback(() => setStep(1), [setStep]);
|
|
2726
|
+
return {
|
|
2727
|
+
currentStep,
|
|
2728
|
+
totalSteps,
|
|
2729
|
+
isFirstStep,
|
|
2730
|
+
isLastStep,
|
|
2731
|
+
canGoPrev,
|
|
2732
|
+
canGoNext,
|
|
2733
|
+
next,
|
|
2734
|
+
prev,
|
|
2735
|
+
goTo,
|
|
2736
|
+
reset
|
|
2737
|
+
};
|
|
2738
|
+
}
|
|
2739
|
+
function useFileUpload({
|
|
2740
|
+
maxFiles = 1,
|
|
2741
|
+
maxSize = 5 * 1024 * 1024,
|
|
2742
|
+
onFilesChange,
|
|
2743
|
+
onError,
|
|
2744
|
+
disabled = false
|
|
2745
|
+
} = {}) {
|
|
2746
|
+
const [files, setFiles] = useState([]);
|
|
2747
|
+
const [dragActive, setDragActive] = useState(false);
|
|
2748
|
+
const [errorMessage, setErrorMessage] = useState(null);
|
|
2749
|
+
const inputRef = useRef(null);
|
|
2750
|
+
const handleFiles = useCallback(
|
|
2751
|
+
(newFiles) => {
|
|
2594
2752
|
if (!newFiles) return;
|
|
2595
2753
|
setErrorMessage(null);
|
|
2596
2754
|
const filesArray = Array.from(newFiles);
|
|
@@ -2598,52 +2756,107 @@ const FileUpload = React.forwardRef(
|
|
|
2598
2756
|
const validFiles = filesArray.filter((f) => f.size <= maxSize);
|
|
2599
2757
|
if (oversized.length > 0) {
|
|
2600
2758
|
const limitMB = (maxSize / 1024 / 1024).toFixed(0);
|
|
2601
|
-
setErrorMessage(
|
|
2759
|
+
setErrorMessage(
|
|
2760
|
+
`${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`
|
|
2761
|
+
);
|
|
2602
2762
|
onError == null ? void 0 : onError(oversized, "size");
|
|
2603
2763
|
}
|
|
2604
2764
|
const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
|
|
2605
2765
|
const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
|
|
2606
2766
|
if (countRejected.length > 0) {
|
|
2607
|
-
setErrorMessage(
|
|
2767
|
+
setErrorMessage(
|
|
2768
|
+
`Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`
|
|
2769
|
+
);
|
|
2608
2770
|
onError == null ? void 0 : onError(countRejected, "count");
|
|
2609
2771
|
}
|
|
2610
2772
|
setFiles(merged);
|
|
2611
2773
|
onFilesChange == null ? void 0 : onFilesChange(merged);
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2774
|
+
},
|
|
2775
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2776
|
+
[files, maxFiles, maxSize, onError, onFilesChange]
|
|
2777
|
+
);
|
|
2778
|
+
const handleDrag = useCallback((e) => {
|
|
2779
|
+
e.preventDefault();
|
|
2780
|
+
e.stopPropagation();
|
|
2781
|
+
if (e.type === "dragenter" || e.type === "dragover") {
|
|
2782
|
+
setDragActive(true);
|
|
2783
|
+
} else if (e.type === "dragleave") {
|
|
2784
|
+
setDragActive(false);
|
|
2785
|
+
}
|
|
2786
|
+
}, []);
|
|
2787
|
+
const handleDrop = useCallback(
|
|
2788
|
+
(e) => {
|
|
2623
2789
|
e.preventDefault();
|
|
2624
2790
|
e.stopPropagation();
|
|
2625
2791
|
setDragActive(false);
|
|
2626
2792
|
if (disabled) return;
|
|
2627
2793
|
handleFiles(e.dataTransfer.files);
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2794
|
+
},
|
|
2795
|
+
[disabled, handleFiles]
|
|
2796
|
+
);
|
|
2797
|
+
const handleChange = useCallback(
|
|
2798
|
+
(e) => {
|
|
2630
2799
|
e.preventDefault();
|
|
2631
2800
|
if (disabled) return;
|
|
2632
2801
|
handleFiles(e.target.files);
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2802
|
+
},
|
|
2803
|
+
[disabled, handleFiles]
|
|
2804
|
+
);
|
|
2805
|
+
const removeFile = useCallback(
|
|
2806
|
+
(index) => {
|
|
2807
|
+
setFiles((prev) => {
|
|
2808
|
+
const updated = prev.filter((_, i) => i !== index);
|
|
2809
|
+
onFilesChange == null ? void 0 : onFilesChange(updated);
|
|
2810
|
+
if (updated.length === 0) setErrorMessage(null);
|
|
2811
|
+
return updated;
|
|
2812
|
+
});
|
|
2813
|
+
},
|
|
2814
|
+
[onFilesChange]
|
|
2815
|
+
);
|
|
2816
|
+
const openFileDialog = useCallback(() => {
|
|
2817
|
+
var _a;
|
|
2818
|
+
if (!disabled) {
|
|
2819
|
+
setErrorMessage(null);
|
|
2820
|
+
(_a = inputRef.current) == null ? void 0 : _a.click();
|
|
2821
|
+
}
|
|
2822
|
+
}, [disabled]);
|
|
2823
|
+
return {
|
|
2824
|
+
files,
|
|
2825
|
+
dragActive,
|
|
2826
|
+
errorMessage,
|
|
2827
|
+
inputRef,
|
|
2828
|
+
handleFiles,
|
|
2829
|
+
handleDrag,
|
|
2830
|
+
handleDrop,
|
|
2831
|
+
handleChange,
|
|
2832
|
+
removeFile,
|
|
2833
|
+
openFileDialog
|
|
2834
|
+
};
|
|
2835
|
+
}
|
|
2836
|
+
const FileUpload = React.forwardRef(
|
|
2837
|
+
({
|
|
2838
|
+
className,
|
|
2839
|
+
onFilesChange,
|
|
2840
|
+
maxFiles = 1,
|
|
2841
|
+
maxSize = 5 * 1024 * 1024,
|
|
2842
|
+
// 5MB default
|
|
2843
|
+
showPreview = true,
|
|
2844
|
+
onError,
|
|
2845
|
+
accept,
|
|
2846
|
+
disabled,
|
|
2847
|
+
...props
|
|
2848
|
+
}, ref) => {
|
|
2849
|
+
const {
|
|
2850
|
+
files,
|
|
2851
|
+
dragActive,
|
|
2852
|
+
errorMessage,
|
|
2853
|
+
inputRef,
|
|
2854
|
+
handleDrag,
|
|
2855
|
+
handleDrop,
|
|
2856
|
+
handleChange,
|
|
2857
|
+
removeFile,
|
|
2858
|
+
openFileDialog
|
|
2859
|
+
} = useFileUpload({ maxFiles, maxSize, onFilesChange, onError, disabled });
|
|
2647
2860
|
return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
|
|
2648
2861
|
/* @__PURE__ */ jsxs(
|
|
2649
2862
|
"div",
|
|
@@ -2921,7 +3134,7 @@ const Search = React.forwardRef(
|
|
|
2921
3134
|
}
|
|
2922
3135
|
);
|
|
2923
3136
|
Search.displayName = "Search";
|
|
2924
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
|
|
3137
|
+
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" };
|
|
2925
3138
|
const RouteMapContent = React__default.forwardRef(
|
|
2926
3139
|
({ apiKey, ...props }, ref) => {
|
|
2927
3140
|
const { isLoaded, loadError, load } = useGoogleMapsLoader();
|
|
@@ -3098,7 +3311,7 @@ RouteMapContent.displayName = "RouteMapContent";
|
|
|
3098
3311
|
const RouteMap = React__default.forwardRef(
|
|
3099
3312
|
(props, ref) => {
|
|
3100
3313
|
const { isLoaded, loadError } = useGoogleMapsLoader();
|
|
3101
|
-
const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ &&
|
|
3314
|
+
const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
|
|
3102
3315
|
const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
|
|
3103
3316
|
if (isLoaded || isValidKey || loadError) {
|
|
3104
3317
|
return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
|
|
@@ -3319,8 +3532,12 @@ export {
|
|
|
3319
3532
|
TreeView as ba,
|
|
3320
3533
|
navigationMenuTriggerStyle as bb,
|
|
3321
3534
|
toggleVariants as bc,
|
|
3322
|
-
|
|
3323
|
-
|
|
3535
|
+
useFileUpload as bd,
|
|
3536
|
+
useFormField as be,
|
|
3537
|
+
usePagination as bf,
|
|
3538
|
+
useStepper as bg,
|
|
3539
|
+
useStepperContext as bh,
|
|
3540
|
+
useTreeView as bi,
|
|
3324
3541
|
AccordionTrigger as c,
|
|
3325
3542
|
AspectRatio as d,
|
|
3326
3543
|
AssistantChart as e,
|
|
@@ -11,7 +11,7 @@ const TogglePrimitive = require("@radix-ui/react-toggle");
|
|
|
11
11
|
const inputOtp = require("input-otp");
|
|
12
12
|
const reactSlot = require("@radix-ui/react-slot");
|
|
13
13
|
const reactHookForm = require("react-hook-form");
|
|
14
|
-
const alertDialog = require("./alert-dialog-
|
|
14
|
+
const alertDialog = require("./alert-dialog-DSKByiKZ.cjs");
|
|
15
15
|
const reactDayPicker = require("react-day-picker");
|
|
16
16
|
const DialogPrimitive = require("@radix-ui/react-dialog");
|
|
17
17
|
const vaul = require("vaul");
|
|
@@ -24,7 +24,7 @@ const card = require("./card-DJTsYhLL.cjs");
|
|
|
24
24
|
const CollapsiblePrimitive = require("@radix-ui/react-collapsible");
|
|
25
25
|
const AccordionPrimitive = require("@radix-ui/react-accordion");
|
|
26
26
|
const useEmblaCarousel = require("embla-carousel-react");
|
|
27
|
-
const googleMapsLoader = require("./google-maps-loader-
|
|
27
|
+
const googleMapsLoader = require("./google-maps-loader-Y-QkD-Li.cjs");
|
|
28
28
|
const RechartsPrimitive = require("recharts");
|
|
29
29
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
30
30
|
function _interopNamespaceDefault(e) {
|
|
@@ -2939,7 +2939,7 @@ const Search = React__namespace.forwardRef(
|
|
|
2939
2939
|
}
|
|
2940
2940
|
);
|
|
2941
2941
|
Search.displayName = "Search";
|
|
2942
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
|
|
2942
|
+
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" };
|
|
2943
2943
|
const RouteMapContent = React.forwardRef(
|
|
2944
2944
|
({ apiKey, ...props }, ref) => {
|
|
2945
2945
|
const { isLoaded, loadError, load } = googleMapsLoader.useGoogleMapsLoader();
|
|
@@ -3116,7 +3116,7 @@ RouteMapContent.displayName = "RouteMapContent";
|
|
|
3116
3116
|
const RouteMap = React.forwardRef(
|
|
3117
3117
|
(props, ref) => {
|
|
3118
3118
|
const { isLoaded, loadError } = googleMapsLoader.useGoogleMapsLoader();
|
|
3119
|
-
const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("AssistantChart-
|
|
3119
|
+
const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("AssistantChart-DoZCyS5r.cjs", document.baseURI).href } !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
|
|
3120
3120
|
const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
|
|
3121
3121
|
if (isLoaded || isValidKey || loadError) {
|
|
3122
3122
|
return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
|