xertica-ui 2.3.0 → 2.4.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 +22 -2
- package/README.md +33 -22
- package/bin/cli.ts +136 -47
- package/bin/language-config.ts +5 -8
- package/components/assistant/modern-chat-input/ModernChatInput.tsx +17 -7
- package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +1 -3
- package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +13 -3
- package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +10 -6
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +1 -3
- package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +1 -6
- package/components/blocks/card-patterns/ProfileCard.tsx +1 -3
- package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +1 -6
- package/components/brand/language-selector/language-selector.stories.tsx +1 -4
- package/components/brand/theme-toggle/ThemeToggle.tsx +5 -1
- package/components/brand/xertica-provider/XerticaProvider.tsx +1 -4
- package/components/index.ts +1 -5
- package/components/layout/sidebar/sidebar.tsx +9 -3
- package/components/media/audio-player/AudioPlayer.tsx +4 -2
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
- package/components/pages/home-content/HomeContent.tsx +55 -55
- package/components/pages/home-page/HomePage.tsx +5 -1
- package/components/pages/login-page/LoginPage.tsx +4 -2
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +7 -3
- package/components/pages/template-content/TemplateContent.tsx +268 -149
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +9 -9
- package/components/shared/error-boundary.stories.tsx +114 -132
- package/components/shared/error-boundary.tsx +150 -154
- package/components/shared/error-fallbacks.tsx +222 -226
- package/components/ui/stats-card/stats-card-skeleton.tsx +1 -3
- package/components/ui/stats-card/stats-card.stories.tsx +18 -0
- package/components/ui/stats-card/stats-card.tsx +18 -2
- package/components.json +512 -892
- package/contexts/AuthContext.tsx +121 -118
- package/contexts/LanguageContext.tsx +1 -2
- package/dist/AssistantChart-BKVtGUKF.js +3383 -0
- package/dist/AssistantChart-WeycT5Pd.cjs +3551 -0
- package/dist/VerifyEmailPage-Bp1XXl3H.cjs +3305 -0
- package/dist/VerifyEmailPage-DGhuIqkb.js +3296 -0
- package/dist/XerticaProvider-BErr83Bg.js +42 -0
- package/dist/XerticaProvider-CwOkHxiT.cjs +44 -0
- package/dist/XerticaXLogo-BX3ueACh.js +255 -0
- package/dist/XerticaXLogo-qBPhwK3g.cjs +260 -0
- package/dist/assistant.cjs.js +1 -1
- package/dist/assistant.es.js +1 -1
- package/dist/brand.cjs.js +2 -2
- package/dist/brand.es.js +2 -2
- package/dist/cli.js +90 -37
- package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/ui/stats-card/stats-card.d.ts +10 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.es.js +6 -6
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/sidebar-B4ZWaMrE.js +792 -0
- package/dist/sidebar-BS1p2V7t.cjs +795 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/xertica-assistant-B1NaSFFj.js +2173 -0
- package/dist/xertica-assistant-CIaUlbIt.cjs +2180 -0
- package/dist/xertica-ui.css +1 -1
- package/docs/architecture-improvements.md +5 -5
- package/docs/architecture.md +16 -10
- package/docs/components/card-patterns.md +19 -17
- package/docs/components/error-boundary.md +201 -191
- package/docs/components/hooks.md +15 -13
- package/docs/components/language-selector.md +20 -16
- package/docs/components/pages.md +323 -309
- package/docs/components/stats-card.md +20 -2
- package/docs/doc-audit.md +12 -11
- package/docs/getting-started.md +41 -28
- package/docs/guidelines.md +14 -12
- package/docs/i18n.md +61 -57
- package/docs/installation.md +268 -267
- package/docs/llms.md +17 -17
- package/docs/state-management.md +17 -17
- package/guidelines/Guidelines.md +17 -14
- package/llms-compact.txt +1 -1
- package/llms-full.txt +11553 -7133
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/styles/xertica/base.css +90 -84
- package/templates/CLAUDE.md +16 -1
- package/templates/guidelines/Guidelines.md +42 -18
- package/templates/package.json +3 -3
- package/templates/src/app/components/AuthGuard.tsx +131 -82
- package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +1 -3
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +6 -2
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +2 -6
- package/templates/src/features/home/data/mock.ts +41 -35
- package/templates/src/features/home/ui/HomeContent.tsx +62 -64
- package/templates/src/features/template/ui/CrudTemplate.tsx +1 -4
- package/templates/src/features/template/ui/LoginTemplate.tsx +1 -1
- package/templates/src/features/template/ui/TemplateContent.tsx +28 -20
- package/templates/src/locales/en/pages/templates.json +17 -17
- package/templates/src/locales/es/pages/templates.json +17 -17
- package/templates/src/locales/pt-BR/pages/templates.json +17 -17
- package/templates/src/pages/AssistantPage.tsx +26 -20
- package/templates/src/pages/HomePage.tsx +5 -1
- package/templates/src/shared/error-boundary.tsx +150 -154
- package/templates/src/shared/error-fallbacks.tsx +222 -226
- package/templates/vite.config.ts +12 -9
|
@@ -45,21 +45,23 @@ The `Header` component accepts `showLanguageSelector` and renders `<LanguageSele
|
|
|
45
45
|
### Minimal variant (short code only)
|
|
46
46
|
|
|
47
47
|
```tsx
|
|
48
|
-
<LanguageSelector variant="minimal" showIcon={false}
|
|
49
|
-
{
|
|
48
|
+
<LanguageSelector variant="minimal" showIcon={false} />;
|
|
49
|
+
{
|
|
50
|
+
/* Trigger displays "PT", "EN", "ES" (or the LanguageDefinition.shortLabel of custom locales) */
|
|
51
|
+
}
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
---
|
|
53
55
|
|
|
54
56
|
## Props
|
|
55
57
|
|
|
56
|
-
| Prop
|
|
57
|
-
|
|
58
|
-
| `variant`
|
|
59
|
-
| `showIcon`
|
|
60
|
-
| `showLabel`
|
|
61
|
-
| `className`
|
|
62
|
-
| `showWhenMonolingual` | `boolean`
|
|
58
|
+
| Prop | Type | Default | Description |
|
|
59
|
+
| --------------------- | ------------------------ | ----------- | ----------------------------------------------------------------------------------------- |
|
|
60
|
+
| `variant` | `'default' \| 'minimal'` | `'default'` | `minimal` shows the short label (`PT`, `EN`, …); `default` shows the full label |
|
|
61
|
+
| `showIcon` | `boolean` | `true` | Show the Globe icon in the trigger |
|
|
62
|
+
| `showLabel` | `boolean` | `false` | Reserved — currently has no visual effect |
|
|
63
|
+
| `className` | `string` | `''` | Additional CSS classes applied to the `SelectTrigger` |
|
|
64
|
+
| `showWhenMonolingual` | `boolean` | `false` | Render the selector even when only one language is configured (would otherwise auto-hide) |
|
|
63
65
|
|
|
64
66
|
> **Removed props**: `initialLanguage` and `onLanguageChange` no longer exist. The component reads from `LanguageContext` and drives language changes through `i18n.changeLanguage()` internally.
|
|
65
67
|
|
|
@@ -69,11 +71,11 @@ The `Header` component accepts `showLanguageSelector` and renders `<LanguageSele
|
|
|
69
71
|
|
|
70
72
|
By default the library ships with three languages (`DEFAULT_LANGUAGES`):
|
|
71
73
|
|
|
72
|
-
| Code
|
|
73
|
-
|
|
74
|
-
| `'pt-BR'` | Português (BR) | PT
|
|
75
|
-
| `'en'`
|
|
76
|
-
| `'es'`
|
|
74
|
+
| Code | Display | Short label |
|
|
75
|
+
| --------- | -------------- | ----------- |
|
|
76
|
+
| `'pt-BR'` | Português (BR) | PT |
|
|
77
|
+
| `'en'` | English | EN |
|
|
78
|
+
| `'es'` | Español | ES |
|
|
77
79
|
|
|
78
80
|
**The list is fully runtime-configurable.** Pass `availableLanguages` on `<XerticaProvider>` to add, remove, or restrict the set of languages exposed by the selector — no source-file edits required. See [`docs/i18n.md`](../i18n.md#configuring-available-languages) for the full API.
|
|
79
81
|
|
|
@@ -91,7 +93,7 @@ import fr from './locales/fr.json';
|
|
|
91
93
|
>
|
|
92
94
|
<LanguageSelector />
|
|
93
95
|
{/* French appears in the dropdown; bundle auto-registered with i18next */}
|
|
94
|
-
</XerticaProvider
|
|
96
|
+
</XerticaProvider>;
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
### Monolingual app — selector auto-hides
|
|
@@ -147,7 +149,9 @@ function ProfileSettings() {
|
|
|
147
149
|
return (
|
|
148
150
|
<select value={language} onChange={e => setLanguage(e.target.value)}>
|
|
149
151
|
{availableLanguages.map(lang => (
|
|
150
|
-
<option key={lang.code} value={lang.code}>
|
|
152
|
+
<option key={lang.code} value={lang.code}>
|
|
153
|
+
{lang.label}
|
|
154
|
+
</option>
|
|
151
155
|
))}
|
|
152
156
|
</select>
|
|
153
157
|
);
|