xertica-ui 2.1.10 → 2.2.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 +525 -469
- package/README.md +382 -299
- package/assets/xertica-logo.svg +37 -37
- package/assets/xertica-x-logo.svg +20 -20
- package/bin/cli.ts +748 -548
- package/bin/generate-tokens.ts +262 -262
- package/bin/language-config.ts +361 -0
- package/components/assets/xertica-orbe-animation.ts +1162 -1162
- package/components/assistant/code-block/CodeBlock.tsx +268 -266
- package/components/assistant/code-block/code-block.stories.tsx +57 -57
- package/components/assistant/code-block/code-block.test.tsx +44 -44
- package/components/assistant/code-block/index.ts +1 -1
- package/components/assistant/formatted-document/FormattedDocument.tsx +147 -145
- package/components/assistant/formatted-document/formatted-document.stories.tsx +51 -51
- package/components/assistant/formatted-document/formatted-document.test.tsx +42 -42
- package/components/assistant/formatted-document/index.ts +1 -1
- package/components/assistant/index.ts +6 -6
- package/components/assistant/markdown-message/MarkdownMessage.tsx +152 -152
- package/components/assistant/markdown-message/index.ts +1 -1
- package/components/assistant/markdown-message/markdown-message.stories.tsx +50 -50
- package/components/assistant/markdown-message/markdown-message.test.tsx +33 -33
- package/components/assistant/modern-chat-input/ModernChatInput.tsx +36 -31
- package/components/assistant/modern-chat-input/index.ts +1 -1
- package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +131 -131
- package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +79 -79
- package/components/assistant/xertica-assistant/index.ts +3 -3
- package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -97
- package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +106 -104
- package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -79
- package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +78 -74
- package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -73
- package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +560 -558
- package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -65
- package/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.tsx +41 -41
- package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -101
- package/components/assistant/xertica-assistant/parts/index.ts +16 -16
- package/components/assistant/xertica-assistant/types.ts +134 -134
- package/components/assistant/xertica-assistant/use-assistant.ts +615 -608
- package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +407 -407
- package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +65 -65
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +613 -609
- package/components/blocks/card-patterns/ActivityCard.tsx +100 -81
- package/components/blocks/card-patterns/ActivityCardSkeleton.tsx +56 -0
- package/components/blocks/card-patterns/FeatureCard.tsx +109 -109
- package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +63 -0
- package/components/blocks/card-patterns/NotificationCard.tsx +140 -137
- package/components/blocks/card-patterns/NotificationCardSkeleton.tsx +81 -0
- package/components/blocks/card-patterns/ProfileCard.tsx +114 -100
- package/components/blocks/card-patterns/ProfileCardSkeleton.tsx +69 -0
- package/components/blocks/card-patterns/ProjectCard.tsx +123 -110
- package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +72 -0
- package/components/blocks/card-patterns/QuickActionCard.tsx +68 -68
- package/components/blocks/card-patterns/QuickActionCardSkeleton.tsx +44 -0
- package/components/blocks/card-patterns/card-patterns.mdx +123 -0
- package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -515
- package/components/blocks/card-patterns/index.ts +29 -17
- package/components/blocks/index.ts +1 -1
- package/components/brand/branding/branding.stories.tsx +57 -57
- package/components/brand/index.ts +6 -6
- package/components/brand/language-selector/LanguageSelector.tsx +47 -12
- package/components/brand/language-selector/index.ts +1 -1
- package/components/brand/language-selector/language-selector.mdx +126 -57
- package/components/brand/language-selector/language-selector.stories.tsx +66 -16
- package/components/brand/language-selector/language-selector.test.tsx +64 -8
- package/components/brand/theme-toggle/ThemeToggle.tsx +70 -68
- package/components/brand/theme-toggle/index.ts +1 -1
- package/components/brand/theme-toggle/theme-toggle.stories.tsx +34 -34
- package/components/brand/theme-toggle/theme-toggle.test.tsx +34 -34
- package/components/brand/xertica-logo/XerticaLogo.stories.tsx +82 -82
- package/components/brand/xertica-logo/XerticaLogo.tsx +104 -104
- package/components/brand/xertica-logo/index.ts +1 -1
- package/components/brand/xertica-logo/xertica-logo.test.tsx +26 -26
- package/components/brand/xertica-orbe/XerticaOrbe.tsx +1927 -1927
- package/components/brand/xertica-orbe/index.ts +1 -1
- package/components/brand/xertica-orbe/xertica-orbe.stories.tsx +40 -40
- package/components/brand/xertica-orbe/xertica-orbe.test.tsx +19 -19
- package/components/brand/xertica-provider/XerticaProvider.tsx +38 -2
- package/components/brand/xertica-provider/index.ts +1 -1
- package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
- package/components/brand/xertica-provider/xertica-provider.test.tsx +74 -74
- package/components/brand/xertica-xlogo/XerticaXLogo.stories.tsx +79 -79
- package/components/brand/xertica-xlogo/XerticaXLogo.tsx +65 -65
- package/components/brand/xertica-xlogo/index.ts +1 -1
- package/components/brand/xertica-xlogo/xertica-xlogo.test.tsx +16 -16
- package/components/examples/ApiKeyMapExample.tsx +71 -71
- package/components/examples/DrawingMapExample.tsx +565 -565
- package/components/examples/FilterableMapExample.tsx +393 -393
- package/components/examples/LocationPickerExample.tsx +348 -348
- package/components/examples/MapExamples.tsx +268 -268
- package/components/examples/MapGmpExample.tsx +169 -169
- package/components/examples/MapShowcase.tsx +471 -471
- package/components/examples/RouteMapExamples.tsx +329 -329
- package/components/examples/SidebarLogoExample.tsx +65 -65
- package/components/examples/SimpleFilterableMap.tsx +219 -219
- package/components/examples/index.ts +45 -45
- package/components/figma/ImageWithFallback.tsx +27 -27
- package/components/hooks/index.ts +13 -13
- package/components/hooks/use-layout-shortcuts.ts +43 -43
- package/components/index.ts +90 -77
- package/components/layout/header/header.stories.tsx +204 -204
- package/components/layout/header/header.test.tsx +75 -75
- package/components/layout/header/header.tsx +349 -349
- package/components/layout/header/index.ts +1 -1
- package/components/layout/index.ts +2 -2
- package/components/layout/sidebar/index.ts +3 -3
- package/components/layout/sidebar/sidebar.mdx +1 -1
- package/components/layout/sidebar/sidebar.stories.tsx +586 -586
- package/components/layout/sidebar/sidebar.test.tsx +76 -76
- package/components/layout/sidebar/sidebar.tsx +1073 -1068
- package/components/layout/sidebar/use-sidebar.ts +104 -104
- package/components/media/FloatingMediaWrapper.tsx +371 -368
- package/components/media/audio-player/AudioPlayer.stories.tsx +124 -124
- package/components/media/audio-player/AudioPlayer.test.tsx +106 -106
- package/components/media/audio-player/AudioPlayer.tsx +765 -762
- package/components/media/audio-player/index.ts +1 -1
- package/components/media/audio-player/use-audio-player.ts +312 -312
- package/components/media/index.ts +3 -3
- package/components/media/video-player/VideoPlayer.stories.tsx +98 -98
- package/components/media/video-player/VideoPlayer.test.tsx +73 -73
- package/components/media/video-player/VideoPlayer.tsx +310 -308
- package/components/media/video-player/index.ts +1 -1
- package/components/pages/forgot-password-page/ForgotPasswordPage.stories.tsx +24 -24
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
- package/components/pages/forgot-password-page/forgot-password-page.test.tsx +45 -45
- package/components/pages/forgot-password-page/index.ts +1 -1
- package/components/pages/home-content/HomeContent.stories.tsx +43 -43
- package/components/pages/home-content/HomeContent.tsx +120 -125
- package/components/pages/home-content/home-content.mdx +62 -62
- package/components/pages/home-content/index.ts +1 -1
- package/components/pages/home-page/HomePage.stories.tsx +39 -39
- package/components/pages/home-page/HomePage.tsx +74 -75
- package/components/pages/home-page/home-page.mdx +53 -53
- package/components/pages/home-page/home-page.test.tsx +53 -53
- package/components/pages/home-page/index.ts +1 -1
- package/components/pages/index.ts +8 -8
- package/components/pages/login-page/LoginPage.stories.tsx +39 -39
- package/components/pages/login-page/LoginPage.tsx +216 -216
- package/components/pages/login-page/index.ts +1 -1
- package/components/pages/login-page/login-page.test.tsx +63 -63
- package/components/pages/reset-password-page/ResetPasswordPage.stories.tsx +24 -24
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +239 -237
- package/components/pages/reset-password-page/index.ts +1 -1
- package/components/pages/template-content/TemplateContent.stories.tsx +43 -43
- package/components/pages/template-content/TemplateContent.tsx +1235 -1237
- package/components/pages/template-content/index.ts +1 -1
- package/components/pages/template-content/template-content.mdx +61 -61
- package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
- package/components/pages/template-page/TemplatePage.tsx +62 -62
- package/components/pages/template-page/index.ts +1 -1
- package/components/pages/template-page/template-page.mdx +53 -53
- package/components/pages/template-page/template-page.test.tsx +52 -52
- package/components/pages/verify-email-page/VerifyEmailPage.stories.tsx +41 -41
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
- package/components/pages/verify-email-page/index.ts +1 -1
- package/components/public-api-smoke.test.tsx +52 -52
- package/components/shared/CustomTooltipContent.tsx +48 -48
- package/components/shared/assistant-utils.test.ts +16 -16
- package/components/shared/assistant-utils.ts +225 -225
- package/components/shared/error-boundary.stories.tsx +132 -132
- package/components/shared/error-boundary.tsx +154 -154
- package/components/shared/error-fallbacks.tsx +226 -226
- package/components/shared/layout-constants.ts +8 -8
- package/components/shared/navigation.ts +35 -35
- package/components/shared/use-mobile.test.ts +16 -16
- package/components/shared/use-mobile.ts +36 -36
- package/components/shared/utils.test.ts +14 -14
- package/components/shared/utils.ts +6 -6
- package/components/ui/accordion/accordion.mdx +8 -8
- package/components/ui/accordion/accordion.stories.tsx +105 -105
- package/components/ui/accordion/accordion.test.tsx +59 -59
- package/components/ui/accordion/accordion.tsx +77 -77
- package/components/ui/accordion/index.ts +1 -1
- package/components/ui/alert/alert.mdx +8 -8
- package/components/ui/alert/alert.stories.tsx +86 -86
- package/components/ui/alert/alert.test.tsx +53 -53
- package/components/ui/alert/alert.tsx +93 -93
- package/components/ui/alert/index.ts +1 -1
- package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
- package/components/ui/alert-dialog/alert-dialog.stories.tsx +84 -84
- package/components/ui/alert-dialog/alert-dialog.test.tsx +70 -70
- package/components/ui/alert-dialog/alert-dialog.tsx +149 -149
- package/components/ui/alert-dialog/index.ts +1 -1
- package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
- package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +46 -46
- package/components/ui/aspect-ratio/aspect-ratio.test.tsx +28 -28
- package/components/ui/aspect-ratio/aspect-ratio.tsx +20 -20
- package/components/ui/aspect-ratio/index.ts +1 -1
- package/components/ui/assistant-chart/AssistantChart.tsx +64 -64
- package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
- package/components/ui/assistant-chart/assistant-chart.stories.tsx +44 -44
- package/components/ui/assistant-chart/assistant-chart.test.tsx +46 -46
- package/components/ui/assistant-chart/index.ts +1 -1
- package/components/ui/avatar/avatar.mdx +8 -8
- package/components/ui/avatar/avatar.stories.tsx +86 -86
- package/components/ui/avatar/avatar.test.tsx +55 -55
- package/components/ui/avatar/avatar.tsx +71 -71
- package/components/ui/avatar/index.ts +1 -1
- package/components/ui/badge/badge.mdx +8 -8
- package/components/ui/badge/badge.stories.tsx +72 -72
- package/components/ui/badge/badge.test.tsx +40 -40
- package/components/ui/badge/badge.tsx +58 -58
- package/components/ui/badge/index.ts +1 -1
- package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
- package/components/ui/breadcrumb/breadcrumb.stories.tsx +123 -123
- package/components/ui/breadcrumb/breadcrumb.test.tsx +70 -70
- package/components/ui/breadcrumb/breadcrumb.tsx +114 -114
- package/components/ui/breadcrumb/index.ts +1 -1
- package/components/ui/button/button.mdx +8 -8
- package/components/ui/button/button.stories.tsx +183 -183
- package/components/ui/button/button.test.tsx +64 -64
- package/components/ui/button/button.tsx +98 -98
- package/components/ui/button/index.ts +1 -1
- package/components/ui/calendar/calendar.mdx +8 -8
- package/components/ui/calendar/calendar.stories.tsx +108 -108
- package/components/ui/calendar/calendar.test.tsx +53 -53
- package/components/ui/calendar/calendar.tsx +230 -230
- package/components/ui/calendar/index.ts +1 -1
- package/components/ui/card/card.mdx +8 -8
- package/components/ui/card/card.stories.tsx +301 -301
- package/components/ui/card/card.test.tsx +55 -55
- package/components/ui/card/card.tsx +83 -83
- package/components/ui/card/index.ts +1 -1
- package/components/ui/carousel/carousel.mdx +8 -8
- package/components/ui/carousel/carousel.stories.tsx +80 -80
- package/components/ui/carousel/carousel.test.tsx +75 -75
- package/components/ui/carousel/carousel.tsx +242 -242
- package/components/ui/carousel/index.ts +1 -1
- package/components/ui/chart/chart.mdx +8 -8
- package/components/ui/chart/chart.stories.tsx +1328 -1328
- package/components/ui/chart/chart.test.tsx +178 -178
- package/components/ui/chart/chart.tsx +2232 -2232
- package/components/ui/chart/index.ts +1 -1
- package/components/ui/checkbox/checkbox.mdx +8 -8
- package/components/ui/checkbox/checkbox.stories.tsx +109 -109
- package/components/ui/checkbox/checkbox.test.tsx +49 -49
- package/components/ui/checkbox/checkbox.tsx +68 -68
- package/components/ui/checkbox/index.ts +1 -1
- package/components/ui/collapsible/collapsible.mdx +8 -8
- package/components/ui/collapsible/collapsible.stories.tsx +45 -45
- package/components/ui/collapsible/collapsible.test.tsx +51 -51
- package/components/ui/collapsible/collapsible.tsx +32 -32
- package/components/ui/collapsible/index.ts +1 -1
- package/components/ui/command/command.mdx +8 -8
- package/components/ui/command/command.stories.tsx +134 -134
- package/components/ui/command/command.test.tsx +48 -48
- package/components/ui/command/command.tsx +163 -163
- package/components/ui/command/index.ts +1 -1
- package/components/ui/context-menu/context-menu.mdx +8 -8
- package/components/ui/context-menu/context-menu.stories.tsx +76 -76
- package/components/ui/context-menu/context-menu.test.tsx +61 -61
- package/components/ui/context-menu/context-menu.tsx +236 -236
- package/components/ui/context-menu/index.ts +1 -1
- package/components/ui/dialog/dialog.mdx +8 -8
- package/components/ui/dialog/dialog.stories.tsx +174 -174
- package/components/ui/dialog/dialog.test.tsx +78 -78
- package/components/ui/dialog/dialog.tsx +189 -189
- package/components/ui/dialog/index.ts +1 -1
- package/components/ui/drawer/drawer.mdx +8 -8
- package/components/ui/drawer/drawer.stories.tsx +71 -71
- package/components/ui/drawer/drawer.test.tsx +67 -67
- package/components/ui/drawer/drawer.tsx +146 -146
- package/components/ui/drawer/index.ts +1 -1
- package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
- package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +156 -156
- package/components/ui/dropdown-menu/dropdown-menu.test.tsx +62 -62
- package/components/ui/dropdown-menu/dropdown-menu.tsx +240 -240
- package/components/ui/dropdown-menu/index.ts +1 -1
- package/components/ui/empty/empty.mdx +8 -8
- package/components/ui/empty/empty.stories.tsx +85 -85
- package/components/ui/empty/empty.test.tsx +31 -31
- package/components/ui/empty/empty.tsx +88 -88
- package/components/ui/empty/index.ts +1 -1
- package/components/ui/file-upload/file-upload.mdx +8 -8
- package/components/ui/file-upload/file-upload.stories.tsx +144 -144
- package/components/ui/file-upload/file-upload.test.tsx +65 -65
- package/components/ui/file-upload/file-upload.tsx +142 -142
- package/components/ui/file-upload/index.ts +2 -2
- package/components/ui/file-upload/use-file-upload.ts +177 -177
- package/components/ui/form/form.stories.tsx +85 -85
- package/components/ui/form/form.test.tsx +75 -75
- package/components/ui/form/form.tsx +163 -163
- package/components/ui/form/index.ts +1 -1
- package/components/ui/google-maps-loader/google-maps-loader.test.tsx +35 -35
- package/components/ui/google-maps-loader/google-maps-loader.tsx +465 -465
- package/components/ui/google-maps-loader/index.ts +1 -1
- package/components/ui/hover-card/hover-card.mdx +8 -8
- package/components/ui/hover-card/hover-card.stories.tsx +61 -61
- package/components/ui/hover-card/hover-card.test.tsx +48 -48
- package/components/ui/hover-card/hover-card.tsx +50 -50
- package/components/ui/hover-card/index.ts +1 -1
- package/components/ui/index.ts +400 -400
- package/components/ui/input/index.ts +1 -1
- package/components/ui/input/input.mdx +8 -8
- package/components/ui/input/input.stories.tsx +153 -153
- package/components/ui/input/input.test.tsx +47 -47
- package/components/ui/input/input.tsx +57 -57
- package/components/ui/input-otp/index.ts +1 -1
- package/components/ui/input-otp/input-otp.mdx +8 -8
- package/components/ui/input-otp/input-otp.stories.tsx +120 -120
- package/components/ui/input-otp/input-otp.test.tsx +74 -74
- package/components/ui/input-otp/input-otp.tsx +101 -101
- package/components/ui/label/index.ts +1 -1
- package/components/ui/label/label.mdx +8 -8
- package/components/ui/label/label.stories.tsx +74 -74
- package/components/ui/label/label.test.tsx +45 -45
- package/components/ui/label/label.tsx +53 -53
- package/components/ui/map/index.ts +1 -1
- package/components/ui/map/map.mdx +8 -8
- package/components/ui/map/map.stories.tsx +86 -86
- package/components/ui/map/map.test.tsx +82 -82
- package/components/ui/map/map.tsx +506 -506
- package/components/ui/map/mock.test.tsx +13 -13
- package/components/ui/map-config/index.ts +1 -1
- package/components/ui/map-config/map-config.ts +18 -18
- package/components/ui/map-layers/index.ts +1 -1
- package/components/ui/map-layers/map-layers.test.tsx +48 -48
- package/components/ui/map-layers/map-layers.tsx +126 -126
- package/components/ui/map.exports/index.ts +1 -1
- package/components/ui/map.exports/map.exports.ts +31 -31
- package/components/ui/menubar/index.ts +1 -1
- package/components/ui/menubar/menubar.mdx +8 -8
- package/components/ui/menubar/menubar.stories.tsx +130 -130
- package/components/ui/menubar/menubar.test.tsx +53 -53
- package/components/ui/menubar/menubar.tsx +265 -265
- package/components/ui/navigation-menu/index.ts +1 -1
- package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
- package/components/ui/navigation-menu/navigation-menu.stories.tsx +126 -126
- package/components/ui/navigation-menu/navigation-menu.test.tsx +47 -47
- package/components/ui/navigation-menu/navigation-menu.tsx +165 -165
- package/components/ui/notification-badge/index.ts +1 -1
- package/components/ui/notification-badge/notification-badge.mdx +8 -8
- package/components/ui/notification-badge/notification-badge.stories.tsx +66 -66
- package/components/ui/notification-badge/notification-badge.test.tsx +61 -61
- package/components/ui/notification-badge/notification-badge.tsx +91 -91
- package/components/ui/page-header/index.ts +1 -1
- package/components/ui/page-header/page-header.stories.tsx +69 -69
- package/components/ui/page-header/page-header.test.tsx +37 -37
- package/components/ui/page-header/page-header.tsx +124 -124
- package/components/ui/pagination/index.ts +3 -3
- package/components/ui/pagination/pagination.mdx +8 -8
- package/components/ui/pagination/pagination.stories.tsx +210 -210
- package/components/ui/pagination/pagination.test.tsx +63 -63
- package/components/ui/pagination/pagination.tsx +140 -140
- package/components/ui/pagination/use-pagination.ts +173 -173
- package/components/ui/popover/index.ts +1 -1
- package/components/ui/popover/popover.mdx +8 -8
- package/components/ui/popover/popover.stories.tsx +73 -73
- package/components/ui/popover/popover.test.tsx +48 -48
- package/components/ui/popover/popover.tsx +54 -54
- package/components/ui/progress/index.ts +1 -1
- package/components/ui/progress/progress.mdx +8 -8
- package/components/ui/progress/progress.stories.tsx +55 -55
- package/components/ui/progress/progress.test.tsx +23 -23
- package/components/ui/progress/progress.tsx +68 -68
- package/components/ui/radio-group/index.ts +1 -1
- package/components/ui/radio-group/radio-group.mdx +8 -8
- package/components/ui/radio-group/radio-group.stories.tsx +114 -114
- package/components/ui/radio-group/radio-group.test.tsx +78 -78
- package/components/ui/radio-group/radio-group.tsx +93 -93
- package/components/ui/rating/index.ts +1 -1
- package/components/ui/rating/rating.mdx +8 -8
- package/components/ui/rating/rating.stories.tsx +50 -50
- package/components/ui/rating/rating.test.tsx +48 -48
- package/components/ui/rating/rating.tsx +145 -145
- package/components/ui/resizable/index.ts +1 -1
- package/components/ui/resizable/resizable.mdx +8 -8
- package/components/ui/resizable/resizable.stories.tsx +88 -88
- package/components/ui/resizable/resizable.test.tsx +61 -61
- package/components/ui/resizable/resizable.tsx +452 -452
- package/components/ui/rich-text-editor/index.ts +7 -7
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +290 -290
- package/components/ui/rich-text-editor/rich-text-editor.test.tsx +86 -86
- package/components/ui/rich-text-editor/rich-text-editor.tsx +634 -634
- package/components/ui/rich-text-editor/use-rich-text-editor.ts +453 -453
- package/components/ui/route-map/index.ts +1 -1
- package/components/ui/route-map/route-map.mdx +8 -8
- package/components/ui/route-map/route-map.stories.tsx +48 -48
- package/components/ui/route-map/route-map.test.tsx +108 -108
- package/components/ui/route-map/route-map.tsx +349 -349
- package/components/ui/scroll-area/index.ts +1 -1
- package/components/ui/scroll-area/scroll-area.mdx +8 -8
- package/components/ui/scroll-area/scroll-area.stories.tsx +31 -31
- package/components/ui/scroll-area/scroll-area.test.tsx +27 -27
- package/components/ui/scroll-area/scroll-area.tsx +70 -70
- package/components/ui/search/index.ts +1 -1
- package/components/ui/search/search.mdx +8 -8
- package/components/ui/search/search.stories.tsx +107 -107
- package/components/ui/search/search.test.tsx +67 -67
- package/components/ui/search/search.tsx +141 -141
- package/components/ui/select/index.ts +1 -1
- package/components/ui/select/select.mdx +8 -8
- package/components/ui/select/select.stories.tsx +163 -163
- package/components/ui/select/select.test.tsx +99 -99
- package/components/ui/select/select.tsx +195 -195
- package/components/ui/separator/index.ts +1 -1
- package/components/ui/separator/separator.mdx +8 -8
- package/components/ui/separator/separator.stories.tsx +55 -55
- package/components/ui/separator/separator.test.tsx +23 -23
- package/components/ui/separator/separator.tsx +39 -39
- package/components/ui/sheet/index.ts +1 -1
- package/components/ui/sheet/sheet.mdx +8 -8
- package/components/ui/sheet/sheet.stories.tsx +93 -93
- package/components/ui/sheet/sheet.test.tsx +62 -62
- package/components/ui/sheet/sheet.tsx +149 -149
- package/components/ui/simple-map/index.ts +1 -1
- package/components/ui/simple-map/simple-map.mdx +8 -8
- package/components/ui/simple-map/simple-map.stories.tsx +44 -44
- package/components/ui/simple-map/simple-map.test.tsx +36 -36
- package/components/ui/simple-map/simple-map.tsx +92 -92
- package/components/ui/skeleton/index.ts +1 -1
- package/components/ui/skeleton/skeleton.mdx +8 -8
- package/components/ui/skeleton/skeleton.stories.tsx +36 -36
- package/components/ui/skeleton/skeleton.test.tsx +19 -19
- package/components/ui/skeleton/skeleton.tsx +25 -25
- package/components/ui/slider/index.ts +1 -1
- package/components/ui/slider/slider.mdx +8 -8
- package/components/ui/slider/slider.stories.tsx +44 -44
- package/components/ui/slider/slider.test.tsx +25 -25
- package/components/ui/slider/slider.tsx +66 -66
- package/components/ui/sonner/index.ts +1 -1
- package/components/ui/sonner/sonner.mdx +8 -8
- package/components/ui/sonner/sonner.stories.tsx +41 -41
- package/components/ui/sonner/sonner.test.tsx +24 -24
- package/components/ui/sonner/sonner.tsx +74 -74
- package/components/ui/stats-card/index.ts +2 -1
- package/components/ui/stats-card/stats-card-skeleton.tsx +62 -0
- package/components/ui/stats-card/stats-card.mdx +8 -8
- package/components/ui/stats-card/stats-card.stories.tsx +99 -77
- package/components/ui/stats-card/stats-card.test.tsx +34 -34
- package/components/ui/stats-card/stats-card.tsx +93 -93
- package/components/ui/stepper/index.ts +3 -3
- package/components/ui/stepper/stepper.mdx +8 -8
- package/components/ui/stepper/stepper.stories.tsx +171 -171
- package/components/ui/stepper/stepper.test.tsx +47 -47
- package/components/ui/stepper/stepper.tsx +190 -190
- package/components/ui/stepper/use-stepper.ts +139 -139
- package/components/ui/switch/index.ts +1 -1
- package/components/ui/switch/switch.mdx +8 -8
- package/components/ui/switch/switch.stories.tsx +93 -93
- package/components/ui/switch/switch.test.tsx +44 -44
- package/components/ui/switch/switch.tsx +70 -70
- package/components/ui/table/index.ts +1 -1
- package/components/ui/table/table.mdx +8 -8
- package/components/ui/table/table.stories.tsx +114 -114
- package/components/ui/table/table.test.tsx +43 -43
- package/components/ui/table/table.tsx +104 -104
- package/components/ui/tabs/index.ts +1 -1
- package/components/ui/tabs/tabs.mdx +8 -8
- package/components/ui/tabs/tabs.stories.tsx +140 -140
- package/components/ui/tabs/tabs.test.tsx +50 -50
- package/components/ui/tabs/tabs.tsx +66 -66
- package/components/ui/textarea/index.ts +1 -1
- package/components/ui/textarea/textarea.mdx +8 -8
- package/components/ui/textarea/textarea.stories.tsx +69 -69
- package/components/ui/textarea/textarea.test.tsx +41 -41
- package/components/ui/textarea/textarea.tsx +61 -61
- package/components/ui/timeline/index.ts +1 -1
- package/components/ui/timeline/timeline.mdx +8 -8
- package/components/ui/timeline/timeline.stories.tsx +97 -97
- package/components/ui/timeline/timeline.test.tsx +53 -53
- package/components/ui/timeline/timeline.tsx +124 -124
- package/components/ui/toggle/index.ts +1 -1
- package/components/ui/toggle/toggle.mdx +8 -8
- package/components/ui/toggle/toggle.stories.tsx +56 -56
- package/components/ui/toggle/toggle.test.tsx +32 -32
- package/components/ui/toggle/toggle.tsx +55 -55
- package/components/ui/toggle-group/index.ts +1 -1
- package/components/ui/toggle-group/toggle-group.mdx +8 -8
- package/components/ui/toggle-group/toggle-group.stories.tsx +66 -66
- package/components/ui/toggle-group/toggle-group.test.tsx +47 -47
- package/components/ui/toggle-group/toggle-group.tsx +79 -79
- package/components/ui/tooltip/index.ts +1 -1
- package/components/ui/tooltip/tooltip.mdx +8 -8
- package/components/ui/tooltip/tooltip.stories.tsx +83 -83
- package/components/ui/tooltip/tooltip.test.tsx +39 -39
- package/components/ui/tooltip/tooltip.tsx +69 -69
- package/components/ui/tree-view/index.ts +4 -4
- package/components/ui/tree-view/tree-view.mdx +8 -8
- package/components/ui/tree-view/tree-view.stories.tsx +154 -154
- package/components/ui/tree-view/tree-view.test.tsx +58 -58
- package/components/ui/tree-view/tree-view.tsx +171 -171
- package/components/ui/tree-view/use-tree-view.ts +237 -237
- package/components.json +892 -892
- package/contexts/ApiKeyContext.test.tsx +26 -26
- package/contexts/ApiKeyContext.tsx +196 -196
- package/contexts/AssistenteContext.test.tsx +17 -17
- package/contexts/AssistenteContext.tsx +113 -113
- package/contexts/AuthContext.tsx +118 -118
- package/contexts/BrandColorsContext.test.tsx +21 -21
- package/contexts/BrandColorsContext.tsx +251 -251
- package/contexts/LanguageContext.test.tsx +108 -16
- package/contexts/LanguageContext.tsx +202 -17
- package/contexts/LayoutContext.test.tsx +29 -29
- package/contexts/LayoutContext.tsx +140 -140
- package/contexts/ThemeContext.test.tsx +38 -38
- package/contexts/ThemeContext.tsx +111 -111
- package/contexts/index.ts +8 -8
- package/contexts/theme-data.ts +340 -340
- package/dist/{AssistantChart-DoZCyS5r.cjs → AssistantChart-9w31gdAb.cjs} +4 -4
- package/dist/{AssistantChart-CldVCVDe.cjs → AssistantChart-BAudAfne.cjs} +5 -5
- package/dist/{AssistantChart-Bdd44uBn.cjs → AssistantChart-BAx9VQvb.cjs} +127 -388
- package/dist/{AssistantChart-Cu3m7RBo.js → AssistantChart-BP8upjMk.js} +5 -5
- package/dist/{use-mobile-BXuYROXM.js → AssistantChart-BXU1ACnh.js} +958 -1671
- package/dist/{AssistantChart-CFhDdGyU.js → AssistantChart-CVko2A1W.js} +130 -391
- package/dist/{AssistantChart-C_hwFRRr.js → AssistantChart-CVzmmhx4.js} +4 -4
- package/dist/{use-mobile-CG2-SdXV.cjs → AssistantChart-D0A1FPYt.cjs} +980 -1700
- package/dist/{AudioPlayer-IAU5q5T1.cjs → AudioPlayer-1ypwE2Wh.cjs} +1 -1
- package/dist/AudioPlayer-BWDW6TN9.cjs +1279 -0
- package/dist/AudioPlayer-CM962GEh.js +1280 -0
- package/dist/{AudioPlayer-CySJIyvL.js → AudioPlayer-DuKXrCfy.js} +1 -1
- package/dist/CodeBlock-CV6dtsTM.cjs +220 -0
- package/dist/CodeBlock-CjeFavqV.js +221 -0
- package/dist/{FeatureCard-DbHWCb4E.js → FeatureCard-Cfs6Ishq.js} +221 -37
- package/dist/FeatureCard-ie3L8Fpr.cjs +484 -0
- package/dist/FeatureCardSkeleton-CAgu8stE.js +27 -0
- package/dist/FeatureCardSkeleton-mO3Bdm_V.cjs +26 -0
- package/dist/{LanguageContext-CS14yCpi.js → LanguageContext-BwhwC3G2.js} +2 -2
- package/dist/{LanguageContext-B_KFTCzT.cjs → LanguageContext-DvUt5jBg.cjs} +2 -2
- package/dist/{ThemeContext-C2EwAPDt.js → ThemeContext-BbBNoFTG.js} +2 -2
- package/dist/ThemeContext-BblcjQup.cjs +1855 -0
- package/dist/ThemeContext-Bo-W2WZH.js +1856 -0
- package/dist/ThemeContext-CP3a0jxy.cjs +1855 -0
- package/dist/{ThemeContext-vTjumZeM.cjs → ThemeContext-Cmr8Ex8H.cjs} +2 -2
- package/dist/ThemeContext-CpqYShLq.cjs +324 -0
- package/dist/{ThemeContext-CQSo4Iwc.js → ThemeContext-D3LzacmG.js} +8 -1
- package/dist/ThemeContext-Du2nE1PL.js +325 -0
- package/dist/ThemeContext-GeEBTJ3q.cjs +1621 -0
- package/dist/ThemeContext-JyLK9B1o.js +1622 -0
- package/dist/{ThemeContext-CGk3KK0k.cjs → ThemeContext-U4dEYc6C.cjs} +8 -1
- package/dist/ThemeContext-ept8jhXI.js +1856 -0
- package/dist/{VerifyEmailPage-C0c2e5n0.js → VerifyEmailPage-BE-L9mB7.js} +7 -7
- package/dist/VerifyEmailPage-BIBOKV7Z.js +3214 -0
- package/dist/{VerifyEmailPage--1Vurewl.cjs → VerifyEmailPage-BRSP-Pwt.cjs} +3 -3
- package/dist/{VerifyEmailPage-Cwi3kbol.cjs → VerifyEmailPage-Bae2cBXT.cjs} +7 -7
- package/dist/{VerifyEmailPage-DjQKRlUS.cjs → VerifyEmailPage-BiRm7Nh4.cjs} +1185 -796
- package/dist/VerifyEmailPage-Bvfv8HVQ.js +3214 -0
- package/dist/{VerifyEmailPage-BComraR7.cjs → VerifyEmailPage-CR7kb5df.cjs} +22 -12
- package/dist/{VerifyEmailPage-MTD7AG1Z.js → VerifyEmailPage-C_ihbcth.js} +4 -4
- package/dist/{VerifyEmailPage-1WwWczAn.js → VerifyEmailPage-CbgjOF0v.js} +22 -12
- package/dist/{VerifyEmailPage-DvMLZgFt.js → VerifyEmailPage-CdYPSJoO.js} +1 -1
- package/dist/VerifyEmailPage-D-FRj5TU.cjs +3213 -0
- package/dist/{VerifyEmailPage-s-1X3LDJ.cjs → VerifyEmailPage-DF2ilhum.cjs} +1049 -665
- package/dist/{VerifyEmailPage-CYXtbKi3.cjs → VerifyEmailPage-DMBh4NM9.cjs} +1 -1
- package/dist/{VerifyEmailPage-CgMxRb4z.js → VerifyEmailPage-DTtFfC-J.js} +3 -3
- package/dist/{VerifyEmailPage-CFLMls1p.cjs → VerifyEmailPage-Dt7zgA4w.cjs} +4 -4
- package/dist/VerifyEmailPage-EhudUdqF.js +3211 -0
- package/dist/VerifyEmailPage-hdB8JQGv.cjs +3213 -0
- package/dist/VerifyEmailPage-vYHbYK3q.js +3214 -0
- package/dist/XerticaProvider-AChwphCO.cjs +48 -0
- package/dist/XerticaProvider-AbWlr7Af.cjs +48 -0
- package/dist/{XerticaProvider-D-yNhF94.cjs → XerticaProvider-B8CaV7xu.cjs} +1 -1
- package/dist/{XerticaProvider-CEoWMTxu.js → XerticaProvider-BITjgC5p.js} +2 -2
- package/dist/{XerticaProvider-CllrbMEJ.cjs → XerticaProvider-By8q3Roe.cjs} +2 -2
- package/dist/XerticaProvider-CUYJZc32.js +49 -0
- package/dist/{XerticaProvider-ET0ihewn.cjs → XerticaProvider-CW9hpCdF.cjs} +2 -2
- package/dist/XerticaProvider-CWgby5mY.js +49 -0
- package/dist/XerticaProvider-CWs6EwNa.js +49 -0
- package/dist/XerticaProvider-CjQAQPcn.cjs +48 -0
- package/dist/XerticaProvider-D5lLumH-.js +49 -0
- package/dist/{XerticaProvider-DYq4JWtg.js → XerticaProvider-DQtvJU7m.js} +1 -1
- package/dist/XerticaProvider-qQUDop71.cjs +48 -0
- package/dist/{XerticaProvider-B7EVH-NF.js → XerticaProvider-siSt9uG2.js} +2 -2
- package/dist/{LanguageSelector-D6uacAIM.cjs → XerticaXLogo-8TTzBjHw.cjs} +136 -115
- package/dist/{LanguageSelector-B5YfbHra.js → XerticaXLogo-BWaag64t.js} +136 -115
- package/dist/XerticaXLogo-CFuIlYFH.js +252 -0
- package/dist/XerticaXLogo-CU-U-GP4.cjs +251 -0
- package/dist/XerticaXLogo-ChryA6xj.js +252 -0
- package/dist/{XerticaXLogo-CQUUjXoH.cjs → XerticaXLogo-CziKMQil.cjs} +8 -8
- package/dist/XerticaXLogo-DHz5SugF.js +252 -0
- package/dist/XerticaXLogo-DTee_y8X.cjs +251 -0
- package/dist/{XerticaXLogo-Cmsp-Eey.js → XerticaXLogo-DfUvz-lD.js} +9 -9
- package/dist/XerticaXLogo-kslQ8Tk_.cjs +251 -0
- package/dist/{alert-dialog-s-vmNkJ_.js → alert-dialog-iDe5VE5o.js} +3 -3
- package/dist/{alert-dialog-DSKByiKZ.cjs → alert-dialog-yckpaOpy.cjs} +3 -3
- package/dist/assistant.cjs.js +2 -2
- package/dist/assistant.es.js +2 -2
- package/dist/blocks.cjs.js +8 -1
- package/dist/blocks.es.js +10 -3
- package/dist/brand.cjs.js +2 -2
- package/dist/brand.es.js +2 -2
- package/dist/cli.js +524 -164
- package/dist/components/blocks/card-patterns/ActivityCardSkeleton.d.ts +19 -0
- package/dist/components/blocks/card-patterns/FeatureCardSkeleton.d.ts +18 -0
- package/dist/components/blocks/card-patterns/NotificationCardSkeleton.d.ts +21 -0
- package/dist/components/blocks/card-patterns/ProfileCardSkeleton.d.ts +20 -0
- package/dist/components/blocks/card-patterns/ProjectCardSkeleton.d.ts +18 -0
- package/dist/components/blocks/card-patterns/QuickActionCardSkeleton.d.ts +16 -0
- package/dist/components/blocks/card-patterns/index.d.ts +12 -0
- package/dist/components/brand/language-selector/LanguageSelector.d.ts +15 -1
- package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +29 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/ui/stats-card/index.d.ts +1 -0
- package/dist/components/ui/stats-card/stats-card-skeleton.d.ts +25 -0
- package/dist/contexts/LanguageContext.d.ts +66 -5
- package/dist/features/assistant/data/mock.d.ts +2 -2
- package/dist/features/assistant/hooks/useAssistantConfig.d.ts +0 -1
- package/dist/features/assistant/index.d.ts +1 -1
- package/dist/features/home/hooks/useDashboardStats.d.ts +0 -1
- package/dist/features/home/hooks/useFeatureCards.d.ts +0 -1
- package/dist/features/home/hooks/useTeamMembers.d.ts +0 -1
- package/dist/features/home/index.d.ts +3 -3
- package/dist/{google-maps-loader-Y-QkD-Li.cjs → google-maps-loader-BqsYL48U.cjs} +0 -5
- package/dist/{google-maps-loader-CTYySAun.js → google-maps-loader-t2IlYBzw.js} +0 -4
- package/dist/hooks.cjs.js +2 -1
- package/dist/hooks.es.js +2 -1
- package/dist/i18n.d.ts +13 -0
- package/dist/index-CkTUgOwX.js +8 -0
- package/dist/{index-COtD8bRW.cjs → index-D3RLKRAs.cjs} +1 -1
- package/dist/index.cjs.js +34 -19
- package/dist/index.es.js +71 -56
- package/dist/index.umd.js +454 -1027
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/media.cjs.js +1 -1
- package/dist/media.es.js +1 -1
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/{rich-text-editor-Bp3zQqMC.js → rich-text-editor-1UW3Y2JK.js} +989 -1052
- package/dist/{rich-text-editor-CeucBdIv.cjs → rich-text-editor-CyggTOLQ.cjs} +989 -1052
- package/dist/{sidebar-DQj1z3jG.cjs → sidebar-B3EYhli0.cjs} +269 -227
- package/dist/{sidebar-CK_0ZQHj.cjs → sidebar-B9NR0lCe.cjs} +271 -274
- package/dist/sidebar-BvF5I2Ue.cjs +800 -0
- package/dist/{sidebar-q7P2Godd.cjs → sidebar-C5B_LHek.cjs} +1 -1
- package/dist/{sidebar-LluMXfam.js → sidebar-CA6_ek3f.js} +269 -227
- package/dist/{sidebar-BxGXsDAd.cjs → sidebar-CVUGHOS_.cjs} +8 -16
- package/dist/{sidebar-BViy8Eeu.js → sidebar-CmvwjnVb.js} +9 -17
- package/dist/{sidebar-CUuOvYhK.js → sidebar-CplprZpM.js} +272 -258
- package/dist/{sidebar-BbVIQvlP.js → sidebar-Dz7bd3zP.js} +1 -1
- package/dist/sidebar-KIS0C2JH.js +801 -0
- package/dist/sidebar-OTO_up7Z.js +801 -0
- package/dist/sidebar-zowjejT2.cjs +800 -0
- package/dist/skeleton-4zoHiFJ_.cjs +83 -0
- package/dist/skeleton-C4bHqUBf.js +84 -0
- package/dist/ui.cjs.js +12 -11
- package/dist/ui.es.js +46 -45
- package/dist/{use-audio-player-nv8ZSGa1.js → use-audio-player-Bkh23vQ3.js} +3 -7
- package/dist/{use-audio-player-NKsWyjWu.cjs → use-audio-player-Dn1NR9xN.cjs} +3 -7
- package/dist/{xertica-assistant-dyP7KHM5.cjs → xertica-assistant-B1IaHXnB.cjs} +388 -529
- package/dist/{xertica-assistant-ciJaWqm1.js → xertica-assistant-BMqdyRVi.js} +10 -28
- package/dist/{xertica-assistant-BdiZag0h.js → xertica-assistant-BbgzsgsG.js} +539 -562
- package/dist/{xertica-assistant-V_IdW4WF.cjs → xertica-assistant-Bj3vBCq_.cjs} +9 -27
- package/dist/{xertica-assistant-yX1CFBBo.js → xertica-assistant-DPsESB6t.js} +390 -531
- package/dist/{CodeBlock-7TTgmdGG.cjs → xertica-assistant-Qp3ydksa.cjs} +51 -263
- package/dist/{xertica-assistant-DUBpmEgo.cjs → xertica-assistant-d2qs2Vd9.cjs} +538 -561
- package/dist/{CodeBlock-DnYNI8rQ.js → xertica-assistant-gnCJdcZY.js} +7 -219
- package/dist/xertica-ui.css +2 -2
- package/docs/ai-usage.md +195 -195
- package/docs/architecture-improvements.md +456 -476
- package/docs/architecture.md +306 -273
- package/docs/components/accordion.md +109 -109
- package/docs/components/alert-dialog.md +127 -127
- package/docs/components/alert.md +106 -106
- package/docs/components/aspect-ratio.md +58 -58
- package/docs/components/assistant-chart.md +47 -47
- package/docs/components/assistant.md +426 -426
- package/docs/components/audio-player.md +167 -167
- package/docs/components/avatar.md +101 -101
- package/docs/components/badge.md +84 -84
- package/docs/components/branding.md +252 -249
- package/docs/components/breadcrumb.md +104 -104
- package/docs/components/button.md +156 -156
- package/docs/components/calendar.md +141 -141
- package/docs/components/card-patterns.md +445 -376
- package/docs/components/card.md +245 -245
- package/docs/components/carousel.md +100 -100
- package/docs/components/chart.md +638 -638
- package/docs/components/checkbox.md +88 -88
- package/docs/components/code-block.md +105 -105
- package/docs/components/collapsible.md +86 -86
- package/docs/components/command.md +113 -113
- package/docs/components/context-menu.md +81 -81
- package/docs/components/dialog.md +198 -198
- package/docs/components/drawer.md +105 -105
- package/docs/components/dropdown-menu.md +127 -127
- package/docs/components/empty.md +127 -127
- package/docs/components/error-boundary.md +191 -191
- package/docs/components/file-upload.md +189 -189
- package/docs/components/floating-media-wrapper.md +63 -63
- package/docs/components/form.md +177 -177
- package/docs/components/formatted-document.md +105 -105
- package/docs/components/google-maps-loader.md +44 -44
- package/docs/components/header.md +177 -177
- package/docs/components/hooks.md +430 -425
- package/docs/components/hover-card.md +86 -86
- package/docs/components/image-with-fallback.md +107 -107
- package/docs/components/input-otp.md +95 -95
- package/docs/components/input.md +130 -130
- package/docs/components/label.md +69 -69
- package/docs/components/language-selector.md +71 -16
- package/docs/components/map-layers.md +138 -138
- package/docs/components/map.md +84 -84
- package/docs/components/markdown-message.md +47 -47
- package/docs/components/menubar.md +89 -89
- package/docs/components/modern-chat-input.md +164 -164
- package/docs/components/navigation-menu.md +83 -83
- package/docs/components/notification-badge.md +78 -78
- package/docs/components/page-header.md +93 -93
- package/docs/components/pages.md +309 -309
- package/docs/components/pagination.md +334 -334
- package/docs/components/popover.md +116 -116
- package/docs/components/progress.md +103 -103
- package/docs/components/radio-group.md +133 -133
- package/docs/components/rating.md +77 -77
- package/docs/components/resizable.md +84 -84
- package/docs/components/rich-text-editor.md +255 -255
- package/docs/components/route-map.md +124 -124
- package/docs/components/scroll-area.md +58 -58
- package/docs/components/search.md +87 -87
- package/docs/components/select.md +144 -144
- package/docs/components/separator.md +58 -58
- package/docs/components/sheet.md +122 -122
- package/docs/components/sidebar.md +314 -314
- package/docs/components/simple-map.md +51 -51
- package/docs/components/skeleton.md +99 -99
- package/docs/components/slider.md +84 -84
- package/docs/components/sonner.md +115 -115
- package/docs/components/stats-card.md +120 -120
- package/docs/components/stepper.md +268 -268
- package/docs/components/switch.md +106 -106
- package/docs/components/table.md +138 -138
- package/docs/components/tabs.md +117 -117
- package/docs/components/textarea.md +86 -86
- package/docs/components/theme-toggle.md +73 -73
- package/docs/components/timeline.md +121 -121
- package/docs/components/toggle-group.md +68 -68
- package/docs/components/toggle.md +62 -62
- package/docs/components/tooltip.md +116 -116
- package/docs/components/tree-view.md +238 -238
- package/docs/components/use-mobile.md +96 -96
- package/docs/components/video-player.md +68 -68
- package/docs/components/xertica-logo.md +36 -36
- package/docs/components/xertica-orbe.md +35 -35
- package/docs/components/xertica-provider.md +65 -65
- package/docs/components/xertica-xlogo.md +35 -35
- package/docs/decision-tree.md +293 -293
- package/docs/doc-audit.md +243 -224
- package/docs/form-sizing.md +162 -162
- package/docs/getting-started.md +591 -568
- package/docs/guidelines.md +328 -222
- package/docs/i18n.md +324 -43
- package/docs/installation.md +267 -267
- package/docs/layout.md +143 -143
- package/docs/llms.md +295 -295
- package/docs/patterns/analytics.md +194 -194
- package/docs/patterns/crud.md +149 -149
- package/docs/patterns/dashboard.md +138 -138
- package/docs/patterns/detail-page.md +296 -296
- package/docs/patterns/form.md +241 -241
- package/docs/patterns/login.md +156 -156
- package/docs/patterns/settings.md +368 -368
- package/docs/patterns/wizard.md +213 -213
- package/docs/state-management.md +289 -283
- package/guidelines/Guidelines.md +406 -257
- package/hooks/useTheme.test.tsx +16 -16
- package/hooks/useTheme.ts +4 -4
- package/imports/Podcast.tsx +540 -540
- package/imports/XerticaAi.tsx +46 -46
- package/imports/XerticaX.tsx +15 -15
- package/imports/svg-aueiaqngck.ts +20 -20
- package/imports/svg-v9krss1ozd.ts +23 -23
- package/imports/svg-vhrdofe3qe.ts +6 -6
- package/llms-compact.txt +1 -1
- package/llms-full.txt +5 -2
- package/llms.txt +186 -186
- package/mcp/resources.json +22 -22
- package/mcp/tools.json +35 -35
- package/package.json +213 -213
- package/scripts/ai-validator.ts +91 -91
- package/scripts/cleanup-case-dupes.ts +62 -62
- package/scripts/generate-ai-manifests.ts +107 -107
- package/styles/globals.css +13 -13
- package/styles/xertica/app-overrides/chat.css +61 -61
- package/styles/xertica/app-overrides/scrollbar.css +33 -33
- package/styles/xertica/base.css +71 -71
- package/styles/xertica/integrations/google-maps.css +76 -76
- package/styles/xertica/integrations/sonner.css +73 -73
- package/styles/xertica/theme-map.css +99 -99
- package/styles/xertica/tokens.css +236 -236
- package/templates/.prettierignore +4 -4
- package/templates/.prettierrc +10 -10
- package/templates/CLAUDE.md +180 -180
- package/templates/eslint.config.js +26 -26
- package/templates/guidelines/Guidelines.md +553 -335
- package/templates/package.json +69 -69
- package/templates/postcss.config.js +6 -6
- package/templates/src/app/App.tsx +46 -46
- package/templates/src/app/components/AppLayout.tsx +55 -55
- package/templates/src/app/components/AuthGuard.tsx +82 -82
- package/templates/src/app/context/AuthContext.tsx +108 -108
- package/templates/src/features/assistant/data/mock.ts +21 -12
- package/templates/src/features/assistant/hooks/useAssistantConfig.ts +4 -3
- package/templates/src/features/assistant/index.ts +5 -5
- package/templates/src/features/auth/index.ts +4 -4
- package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
- package/templates/src/features/auth/ui/LoginContent.tsx +90 -90
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +177 -177
- package/templates/src/features/auth/ui/SocialLoginButtons.tsx +73 -73
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
- package/templates/src/features/home/data/mock.ts +35 -35
- package/templates/src/features/home/hooks/useFeatureCards.ts +4 -3
- package/templates/src/features/home/index.ts +11 -11
- package/templates/src/features/home/store/dashboardStore.ts +25 -25
- package/templates/src/features/home/ui/HomeContent.tsx +119 -121
- package/templates/src/features/template/index.ts +5 -5
- package/templates/src/features/template/ui/CrudTemplate.tsx +32 -17
- package/templates/src/features/template/ui/DashboardTemplate.tsx +31 -15
- package/templates/src/features/template/ui/FormTemplate.tsx +21 -21
- package/templates/src/features/template/ui/LoginTemplate.tsx +14 -7
- package/templates/src/features/template/ui/TemplateContent.tsx +403 -288
- package/templates/src/i18n.ts +97 -11
- package/templates/src/locales/en/common.json +21 -0
- package/templates/src/locales/en/components/activityCard.json +10 -0
- package/templates/src/locales/en/components/assistant.json +105 -0
- package/templates/src/locales/en/components/media.json +29 -0
- package/templates/src/locales/en/components/notificationCard.json +5 -0
- package/templates/src/locales/en/components/profileCard.json +8 -0
- package/templates/src/locales/en/components/projectCard.json +10 -0
- package/templates/src/locales/en/components/sidebar.json +14 -0
- package/templates/src/locales/en/components/stats.json +8 -0
- package/templates/src/locales/en/components/team.json +14 -0
- package/templates/src/locales/en/errors.json +9 -0
- package/templates/src/locales/en/languageSelector.json +7 -0
- package/templates/src/locales/en/nav.json +6 -0
- package/templates/src/locales/en/pages/crudTemplate.json +25 -0
- package/templates/src/locales/en/pages/dashboardTemplate.json +20 -0
- package/templates/src/locales/en/pages/formTemplate.json +16 -0
- package/templates/src/locales/en/pages/home.json +7 -0
- package/templates/src/locales/en/pages/login.json +15 -0
- package/templates/src/locales/en/pages/loginTemplate.json +9 -0
- package/templates/src/locales/en/pages/resetPassword.json +18 -0
- package/templates/src/locales/en/pages/templates.json +317 -0
- package/templates/src/locales/en/pages/verifyEmail.json +12 -0
- package/templates/src/locales/en/themeToggle.json +6 -0
- package/templates/src/locales/es/common.json +21 -0
- package/templates/src/locales/es/components/activityCard.json +10 -0
- package/templates/src/locales/es/components/assistant.json +105 -0
- package/templates/src/locales/es/components/media.json +29 -0
- package/templates/src/locales/es/components/notificationCard.json +5 -0
- package/templates/src/locales/es/components/profileCard.json +8 -0
- package/templates/src/locales/es/components/projectCard.json +10 -0
- package/templates/src/locales/es/components/sidebar.json +14 -0
- package/templates/src/locales/es/components/stats.json +8 -0
- package/templates/src/locales/es/components/team.json +14 -0
- package/templates/src/locales/es/errors.json +9 -0
- package/templates/src/locales/es/languageSelector.json +7 -0
- package/templates/src/locales/es/nav.json +6 -0
- package/templates/src/locales/es/pages/crudTemplate.json +25 -0
- package/templates/src/locales/es/pages/dashboardTemplate.json +20 -0
- package/templates/src/locales/es/pages/formTemplate.json +16 -0
- package/templates/src/locales/es/pages/home.json +7 -0
- package/templates/src/locales/es/pages/login.json +15 -0
- package/templates/src/locales/es/pages/loginTemplate.json +9 -0
- package/templates/src/locales/es/pages/resetPassword.json +18 -0
- package/templates/src/locales/es/pages/templates.json +317 -0
- package/templates/src/locales/es/pages/verifyEmail.json +12 -0
- package/templates/src/locales/es/themeToggle.json +6 -0
- package/templates/src/locales/pt-BR/common.json +21 -0
- package/templates/src/locales/pt-BR/components/activityCard.json +10 -0
- package/templates/src/locales/pt-BR/components/assistant.json +105 -0
- package/templates/src/locales/pt-BR/components/media.json +29 -0
- package/templates/src/locales/pt-BR/components/notificationCard.json +5 -0
- package/templates/src/locales/pt-BR/components/profileCard.json +8 -0
- package/templates/src/locales/pt-BR/components/projectCard.json +10 -0
- package/templates/src/locales/pt-BR/components/sidebar.json +14 -0
- package/templates/src/locales/pt-BR/components/stats.json +8 -0
- package/templates/src/locales/pt-BR/components/team.json +14 -0
- package/templates/src/locales/pt-BR/errors.json +9 -0
- package/templates/src/locales/pt-BR/languageSelector.json +7 -0
- package/templates/src/locales/pt-BR/nav.json +6 -0
- package/templates/src/locales/pt-BR/pages/crudTemplate.json +25 -0
- package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +20 -0
- package/templates/src/locales/pt-BR/pages/formTemplate.json +16 -0
- package/templates/src/locales/pt-BR/pages/home.json +7 -0
- package/templates/src/locales/pt-BR/pages/login.json +15 -0
- package/templates/src/locales/pt-BR/pages/loginTemplate.json +9 -0
- package/templates/src/locales/pt-BR/pages/resetPassword.json +18 -0
- package/templates/src/locales/pt-BR/pages/templates.json +317 -0
- package/templates/src/locales/pt-BR/pages/verifyEmail.json +12 -0
- package/templates/src/locales/pt-BR/themeToggle.json +6 -0
- package/templates/src/main.tsx +11 -11
- package/templates/src/pages/AssistantPage.tsx +463 -463
- package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
- package/templates/src/pages/HomePage.tsx +49 -50
- package/templates/src/pages/LoginPage.tsx +10 -10
- package/templates/src/pages/ResetPasswordPage.tsx +6 -6
- package/templates/src/pages/TemplatePage.tsx +28 -28
- package/templates/src/pages/VerifyEmailPage.tsx +6 -6
- package/templates/src/shared/config/navigation.ts +19 -19
- package/templates/src/shared/error-boundary.tsx +154 -154
- package/templates/src/shared/error-fallbacks.tsx +226 -226
- package/templates/src/shared/lib/auth.ts +20 -20
- package/templates/src/shared/types/auth.ts +3 -3
- package/templates/src/styles/index.css +95 -95
- package/templates/src/styles/xertica/tokens.css +236 -236
- package/templates/tsconfig.json +25 -25
- package/templates/tsconfig.node.json +12 -12
- package/templates/vite-env.d.ts +1 -1
- package/templates/vite.config.ts +51 -21
- package/utils/color-utils.ts +72 -72
- package/utils/demo-responses.test.ts +10 -10
- package/utils/demo-responses.ts +151 -151
- package/utils/gemini.test.ts +25 -25
- package/utils/gemini.ts +155 -155
- package/dist/AssistantChart-DIpshm3i.js +0 -4784
- package/dist/AssistantChart-zjsy2GaZ.cjs +0 -4810
- package/dist/AudioPlayer-B1lt5cPl.cjs +0 -989
- package/dist/AudioPlayer-BZ7bibzU.cjs +0 -982
- package/dist/AudioPlayer-C12BjQBV.cjs +0 -997
- package/dist/AudioPlayer-CFeV8t-5.cjs +0 -936
- package/dist/AudioPlayer-CGRUtUdN.js +0 -937
- package/dist/AudioPlayer-DMcG_c7L.js +0 -990
- package/dist/AudioPlayer-DcFKRJE_.js +0 -998
- package/dist/AudioPlayer-e8LfNoqO.js +0 -983
- package/dist/CodeBlock-BeSt1h5P.js +0 -2078
- package/dist/CodeBlock-BgfYL_rD.cjs +0 -2094
- package/dist/CodeBlock-BlcqlA9M.cjs +0 -2094
- package/dist/CodeBlock-Bnmeu5ez.cjs +0 -2094
- package/dist/CodeBlock-BtfPlbAI.js +0 -2078
- package/dist/CodeBlock-CIySIuYr.js +0 -2078
- package/dist/CodeBlock-CuPtUM-7.cjs +0 -2094
- package/dist/CodeBlock-D6ffWXgc.js +0 -2078
- package/dist/CodeBlock-D8dcwbit.cjs +0 -2094
- package/dist/CodeBlock-DMZrFnlw.cjs +0 -2094
- package/dist/CodeBlock-DlBehYN8.js +0 -2078
- package/dist/CodeBlock-DvKWbSnE.cjs +0 -2094
- package/dist/CodeBlock-DwMCfkFY.js +0 -2078
- package/dist/CodeBlock-Dy6CNYyj.js +0 -2078
- package/dist/CodeBlock-U1pPOQI7.cjs +0 -2094
- package/dist/CodeBlock-f_GpNhEB.js +0 -2078
- package/dist/CodeBlock-oB6u8nI1.js +0 -2078
- package/dist/CodeBlock-tZC31B73.cjs +0 -2094
- package/dist/FeatureCard-CxC-7C-C.cjs +0 -300
- package/dist/ImageWithFallback-CGtidP6B.cjs +0 -4542
- package/dist/ImageWithFallback-lsg3pdFg.js +0 -4508
- package/dist/LayoutContext-BAql6ZRY.js +0 -97
- package/dist/LayoutContext-BvK-ggDa.cjs +0 -96
- package/dist/ThemeContext-BoH4NLfN.js +0 -734
- package/dist/ThemeContext-r69W20Xg.cjs +0 -733
- package/dist/VerifyEmailPage-COiyNl1y.js +0 -2825
- package/dist/VerifyEmailPage-CqKsR2v8.js +0 -2827
- package/dist/XerticaOrbe-KL1RBHzw.cjs +0 -1354
- package/dist/XerticaOrbe-zwS1p2a8.js +0 -1355
- package/dist/XerticaProvider-6btlAlzc.js +0 -17
- package/dist/XerticaProvider-BNoNOxQ5.cjs +0 -16
- package/dist/XerticaProvider-BlY2limY.cjs +0 -38
- package/dist/XerticaProvider-DDuiIcKo.js +0 -39
- package/dist/XerticaProvider-cI9hSs27.cjs +0 -38
- package/dist/XerticaProvider-hSwhNQex.js +0 -39
- package/dist/breadcrumb-CqJ7bHY5.js +0 -161
- package/dist/breadcrumb-m9Hb2_XN.cjs +0 -177
- package/dist/components/assistant/xertica-assistant/hooks/index.d.ts +0 -6
- package/dist/components/assistant/xertica-assistant/hooks/use-assistant-conversations.d.ts +0 -21
- package/dist/components/assistant/xertica-assistant/hooks/use-assistant-messages.d.ts +0 -49
- package/dist/components/assistant/xertica-assistant/hooks/use-assistant-suggestions.d.ts +0 -16
- package/dist/components/blocks/audio-player/AudioPlayer.d.ts +0 -35
- package/dist/components/blocks/audio-player/index.d.ts +0 -1
- package/dist/components/blocks/document-editor/DocumentEditor.d.ts +0 -26
- package/dist/components/blocks/document-editor/index.d.ts +0 -1
- package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +0 -41
- package/dist/components/blocks/podcast-player/index.d.ts +0 -1
- package/dist/components/ui/chart/parts/chart-dashboard.d.ts +0 -113
- package/dist/components/ui/chart/parts/chart-metric.d.ts +0 -118
- package/dist/components/ui/chart/parts/chart-primitives.d.ts +0 -101
- package/dist/components/ui/chart/parts/chart-shared.d.ts +0 -20
- package/dist/components/ui/chart/parts/chart-utils.d.ts +0 -12
- package/dist/components/ui/chart/parts/index.d.ts +0 -5
- package/dist/dropdown-menu-BDB5CmQs.cjs +0 -247
- package/dist/dropdown-menu-DQidbKBD.js +0 -231
- package/dist/google-maps-loader-BFWp6VPd.js +0 -287
- package/dist/google-maps-loader-eS3uQ5TA.cjs +0 -287
- package/dist/header-Cgy6vYPk.cjs +0 -731
- package/dist/header-DRlT4jgI.js +0 -715
- package/dist/header-Dux00SI4.cjs +0 -731
- package/dist/header-EkGKXPsD.js +0 -715
- package/dist/header-WfEywpyc.cjs +0 -731
- package/dist/header-tifNQn2U.js +0 -715
- package/dist/index-BhapVLVj.js +0 -8
- package/dist/index-D6fxYEY8.cjs +0 -7
- package/dist/index-DW5tYe26.js +0 -8
- package/dist/input-2R4loU86.js +0 -127
- package/dist/input-DWANSKGb.cjs +0 -145
- package/dist/progress-DPtzoVV8.js +0 -175
- package/dist/progress-EeaoqqUs.cjs +0 -191
- package/dist/rich-text-editor-0mraWT5y.cjs +0 -2376
- package/dist/rich-text-editor-B6jMRLzk.cjs +0 -1939
- package/dist/rich-text-editor-B8_oYcIR.js +0 -1730
- package/dist/rich-text-editor-B9UbSXNb.js +0 -1203
- package/dist/rich-text-editor-BYuRBNBU.js +0 -2373
- package/dist/rich-text-editor-Bb9pySTs.cjs +0 -2374
- package/dist/rich-text-editor-BcL6L3cm.cjs +0 -2374
- package/dist/rich-text-editor-BoVZYtTs.cjs +0 -2391
- package/dist/rich-text-editor-CMgSN_w2.js +0 -1189
- package/dist/rich-text-editor-CPV1lEPH.cjs +0 -1748
- package/dist/rich-text-editor-CoKqbCtu.cjs +0 -1799
- package/dist/rich-text-editor-Cw56T_mB.js +0 -2356
- package/dist/rich-text-editor-Cyt8qs2b.js +0 -1921
- package/dist/rich-text-editor-D6H84OcX.cjs +0 -1220
- package/dist/rich-text-editor-D76gD-QI.js +0 -2328
- package/dist/rich-text-editor-DKkokOnA.js +0 -1781
- package/dist/rich-text-editor-DNsdpN64.cjs +0 -2359
- package/dist/rich-text-editor-DfG8bCyY.js +0 -2358
- package/dist/rich-text-editor-Dxjw31Z4.js +0 -2341
- package/dist/rich-text-editor-DzP0Epmb.js +0 -2356
- package/dist/rich-text-editor-lyYE2ZG5.cjs +0 -1207
- package/dist/rich-text-editor-skplNlBM.cjs +0 -2345
- package/dist/select-Bkbr0f-Z.cjs +0 -162
- package/dist/select-CvIVdX2n.js +0 -145
- package/dist/sidebar-Djn5syhi.cjs +0 -786
- package/dist/sidebar-_rT7rBMk.js +0 -787
- package/dist/slider-Bc5Hd0y1.js +0 -56
- package/dist/slider-N7hFFj6X.cjs +0 -73
- package/dist/tooltip-Ded96neP.cjs +0 -137
- package/dist/tooltip-HDOoD2-0.js +0 -120
- package/dist/use-audio-player-BkmEmj8Q.js +0 -185
- package/dist/use-audio-player-CLFTWFW1.cjs +0 -184
- package/dist/use-file-upload-BcjEo2S5.js +0 -404
- package/dist/use-file-upload-CRJR68Tj.cjs +0 -403
- package/dist/use-mobile-B0hNy_Y6.cjs +0 -4303
- package/dist/use-mobile-Bbd51ASU.cjs +0 -4392
- package/dist/use-mobile-Bk6CX-TC.js +0 -4359
- package/dist/use-mobile-BvYdisLP.js +0 -4202
- package/dist/use-mobile-BzuxjzNX.cjs +0 -4392
- package/dist/use-mobile-CKb5pqTs.js +0 -4269
- package/dist/use-mobile-CYuAuGDl.js +0 -4202
- package/dist/use-mobile-CaENcqm-.js +0 -4508
- package/dist/use-mobile-CbrYgJGJ.js +0 -4203
- package/dist/use-mobile-DMOvImGQ.cjs +0 -4542
- package/dist/use-mobile-DRB3BQgD.cjs +0 -4235
- package/dist/use-mobile-DZvv7QMR.js +0 -4359
- package/dist/use-mobile-DdI_TXam.cjs +0 -4235
- package/dist/use-mobile-DlceKf8a.js +0 -4359
- package/dist/use-mobile-DsOnow1o.cjs +0 -4236
- package/dist/use-mobile-Kcj6jSnK.cjs +0 -4392
- package/dist/use-mobile-bnKcua_i.js +0 -4202
- package/dist/use-mobile-ncXBeE2z.cjs +0 -4235
- package/dist/use-rich-text-editor-DjiddBGv.js +0 -282
- package/dist/use-rich-text-editor-lpeswbCs.cjs +0 -281
- package/templates/src/locales/en.json +0 -79
- package/templates/src/locales/es.json +0 -79
- package/templates/src/locales/pt-BR.json +0 -79
- package/dist/{rich-text-editor-DgF8s7xW.js → rich-text-editor-BmsjY03B.js} +26 -26
- package/dist/{rich-text-editor-mWoaSCE4.cjs → rich-text-editor-GS2kpTAK.cjs} +26 -26
package/docs/getting-started.md
CHANGED
|
@@ -1,568 +1,591 @@
|
|
|
1
|
-
# Getting Started — Xertica UI
|
|
2
|
-
|
|
3
|
-
Welcome to the Xertica UI ecosystem. This library provides an enterprise-grade React component system for building business applications — dashboards, management panels, data-heavy CRUD interfaces, and AI-powered tools.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## For AI Agents
|
|
8
|
-
|
|
9
|
-
If you are an AI agent (such as Antigravity, Cursor, or Copilot) tasked with adding features to a project that already uses `xertica-ui`:
|
|
10
|
-
|
|
11
|
-
1. **Start at `docs/llms.md`** — it's the master index and reading guide.
|
|
12
|
-
2. **Read `docs/ai-usage.md`** before writing any code — it contains strict rules about what is permitted.
|
|
13
|
-
3. **Use what exists** — browse `/docs/components` before creating any custom component.
|
|
14
|
-
4. **Follow patterns** — `/docs/patterns` contains pre-validated recipes for common page types.
|
|
15
|
-
5. **Never violate guidelines** — `/docs/guidelines.md` defines the visual language of the system.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## For Human Developers
|
|
20
|
-
|
|
21
|
-
### Prerequisites
|
|
22
|
-
|
|
23
|
-
- Node.js >= 18
|
|
24
|
-
- React >= 18
|
|
25
|
-
- A project initialized with Vite, Next.js, or CRA
|
|
26
|
-
|
|
27
|
-
### Step 1 — Initialize a New Project (CLI)
|
|
28
|
-
|
|
29
|
-
If starting from scratch, use the CLI to scaffold a fully configured project:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npx xertica-ui@latest init
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
This command:
|
|
36
|
-
|
|
37
|
-
- Creates the project structure
|
|
38
|
-
- Installs all dependencies
|
|
39
|
-
- Configures Tailwind CSS v4
|
|
40
|
-
- Prompts you to select a color theme
|
|
41
|
-
- Injects the theme token system (`tokens.css`)
|
|
42
|
-
- Sets up the router and provider
|
|
43
|
-
|
|
44
|
-
### Step 1b — Update the Theme of an Existing Project (CLI)
|
|
45
|
-
|
|
46
|
-
If you already initialized a project and want to **change the color theme**, run:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npx xertica-ui@latest update-theme
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
(Or simply `update`). This command:
|
|
53
|
-
|
|
54
|
-
- Prompts you to select a new color theme from the available presets
|
|
55
|
-
- Overwrites `src/styles/xertica/tokens.css` with the new theme tokens
|
|
56
|
-
- Preserves all other project files untouched
|
|
57
|
-
|
|
58
|
-
Your theme changes take effect immediately on next `npm run dev`.
|
|
59
|
-
|
|
60
|
-
> **Tip:** You can also manually edit `src/styles/xertica/tokens.css` to tweak individual color values — the file is fully commented and designed to be human-readable.
|
|
61
|
-
|
|
62
|
-
### Step 2 — Install in an Existing Project
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
npm install xertica-ui
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Then follow the manual setup in `docs/installation.md`.
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Provider Setup
|
|
73
|
-
|
|
74
|
-
The **single most critical setup step** is wrapping your app in both `<QueryClientProvider>` and `<XerticaProvider>`. Add `<AuthProvider>` inside the router for authentication state.
|
|
75
|
-
|
|
76
|
-
```tsx
|
|
77
|
-
// App.tsx
|
|
78
|
-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
79
|
-
import { XerticaProvider } from 'xertica-ui/brand';
|
|
80
|
-
import { BrowserRouter as Router } from 'react-router-dom';
|
|
81
|
-
import { AuthProvider } from './app/context/AuthContext';
|
|
82
|
-
import { AppErrorBoundary, PageErrorBoundary } from './shared/error-boundary';
|
|
83
|
-
import 'xertica-ui/style.css';
|
|
84
|
-
|
|
85
|
-
const queryClient = new QueryClient({
|
|
86
|
-
defaultOptions: { queries: { retry: 1, refetchOnWindowFocus: false } },
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
function App() {
|
|
90
|
-
return (
|
|
91
|
-
<AppErrorBoundary> {/* catches provider/context crashes */}
|
|
92
|
-
<QueryClientProvider client={queryClient}>
|
|
93
|
-
<XerticaProvider>
|
|
94
|
-
<Router>
|
|
95
|
-
<AuthProvider> {/* must be inside Router */}
|
|
96
|
-
<PageErrorBoundary> {/* catches lazy-chunk + page errors */}
|
|
97
|
-
<YourRoutes />
|
|
98
|
-
</PageErrorBoundary>
|
|
99
|
-
</AuthProvider>
|
|
100
|
-
</Router>
|
|
101
|
-
</XerticaProvider>
|
|
102
|
-
</QueryClientProvider>
|
|
103
|
-
</AppErrorBoundary>
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
`XerticaProvider` initializes:
|
|
109
|
-
|
|
110
|
-
- **Theme system** (dark/light mode with token injection)
|
|
111
|
-
- **Toast notifications** (Sonner, rendered via portal)
|
|
112
|
-
- **Tooltip provider** (wraps Radix TooltipProvider)
|
|
113
|
-
- **Layout context** (`useLayout()` hook for sidebar state)
|
|
114
|
-
- **AI Assistant context** (if using `XerticaAssistant`)
|
|
115
|
-
- **
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
import {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
<
|
|
219
|
-
<
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
The
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
`
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
---
|
|
345
|
-
|
|
346
|
-
##
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
```tsx
|
|
351
|
-
import {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
} from 'xertica-ui/
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
}
|
|
490
|
-
```
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
**
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
<
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
1
|
+
# Getting Started — Xertica UI
|
|
2
|
+
|
|
3
|
+
Welcome to the Xertica UI ecosystem. This library provides an enterprise-grade React component system for building business applications — dashboards, management panels, data-heavy CRUD interfaces, and AI-powered tools.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## For AI Agents
|
|
8
|
+
|
|
9
|
+
If you are an AI agent (such as Antigravity, Cursor, or Copilot) tasked with adding features to a project that already uses `xertica-ui`:
|
|
10
|
+
|
|
11
|
+
1. **Start at `docs/llms.md`** — it's the master index and reading guide.
|
|
12
|
+
2. **Read `docs/ai-usage.md`** before writing any code — it contains strict rules about what is permitted.
|
|
13
|
+
3. **Use what exists** — browse `/docs/components` before creating any custom component.
|
|
14
|
+
4. **Follow patterns** — `/docs/patterns` contains pre-validated recipes for common page types.
|
|
15
|
+
5. **Never violate guidelines** — `/docs/guidelines.md` defines the visual language of the system.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## For Human Developers
|
|
20
|
+
|
|
21
|
+
### Prerequisites
|
|
22
|
+
|
|
23
|
+
- Node.js >= 18
|
|
24
|
+
- React >= 18
|
|
25
|
+
- A project initialized with Vite, Next.js, or CRA
|
|
26
|
+
|
|
27
|
+
### Step 1 — Initialize a New Project (CLI)
|
|
28
|
+
|
|
29
|
+
If starting from scratch, use the CLI to scaffold a fully configured project:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx xertica-ui@latest init
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This command:
|
|
36
|
+
|
|
37
|
+
- Creates the project structure
|
|
38
|
+
- Installs all dependencies
|
|
39
|
+
- Configures Tailwind CSS v4
|
|
40
|
+
- Prompts you to select a color theme
|
|
41
|
+
- Injects the theme token system (`tokens.css`)
|
|
42
|
+
- Sets up the router and provider
|
|
43
|
+
|
|
44
|
+
### Step 1b — Update the Theme of an Existing Project (CLI)
|
|
45
|
+
|
|
46
|
+
If you already initialized a project and want to **change the color theme**, run:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx xertica-ui@latest update-theme
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
(Or simply `update`). This command:
|
|
53
|
+
|
|
54
|
+
- Prompts you to select a new color theme from the available presets
|
|
55
|
+
- Overwrites `src/styles/xertica/tokens.css` with the new theme tokens
|
|
56
|
+
- Preserves all other project files untouched
|
|
57
|
+
|
|
58
|
+
Your theme changes take effect immediately on next `npm run dev`.
|
|
59
|
+
|
|
60
|
+
> **Tip:** You can also manually edit `src/styles/xertica/tokens.css` to tweak individual color values — the file is fully commented and designed to be human-readable.
|
|
61
|
+
|
|
62
|
+
### Step 2 — Install in an Existing Project
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install xertica-ui
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then follow the manual setup in `docs/installation.md`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Provider Setup
|
|
73
|
+
|
|
74
|
+
The **single most critical setup step** is wrapping your app in both `<QueryClientProvider>` and `<XerticaProvider>`. Add `<AuthProvider>` inside the router for authentication state.
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
// App.tsx
|
|
78
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
79
|
+
import { XerticaProvider } from 'xertica-ui/brand';
|
|
80
|
+
import { BrowserRouter as Router } from 'react-router-dom';
|
|
81
|
+
import { AuthProvider } from './app/context/AuthContext';
|
|
82
|
+
import { AppErrorBoundary, PageErrorBoundary } from './shared/error-boundary';
|
|
83
|
+
import 'xertica-ui/style.css';
|
|
84
|
+
|
|
85
|
+
const queryClient = new QueryClient({
|
|
86
|
+
defaultOptions: { queries: { retry: 1, refetchOnWindowFocus: false } },
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
function App() {
|
|
90
|
+
return (
|
|
91
|
+
<AppErrorBoundary> {/* catches provider/context crashes */}
|
|
92
|
+
<QueryClientProvider client={queryClient}>
|
|
93
|
+
<XerticaProvider>
|
|
94
|
+
<Router>
|
|
95
|
+
<AuthProvider> {/* must be inside Router */}
|
|
96
|
+
<PageErrorBoundary> {/* catches lazy-chunk + page errors */}
|
|
97
|
+
<YourRoutes />
|
|
98
|
+
</PageErrorBoundary>
|
|
99
|
+
</AuthProvider>
|
|
100
|
+
</Router>
|
|
101
|
+
</XerticaProvider>
|
|
102
|
+
</QueryClientProvider>
|
|
103
|
+
</AppErrorBoundary>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`XerticaProvider` initializes:
|
|
109
|
+
|
|
110
|
+
- **Theme system** (dark/light mode with token injection)
|
|
111
|
+
- **Toast notifications** (Sonner, rendered via portal)
|
|
112
|
+
- **Tooltip provider** (wraps Radix TooltipProvider)
|
|
113
|
+
- **Layout context** (`useLayout()` hook for sidebar state)
|
|
114
|
+
- **AI Assistant context** (if using `XerticaAssistant`)
|
|
115
|
+
- **Language context** (`useLanguage()` hook + i18next sync) — defaults to `pt-BR`, `en`, `es`
|
|
116
|
+
- **Google Maps loader** (lazy, only activates if `googleMapsApiKey` is provided)
|
|
117
|
+
|
|
118
|
+
`QueryClientProvider` enables React Query for all server state (see [State Management](./state-management.md)).
|
|
119
|
+
|
|
120
|
+
`AuthProvider` manages the authentication session — see [Authentication](#authentication) below.
|
|
121
|
+
|
|
122
|
+
### Configuring languages
|
|
123
|
+
|
|
124
|
+
By default, `<XerticaProvider>` enables the three built-in languages. Pass `availableLanguages` to override — for example, to lock the app to a single language (the `LanguageSelector` auto-hides) or to add custom locales:
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { XerticaProvider, DEFAULT_LANGUAGES } from 'xertica-ui';
|
|
128
|
+
import fr from './locales/fr.json';
|
|
129
|
+
|
|
130
|
+
// Monolingual English
|
|
131
|
+
<XerticaProvider availableLanguages={[{ code: 'en', label: 'English' }]}>
|
|
132
|
+
|
|
133
|
+
// Three defaults + French
|
|
134
|
+
<XerticaProvider
|
|
135
|
+
availableLanguages={[
|
|
136
|
+
...DEFAULT_LANGUAGES,
|
|
137
|
+
{ code: 'fr', label: 'Français', shortLabel: 'FR', resources: fr },
|
|
138
|
+
]}
|
|
139
|
+
>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
See [`docs/i18n.md`](./i18n.md) for the full `LanguageDefinition` and `registerLanguageResource` API.
|
|
143
|
+
|
|
144
|
+
### Provider Props
|
|
145
|
+
|
|
146
|
+
| Prop | Type | Description |
|
|
147
|
+
| ---------- | ----------- | --------------------------- |
|
|
148
|
+
| `children` | `ReactNode` | Application content to wrap |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Authentication
|
|
153
|
+
|
|
154
|
+
Authentication state is managed by `AuthContext`. Wrap your route tree with `<AuthProvider>` (inside `<Router>`) to expose `useAuth()` to all pages:
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
import { useAuth } from './app/context/AuthContext';
|
|
158
|
+
|
|
159
|
+
// Any page or component inside <AuthProvider>
|
|
160
|
+
function MyPage() {
|
|
161
|
+
const { user, logout } = useAuth();
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<div>
|
|
165
|
+
<p>Logged in as {user?.email}</p>
|
|
166
|
+
<button onClick={logout}>Sign out</button>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`useAuth()` returns:
|
|
173
|
+
|
|
174
|
+
| Property | Type | Description |
|
|
175
|
+
| ----------- | ------------------------------------------ | -------------------------------------------- |
|
|
176
|
+
| `user` | `AuthUser \| null` | Current user (`email`, `name?`, `avatar?`) |
|
|
177
|
+
| `isLoading` | `boolean` | `true` while the session is being hydrated |
|
|
178
|
+
| `login` | `(email, password) => boolean` | Attempt login; returns `true` on success |
|
|
179
|
+
| `logout` | `() => void` | Clear session and redirect to `/login` |
|
|
180
|
+
|
|
181
|
+
### Route Guards
|
|
182
|
+
|
|
183
|
+
Use `ProtectedRoute` and `GuestRoute` wrappers (provided in the CLI-generated `AuthGuard.tsx`):
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
// Redirect unauthenticated users to /login
|
|
187
|
+
function ProtectedRoute({ children }) {
|
|
188
|
+
const { user, isLoading } = useAuth();
|
|
189
|
+
if (isLoading) return null; // wait for localStorage hydration
|
|
190
|
+
if (!user) return <Navigate to="/login" replace />;
|
|
191
|
+
return <>{children}</>;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Redirect already-authenticated users away from login
|
|
195
|
+
function GuestRoute({ children }) {
|
|
196
|
+
const { user, isLoading } = useAuth();
|
|
197
|
+
if (isLoading) return null;
|
|
198
|
+
if (user) return <Navigate to="/home" replace />;
|
|
199
|
+
return <>{children}</>;
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Lazy Loading
|
|
206
|
+
|
|
207
|
+
All routes should use `React.lazy()` + `<Suspense>` to split each page into a separate chunk:
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
import React, { Suspense } from 'react';
|
|
211
|
+
|
|
212
|
+
const HomePage = React.lazy(() =>
|
|
213
|
+
import('./pages/HomePage').then(m => ({ default: m.HomePage }))
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
function AppRoutes() {
|
|
217
|
+
return (
|
|
218
|
+
<Suspense fallback={null}>
|
|
219
|
+
<Routes>
|
|
220
|
+
<Route path="/home" element={<ProtectedRoute><HomePage /></ProtectedRoute>} />
|
|
221
|
+
</Routes>
|
|
222
|
+
</Suspense>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The CLI-generated project configures lazy loading for all routes automatically.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Error Boundaries
|
|
232
|
+
|
|
233
|
+
Wrap your app with `<AppErrorBoundary>` and your route tree with `<PageErrorBoundary>` to prevent crashes from producing blank screens:
|
|
234
|
+
|
|
235
|
+
```tsx
|
|
236
|
+
import { AppErrorBoundary, PageErrorBoundary, SectionErrorBoundary } from '@/shared/error-boundary';
|
|
237
|
+
|
|
238
|
+
// In App.tsx
|
|
239
|
+
<AppErrorBoundary>
|
|
240
|
+
<QueryClientProvider client={queryClient}>
|
|
241
|
+
<XerticaProvider>
|
|
242
|
+
<Router>
|
|
243
|
+
<AuthProvider>
|
|
244
|
+
<PageErrorBoundary>
|
|
245
|
+
<Suspense fallback={null}>
|
|
246
|
+
<AuthGuard />
|
|
247
|
+
</Suspense>
|
|
248
|
+
</PageErrorBoundary>
|
|
249
|
+
</AuthProvider>
|
|
250
|
+
</Router>
|
|
251
|
+
</XerticaProvider>
|
|
252
|
+
</QueryClientProvider>
|
|
253
|
+
</AppErrorBoundary>
|
|
254
|
+
|
|
255
|
+
// In page content sections
|
|
256
|
+
<SectionErrorBoundary>
|
|
257
|
+
<TeamDataTable />
|
|
258
|
+
</SectionErrorBoundary>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The CLI-generated scaffold adds all three boundaries automatically. See [`docs/components/error-boundary.md`](./components/error-boundary.md) for full API reference.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Internationalization (i18n)
|
|
266
|
+
|
|
267
|
+
The project uses `i18next` + `react-i18next`. All UI strings are translated via `useTranslation()`:
|
|
268
|
+
|
|
269
|
+
```tsx
|
|
270
|
+
import { useTranslation } from 'react-i18next';
|
|
271
|
+
|
|
272
|
+
function MyPage() {
|
|
273
|
+
const { t } = useTranslation();
|
|
274
|
+
return <h1>{t('home.welcome')}</h1>;
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The `LanguageSelector` component (rendered by `Header` via `showLanguageSelector`) drives language switching and is wired to `LanguageContext` + `i18next` automatically. See [`docs/i18n.md`](./i18n.md) for setup and locale file structure.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Theme System
|
|
283
|
+
|
|
284
|
+
The design system is token-driven. All colors, radii, and shadows are controlled by CSS custom properties injected at `:root`.
|
|
285
|
+
|
|
286
|
+
### Color Token Semantics
|
|
287
|
+
|
|
288
|
+
| Token Class | Usage |
|
|
289
|
+
| ------------------------------------------------ | -------------------------------------- |
|
|
290
|
+
| `bg-background` / `text-foreground` | Page background and primary text |
|
|
291
|
+
| `bg-card` / `text-card-foreground` | Card surfaces |
|
|
292
|
+
| `bg-muted` / `text-muted-foreground` | Subdued backgrounds and secondary text |
|
|
293
|
+
| `bg-primary` / `text-primary-foreground` | Primary actions (buttons, links) |
|
|
294
|
+
| `bg-secondary` / `text-secondary-foreground` | Secondary actions |
|
|
295
|
+
| `bg-destructive` / `text-destructive-foreground` | Danger / error states |
|
|
296
|
+
| `bg-accent` / `text-accent-foreground` | Hover states |
|
|
297
|
+
| `border-border` | Standard borders |
|
|
298
|
+
| `border-input` | Form field borders |
|
|
299
|
+
|
|
300
|
+
**Always use semantic tokens for semantic/status contexts.** Never use raw hex values (`#3b82f6`, `rgb(...)`) in any context. For error, warning, success, and status states, always use semantic tokens (`bg-destructive`, `bg-success`, `bg-warning`, `text-muted-foreground`). For layout, spacing, and general non-semantic UI, standard Tailwind color utilities are acceptable.
|
|
301
|
+
|
|
302
|
+
### Dark Mode
|
|
303
|
+
|
|
304
|
+
The theme responds to the `dark` class on `<html>`. Use the `<ThemeToggle>` component which toggles this class automatically:
|
|
305
|
+
|
|
306
|
+
```tsx
|
|
307
|
+
import { ThemeToggle } from 'xertica-ui/brand';
|
|
308
|
+
|
|
309
|
+
// Typically placed in Header actions or Sidebar footer
|
|
310
|
+
<ThemeToggle />;
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
`ThemeToggle` is fully self-contained — it reads and writes `document.documentElement.classList` directly and does not require any context provider.
|
|
314
|
+
|
|
315
|
+
### CSS Setup (Critical)
|
|
316
|
+
|
|
317
|
+
The consumer's `src/styles/index.css` **must** follow this exact structure for theme tokens to apply correctly:
|
|
318
|
+
|
|
319
|
+
```css
|
|
320
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@400;500;700&display=swap');
|
|
321
|
+
|
|
322
|
+
/* 1. Import the compiled library styles (includes Tailwind base) */
|
|
323
|
+
@import 'xertica-ui/style.css';
|
|
324
|
+
|
|
325
|
+
/* 2. Import YOUR theme tokens (overrides library defaults) */
|
|
326
|
+
@import './xertica/tokens.css';
|
|
327
|
+
|
|
328
|
+
/* 3. Tell Tailwind v4 to scan xertica-ui components for class names */
|
|
329
|
+
@source '../node_modules/xertica-ui';
|
|
330
|
+
|
|
331
|
+
/* 4. Map CSS variables to Tailwind tokens using @theme inline
|
|
332
|
+
⚠️ MUST be `@theme inline` — NOT plain `@theme`.
|
|
333
|
+
`@theme inline` keeps var() references dynamic so your tokens.css
|
|
334
|
+
overrides cascade correctly into utility classes like bg-destructive. */
|
|
335
|
+
@theme inline {
|
|
336
|
+
--color-primary: var(--primary);
|
|
337
|
+
--color-destructive: var(--destructive);
|
|
338
|
+
/* ... full mapping in the generated file */
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
> **Why `@theme inline`?** Plain `@theme {}` causes Tailwind v4 to compile color tokens **statically** at build time using the library's default values. With `@theme inline`, Tailwind keeps the `var()` references in the output CSS, so your `tokens.css` overrides cascade correctly at runtime. This is why alert colors, sidebar colors, and brand colors were not applying when using the theme selector.
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Layout System
|
|
347
|
+
|
|
348
|
+
The layout is managed globally through `LayoutContext`. Use the `useLayout()` hook to access and control layout state in any component:
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
import { useLayout } from 'xertica-ui/hooks';
|
|
352
|
+
|
|
353
|
+
function MyComponent() {
|
|
354
|
+
const {
|
|
355
|
+
sidebarExpanded, // boolean
|
|
356
|
+
sidebarWidth, // number (px)
|
|
357
|
+
setSidebarWidth, // (width: number) => void
|
|
358
|
+
toggleSidebar, // () => void
|
|
359
|
+
assistenteExpanded,
|
|
360
|
+
toggleAssistente,
|
|
361
|
+
} = useLayout();
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
See `docs/layout.md` for the complete reference.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Routing
|
|
370
|
+
|
|
371
|
+
Xertica UI integrates with `react-router-dom` v6. Pass router hooks to navigation components:
|
|
372
|
+
|
|
373
|
+
```tsx
|
|
374
|
+
import { useNavigate, useLocation } from 'react-router-dom';
|
|
375
|
+
import { Sidebar } from 'xertica-ui/layout';
|
|
376
|
+
|
|
377
|
+
function Layout() {
|
|
378
|
+
const navigate = useNavigate();
|
|
379
|
+
const location = useLocation();
|
|
380
|
+
|
|
381
|
+
return (
|
|
382
|
+
<Sidebar
|
|
383
|
+
navigate={navigate}
|
|
384
|
+
location={location}
|
|
385
|
+
routes={routes}
|
|
386
|
+
// ...
|
|
387
|
+
/>
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Component Import
|
|
395
|
+
|
|
396
|
+
### Subpath Imports (v2 — Recommended)
|
|
397
|
+
|
|
398
|
+
Xertica UI v2 exposes granular subpath entries for precise, tree-shaken imports:
|
|
399
|
+
|
|
400
|
+
```tsx
|
|
401
|
+
import { Button, Card, CardContent, Input, Badge } from 'xertica-ui/ui';
|
|
402
|
+
import { Sidebar, Header } from 'xertica-ui/layout';
|
|
403
|
+
import { XerticaProvider, XerticaLogo } from 'xertica-ui/brand';
|
|
404
|
+
import { XerticaAssistant } from 'xertica-ui/assistant';
|
|
405
|
+
import { VideoPlayer } from 'xertica-ui/media';
|
|
406
|
+
import { useLayout, useTheme } from 'xertica-ui/hooks';
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Root Barrel (Backward Compatible)
|
|
410
|
+
|
|
411
|
+
The root entrypoint exports everything and remains fully supported:
|
|
412
|
+
|
|
413
|
+
```tsx
|
|
414
|
+
import {
|
|
415
|
+
Button,
|
|
416
|
+
Card,
|
|
417
|
+
CardContent,
|
|
418
|
+
CardHeader,
|
|
419
|
+
CardTitle,
|
|
420
|
+
Input,
|
|
421
|
+
Badge,
|
|
422
|
+
Table,
|
|
423
|
+
TableBody,
|
|
424
|
+
TableCell,
|
|
425
|
+
TableHead,
|
|
426
|
+
TableHeader,
|
|
427
|
+
TableRow,
|
|
428
|
+
} from 'xertica-ui/ui';
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
> **TypeScript note**: Subpath imports require `"moduleResolution": "bundler"` (or `"node16"` / `"nodenext"`) in your `tsconfig.json`.
|
|
432
|
+
|
|
433
|
+
Icons are separate — always use `lucide-react`:
|
|
434
|
+
|
|
435
|
+
```tsx
|
|
436
|
+
import { Home, Settings, Users, LogOut } from 'lucide-react';
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## Troubleshooting
|
|
442
|
+
|
|
443
|
+
### Components render without styles (transparent / unstyled)
|
|
444
|
+
|
|
445
|
+
**Cause**: Missing CSS import.
|
|
446
|
+
|
|
447
|
+
**Fix**: Add `import 'xertica-ui/style.css'` to your entry file (`main.tsx` or `index.tsx`), **before** your own styles:
|
|
448
|
+
|
|
449
|
+
```tsx
|
|
450
|
+
import 'xertica-ui/style.css';
|
|
451
|
+
import './styles/index.css'; // your tokens and overrides
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
### Dark mode doesn't apply
|
|
457
|
+
|
|
458
|
+
**Cause**: The `dark` class is not being toggled on `<html>`, or `@theme inline` is missing from your CSS.
|
|
459
|
+
|
|
460
|
+
**Fix 1**: Use `<ThemeToggle>` from `xertica-ui/brand` — it handles the class toggle automatically.
|
|
461
|
+
|
|
462
|
+
**Fix 2**: Ensure your `index.css` uses `@theme inline` (not plain `@theme`):
|
|
463
|
+
|
|
464
|
+
```css
|
|
465
|
+
/* ✅ Correct */
|
|
466
|
+
@theme inline {
|
|
467
|
+
--color-primary: var(--primary);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* ❌ Wrong — compiles tokens statically, ignoring your tokens.css overrides */
|
|
471
|
+
@theme {
|
|
472
|
+
--color-primary: var(--primary);
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
### Subpath imports cause TypeScript errors
|
|
479
|
+
|
|
480
|
+
**Cause**: `tsconfig.json` uses `"moduleResolution": "node"` which does not support package subpath exports.
|
|
481
|
+
|
|
482
|
+
**Fix**: Update `tsconfig.json`:
|
|
483
|
+
|
|
484
|
+
```json
|
|
485
|
+
{
|
|
486
|
+
"compilerOptions": {
|
|
487
|
+
"moduleResolution": "bundler"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Alternatively, use `"moduleResolution": "node16"` or `"nodenext"`.
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
### Toast notifications don't appear
|
|
497
|
+
|
|
498
|
+
**Cause**: `<Toaster>` is not mounted, or `<XerticaProvider>` is missing.
|
|
499
|
+
|
|
500
|
+
**Fix**: Wrap your app in `<XerticaProvider>` — it auto-injects `<Toaster>`. If you are not using `XerticaProvider`, add `<Toaster />` manually:
|
|
501
|
+
|
|
502
|
+
```tsx
|
|
503
|
+
import { Toaster } from 'xertica-ui/ui';
|
|
504
|
+
|
|
505
|
+
function App() {
|
|
506
|
+
return (
|
|
507
|
+
<>
|
|
508
|
+
<YourApp />
|
|
509
|
+
<Toaster />
|
|
510
|
+
</>
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
### Dialogs / Modals don't appear
|
|
518
|
+
|
|
519
|
+
**Cause**: Missing `<XerticaProvider>` (which includes `TooltipProvider` and portal context).
|
|
520
|
+
|
|
521
|
+
**Fix**: Ensure `<XerticaProvider>` wraps the entire application at the root level.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
### Google Maps doesn't load
|
|
526
|
+
|
|
527
|
+
**Cause**: Missing or invalid `googleMapsApiKey`, or the Maps API script failed to load.
|
|
528
|
+
|
|
529
|
+
**Fix**: Pass the key to `XerticaProvider`:
|
|
530
|
+
|
|
531
|
+
```tsx
|
|
532
|
+
<XerticaProvider googleMapsApiKey="YOUR_VALID_KEY">
|
|
533
|
+
<App />
|
|
534
|
+
</XerticaProvider>
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Or use `useApiKey()` to set it at runtime:
|
|
538
|
+
|
|
539
|
+
```tsx
|
|
540
|
+
const { setGoogleMapsApiKey, reloadMapsApi } = useApiKey();
|
|
541
|
+
setGoogleMapsApiKey('YOUR_KEY');
|
|
542
|
+
await reloadMapsApi();
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
### `useLayout()` throws "must be used within LayoutProvider"
|
|
548
|
+
|
|
549
|
+
**Cause**: The component using `useLayout()` is rendered outside `<XerticaProvider>`.
|
|
550
|
+
|
|
551
|
+
**Fix**: Ensure `<XerticaProvider>` is an ancestor of all components that use `useLayout()`, `useTheme()`, or any other context hook.
|
|
552
|
+
|
|
553
|
+
For components that may be used both inside and outside the provider (e.g., in Storybook), use `useOptionalLayout()` instead — it returns `null` when the context is unavailable.
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
### Sidebar width causes content overlap
|
|
558
|
+
|
|
559
|
+
**Cause**: Content area is not reading `sidebarWidth` from `useLayout()`.
|
|
560
|
+
|
|
561
|
+
**Fix**: Apply the sidebar width as a left margin or padding on the main content area:
|
|
562
|
+
|
|
563
|
+
```tsx
|
|
564
|
+
const { sidebarWidth } = useLayout();
|
|
565
|
+
|
|
566
|
+
<main style={{ marginLeft: sidebarWidth }} className="flex-1 overflow-auto">
|
|
567
|
+
{/* content */}
|
|
568
|
+
</main>;
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
### AI Assistant doesn't respond (real mode)
|
|
574
|
+
|
|
575
|
+
**Cause**: Missing or invalid Gemini API key.
|
|
576
|
+
|
|
577
|
+
**Fix**: Set the Gemini API key via `useApiKey()` or pass it to `XerticaProvider`:
|
|
578
|
+
|
|
579
|
+
```tsx
|
|
580
|
+
<XerticaProvider initialGeminiApiKey="YOUR_GEMINI_KEY">
|
|
581
|
+
<App />
|
|
582
|
+
</XerticaProvider>
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
Or use the Settings pattern to let users enter their own key. See [`docs/patterns/settings.md`](./patterns/settings.md).
|
|
586
|
+
|
|
587
|
+
For testing without a real API key, use `demoMode={true}` on `XerticaAssistant`:
|
|
588
|
+
|
|
589
|
+
```tsx
|
|
590
|
+
<XerticaAssistant demoMode={true} />
|
|
591
|
+
```
|