@ids-group-ltd/ids-design-system 0.6.3 → 0.7.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 CHANGED
@@ -8,6 +8,140 @@ While the package is on `0.x`, minor releases may contain breaking changes.
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 0.7.0 — 2026-07-30
12
+
13
+ ### Changed
14
+
15
+ - **BREAKING: the control `size` scale is unified into one shared `DsSize` type.** The per-component
16
+ size types (`InputSize`, `ButtonSize`, `SelectSize`, `SearchSize`, `CheckboxSize`, `RadioSize`,
17
+ `SwitchSize`, `SpinnerSize`, `TextareaSize`, `NumberStepperSize`, `DatePickerSize`, `TimePickerSize`,
18
+ `DrawerSize`, `IconButtonSize`, `AutocompleteSize`) are removed from the public API — import
19
+ `DsSize` instead (`type DsSize = 'sm' | 'md' | 'lg'`, exported from the package root). `AvatarSize`,
20
+ `ModalSize` and `ContainerSize` remain and now extend it (`'xs' | DsSize`, `DsSize | 'xl' | 'fullscreen'`,
21
+ `DsSize | 'xl' | 'full'`). No runtime or visual change — every component's `size` input behaves exactly as before.
22
+
23
+ - **BREAKING: form fields now reserve one line for the message row by default.** Every field
24
+ (`ds-input`, `ds-textarea`, `ds-select`, `ds-autocomplete`, and the other message-bearing controls)
25
+ gains a `reserveMessage` input (default `true`). With it on, the field always keeps a message line's
26
+ worth of vertical space even when there's no hint or error, so a form no longer reflows when
27
+ validation messages appear — the row is there from the start. Set `[reserveMessage]="false"` to
28
+ collapse the space back (the previous behaviour) where the layout can absorb the shift.
29
+
30
+ - **BREAKING: `ds-pagination` drops its manual `(pageChange)` and `(pageSizeChange)` outputs.** They
31
+ duplicated the two-way models — the manual `pageSizeChange` even name-collided with the `pageSize`
32
+ model's own implicit output, and one size change fired the change events three times over. Page and
33
+ size are now driven purely by the `[(currentPage)]` / `[(pageSize)]` two-way models. Migrate
34
+ `(pageChange)="…"` to `(currentPageChange)="…"`; `(pageSizeChange)` keeps working unchanged (it is now
35
+ the `pageSize` model's implicit output, same name and payload). `[(currentPage)]` / `[(pageSize)]`
36
+ bindings are unaffected. (`ds-table` already drove pagination via the models, so it is untouched.)
37
+
38
+ - **BREAKING: `ds-input` drops the `withAddon` / `withAddonRight` inputs.** They hand-declared what the
39
+ DOM already states — and the doc line was wrong (the flag stripped the control's inset rather than
40
+ "reserving space"). The flush-addon layout is now derived automatically: a boxed `.addon` projected
41
+ into `[dsInputPrefix]`/`[dsInputSuffix]` (`<span dsInputPrefix class="addon">…</span>`) sits flush via
42
+ `:has()`, while a bare projected `<ds-icon dsInputPrefix>` correctly keeps its inset. Delete
43
+ `[withAddon]` / `[withAddonRight]` from your templates — a boxed addon renders identically, and a bare
44
+ icon that previously (mis)set the flag regains its proper inset (a bugfix).
45
+
46
+ - **BREAKING: `ds-app-shell` is renamed to `ds-app-layout`.** The slotted fixed-frame application layout
47
+ shipped as `ds-app-shell` in the tagged 0.6.3 source; this renames the selector (`ds-app-shell` →
48
+ `ds-app-layout`), the component class (`AppShellComponent` → `AppLayoutComponent`), the exported scroll
49
+ service (`ShellScrollService` → `LayoutScrollService`), and its four tokens (`--ds-app-shell-pad-x` /
50
+ `-pad-y` / `-content-max-width` / `-height` → `--ds-app-layout-*`). Behaviour is unchanged — rename the
51
+ references (see `migrations/`). A consumer still on 0.6.3's `ds-app-shell` must migrate.
52
+
53
+ ### Added
54
+
55
+ - **New override tokens for two baked-in weights: `--ds-sidenav-item-label-weight` and
56
+ `--ds-modal-title-weight`.** The nav-item label weight and the modal title weight were locked inside a
57
+ `font:` shorthand with no `--ds-*` hook; a brand can now retune either without reaching past the public
58
+ token contract. Defaults unchanged (`--font-weight-semibold` / `--font-weight-bold`).
59
+
60
+ - **`ds-table` gains an opt-in `scrollToTopOnPageChange` input.** With it on, changing page scrolls the
61
+ table back into view, so paging from a bottom pager doesn't leave the viewport on the old page's rows.
62
+ Off by default.
63
+
64
+ - **`ds-search` gains a `size` input (`sm`/`md`/`lg`, default `md`).** Search previously ignored `size`
65
+ and its size CSS never matched, so it sat 4px taller than sibling controls in dense toolbars. `sm` is
66
+ now 32px (matching `ds-input`/`ds-button` at `sm`); the default `md` keeps the prior 36px search-row
67
+ height, so existing consumers are unaffected.
68
+
69
+ - **`ds-table` gains a `total` input for server-side pagination.** Set `[total]` to the full row count
70
+ when the data you pass in is already the current page (fetched from the server); the table then treats
71
+ `data` as pre-paged — it no longer slices it — and drives the pager off `total` instead of the local
72
+ row count. Leave `total` unset (default `null`) to keep the existing client-side paging behaviour.
73
+
74
+ - **`ds-table` gains a `sortingOrder` input.** By default a sortable header cycles
75
+ `asc → desc → unsorted`; pass `[sortingOrder]="['asc','desc']"` to drop the unsorted state (useful with
76
+ server-paged lists that must always send a sort direction). The default is unchanged.
77
+
78
+ - **`ds-table` gains an `animateHeight` input (opt-in).** With `[animateHeight]="true"` the body
79
+ tweens its height when the row set changes (paging, filtering) instead of snapping — the flicker
80
+ when a full page gives way to a short one. Off by default; instant under reduced-motion (it reads the
81
+ DS `--duration-*` token, which the reduced-motion reset zeroes).
82
+
83
+ - **`TableColumn` gains an optional `srLabel`.** Provides a visually-hidden accessible name for columns
84
+ whose visible `label` is intentionally empty (e.g. an actions column), so screen-reader users still
85
+ hear a column name.
86
+
87
+ - **`ds-badge` gains a `countLabel` input (default `'notifications'`).** The count's accessible label was
88
+ hard-coded to `"N notifications"`; set `countLabel` for non-notification counts (`'items in cart'`,
89
+ `'results'`, …).
90
+
91
+ - **`ds-avatar` gains deterministic seeded tinting.** Pass `[seed]` (a user id, email or name) and the
92
+ avatar derives a stable per-person background + auto-contrast text colour, so the same person gets the
93
+ same colour across the product; `[avoidHues]` excludes hue arcs (e.g. a brand colour), and `[tint]` now
94
+ also accepts `'neutral'`. The maths ships standalone too — `avatarTint(seed, options)` returns an OKLCH
95
+ background (`AvatarTintOptions`: `avoidHues` / `lightness` / `chroma` / `foreground`) with a
96
+ WCAG-luminance black-or-white foreground, and `initialsFrom(first, last)` (which also accepts a single
97
+ full-name string) — both exported from the package root.
98
+
99
+ - **`ds-sidenav-item` gains an `(activate)` output.** Emitted on click, carrying the `MouseEvent`. On an
100
+ `href` item, `preventDefault()` intercepts navigation (e.g. a sidebar driving its own scroll-spy); a
101
+ `routerLink` item navigates regardless (Angular's `RouterLink` ignores `defaultPrevented`), so it's a
102
+ click hook there. Additive; omit it to navigate as before, keeping active/badge/tooltip/collapse intact.
103
+
104
+ - **`BodyScrollLockService` is now exported.** The ref-counted body-scroll lock that `ds-modal` /
105
+ `ds-drawer` / `ds-bottom-sheet` share is injectable, so a consumer's own full-screen overlay can
106
+ participate in the same lock instead of fighting it (`lock()` / `unlock()`, paired).
107
+
108
+ ### Fixed
109
+
110
+ - **`ds-menu`: disabled items are now keyboard-reachable.** A disabled `ds-menu-item` was dropped from the
111
+ roving-tabindex nav (unreachable by keyboard) and rendered a native `disabled` button; it now uses
112
+ `aria-disabled` and stays in the arrow / type-ahead order (ARIA menu practice), so a keyboard user can
113
+ focus it — and a `[dsTooltip]` on it now shows on focus, surfacing a "why is this disabled" reason.
114
+ Activation stays blocked. (Reliable screen-reader announcement of that reason is a separate follow-up —
115
+ the tooltip's `aria-describedby` currently lands on the `role="none"` host, not the inner button.)
116
+
117
+ - **Stacked overlays no longer unlock body scroll under each other.** `ds-modal`, `ds-drawer` and
118
+ `ds-bottom-sheet` each wrote `body.style.overflow` directly, so closing the outer of two stacked
119
+ overlays re-enabled page scroll while the inner one was still open. They now share a ref-counted
120
+ `BodyScrollLockService` — the first lock hides `body` overflow, the last unlock restores it.
121
+
122
+ - **`ds-avatar`: `--ds-avatar-size` now applies at every size, not just `md`.** The `xs`/`sm`/`lg`
123
+ modifiers set `width`/`height` directly, silently ignoring a consumer's `--ds-avatar-size`; they now
124
+ route through the same private var the token feeds, so an override wins at any size.
125
+
126
+ - **`ds-table`: an out-of-range page is clamped back into range.** When a client-side filter shrinks the
127
+ result set below the current page, the table now pulls `page` down to the last page that has rows
128
+ instead of rendering an empty body (guarded to client paging — with `total` set the host owns the clamp).
129
+
130
+ - **`ds-sidenav`: collapsed items no longer overflow by 1px.** A collapsed item was sized to the
131
+ `--sidenav-collapsed-item` hit target, 1px wider than the rail's content box (border-box minus padding
132
+ and the right border), which produced a hairline horizontal scrollbar. Collapsed items now fill the
133
+ available width, and the rail clips any residual x-overflow.
134
+
135
+ - **`dsTooltip`: keyboard focus now shows and hides the tip reliably, and panels no longer strand.** The
136
+ directive listened on `focus`/`blur`, which don't fire for focus moving between descendants; it now uses
137
+ the bubbling `focusin`/`focusout`, so tooltips on composite controls open and close as focus enters and
138
+ leaves. A re-rendered anchor under a stationary cursor could also leave a panel open — `show()` now
139
+ disposes any existing overlay first, and activation (`click`) dismisses too.
140
+
141
+ - **`ds-select`: the clear (×) button is now keyboard-operable.** It was a non-focusable `<span>`; it is
142
+ now a real `<button aria-label="Clear selection">`, and the trigger is a focusable `role="combobox"`
143
+ container so the nested button is valid.
144
+
11
145
  ## 0.6.3 — 2026-07-27
12
146
 
13
147
  ### Added