@ids-group-ltd/ids-design-system 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/agent/forms/ds-button.md +2 -2
  3. package/agent/forms/ds-icon-button.md +1 -1
  4. package/components.md +3 -3
  5. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +7 -4
  6. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +22 -3
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +4 -3
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +7 -4
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +8 -4
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +4 -4
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +4 -13
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +62 -5
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +10 -7
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +49 -5
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +15 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  39. package/migrations/1.0.2.json +70 -0
  40. package/migrations/1.0.3.json +15 -0
  41. package/package.json +5 -1
  42. package/schematics/check-overrides/surface.json +4 -1
  43. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +3 -1
  44. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +11 -4
  45. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
  46. package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +6 -1
  47. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
  48. package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +26 -2
  49. package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +0 -1
  50. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +7 -0
  51. package/types/ids-group-ltd-ids-design-system-components.d.ts +7 -1
  52. package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,100 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 1.0.3 — 2026-10-27
4
+
5
+ ### Fixed
6
+
7
+ - **A `ds-table` header button takes a 24px pointer target.** The sort and definition buttons of a
8
+ header cell were as tall as their text; a transparent area around the label now makes each
9
+ target at least `--hit-xs` (24px) tall, for WCAG 2.5.8. The focus ring stays on the label.
10
+ Nothing to change in your code.
11
+ - **`ds-avatar` falls back to its initials when the image fails to load.** An `imageUrl` that
12
+ answered with an error (an expired signed URL, a deleted object) left the avatar showing only its
13
+ background tint, with neither `initials` nor `fallbackIcon` drawn. The avatar now shows `initials`,
14
+ or `fallbackIcon`, until `imageUrl` changes. Nothing to change in your code.
15
+
16
+ ## 1.0.2 — 2026-10-27
17
+
18
+ ### Added
19
+
20
+ - **`ds-icon-button` takes an `ariaHasPopup` input.** It sets `aria-haspopup` on the inner
21
+ `<button>` and accepts the same values as `ds-button`: `'true'`, `'menu'`, `'listbox'`, `'tree'`,
22
+ `'grid'`, `'dialog'` or `null`. Bind it on an icon button that opens a menu or another overlay.
23
+ - **`ds-icon-button` exposes `controlRef`.** It is the inner `<button>` as an `ElementRef`, the same as
24
+ on `ds-button`, so an overlay can position against it and return focus to it: pass
25
+ `trigger.controlRef().nativeElement` to `toggle` of `ds-popover`.
26
+ - **`[dsPopoverTrigger]` opens a `ds-popover` from a button and keeps its ARIA in step.** Put
27
+ `[dsPopoverTrigger]="pop"` on a `ds-button`, `ds-icon-button` or native button: a click or
28
+ Enter opens the popover from the inner `<button>`, which gets `aria-haspopup` (`menu` when the
29
+ popover holds a `ds-menu`, `dialog` otherwise), `aria-expanded` and, while open, `aria-controls`.
30
+ It replaces `#t` with `(pressed)="pop.toggle(t.controlRef().nativeElement)"` and the
31
+ `ariaHasPopup` / `[ariaExpanded]` bindings; leave those unbound on a button that uses it. Nothing
32
+ to change in existing code.
33
+
34
+ ### Changed
35
+
36
+ - **A resizable `ds-table` column shows its resize handle at rest.** Each handle in the header
37
+ draws a thin line in `--border-default`, so a column that can be resized is visible before the
38
+ pointer reaches its edge. Hover and drag look as before. Nothing to change in
39
+ your code.
40
+ - **The separators of an empty `ds-date-picker` mask are muted with its placeholder.** `DD/MM/YYYY`
41
+ reads in one colour; a separator takes the value colour once the part before it is typed in full,
42
+ so `12/MM/YYYY` shows the first slash dark and the second muted. Nothing to change in your code.
43
+ - **A loading `ds-button` with an `icon` keeps its label and spins in the icon's place.** The
44
+ spinner takes the leading icon's box and the label stays visible; a button without an icon still
45
+ hides its contents behind one centred spinner. The new `loadingMode` input (`ButtonLoadingMode`:
46
+ `'auto' | 'icon' | 'replace'`, default `'auto'`) picks the behaviour: `'icon'` also uses the
47
+ trailing icon when there is no leading one, and `'replace'` keeps the centred spinner on every
48
+ button. Neither mode changes the button's size or moves its label. To keep the centred spinner on
49
+ a button with an icon, bind `loadingMode="replace"`.
50
+ - **A `ds-time-picker` column that does not loop scrolls at the browser's wheel speed.** Every
51
+ hour and minute column turned one wheel notch into about one row; a column that loops still does, so it reads
52
+ as a drum, while a column that does not loop, such as one with `loop="never"`, now scrolls as far
53
+ as any list, still snapping to a cell. Nothing to change in your code.
54
+ - **Now in a single `ds-time-picker` picks the current time and closes the panel.** It used to set
55
+ the time and leave the panel open. A range panel stays open until Done, as before.
56
+
57
+ ### Fixed
58
+
59
+ - **A `ds-menu-item` that is the first or last child of the menu rounds its corners with it.** The rows are square and
60
+ the menu clips them at its rounded edge, so the focus ring of the first or last item was cut off
61
+ at two corners and kept square ones at the other two. Those rows now take the menu's inner radius
62
+ and every row's focus ring is drawn inside the row. `--ds-menu-item-radius` still sets every
63
+ row's radius.
64
+ Nothing to change in your code.
65
+ - **`ds-menu` rows touch each other, so the pointer never falls between them.** The menu put a 2px
66
+ gap between rows, and a pointer resting in it hovered no row, so the hover fill flickered off
67
+ while moving down the list. `--ds-menu-gap` now defaults to `0px`, which makes the menu 2px
68
+ shorter per boundary between two rows; a `ds-menu-divider` cancels the gap with a
69
+ negative margin, so a boundary at a divider is not one of them. A custom `--ds-menu-gap` brings the gap and its dead strip back.
70
+ - **A looping `ds-time-picker` column marks the selected value once.** A column with fewer values
71
+ than fit in it, such as minutes at a 15-minute step with `loop="always"`, repeats its set so it can scroll round, and
72
+ every repeat of the selected value was filled. While scrolling, two filled cells four rows apart
73
+ were on screen at once. The `ds-time-columns` element inside the panel now fills only the one
74
+ nearest the column's centre. Nothing to change in your code.
75
+ - **A `ds-time-picker` field keeps its width when it is empty.** Unless it was `fullWidth`, the
76
+ trigger was as wide as its text, so the `--:--` placeholder made it narrower than a picked time and the field jumped when a
77
+ time was set or cleared; in 12-hour format AM and PM differed slightly too. The
78
+ trigger now reserves room for its widest time with hidden `aria-hidden` spans, so a test that
79
+ reads the whole text content of the trigger also gets their text. Nothing else to change in your
80
+ code.
81
+ - **`ds-chart`, `ds-column-chart`, `ds-line-chart` and `ds-waterfall-chart` size the value-axis gutter
82
+ for the web font.** The tick labels were measured when they rendered and again only when their
83
+ text changed, so on a page whose web font arrived after the chart
84
+ the gutter kept the width of the fallback face, and a label wider in the real face could be
85
+ clipped. The labels are measured again once the page's fonts have loaded. Nothing to change in
86
+ your code.
87
+ - **Column resize separators expose `aria-valuenow`, `aria-valuemin` and `aria-valuemax` before they
88
+ are focused.** A `ds-table` with `dsTableResize` set the range on a separator only while it held
89
+ focus, so a screen reader reading the page met separators with no value. Nothing to change in your
90
+ code.
91
+ - **A keyboard-focused `ds-table` resize handle shows the standard focus ring.** The handle widened
92
+ its line on keyboard focus instead of drawing the focus ring; it now draws the same ring as other
93
+ controls. Nothing to change in your code.
94
+ - **The `ds-date-picker` input announces as a combobox.** The input already declared a dialog popup
95
+ and an expanded state, which a plain text box does not support; it now carries `role="combobox"`.
96
+ Typing a date works as before. Nothing to change in your code.
97
+
3
98
  ## 1.0.1 — 2026-10-22
