@seace/ui 0.0.1 → 0.0.4

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,92 @@
1
- # Ui
1
+ # @seace/ui
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.0.
3
+ Librería de componentes UI para proyectos SEACE, construida con Angular y Tailwind CSS.
4
4
 
5
- ## Code scaffolding
6
-
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
5
+ ## Instalación
8
6
 
9
7
  ```bash
10
- ng generate component component-name
8
+ npm install @seace/ui
11
9
  ```
12
10
 
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
11
+ ## Requisitos
14
12
 
15
- ```bash
16
- ng generate --help
17
- ```
13
+ - Angular 21+
14
+ - Tailwind CSS 3+
18
15
 
19
- ## Building
16
+ ## Configuración
20
17
 
21
- To build the library, run:
18
+ ### 1. Registra los iconos en tu componente raíz
22
19
 
23
- ```bash
24
- ng build ui
25
- ```
20
+ ```typescript
21
+ import { Component, inject, OnInit } from '@angular/core';
22
+ import { IconRegistry, ICONS_SYSTEM } from '@seace/ui';
26
23
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
24
+ @Component({ selector: 'app-root', ... })
25
+ export class AppComponent implements OnInit {
26
+ #registry = inject(IconRegistry);
28
27
 
29
- ### Publishing the Library
28
+ ngOnInit() {
29
+ this.#registry.registerCategory(ICONS_SYSTEM);
30
+ // Agrega más categorías según necesites
31
+ }
32
+ }
33
+ ```
30
34
 
31
- Once the project is built, you can publish your library by following these steps:
35
+ ### 2. Configura Tailwind para incluir las clases de la librería
32
36
 
33
- 1. Navigate to the `dist` directory:
37
+ ```js
38
+ // tailwind.config.js
39
+ module.exports = {
40
+ content: [
41
+ './src/**/*.{html,ts}',
42
+ './node_modules/@seace/ui/**/*.mjs',
43
+ ],
44
+ };
45
+ ```
34
46
 
35
- ```bash
36
- cd dist/ui
37
- ```
47
+ ## Componentes
38
48
 
39
- 2. Run the `npm publish` command to publish your library to the npm registry:
40
- ```bash
41
- npm publish
42
- ```
49
+ ### Badge
43
50
 
44
- ## Running unit tests
51
+ ```html
52
+ <ui-badge color="primary" variant="ghost">Pendiente</ui-badge>
53
+ <ui-badge color="success" variant="filled" icon="check">Aprobado</ui-badge>
54
+ <ui-badge color="danger" variant="outlined" size="sm">Rechazado</ui-badge>
55
+ ```
45
56
 
46
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
57
+ | Input | Tipo | Default | Descripción |
58
+ |-------|------|---------|-------------|
59
+ | `color` | `BadgeColor` | `primary` | Color semántico o decorativo |
60
+ | `variant` | `filled \| outlined \| ghost` | `ghost` | Estilo visual |
61
+ | `size` | `sm \| md \| lg` | `md` | Tamaño |
62
+ | `icon` | `string \| null` | `null` | Nombre del icono |
63
+ | `iconPosition` | `left \| right` | `left` | Posición del icono |
47
64
 
48
- ```bash
49
- ng test
65
+ ### Icon
66
+
67
+ ```html
68
+ <ui-icon name="check_circle" [size]="24" />
50
69
  ```
51
70
 
52
- ## Running end-to-end tests
71
+ | Input | Tipo | Default | Descripción |
72
+ |-------|------|---------|-------------|
73
+ | `name` | `string` | — | Nombre del icono (requerido) |
74
+ | `size` | `number` | `24` | Tamaño en px |
53
75
 
54
- For end-to-end (e2e) testing, run:
76
+ ## Iconos disponibles
55
77
 
56
- ```bash
57
- ng e2e
58
- ```
78
+ La librería incluye 1151 iconos organizados en categorías:
59
79
 
60
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
80
+ ```typescript
81
+ import {
82
+ ICONS_SYSTEM,
83
+ ICONS_ARROWS,
84
+ ICONS_CHART,
85
+ ICONS_DOCUMENTS,
86
+ // ...
87
+ } from '@seace/ui';
88
+ ```
61
89
 
62
- ## Additional Resources
90
+ ## Licencia
63
91
 
64
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
92
+ UNLICENSED uso interno SEACE/OSCE.