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

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 (48) hide show
  1. package/CHANGELOG.md +82 -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-button.mjs +22 -3
  6. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +4 -3
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +7 -4
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +8 -4
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +4 -4
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +4 -13
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +62 -5
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +10 -7
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +49 -5
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +15 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  37. package/migrations/1.0.2.json +70 -0
  38. package/package.json +5 -1
  39. package/schematics/check-overrides/surface.json +4 -1
  40. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +11 -4
  41. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
  42. package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +6 -1
  43. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
  44. package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +26 -2
  45. package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +0 -1
  46. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +7 -0
  47. package/types/ids-group-ltd-ids-design-system-components.d.ts +7 -1
  48. package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,87 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 1.0.2 — 2026-10-27
4
+
5
+ ### Added
6
+
7
+ - **`ds-icon-button` takes an `ariaHasPopup` input.** It sets `aria-haspopup` on the inner
8
+ `<button>` and accepts the same values as `ds-button`: `'true'`, `'menu'`, `'listbox'`, `'tree'`,
9
+ `'grid'`, `'dialog'` or `null`. Bind it on an icon button that opens a menu or another overlay.
10
+ - **`ds-icon-button` exposes `controlRef`.** It is the inner `<button>` as an `ElementRef`, the same as
11
+ on `ds-button`, so an overlay can position against it and return focus to it: pass
12
+ `trigger.controlRef().nativeElement` to `toggle` of `ds-popover`.
13
+ - **`[dsPopoverTrigger]` opens a `ds-popover` from a button and keeps its ARIA in step.** Put
14
+ `[dsPopoverTrigger]="pop"` on a `ds-button`, `ds-icon-button` or native button: a click or
15
+ Enter opens the popover from the inner `<button>`, which gets `aria-haspopup` (`menu` when the
16
+ popover holds a `ds-menu`, `dialog` otherwise), `aria-expanded` and, while open, `aria-controls`.
17
+ It replaces `#t` with `(pressed)="pop.toggle(t.controlRef().nativeElement)"` and the
18
+ `ariaHasPopup` / `[ariaExpanded]` bindings; leave those unbound on a button that uses it. Nothing
19
+ to change in existing code.
20
+
21
+ ### Changed
22
+
23
+ - **A resizable `ds-table` column shows its resize handle at rest.** Each handle in the header
24
+ draws a thin line in `--border-default`, so a column that can be resized is visible before the
25
+ pointer reaches its edge. Hover and drag look as before. Nothing to change in
26
+ your code.
27
+ - **The separators of an empty `ds-date-picker` mask are muted with its placeholder.** `DD/MM/YYYY`
28
+ reads in one colour; a separator takes the value colour once the part before it is typed in full,
29
+ so `12/MM/YYYY` shows the first slash dark and the second muted. Nothing to change in your code.
30
+ - **A loading `ds-button` with an `icon` keeps its label and spins in the icon's place.** The
31
+ spinner takes the leading icon's box and the label stays visible; a button without an icon still
32
+ hides its contents behind one centred spinner. The new `loadingMode` input (`ButtonLoadingMode`:
33
+ `'auto' | 'icon' | 'replace'`, default `'auto'`) picks the behaviour: `'icon'` also uses the
34
+ trailing icon when there is no leading one, and `'replace'` keeps the centred spinner on every
35
+ button. Neither mode changes the button's size or moves its label. To keep the centred spinner on
36
+ a button with an icon, bind `loadingMode="replace"`.
37
+ - **A `ds-time-picker` column that does not loop scrolls at the browser's wheel speed.** Every
38
+ hour and minute column turned one wheel notch into about one row; a column that loops still does, so it reads
39
+ as a drum, while a column that does not loop, such as one with `loop="never"`, now scrolls as far
40
+ as any list, still snapping to a cell. Nothing to change in your code.
41
+ - **Now in a single `ds-time-picker` picks the current time and closes the panel.** It used to set
42
+ the time and leave the panel open. A range panel stays open until Done, as before.
43
+
44
+ ### Fixed
45
+
46
+ - **A `ds-menu-item` that is the first or last child of the menu rounds its corners with it.** The rows are square and
47
+ the menu clips them at its rounded edge, so the focus ring of the first or last item was cut off
48
+ at two corners and kept square ones at the other two. Those rows now take the menu's inner radius
49
+ and every row's focus ring is drawn inside the row. `--ds-menu-item-radius` still sets every
50
+ row's radius.
51
+ Nothing to change in your code.
52
+ - **`ds-menu` rows touch each other, so the pointer never falls between them.** The menu put a 2px
53
+ gap between rows, and a pointer resting in it hovered no row, so the hover fill flickered off
54
+ while moving down the list. `--ds-menu-gap` now defaults to `0px`, which makes the menu 2px
55
+ shorter per boundary between two rows; a `ds-menu-divider` cancels the gap with a
56
+ 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.
57
+ - **A looping `ds-time-picker` column marks the selected value once.** A column with fewer values
58
+ than fit in it, such as minutes at a 15-minute step with `loop="always"`, repeats its set so it can scroll round, and
59
+ every repeat of the selected value was filled. While scrolling, two filled cells four rows apart
60
+ were on screen at once. The `ds-time-columns` element inside the panel now fills only the one
61
+ nearest the column's centre. Nothing to change in your code.
62
+ - **A `ds-time-picker` field keeps its width when it is empty.** Unless it was `fullWidth`, the
63
+ trigger was as wide as its text, so the `--:--` placeholder made it narrower than a picked time and the field jumped when a
64
+ time was set or cleared; in 12-hour format AM and PM differed slightly too. The
65
+ trigger now reserves room for its widest time with hidden `aria-hidden` spans, so a test that
66
+ reads the whole text content of the trigger also gets their text. Nothing else to change in your
67
+ code.
68
+ - **`ds-chart`, `ds-column-chart`, `ds-line-chart` and `ds-waterfall-chart` size the value-axis gutter
69
+ for the web font.** The tick labels were measured when they rendered and again only when their
70
+ text changed, so on a page whose web font arrived after the chart
71
+ the gutter kept the width of the fallback face, and a label wider in the real face could be
72
+ clipped. The labels are measured again once the page's fonts have loaded. Nothing to change in
73
+ your code.
74
+ - **Column resize separators expose `aria-valuenow`, `aria-valuemin` and `aria-valuemax` before they
75
+ are focused.** A `ds-table` with `dsTableResize` set the range on a separator only while it held
76
+ focus, so a screen reader reading the page met separators with no value. Nothing to change in your
77
+ code.
78
+ - **A keyboard-focused `ds-table` resize handle shows the standard focus ring.** The handle widened
79
+ its line on keyboard focus instead of drawing the focus ring; it now draws the same ring as other
80
+ controls. Nothing to change in your code.
81
+ - **The `ds-date-picker` input announces as a combobox.** The input already declared a dialog popup
82
+ and an expanded state, which a plain text box does not support; it now carries `role="combobox"`.
83
+ Typing a date works as before. Nothing to change in your code.
84
+
3
85
  ## 1.0.1 — 2026-10-22
4
86
 
5
87
  ### 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`
