@caribeng/ui 22.5.0 → 22.6.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/README.md CHANGED
@@ -1,64 +1,66 @@
1
1
  <h1 align="center">CaribeNG</h1>
2
2
 
3
3
  <p align="center">
4
- <strong>Sistema de diseño y librería de componentes para Angular.</strong><br />
5
- Standalone, Signals, OnPush, tokens CSS y accesibilidad WCAG 2.2 AA.
4
+ <strong>Design system and component library for Angular.</strong><br />
5
+ Standalone, Signals, OnPush, CSS tokens and WCAG 2.2 AA accessibility.
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
9
  <img alt="Angular 22" src="https://img.shields.io/badge/Angular-22-dd0031.svg?style=flat-square" />
10
10
  <img alt="Entry points" src="https://img.shields.io/badge/entry%20points-173-10b981.svg?style=flat-square" />
11
- <img alt="Licencia MIT" src="https://img.shields.io/badge/licencia-MIT-blue.svg?style=flat-square" />
11
+ <img alt="MIT license" src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" />
12
12
  </p>
13
13
 
14
+ <p align="center">📖 Documentation: <a href="https://caribeng.devmike.site">caribeng.devmike.site</a></p>
15
+
14
16
  ---
15
17
 
16
- ## ✨ Características
18
+ ## ✨ Features
17
19
 
