ng-hub-ui-ds 22.1.0 → 22.3.1

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 CHANGED
@@ -7,7 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [22.1.0] - 2026-06-22
10
+ ## [22.3.1] - 2026-06-25
11
+
12
+ ### Fixed
13
+
14
+ - The default / `light` theme accents are no longer silently overridden by the Bootstrap bridge: `:root` and `[data-theme='light']` now re-assert the ref-based accents (and surfaces/text/border) after the bridge block, instead of resolving through `--bs-*` when Bootstrap is present.
15
+ - Removed the stray `--hub-sys-color-primary-dark` Bootstrap override so all five variants derive `-dark` from the canonical `-emphasis` alias.
16
+
17
+ ## [22.3.0] - 2026-06-24
18
+
19
+ ### Added
20
+
21
+ - `--hub-sys-color-brand-default` and `--hub-sys-color-brand-on-default` semantic tokens. `brand` is the default accent consumed by component theme mixins (e.g. `ng-hub-ui-buttons` / `ng-hub-ui-badges`); it aliases the active theme's `primary`, so it re-colours automatically per theme.
22
+
23
+ ## [22.2.0] - 2026-06-24
24
+
25
+ ### Added
26
+
27
+ - **`body` / `main` base (shell) layer**: new inheritable tokens that standardise the application-shell layout so a vertical or horizontal aside reads one consistent token set.
28
+ - **`--hub-body-*`** — the outer app/page wrapper. Twelve tokens (`width`, `margin-x/-y`, `padding-x/-y`, `row-gap`, `column-gap`, `bg`, `border-color`, `border-style`, `border-width`, `border-radius`) that **inherit from the matching `--hub-container-*` tokens** (with `sys`/`ref` fallbacks), so the container spacing system drives the whole page.
29
+ - **`--hub-main-*`** — the content region: `bg`, `border-radius`, `padding-x`, `padding-y`.
30
+ - **`--hub-main-wrapper-*`** — the centered wrapper around the content region: `bg`, `border-radius`, `gap`, `padding-x`, `padding-y` and `max-width` (default `1200px`).
31
+ - All tokens are live, re-basable CSS custom properties; paired spacing uses the canonical directional `-x` / `-y` form only (no `padding`/`margin` shorthand).
11
32
 
12
33
  ### Added
13
34
 