@@ -89,6 +89,11 @@ class ButtonComponent extends DsMessageBase {
89
89
  * focusable so focus stays on it while the work runs. Button-only; ignored on an anchor with a
90
90
  * dev warning. */
91
91
  loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
92
+ /** Where the `loading` spinner draws. `'icon'` puts it in the leading icon's box (the trailing
93
+ * icon's when there is no leading one) and keeps the label visible; `'replace'` hides the
94
+ * contents behind one spinner centred on the button; `'auto'` is `'icon'` when `icon` is set,
95
+ * else `'replace'`. Neither moves the label or resizes the button. */
96
+ loadingMode = input('auto', ...(ngDevMode ? [{ debugName: "loadingMode" }] : /* istanbul ignore next */ []));
92
97
  /** Fills the container: the host becomes block-level and 100% wide. */
93
98
  fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
94
99
  /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */
@@ -131,9 +136,23 @@ class ButtonComponent extends DsMessageBase {
131
136
  variant === 'solid' ? '' : `variant-${variant}`,
132
137
  this.sizeResolved(),
133
138
  this.loading() ? 'loading' : '',
139
+ this.loading() && !this.loadingIconSlot() ? 'loading-replace' : '',
134
140
  ];
135
141
  return parts.filter(Boolean).join(' ');
136
142
  }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
143
+ loadingIconSlot = computed(() => {
144
+ const mode = this.loadingMode();
145
+ if (!this.loading() || mode === 'replace') {
146
+ return null;
147
+ }
148
+ if (this.icon()) {
149
+ return 'leading';
150
+ }
151
+ if (mode === 'icon' && this.trailingIcon()) {
152
+ return 'trailing';
153
+ }
154
+ return null;
155
+ }, ...(ngDevMode ? [{ debugName: "loadingIconSlot" }] : /* istanbul ignore next */ []));
137
156
  softDisabled = computed(() => this.disabled() && this.disabledReason().length > 0, ...(ngDevMode ? [{ debugName: "softDisabled" }] : /* istanbul ignore next */ []));
138
157
  uid = nextControlId('ds-button');
139
158
  reasonId = `${this.uid}-reason`;
@@ -198,7 +217,7 @@ class ButtonComponent extends DsMessageBase {
198
217
  this.pressed.emit(event);
199
218
  }
