@ids-group-ltd/ids-design-system 0.10.2 → 0.10.3

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
@@ -8,6 +8,65 @@ While the package is on `0.x`, minor releases may contain breaking changes.
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 0.10.3 — 2026-08-24
12
+
13
+ ### Added
14
+
15
+ - **Two SCSS mixins for building your own composite controls** (`components.md` § Global helper
16
+ classes). `focus.owns-the-focus-ring($control)` — include it in a shell that paints its own ring
17
+ on `:focus-within`, naming the ONE control inside that must not paint the base indicator too.
18
+ `outline: 0` cannot do that, because the base indicator is a box-shadow, and a box-wide reset
19
+ instead silences the tab stops living in the box — a clear button, a stepper arrow. It is the
20
+ mixin `tools/check-focus-rings.mjs` checks for. `text-clip.single-line-ellipsis` — a one-line
21
+ label that truncates with an ellipsis, via `overflow: clip` plus `overflow-clip-margin`, because
22
+ `hidden` under a line-height tighter than the font glyph box shaves the top and bottom off every
23
+ glyph. `@use 'styles/focus'` / `@use 'styles/text-clip'` to reach them; a mixin emits nothing until
24
+ it is included.
25
+
26
+ ### Fixed
27
+
28
+ - **`ds-input` and `ds-textarea` were the two shells 0.10.2's ring fix missed.** Same defect and same
29
+ cause as "One focus ring per field, not two" below: the universal `:where(:focus-visible)` shadow
30
+ lands on the inner element, the box paints its own halo on `:focus-within`, and the `outline: 0`
31
+ both already had cannot cancel a shadow. So the two plainest fields in the library went on drawing
32
+ a 4px control ring around the `<input>`/`<textarea>` **and** a 3px field halo around the box.
33
+ **They were missed because that pass trusted the shell list written in `styles/_focus.scss` rather
34
+ than measuring.** A browser sweep — 9,968 focusable elements over 64 pages, transitions disabled so
35
+ every computed shadow is final — found exactly these two and nothing else in the library. The reset
36
+ stays scoped to the field element, so `clear-btn` and `password-toggle` inside the same box keep
37
+ their own rings; they are real tab stops.
38
+ - **The token reference was missing 11 public tokens that were always overridable.**
39
+ `tools/extract-tokens.mjs` searched for the literal `var(--ds-`, so any resolver whose declaration
40
+ wrapped across lines put a newline between `var(` and the name and the token silently never reached
41
+ the reference. Newly listed and described: `--ds-container-pad-x`, `--ds-multi-select-border-color`
42
+ (+`-focus`), `--ds-segmented-selected-bg-color` / `-label-color` / `--ds-segmented-radius`,
43
+ `--ds-time-picker-option-bg-color-selected` / `-text-color-selected` / `-bg-color-hover`, and
44
+ `--ds-time-picker-trigger-bg-color` / `-border` / `-color`. Nothing changed in the components —
45
+ these overrides already worked; only the documentation was blind to them.
46
+ - **Two buttons inside portaled panels had no focus indicator, and one panel had square corners — a
47
+ private token read from outside the host that declares it.** `ds-date-picker`'s `.period-trigger`
48
+ (the month/year header, `tabindex="0"`) and `ds-time-picker`'s `.time-action` both did
49
+ `box-shadow: var(--_…-focus-shadow)` beside `outline: none`. Those private tokens are declared on
50
+ `:host`, the panels are portaled out of it by the CDK, so the `var()` resolved to nothing — and an
51
+ unresolvable `var()` makes `box-shadow` its initial value, `none`. Measured: resting and focused
52
+ paint were byte-identical on both, so a keyboard user landing there saw nothing. Another WCAG 2.4.7
53
+ failure, and older than the 0.10.x focus work. `ds-time-picker`'s panel `border-radius` read the
54
+ same way and fell back to `0`, so the panel rendered square instead of `--ds-radius-panel`.
55
+ **Found by opening each overlay and probing inside it** — the earlier sweeps only ever saw
56
+ focusables that exist while the overlay is closed. `ds-select`, `ds-multi-select` and
57
+ `ds-autocomplete` panels were checked the same way and are clean.
58
+ - **`ds-search`'s clear button had no focus indicator at all — introduced by 0.10.2's own ring fix.**
59
+ That fix silenced the base indicator with a shell-wide reset, which also hit `.search-clear`, a
60
+ `tabindex="0"` tab stop. Measured: with the field's halo already lit, tabbing from the input to the
61
+ × changed **no** paint property anywhere on screen — box-shadow, outline, border, background and
62
+ colour were byte-identical in both states, so a keyboard user could not tell the × had focus. A
63
+ WCAG 2.4.7 failure, and the same defect as the double ring seen from the other side. Every shell now
64
+ names the one control it speaks for through the new `focus.owns-the-focus-ring($control)` mixin
65
+ instead of blanketing its box, and `ds-field-group` drops its blanket entirely — each segment
66
+ already silences its own. `tools/check-focus-rings.mjs` fails the build when a component paints a
67
+ ring on `:focus-within` without silencing the base rule; it replaces the hand-kept shell list in
68
+ `styles/_focus.scss` that had been wrong for two releases.
69
+
11
70
  ## 0.10.2 — 2026-08-24
12
71
 
13
72
  ### Added
package/components.md CHANGED
@@ -112,6 +112,11 @@ The DS aggregate (`@use 'styles/ds'`) forwards the full stack: theme primitives
112
112
  - Skeleton shimmer (`_skeleton-shimmer.scss`): drives the global `--skeleton-shimmer-x` keyframe used by `<ds-skeleton>` and table skeleton rows.
113
113
  - Dropdown overlay (`_dropdown-overlay.scss`): styles the `.ds-dropdown-panel` class used by select/dropdown/combobox/date-picker CDK portals — these panels live outside the host's encapsulated tree, so the styles must be global.
114
114
 
115
+ **Two mixins for building your own composite controls.** `@use` the partial directly to reach the mixin; a mixin emits nothing until it is included.
116
+
117
+ - `@use 'styles/focus' as focus;` → `focus.owns-the-focus-ring($control)`. This partial IS part of the `styles/ds` aggregate — it also carries the base indicator and the `data-focus` switch — so reaching for the mixin adds no CSS. Include it in a shell that paints its own ring on `:focus-within`, naming the ONE control inside that must not paint the base indicator too. `outline: 0` cannot do this — the base indicator is a box-shadow — and a box-wide reset instead of a named control silences the tab stops inside the box (a clear button, a stepper arrow), which leaves a keyboard user unable to tell what has focus. See Foundations → Colour → Focus for the worked example.
118
+ - `@use 'styles/text-clip' as text-clip;` → `text-clip.single-line-ellipsis`. Mixin-only, so this partial is NOT part of the `styles/ds` aggregate and emits nothing on its own. A one-line label that truncates with an ellipsis. Use it instead of hand-writing `overflow: hidden; text-overflow: ellipsis`: with a line-height under the font's glyph box (Mulish measures 1.257em, so `--line-height-flat` and `--line-height-tight` both qualify) that `hidden` shaves the top and bottom off every glyph.
119
+
115
120
  ---
116
121
 
117
122
  ## Components