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

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 (81) hide show
  1. package/CHANGELOG.md +319 -12
  2. package/components.md +35 -12
  3. package/design-system.md +135 -1
  4. package/docs/agent/INDEX.md +99 -0
  5. package/docs/agent/domain/ds-w3w.md +10 -0
  6. package/docs/agent/feedback/ds-alert.md +9 -0
  7. package/docs/agent/feedback/ds-avatar-group.md +7 -0
  8. package/docs/agent/feedback/ds-avatar.md +6 -0
  9. package/docs/agent/feedback/ds-badge.md +7 -0
  10. package/docs/agent/feedback/ds-banner.md +10 -0
  11. package/docs/agent/feedback/ds-empty-state.md +7 -0
  12. package/docs/agent/feedback/ds-progress.md +7 -0
  13. package/docs/agent/feedback/ds-skeleton.md +6 -0
  14. package/docs/agent/feedback/ds-spinner.md +6 -0
  15. package/docs/agent/feedback/ds-stat.md +7 -0
  16. package/docs/agent/feedback/ds-status-dot.md +6 -0
  17. package/docs/agent/feedback/ds-tag.md +8 -0
  18. package/docs/agent/feedback/ds-toast.md +12 -0
  19. package/docs/agent/forms/ds-autocomplete.md +9 -0
  20. package/docs/agent/forms/ds-button.md +14 -0
  21. package/docs/agent/forms/ds-checkbox.md +6 -0
  22. package/docs/agent/forms/ds-date-picker.md +7 -0
  23. package/docs/agent/forms/ds-dropzone.md +10 -0
  24. package/docs/agent/forms/ds-icon-button.md +10 -0
  25. package/docs/agent/forms/ds-input.md +22 -0
  26. package/docs/agent/forms/ds-multi-select.md +6 -0
  27. package/docs/agent/forms/ds-number-stepper.md +8 -0
  28. package/docs/agent/forms/ds-radio.md +6 -0
  29. package/docs/agent/forms/ds-search.md +10 -0
  30. package/docs/agent/forms/ds-select.md +7 -0
  31. package/docs/agent/forms/ds-switch.md +6 -0
  32. package/docs/agent/forms/ds-textarea.md +9 -0
  33. package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +21 -0
  34. package/docs/agent/foundations/global-helper-classes.md +18 -0
  35. package/docs/agent/foundations/grid.md +35 -0
  36. package/docs/agent/foundations/tokens.md +47 -0
  37. package/docs/agent/navigation/ds-app-layout.md +10 -0
  38. package/docs/agent/navigation/ds-auth-layout.md +9 -0
  39. package/docs/agent/navigation/ds-breadcrumbs.md +7 -0
  40. package/docs/agent/navigation/ds-divider.md +9 -0
  41. package/docs/agent/navigation/ds-page-footer.md +7 -0
  42. package/docs/agent/navigation/ds-page-header.md +8 -0
  43. package/docs/agent/navigation/ds-pagination.md +7 -0
  44. package/docs/agent/navigation/ds-sidenav-group.md +8 -0
  45. package/docs/agent/navigation/ds-sidenav-item.md +9 -0
  46. package/docs/agent/navigation/ds-sidenav.md +9 -0
  47. package/docs/agent/navigation/ds-stepper.md +6 -0
  48. package/docs/agent/navigation/ds-tabs.md +9 -0
  49. package/docs/agent/navigation/ds-topbar.md +8 -0
  50. package/docs/agent/overlays/ds-bottom-sheet.md +9 -0
  51. package/docs/agent/overlays/ds-drawer.md +9 -0
  52. package/docs/agent/overlays/ds-menu.md +8 -0
  53. package/docs/agent/overlays/ds-modal-card.md +6 -0
  54. package/docs/agent/overlays/ds-modal.md +8 -0
  55. package/docs/agent/overlays/ds-popover.md +6 -0
  56. package/docs/agent/overlays/ds-tooltip.md +8 -0
  57. package/docs/agent/platform/body-scroll-lock-service.md +12 -0
  58. package/docs/agent/platform/breadcrumbs-service.md +30 -0
  59. package/docs/agent/platform/ds-config.md +60 -0
  60. package/docs/agent/platform/ds-icon-registry.md +23 -0
  61. package/docs/agent/platform/toast-service.md +17 -0
  62. package/docs/agent/surfaces/ds-accordion.md +8 -0
  63. package/docs/agent/surfaces/ds-card.md +10 -0
  64. package/docs/agent/tables/ds-table.md +15 -0
  65. package/fesm2022/ids-group-ltd-ids-design-system.mjs +924 -763
  66. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  67. package/migrations/0.11.3.json +152 -0
  68. package/migrations/0.11.4.json +241 -0
  69. package/migrations/0.8.0.json +6 -5
  70. package/package.json +1 -1
  71. package/styles/_control-label.scss +18 -0
  72. package/styles/_dropdown-overlay.scss +25 -32
  73. package/styles/_ds-color.scss +37 -12
  74. package/styles/_focus.scss +16 -0
  75. package/styles/_skeleton-shimmer.scss +10 -26
  76. package/styles/_tokens-charts.scss +2 -3
  77. package/styles/_tokens.scss +158 -321
  78. package/themes/README.md +32 -1
  79. package/themes/_base-palette.scss +35 -76
  80. package/themes/_semantic.scss +16 -4
  81. package/types/ids-group-ltd-ids-design-system.d.ts +205 -230