200
219
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
201
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ds-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, disabledReason: { classPropertyName: "disabledReason", publicName: "disabledReason", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, host: { properties: { "class.in-group": "inGroup", "class.full-width": "fullWidth()", "attr.data-variant": "variant()", "attr.data-color": "color()", "class.with-message": "hasMessageRow()", "class.align-between": "align() === 'between'" } }, viewQueries: [{ propertyName: "controlRef", first: true, predicate: ["btn"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it makes that destination throw.\n `type`, `loading` and native `disabled` are button-only; anchors take `aria-disabled`, and `tabindex=\"-1\"` unless a\n `disabledReason` must stay reachable. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() || loading() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled() && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the accessible name; aria-describedby still reads it. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.align-between) .button{--_button-justify: space-between}:host(.with-message.full-width){display:flex}.button{--_family-base: var(--accent);--_family-on: var(--accent-on);--_family-strong: var(--accent-strong);--_family-subtitle: var(--accent-subtitle);--_family-muted: var(--accent-muted);--_family-muted-strong: var(--accent-muted-strong);--_family-outline-border: var(--_family-muted-strong);--_button-justify: center;--_button-bg-color: var(--ds-button-bg-color, var(--_family-base));--_button-label-color: var(--ds-button-label-color, var(--_family-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-color-hover: var(--ds-button-border-color-hover, var(--_button-border-color));--_button-border-color-active: var(--ds-button-border-color-active, var(--_button-border-color-hover));--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-font-weight: var(--ds-button-font-weight, var(--font-weight-extrabold));--_button-letter-spacing: var(--ds-button-letter-spacing, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5));--_button-padding-y: var(--ds-button-padding-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:var(--_button-justify);gap:var(--space-2);font:var(--_button-font-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-letter-spacing);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-padding-y) var(--_button-padding-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);border-color:var(--_button-border-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);border-color:var(--_button-border-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button: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);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-padding-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-padding-x: var(--ds-button-padding-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.color-secondary{--_family-base: var(--secondary);--_family-on: var(--secondary-on);--_family-strong: var(--secondary-strong);--_family-subtitle: var(--secondary-subtitle);--_family-muted: var(--secondary-muted);--_family-muted-strong: var(--secondary-muted-strong)}.button.color-tertiary{--_family-base: var(--tertiary);--_family-on: var(--tertiary-on);--_family-strong: var(--tertiary-strong);--_family-subtitle: var(--tertiary-subtitle);--_family-muted: var(--tertiary-muted);--_family-muted-strong: var(--tertiary-muted-strong)}.button.color-neutral{--_family-base: var(--text-secondary);--_family-on: var(--surface-default);--_family-strong: var(--text-primary);--_family-subtitle: var(--surface-secondary);--_family-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--_family-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--_family-outline-border: var(--border-default)}.button.color-error{--_family-base: var(--error);--_family-on: var(--text-on-error);--_family-strong: var(--error-text);--_family-subtitle: var(--error-subtitle);--_family-muted: var(--error-muted);--_family-muted-strong: var(--error-muted-strong)}.button.color-success{--_family-base: var(--success);--_family-on: var(--text-on-success);--_family-strong: var(--success-text);--_family-subtitle: var(--success-subtitle);--_family-muted: var(--success-muted);--_family-muted-strong: var(--success-muted-strong)}.button.color-warning{--_family-base: var(--warning);--_family-on: var(--text-on-warning);--_family-strong: var(--warning-text);--_family-subtitle: var(--warning-subtitle);--_family-muted: var(--warning-muted);--_family-muted-strong: var(--warning-muted-strong)}.button.variant-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--_family-muted));--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_family-muted) 72%, var(--_family-base)));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-border-color: var(--ds-button-border-color, var(--_family-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_family-base))}.button.loading{color:transparent!important;pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading:after{content:\"\";position:absolute;box-sizing:border-box;width:var(--spinner-md);height:var(--spinner-md);border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
220
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ds-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, rel: { classPropertyName: "rel", publicName: "rel", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaCurrent: { classPropertyName: "ariaCurrent", publicName: "ariaCurrent", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingMode: { classPropertyName: "loadingMode", publicName: "loadingMode", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaHasPopup: { classPropertyName: "ariaHasPopup", publicName: "ariaHasPopup", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null }, disabledReason: { classPropertyName: "disabledReason", publicName: "disabledReason", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, host: { properties: { "class.in-group": "inGroup", "class.full-width": "fullWidth()", "attr.data-variant": "variant()", "attr.data-color": "color()", "class.with-message": "hasMessageRow()", "class.align-between": "align() === 'between'" } }, viewQueries: [{ propertyName: "controlRef", first: true, predicate: ["btn"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it makes that destination throw.\n `type`, `loading` and native `disabled` are button-only; anchors take `aria-disabled`, and `tabindex=\"-1\"` unless a\n `disabledReason` must stay reachable. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() || loading() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled() && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [class.loading-spinner]=\"loadingIconSlot() === 'leading'\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon\n [name]=\"name\"\n [class.loading-spinner]=\"loadingIconSlot() === 'trailing'\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the accessible name; aria-describedby still reads it. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.align-between) .button{--_button-justify: space-between}:host(.with-message.full-width){display:flex}.button{--_family-base: var(--accent);--_family-on: var(--accent-on);--_family-strong: var(--accent-strong);--_family-subtitle: var(--accent-subtitle);--_family-muted: var(--accent-muted);--_family-muted-strong: var(--accent-muted-strong);--_family-outline-border: var(--_family-muted-strong);--_button-justify: center;--_button-bg-color: var(--ds-button-bg-color, var(--_family-base));--_button-label-color: var(--ds-button-label-color, var(--_family-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-color-hover: var(--ds-button-border-color-hover, var(--_button-border-color));--_button-border-color-active: var(--ds-button-border-color-active, var(--_button-border-color-hover));--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-font-weight: var(--ds-button-font-weight, var(--font-weight-extrabold));--_button-letter-spacing: var(--ds-button-letter-spacing, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5));--_button-padding-y: var(--ds-button-padding-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:var(--_button-justify);gap:var(--space-2);font:var(--_button-font-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-letter-spacing);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-padding-y) var(--_button-padding-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);border-color:var(--_button-border-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);border-color:var(--_button-border-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button: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);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-padding-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-padding-x: var(--ds-button-padding-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.color-secondary{--_family-base: var(--secondary);--_family-on: var(--secondary-on);--_family-strong: var(--secondary-strong);--_family-subtitle: var(--secondary-subtitle);--_family-muted: var(--secondary-muted);--_family-muted-strong: var(--secondary-muted-strong)}.button.color-tertiary{--_family-base: var(--tertiary);--_family-on: var(--tertiary-on);--_family-strong: var(--tertiary-strong);--_family-subtitle: var(--tertiary-subtitle);--_family-muted: var(--tertiary-muted);--_family-muted-strong: var(--tertiary-muted-strong)}.button.color-neutral{--_family-base: var(--text-secondary);--_family-on: var(--surface-default);--_family-strong: var(--text-primary);--_family-subtitle: var(--surface-secondary);--_family-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--_family-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--_family-outline-border: var(--border-default)}.button.color-error{--_family-base: var(--error);--_family-on: var(--text-on-error);--_family-strong: var(--error-text);--_family-subtitle: var(--error-subtitle);--_family-muted: var(--error-muted);--_family-muted-strong: var(--error-muted-strong)}.button.color-success{--_family-base: var(--success);--_family-on: var(--text-on-success);--_family-strong: var(--success-text);--_family-subtitle: var(--success-subtitle);--_family-muted: var(--success-muted);--_family-muted-strong: var(--success-muted-strong)}.button.color-warning{--_family-base: var(--warning);--_family-on: var(--text-on-warning);--_family-strong: var(--warning-text);--_family-subtitle: var(--warning-subtitle);--_family-muted: var(--warning-muted);--_family-muted-strong: var(--warning-muted-strong)}.button.variant-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--_family-muted));--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_family-muted) 72%, var(--_family-base)));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-border-color: var(--ds-button-border-color, var(--_family-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_family-base))}.button.loading{color:var(--_button-label-color);pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading-replace{color:transparent!important}.button.loading-replace:after{content:\"\";position:absolute;box-sizing:border-box;border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite;width:var(--spinner-md);height:var(--spinner-md)}.button .loading-spinner{position:relative;color:transparent}.button .loading-spinner:after{content:\"\";position:absolute;box-sizing:border-box;border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite;inset:0}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: FieldMessageComponent, selector: "ds-field-message", inputs: ["text", "state", "messageId", "icon", "reserve", "changed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
202
221
  }
203
222
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, decorators: [{
204
223
  type: Component,
@@ -216,8 +235,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
216
235
  '[attr.data-color]': 'color()',
217
236
  '[class.with-message]': 'hasMessageRow()',
218
237
  '[class.align-between]': "align() === 'between'",
219
- }, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it makes that destination throw.\n `type`, `loading` and native `disabled` are button-only; anchors take `aria-disabled`, and `tabindex=\"-1\"` unless a\n `disabledReason` must stay reachable. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() || loading() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled() && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the accessible name; aria-describedby still reads it. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.align-between) .button{--_button-justify: space-between}:host(.with-message.full-width){display:flex}.button{--_family-base: var(--accent);--_family-on: var(--accent-on);--_family-strong: var(--accent-strong);--_family-subtitle: var(--accent-subtitle);--_family-muted: var(--accent-muted);--_family-muted-strong: var(--accent-muted-strong);--_family-outline-border: var(--_family-muted-strong);--_button-justify: center;--_button-bg-color: var(--ds-button-bg-color, var(--_family-base));--_button-label-color: var(--ds-button-label-color, var(--_family-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-color-hover: var(--ds-button-border-color-hover, var(--_button-border-color));--_button-border-color-active: var(--ds-button-border-color-active, var(--_button-border-color-hover));--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-font-weight: var(--ds-button-font-weight, var(--font-weight-extrabold));--_button-letter-spacing: var(--ds-button-letter-spacing, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5));--_button-padding-y: var(--ds-button-padding-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:var(--_button-justify);gap:var(--space-2);font:var(--_button-font-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-letter-spacing);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-padding-y) var(--_button-padding-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);border-color:var(--_button-border-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);border-color:var(--_button-border-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button: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);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-padding-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-padding-x: var(--ds-button-padding-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.color-secondary{--_family-base: var(--secondary);--_family-on: var(--secondary-on);--_family-strong: var(--secondary-strong);--_family-subtitle: var(--secondary-subtitle);--_family-muted: var(--secondary-muted);--_family-muted-strong: var(--secondary-muted-strong)}.button.color-tertiary{--_family-base: var(--tertiary);--_family-on: var(--tertiary-on);--_family-strong: var(--tertiary-strong);--_family-subtitle: var(--tertiary-subtitle);--_family-muted: var(--tertiary-muted);--_family-muted-strong: var(--tertiary-muted-strong)}.button.color-neutral{--_family-base: var(--text-secondary);--_family-on: var(--surface-default);--_family-strong: var(--text-primary);--_family-subtitle: var(--surface-secondary);--_family-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--_family-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--_family-outline-border: var(--border-default)}.button.color-error{--_family-base: var(--error);--_family-on: var(--text-on-error);--_family-strong: var(--error-text);--_family-subtitle: var(--error-subtitle);--_family-muted: var(--error-muted);--_family-muted-strong: var(--error-muted-strong)}.button.color-success{--_family-base: var(--success);--_family-on: var(--text-on-success);--_family-strong: var(--success-text);--_family-subtitle: var(--success-subtitle);--_family-muted: var(--success-muted);--_family-muted-strong: var(--success-muted-strong)}.button.color-warning{--_family-base: var(--warning);--_family-on: var(--text-on-warning);--_family-strong: var(--warning-text);--_family-subtitle: var(--warning-subtitle);--_family-muted: var(--warning-muted);--_family-muted-strong: var(--warning-muted-strong)}.button.variant-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--_family-muted));--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_family-muted) 72%, var(--_family-base)));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-border-color: var(--ds-button-border-color, var(--_family-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_family-base))}.button.loading{color:transparent!important;pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading:after{content:\"\";position:absolute;box-sizing:border-box;width:var(--spinner-md);height:var(--spinner-md);border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"] }]
220
- }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], fragment: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragment", required: false }] }], queryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParams", required: false }] }], queryParamsHandling: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamsHandling", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], ariaCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaCurrent", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }], controlRef: [{ type: i0.ViewChild, args: ['btn', { isSignal: true }] }] } });
238
+ }, template: "<!-- Every branch must keep #btn: `controlRef` is required, so dropping it makes that destination throw.\n `type`, `loading` and native `disabled` are button-only; anchors take `aria-disabled`, and `tabindex=\"-1\"` unless a\n `disabledReason` must stay reachable. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() || loading() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled() && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [class.loading-spinner]=\"loadingIconSlot() === 'leading'\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon\n [name]=\"name\"\n [class.loading-spinner]=\"loadingIconSlot() === 'trailing'\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the accessible name; aria-describedby still reads it. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\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{display:inline-flex;width:fit-content}:host(.full-width){display:block;width:100%}:host(.with-message){display:inline-flex;flex-direction:column;align-items:stretch;gap:var(--field-label-gap)}:host(.align-between) .button{--_button-justify: space-between}:host(.with-message.full-width){display:flex}.button{--_family-base: var(--accent);--_family-on: var(--accent-on);--_family-strong: var(--accent-strong);--_family-subtitle: var(--accent-subtitle);--_family-muted: var(--accent-muted);--_family-muted-strong: var(--accent-muted-strong);--_family-outline-border: var(--_family-muted-strong);--_button-justify: center;--_button-bg-color: var(--ds-button-bg-color, var(--_family-base));--_button-label-color: var(--ds-button-label-color, var(--_family-on));--_button-bg-color-hover: var(--ds-button-bg-color-hover, color-mix(in srgb, var(--_button-bg-color) 88%, black));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_button-bg-color) 76%, black));--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_button-label-color));--_button-label-color-active: var(--ds-button-label-color-active, var(--_button-label-color));--_button-accent: var(--_button-bg-color);--_button-border-color: var(--ds-button-border-color, transparent);--_button-border-color-hover: var(--ds-button-border-color-hover, var(--_button-border-color));--_button-border-color-active: var(--ds-button-border-color-active, var(--_button-border-color-hover));--_button-border-width: var(--ds-button-border-width, var(--border-width-default));--_button-press-scale: var(--ds-button-press-scale, .98);--_button-pressed-shadow: var(--ds-button-pressed-shadow, none);--_button-shadow: var(--ds-button-shadow, none);--_button-shadow-hover: var(--ds-button-shadow-hover, var(--_button-shadow));--_button-radius: var(--ds-button-radius, var(--ds-radius-control));--_button-font-family: var(--ds-button-font-family, var(--font-sans));--_button-line-height: var(--ds-button-line-height, var(--line-height-flat));--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-font-weight: var(--ds-button-font-weight, var(--font-weight-extrabold));--_button-letter-spacing: var(--ds-button-letter-spacing, var(--letter-spacing-wide));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5));--_button-padding-y: var(--ds-button-padding-y, 0);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, oklch(from var(--_button-accent) 92% .03 h));--_button-label-color-disabled: var(--ds-button-label-color-disabled, oklch(from var(--_button-accent) 70% .035 h));--_button-border-color-disabled: var(--ds-button-border-color-disabled, oklch(from var(--_button-accent) 86% .04 h));display:inline-flex;align-items:center;justify-content:var(--_button-justify);gap:var(--space-2);font:var(--_button-font-weight) var(--_button-font-size)/var(--_button-line-height) var(--_button-font-family);letter-spacing:var(--_button-letter-spacing);color:var(--_button-label-color);background-color:var(--_button-bg-color);border:var(--_button-border-width) solid var(--_button-border-color);border-radius:var(--_button-radius);padding:var(--_button-padding-y) var(--_button-padding-x);height:var(--_button-height);width:100%;cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;text-align:center;position:relative;box-shadow:var(--_button-shadow);transition:background var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard),transform var(--duration-instant) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.button:hover{background-color:var(--_button-bg-color-hover);color:var(--_button-label-color-hover);border-color:var(--_button-border-color-hover);box-shadow:var(--_button-shadow-hover)}.button:active{background-color:var(--_button-bg-color-active);color:var(--_button-label-color-active);border-color:var(--_button-border-color-active);box-shadow:var(--_button-pressed-shadow);transform:scale(var(--_button-press-scale))}.button[disabled],.button[aria-disabled=true]{background-color:var(--_button-bg-color-disabled);color:var(--_button-label-color-disabled);border-color:var(--_button-border-color-disabled);cursor:not-allowed;box-shadow:none;transform:none}.button[disabled]{pointer-events:none}.button: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);z-index:var(--btn-focus-z)}.button .icon{width:var(--icon-md);height:var(--icon-md);flex-shrink:0}.button .button-main{display:contents}.button .subtext-slot:empty{display:none}.button .subtext-slot,.button .reason{font:var(--font-weight-medium) var(--font-size-2xs)/var(--line-height-tight) var(--_button-font-family);letter-spacing:var(--letter-spacing-normal);text-align:center}.button .reason{max-width:100%;text-wrap:pretty}.button:has(.subtext-slot:not(:empty)),.button:has(.reason){flex-direction:column;gap:var(--space-1);height:auto;min-height:var(--field-h-md);padding-block:var(--ds-button-padding-y, var(--space-2));white-space:normal}.button:has(.subtext-slot:not(:empty)) .button-main,.button:has(.reason) .button-main{display:inline-flex;align-items:center;gap:var(--space-2)}.button:has(.subtext-slot:not(:empty)).lg,.button:has(.reason).lg{height:auto;min-height:var(--field-h-lg)}.button.lg{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-lg));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.md{--_button-font-size: var(--ds-button-font-size, var(--font-size-m));--_button-height: var(--ds-button-height, var(--field-h-md));--_button-padding-x: var(--ds-button-padding-x, var(--space-5))}.button.sm{--_button-font-size: var(--ds-button-font-size, var(--font-size-s));--_button-height: var(--ds-button-height, var(--field-h-sm));--_button-padding-x: var(--ds-button-padding-x, var(--space-4))}.button.sm .icon{width:var(--icon-sm);height:var(--icon-sm)}.button.color-secondary{--_family-base: var(--secondary);--_family-on: var(--secondary-on);--_family-strong: var(--secondary-strong);--_family-subtitle: var(--secondary-subtitle);--_family-muted: var(--secondary-muted);--_family-muted-strong: var(--secondary-muted-strong)}.button.color-tertiary{--_family-base: var(--tertiary);--_family-on: var(--tertiary-on);--_family-strong: var(--tertiary-strong);--_family-subtitle: var(--tertiary-subtitle);--_family-muted: var(--tertiary-muted);--_family-muted-strong: var(--tertiary-muted-strong)}.button.color-neutral{--_family-base: var(--text-secondary);--_family-on: var(--surface-default);--_family-strong: var(--text-primary);--_family-subtitle: var(--surface-secondary);--_family-muted: color-mix(in srgb, var(--text-secondary) 14%, var(--surface-default));--_family-muted-strong: color-mix(in srgb, var(--text-secondary) 22%, var(--surface-default));--_family-outline-border: var(--border-default)}.button.color-error{--_family-base: var(--error);--_family-on: var(--text-on-error);--_family-strong: var(--error-text);--_family-subtitle: var(--error-subtitle);--_family-muted: var(--error-muted);--_family-muted-strong: var(--error-muted-strong)}.button.color-success{--_family-base: var(--success);--_family-on: var(--text-on-success);--_family-strong: var(--success-text);--_family-subtitle: var(--success-subtitle);--_family-muted: var(--success-muted);--_family-muted-strong: var(--success-muted-strong)}.button.color-warning{--_family-base: var(--warning);--_family-on: var(--text-on-warning);--_family-strong: var(--warning-text);--_family-subtitle: var(--warning-subtitle);--_family-muted: var(--warning-muted);--_family-muted-strong: var(--warning-muted-strong)}.button.variant-tonal{--_button-bg-color: var(--ds-button-bg-color, var(--_family-muted));--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-muted-strong));--_button-bg-color-active: var(--ds-button-bg-color-active, color-mix(in srgb, var(--_family-muted) 72%, var(--_family-base)));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, color-mix(in srgb, var(--_button-bg-color) 28%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-ghost{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-outline{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-border-color: var(--ds-button-border-color, var(--_family-outline-border));--_button-bg-color-hover: var(--ds-button-bg-color-hover, var(--_family-subtitle));--_button-bg-color-active: var(--ds-button-bg-color-active, var(--_family-muted));--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, color-mix(in srgb, var(--_button-border-color) 55%, var(--surface-disabled)));--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)))}.button.variant-text{--_button-bg-color: var(--ds-button-bg-color, transparent);--_button-label-color: var(--ds-button-label-color, var(--_family-strong));--_button-bg-color-hover: var(--ds-button-bg-color-hover, transparent);--_button-bg-color-active: var(--ds-button-bg-color-active, transparent);--_button-accent: var(--_button-label-color);--_button-bg-color-disabled: var(--ds-button-bg-color-disabled, transparent);--_button-border-color-disabled: var(--ds-button-border-color-disabled, transparent);--_button-label-color-disabled: var(--ds-button-label-color-disabled, color-mix(in srgb, var(--_button-label-color) 40%, var(--surface-default)));padding:0;height:auto;width:auto;text-decoration:underline;text-underline-offset:var(--btn-link-uloff);--_button-label-color-hover: var(--ds-button-label-color-hover, var(--_family-base))}.button.loading{color:var(--_button-label-color);pointer-events:none;background-color:var(--_button-bg-color);border-color:var(--_button-border-color)}.button.loading-replace{color:transparent!important}.button.loading-replace:after{content:\"\";position:absolute;box-sizing:border-box;border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite;width:var(--spinner-md);height:var(--spinner-md)}.button .loading-spinner{position:relative;color:transparent}.button .loading-spinner:after{content:\"\";position:absolute;box-sizing:border-box;border:var(--border-width-strong) solid var(--_button-label-color);border-right-color:transparent;border-radius:var(--radius-pill);animation:spin var(--duration-loop-fast) linear infinite;inset:0}@keyframes spin{to{transform:rotate(360deg)}}:host(.in-group){width:auto;display:flex}:host(.in-group) .label,:host(.in-group) ds-field-message{display:none}:host(.in-group) .button{border:0;border-radius:0;background:transparent;flex:1;height:auto}:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{border:0;box-shadow:none}@media not (forced-colors:active){:host(.in-group) .button:hover,:host(.in-group) .button:focus,:host(.in-group) .button:focus-visible,:host(.in-group) .button:focus-within{outline:none}}\n"] }]
239
+ }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], fragment: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragment", required: false }] }], queryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParams", required: false }] }], queryParamsHandling: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParamsHandling", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], rel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rel", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], ariaCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaCurrent", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMode", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], trailingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "trailingIcon", required: false }] }], ariaHasPopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHasPopup", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }], disabledReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledReason", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }], controlRef: [{ type: i0.ViewChild, args: ['btn', { isSignal: true }] }] } });
221
240
 
