@ids-group-ltd/ids-design-system 0.11.0 → 0.11.2

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +1368 -1021
  2. package/components.md +49 -26
  3. package/design-system.md +18 -18
  4. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1750 -598
  5. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  6. package/migrations/0.10.0.json +19 -19
  7. package/migrations/0.10.1.json +20 -7
  8. package/migrations/0.10.2.json +8 -8
  9. package/migrations/0.10.3.json +2 -2
  10. package/migrations/0.11.0.json +9 -54
  11. package/migrations/0.11.1.json +279 -0
  12. package/migrations/0.11.2.json +158 -0
  13. package/migrations/0.2.0.json +17 -5
  14. package/migrations/0.2.2.json +1 -1
  15. package/migrations/0.3.0.json +1 -1
  16. package/migrations/0.4.0.json +1 -1
  17. package/migrations/0.5.1/badge-statuses.md +1 -3
  18. package/migrations/0.5.1.json +1 -1
  19. package/migrations/0.6.3.json +1 -1
  20. package/migrations/0.7.1.json +6 -6
  21. package/migrations/0.8.0.json +5 -5
  22. package/migrations/0.9.0.json +12 -11
  23. package/migrations/0.9.1.json +2 -2
  24. package/migrations/README.md +34 -52
  25. package/package.json +1 -1
  26. package/styles/_dropdown-overlay.scss +64 -23
  27. package/styles/_ds-color.scss +3 -3
  28. package/styles/_field-box.scss +2 -6
  29. package/styles/_field-label.scss +5 -10
  30. package/styles/_field-state.scss +3 -2
  31. package/styles/_focus.scss +0 -2
  32. package/styles/_layout-utils.scss +2 -2
  33. package/styles/_overlay-motion.scss +2 -3
  34. package/styles/_press.scss +3 -5
  35. package/styles/_reset.scss +0 -1
  36. package/styles/_scrollbar.scss +1 -3
  37. package/styles/_status.scss +1 -2
  38. package/styles/_surface-motion.scss +3 -4
  39. package/styles/_text-clip.scss +1 -1
  40. package/styles/_theme-activation.scss +1 -1
  41. package/styles/_tokens-charts.scss +1 -3
  42. package/styles/_tokens.scss +5 -4
  43. package/styles/_typography.scss +2 -2
  44. package/themes/README.md +6 -6
  45. package/themes/_base-palette.scss +2 -2
  46. package/themes/_semantic.scss +2 -2
  47. package/themes/dark/_palette.scss +1 -2
  48. package/themes/light/_palette.scss +1 -1
  49. package/themes/light/_theme.scss +1 -1
  50. package/types/ids-group-ltd-ids-design-system.d.ts +608 -72
@@ -1,4 +1,3 @@
1
- // Reset — ported from CLAUDE_DESIGN_DS/tokens.css §Base.
2
1
 
3
2
  *, *::before, *::after { box-sizing: border-box; }
4
3
 
@@ -1,5 +1,4 @@
1
- // Scrollbar — ported verbatim from CLAUDE_DESIGN_DS/components-extras.css §Global scrollbar.
2
- // Brand-tinted neutral thumb applied globally.
1
+ // Applied globally, not per component: a consumer gets the thumb without opting in.
3
2
 