4
99
 
5
100
  ### Changed
@@ -3,7 +3,7 @@
3
3
 
4
4
  Group: Form & input
5
5
 
6
- Inputs: **two orthogonal axes** — `color: ButtonColor = 'primary'` (`'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning'`) and `variant: ButtonVariant = 'solid'` (`'solid' | 'tonal' | 'outline' | 'ghost' | 'text'`). Plus `size: DsSize | null = null` (unset resolves `DS_CONFIG.control.size`, then `md`), `type: 'button' | 'submit' | 'reset' = 'button'`, `align: ButtonAlign = 'center'` (`'center' | 'between'`; `'between'` pushes the label and a trailing icon to opposite edges, and only shows once something widens the button past its contents), `disabled`, `loading`, `fullWidth`, `icon: IconName | null`, and the destination pair `routerLink: DsRouterLink = null` (a path, a command array or a `UrlTree`) / `href: string = ''`, with the modifiers `fragment` / `queryParams` / `queryParamsHandling` (routerLink-only) and `target` / `rel` (either link), plus `routerLinkActiveOptions` and `ariaCurrent`. Plus the refusal pair below: `disabledReason`, and the field message inputs `hint` / `warning` / `error` / `messageIcon` / `reserveMessage` / `ariaDescribedBy`.
6
+ Inputs: **two orthogonal axes** — `color: ButtonColor = 'primary'` (`'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning'`) and `variant: ButtonVariant = 'solid'` (`'solid' | 'tonal' | 'outline' | 'ghost' | 'text'`). Plus `size: DsSize | null = null` (unset resolves `DS_CONFIG.control.size`, then `md`), `type: 'button' | 'submit' | 'reset' = 'button'`, `align: ButtonAlign = 'center'` (`'center' | 'between'`; `'between'` pushes the label and a trailing icon to opposite edges, and only shows once something widens the button past its contents), `disabled`, `loading`, `loadingMode: ButtonLoadingMode = 'auto'` (`'auto' | 'icon' | 'replace'`; `'icon'` draws the spinner in the leading icon's box, or the trailing one's when there is no leading icon, and keeps the label; `'replace'` hides the contents behind one centred spinner; `'auto'` is `'icon'` when `icon` is set; neither moves the label or resizes the button), `fullWidth`, `icon: IconName | null`, and the destination pair `routerLink: DsRouterLink = null` (a path, a command array or a `UrlTree`) / `href: string = ''`, with the modifiers `fragment` / `queryParams` / `queryParamsHandling` (routerLink-only) and `target` / `rel` (either link), plus `routerLinkActiveOptions` and `ariaCurrent`. Plus the refusal pair below: `disabledReason`, and the field message inputs `hint` / `warning` / `error` / `messageIcon` / `reserveMessage` / `ariaDescribedBy`.
7
7
  Axis meaning: **variant is loudness** (solid > tonal > outline/ghost/text), **color is hue** — every pair renders, and the UX-discouraged ones dev-warn with the reason. Only solid and tonal paint a fill: outline, ghost and text are TRANSPARENT, so they adopt the surface they sit on. Disabled splits by whether the fill can carry the state: `solid` and `tonal` keep `oklch(from accent 70% 0.035 h)`, while `outline`, `ghost` and `text` — the three with no fill of their own — mix the label toward the surface, `color-mix(in srgb, <label> 40%, var(--surface-default))`, because a fixed lightness cannot serve both themes. (History: the single `variant` axis was split into color × variant in 2026-06; `danger`→`error`, `link`→`text`, the old `ghost`→`outline`.)
