@ids-group-ltd/ids-design-system 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +261 -3
  2. package/agent/INDEX.md +12 -2
  3. package/agent/feedback/ds-attachment.md +12 -0
  4. package/agent/feedback/ds-chat-attachment.md +10 -0
  5. package/agent/feedback/ds-chat-message.md +11 -0
  6. package/agent/feedback/ds-chat-step.md +10 -0
  7. package/agent/feedback/ds-chat-steps.md +10 -0
  8. package/agent/feedback/ds-chat-thread.md +11 -0
  9. package/agent/feedback/ds-timeline-item.md +3 -1
  10. package/agent/feedback/ds-timeline.md +9 -0
  11. package/agent/feedback/ds-toast.md +1 -1
  12. package/agent/feedback/ds-tree.md +3 -1
  13. package/agent/forms/ds-chat-input.md +16 -0
  14. package/agent/forms/ds-inline-edit.md +14 -0
  15. package/agent/foundations/tokens.md +3 -3
  16. package/agent/navigation/ds-splitter.md +14 -0
  17. package/agent/platform/toast-service.md +3 -2
  18. package/agent/tables/ds-table.md +1 -1
  19. package/components.md +107 -9
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +7 -4
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +858 -0
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -0
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +107 -0
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs.map +1 -0
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +2 -2
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +359 -0
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -0
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +74 -17
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +163 -20
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +2 -2
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +146 -24
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +54 -0
  59. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  62. package/migrations/1.0.2.json +28 -0
  63. package/migrations/1.0.3.json +15 -0
  64. package/migrations/1.1.0.json +183 -0
  65. package/package.json +25 -1
  66. package/schematics/check-overrides/surface.json +181 -5
  67. package/styles/_dropdown-overlay.scss +6 -4
  68. package/styles/_step-marker.scss +51 -0
  69. package/styles/_tokens.scss +5 -3
  70. package/themes/README.md +2 -1
  71. package/themes/_semantic.scss +10 -0
  72. package/themes/dark/_palette.scss +1 -2
  73. package/themes/dark/_theme.scss +24 -3
  74. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +3 -1
  75. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  76. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
  77. package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +340 -0
  78. package/types/ids-group-ltd-ids-design-system-components-inline-edit.d.ts +43 -0
  79. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
  80. package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +83 -0
  81. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +34 -5
  82. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +53 -4
  83. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +51 -7
  84. package/types/ids-group-ltd-ids-design-system-core.d.ts +104 -0
  85. package/types/ids-group-ltd-ids-design-system.d.ts +6 -3
package/components.md CHANGED
@@ -31,9 +31,9 @@
31
31
  Loaded via `@use 'styles/tokens';` (when the consumer also `@use 'styles/ds';` the full aggregate is pulled in). Brand themes override Tier 1 palette + a few Tier 2 roles in their own `_brand-*.scss`.
32
32
 
33
33
  **Colour roles:**
34
- - Surfaces: `--surface-canvas`, `--surface-default`, `--surface-secondary`, `--surface-overlay`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
35
- - Borders: `--border-default`, `--border-strong`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
36
- - Text: `--text-primary`, `--text-secondary`, `--text-tertiary`, `--text-muted`, `--text-disabled`, `--text-inverted`, `--text-link`, `--text-link-visited`, `--text-on-primary`, `--text-on-success`, `--text-on-error`
34
+ - Surfaces: `--surface-canvas`, `--surface-default`, `--surface-secondary`, `--surface-overlay`, `--surface-overlay-secondary`, `--surface-overlay-muted`, `--surface-overlay-raised`, `--surface-overlay-raised-secondary`, `--surface-overlay-raised-muted`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
35
+ - Borders: `--border-default`, `--border-strong`, `--border-overlay`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
36
+ - Text: `--text-primary`, `--text-secondary`, `--text-tertiary`, `--text-tertiary-overlay`, `--text-muted`, `--text-disabled`, `--text-inverted`, `--text-link`, `--text-link-visited`, `--text-on-primary`, `--text-on-success`, `--text-on-error`
37
37
  - Icons: `--icon-default`, `--icon-strong`, `--icon-muted`, `--icon-on-primary`
38
38
  - Primary (main brand fill): `--primary`, `--primary-hover`, `--primary-pressed`, `--primary-selected-hover`, `--primary-strong`, `--primary-subtle`, `--primary-muted`, `--primary-muted-strong`, `--primary-on` + HSL channels `--primary-h/s/l`
39
39
  - Secondary (paired CTAs, accent rails, opt-in variants): `--secondary`, `--secondary-hover`, `--secondary-pressed`, `--secondary-strong`, `--secondary-subtle`, `--secondary-muted`, `--secondary-on` + HSL channels `--secondary-h/s/l`
@@ -188,6 +188,17 @@ Tokens: `--ds-icon-button-bg-color`, `--ds-icon-button-icon-color`, `--ds-icon-b
188
188
  All inputs: `icon: required IconName`, `ariaLabel: required string`, `ariaDescribedBy: string | null = null`, `variant: 'standard' | 'filled' | 'tonal' | 'outlined' = 'standard'`, `color: ButtonColor = 'primary'`, `size: 'sm' | 'md' | 'lg' = null`, `type: 'button' | 'submit' | 'reset' = 'button'`, `disabled: boolean = false`, `selected: boolean | null = null`, `ariaHasPopup: 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' = null`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`
189
189
  <!-- /inputs -->
190
190
 
191
+ #### `<ds-inline-edit>` — `InlineEditComponent`
192
+ Text that turns into a field of the same font and size when clicked, to rename it in place: a chat or document title, a layer, a list name. Put it inside the element that gives the text its role and type, such as a heading; it inherits the font, and the text keeps its place when the field replaces it.
193
+ At rest it is plain text. Hover shows a tinted background behind the text and a pencil at its end; keyboard focus adds the focus ring; the tooltip reads `DS_INTL.inlineEdit.rename` ("Rename"). Long text truncates with an ellipsis.
194
+ Keyboard: the text is a button, so Enter, Space, a click or F2 edits, with the text selected. Enter or leaving the field saves; Escape cancels (and does not reach a dialog around it). Enter and Escape return focus to the text. A blank or unchanged value saves nothing.
195
+ Value: `value: model<string>` two-way; `(saved): string` emits the trimmed new value after a save that changed it, and `DS_INTL.inlineEdit.saved` ("Saved") is announced. Inputs: `placeholder` (shown muted while empty), `maxLength`, `disabled` (plain text, no affordance), `ariaLabel` (what the text is, e.g. "Chat title"; the text is announced as "Chat title: <value>"). Method: `edit()`.
196
+ Tokens: `--ds-inline-edit-padding`, `--ds-inline-edit-hover-bg-color`, `--ds-inline-edit-border-color`, `--ds-inline-edit-radius`.
197
+
198
+ <!-- inputs:ds-inline-edit -->
199
+ All inputs: `value: string = ''`, `placeholder: string = ''`, `maxLength: number | null = null`, `disabled: boolean = false`, `ariaLabel: string | null = null`
200
+ <!-- /inputs -->
201
+
191
202
  #### `<ds-input>` — `InputComponent`
192
203
  Inputs: `value: model<string>`, `type: InputType = 'text'` (`'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search'`), `size: 'sm' | 'md' | 'lg' = 'md'`, `label: string = ''`, `hint: string = ''`, `placeholder: string = ''`, `disabled: boolean = false`, `invalid: boolean = false`, `required: boolean = false`, `optional: boolean = false`, `name: string | null = null`, `clearable: boolean | null = null` (inline clear (×) button; `null` resolves to `true` for `type="search"` and `false` otherwise)
193
204
  Content slots — addon attributes apply to any child element:
@@ -230,6 +241,19 @@ Methods: `focus(options?)`, `selectionStart` / `selectionEnd` (reads), `setSelec
230
241
  All inputs: `hint: string = ''`, `error: string = ''`, `warning: string = ''`, `reserveMessage: boolean | null = null`, `messageIcon: IconName | false | null = null`, `errors: readonly DsFieldError[] = []`, `invalid: boolean = false`, `touched: boolean = false`, `pending: boolean = false`, `dirty: boolean = false`, `showDirty: boolean | null = null`, `hidden: boolean = false`, `value: string = ''`, `size: 'sm' | 'md' | 'lg' = null`, `label: string = ''`, `placeholder: string = ''`, `disabled: boolean = false`, `readOnly: boolean = false`, `readonly: boolean = false`, `success: string = ''`, `required: boolean = false`, `optional: boolean = false`, `rows: number = 3`, `name: string | null = null`, `autosize: boolean = false`, `minRows: number | null = null`, `maxRows: number | null = null`, `resize: 'none' | 'vertical' | 'horizontal' | 'both' = 'vertical'`, `ariaLabel: string | null = null`, `maxLength: number | null = null`, `maxLengthMode: 'hard' | 'soft' = 'hard'`, `countTrimmed: boolean = false`, `minLength: number | null = null`, `pattern: readonly RegExp[] = []`
231
242
  <!-- /inputs -->
232
243
 
244
+ #### `<ds-chat-input>` — `ChatInputComponent`
245
+ Message box for a chat or an instruction: chips above an auto-growing text area, a bottom bar with actions on the left and the send button on the right. Use it instead of a `ds-textarea` beside icon buttons, or a `ds-search` standing in for a message box.
246
+ Slots: `[attachments]` on the page above the frame (the app's own card for a picked element and its snapshot; hidden while empty), `[chips]` above the text inside the frame (project `ds-tag`s for attachments and picked elements; hidden while empty), `[actions]` on the left of the bar (an attach `ds-icon-button`), `[send]` replaces the default send button (render your own states, e.g. Queue / Stop while `busy`; call `submit()` or read `canSubmit`).
247
+ Keyboard: Enter emits `(submitted): string` with the trimmed text; Shift+Enter breaks the line; an Enter that commits an IME composition never submits; blank text, `busy` and `disabled` never submit. Enter on blank text inserts nothing.
248
+ Send button: a 32px `ds-button` with an arrow, named by `DS_INTL.chatInput.send`, disabled while the text is blank. `busy` puts it in `loading` (spinner, `aria-busy`, press refused, focus kept). `layout: ChatInputLayout = 'status-bar'` places the `busyLabel` step: `'status-bar'` beside the fixed square button, `'status-above'` on a reserved line above the box, `'split'` attach outside left and send outside right with the step above, `'send-outside'` a round 40px send outside right, `'toolbar'` attach, step and send in a row under the box.
249
+ Output: `(filesPasted): File[]` — the image files of a paste; the paste inserts no text when it carries images. The value is NOT cleared on submit: set `value` to `''` once the message is accepted.
250
+ Methods: `submit()`, `focus(options?)`; `canSubmit` signal. Text area name: `ariaLabel`, else `DS_INTL.chatInput.label`.
251
+ Tokens: `--ds-chat-input-bg-color`, `--ds-chat-input-radius`, `--ds-chat-input-padding`; border, hover and focus follow the `--ds-field-*` set.
252
+
253
+ <!-- inputs:ds-chat-input -->
254
+ All inputs: `value: string = ''`, `placeholder: string = ''`, `ariaLabel: string | null = null`, `minRows: number = 1`, `maxRows: number = 8`, `disabled: boolean = false`, `busy: boolean = false`, `busyLabel: string = ''`, `layout: ChatInputLayout = 'status-bar'`
255
+ <!-- /inputs -->
256
+
233
257
  #### `<ds-number-stepper>` — `NumberStepperComponent`
234
258
  Spinbox for bounded quantities — −/+ buttons around a numeric value.
235
259
  Inputs: `value: model<number> = 0`, `min: number = 0`, `max: number | null = null`, `step: number = 1`, `size: 'sm' | 'md' | 'lg' = 'md'`, `disabled: boolean = false`
@@ -436,6 +460,15 @@ Input: `status: DsStatusKey` (same consumer-registered vocabulary as `ds-badge`;
436
460
  All inputs: `status: DsStatusKey`, `ariaLabel: string | null = null`
437
461
  <!-- /inputs -->
438
462
 
463
+ #### `<ds-attachment>` — `AttachmentComponent`
464
+ A file attached to a message, for the `[chips]` slot of `<ds-chat-input>`: a 24px type tile (PDF, DOC, IMG, FILE) or an image preview, the file name in bold and a muted second line.
465
+ Inputs: `name: required string`, `meta: string = ''` (e.g. `'PDF · 240 KB'`), `kind: AttachmentKind = 'file'` (`'pdf' | 'doc' | 'image' | 'file'`), `previewUrl: string | null = null` (used when `kind` is `'image'`), `removable: boolean = false`. Output: `(removed): void`.
466
+ Accessibility: the remove button is named `DS_INTL.attachment.remove(name)` ("Remove Brief.pdf"), the kind ("PDF document") is announced before `meta`, an image preview takes `name` as alt text.
467
+
468
+ <!-- inputs:ds-attachment -->
469
+ All inputs: `name: required string`, `meta: string = ''`, `kind: 'pdf' | 'doc' | 'image' | 'file' = 'file'`, `previewUrl: string | null = null`, `removable: boolean = false`
470
+ <!-- /inputs -->
471
+
439
472
  #### `<ds-tag>` — `TagComponent`
440
473
  Inputs: `variant: 'solid' | 'neutral' = 'solid'`, `closable: boolean = false`
441
474
  Output: `(closed): void` — emits when the close button is pressed
@@ -539,7 +572,7 @@ The companion `<ds-toast-region>` lives inside the `ToastService` (see Services)
539
572
  A toast leaving with focus inside it (its action, its close button, or `ToastRef.dismiss()`) hands focus to the next toast in the region, else back to the element focused before focus entered the region, as a dialog returns it.
540
573
 
541
574
  <!-- inputs:ds-toast -->
542
- All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'loading' = 'info'`, `title: string = ''`, `body: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `action: ToastAction | null = null`
575
+ All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'loading' = 'info'`, `title: string = ''`, `body: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `action: ToastAction | null = null`, `occurrences: readonly ToastOccurrence[] = []`
543
576
  <!-- /inputs -->
544
577
 
545
578
  ---
@@ -564,10 +597,61 @@ Tokens: `--ds-loading-overlay-radius` (default `0`) rounds the scrim's corners;
564
597
  All inputs: `loading: boolean = false`, `label: string = ''`, `blur: boolean = true`, `spinnerSize: 'sm' | 'md' | 'lg' = 'md'`, `insetTop: string = '0'`, `inertContent: boolean = true`
565
598
  <!-- /inputs -->
566
599
 
600
+ #### `<ds-timeline>` — `TimelineComponent`
601
+
602
+ The list that holds `ds-timeline-item`s, at any depth: it marks the first and last item so the connector stops at both ends. For an agent's steps beside a chat message use `ds-chat-steps`.
603
+
604
+ <!-- inputs:ds-timeline -->
605
+ <!-- /inputs -->
606
+
567
607
  #### `<ds-timeline-item>` — `TimelineItemComponent`
568
608
 
609
+ Slots: default content below the heading; `[trailing]` at the end of the heading row (Undo, Stop, Retry); `[details]` behind a chevron toggle (down while closed, up while open), closed by default, open state two-way as `expanded`; it opens with a height transition, and an open item sits on a tinted card behind its marker, text and details (`--ds-timeline-open-bg-color`, default `--surface-secondary`). `status` draws the marker and is spoken before the heading; while set, `icon` and `tone` are ignored. Place items inside `<ds-timeline>`, at any depth: it marks the last item, which draws no connector. A `pending` step draws a dashed ring and muted text (a planned step not reached yet).
610
+
569
611
  <!-- inputs:ds-timeline-item -->
570
- All inputs: `heading: string = ''`, `time: string = ''`, `icon: IconName | null = null`, `tone: TimelineTone = 'default'`
612
+ All inputs: `heading: string = ''`, `time: string = ''`, `icon: IconName | null = null`, `tone: TimelineTone = 'default'`, `status: 'done' | 'running' | 'pending' | 'error' = null`, `expanded: boolean = false`
613
+ <!-- /inputs -->
614
+
615
+ #### `<ds-chat-message>` — `ChatMessageComponent`
616
+
617
+ One message of a chat: `role: ChatMessageRole = 'assistant'` puts a filled bubble on the right (`'user'`) or a subtle one on the left (`'assistant'`). `author` shows above the bubble; `time` (already formatted) under it, in a thread only under the last message of a run, and not while `streaming`; `sentAt: Date | string | number | null` lets a thread split runs by time; without `author` the role is spoken (`DS_INTL.chat.user` / `assistant`). Slots: default (the text, or the markdown your app renders; a user message keeps its line breaks), `[steps]` above the bubble, on the thread's surface (a `ds-chat-steps` of the agent's steps; a message with only steps draws no bubble), `[attachments]` under the text (`ds-chat-attachment` for something to open, `ds-tag` for a plain file), `[actions]` under the bubble (copy, retry), shown on hover or focus and always without hover. Text is selectable and long words and URLs wrap. The window, tabs, composer and question cards around it stay in the app. `streaming` marks a reply still arriving (caret after the text, `aria-busy`, `[actions]` hidden; the thread reads it when it completes). `status: ChatMessageStatus | null` is the delivery of a sent message, under it in place of the time: `'sending'` (dimmed), `'failed'` with a Retry button emitting `(retry)`; `'sent'` shows nothing and is only spoken; the app resends and sets `status` back. `stepsFolded` (two-way) folds the `[steps]` into a chip at the top of the bubble with the step count and the failed count; the chip toggles them (`aria-expanded`), and stays once shown. Steps are counted from their `ds-chat-step`s; a step that fails while folded opens the steps again.
618
+ Tokens: `--ds-chat-message-max-width` (default `85%`), `--ds-chat-message-radius`, `--ds-chat-message-padding`, `--ds-chat-message-user-bg-color` / `-user-color`, `--ds-chat-message-assistant-bg-color` / `-assistant-color`.
619
+
620
+ <!-- inputs:ds-chat-message -->
621
+ All inputs: `role: 'user' | 'assistant' = 'assistant'`, `author: string = ''`, `time: string = ''`, `sentAt: Date | string | number | null = null`, `streaming: boolean = false`, `status: 'sending' | 'sent' | 'failed' = null`, `stepsFolded: boolean = false`
622
+ <!-- /inputs -->
623
+
624
+ #### `<ds-chat-thread>` — `ChatThreadComponent`
625
+
626
+ Scrollable list of `ds-chat-message`s; give it a height (or `flex: 1` in a column). Stays at the newest message as messages arrive or grow; once the reader scrolls up it stays put and shows a jump button with the count of messages that arrived below (`DS_INTL.chat.newMessages(count)`, `latest` when none). A message with `role="user"` arriving scrolls back down. Consecutive messages of one role sit at `--ds-chat-thread-group-gap`, speakers apart at `--ds-chat-thread-gap`; only the last message of a run takes the tight bottom corner on the speaker's side (`--ds-radius-inner`), the messages above it stay round. With `sentAt` on the messages, a gap of `timeBreakMinutes` (default `15`) or more starts a new run under a centred divider (`DS_INTL.chat.today` / `yesterday` or the date, then the time, in `DsConfig.locale`); the first dated message gets one too. `working` shows a spinner row with `workingLabel` (else `DS_INTL.chat.working`) at the end; never put a time estimate in it. Screen readers: the list is not a live region; the thread announces a finished assistant reply once (when it arrives while not `working`, or when `working` clears) and the working label, and never the messages present at first render. Older messages: set `hasOlder` and scrolling near the start emits `(loadOlder)` once until the list changes; prepend them and the thread keeps the message in view in place; `loadingOlder` shows a spinner over the top. A user message that arrives folds the steps of the replies before it, except a reply with a failed step the reader has not opened (`foldStepsOnSend`, default `true`); messages and steps that arrive later grow in while a pinned thread keeps its bottom still. Method: `scrollToEnd()`.
627
+ Tokens: `--ds-chat-thread-gap`, `--ds-chat-thread-group-gap`, `--ds-chat-thread-padding`.
628
+
629
+ <!-- inputs:ds-chat-thread -->
630
+ All inputs: `working: boolean = false`, `workingLabel: string = ''`, `ariaLabel: string | null = null`, `foldStepsOnSend: boolean = true`, `timeBreakMinutes: number = 15`, `hasOlder: boolean = false`, `loadingOlder: boolean = false`
631
+ <!-- /inputs -->
632
+
633
+ #### `<ds-chat-attachment>` — `ChatAttachmentComponent`
634
+
635
+ Chip in a message's `[attachments]` slot (`label` required, `source` muted after it, `icon` default `paperclip`). Open, it becomes a card on a line of its own: the same header row, then its default slot framed in a preview (such as a snapshot of a picked element as it was when sent), scrolling past `--ds-chat-attachment-preview-max-height` (default `16rem`). `expanded` binds the open state two-way; the header button carries `aria-expanded` and `aria-controls`. Tokens: `--ds-chat-attachment-bg-color`, `--ds-chat-attachment-preview-bg-color`, `--ds-chat-attachment-preview-max-height`.
636
+
637
+ <!-- inputs:ds-chat-attachment -->
638
+ All inputs: `label: required string`, `source: string = ''`, `icon: IconName | null = 'paperclip'`, `expanded: boolean = false`
639
+ <!-- /inputs -->
640
+
641
+ #### `<ds-chat-steps>` — `ChatStepsComponent`
642
+
643
+ The steps of an agent's work, in the `[steps]` slot of a `ds-chat-message`: `ds-chat-step`s in order, at any depth, with 16px markers, the smaller text size and 4px rows with no connector. Import from `@ids-group-ltd/ids-design-system/components/chat` with the rest of the chat family. `enter: ChatStepsEnter = 'together'` brings steps that arrive at once (a plan given up front) into a message as one block, or `'stagger'` one after another; steps that arrive one at a time grow in either way.
644
+
645
+ <!-- inputs:ds-chat-steps -->
646
+ All inputs: `enter: 'together' | 'stagger' = 'together'`
647
+ <!-- /inputs -->
648
+
649
+ #### `<ds-chat-step>` — `ChatStepComponent`
650
+
651
+ One step: `heading`, optional `time`, and `status: ChatStepStatus | null` (`'done' | 'running' | 'pending' | 'waiting' | 'error'`), which draws the marker (a check, a spinner, a dashed ring with muted text, a grey disc with a pause glyph, a cross) and is spoken before the heading (`DS_INTL.chat.stepDone`, `stepRunning`, `stepPending`, `stepWaiting` "Waiting for your approval", `stepFailed`). Slots: default content under the heading (the reader's answer buttons on a `waiting` step, whose marker stays beside the heading); `[trailing]` at the end of the heading row (Stop, Retry); `[details]` behind a chevron toggle (`DS_INTL.chat.stepDetails(heading)`), closed by default, open state two-way as `expanded`; it opens with a height transition on a tinted card. A failed step the reader has not opened keeps its message's steps unfolded.
652
+
653
+ <!-- inputs:ds-chat-step -->
654
+ All inputs: `heading: string = ''`, `time: string = ''`, `status: 'done' | 'running' | 'pending' | 'waiting' | 'error' = null`, `expanded: boolean = false`
571
655
  <!-- /inputs -->
572
656
 
573
657
  #### `<ds-toast-region>` — `ToastRegionComponent`
@@ -578,8 +662,10 @@ All inputs: `maxVisible: number`, `showQueueCount: boolean = true`
578
662
 
579
663
  #### `<ds-tree>` — `TreeComponent`
580
664
 
665
+ Nested rows with one tab stop and arrow-key navigation. `(nodeSelected)` emits the node selected; `(nodeHover)` emits the node under the pointer or newly focused, `null` when the pointer leaves the tree. `<ng-template dsTreeTrailing let-node>` draws at the end of every row (a badge, a count, a small icon button); a click inside it neither selects nor toggles the row, and its controls are tab stops on the focused row only. `selection="multiple"` binds `[(selectedIds)]`: Shift-click, Ctrl-click, Shift+Space or Ctrl+Space adds or removes a row, a plain click or Enter selects it alone, and the host carries `aria-multiselectable`.
666
+
581
667
  <!-- inputs:ds-tree -->
582
- All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selectedId: string | null = null`
668
+ All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selection: 'single' | 'multiple' = 'single'`, `selectedId: string | null = null`, `selectedIds: string[] = []`
583
669
  <!-- /inputs -->
584
670
 
585
671
  #### `<ds-description-list>` — `DescriptionListComponent`
@@ -734,6 +820,17 @@ All inputs: `gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' = null`, `align: 'st
734
820
  All inputs: `gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' = null`, `align: 'start' | 'center' | 'end' | 'stretch' = null`