@@ -1,3 +1,7 @@
1
+ @use 'sass:list';
2
+
3
+ $families: secondary, tertiary, error, success, warning;
4
+
1
5
  // Scoped accent recolour. A `ds-color="<family>"` attribute — on a zone
2
6
  // container, on a component host, or applied via the ds.color() mixin in
3
7
  // consumer config — flips the --accent-* pointer family to another brand/status
@@ -7,28 +11,49 @@
7
11
  // per instance. With no attribute, --accent-* stays the primary family (see
8
12
  // themes/_semantic.scss), so the default theme is unchanged.
9
13
 
14
+ // Each pointer ends in a fallback, because a role a family does not define is not a wrong
15
+ // colour: it is a GUARANTEED-INVALID value, so every declaration reading the pointer becomes
16
+ // invalid at computed-value time and resets to `unset` — a label rendered as body text, a fill
17
+ // rendered transparent, and nothing in the console either way. Where the fallback leads differs
18
+ // by pointer and is deliberate: -hover, -pressed and -strong fall back to the family's own base
19
+ // colour, the tint pointers to the family's -muted, and -on and the two focus pointers to the
20
+ // theme-wide role, since no family-shaped answer exists for them.
10
21
  @mixin family-vars($family) {
11
22
  --accent: var(--#{$family});
12
- --accent-hover: var(--#{$family}-hover);
13
- --accent-pressed: var(--#{$family}-pressed);
14
- --accent-strong: var(--#{$family}-strong);
15
- --accent-subtitle: var(--#{$family}-subtitle);
16
- --accent-muted: var(--#{$family}-muted);
17
- --accent-muted-strong: var(--#{$family}-muted-strong);
18
- --accent-on: var(--#{$family}-on);
19
- --accent-focus-ring: var(--focus-ring-#{$family});
20
- --accent-focus-field: var(--focus-field-#{$family});
21
- --accent-surface-tint: var(--#{$family}-subtitle);
23
+ --accent-hover: var(--#{$family}-hover, var(--#{$family}));
24
+ --accent-pressed: var(--#{$family}-pressed, var(--#{$family}));
25
+ --accent-strong: var(--#{$family}-strong, var(--#{$family}-text, var(--#{$family})));
26
+ --accent-subtitle: var(--#{$family}-subtitle, var(--#{$family}-muted));
27
+ --accent-muted: var(--#{$family}-muted, var(--surface-muted));
28
+ --accent-muted-strong: var(--#{$family}-muted-strong, var(--#{$family}-muted));
29
+ --accent-on: var(--#{$family}-on, var(--text-on-primary));
30
+ --accent-focus-ring: var(--focus-ring-#{$family}, var(--focus-ring));
31
+ --accent-focus-field: var(--focus-field-#{$family}, var(--focus-field));
32
+ --accent-surface-tint: var(--#{$family}-subtitle, var(--#{$family}-muted));
33
+
34
+ // Re-declared rather than left to inherit: `--focus-ring-color: var(--accent)` on :root
35
+ // substitutes ON :root, so the brand hue is what reaches this subtree already resolved. The flat
36
+ // outline colour has to be written again where the accent actually changed, or a focused row
37
+ // inside an error zone rings brand-blue while every other accent around it is red.
38
+ --focus-ring-color: var(--#{$family});
22
39
  }
23
40
 
24
41
  /// Recolour the DS accent for a type or scope from consumer SCSS, e.g.
25
42
  /// `ds-switch { @include ds.color(secondary); }`.
43
+ ///
44
+ /// A name outside $families is refused rather than emitted. Without this the mixin accepts any
45
+ /// string and writes `--accent: var(--<whatever>)`, which is guaranteed-invalid — so every rule
46
+ /// reading the accent resets to `unset` and the subtree renders as body text, with nothing in the
47
+ /// console. That is the failure `check-color-families.mjs` exists to prevent, and it is the one
48
+ /// form of it no CSS-side check can see: a consumer's `@include` never reaches our compiled output.
26
49
  @mixin color($family) {
50
+ @if not list.index($families, $family) {
51
+ @error 'ds.color(): unknown family "#{$family}". Available: #{$families}.';
52
+ }
53
+
27
54
  @include family-vars($family);
28
55
  }
29
56
 
30
- $families: secondary, tertiary, error, success, warning;
31
-
32
57
  @each $family in $families {
33
58
  [ds-color='#{$family}'] {
34
59
  @include family-vars($family);
@@ -25,6 +25,22 @@
25
25
  }
26
26
  }
27
27
 
28
+ // The indicator for something that must ring with an `outline` rather than the shadow — a
29
+ // row inside a clipping list, a swatch in a grid — where the outset halo is eaten by the
30
+ // `overflow` ancestor.
31
+ //
32
+ // `box-shadow: none` is the load-bearing line: the blanket rule above still paints, so five
33
+ // components drew BOTH, an accent halo outside and their own outline inside it.
34
+ //
35
+ // Usage — @include inside the element's own `&:focus-visible` block:
36
+ // @use '../../styles/focus' as focus;
37
+ // &:focus-visible { @include focus.outline-indicator(calc(-1 * var(--border-width-strong))); }
38
+ @mixin outline-indicator($offset: var(--focus-ring-offset)) {
39
+ outline: var(--border-width-strong) solid var(--focus-ring-color);
40
+ outline-offset: $offset;
41
+ box-shadow: none;
42
+ }
43
+
28
44
  :root[data-focus='ring'] {
29
45
  --ds-field-focus-shadow: var(--focus-ring);
30
46
  --ds-field-focus-shadow-error: var(--focus-ring-error);
@@ -1,32 +1,16 @@
1
- // Global skeleton shimmer driver.
1
+ // Reduced-motion opt-out for the skeleton shimmer.
2
2
  //
3
- // All <ds-skeleton> instances on the page reveal the same moving slice by
4
- // reading a shared, viewport-anchored offset (--skeleton-shimmer-x). The
5
- // offset is animated ONCE on :root so every skeleton stays in lock-step with
6
- // every other — no per-element animation timers drifting against each other.
3
+ // The travel itself is a per-element animation declared in skeleton.component.scss. Only this rule
4
+ // has to be global: the media query is a document-level preference, and a component stylesheet
5
+ // cannot express "stop wherever a skeleton appears" without one.
7
6
  //
8
- // @property registration is required so the browser can interpolate the
9
- // custom property continuously instead of treating it as a discrete switch
10
- // at 0%/100%. Chrome 85+, Edge 85+, Firefox 128+, Safari 16.4+.
11
-
12
- @property --skeleton-shimmer-x {
13
- syntax: '<length>';
14
- inherits: true;
15
- initial-value: 100vw;
16
- }
17
-
18
- :root {
19
- animation: ds-skeleton-shimmer-loop var(--duration-loop-slow, 1400ms) linear infinite;
20
- }
21
-
22
- @keyframes ds-skeleton-shimmer-loop {
23
- 0% { --skeleton-shimmer-x: 100vw; }
24
- 100% { --skeleton-shimmer-x: -100vw; }
25
- }
26
-
27
- // Honour the user's reduced-motion preference — no shimmer travel.
7
+ // Do NOT drive it from one animated custom property on :root instead, however tempting the
8
+ // phase-lock between skeletons is: a REGISTERED custom property is a computed value, so animating
9
+ // one invalidates the style of every element that could inherit it — the whole document, every
10
+ // frame. And the phase-lock buys no viewport anchoring anyway, because `mask-position` measures
11
+ // from the host's own box.
28
12
  @media (prefers-reduced-motion: reduce) {
29
- :root {
13
+ ds-skeleton::after {
30
14
  animation: none;
31
15
  }
32
16
  }
@@ -1,6 +1,5 @@
1
- /* ============================================================
2
- Boilerplate — Chart / dataviz tokens
3
- ------------------------------------------------------------
1
+ /* Chart and dataviz tokens.
2
+
4
3
  Categorical: 8 hues, ordered by perceptual distance not
5
4
  ramp position. First six are AA against both light and
6
5
  dark surface-default; the last two are reserved for