xertica-ui 1.7.4 → 1.8.1
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 +26 -0
- package/README.md +184 -227
- package/components/Introduction.mdx +3 -0
- package/components/assistant/code-block/CodeBlock.tsx +2 -2
- package/components/assistant/code-block/code-block.stories.tsx +1 -1
- package/components/assistant/code-block/code-block.test.tsx +44 -44
- package/components/assistant/formatted-document/FormattedDocument.tsx +14 -3
- package/components/assistant/formatted-document/formatted-document.test.tsx +42 -42
- package/components/assistant/markdown-message/MarkdownMessage.tsx +14 -4
- package/components/assistant/markdown-message/markdown-message.test.tsx +33 -33
- package/components/assistant/modern-chat-input/ModernChatInput.tsx +11 -10
- package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +2 -1
- package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +72 -72
- package/components/assistant/xertica-assistant/xertica-assistant.mdx +14 -16
- package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +53 -24
- package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +65 -65
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +10 -8
- package/components/brand/branding/branding.mdx +27 -27
- package/components/brand/language-selector/language-selector.test.tsx +27 -27
- package/components/brand/theme-toggle/theme-toggle.test.tsx +34 -34
- package/components/brand/xertica-logo/xertica-logo.test.tsx +26 -26
- package/components/brand/xertica-orbe/xertica-orbe.test.tsx +19 -19
- package/components/brand/xertica-provider/xertica-provider.test.tsx +29 -29
- package/components/brand/xertica-xlogo/xertica-xlogo.test.tsx +16 -16
- package/components/examples/LocationPickerExample.tsx +328 -328
- package/components/examples/RouteMapExamples.tsx +329 -329
- package/components/index.ts +3 -4
- package/components/layout/header/header.test.tsx +70 -70
- package/components/layout/sidebar/sidebar.test.tsx +67 -67
- package/components/layout/sidebar/sidebar.tsx +1 -0
- package/components/media/FloatingMediaWrapper.tsx +221 -54
- package/components/media/audio-player/AudioPlayer.mdx +67 -0
- package/components/media/audio-player/AudioPlayer.stories.tsx +120 -0
- package/components/media/audio-player/AudioPlayer.test.tsx +106 -0
- package/components/media/audio-player/AudioPlayer.tsx +654 -0
- package/components/media/video-player/VideoPlayer.mdx +103 -0
- package/components/media/video-player/VideoPlayer.stories.tsx +94 -0
- package/components/media/video-player/VideoPlayer.test.tsx +73 -0
- package/components/media/{VideoPlayer.tsx → video-player/VideoPlayer.tsx} +27 -21
- package/components/media/video-player/index.ts +1 -0
- package/components/pages/forgot-password-page/forgot-password-page.test.tsx +42 -42
- package/components/pages/home-page/home-page.test.tsx +41 -41
- package/components/pages/login-page/login-page.test.tsx +60 -60
- package/components/pages/template-page/template-page.test.tsx +38 -38
- package/components/shared/assistant-utils.test.ts +18 -18
- package/components/shared/use-mobile.test.ts +16 -16
- package/components/shared/utils.test.ts +14 -14
- package/components/ui/accordion/accordion.test.tsx +64 -64
- package/components/ui/alert/alert.test.tsx +55 -55
- package/components/ui/alert-dialog/alert-dialog.stories.tsx +8 -2
- package/components/ui/alert-dialog/alert-dialog.test.tsx +68 -68
- package/components/ui/aspect-ratio/aspect-ratio.test.tsx +28 -28
- package/components/ui/assistant-chart/assistant-chart.test.tsx +42 -42
- package/components/ui/avatar/avatar.stories.tsx +26 -5
- package/components/ui/avatar/avatar.test.tsx +55 -55
- package/components/ui/badge/badge.test.tsx +40 -40
- package/components/ui/breadcrumb/breadcrumb.stories.tsx +35 -7
- package/components/ui/breadcrumb/breadcrumb.test.tsx +70 -70
- package/components/ui/button/button.test.tsx +64 -64
- package/components/ui/button/button.tsx +4 -4
- package/components/ui/calendar/calendar.stories.tsx +2 -2
- package/components/ui/calendar/calendar.test.tsx +47 -47
- package/components/ui/card/card.test.tsx +55 -55
- package/components/ui/card/card.tsx +1 -1
- package/components/ui/carousel/carousel.stories.tsx +10 -2
- package/components/ui/carousel/carousel.test.tsx +74 -74
- package/components/ui/chart/chart.test.tsx +49 -49
- package/components/ui/checkbox/checkbox.test.tsx +38 -38
- package/components/ui/collapsible/collapsible.stories.tsx +36 -30
- package/components/ui/collapsible/collapsible.test.tsx +51 -51
- package/components/ui/command/command.stories.tsx +2 -2
- package/components/ui/command/command.test.tsx +48 -48
- package/components/ui/command/command.tsx +2 -0
- package/components/ui/context-menu/context-menu.stories.tsx +2 -2
- package/components/ui/context-menu/context-menu.test.tsx +59 -59
- package/components/ui/dialog/dialog.stories.tsx +11 -0
- package/components/ui/dialog/dialog.test.tsx +76 -76
- package/components/ui/drawer/drawer.stories.tsx +19 -2
- package/components/ui/drawer/drawer.test.tsx +65 -65
- package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +13 -2
- package/components/ui/dropdown-menu/dropdown-menu.test.tsx +60 -60
- package/components/ui/empty/empty.stories.tsx +39 -11
- package/components/ui/empty/empty.test.tsx +37 -37
- package/components/ui/file-upload/file-upload.test.tsx +65 -65
- package/components/ui/form/form.test.tsx +80 -80
- package/components/ui/google-maps-loader/google-maps-loader.test.tsx +35 -35
- package/components/ui/hover-card/hover-card.stories.tsx +18 -2
- package/components/ui/hover-card/hover-card.test.tsx +50 -50
- package/components/ui/input/input.test.tsx +47 -47
- package/components/ui/input-otp/input-otp.stories.tsx +22 -17
- package/components/ui/input-otp/input-otp.test.tsx +56 -56
- package/components/ui/label/label.stories.tsx +16 -2
- package/components/ui/label/label.test.tsx +21 -21
- package/components/ui/map/map.test.tsx +74 -74
- package/components/ui/map/mock.test.tsx +13 -13
- package/components/ui/map-layers/map-layers.test.tsx +44 -44
- package/components/ui/menubar/menubar.stories.tsx +19 -5
- package/components/ui/menubar/menubar.test.tsx +51 -51
- package/components/ui/navigation-menu/navigation-menu.stories.tsx +19 -5
- package/components/ui/navigation-menu/navigation-menu.test.tsx +47 -47
- package/components/ui/notification-badge/notification-badge.stories.tsx +3 -3
- package/components/ui/notification-badge/notification-badge.test.tsx +61 -61
- package/components/ui/page-header/page-header.test.tsx +42 -42
- package/components/ui/pagination/pagination.stories.tsx +25 -7
- package/components/ui/pagination/pagination.test.tsx +61 -61
- package/components/ui/popover/popover.stories.tsx +9 -2
- package/components/ui/popover/popover.test.tsx +50 -50
- package/components/ui/progress/progress.test.tsx +23 -23
- package/components/ui/progress/progress.tsx +1 -0
- package/components/ui/radio-group/radio-group.stories.tsx +13 -2
- package/components/ui/radio-group/radio-group.test.tsx +54 -54
- package/components/ui/rating/rating.test.tsx +48 -48
- package/components/ui/rating/rating.tsx +1 -0
- package/components/ui/resizable/resizable.test.tsx +58 -58
- package/components/ui/rich-text-editor/rich-text-editor.mdx +21 -7
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +55 -6
- package/components/ui/rich-text-editor/rich-text-editor.test.tsx +49 -46
- package/components/ui/rich-text-editor/rich-text-editor.tsx +79 -26
- package/components/ui/route-map/route-map.test.tsx +95 -95
- package/components/ui/scroll-area/scroll-area.stories.tsx +2 -2
- package/components/ui/scroll-area/scroll-area.test.tsx +27 -27
- package/components/ui/scroll-area/scroll-area.tsx +3 -0
- package/components/ui/search/search.test.tsx +54 -54
- package/components/ui/select/select.stories.tsx +31 -18
- package/components/ui/select/select.test.tsx +63 -63
- package/components/ui/separator/separator.stories.tsx +14 -2
- package/components/ui/separator/separator.test.tsx +23 -23
- package/components/ui/sheet/sheet.stories.tsx +13 -2
- package/components/ui/sheet/sheet.test.tsx +60 -60
- package/components/ui/simple-map/simple-map.test.tsx +47 -47
- package/components/ui/skeleton/skeleton.stories.tsx +2 -2
- package/components/ui/skeleton/skeleton.test.tsx +19 -19
- package/components/ui/slider/slider.test.tsx +25 -25
- package/components/ui/slider/slider.tsx +4 -3
- package/components/ui/sonner/sonner.test.tsx +24 -24
- package/components/ui/stats-card/stats-card.test.tsx +38 -38
- package/components/ui/stepper/stepper.stories.tsx +2 -2
- package/components/ui/stepper/stepper.test.tsx +47 -47
- package/components/ui/switch/switch.stories.tsx +12 -2
- package/components/ui/switch/switch.test.tsx +33 -33
- package/components/ui/table/table.stories.tsx +3 -3
- package/components/ui/table/table.test.tsx +50 -50
- package/components/ui/tabs/tabs.stories.tsx +16 -2
- package/components/ui/tabs/tabs.test.tsx +50 -50
- package/components/ui/textarea/textarea.test.tsx +28 -28
- package/components/ui/timeline/timeline.stories.tsx +27 -6
- package/components/ui/timeline/timeline.test.tsx +53 -53
- package/components/ui/toggle/toggle.test.tsx +32 -32
- package/components/ui/toggle-group/toggle-group.test.tsx +47 -47
- package/components/ui/tooltip/tooltip.stories.tsx +9 -2
- package/components/ui/tooltip/tooltip.test.tsx +37 -37
- package/components/ui/tree-view/tree-view.test.tsx +58 -58
- package/components.json +99 -20
- package/contexts/ApiKeyContext.test.tsx +26 -26
- package/contexts/ApiKeyContext.tsx +145 -145
- package/contexts/AssistenteContext.test.tsx +17 -17
- package/contexts/AssistenteContext.tsx +144 -144
- package/contexts/BrandColorsContext.test.tsx +21 -21
- package/contexts/LanguageContext.test.tsx +29 -29
- package/contexts/LanguageContext.tsx +35 -35
- package/contexts/LayoutContext.test.tsx +23 -23
- package/contexts/ThemeContext.test.tsx +36 -36
- package/contexts/ThemeContext.tsx +105 -105
- package/dist/components/AudioPlayer.d.ts +35 -35
- package/dist/components/CodeBlock.d.ts +28 -28
- package/dist/components/DocumentEditor.d.ts +26 -26
- package/dist/components/ForgotPasswordPage.d.ts +13 -13
- package/dist/components/FormattedDocument.d.ts +25 -25
- package/dist/components/Header.d.ts +72 -72
- package/dist/components/HomeContent.d.ts +20 -20
- package/dist/components/HomePage.d.ts +26 -26
- package/dist/components/LanguageSelector.d.ts +26 -26
- package/dist/components/LoginPage.d.ts +25 -25
- package/dist/components/MarkdownMessage.d.ts +24 -24
- package/dist/components/ModernChatInput.d.ts +44 -44
- package/dist/components/PodcastPlayer.d.ts +41 -41
- package/dist/components/ResetPasswordPage.d.ts +14 -14
- package/dist/components/Sidebar.d.ts +126 -126
- package/dist/components/TemplateContent.d.ts +19 -19
- package/dist/components/TemplatePage.d.ts +24 -24
- package/dist/components/ThemeToggle.d.ts +26 -26
- package/dist/components/VerifyEmailPage.d.ts +14 -14
- package/dist/components/XerticaLogo.d.ts +24 -24
- package/dist/components/XerticaOrbe.d.ts +23 -23
- package/dist/components/XerticaProvider.d.ts +35 -35
- package/dist/components/XerticaXLogo.d.ts +23 -23
- package/dist/components/assistant-utils.d.ts +21 -21
- package/dist/components/index.d.ts +2 -4
- package/dist/components/layout-constants.d.ts +8 -8
- package/dist/components/media/FloatingMediaWrapper.d.ts +5 -1
- package/dist/components/media/audio-player/AudioPlayer.d.ts +36 -0
- package/dist/components/media/audio-player/index.d.ts +1 -0
- package/dist/components/media/video-player/VideoPlayer.d.ts +9 -0
- package/dist/components/media/video-player/index.d.ts +1 -0
- package/dist/components/ui/accordion.d.ts +20 -20
- package/dist/components/ui/alert-dialog.d.ts +26 -26
- package/dist/components/ui/alert.d.ts +25 -25
- package/dist/components/ui/aspect-ratio.d.ts +14 -14
- package/dist/components/ui/avatar.d.ts +20 -20
- package/dist/components/ui/badge.d.ts +22 -22
- package/dist/components/ui/breadcrumb.d.ts +23 -23
- package/dist/components/ui/button.d.ts +37 -37
- package/dist/components/ui/calendar.d.ts +20 -20
- package/dist/components/ui/card.d.ts +21 -21
- package/dist/components/ui/carousel.d.ts +31 -31
- package/dist/components/ui/chart.d.ts +55 -55
- package/dist/components/ui/checkbox.d.ts +16 -16
- package/dist/components/ui/collapsible.d.ts +16 -16
- package/dist/components/ui/command.d.ts +29 -29
- package/dist/components/ui/context-menu.d.ts +37 -37
- package/dist/components/ui/dialog.d.ts +33 -33
- package/dist/components/ui/drawer.d.ts +26 -26
- package/dist/components/ui/dropdown-menu.d.ts +37 -37
- package/dist/components/ui/empty.d.ts +22 -22
- package/dist/components/ui/file-upload.d.ts +24 -24
- package/dist/components/ui/form.d.ts +37 -37
- package/dist/components/ui/hover-card.d.ts +18 -18
- package/dist/components/ui/input-otp.d.ts +23 -23
- package/dist/components/ui/input.d.ts +25 -25
- package/dist/components/ui/label.d.ts +15 -15
- package/dist/components/ui/map-layers.d.ts +48 -48
- package/dist/components/ui/map.d.ts +82 -82
- package/dist/components/ui/menubar.d.ts +39 -39
- package/dist/components/ui/navigation-menu.d.ts +26 -26
- package/dist/components/ui/notification-badge.d.ts +24 -24
- package/dist/components/ui/page-header.d.ts +76 -76
- package/dist/components/ui/pagination.d.ts +25 -25
- package/dist/components/ui/popover.d.ts +19 -19
- package/dist/components/ui/progress.d.ts +15 -15
- package/dist/components/ui/radio-group.d.ts +17 -17
- package/dist/components/ui/rating.d.ts +24 -24
- package/dist/components/ui/resizable.d.ts +39 -39
- package/dist/components/ui/route-map.d.ts +41 -41
- package/dist/components/ui/scroll-area.d.ts +16 -16
- package/dist/components/ui/search.d.ts +20 -20
- package/dist/components/ui/select.d.ts +27 -27
- package/dist/components/ui/separator.d.ts +15 -15
- package/dist/components/ui/sheet.d.ts +26 -26
- package/dist/components/ui/simple-map.d.ts +57 -57
- package/dist/components/ui/skeleton.d.ts +14 -14
- package/dist/components/ui/slider.d.ts +16 -16
- package/dist/components/ui/sonner.d.ts +15 -15
- package/dist/components/ui/stats-card.d.ts +29 -29
- package/dist/components/ui/stepper.d.ts +31 -31
- package/dist/components/ui/switch.d.ts +15 -15
- package/dist/components/ui/table.d.ts +22 -22
- package/dist/components/ui/tabs.d.ts +19 -19
- package/dist/components/ui/textarea.d.ts +15 -15
- package/dist/components/ui/timeline.d.ts +24 -24
- package/dist/components/ui/toggle-group.d.ts +24 -24
- package/dist/components/ui/toggle.d.ts +23 -23
- package/dist/components/ui/tooltip.d.ts +19 -19
- package/dist/components/ui/tree-view.d.ts +28 -28
- package/dist/components/ui/xertica-assistant.d.ts +241 -241
- package/dist/contexts/BrandColorsContext.d.ts +19 -19
- package/dist/index.es.js +815 -965
- package/dist/index.umd.js +814 -963
- package/dist/xertica-ui.css +1 -1
- package/docs/ai-usage.md +174 -174
- package/docs/architecture.md +1 -1
- package/docs/components/accordion.md +114 -114
- package/docs/components/alert-dialog.md +127 -127
- package/docs/components/aspect-ratio.md +58 -58
- package/docs/components/assistant.md +1 -1
- package/docs/components/audio-player.md +42 -34
- package/docs/components/avatar.md +103 -103
- package/docs/components/badge.md +75 -75
- package/docs/components/breadcrumb.md +104 -104
- package/docs/components/button.md +162 -162
- package/docs/components/calendar.md +99 -99
- package/docs/components/card.md +162 -162
- package/docs/components/carousel.md +100 -100
- package/docs/components/chart.md +148 -148
- package/docs/components/checkbox.md +86 -86
- package/docs/components/collapsible.md +91 -91
- package/docs/components/command.md +98 -98
- package/docs/components/context-menu.md +81 -81
- package/docs/components/dialog.md +155 -155
- package/docs/components/drawer.md +107 -107
- package/docs/components/dropdown-menu.md +131 -131
- package/docs/components/empty.md +136 -136
- package/docs/components/file-upload.md +83 -83
- package/docs/components/floating-media-wrapper.md +63 -0
- package/docs/components/form.md +150 -150
- package/docs/components/hover-card.md +86 -86
- package/docs/components/input-otp.md +102 -102
- package/docs/components/label.md +67 -67
- package/docs/components/map.md +76 -76
- package/docs/components/menubar.md +83 -83
- package/docs/components/navigation-menu.md +83 -83
- package/docs/components/notification-badge.md +61 -61
- package/docs/components/pagination.md +121 -121
- package/docs/components/popover.md +121 -121
- package/docs/components/progress.md +80 -80
- package/docs/components/radio-group.md +127 -127
- package/docs/components/rating.md +77 -77
- package/docs/components/resizable.md +88 -88
- package/docs/components/route-map.md +124 -124
- package/docs/components/scroll-area.md +58 -58
- package/docs/components/search.md +75 -75
- package/docs/components/select.md +148 -148
- package/docs/components/separator.md +58 -58
- package/docs/components/sheet.md +124 -124
- package/docs/components/skeleton.md +92 -92
- package/docs/components/slider.md +90 -90
- package/docs/components/sonner.md +118 -118
- package/docs/components/stats-card.md +119 -119
- package/docs/components/stepper.md +122 -122
- package/docs/components/switch.md +111 -111
- package/docs/components/table.md +138 -138
- package/docs/components/tabs.md +117 -117
- package/docs/components/textarea.md +86 -86
- package/docs/components/timeline.md +81 -81
- package/docs/components/toggle-group.md +68 -68
- package/docs/components/toggle.md +66 -66
- package/docs/components/tooltip.md +116 -116
- package/docs/components/tree-view.md +78 -78
- package/docs/components/use-mobile.md +100 -100
- package/docs/components/video-player.md +68 -0
- package/docs/guidelines.md +203 -203
- package/docs/llms.md +10 -2
- package/docs/patterns/analytics.md +208 -208
- package/docs/patterns/crud.md +158 -158
- package/docs/patterns/form.md +244 -244
- package/docs/patterns/login.md +167 -167
- package/guidelines/Guidelines.md +657 -657
- package/hooks/useTheme.test.tsx +16 -16
- package/llms-full.txt +21 -80
- package/llms.txt +15 -8
- package/mcp/resources.json +22 -22
- package/mcp/tools.json +35 -35
- package/package.json +2 -2
- package/scripts/a11y-audit.mjs +162 -0
- package/scripts/ai-validator.ts +83 -83
- package/styles/xertica/theme-map.css +3 -0
- package/templates/.env.example +2 -2
- package/templates/eslint.config.js +29 -29
- package/templates/package.json +2 -2
- package/templates/postcss.config.js +6 -6
- package/templates/src/app/pages/CrudTemplate.tsx +106 -106
- package/templates/src/app/pages/DashboardTemplate.tsx +101 -101
- package/templates/src/app/pages/FormTemplate.tsx +109 -109
- package/templates/src/app/pages/LoginTemplate.tsx +52 -52
- package/templates/src/main.tsx +10 -10
- package/templates/src/styles/index.css +4 -0
- package/templates/tsconfig.json +21 -21
- package/templates/tsconfig.node.json +12 -12
- package/templates/vite-env.d.ts +1 -1
- package/templates/vite.config.ts +7 -7
- package/utils/demo-responses.test.ts +10 -10
- package/utils/demo-responses.ts +114 -114
- package/utils/gemini.test.ts +24 -24
- package/components/blocks/audio-player/AudioPlayer.tsx +0 -244
- package/components/blocks/audio-player/audio-player.mdx +0 -31
- package/components/blocks/audio-player/audio-player.stories.tsx +0 -36
- package/components/blocks/audio-player/audio-player.test.tsx +0 -69
- package/components/blocks/document-editor/DocumentEditor.tsx +0 -530
- package/components/blocks/document-editor/document-editor.mdx +0 -31
- package/components/blocks/document-editor/document-editor.stories.tsx +0 -38
- package/components/blocks/document-editor/document-editor.test.tsx +0 -59
- package/components/blocks/document-editor/index.ts +0 -1
- package/components/blocks/podcast-player/PodcastPlayer.tsx +0 -464
- package/components/blocks/podcast-player/index.ts +0 -1
- package/components/blocks/podcast-player/podcast-player.mdx +0 -38
- package/components/blocks/podcast-player/podcast-player.stories.tsx +0 -55
- package/components/blocks/podcast-player/podcast-player.test.tsx +0 -53
- package/components/media/AudioPlayer.tsx +0 -284
- package/docs/components/document-editor.md +0 -69
- package/docs/components/podcast-player.md +0 -84
- /package/components/{blocks → media}/audio-player/index.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,32 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [1.8.0] — 2026-04-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **VideoPlayer UI Enhancements** — Added gradient overlay on controls for improved contrast against video content:
|
|
14
|
+
- Gradient: `from-black/60 via-black/30 to-transparent` with `pt-12` spacing
|
|
15
|
+
- White progress bar with `bg-white/30` track, `bg-white` fill, and `rounded-r-sm` on filled portion
|
|
16
|
+
- White icons with `drop-shadow-md` for visibility
|
|
17
|
+
- Buttons use `text-white hover:text-white hover:bg-black/50` for proper hover states
|
|
18
|
+
- **Slider Visual Fixes** — Improved progress bar alignment:
|
|
19
|
+
- Added left margin `ml-2` to track for thumb alignment
|
|
20
|
+
- Added `rounded-r-sm` to Range for filled portion
|
|
21
|
+
- Adjusted track/margins for proper visual alignment at full value
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- **Documentation** — Updated component counts across all docs:
|
|
25
|
+
- `llms.txt`: 75 → 97 components
|
|
26
|
+
- `llms-full.txt`: Added statistics table
|
|
27
|
+
- `docs/llms.md`: Added statistics section
|
|
28
|
+
- `Introduction.mdx`: Added "97 Components" badge
|
|
29
|
+
- **components.json** — 75 → 89 components (added missing Media, Assistant, Pages, and Map components)
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- **Slider Progress Bar** — Fixed visual gap where thumb doesn't align with filled bar at end position by adjusting track margins
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
10
36
|
## [1.7.0] — 2026-04-23
|
|
11
37
|
|
|
12
38
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,227 +1,184 @@
|
|
|
1
|
-
# Xertica UI
|
|
2
|
-
|
|
3
|
-
> **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/xertica-ui)
|
|
6
|
-
[](./LICENSE)
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
npm
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
###
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
```json
|
|
187
|
-
{
|
|
188
|
-
"react": "^18.3.1",
|
|
189
|
-
"react-dom": "^18.3.1",
|
|
190
|
-
"react-router-dom": "^7.1.3"
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
---
|
|
195
|
-
|
|
196
|
-
## Scripts
|
|
197
|
-
|
|
198
|
-
| Command | Description |
|
|
199
|
-
|---|---|
|
|
200
|
-
| `npm run dev` | Start development server |
|
|
201
|
-
| `npm run build` | Production bundle |
|
|
202
|
-
| `npm run type-check` | TypeScript validation |
|
|
203
|
-
| `npm run lint` | ESLint check |
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Troubleshooting
|
|
208
|
-
|
|
209
|
-
**CSS not loading:**
|
|
210
|
-
```bash
|
|
211
|
-
npm install
|
|
212
|
-
rm -rf node_modules/.vite
|
|
213
|
-
npm run dev
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
**TypeScript errors:**
|
|
217
|
-
```bash
|
|
218
|
-
npm run type-check
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Maps not rendering:** Ensure `googleMapsApiKey` is passed to `<XerticaProvider>` and the Maps JavaScript API + Directions API are enabled in your Google Cloud project.
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## License
|
|
226
|
-
|
|
227
|
-
Proprietary — Xertica AI Team.
|
|
1
|
+
# Xertica UI
|
|
2
|
+
|
|
3
|
+
> **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with a robust AI-first documentation layer for precise LLM-driven composition and autonomous agent interaction.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/xertica-ui)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 🤖 AI-First Single Source of Truth
|
|
11
|
+
|
|
12
|
+
Xertica UI is specifically designed to be consumed by AI Agents (LLMs, code assistants, autonomous agents). We provide dedicated entry points for AI context:
|
|
13
|
+
|
|
14
|
+
| File | Purpose |
|
|
15
|
+
|---|---|
|
|
16
|
+
| [`llms.txt`](./llms.txt) | Standard index for AI crawlers and context-aware agents. |
|
|
17
|
+
| [`llms-full.txt`](./llms-full.txt) | **Complete documentation** of all 96 components in a single file for large-context LLMs. |
|
|
18
|
+
| `docs/llms.md` | Master index for agents to navigate the documentation folder. |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🚀 Quick Start — CLI (Recommended)
|
|
23
|
+
|
|
24
|
+
Scaffold a full application with pre-configured routing, layout, and components:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx xertica-ui@latest init my-app
|
|
28
|
+
cd my-app
|
|
29
|
+
npm run dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The CLI scaffolds a complete Vite + React + TypeScript project with Portuguese UI localization and English AI-ready documentation.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 📦 Installation as a Library
|
|
37
|
+
|
|
38
|
+
To add Xertica UI to an existing React project:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install xertica-ui
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**1. Import the stylesheet** in your entry file (`main.tsx` or `App.tsx`):
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import 'xertica-ui/style.css';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**2. Wrap your app** with `XerticaProvider`:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import { XerticaProvider } from 'xertica-ui';
|
|
54
|
+
|
|
55
|
+
function App() {
|
|
56
|
+
return (
|
|
57
|
+
<XerticaProvider>
|
|
58
|
+
<YourApp />
|
|
59
|
+
</XerticaProvider>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 🛠️ The Layout System
|
|
67
|
+
|
|
68
|
+
Xertica UI features an autonomous layout system managed by `LayoutContext`.
|
|
69
|
+
|
|
70
|
+
### Mandatory Page Structure
|
|
71
|
+
Every page **must** use the `<PageHeader>` component for its title and primary actions. Never use raw `h1` or `div` for headers.
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { PageHeader, PageHeaderHeading, Button } from 'xertica-ui';
|
|
75
|
+
|
|
76
|
+
export function MyPage() {
|
|
77
|
+
return (
|
|
78
|
+
<>
|
|
79
|
+
<PageHeader>
|
|
80
|
+
<PageHeaderHeading>Dashboard</PageHeaderHeading>
|
|
81
|
+
<Button>Action</Button>
|
|
82
|
+
</PageHeader>
|
|
83
|
+
<div className="p-6">
|
|
84
|
+
{/* Page Content */}
|
|
85
|
+
</div>
|
|
86
|
+
</>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### `useLayout()` Hook
|
|
92
|
+
Access the sidebar state, width, and toggle functions anywhere in the component tree:
|
|
93
|
+
```tsx
|
|
94
|
+
const { sidebarWidth, isSidebarOpen, toggleSidebar } = useLayout();
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 🧩 Component Catalog (96 Components)
|
|
100
|
+
|
|
101
|
+
### Layout & Navigation
|
|
102
|
+
`Header` · `Sidebar` · `PageHeader` · `Breadcrumb` · `NavigationMenu` · `Tabs` · `Pagination` · `Accordion` · `Collapsible`
|
|
103
|
+
|
|
104
|
+
### Core Surfaces
|
|
105
|
+
`Card` · `Separator` · `ScrollArea` · `AspectRatio` · `Resizable` · `Skeleton` · `Empty`
|
|
106
|
+
|
|
107
|
+
### Forms & Inputs
|
|
108
|
+
`Form` · `Input` · `Textarea` · `RichTextEditor` · `Label` · `Checkbox` · `RadioGroup` · `Switch` · `Select` · `Slider` · `Calendar` · `InputOTP` · `FileUpload` · `Search`
|
|
109
|
+
|
|
110
|
+
### Actions & Data
|
|
111
|
+
`Button` · `Toggle` · `ToggleGroup` · `Rating` · `Table` · `Badge` · `Avatar` · `Progress` · `StatsCard` · `Timeline` · `Stepper` · `TreeView` · `NotificationBadge` · `Chart`
|
|
112
|
+
|
|
113
|
+
### Overlays & Feedback
|
|
114
|
+
`Dialog` · `AlertDialog` · `Sheet` · `Drawer` · `Popover` · `HoverCard` · `Tooltip` · `Alert` · `Sonner (Toast)` · `Command`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🌟 Specialized Modules
|
|
119
|
+
|
|
120
|
+
### 🤖 AI Assistant
|
|
121
|
+
Integrated AI chat panel with workspace support.
|
|
122
|
+
- `XerticaAssistant` · `MarkdownMessage` · `CodeBlock` · `AssistantChart`
|
|
123
|
+
|
|
124
|
+
### 🗺️ Maps & Geolocation
|
|
125
|
+
First-class Google Maps integration.
|
|
126
|
+
- `Map` · `RouteMap` · `SimpleMap` · `GoogleMapsLoader`
|
|
127
|
+
|
|
128
|
+
### 🎙️ Media
|
|
129
|
+
- `AudioPlayer` · `VideoPlayer` · `FloatingMediaWrapper`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 🎨 Design Tokens
|
|
134
|
+
|
|
135
|
+
Xertica UI uses semantic CSS tokens. **Never use raw colors or generic Tailwind color classes**:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Background: bg-background text-foreground
|
|
139
|
+
Card surface: bg-card text-card-foreground
|
|
140
|
+
Muted area: bg-muted text-muted-foreground
|
|
141
|
+
Primary action: bg-primary text-primary-foreground
|
|
142
|
+
Destructive: bg-destructive text-destructive-foreground
|
|
143
|
+
Border: border-border
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 🌍 Localization
|
|
149
|
+
|
|
150
|
+
- **UI Components**: Fully localized in **Portuguese (pt-BR)** for end-users.
|
|
151
|
+
- **Documentation/Code**: Strictly maintained in **English** for AI Agent compatibility and global developer standard.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 💻 Tech Stack
|
|
156
|
+
|
|
157
|
+
| Technology | Version |
|
|
158
|
+
|---|---|
|
|
159
|
+
| React | 18.3 |
|
|
160
|
+
| TypeScript | 5.7 |
|
|
161
|
+
| Tailwind CSS | 4.0 |
|
|
162
|
+
| Vite | 6.0 |
|
|
163
|
+
| Radix UI | Latest |
|
|
164
|
+
| Lucide React | 0.469+ |
|
|
165
|
+
| Vitest | 4.1 |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 📜 Scripts
|
|
170
|
+
|
|
171
|
+
| Command | Description |
|
|
172
|
+
|---|---|
|
|
173
|
+
| `npm run dev` | Start development server |
|
|
174
|
+
| `npm run build` | Production bundle |
|
|
175
|
+
| `npm run storybook` | Launch component library documentation |
|
|
176
|
+
| `npm run test` | Run unit tests via Vitest |
|
|
177
|
+
| `npm run type-check` | TypeScript validation |
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## ⚖️ License
|
|
182
|
+
|
|
183
|
+
Proprietary — Xertica AI Team.
|
|
184
|
+
|
|
@@ -12,6 +12,9 @@ import { XerticaLogo } from './brand/xertica-logo/XerticaLogo';
|
|
|
12
12
|
<p className="text-xl text-muted-foreground max-w-2xl">
|
|
13
13
|
Official Design System for Xertica projects. Built with Tailwind CSS v4, Radix UI, and AI-first engineering.
|
|
14
14
|
</p>
|
|
15
|
+
<div className="text-lg font-mono text-muted-foreground bg-muted px-4 py-2 rounded-lg">
|
|
16
|
+
97 Components
|
|
17
|
+
</div>
|
|
15
18
|
<div className="flex gap-4 pt-4">
|
|
16
19
|
<a href="https://www.npmjs.com/package/xertica-ui" target="_blank" className="h-11 px-8 rounded-full border border-border bg-background text-foreground font-medium flex items-center hover:bg-accent transition-colors no-underline">
|
|
17
20
|
NPM
|
|
@@ -232,9 +232,9 @@ export const CodeBlock = ({
|
|
|
232
232
|
aria-label={copied ? "Copiado" : "Copiar código"}
|
|
233
233
|
>
|
|
234
234
|
{copied ? (
|
|
235
|
-
<Check className="w-4 h-4 text-[var(--toast-success-icon)]" />
|
|
235
|
+
<Check className="w-4 h-4 text-[var(--toast-success-icon)]" aria-hidden="true" />
|
|
236
236
|
) : (
|
|
237
|
-
<Copy className="w-4 h-4" />
|
|
237
|
+
<Copy className="w-4 h-4" aria-hidden="true" />
|
|
238
238
|
)}
|
|
239
239
|
</Button>
|
|
240
240
|
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
|
|
2
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
3
|
-
import { CodeBlock } from './CodeBlock';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
describe('CodeBlock', () => {
|
|
7
|
-
const mockWriteText = vi.fn().mockResolvedValue(undefined);
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
vi.clearAllMocks();
|
|
11
|
-
// Mock clipboard API safely
|
|
12
|
-
vi.stubGlobal('navigator', {
|
|
13
|
-
clipboard: {
|
|
14
|
-
writeText: mockWriteText,
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('renders code correctly', () => {
|
|
20
|
-
const code = 'const x = 1;';
|
|
21
|
-
const { container } = render(<CodeBlock code={code} language="typescript" />);
|
|
22
|
-
// Simple check: is the text present in the container?
|
|
23
|
-
expect(container.textContent).toContain(code);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('shows filename in header', () => {
|
|
27
|
-
render(<CodeBlock code="code" filename="test.ts" />);
|
|
28
|
-
expect(screen.getByText('test.ts')).toBeInTheDocument();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('copies code to clipboard when button is clicked', async () => {
|
|
32
|
-
const code = 'copy me';
|
|
33
|
-
render(<CodeBlock code={code} />);
|
|
34
|
-
|
|
35
|
-
const copyButton = screen.getByLabelText('Copiar código');
|
|
36
|
-
fireEvent.click(copyButton);
|
|
37
|
-
|
|
38
|
-
expect(mockWriteText).toHaveBeenCalledWith(code);
|
|
39
|
-
|
|
40
|
-
await waitFor(() => {
|
|
41
|
-
expect(screen.getByLabelText('Copiado')).toBeInTheDocument();
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
});
|
|
1
|
+
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
|
|
2
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
3
|
+
import { CodeBlock } from './CodeBlock';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
describe('CodeBlock', () => {
|
|
7
|
+
const mockWriteText = vi.fn().mockResolvedValue(undefined);
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
vi.clearAllMocks();
|
|
11
|
+
// Mock clipboard API safely
|
|
12
|
+
vi.stubGlobal('navigator', {
|
|
13
|
+
clipboard: {
|
|
14
|
+
writeText: mockWriteText,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('renders code correctly', () => {
|
|
20
|
+
const code = 'const x = 1;';
|
|
21
|
+
const { container } = render(<CodeBlock code={code} language="typescript" />);
|
|
22
|
+
// Simple check: is the text present in the container?
|
|
23
|
+
expect(container.textContent).toContain(code);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('shows filename in header', () => {
|
|
27
|
+
render(<CodeBlock code="code" filename="test.ts" />);
|
|
28
|
+
expect(screen.getByText('test.ts')).toBeInTheDocument();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('copies code to clipboard when button is clicked', async () => {
|
|
32
|
+
const code = 'copy me';
|
|
33
|
+
render(<CodeBlock code={code} />);
|
|
34
|
+
|
|
35
|
+
const copyButton = screen.getByLabelText('Copiar código');
|
|
36
|
+
fireEvent.click(copyButton);
|
|
37
|
+
|
|
38
|
+
expect(mockWriteText).toHaveBeenCalledWith(code);
|
|
39
|
+
|
|
40
|
+
await waitFor(() => {
|
|
41
|
+
expect(screen.getByLabelText('Copiado')).toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -50,9 +50,20 @@ export function FormattedDocument({ content, maxPreviewLength = 500, className =
|
|
|
50
50
|
html = html.replace(/^[-*+] \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-0.5"><input type="checkbox" disabled class="rounded w-3.5 h-3.5 accent-primary" aria-label="$1" /> <span class="text-sm">$1</span></div>');
|
|
51
51
|
html = html.replace(/^[-*+] \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-0.5"><input type="checkbox" checked disabled class="rounded w-3.5 h-3.5 accent-primary" aria-label="$1" /> <span class="text-sm">$1</span></div>');
|
|
52
52
|
|
|
53
|
-
// Lists (Bullet and Numbered)
|
|
54
|
-
html = html.replace(
|
|
55
|
-
|
|
53
|
+
// Lists (Bullet and Numbered) - Wrap blocks of items in ul/ol
|
|
54
|
+
html = html.replace(/((?:^[-*+] .*$(?:\n|$))+)/gim, (match) => {
|
|
55
|
+
const items = match.trim().split('\n').map(item =>
|
|
56
|
+
`<li class="ml-6 my-0.5 list-disc">${item.replace(/^[-*+] /i, '')}</li>`
|
|
57
|
+
).join('');
|
|
58
|
+
return `<ul class="list-disc my-2">${items}</ul>`;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
html = html.replace(/((?:^\d+\. .*$(?:\n|$))+)/gim, (match) => {
|
|
62
|
+
const items = match.trim().split('\n').map(item =>
|
|
63
|
+
`<li class="ml-6 my-0.5 list-decimal">${item.replace(/^\d+\. /i, '')}</li>`
|
|
64
|
+
).join('');
|
|
65
|
+
return `<ol class="list-decimal my-2">${items}</ol>`;
|
|
66
|
+
});
|
|
56
67
|
|
|
57
68
|
// Horizontal rule
|
|
58
69
|
html = html.replace(/^---$/gim, '<hr class="my-2 border-border" />');
|