@ids-group-ltd/ids-design-system 0.14.6 → 0.14.7

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 (63) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/components.md +5 -4
  3. package/docs/agent/forms/ds-button.md +2 -2
  4. package/docs/agent/overlays/ds-drawer.md +1 -1
  5. package/docs/agent/overlays/ds-modal-card.md +1 -1
  6. package/docs/agent/overlays/ds-modal.md +1 -1
  7. package/docs/agent/platform/toast-service.md +1 -0
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +4 -4
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +16 -9
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +16 -8
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -3
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +68 -10
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +15 -5
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +63 -11
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +96 -5
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +4 -4
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +14 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +18 -10
  39. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +126 -9
  41. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +17 -6
  43. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +5 -2
  45. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  48. package/migrations/0.14.7.json +140 -0
  49. package/migrations/0.4.0.json +3 -1
  50. package/package.json +1 -1
  51. package/schematics/check-overrides/surface.json +9 -10
  52. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +4 -2
  53. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +4 -3
  54. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +1 -1
  55. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +19 -4
  56. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -1
  57. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +21 -4
  58. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +22 -3
  59. package/types/ids-group-ltd-ids-design-system-components.d.ts +7 -2
  60. package/types/ids-group-ltd-ids-design-system-core.d.ts +33 -3
  61. package/types/ids-group-ltd-ids-design-system-icons.d.ts +3 -1
  62. package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -2
  63. package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,103 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.14.7 — 2026-10-05
4
+
5
+ ### Added
6
+
7
+ - **`ds-pie-chart` takes `centerCompact` and `centerPlacement`.** `[centerCompact]="false"` keeps the
8
+ full sum at the floor font size instead of the compact form. `centerPlacement="below"` prints the
9
+ value and its caption under the ring at full size, never shrunk or shortened; the default is
10
+ `'inside'`. `PieChartCenterPlacement` is the type of the latter. The
11
+ `--ds-pie-chart-center-value-min-font-size` token sets the smallest size the value shrinks to.
12
+ `PieChartComponent` gained the protected `centerText` and `centerFontSize` and the private
13
+ `compactCenterValue`, `ringElement`, `centerValueElement`, `centerFit`, `ringWidth`, `fitsInside`,
14
+ `fitCenter`, `watchRing` and `refit`, so a subclass declaring one of those names must rename it.
15
+
16
+ - **`dsModalConfirm` fires a modal's `confirmed`.** Put it on the confirm action inside `ds-modal`
17
+ (`ModalConfirmActionDirective`, exported from the modal entry point) and `(confirmed)` fires when
18
+ that action is pressed. On a `ds-button` it follows `pressed`, so a disabled or loading button never
19
+ confirms; on another element it follows `click` and skips `aria-disabled="true"`. The modal stays
20
+ open until you close it.
21
+
22
+ - **Dev warnings show as toasts too.** In dev mode every library warning that reaches the console is
23
+ also shown as a `warning` toast titled "Dev warning", once per message, as soon as the app has
24
+ injected `ToastService`; warnings raised before that show then, up to 50. A production build
25
+ shows none. On by default; `provideDsConfig({ toast: { mirrorDevWarnings: false } })` keeps them
26
+ in the console only.
27
+
28
+ ### Fixed
29
+
30
+ - **`ds-pie-chart` keeps its centre value on one line.** A value wider than the hole broke between
31
+ its digits, so `32,397` read as `32,39` over `7`. The value no longer wraps: it shrinks to the hole,
32
+ down to `--ds-pie-chart-center-value-min-font-size` (default `14px`), and past that floor the sum
33
+ prints in the `'tick'` form of `valueFormat` (`32.4K`). A `centerValue` string is shrunk but never
34
+ shortened.
35
+
36
+ - **A chart's pin sits under its panel.** `ds-chart` drew the disc of a held category at the foot of
37
+ the plot, far from its panel; it now sits at the head of the reading the panel
38
+ opens over, 8px inside a column's top or 8px below a marker; over a column too short to hold it,
39
+ the disc sits 8px above the column and its value and the panel rises over the disc. The same holds
40
+ for a column pinned in `ds-column-chart` or a `dsColumnSeries`. `ds-bar-chart` draws it at the
41
+ middle of the held bar, under its panel, rather than at the bar's start. In `ds-line-chart`, a line
42
+ series in `ds-chart` and `ds-scatter-chart`, the disc over a held marker or point sits 4px higher.
43
+ `ChartComponent` gained the protected `highlightBand` and `tooltipGap` and the private `bandAt`,
44
+ `hoveredCategory` and `pinRise`, and `ColumnSeriesComponent` the private `pinYOf`, so a subclass
45
+ declaring one of those names must rename it. `ChartComponent`'s protected `bandPinY` is now a
46
+ computed signal read as `bandPinY()`, where it was a method taking the band, so a subclass that
47
+ calls `bandPinY(band)` or overrides it as a method must read or override the signal instead.
48
+
49
+ - **A held category is not highlighted.** The hover band of `ds-chart` stayed painted on a pinned
50
+ category after the pointer left; under a pin the band now follows the pointer alone, and nothing
51
+ stays highlighted once it leaves the plot.
52
+
53
+ - **`provideDsIcons` calls add up.** A second call, as a sibling or in a lazy route's providers,
54
+ replaced the icons registered before it; the calls now merge, a later call winning a shared name.
55
+
56
+ - **A disabled link-button with `disabledReason` stays reachable by Tab.** A `ds-button` with
57
+ `routerLink` or `href`, `disabled` and a `disabledReason` was taken out of the Tab order, so its
58
+ reason was never announced; it now keeps its Tab stop and link role, and still swallows the click.
59
+ A disabled `routerLink` button is announced as a link with or without a reason.
60
+
61
+ - **`ds-avatar-group` applies `max` to the projected avatars.** Avatars past `max` are hidden,
62
+ and with `total` unset the `+N` chip counts the projected avatars; the group showed every
63
+ projected avatar and drew no chip without `total`. `AvatarGroupComponent` gained a private
64
+ `avatars`, so a subclass declaring that name must rename it: `override` cannot reach a private
65
+ member.
66
+
67
+ - **`provideDsTheme({ followSystem: true })` keeps a `data-theme` set before startup.** A
68
+ `data-theme` already on `<html>` when the app starts, from `index.html` or a script that restores a
69
+ saved choice, is kept, and OS colour-scheme changes no longer override it. Without the attribute,
70
+ the theme follows the OS as before.
71
+
72
+ - **`ds-bar-chart` draws a negative value as an empty track.** A row with a negative `value`
73
+ drew a bar as long as its absolute value and was labelled `0`; it now draws no bar, and its label,
74
+ tooltip and accessible name show the real value.
75
+
76
+ - **Topbar and page-header breadcrumb tokens take effect.** `--ds-topbar-crumb-text-color`,
77
+ `--ds-topbar-crumb-hover-text-color`, `--ds-topbar-crumb-separator-icon-color`,
78
+ `--ds-topbar-crumb-current-text-color`, `--ds-page-header-crumb-text-color` and
79
+ `--ds-page-header-crumb-text-color-hover` changed nothing; they now recolour the projected
80
+ `ds-breadcrumbs`. Unset, the breadcrumbs keep their own `--ds-breadcrumbs-*` colours.
81
+
82
+ - **The `ds-banner` icon centres on the capitals of the text.** It centred on the line boxes, leading
83
+ included, and a banner with no `title` kept the title-to-body gap above its body, so the icon sat
84
+ up to 2px above the letters. Where `text-box` is supported (Chromium, Safari) the icon now lines up
85
+ with the capitals, compact or not, with or without a title. A banner with no `title` and a body of
86
+ more than one line is up to 4px shorter; every other banner keeps its height.
87
+
88
+ - **Content without a slot attribute shows in `ds-modal`, `ds-modal-card` and `ds-drawer`.** A
89
+ child with no slot attribute, or with one the overlay does not have, was dropped silently; it now
90
+ renders in the body after `[body]` / `[drawer-body]`, and in dev mode the console asks for its
91
+ slot (`<div body>`, `<div drawer-body>`) or names the unknown one. `ds-drawer` also takes
92
+ `[body]` for its body and `[actions]` for its footer, the slot names of `ds-modal`.
93
+ `ModalComponent`, `ModalCardComponent` and `DrawerComponent` gained the private `unslotted`,
94
+ so a subclass declaring that name must rename it.
95
+
96
+ - **A dev warning logs once per page.** An identical warning from many instances, such as one per
97
+ `ds-button` with the same discouraged `color` and `variant`, reached the console once per
98
+ instance; it now logs once. The `ds-table` export warning starts with `[ds-table]` like the
99
+ others, and the `ds-app-layout` missing `--bp-lg` message is a warning rather than an error.
100
+
3
101
  ## 0.14.6 — 2026-10-02
4
102
 
5
103
  ### Breaking
package/components.md CHANGED
@@ -770,14 +770,14 @@ All inputs: `title: required string`, `expanded: boolean = false`, `disabled: bo
770
770
  #### `<ds-modal>` — `ModalComponent`
771
771
  Inputs: `open: model<boolean> = false`, `size: 'sm' | 'md' | 'lg' = 'md'`, `danger: boolean = false`, `title: required string`
772
772
  Output: `(closed): void` — fires on backdrop click, close button, or `open` being set to false. `(confirmed)` is declared on the component but no internal handler emits it; treat it as not implemented and emit confirmation from the consumer-side action button instead.
773
- Content slots: `[body]`, `[impact]` (highlighted strip under the body for destructive consequences), `[actions]` (footer button row). Backdrop click + close button close the dialog.
773
+ Content slots: `[eyebrow]`, `[title-badge]`, `[body]`, `[impact]` (highlighted strip under the body for destructive consequences), `[actions]` (footer button row). Content with no slot attribute renders in the body after `[body]`; in dev mode it logs a warning asking for `<div body>`, and an unknown slot name such as `<div footer>` logs its own warning. Backdrop click + close button close the dialog.
774
774
 
775
775
  <!-- inputs:ds-modal -->
776
776
  All inputs: `open: boolean = false`, `size: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' = 'md'`, `status: 'info' | 'success' | 'warning' | 'error' = null`, `title: required string`, `subtitle: string | null = null`, `dividers: boolean | null = null`, `closeOnBackdrop: boolean = true`, `persistent: boolean = false`, `staticPreview: boolean = false`
777
777
  <!-- /inputs -->
778
778
 
779
779
  #### `<ds-modal-card>` — `ModalCardComponent`
780
- The visual card the `<ds-modal>` host renders inside its backdrop. Exposed as a separate selector for cases where you need custom positioning (e.g. inside a drawer) without re-implementing the dialog chrome. Inputs: `size`, `danger`, `title: required`, `showClose: boolean = true`. Output: `(closed)`. Slots: `[body]`, `[impact]`, `[actions]`.
780
+ The visual card the `<ds-modal>` host renders inside its backdrop. Exposed as a separate selector for cases where you need custom positioning (e.g. inside a drawer) without re-implementing the dialog chrome. Inputs: `size`, `danger`, `title: required`, `showClose: boolean = true`. Output: `(closed)`. Slots: `[eyebrow]`, `[title-badge]`, `[body]`, `[impact]`, `[actions]`; content with no slot attribute renders in the body, with the same dev-mode warnings as `<ds-modal>`.
781
781
 
