ng-hub-ui-ds 22.1.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/CHANGELOG.md +48 -0
- package/README.es.md +349 -0
- package/README.md +352 -0
- package/package.json +44 -0
- package/styles/tokens/hub-tokens.css +736 -0
- package/styles/tokens/hub-tokens.scss +777 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `ng-hub-ui-ds` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [22.1.0] - 2026-06-22
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`container` base layer**: 22 inheritable `--hub-container-*` tokens (typography, visual and layout) bridging `sys` tokens to concrete containers/slots. Acts as a **re-base hook layer** with real spacing defaults (`padding: space-3`, gaps `space-2`): overriding one container token on a subtree re-bases every descendant container that reads it (e.g. `panels`). Paired spacing uses the canonical directional `-x`/`-y` form only — `--hub-container-padding-x/-y` and `--hub-container-margin-x/-y`, with no `padding`/`margin` shorthand.
|
|
15
|
+
- **Primitive tokens**: `--hub-ref-font-size-xs` and `--hub-ref-font-weight-semibold`, completing the canonical font scales.
|
|
16
|
+
- **`--hub-sys-color-ink`**: per-theme contrast target that flips `-emphasis` toward white on dark/terminal surfaces.
|
|
17
|
+
- **`build:tokens` script** (+ `prepublishOnly`) so `hub-tokens.css` is always recompiled from `hub-tokens.scss`, never hand-edited or stale.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Semantic colour families are now CSS-variable-first.** A theme sets only the accent (`--hub-sys-color-{variant}`); `-subtle`, `-border-subtle` and `-emphasis` are derived once in `:root` with `color-mix()` against the contextual `--hub-sys-surface-page` / `--hub-sys-color-ink`. Overriding a single accent — even on a subtree — recomputes the whole family at runtime, with no per-theme boilerplate. Replaces the per-theme ramp maps + `hub-semantic-colors` mixin (now `hub-color-accents` + `hub-color-derive`).
|
|
22
|
+
- Regenerated `hub-tokens.css` from source (was stale: missing the `sys` radius/shadow-md/surface aliases already present in the SCSS).
|
|
23
|
+
|
|
24
|
+
### Notes
|
|
25
|
+
|
|
26
|
+
- `--hub-sys-color-{variant}-dark` is kept as a back-compat alias of `-emphasis`.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [22.0.0] - 2026-06-17
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Aligned with Angular 22.
|
|
34
|
+
- README documentation standardized.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## [1.0.0] - 2026-06-16
|
|
38
|
+
|
|
39
|
+
Initial release. The shared design-token foundation for the ng-hub-ui family,
|
|
40
|
+
extracted from the documentation app so every library reads one source of truth.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- **Primitive (`ref`) tokens**: full colour ramps (`--hub-ref-color-*`), spacing, radii, border widths, typography and icon sizing.
|
|
45
|
+
- **Semantic (`sys`) tokens**: surfaces, text, borders, shadows, focus ring, z-index, opacity, state overlays, transitions, and the semantic colour families.
|
|
46
|
+
- **Semantic colour families** generated from a per-theme SCSS map by the `hub-semantic-colors` mixin — each of `primary` / `success` / `danger` / `warning` / `info` exposes a uniform set: base, `-subtle`, `-dark`, `-border-subtle`, `-emphasis`.
|
|
47
|
+
- **8 built-in themes**: `light` / `base`, `bootstrap` (+ Bootstrap bridge), `dark`, `sunset`, `forest`, `mono`, `terminal` — switched with `[data-theme='…']`.
|
|
48
|
+
- **Two consumption paths**: the compiled `hub-tokens.css` (drop-in for any app) and the `hub-tokens.scss` source (override tokens via standard CSS custom properties).
|
package/README.es.md
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
# ng-hub-ui-ds
|
|
2
|
+
|
|
3
|
+
**Español** | [English](./README.md)
|
|
4
|
+
|
|
5
|
+
La **base de design tokens** compartida de la familia
|
|
6
|
+
[ng-hub-ui](https://hubui.dev/). Publica las variables CSS canónicas
|
|
7
|
+
`--hub-ref-*` (primitivas) y `--hub-sys-*` (semánticas) — rampas de color,
|
|
8
|
+
espaciado, radios, tipografía, superficies, colores semánticos, sombras, focus
|
|
9
|
+
ring y más — con claro/oscuro y **8 temas integrados**.
|
|
10
|
+
|
|
11
|
+
Impórtala **una vez** y cada librería de ng-hub-ui (panels, forms, calendar…)
|
|
12
|
+
lee la misma paleta. Re-tematizas en un sitio y toda la familia sigue.
|
|
13
|
+
|
|
14
|
+
> Agnóstica de framework — son solo variables CSS. Sin dependencia de Angular ni
|
|
15
|
+
> de JS; envía el CSS compilado o el código SCSS.
|
|
16
|
+
|
|
17
|
+
## Documentación y ejemplos en vivo
|
|
18
|
+
|
|
19
|
+
Este paquete forma parte de [Hub UI](https://hubui.dev/), una colección de
|
|
20
|
+
librerías de componentes Angular para aplicaciones standalone.
|
|
21
|
+
|
|
22
|
+
- Documentación: https://hubui.dev/design-system/
|
|
23
|
+
- Hub UI: https://hubui.dev/
|
|
24
|
+
|
|
25
|
+
## 🧩 Familia de librerías `ng-hub-ui`
|
|
26
|
+
|
|
27
|
+
Este paquete es la base de design tokens de la que lee el resto del ecosistema
|
|
28
|
+
**ng-hub-ui**:
|
|
29
|
+
|
|
30
|
+
- [**ng-hub-ui-accordion**](https://www.npmjs.com/package/ng-hub-ui-accordion) (obsoleta — usa ng-hub-ui-panels)
|
|
31
|
+
- [**ng-hub-ui-action-sheet**](https://www.npmjs.com/package/ng-hub-ui-action-sheet)
|
|
32
|
+
- [**ng-hub-ui-avatar**](https://www.npmjs.com/package/ng-hub-ui-avatar)
|
|
33
|
+
- [**ng-hub-ui-board**](https://www.npmjs.com/package/ng-hub-ui-board)
|
|
34
|
+
- [**ng-hub-ui-breadcrumbs**](https://www.npmjs.com/package/ng-hub-ui-breadcrumbs)
|
|
35
|
+
- [**ng-hub-ui-calendar**](https://www.npmjs.com/package/ng-hub-ui-calendar)
|
|
36
|
+
- [**ng-hub-ui-dropdown**](https://www.npmjs.com/package/ng-hub-ui-dropdown)
|
|
37
|
+
- [**ng-hub-ui-ds**](https://www.npmjs.com/package/ng-hub-ui-ds) ← Estás aquí
|
|
38
|
+
- [**ng-hub-ui-forms**](https://www.npmjs.com/package/ng-hub-ui-forms)
|
|
39
|
+
- [**ng-hub-ui-history**](https://www.npmjs.com/package/ng-hub-ui-history)
|
|
40
|
+
- [**ng-hub-ui-milestones**](https://www.npmjs.com/package/ng-hub-ui-milestones)
|
|
41
|
+
- [**ng-hub-ui-modal**](https://www.npmjs.com/package/ng-hub-ui-modal)
|
|
42
|
+
- [**ng-hub-ui-nav**](https://www.npmjs.com/package/ng-hub-ui-nav)
|
|
43
|
+
- [**ng-hub-ui-paginable**](https://www.npmjs.com/package/ng-hub-ui-paginable)
|
|
44
|
+
- [**ng-hub-ui-panels**](https://www.npmjs.com/package/ng-hub-ui-panels)
|
|
45
|
+
- [**ng-hub-ui-portal**](https://www.npmjs.com/package/ng-hub-ui-portal)
|
|
46
|
+
- [**ng-hub-ui-skeleton**](https://www.npmjs.com/package/ng-hub-ui-skeleton)
|
|
47
|
+
- [**ng-hub-ui-sortable**](https://www.npmjs.com/package/ng-hub-ui-sortable)
|
|
48
|
+
- [**ng-hub-ui-stepper**](https://www.npmjs.com/package/ng-hub-ui-stepper)
|
|
49
|
+
- [**ng-hub-ui-utils**](https://www.npmjs.com/package/ng-hub-ui-utils)
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 📋 Índice
|
|
54
|
+
|
|
55
|
+
1. [🧩 ¿Qué es y para qué sirve?](#-qué-es-y-para-qué-sirve)
|
|
56
|
+
2. [📦 Instalación](#-instalación)
|
|
57
|
+
3. [🚀 Importación](#-importación)
|
|
58
|
+
4. [🧱 Arquitectura: las dos capas](#-arquitectura-las-dos-capas)
|
|
59
|
+
5. [🎨 Los colores semánticos](#-los-colores-semánticos)
|
|
60
|
+
6. [🌗 Temas](#-temas)
|
|
61
|
+
7. [🛠️ Cómo modificarlo](#️-cómo-modificarlo)
|
|
62
|
+
8. [🧩 Funciones SCSS (cómo se genera por dentro)](#-funciones-scss-cómo-se-genera-por-dentro)
|
|
63
|
+
9. [📋 Tabla de referencia rápida](#-tabla-de-referencia-rápida)
|
|
64
|
+
10. [📊 Changelog](#-changelog)
|
|
65
|
+
11. [🤝 Contribución](#-contribución)
|
|
66
|
+
12. [☕ Apoyo](#-apoyo)
|
|
67
|
+
13. [📄 Licencia](#-licencia)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🧩 ¿Qué es y para qué sirve?
|
|
72
|
+
|
|
73
|
+
Cada librería de ng-hub-ui se tematiza con variables CSS `--hub-*`, pero **no
|
|
74
|
+
define** los colores: solo los **consume** (con _fallbacks_ sensatos). Este
|
|
75
|
+
paquete es **la fuente de verdad única** de esas variables.
|
|
76
|
+
|
|
77
|
+
Sin él, cada librería usaría sus valores de respaldo de forma aislada. Con él:
|
|
78
|
+
|
|
79
|
+
- **Una sola paleta** alimenta panels, forms, calendar, board… a la vez.
|
|
80
|
+
- **Re-tematizas una vez** (un token) y el cambio se propaga a toda la familia.
|
|
81
|
+
- **Modo oscuro y 8 temas** listos, conmutables con un atributo.
|
|
82
|
+
- Lo usas también en **tu propio CSS** (`var(--hub-sys-color-info-subtle)`), así
|
|
83
|
+
tu UI casa con los componentes.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 📦 Instalación
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install ng-hub-ui-ds
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
No tiene dependencias. Es CSS/SCSS puro.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 🚀 Importación
|
|
98
|
+
|
|
99
|
+
Impórtalo **una sola vez**, en la raíz de tu aplicación. Elige una vía:
|
|
100
|
+
|
|
101
|
+
### CSS drop-in (cualquier app, sin Sass)
|
|
102
|
+
|
|
103
|
+
```css
|
|
104
|
+
@import 'ng-hub-ui-ds/styles/tokens/hub-tokens.css';
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
o en `angular.json`:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
"styles": [
|
|
111
|
+
"node_modules/ng-hub-ui-ds/styles/tokens/hub-tokens.css",
|
|
112
|
+
"src/styles.scss"
|
|
113
|
+
]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Código SCSS (si usas Sass)
|
|
117
|
+
|
|
118
|
+
Emite exactamente las mismas reglas `:root`, y te deja referenciar la fuente:
|
|
119
|
+
|
|
120
|
+
```scss
|
|
121
|
+
@use 'ng-hub-ui-ds/styles/tokens/hub-tokens';
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Cada componente de ng-hub-ui ya lee estas variables. Refiérelas también en tus
|
|
125
|
+
propios estilos:
|
|
126
|
+
|
|
127
|
+
```css
|
|
128
|
+
.mi-aviso {
|
|
129
|
+
background: var(--hub-sys-color-info-subtle);
|
|
130
|
+
color: var(--hub-sys-color-info-emphasis);
|
|
131
|
+
border: 1px solid var(--hub-sys-color-info-border-subtle);
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 🧱 Arquitectura: las dos capas
|
|
138
|
+
|
|
139
|
+
Los tokens siguen un sistema por capas:
|
|
140
|
+
|
|
141
|
+
| Capa | Prefijo | Qué es | Ejemplos |
|
|
142
|
+
| --------------- | ------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- |
|
|
143
|
+
| **Referencia** | `--hub-ref-*` | Valores crudos, sin contexto | `--hub-ref-color-blue-500`, `--hub-ref-space-3`, `--hub-ref-radius-md` |
|
|
144
|
+
| **Sistema** | `--hub-sys-*` | Asignaciones con significado que consumen los componentes | `--hub-sys-color-primary`, `--hub-sys-surface-page`, `--hub-sys-text-primary` |
|
|
145
|
+
| **Container** | `--hub-container-*` | Puente heredable de `sys` a contenedores/slots concretos — un **re-base hook** | `--hub-container-bg`, `--hub-container-padding-x`, `--hub-container-gap` |
|
|
146
|
+
|
|
147
|
+
Regla de oro: **los componentes referencian solo tokens `sys`**. Los `sys`
|
|
148
|
+
apuntan a los `ref`. Así, cambiar un `sys` re-tematiza; cambiar un `ref` ajusta
|
|
149
|
+
la paleta base.
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
--hub-ref-color-blue-500 → --hub-sys-color-primary → (lo usan los componentes)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
La capa opcional `container` se apoya sobre `sys` como **re-base hook**:
|
|
156
|
+
sobrescribir un token `--hub-container-*` en un subárbol re-basa cada contenedor
|
|
157
|
+
descendiente que lo lee (p. ej. `ng-hub-ui-panels`), sin tocar `sys`. El espaciado
|
|
158
|
+
emparejado usa solo la forma direccional `-x` / `-y` (`--hub-container-padding-x/-y`,
|
|
159
|
+
`--hub-container-margin-x/-y`) — sin atajo.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 🎨 Los colores semánticos
|
|
164
|
+
|
|
165
|
+
Cada color semántico (`primary` · `success` · `danger` · `warning` · `info`)
|
|
166
|
+
expone una **familia uniforme** de cinco tokens:
|
|
167
|
+
|
|
168
|
+
| Token | Uso típico |
|
|
169
|
+
| ----------------------------------- | ---------------------------------------------- |
|
|
170
|
+
| `--hub-sys-color-<v>` | Color sólido (acento, icono, borde fuerte) |
|
|
171
|
+
| `--hub-sys-color-<v>-subtle` | Fondo tenue (banners, alertas) |
|
|
172
|
+
| `--hub-sys-color-<v>-border-subtle` | Borde tenue sobre el fondo subtle |
|
|
173
|
+
| `--hub-sys-color-<v>-emphasis` | Texto legible sobre el fondo subtle |
|
|
174
|
+
| `--hub-sys-color-<v>-dark` | Variante oscura del color |
|
|
175
|
+
|
|
176
|
+
Ejemplo de uso (un aviso a juego con el resto de la familia):
|
|
177
|
+
|
|
178
|
+
```css
|
|
179
|
+
.mi-aviso {
|
|
180
|
+
background: var(--hub-sys-color-info-subtle);
|
|
181
|
+
color: var(--hub-sys-color-info-emphasis);
|
|
182
|
+
border: 1px solid var(--hub-sys-color-info-border-subtle);
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 🌗 Temas
|
|
189
|
+
|
|
190
|
+
Activa un tema con el atributo `data-theme` en `<html>` (o en cualquier
|
|
191
|
+
contenedor para tematizar una zona):
|
|
192
|
+
|
|
193
|
+
```html
|
|
194
|
+
<html data-theme="dark">
|
|
195
|
+
<!-- light (por defecto) · base · bootstrap · dark · sunset · forest · mono · terminal -->
|
|
196
|
+
</html>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Como cada tema **redefine los mismos tokens** con sus valores, todo lo que lee
|
|
200
|
+
`--hub-sys-*` se re-colorea automáticamente, incluido tu propio CSS.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 🛠️ Cómo modificarlo
|
|
205
|
+
|
|
206
|
+
Hay tres mecanismos, de más simple a más avanzado.
|
|
207
|
+
|
|
208
|
+
### 1. Sobrescribir un token (CSS) — el camino principal
|
|
209
|
+
|
|
210
|
+
Como cada valor es una variable CSS, re-tematizar es una línea, y **cascada a
|
|
211
|
+
toda la familia**:
|
|
212
|
+
|
|
213
|
+
```css
|
|
214
|
+
:root {
|
|
215
|
+
--hub-sys-color-primary: #7c3aed;
|
|
216
|
+
--hub-sys-color-primary-subtle: #ede9fe;
|
|
217
|
+
--hub-sys-color-primary-emphasis: #5b21b6;
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Puedes hacerlo global (`:root`), por tema (`[data-theme='dark']`) o por zona
|
|
222
|
+
(`.mi-seccion`).
|
|
223
|
+
|
|
224
|
+
### 2. Añadir tu propio acento
|
|
225
|
+
|
|
226
|
+
Define una familia `--hub-sys-color-<nombre>` y los componentes que aceptan una
|
|
227
|
+
variante semántica la recogen **sin cambios**. Por ejemplo, el alert de panels
|
|
228
|
+
(`<hub-panel appearance="alert" variant="brand">`):
|
|
229
|
+
|
|
230
|
+
```css
|
|
231
|
+
:root {
|
|
232
|
+
--hub-sys-color-brand: #9333ea;
|
|
233
|
+
--hub-sys-color-brand-subtle: #f3e8ff;
|
|
234
|
+
--hub-sys-color-brand-border-subtle: #d8b4fe;
|
|
235
|
+
--hub-sys-color-brand-emphasis: #6b21a8;
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
> Con solo `--hub-sys-color-brand` (el acento base) ya funciona: los componentes
|
|
240
|
+
> derivan el resto con `color-mix`. Define la familia completa cuando quieras
|
|
241
|
+
> tintes exactos.
|
|
242
|
+
|
|
243
|
+
### 3. Crear un tema propio
|
|
244
|
+
|
|
245
|
+
Reúne tus overrides bajo un atributo de tema y actívalo cuando quieras:
|
|
246
|
+
|
|
247
|
+
```css
|
|
248
|
+
[data-theme='corporate'] {
|
|
249
|
+
--hub-sys-color-primary: #0033a0;
|
|
250
|
+
--hub-sys-surface-page: #fbfcff;
|
|
251
|
+
--hub-sys-text-primary: #0a1f44;
|
|
252
|
+
/* …el resto de tokens que difieran del tema base */
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 🧩 Funciones SCSS (cómo se genera por dentro)
|
|
259
|
+
|
|
260
|
+
Las familias de color semántico **no se escriben a mano**, y un tema solo fija el
|
|
261
|
+
**acento** de cada variante — `-subtle`, `-border-subtle` y `-emphasis` se derivan
|
|
262
|
+
**una sola vez** en `:root` con `color-mix()` a partir del acento, la superficie y
|
|
263
|
+
el _ink_ vivos. Así, añadir un color o un tema es uniforme y sin _boilerplate_.
|
|
264
|
+
|
|
265
|
+
```scss
|
|
266
|
+
$hub-variants: primary, success, danger, warning, info;
|
|
267
|
+
|
|
268
|
+
// Un acento por variante, por tema — solo el color base.
|
|
269
|
+
$hub-accents-light: (
|
|
270
|
+
primary: var(--hub-ref-color-blue-500, #0d6efd),
|
|
271
|
+
success: var(--hub-ref-color-green-500, #198754),
|
|
272
|
+
danger: var(--hub-ref-color-red-500, #dc3545),
|
|
273
|
+
warning: var(--hub-ref-color-yellow-500, #ffc107),
|
|
274
|
+
info: var(--hub-ref-color-cyan-500, #0dcaf0)
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
// Fija SOLO --hub-sys-color-<variante> (el acento). Se llama en cada tema.
|
|
278
|
+
@mixin hub-color-accents($accents) {
|
|
279
|
+
@each $name in $hub-variants {
|
|
280
|
+
--hub-sys-color-#{$name}: #{map.get($accents, $name)};
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Deriva la familia de roles del acento + superficie + ink vivos. Se emite UNA
|
|
285
|
+
// vez en :root; los temas solo cambian las entradas y la familia se recalcula.
|
|
286
|
+
@mixin hub-color-derive() {
|
|
287
|
+
@each $name in $hub-variants {
|
|
288
|
+
--hub-sys-color-#{$name}-subtle: color-mix(in srgb, var(--hub-sys-color-#{$name}) 12%, var(--hub-sys-surface-page, #fff));
|
|
289
|
+
--hub-sys-color-#{$name}-border-subtle: color-mix(in srgb, var(--hub-sys-color-#{$name}) 35%, var(--hub-sys-surface-page, #fff));
|
|
290
|
+
--hub-sys-color-#{$name}-emphasis: color-mix(in srgb, var(--hub-sys-color-#{$name}) 80%, var(--hub-sys-color-ink, #212529));
|
|
291
|
+
--hub-sys-color-#{$name}-dark: var(--hub-sys-color-#{$name}-emphasis); // alias retrocompatible
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
:root,
|
|
296
|
+
[data-theme='light'] {
|
|
297
|
+
@include hub-color-accents($hub-accents-light);
|
|
298
|
+
@include hub-color-derive();
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
> Casi nunca necesitas tocar el SCSS: como la familia se deriva del **acento
|
|
303
|
+
> único** en tiempo de ejecución, sobrescribir `--hub-sys-color-<variante>` en CSS
|
|
304
|
+
> plano — incluso en un subárbol — recalcula `-subtle` / `-border-subtle` /
|
|
305
|
+
> `-emphasis` automáticamente. Los mapas + mixins son solo la mecánica interna,
|
|
306
|
+
> útil si contribuyes al paquete o compilas tu propia variante de la paleta.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## 📋 Tabla de referencia rápida
|
|
311
|
+
|
|
312
|
+
| Quiero… | Cómo |
|
|
313
|
+
| -------------------------- | ----------------------------------------------------------- |
|
|
314
|
+
| Usar la paleta | `@import '…/hub-tokens.css'` una vez |
|
|
315
|
+
| Cambiar un color global | `:root { --hub-sys-color-primary: … }` |
|
|
316
|
+
| Cambiar el modo oscuro | `[data-theme='dark'] { --hub-sys-… : … }` |
|
|
317
|
+
| Añadir un acento propio | define `--hub-sys-color-<x>` (+ familia opcional) |
|
|
318
|
+
| Crear un tema | `[data-theme='<nombre>'] { … }` y actívalo |
|
|
319
|
+
| Ver todos los tokens | la página de tokens en [hubui.dev](https://hubui.dev/design-system/) |
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## 📊 Changelog
|
|
324
|
+
|
|
325
|
+
Consulta [CHANGELOG.md](./CHANGELOG.md).
|
|
326
|
+
|
|
327
|
+
## 🤝 Contribución
|
|
328
|
+
|
|
329
|
+
Las contribuciones son bienvenidas.
|
|
330
|
+
|
|
331
|
+
1. **Haz un fork** del repositorio.
|
|
332
|
+
2. **Crea** una rama de característica: `git checkout -b feature/amazing-feature`.
|
|
333
|
+
3. **Haz commit** de tus cambios: `git commit -m 'Add amazing feature'`.
|
|
334
|
+
4. **Haz push** a tu rama: `git push origin feature/amazing-feature`.
|
|
335
|
+
5. **Abre** un pull request.
|
|
336
|
+
|
|
337
|
+
Repositorio: https://github.com/carlos-morcillo/ng-hub-ui-ds
|
|
338
|
+
|
|
339
|
+
## ☕ Apoyo
|
|
340
|
+
|
|
341
|
+
¿Te gusta este paquete? Puedes apoyar el proyecto invitándome a un café ☕:
|
|
342
|
+
[](https://buymeacoffee.com/carlosmorcillo)
|
|
343
|
+
|
|
344
|
+
## 📄 Licencia
|
|
345
|
+
|
|
346
|
+
Este proyecto está licenciado bajo la Licencia MIT.
|
|
347
|
+
|
|
348
|
+
MIT © [Carlos Morcillo](https://www.carlosmorcillo.com)
|
|
349
|
+
</content>
|