package/README.es.md CHANGED
@@ -55,7 +55,7 @@ Este paquete es la base de design tokens de la que lee el resto del ecosistema
55
55
  1. [🧩 ¿Qué es y para qué sirve?](#-qué-es-y-para-qué-sirve)
56
56
  2. [📦 Instalación](#-instalación)
57
57
  3. [🚀 Importación](#-importación)
58
- 4. [🧱 Arquitectura: las dos capas](#-arquitectura-las-dos-capas)
58
+ 4. [🧱 Arquitectura: las capas](#-arquitectura-las-capas)
59
59
  5. [🎨 Los colores semánticos](#-los-colores-semánticos)
60
60
  6. [🌗 Temas](#-temas)
61
61
  7. [🛠️ Cómo modificarlo](#️-cómo-modificarlo)
@@ -134,7 +134,7 @@ propios estilos:
134
134
 
135
135
  ---
136
136
 
137
- ## 🧱 Arquitectura: las dos capas
137
+ ## 🧱 Arquitectura: las capas
138
138
 
139
139
  Los tokens siguen un sistema por capas:
140
140
 
@@ -143,6 +143,7 @@ Los tokens siguen un sistema por capas:
143
143
  | **Referencia** | `--hub-ref-*` | Valores crudos, sin contexto | `--hub-ref-color-blue-500`, `--hub-ref-space-3`, `--hub-ref-radius-md` |
144
144
  | **Sistema** | `--hub-sys-*` | Asignaciones con significado que consumen los componentes | `--hub-sys-color-primary`, `--hub-sys-surface-page`, `--hub-sys-text-primary` |
145
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
+ | **Base / shell** | `--hub-body-*` · `--hub-main-*` · `--hub-main-wrapper-*` | Layout del _application shell_: el wrapper exterior de la página, la región de contenido y su wrapper centrado. `--hub-body-*` **hereda los valores por defecto de `--hub-container-*`** | `--hub-body-padding-x`, `--hub-main-bg`, `--hub-main-wrapper-max-width` (`1200px`) |
146
147
 
147
148
  Regla de oro: **los componentes referencian solo tokens `sys`**. Los `sys`
148
149
  apuntan a los `ref`. Así, cambiar un `sys` re-tematiza; cambiar un `ref` ajusta
@@ -158,6 +159,20 @@ descendiente que lo lee (p. ej. `ng-hub-ui-panels`), sin tocar `sys`. El espacia
158
159
  emparejado usa solo la forma direccional `-x` / `-y` (`--hub-container-padding-x/-y`,
159
160
  `--hub-container-margin-x/-y`) — sin atajo.
160
161
 
162
+ La capa `base` / shell estandariza el **layout del _application shell_** para que
163
+ un aside vertical u horizontal lea un único conjunto de tokens coherente:
164
+
165
+ - `--hub-body-*` — el wrapper exterior de la app/página. **Hereda los valores por
166
+ defecto de `--hub-container-*`** (`--hub-body-padding-x` recurre a
167
+ `--hub-container-padding-x`, y así sucesivamente), de modo que el sistema de
168
+ espaciado del container gobierna toda la página.
169
+ - `--hub-main-*` — la región de contenido (`bg`, `border-radius`, `padding-x/-y`).
170
+ - `--hub-main-wrapper-*` — el wrapper centrado alrededor de la región de contenido,
171
+ con un `--hub-main-wrapper-max-width: 1200px` por defecto.
172
+
173
+ También son variables CSS vivas y re-basables, con la misma convención de
174
+ espaciado direccional `-x` / `-y`.
175
+
161
176
  ---
162
177
 
163
178
  ## 🎨 Los colores semánticos
package/README.md CHANGED
@@ -55,7 +55,7 @@ ecosystem reads from:
55
55
  1. [🧩 What is it and what is it for?](#-what-is-it-and-what-is-it-for)
56
56
  2. [📦 Installation](#-installation)
57
57
  3. [🚀 Import](#-import)
58
- 4. [🧱 Architecture: the two layers](#-architecture-the-two-layers)
58
+ 4. [🧱 Architecture: the layers](#-architecture-the-layers)
59
59
  5. [🎨 Semantic colours](#-semantic-colours)
60
60
  6. [🌗 Themes](#-themes)
61
61
  7. [🛠️ How to customise it](#️-how-to-customise-it)
@@ -135,7 +135,7 @@ own styles too:
135
135
 
136
136
  ---
137
137
 
138
- ## 🧱 Architecture: the two layers
138
+ ## 🧱 Architecture: the layers
139
139
 
140
140
  The tokens follow a layered system:
141
141
 
@@ -144,6 +144,7 @@ The tokens follow a layered system:
144
144
  | **Reference** | `--hub-ref-*` | Raw, context-free values | `--hub-ref-color-blue-500`, `--hub-ref-space-3`, `--hub-ref-radius-md` |
145
145
  | **System** | `--hub-sys-*` | Meaningful assignments that components consume | `--hub-sys-color-primary`, `--hub-sys-surface-page`, `--hub-sys-text-primary` |
146
146
  | **Container** | `--hub-container-*` | Inheritable bridge from `sys` to concrete containers/slots — a **re-base hook** | `--hub-container-bg`, `--hub-container-padding-x`, `--hub-container-gap` |
147
+ | **Base / shell** | `--hub-body-*` · `--hub-main-*` · `--hub-main-wrapper-*` | Application-shell layout: the outer page wrapper, the content region and its centered wrapper. `--hub-body-*` **inherits the matching `--hub-container-*` defaults** | `--hub-body-padding-x`, `--hub-main-bg`, `--hub-main-wrapper-max-width` (`1200px`) |
147
148
 
148
149
  Golden rule: **components reference `sys` tokens only**. The `sys` tokens point
149
150
  at the `ref` tokens. So changing a `sys` token re-themes; changing a `ref`
@@ -159,6 +160,20 @@ container that reads it (e.g. `ng-hub-ui-panels`), without touching `sys`. Paire
159
160
  spacing uses the directional `-x` / `-y` form only (`--hub-container-padding-x/-y`,
160
161
  `--hub-container-margin-x/-y`) — no shorthand.
161
162
 
163
+ The `base` / shell layer standardises the **application-shell layout** so a
164
+ vertical or horizontal aside reads one consistent token set:
165
+
166
+ - `--hub-body-*` — the outer app/page wrapper. It **inherits the matching
167
+ `--hub-container-*` defaults** (`--hub-body-padding-x` falls back to
168
+ `--hub-container-padding-x`, and so on), so the container spacing system drives
169
+ the whole page.
170
+ - `--hub-main-*` — the content region (`bg`, `border-radius`, `padding-x/-y`).
171
+ - `--hub-main-wrapper-*` — the centered wrapper around the content region, with a
172
+ default `--hub-main-wrapper-max-width: 1200px`.
173
+
174
+ These are live, re-basable CSS variables too, using the same directional
175
+ `-x` / `-y` spacing convention.
176
+
162
177
  ---
163
178
 
164
179
  ## 🎨 Semantic colours
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-hub-ui-ds",
3
- "version": "22.1.0",
3
+ "version": "22.3.1",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "build:tokens": "sass styles/tokens/hub-tokens.scss styles/tokens/hub-tokens.css --style=expanded --no-source-map",
@@ -203,6 +203,42 @@
203
203
  --hub-container-column-gap: var(--hub-ref-space-2);
204
204
  }
205
205
 
206
+ /* ============================================================
207
+ BASE — body / main (application shell layout)
208
+ `body` is the outer app/page wrapper — it inherits the container
209
+ layout defaults so the same spacing system drives the whole page.
210
+ `main` is the content region (and its centered wrapper). Both are
211
+ live, re-basable CSS variables, standardised here so an app shell
212
+ (vertical or horizontal aside) reads one consistent token set.
213
+ ============================================================ */
214
+ :root {
215
+ /* body — outer app/page wrapper (inherits the container layout) */
216
+ --hub-body-width: var(--hub-container-width, 100%);
217
+ --hub-body-margin-x: var(--hub-container-margin-x, 0);
218
+ --hub-body-margin-y: var(--hub-container-margin-y, 0);
219
+ --hub-body-padding-x: var(--hub-container-padding-x, 0);
220
+ --hub-body-padding-y: var(--hub-container-padding-y, 0);
221
+ --hub-body-row-gap: var(--hub-container-row-gap, 0);
222
+ --hub-body-column-gap: var(--hub-container-column-gap, 0);
223
+ --hub-body-bg: var(--hub-container-bg, var(--hub-sys-surface-page));
224
+ --hub-body-border-color: var(--hub-container-border-color, var(--hub-sys-border-color-default));
225
+ --hub-body-border-style: var(--hub-container-border-style, solid);
226
+ --hub-body-border-width: var(--hub-container-border-width, var(--hub-ref-border-width, 1px));
227
+ --hub-body-border-radius: var(--hub-container-border-radius, var(--hub-ref-radius-md, 0.375rem));
228
+ /* main — content region */
229
+ --hub-main-bg: var(--hub-sys-surface-page);
230
+ --hub-main-border-radius: var(--hub-ref-radius-lg, 0.5rem);
231
+ --hub-main-padding-x: var(--hub-ref-space-4, 1.5rem);
232
+ --hub-main-padding-y: var(--hub-ref-space-4, 1.5rem);
233
+ /* main — centered wrapper around the content region */
234
+ --hub-main-wrapper-bg: var(--hub-sys-surface-page);
235
+ --hub-main-wrapper-border-radius: var(--hub-ref-radius-lg, 0.5rem);
236
+ --hub-main-wrapper-gap: var(--hub-ref-space-4, 1.5rem);
237
+ --hub-main-wrapper-max-width: 1200px;
238
+ --hub-main-wrapper-padding-x: var(--hub-ref-space-4, 1.5rem);
239
+ --hub-main-wrapper-padding-y: var(--hub-ref-space-4, 1.5rem);
240
+ }
241
+
206
242
  /* ============================================================
207
243
  Semantic color generation (CSS-variable-first)
208
244
  A theme sets only ONE accent per variant (--hub-sys-color-{v}).
@@ -316,6 +352,10 @@
316
352
  --hub-sys-color-secondary: var(--hub-ref-color-gray-600, #6c757d);
317
353
  --hub-sys-color-light: var(--hub-ref-color-gray-100, #f8f9fa);
318
354
  --hub-sys-color-dark: var(--hub-ref-color-gray-900, #212529);
355
+ /* Brand alias — the default accent consumed by component theme mixins
356
+ (e.g. ng-hub-ui-buttons / -badges). Follows the active theme's primary. */
357
+ --hub-sys-color-brand-default: var(--hub-sys-color-primary, #0d6efd);
358
+ --hub-sys-color-brand-on-default: var(--hub-ref-color-white, #fff);
319
359
  /* ----------------------------------------------------------
320
360
  Expressive gradient — theme-aware accent used by the home
321
361
  page (gradient headlines, glows, mesh background blobs).
@@ -442,7 +482,6 @@
442
482
  [data-theme=forest],
443
483
  [data-theme=mono] {
444
484
  --hub-sys-color-primary: var(--bs-primary, #0d6efd);
445
- --hub-sys-color-primary-dark: var(--bs-primary-text-emphasis, #0a58ca);
446
485
  --hub-sys-color-secondary: var(--bs-secondary, #6c757d);
447
486
  --hub-sys-color-success: var(--bs-success, #198754);
448
487
  --hub-sys-color-danger: var(--bs-danger, #dc3545);
@@ -458,8 +497,14 @@
458
497
  /* ============================================================
459
498
  LAYER 2 — sys (base alias)
460
499
  Base is equivalent to light theme and works as explicit default.
500
+ Also re-asserted for :root / [data-theme='light'] AFTER the Bootstrap
501
+ bridge above (whose selector also matches :root/light), so the default
502
+ and light themes keep their ref-based accents/surfaces instead of being
503
+ silently overridden by --bs-* when Bootstrap is present.
461
504
  ============================================================ */
462
- [data-theme=base] {
505
+ :root,
506
+ [data-theme=base],
507
+ [data-theme=light] {
463
508
  --hub-sys-color-primary: var(--hub-ref-color-blue-500, #0d6efd);
464
509
  --hub-sys-color-success: var(--hub-ref-color-green-500, #198754);
465
510
  --hub-sys-color-danger: var(--hub-ref-color-red-500, #dc3545);
@@ -221,6 +221,44 @@
221
221
  --hub-container-column-gap: var(--hub-ref-space-2);
222
222
  }
223
223
 
224
+ /* ============================================================
225
+ BASE — body / main (application shell layout)
226
+ `body` is the outer app/page wrapper — it inherits the container
227
+ layout defaults so the same spacing system drives the whole page.
228
+ `main` is the content region (and its centered wrapper). Both are
229
+ live, re-basable CSS variables, standardised here so an app shell
230
+ (vertical or horizontal aside) reads one consistent token set.
231
+ ============================================================ */
232
+ :root {
233
+ /* body — outer app/page wrapper (inherits the container layout) */
234
+ --hub-body-width: var(--hub-container-width, 100%);
235
+ --hub-body-margin-x: var(--hub-container-margin-x, 0);
236
+ --hub-body-margin-y: var(--hub-container-margin-y, 0);
237
+ --hub-body-padding-x: var(--hub-container-padding-x, 0);
238
+ --hub-body-padding-y: var(--hub-container-padding-y, 0);
239
+ --hub-body-row-gap: var(--hub-container-row-gap, 0);
240
+ --hub-body-column-gap: var(--hub-container-column-gap, 0);
241
+ --hub-body-bg: var(--hub-container-bg, var(--hub-sys-surface-page));
242
+ --hub-body-border-color: var(--hub-container-border-color, var(--hub-sys-border-color-default));
243
+ --hub-body-border-style: var(--hub-container-border-style, solid);
244
+ --hub-body-border-width: var(--hub-container-border-width, var(--hub-ref-border-width, 1px));
245
+ --hub-body-border-radius: var(--hub-container-border-radius, var(--hub-ref-radius-md, 0.375rem));
246
+
247
+ /* main — content region */
248
+ --hub-main-bg: var(--hub-sys-surface-page);
249
+ --hub-main-border-radius: var(--hub-ref-radius-lg, 0.5rem);
250
+ --hub-main-padding-x: var(--hub-ref-space-4, 1.5rem);
251
+ --hub-main-padding-y: var(--hub-ref-space-4, 1.5rem);
252
+
253
+ /* main — centered wrapper around the content region */
254
+ --hub-main-wrapper-bg: var(--hub-sys-surface-page);
255
+ --hub-main-wrapper-border-radius: var(--hub-ref-radius-lg, 0.5rem);
256
+ --hub-main-wrapper-gap: var(--hub-ref-space-4, 1.5rem);
257
+ --hub-main-wrapper-max-width: 1200px;
258
+ --hub-main-wrapper-padding-x: var(--hub-ref-space-4, 1.5rem);
259
+ --hub-main-wrapper-padding-y: var(--hub-ref-space-4, 1.5rem);
260
+ }
261
+
224
262
  /* ============================================================
225
263
  Semantic color generation (CSS-variable-first)
226
264
  A theme sets only ONE accent per variant (--hub-sys-color-{v}).
@@ -344,6 +382,10 @@ $hub-accents-terminal: (
344
382
  --hub-sys-color-secondary: var(--hub-ref-color-gray-600, #6c757d);
345
383
  --hub-sys-color-light: var(--hub-ref-color-gray-100, #f8f9fa);
346
384
  --hub-sys-color-dark: var(--hub-ref-color-gray-900, #212529);
385
+ /* Brand alias — the default accent consumed by component theme mixins
386
+ (e.g. ng-hub-ui-buttons / -badges). Follows the active theme's primary. */
387
+ --hub-sys-color-brand-default: var(--hub-sys-color-primary, #0d6efd);
388
+ --hub-sys-color-brand-on-default: var(--hub-ref-color-white, #fff);
347
389
 
348
390
  /* ----------------------------------------------------------
349
391
  Expressive gradient — theme-aware accent used by the home
@@ -484,7 +526,6 @@ $hub-accents-terminal: (
484
526
  [data-theme='forest'],
485
527
  [data-theme='mono'] {
486
528
  --hub-sys-color-primary: var(--bs-primary, #0d6efd);
487
- --hub-sys-color-primary-dark: var(--bs-primary-text-emphasis, #0a58ca);
488
529
  --hub-sys-color-secondary: var(--bs-secondary, #6c757d);
489
530
  --hub-sys-color-success: var(--bs-success, #198754);
490
531
  --hub-sys-color-danger: var(--bs-danger, #dc3545);
@@ -500,9 +541,15 @@ $hub-accents-terminal: (
500
541
  /* ============================================================
501
542
  LAYER 2 — sys (base alias)
502
543
  Base is equivalent to light theme and works as explicit default.
544
+ Also re-asserted for :root / [data-theme='light'] AFTER the Bootstrap
545
+ bridge above (whose selector also matches :root/light), so the default
546
+ and light themes keep their ref-based accents/surfaces instead of being
547
+ silently overridden by --bs-* when Bootstrap is present.
503
548
  ============================================================ */
504
549
 
505
- [data-theme='base'] {
550
+ :root,
551
+ [data-theme='base'],
552
+ [data-theme='light'] {
506
553
  @include hub-color-accents($hub-accents-light);
507
554
  --hub-sys-color-secondary: var(--hub-ref-color-gray-600, #6c757d);
508
555
  --hub-sys-color-dark: var(--hub-ref-color-gray-900, #212529);