xertica-ui 1.6.1 → 1.6.2
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/bin/cli.ts +1 -2
- package/components/{CodeBlock.tsx → assistant/code-block/CodeBlock.tsx} +1 -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} +1 -1
- 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} +2 -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 +19 -18
- package/components/{AudioPlayer.tsx → blocks/audio-player/AudioPlayer.tsx} +240 -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} +2 -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} +23 -15
- 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 +58 -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} +83 -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/brand/xertica-logo/index.ts +1 -0
- package/components/{XerticaOrbe.tsx → brand/xertica-orbe/XerticaOrbe.tsx} +1 -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/FilterableMapExample.tsx +1 -1
- 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} +33 -28
- 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} +83 -40
- package/components/layout/sidebar-primitive/index.ts +1 -0
- package/components/{ui/sidebar.tsx → layout/sidebar-primitive/sidebar-primitive.tsx} +8 -8
- package/components/media/AudioPlayer.tsx +1 -1
- package/components/media/FloatingMediaWrapper.tsx +1 -1
- package/components/media/VideoPlayer.tsx +1 -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} +26 -26
- 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} +2 -2
- 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 +120 -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} +3 -3
- 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} +1 -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 +1 -2
- 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 +468 -1915
- package/dist/index.umd.js +465 -1912
- 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/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 +82 -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 +9 -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 +6725 -1942
- package/llms.txt +10 -6
- 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/templates/package.json +1 -1
- 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/{XerticaLogo.tsx → brand/xertica-logo/XerticaLogo.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/bin/cli.ts
CHANGED
|
@@ -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
|
);
|
|
@@ -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
|
|
@@ -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';
|
|
@@ -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
|
/**
|
|
@@ -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.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { XerticaAssistant } from './xertica-assistant';
|
|
3
|
+
import { Button } from '../../ui/button';
|
|
4
|
+
import { useLayout } from '../../../contexts/LayoutContext';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof XerticaAssistant> = {
|
|
8
|
+
title: 'Xertica/Assistant',
|
|
9
|
+
component: XerticaAssistant,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'fullscreen',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof XerticaAssistant>;
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
decorators: [
|
|
20
|
+
(Story) => {
|
|
21
|
+
const { toggleAssistente, assistenteExpanded } = useLayout();
|
|
22
|
+
return (
|
|
23
|
+
<div className="h-screen w-full flex relative overflow-hidden bg-muted/30">
|
|
24
|
+
<div className="flex-1 flex flex-col p-8 gap-4">
|
|
25
|
+
<h1 className="text-2xl font-bold">Main Content Area</h1>
|
|
26
|
+
<p>Click the button below to toggle the AI Assistant.</p>
|
|
27
|
+
<Button onClick={toggleAssistente} className="w-fit">
|
|
28
|
+
{assistenteExpanded ? 'Close Assistant' : 'Open Assistant'}
|
|
29
|
+
</Button>
|
|
30
|
+
</div>
|
|
31
|
+
<Story />
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
args: {
|
|
37
|
+
title: 'AI Assistant',
|
|
38
|
+
systemPrompt: 'You are a helpful UI/UX design assistant.',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const CustomTabs: Story = {
|
|
43
|
+
decorators: [
|
|
44
|
+
(Story) => {
|
|
45
|
+
const { setAssistenteExpanded } = useLayout();
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
setAssistenteExpanded(true);
|
|
48
|
+
}, []);
|
|
49
|
+
return (
|
|
50
|
+
<div className="h-screen w-full flex relative overflow-hidden bg-muted/30">
|
|
51
|
+
<div className="flex-1 p-8">
|
|
52
|
+
<h1 className="text-2xl font-bold">Assistant with Custom Tabs</h1>
|
|
53
|
+
</div>
|
|
54
|
+
<Story />
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
args: {
|
|
60
|
+
title: 'Analytics Assistant',
|
|
61
|
+
tabs: [
|
|
62
|
+
{
|
|
63
|
+
id: 'overview',
|
|
64
|
+
label: 'Overview',
|
|
65
|
+
content: <div className="p-4">Analytics Overview Content</div>
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 'settings',
|
|
69
|
+
label: 'Stats',
|
|
70
|
+
content: <div className="p-4">Detailed Stats and Charts</div>
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
ChartTooltipContent,
|
|
61
61
|
ChartLegend,
|
|
62
62
|
ChartLegendContent
|
|
63
|
-
} from
|
|
63
|
+
} from '../../ui/chart';
|
|
64
64
|
import {
|
|
65
65
|
Table,
|
|
66
66
|
TableBody,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
TableHead,
|
|
70
70
|
TableHeader,
|
|
71
71
|
TableRow,
|
|
72
|
-
} from
|
|
72
|
+
} from '../../ui/table';
|
|
73
73
|
import {
|
|
74
74
|
Dialog,
|
|
75
75
|
DialogContent,
|
|
@@ -77,26 +77,26 @@ import {
|
|
|
77
77
|
DialogFooter,
|
|
78
78
|
DialogHeader,
|
|
79
79
|
DialogTitle,
|
|
80
|
-
} from
|
|
80
|
+
} from '../../ui/dialog';
|
|
81
81
|
import {
|
|
82
82
|
DropdownMenu,
|
|
83
83
|
DropdownMenuContent,
|
|
84
84
|
DropdownMenuItem,
|
|
85
85
|
DropdownMenuTrigger,
|
|
86
|
-
} from
|
|
87
|
-
import { Textarea } from
|
|
88
|
-
import { Button } from '
|
|
89
|
-
import { ScrollArea } from '
|
|
90
|
-
import { Separator } from '
|
|
91
|
-
import { RichTextEditor } from '
|
|
92
|
-
import { MarkdownMessage } from '../
|
|
93
|
-
import { FormattedDocument } from '../
|
|
94
|
-
import { ModernChatInput } from '../
|
|
95
|
-
import type { ActionType } from '../
|
|
96
|
-
import { XerticaOrbe } from '
|
|
97
|
-
import { Tooltip, TooltipTrigger } from '
|
|
86
|
+
} from '../../ui/dropdown-menu';
|
|
87
|
+
import { Textarea } from '../../ui/textarea';
|
|
88
|
+
import { Button } from '../../ui/button';
|
|
89
|
+
import { ScrollArea } from '../../ui/scroll-area';
|
|
90
|
+
import { Separator } from '../../ui/separator';
|
|
91
|
+
import { RichTextEditor } from '../../ui/rich-text-editor';
|
|
92
|
+
import { MarkdownMessage } from '../markdown-message';
|
|
93
|
+
import { FormattedDocument } from '../formatted-document';
|
|
94
|
+
import { ModernChatInput } from '../modern-chat-input';
|
|
95
|
+
import type { ActionType } from '../modern-chat-input';
|
|
96
|
+
import { XerticaOrbe } from '../../brand/xertica-orbe';
|
|
97
|
+
import { Tooltip, TooltipTrigger } from '../../ui/tooltip';
|
|
98
98
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
99
|
-
import { cn } from '
|
|
99
|
+
import { cn } from '../../shared/utils';
|
|
100
100
|
import { toast } from 'sonner';
|
|
101
101
|
|
|
102
102
|
// Tooltip customizado estilo sidebar (branco)
|
|
@@ -224,6 +224,7 @@ export interface Conversation {
|
|
|
224
224
|
export interface Suggestion {
|
|
225
225
|
id: string;
|
|
226
226
|
texto: string;
|
|
227
|
+
icon?: React.ReactNode;
|
|
227
228
|
}
|
|
228
229
|
|
|
229
230
|
/**
|
|
@@ -240,8 +241,8 @@ export type AssistantTab = 'chat' | 'historico' | 'favoritos';
|
|
|
240
241
|
// Component Props
|
|
241
242
|
// ============================================================================
|
|
242
243
|
|
|
243
|
-
import type { MockResponse } from '
|
|
244
|
-
import { gerarResposta } from '
|
|
244
|
+
import type { MockResponse } from '../../../contexts/AssistenteContext';
|
|
245
|
+
import { gerarResposta } from '../../shared/assistant-utils';
|
|
245
246
|
|
|
246
247
|
export interface XerticaAssistantProps {
|
|
247
248
|
/**
|