782
782
  <!-- inputs:ds-modal-card -->
783
783
  All inputs: `size: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' = 'md'`, `status: 'info' | 'success' | 'warning' | 'error' = null`, `title: required string`, `subtitle: string | null = null`, `showClose: boolean = true`, `dividers: boolean | null = null`, `icon: IconName | null = null`, `dialogRole: 'dialog' | 'alertdialog' = null`
@@ -787,7 +787,7 @@ All inputs: `size: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' = 'md'`, `status: 'i
787
787
  Side panel (no `side` input — always anchored right).
788
788
  Inputs: `open: model<boolean> = false`, `size: 'md' | 'lg' = 'md'`, `title: string = ''`
789
789
  Output: `(closed): void`
790
- Content slots: `[drawer-body]`, `[drawer-footer]`.
790
+ Content slots: `[drawer-body]` (or `[body]`), `[drawer-footer]` (or `[actions]`). Content with no slot attribute renders in the body; in dev mode it logs a warning, as does an unknown slot name.
791
791
 
792
792
  <!-- inputs:ds-drawer -->
793
793
  All inputs: `open: boolean = false`, `size: 'sm' | 'md' | 'lg' = 'md'`, `placement: 'right' | 'left' | 'top' | 'bottom' = 'right'`, `title: required string`, `staticPreview: boolean = false`
@@ -934,7 +934,7 @@ Behaviour: percentages use largest-remainder rounding, so a legend's shares add
934
934
  Tokens: `--ds-pie-chart-size`, `--ds-pie-chart-gap`, `--ds-pie-chart-swatch-size`, `--ds-pie-chart-legend-row-gap`, `--ds-pie-chart-legend-row-height`, `--ds-chart-legend-hover-bg-color` and `--ds-chart-legend-hover-text-color` (shared with every chart legend), `--ds-pie-chart-outline-width` (the placeholder ring drawn when there is no data and when every slice is zero).
935
935
 
936
936
  <!-- inputs:ds-pie-chart -->
937
- All inputs: `frame: 'auto' | 'none' = null`, `caption: string | null = null`, `summary: string | null = null`, `loading: boolean = false`, `error: boolean = false`, `emptyText: string | null = null`, `errorText: string | null = null`, `valueFormat: ChartValueFormat | null = null`, `interactive: boolean = false`, `tooltipSwatches: boolean | null = null`, `tooltipLingerMs: number | null = null`, `pinOnClick: boolean | null = null`, `data: readonly PieChartSlice[] = []`, `centerValue: string | null = null`, `centerLabel: string | null = null`, `legend: 'end' | 'bottom' | 'none' = 'end'`, `maxSlices: number | null = null`, `otherLabel: string | null = null`, `innerRadius: number = 0.68`, `dataTable: 'toggle' | 'visible' | 'none' = null`, `partOfWhole: boolean = true`, `dimOthers: boolean = false`, `tooltip: 'item' | 'none' = 'item'`
937
+ All inputs: `frame: 'auto' | 'none' = null`, `caption: string | null = null`, `summary: string | null = null`, `loading: boolean = false`, `error: boolean = false`, `emptyText: string | null = null`, `errorText: string | null = null`, `valueFormat: ChartValueFormat | null = null`, `interactive: boolean = false`, `tooltipSwatches: boolean | null = null`, `tooltipLingerMs: number | null = null`, `pinOnClick: boolean | null = null`, `data: readonly PieChartSlice[] = []`, `centerValue: string | null = null`, `centerLabel: string | null = null`, `centerCompact: boolean = true`, `centerPlacement: 'inside' | 'below' = 'inside'`, `legend: 'end' | 'bottom' | 'none' = 'end'`, `maxSlices: number | null = null`, `otherLabel: string | null = null`, `innerRadius: number = 0.68`, `dataTable: 'toggle' | 'visible' | 'none' = null`, `partOfWhole: boolean = true`, `dimOthers: boolean = false`, `tooltip: 'item' | 'none' = 'item'`
938
938
  <!-- /inputs -->
939
939
 
940
940
  #### `<ds-funnel-chart>` — `FunnelChartComponent`
@@ -1268,6 +1268,7 @@ this.crumbs.clear();
1268
1268
  Defaults come from `provideDsConfig({ toast: … })`:
1269
1269
  - `maxVisible?: number` — cap on concurrently visible toasts. Default `5`; `0` means unlimited. Extras queue and appear as earlier ones dismiss.
1270
1270
  - `position?: { horizontalPosition?: 'left' | 'center' | 'right', verticalPosition?: 'top' | 'bottom', offset?: string }` — merged field by field over `right` / `top` / `var(--space-6)`, so naming one key keeps the other two.
1271
+ - `mirrorDevWarnings?: boolean` — in dev mode, every library warning that reaches the console also shows as a `warning` toast titled "Dev warning" for 10s, once per message, from the moment the app first injects `ToastService` (warnings raised before that show then, up to 50). Default `true`; never in a production build, and an app that never injects `ToastService` gets the console only.
1271
1272
 
1272
1273
  The `toast` section resolves **once, at the root injector**, when the service is first used — unlike every other section, which a `Route` or a component can narrow. `ToastService` is `providedIn: 'root'`, so a route-level `provideDsConfig` never reaches it, and the position cannot change after the first `show()`.
1273
1274
 
@@ -6,13 +6,13 @@ Group: Form & input
6
6
  Inputs: **two orthogonal axes** — `color: ButtonColor = 'primary'` (`'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning'`) and `variant: ButtonVariant = 'solid'` (`'solid' | 'tonal' | 'outline' | 'ghost' | 'text'`). Plus `size: DsSize | null = null` (unset resolves `DS_CONFIG.control.size`, then `md`), `type: 'button' | 'submit' | 'reset' = 'button'`, `align: ButtonAlign = 'center'` (`'center' | 'between'`; `'between'` pushes the label and a trailing icon to opposite edges, and only shows once something widens the button past its contents), `disabled`, `loading`, `fullWidth`, `icon: IconName | null`, and the destination pair `routerLink: DsRouterLink = null` (a path, a command array or a `UrlTree`) / `href: string = ''`, with the modifiers `fragment` / `queryParams` / `queryParamsHandling` (routerLink-only) and `target` / `rel` (either link), plus `routerLinkActiveOptions` and `ariaCurrent`. Plus the refusal pair below: `disabledReason`, and the field message inputs `hint` / `warning` / `error` / `messageIcon` / `reserveMessage` / `ariaDescribedBy`.
7
7
  Axis meaning: **variant is loudness** (solid > tonal > outline/ghost/text), **color is hue** — every pair renders, and the UX-discouraged ones dev-warn with the reason. Only solid and tonal paint a fill: outline, ghost and text are TRANSPARENT, so they adopt the surface they sit on. Disabled splits by whether the fill can carry the state: `solid` and `tonal` keep `oklch(from accent 70% 0.035 h)`, while `outline`, `ghost` and `text` — the three with no fill of their own — mix the label toward the surface, `color-mix(in srgb, <label> 40%, var(--surface-default))`, because a fixed lightness cannot serve both themes. (History: the single `variant` axis was split into color × variant in 2026-06; `danger`→`error`, `link`→`text`, the old `ghost`→`outline`.)
8
8
  Output: `(pressed): MouseEvent` — only fires when not disabled and not loading
9
- **Three elements, decided by destination.** `routerLink` → an `<a [routerLink]>` with `routerLinkActive`; `href` → a plain `<a href>`; **neither → a `<button type="button">`** — the same rule `ds-sidenav-item` follows, and for the same reason: a control that navigates has to BE a link, or middle-click, open-in-new-tab, copy-link-address and the `link` role a screen reader announces are all gone. Styling is identical across all three (class-based on `.button`, and the anchor's UA underline is reset), so target the class, never the tag — measured at zero differences across eleven computed properties, focus ring included. `type` and `loading` are button-only and dev-warn if set on a link: an anchor has no form to submit, and a navigation cannot be in flight before it starts. A disabled link takes `aria-disabled` plus `tabindex="-1"` — an anchor has no native disabled state — and its click is swallowed, which is what stops an `href` from navigating anyway. **`controlRef`** (was `buttonRef` before 0.12.3) is typed `ElementRef<HTMLElement>` for that reason: it resolves whichever element rendered.
9
+ **Three elements, decided by destination.** `routerLink` → an `<a [routerLink]>` with `routerLinkActive`; `href` → a plain `<a href>`; **neither → a `<button type="button">`** — the same rule `ds-sidenav-item` follows, and for the same reason: a control that navigates has to BE a link, or middle-click, open-in-new-tab, copy-link-address and the `link` role a screen reader announces are all gone. Styling is identical across all three (class-based on `.button`, and the anchor's UA underline is reset), so target the class, never the tag — measured at zero differences across eleven computed properties, focus ring included. `type` and `loading` are button-only and dev-warn if set on a link: an anchor has no form to submit, and a navigation cannot be in flight before it starts. A disabled link takes `aria-disabled` plus `tabindex="-1"` — an anchor has no native disabled state — and its click is swallowed, which is what stops an `href` from navigating anyway. With `disabledReason` set it keeps its Tab stop (`tabindex="0"`) so the reason is announced, and still swallows the click. A disabled `routerLink` link renders without an `href`, so it carries `role="link"` to stay announced as a link, with or without a reason. **`controlRef`** (was `buttonRef` before 0.12.3) is typed `ElementRef<HTMLElement>` for that reason: it resolves whichever element rendered.
10
10
  **Modifying a destination.** `fragment`, `queryParams` and `queryParamsHandling` go with a `routerLink` and dev-warn on any other destination; `target` and `rel` work on both link destinations and dev-warn on a plain button. Each is a pass-through to the anchor the component already renders. For the `UrlCreationOptions` with no input here — `relativeTo`, `preserveFragment` — pass a `UrlTree` built with `Router.createUrlTree` as the `routerLink`; folding a query or hash into the link STRING does not work, because `createUrlTree` treats the commands as path segments and percent-encodes `?` and `#`. Do NOT import `RouterLink` in your own component to write the extra inputs on a `<ds-button>`: the directive's selector matches the host, so that puts a SECOND `RouterLink` on the control disagreeing with the anchor's about where it goes.