8
8
  Output: `(pressed): MouseEvent` — only fires when not disabled and not loading
9
9
  **`loading` keeps the button in the focus order.** It sets `aria-busy` and `aria-disabled`, never the native `disabled`, so a button pressed from the keyboard keeps focus while the work runs; the click is swallowed in the handler, so `(pressed)` does not fire and a `type="submit"` does not submit. For an action in flight bind `loading`, not `disabled`: a natively disabled button under focus drops it to the page.
@@ -19,5 +19,5 @@ Layout: a message-bearing button becomes a column (host class `with-message`), a
19
19
  Tokens: `--ds-button-bg-color`, `--ds-button-bg-color-hover`, `--ds-button-bg-color-active`, `--ds-button-bg-color-disabled`, `--ds-button-label-color`, `--ds-button-label-color-disabled`, `--ds-button-border-color`, `--ds-button-border-color-hover`, `--ds-button-border-color-active`, `--ds-button-border-color-disabled`, `--ds-button-border-width`, `--ds-button-radius`, `--ds-button-pressed-shadow`, `--ds-button-shadow`, `--ds-button-shadow-hover`. The focus ring is not a button token — set `--focus-ring-color`, `--focus-ring-width` or `--focus-ring-offset` on the button's own scope. The last two are the REST and hover shadow, both `none` by default — before them the only way to give a button a resting shadow was a deep selector into its inner `<button>`. `-shadow-hover` falls back to `-shadow`, so setting the resting one alone keeps the button steady under the pointer; focus and pressed keep their own hooks and still win while those states are on. `-border-color-hover` falls back to the rest border and `-border-color-active` to the hover one, so an outline button's edge stays put until one of them is set. For `variant="solid"`, `-bg-color-hover` / `-bg-color-active` / `-pressed-shadow` default to a `color-mix()` derivation of the resolved fill (88 % / 76 % + black — the theme's hover/pressed recipe), so overriding the fill alone retints the whole state set; tonal, outline, ghost and text keep explicit ramp defaults, so a full retint there means setting the state tokens too.
20
20
 
21
21
  <!-- inputs:ds-button -->
22
- All inputs: `hint: string = ''`, `error: string = ''`, `warning: string = ''`, `reserveMessage: boolean | null = null`, `messageIcon: IconName | false | null = null`, `color: ButtonColor = 'primary'`, `variant: 'solid' | 'tonal' | 'ghost' | 'outline' | 'text' = 'solid'`, `align: 'center' | 'between' = 'center'`, `size: 'sm' | 'md' | 'lg' = null`, `routerLink: DsRouterLink = null`, `href: string = ''`, `fragment: string | undefined`, `queryParams: Params | null | undefined`, `queryParamsHandling: QueryParamsHandling | null | undefined`, `target: string | undefined`, `rel: string | undefined`, `routerLinkActiveOptions: { exact: boolean } | IsActiveMatchOptions`, `ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true'`, `type: 'button' | 'submit' | 'reset' = 'button'`, `disabled: boolean = false`, `loading: boolean = false`, `fullWidth: boolean = false`, `ariaLabel: string | null = null`, `icon: IconName | null = null`, `trailingIcon: IconName | null = null`, `ariaHasPopup: 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' = null`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`, `disabledReason: string = ''`, `ariaDescribedBy: string | null = null`
22
+ All inputs: `hint: string = ''`, `error: string = ''`, `warning: string = ''`, `reserveMessage: boolean | null = null`, `messageIcon: IconName | false | null = null`, `color: ButtonColor = 'primary'`, `variant: 'solid' | 'tonal' | 'ghost' | 'outline' | 'text' = 'solid'`, `align: 'center' | 'between' = 'center'`, `size: 'sm' | 'md' | 'lg' = null`, `routerLink: DsRouterLink = null`, `href: string = ''`, `fragment: string | undefined`, `queryParams: Params | null | undefined`, `queryParamsHandling: QueryParamsHandling | null | undefined`, `target: string | undefined`, `rel: string | undefined`, `routerLinkActiveOptions: { exact: boolean } | IsActiveMatchOptions`, `ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true'`, `type: 'button' | 'submit' | 'reset' = 'button'`, `disabled: boolean = false`, `loading: boolean = false`, `loadingMode: 'auto' | 'icon' | 'replace' = 'auto'`, `fullWidth: boolean = false`, `ariaLabel: string | null = null`, `icon: IconName | null = null`, `trailingIcon: IconName | null = null`, `ariaHasPopup: 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' = null`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`, `disabledReason: string = ''`, `ariaDescribedBy: string | null = null`
23
23
  <!-- /inputs -->
@@ -10,5 +10,5 @@ Variant emphasis: `standard` chromeless (hover-reveal) · `filled` `--primary`
10
10
  Tokens: `--ds-icon-button-bg-color`, `--ds-icon-button-icon-color`, `--ds-icon-button-border`, `--ds-icon-button-border-hover`, `--ds-icon-button-border-active`, `--ds-icon-button-bg-color-hover`, `--ds-icon-button-bg-color-active`, `--ds-icon-button-icon-color-hover`, `--ds-icon-button-radius`. The focus ring is not an icon-button token — set `--focus-ring-color`, `--focus-ring-width` or `--focus-ring-offset` on its own scope. `filled`/`selected` derive hover/active from the resolved bg, `standard`/`tonal`/`outlined` keep explicit ramp defaults. `-border-hover` falls back to `-border` and `-border-active` to `-border-hover`, so the border stays put until one of them is set.
11
11
 
12
12
  <!-- inputs:ds-icon-button -->
13
- 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`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`
13
+ 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`
14
14
  <!-- /inputs -->
package/components.md CHANGED
@@ -158,7 +158,7 @@ is not a validated field; where a search needs a label or an error line, use `ds
158
158
  **Shared box tokens.** `--ds-field-border-color`, `--ds-field-border-color-hover`, `--ds-field-border-color-focus`, `--ds-field-text-color`, `--ds-field-placeholder-color` and `--ds-field-font-size` sit UNDER each field's own token the way `--ds-field-height` and `--ds-field-label-*` do: `--ds-input-border`, `--ds-select-border-color-focus` or `--ds-autocomplete-text-color` still wins where set, and the family value fills in everywhere it is not. They reach input, textarea, select, multi-select, autocomplete and search. The date, time and colour pickers, the number stepper and the OTP cells keep their own `--ds-<component>-*` tokens and do not read the family.
159
159
 
160
160
  #### `<ds-button>` — `ButtonComponent`
161
- Inputs: **two orthogonal axes** — `color: ButtonColor = 'primary'` (`'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning'`) and `variant: ButtonVariant = 'solid'` (`'solid' | 'tonal' | 'outline' | 'ghost' | 'text'`). Plus `size: DsSize | null = null` (unset resolves `DS_CONFIG.control.size`, then `md`), `type: 'button' | 'submit' | 'reset' = 'button'`, `align: ButtonAlign = 'center'` (`'center' | 'between'`; `'between'` pushes the label and a trailing icon to opposite edges, and only shows once something widens the button past its contents), `disabled`, `loading`, `fullWidth`, `icon: IconName | null`, and the destination pair `routerLink: DsRouterLink = null` (a path, a command array or a `UrlTree`) / `href: string = ''`, with the modifiers `fragment` / `queryParams` / `queryParamsHandling` (routerLink-only) and `target` / `rel` (either link), plus `routerLinkActiveOptions` and `ariaCurrent`. Plus the refusal pair below: `disabledReason`, and the field message inputs `hint` / `warning` / `error` / `messageIcon` / `reserveMessage` / `ariaDescribedBy`.
161
+ Inputs: **two orthogonal axes** — `color: ButtonColor = 'primary'` (`'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning'`) and `variant: ButtonVariant = 'solid'` (`'solid' | 'tonal' | 'outline' | 'ghost' | 'text'`). Plus `size: DsSize | null = null` (unset resolves `DS_CONFIG.control.size`, then `md`), `type: 'button' | 'submit' | 'reset' = 'button'`, `align: ButtonAlign = 'center'` (`'center' | 'between'`; `'between'` pushes the label and a trailing icon to opposite edges, and only shows once something widens the button past its contents), `disabled`, `loading`, `loadingMode: ButtonLoadingMode = 'auto'` (`'auto' | 'icon' | 'replace'`; `'icon'` draws the spinner in the leading icon's box, or the trailing one's when there is no leading icon, and keeps the label; `'replace'` hides the contents behind one centred spinner; `'auto'` is `'icon'` when `icon` is set; neither moves the label or resizes the button), `fullWidth`, `icon: IconName | null`, and the destination pair `routerLink: DsRouterLink = null` (a path, a command array or a `UrlTree`) / `href: string = ''`, with the modifiers `fragment` / `queryParams` / `queryParamsHandling` (routerLink-only) and `target` / `rel` (either link), plus `routerLinkActiveOptions` and `ariaCurrent`. Plus the refusal pair below: `disabledReason`, and the field message inputs `hint` / `warning` / `error` / `messageIcon` / `reserveMessage` / `ariaDescribedBy`.
162
162
  Axis meaning: **variant is loudness** (solid > tonal > outline/ghost/text), **color is hue** — every pair renders, and the UX-discouraged ones dev-warn with the reason. Only solid and tonal paint a fill: outline, ghost and text are TRANSPARENT, so they adopt the surface they sit on. Disabled splits by whether the fill can carry the state: `solid` and `tonal` keep `oklch(from accent 70% 0.035 h)`, while `outline`, `ghost` and `text` — the three with no fill of their own — mix the label toward the surface, `color-mix(in srgb, <label> 40%, var(--surface-default))`, because a fixed lightness cannot serve both themes. (History: the single `variant` axis was split into color × variant in 2026-06; `danger`→`error`, `link`→`text`, the old `ghost`→`outline`.)
163
163
  Output: `(pressed): MouseEvent` — only fires when not disabled and not loading
164
164
  **`loading` keeps the button in the focus order.** It sets `aria-busy` and `aria-disabled`, never the native `disabled`, so a button pressed from the keyboard keeps focus while the work runs; the click is swallowed in the handler, so `(pressed)` does not fire and a `type="submit"` does not submit. For an action in flight bind `loading`, not `disabled`: a natively disabled button under focus drops it to the page.
@@ -174,7 +174,7 @@ Layout: a message-bearing button becomes a column (host class `with-message`), a
174
174
  Tokens: `--ds-button-bg-color`, `--ds-button-bg-color-hover`, `--ds-button-bg-color-active`, `--ds-button-bg-color-disabled`, `--ds-button-label-color`, `--ds-button-label-color-disabled`, `--ds-button-border-color`, `--ds-button-border-color-hover`, `--ds-button-border-color-active`, `--ds-button-border-color-disabled`, `--ds-button-border-width`, `--ds-button-radius`, `--ds-button-pressed-shadow`, `--ds-button-shadow`, `--ds-button-shadow-hover`. The focus ring is not a button token — set `--focus-ring-color`, `--focus-ring-width` or `--focus-ring-offset` on the button's own scope. The last two are the REST and hover shadow, both `none` by default — before them the only way to give a button a resting shadow was a deep selector into its inner `<button>`. `-shadow-hover` falls back to `-shadow`, so setting the resting one alone keeps the button steady under the pointer; focus and pressed keep their own hooks and still win while those states are on. `-border-color-hover` falls back to the rest border and `-border-color-active` to the hover one, so an outline button's edge stays put until one of them is set. For `variant="solid"`, `-bg-color-hover` / `-bg-color-active` / `-pressed-shadow` default to a `color-mix()` derivation of the resolved fill (88 % / 76 % + black — the theme's hover/pressed recipe), so overriding the fill alone retints the whole state set; tonal, outline, ghost and text keep explicit ramp defaults, so a full retint there means setting the state tokens too.
175
175
 
176
176
  <!-- inputs:ds-button -->
177
- All inputs: `hint: string = ''`, `error: string = ''`, `warning: string = ''`, `reserveMessage: boolean | null = null`, `messageIcon: IconName | false | null = null`, `color: ButtonColor = 'primary'`, `variant: 'solid' | 'tonal' | 'ghost' | 'outline' | 'text' = 'solid'`, `align: 'center' | 'between' = 'center'`, `size: 'sm' | 'md' | 'lg' = null`, `routerLink: DsRouterLink = null`, `href: string = ''`, `fragment: string | undefined`, `queryParams: Params | null | undefined`, `queryParamsHandling: QueryParamsHandling | null | undefined`, `target: string | undefined`, `rel: string | undefined`, `routerLinkActiveOptions: { exact: boolean } | IsActiveMatchOptions`, `ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true'`, `type: 'button' | 'submit' | 'reset' = 'button'`, `disabled: boolean = false`, `loading: boolean = false`, `fullWidth: boolean = false`, `ariaLabel: string | null = null`, `icon: IconName | null = null`, `trailingIcon: IconName | null = null`, `ariaHasPopup: 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' = null`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`, `disabledReason: string = ''`, `ariaDescribedBy: string | null = null`
177
+ All inputs: `hint: string = ''`, `error: string = ''`, `warning: string = ''`, `reserveMessage: boolean | null = null`, `messageIcon: IconName | false | null = null`, `color: ButtonColor = 'primary'`, `variant: 'solid' | 'tonal' | 'ghost' | 'outline' | 'text' = 'solid'`, `align: 'center' | 'between' = 'center'`, `size: 'sm' | 'md' | 'lg' = null`, `routerLink: DsRouterLink = null`, `href: string = ''`, `fragment: string | undefined`, `queryParams: Params | null | undefined`, `queryParamsHandling: QueryParamsHandling | null | undefined`, `target: string | undefined`, `rel: string | undefined`, `routerLinkActiveOptions: { exact: boolean } | IsActiveMatchOptions`, `ariaCurrent: 'page' | 'step' | 'location' | 'date' | 'time' | 'true'`, `type: 'button' | 'submit' | 'reset' = 'button'`, `disabled: boolean = false`, `loading: boolean = false`, `loadingMode: 'auto' | 'icon' | 'replace' = 'auto'`, `fullWidth: boolean = false`, `ariaLabel: string | null = null`, `icon: IconName | null = null`, `trailingIcon: IconName | null = null`, `ariaHasPopup: 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' = null`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`, `disabledReason: string = ''`, `ariaDescribedBy: string | null = null`
178
178
  <!-- /inputs -->
179
179
 
180
180
  #### `<ds-icon-button>` — `IconButtonComponent`
@@ -185,7 +185,7 @@ Variant emphasis: `standard` chromeless (hover-reveal) · `filled` `--primary`
185
185
  Tokens: `--ds-icon-button-bg-color`, `--ds-icon-button-icon-color`, `--ds-icon-button-border`, `--ds-icon-button-border-hover`, `--ds-icon-button-border-active`, `--ds-icon-button-bg-color-hover`, `--ds-icon-button-bg-color-active`, `--ds-icon-button-icon-color-hover`, `--ds-icon-button-radius`. The focus ring is not an icon-button token — set `--focus-ring-color`, `--focus-ring-width` or `--focus-ring-offset` on its own scope. `filled`/`selected` derive hover/active from the resolved bg, `standard`/`tonal`/`outlined` keep explicit ramp defaults. `-border-hover` falls back to `-border` and `-border-active` to `-border-hover`, so the border stays put until one of them is set.
186
186
 
187
187
  <!-- inputs:ds-icon-button -->
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`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`
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
191
  #### `<ds-input>` — `InputComponent`
@@ -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
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-avatar.mjs","sources":["../../../src/lib/components/avatar/avatar-tint.ts","../../../src/lib/components/avatar/avatar.component.ts","../../../src/lib/components/avatar/avatar.component.html","../../../src/lib/components/avatar/ids-group-ltd-ids-design-system-components-avatar.ts"],"sourcesContent":["/** Options for {@link avatarTint}. */\nexport interface AvatarTintOptions {\n /** Hue arcs (degrees, `[start, end]` with `start < end`, within 0-360) the derived hue\n * never lands in, e.g. `[[310, 360], [0, 20]]`. An arc crossing 0 is given as two arcs.\n * Default: none. */\n avoidHues?: readonly (readonly [number, number])[];\n /** HSL lightness percentage. Default 62. */\n lightness?: number;\n /** HSL saturation percentage. Default 50. */\n saturation?: number;\n /** Text colour paired with the background. Default `#fff`. */\n foreground?: string;\n}\n\n/** Deterministic `{ bg, fg }` tint for a seed string (an email, a name): the same seed always\n * gives the same colour.\n *\n * White on the lighter hues measures as little as 1.65:1 (WCAG AA asks 4.5:1 for text); where\n * initials are the only identifier, pass `lightness` about 50 and keep white (5.3-6.6:1). */\nexport function avatarTint(\n seed: string,\n options?: AvatarTintOptions,\n): { bg: string; fg: string } {\n const lightness = options?.lightness ?? 62;\n const saturation = options?.saturation ?? 50;\n const hue = pickHue(hashSeed(seed), options?.avoidHues ?? []);\n\n return {\n bg: `hsl(${hue} ${saturation}% ${lightness}%)`,\n fg: options?.foreground ?? '#fff',\n };\n}\n\n/** Uppercased initials from the first two words: `(first, last)` parts or one full name\n * (`initialsFrom('Ada Lovelace')` gives `AL`); `?` when empty. A naive Latin-script guess: apps\n * with a real naming rule use `DS_CONFIG.avatar.initials` or `ds-avatar`'s `initialsRule`. */\nexport function initialsFrom(first?: string, last?: string): string {\n const words =\n last === undefined\n ? (first ?? '').trim().split(/\\s+/).filter(Boolean)\n : [first ?? '', last ?? ''];\n const firstInitial = (words[0] ?? '').trim()[0] ?? '';\n const lastInitial = (words[1] ?? '').trim()[0] ?? '';\n\n return `${firstInitial}${lastInitial}`.toUpperCase() || '?';\n}\n\nfunction hashSeed(seed: string): number {\n let hash = 0;\n for (let index = 0; index < seed.length; index++) {\n hash = seed.charCodeAt(index) + ((hash << 5) - hash);\n }\n\n return hash;\n}\n\nfunction pickHue(\n hash: number,\n avoidHues: readonly (readonly [number, number])[],\n): number {\n const excluded = normalizeArcs(avoidHues);\n const excludedDegrees = excluded.reduce(\n (sum, [start, end]) => sum + (end - start),\n 0,\n );\n const allowedDegrees = Math.max(1, 360 - excludedDegrees);\n let position = ((hash % allowedDegrees) + allowedDegrees) % allowedDegrees;\n\n let cursor = 0;\n for (const [start, end] of excluded) {\n const gap = start - cursor;\n if (position < gap) {\n return cursor + position;\n }\n position -= gap;\n cursor = end;\n }\n\n return cursor + position;\n}\n\nfunction normalizeArcs(\n arcs: readonly (readonly [number, number])[],\n): [number, number][] {\n const clamped = arcs\n .map(\n ([start, end]) =>\n [\n Math.max(0, Math.min(360, start)),\n Math.max(0, Math.min(360, end)),\n ] as [number, number],\n )\n .filter(([start, end]) => end > start)\n .sort((left, right) => left[0] - right[0]);\n\n const merged: [number, number][] = [];\n for (const [start, end] of clamped) {\n const previous = merged[merged.length - 1];\n if (previous && start <= previous[1]) {\n previous[1] = Math.max(previous[1], end);\n } else {\n merged.push([start, end]);\n }\n }\n\n return merged;\n}\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { avatarTint, initialsFrom } from './avatar-tint';\nimport type { AvatarSize, AvatarStatus } from './avatar.types';\nimport { DS_CONFIG, DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-avatar',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './avatar.component.html',\n styleUrl: './avatar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.xs]': \"size() === 'xs'\",\n '[class.sm]': \"size() === 'sm'\",\n '[class.lg]': \"size() === 'lg'\",\n '[class.neutral]': \"tint() === 'neutral'\",\n '[style.--ds-avatar-bg-color]': 'tintStyle().bg',\n '[style.--ds-avatar-label-color]': 'tintStyle().fg',\n '[attr.role]': \"ariaLabel() ? 'img' : null\",\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'ariaLabel() ? null : true',\n },\n})\nexport class AvatarComponent {\n /** Diameter. */\n readonly size = input<AvatarSize>('md');\n /** Fallback text shown when there is no `imageUrl`. Wins over initials derived from `name`. */\n readonly initials = input<string>('');\n /** The person or thing this avatar stands for; drives the initials and the tint seed. */\n readonly name = input<string>('');\n /** Replaces the rule turning `name` into initials. Falls back to\n * `DS_CONFIG.avatar.initials`, then to `initialsFrom` (first two words, Latin script). */\n readonly initialsRule = input<((name: string) => string) | null>(null);\n /** Image source; shown before `initials` or `fallbackIcon` when set. */\n readonly imageUrl = input<string | null>(null);\n /** Accessible name. When omitted, the avatar is decorative (hidden from AT). */\n readonly ariaLabel = input<string | null>(null);\n /** Tint: a `{ bg, fg }` pair, the literal `'neutral'` for the overflow-chip look, or null\n * for the default brand-subtle tones. */\n readonly tint = input<{ bg: string; fg: string } | 'neutral' | null>(null);\n /** Presence dot in the bottom-right corner. */\n readonly status = input<AvatarStatus | null>(null);\n /** Icon rendered when there is no imageUrl and no initials. */\n readonly fallbackIcon = input<IconName | null>(null);\n /** Seed for the deterministic tint when no `tint` is set. Defaults to `name`; set it when\n * identity is an id or an email rather than the display name. */\n readonly seed = input<string | null>(null);\n /** Hue arcs `[start, end]` (0-360 degrees) the seeded tint avoids, e.g. `[[310, 360], [0, 20]]`.\n * Only applies when `seed` drives the tint. */\n readonly avoidHues = input<readonly (readonly [number, number])[]>([]);\n\n private readonly config = inject(DS_CONFIG);\n protected readonly intl = inject(DS_INTL);\n\n protected readonly initialsText = computed(() => {\n const explicit = this.initials();\n if (explicit) {\n return explicit;\n }\n const name = this.name();\n if (!name) {\n return '';\n }\n const rule = this.initialsRule() ?? this.config.avatar?.initials;\n\n return rule ? rule(name) : initialsFrom(name);\n });\n\n protected readonly tintStyle = computed(() => {\n const value = this.tint();\n if (value === 'neutral') {\n return { bg: null as string | null, fg: null as string | null };\n }\n if (value) {\n return { bg: value.bg, fg: value.fg };\n }\n\n const seed = this.seed() ?? this.name();\n if (seed) {\n return avatarTint(seed, { avoidHues: this.avoidHues() });\n }\n\n return { bg: null as string | null, fg: null as string | null };\n });\n\n protected readonly statusAriaLabel = computed(() => {\n const value = this.status();\n\n return value ? this.intl().avatar[value] : null;\n });\n}\n","@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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAcA;;;;AAI8F;AACxF,SAAU,UAAU,CACxB,IAAY,EACZ,OAA2B,EAAA;AAE3B,IAAA,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE;AAC1C,IAAA,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,EAAE;AAC5C,IAAA,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAE7D,OAAO;AACL,QAAA,EAAE,EAAE,CAAA,IAAA,EAAO,GAAG,IAAI,UAAU,CAAA,EAAA,EAAK,SAAS,CAAA,EAAA,CAAI;AAC9C,QAAA,EAAE,EAAE,OAAO,EAAE,UAAU,IAAI,MAAM;KAClC;AACH;AAEA;;AAE+F;AACzF,SAAU,YAAY,CAAC,KAAc,EAAE,IAAa,EAAA;AACxD,IAAA,MAAM,KAAK,GACT,IAAI,KAAK;AACP,UAAE,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO;UAChD,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC;AAC/B,IAAA,MAAM,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;AACrD,IAAA,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;IAEpD,OAAO,CAAA,EAAG,YAAY,CAAA,EAAG,WAAW,CAAA,CAA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+BAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,4BAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,kBAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChC5B,qYAmBA,EAAA,MAAA,EAAA,CAAA,wzEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAgBZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAnB3B,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,YAAY,EAAE,iBAAiB;AAC/B,wBAAA,YAAY,EAAE,iBAAiB;AAC/B,wBAAA,YAAY,EAAE,iBAAiB;AAC/B,wBAAA,iBAAiB,EAAE,sBAAsB;AACzC,wBAAA,8BAA8B,EAAE,gBAAgB;AAChD,wBAAA,iCAAiC,EAAE,gBAAgB;AACnD,wBAAA,aAAa,EAAE,4BAA4B;AAC3C,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,oBAAoB,EAAE,2BAA2B;AAClD,qBAAA,EAAA,QAAA,EAAA,qYAAA,EAAA,MAAA,EAAA,CAAA,wzEAAA,CAAA,EAAA;;;AE9BH;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-avatar.mjs","sources":["../../../src/lib/components/avatar/avatar-tint.ts","../../../src/lib/components/avatar/avatar.component.ts","../../../src/lib/components/avatar/avatar.component.html","../../../src/lib/components/avatar/ids-group-ltd-ids-design-system-components-avatar.ts"],"sourcesContent":["/** Options for {@link avatarTint}. */\nexport interface AvatarTintOptions {\n /** Hue arcs (degrees, `[start, end]` with `start < end`, within 0-360) the derived hue\n * never lands in, e.g. `[[310, 360], [0, 20]]`. An arc crossing 0 is given as two arcs.\n * Default: none. */\n avoidHues?: readonly (readonly [number, number])[];\n /** HSL lightness percentage. Default 62. */\n lightness?: number;\n /** HSL saturation percentage. Default 50. */\n saturation?: number;\n /** Text colour paired with the background. Default `#fff`. */\n foreground?: string;\n}\n\n/** Deterministic `{ bg, fg }` tint for a seed string (an email, a name): the same seed always\n * gives the same colour.\n *\n * White on the lighter hues measures as little as 1.65:1 (WCAG AA asks 4.5:1 for text); where\n * initials are the only identifier, pass `lightness` about 50 and keep white (5.3-6.6:1). */\nexport function avatarTint(\n seed: string,\n options?: AvatarTintOptions,\n): { bg: string; fg: string } {\n const lightness = options?.lightness ?? 62;\n const saturation = options?.saturation ?? 50;\n const hue = pickHue(hashSeed(seed), options?.avoidHues ?? []);\n\n return {\n bg: `hsl(${hue} ${saturation}% ${lightness}%)`,\n fg: options?.foreground ?? '#fff',\n };\n}\n\n/** Uppercased initials from the first two words: `(first, last)` parts or one full name\n * (`initialsFrom('Ada Lovelace')` gives `AL`); `?` when empty. A naive Latin-script guess: apps\n * with a real naming rule use `DS_CONFIG.avatar.initials` or `ds-avatar`'s `initialsRule`. */\nexport function initialsFrom(first?: string, last?: string): string {\n const words =\n last === undefined\n ? (first ?? '').trim().split(/\\s+/).filter(Boolean)\n : [first ?? '', last ?? ''];\n const firstInitial = (words[0] ?? '').trim()[0] ?? '';\n const lastInitial = (words[1] ?? '').trim()[0] ?? '';\n\n return `${firstInitial}${lastInitial}`.toUpperCase() || '?';\n}\n\nfunction hashSeed(seed: string): number {\n let hash = 0;\n for (let index = 0; index < seed.length; index++) {\n hash = seed.charCodeAt(index) + ((hash << 5) - hash);\n }\n\n return hash;\n}\n\nfunction pickHue(\n hash: number,\n avoidHues: readonly (readonly [number, number])[],\n): number {\n const excluded = normalizeArcs(avoidHues);\n const excludedDegrees = excluded.reduce(\n (sum, [start, end]) => sum + (end - start),\n 0,\n );\n const allowedDegrees = Math.max(1, 360 - excludedDegrees);\n let position = ((hash % allowedDegrees) + allowedDegrees) % allowedDegrees;\n\n let cursor = 0;\n for (const [start, end] of excluded) {\n const gap = start - cursor;\n if (position < gap) {\n return cursor + position;\n }\n position -= gap;\n cursor = end;\n }\n\n return cursor + position;\n}\n\nfunction normalizeArcs(\n arcs: readonly (readonly [number, number])[],\n): [number, number][] {\n const clamped = arcs\n .map(\n ([start, end]) =>\n [\n Math.max(0, Math.min(360, start)),\n Math.max(0, Math.min(360, end)),\n ] as [number, number],\n )\n .filter(([start, end]) => end > start)\n .sort((left, right) => left[0] - right[0]);\n\n const merged: [number, number][] = [];\n for (const [start, end] of clamped) {\n const previous = merged[merged.length - 1];\n if (previous && start <= previous[1]) {\n previous[1] = Math.max(previous[1], end);\n } else {\n merged.push([start, end]);\n }\n }\n\n return merged;\n}\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n linkedSignal,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { avatarTint, initialsFrom } from './avatar-tint';\nimport type { AvatarSize, AvatarStatus } from './avatar.types';\nimport { DS_CONFIG, DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-avatar',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './avatar.component.html',\n styleUrl: './avatar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.xs]': \"size() === 'xs'\",\n '[class.sm]': \"size() === 'sm'\",\n '[class.lg]': \"size() === 'lg'\",\n '[class.neutral]': \"tint() === 'neutral'\",\n '[style.--ds-avatar-bg-color]': 'tintStyle().bg',\n '[style.--ds-avatar-label-color]': 'tintStyle().fg',\n '[attr.role]': \"ariaLabel() ? 'img' : null\",\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'ariaLabel() ? null : true',\n },\n})\nexport class AvatarComponent {\n /** Diameter. */\n readonly size = input<AvatarSize>('md');\n /** Fallback text shown when there is no `imageUrl`. Wins over initials derived from `name`. */\n readonly initials = input<string>('');\n /** The person or thing this avatar stands for; drives the initials and the tint seed. */\n readonly name = input<string>('');\n /** Replaces the rule turning `name` into initials. Falls back to\n * `DS_CONFIG.avatar.initials`, then to `initialsFrom` (first two words, Latin script). */\n readonly initialsRule = input<((name: string) => string) | null>(null);\n /** Image source; shown before `initials` or `fallbackIcon` when set. An image that fails to\n * load falls back to them until the URL changes. */\n readonly imageUrl = input<string | null>(null);\n /** Accessible name. When omitted, the avatar is decorative (hidden from AT). */\n readonly ariaLabel = input<string | null>(null);\n /** Tint: a `{ bg, fg }` pair, the literal `'neutral'` for the overflow-chip look, or null\n * for the default brand-subtle tones. */\n readonly tint = input<{ bg: string; fg: string } | 'neutral' | null>(null);\n /** Presence dot in the bottom-right corner. */\n readonly status = input<AvatarStatus | null>(null);\n /** Icon rendered when there is no imageUrl and no initials. */\n readonly fallbackIcon = input<IconName | null>(null);\n /** Seed for the deterministic tint when no `tint` is set. Defaults to `name`; set it when\n * identity is an id or an email rather than the display name. */\n readonly seed = input<string | null>(null);\n /** Hue arcs `[start, end]` (0-360 degrees) the seeded tint avoids, e.g. `[[310, 360], [0, 20]]`.\n * Only applies when `seed` drives the tint. */\n readonly avoidHues = input<readonly (readonly [number, number])[]>([]);\n\n private readonly config = inject(DS_CONFIG);\n protected readonly intl = inject(DS_INTL);\n\n protected readonly imageFailed = linkedSignal({\n source: this.imageUrl,\n computation: () => false,\n });\n\n protected readonly initialsText = computed(() => {\n const explicit = this.initials();\n if (explicit) {\n return explicit;\n }\n const name = this.name();\n if (!name) {\n return '';\n }\n const rule = this.initialsRule() ?? this.config.avatar?.initials;\n\n return rule ? rule(name) : initialsFrom(name);\n });\n\n protected readonly tintStyle = computed(() => {\n const value = this.tint();\n if (value === 'neutral') {\n return { bg: null as string | null, fg: null as string | null };\n }\n if (value) {\n return { bg: value.bg, fg: value.fg };\n }\n\n const seed = this.seed() ?? this.name();\n if (seed) {\n return avatarTint(seed, { avoidHues: this.avoidHues() });\n }\n\n return { bg: null as string | null, fg: null as string | null };\n });\n\n protected readonly statusAriaLabel = computed(() => {\n const value = this.status();\n\n return value ? this.intl().avatar[value] : null;\n });\n}\n","@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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAcA;;;;AAI8F;AACxF,SAAU,UAAU,CACxB,IAAY,EACZ,OAA2B,EAAA;AAE3B,IAAA,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,EAAE;AAC1C,IAAA,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,EAAE;AAC5C,IAAA,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC;IAE7D,OAAO;AACL,QAAA,EAAE,EAAE,CAAA,IAAA,EAAO,GAAG,IAAI,UAAU,CAAA,EAAA,EAAK,SAAS,CAAA,EAAA,CAAI;AAC9C,QAAA,EAAE,EAAE,OAAO,EAAE,UAAU,IAAI,MAAM;KAClC;AACH;AAEA;;AAE+F;AACzF,SAAU,YAAY,CAAC,KAAc,EAAE,IAAa,EAAA;AACxD,IAAA,MAAM,KAAK,GACT,IAAI,KAAK;AACP,UAAE,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM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