@caribeng/ui 22.4.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.
Files changed (186) hide show
  1. package/README.md +313 -313
  2. package/fesm2022/caribeng-ui-account-picker.mjs +533 -0
  3. package/fesm2022/caribeng-ui-aging.mjs +488 -0
  4. package/fesm2022/{caribeng-ui-caribe-alert.mjs → caribeng-ui-alert.mjs} +45 -45
  5. package/fesm2022/caribeng-ui-amount.mjs +249 -0
  6. package/fesm2022/caribeng-ui-anchor.mjs +2 -2
  7. package/fesm2022/{caribeng-ui-caribe-animation-lottie.mjs → caribeng-ui-animation-lottie.mjs} +41 -41
  8. package/fesm2022/caribeng-ui-audit-log.mjs +323 -0
  9. package/fesm2022/caribeng-ui-avatar.mjs +2 -2
  10. package/fesm2022/caribeng-ui-breadcrumb.mjs +13 -3
  11. package/fesm2022/{caribeng-ui-caribe-button-group.mjs → caribeng-ui-button-group.mjs} +15 -15
  12. package/fesm2022/caribeng-ui-button.mjs +2 -2
  13. package/fesm2022/{caribeng-ui-caribe-card-content.mjs → caribeng-ui-card-content.mjs} +39 -39
  14. package/fesm2022/{caribeng-ui-caribe-card-move.mjs → caribeng-ui-card-move.mjs} +65 -65
  15. package/fesm2022/{caribeng-ui-caribe-card-primary.mjs → caribeng-ui-card-primary.mjs} +31 -31
  16. package/fesm2022/{caribeng-ui-caribe-card-select.mjs → caribeng-ui-card-select.mjs} +67 -67
  17. package/fesm2022/caribeng-ui-carousel.mjs +2 -2
  18. package/fesm2022/caribeng-ui-cascadeselect.mjs +45 -9
  19. package/fesm2022/caribeng-ui-chat.mjs +2 -2
  20. package/fesm2022/{caribeng-ui-caribe-coachmark.mjs → caribeng-ui-coachmark.mjs} +85 -85
  21. package/fesm2022/caribeng-ui-command-palette.mjs +2 -2
  22. package/fesm2022/caribeng-ui-comments.mjs +864 -0
  23. package/fesm2022/caribeng-ui-datagrid.mjs +1635 -0
  24. package/fesm2022/caribeng-ui-dataview.mjs +2 -2
  25. package/fesm2022/caribeng-ui-datepicker.mjs +2 -2
  26. package/fesm2022/caribeng-ui-document.mjs +495 -0
  27. package/fesm2022/{caribeng-ui-caribe-dots-indicator.mjs → caribeng-ui-dots-indicator.mjs} +41 -41
  28. package/fesm2022/caribeng-ui-dynamic-form.mjs +1581 -0
  29. package/fesm2022/caribeng-ui-editor.mjs +2303 -1311
  30. package/fesm2022/{caribeng-ui-caribe-expansion-panel.mjs → caribeng-ui-expansion-panel.mjs} +39 -39
  31. package/fesm2022/{caribeng-ui-caribe-fab-menu.mjs → caribeng-ui-fab-menu.mjs} +75 -75
  32. package/fesm2022/caribeng-ui-file-card.mjs +2 -2
  33. package/fesm2022/{caribeng-ui-caribe-file-download.mjs → caribeng-ui-file-download.mjs} +63 -63
  34. package/fesm2022/caribeng-ui-financial-report.mjs +380 -0
  35. package/fesm2022/{caribeng-ui-caribe-float-menu.mjs → caribeng-ui-float-menu.mjs} +31 -31
  36. package/fesm2022/caribeng-ui-floatlabel.mjs +2 -2
  37. package/fesm2022/caribeng-ui-flow.mjs +1508 -0
  38. package/fesm2022/{caribeng-ui-caribe-footer.mjs → caribeng-ui-footer.mjs} +19 -19
  39. package/fesm2022/caribeng-ui-gantt.mjs +1094 -0
  40. package/fesm2022/{caribeng-ui-caribe-header.mjs → caribeng-ui-header.mjs} +49 -49
  41. package/fesm2022/{caribeng-ui-caribe-icon-button.mjs → caribeng-ui-icon-button.mjs} +23 -23
  42. package/fesm2022/caribeng-ui-image-cropper.mjs +671 -0
  43. package/fesm2022/caribeng-ui-import-wizard.mjs +746 -0
  44. package/fesm2022/caribeng-ui-infinite-scroll.mjs +226 -0
  45. package/fesm2022/caribeng-ui-input-number.mjs +22 -6
  46. package/fesm2022/{caribeng-ui-caribe-input-search.mjs → caribeng-ui-input-search.mjs} +65 -65
  47. package/fesm2022/{caribeng-ui-caribe-input-token.mjs → caribeng-ui-input-token.mjs} +59 -59
  48. package/fesm2022/caribeng-ui-inputotp.mjs +2 -2
  49. package/fesm2022/caribeng-ui-journal-entry.mjs +340 -0
  50. package/fesm2022/caribeng-ui-kanban.mjs +6 -6
  51. package/fesm2022/caribeng-ui-kpi.mjs +189 -0
  52. package/fesm2022/{caribeng-ui-caribe-link.mjs → caribeng-ui-link.mjs} +37 -37
  53. package/fesm2022/caribeng-ui-masonry.mjs +93 -0
  54. package/fesm2022/caribeng-ui-media-player.mjs +821 -0
  55. package/fesm2022/caribeng-ui-mentions.mjs +2 -2
  56. package/fesm2022/caribeng-ui-notification-center.mjs +636 -0
  57. package/fesm2022/{caribeng-ui-caribe-off-canvas.mjs → caribeng-ui-off-canvas.mjs} +55 -55
  58. package/fesm2022/{caribeng-ui-caribe-onboarding.mjs → caribeng-ui-onboarding.mjs} +105 -105
  59. package/fesm2022/caribeng-ui-orderlist.mjs +2 -2
  60. package/fesm2022/caribeng-ui-pdfviewer.mjs +1755 -25
  61. package/fesm2022/caribeng-ui-period-picker.mjs +637 -0
  62. package/fesm2022/caribeng-ui-phone-input.mjs +2 -2
  63. package/fesm2022/caribeng-ui-picklist.mjs +2 -2
  64. package/fesm2022/caribeng-ui-pivot.mjs +419 -0
  65. package/fesm2022/caribeng-ui-pricing.mjs +2 -2
  66. package/fesm2022/caribeng-ui-rating.mjs +14 -17
  67. package/fesm2022/caribeng-ui-reconciliation.mjs +386 -0
  68. package/fesm2022/caribeng-ui-scheduler.mjs +1027 -0
  69. package/fesm2022/caribeng-ui-select.mjs +2 -2
  70. package/fesm2022/{caribeng-ui-caribe-shortcut.mjs → caribeng-ui-shortcut.mjs} +29 -29
  71. package/fesm2022/caribeng-ui-sidebar.mjs +2 -2
  72. package/fesm2022/caribeng-ui-signature-pad.mjs +654 -0
  73. package/fesm2022/{caribeng-ui-caribe-status.mjs → caribeng-ui-status.mjs} +11 -11
  74. package/fesm2022/{caribeng-ui-caribe-step-indicator.mjs → caribeng-ui-step-indicator.mjs} +53 -53
  75. package/fesm2022/caribeng-ui-stepper.mjs +2 -2
  76. package/fesm2022/caribeng-ui-steps.mjs +2 -2
  77. package/fesm2022/caribeng-ui-table.mjs +323 -15
  78. package/fesm2022/caribeng-ui-tabmenu.mjs +2 -2
  79. package/fesm2022/caribeng-ui-tabs.mjs +2 -2
  80. package/fesm2022/{caribeng-ui-caribe-tag-button.mjs → caribeng-ui-tag-button.mjs} +25 -25
  81. package/fesm2022/caribeng-ui-tag.mjs +2 -2
  82. package/fesm2022/caribeng-ui-tieredmenu.mjs +6 -6
  83. package/fesm2022/{caribeng-ui-caribe-tracker.mjs → caribeng-ui-tracker.mjs} +29 -29
  84. package/fesm2022/{caribeng-ui-caribe-transaction-status.mjs → caribeng-ui-transaction-status.mjs} +11 -11
  85. package/fesm2022/caribeng-ui-treeselect.mjs +44 -9
  86. package/fesm2022/caribeng-ui-treetable.mjs +236 -17
  87. package/fesm2022/{caribeng-ui-caribe-voucher.mjs → caribeng-ui-voucher.mjs} +45 -45
  88. package/fesm2022/caribeng-ui-xlsx.mjs +486 -0
  89. package/fesm2022/caribeng-ui.mjs +1185 -5
  90. package/package.json +217 -177
  91. package/types/caribeng-ui-account-picker.d.ts +142 -0
  92. package/types/caribeng-ui-aging.d.ts +123 -0
  93. package/types/{caribeng-ui-caribe-alert.d.ts → caribeng-ui-alert.d.ts} +2 -2
  94. package/types/caribeng-ui-amount.d.ts +82 -0
  95. package/types/{caribeng-ui-caribe-animation-lottie.d.ts → caribeng-ui-animation-lottie.d.ts} +2 -2
  96. package/types/caribeng-ui-audit-log.d.ts +86 -0
  97. package/types/caribeng-ui-breadcrumb.d.ts +2 -2
  98. package/types/{caribeng-ui-caribe-button-group.d.ts → caribeng-ui-button-group.d.ts} +2 -2
  99. package/types/{caribeng-ui-caribe-card-content.d.ts → caribeng-ui-card-content.d.ts} +2 -2
  100. package/types/{caribeng-ui-caribe-card-move.d.ts → caribeng-ui-card-move.d.ts} +1 -1
  101. package/types/{caribeng-ui-caribe-card-primary.d.ts → caribeng-ui-card-primary.d.ts} +2 -2
  102. package/types/{caribeng-ui-caribe-card-select.d.ts → caribeng-ui-card-select.d.ts} +2 -2
  103. package/types/caribeng-ui-cascadeselect.d.ts +6 -0
  104. package/types/{caribeng-ui-caribe-coachmark.d.ts → caribeng-ui-coachmark.d.ts} +2 -2
  105. package/types/caribeng-ui-comments.d.ts +214 -0
  106. package/types/caribeng-ui-datagrid.d.ts +269 -0
  107. package/types/caribeng-ui-document.d.ts +138 -0
  108. package/types/{caribeng-ui-caribe-dots-indicator.d.ts → caribeng-ui-dots-indicator.d.ts} +2 -2
  109. package/types/caribeng-ui-dynamic-form.d.ts +409 -0
  110. package/types/caribeng-ui-editor.d.ts +110 -12
  111. package/types/{caribeng-ui-caribe-expansion-panel.d.ts → caribeng-ui-expansion-panel.d.ts} +1 -1
  112. package/types/{caribeng-ui-caribe-fab-menu.d.ts → caribeng-ui-fab-menu.d.ts} +2 -2
  113. package/types/{caribeng-ui-caribe-file-download.d.ts → caribeng-ui-file-download.d.ts} +1 -1
  114. package/types/caribeng-ui-financial-report.d.ts +102 -0
  115. package/types/{caribeng-ui-caribe-float-menu.d.ts → caribeng-ui-float-menu.d.ts} +2 -2
  116. package/types/caribeng-ui-flow.d.ts +228 -0
  117. package/types/{caribeng-ui-caribe-footer.d.ts → caribeng-ui-footer.d.ts} +2 -2
  118. package/types/caribeng-ui-gantt.d.ts +244 -0
  119. package/types/{caribeng-ui-caribe-header.d.ts → caribeng-ui-header.d.ts} +2 -2
  120. package/types/{caribeng-ui-caribe-icon-button.d.ts → caribeng-ui-icon-button.d.ts} +2 -2
  121. package/types/{caribeng-ui-caribe-illustration.d.ts → caribeng-ui-illustration.d.ts} +1 -1
  122. package/types/caribeng-ui-image-cropper.d.ts +169 -0
  123. package/types/caribeng-ui-import-wizard.d.ts +149 -0
  124. package/types/caribeng-ui-infinite-scroll.d.ts +75 -0
  125. package/types/caribeng-ui-input-number.d.ts +1 -1
  126. package/types/{caribeng-ui-caribe-input-search.d.ts → caribeng-ui-input-search.d.ts} +2 -2
  127. package/types/{caribeng-ui-caribe-input-token.d.ts → caribeng-ui-input-token.d.ts} +2 -2
  128. package/types/caribeng-ui-journal-entry.d.ts +110 -0
  129. package/types/caribeng-ui-kpi.d.ts +64 -0
  130. package/types/{caribeng-ui-caribe-link.d.ts → caribeng-ui-link.d.ts} +2 -2
  131. package/types/{caribeng-ui-caribe-logo.d.ts → caribeng-ui-logo.d.ts} +1 -1
  132. package/types/caribeng-ui-masonry.d.ts +32 -0
  133. package/types/caribeng-ui-media-player.d.ts +140 -0
  134. package/types/caribeng-ui-notification-center.d.ts +153 -0
  135. package/types/{caribeng-ui-caribe-off-canvas.d.ts → caribeng-ui-off-canvas.d.ts} +2 -2
  136. package/types/{caribeng-ui-caribe-onboarding.d.ts → caribeng-ui-onboarding.d.ts} +2 -2
  137. package/types/caribeng-ui-pdfviewer.d.ts +245 -5
  138. package/types/caribeng-ui-period-picker.d.ts +148 -0
  139. package/types/caribeng-ui-pivot.d.ts +116 -0
  140. package/types/caribeng-ui-reconciliation.d.ts +109 -0
  141. package/types/caribeng-ui-scheduler.d.ts +188 -0
  142. package/types/{caribeng-ui-caribe-shortcut.d.ts → caribeng-ui-shortcut.d.ts} +2 -2
  143. package/types/caribeng-ui-signature-pad.d.ts +151 -0
  144. package/types/{caribeng-ui-caribe-status.d.ts → caribeng-ui-status.d.ts} +2 -2
  145. package/types/{caribeng-ui-caribe-step-indicator.d.ts → caribeng-ui-step-indicator.d.ts} +2 -2
  146. package/types/caribeng-ui-table.d.ts +66 -2
  147. package/types/{caribeng-ui-caribe-tag-button.d.ts → caribeng-ui-tag-button.d.ts} +2 -2
  148. package/types/{caribeng-ui-caribe-tracker.d.ts → caribeng-ui-tracker.d.ts} +2 -2
  149. package/types/{caribeng-ui-caribe-transaction-status.d.ts → caribeng-ui-transaction-status.d.ts} +2 -2
  150. package/types/caribeng-ui-treeselect.d.ts +6 -0
  151. package/types/caribeng-ui-treetable.d.ts +67 -2
  152. package/types/{caribeng-ui-caribe-voucher.d.ts → caribeng-ui-voucher.d.ts} +2 -2
  153. package/types/caribeng-ui-xlsx.d.ts +79 -0
  154. package/types/caribeng-ui.d.ts +713 -4
  155. package/fesm2022/caribeng-ui-caribe-calendar.mjs +0 -92
  156. package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +0 -130
  157. package/fesm2022/caribeng-ui-caribe-data-table.mjs +0 -94
  158. package/fesm2022/caribeng-ui-caribe-file-select.mjs +0 -88
  159. package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +0 -100
  160. package/fesm2022/caribeng-ui-caribe-input-date.mjs +0 -138
  161. package/fesm2022/caribeng-ui-caribe-input-select.mjs +0 -154
  162. package/fesm2022/caribeng-ui-caribe-loader.mjs +0 -48
  163. package/fesm2022/caribeng-ui-caribe-modal.mjs +0 -119
  164. package/fesm2022/caribeng-ui-caribe-pictogram.mjs +0 -52
  165. package/fesm2022/caribeng-ui-caribe-pop-over.mjs +0 -104
  166. package/fesm2022/caribeng-ui-caribe-preloader.mjs +0 -57
  167. package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +0 -84
  168. package/fesm2022/caribeng-ui-caribe-stroke.mjs +0 -69
  169. package/fesm2022/caribeng-ui-caribe-switch.mjs +0 -182
  170. package/types/caribeng-ui-caribe-calendar.d.ts +0 -27
  171. package/types/caribeng-ui-caribe-circle-loading.d.ts +0 -28
  172. package/types/caribeng-ui-caribe-data-table.d.ts +0 -26
  173. package/types/caribeng-ui-caribe-file-select.d.ts +0 -31
  174. package/types/caribeng-ui-caribe-inline-alert.d.ts +0 -28
  175. package/types/caribeng-ui-caribe-input-date.d.ts +0 -40
  176. package/types/caribeng-ui-caribe-input-select.d.ts +0 -47
  177. package/types/caribeng-ui-caribe-loader.d.ts +0 -22
  178. package/types/caribeng-ui-caribe-modal.d.ts +0 -21
  179. package/types/caribeng-ui-caribe-pictogram.d.ts +0 -15
  180. package/types/caribeng-ui-caribe-pop-over.d.ts +0 -17
  181. package/types/caribeng-ui-caribe-preloader.d.ts +0 -24
  182. package/types/caribeng-ui-caribe-progress-bar.d.ts +0 -28
  183. package/types/caribeng-ui-caribe-stroke.d.ts +0 -17
  184. package/types/caribeng-ui-caribe-switch.d.ts +0 -55
  185. /package/fesm2022/{caribeng-ui-caribe-illustration.mjs → caribeng-ui-illustration.mjs} +0 -0
  186. /package/fesm2022/{caribeng-ui-caribe-logo.mjs → caribeng-ui-logo.mjs} +0 -0