11
11
  **What an active link announces, and why it is not the `active` class.** An EXACT match announces `aria-current="page"`, a PREFIX match announces `true`, everything else announces nothing — ARIA's own split: `page` is the page you are on, `true` is the current section or an ancestor. The `active` CLASS keeps matching by prefix, so a section link still looks lit; `routerLinkActiveOptions` moves the class and `ariaCurrent` overrides the announcement (`null` silences it). Before this the attribute was derived from `routerLinkActive`, so a back-link claimed to be the page the reader was leaving — invisible on a button, because `.active` is painted by nothing there. **Two mechanism traps, both measured.** `RouterLinkActive.update()` removes `aria-current` from its host in a microtask whenever its own `ariaCurrentWhenActive` is unset, so an `[attr.aria-current]` binding on the same element is written and then wiped — the value has to go through `ariaCurrentWhenActive`. And a RELATIVE destination (`routerLink="."`, `['..', 'x']`) has to be resolved against the route the control sits on, exactly as `RouterLink` does: resolved from the root instead, `.` becomes `/`, which is a prefix of every page, so the control that IS the current page announces `true`.
12
12
  **A link-STYLED action is still the global `.link` class on a `<button>`**, not this. Destination inputs give a navigation the button's LOOK; `.link` gives an action the link's look. `variant="text"` dev-warns in favour of `.link`.
13
13
  Content slots: default (label / leading or trailing icon), plus `[dsButtonSubtext]` for a projected second line. For icon-only actions use `<ds-icon-button>`.
14
14
  **Saying WHY a button is refused, and the two kinds of refusal.** A greyed control that does not say why is a dead end, and until 0.10.4 the only way to explain one was a tooltip — mouse-only. Which input to reach for is decided by whether the user can lift the refusal on this screen:
