xertica-ui 1.6.1 → 1.7.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.
- package/CHANGELOG.md +14 -0
- package/bin/cli.ts +3 -3
- package/bin/generate-tokens.ts +24 -0
- package/components/{CodeBlock.tsx → assistant/code-block/CodeBlock.tsx} +2 -1
- package/components/assistant/code-block/code-block.mdx +38 -0
- package/components/assistant/code-block/code-block.stories.tsx +57 -0
- package/components/assistant/code-block/index.ts +1 -0
- package/components/{FormattedDocument.tsx → assistant/formatted-document/FormattedDocument.tsx} +3 -3
- package/components/assistant/formatted-document/formatted-document.mdx +31 -0
- package/components/assistant/formatted-document/formatted-document.stories.tsx +51 -0
- package/components/assistant/formatted-document/index.ts +1 -0
- package/components/assistant/markdown-message/index.ts +1 -0
- package/components/assistant/markdown-message/markdown-message.mdx +44 -0
- package/components/assistant/markdown-message/markdown-message.stories.tsx +50 -0
- package/components/{ModernChatInput.tsx → assistant/modern-chat-input/ModernChatInput.tsx} +8 -2
- package/components/assistant/modern-chat-input/index.ts +1 -0
- package/components/assistant/modern-chat-input/modern-chat-input.mdx +38 -0
- package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +52 -0
- package/components/assistant/xertica-assistant/index.ts +1 -0
- package/components/assistant/xertica-assistant/xertica-assistant.mdx +39 -0
- package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +74 -0
- package/components/{ui → assistant/xertica-assistant}/xertica-assistant.tsx +28 -18
- package/components/{AudioPlayer.tsx → blocks/audio-player/AudioPlayer.tsx} +243 -225
- package/components/blocks/audio-player/audio-player.mdx +31 -0
- package/components/blocks/audio-player/audio-player.stories.tsx +36 -0
- package/components/blocks/audio-player/index.ts +1 -0
- package/components/{DocumentEditor.tsx → blocks/document-editor/DocumentEditor.tsx} +9 -2
- package/components/blocks/document-editor/document-editor.mdx +31 -0
- package/components/blocks/document-editor/document-editor.stories.tsx +38 -0
- package/components/blocks/document-editor/index.ts +1 -0
- package/components/{PodcastPlayer.tsx → blocks/podcast-player/PodcastPlayer.tsx} +105 -76
- package/components/blocks/podcast-player/index.ts +1 -0
- package/components/blocks/podcast-player/podcast-player.mdx +38 -0
- package/components/blocks/podcast-player/podcast-player.stories.tsx +55 -0
- package/components/brand/branding/branding.stories.tsx +55 -0
- package/components/brand/language-selector/LanguageSelector.tsx +61 -0
- package/components/brand/language-selector/index.ts +1 -0
- package/components/brand/language-selector/language-selector.mdx +57 -0
- package/components/brand/language-selector/language-selector.stories.tsx +28 -0
- package/components/{ThemeToggle.tsx → brand/theme-toggle/ThemeToggle.tsx} +84 -84
- package/components/brand/theme-toggle/index.ts +1 -0
- package/components/brand/theme-toggle/theme-toggle.mdx +47 -0
- package/components/brand/theme-toggle/theme-toggle.stories.tsx +34 -0
- package/components/{XerticaLogo.tsx → brand/xertica-logo/XerticaLogo.tsx} +1 -0
- package/components/brand/xertica-logo/index.ts +1 -0
- package/components/{XerticaOrbe.tsx → brand/xertica-orbe/XerticaOrbe.tsx} +2 -1
- package/components/brand/xertica-orbe/index.ts +1 -0
- package/components/brand/xertica-orbe/xertica-orbe.mdx +38 -0
- package/components/brand/xertica-orbe/xertica-orbe.stories.tsx +40 -0
- package/components/brand/xertica-provider/XerticaProvider.tsx +47 -0
- package/components/brand/xertica-provider/index.ts +1 -0
- package/components/brand/xertica-provider/xertica-provider.mdx +55 -0
- package/components/brand/xertica-xlogo/index.ts +1 -0
- package/components/examples/ApiKeyMapExample.tsx +1 -0
- package/components/examples/DrawingMapExample.tsx +1 -1
- package/components/examples/FilterableMapExample.tsx +1 -1
- package/components/examples/MapGmpExample.tsx +2 -1
- package/components/examples/MapShowcase.tsx +2 -0
- package/components/examples/SidebarLogoExample.tsx +1 -1
- package/components/index.ts +75 -75
- package/components/layout/header/header.mdx +73 -0
- package/components/layout/header/header.stories.tsx +104 -0
- package/components/{Header.tsx → layout/header/header.tsx} +38 -29
- package/components/layout/header/index.ts +1 -0
- package/components/layout/sidebar/index.ts +1 -0
- package/components/layout/sidebar/sidebar.mdx +91 -0
- package/components/layout/sidebar/sidebar.stories.tsx +233 -0
- package/components/{Sidebar.tsx → layout/sidebar/sidebar.tsx} +98 -41
- package/components/layout/sidebar-primitive/index.ts +1 -0
- package/components/{ui/sidebar.tsx → layout/sidebar-primitive/sidebar-primitive.tsx} +9 -8
- package/components/media/AudioPlayer.tsx +19 -13
- package/components/media/FloatingMediaWrapper.tsx +5 -1
- package/components/media/VideoPlayer.tsx +7 -1
- package/components/{ForgotPasswordPage.tsx → pages/forgot-password-page/ForgotPasswordPage.tsx} +6 -6
- package/components/pages/forgot-password-page/index.ts +1 -0
- package/components/{HomeContent.tsx → pages/home-content/HomeContent.tsx} +10 -10
- package/components/pages/home-content/index.ts +1 -0
- package/components/{HomePage.tsx → pages/home-page/HomePage.tsx} +7 -7
- package/components/pages/home-page/index.ts +1 -0
- package/components/pages/login-page/LoginPage.mdx +31 -0
- package/components/pages/login-page/LoginPage.stories.tsx +39 -0
- package/components/{LoginPage.tsx → pages/login-page/LoginPage.tsx} +6 -6
- package/components/pages/login-page/index.ts +1 -0
- package/components/{ResetPasswordPage.tsx → pages/reset-password-page/ResetPasswordPage.tsx} +6 -6
- package/components/pages/reset-password-page/index.ts +1 -0
- package/components/{TemplateContent.tsx → pages/template-content/TemplateContent.tsx} +44 -37
- package/components/pages/template-content/index.ts +1 -0
- package/components/{TemplatePage.tsx → pages/template-page/TemplatePage.tsx} +5 -5
- package/components/pages/template-page/index.ts +1 -0
- package/components/{VerifyEmailPage.tsx → pages/verify-email-page/VerifyEmailPage.tsx} +4 -4
- package/components/pages/verify-email-page/index.ts +1 -0
- package/components/{assistant-utils.ts → shared/assistant-utils.ts} +51 -12
- package/components/ui/accordion/accordion.mdx +41 -0
- package/components/ui/accordion/accordion.stories.tsx +76 -0
- package/components/ui/{accordion.tsx → accordion/accordion.tsx} +1 -1
- package/components/ui/accordion/index.ts +1 -0
- package/components/ui/alert/alert.mdx +45 -0
- package/components/ui/alert/alert.stories.tsx +89 -0
- package/components/ui/alert/alert.tsx +116 -0
- package/components/ui/alert/index.ts +1 -0
- package/components/ui/alert-dialog/alert-dialog.mdx +31 -0
- package/components/ui/alert-dialog/alert-dialog.stories.tsx +47 -0
- package/components/ui/{alert-dialog.tsx → alert-dialog/alert-dialog.tsx} +2 -2
- package/components/ui/alert-dialog/index.ts +1 -0
- package/components/ui/aspect-ratio/aspect-ratio.mdx +37 -0
- package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +45 -0
- package/components/ui/aspect-ratio/index.ts +1 -0
- package/components/ui/{AssistantChart.tsx → assistant-chart/AssistantChart.tsx} +1 -1
- package/components/ui/assistant-chart/assistant-chart.mdx +30 -0
- package/components/ui/assistant-chart/assistant-chart.stories.tsx +43 -0
- package/components/ui/assistant-chart/index.ts +1 -0
- package/components/ui/avatar/avatar.mdx +46 -0
- package/components/ui/avatar/avatar.stories.tsx +57 -0
- package/components/ui/{avatar.tsx → avatar/avatar.tsx} +1 -1
- package/components/ui/avatar/index.ts +1 -0
- package/components/ui/badge/badge.mdx +43 -0
- package/components/ui/badge/badge.stories.tsx +56 -0
- package/components/ui/{badge.tsx → badge/badge.tsx} +1 -1
- package/components/ui/badge/index.ts +1 -0
- package/components/ui/breadcrumb/breadcrumb.mdx +38 -0
- package/components/ui/breadcrumb/breadcrumb.stories.tsx +89 -0
- package/components/ui/{breadcrumb.tsx → breadcrumb/breadcrumb.tsx} +1 -1
- package/components/ui/breadcrumb/index.ts +1 -0
- package/components/ui/button/button.mdx +73 -0
- package/components/ui/button/button.stories.tsx +125 -0
- package/components/ui/{button.tsx → button/button.tsx} +1 -1
- package/components/ui/button/index.ts +1 -0
- package/components/ui/calendar/calendar.mdx +45 -0
- package/components/ui/calendar/calendar.stories.tsx +81 -0
- package/components/ui/{calendar.tsx → calendar/calendar.tsx} +5 -3
- package/components/ui/calendar/index.ts +1 -0
- package/components/ui/card/card.mdx +45 -0
- package/components/ui/card/card.stories.tsx +103 -0
- package/components/ui/{card.tsx → card/card.tsx} +1 -1
- package/components/ui/card/index.ts +1 -0
- package/components/ui/carousel/carousel.mdx +38 -0
- package/components/ui/carousel/carousel.stories.tsx +71 -0
- package/components/ui/{carousel.tsx → carousel/carousel.tsx} +2 -2
- package/components/ui/carousel/index.ts +1 -0
- package/components/ui/chart/chart.mdx +38 -0
- package/components/ui/chart/chart.stories.tsx +91 -0
- package/components/ui/{chart.tsx → chart/chart.tsx} +1 -1
- package/components/ui/chart/index.ts +1 -0
- package/components/ui/checkbox/checkbox.mdx +38 -0
- package/components/ui/checkbox/checkbox.stories.tsx +59 -0
- package/components/ui/{checkbox.tsx → checkbox/checkbox.tsx} +1 -1
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/collapsible/collapsible.mdx +30 -0
- package/components/ui/collapsible/collapsible.stories.tsx +53 -0
- package/components/ui/collapsible/index.ts +1 -0
- package/components/ui/command/command.mdx +38 -0
- package/components/ui/command/command.stories.tsx +140 -0
- package/components/ui/{command.tsx → command/command.tsx} +2 -2
- package/components/ui/command/index.ts +1 -0
- package/components/ui/context-menu/context-menu.mdx +31 -0
- package/components/ui/context-menu/context-menu.stories.tsx +77 -0
- package/components/ui/{context-menu.tsx → context-menu/context-menu.tsx} +1 -1
- package/components/ui/context-menu/index.ts +1 -0
- package/components/ui/dialog/dialog.mdx +38 -0
- package/components/ui/dialog/dialog.stories.tsx +91 -0
- package/components/ui/{dialog.tsx → dialog/dialog.tsx} +1 -1
- package/components/ui/dialog/index.ts +1 -0
- package/components/ui/drawer/drawer.mdx +31 -0
- package/components/ui/drawer/drawer.stories.tsx +57 -0
- package/components/ui/{drawer.tsx → drawer/drawer.tsx} +1 -1
- package/components/ui/drawer/index.ts +1 -0
- package/components/ui/dropdown-menu/dropdown-menu.mdx +40 -0
- package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +144 -0
- package/components/ui/{dropdown-menu.tsx → dropdown-menu/dropdown-menu.tsx} +1 -1
- package/components/ui/dropdown-menu/index.ts +1 -0
- package/components/ui/empty/empty.mdx +45 -0
- package/components/ui/empty/empty.stories.tsx +63 -0
- package/components/ui/{empty.tsx → empty/empty.tsx} +1 -1
- package/components/ui/empty/index.ts +1 -0
- package/components/ui/file-upload/file-upload.mdx +38 -0
- package/components/ui/file-upload/file-upload.stories.tsx +52 -0
- package/components/ui/{file-upload.tsx → file-upload/file-upload.tsx} +2 -2
- package/components/ui/file-upload/index.ts +1 -0
- package/components/ui/form/form.mdx +20 -0
- package/components/ui/form/form.stories.tsx +86 -0
- package/components/ui/{form.tsx → form/form.tsx} +2 -2
- package/components/ui/form/index.ts +1 -0
- package/components/ui/{google-maps-loader.tsx → google-maps-loader/google-maps-loader.tsx} +1 -1
- package/components/ui/google-maps-loader/index.ts +1 -0
- package/components/ui/hover-card/hover-card.mdx +31 -0
- package/components/ui/hover-card/hover-card.stories.tsx +50 -0
- package/components/ui/{hover-card.tsx → hover-card/hover-card.tsx} +1 -1
- package/components/ui/hover-card/index.ts +1 -0
- package/components/ui/index.ts +3 -32
- package/components/ui/input/index.ts +1 -0
- package/components/ui/input/input.mdx +60 -0
- package/components/ui/input/input.stories.tsx +78 -0
- package/components/ui/{input.tsx → input/input.tsx} +1 -1
- package/components/ui/input-otp/index.ts +1 -0
- package/components/ui/input-otp/input-otp.mdx +38 -0
- package/components/ui/input-otp/input-otp.stories.tsx +70 -0
- package/components/ui/{input-otp.tsx → input-otp/input-otp.tsx} +1 -1
- package/components/ui/label/index.ts +1 -0
- package/components/ui/label/label.mdx +37 -0
- package/components/ui/label/label.stories.tsx +33 -0
- package/components/ui/{label.tsx → label/label.tsx} +1 -1
- package/components/ui/map/index.ts +1 -0
- package/components/ui/map/map.mdx +38 -0
- package/components/ui/map/map.stories.tsx +65 -0
- package/components/ui/{map.tsx → map/map.tsx} +3 -3
- package/components/ui/map-config/index.ts +1 -0
- package/components/ui/map-layers/index.ts +1 -0
- package/components/ui/{map-layers.tsx → map-layers/map-layers.tsx} +1 -1
- package/components/ui/map.exports/index.ts +1 -0
- package/components/ui/map.exports/map.exports.ts +31 -0
- package/components/ui/menubar/index.ts +1 -0
- package/components/ui/menubar/menubar.mdx +31 -0
- package/components/ui/menubar/menubar.stories.tsx +115 -0
- package/components/ui/{menubar.tsx → menubar/menubar.tsx} +1 -1
- package/components/ui/navigation-menu/index.ts +1 -0
- package/components/ui/navigation-menu/navigation-menu.mdx +31 -0
- package/components/ui/navigation-menu/navigation-menu.stories.tsx +113 -0
- package/components/ui/{navigation-menu.tsx → navigation-menu/navigation-menu.tsx} +1 -1
- package/components/ui/notification-badge/index.ts +1 -0
- package/components/ui/notification-badge/notification-badge.mdx +38 -0
- package/components/ui/notification-badge/notification-badge.stories.tsx +74 -0
- package/components/ui/{notification-badge.tsx → notification-badge/notification-badge.tsx} +1 -1
- package/components/ui/page-header/index.ts +1 -0
- package/components/ui/page-header/page-header.mdx +43 -0
- package/components/ui/page-header/page-header.stories.tsx +68 -0
- package/components/ui/page-header/page-header.tsx +121 -0
- package/components/ui/pagination/index.ts +1 -0
- package/components/ui/pagination/pagination.mdx +38 -0
- package/components/ui/pagination/pagination.stories.tsx +85 -0
- package/components/ui/{pagination.tsx → pagination/pagination.tsx} +2 -2
- package/components/ui/popover/index.ts +1 -0
- package/components/ui/popover/popover.mdx +38 -0
- package/components/ui/popover/popover.stories.tsx +67 -0
- package/components/ui/{popover.tsx → popover/popover.tsx} +1 -1
- package/components/ui/progress/index.ts +1 -0
- package/components/ui/progress/progress.mdx +33 -0
- package/components/ui/progress/progress.stories.tsx +38 -0
- package/components/ui/{progress.tsx → progress/progress.tsx} +1 -1
- package/components/ui/radio-group/index.ts +1 -0
- package/components/ui/radio-group/radio-group.mdx +38 -0
- package/components/ui/radio-group/radio-group.stories.tsx +46 -0
- package/components/ui/{radio-group.tsx → radio-group/radio-group.tsx} +1 -1
- package/components/ui/rating/index.ts +1 -0
- package/components/ui/rating/rating.mdx +38 -0
- package/components/ui/rating/rating.stories.tsx +49 -0
- package/components/ui/{rating.tsx → rating/rating.tsx} +1 -1
- package/components/ui/resizable/index.ts +1 -0
- package/components/ui/resizable/resizable.mdx +38 -0
- package/components/ui/resizable/resizable.stories.tsx +100 -0
- package/components/ui/{resizable.tsx → resizable/resizable.tsx} +1 -1
- package/components/ui/rich-text-editor/index.ts +1 -0
- package/components/ui/rich-text-editor/rich-text-editor.mdx +31 -0
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +48 -0
- package/components/ui/{rich-text-editor.tsx → rich-text-editor/rich-text-editor.tsx} +14 -11
- package/components/ui/route-map/index.ts +1 -0
- package/components/ui/route-map/route-map.mdx +38 -0
- package/components/ui/route-map/route-map.stories.tsx +47 -0
- package/components/ui/{route-map.tsx → route-map/route-map.tsx} +2 -2
- package/components/ui/scroll-area/index.ts +1 -0
- package/components/ui/scroll-area/scroll-area.mdx +30 -0
- package/components/ui/scroll-area/scroll-area.stories.tsx +34 -0
- package/components/ui/{scroll-area.tsx → scroll-area/scroll-area.tsx} +1 -1
- package/components/ui/search/index.ts +1 -0
- package/components/ui/search/search.mdx +38 -0
- package/components/ui/search/search.stories.tsx +46 -0
- package/components/ui/{search.tsx → search/search.tsx} +3 -1
- package/components/ui/select/index.ts +1 -0
- package/components/ui/select/select.mdx +38 -0
- package/components/ui/select/select.stories.tsx +86 -0
- package/components/ui/{select.tsx → select/select.tsx} +1 -1
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/separator/separator.mdx +37 -0
- package/components/ui/separator/separator.stories.tsx +44 -0
- package/components/ui/{separator.tsx → separator/separator.tsx} +1 -1
- package/components/ui/sheet/index.ts +1 -0
- package/components/ui/sheet/sheet.mdx +38 -0
- package/components/ui/sheet/sheet.stories.tsx +82 -0
- package/components/ui/{sheet.tsx → sheet/sheet.tsx} +1 -1
- package/components/ui/simple-map/index.ts +1 -0
- package/components/ui/simple-map/simple-map.mdx +37 -0
- package/components/ui/simple-map/simple-map.stories.tsx +42 -0
- package/components/ui/{simple-map.tsx → simple-map/simple-map.tsx} +1 -1
- package/components/ui/skeleton/index.ts +1 -0
- package/components/ui/skeleton/skeleton.mdx +37 -0
- package/components/ui/skeleton/skeleton.stories.tsx +35 -0
- package/components/ui/{skeleton.tsx → skeleton/skeleton.tsx} +1 -1
- package/components/ui/slider/index.ts +1 -0
- package/components/ui/slider/slider.mdx +38 -0
- package/components/ui/slider/slider.stories.tsx +43 -0
- package/components/ui/{slider.tsx → slider/slider.tsx} +1 -1
- package/components/ui/sonner/index.ts +1 -0
- package/components/ui/sonner/sonner.mdx +31 -0
- package/components/ui/sonner/sonner.stories.tsx +46 -0
- package/components/ui/stats-card/index.ts +1 -0
- package/components/ui/stats-card/stats-card.mdx +38 -0
- package/components/ui/stats-card/stats-card.stories.tsx +76 -0
- package/components/ui/{stats-card.tsx → stats-card/stats-card.tsx} +2 -2
- package/components/ui/stepper/index.ts +1 -0
- package/components/ui/stepper/stepper.mdx +31 -0
- package/components/ui/stepper/stepper.stories.tsx +57 -0
- package/components/ui/{stepper.tsx → stepper/stepper.tsx} +1 -1
- package/components/ui/switch/index.ts +1 -0
- package/components/ui/switch/switch.mdx +37 -0
- package/components/ui/switch/switch.stories.tsx +30 -0
- package/components/ui/{switch.tsx → switch/switch.tsx} +1 -1
- package/components/ui/table/index.ts +1 -0
- package/components/ui/table/table.mdx +32 -0
- package/components/ui/table/table.stories.tsx +108 -0
- package/components/ui/{table.tsx → table/table.tsx} +1 -1
- package/components/ui/tabs/index.ts +1 -0
- package/components/ui/tabs/tabs.mdx +38 -0
- package/components/ui/tabs/tabs.stories.tsx +94 -0
- package/components/ui/{tabs.tsx → tabs/tabs.tsx} +1 -1
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/textarea/textarea.mdx +30 -0
- package/components/ui/textarea/textarea.stories.tsx +34 -0
- package/components/ui/{textarea.tsx → textarea/textarea.tsx} +1 -1
- package/components/ui/timeline/index.ts +1 -0
- package/components/ui/timeline/timeline.mdx +31 -0
- package/components/ui/timeline/timeline.stories.tsx +56 -0
- package/components/ui/{timeline.tsx → timeline/timeline.tsx} +1 -1
- package/components/ui/toggle/index.ts +1 -0
- package/components/ui/toggle/toggle.mdx +38 -0
- package/components/ui/toggle/toggle.stories.tsx +55 -0
- package/components/ui/{toggle.tsx → toggle/toggle.tsx} +1 -1
- package/components/ui/toggle-group/index.ts +1 -0
- package/components/ui/toggle-group/toggle-group.mdx +38 -0
- package/components/ui/toggle-group/toggle-group.stories.tsx +65 -0
- package/components/ui/{toggle-group.tsx → toggle-group/toggle-group.tsx} +2 -2
- package/components/ui/tooltip/index.ts +1 -0
- package/components/ui/tooltip/tooltip.mdx +45 -0
- package/components/ui/tooltip/tooltip.stories.tsx +74 -0
- package/components/ui/{tooltip.tsx → tooltip/tooltip.tsx} +1 -1
- package/components/ui/tree-view/index.ts +1 -0
- package/components/ui/tree-view/tree-view.mdx +31 -0
- package/components/ui/tree-view/tree-view.stories.tsx +59 -0
- package/components/ui/{tree-view.tsx → tree-view/tree-view.tsx} +1 -1
- package/components.json +451 -349
- package/dist/cli.js +27 -4
- package/dist/components/assistant/code-block/CodeBlock.d.ts +28 -0
- package/dist/components/assistant/code-block/index.d.ts +1 -0
- package/dist/components/assistant/formatted-document/FormattedDocument.d.ts +25 -0
- package/dist/components/assistant/formatted-document/index.d.ts +1 -0
- package/dist/components/assistant/markdown-message/MarkdownMessage.d.ts +24 -0
- package/dist/components/assistant/markdown-message/index.d.ts +1 -0
- package/dist/components/assistant/modern-chat-input/ModernChatInput.d.ts +44 -0
- package/dist/components/assistant/modern-chat-input/index.d.ts +1 -0
- package/dist/components/assistant/xertica-assistant/index.d.ts +1 -0
- package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +242 -0
- 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/brand/language-selector/LanguageSelector.d.ts +16 -0
- package/dist/components/brand/language-selector/index.d.ts +1 -0
- package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +8 -0
- package/dist/components/brand/theme-toggle/index.d.ts +1 -0
- package/dist/components/brand/xertica-logo/XerticaLogo.d.ts +24 -0
- package/dist/components/brand/xertica-logo/index.d.ts +1 -0
- package/dist/components/brand/xertica-orbe/XerticaOrbe.d.ts +23 -0
- package/dist/components/brand/xertica-orbe/index.d.ts +1 -0
- package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +29 -0
- package/dist/components/brand/xertica-provider/index.d.ts +1 -0
- package/dist/components/brand/xertica-xlogo/XerticaXLogo.d.ts +23 -0
- package/dist/components/brand/xertica-xlogo/index.d.ts +1 -0
- package/dist/components/index.d.ts +21 -21
- package/dist/components/layout/header/header.d.ts +72 -0
- package/dist/components/layout/header/index.d.ts +1 -0
- package/dist/components/layout/sidebar/index.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +128 -0
- package/dist/components/layout/sidebar-primitive/index.d.ts +1 -0
- package/dist/components/layout/sidebar-primitive/sidebar-primitive.d.ts +69 -0
- package/dist/components/pages/forgot-password-page/ForgotPasswordPage.d.ts +13 -0
- package/dist/components/pages/forgot-password-page/index.d.ts +1 -0
- package/dist/components/pages/home-content/HomeContent.d.ts +20 -0
- package/dist/components/pages/home-content/index.d.ts +1 -0
- package/dist/components/pages/home-page/HomePage.d.ts +26 -0
- package/dist/components/pages/home-page/index.d.ts +1 -0
- package/dist/components/pages/login-page/LoginPage.d.ts +25 -0
- package/dist/components/pages/login-page/index.d.ts +1 -0
- package/dist/components/pages/reset-password-page/ResetPasswordPage.d.ts +14 -0
- package/dist/components/pages/reset-password-page/index.d.ts +1 -0
- package/dist/components/pages/template-content/TemplateContent.d.ts +19 -0
- package/dist/components/pages/template-content/index.d.ts +1 -0
- package/dist/components/pages/template-page/TemplatePage.d.ts +24 -0
- package/dist/components/pages/template-page/index.d.ts +1 -0
- package/dist/components/pages/verify-email-page/VerifyEmailPage.d.ts +14 -0
- package/dist/components/pages/verify-email-page/index.d.ts +1 -0
- package/dist/components/shared/assistant-utils.d.ts +22 -0
- package/dist/components/shared/layout-constants.d.ts +8 -0
- package/dist/components/shared/use-mobile.d.ts +2 -0
- package/dist/components/shared/utils.d.ts +2 -0
- package/dist/components/ui/accordion/accordion.d.ts +20 -0
- package/dist/components/ui/accordion/index.d.ts +1 -0
- package/dist/components/ui/alert/alert.d.ts +26 -0
- package/dist/components/ui/alert/index.d.ts +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +26 -0
- package/dist/components/ui/alert-dialog/index.d.ts +1 -0
- package/dist/components/ui/aspect-ratio/aspect-ratio.d.ts +14 -0
- package/dist/components/ui/aspect-ratio/index.d.ts +1 -0
- package/dist/components/ui/assistant-chart/AssistantChart.d.ts +7 -0
- package/dist/components/ui/assistant-chart/index.d.ts +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +20 -0
- package/dist/components/ui/avatar/index.d.ts +1 -0
- package/dist/components/ui/badge/badge.d.ts +22 -0
- package/dist/components/ui/badge/index.d.ts +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts +23 -0
- package/dist/components/ui/breadcrumb/index.d.ts +1 -0
- package/dist/components/ui/button/button.d.ts +37 -0
- package/dist/components/ui/button/index.d.ts +1 -0
- package/dist/components/ui/calendar/calendar.d.ts +20 -0
- package/dist/components/ui/calendar/index.d.ts +1 -0
- package/dist/components/ui/card/card.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +1 -0
- package/dist/components/ui/carousel/carousel.d.ts +31 -0
- package/dist/components/ui/carousel/index.d.ts +1 -0
- package/dist/components/ui/chart/chart.d.ts +55 -0
- package/dist/components/ui/chart/index.d.ts +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +16 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +16 -0
- package/dist/components/ui/collapsible/index.d.ts +1 -0
- package/dist/components/ui/command/command.d.ts +29 -0
- package/dist/components/ui/command/index.d.ts +1 -0
- package/dist/components/ui/context-menu/context-menu.d.ts +37 -0
- package/dist/components/ui/context-menu/index.d.ts +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +33 -0
- package/dist/components/ui/dialog/index.d.ts +1 -0
- package/dist/components/ui/drawer/drawer.d.ts +26 -0
- package/dist/components/ui/drawer/index.d.ts +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +37 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
- package/dist/components/ui/empty/empty.d.ts +22 -0
- package/dist/components/ui/empty/index.d.ts +1 -0
- package/dist/components/ui/file-upload/file-upload.d.ts +24 -0
- package/dist/components/ui/file-upload/index.d.ts +1 -0
- package/dist/components/ui/form/form.d.ts +37 -0
- package/dist/components/ui/form/index.d.ts +1 -0
- package/dist/components/ui/google-maps-loader/google-maps-loader.d.ts +33 -0
- package/dist/components/ui/google-maps-loader/index.d.ts +1 -0
- package/dist/components/ui/hover-card/hover-card.d.ts +18 -0
- package/dist/components/ui/hover-card/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts +3 -6
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input/input.d.ts +25 -0
- package/dist/components/ui/input-otp/index.d.ts +1 -0
- package/dist/components/ui/input-otp/input-otp.d.ts +23 -0
- package/dist/components/ui/label/index.d.ts +1 -0
- package/dist/components/ui/label/label.d.ts +15 -0
- package/dist/components/ui/map/index.d.ts +1 -0
- package/dist/components/ui/map/map.d.ts +82 -0
- package/dist/components/ui/map-config/index.d.ts +1 -0
- package/dist/components/ui/map-config/map-config.d.ts +12 -0
- package/dist/components/ui/map-layers/index.d.ts +1 -0
- package/dist/components/ui/map-layers/map-layers.d.ts +48 -0
- package/dist/components/ui/map.exports/index.d.ts +1 -0
- package/dist/components/ui/map.exports/map.exports.d.ts +25 -0
- package/dist/components/ui/menubar/index.d.ts +1 -0
- package/dist/components/ui/menubar/menubar.d.ts +39 -0
- package/dist/components/ui/navigation-menu/index.d.ts +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts +26 -0
- package/dist/components/ui/notification-badge/index.d.ts +1 -0
- package/dist/components/ui/notification-badge/notification-badge.d.ts +24 -0
- package/dist/components/ui/page-header/index.d.ts +1 -0
- package/dist/components/ui/page-header/page-header.d.ts +51 -0
- package/dist/components/ui/pagination/index.d.ts +1 -0
- package/dist/components/ui/pagination/pagination.d.ts +25 -0
- package/dist/components/ui/popover/index.d.ts +1 -0
- package/dist/components/ui/popover/popover.d.ts +19 -0
- package/dist/components/ui/progress/index.d.ts +1 -0
- package/dist/components/ui/progress/progress.d.ts +15 -0
- package/dist/components/ui/radio-group/index.d.ts +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +17 -0
- package/dist/components/ui/rating/index.d.ts +1 -0
- package/dist/components/ui/rating/rating.d.ts +24 -0
- package/dist/components/ui/resizable/index.d.ts +1 -0
- package/dist/components/ui/resizable/resizable.d.ts +39 -0
- package/dist/components/ui/rich-text-editor/index.d.ts +1 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.d.ts +9 -0
- package/dist/components/ui/route-map/index.d.ts +1 -0
- package/dist/components/ui/route-map/route-map.d.ts +41 -0
- package/dist/components/ui/scroll-area/index.d.ts +1 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts +16 -0
- package/dist/components/ui/search/index.d.ts +1 -0
- package/dist/components/ui/search/search.d.ts +20 -0
- package/dist/components/ui/select/index.d.ts +1 -0
- package/dist/components/ui/select/select.d.ts +27 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/separator/separator.d.ts +15 -0
- package/dist/components/ui/sheet/index.d.ts +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +26 -0
- package/dist/components/ui/simple-map/index.d.ts +1 -0
- package/dist/components/ui/simple-map/simple-map.d.ts +57 -0
- package/dist/components/ui/skeleton/index.d.ts +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +14 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/slider/slider.d.ts +16 -0
- package/dist/components/ui/sonner/index.d.ts +1 -0
- package/dist/components/ui/sonner/sonner.d.ts +15 -0
- package/dist/components/ui/stats-card/index.d.ts +1 -0
- package/dist/components/ui/stats-card/stats-card.d.ts +29 -0
- package/dist/components/ui/stepper/index.d.ts +1 -0
- package/dist/components/ui/stepper/stepper.d.ts +31 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/switch/switch.d.ts +15 -0
- package/dist/components/ui/table/index.d.ts +1 -0
- package/dist/components/ui/table/table.d.ts +22 -0
- package/dist/components/ui/tabs/index.d.ts +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +19 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +15 -0
- package/dist/components/ui/timeline/index.d.ts +1 -0
- package/dist/components/ui/timeline/timeline.d.ts +24 -0
- package/dist/components/ui/toggle/index.d.ts +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +23 -0
- package/dist/components/ui/toggle-group/index.d.ts +1 -0
- package/dist/components/ui/toggle-group/toggle-group.d.ts +24 -0
- package/dist/components/ui/tooltip/index.d.ts +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +19 -0
- package/dist/components/ui/tree-view/index.d.ts +1 -0
- package/dist/components/ui/tree-view/tree-view.d.ts +28 -0
- package/dist/index.es.js +837 -2172
- package/dist/index.umd.js +836 -2171
- package/dist/xertica-ui.css +1 -1
- package/docs/architecture.md +24 -0
- package/docs/components/alert.md +108 -114
- package/docs/components/assistant-chart.md +46 -0
- package/docs/components/audio-player.md +72 -0
- package/docs/components/document-editor.md +69 -0
- package/docs/components/google-maps-loader.md +43 -0
- package/docs/components/header.md +116 -202
- package/docs/components/input.md +13 -0
- package/docs/components/language-selector.md +76 -0
- package/docs/components/markdown-message.md +47 -0
- package/docs/components/page-header.md +95 -170
- package/docs/components/podcast-player.md +84 -0
- package/docs/components/sidebar.md +89 -205
- package/docs/components/simple-map.md +49 -0
- package/docs/components/theme-toggle.md +72 -0
- package/docs/components/xertica-logo.md +35 -0
- package/docs/components/xertica-orbe.md +34 -0
- package/docs/components/xertica-provider.md +52 -0
- package/docs/components/xertica-xlogo.md +34 -0
- package/docs/getting-started.md +56 -10
- package/docs/installation.md +3 -6
- package/docs/layout.md +137 -171
- package/docs/llms.md +27 -2
- package/docs/patterns/dashboard.md +1 -32
- package/llms-full.txt +6740 -1942
- package/llms.txt +17 -7
- package/package.json +150 -136
- package/scripts/cleanup-case-dupes.ts +59 -0
- package/scripts/fix-stories.cjs +19 -0
- package/scripts/generate-ai-manifests.ts +38 -6
- package/styles/xertica/tokens.css +17 -0
- package/templates/package.json +2 -2
- package/templates/src/styles/index.css +91 -47
- package/templates/src/styles/xertica/tokens.css +17 -0
- package/components/LanguageSelector.tsx +0 -73
- package/components/XerticaProvider.tsx +0 -82
- package/components/ui/alert.tsx +0 -111
- package/components/ui/map.exports.ts +0 -31
- package/components/ui/page-header.tsx +0 -277
- /package/components/{MarkdownMessage.tsx → assistant/markdown-message/MarkdownMessage.tsx} +0 -0
- /package/components/{XerticaXLogo.tsx → brand/xertica-xlogo/XerticaXLogo.tsx} +0 -0
- /package/components/{layout-constants.ts → shared/layout-constants.ts} +0 -0
- /package/components/{ui → shared}/use-mobile.ts +0 -0
- /package/components/{ui → shared}/utils.ts +0 -0
- /package/components/ui/{aspect-ratio.tsx → aspect-ratio/aspect-ratio.tsx} +0 -0
- /package/components/ui/{collapsible.tsx → collapsible/collapsible.tsx} +0 -0
- /package/components/ui/{map-config.ts → map-config/map-config.ts} +0 -0
- /package/components/ui/{sonner.tsx → sonner/sonner.tsx} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [1.7.0] — 2026-04-23
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **CLI CSS Theme Import** — Corrected `@theme` → `@theme inline` in both the library's `index.css` and the generated template `src/styles/index.css`. Plain `@theme {}` was causing Tailwind v4 to resolve color tokens statically at build time using the library's defaults, preventing consumer `tokens.css` overrides from propagating into utility classes (`bg-destructive`, `bg-primary`, alert colors, etc.).
|
|
14
|
+
- **Dark Mode `--primary`** — Added missing `--primary: var(--xertica-primary)` in the dark mode block of `tokens.css` (library, template, and generator). Components using `bg-primary` were not picking up the dark mode brand color.
|
|
15
|
+
- **Dark Mode Chart Tokens** — Generator (`bin/generate-tokens.ts`) now includes `--chart-1` through `--chart-5` in the dark mode section for all generated `tokens.css` files.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **CLI `update` command** — `npx xertica-ui@latest update` prompts the user to select a new color theme and overwrites `src/styles/xertica/tokens.css` with the newly generated tokens, preserving all other project files.
|
|
19
|
+
- **Template `@theme inline` mapping** — Generated `src/styles/index.css` now includes a complete `@theme inline {}` block mapping all tokens (sidebar, charts, gradients, brand, radii) to CSS variable aliases, ensuring full theme coverage for consumer projects.
|
|
20
|
+
- **Documentation** — `docs/getting-started.md` updated with CLI `update` command reference and a new "CSS Setup (Critical)" section explaining the `@theme inline` requirement.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
10
24
|
## [1.6.0] — 2026-04-20
|
|
11
25
|
|
|
12
26
|
### Added
|
package/bin/cli.ts
CHANGED
|
@@ -18,7 +18,7 @@ const program = new Command();
|
|
|
18
18
|
program
|
|
19
19
|
.name('xertica-ui')
|
|
20
20
|
.description('CLI to initialize Xertica UI projects')
|
|
21
|
-
.version('1.
|
|
21
|
+
.version('1.7.0');
|
|
22
22
|
|
|
23
23
|
program
|
|
24
24
|
.command('init')
|
|
@@ -181,7 +181,7 @@ program
|
|
|
181
181
|
|
|
182
182
|
const minimalApp = `import React, { useState, useEffect, useLayoutEffect } from 'react';
|
|
183
183
|
import { BrowserRouter as Router, Routes, Route, Navigate, useNavigate, useLocation } from 'react-router-dom';
|
|
184
|
-
import { XerticaProvider
|
|
184
|
+
import { XerticaProvider } from 'xertica-ui';
|
|
185
185
|
${imports.join('\n')}
|
|
186
186
|
|
|
187
187
|
export default function App() {
|
|
@@ -193,7 +193,6 @@ ${routes.join('\n')}
|
|
|
193
193
|
<Route path="/" element={<Navigate to="${hasLogin ? '/login' : hasHome ? '/home' : '/template'}" replace />} />
|
|
194
194
|
<Route path="*" element={<Navigate to="${hasLogin ? '/login' : hasHome ? '/home' : '/template'}" replace />} />
|
|
195
195
|
</Routes>
|
|
196
|
-
<Toaster position="top-right" richColors />
|
|
197
196
|
</Router>
|
|
198
197
|
</XerticaProvider>
|
|
199
198
|
);
|
|
@@ -244,6 +243,7 @@ ${routes.join('\n')}
|
|
|
244
243
|
|
|
245
244
|
program
|
|
246
245
|
.command('update')
|
|
246
|
+
.alias('update-theme')
|
|
247
247
|
.description('Update theme tokens in your project')
|
|
248
248
|
.action(async () => {
|
|
249
249
|
const targetDir = process.cwd();
|
package/bin/generate-tokens.ts
CHANGED
|
@@ -66,6 +66,14 @@ export const generateTokensCss = (theme: ColorTheme): string => {
|
|
|
66
66
|
--destructive: rgba(239, 68, 68, 1);
|
|
67
67
|
--destructive-foreground: rgba(250, 250, 250, 1);
|
|
68
68
|
|
|
69
|
+
/* Semantic Status Colors */
|
|
70
|
+
--success: rgba(5, 150, 105, 1);
|
|
71
|
+
--success-foreground: rgba(250, 250, 250, 1);
|
|
72
|
+
--info: rgba(37, 99, 235, 1);
|
|
73
|
+
--info-foreground: rgba(250, 250, 250, 1);
|
|
74
|
+
--warning: rgba(245, 158, 11, 1);
|
|
75
|
+
--warning-foreground: rgba(24, 24, 27, 1);
|
|
76
|
+
|
|
69
77
|
--border: rgba(228, 228, 231, 1);
|
|
70
78
|
--input: rgba(244, 244, 245, 0.5);
|
|
71
79
|
--input-background: rgba(244, 244, 245, 0.5);
|
|
@@ -162,6 +170,7 @@ export const generateTokensCss = (theme: ColorTheme): string => {
|
|
|
162
170
|
.dark {
|
|
163
171
|
/* Brand Tokens */
|
|
164
172
|
--xertica-primary: ${rgba(colors.primaryDarkMode)};
|
|
173
|
+
--primary: var(--xertica-primary);
|
|
165
174
|
|
|
166
175
|
/* Semantic Colors */
|
|
167
176
|
--background: rgba(5, 5, 5, 1);
|
|
@@ -189,12 +198,27 @@ export const generateTokensCss = (theme: ColorTheme): string => {
|
|
|
189
198
|
--destructive: rgba(239, 68, 68, 1);
|
|
190
199
|
--destructive-foreground: rgba(250, 250, 250, 1);
|
|
191
200
|
|
|
201
|
+
/* Semantic Status Colors */
|
|
202
|
+
--success: rgba(34, 197, 94, 1);
|
|
203
|
+
--success-foreground: rgba(5, 5, 5, 1);
|
|
204
|
+
--info: rgba(96, 165, 250, 1);
|
|
205
|
+
--info-foreground: rgba(5, 5, 5, 1);
|
|
206
|
+
--warning: rgba(251, 191, 36, 1);
|
|
207
|
+
--warning-foreground: rgba(5, 5, 5, 1);
|
|
208
|
+
|
|
192
209
|
--border: rgba(63, 63, 70, 1);
|
|
193
210
|
--input: rgba(39, 39, 42, 0.5);
|
|
194
211
|
--input-background: rgba(39, 39, 42, 0.5);
|
|
195
212
|
--ring: ${rgba(colors.primaryDarkMode, 0.5)};
|
|
196
213
|
|
|
197
214
|
--elevation-sm: 0px 0px 48px 0px rgba(0, 0, 0, 0.3);
|
|
215
|
+
|
|
216
|
+
/* Charts */
|
|
217
|
+
--chart-1: ${rgba(colors.chart1)};
|
|
218
|
+
--chart-2: ${rgba(colors.chart2)};
|
|
219
|
+
--chart-3: ${rgba(colors.chart3)};
|
|
220
|
+
--chart-4: ${rgba(colors.chart4)};
|
|
221
|
+
--chart-5: ${rgba(colors.chart5)};
|
|
198
222
|
|
|
199
223
|
/* Sidebar */
|
|
200
224
|
--sidebar: ${rgba(colors.sidebarDark)};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Check, Copy } from 'lucide-react';
|
|
3
|
-
import { Button } from '
|
|
3
|
+
import { Button } from '../../ui/button';
|
|
4
4
|
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
5
5
|
|
|
6
6
|
// Elegant custom theme inspired by Xertica.ai design system
|
|
@@ -229,6 +229,7 @@ export const CodeBlock = ({
|
|
|
229
229
|
size="icon"
|
|
230
230
|
className="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10 bg-background/80 hover:bg-background"
|
|
231
231
|
onClick={handleCopy}
|
|
232
|
+
aria-label={copied ? "Copiado" : "Copiar código"}
|
|
232
233
|
>
|
|
233
234
|
{copied ? (
|
|
234
235
|
<Check className="w-4 h-4 text-[var(--toast-success-icon)]" />
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as CodeBlockStories from './code-block.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={CodeBlockStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
<Subtitle>An elegant syntax highlighter with built-in copy functionality and Xertica branding.</Subtitle>
|
|
8
|
+
|
|
9
|
+
<Description />
|
|
10
|
+
|
|
11
|
+
<Primary />
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Usage Patterns
|
|
16
|
+
|
|
17
|
+
### Development Snippets
|
|
18
|
+
Ideal for showing code examples with line numbers and filename headers.
|
|
19
|
+
|
|
20
|
+
<Canvas>
|
|
21
|
+
<CodeBlockStories.Default />
|
|
22
|
+
</Canvas>
|
|
23
|
+
|
|
24
|
+
### Terminal Commands
|
|
25
|
+
Compact view for shell commands or configuration highlights.
|
|
26
|
+
|
|
27
|
+
<Canvas>
|
|
28
|
+
<CodeBlockStories.Simple />
|
|
29
|
+
</Canvas>
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## AI Best Practices
|
|
34
|
+
|
|
35
|
+
> [!IMPORTANT]
|
|
36
|
+
> - **Language Selection** — Always specify the correct `language` prop to ensure accurate syntax highlighting.
|
|
37
|
+
> - **Theme Consistency** — The underlying `elegantTheme` automatically maps to the system's CSS theme variables; ensure the `XerticaProvider` is wrapping the application for correct colors.
|
|
38
|
+
> - **Clipboard Support** — Copy functionality includes progressive fallbacks for browsers with restricted clipboard permissions.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CodeBlock } from './CodeBlock';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof CodeBlock> = {
|
|
6
|
+
title: 'High-Level/CodeBlock',
|
|
7
|
+
component: CodeBlock,
|
|
8
|
+
argTypes: {
|
|
9
|
+
language: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: ['typescript', 'tsx', 'css', 'bash', 'jsx'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof CodeBlock>;
|
|
18
|
+
|
|
19
|
+
const exampleCode = `function HelloWorld() {
|
|
20
|
+
const [count, setCount] = useState(0);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className="flex flex-col gap-4">
|
|
24
|
+
<h1 className="text-2xl font-bold">Counter</h1>
|
|
25
|
+
<p>Current count: {count}</p>
|
|
26
|
+
<Button onClick={() => setCount(count + 1)}>
|
|
27
|
+
Increment
|
|
28
|
+
</Button>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}`;
|
|
32
|
+
|
|
33
|
+
export const Default: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
code: exampleCode,
|
|
36
|
+
language: 'tsx',
|
|
37
|
+
filename: 'Counter.tsx',
|
|
38
|
+
showLineNumbers: true,
|
|
39
|
+
},
|
|
40
|
+
render: (args) => (
|
|
41
|
+
<div className="w-full max-w-3xl">
|
|
42
|
+
<CodeBlock {...args} />
|
|
43
|
+
</div>
|
|
44
|
+
),
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Simple: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
code: 'npm install xertica-ui',
|
|
50
|
+
language: 'bash',
|
|
51
|
+
},
|
|
52
|
+
render: (args) => (
|
|
53
|
+
<div className="w-full max-w-xl">
|
|
54
|
+
<CodeBlock {...args} />
|
|
55
|
+
</div>
|
|
56
|
+
),
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CodeBlock';
|
package/components/{FormattedDocument.tsx → assistant/formatted-document/FormattedDocument.tsx}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Button } from '
|
|
2
|
+
import { Button } from '../../ui/button';
|
|
3
3
|
import { ChevronDown, ChevronUp } from 'lucide-react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -51,8 +51,8 @@ export function FormattedDocument({ content, maxPreviewLength = 500, className =
|
|
|
51
51
|
html = html.replace(/^\d+\. (.*$)/gim, '<li class="ml-4 my-0.5">$1</li>');
|
|
52
52
|
|
|
53
53
|
// Checkboxes
|
|
54
|
-
html = html.replace(/- \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" disabled class="rounded w-3 h-3" /> <span class="text-sm">$1</span></div>');
|
|
55
|
-
html = html.replace(/- \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" checked disabled class="rounded w-3 h-3" /> <span class="text-sm">$1</span></div>');
|
|
54
|
+
html = html.replace(/- \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" disabled class="rounded w-3 h-3" aria-label="$1" /> <span class="text-sm">$1</span></div>');
|
|
55
|
+
html = html.replace(/- \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-1"><input type="checkbox" checked disabled class="rounded w-3 h-3" aria-label="$1" /> <span class="text-sm">$1</span></div>');
|
|
56
56
|
|
|
57
57
|
// Horizontal rule
|
|
58
58
|
html = html.replace(/^---$/gim, '<hr class="my-3 border-border" />');
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as FormattedDocumentStories from './formatted-document.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={FormattedDocumentStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
<Subtitle>A lightweight markdown renderer for displaying AI-generated summaries and documentation.</Subtitle>
|
|
8
|
+
|
|
9
|
+
<Description />
|
|
10
|
+
|
|
11
|
+
<Primary />
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Usage Patterns
|
|
16
|
+
|
|
17
|
+
### Collapsible Content
|
|
18
|
+
Ideal for displaying long AI responses where a "See more" toggle is needed to preserve page verticality.
|
|
19
|
+
|
|
20
|
+
<Canvas>
|
|
21
|
+
<FormattedDocumentStories.Default />
|
|
22
|
+
</Canvas>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## AI Best Practices
|
|
27
|
+
|
|
28
|
+
> [!IMPORTANT]
|
|
29
|
+
> - **Markdown Compatibility** — Supports basic markdown: headers (`#`), bold (`**`), lists (`-`), and checkboxes (`- [ ]`). It does not support complex nested tables or markdown-in-html.
|
|
30
|
+
> - **Preview Mode** — Use `maxPreviewLength` to control the initial character count before truncation. Defaults to 500.
|
|
31
|
+
> - **Safe Injection** — Content is rendered via `dangerouslySetInnerHTML`. Ensure the source content (e.g., from an AI API) is trustable and sanitized if necessary.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormattedDocument } from './FormattedDocument';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof FormattedDocument> = {
|
|
6
|
+
title: 'High-Level/FormattedDocument',
|
|
7
|
+
component: FormattedDocument,
|
|
8
|
+
argTypes: {
|
|
9
|
+
maxPreviewLength: { control: 'number' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof FormattedDocument>;
|
|
15
|
+
|
|
16
|
+
const longContent = `# Proposta Estratégica Xertica
|
|
17
|
+
## Visão Geral
|
|
18
|
+
Esta proposta descreve a implementação de uma camada de inteligência artificial generativa em toda a jornada do cliente.
|
|
19
|
+
|
|
20
|
+
### Objetivos Principais
|
|
21
|
+
- Redução de latência no atendimento em até 40%
|
|
22
|
+
- Aumento na taxa de conversão de leads qualificados
|
|
23
|
+
- Automação de relatórios semanais para gestão
|
|
24
|
+
|
|
25
|
+
### Cronograma
|
|
26
|
+
1. **Semana 1-2:** Discovery e Mapeamento de Dados
|
|
27
|
+
2. **Semana 3-4:** Setup de Infraestrutura e Agentes
|
|
28
|
+
3. **Semana 5-8:** Implementação Pilot e Feedback Loop
|
|
29
|
+
|
|
30
|
+
## Detalhamento Técnico
|
|
31
|
+
A arquitetura baseia-se em RAG (Retrieval Augmented Generation) utilizando bases vetoriais de alto desempenho. Os agentes são orquestrados em tempo real para garantir respostas precisas e contextuais.
|
|
32
|
+
|
|
33
|
+
- [x] Definição de personas
|
|
34
|
+
- [x] Configuração de guardrails
|
|
35
|
+
- [ ] Integração com CRM
|
|
36
|
+
- [ ] Deploy global
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
**Nota:** Esta é uma versão preliminar para revisão da diretoria.`;
|
|
40
|
+
|
|
41
|
+
export const Default: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
content: longContent,
|
|
44
|
+
maxPreviewLength: 200,
|
|
45
|
+
},
|
|
46
|
+
render: (args) => (
|
|
47
|
+
<div className="w-full max-w-xl p-6 border rounded-xl bg-card">
|
|
48
|
+
<FormattedDocument {...args} />
|
|
49
|
+
</div>
|
|
50
|
+
),
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormattedDocument';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MarkdownMessage';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as MarkdownMessageStories from './markdown-message.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={MarkdownMessageStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
<Subtitle>Renders AI assistant messages as formatted Markdown with syntax-highlighted code blocks.</Subtitle>
|
|
8
|
+
|
|
9
|
+
<Description />
|
|
10
|
+
|
|
11
|
+
<Primary />
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { MarkdownMessage } from 'xertica-ui';
|
|
19
|
+
|
|
20
|
+
<MarkdownMessage content="**Hello!** Here is a `code` example." />
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Prop | Type | Default | Description |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| `content` | `string` | _(required)_ | The Markdown string to render |
|
|
28
|
+
| `className` | `string` | `''` | Additional CSS classes on the root container |
|
|
29
|
+
|
|
30
|
+
## Supported Markdown
|
|
31
|
+
|
|
32
|
+
- **Bold**, _italic_, ~~strikethrough~~
|
|
33
|
+
- `inline code` and fenced code blocks with syntax highlighting
|
|
34
|
+
- Lists (ordered and unordered)
|
|
35
|
+
- Headers (`# H1`, `## H2`, etc.)
|
|
36
|
+
- Tables
|
|
37
|
+
- Blockquotes
|
|
38
|
+
|
|
39
|
+
## AI Rules
|
|
40
|
+
|
|
41
|
+
> [!IMPORTANT]
|
|
42
|
+
> - This component is used **exclusively inside** `XerticaAssistant` message bubbles.
|
|
43
|
+
> - Do not use it for general-purpose Markdown rendering outside the assistant context — use a standard Markdown library instead.
|
|
44
|
+
> - Always sanitize content before passing it if coming from untrusted sources.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MarkdownMessage } from './MarkdownMessage';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof MarkdownMessage> = {
|
|
5
|
+
title: 'Assistant/MarkdownMessage',
|
|
6
|
+
component: MarkdownMessage,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof MarkdownMessage>;
|
|
11
|
+
|
|
12
|
+
export const Default: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
content: `
|
|
15
|
+
# Markdown Message Example
|
|
16
|
+
|
|
17
|
+
This component renders **Markdown** content sent by the AI assistant.
|
|
18
|
+
|
|
19
|
+
- It supports **bold** and _italic_ text.
|
|
20
|
+
- It supports [links](https://xertica.com).
|
|
21
|
+
- It supports code blocks:
|
|
22
|
+
|
|
23
|
+
\`\`\`javascript
|
|
24
|
+
function hello() {
|
|
25
|
+
console.log("Hello, Xertica!");
|
|
26
|
+
}
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
> "The advance of technology is based on making it fit in so that you don't even notice it, so it's part of everyday life." - Bill Gates
|
|
30
|
+
`.trim(),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Short: Story = {
|
|
35
|
+
args: {
|
|
36
|
+
content: '**Short message** with some `inline code`.',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const Table: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
content: `
|
|
43
|
+
| Project | Status | Health |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Analytics V2 | Active | ✅ Healthy |
|
|
46
|
+
| CRM Refactor | On Hold | ⚠️ Warning |
|
|
47
|
+
| Mobile App | Completed | 🏆 Done |
|
|
48
|
+
`.trim(),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useRef, useEffect, useState } from 'react';
|
|
2
2
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
3
3
|
import { Send, Plus, Paperclip, Mic, FileText, Radio, Search, X } from 'lucide-react';
|
|
4
|
-
import { Button } from '
|
|
5
|
-
import { Popover, PopoverContent, PopoverTrigger } from '
|
|
4
|
+
import { Button } from '../../ui/button';
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover';
|
|
6
6
|
import { toast } from 'sonner';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -318,6 +318,7 @@ export function ModernChatInput({
|
|
|
318
318
|
<button
|
|
319
319
|
onClick={handleRemoveAction}
|
|
320
320
|
className="ml-1 hover:bg-white/20 rounded-full p-0.5 transition-colors"
|
|
321
|
+
aria-label="Remover ação"
|
|
321
322
|
>
|
|
322
323
|
<X className="w-3 h-3" />
|
|
323
324
|
</button>
|
|
@@ -338,6 +339,7 @@ export function ModernChatInput({
|
|
|
338
339
|
onFocus={handleFocus}
|
|
339
340
|
onBlur={handleBlur}
|
|
340
341
|
placeholder={placeholder}
|
|
342
|
+
aria-label={placeholder || "Mensagem para o Xertica"}
|
|
341
343
|
disabled={disabled}
|
|
342
344
|
className="w-full bg-transparent border-0 outline-none resize-none text-foreground placeholder-muted-foreground text-sm leading-5 min-h-[20px] max-h-[100px] overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent"
|
|
343
345
|
style={{
|
|
@@ -363,6 +365,7 @@ export function ModernChatInput({
|
|
|
363
365
|
variant="ghost"
|
|
364
366
|
size="sm"
|
|
365
367
|
className="h-8 w-8 p-0 rounded-full text-muted-foreground hover:bg-accent hover:text-foreground transition-all duration-200"
|
|
368
|
+
aria-label="Ver ações"
|
|
366
369
|
>
|
|
367
370
|
<Plus className="w-4 h-4" />
|
|
368
371
|
</Button>
|
|
@@ -431,6 +434,7 @@ export function ModernChatInput({
|
|
|
431
434
|
size="sm"
|
|
432
435
|
onClick={onFileUpload}
|
|
433
436
|
className="h-8 w-8 p-0 rounded-full text-muted-foreground hover:bg-accent hover:text-foreground transition-all duration-200"
|
|
437
|
+
aria-label="Anexar arquivo"
|
|
434
438
|
>
|
|
435
439
|
<Paperclip className="w-4 h-4" />
|
|
436
440
|
</Button>
|
|
@@ -453,6 +457,7 @@ export function ModernChatInput({
|
|
|
453
457
|
? 'bg-destructive hover:bg-destructive/90 text-white animate-pulse'
|
|
454
458
|
: 'text-muted-foreground hover:bg-accent hover:text-foreground'
|
|
455
459
|
}`}
|
|
460
|
+
aria-label={isRecording ? "Parar gravação" : "Sugerir com voz"}
|
|
456
461
|
>
|
|
457
462
|
<Mic className="w-4 h-4" />
|
|
458
463
|
</Button>
|
|
@@ -480,6 +485,7 @@ export function ModernChatInput({
|
|
|
480
485
|
? 'bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg shadow-primary/30 hover:shadow-primary/40'
|
|
481
486
|
: 'bg-muted text-muted-foreground cursor-not-allowed'
|
|
482
487
|
}`}
|
|
488
|
+
aria-label="Enviar mensagem"
|
|
483
489
|
>
|
|
484
490
|
<motion.div
|
|
485
491
|
animate={{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ModernChatInput';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as ModernChatInputStories from './modern-chat-input.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={ModernChatInputStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
<Subtitle>An advanced, high-performance chat input for the Xertica Assistant.</Subtitle>
|
|
8
|
+
|
|
9
|
+
<Description />
|
|
10
|
+
|
|
11
|
+
<Primary />
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Usage Patterns
|
|
16
|
+
|
|
17
|
+
### Standard Floating Input
|
|
18
|
+
Optimized for chat interfaces with multi-line support, voice recording, and action chips.
|
|
19
|
+
|
|
20
|
+
<Canvas>
|
|
21
|
+
<ModernChatInputStories.Default />
|
|
22
|
+
</Canvas>
|
|
23
|
+
|
|
24
|
+
### Full-Page Variant
|
|
25
|
+
Adjusts maximum width and alignment for use in standalone chat pages.
|
|
26
|
+
|
|
27
|
+
<Canvas>
|
|
28
|
+
<ModernChatInputStories.FullPage />
|
|
29
|
+
</Canvas>
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## AI Best Practices
|
|
34
|
+
|
|
35
|
+
> [!IMPORTANT]
|
|
36
|
+
> - **Action Workflow** — Handle the `onSubmit` callback's optional `action` parameter to distinguish between standard text messages and intent-driven generations (Documents, Podcasts, Search).
|
|
37
|
+
> - **State Sync** — Always maintain the `value` in a parent state and update it via `onChange` and `onVoiceRecording` to ensure consistent data binding.
|
|
38
|
+
> - **Dynamic Sizing** — The input automatically expands up to 100px based on content; ensure the parent container can accommodate these height changes without layout shift.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ModernChatInput } from './ModernChatInput';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof ModernChatInput> = {
|
|
6
|
+
title: 'High-Level/ModernChatInput',
|
|
7
|
+
component: ModernChatInput,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof ModernChatInput>;
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
render: () => {
|
|
18
|
+
const [value, setValue] = useState("");
|
|
19
|
+
return (
|
|
20
|
+
<div className="w-[600px]">
|
|
21
|
+
<ModernChatInput
|
|
22
|
+
value={value}
|
|
23
|
+
onChange={setValue}
|
|
24
|
+
onSubmit={(action) => {
|
|
25
|
+
alert(`Submitted: "${value}" ${action ? `with action: ${action}` : ""}`);
|
|
26
|
+
setValue("");
|
|
27
|
+
}}
|
|
28
|
+
onVoiceRecording={(text) => setValue(text)}
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const FullPage: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
isFullPage: true,
|
|
38
|
+
},
|
|
39
|
+
render: (args) => {
|
|
40
|
+
const [value, setValue] = useState("Preciso de ajuda com os relatórios");
|
|
41
|
+
return (
|
|
42
|
+
<div className="w-full bg-slate-50 p-10 min-h-[300px]">
|
|
43
|
+
<ModernChatInput
|
|
44
|
+
{...args}
|
|
45
|
+
value={value}
|
|
46
|
+
onChange={setValue}
|
|
47
|
+
onSubmit={() => setValue("")}
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './xertica-assistant';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as AssistantStories from './xertica-assistant.stories';
|
|
3
|
+
|
|
4
|
+
<Meta of={AssistantStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
<Subtitle>An embedded AI-powered assistant panel powered by Gemini.</Subtitle>
|
|
8
|
+
|
|
9
|
+
<Description />
|
|
10
|
+
|
|
11
|
+
<Primary />
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Layout Integration
|
|
16
|
+
The assistant panel is intensely integrated into the responsive behavior of the primary layout shell.
|
|
17
|
+
|
|
18
|
+
### Desktop & Mobile
|
|
19
|
+
On desktop, it sits flush against the right side. On mobile, it transitions into a floating action button.
|
|
20
|
+
|
|
21
|
+
<Canvas>
|
|
22
|
+
<AssistantStories.Default />
|
|
23
|
+
</Canvas>
|
|
24
|
+
|
|
25
|
+
### Custom Tabs
|
|
26
|
+
Extend the assistant with specialized tabs for domain-specific insights.
|
|
27
|
+
|
|
28
|
+
<Canvas>
|
|
29
|
+
<AssistantStories.CustomTabs />
|
|
30
|
+
</Canvas>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## AI Best Practices
|
|
35
|
+
|
|
36
|
+
> [!IMPORTANT]
|
|
37
|
+
> - **API Key** — Ensure `apiKey` is provided in `<XerticaProvider>`.
|
|
38
|
+
> - **State Management** — Use `toggleAssistente()` from `useLayout()` to manage visibility.
|
|
39
|
+
> - **System Prompt** — Always provide a context-specific `systemPrompt` for better AI relevance.
|