18
- - **225 componentes y directivas** standalone (186 componentes + 39 directivas), empaquetados en **173 entry points** (`@caribeng/ui/button`, `@caribeng/ui/table`…): solo empaquetas lo que importas.
19
- - **Angular moderno:** `input()` / `model()` / `output()` con Signals, `ChangeDetectionStrategy.OnPush` y compatible con apps zoneless.
20
- - **Formularios sin fricción:** `ControlValueAccessor` en todos los controles; el error y el indicador de obligatorio se sincronizan solos con Angular Forms.
21
- - **Accesibles:** roles y atributos ARIA, soporte de teclado y gestión de foco (WCAG 2.2 AA).
22
- - **Tematizables:** tokens CSS `--cb-*`, modo claro/oscuro y presets de color que se cambian en caliente.
23
- - **Iconos incluidos:** 363 iconos núcleo listos para usar y un catálogo opcional de 1891 iconos.
24
- - **Migración desde PrimeNG:** un schematic traduce imports, plantillas e iconos y deja un informe con lo pendiente ([ver más](#migrar-desde-primeng)).
20
+ - **225 standalone components and directives** (186 components + 39 directives), packaged in **173 entry points** (`@caribeng/ui/button`, `@caribeng/ui/table`…): ship only what you import.
21
+ - **Modern Angular:** `input()` / `model()` / `output()` with Signals, `ChangeDetectionStrategy.OnPush` and zoneless-ready.
22
+ - **Frictionless forms:** `ControlValueAccessor` on every control; the error and required indicator sync automatically with Angular Forms.
23
+ - **Accessible:** ARIA roles and attributes, keyboard support and focus management (WCAG 2.2 AA).
24
+ - **Themable:** `--cb-*` CSS tokens, light/dark mode and color presets that switch live.
25
+ - **Icons included:** 363 core icons ready to use and an optional catalog of 1891 icons.
26
+ - **PrimeNG migration:** a schematic translates imports, templates and icons and leaves a report of what remains ([see more](#migrating-from-primeng)).
25
27
 
26
- ## 🖥 Compatibilidad
28
+ ## 🖥 Compatibility
27
29
 
28
- El major de CaribeNG coincide con el de Angular, igual que Angular Material, PrimeNG y NG-ZORRO. Instala la versión que corresponde a tu proyecto:
30
+ CaribeNG's major version matches Angular's, just like Angular Material, PrimeNG and NG-ZORRO. Install the version that corresponds to your project:
29
31
 
30
- | CaribeNG | Angular | Estado |
32
+ | CaribeNG | Angular | Status |
31
33
  | --- | --- | --- |
32
- | `22.x` | `^22.0.0` | Activa: nuevas funciones y correcciones |
33
- | `21.x` | `^21.0.0` | Mantenimiento: solo correcciones |
34
+ | `22.x` | `^22.0.0` | Active: new features and fixes |
35
+ | `21.x` | `^21.0.0` | Maintenance: fixes only |
34
36
 
35
- Navegadores: los mismos que [soporta Angular](https://angular.dev/reference/versions#browser-support).
37
+ Browsers: the same ones [Angular supports](https://angular.dev/reference/versions#browser-support).
36
38
 
37
- ## 📦 Instalación
39
+ ## 📦 Installation
38
40
 
39
- ### Requisitos
41
+ ### Requirements
40
42
 
41
- - Un proyecto **Angular 22** con `@angular/forms` (lo incluye cualquier proyecto creado con `ng new`).
42
- - `@angular/cdk` se instala automáticamente como dependencia (overlays y accesibilidad).
43
- - npm, yarn o pnpm.
43
+ - An **Angular 22** project with `@angular/forms` (any project created with `ng new` includes it).
44
+ - `@angular/cdk` is installed automatically as a dependency (overlays and accessibility).
45
+ - npm, yarn or pnpm.
44
46
 
45
- ### Instalación rápida (recomendada)
47
+ ### Quick install (recommended)
46
48
 
47
49
  ```bash
48
50
  ng add @caribeng/ui
49
51
  ```
50
52
 
51
- Pregunta el idioma, el tema y el color primario, y deja el proyecto listo:
53
+ It asks for the language, theme and primary color, and leaves the project ready:
52
54
 
53
- - instala `@caribeng/ui` (y `@angular/cdk`),
54
- - registra `provideCaribeNG({ locale, theme, preset })` en `app.config.ts` (o en `AppModule`),
55
- - añade `@caribeng/ui/styles.css` a los estilos de `angular.json`.
55
+ - installs `@caribeng/ui` (and `@angular/cdk`),
56
+ - registers `provideCaribeNG({ locale, theme, preset })` in `app.config.ts` (or in `AppModule`),
57
+ - adds `@caribeng/ui/styles.css` to the `angular.json` styles.
56
58
 
57
- Se puede ejecutar sin preguntas: `ng add @caribeng/ui --locale=en --theme=system --preset=ocean --skip-confirmation`. Volver a ejecutarlo no duplica nada.
59
+ You can run it without prompts: `ng add @caribeng/ui --locale=en --theme=system --preset=ocean --skip-confirmation`. Re-running it duplicates nothing.
58
60
 
59
- Después, salta al paso [3. Verifica la instalación](#3-verifica-la-instalación).
61
+ Then jump to [3. Verify the installation](#3-verify-the-installation).
60
62
 
61
- ### Instalación manual
63
+ ### Manual installation
62
64
 
63
65
  ```bash
64
66
  # npm
@@ -71,48 +73,48 @@ yarn add @caribeng/ui
71
73
  pnpm add @caribeng/ui
72
74
  ```
73
75
 
74
- ### Migrar desde PrimeNG
76
+ ### Migrating from PrimeNG
75
77
 
76
- En un proyecto con PrimeNG 18 o superior, instala CaribeNG y ejecuta el migrador:
78
+ In a project with PrimeNG 18 or higher, install CaribeNG and run the migrator:
77
79
 
78
80
  ```bash
79
81
  npm install @caribeng/ui@22
80
82
  ng generate @caribeng/ui:migrate-from-primeng
81
83
  ```
82
84
 
83
- > Haz commit (o una copia) antes de ejecutarlo para poder revisar los cambios con `git diff`. Con `--dry-run` ves qué archivos cambiaría sin escribir nada. Si ejecutas `ng add @caribeng/ui` en un proyecto con PrimeNG, te recordará este comando.
85
+ > Commit (or copy) before running it so you can review the changes with `git diff`. With `--dry-run` you can see which files it would change without writing anything. Running `ng add @caribeng/ui` in a project that has PrimeNG reminds you of this command.
84
86
 
85
87
  ```html
86
- <!-- Antes -->
87
- <p-button label="Guardar" icon="pi pi-check" [outlined]="true" (onClick)="guardar()" />
88
+ <!-- Before -->
89
+ <p-button label="Save" icon="pi pi-check" [outlined]="true" (onClick)="save()" />
88
90
  <input pInputText id="email" [(ngModel)]="email" />
89
- <p-dialog header="Editar" [(visible)]="abierto" [modal]="true" [style]="{ width: '25rem' }">…</p-dialog>
91
+ <p-dialog header="Edit" [(visible)]="open" [modal]="true" [style]="{ width: '25rem' }">…</p-dialog>
90
92
 
91
- <!-- Después -->
92
- <cb-button variant="outlined" (click)="guardar()"><cb-icon name="check" />Guardar</cb-button>
93
+ <!-- After -->
94
+ <cb-button variant="outlined" (click)="save()"><cb-icon name="check" />Save</cb-button>
93
95
  <cb-input inputId="email" [(ngModel)]="email" />
94
- <cb-dialog header="Editar" [(visible)]="abierto" width="25rem">…</cb-dialog>
96
+ <cb-dialog header="Edit" [(visible)]="open" width="25rem">…</cb-dialog>
95
97
  ```
96
98
 
97
- Qué hace:
99
+ What it does:
98
100
 
99
- - cambia los imports de PrimeNG por los de CaribeNG (`ButtonModule` → `CbButton`, `providePrimeNG()` → `provideCaribeNG()`) y añade a cada componente los que usa su plantilla,
100
- - traduce las plantillas con sus inputs y eventos (`[outlined]` → `variant`, `size="small"` → `size="sm"`, `(onClick)` → `(click)`, `subheader` → `subtitle`…), incluido el pie de Dialog y Card (`#footer` → `<div cb-dialog-footer>` / `<div cb-card-footer>`),
101
- - cambia `MessageService` por `CbToastService`: traduce los mensajes (`severity: 'error'` → `'danger'`, `'warn'` → `'warning'`, `sticky: true` → `life: 0`) y lo quita de los `providers`, porque `CbToastService` es único para toda la app,
102
- - convierte los iconos `pi pi-*` en `<cb-icon>` y registra con `provideCbIcons` los que no están en el set núcleo,
103
- - quita PrimeIcons de `angular.json` y de las hojas de estilo, y añade `@caribeng/ui/styles.css`,
104
- - quita `primeng`, `primeicons` y `@primeuix/*` de `package.json` **solo cuando ya no queda ninguna referencia**; mientras tanto las dos librerías conviven.
101
+ - swaps PrimeNG imports for CaribeNG ones (`ButtonModule` → `CbButton`, `providePrimeNG()` → `provideCaribeNG()`) and adds to each component the ones its template uses,
102
+ - translates templates with their inputs and events (`[outlined]` → `variant`, `size="small"` → `size="sm"`, `(onClick)` → `(click)`, `subheader` → `subtitle`…), including the Dialog and Card footer (`#footer` → `<div cb-dialog-footer>` / `<div cb-card-footer>`),
103
+ - replaces `MessageService` with `CbToastService`: translates messages (`severity: 'error'` → `'danger'`, `'warn'` → `'warning'`, `sticky: true` → `life: 0`) and removes it from `providers`, because `CbToastService` is a singleton for the whole app,
104
+ - converts `pi pi-*` icons into `<cb-icon>` and registers with `provideCbIcons` the ones that are not in the core set,
105
+ - removes PrimeIcons from `angular.json` and stylesheets, and adds `@caribeng/ui/styles.css`,
106
+ - removes `primeng`, `primeicons` and `@primeuix/*` from `package.json` **only when no reference remains**; until then both libraries coexist.
105
107
 
106
- Lo que no puede traducir con seguridad (un input sin equivalente, una plantilla `#header` personalizada, un `pButton` sobre un enlace…) lo marca con un comentario junto al código, conservando el atributo original:
108
+ What it cannot translate safely (an input without an equivalent, a custom `#header` template, a `pButton` on a link…) is marked with a comment next to the code, keeping the original attribute:
107
109
 
108
110
  ```html
109
- <!-- TODO(caribeng): [rounded]="true" — cb-button no tiene variante redondeada; usa una clase propia o <cb-icon-button>. -->
110
- <cb-button severity="danger">Borrar</cb-button>
111
+ <!-- TODO(caribeng): [rounded]="true" — cb-button has no rounded variant; use your own class or <cb-icon-button>. -->
112
+ <cb-button severity="danger">Delete</cb-button>
111
113
  ```
112
114
 
113
- Todos los avisos, las referencias a PrimeNG que aún quedan (por ejemplo componentes que el migrador no traduce todavía) y los imports que haya que añadir a mano se resumen en `caribeng-migration-report.md`, con archivo y línea.
115
+ All warnings, remaining PrimeNG references (for example components the migrator does not translate yet) and imports that must be added by hand are summarized in `caribeng-migration-report.md`, with file and line.
114
116
 
115
- **Componentes que traduce hoy:**
117
+ **Components it translates today:**
116
118
 
117
119
  | PrimeNG | CaribeNG |
118
120
  |---|---|
@@ -128,37 +130,37 @@ Todos los avisos, las referencias a PrimeNG que aún quedan (por ejemplo compone
128
130
  | `<p-confirmdialog>` + `ConfirmationService` | `<cb-confirm-dialog service>` + `CbConfirmationService` |
129
131
  | `<p-confirmpopup>` | `<cb-confirm-popup service>` |
130
132
  | `<p-menu>`, `<p-menubar>`, `<p-tieredmenu>`, `<p-panelmenu>`, `<p-breadcrumb>`, `<p-tabmenu>` | `<cb-menu>`, `<cb-menubar>`, `<cb-tieredmenu>`, `<cb-panelmenu>`, `<cb-breadcrumb>`, `<cb-tabmenu>` |
131
- | `MenuItem[]` (`icon`, `command`, `routerLink`…) | el tipo de item del menú que lo recibe (`CbMenubarItem[]`…) |
133
+ | `MenuItem[]` (`icon`, `command`, `routerLink`…) | the item type of the menu that receives it (`CbMenubarItem[]`…) |
132
134
  | `<p-splitbutton>` | `<cb-split-button>` |
133
- | `<p-table>` (columnas escritas en `#header`/`#body` o dinámicas con `@for`) | `<cb-table [columns]>` + un `cbTableCell` por celda personalizada |
134
- | `<p-tabs>` (y `<p-tabView>`) | `<cb-tabs>` + `<cb-tab label="…">` |
135
- | `<p-accordion>` (y `<p-accordionTab>`) | `<cb-accordion>` + `<cb-accordion-panel header="…">` |
135
+ | `<p-table>` (columns written in `#header`/`#body` or dynamic with `@for`) | `<cb-table [columns]>` + a `cbTableCell` per custom cell |
136
+ | `<p-tabs>` (and `<p-tabView>`) | `<cb-tabs>` + `<cb-tab label="…">` |
137
+ | `<p-accordion>` (and `<p-accordionTab>`) | `<cb-accordion>` + `<cb-accordion-panel header="…">` |
136
138
  | `<p-tag>` | `<cb-tag>` |
137
139
  | `<p-toast>` + `MessageService` | `<cb-toast>` + `CbToastService` |
138
140
  | `<p-card>` | `<cb-card>` |
139
- | `pTooltip` (en cualquier elemento) | `cbTooltip` |
141
+ | `pTooltip` (on any element) | `cbTooltip` |
140
142
  | `<p-checkbox>` | `<cb-checkbox>` |
141
143
  | `<i class="pi pi-*">` | `<cb-icon>` |
142
144
 
143
- En los menús, los arrays de `MenuItem` cambian de tipo según el menú que los recibe en la plantilla; `icon: 'pi pi-plus'` pasa a `'plus'`, `command` y `visible` se conservan, y `routerLink: '/x'` pasa a `url` (los `routerLink` con parámetros quedan con aviso). En las tablas, cada `<th>`/`<td>` pasa a una columna de `[columns]` (`pSortableColumn` → `sortable`, `<p-columnFilter>` → `filter`, `pFrozenColumn` → `frozen`); las celdas que no son solo `{{ fila.campo }}` pasan a un `<ng-template cbTableCell>` con su contenido migrado, y las columnas de checkbox y de expandir desaparecen porque `cb-table` las pone sola. Con columnas dinámicas (`[columns]="cols"` + `@for`), `cols` pasa directamente a `[columns]`: el migrador le añade `sortable: true` / `filter: true` si la cabecera los aplicaba a todas, y las ramas `@if (col.field === '…')` o `@switch (col.field)` del cuerpo pasan a un `cbTableCell` por campo. Las tablas con celdas de lógica genérica, varias filas por registro o plantillas sin equivalente se dejan con aviso y conservan `TableModule`, para que sigan compilando. Las pestañas y los acordeones de PrimeNG 18+ se reestructuran (la cabecera pasa a `label`/`header`); si se generan con `@for` o la cabecera lleva iconos, quedan con aviso.
145
+ In menus, `MenuItem` arrays change type according to the menu that receives them in the template; `icon: 'pi pi-plus'` becomes `'plus'`, `command` and `visible` are kept, and `routerLink: '/x'` becomes `url` (`routerLink` with parameters is flagged). In tables, each `<th>`/`<td>` becomes a column of `[columns]` (`pSortableColumn` → `sortable`, `<p-columnFilter>` → `filter`, `pFrozenColumn` → `frozen`); cells that are not just `{{ row.field }}` become a `<ng-template cbTableCell>` with their migrated content, and checkbox and expand columns disappear because `cb-table` adds them itself. With dynamic columns (`[columns]="cols"` + `@for`), `cols` is passed directly to `[columns]`: the migrator adds `sortable: true` / `filter: true` if the header applied them to all, and the `@if (col.field === '…')` or `@switch (col.field)` branches of the body become a `cbTableCell` per field. Tables with generic-logic cells, several rows per record or templates without an equivalent are flagged and keep `TableModule`, so they keep compiling. PrimeNG 18+ tabs and accordions are restructured (the header becomes `label`/`header`); if they are generated with `@for` or the header has icons, they are flagged.
144
146
 
145
- Los radios (`<p-radiobutton>`) y los menús contextuales (`<p-contextmenu>`) se marcan con un aviso pero no se convierten, porque cambia la estructura de la página: en CaribeNG el modelo de los radios va en un `<cb-radio-group>` que envuelve las opciones, y `<cb-contextmenu>` envuelve el área sobre la que se abre en vez de apuntar a ella con `[target]`. El resto de componentes aparece en el informe para migrarlo a mano; se irán añadiendo en próximas versiones.
147
+ Radios (`<p-radiobutton>`) and context menus (`<p-contextmenu>`) are flagged but not converted, because the page structure changes: in CaribeNG the radio model lives in a `<cb-radio-group>` that wraps the options, and `<cb-contextmenu>` wraps the area it opens on instead of pointing to it with `[target]`. The remaining components appear in the report to migrate by hand; they will be added in future versions.
146
148
 
147
- | Opción | Uso |
149
+ | Option | Use |
148
150
  |---|---|
149
- | `--path=src/app/ventas` | Migrar solo una carpeta (migración por partes). |
150
- | `--remove-primeng=false` | No tocar las dependencias de `package.json`. |
151
- | `--report=false` | No escribir el informe. |
152
- | `--skip-install` | No instalar dependencias al terminar. |
153
- | `--force` | Migrar aunque falte `@caribeng/ui` o la versión de PrimeNG sea anterior a la 18. |
151
+ | `--path=src/app/sales` | Migrate only one folder (partial migration). |
152
+ | `--remove-primeng=false` | Do not touch `package.json` dependencies. |
153
+ | `--report=false` | Do not write the report. |
154
+ | `--skip-install` | Do not install dependencies when finished. |
155
+ | `--force` | Migrate even if `@caribeng/ui` is missing or the PrimeNG version is older than 18. |
154
156
 
155
- ## 🔨 Uso
157
+ ## 🔨 Usage
156
158
 
157
- > Con `ng add @caribeng/ui` los pasos 1 y 2 ya están hechos.
159
+ > With `ng add @caribeng/ui`, steps 1 and 2 are already done.
158
160
 
159
- ### 1. Proveedor
161
+ ### 1. Provider
160
162
 
161
- Añade `provideCaribeNG()` a los providers de tu `app.config.ts`. Todas las opciones son opcionales:
163
+ Add `provideCaribeNG()` to your `app.config.ts` providers. All options are optional:
162
164
 
163
165
  ```ts
164
166
  import { ApplicationConfig } from '@angular/core';
@@ -167,18 +169,18 @@ import { provideCaribeNG } from '@caribeng/ui';
167
169
  export const appConfig: ApplicationConfig = {
168
170
  providers: [
169
171
  provideCaribeNG({
170
- theme: 'system', // 'light' (por defecto) | 'dark' | 'system'
172
+ theme: 'system', // 'light' (default) | 'dark' | 'system'
171
173
  preset: 'emerald', // 'emerald' | 'ocean' | 'coral' | 'amber' | 'violet' | 'rose'
172
- persistTheme: true, // recuerda la elección del usuario
174
+ persistTheme: true, // remembers the user's choice
173
175
  requiredIndicator: 'none', // 'asterisk' | 'text' | 'optional' | 'none'
174
176
  }),
175
177
  ],
176
178
  };
177
179
  ```
178
180
 
179
- ### 2. Estilos
181
+ ### 2. Styles
180
182
 
181
- Agrega la hoja de estilos (tokens `--cb-*`, tema y utilidades) en `angular.json`:
183
+ Add the stylesheet (`--cb-*` tokens, theme and utilities) in `angular.json`:
182
184
 
183
185
  ```diff
184
186
  "styles": [
@@ -187,16 +189,16 @@ Agrega la hoja de estilos (tokens `--cb-*`, tema y utilidades) en `angular.json`
187
189
  ]
188
190
  ```
189
191
 
190
- o impórtala desde tu hoja global:
192
+ or import it from your global stylesheet:
191
193
 
192
194
  ```css
193
195
  /* src/styles.css */
194
196
  @import '@caribeng/ui/styles.css';
195
197
  ```
196
198
 
197
- ### 3. Verifica la instalación
199
+ ### 3. Verify the installation
198
200
 
199
- Importa los componentes que vayas a usar desde su entry point. La ruta de importación de cada uno aparece en su página de documentación.
201
+ Import the components you use from their entry point. Each component's import path appears on its documentation page.
200
202
 
201
203
  ```ts
202
204
  import { Component, signal } from '@angular/core';
@@ -207,41 +209,41 @@ import { CbInput } from '@caribeng/ui/input';
207
209
  selector: 'app-root',
208
210
  imports: [CbButton, CbInput],
209
211
  template: `
210
- <cb-input label="Correo" type="email" [(value)]="email" />
211
- <cb-button (click)="enviar()">Continuar</cb-button>
212
+ <cb-input label="Email" type="email" [(value)]="email" />
213
+ <cb-button (click)="send()">Continue</cb-button>
212
214
  `,
213
215
  })
214
216
  export class App {
215
217
  readonly email = signal('');
216
218
 
217
- enviar(): void {
219
+ send(): void {
218
220
  console.log(this.email());
219
221
  }
220
222
  }
221
223
  ```
222
224
 
223
- Si ves el campo y el botón con estilo, CaribeNG está listo.
225
+ If you see the field and the button styled, CaribeNG is ready.
224
226
 
225
- ### Formularios
227
+ ### Forms
226
228
 
227
- Todos los controles funcionan con Reactive Forms y con formularios por plantilla. El error se muestra solo cuando el control es inválido y el usuario lo tocó; el mensaje es opcional:
229
+ Every control works with Reactive Forms and template-driven forms. The error shows only when the control is invalid and the user touched it; the message is optional:
228
230
 
229
231
  ```html
230
- <cb-input label="Correo" formControlName="email" error="Ingresa un correo válido" />
232
+ <cb-input label="Email" formControlName="email" error="Enter a valid email" />
231
233
  ```
232
234
 
233
- ## 🌐 Idioma (i18n)
235
+ ## 🌐 Language (i18n)
234
236
 
235
- Los textos de interfaz de los componentes (etiquetas accesibles, botones, placeholders y mensajes) vienen en **español** (por defecto) e **inglés**:
237
+ The components' UI texts (accessible labels, buttons, placeholders and messages) come in **English** (default) and **Spanish**:
236
238
 
237
239
  ```ts
238
240
  provideCaribeNG({
239
- locale: 'en', // 'es' | 'en' | objeto CbTranslation propio
240
- translation: { noResults: 'Nothing here yet' }, // sobrescribe textos sueltos
241
+ locale: 'en', // 'es' | 'en' | your own CbTranslation object
242
+ translation: { noResults: 'Nothing here yet' }, // overrides individual texts
241
243
  });
242
244
  ```
243
245
 
244
- Cambio en caliente, sin recargar:
246
+ Switch at runtime, without reloading:
245
247
 
246
248
  ```ts
247
249
  import { inject } from '@angular/core';
@@ -250,9 +252,9 @@ import { CbLocaleService } from '@caribeng/ui';
250
252
  inject(CbLocaleService).use('en');
251
253
  ```
252
254
 
253
- Un texto pasado por input (por ejemplo `placeholder` o `emptyMessage`) siempre tiene prioridad sobre el idioma.
255
+ A text passed as an input (for example `placeholder` or `emptyMessage`) always takes priority over the language.
254
256
 
255
- ## 🎨 Tema claro/oscuro y presets
257
+ ## 🎨 Light/dark theme and presets
256
258
 
257
259
  ```ts
258
260
  import { inject } from '@angular/core';
@@ -261,25 +263,25 @@ import { CbThemeService } from '@caribeng/ui';
261
263
  export class Header {
262
264
  private readonly theme = inject(CbThemeService);
263
265
 
264
- alternarTema(): void {
266
+ toggleTheme(): void {
265
267
  this.theme.toggle(); // 'light' <-> 'dark'
266
268
  }
267
269
 
268
- usarOceano(): void {
270
+ useOcean(): void {
269
271
  this.theme.setPreset('ocean');
270
272
  }
271
273
  }
272
274
  ```
273
275
 
274
- ## 🔣 Iconos
276
+ ## 🔣 Icons
275
277
 
276
- Los 363 iconos núcleo se registran solos:
278
+ The 363 core icons register themselves:
277
279
 
278
280
  ```html
279
281
  <cb-icon name="house" [size]="20" />
280
282
  ```
281
283
 
282
- Para usar otros del catálogo completo (1891 iconos derivados de Lucide), regístralos en los providers; solo se empaquetan los que importas:
284
+ To use others from the full catalog (1891 icons derived from Lucide), register them in the providers; only the ones you import are bundled:
283
285
 
284
286
  ```ts
285
287
  import { provideCbIcons } from '@caribeng/ui/icon';
@@ -288,7 +290,7 @@ import { heartPulse, rocket } from '@caribeng/ui/icons';
288
290
  providers: [provideCbIcons({ 'heart-pulse': heartPulse, rocket })];
289
291
  ```
290
292
 
291
- ## 📚 Catálogo
293
+ ## 📚 Catalog
292
294
 
293
295
  - **Form:** `autocomplete`, `button`, `button-group`, `cascadeselect`, `checkbox`, `chips`, `colorpicker`, `datepicker`, `editor`, `fab-menu`, `fileupload`, `floatlabel`, `icon-button`, `iconfield`, `input`, `input-number`, `input-search`, `input-token`, `inputgroup`, `inputmask`, `inputotp`, `keyfilter`, `knob`, `listbox`, `mentions`, `multiselect`, `password`, `phone-input`, `radio`, `rating`, `repeater`, `select`, `selectbutton`, `slider`, `tag-button`, `textarea`, `toggle`, `togglebutton`, `treeselect`.
294
296
  - **Data:** `dataview`, `descriptions`, `kanban`, `orderlist`, `organizationchart`, `paginator`, `picklist`, `statistic`, `table`, `timeline`, `tracker`, `tree`, `treetable`, `virtualscroller`.
@@ -297,15 +299,15 @@ providers: [provideCbIcons({ 'heart-pulse': heartPulse, rocket })];
297
299
  - **Menu:** `anchor`, `breadcrumb`, `contextmenu`, `dock`, `float-menu`, `megamenu`, `menu`, `menubar`, `panelmenu`, `sidebar`, `speeddial`, `splitbutton`, `steps`, `tabmenu`, `tieredmenu`.
298
300
  - **Panel:** `accordion`, `card`, `card-content`, `card-move`, `card-primary`, `card-select`, `divider`, `expansion-panel`, `fieldset`, `footer`, `header`, `panel`, `scrollpanel`, `scrolltop`, `splitter`, `stepper`, `tabs`, `toolbar`.
299
301
  - **Media:** `animation-lottie`, `avatar`, `avatargroup`, `carousel`, `galleria`, `illustration`, `image`, `logo`, `pdfviewer`, `qrcode`.
300
- - **Archivos y precios:** `file-card`, `file-download`, `folder-card`, `pricing`.
301
- - **Misc y directivas:** `animateonscroll`, `autofocus`, `blockui`, `chart`, `code-block`, `copy-button`, `dots-indicator`, `focustrap`, `icon`, `icons`, `inplace`, `kbd`, `link`, `metergroup`, `progressbar`, `ripple`, `shortcut`, `skeleton`, `spinner`, `status`, `step-indicator`, `styleclass`, `terminal`, `themetoggle`.
302
+ - **Files and pricing:** `file-card`, `file-download`, `folder-card`, `pricing`.
303
+ - **Misc and directives:** `animateonscroll`, `autofocus`, `blockui`, `chart`, `code-block`, `copy-button`, `dots-indicator`, `focustrap`, `icon`, `icons`, `inplace`, `kbd`, `link`, `metergroup`, `progressbar`, `ripple`, `shortcut`, `skeleton`, `spinner`, `status`, `step-indicator`, `styleclass`, `terminal`, `themetoggle`.
302
304
 
303
- ## 🧭 Próximos pasos
305
+ ## 🧭 Next steps
304
306
 
305
- - Explora cada componente, con ejemplos en HTML y TypeScript, en el sitio de documentación (showcase).
306
- - Personaliza colores y tokens en la guía de Theming.
307
- - Consulta las novedades de cada versión en la página Changelog del sitio de documentación.
307
+ - Explore every component, with HTML and TypeScript examples, on the documentation site (showcase).
308
+ - Customize colors and tokens in the Theming guide.
309
+ - Check each version's news on the Changelog page of the documentation site.
308
310
 
309
- ## ☀️ Licencia
311
+ ## ☀️ License
310
312
 
311
- MIT © CaribeNG Contributors. Iconos derivados de Lucide (ISC); ver `THIRD-PARTY-NOTICES.md`.
313
+ MIT © CaribeNG Contributors. Icons derived from Lucide (ISC); see `THIRD-PARTY-NOTICES.md`.
@@ -91,7 +91,7 @@ const CB_DEFAULT_CONFIG = {
91
91
  persistTheme: false,
92
92
  storageKey: 'caribeng-theme',
93
93
  requiredIndicator: 'none',
94
- locale: 'es',
94
+ locale: 'en',
95
95
  };
96
96
  /** Token de inyección con la configuración resuelta de CaribeNG. */
97
97
  const CB_CONFIG = new InjectionToken('CB_CONFIG', {
@@ -337,7 +337,7 @@ function cbVisibleItems(items) {
337
337
  return result;
338
338
  }
339
339
 
340
- /** Español (idioma por defecto). */
340
+ /** Español. */
341
341
  const CB_LOCALE_ES = {
342
342
  intlLocale: 'es',
343
343
  close: 'Cerrar',
@@ -2399,8 +2399,8 @@ function injectCbTranslation() {
2399
2399
  }
2400
2400
  function resolve(locale) {
2401
2401
  if (!locale)
2402
- return CB_LOCALES.es;
2403
- return typeof locale === 'string' ? (CB_LOCALES[locale] ?? CB_LOCALES.es) : locale;
2402
+ return CB_LOCALES.en;
2403
+ return typeof locale === 'string' ? (CB_LOCALES[locale] ?? CB_LOCALES.en) : locale;
2404
2404
  }
2405
2405
 
2406
2406
  /** Control vacío con el que se evalúa si los validadores incluyen `required`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caribeng/ui",
3
- "version": "22.5.0",
3
+ "version": "22.6.0",
4
4
  "description": "CaribeNG — sistema de diseño y librería de componentes para Angular 22+ (standalone, signals, OnPush, zoneless). 162 entry points tree-shakeables, accesibles (WCAG 2.2 AA) y tematizables.",
5
5
  "keywords": [
6
6
  "angular",
@@ -1218,7 +1218,7 @@ interface CbTranslation {
1218
1218
  flowReadonlyHint: string;
1219
1219
  flowEdgeHint: string;
1220
1220
  }
1221
- /** Español (idioma por defecto). */
1221
+ /** Español. */
1222
1222
  declare const CB_LOCALE_ES: CbTranslation;
1223
1223
  /** Inglés. */
1224
1224
  declare const CB_LOCALE_EN: CbTranslation;
@@ -1269,7 +1269,7 @@ interface CaribeNgConfig {
1269
1269
  optionalText?: string;
1270
1270
  /**
1271
1271
  * Idioma de los textos de interfaz (etiquetas accesibles, botones, mensajes
1272
- * por defecto): `'es'` (por defecto), `'en'` o un objeto `CbTranslation` propio.
1272
+ * por defecto): `'en'` (por defecto), `'es'` o un objeto `CbTranslation` propio.
1273
1273
  */
1274
1274
  locale?: CbLocaleCode | CbTranslation;
1275
1275
  /** Textos sueltos que sobrescriben los del idioma, p. ej. `{ close: 'Salir' }`. */