15
- - **Standing** (no permission, no integration — nothing here will change it): `disabledReason` beside `disabled`. The reason renders as a second line INSIDE the button, and setting it flips how the button is disabled — `aria-disabled="true"` instead of the native attribute, because a natively disabled button never takes focus and its description would never be announced (measured; Chrome's a11y tree reports name `"Approve invoice"`, description `"Needs the Finance role"`, state disabled). The click is swallowed in the handler instead, so `(pressed)` still never fires. Leave `disabledReason` unset and NOTHING changes: the native attribute stays, and so does every existing layout. Length is deliberately uncapped — the text wraps and the button grows.
15
+ - **Standing** (no permission, no integration — nothing here will change it): `disabledReason` beside `disabled`. The reason renders as a second line INSIDE the button, and setting it flips how the button is disabled — `aria-disabled="true"` instead of the native attribute, because a natively disabled button never takes focus and its description would never be announced (measured; Chrome's a11y tree reports name `"Approve invoice"`, description `"Needs the Finance role"`, state disabled). The click is swallowed in the handler instead, so `(pressed)` still never fires. On a link-button the reason works the same way: the link keeps its Tab stop and its link role. Leave `disabledReason` unset and NOTHING changes: the native attribute stays, and so does every existing layout. Length is deliberately uncapped — the text wraps and the button grows.
16
16
  - **Temporary** (the form is not filled in yet): do NOT disable the button at all. Leave it live, judge validity in the submit handler, and carry the text UNDER the button with `hint` / `warning` / `error` — the same three inputs the fields take, resolved and rendered by the same `ds-field-message` row the fields use, with the same `messageIcon` and `reserveMessage` knobs and the same `DS_CONFIG.field.*` fallbacks. Those inputs live on an internal shared base class that `ButtonComponent` and every field extend, so the behaviour cannot drift apart. What it does NOT take is `errors` / `invalid` / `touched`: a button has no validation state of its own.
17
17
  Layout: a message-bearing button becomes a column (host class `with-message`), and because the host shrinks to fit, a message longer than the label widens the pair — button included, exactly as a field's control spans its own message. Without a message the host keeps the `inline-flex` box every existing layout was built against.
18
18
  Tokens: `--ds-button-bg-color`, `--ds-button-bg-color-hover`, `--ds-button-bg-color-active`, `--ds-button-bg-color-disabled`, `--ds-button-label-color`, `--ds-button-label-color-disabled`, `--ds-button-border-color`, `--ds-button-border-color-hover`, `--ds-button-border-color-active`, `--ds-button-border-color-disabled`, `--ds-button-border-width`, `--ds-button-radius`, `--ds-button-pressed-shadow`, `--ds-button-shadow`, `--ds-button-shadow-hover`. The focus ring is not a button token — set `--focus-ring-color`, `--focus-ring-width` or `--focus-ring-offset` on the button's own scope. The last two are the REST and hover shadow, both `none` by default — before them the only way to give a button a resting shadow was a deep selector into its inner `<button>`. `-shadow-hover` falls back to `-shadow`, so setting the resting one alone keeps the button steady under the pointer; focus and pressed keep their own hooks and still win while those states are on. `-border-color-hover` falls back to the rest border and `-border-color-active` to the hover one, so an outline button's edge stays put until one of them is set. For `variant="solid"`, `-bg-color-hover` / `-bg-color-active` / `-pressed-shadow` default to a `color-mix()` derivation of the resolved fill (88 % / 76 % + black — the theme's hover/pressed recipe), so overriding the fill alone retints the whole state set; tonal, outline, ghost and text keep explicit ramp defaults, so a full retint there means setting the state tokens too.
@@ -6,7 +6,7 @@ Group: Overlay
6
6
  Side panel (no `side` input — always anchored right).
7
7
  Inputs: `open: model<boolean> = false`, `size: 'md' | 'lg' = 'md'`, `title: string = ''`
8
8
  Output: `(closed): void`
9
- Content slots: `[drawer-body]`, `[drawer-footer]`.
9
+ Content slots: `[drawer-body]` (or `[body]`), `[drawer-footer]` (or `[actions]`). Content with no slot attribute renders in the body; in dev mode it logs a warning, as does an unknown slot name.
10
10
 
11
11
  <!-- inputs:ds-drawer -->
12
12
  All inputs: `open: boolean = false`, `size: 'sm' | 'md' | 'lg' = 'md'`, `placement: 'right' | 'left' | 'top' | 'bottom' = 'right'`, `title: required string`, `staticPreview: boolean = false`
@@ -3,7 +3,7 @@
3
3
 
4
4
  Group: Overlay
5
5
 
6
- The visual card the `<ds-modal>` host renders inside its backdrop. Exposed as a separate selector for cases where you need custom positioning (e.g. inside a drawer) without re-implementing the dialog chrome. Inputs: `size`, `danger`, `title: required`, `showClose: boolean = true`. Output: `(closed)`. Slots: `[body]`, `[impact]`, `[actions]`.
6
+ The visual card the `<ds-modal>` host renders inside its backdrop. Exposed as a separate selector for cases where you need custom positioning (e.g. inside a drawer) without re-implementing the dialog chrome. Inputs: `size`, `danger`, `title: required`, `showClose: boolean = true`. Output: `(closed)`. Slots: `[eyebrow]`, `[title-badge]`, `[body]`, `[impact]`, `[actions]`; content with no slot attribute renders in the body, with the same dev-mode warnings as `<ds-modal>`.
7
7
 
8
8
  <!-- inputs:ds-modal-card -->
9
9
  All inputs: `size: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' = 'md'`, `status: 'info' | 'success' | 'warning' | 'error' = null`, `title: required string`, `subtitle: string | null = null`, `showClose: boolean = true`, `dividers: boolean | null = null`, `icon: IconName | null = null`, `dialogRole: 'dialog' | 'alertdialog' = null`
@@ -5,7 +5,7 @@ Group: Overlay
5
5
 
6
6
  Inputs: `open: model<boolean> = false`, `size: 'sm' | 'md' | 'lg' = 'md'`, `danger: boolean = false`, `title: required string`
7
7
  Output: `(closed): void` — fires on backdrop click, close button, or `open` being set to false. `(confirmed)` is declared on the component but no internal handler emits it; treat it as not implemented and emit confirmation from the consumer-side action button instead.
8
- Content slots: `[body]`, `[impact]` (highlighted strip under the body for destructive consequences), `[actions]` (footer button row). Backdrop click + close button close the dialog.
8
+ Content slots: `[eyebrow]`, `[title-badge]`, `[body]`, `[impact]` (highlighted strip under the body for destructive consequences), `[actions]` (footer button row). Content with no slot attribute renders in the body after `[body]`; in dev mode it logs a warning asking for `<div body>`, and an unknown slot name such as `<div footer>` logs its own warning. Backdrop click + close button close the dialog.
9
9
 
10
10
  <!-- inputs:ds-modal -->
11
11
  All inputs: `open: boolean = false`, `size: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen' = 'md'`, `status: 'info' | 'success' | 'warning' | 'error' = null`, `title: required string`, `subtitle: string | null = null`, `dividers: boolean | null = null`, `closeOnBackdrop: boolean = true`, `persistent: boolean = false`, `staticPreview: boolean = false`
@@ -11,6 +11,7 @@ Section: Services
11
11
  Defaults come from `provideDsConfig({ toast: … })`:
12
12
  - `maxVisible?: number` — cap on concurrently visible toasts. Default `5`; `0` means unlimited. Extras queue and appear as earlier ones dismiss.
13
13
  - `position?: { horizontalPosition?: 'left' | 'center' | 'right', verticalPosition?: 'top' | 'bottom', offset?: string }` — merged field by field over `right` / `top` / `var(--space-6)`, so naming one key keeps the other two.
14
+ - `mirrorDevWarnings?: boolean` — in dev mode, every library warning that reaches the console also shows as a `warning` toast titled "Dev warning" for 10s, once per message, from the moment the app first injects `ToastService` (warnings raised before that show then, up to 50). Default `true`; never in a production build, and an app that never injects `ToastService` gets the console only.
14
15
 
15
16
  The `toast` section resolves **once, at the root injector**, when the service is first used — unlike every other section, which a `Route` or a component can narrow. `ToastService` is `providedIn: 'root'`, so a route-level `provideDsConfig` never reaches it, and the position cannot change after the first `show()`.
16
17
 
@@ -1,9 +1,9 @@
1
1
  import * as i1 from '@angular/cdk/a11y';
2
2
  import { A11yModule } from '@angular/cdk/a11y';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, signal, DestroyRef, Injectable, input, model, computed, booleanAttribute, viewChild, effect, afterNextRender, isDevMode, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
4
+ import { inject, signal, DestroyRef, Injectable, input, model, computed, booleanAttribute, viewChild, effect, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
6
+ import { DS_INTL, reportDevWarning } from '@ids-group-ltd/ids-design-system/core';
7
7
  import { DOCUMENT } from '@angular/common';
8
8
  import { fromEvent, debounceTime, filter, map, distinctUntilChanged } from 'rxjs';
9
9
  import { Router, NavigationEnd, NavigationStart } from '@angular/router';
@@ -389,8 +389,8 @@ class AppLayoutComponent {
389
389
  .getPropertyValue('--bp-lg')
390
390
  .trim();
391
391
  if (!lg) {
392
- if (isDevMode()) {
393
- console.error('[ds-app-layout] --bp-lg is not defined, so the responsive rail cannot know its breakpoint and stays in desktop layout. Include the DS global styles (@use "…/styles/ds") — or, à la carte, the partial that emits the breakpoint vars.');
392
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
393
+ reportDevWarning('[ds-app-layout] --bp-lg is not defined, so the responsive rail cannot know its breakpoint and stays in desktop layout. Include the DS global styles (@use "…/styles/ds") — or, à la carte, the partial that emits the breakpoint vars.');
394
394
  }
395
395
  return;
396
396
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-app-layout.mjs","sources":["../../../src/lib/components/app-layout/scrollbar-width.service.ts","../../../src/lib/components/app-layout/layout-navigation.service.ts","../../../src/lib/components/app-layout/layout-scroll.service.ts","../../../src/lib/components/app-layout/app-layout.component.ts","../../../src/lib/components/app-layout/app-layout.component.html","../../../src/lib/components/app-layout/rail-trigger.directive.ts","../../../src/lib/components/app-layout/ids-group-ltd-ids-design-system-components-app-layout.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, inject, Injectable, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { debounceTime, fromEvent } from 'rxjs';\n\n/**\n * Measures the native scrollbar width per device and publishes it as\n * `--ds-scrollbar-width` on `:root` (recomputed on debounced resize; 0 with\n * overlay scrollbars). `ds-app-layout` subtracts it from the content region's\n * right padding. Internal, instantiated by `ds-app-layout`.\n */\n@Injectable({ providedIn: 'root' })\nexport class ScrollbarWidthService {\n private readonly document = inject(DOCUMENT);\n private readonly window = this.document.defaultView!;\n\n readonly width = signal(this.measureWidth());\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n this.applyToCss(this.width());\n\n fromEvent(this.window, 'resize')\n .pipe(debounceTime(200), takeUntilDestroyed(destroyRef))\n .subscribe(() => {\n const value = this.measureWidth();\n this.width.set(value);\n this.applyToCss(value);\n });\n }\n\n private measureWidth(): number {\n const probe = this.document.createElement('div');\n probe.style.cssText =\n 'overflow:scroll;width:100px;height:100px;position:absolute;top:-9999px';\n this.document.body.appendChild(probe);\n\n const inner = this.document.createElement('div');\n inner.style.cssText = 'width:100%;height:1px';\n probe.appendChild(inner);\n\n const width =\n probe.getBoundingClientRect().width - inner.getBoundingClientRect().width;\n\n probe.remove();\n\n return width;\n }\n\n private applyToCss(value: number): void {\n this.document.documentElement.style.setProperty(\n '--ds-scrollbar-width',\n `${value}px`,\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { distinctUntilChanged, filter, map, type Observable } from 'rxjs';\n\n/**\n * Emits the new path whenever navigation lands on a DIFFERENT one; query- or\n * fragment-only navigations are ignored. Read `pathChanged` instead of\n * re-deriving the path change:\n *\n * ```ts\n * private readonly navigation = inject(AppLayoutNavigationService);\n * constructor() {\n * this.navigation.pathChanged\n * .pipe(takeUntilDestroyed())\n * .subscribe((path) => …);\n * }\n * ```\n *\n * A navigation that changes the path while staying on the same screen (a scroll\n * spy rewriting the URL, a wizard step) must carry `state: { dsSamePage: true }`,\n * which is skipped here; otherwise the scroll reset and the spy ping-pong.\n *\n * `AppLayoutScrollService` depends on it, so a consumer providing THAT\n * outside `ds-app-layout` needs this one resolvable too.\n */\n@Injectable({ providedIn: 'root' })\nexport class AppLayoutNavigationService {\n private readonly router = inject(Router);\n\n readonly pathChanged: Observable<string> = this.router.events.pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n filter(() => !this.samePage()),\n map((event) => event.urlAfterRedirects.split(/[?#]/)[0]),\n distinctUntilChanged(),\n );\n\n // `lastSuccessfulNavigation`, not `getCurrentNavigation()`: the latter is\n // already cleared by the time NavigationEnd reaches a subscriber.\n private samePage(): boolean {\n const state = this.router.lastSuccessfulNavigation()?.extras.state;\n\n return state?.['dsSamePage'] === true;\n }\n}\n","import {\n DestroyRef,\n Injectable,\n type Signal,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, NavigationStart, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\nimport { AppLayoutNavigationService } from './layout-navigation.service';\n\nconst STORAGE_KEY = 'ds-app-layout:scroll';\n\nconst MAX_ENTRIES = 20;\n\n// NOT `scroll`: our own restore emits one and would cancel itself.\nconst CANCEL_EVENTS = ['wheel', 'touchstart', 'keydown'] as const;\n\nconst pathOf = (url: string): string => url.split(/[?#]/)[0];\n\n/**\n * When the layout resets the content scroll to the top.\n *\n * `'path'` (default): only when navigation lands on a different PATH.\n * `'always'` resets on every navigation. `'never'` leaves it to the screen,\n * which can call `AppLayoutScrollService.scrollToTop()`.\n */\nexport type DsAppLayoutScrollReset = 'path' | 'never' | 'always';\n\n/**\n * Owns the layout's content scroller. The window never scrolls in the\n * fixed-frame layout, so the router's window-based scrolling no-ops; this\n * service resets the registered container when navigation lands on a different\n * PATH. Provided by `ds-app-layout`; routed pages can inject it and call\n * `scrollToTop()`.\n *\n * With `restoreScroll` on the layout it also restores the reader's place, but\n * only when armed: going BACK restores, following a link does not.\n */\n@Injectable()\nexport class AppLayoutScrollService {\n private readonly navigation = inject(AppLayoutNavigationService);\n private readonly router = inject(Router);\n private readonly destroyRef = inject(DestroyRef);\n private readonly container = signal<Element | null>(null);\n\n /** The content scroller, once the layout has rendered it. */\n readonly scroller: Signal<Element | null> = this.container.asReadonly();\n\n // null = restoration off.\n private restoreTimeoutMs: number | null = null;\n private resetStrategy: DsAppLayoutScrollReset = 'path';\n private armed = false;\n private pendingOffset: number | null = null;\n private endRestore: (() => void) | null = null;\n private firstNavigation = true;\n\n constructor() {\n this.navigation.pathChanged\n .pipe(takeUntilDestroyed(this.destroyRef))\n // Skipped while a restore is armed: the reset would undo the offset about to be applied.\n .subscribe(() => {\n if (this.resetStrategy === 'path' && !this.armed) {\n this.scrollToTop();\n }\n });\n\n this.router.events\n .pipe(\n filter(\n (event): event is NavigationStart => event instanceof NavigationStart,\n ),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((event) => this.onNavigationStart(event));\n\n this.router.events\n .pipe(\n filter(\n (event): event is NavigationEnd => event instanceof NavigationEnd,\n ),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(() => this.onNavigationEnd());\n\n this.destroyRef.onDestroy(() => this.finishRestore());\n }\n\n /** Wiring for `ds-app-layout`; not for consumers. */\n setScrollContainer(element: Element): void {\n this.container.set(element);\n }\n\n /** Wiring: `ds-app-layout` mirrors its `restoreScroll` inputs through here. */\n configureRestore(timeoutMs: number | null): void {\n this.restoreTimeoutMs = timeoutMs;\n }\n\n /** Wiring: `ds-app-layout` mirrors its `scrollReset` input through here. */\n configureReset(strategy: DsAppLayoutScrollReset): void {\n this.resetStrategy = strategy;\n }\n\n scrollToTop(): void {\n this.scrollTo(0);\n }\n\n /** Scrolls the content region to an absolute offset. Assigns `scrollTop`, so `scroll-behavior: smooth` cannot animate it. */\n scrollTo(top: number): void {\n const element = this.container();\n if (element) {\n element.scrollTop = top;\n }\n }\n\n /**\n * Takes the offset this navigation is going to restore, and cancels the restore.\n * For a host that must know the offset BEFORE it builds rows (a virtualizer).\n * Returns null when nothing is pending.\n */\n consumePendingOffset(): number | null {\n const offset = this.pendingOffset;\n if (offset === null) {\n return null;\n }\n this.finishRestore();\n\n return offset;\n }\n\n /** Optional: tells the layout the route's content is in the DOM, ending the restore wait early. */\n contentReady(): void {\n if (this.pendingOffset !== null) {\n this.applyClamped(this.pendingOffset);\n this.finishRestore();\n }\n }\n\n private onNavigationStart(event: NavigationStart): void {\n const wasFirst = this.firstNavigation;\n this.firstNavigation = false;\n if (this.restoreTimeoutMs === null) {\n return;\n }\n this.remember(pathOf(this.router.url), this.container()?.scrollTop ?? 0);\n\n const explicit =\n this.router.currentNavigation()?.extras.state?.['dsRestoreScroll'] ===\n true;\n const offset = this.recall(pathOf(event.url));\n this.armed =\n offset !== null &&\n (event.navigationTrigger === 'popstate' || explicit || wasFirst);\n this.pendingOffset = this.armed ? offset : null;\n }\n\n private onNavigationEnd(): void {\n // `pathChanged` ignores query/fragment-only navigations, which 'always' still resets.\n if (this.resetStrategy === 'always' && !this.armed) {\n this.scrollToTop();\n }\n if (!this.armed || this.pendingOffset === null) {\n this.armed = false;\n\n return;\n }\n this.armed = false;\n this.beginRestore(this.pendingOffset);\n }\n\n private beginRestore(target: number): void {\n this.finishRestore(/* keepPending */ true);\n const element = this.container();\n if (!element) {\n this.pendingOffset = null;\n\n return;\n }\n\n const deadline = window.setTimeout(() => {\n this.applyClamped(target);\n this.finishRestore();\n }, this.restoreTimeoutMs ?? 0);\n\n const settle = (): void => {\n if (element.scrollHeight - element.clientHeight >= target) {\n this.scrollTo(target);\n this.finishRestore();\n }\n };\n\n // Observe the child: the container's own box does not change as content arrives.\n const growth = new ResizeObserver(settle);\n growth.observe(element.firstElementChild ?? element);\n\n const cancel = (): void => this.finishRestore();\n for (const type of CANCEL_EVENTS) {\n element.addEventListener(type, cancel, { passive: true });\n }\n // A bfcache restore brings its own scroll position back.\n const onPageShow = (event: PageTransitionEvent): void => {\n if (event.persisted) {\n this.finishRestore();\n }\n };\n window.addEventListener('pageshow', onPageShow);\n\n this.endRestore = () => {\n growth.disconnect();\n clearTimeout(deadline);\n for (const type of CANCEL_EVENTS) {\n element.removeEventListener(type, cancel);\n }\n window.removeEventListener('pageshow', onPageShow);\n };\n\n settle();\n }\n\n private applyClamped(target: number): void {\n const element = this.container();\n if (!element) {\n return;\n }\n this.scrollTo(\n Math.min(target, element.scrollHeight - element.clientHeight),\n );\n }\n\n private finishRestore(keepPending = false): void {\n this.endRestore?.();\n this.endRestore = null;\n if (!keepPending) {\n this.pendingOffset = null;\n }\n }\n\n // Guarded: Safari private mode throws on write, and that must not break navigation.\n private read(): Record<string, number> {\n try {\n const raw = sessionStorage.getItem(STORAGE_KEY);\n\n return raw ? (JSON.parse(raw) as Record<string, number>) : {};\n } catch {\n return {};\n }\n }\n\n private remember(path: string, offset: number): void {\n const entries = this.read();\n // Re-insert so the key moves to the end and the oldest is dropped below.\n delete entries[path];\n entries[path] = Math.round(offset);\n const keys = Object.keys(entries);\n for (const stale of keys.slice(0, Math.max(0, keys.length - MAX_ENTRIES))) {\n delete entries[stale];\n }\n try {\n sessionStorage.setItem(STORAGE_KEY, JSON.stringify(entries));\n } catch {\n // Full or blocked: losing the position is acceptable.\n }\n }\n\n private recall(path: string): number | null {\n const offset = this.read()[path];\n\n return typeof offset === 'number' && offset > 0 ? offset : null;\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { ScrollbarWidthService } from './scrollbar-width.service';\nimport { AppLayoutNavigationService } from './layout-navigation.service';\nimport {\n AppLayoutScrollService,\n type DsAppLayoutScrollReset,\n} from './layout-scroll.service';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n/**\n * Fixed-frame application layout: the host is pinned to the viewport and ONLY\n * the content region scrolls, so the sidenav rail and topbar stay put.\n * Consumers project their own chrome into the slots:\n *\n * ```html\n * <ds-app-layout>\n * <ds-sidenav sidenav>…</ds-sidenav>\n * <ds-topbar topbar>…</ds-topbar>\n * <router-outlet />\n * </ds-app-layout>\n * ```\n *\n * The layout renders the `<main>` landmark itself, so do not nest another\n * `<main>` in the content. Scroll-to-top is built in (`AppLayoutScrollService`)\n * and fires when navigation changes the PATH; call `scrollToTop()` for other\n * changes that want the top. The content padding compensates the native\n * scrollbar width so the right inset equals the left. Requires the application\n * router (`provideRouter`).\n *\n * Below the `lg` breakpoint the rail becomes a modal overlay driven by\n * `[(railOpen)]`; put the burger wherever the design wants it inside your own\n * projected topbar.\n */\n@Component({\n selector: 'ds-app-layout',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './app-layout.component.html',\n styleUrl: './app-layout.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.app-layout]': 'true',\n '[class.topbar-full]': \"topbarSpan() === 'full'\",\n '[class.rail-open]': 'railOpen()',\n '(document:keydown.escape)': 'closeRail()',\n },\n providers: [AppLayoutScrollService],\n})\nexport class AppLayoutComponent {\n /** `'content'` (default): rail spans the full height, topbar sits above the content only. `'full'`: topbar spans the full width. */\n readonly topbarSpan = input<'content' | 'full'>('content');\n\n /** Whether the rail is open as an overlay. Ignored at and above the `lg` breakpoint. */\n readonly railOpen = model(false);\n\n /** Accessible name for the rail while it is a modal overlay. Unset falls back to\n * `DS_INTL.appLayout.railLabel`. */\n readonly railLabel = input<string | null>(null);\n private readonly intl = inject(DS_INTL);\n protected readonly railLabelResolved = computed(\n () => this.railLabel() ?? this.intl().appLayout.railLabel,\n );\n\n /**\n * Remember the content scroll per path and restore it on the way BACK. Off by\n * default. Restores on a history traversal, on `state: { dsRestoreScroll: true }`,\n * and on the first navigation after a reload.\n */\n readonly restoreScroll = input(false, { transform: booleanAttribute });\n\n /** Milliseconds to wait for the restored content to grow tall enough. Only with `restoreScroll`. */\n readonly restoreScrollTimeout = input(2000);\n\n /** When the content scroll resets to the top: on path change (`'path'`), also on query/fragment-only navigation (`'always'`), or never (`'never'`). */\n readonly scrollReset = input<DsAppLayoutScrollReset>('path');\n\n /** True only while the rail is an overlay; gates the dialog semantics. */\n protected readonly compact = signal(false);\n\n /** Whether the rail is currently an overlay rather than part of the layout. */\n readonly railOverlay = this.compact.asReadonly();\n\n /** Id of the rail panel, for a trigger's `aria-controls`. */\n readonly railId = nextControlId('ds-rail');\n\n private readonly layoutScroll = inject(AppLayoutScrollService);\n private readonly navigation = inject(AppLayoutNavigationService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly content =\n viewChild.required<ElementRef<HTMLElement>>('content');\n\n constructor() {\n // Root service: instantiating it publishes --ds-scrollbar-width.\n inject(ScrollbarWidthService);\n\n effect(() => {\n this.layoutScroll.configureRestore(\n this.restoreScroll() ? this.restoreScrollTimeout() : null,\n );\n this.layoutScroll.configureReset(this.scrollReset());\n });\n\n afterNextRender(() => {\n this.layoutScroll.setScrollContainer(this.content().nativeElement);\n this.watchDesktopBreakpoint();\n });\n\n // Not closeRail(): returning focus to the burger would override where the router put it.\n this.navigation.pathChanged\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.railOpen.set(false));\n }\n\n /** Dismissal: Escape or the scrim. Restores focus, which navigation must not. */\n protected closeRail(): void {\n if (!this.railOpen()) {\n return;\n }\n this.railOpen.set(false);\n if (!this.compact()) {\n return;\n }\n // cdkTrapFocusAutoCapture returns focus only on destroy, so focus would stay in the off-canvas panel.\n this.content()\n .nativeElement.ownerDocument.querySelector<HTMLElement>(\n `[aria-controls=\"${this.railId}\"]`,\n )\n ?.focus();\n }\n\n private watchDesktopBreakpoint(): void {\n // Same `--bp-lg` as the stylesheet; a literal fallback could flip the rail at a different width than the CSS.\n const lg = getComputedStyle(document.documentElement)\n .getPropertyValue('--bp-lg')\n .trim();\n if (!lg) {\n if (isDevMode()) {\n console.error(\n '[ds-app-layout] --bp-lg is not defined, so the responsive rail cannot know its breakpoint and stays in desktop layout. Include the DS global styles (@use \"…/styles/ds\") — or, à la carte, the partial that emits the breakpoint vars.',\n );\n }\n\n return;\n }\n const desktop = window.matchMedia(`(width >= ${lg})`);\n const sync = (): void => {\n this.compact.set(!desktop.matches);\n // Not closeRail(): its focus restore targets a trigger hidden on desktop.\n if (desktop.matches) {\n this.railOpen.set(false);\n }\n };\n sync();\n desktop.addEventListener('change', sync);\n this.destroyRef.onDestroy(() =>\n desktop.removeEventListener('change', sync),\n );\n }\n}\n","<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n<div\n class=\"scrim\"\n [class.open]=\"railOpen()\"\n (click)=\"closeRail()\">\n</div>\n\n<div\n class=\"rail\"\n [class.open]=\"railOpen()\"\n [id]=\"railId\"\n [attr.role]=\"compact() ? 'dialog' : null\"\n [attr.aria-modal]=\"compact() ? 'true' : null\"\n [attr.aria-label]=\"compact() ? railLabelResolved() : null\"\n [attr.inert]=\"compact() && !railOpen() ? '' : null\"\n [cdkTrapFocus]=\"compact() && railOpen()\"\n [cdkTrapFocusAutoCapture]=\"compact() && railOpen()\">\n <ng-content select=\"[sidenav]\"></ng-content>\n</div>\n\n<div class=\"bar\">\n <ng-content select=\"[topbar]\"></ng-content>\n</div>\n\n<main\n #content\n class=\"content\"\n tabindex=\"-1\">\n <div class=\"inner\">\n <ng-content></ng-content>\n </div>\n</main>\n","import { Directive, inject } from '@angular/core';\nimport { AppLayoutComponent } from './app-layout.component';\n\n/**\n * Wires a consumer's own burger to the layout's overlay rail: toggles\n * `[(railOpen)]` on click and keeps `aria-expanded` / `aria-controls` in sync, so\n * the trigger and the panel are related for a screen reader.\n *\n * ```html\n * <ds-app-layout>\n * <ds-topbar topbar>\n * <button dsRailTrigger type=\"button\" aria-label=\"Navigation\">☰</button>\n * </ds-topbar>\n * </ds-app-layout>\n * ```\n *\n * PUT IT ON THE FOCUSABLE CONTROL, not on a wrapper: on `<ds-icon-button>` the\n * host is the wrapper, not the inner `<button>`. With a DS button, skip this\n * directive and bind its forwarding inputs instead:\n * `[ariaExpanded]=\"layout.railOverlay() ? layout.railOpen() : null\"`,\n * `[ariaControls]=\"layout.railOverlay() ? layout.railId : null\"` and\n * `(pressed)=\"layout.railOpen.set(!layout.railOpen())\"` off a\n * `<ds-app-layout #layout>` template ref.\n *\n * Both attributes are dropped while the rail is NOT an overlay, since\n * `aria-expanded=\"false\"` would misstate a permanently visible rail.\n *\n * Must sit inside a `ds-app-layout`.\n */\n@Directive({\n selector: '[dsRailTrigger]',\n standalone: true,\n host: {\n '[attr.aria-expanded]': 'layout.railOverlay() ? layout.railOpen() : null',\n '[attr.aria-controls]': 'layout.railOverlay() ? layout.railId : null',\n '(click)': 'toggle()',\n },\n})\nexport class RailTriggerDirective {\n protected readonly layout = inject(AppLayoutComponent);\n\n protected toggle(): void {\n this.layout.railOpen.update((open) => !open);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["filter"],"mappings":";;;;;;;;;;;;AAKA;;;;;AAKG;MAEU,qBAAqB,CAAA;AACf,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAY;IAE3C,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,4EAAC;AAE5C,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAErC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AAE7B,QAAA,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ;aAC5B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC;aACtD,SAAS,CAAC,MAAK;AACd,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE;AACjC,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACrB,YAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AACxB,QAAA,CAAC,CAAC;IACN;IAEQ,YAAY,G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AAA,6CAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAThC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,sBAAsB,EAAE,iDAAiD;AACzE,wBAAA,sBAAsB,EAAE,6CAA6C;AACrE,wBAAA,SAAS,EAAE,UAAU;AACtB,qBAAA;AACF,iBAAA;;;ACrCD;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-app-layout.mjs","sources":["../../../src/lib/components/app-layout/scrollbar-width.service.ts","../../../src/lib/components/app-layout/layout-navigation.service.ts","../../../src/lib/components/app-layout/layout-scroll.service.ts","../../../src/lib/components/app-layout/app-layout.component.ts","../../../src/lib/components/app-layout/app-layout.component.html","../../../src/lib/components/app-layout/rail-trigger.directive.ts","../../../src/lib/components/app-layout/ids-group-ltd-ids-design-system-components-app-layout.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, inject, Injectable, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { debounceTime, fromEvent } from 'rxjs';\n\n/**\n * Measures the native scrollbar width per device and publishes it as\n * `--ds-scrollbar-width` on `:root` (recomputed on debounced resize; 0 with\n * overlay scrollbars). `ds-app-layout` subtracts it from the content region's\n * right padding. Internal, instantiated by `ds-app-layout`.\n */\n@Injectable({ providedIn: 'root' })\nexport class ScrollbarWidthService {\n private readonly document = inject(DOCUMENT);\n private readonly window = this.document.defaultView!;\n\n readonly width = signal(this.measureWidth());\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n this.applyToCss(this.width());\n\n fromEvent(this.window, 'resize')\n .pipe(debounceTime(200), takeUntilDestroyed(destroyRef))\n .subscribe(() => {\n const value = this.measureWidth();\n this.width.set(value);\n this.applyToCss(value);\n });\n }\n\n private measureWidth(): number {\n const probe = this.document.createElement('div');\n probe.style.cssText =\n 'overflow:scroll;width:100px;height:100px;position:absolute;top:-9999px';\n this.document.body.appendChild(probe);\n\n const inner = this.document.createElement('div');\n inner.style.cssText = 'width:100%;height:1px';\n probe.appendChild(inner);\n\n const width =\n probe.getBoundingClientRect().width - inner.getBoundingClientRect().width;\n\n probe.remove();\n\n return width;\n }\n\n private applyToCss(value: number): void {\n this.document.documentElement.style.setProperty(\n '--ds-scrollbar-width',\n `${value}px`,\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { distinctUntilChanged, filter, map, type Observable } from 'rxjs';\n\n/**\n * Emits the new path whenever navigation lands on a DIFFERENT one; query- or\n * fragment-only navigations are ignored. Read `pathChanged` instead of\n * re-deriving the path change:\n *\n * ```ts\n * private readonly navigation = inject(AppLayoutNavigationService);\n * constructor() {\n * this.navigation.pathChanged\n * .pipe(takeUntilDestroyed())\n * .subscribe((path) => …);\n * }\n * ```\n *\n * A navigation that changes the path while staying on the same screen (a scroll\n * spy rewriting the URL, a wizard step) must carry `state: { dsSamePage: true }`,\n * which is skipped here; otherwise the scroll reset and the spy ping-pong.\n *\n * `AppLayoutScrollService` depends on it, so a consumer providing THAT\n * outside `ds-app-layout` needs this one resolvable too.\n */\n@Injectable({ providedIn: 'root' })\nexport class AppLayoutNavigationService {\n private readonly router = inject(Router);\n\n readonly pathChanged: Observable<string> = this.router.events.pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n filter(() => !this.samePage()),\n map((event) => event.urlAfterRedirects.split(/[?#]/)[0]),\n distinctUntilChanged(),\n );\n\n // `lastSuccessfulNavigation`, not `getCurrentNavigation()`: the latter is\n // already cleared by the time NavigationEnd reaches a subscriber.\n private samePage(): boolean {\n const state = this.router.lastSuccessfulNavigation()?.extras.state;\n\n return state?.['dsSamePage'] === true;\n }\n}\n","import {\n DestroyRef,\n Injectable,\n type Signal,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, NavigationStart, Router } from '@angular/router';\nimport { filter } from 'rxjs/operators';\nimport { AppLayoutNavigationService } from './layout-navigation.service';\n\nconst STORAGE_KEY = 'ds-app-layout:scroll';\n\nconst MAX_ENTRIES = 20;\n\n// NOT `scroll`: our own restore emits one and would cancel itself.\nconst CANCEL_EVENTS = ['wheel', 'touchstart', 'keydown'] as const;\n\nconst pathOf = (url: string): string => url.split(/[?#]/)[0];\n\n/**\n * When the layout resets the content scroll to the top.\n *\n * `'path'` (default): only when navigation lands on a different PATH.\n * `'always'` resets on every navigation. `'never'` leaves it to the screen,\n * which can call `AppLayoutScrollService.scrollToTop()`.\n */\nexport type DsAppLayoutScrollReset = 'path' | 'never' | 'always';\n\n/**\n * Owns the layout's content scroller. The window never scrolls in the\n * fixed-frame layout, so the router's window-based scrolling no-ops; this\n * service resets the registered container when navigation lands on a different\n * PATH. Provided by `ds-app-layout`; routed pages can inject it and call\n * `scrollToTop()`.\n *\n * With `restoreScroll` on the layout it also restores the reader's place, but\n * only when armed: going BACK restores, following a link does not.\n */\n@Injectable()\nexport class AppLayoutScrollService {\n private readonly navigation = inject(AppLayoutNavigationService);\n private readonly router = inject(Router);\n private readonly destroyRef = inject(DestroyRef);\n private readonly container = signal<Element | null>(null);\n\n /** The content scroller, once the layout has rendered it. */\n readonly scroller: Signal<Element | null> = this.container.asReadonly();\n\n // null = restoration off.\n private restoreTimeoutMs: number | null = null;\n private resetStrategy: DsAppLayoutScrollReset = 'path';\n private armed = false;\n private pendingOffset: number | null = null;\n private endRestore: (() => void) | null = null;\n private firstNavigation = true;\n\n constructor() {\n this.navigation.pathChanged\n .pipe(takeUntilDestroyed(this.destroyRef))\n // Skipped while a restore is armed: the reset would undo the offset about to be applied.\n .subscribe(() => {\n if (this.resetStrategy === 'path' && !this.armed) {\n this.scrollToTop();\n }\n });\n\n this.router.events\n .pipe(\n filter(\n (event): event is NavigationStart => event instanceof NavigationStart,\n ),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((event) => this.onNavigationStart(event));\n\n this.router.events\n .pipe(\n filter(\n (event): event is NavigationEnd => event instanceof NavigationEnd,\n ),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(() => this.onNavigationEnd());\n\n this.destroyRef.onDestroy(() => this.finishRestore());\n }\n\n /** Wiring for `ds-app-layout`; not for consumers. */\n setScrollContainer(element: Element): void {\n this.container.set(element);\n }\n\n /** Wiring: `ds-app-layout` mirrors its `restoreScroll` inputs through here. */\n configureRestore(timeoutMs: number | null): void {\n this.restoreTimeoutMs = timeoutMs;\n }\n\n /** Wiring: `ds-app-layout` mirrors its `scrollReset` input through here. */\n configureReset(strategy: DsAppLayoutScrollReset): void {\n this.resetStrategy = strategy;\n }\n\n scrollToTop(): void {\n this.scrollTo(0);\n }\n\n /** Scrolls the content region to an absolute offset. Assigns `scrollTop`, so `scroll-behavior: smooth` cannot animate it. */\n scrollTo(top: number): void {\n const element = this.container();\n if (element) {\n element.scrollTop = top;\n }\n }\n\n /**\n * Takes the offset this navigation is going to restore, and cancels the restore.\n * For a host that must know the offset BEFORE it builds rows (a virtualizer).\n * Returns null when nothing is pending.\n */\n consumePendingOffset(): number | null {\n const offset = this.pendingOffset;\n if (offset === null) {\n return null;\n }\n this.finishRestore();\n\n return offset;\n }\n\n /** Optional: tells the layout the route's content is in the DOM, ending the restore wait early. */\n contentReady(): void {\n if (this.pendingOffset !== null) {\n this.applyClamped(this.pendingOffset);\n this.finishRestore();\n }\n }\n\n private onNavigationStart(event: NavigationStart): void {\n const wasFirst = this.firstNavigation;\n this.firstNavigation = false;\n if (this.restoreTimeoutMs === null) {\n return;\n }\n this.remember(pathOf(this.router.url), this.container()?.scrollTop ?? 0);\n\n const explicit =\n this.router.currentNavigation()?.extras.state?.['dsRestoreScroll'] ===\n true;\n const offset = this.recall(pathOf(event.url));\n this.armed =\n offset !== null &&\n (event.navigationTrigger === 'popstate' || explicit || wasFirst);\n this.pendingOffset = this.armed ? offset : null;\n }\n\n private onNavigationEnd(): void {\n // `pathChanged` ignores query/fragment-only navigations, which 'always' still resets.\n if (this.resetStrategy === 'always' && !this.armed) {\n this.scrollToTop();\n }\n if (!this.armed || this.pendingOffset === null) {\n this.armed = false;\n\n return;\n }\n this.armed = false;\n this.beginRestore(this.pendingOffset);\n }\n\n private beginRestore(target: number): void {\n this.finishRestore(/* keepPending */ true);\n const element = this.container();\n if (!element) {\n this.pendingOffset = null;\n\n return;\n }\n\n const deadline = window.setTimeout(() => {\n this.applyClamped(target);\n this.finishRestore();\n }, this.restoreTimeoutMs ?? 0);\n\n const settle = (): void => {\n if (element.scrollHeight - element.clientHeight >= target) {\n this.scrollTo(target);\n this.finishRestore();\n }\n };\n\n // Observe the child: the container's own box does not change as content arrives.\n const growth = new ResizeObserver(settle);\n growth.observe(element.firstElementChild ?? element);\n\n const cancel = (): void => this.finishRestore();\n for (const type of CANCEL_EVENTS) {\n element.addEventListener(type, cancel, { passive: true });\n }\n // A bfcache restore brings its own scroll position back.\n const onPageShow = (event: PageTransitionEvent): void => {\n if (event.persisted) {\n this.finishRestore();\n }\n };\n window.addEventListener('pageshow', onPageShow);\n\n this.endRestore = () => {\n growth.disconnect();\n clearTimeout(deadline);\n for (const type of CANCEL_EVENTS) {\n element.removeEventListener(type, cancel);\n }\n window.removeEventListener('pageshow', onPageShow);\n };\n\n settle();\n }\n\n private applyClamped(target: number): void {\n const element = this.container();\n if (!element) {\n return;\n }\n this.scrollTo(\n Math.min(target, element.scrollHeight - element.clientHeight),\n );\n }\n\n private finishRestore(keepPending = false): void {\n this.endRestore?.();\n this.endRestore = null;\n if (!keepPending) {\n this.pendingOffset = null;\n }\n }\n\n // Guarded: Safari private mode throws on write, and that must not break navigation.\n private read(): Record<string, number> {\n try {\n const raw = sessionStorage.getItem(STORAGE_KEY);\n\n return raw ? (JSON.parse(raw) as Record<string, number>) : {};\n } catch {\n return {};\n }\n }\n\n private remember(path: string, offset: number): void {\n const entries = this.read();\n // Re-insert so the key moves to the end and the oldest is dropped below.\n delete entries[path];\n entries[path] = Math.round(offset);\n const keys = Object.keys(entries);\n for (const stale of keys.slice(0, Math.max(0, keys.length - MAX_ENTRIES))) {\n delete entries[stale];\n }\n try {\n sessionStorage.setItem(STORAGE_KEY, JSON.stringify(entries));\n } catch {\n // Full or blocked: losing the position is acceptable.\n }\n }\n\n private recall(path: string): number | null {\n const offset = this.read()[path];\n\n return typeof offset === 'number' && offset > 0 ? offset : null;\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { reportDevWarning } from '@ids-group-ltd/ids-design-system/core';\nimport { ScrollbarWidthService } from './scrollbar-width.service';\nimport { AppLayoutNavigationService } from './layout-navigation.service';\nimport {\n AppLayoutScrollService,\n type DsAppLayoutScrollReset,\n} from './layout-scroll.service';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n/**\n * Fixed-frame application layout: the host is pinned to the viewport and ONLY\n * the content region scrolls, so the sidenav rail and topbar stay put.\n * Consumers project their own chrome into the slots:\n *\n * ```html\n * <ds-app-layout>\n * <ds-sidenav sidenav>…</ds-sidenav>\n * <ds-topbar topbar>…</ds-topbar>\n * <router-outlet />\n * </ds-app-layout>\n * ```\n *\n * The layout renders the `<main>` landmark itself, so do not nest another\n * `<main>` in the content. Scroll-to-top is built in (`AppLayoutScrollService`)\n * and fires when navigation changes the PATH; call `scrollToTop()` for other\n * changes that want the top. The content padding compensates the native\n * scrollbar width so the right inset equals the left. Requires the application\n * router (`provideRouter`).\n *\n * Below the `lg` breakpoint the rail becomes a modal overlay driven by\n * `[(railOpen)]`; put the burger wherever the design wants it inside your own\n * projected topbar.\n */\n@Component({\n selector: 'ds-app-layout',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './app-layout.component.html',\n styleUrl: './app-layout.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.app-layout]': 'true',\n '[class.topbar-full]': \"topbarSpan() === 'full'\",\n '[class.rail-open]': 'railOpen()',\n '(document:keydown.escape)': 'closeRail()',\n },\n providers: [AppLayoutScrollService],\n})\nexport class AppLayoutComponent {\n /** `'content'` (default): rail spans the full height, topbar sits above the content only. `'full'`: topbar spans the full width. */\n readonly topbarSpan = input<'content' | 'full'>('content');\n\n /** Whether the rail is open as an overlay. Ignored at and above the `lg` breakpoint. */\n readonly railOpen = model(false);\n\n /** Accessible name for the rail while it is a modal overlay. Unset falls back to\n * `DS_INTL.appLayout.railLabel`. */\n readonly railLabel = input<string | null>(null);\n private readonly intl = inject(DS_INTL);\n protected readonly railLabelResolved = computed(\n () => this.railLabel() ?? this.intl().appLayout.railLabel,\n );\n\n /**\n * Remember the content scroll per path and restore it on the way BACK. Off by\n * default. Restores on a history traversal, on `state: { dsRestoreScroll: true }`,\n * and on the first navigation after a reload.\n */\n readonly restoreScroll = input(false, { transform: booleanAttribute });\n\n /** Milliseconds to wait for the restored content to grow tall enough. Only with `restoreScroll`. */\n readonly restoreScrollTimeout = input(2000);\n\n /** When the content scroll resets to the top: on path change (`'path'`), also on query/fragment-only navigation (`'always'`), or never (`'never'`). */\n readonly scrollReset = input<DsAppLayoutScrollReset>('path');\n\n /** True only while the rail is an overlay; gates the dialog semantics. */\n protected readonly compact = signal(false);\n\n /** Whether the rail is currently an overlay rather than part of the layout. */\n readonly railOverlay = this.compact.asReadonly();\n\n /** Id of the rail panel, for a trigger's `aria-controls`. */\n readonly railId = nextControlId('ds-rail');\n\n private readonly layoutScroll = inject(AppLayoutScrollService);\n private readonly navigation = inject(AppLayoutNavigationService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly content =\n viewChild.required<ElementRef<HTMLElement>>('content');\n\n constructor() {\n // Root service: instantiating it publishes --ds-scrollbar-width.\n inject(ScrollbarWidthService);\n\n effect(() => {\n this.layoutScroll.configureRestore(\n this.restoreScroll() ? this.restoreScrollTimeout() : null,\n );\n this.layoutScroll.configureReset(this.scrollReset());\n });\n\n afterNextRender(() => {\n this.layoutScroll.setScrollContainer(this.content().nativeElement);\n this.watchDesktopBreakpoint();\n });\n\n // Not closeRail(): returning focus to the burger would override where the router put it.\n this.navigation.pathChanged\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.railOpen.set(false));\n }\n\n /** Dismissal: Escape or the scrim. Restores focus, which navigation must not. */\n protected closeRail(): void {\n if (!this.railOpen()) {\n return;\n }\n this.railOpen.set(false);\n if (!this.compact()) {\n return;\n }\n // cdkTrapFocusAutoCapture returns focus only on destroy, so focus would stay in the off-canvas panel.\n this.content()\n .nativeElement.ownerDocument.querySelector<HTMLElement>(\n `[aria-controls=\"${this.railId}\"]`,\n )\n ?.focus();\n }\n\n private watchDesktopBreakpoint(): void {\n // Same `--bp-lg` as the stylesheet; a literal fallback could flip the rail at a different width than the CSS.\n const lg = getComputedStyle(document.documentElement)\n .getPropertyValue('--bp-lg')\n .trim();\n if (!lg) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n reportDevWarning(\n '[ds-app-layout] --bp-lg is not defined, so the responsive rail cannot know its breakpoint and stays in desktop layout. Include the DS global styles (@use \"…/styles/ds\") — or, à la carte, the partial that emits the breakpoint vars.',\n );\n }\n\n return;\n }\n const desktop = window.matchMedia(`(width >= ${lg})`);\n const sync = (): void => {\n this.compact.set(!desktop.matches);\n // Not closeRail(): its focus restore targets a trigger hidden on desktop.\n if (desktop.matches) {\n this.railOpen.set(false);\n }\n };\n sync();\n desktop.addEventListener('change', sync);\n this.destroyRef.onDestroy(() =>\n desktop.removeEventListener('change', sync),\n );\n }\n}\n","<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- scrim; click dismisses, keyboard dismisses via Escape (host document:keydown.escape) -->\n<div\n class=\"scrim\"\n [class.open]=\"railOpen()\"\n (click)=\"closeRail()\">\n</div>\n\n<div\n class=\"rail\"\n [class.open]=\"railOpen()\"\n [id]=\"railId\"\n [attr.role]=\"compact() ? 'dialog' : null\"\n [attr.aria-modal]=\"compact() ? 'true' : null\"\n [attr.aria-label]=\"compact() ? railLabelResolved() : null\"\n [attr.inert]=\"compact() && !railOpen() ? '' : null\"\n [cdkTrapFocus]=\"compact() && railOpen()\"\n [cdkTrapFocusAutoCapture]=\"compact() && railOpen()\">\n <ng-content select=\"[sidenav]\"></ng-content>\n</div>\n\n<div class=\"bar\">\n <ng-content select=\"[topbar]\"></ng-content>\n</div>\n\n<main\n #content\n class=\"content\"\n tabindex=\"-1\">\n <div class=\"inner\">\n <ng-content></ng-content>\n </div>\n</main>\n","import { Directive, inject } from '@angular/core';\nimport { AppLayoutComponent } from './app-layout.component';\n\n/**\n * Wires a consumer's own burger to the layout's overlay rail: toggles\n * `[(railOpen)]` on click and keeps `aria-expanded` / `aria-controls` in sync, so\n * the trigger and the panel are related for a screen reader.\n *\n * ```html\n * <ds-app-layout>\n * <ds-topbar topbar>\n * <button dsRailTrigger type=\"button\" aria-label=\"Navigation\">☰</button>\n * </ds-topbar>\n * </ds-app-layout>\n * ```\n *\n * PUT IT ON THE FOCUSABLE CONTROL, not on a wrapper: on `<ds-icon-button>` the\n * host is the wrapper, not the inner `<button>`. With a DS button, skip this\n * directive and bind its forwarding inputs instead:\n * `[ariaExpanded]=\"layout.railOverlay() ? layout.railOpen() : null\"`,\n * `[ariaControls]=\"layout.railOverlay() ? layout.railId : null\"` and\n * `(pressed)=\"layout.railOpen.set(!layout.railOpen())\"` off a\n * `<ds-app-layout #layout>` template ref.\n *\n * Both attributes are dropped while the rail is NOT an overlay, since\n * `aria-expanded=\"false\"` would misstate a permanently visible rail.\n *\n * Must sit inside a `ds-app-layout`.\n */\n@Directive({\n selector: '[dsRailTrigger]',\n standalone: true,\n host: {\n '[attr.aria-expanded]': 'layout.railOverlay() ? layout.railOpen() : null',\n '[attr.aria-controls]': 'layout.railOverlay() ? layout.railId : null',\n '(click)': 'toggle()',\n },\n})\nexport class RailTriggerDirective {\n protected readonly layout = inject(AppLayoutComponent);\n\n protected toggle(): void {\n this.layout.railOpen.update((open) => !open);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["filter"],"mappings":";;;;;;;;;;;;AAKA;;;;;AAKG;MAEU,qBAAqB,CAAA;AACf,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAY;IAE3C,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,4EAAC;AAE5C,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAErC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AAE7B,QAAA,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ;aAC5B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC;aACtD,SAAS,CAAC,MAAK;AACd,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE;AACjC,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACrB,YAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AACxB,QAAA,CAAC,CAAC;IACN;IAEQ,YAAY,GAAA;QAClB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,OAAO;AACjB,YAAA,wEAAwE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C,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,sBAAsB,EAAE,iDAAiD;AACzE,wBAAA,sBAAsB,EAAE,6CAA6C;AACrE,wBAAA,SAAS,EAAE,UAAU;AACtB,qBAAA;AACF,iBAAA;;;ACrCD;;AAEG;;;;"}
@@ -1,28 +1,35 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, computed, ViewEncapsulation, Component } from '@angular/core';
2
+ import { inject, input, contentChildren, ElementRef, computed, effect, ViewEncapsulation, Component } from '@angular/core';
3
3
  import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
4
+ import { AvatarComponent } from '@ids-group-ltd/ids-design-system/components/avatar';
4
5
 
5
6
  class AvatarGroupComponent {
6
7
  intl = inject(DS_INTL);
7
- /** Avatars shown before the rest collapse into the `+N` chip. */
8
+ /** Avatars shown before the rest collapse into the `+N` chip; projected avatars past it are hidden. */
8
9
  max = input(4, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
9
10
  /** Total avatar count driving the `+N` overflow; null counts the projected children. */
10
11
  total = input(null, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
12
+ avatars = contentChildren(AvatarComponent, { ...(ngDevMode ? { debugName: "avatars" } : /* istanbul ignore next */ {}), read: ElementRef });
11
13
  overflow = computed(() => {
12
- const total = this.total();
14
+ const total = this.total() ?? this.avatars().length;
13
15
  const max = this.max();
14
- if (total === null) {
15
- return null;
16
- }
17
16
  return total > max ? total - max : null;
18
17
  }, ...(ngDevMode ? [{ debugName: "overflow" }] : /* istanbul ignore next */ []));
18
+ constructor() {
19
+ effect(() => {
20
+ const max = this.max();
21
+ this.avatars().forEach((avatar, index) => avatar.nativeElement.toggleAttribute('data-avatar-group-hidden', index >= max));
22
+ });
23
+ }
19
24
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AvatarGroupComponent, isStandalone: true, selector: "ds-avatar-group", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"intl().avatarGroup.more(overflow()!)\">\n +{{ overflow() }}\n </span>\n}\n", styles: [":host{--_avatar-group-overlap: var(--ds-avatar-group-overlap, calc(-1 * var(--space-2)));--_avatar-group-ring: var(--ds-avatar-group-ring, var(--surface-default));--_avatar-group-overflow-bg-color: var(--ds-avatar-group-overflow-bg-color, var(--accent-muted));--_avatar-group-overflow-label-color: var(--ds-avatar-group-overflow-label-color, var(--accent-strong));display:inline-flex}:host>::ng-deep *:not(.avatar-overflow){border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}:host>::ng-deep *:not(.avatar-overflow):first-child{margin-left:0}.avatar-overflow{display:inline-grid;place-items:center;width:var(--avatar-md);height:var(--avatar-md);border-radius:var(--radius-pill);background:var(--_avatar-group-overflow-bg-color);color:var(--_avatar-group-overflow-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}\n"] });
25
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AvatarGroupComponent, isStandalone: true, selector: "ds-avatar-group", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "avatars", predicate: AvatarComponent, read: ElementRef, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"intl().avatarGroup.more(overflow()!)\">\n +{{ overflow() }}\n </span>\n}\n", styles: [":host{--_avatar-group-overlap: var(--ds-avatar-group-overlap, calc(-1 * var(--space-2)));--_avatar-group-ring: var(--ds-avatar-group-ring, var(--surface-default));--_avatar-group-overflow-bg-color: var(--ds-avatar-group-overflow-bg-color, var(--accent-muted));--_avatar-group-overflow-label-color: var(--ds-avatar-group-overflow-label-color, var(--accent-strong));display:inline-flex}:host>::ng-deep *:not(.avatar-overflow){border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}:host>::ng-deep *:not(.avatar-overflow):first-child{margin-left:0}:host>::ng-deep [data-avatar-group-hidden]{display:none}.avatar-overflow{display:inline-grid;place-items:center;width:var(--avatar-md);height:var(--avatar-md);border-radius:var(--radius-pill);background:var(--_avatar-group-overflow-bg-color);color:var(--_avatar-group-overflow-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}\n"] });
21
26
  }
22
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarGroupComponent, decorators: [{
23
28
  type: Component,
24
- args: [{ selector: 'ds-avatar-group', standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"intl().avatarGroup.more(overflow()!)\">\n +{{ overflow() }}\n </span>\n}\n", styles: [":host{--_avatar-group-overlap: var(--ds-avatar-group-overlap, calc(-1 * var(--space-2)));--_avatar-group-ring: var(--ds-avatar-group-ring, var(--surface-default));--_avatar-group-overflow-bg-color: var(--ds-avatar-group-overflow-bg-color, var(--accent-muted));--_avatar-group-overflow-label-color: var(--ds-avatar-group-overflow-label-color, var(--accent-strong));display:inline-flex}:host>::ng-deep *:not(.avatar-overflow){border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}:host>::ng-deep *:not(.avatar-overflow):first-child{margin-left:0}.avatar-overflow{display:inline-grid;place-items:center;width:var(--avatar-md);height:var(--avatar-md);border-radius:var(--radius-pill);background:var(--_avatar-group-overflow-bg-color);color:var(--_avatar-group-overflow-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}\n"] }]
25
- }], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }] } });
29
+ args: [{ selector: 'ds-avatar-group', standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"intl().avatarGroup.more(overflow()!)\">\n +{{ overflow() }}\n </span>\n}\n", styles: [":host{--_avatar-group-overlap: var(--ds-avatar-group-overlap, calc(-1 * var(--space-2)));--_avatar-group-ring: var(--ds-avatar-group-ring, var(--surface-default));--_avatar-group-overflow-bg-color: var(--ds-avatar-group-overflow-bg-color, var(--accent-muted));--_avatar-group-overflow-label-color: var(--ds-avatar-group-overflow-label-color, var(--accent-strong));display:inline-flex}:host>::ng-deep *:not(.avatar-overflow){border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}:host>::ng-deep *:not(.avatar-overflow):first-child{margin-left:0}:host>::ng-deep [data-avatar-group-hidden]{display:none}.avatar-overflow{display:inline-grid;place-items:center;width:var(--avatar-md);height:var(--avatar-md);border-radius:var(--radius-pill);background:var(--_avatar-group-overflow-bg-color);color:var(--_avatar-group-overflow-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}\n"] }]
30
+ }], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], avatars: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AvatarComponent), { ...{
31
+ read: ElementRef,
32
+ }, isSignal: true }] }] } });
26
33
 