222
241
  /**
223
242
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-button.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/button/button.component.html","../../../src/lib/components/button/ids-group-ltd-ids-design-system-components-button.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport type {\n IsActiveMatchOptions,\n Params,\n QueryParamsHandling,\n} from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport {\n dsAriaCurrent,\n dsDestination,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ButtonAlign,\n ButtonColor,\n ButtonVariant,\n ButtonType,\n} from './button.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n resolveFieldMessage,\n trimmedText,\n type DsFieldError,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n// A button has no form control; these stand in for the validation sources `resolveFieldMessage` reads.\nconst NO_ERRORS = signal<readonly DsFieldError[]>([]).asReadonly();\nconst NEVER_INVALID = signal(false).asReadonly();\n\n// Router-only modifiers; a tuple so the warning can name the one that was set.\nconst ROUTER_ONLY = [\n ['fragment'],\n ['queryParams'],\n ['queryParamsHandling'],\n] as const;\n\n// Warned in dev, still rendered: two inputs cannot be narrowed against each other at compile time.\nconst DISCOURAGED_COMBOS = new Map<string, string>([\n [\n 'neutral|solid',\n 'a solid grey button reads as disabled — prefer tonal/ghost/outline',\n ],\n [\n 'success|ghost',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'success|outline',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'warning|ghost',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n [\n 'warning|outline',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n]);\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [\n IconComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n ],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.in-group]': 'inGroup',\n '[class.full-width]': 'fullWidth()',\n // Styling hooks: the inner <button> classes are unreachable from a host rule.\n '[attr.data-variant]': 'variant()',\n '[attr.data-color]': 'color()',\n '[class.with-message]': 'hasMessageRow()',\n '[class.align-between]': \"align() === 'between'\",\n },\n})\nexport class ButtonComponent extends DsMessageBase {\n // `DS_CONFIG.field.reserveMessage` must not give a button an empty message line; `[reserveMessage]` still works.\n protected override readonly reserveFollowsFieldDefault = false;\n\n protected readonly inGroup = inFieldGroup();\n\n /** Brand/status hue family. */\n readonly color = input<ButtonColor>('primary');\n /** Fill pattern. Every color×variant pair renders; the discouraged ones dev-warn with the\n * reason. Prefer the global `.link` class over `text` unless the ds-button API is needed. */\n readonly variant = input<ButtonVariant>('solid');\n /** Where the contents sit once the button is wider than them (`fullWidth`, a stretching grid\n * cell). `'between'` pushes the label and a trailing icon to opposite edges. */\n readonly align = input<ButtonAlign>('center');\n /** Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with\n * `routerLinkActive`, so middle-click, open-in-new-tab and the \"link\" role work.\n * Accepts a `UrlTree` as well as a path or command array. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Plain `href` target, used when `routerLink` is not set (external address, download).\n * Renders an `<a href>`. */\n readonly href = input<string>('');\n /** Hash to append to a `routerLink` destination. routerLink-only: on an `href` put it in the\n * URL; on a plain button it is ignored with a dev warning. */\n readonly fragment = input<string | undefined>(undefined);\n /** Query parameters for a `routerLink` destination. routerLink-only. */\n readonly queryParams = input<Params | null | undefined>(undefined);\n /** How the destination's query merges with the current one. routerLink-only. */\n readonly queryParamsHandling = input<QueryParamsHandling | null | undefined>(\n undefined,\n );\n /** Browsing context for the link (`'_blank'`, ...). Ignored with a dev warning on a plain button. */\n readonly target = input<string | undefined>(undefined);\n /** `rel` for the link; pair with `target=\"_blank\"` (`noopener` blocks `window.opener` access). */\n readonly rel = input<string | undefined>(undefined);\n /** How `routerLinkActive` decides the `active` class; prefix by default. It also bounds the\n * announcement: with `{ exact: true }` a prefix match announces nothing rather than `true`.\n * Pass `ariaCurrent` alongside to keep one. */\n readonly routerLinkActiveOptions = input<\n { exact: boolean } | IsActiveMatchOptions\n >({ exact: false });\n /** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match\n * `true`; `null` announces nothing; use `step` or `location` when the link is not a page. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Native `type`; defaults to `'button'` so it never submits an ancestor form. Button-only:\n * ignored on a link, with a dev warning. */\n readonly type = input<ButtonType>('button');\n /** Disables the button and blocks `pressed`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Busy state: blocks `pressed` and sets `aria-busy` and `aria-disabled`, keeping the button\n * focusable so focus stays on it while the work runs. Button-only; ignored on an anchor with a\n * dev warning. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Fills the container: the host becomes block-level and 100% wide. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */\n readonly ariaLabel = input<string | null>(null);\n /** Icon before the projected content. */\n readonly icon = input<IconName | null>(null);\n /** Icon after the projected content. */\n readonly trailingIcon = input<IconName | null>(null);\n /** `aria-haspopup` on the inner <button>; set when this button triggers an overlay. */\n readonly ariaHasPopup = input<\n 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null\n >(null);\n /** `aria-expanded` on the inner <button>; bind to the overlay's open state. */\n readonly ariaExpanded = input<boolean | null>(null);\n /** `aria-controls` on the inner <button>: the id of the panel this button opens. */\n readonly ariaControls = input<string | null>(null);\n /** Why the button is refused, shown as its second line and read only while `disabled`. Setting\n * it uses `aria-disabled` instead of the native attribute (a native disabled button cannot be\n * focused, so the reason would go unannounced) and swallows the click; a link-button keeps its\n * Tab stop the same way. Uncapped: the text wraps. */\n readonly disabledReason = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** `aria-describedby` pointing at a description the app renders itself. Merged with the id\n * of `disabledReason` when both are present. */\n readonly ariaDescribedBy = input<string | null>(null);\n /** Fires on click unless `disabled` or `loading`. */\n readonly pressed = output<MouseEvent>();\n\n /** The inner control, for an overlay to position against and restore focus to. */\n readonly controlRef = viewChild.required<ElementRef<HTMLElement>>('btn');\n\n protected readonly destination = dsDestination(this.routerLink, this.href);\n protected readonly linkModifiers = computed<DsLinkModifiers>(() => ({\n fragment: this.fragment(),\n queryParams: this.queryParams(),\n queryParamsHandling: this.queryParamsHandling(),\n }));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.linkModifiers,\n this.ariaCurrent,\n );\n\n protected readonly classes = computed(() => {\n const color = this.color();\n const variant = this.variant();\n const parts = [\n 'button',\n color === 'primary' ? '' : `color-${color}`,\n variant === 'solid' ? '' : `variant-${variant}`,\n this.sizeResolved(),\n this.loading() ? 'loading' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly softDisabled = computed(\n () => this.disabled() && this.disabledReason().length > 0,\n );\n\n private readonly uid = nextControlId('ds-button');\n protected readonly reasonId = `${this.uid}-reason`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n protected readonly describedBy = computed(() => {\n const ids = [\n this.softDisabled() ? this.reasonId : null,\n this.hintId(),\n this.ariaDescribedBy(),\n ].filter(Boolean);\n\n return ids.length ? ids.join(' ') : null;\n });\n\n protected readonly hasMessageRow = computed(\n () => this.message().text.length > 0 || this.reserveMessageResolved(),\n );\n\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: NO_ERRORS,\n invalid: NEVER_INVALID,\n });\n protected readonly message = this.fieldMessage.message;\n\n constructor() {\n super();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const variant = this.variant();\n if (variant === 'text') {\n return '[ds-button] variant=\"text\" is discouraged — prefer the global `.link` class for link-styled actions. It renders, but `.link` is the canonical link affordance.';\n }\n const destination = this.destination();\n if (destination !== 'button') {\n if (this.loading()) {\n return '[ds-button] `loading` is ignored on a link-button — a navigation cannot be in flight before it starts. Remove it, or drop the destination and emit `(pressed)` instead.';\n }\n if (this.type() !== 'button') {\n return `[ds-button] type=\"${this.type()}\" is ignored on a link-button — an anchor has no form to submit. Drop the destination to submit a form.`;\n }\n }\n if (destination !== 'routerLink') {\n const routed = ROUTER_ONLY.find(\n ([name]) => this[name]() !== undefined,\n );\n if (routed) {\n return `[ds-button] \\`${routed[0]}\\` only applies to a \\`routerLink\\` destination${destination === 'href' ? ' — put it in the `href` URL instead' : ''}.`;\n }\n }\n if (destination === 'button' && (this.target() || this.rel())) {\n return '[ds-button] `target` and `rel` need a destination — set `routerLink` or `href`, or drop them.';\n }\n const reason = DISCOURAGED_COMBOS.get(`${this.color()}|${variant}`);\n\n return reason\n ? `[ds-button] color=\"${this.color()}\" variant=\"${variant}\" is a UX-discouraged combination — it renders, but ${reason}.`\n : null;\n });\n }\n }\n\n protected onClick(event: MouseEvent): void {\n // A soft-disabled or loading button is only `aria-disabled`, so the browser still dispatches the\n // click; preventDefault stops an `<a href>` navigating and a `type=\"submit\"` submitting its form.\n if (this.disabled() || this.loading()) {\n event.preventDefault();\n\n return;\n }\n this.pressed.emit(event);\n }\n}\n","<!-- Every branch must keep #btn: `controlRef` is required, so dropping it makes that destination throw.\n `type`, `loading` and native `disabled` are button-only; anchors take `aria-disabled`, and `tabindex=\"-1\"` unless a\n `disabledReason` must stay reachable. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() || loading() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled() && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon [name]=\"name\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the accessible name; aria-describedby still reads it. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAgDA;AACA,MAAM,SAAS,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,UAAU,EAAE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAEhD;AACA,MAAM,WAAW,GAAG;AAClB,IAAA,CAAC,UAAU,CAAC;AACZ,IAAA,CAAC,aAAa,CAAC;AACf,IAAA,CAAC,qBAAqB,CAAC;CACf;AAEV;AACA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,EAAA,WAAA,EAAA,IAAA,EAChB,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,uBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAeP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAvB3B,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP;wBACP,aAAa;wBACb,qBAAqB;wBACrB,gBAAgB;wBAChB,UAAU;wBACV,gBAAgB;qBACjB,EAAA,aAAA,EAGc,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,oBAAoB,EAAE,aAAa;;AAEnC,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,sBAAsB,EAAE,iBAAiB;AACzC,wBAAA,uBAAuB,EAAE,uBAAuB;AACjD,qBAAA,EAAA,QAAA,EAAA,yyGAAA,EAAA,MAAA,EAAA,CAAA,i3YAAA,CAAA,EAAA;yjFA2FiE,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnMzE;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-button.mjs","sources":["../../../src/lib/components/button/button.component.ts","../../../src/lib/components/button/button.component.html","../../../src/lib/components/button/ids-group-ltd-ids-design-system-components-button.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport type {\n IsActiveMatchOptions,\n Params,\n QueryParamsHandling,\n} from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport {\n dsAriaCurrent,\n dsDestination,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n DsAriaCurrent,\n DsLinkModifiers,\n DsRouterLink,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n ButtonAlign,\n ButtonColor,\n ButtonLoadingMode,\n ButtonVariant,\n ButtonType,\n} from './button.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';\nimport {\n resolveFieldMessage,\n trimmedText,\n type DsFieldError,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\n\n// A button has no form control; these stand in for the validation sources `resolveFieldMessage` reads.\nconst NO_ERRORS = signal<readonly DsFieldError[]>([]).asReadonly();\nconst NEVER_INVALID = signal(false).asReadonly();\n\n// Router-only modifiers; a tuple so the warning can name the one that was set.\nconst ROUTER_ONLY = [\n ['fragment'],\n ['queryParams'],\n ['queryParamsHandling'],\n] as const;\n\n// Warned in dev, still rendered: two inputs cannot be narrowed against each other at compile time.\nconst DISCOURAGED_COMBOS = new Map<string, string>([\n [\n 'neutral|solid',\n 'a solid grey button reads as disabled — prefer tonal/ghost/outline',\n ],\n [\n 'success|ghost',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'success|outline',\n 'low-emphasis success rarely warrants an action affordance — prefer solid/tonal',\n ],\n [\n 'warning|ghost',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n [\n 'warning|outline',\n 'yellow at low emphasis is too low-contrast to read — prefer solid/tonal',\n ],\n]);\n\n@Component({\n selector: 'ds-button',\n standalone: true,\n imports: [\n IconComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n RouterLink,\n RouterLinkActive,\n ],\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.in-group]': 'inGroup',\n '[class.full-width]': 'fullWidth()',\n // Styling hooks: the inner <button> classes are unreachable from a host rule.\n '[attr.data-variant]': 'variant()',\n '[attr.data-color]': 'color()',\n '[class.with-message]': 'hasMessageRow()',\n '[class.align-between]': \"align() === 'between'\",\n },\n})\nexport class ButtonComponent extends DsMessageBase {\n // `DS_CONFIG.field.reserveMessage` must not give a button an empty message line; `[reserveMessage]` still works.\n protected override readonly reserveFollowsFieldDefault = false;\n\n protected readonly inGroup = inFieldGroup();\n\n /** Brand/status hue family. */\n readonly color = input<ButtonColor>('primary');\n /** Fill pattern. Every color×variant pair renders; the discouraged ones dev-warn with the\n * reason. Prefer the global `.link` class over `text` unless the ds-button API is needed. */\n readonly variant = input<ButtonVariant>('solid');\n /** Where the contents sit once the button is wider than them (`fullWidth`, a stretching grid\n * cell). `'between'` pushes the label and a trailing icon to opposite edges. */\n readonly align = input<ButtonAlign>('center');\n /** Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with\n * `routerLinkActive`, so middle-click, open-in-new-tab and the \"link\" role work.\n * Accepts a `UrlTree` as well as a path or command array. */\n readonly routerLink = input<DsRouterLink>(null);\n /** Plain `href` target, used when `routerLink` is not set (external address, download).\n * Renders an `<a href>`. */\n readonly href = input<string>('');\n /** Hash to append to a `routerLink` destination. routerLink-only: on an `href` put it in the\n * URL; on a plain button it is ignored with a dev warning. */\n readonly fragment = input<string | undefined>(undefined);\n /** Query parameters for a `routerLink` destination. routerLink-only. */\n readonly queryParams = input<Params | null | undefined>(undefined);\n /** How the destination's query merges with the current one. routerLink-only. */\n readonly queryParamsHandling = input<QueryParamsHandling | null | undefined>(\n undefined,\n );\n /** Browsing context for the link (`'_blank'`, ...). Ignored with a dev warning on a plain button. */\n readonly target = input<string | undefined>(undefined);\n /** `rel` for the link; pair with `target=\"_blank\"` (`noopener` blocks `window.opener` access). */\n readonly rel = input<string | undefined>(undefined);\n /** How `routerLinkActive` decides the `active` class; prefix by default. It also bounds the\n * announcement: with `{ exact: true }` a prefix match announces nothing rather than `true`.\n * Pass `ariaCurrent` alongside to keep one. */\n readonly routerLinkActiveOptions = input<\n { exact: boolean } | IsActiveMatchOptions\n >({ exact: false });\n /** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match\n * `true`; `null` announces nothing; use `step` or `location` when the link is not a page. */\n readonly ariaCurrent = input<DsAriaCurrent | null | undefined>(undefined);\n /** Native `type`; defaults to `'button'` so it never submits an ancestor form. Button-only:\n * ignored on a link, with a dev warning. */\n readonly type = input<ButtonType>('button');\n /** Disables the button and blocks `pressed`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Busy state: blocks `pressed` and sets `aria-busy` and `aria-disabled`, keeping the button\n * focusable so focus stays on it while the work runs. Button-only; ignored on an anchor with a\n * dev warning. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Where the `loading` spinner draws. `'icon'` puts it in the leading icon's box (the trailing\n * icon's when there is no leading one) and keeps the label visible; `'replace'` hides the\n * contents behind one spinner centred on the button; `'auto'` is `'icon'` when `icon` is set,\n * else `'replace'`. Neither moves the label or resizes the button. */\n readonly loadingMode = input<ButtonLoadingMode>('auto');\n /** Fills the container: the host becomes block-level and 100% wide. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Accessible name, forwarded as `aria-label`. For an icon-only or non-descriptive label. */\n readonly ariaLabel = input<string | null>(null);\n /** Icon before the projected content. */\n readonly icon = input<IconName | null>(null);\n /** Icon after the projected content. */\n readonly trailingIcon = input<IconName | null>(null);\n /** `aria-haspopup` on the inner <button>; set when this button triggers an overlay. */\n readonly ariaHasPopup = input<\n 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | null\n >(null);\n /** `aria-expanded` on the inner <button>; bind to the overlay's open state. */\n readonly ariaExpanded = input<boolean | null>(null);\n /** `aria-controls` on the inner <button>: the id of the panel this button opens. */\n readonly ariaControls = input<string | null>(null);\n /** Why the button is refused, shown as its second line and read only while `disabled`. Setting\n * it uses `aria-disabled` instead of the native attribute (a native disabled button cannot be\n * focused, so the reason would go unannounced) and swallows the click; a link-button keeps its\n * Tab stop the same way. Uncapped: the text wraps. */\n readonly disabledReason = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** `aria-describedby` pointing at a description the app renders itself. Merged with the id\n * of `disabledReason` when both are present. */\n readonly ariaDescribedBy = input<string | null>(null);\n /** Fires on click unless `disabled` or `loading`. */\n readonly pressed = output<MouseEvent>();\n\n /** The inner control, for an overlay to position against and restore focus to. */\n readonly controlRef = viewChild.required<ElementRef<HTMLElement>>('btn');\n\n protected readonly destination = dsDestination(this.routerLink, this.href);\n protected readonly linkModifiers = computed<DsLinkModifiers>(() => ({\n fragment: this.fragment(),\n queryParams: this.queryParams(),\n queryParamsHandling: this.queryParamsHandling(),\n }));\n protected readonly ariaCurrentResolved = dsAriaCurrent(\n this.routerLink,\n this.linkModifiers,\n this.ariaCurrent,\n );\n\n protected readonly classes = computed(() => {\n const color = this.color();\n const variant = this.variant();\n const parts = [\n 'button',\n color === 'primary' ? '' : `color-${color}`,\n variant === 'solid' ? '' : `variant-${variant}`,\n this.sizeResolved(),\n this.loading() ? 'loading' : '',\n this.loading() && !this.loadingIconSlot() ? 'loading-replace' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly loadingIconSlot = computed<'leading' | 'trailing' | null>(\n () => {\n const mode = this.loadingMode();\n if (!this.loading() || mode === 'replace') {\n return null;\n }\n if (this.icon()) {\n return 'leading';\n }\n if (mode === 'icon' && this.trailingIcon()) {\n return 'trailing';\n }\n\n return null;\n },\n );\n\n protected readonly softDisabled = computed(\n () => this.disabled() && this.disabledReason().length > 0,\n );\n\n private readonly uid = nextControlId('ds-button');\n protected readonly reasonId = `${this.uid}-reason`;\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n protected readonly describedBy = computed(() => {\n const ids = [\n this.softDisabled() ? this.reasonId : null,\n this.hintId(),\n this.ariaDescribedBy(),\n ].filter(Boolean);\n\n return ids.length ? ids.join(' ') : null;\n });\n\n protected readonly hasMessageRow = computed(\n () => this.message().text.length > 0 || this.reserveMessageResolved(),\n );\n\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: NO_ERRORS,\n invalid: NEVER_INVALID,\n });\n protected readonly message = this.fieldMessage.message;\n\n constructor() {\n super();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const variant = this.variant();\n if (variant === 'text') {\n return '[ds-button] variant=\"text\" is discouraged — prefer the global `.link` class for link-styled actions. It renders, but `.link` is the canonical link affordance.';\n }\n const destination = this.destination();\n if (destination !== 'button') {\n if (this.loading()) {\n return '[ds-button] `loading` is ignored on a link-button — a navigation cannot be in flight before it starts. Remove it, or drop the destination and emit `(pressed)` instead.';\n }\n if (this.type() !== 'button') {\n return `[ds-button] type=\"${this.type()}\" is ignored on a link-button — an anchor has no form to submit. Drop the destination to submit a form.`;\n }\n }\n if (destination !== 'routerLink') {\n const routed = ROUTER_ONLY.find(\n ([name]) => this[name]() !== undefined,\n );\n if (routed) {\n return `[ds-button] \\`${routed[0]}\\` only applies to a \\`routerLink\\` destination${destination === 'href' ? ' — put it in the `href` URL instead' : ''}.`;\n }\n }\n if (destination === 'button' && (this.target() || this.rel())) {\n return '[ds-button] `target` and `rel` need a destination — set `routerLink` or `href`, or drop them.';\n }\n const reason = DISCOURAGED_COMBOS.get(`${this.color()}|${variant}`);\n\n return reason\n ? `[ds-button] color=\"${this.color()}\" variant=\"${variant}\" is a UX-discouraged combination — it renders, but ${reason}.`\n : null;\n });\n }\n }\n\n protected onClick(event: MouseEvent): void {\n // A soft-disabled or loading button is only `aria-disabled`, so the browser still dispatches the\n // click; preventDefault stops an `<a href>` navigating and a `type=\"submit\"` submitting its form.\n if (this.disabled() || this.loading()) {\n event.preventDefault();\n\n return;\n }\n this.pressed.emit(event);\n }\n}\n","<!-- Every branch must keep #btn: `controlRef` is required, so dropping it makes that destination throw.\n `type`, `loading` and native `disabled` are button-only; anchors take `aria-disabled`, and `tabindex=\"-1\"` unless a\n `disabledReason` must stay reachable. -->\n@switch (destination()) {\n @case ('routerLink') {\n <a\n #btn\n routerLinkActive=\"active\"\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.role]=\"disabled() ? 'link' : null\"\n [routerLinkActiveOptions]=\"routerLinkActiveOptions()\"\n [fragment]=\"fragment()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [ariaCurrentWhenActive]=\"ariaCurrentResolved()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @case ('href') {\n <a\n #btn\n [class]=\"classes()\"\n [href]=\"href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"rel()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? (softDisabled() ? 0 : -1) : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n }\n @default {\n <button\n #btn\n [class]=\"classes()\"\n [type]=\"type()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"ariaHasPopup()\"\n [attr.aria-expanded]=\"ariaExpanded()\"\n [attr.aria-controls]=\"ariaControls()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-disabled]=\"softDisabled() || loading() ? 'true' : null\"\n [attr.aria-describedby]=\"describedBy()\"\n [disabled]=\"disabled() && !softDisabled()\"\n (click)=\"onClick($event)\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n }\n}\n\n<ng-template #content>\n <span class=\"button-main\">\n @if (icon(); as name) {\n <ds-icon\n [name]=\"name\"\n [class.loading-spinner]=\"loadingIconSlot() === 'leading'\" />\n }\n\n <ng-content></ng-content>\n\n @if (trailingIcon(); as name) {\n <ds-icon\n [name]=\"name\"\n [class.loading-spinner]=\"loadingIconSlot() === 'trailing'\" />\n }\n </span>\n\n <span class=\"subtext-slot\">\n <ng-content select=\"[dsButtonSubtext]\"></ng-content>\n </span>\n\n @if (softDisabled()) {\n <!-- aria-hidden keeps the reason out of the accessible name; aria-describedby still reads it. -->\n <span\n class=\"reason\"\n aria-hidden=\"true\"\n [id]=\"reasonId\">\n {{ disabledReason() }}\n </span>\n }\n</ng-template>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiDA;AACA,MAAM,SAAS,GAAG,MAAM,CAA0B,EAAE,CAAC,CAAC,UAAU,EAAE;AAClE,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE;AAEhD;AACA,MAAM,WAAW,GAAG;AAClB,IAAA,CAAC,UAAU,CAAC;AACZ,IAAA,CAAC,aAAa,CAAC;AACf,IAAA,CAAC,qBAAqB,CAAC;CACf;AAEV;AACA,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;AACjD,IAAA;QACE,eAAe;QACf,oEAAoE;AACrE,KAAA;AACD,IAAA;QACE,eAAe;QACf,gFAAgF;AACjF,KAAA;AACD,IAAA;QACE,iBAAiB;QACjB,gFAAgF;AACjF,KAAA;AACD,IAAA;QACE,eAAe;QACf,yEAAyE;AAC1E,KAAA;AACD,IAAA;QACE,iBAAiB;QACjB,yEAAyE;AAC1E,KAAA;AACF,CAAA,CAAC;AAyBI,MAAO,eAAgB,SAAQ,aAAa,CAAA;;IAEpB,0BAA0B,GAAG,KAAK;IAE3C,OAAO,GAAG,YAAY,EAAE;;AAGlC,IAAA,KAAK,GAAG,KAAK,CAAc,SAAS,4EAAC;AAC9C;AAC8F;AACrF,IAAA,OAAO,GAAG,KAAK,CAAgB,OAAO,8EAAC;AAChD;AACiF;AACxE,IAAA,KAAK,GAAG,KAAK,CAAc,QAAQ,4EAAC;;AAEpC,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;AACD;;AAE8D;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