@kaufmann-lab/ui 0.1.1 → 0.1.3

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,25 +1,34 @@
1
1
  # @kaufmann-lab/ui
2
2
 
3
- Shared Angular component library for the Kaufmann frontends. Consumed by Portal
4
- LATAM, Portal OTD and Portal Star — including the Ionic mobile app, which is
5
- still Angular underneath.
3
+ Librería de componentes Angular compartida para los frontends de Kaufmann.
4
+ La consumen Portal LATAM, Portal OTD y Portal Star — incluida la app móvil
5
+ Ionic, que por debajo sigue siendo Angular.
6
6
 
7
- ## Requirements
7
+ > **Nota sobre este README**: por ahora solo documenta `<kf-button>` en
8
+ > detalle. La librería ya tiene muchos más componentes (`Input`, `Checkbox`,
9
+ > `Select`, `Modal`, `Card`, `Tabs`, `Toast`, y otros) — para verlos, mirá el
10
+ > código fuente en `projects/ui/src/lib/` en el
11
+ > [repositorio](https://github.com/kaufmann-lab/kaufmann-ui-angular) hasta
12
+ > que esta tabla se complete. Ver también el
13
+ > [CHANGELOG](https://github.com/kaufmann-lab/kaufmann-ui-angular/blob/main/CHANGELOG.md)
14
+ > para el detalle de qué cambió en cada versión publicada.
8
15
 
9
- Angular 22 and TypeScript ~6.0.3. Angular is a peer dependency, so the library
10
- uses whatever Angular version the host application already has installed. All
11
- consumers must be on the same Angular major.
16
+ ## Requisitos
12
17
 
13
- ## Install
18
+ Angular 22 y TypeScript ~6.0.3. Angular es una `peerDependency`, así que la
19
+ librería usa la versión de Angular que ya tenga instalada la aplicación
20
+ anfitriona. Todos los consumidores deben estar en el mismo major de Angular.
21
+
22
+ ## Instalación
14
23
 
15
24
  ```bash
16
25
  pnpm add @kaufmann-lab/ui
17
26
  ```
18
27
 
19
- ## Usage
28
+ ## Uso
20
29
 
21
- Every component is standalone — there is no module to import. Add the component
22
- to the `imports` of whichever component uses it:
30
+ Todos los componentes son standalone — no hay ningún módulo para importar.
31
+ Agregá el componente a los `imports` de quien lo use:
23
32
 
24
33
  ```ts
25
34
  import { Component } from '@angular/core';
@@ -28,34 +37,36 @@ import { Button } from '@kaufmann-lab/ui';
28
37
  @Component({
29
38
  selector: 'app-customers',
30
39
  imports: [Button],
31
- template: `<kf-button (click)="save()">Save</kf-button>`,
40
+ template: `<kf-button (click)="save()">Guardar</kf-button>`,
32
41
  })
33
42
  export class Customers {}
34
43
  ```
35
44
 
36
- Styles ship compiled inside each component with view encapsulation. Nothing to
37
- import in `angular.json`, no global stylesheet to wire up.
45
+ Los estilos viajan compilados dentro de cada componente con view
46
+ encapsulation. No hay nada para importar en `angular.json`, ni ninguna hoja
47
+ de estilos global para conectar.
38
48
 
39
- ## Components
49
+ ## Componentes
40
50
 
41
51
  ### `<kf-button>`
42
52
 
43
- Wraps a native `<button>`, so keyboard handling, focus and form submission work
44
- as expected. `(click)` bubbles from the inner button — bind it on the host.
53
+ Envuelve un `<button>` nativo, así que el manejo de teclado, el foco y el
54
+ envío de formularios funcionan como se espera. `(click)` burbujea desde el
55
+ botón interno — bindealo en el host.
45
56
 
46
- | Input | Type | Default | Notes |
47
- | --- | --- | --- | --- |
48
- | `variant` | `'primary' \| 'ghost'` | `'primary'` | |
49
- | `disabled` | `boolean` | `false` | Bare attribute works: `<kf-button disabled>` |
50
- | `type` | `'button' \| 'submit' \| 'reset'` | `'submit'` | Matches the native default |
57
+ | Input | Tipo | Default | Notas |
58
+ | ---------- | --------------------------------- | ----------- | --------------------------------------------------- |
59
+ | `variant` | `'primary' \| 'ghost'` | `'primary'` | |
60
+ | `disabled` | `boolean` | `false` | El atributo suelto funciona: `<kf-button disabled>` |
61
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'submit'` | Coincide con el default nativo |
51
62
 
52
63
  ```html
53
- <kf-button (click)="save()">Save</kf-button>
54
- <kf-button variant="ghost">Cancel</kf-button>
55
- <kf-button type="button" disabled>Unavailable</kf-button>
64
+ <kf-button (click)="save()">Guardar</kf-button>
65
+ <kf-button variant="ghost">Cancelar</kf-button>
66
+ <kf-button type="button" disabled>No disponible</kf-button>
56
67
  ```
57
68
 
58
- Theming is done through a CSS custom property on the host:
69
+ El theming se hace mediante una custom property de CSS en el host:
59
70
 
60
71
  ```css
61
72
  kf-button {