@xsmusices/ui 0.0.0-stage → 1.41.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/LICENSE +9 -0
- package/README.md +92 -2
- package/fesm2022/xsmusices-ui.mjs +23297 -0
- package/index.d.ts +5848 -0
- package/package.json +65 -4
- package/styles/shared-base.css +93 -0
- package/styles/shared-utilities.css +349 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Copyright (c) XSMusic. Todos los derechos reservados.
|
|
2
|
+
|
|
3
|
+
Este paquete es software propietario de XSMusic. Queda prohibida
|
|
4
|
+
su copia, redistribución, modificación, ingeniería inversa o
|
|
5
|
+
cualquier otro uso sin autorización previa y por escrito de XSMusic.
|
|
6
|
+
|
|
7
|
+
El repositorio de código fuente es privado. La distribución de
|
|
8
|
+
este paquete compilado no concede ninguna licencia de código
|
|
9
|
+
abierto ni derechos adicionales de reutilización.
|
package/README.md
CHANGED
|
@@ -1,3 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @xsmusices/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Librería de componentes Angular compartida para los proyectos de XSMusic (admin, app, etc).
|
|
4
|
+
|
|
5
|
+
## Características
|
|
6
|
+
|
|
7
|
+
- ✅ **Componentes Standalone** — 100% modulares y reutilizables
|
|
8
|
+
- 🎨 **Diseño Centralizado** — Tema consistent (dark mode, Tailwind CSS)
|
|
9
|
+
- 🌍 **Multi-idioma** — Soporte native para ES/EN sin dependencias externas
|
|
10
|
+
- ♿ **Accesibilidad** — Componentes WCAG compliant
|
|
11
|
+
- 📦 **Tree-shakeable** — Solo empaqueta lo que usas
|
|
12
|
+
|
|
13
|
+
## Instalación
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @xsmusices/ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Luego importa componentes según necesites:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { XsButtonComponent } from '@xsmusices/ui';
|
|
23
|
+
|
|
24
|
+
@Component({
|
|
25
|
+
imports: [XsButtonComponent],
|
|
26
|
+
})
|
|
27
|
+
export class MyComponent {}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Configuración requerida
|
|
31
|
+
|
|
32
|
+
La librería no apunta a ningún entorno por defecto. La app debe proveer:
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { XS_API_URL, XS_ENV_NAME } from '@xsmusices/ui';
|
|
36
|
+
|
|
37
|
+
{ provide: XS_API_URL, useValue: environment.urls.api },
|
|
38
|
+
{ provide: XS_ENV_NAME, useValue: environment.name },
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Sin `XS_API_URL` las URLs de imágenes y scraping quedan relativas
|
|
42
|
+
(fallo visible, nunca tráfico accidental contra producción).
|
|
43
|
+
|
|
44
|
+
## Uso Básico
|
|
45
|
+
|
|
46
|
+
### Componentes Comunes
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<xs-button label="Enviar"></xs-button>
|
|
50
|
+
<xs-input placeholder="Escribe..."></xs-input>
|
|
51
|
+
<xs-card title="Mi Card"> contenido </xs-card>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Internacionalización (i18n)
|
|
55
|
+
|
|
56
|
+
### Cambiar Idioma (Consumidor)
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { XSTranslateService } from '@xsmusices/ui';
|
|
60
|
+
|
|
61
|
+
constructor(private translate: XSTranslateService) {}
|
|
62
|
+
|
|
63
|
+
cambiarIdioma() {
|
|
64
|
+
this.translate.setLanguage('en'); // or 'es'
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
El idioma se persiste automáticamente en `localStorage`.
|
|
69
|
+
|
|
70
|
+
## Desarrollo
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Dev con watch
|
|
74
|
+
npm run watch
|
|
75
|
+
|
|
76
|
+
# Build producción
|
|
77
|
+
npm run build:xs-ui
|
|
78
|
+
|
|
79
|
+
# Tests
|
|
80
|
+
npm run test:xs-ui
|
|
81
|
+
|
|
82
|
+
# Cobertura
|
|
83
|
+
npm run test:coverage
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
Para documentación completa y catálogo de componentes, ve a [https://ui.xsmusic.es](https://ui.xsmusic.es)
|
|
89
|
+
|
|
90
|
+
## Further help
|
|
91
|
+
|
|
92
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
93
|
+
// trigger rebuild
|