package/README.md CHANGED
@@ -1,313 +1,313 @@
1
- <h1 align="center">CaribeNG</h1>
2
-
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.
6
- </p>
7
-
8
- <p align="center">
9
- <img alt="Angular 22" src="https://img.shields.io/badge/Angular-22-dd0031.svg?style=flat-square" />
10
- <img alt="Entry points" src="https://img.shields.io/badge/entry%20points-162-10b981.svg?style=flat-square" />
11
- <img alt="Licencia MIT" src="https://img.shields.io/badge/licencia-MIT-blue.svg?style=flat-square" />
12
- </p>
13
-
14
- ---
15
-
16
- ## ✨ Características
17
-
18
- - **162 componentes y directivas** standalone, cada uno en su propio entry point (`@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
- - **Caribe Design:** 45 componentes adicionales del sistema Caribe (`@caribeng/ui/caribe/*`).
24
- - **Iconos incluidos:** 363 iconos núcleo listos para usar y un catálogo opcional de 1891 iconos.
25
- - **Migración desde PrimeNG:** un schematic traduce imports, plantillas e iconos y deja un informe con lo pendiente ([ver más](#migrar-desde-primeng)).
26
-
27
- ## 🖥 Compatibilidad
28
-
29
- 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
-
31
- | CaribeNG | Angular | Estado |
32
- | --- | --- | --- |
33
- | `22.x` | `^22.0.0` | Activa: nuevas funciones y correcciones |
34
- | `21.x` | `^21.0.0` | Mantenimiento: solo correcciones |
35
-
36
- Navegadores: los mismos que [soporta Angular](https://angular.dev/reference/versions#browser-support).
37
-
38
- ## 📦 Instalación
39
-
40
- ### Requisitos
41
-
42
- - Un proyecto **Angular 22** con `@angular/forms` (lo incluye cualquier proyecto creado con `ng new`).
43
- - `@angular/cdk` se instala automáticamente como dependencia (overlays y accesibilidad).
44
- - npm, yarn o pnpm.
45
-
46
- ### Instalación rápida (recomendada)
47
-
48
- ```bash
49
- ng add @caribeng/ui
50
- ```
51
-
52
- Pregunta el idioma, el tema y el color primario, y deja el proyecto listo:
53
-
54
- - instala `@caribeng/ui` (y `@angular/cdk`),
55
- - registra `provideCaribeNG({ locale, theme, preset })` en `app.config.ts` (o en `AppModule`),
56
- - añade `@caribeng/ui/styles.css` a los estilos de `angular.json`.
57
-
58
- Se puede ejecutar sin preguntas: `ng add @caribeng/ui --locale=en --theme=system --preset=ocean --skip-confirmation`. Volver a ejecutarlo no duplica nada.
59
-
60
- Después, salta al paso [3. Verifica la instalación](#3-verifica-la-instalación).
61
-
62
- ### Instalación manual
63
-
64
- ```bash
65
- # npm
66
- npm install @caribeng/ui
67
-
68
- # yarn
69
- yarn add @caribeng/ui
70
-
71
- # pnpm
72
- pnpm add @caribeng/ui
73
- ```
74
-
75
- ### Migrar desde PrimeNG
76
-
77
- En un proyecto con PrimeNG 18 o superior, instala CaribeNG y ejecuta el migrador:
78
-
79
- ```bash
80
- npm install @caribeng/ui@22
81
- ng generate @caribeng/ui:migrate-from-primeng
82
- ```
83
-
84
- > 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
-
86
- ```html
87
- <!-- Antes -->
88
- <p-button label="Guardar" icon="pi pi-check" [outlined]="true" (onClick)="guardar()" />
89
- <input pInputText id="email" [(ngModel)]="email" />
90
- <p-dialog header="Editar" [(visible)]="abierto" [modal]="true" [style]="{ width: '25rem' }">…</p-dialog>
91
-
92
- <!-- Después -->
93
- <cb-button variant="outlined" (click)="guardar()"><cb-icon name="check" />Guardar</cb-button>
94
- <cb-input inputId="email" [(ngModel)]="email" />
95
- <cb-dialog header="Editar" [(visible)]="abierto" width="25rem">…</cb-dialog>
96
- ```
97
-
98
- Qué hace:
99
-
100
- - cambia los imports de PrimeNG por los de CaribeNG (`ButtonModule` → `CbButton`, `providePrimeNG()` → `provideCaribeNG()`) y añade a cada componente los que usa su plantilla,
101
- - 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>`),
102
- - 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,
103
- - convierte los iconos `pi pi-*` en `<cb-icon>` y registra con `provideCbIcons` los que no están en el set núcleo,
104
- - quita PrimeIcons de `angular.json` y de las hojas de estilo, y añade `@caribeng/ui/styles.css`,
105
- - quita `primeng`, `primeicons` y `@primeuix/*` de `package.json` **solo cuando ya no queda ninguna referencia**; mientras tanto las dos librerías conviven.
106
-
107
- 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
-
109
- ```html
110
- <!-- TODO(caribeng): [rounded]="true" — cb-button no tiene variante redondeada; usa una clase propia o <cb-icon-button>. -->
111
- <cb-button severity="danger">Borrar</cb-button>
112
- ```
113
-
114
- 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
-
116
- **Componentes que traduce hoy:**
117
-
118
- | PrimeNG | CaribeNG |
119
- |---|---|
120
- | `<p-button>`, `<button pButton>` | `<cb-button>` |
121
- | `<input pInputText>` | `<cb-input>` |
122
- | `<textarea pTextarea>`, `<textarea pInputTextarea>` | `<cb-textarea>` |
123
- | `<p-inputnumber>` | `<cb-input-number>` |
124
- | `<p-select>`, `<p-dropdown>` | `<cb-select>` |
125
- | `<p-multiselect>` | `<cb-multiselect>` |
126
- | `<p-toggleswitch>`, `<p-inputSwitch>` | `<cb-toggle>` |
127
- | `<p-datepicker>`, `<p-calendar>` | `<cb-datepicker>` |
128
- | `<p-dialog>` | `<cb-dialog>` |
129
- | `<p-confirmdialog>` + `ConfirmationService` | `<cb-confirm-dialog service>` + `CbConfirmationService` |
130
- | `<p-confirmpopup>` | `<cb-confirm-popup service>` |
131
- | `<p-menu>`, `<p-menubar>`, `<p-tieredmenu>`, `<p-panelmenu>`, `<p-breadcrumb>`, `<p-tabmenu>` | `<cb-menu>`, `<cb-menubar>`, `<cb-tieredmenu>`, `<cb-panelmenu>`, `<cb-breadcrumb>`, `<cb-tabmenu>` |
132
- | `MenuItem[]` (`icon`, `command`, `routerLink`…) | el tipo de item del menú que lo recibe (`CbMenubarItem[]`…) |
133
- | `<p-splitbutton>` | `<cb-split-button>` |
134
- | `<p-table>` (columnas escritas en `#header`/`#body` o dinámicas con `@for`) | `<cb-table [columns]>` + un `cbTableCell` por celda personalizada |
135
- | `<p-tabs>` (y `<p-tabView>`) | `<cb-tabs>` + `<cb-tab label="…">` |
136
- | `<p-accordion>` (y `<p-accordionTab>`) | `<cb-accordion>` + `<cb-accordion-panel header="…">` |
137
- | `<p-tag>` | `<cb-tag>` |
138
- | `<p-toast>` + `MessageService` | `<cb-toast>` + `CbToastService` |
139
- | `<p-card>` | `<cb-card>` |
140
- | `pTooltip` (en cualquier elemento) | `cbTooltip` |
141
- | `<p-checkbox>` | `<cb-checkbox>` |
142
- | `<i class="pi pi-*">` | `<cb-icon>` |
143
-
144
- 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
-
146
- 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
-
148
- | Opción | Uso |
149
- |---|---|
150
- | `--path=src/app/ventas` | Migrar solo una carpeta (migración por partes). |
151
- | `--remove-primeng=false` | No tocar las dependencias de `package.json`. |
152
- | `--report=false` | No escribir el informe. |
153
- | `--skip-install` | No instalar dependencias al terminar. |
154
- | `--force` | Migrar aunque falte `@caribeng/ui` o la versión de PrimeNG sea anterior a la 18. |
155
-
156
- ## 🔨 Uso
157
-
158
- > Con `ng add @caribeng/ui` los pasos 1 y 2 ya están hechos.
159
-
160
- ### 1. Proveedor
161
-
162
- Añade `provideCaribeNG()` a los providers de tu `app.config.ts`. Todas las opciones son opcionales:
163
-
164
- ```ts
165
- import { ApplicationConfig } from '@angular/core';
166
- import { provideCaribeNG } from '@caribeng/ui';
167
-
168
- export const appConfig: ApplicationConfig = {
169
- providers: [
170
- provideCaribeNG({
171
- theme: 'system', // 'light' (por defecto) | 'dark' | 'system'
172
- preset: 'emerald', // 'emerald' | 'ocean' | 'coral' | 'amber' | 'violet' | 'rose'
173
- persistTheme: true, // recuerda la elección del usuario
174
- requiredIndicator: 'none', // 'asterisk' | 'text' | 'optional' | 'none'
175
- }),
176
- ],
177
- };
178
- ```
179
-
180
- ### 2. Estilos
181
-
182
- Agrega la hoja de estilos (tokens `--cb-*`, tema y utilidades) en `angular.json`:
183
-
184
- ```diff
185
- "styles": [
186
- + "node_modules/@caribeng/ui/styles/caribeng.css",
187
- "src/styles.css"
188
- ]
189
- ```
190
-
191
- o impórtala desde tu hoja global:
192
-
193
- ```css
194
- /* src/styles.css */
195
- @import '@caribeng/ui/styles.css';
196
- ```
197
-
198
- ### 3. Verifica la instalación
199
-
200
- 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
-
202
- ```ts
203
- import { Component, signal } from '@angular/core';
204
- import { CbButton } from '@caribeng/ui/button';
205
- import { CbInput } from '@caribeng/ui/input';
206
-
207
- @Component({
208
- selector: 'app-root',
209
- imports: [CbButton, CbInput],
210
- template: `
211
- <cb-input label="Correo" type="email" [(value)]="email" />
212
- <cb-button (click)="enviar()">Continuar</cb-button>
213
- `,
214
- })
215
- export class App {
216
- readonly email = signal('');
217
-
218
- enviar(): void {
219
- console.log(this.email());
220
- }
221
- }
222
- ```
223
-
224
- Si ves el campo y el botón con estilo, CaribeNG está listo.
225
-
226
- ### Formularios
227
-
228
- 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
-
230
- ```html
231
- <cb-input label="Correo" formControlName="email" error="Ingresa un correo válido" />
232
- ```
233
-
234
- ## 🌐 Idioma (i18n)
235
-
236
- Los textos de interfaz de los componentes (etiquetas accesibles, botones, placeholders y mensajes) vienen en **español** (por defecto) e **inglés**:
237
-
238
- ```ts
239
- provideCaribeNG({
240
- locale: 'en', // 'es' | 'en' | objeto CbTranslation propio
241
- translation: { noResults: 'Nothing here yet' }, // sobrescribe textos sueltos
242
- });
243
- ```
244
-
245
- Cambio en caliente, sin recargar:
246
-
247
- ```ts
248
- import { inject } from '@angular/core';
249
- import { CbLocaleService } from '@caribeng/ui';
250
-
251
- inject(CbLocaleService).use('en');
252
- ```
253
-
254
- Un texto pasado por input (por ejemplo `placeholder` o `emptyMessage`) siempre tiene prioridad sobre el idioma.
255
-
256
- ## 🎨 Tema claro/oscuro y presets
257
-
258
- ```ts
259
- import { inject } from '@angular/core';
260
- import { CbThemeService } from '@caribeng/ui';
261
-
262
- export class Header {
263
- private readonly theme = inject(CbThemeService);
264
-
265
- alternarTema(): void {
266
- this.theme.toggle(); // 'light' <-> 'dark'
267
- }
268
-
269
- usarOceano(): void {
270
- this.theme.setPreset('ocean');
271
- }
272
- }
273
- ```
274
-
275
- ## 🔣 Iconos
276
-
277
- Los 363 iconos núcleo se registran solos:
278
-
279
- ```html
280
- <cb-icon name="house" [size]="20" />
281
- ```
282
-
283
- Para usar otros del catálogo completo (1891 iconos derivados de Lucide), regístralos en los providers; solo se empaquetan los que importas:
284
-
285
- ```ts
286
- import { provideCbIcons } from '@caribeng/ui/icon';
287
- import { heartPulse, rocket } from '@caribeng/ui/icons';
288
-
289
- providers: [provideCbIcons({ 'heart-pulse': heartPulse, rocket })];
290
- ```
291
-
292
- ## 📚 Catálogo
293
-
294
- - **Form:** `autocomplete`, `button`, `cascadeselect`, `checkbox`, `chips`, `colorpicker`, `datepicker`, `editor`, `fileupload`, `floatlabel`, `iconfield`, `input`, `input-number`, `inputgroup`, `inputmask`, `inputotp`, `keyfilter`, `knob`, `listbox`, `mentions`, `multiselect`, `password`, `phone-input`, `radio`, `rating`, `repeater`, `select`, `selectbutton`, `slider`, `textarea`, `toggle`, `togglebutton`, `treeselect`.
295
- - **Data:** `dataview`, `descriptions`, `kanban`, `orderlist`, `organizationchart`, `paginator`, `picklist`, `statistic`, `table`, `timeline`, `tree`, `treetable`, `virtualscroller`.
296
- - **Overlay:** `command-palette`, `confirmdialog`, `confirmpopup`, `dialog`, `drawer`, `dynamicdialog`, `popover`, `tooltip`.
297
- - **Messages:** `badge`, `chat`, `chip`, `empty`, `inlinemessage`, `message`, `result`, `tag`, `toast`.
298
- - **Menu:** `anchor`, `breadcrumb`, `contextmenu`, `dock`, `megamenu`, `menu`, `menubar`, `panelmenu`, `sidebar`, `speeddial`, `splitbutton`, `steps`, `tabmenu`, `tieredmenu`.
299
- - **Panel:** `accordion`, `card`, `divider`, `fieldset`, `panel`, `scrollpanel`, `scrolltop`, `splitter`, `stepper`, `tabs`, `toolbar`.
300
- - **Media:** `avatar`, `avatargroup`, `carousel`, `galleria`, `image`, `pdfviewer`, `qrcode`.
301
- - **Archivos y precios:** `file-card`, `folder-card`, `pricing`.
302
- - **Misc y directivas:** `animateonscroll`, `autofocus`, `blockui`, `chart`, `code-block`, `copy-button`, `focustrap`, `icon`, `icons`, `inplace`, `kbd`, `metergroup`, `progressbar`, `ripple`, `skeleton`, `spinner`, `styleclass`, `terminal`, `themetoggle`.
303
- - **Caribe Design (`@caribeng/ui/caribe/*`):** `alert`, `animation-lottie`, `button-group`, `calendar`, `card-content`, `card-move`, `card-primary`, `card-select`, `circle-loading`, `coachmark`, `data-table`, `dots-indicator`, `expansion-panel`, `fab-menu`, `file-download`, `file-select`, `float-menu`, `footer`, `header`, `icon-button`, `illustration`, `inline-alert`, `input-date`, `input-search`, `input-select`, `input-token`, `link`, `loader`, `logo`, `modal`, `off-canvas`, `onboarding`, `pictogram`, `pop-over`, `preloader`, `progress-bar`, `shortcut`, `status`, `step-indicator`, `stroke`, `switch`, `tag-button`, `tracker`, `transaction-status`, `voucher`.
304
-
305
- ## 🧭 Próximos pasos
306
-
307
- - Explora cada componente, con ejemplos en HTML y TypeScript, en el sitio de documentación (showcase).
308
- - Personaliza colores y tokens en la guía de Theming.
309
- - Consulta las novedades de cada versión en la página Changelog del sitio de documentación.
310
-
311
- ## ☀️ Licencia
312
-
313
- MIT © CaribeNG Contributors. Iconos derivados de Lucide (ISC); ver `THIRD-PARTY-NOTICES.md`.
1
+ <h1 align="center">CaribeNG</h1>
2
+
3
+ <p align="center">
4
+ <strong>Design system and component library for Angular.</strong><br />
5
+ Standalone, Signals, OnPush, CSS tokens and WCAG 2.2 AA accessibility.
6
+ </p>
7
+
8
+ <p align="center">
9
+ <img alt="Angular 22" src="https://img.shields.io/badge/Angular-22-dd0031.svg?style=flat-square" />
10
+ <img alt="Entry points" src="https://img.shields.io/badge/entry%20points-173-10b981.svg?style=flat-square" />
11
+ <img alt="MIT license" src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" />
12
+ </p>
13
+
14
+ <p align="center">📖 Documentation: <a href="https://caribeng.devmike.site">caribeng.devmike.site</a></p>
15
+
16
+ ---
17
+
18
+ ## ✨ Features
19
+
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)).
27
+
28
+ ## 🖥 Compatibility
29
+
30
+ CaribeNG's major version matches Angular's, just like Angular Material, PrimeNG and NG-ZORRO. Install the version that corresponds to your project:
31
+
32
+ | CaribeNG | Angular | Status |
33
+ | --- | --- | --- |
34
+ | `22.x` | `^22.0.0` | Active: new features and fixes |
35
+ | `21.x` | `^21.0.0` | Maintenance: fixes only |
36
+
37
+ Browsers: the same ones [Angular supports](https://angular.dev/reference/versions#browser-support).
38
+
39
+ ## 📦 Installation
40
+
41
+ ### Requirements
42
+
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.
46
+
47
+ ### Quick install (recommended)
48
+
49
+ ```bash
50
+ ng add @caribeng/ui
51
+ ```
52
+
53
+ It asks for the language, theme and primary color, and leaves the project ready:
54
+
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.
58
+
59
+ You can run it without prompts: `ng add @caribeng/ui --locale=en --theme=system --preset=ocean --skip-confirmation`. Re-running it duplicates nothing.
60
+
61
+ Then jump to [3. Verify the installation](#3-verify-the-installation).
62
+
63
+ ### Manual installation
64
+
65
+ ```bash
66
+ # npm
67
+ npm install @caribeng/ui
68
+
69
+ # yarn
70
+ yarn add @caribeng/ui
71
+
72
+ # pnpm
73
+ pnpm add @caribeng/ui
74
+ ```
75
+
76
+ ### Migrating from PrimeNG
77
+
78
+ In a project with PrimeNG 18 or higher, install CaribeNG and run the migrator:
79
+
80
+ ```bash
81
+ npm install @caribeng/ui@22
82
+ ng generate @caribeng/ui:migrate-from-primeng
83
+ ```
84
+
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.
86
+
87
+ ```html
88
+ <!-- Before -->
89
+ <p-button label="Save" icon="pi pi-check" [outlined]="true" (onClick)="save()" />
90
+ <input pInputText id="email" [(ngModel)]="email" />
91
+ <p-dialog header="Edit" [(visible)]="open" [modal]="true" [style]="{ width: '25rem' }">…</p-dialog>
92
+
93
+ <!-- After -->
94
+ <cb-button variant="outlined" (click)="save()"><cb-icon name="check" />Save</cb-button>
95
+ <cb-input inputId="email" [(ngModel)]="email" />
96
+ <cb-dialog header="Edit" [(visible)]="open" width="25rem">…</cb-dialog>
97
+ ```
98
+
99
+ What it does:
100
+
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.
107
+
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:
109
+
110
+ ```html
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>
113
+ ```
114
+
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.
116
+
117
+ **Components it translates today:**
118
+
119
+ | PrimeNG | CaribeNG |
120
+ |---|---|
121
+ | `<p-button>`, `<button pButton>` | `<cb-button>` |
122
+ | `<input pInputText>` | `<cb-input>` |
123
+ | `<textarea pTextarea>`, `<textarea pInputTextarea>` | `<cb-textarea>` |
124
+ | `<p-inputnumber>` | `<cb-input-number>` |
125
+ | `<p-select>`, `<p-dropdown>` | `<cb-select>` |
126
+ | `<p-multiselect>` | `<cb-multiselect>` |
127
+ | `<p-toggleswitch>`, `<p-inputSwitch>` | `<cb-toggle>` |
128
+ | `<p-datepicker>`, `<p-calendar>` | `<cb-datepicker>` |
129
+ | `<p-dialog>` | `<cb-dialog>` |
130
+ | `<p-confirmdialog>` + `ConfirmationService` | `<cb-confirm-dialog service>` + `CbConfirmationService` |
131
+ | `<p-confirmpopup>` | `<cb-confirm-popup service>` |
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>` |
133
+ | `MenuItem[]` (`icon`, `command`, `routerLink`…) | the item type of the menu that receives it (`CbMenubarItem[]`…) |
134
+ | `<p-splitbutton>` | `<cb-split-button>` |
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="…">` |
138
+ | `<p-tag>` | `<cb-tag>` |
139
+ | `<p-toast>` + `MessageService` | `<cb-toast>` + `CbToastService` |
140
+ | `<p-card>` | `<cb-card>` |
141
+ | `pTooltip` (on any element) | `cbTooltip` |
142
+ | `<p-checkbox>` | `<cb-checkbox>` |
143
+ | `<i class="pi pi-*">` | `<cb-icon>` |
144
+
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.
146
+
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.
148
+
149
+ | Option | Use |
150
+ |---|---|
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. |
156
+
157
+ ## 🔨 Usage
158
+
159
+ > With `ng add @caribeng/ui`, steps 1 and 2 are already done.
160
+
161
+ ### 1. Provider
162
+
163
+ Add `provideCaribeNG()` to your `app.config.ts` providers. All options are optional:
164
+
165
+ ```ts
166
+ import { ApplicationConfig } from '@angular/core';
167
+ import { provideCaribeNG } from '@caribeng/ui';
168
+
169
+ export const appConfig: ApplicationConfig = {
170
+ providers: [
171
+ provideCaribeNG({
172
+ theme: 'system', // 'light' (default) | 'dark' | 'system'
173
+ preset: 'emerald', // 'emerald' | 'ocean' | 'coral' | 'amber' | 'violet' | 'rose'
174
+ persistTheme: true, // remembers the user's choice
175
+ requiredIndicator: 'none', // 'asterisk' | 'text' | 'optional' | 'none'
176
+ }),
177
+ ],
178
+ };
179
+ ```
180
+
181
+ ### 2. Styles
182
+
183
+ Add the stylesheet (`--cb-*` tokens, theme and utilities) in `angular.json`:
184
+
185
+ ```diff
186
+ "styles": [
187
+ + "node_modules/@caribeng/ui/styles/caribeng.css",
188
+ "src/styles.css"
189
+ ]
190
+ ```
191
+
192
+ or import it from your global stylesheet:
193
+
194
+ ```css
195
+ /* src/styles.css */
196
+ @import '@caribeng/ui/styles.css';
197
+ ```
198
+
199
+ ### 3. Verify the installation
200
+
201
+ Import the components you use from their entry point. Each component's import path appears on its documentation page.
202
+
203
+ ```ts
204
+ import { Component, signal } from '@angular/core';
205
+ import { CbButton } from '@caribeng/ui/button';
206
+ import { CbInput } from '@caribeng/ui/input';
207
+
208
+ @Component({
209
+ selector: 'app-root',
210
+ imports: [CbButton, CbInput],
211
+ template: `
212
+ <cb-input label="Email" type="email" [(value)]="email" />
213
+ <cb-button (click)="send()">Continue</cb-button>
214
+ `,
215
+ })
216
+ export class App {
217
+ readonly email = signal('');
218
+
219
+ send(): void {
220
+ console.log(this.email());
221
+ }
222
+ }
223
+ ```
224
+
225
+ If you see the field and the button styled, CaribeNG is ready.
226
+
227
+ ### Forms
228
+
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:
230
+
231
+ ```html
232
+ <cb-input label="Email" formControlName="email" error="Enter a valid email" />
233
+ ```
234
+
235
+ ## 🌐 Language (i18n)
236
+
237
+ The components' UI texts (accessible labels, buttons, placeholders and messages) come in **English** (default) and **Spanish**:
238
+
239
+ ```ts
240
+ provideCaribeNG({
241
+ locale: 'en', // 'es' | 'en' | your own CbTranslation object
242
+ translation: { noResults: 'Nothing here yet' }, // overrides individual texts
243
+ });
244
+ ```
245
+
246
+ Switch at runtime, without reloading:
247
+
248
+ ```ts
249
+ import { inject } from '@angular/core';
250
+ import { CbLocaleService } from '@caribeng/ui';
251
+
252
+ inject(CbLocaleService).use('en');
253
+ ```
254
+
255
+ A text passed as an input (for example `placeholder` or `emptyMessage`) always takes priority over the language.
256
+
257
+ ## 🎨 Light/dark theme and presets
258
+
259
+ ```ts
260
+ import { inject } from '@angular/core';
261
+ import { CbThemeService } from '@caribeng/ui';
262
+
263
+ export class Header {
264
+ private readonly theme = inject(CbThemeService);
265
+
266
+ toggleTheme(): void {
267
+ this.theme.toggle(); // 'light' <-> 'dark'
268
+ }
269
+
270
+ useOcean(): void {
271
+ this.theme.setPreset('ocean');
272
+ }
273
+ }
274
+ ```
275
+
276
+ ## 🔣 Icons
277
+
278
+ The 363 core icons register themselves:
279
+
280
+ ```html
281
+ <cb-icon name="house" [size]="20" />
282
+ ```
283
+
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:
285
+
286
+ ```ts
287
+ import { provideCbIcons } from '@caribeng/ui/icon';
288
+ import { heartPulse, rocket } from '@caribeng/ui/icons';
289
+
290
+ providers: [provideCbIcons({ 'heart-pulse': heartPulse, rocket })];
291
+ ```
292
+
293
+ ## 📚 Catalog
294
+
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`.
296
+ - **Data:** `dataview`, `descriptions`, `kanban`, `orderlist`, `organizationchart`, `paginator`, `picklist`, `statistic`, `table`, `timeline`, `tracker`, `tree`, `treetable`, `virtualscroller`.
297
+ - **Overlay:** `coachmark`, `command-palette`, `confirmdialog`, `confirmpopup`, `dialog`, `drawer`, `dynamicdialog`, `off-canvas`, `onboarding`, `popover`, `tooltip`.
298
+ - **Messages:** `alert`, `badge`, `chat`, `chip`, `empty`, `inlinemessage`, `message`, `result`, `tag`, `toast`.
299
+ - **Menu:** `anchor`, `breadcrumb`, `contextmenu`, `dock`, `float-menu`, `megamenu`, `menu`, `menubar`, `panelmenu`, `sidebar`, `speeddial`, `splitbutton`, `steps`, `tabmenu`, `tieredmenu`.
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`.
301
+ - **Media:** `animation-lottie`, `avatar`, `avatargroup`, `carousel`, `galleria`, `illustration`, `image`, `logo`, `pdfviewer`, `qrcode`.
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`.
304
+
305
+ ## 🧭 Next steps
306
+
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.
310
+
311
+ ## ☀️ License
312
+
313
+ MIT © CaribeNG Contributors. Icons derived from Lucide (ISC); see `THIRD-PARTY-NOTICES.md`.