735
821
  <!-- /inputs -->
736
822
 
823
+ #### `<ds-splitter>` — `SplitterComponent`
824
+ Two panes with a handle between them that resizes one of them: a preview beside a chat, a list beside a detail, an editor above its output. Slots: `[start]` and `[end]`. `orientation="horizontal"` (default) lays them side by side, `"vertical"` stacks them. `pane` (`'start'` default, or `'end'`) is the pane `size` measures; the other takes the rest. Give the splitter a size: it fills the box its parent gives it.
825
+ Size: `size: model<number | null>` in px, `null` shows `defaultSize` (320); `min` (160) and `max` (640) bound it inclusively, and the pane never takes more than the splitter less the handle. A drag writes `size` once, on release; each key press writes it. `persistKey` saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over the bound `size`.
826
+ Handle: `role="separator"`, focusable, `aria-valuenow` / `aria-valuemin` / `aria-valuemax` in px, `aria-controls` the measured pane. Name it with `ariaLabel` (what it resizes, e.g. "Preview width"); unset falls back to `DS_INTL.splitter.label`. Keyboard: arrows along the axis move it by 16px, with Shift or PageUp / PageDown by 64px, Home / End to `min` / `max`. A double click returns to `defaultSize`. The left button only; the handle stays under the pointer, and while it is dragged the whole page keeps the resize cursor and selects no text. At a limit the cursor shows the one direction still possible. Dragged past `min` or `max` the handle follows with growing resistance (up to 100px, at most a third of the pane it squashes), its line thickening on the same curve up to `--ds-splitter-overdrag-line-scale` times its width (default `3`), and springs back on release; `overdrag: 'elastic' | 'none' = 'elastic'`, off under `prefers-reduced-motion: reduce`.
827
+ Look: at rest a three-dot grip in the gap, no line; hover and drag swap it for a neutral line (stronger while dragging), keyboard focus for a line in `--focus-ring-color`. The handle fills the gap between the panes: for two rounded panels with space between them, set `--ds-splitter-gap` to that space.
828
+ Tokens: `--ds-splitter-gap`, `--ds-splitter-line-color`, `--ds-splitter-drag-color`, `--ds-splitter-grip-color`, `--ds-splitter-overdrag-line-scale` (a number: how many times the line widens at the full pull).
829
+
830
+ <!-- inputs:ds-splitter -->
831
+ All inputs: `orientation: 'horizontal' | 'vertical' = 'horizontal'`, `pane: 'start' | 'end' = 'start'`, `size: number | null = null`, `defaultSize: number = 320`, `min: number = 160`, `max: number = 640`, `persistKey: string = ''`, `ariaLabel: string | null = null`, `overdrag: 'elastic' | 'none' = 'elastic'`
832
+ <!-- /inputs -->
833
+
737
834
  #### `<ds-sidenav-footer>` — `SidenavFooterComponent`
