@lesterarte/sefin-ui 0.0.37 → 0.0.39

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
@@ -13,6 +13,7 @@ Una librería de sistema de diseño Angular completa basada en principios de Ato
13
13
  - **Componentes Type-Safe**: Soporte completo de TypeScript
14
14
  - **Testing Completo**: Tests unitarios con Jest
15
15
  - **Documentación Storybook**: Documentación visual de componentes con cambio de temas
16
+ - 📖 [Ver Storybook en línea](https://sefin.github.io/sefin-ui/)
16
17
 
17
18
  ## Estructura del Proyecto
18
19
 
@@ -67,16 +68,14 @@ npm install @lesterarte/sefin-ui
67
68
  En tu `styles.scss` o `angular.json`:
68
69
 
69
70
  ```scss
70
- @import '@lesterarte/sefin-ui/styles';
71
+ @import "@lesterarte/sefin-ui/styles";
71
72
  ```
72
73
 
73
74
  O en `angular.json`:
74
75
 
75
76
  ```json
76
77
  {
77
- "styles": [
78
- "node_modules/@lesterarte/sefin-ui/styles/index.scss"
79
- ]
78
+ "styles": ["node_modules/@lesterarte/sefin-ui/styles/index.scss"]
80
79
  }
81
80
  ```
82
81
 
@@ -85,21 +84,21 @@ O en `angular.json`:
85
84
  En tu `app.component.ts`:
86
85
 
87
86
  ```typescript
88
- import { Component, OnInit } from '@angular/core';
89
- import { ThemeLoader } from '@lesterarte/sefin-ui';
87
+ import { Component, OnInit } from "@angular/core";
88
+ import { ThemeLoader } from "@lesterarte/sefin-ui";
90
89
 
91
90
  @Component({
92
- selector: 'app-root',
91
+ selector: "app-root",
93
92
  // ...
94
93
  })
95
94
  export class AppComponent implements OnInit {
96
95
  ngOnInit(): void {
97
96
  // Cargar tema brand (colores de Secretaría de Finanzas)
98
- ThemeLoader.loadTheme('brand');
99
-
97
+ ThemeLoader.loadTheme("brand");
98
+
100
99
  // O cargar tema light
101
100
  // ThemeLoader.loadTheme('light');
102
-
101
+
103
102
  // O cargar tema dark
104
103
  // ThemeLoader.loadTheme('dark');
105
104
  }
@@ -111,25 +110,23 @@ export class AppComponent implements OnInit {
111
110
  Todos los componentes son standalone y se pueden importar directamente:
112
111
 
113
112
  ```typescript
114
- import { Component } from '@angular/core';
115
- import { ButtonComponent, CardComponent } from '@lesterarte/sefin-ui';
113
+ import { Component } from "@angular/core";
114
+ import { ButtonComponent, CardComponent } from "@lesterarte/sefin-ui";
116
115
 
117
116
  @Component({
118
- selector: 'app-example',
117
+ selector: "app-example",
119
118
  standalone: true,
120
119
  imports: [ButtonComponent, CardComponent],
121
120
  template: `
122
121
  <sefin-card variant="elevated">
123
122
  <h2>Hola Mundo</h2>
124
- <sefin-button variant="primary" (clicked)="handleClick()">
125
- Haz Clic
126
- </sefin-button>
123
+ <sefin-button variant="primary" (clicked)="handleClick()"> Haz Clic </sefin-button>
127
124
  </sefin-card>
128
125
  `,
129
126
  })
130
127
  export class ExampleComponent {
131
128
  handleClick() {
132
- console.log('¡Botón clickeado!');
129
+ console.log("¡Botón clickeado!");
133
130
  }
134
131
  }
135
132
  ```
@@ -180,7 +177,7 @@ Todos los design tokens están disponibles como variables CSS:
180
177
  ### Usando Constantes TypeScript
181
178
 
182
179
  ```typescript
183
- import { COLOR_TOKENS, SPACING_TOKENS } from '@lesterarte/sefin-ui';
180
+ import { COLOR_TOKENS, SPACING_TOKENS } from "@lesterarte/sefin-ui";
184
181
 
185
182
  const primaryColor = COLOR_TOKENS.brand.lightBlue;
186
183
  const mediumSpacing = SPACING_TOKENS.md;
@@ -197,18 +194,19 @@ const mediumSpacing = SPACING_TOKENS.md;
197
194
  ### Cambiar Temas
198
195
 
199
196
  ```typescript
200
- import { ThemeLoader } from '@lesterarte/sefin-ui';
197
+ import { ThemeLoader } from "@lesterarte/sefin-ui";
201
198
 
202
199
  // Cambiar a tema brand
203
- ThemeLoader.loadTheme('brand');
200
+ ThemeLoader.loadTheme("brand");
204
201
 
205
202
  // Cambiar a tema dark
206
- ThemeLoader.loadTheme('dark');
203
+ ThemeLoader.loadTheme("dark");
207
204
  ```
208
205
 
209
206
  ## Tipografía
210
207
 
211
208
  La librería usa la fuente **Pluto** de Secretaría de Finanzas según las guías de marca:
209
+
212
210
  - **Pluto-Light** (300) - Para texto ligero
213
211
  - **Pluto-Regular** (400) - Para texto normal y body
214
212
  - **Pluto-Bold** (700) - Para títulos y encabezados
@@ -220,6 +218,7 @@ La librería define las declaraciones `@font-face` para Pluto, pero **debes prop
220
218
  #### Opción 1: Archivos locales (Recomendado)
221
219
 
222
220
  1. **Copia los archivos de fuente** a tu proyecto en la carpeta `src/assets/fonts/`:
221
+
223
222
  ```
224
223
  src/
225
224
  └── assets/
@@ -233,6 +232,7 @@ La librería define las declaraciones `@font-face` para Pluto, pero **debes prop
233
232
  ```
234
233
 
235
234
  2. **Configura Angular** para copiar los assets en `angular.json`:
235
+
236
236
  ```json
237
237
  {
238
238
  "assets": [
@@ -255,16 +255,16 @@ Si prefieres usar una fuente desde CDN o servidor externo, puedes sobrescribir l
255
255
 
256
256
  ```scss
257
257
  @font-face {
258
- font-family: 'Pluto';
259
- src: url('https://tu-cdn.com/fonts/Pluto-Regular.woff2') format('woff2');
258
+ font-family: "Pluto";
259
+ src: url("https://tu-cdn.com/fonts/Pluto-Regular.woff2") format("woff2");
260
260
  font-weight: 400;
261
261
  font-style: normal;
262
262
  font-display: swap;
263
263
  }
264
264
 
265
265
  @font-face {
266
- font-family: 'Pluto';
267
- src: url('https://tu-cdn.com/fonts/Pluto-Bold.woff2') format('woff2');
266
+ font-family: "Pluto";
267
+ src: url("https://tu-cdn.com/fonts/Pluto-Bold.woff2") format("woff2");
268
268
  font-weight: 700;
269
269
  font-style: normal;
270
270
  font-display: swap;
@@ -274,6 +274,7 @@ Si prefieres usar una fuente desde CDN o servidor externo, puedes sobrescribir l
274
274
  #### Formatos de fuente soportados
275
275
 
276
276
  La librería busca los archivos en este orden de prioridad:
277
+
277
278
  1. `.woff2` (recomendado - mejor compresión)
278
279
  2. `.woff` (fallback)
279
280
  3. `.ttf` (fallback)
@@ -307,11 +308,26 @@ npm run storybook
307
308
  ```
308
309
 
309
310
  Esto iniciará Storybook en `http://localhost:6006` con:
311
+
310
312
  - Documentación de componentes
311
313
  - Playground interactivo de componentes
312
314
  - Cambio de temas
313
315
  - Testing de accesibilidad
314
316
 
317
+ ### Ver Storybook en Línea
318
+
319
+ 📖 **Documentación en vivo**: Puedes ver la documentación completa de Storybook en GitHub Pages:
320
+
321
+ 👉 **[Ver Storybook en GitHub Pages](https://sefin.github.io/sefin-ui/)**
322
+
323
+ La documentación incluye:
324
+
325
+ - Todos los componentes disponibles
326
+ - Ejemplos interactivos
327
+ - Guías de uso
328
+ - Cambio de temas en tiempo real
329
+ - Testing de accesibilidad
330
+
315
331
  ### Construir la Librería
316
332
 
317
333
  ```bash
@@ -361,6 +377,7 @@ Si ves un warning del linter de Angular que indica que un componente está siend
361
377
  #### ¿Por qué ocurre?
362
378
 
363
379
  Aunque el componente está correctamente exportado desde la librería, el linter de Angular no puede detectar su uso en templates HTML cuando se trata de:
380
+
364
381
  - Componentes standalone
365
382
  - Selectores personalizados (como `sefin-button`, `sefin-card`, etc.)
366
383