27
34
  /**
28
35
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-avatar-group.mjs","sources":["../../../src/lib/components/avatar-group/avatar-group.component.ts","../../../src/lib/components/avatar-group/avatar-group.component.html","../../../src/lib/components/avatar-group/ids-group-ltd-ids-design-system-components-avatar-group.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-avatar-group',\n standalone: true,\n templateUrl: './avatar-group.component.html',\n styleUrl: './avatar-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AvatarGroupComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Avatars shown before the rest collapse into the `+N` chip. */\n readonly max = input<number>(4);\n /** Total avatar count driving the `+N` overflow; null counts the projected children. */\n readonly total = input<number | null>(null);\n\n protected readonly overflow = computed<number | null>(() => {\n const total = this.total();\n const max = this.max();\n if (total === null) {\n return null;\n }\n\n return total > max ? total - max : null;\n });\n}\n","<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"intl().avatarGroup.more(overflow()!)\">\n +{{ overflow() }}\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAgBa,oBAAoB,CAAA;AACZ,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,GAAG,GAAG,KAAK,CAAS,CAAC,0EAAC;;AAEtB,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAExB,IAAA,QAAQ,GAAG,QAAQ,CAAgB,MAAK;AACzD,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;AACtB,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI;AACzC,IAAA,CAAC,+EAAC;wGAhBS,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,iUChBjC,0MASA,EAAA,MAAA,EAAA,CAAA,wjCAAA,CAAA,EAAA,CAAA;;4FDOa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,aAAA,EAGD,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,0MAAA,EAAA,MAAA,EAAA,CAAA,wjCAAA,CAAA,EAAA;;;AEd3C;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-avatar-group.mjs","sources":["../../../src/lib/components/avatar-group/avatar-group.component.ts","../../../src/lib/components/avatar-group/avatar-group.component.html","../../../src/lib/components/avatar-group/ids-group-ltd-ids-design-system-components-avatar-group.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { AvatarComponent } from '@ids-group-ltd/ids-design-system/components/avatar';\n\n@Component({\n selector: 'ds-avatar-group',\n standalone: true,\n templateUrl: './avatar-group.component.html',\n styleUrl: './avatar-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AvatarGroupComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Avatars shown before the rest collapse into the `+N` chip; projected avatars past it are hidden. */\n readonly max = input<number>(4);\n /** Total avatar count driving the `+N` overflow; null counts the projected children. */\n readonly total = input<number | null>(null);\n\n private readonly avatars = contentChildren(AvatarComponent, {\n read: ElementRef,\n });\n\n protected readonly overflow = computed<number | null>(() => {\n const total = this.total() ?? this.avatars().length;\n const max = this.max();\n\n return total > max ? total - max : null;\n });\n\n constructor() {\n effect(() => {\n const max = this.max();\n this.avatars().forEach((avatar, index) =>\n (avatar.nativeElement as HTMLElement).toggleAttribute(\n 'data-avatar-group-hidden',\n index >= max,\n ),\n );\n });\n }\n}\n","<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"intl().avatarGroup.more(overflow()!)\">\n +{{ overflow() }}\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAoBa,oBAAoB,CAAA;AACZ,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,GAAG,GAAG,KAAK,CAAS,CAAC,0EAAC;;AAEtB,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EA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Version: "12.0.0", version: "21.2.22", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null }, announce: { classPropertyName: "announce", publicName: "announce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.title": "null", "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapper lets `:empty` answer \"is there a body?\"; a bare projected text node is otherwise invisible to selectors. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\">\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-padding-y: var(--ds-banner-padding-y, var(--space-3));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-title-font-size: var(--ds-banner-title-font-size, var(--font-size-s));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-scale-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-padding-y) var(--_banner-padding-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--_banner-title-font-size)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;margin-top:var(--space-1);font-size:var(--_banner-body-font-size)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-padding-y: var(--ds-banner-padding-y, var(--space-2));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
81
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null }, announce: { classPropertyName: "announce", publicName: "announce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.title": "null", "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapper lets `:empty` answer \"is there a body?\"; a bare projected text node is otherwise invisible to selectors. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\">\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-padding-y: var(--ds-banner-padding-y, var(--space-3));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-title-font-size: var(--ds-banner-title-font-size, var(--font-size-s));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-scale-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-padding-y) var(--_banner-padding-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0;align-self:center}.banner .title{font:var(--font-weight-bold) var(--_banner-title-font-size)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;font-size:var(--_banner-body-font-size)}.banner .title+.text:not(:empty){margin-top:var(--space-1)}@supports (text-box: trim-both cap alphabetic){.banner .title,.banner .text:not(:empty){text-box:trim-both cap alphabetic;padding-block:calc((1lh - 1cap)/2)}}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-padding-y: var(--ds-banner-padding-y, var(--space-2));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
82
82
  }