738
835
 
739
836
  <!-- inputs:ds-sidenav-footer -->
@@ -907,7 +1004,7 @@ Cell templates: `<ng-template dsCellTemplate="<colKey>" [dsCellTemplateOf]="rows
907
1004
  Content slots: `[empty]` (rendered when `data.length === 0`), `[bulk-actions]` (rendered in the bulk action bar when `selectable && some selected`)
908
1005
  Loading modes: `'skeleton'` replaces rows with `ds-skeleton` shimmer placeholders; `'overlay'` keeps existing rows visible behind a translucent layer with a centred spinner; under `'skeleton'` the footer pager takes `loading` as well - its controls disable and its range label is masked, so it never quotes the previous query's count. `'overlay'` leaves the pager live, like the header.
909
1006
  Footer pager: `pageSizeOptions`, `showPageSize`, `showLabel`, `paginationSize: DsSize | null = null` and `paginationLayout: PaginationLayout | null = null` are the embedded `ds-pagination`'s own inputs forwarded one-to-one; the last two unset resolve `DS_CONFIG.pagination.size` (then `DS_CONFIG.control.size`, then `sm`) and `DS_CONFIG.pagination.layout` (then `'grouped'`), so an app whose every pager wants `md` / `spread` says it once in the config. A paged table with no rows announces its empty state's text (`[empty]` or `emptyTemplate`); with none it announces `rangeAnnouncement(0, 0, 0)`, `Showing 0 of 0` by default.
910
- Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--radius-md)`, `--ds-table-bg-color`, `--ds-table-head-text-color: var(--text-secondary)`, `--ds-table-head-bg-color: var(--surface-secondary)`, `--ds-table-head-font-size: var(--font-size-xs)`, `--ds-table-row-hover-bg-color`, `--ds-table-row-selected-bg-color`, `--ds-table-divider`, `--ds-table-sort-active-icon-color`, `--ds-table-cell-padding-x/y`, `--ds-table-utility-column-width` (the column the column picker and the row-actions ⋮ ride in; default `--space-6`, the buttons' own size, so the column is as wide as its padding makes it) and `--ds-table-utility-column-padding-x` (one length for both sides; default the cell padding chain), `--ds-table-footer-padding-y` / `-top` / `-bottom` (the pagination footer's block padding; default `--space-3`). (Renamed 2026-06: `--ds-table-header-*` → `--ds-table-head-*`, matching the tokens reference.)
1007
+ Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--radius-md)`, `--ds-table-bg-color`, `--ds-table-head-text-color: var(--text-secondary)`, `--ds-table-head-bg-color: var(--surface-secondary)`, `--ds-table-head-font-size: var(--font-size-xs)`, `--ds-table-row-hover-bg-color`, `--ds-table-row-selected-bg-color`, `--ds-table-divider`, `--ds-table-sort-active-icon-color`, `--ds-table-resize-line-color: var(--text-tertiary)` (the column resize line at rest), `--ds-table-cell-padding-x/y`, `--ds-table-utility-column-width` (the column the column picker and the row-actions ⋮ ride in; default `--space-6`, the buttons' own size, so the column is as wide as its padding makes it) and `--ds-table-utility-column-padding-x` (one length for both sides; default the cell padding chain), `--ds-table-footer-padding-y` / `-top` / `-bottom` (the pagination footer's block padding; default `--space-3`). (Renamed 2026-06: `--ds-table-header-*` → `--ds-table-head-*`, matching the tokens reference.)
911
1008
 
912
1009
  <!-- inputs:ds-table -->
913
1010
  All inputs: `data: required readonly T[]`, `rowId: ((row: T) => string) | null = null`, `columns: required readonly TableColumn<T>[]`, `selectable: boolean = false`, `bordered: boolean | null = null`, `loading: boolean | 'skeleton' | 'overlay' = false`, `stickyHeader: boolean = true`, `printAllRows: boolean = false`, `printHeading: string | null = null`, `printHeadingNote: string | null = null`, `maxHeight: string | null = null`, `density: 'default' | 'compact' = 'default'`, `zebra: boolean = false`, `animateHeight: boolean = false`, `selectedIds: Set<string>`, `sortKey: string | null = null`, `sortDirection: 'asc' | 'desc' = null`, `sortingOrder: SortDirection[]`, `sortAnnouncement: ((label: string, dir: SortDirection) => string) | null = null`, `rangeAnnouncement: ((first: number, last: number, total: number) => string) | null = null`, `skeletonRows: number = 5`, `caption: string = ''`, `rowInteractive: boolean = false`, `activeRowId: string | null = null`, `filterQuery: string = ''`, `columnFilters: Map<string, ReadonlySet<string>>`, `persistLayout: boolean = false`, `storageKey: string = ''`, `stickyScrollbar: boolean | null = null`, `pageSize: number | null = null`, `page: number = 1`, `pageSizeOptions: number[]`, `showPageSize: boolean = true`, `showLabel: boolean = true`, `paginationSize: 'sm' | 'md' | 'lg' = null`, `paginationLayout: 'grouped' | 'spread' = null`, `total: number | null = null`, `scrollToTopOnPageChange: boolean = false`, `sortMode: 'client' | 'server' | 'none' = null`, `filterMode: 'client' | 'server' | 'none' = null`, `columnFilterOptions: ReadonlyMap<string, readonly string[]>`, `stickyScrollbarOffset: string | null = null`, `layout: 'fixed' | 'auto' = null`, `stickyFirstColumn: boolean = false`, `virtualScroll: boolean = false`, `virtualRowSize: number = 44`, `lazy: boolean = false`, `rowActions: readonly TableRowAction<T>[] = []`, `cellTemplateMap: Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>> = {}`, `emptyTemplate: TemplateRef<unknown> | null = null`, `expandableRows: boolean = false`, `expandedIds: Set<string>`, `expandMode: 'multiple' | 'single' = 'multiple'`, `expandAllToggle: boolean = false`, `rowExpandTemplate: TemplateRef<{
@@ -1332,13 +1429,14 @@ this.crumbs.clear();
1332
1429
 
1333
1430
  #### `ToastService`
1334
1431
  `@Injectable({ providedIn: 'root' })`. Inject and call:
1335
- - `show(opts: ToastOptions): ToastRef` — `{ title?, body, variant?: 'info' | 'success' | 'warning' | 'error' | 'loading', dismissible?, icon?, action?: ToastAction, durationMs? = 5000 }`. Returns `{ id, dismiss() }`. `durationMs: 0` (and any negative) means it never auto-dismisses, and it is counted from the moment the toast becomes VISIBLE, not from the call — a toast queued behind `maxVisible` keeps its full time on screen. A `loading` toast is forced to 0 and discards a supplied `durationMs`.
1336
- - `promise<T>(source: Promise<T>, messages: ToastPromiseMessages): Promise<T>` — shows a `loading` toast, then patches it in place to `success` or `error` when `source` settles. Returns `source` itself, so an un-`catch`ed call still produces an unhandled rejection. The settled toast dismisses after a hard-coded 4s (success) or 6s (error), counted from the moment it becomes visible and not overridable; `dismissAll()` cancels it like any other.
1432
+ - `show(opts: ToastOptions): ToastRef` — `{ title?, body, variant?: 'info' | 'success' | 'warning' | 'error' | 'loading', dismissible?, icon?, action?: ToastAction, durationMs? = 5000, groupKey? }`. Returns `{ id, dismiss(), update(patch) }`: `update` takes a `ToastUpdate` (`title`, `body`, `variant`, `durationMs`, `dismissible`) and changes the toast in place while it is on screen or queued, and does nothing once it is gone; it is announced only when `variant` turns `success` or `error`, `durationMs` restarts the countdown, and a toast leaving `loading` without one counts down 5000 ms. `durationMs: 0` (and any negative) means it never auto-dismisses, and it is counted from the moment the toast becomes VISIBLE, not from the call — a toast queued behind `maxVisible` keeps its full time on screen. A `loading` toast is forced to 0 and discards a supplied `durationMs`.
1433
+ - `promise<T>(source: Promise<T>, messages: ToastPromiseMessages): Promise<T>` — shows a `loading` toast, then patches it in place to `success` or `error` when `source` settles. Returns `source` itself, so an un-`catch`ed call still produces an unhandled rejection. The settled toast dismisses after a hard-coded 4s (success) or 6s (error), counted from the moment it becomes visible and not overridable; `dismissAll()` cancels it like any other. A toast closed before `source` settles stays closed and its outcome is not announced.
1337
1434
  - `dismissAll(): void`
1338
1435
 
1339
1436
  Defaults come from `provideDsConfig({ toast: … })`:
1340
1437
  - `maxVisible?: number` — cap on concurrently visible toasts. Default `5`; `0` means unlimited. Extras queue and appear as earlier ones dismiss.
1341
1438
  - `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.
1439
+ - `groupDuplicates?: boolean` — fold a `show()` whose `variant`, `title` and `body` match a visible or queued toast into it as a `×N` stack (or, with `groupKey`, any call with the same key), restarting its countdown. The stack lists each occurrence with its time under "Show all"; its close, and the `ToastRef` every folded call returns, dismiss the whole stack. Loading and `promise()` toasts never fold. Default `false`.
1342
1440
  - `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.
1343
1441
 
1344
1442
  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()`.
@@ -401,7 +401,7 @@ class AppLayoutComponent {
401
401
  this.destroyRef.onDestroy(() => desktop.removeEventListener('change', sync));
402
402
  }
403
403
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
404
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: AppLayoutComponent, isStandalone: true, selector: "ds-app-layout", inputs: { topbarSpan: { classPropertyName: "topbarSpan", publicName: "topbarSpan", isSignal: true, isRequired: false, transformFunction: null }, railOpen: { classPropertyName: "railOpen", publicName: "railOpen", isSignal: true, isRequired: false, transformFunction: null }, railLabel: { classPropertyName: "railLabel", publicName: "railLabel", isSignal: true, isRequired: false, transformFunction: null }, restoreScroll: { classPropertyName: "restoreScroll", publicName: "restoreScroll", isSignal: true, isRequired: false, transformFunction: null }, restoreScrollTimeout: { classPropertyName: "restoreScrollTimeout", publicName: "restoreScrollTimeout", isSignal: true, isRequired: false, transformFunction: null }, scrollReset: { classPropertyName: "scrollReset", publicName: "scrollReset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { railOpen: "railOpenChange" }, host: { listeners: { "document:keydown.escape": "closeRail()" }, properties: { "class.app-layout": "true", "class.topbar-full": "topbarSpan() === 'full'", "class.rail-open": "railOpen()" } }, providers: [AppLayoutScrollService], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- 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", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_app-layout-desktop-min-width: var(--bp-lg, 1024px);--_app-layout-padding-x: var(--ds-app-layout-padding-x, var(--space-6));--_app-layout-padding-y: var(--ds-app-layout-padding-y, var(--space-6));--_app-layout-content-max-width: var(--ds-app-layout-content-max-width, none);--_app-layout-rail-bg-color: var(--ds-app-layout-rail-bg-color, var(--surface-overlay));--_app-layout-rail-shadow: var(--ds-app-layout-rail-shadow, var(--ds-elevation-modal));--_app-layout-scrim-color: var(--ds-app-layout-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));display:grid;grid-template-areas:\"sidenav topbar\" \"sidenav content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;height:var(--ds-app-layout-height, 100dvh);position:relative;isolation:isolate;overflow:hidden}:host(.topbar-full){grid-template-areas:\"topbar topbar\" \"sidenav content\"}.rail{display:grid;grid-area:sidenav;overflow-y:auto}@media(width<1024px){.rail{position:absolute;z-index:var(--layer-drawer);top:0;bottom:0;left:0;background:var(--_app-layout-rail-bg-color);box-shadow:var(--_app-layout-rail-shadow);transform:translate(-100%);transition:transform var(--duration-base) var(--ease-standard)}.rail.open{transform:translate(0)}}.scrim{display:none}@media(width<1024px){.scrim{display:block;position:absolute;z-index:calc(var(--layer-drawer) - 1);inset:0;background:var(--_app-layout-scrim-color);opacity:0;transition:opacity var(--duration-base) var(--ease-standard),visibility var(--duration-base) var(--ease-standard);visibility:hidden}.scrim.open{opacity:1;visibility:visible}}.bar{display:grid;grid-area:topbar}.content{grid-area:content;padding:var(--_app-layout-padding-y) var(--_app-layout-padding-x);padding-right:calc(var(--_app-layout-padding-x) - var(--ds-scrollbar-width, 0px));overflow:auto;scrollbar-gutter:stable}@media not (forced-colors:active){.content:focus{outline:none}}.inner{max-width:var(--_app-layout-content-max-width);margin-inline:auto}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
404
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: AppLayoutComponent, isStandalone: true, selector: "ds-app-layout", inputs: { topbarSpan: { classPropertyName: "topbarSpan", publicName: "topbarSpan", isSignal: true, isRequired: false, transformFunction: null }, railOpen: { classPropertyName: "railOpen", publicName: "railOpen", isSignal: true, isRequired: false, transformFunction: null }, railLabel: { classPropertyName: "railLabel", publicName: "railLabel", isSignal: true, isRequired: false, transformFunction: null }, restoreScroll: { classPropertyName: "restoreScroll", publicName: "restoreScroll", isSignal: true, isRequired: false, transformFunction: null }, restoreScrollTimeout: { classPropertyName: "restoreScrollTimeout", publicName: "restoreScrollTimeout", isSignal: true, isRequired: false, transformFunction: null }, scrollReset: { classPropertyName: "scrollReset", publicName: "scrollReset", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { railOpen: "railOpenChange" }, host: { listeners: { "document:keydown.escape": "closeRail()" }, properties: { "class.app-layout": "true", "class.topbar-full": "topbarSpan() === 'full'", "class.rail-open": "railOpen()" } }, providers: [AppLayoutScrollService], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- 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", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_app-layout-desktop-min-width: var(--bp-lg, 1024px);--_app-layout-padding-x: var(--ds-app-layout-padding-x, var(--space-6));--_app-layout-padding-y: var(--ds-app-layout-padding-y, var(--space-6));--_app-layout-content-max-width: var(--ds-app-layout-content-max-width, none);--_app-layout-rail-bg-color: var(--ds-app-layout-rail-bg-color, var(--surface-overlay));--_app-layout-rail-shadow: var(--ds-app-layout-rail-shadow, var(--ds-elevation-modal));--_app-layout-scrim-color: var(--ds-app-layout-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));display:grid;grid-template-areas:\"sidenav topbar\" \"sidenav content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;height:var(--ds-app-layout-height, 100dvh);position:relative;isolation:isolate;overflow:hidden}:host(.topbar-full){grid-template-areas:\"topbar topbar\" \"sidenav content\"}.rail{display:grid;grid-area:sidenav;overflow-y:auto}@media(width<1024px){.rail{--surface-secondary: var(--surface-overlay-secondary);--surface-muted: var(--surface-overlay-muted);position:absolute;z-index:var(--layer-drawer);top:0;bottom:0;left:0;background:var(--_app-layout-rail-bg-color);box-shadow:var(--_app-layout-rail-shadow);transform:translate(-100%);transition:transform var(--duration-base) var(--ease-standard)}.rail.open{transform:translate(0)}}.scrim{display:none}@media(width<1024px){.scrim{display:block;position:absolute;z-index:calc(var(--layer-drawer) - 1);inset:0;background:var(--_app-layout-scrim-color);opacity:0;transition:opacity var(--duration-base) var(--ease-standard),visibility var(--duration-base) var(--ease-standard);visibility:hidden}.scrim.open{opacity:1;visibility:visible}}.bar{display:grid;grid-area:topbar}.content{grid-area:content;padding:var(--_app-layout-padding-y) var(--_app-layout-padding-x);padding-right:calc(var(--_app-layout-padding-x) - var(--ds-scrollbar-width, 0px));overflow:auto;scrollbar-gutter:stable}@media not (forced-colors:active){.content:focus{outline:none}}.inner{max-width:var(--_app-layout-content-max-width);margin-inline:auto}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
405
405
  }
406
406
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AppLayoutComponent, decorators: [{
407
407
  type: Component,
@@ -410,7 +410,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
410
410
  '[class.topbar-full]': "topbarSpan() === 'full'",
411
411
  '[class.rail-open]': 'railOpen()',
412
412
  '(document:keydown.escape)': 'closeRail()',
413
- }, providers: [AppLayoutScrollService], template: "<!-- 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", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_app-layout-desktop-min-width: var(--bp-lg, 1024px);--_app-layout-padding-x: var(--ds-app-layout-padding-x, var(--space-6));--_app-layout-padding-y: var(--ds-app-layout-padding-y, var(--space-6));--_app-layout-content-max-width: var(--ds-app-layout-content-max-width, none);--_app-layout-rail-bg-color: var(--ds-app-layout-rail-bg-color, var(--surface-overlay));--_app-layout-rail-shadow: var(--ds-app-layout-rail-shadow, var(--ds-elevation-modal));--_app-layout-scrim-color: var(--ds-app-layout-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));display:grid;grid-template-areas:\"sidenav topbar\" \"sidenav content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;height:var(--ds-app-layout-height, 100dvh);position:relative;isolation:isolate;overflow:hidden}:host(.topbar-full){grid-template-areas:\"topbar topbar\" \"sidenav content\"}.rail{display:grid;grid-area:sidenav;overflow-y:auto}@media(width<1024px){.rail{position:absolute;z-index:var(--layer-drawer);top:0;bottom:0;left:0;background:var(--_app-layout-rail-bg-color);box-shadow:var(--_app-layout-rail-shadow);transform:translate(-100%);transition:transform var(--duration-base) var(--ease-standard)}.rail.open{transform:translate(0)}}.scrim{display:none}@media(width<1024px){.scrim{display:block;position:absolute;z-index:calc(var(--layer-drawer) - 1);inset:0;background:var(--_app-layout-scrim-color);opacity:0;transition:opacity var(--duration-base) var(--ease-standard),visibility var(--duration-base) var(--ease-standard);visibility:hidden}.scrim.open{opacity:1;visibility:visible}}.bar{display:grid;grid-area:topbar}.content{grid-area:content;padding:var(--_app-layout-padding-y) var(--_app-layout-padding-x);padding-right:calc(var(--_app-layout-padding-x) - var(--ds-scrollbar-width, 0px));overflow:auto;scrollbar-gutter:stable}@media not (forced-colors:active){.content:focus{outline:none}}.inner{max-width:var(--_app-layout-content-max-width);margin-inline:auto}\n"] }]
413
+ }, providers: [AppLayoutScrollService], template: "<!-- 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", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_app-layout-desktop-min-width: var(--bp-lg, 1024px);--_app-layout-padding-x: var(--ds-app-layout-padding-x, var(--space-6));--_app-layout-padding-y: var(--ds-app-layout-padding-y, var(--space-6));--_app-layout-content-max-width: var(--ds-app-layout-content-max-width, none);--_app-layout-rail-bg-color: var(--ds-app-layout-rail-bg-color, var(--surface-overlay));--_app-layout-rail-shadow: var(--ds-app-layout-rail-shadow, var(--ds-elevation-modal));--_app-layout-scrim-color: var(--ds-app-layout-scrim-color, var(--scrim, hsl(220deg 20% 12% / 45%)));display:grid;grid-template-areas:\"sidenav topbar\" \"sidenav content\";grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;height:var(--ds-app-layout-height, 100dvh);position:relative;isolation:isolate;overflow:hidden}:host(.topbar-full){grid-template-areas:\"topbar topbar\" \"sidenav content\"}.rail{display:grid;grid-area:sidenav;overflow-y:auto}@media(width<1024px){.rail{--surface-secondary: var(--surface-overlay-secondary);--surface-muted: var(--surface-overlay-muted);position:absolute;z-index:var(--layer-drawer);top:0;bottom:0;left:0;background:var(--_app-layout-rail-bg-color);box-shadow:var(--_app-layout-rail-shadow);transform:translate(-100%);transition:transform var(--duration-base) var(--ease-standard)}.rail.open{transform:translate(0)}}.scrim{display:none}@media(width<1024px){.scrim{display:block;position:absolute;z-index:calc(var(--layer-drawer) - 1);inset:0;background:var(--_app-layout-scrim-color);opacity:0;transition:opacity var(--duration-base) var(--ease-standard),visibility var(--duration-base) var(--ease-standard);visibility:hidden}.scrim.open{opacity:1;visibility:visible}}.bar{display:grid;grid-area:topbar}.content{grid-area:content;padding:var(--_app-layout-padding-y) var(--_app-layout-padding-x);padding-right:calc(var(--_app-layout-padding-x) - var(--ds-scrollbar-width, 0px));overflow:auto;scrollbar-gutter:stable}@media not (forced-colors:active){.content:focus{outline:none}}.inner{max-width:var(--_app-layout-content-max-width);margin-inline:auto}\n"] }]
414
414
  }], ctorParameters: () => [], propDecorators: { topbarSpan: [{ type: i0.Input, args: [{ isSignal: true, alias: "topbarSpan", required: false }] }], railOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "railOpen", required: false }] }, { type: i0.Output, args: ["railOpenChange"] }], railLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "railLabel", required: false }] }], restoreScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreScroll", required: false }] }], restoreScrollTimeout: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreScrollTimeout", required: false }] }], scrollReset: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollReset", required: false }] }], content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }] } });
415
415
 
416
416
  /**
@@ -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 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 // The host resolves `--bp-lg`, falling back to the Sass value its media queries use; the content element inherits it.\n const lg = getComputedStyle(this.content().nativeElement)\n .getPropertyValue('--_app-layout-desktop-min-width')\n .trim();\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,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AoB,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 { 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 // The host resolves `--bp-lg`, falling back to the Sass value its media queries use; the content element inherits it.\n const lg = getComputedStyle(this.content().nativeElement)\n .getPropertyValue('--_app-layout-desktop-min-width')\n .trim();\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.railO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,CAAC,EAAA,QAAA,EAAA,s+BAAA,EAAA,MAAA,EAAA,CAAA,gnFAAA,CAAA,EAAA;4vBA2CW,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzGzD;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;MAUU,oBAAoB,CAAA;AACZ,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAE5C,MAAM,GAAA;AACd,QAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;IAC9C;wGALW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,iDAAA,EAAA,oBAAA,EAAA,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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, inject, computed, ViewEncapsulation, Component } from '@angular/core';
2
+ import { input, inject, linkedSignal, computed, ViewEncapsulation, Component } from '@angular/core';
3
3
  import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
4
4
  import { DS_CONFIG, DS_INTL } from '@ids-group-ltd/ids-design-system/core';
5
5
 
@@ -82,7 +82,8 @@ class AvatarComponent {
82
82
  /** Replaces the rule turning `name` into initials. Falls back to
83
83
  * `DS_CONFIG.avatar.initials`, then to `initialsFrom` (first two words, Latin script). */
84
84
  initialsRule = input(null, ...(ngDevMode ? [{ debugName: "initialsRule" }] : /* istanbul ignore next */ []));
85
- /** Image source; shown before `initials` or `fallbackIcon` when set. */
85
+ /** Image source; shown before `initials` or `fallbackIcon` when set. An image that fails to
86
+ * load falls back to them until the URL changes. */
86
87
  imageUrl = input(null, ...(ngDevMode ? [{ debugName: "imageUrl" }] : /* istanbul ignore next */ []));
87
88
  /** Accessible name. When omitted, the avatar is decorative (hidden from AT). */
88
89
  ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
@@ -101,6 +102,8 @@ class AvatarComponent {
101
102
  avoidHues = input([], ...(ngDevMode ? [{ debugName: "avoidHues" }] : /* istanbul ignore next */ []));
102
103
  config = inject(DS_CONFIG);
103
104
  intl = inject(DS_INTL);
105
+ imageFailed = linkedSignal({ ...(ngDevMode ? { debugName: "imageFailed" } : /* istanbul ignore next */ {}), source: this.imageUrl,
106
+ computation: () => false });
104
107
  initialsText = computed(() => {
105
108
  const explicit = this.initials();
106
109
  if (explicit) {
@@ -132,7 +135,7 @@ class AvatarComponent {
132
135
  return value ? this.intl().avatar[value] : null;
133
136
  }, ...(ngDevMode ? [{ debugName: "statusAriaLabel" }] : /* istanbul ignore next */ []));
134
137
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
135
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AvatarComponent, isStandalone: true, selector: "ds-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, initialsRule: { classPropertyName: "initialsRule", publicName: "initialsRule", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, tint: { classPropertyName: "tint", publicName: "tint", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, fallbackIcon: { classPropertyName: "fallbackIcon", publicName: "fallbackIcon", isSignal: true, isRequired: false, transformFunction: null }, seed: { classPropertyName: "seed", publicName: "seed", isSignal: true, isRequired: false, transformFunction: null }, avoidHues: { classPropertyName: "avoidHues", publicName: "avoidHues", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.xs": "size() === 'xs'", "class.sm": "size() === 'sm'", "class.lg": "size() === 'lg'", "class.neutral": "tint() === 'neutral'", "style.--ds-avatar-bg-color": "tintStyle().bg", "style.--ds-avatar-label-color": "tintStyle().fg", "attr.role": "ariaLabel() ? 'img' : null", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "ariaLabel() ? null : true" } }, ngImport: i0, template: "@if (imageUrl()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_avatar-size: var(--ds-avatar-size, var(--avatar-md));--_avatar-bg-color: var(--ds-avatar-bg-color, var(--accent-muted));--_avatar-label-color: var(--ds-avatar-label-color, var(--accent-strong));--_avatar-radius: var(--ds-avatar-radius, var(--ds-radius-pill));--_avatar-ring-width: var(--ds-avatar-ring-width, var(--avatar-bw-group));--_avatar-status-size: var(--ds-avatar-status-size, 10px);display:inline-grid;place-items:center;width:var(--_avatar-size);height:var(--_avatar-size);border-radius:var(--_avatar-radius);background-color:var(--_avatar-bg-color);color:var(--_avatar-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;overflow:visible;position:relative}img{width:100%;height:100%;object-fit:cover;border-radius:inherit;overflow:hidden}:host(.xs){--_avatar-size: var(--ds-avatar-size, var(--avatar-xs));font-size:var(--font-size-4xs)}:host(.sm){--_avatar-size: var(--ds-avatar-size, var(--avatar-sm));font-size:var(--font-size-3xs)}:host(.lg){--_avatar-size: var(--ds-avatar-size, var(--avatar-lg));font-size:var(--font-size-s)}:host(.neutral){--_avatar-bg-color: var(--ds-avatar-bg-color, var(--surface-secondary));--_avatar-label-color: var(--ds-avatar-label-color, var(--text-secondary))}.status-dot{position:absolute;bottom:-1px;right:-1px;width:var(--_avatar-status-size);height:var(--_avatar-status-size);border-radius:var(--radius-pill);border:var(--border-width-strong) solid var(--surface-default)}.status-dot--online{background-color:var(--success)}.status-dot--busy{background-color:var(--error)}.status-dot--away{background-color:var(--warning)}.status-dot--offline{background-color:var(--text-tertiary)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
138
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AvatarComponent, isStandalone: true, selector: "ds-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, initialsRule: { classPropertyName: "initialsRule", publicName: "initialsRule", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, tint: { classPropertyName: "tint", publicName: "tint", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, fallbackIcon: { classPropertyName: "fallbackIcon", publicName: "fallbackIcon", isSignal: true, isRequired: false, transformFunction: null }, seed: { classPropertyName: "seed", publicName: "seed", isSignal: true, isRequired: false, transformFunction: null }, avoidHues: { classPropertyName: "avoidHues", publicName: "avoidHues", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.xs": "size() === 'xs'", "class.sm": "size() === 'sm'", "class.lg": "size() === 'lg'", "class.neutral": "tint() === 'neutral'", "style.--ds-avatar-bg-color": "tintStyle().bg", "style.--ds-avatar-label-color": "tintStyle().fg", "attr.role": "ariaLabel() ? 'img' : null", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "ariaLabel() ? null : true" } }, ngImport: i0, template: "@if (imageUrl() && !imageFailed()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\"\n (error)=\"imageFailed.set(true)\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_avatar-size: var(--ds-avatar-size, var(--avatar-md));--_avatar-bg-color: var(--ds-avatar-bg-color, var(--accent-muted));--_avatar-label-color: var(--ds-avatar-label-color, var(--accent-strong));--_avatar-radius: var(--ds-avatar-radius, var(--ds-radius-pill));--_avatar-ring-width: var(--ds-avatar-ring-width, var(--avatar-bw-group));--_avatar-status-size: var(--ds-avatar-status-size, 10px);display:inline-grid;place-items:center;width:var(--_avatar-size);height:var(--_avatar-size);border-radius:var(--_avatar-radius);background-color:var(--_avatar-bg-color);color:var(--_avatar-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;overflow:visible;position:relative}img{width:100%;height:100%;object-fit:cover;border-radius:inherit;overflow:hidden}:host(.xs){--_avatar-size: var(--ds-avatar-size, var(--avatar-xs));font-size:var(--font-size-4xs)}:host(.sm){--_avatar-size: var(--ds-avatar-size, var(--avatar-sm));font-size:var(--font-size-3xs)}:host(.lg){--_avatar-size: var(--ds-avatar-size, var(--avatar-lg));font-size:var(--font-size-s)}:host(.neutral){--_avatar-bg-color: var(--ds-avatar-bg-color, var(--surface-secondary));--_avatar-label-color: var(--ds-avatar-label-color, var(--text-secondary))}.status-dot{position:absolute;bottom:-1px;right:-1px;width:var(--_avatar-status-size);height:var(--_avatar-status-size);border-radius:var(--radius-pill);border:var(--border-width-strong) solid var(--surface-default)}.status-dot--online{background-color:var(--success)}.status-dot--busy{background-color:var(--error)}.status-dot--away{background-color:var(--warning)}.status-dot--offline{background-color:var(--text-tertiary)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
136
139
  }
137
140
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarComponent, decorators: [{
138
141
  type: Component,
@@ -146,7 +149,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
146
149
  '[attr.role]': "ariaLabel() ? 'img' : null",
147
150
  '[attr.aria-label]': 'ariaLabel()',
148
151
  '[attr.aria-hidden]': 'ariaLabel() ? null : true',
149
- }, template: "@if (imageUrl()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_avatar-size: var(--ds-avatar-size, var(--avatar-md));--_avatar-bg-color: var(--ds-avatar-bg-color, var(--accent-muted));--_avatar-label-color: var(--ds-avatar-label-color, var(--accent-strong));--_avatar-radius: var(--ds-avatar-radius, var(--ds-radius-pill));--_avatar-ring-width: var(--ds-avatar-ring-width, var(--avatar-bw-group));--_avatar-status-size: var(--ds-avatar-status-size, 10px);display:inline-grid;place-items:center;width:var(--_avatar-size);height:var(--_avatar-size);border-radius:var(--_avatar-radius);background-color:var(--_avatar-bg-color);color:var(--_avatar-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;overflow:visible;position:relative}img{width:100%;height:100%;object-fit:cover;border-radius:inherit;overflow:hidden}:host(.xs){--_avatar-size: var(--ds-avatar-size, var(--avatar-xs));font-size:var(--font-size-4xs)}:host(.sm){--_avatar-size: var(--ds-avatar-size, var(--avatar-sm));font-size:var(--font-size-3xs)}:host(.lg){--_avatar-size: var(--ds-avatar-size, var(--avatar-lg));font-size:var(--font-size-s)}:host(.neutral){--_avatar-bg-color: var(--ds-avatar-bg-color, var(--surface-secondary));--_avatar-label-color: var(--ds-avatar-label-color, var(--text-secondary))}.status-dot{position:absolute;bottom:-1px;right:-1px;width:var(--_avatar-status-size);height:var(--_avatar-status-size);border-radius:var(--radius-pill);border:var(--border-width-strong) solid var(--surface-default)}.status-dot--online{background-color:var(--success)}.status-dot--busy{background-color:var(--error)}.status-dot--away{background-color:var(--warning)}.status-dot--offline{background-color:var(--text-tertiary)}\n"] }]
152
+ }, template: "@if (imageUrl() && !imageFailed()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\"\n (error)=\"imageFailed.set(true)\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_avatar-size: var(--ds-avatar-size, var(--avatar-md));--_avatar-bg-color: var(--ds-avatar-bg-color, var(--accent-muted));--_avatar-label-color: var(--ds-avatar-label-color, var(--accent-strong));--_avatar-radius: var(--ds-avatar-radius, var(--ds-radius-pill));--_avatar-ring-width: var(--ds-avatar-ring-width, var(--avatar-bw-group));--_avatar-status-size: var(--ds-avatar-status-size, 10px);display:inline-grid;place-items:center;width:var(--_avatar-size);height:var(--_avatar-size);border-radius:var(--_avatar-radius);background-color:var(--_avatar-bg-color);color:var(--_avatar-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;overflow:visible;position:relative}img{width:100%;height:100%;object-fit:cover;border-radius:inherit;overflow:hidden}:host(.xs){--_avatar-size: var(--ds-avatar-size, var(--avatar-xs));font-size:var(--font-size-4xs)}:host(.sm){--_avatar-size: var(--ds-avatar-size, var(--avatar-sm));font-size:var(--font-size-3xs)}:host(.lg){--_avatar-size: var(--ds-avatar-size, var(--avatar-lg));font-size:var(--font-size-s)}:host(.neutral){--_avatar-bg-color: var(--ds-avatar-bg-color, var(--surface-secondary));--_avatar-label-color: var(--ds-avatar-label-color, var(--text-secondary))}.status-dot{position:absolute;bottom:-1px;right:-1px;width:var(--_avatar-status-size);height:var(--_avatar-status-size);border-radius:var(--radius-pill);border:var(--border-width-strong) solid var(--surface-default)}.status-dot--online{background-color:var(--success)}.status-dot--busy{background-color:var(--error)}.status-dot--away{background-color:var(--warning)}.status-dot--offline{background-color:var(--text-tertiary)}\n"] }]
150
153
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], initials: [{ type: i0.Input, args: [{ isSignal: true, alias: "initials", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], initialsRule: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialsRule", required: false }] }], imageUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUrl", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], tint: [{ type: i0.Input, args: [{ isSignal: true, alias: "tint", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], fallbackIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackIcon", required: false }] }], seed: [{ type: i0.Input, args: [{ isSignal: true, alias: "seed", required: false }] }], avoidHues: [{ type: i0.Input, args: [{ isSignal: true, alias: "avoidHues", required: false }] }] } });
151
154
 
152
155
  /**