4
3
  html { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
5
4
  *::-webkit-scrollbar { width: var(--scrollbar-w); height: var(--scrollbar-w); }
@@ -14,5 +13,4 @@ html { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparen
14
13
  *::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
15
14
  *::-webkit-scrollbar-thumb:active { background: var(--scrollbar-thumb-active); background-clip: padding-box; }
16
15
 
17
- // Global text-selection — sourced from components-extras.css line 910.
18
16
  ::selection { background-color: var(--select-bg-color, color-mix(in srgb, var(--primary) 22%, transparent)); color: var(--text-primary); }
@@ -6,8 +6,7 @@
6
6
  // component keys off [data-status]; these rules set the public --ds-badge-* /
7
7
  // --ds-status-dot-* tokens the components already read.
8
8
  //
9
- // @use 'styles/status' as status; // ds-docs (loadPaths: src/lib)
10
- // // @use '@ids-group-ltd/ids-design-system/styles/status' as status; // external consumer
9
+ // @use '@ids-group-ltd/ids-design-system/styles/status' as status;
11
10
  // @include status.semantic-preset; // optional universal set
12
11
  // @include status.define((
13
12
  // confirmed: (bg: var(--primary-subtitle), text: var(--primary-strong), dot: var(--accent)),
@@ -14,10 +14,9 @@
14
14
  // surface, and swapping presets never loses the surface's own geometry.
15
15
  //
16
16
  // Exit presets mirror the entrances and are swappable the same way, via
17
- // `--ds-<surface>-leave-keyframes`. They were absent until 2026-08-10 for a real
18
- // reason — teardown matched the animation NAME, so renaming the keyframe broke
19
- // closing entirely — and the guard now checks that the event came from the
20
- // animated element rather than from something inside it, which frees the name.
17
+ // `--ds-<surface>-leave-keyframes`. Swapping one is only safe because teardown checks
18
+ // that the animationend came from the animated element rather than matching the
19
+ // animation NAME — a name match would break closing entirely on a renamed keyframe.
21
20
  //
22
21
  // An exit reads `--_ds-exit-*` and falls back to the matching `--_ds-enter-*`, so
23
22
  // a surface that leaves the way it arrived declares nothing: one preset replaces
@@ -3,7 +3,7 @@
3
3
  overflow, and where the line box is tighter than the glyph box that overflow
4
4
  eats the glyph. Mulish measures 1.257em, so --line-height-flat (1) and -tight
5
5
  (1.1) are both under it and shave EVERY label, not only the ones with
6
- descenders (MBP-245). `text-overflow` reads any non-`visible` overflow, so the
6
+ descenders. `text-overflow` reads any non-`visible` overflow, so the
7
7
  ellipsis still applies under `clip`. */
8
8
  overflow: clip;
9
9
  overflow-clip-margin: var(--space-1);
@@ -24,7 +24,7 @@
24
24
  @include light.theme;
25
25
  }
26
26
 
27
- // Brand-gray neutral family — opt-in light-context switch (ds-docs tweaks panel).
27
+ // Brand-gray neutral family — opt-in light-context switch via <html data-neutrals="brand">.
28
28
  // A light-theme feature: dark ships its own neutral ramp and wins below.
29
29
  :root[data-neutrals='brand'] {
30
30
  --neutral-0: var(--brand-gray-0);
@@ -33,9 +33,7 @@
33
33
  --chart-seq-6: var(--blue-900);
34
34
 
35
35
  /* DIVERGENT — red ← neutral → green
36
- Values taken verbatim from the source design prototype
37
- (CLAUDE_DESIGN_DS/patterns.css) so the Excess/Shortage matrix
38
- matches the reference one-for-one. Explicit HSL keeps the ramp
36
+ Explicit HSL keeps the ramp
39
37
  independent of palette retunes — re-skinning brand/red/green
40
38
  should not shift the dataviz colour story. */
41
39
  --chart-div--3: hsl(0deg 70% 40%); /* large negative (worst) */
@@ -108,7 +108,8 @@
108
108
  hue/saturation/lightness become configurable.
109
109
  ============================================================ */
110
110
 
111
- /* --shadow-tint-h/s/l live in themes/light/_palette.scss — palette-level
111
+ /* --shadow-tint-h/s live in themes/_base-palette.scss and -l in each theme's
112
+ _palette.scss — palette-level
112
113
  so dark palettes can override --shadow-tint-l → ~95% for soft light glows. */
113
114
 
114
115
  --shadow-1: 0 1px 2px hsl(var(--shadow-tint-h) var(--shadow-tint-s) var(--shadow-tint-l) / 6%),
@@ -534,7 +535,7 @@
534
535
  --empty-icon-size: var(--space-16); /* 64px */
535
536
  --empty-body-maxw: 360px;
536
537
 
537
- /* Pickers — the listbox panel shared by autocomplete and multi-select. */
538
+ /* Pickers — the listbox panel shared by select, autocomplete and multi-select. */
538
539
  --picker-offset: var(--space-1); /* gap below trigger */
539
540
  --picker-maxh: 280px; /* listbox max height */
540
541
 
@@ -654,7 +655,7 @@
654
655
  }
655
656
 
656
657
  /* ============================================================
657
- Density tiers — applied by Tweaks panel via [data-density]
658
+ Density tiers — set [data-density] on <html> or any container
658
659
  ============================================================ */
659
660
  [data-density="ultra-compact"] {
660
661
  /* Power-user / tradesperson tier: financial dashboards, log viewers,
@@ -662,7 +663,7 @@
662
663
  and WCAG 2.5.8 (24px minimum) margins — acceptable only when:
663
664
  (a) the screen is keyboard-first, (b) input is mouse/keys not
664
665
  touch, (c) accidental-tap risk is low, (d) the user opted in.
665
- Do not enable for mobile / field-ops layouts. */
666
+ Do not enable for mobile or touch-first layouts. */
666
667
  --hit-cozy: 24px;
667
668
  --hit-min: 24px;
668
669
  --check-size: 14px;
@@ -1,5 +1,5 @@
1
- // Type utility classes — ported from CLAUDE_DESIGN_DS/tokens.css §Type utilities.
2
- // These are GLOBAL by design — consumers apply them via class.
1
+ // GLOBAL by design — a consumer applies these by class, so the names are part of the
2
+ // published surface.
3
3
  //
4
4
  // Consumer-first token contract (same as components): every token-driven
5
5
  // property is a longhand read through a public `--ds-t-<name>-*` custom
package/themes/README.md CHANGED
@@ -6,7 +6,7 @@ Colour is layered in three concerns: a **base palette** (theme-independent primi
6
6
 
7
7
  | Layer | Lives in | Examples | Applied at |
8
8
  | ----------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------- |
9
- | **Base palette** (primitives) | `themes/_base-palette.scss` | `--blue-600`, `--cool-gray-*`, `--brand-gray-*`, `--red-h/s/l`, `--static-white`, fonts, `--shadow-tint-h/s` | `:root` (theme-independent) |
9
+ | **Base palette** (primitives) | `themes/_base-palette.scss` | `--blue-600`, `--cool-gray-*`, `--brand-gray-*`, `--red-h/s/l`, `--static-ink`, fonts, `--shadow-tint-h/s` | `:root` (theme-independent) |
10
10
  | **Theme** (role map) | `themes/_semantic.scss` + `themes/<t>/_*.scss` | `--primary`, `--surface-canvas`, `--text-primary`, the `--neutral-*` slot, `--focus-ring` | `:root` (light) / `:root[data-theme='dark']` |
11
11
  | **Component / scale** | `styles/_tokens.scss`, `*.component.scss` | `--space-*`, `--radius-*`, `--ds-button-bg-color`, `--duration-fast` | `:root` (theme-independent) |
12
12
 
@@ -14,7 +14,7 @@ Colour is layered in three concerns: a **base palette** (theme-independent primi
14
14
 
15
15
  ## Files
16
16
 
17
- - **`_base-palette.scss`** — theme-independent primitives at `:root`: hue ramps (`--blue/red/green/yellow/sky/orange-*`) + HSL channels, `--cool-gray-*` / `--brand-gray-*` ramps, `--static-white` / `--static-ink` (never flip), `--shadow-tint-h/s`, font families. Shared by every theme.
17
+ - **`_base-palette.scss`** — theme-independent primitives at `:root`: hue ramps (`--blue/red/green/yellow/sky/orange-*`) + HSL channels, `--cool-gray-*` / `--brand-gray-*` ramps, `--static-ink` (never flips), `--shadow-tint-h/s`, font families. Shared by every theme.
18
18
  - **`_semantic.scss`** — `@mixin roles`: the semantic role map (surfaces, text, icons, borders, primary/secondary/tertiary families, status, status-pills, focus). Structure is identical across themes; values resolve through each theme's own `--neutral-*` ramp. Holds the **light-default** values.
19
19
  - **`light/_palette.scss` + `light/_theme.scss`** — `@mixin palette` (the `--neutral-*` slot = cool-gray + `--shadow-tint-l: 7%`) and `@mixin theme` (`palette` + `semantic.roles`). Light is the **default** skin and needs no extra overrides.
20
20
  - **`dark/_palette.scss` + `dark/_theme.scss`** — `@mixin palette` (dark neutral ramp + `--shadow-tint-l: 95%`) and `@mixin theme` (`palette` + `semantic.roles` + the value overrides that genuinely differ on dark: tint surfaces, on-tint text, hover/pressed mixed toward white, scrim, focus-halo alpha, chart tokens).
@@ -54,7 +54,7 @@ export const appConfig: ApplicationConfig = {
54
54
 
55
55
  It sets `data-theme` from `prefers-color-scheme` at startup and keeps it in sync as the OS changes; a manual `data-theme="dark"` still wins.
56
56
 
57
- On-fill text uses theme-stable `--static-white` / `--static-ink` so it doesn't flip with the neutrals.
57
+ On-fill text is the literal `white`, or the theme-stable `--static-ink` where the fill is light, so neither flips with the neutrals.
58
58
 
59
59
  **Known limitation — `data-neutrals="brand"` + dark:** the brand-gray (hue-derived) neutral switch is a **light-theme feature**. The dark block ships its own neutral ramp and is declared last, so on `data-theme="dark"` the dark neutrals win and the brand-gray tint is ignored. (Benign — renders correct dark, just not brand-tinted neutrals.)
60
60
 
@@ -83,13 +83,13 @@ On-fill text uses theme-stable `--static-white` / `--static-ink` so it doesn't f
83
83
 
84
84
  ```scss
85
85
  @use 'styles/ds';
86
- @use './app/styles/brand-manage-my'; // [data-brand="manage-my"] overrides (light-authored)
86
+ @use './app/styles/brand-acme'; // [data-brand="acme"] overrides (light-authored)
87
87
  ```
88
88
 
89
89
  ## Brand vs theme
90
90
 
91
91
  - **Theme** swaps the whole role map (light ↔ dark). Light is the default; dark is opt-in and, when active, fully replaces light.
92
- - **Brand** is a thin overlay scoped via attribute (`[data-brand="X"]`), authored on a theme. `manage-my` is authored on **light** — pair it with the default (light) theme. A brand that wants dark adds a separate `[data-theme='dark'][data-brand="X"]` layer.
92
+ - **Brand** is a thin overlay scoped via attribute (`[data-brand="X"]`), authored on a theme. A brand authored on **light** pairs with the default (light) theme. A brand that wants dark adds a separate `[data-theme='dark'][data-brand="X"]` layer.
93
93
 
94
94
  ## Adding a new theme
95
95
 
@@ -110,5 +110,5 @@ Components never change — they consume semantic roles, which the active theme
110
110
  - Components never reference base-palette primitives (`--blue-600`, `--neutral-200`) directly — use a Tier-2 role.
111
111
  - Light is the default; dark is opt-in (`data-theme="dark"`); OS-follow is a consumer opt-in. No `prefers-color-scheme` by default.
112
112
  - Themes are sibling and self-contained; `_semantic.scss`'s `@mixin roles` holds the light-default values, dark overrides the deltas.
113
- - Brands are theme-authored overlays. `manage-my` is light.
113
+ - Brands are theme-authored overlays, and a brand authored on light pairs with the default theme.
114
114
  - `--primary-hover`/`--primary-pressed` are auto-derived via `color-mix()` (toward black in light, toward white in dark).
@@ -56,7 +56,7 @@
56
56
  // -----------------------------------------------------------------------
57
57
  // Blue — defined as HSL channels so we can compose hsla() halos and tints
58
58
  // from the same source. #2F54FF ≈ hsl(229, 100%, 59%). This is the ramp the
59
- // default theme maps --primary onto (see styles/_tokens.scss). Naming is
59
+ // default theme maps --primary onto (see themes/_semantic.scss). Naming is
60
60
  // concrete (the colour) — the semantic --primary mapping lives in the lib.
61
61
  // -----------------------------------------------------------------------
62
62
  --blue-h: 229;
@@ -122,7 +122,7 @@
122
122
 
123
123
  // -----------------------------------------------------------------------
124
124
  // Red — HSL-channel-split for halo derivation. #D81F1F ≈ hsl(0, 75%, 49%).
125
- // The default theme maps --error onto this ramp (see styles/_tokens.scss).
125
+ // The default theme maps --error onto this ramp (see themes/_semantic.scss).
126
126
  // -----------------------------------------------------------------------
127
127
  --red-h: 0;
128
128
  --red-s: 75%;
@@ -83,7 +83,7 @@
83
83
  --icon-on-primary: white;
84
84
 
85
85
  /* Semantic → palette bridge. The lib knows colours by PURPOSE; the theme
86
- (themes/light/_theme.scss) ships the concrete ramps + HSL channels. This
86
+ (themes/_base-palette.scss) ships the concrete ramps + HSL channels. This
87
87
  is the one place that maps semantic roles onto a concrete palette. A brand
88
88
  re-skins by overriding either the palette (--blue-*, --red-*) or these
89
89
  role tokens directly.
@@ -119,7 +119,7 @@
119
119
 
120
120
  /* Accent / secondary role — maps onto the palette --orange family (Tier-1),
121
121
  kept distinct from --primary so the brand slots read apart. Override
122
- --secondary-h/s/l per-brand (or via the tweaks panel) to reskin it —
122
+ --secondary-h/s/l per-brand to reskin it —
123
123
  --secondary recomposes automatically. Hover/pressed derive from --secondary
124
124
  so any hue change propagates. */
125
125
  --secondary-h: var(--orange-h);
@@ -15,8 +15,7 @@
15
15
  // --neutral-* directly, so when both `[data-neutrals='brand']` and
16
16
  // `[data-theme='dark']` are set (equal specificity) dark wins by source order —
17
17
  // the brand-gray hue-tint is dropped and these fixed dark neutrals apply. Benign
18
- // (renders correctly dark, just not brand-hue-tinted); a dark brand-gray ramp is
19
- // a future follow-up, not v1.
18
+ // (renders correctly dark, just not brand-hue-tinted).
20
19
  // =========================================================================
21
20
 
22
21
  @mixin palette {
@@ -12,7 +12,7 @@
12
12
  @mixin palette {
13
13
  /* Neutral family slot — semantic pointer at the active gray ramp from the
14
14
  palette. Default: hand-drawn cool-gray. <html data-neutrals="brand">
15
- (ds-docs tweaks panel) repoints it at the brand-derived brand-gray ramp,
15
+ repoints it at the brand-derived brand-gray ramp,
16
16
  where --primary-h re-tints every gray. Roles below consume --neutral-*
17
17
  so the family switch never touches them. */
18
18
  --neutral-0: var(--cool-gray-0);
@@ -2,7 +2,7 @@
2
2
  // Light theme — Tier 2 role assignments (light).
3
3
  //
4
4
  // Composes the light-specific palette (neutral slot + shadow-l) with the
5
- // shared role structure. Light needs no extra role overrides — _roles.scss
5
+ // shared role structure. Light needs no extra role overrides — _semantic.scss
6
6
  // already holds the light-default values.
7
7
  // =========================================================================
8
8