83
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BannerComponent, decorators: [{
84
84
  type: Component,
85
- args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapper lets `:empty` answer \"is there a body?\"; a bare projected text node is otherwise invisible to selectors. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\">\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-padding-y: var(--ds-banner-padding-y, var(--space-3));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-title-font-size: var(--ds-banner-title-font-size, var(--font-size-s));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-scale-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-padding-y) var(--_banner-padding-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--_banner-title-font-size)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;margin-top:var(--space-1);font-size:var(--_banner-body-font-size)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-padding-y: var(--ds-banner-padding-y, var(--space-2));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"] }]
85
+ args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\">\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapper lets `:empty` answer \"is there a body?\"; a bare projected text node is otherwise invisible to selectors. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss()\">\n <ds-icon\n name=\"x\"\n [size]=\"16\">\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-padding-y: var(--ds-banner-padding-y, var(--space-3));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-title-font-size: var(--ds-banner-title-font-size, var(--font-size-s));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-scale-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-padding-y) var(--_banner-padding-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0;align-self:center}.banner .title{font:var(--font-weight-bold) var(--_banner-title-font-size)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;font-size:var(--_banner-body-font-size)}.banner .title+.text:not(:empty){margin-top:var(--space-1)}@supports (text-box: trim-both cap alphabetic){.banner .title,.banner .text:not(:empty){text-box:trim-both cap alphabetic;padding-block:calc((1lh - 1cap)/2)}}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-padding-y: var(--ds-banner-padding-y, var(--space-2));--_banner-padding-x: var(--ds-banner-padding-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"] }]
86
86
  }], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], accentRail: [{ type: i0.Input, args: [{ isSignal: true, alias: "accentRail", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], noRail: [{
87
87
  type: HostBinding,
88
88
  args: ['class.no-rail']