@ids-group-ltd/ids-design-system 1.0.3 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +423 -3
- package/agent/INDEX.md +12 -2
- package/agent/feedback/ds-alert.md +3 -2
- package/agent/feedback/ds-attachment.md +12 -0
- package/agent/feedback/ds-chat-attachment.md +10 -0
- package/agent/feedback/ds-chat-message.md +11 -0
- package/agent/feedback/ds-chat-step.md +10 -0
- package/agent/feedback/ds-chat-steps.md +10 -0
- package/agent/feedback/ds-chat-thread.md +11 -0
- package/agent/feedback/ds-timeline-item.md +3 -1
- package/agent/feedback/ds-timeline.md +9 -0
- package/agent/feedback/ds-toast.md +1 -1
- package/agent/feedback/ds-tree.md +3 -1
- package/agent/forms/ds-chat-input.md +16 -0
- package/agent/forms/ds-inline-edit.md +14 -0
- package/agent/foundations/tokens.md +3 -3
- package/agent/navigation/ds-splitter.md +14 -0
- package/agent/platform/toast-service.md +3 -2
- package/agent/tables/ds-table.md +1 -1
- package/components.md +110 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +928 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +107 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +16 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +465 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +74 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +163 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +4 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +182 -24
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +31 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +74 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.2.json +1 -0
- package/migrations/1.0.1.json +4 -0
- package/migrations/1.0.2.json +37 -1
- package/migrations/1.1.0.json +208 -0
- package/migrations/1.1.1.json +190 -0
- package/migrations/README.md +6 -6
- package/package.json +25 -1
- package/schematics/check-overrides/surface.json +199 -6
- package/styles/_dropdown-overlay.scss +11 -6
- package/styles/_field-box.scss +2 -2
- package/styles/_step-marker.scss +51 -0
- package/styles/_tokens.scss +5 -3
- package/themes/README.md +2 -1
- package/themes/_semantic.scss +15 -0
- package/themes/dark/_palette.scss +1 -2
- package/themes/dark/_theme.scss +32 -3
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +377 -0
- package/types/ids-group-ltd-ids-design-system-components-inline-edit.d.ts +43 -0
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +97 -0
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +34 -5
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +53 -4
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +87 -7
- package/types/ids-group-ltd-ids-design-system-components.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +126 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +6 -3
|
@@ -12,7 +12,7 @@ The companion `<ds-toast-region>` lives inside the `ToastService` (see Services)
|
|
|
12
12
|
A toast leaving with focus inside it (its action, its close button, or `ToastRef.dismiss()`) hands focus to the next toast in the region, else back to the element focused before focus entered the region, as a dialog returns it.
|
|
13
13
|
|
|
14
14
|
<!-- inputs:ds-toast -->
|
|
15
|
-
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'loading' = 'info'`, `title: string = ''`, `body: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `action: ToastAction | null = null`
|
|
15
|
+
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'loading' = 'info'`, `title: string = ''`, `body: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `action: ToastAction | null = null`, `occurrences: readonly ToastOccurrence[] = []`
|
|
16
16
|
<!-- /inputs -->
|
|
17
17
|
|
|
18
18
|
---
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Group: Display & feedback
|
|
5
5
|
|
|
6
|
+
Nested rows with one tab stop and arrow-key navigation. `(nodeSelected)` emits the node selected; `(nodeHover)` emits the node under the pointer or newly focused, `null` when the pointer leaves the tree. `<ng-template dsTreeTrailing let-node>` draws at the end of every row (a badge, a count, a small icon button); a click inside it neither selects nor toggles the row, and its controls are tab stops on the focused row only. `<ng-template dsTreeLabel let-node>` replaces the row's label (context `node`, `level`, `selected`, `disabled`): the row grows to its height and it takes the width up to the trailing content, so its lines can cut with an ellipsis; its text is the row's accessible name, so a template that draws no text needs a visually hidden name. `selection="multiple"` binds `[(selectedIds)]`: Shift-click, Ctrl-click, Shift+Space or Ctrl+Space adds or removes a row, a plain click or Enter selects it alone, and the host carries `aria-multiselectable`.
|
|
7
|
+
|
|
6
8
|
<!-- inputs:ds-tree -->
|
|
7
|
-
All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selectedId: string | null = null`
|
|
9
|
+
All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selection: 'single' | 'multiple' = 'single'`, `selectedId: string | null = null`, `selectedIds: string[] = []`
|
|
8
10
|
<!-- /inputs -->
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- GENERATED by tools/split-agent-catalogue.mjs from components.md. Do not edit. -->
|
|
2
|
+
# `<ds-chat-input>` — `ChatInputComponent`
|
|
3
|
+
|
|
4
|
+
Group: Form & input
|
|
5
|
+
|
|
6
|
+
Message box for a chat or an instruction: chips above an auto-growing text area, a bottom bar with actions on the left and the send button on the right. Use it instead of a `ds-textarea` beside icon buttons, or a `ds-search` standing in for a message box.
|
|
7
|
+
Slots: `[attachments]` on the page above the frame (the app's own card for a picked element and its snapshot; hidden while empty), `[chips]` above the text inside the frame (project `ds-tag`s for attachments and picked elements; hidden while empty), `[actions]` on the left of the bar (an attach `ds-icon-button`), `[send]` replaces the default send button (render your own states, e.g. Queue / Stop while `busy`; call `submit()` or read `canSubmit`).
|
|
8
|
+
Keyboard: Enter emits `(submitted): string` with the trimmed text; Shift+Enter breaks the line; an Enter that commits an IME composition never submits; blank text, `busy` and `disabled` never submit. Enter on blank text inserts nothing.
|
|
9
|
+
Send button: a 32px `ds-button` with an arrow, named by `DS_INTL.chatInput.send`, disabled while the text is blank. `busy` puts it in `loading` (spinner, `aria-busy`, press refused, focus kept). `layout: ChatInputLayout = 'status-bar'` places the `busyLabel` step: `'status-bar'` beside the fixed square button, `'status-above'` on a reserved line above the box, `'split'` attach outside left and send outside right with the step above, `'send-outside'` a round 40px send outside right, `'toolbar'` attach, step and send in a row under the box.
|
|
10
|
+
Output: `(filesPasted): File[]` — the image files of a paste; the paste inserts no text when it carries images. The value is NOT cleared on submit: set `value` to `''` once the message is accepted.
|
|
11
|
+
Methods: `submit()`, `focus(options?)`; `canSubmit` signal. Text area name: `ariaLabel`, else `DS_INTL.chatInput.label`.
|
|
12
|
+
Tokens: `--ds-chat-input-bg-color`, `--ds-chat-input-radius`, `--ds-chat-input-padding`; border, hover and focus follow the `--ds-field-*` set.
|
|
13
|
+
|
|
14
|
+
<!-- inputs:ds-chat-input -->
|
|
15
|
+
All inputs: `value: string = ''`, `placeholder: string = ''`, `ariaLabel: string | null = null`, `minRows: number = 1`, `maxRows: number = 8`, `disabled: boolean = false`, `busy: boolean = false`, `stoppable: boolean = false`, `busyLabel: string = ''`, `layout: ChatInputLayout = 'status-bar'`
|
|
16
|
+
<!-- /inputs -->
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- GENERATED by tools/split-agent-catalogue.mjs from components.md. Do not edit. -->
|
|
2
|
+
# `<ds-inline-edit>` — `InlineEditComponent`
|
|
3
|
+
|
|
4
|
+
Group: Form & input
|
|
5
|
+
|
|
6
|
+
Text that turns into a field of the same font and size when clicked, to rename it in place: a chat or document title, a layer, a list name. Put it inside the element that gives the text its role and type, such as a heading; it inherits the font, and the text keeps its place when the field replaces it.
|
|
7
|
+
At rest it is plain text. Hover shows a tinted background behind the text and a pencil at its end; keyboard focus adds the focus ring; the tooltip reads `DS_INTL.inlineEdit.rename` ("Rename"). Long text truncates with an ellipsis.
|
|
8
|
+
Keyboard: the text is a button, so Enter, Space, a click or F2 edits, with the text selected. Enter or leaving the field saves; Escape cancels (and does not reach a dialog around it). Enter and Escape return focus to the text. A blank or unchanged value saves nothing.
|
|
9
|
+
Value: `value: model<string>` two-way; `(saved): string` emits the trimmed new value after a save that changed it, and `DS_INTL.inlineEdit.saved` ("Saved") is announced. Inputs: `placeholder` (shown muted while empty), `maxLength`, `disabled` (plain text, no affordance), `ariaLabel` (what the text is, e.g. "Chat title"; the text is announced as "Chat title: <value>"). Method: `edit()`.
|
|
10
|
+
Tokens: `--ds-inline-edit-padding`, `--ds-inline-edit-hover-bg-color`, `--ds-inline-edit-border-color`, `--ds-inline-edit-radius`.
|
|
11
|
+
|
|
12
|
+
<!-- inputs:ds-inline-edit -->
|
|
13
|
+
All inputs: `value: string = ''`, `placeholder: string = ''`, `maxLength: number | null = null`, `disabled: boolean = false`, `ariaLabel: string | null = null`
|
|
14
|
+
<!-- /inputs -->
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
Loaded via `@use 'styles/tokens';` (when the consumer also `@use 'styles/ds';` the full aggregate is pulled in). Brand themes override Tier 1 palette + a few Tier 2 roles in their own `_brand-*.scss`.
|
|
5
5
|
|
|
6
6
|
**Colour roles:**
|
|
7
|
-
- Surfaces: `--surface-canvas`, `--surface-default`, `--surface-secondary`, `--surface-overlay`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
|
|
8
|
-
- Borders: `--border-default`, `--border-strong`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
|
|
9
|
-
- Text: `--text-primary`, `--text-secondary`, `--text-tertiary`, `--text-muted`, `--text-disabled`, `--text-inverted`, `--text-link`, `--text-link-visited`, `--text-on-primary`, `--text-on-success`, `--text-on-error`
|
|
7
|
+
- Surfaces: `--surface-canvas`, `--surface-default`, `--surface-secondary`, `--surface-overlay`, `--surface-overlay-secondary`, `--surface-overlay-muted`, `--surface-overlay-raised`, `--surface-overlay-raised-secondary`, `--surface-overlay-raised-muted`, `--surface-overlay-tint`, `--surface-overlay-raised-tint`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
|
|
8
|
+
- Borders: `--border-default`, `--border-strong`, `--border-field`, `--border-field-hover`, `--border-overlay`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
|
|
9
|
+
- Text: `--text-primary`, `--text-secondary`, `--text-tertiary`, `--text-tertiary-overlay`, `--text-muted`, `--text-disabled`, `--text-inverted`, `--text-link`, `--text-link-visited`, `--text-on-primary`, `--text-on-success`, `--text-on-error`
|
|
10
10
|
- Icons: `--icon-default`, `--icon-strong`, `--icon-muted`, `--icon-on-primary`
|
|
11
11
|
- Primary (main brand fill): `--primary`, `--primary-hover`, `--primary-pressed`, `--primary-selected-hover`, `--primary-strong`, `--primary-subtle`, `--primary-muted`, `--primary-muted-strong`, `--primary-on` + HSL channels `--primary-h/s/l`
|
|
12
12
|
- Secondary (paired CTAs, accent rails, opt-in variants): `--secondary`, `--secondary-hover`, `--secondary-pressed`, `--secondary-strong`, `--secondary-subtle`, `--secondary-muted`, `--secondary-on` + HSL channels `--secondary-h/s/l`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- GENERATED by tools/split-agent-catalogue.mjs from components.md. Do not edit. -->
|
|
2
|
+
# `<ds-splitter>` — `SplitterComponent`
|
|
3
|
+
|
|
4
|
+
Group: Layout & navigation
|
|
5
|
+
|
|
6
|
+
Two panes with a handle between them that resizes one of them: a preview beside a chat, a list beside a detail, an editor above its output. Slots: `[start]` and `[end]`. `orientation="horizontal"` (default) lays them side by side, `"vertical"` stacks them. `pane` (`'start'` default, or `'end'`) is the pane `size` measures; the other takes the rest. Give the splitter a size: it fills the box its parent gives it.
|
|
7
|
+
Size: `size: model<number | null>` in px, `null` shows `defaultSize` (320); `min` (160) and `max` (640) bound it inclusively, and the pane never takes more than the splitter less the handle. A drag writes `size` once, on release; each key press writes it. `persistKey` saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over the bound `size`.
|
|
8
|
+
Handle: `role="separator"`, focusable, `aria-valuenow` / `aria-valuemin` / `aria-valuemax` in px, `aria-controls` the measured pane. Name it with `ariaLabel` (what it resizes, e.g. "Preview width"); unset falls back to `DS_INTL.splitter.label`. Keyboard: arrows along the axis move it by 16px, with Shift or PageUp / PageDown by 64px, Home / End to `min` / `max`. A double click returns to `defaultSize`. The left button only; the handle stays under the pointer, and while it is dragged the whole page keeps the resize cursor and selects no text. At a limit the cursor shows the one direction still possible. Dragged past `min` or `max` the handle follows with growing resistance (up to 100px, at most a third of the pane it squashes), its line thickening on the same curve up to `--ds-splitter-overdrag-line-scale` times its width (default `3`), and springs back on release; `overdrag: 'elastic' | 'none' = 'elastic'`, off under `prefers-reduced-motion: reduce`.
|
|
9
|
+
Look: at rest a three-dot grip in the gap, no line; hover and drag swap it for a neutral line (stronger while dragging), keyboard focus for a line in `--focus-ring-color`. The handle fills the gap between the panes: for two rounded panels with space between them, set `--ds-splitter-gap` to that space.
|
|
10
|
+
Tokens: `--ds-splitter-gap`, `--ds-splitter-line-color`, `--ds-splitter-drag-color`, `--ds-splitter-grip-color`, `--ds-splitter-overdrag-line-scale` (a number: how many times the line widens at the full pull).
|
|
11
|
+
|
|
12
|
+
<!-- inputs:ds-splitter -->
|
|
13
|
+
All inputs: `orientation: 'horizontal' | 'vertical' = 'horizontal'`, `pane: 'start' | 'end' = 'start'`, `size: number | null = null`, `defaultSize: number = 320`, `min: number = 160`, `max: number = 640`, `persistKey: string = ''`, `ariaLabel: string | null = null`, `overdrag: 'elastic' | 'none' = 'elastic'`
|
|
14
|
+
<!-- /inputs -->
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
Section: Services
|
|
5
5
|
|
|
6
6
|
`@Injectable({ providedIn: 'root' })`. Inject and call:
|
|
7
|
-
- `show(opts: ToastOptions): ToastRef` — `{ title?, body, variant?: 'info' | 'success' | 'warning' | 'error' | 'loading', dismissible?, icon?, action?: ToastAction, durationMs? = 5000 }`. Returns `{ id, dismiss() }
|
|
8
|
-
- `promise<T>(source: Promise<T>, messages: ToastPromiseMessages): Promise<T>` — shows a `loading` toast, then patches it in place to `success` or `error` when `source` settles. Returns `source` itself, so an un-`catch`ed call still produces an unhandled rejection. The settled toast dismisses after a hard-coded 4s (success) or 6s (error), counted from the moment it becomes visible and not overridable; `dismissAll()` cancels it like any other.
|
|
7
|
+
- `show(opts: ToastOptions): ToastRef` — `{ title?, body, variant?: 'info' | 'success' | 'warning' | 'error' | 'loading', dismissible?, icon?, action?: ToastAction, durationMs? = 5000, groupKey? }`. Returns `{ id, dismiss(), update(patch) }`: `update` takes a `ToastUpdate` (`title`, `body`, `variant`, `durationMs`, `dismissible`) and changes the toast in place while it is on screen or queued, and does nothing once it is gone; it is announced only when `variant` turns `success` or `error`, `durationMs` restarts the countdown, and a toast leaving `loading` without one counts down 5000 ms. `durationMs: 0` (and any negative) means it never auto-dismisses, and it is counted from the moment the toast becomes VISIBLE, not from the call — a toast queued behind `maxVisible` keeps its full time on screen. A `loading` toast is forced to 0 and discards a supplied `durationMs`.
|
|
8
|
+
- `promise<T>(source: Promise<T>, messages: ToastPromiseMessages): Promise<T>` — shows a `loading` toast, then patches it in place to `success` or `error` when `source` settles. Returns `source` itself, so an un-`catch`ed call still produces an unhandled rejection. The settled toast dismisses after a hard-coded 4s (success) or 6s (error), counted from the moment it becomes visible and not overridable; `dismissAll()` cancels it like any other. A toast closed before `source` settles stays closed and its outcome is not announced.
|
|
9
9
|
- `dismissAll(): void`
|
|
10
10
|
|
|
11
11
|
Defaults come from `provideDsConfig({ toast: … })`:
|
|
12
12
|
- `maxVisible?: number` — cap on concurrently visible toasts. Default `5`; `0` means unlimited. Extras queue and appear as earlier ones dismiss.
|
|
13
13
|
- `position?: { horizontalPosition?: 'left' | 'center' | 'right', verticalPosition?: 'top' | 'bottom', offset?: string }` — merged field by field over `right` / `top` / `var(--space-6)`, so naming one key keeps the other two.
|
|
14
|
+
- `groupDuplicates?: boolean` — fold a `show()` whose `variant`, `title` and `body` match a visible or queued toast into it as a `×N` stack (or, with `groupKey`, any call with the same key), restarting its countdown. The stack lists each occurrence with its time under "Show all"; its close, and the `ToastRef` every folded call returns, dismiss the whole stack. Loading and `promise()` toasts never fold. Default `false`.
|
|
14
15
|
- `mirrorDevWarnings?: boolean` — in dev mode, every library warning that reaches the console also shows as a `warning` toast titled "Dev warning" for 10s, once per message, from the moment the app first injects `ToastService` (warnings raised before that show then, up to 50). Default `true`; never in a production build, and an app that never injects `ToastService` gets the console only.
|
|
15
16
|
|
|
16
17
|
The `toast` section resolves **once, at the root injector**, when the service is first used — unlike every other section, which a `Route` or a component can narrow. `ToastService` is `providedIn: 'root'`, so a route-level `provideDsConfig` never reaches it, and the position cannot change after the first `show()`.
|
package/agent/tables/ds-table.md
CHANGED
|
@@ -13,7 +13,7 @@ Cell templates: `<ng-template dsCellTemplate="<colKey>" [dsCellTemplateOf]="rows
|
|
|
13
13
|
Content slots: `[empty]` (rendered when `data.length === 0`), `[bulk-actions]` (rendered in the bulk action bar when `selectable && some selected`)
|
|
14
14
|
Loading modes: `'skeleton'` replaces rows with `ds-skeleton` shimmer placeholders; `'overlay'` keeps existing rows visible behind a translucent layer with a centred spinner; under `'skeleton'` the footer pager takes `loading` as well - its controls disable and its range label is masked, so it never quotes the previous query's count. `'overlay'` leaves the pager live, like the header.
|
|
15
15
|
Footer pager: `pageSizeOptions`, `showPageSize`, `showLabel`, `paginationSize: DsSize | null = null` and `paginationLayout: PaginationLayout | null = null` are the embedded `ds-pagination`'s own inputs forwarded one-to-one; the last two unset resolve `DS_CONFIG.pagination.size` (then `DS_CONFIG.control.size`, then `sm`) and `DS_CONFIG.pagination.layout` (then `'grouped'`), so an app whose every pager wants `md` / `spread` says it once in the config. A paged table with no rows announces its empty state's text (`[empty]` or `emptyTemplate`); with none it announces `rangeAnnouncement(0, 0, 0)`, `Showing 0 of 0` by default.
|
|
16
|
-
Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--radius-md)`, `--ds-table-bg-color`, `--ds-table-head-text-color: var(--text-secondary)`, `--ds-table-head-bg-color: var(--surface-secondary)`, `--ds-table-head-font-size: var(--font-size-xs)`, `--ds-table-row-hover-bg-color`, `--ds-table-row-selected-bg-color`, `--ds-table-divider`, `--ds-table-sort-active-icon-color`, `--ds-table-cell-padding-x/y`, `--ds-table-utility-column-width` (the column the column picker and the row-actions ⋮ ride in; default `--space-6`, the buttons' own size, so the column is as wide as its padding makes it) and `--ds-table-utility-column-padding-x` (one length for both sides; default the cell padding chain), `--ds-table-footer-padding-y` / `-top` / `-bottom` (the pagination footer's block padding; default `--space-3`). (Renamed 2026-06: `--ds-table-header-*` → `--ds-table-head-*`, matching the tokens reference.)
|
|
16
|
+
Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--radius-md)`, `--ds-table-bg-color`, `--ds-table-head-text-color: var(--text-secondary)`, `--ds-table-head-bg-color: var(--surface-secondary)`, `--ds-table-head-font-size: var(--font-size-xs)`, `--ds-table-row-hover-bg-color`, `--ds-table-row-selected-bg-color`, `--ds-table-divider`, `--ds-table-sort-active-icon-color`, `--ds-table-resize-line-color: var(--text-tertiary)` (the column resize line at rest), `--ds-table-cell-padding-x/y`, `--ds-table-utility-column-width` (the column the column picker and the row-actions ⋮ ride in; default `--space-6`, the buttons' own size, so the column is as wide as its padding makes it) and `--ds-table-utility-column-padding-x` (one length for both sides; default the cell padding chain), `--ds-table-footer-padding-y` / `-top` / `-bottom` (the pagination footer's block padding; default `--space-3`). (Renamed 2026-06: `--ds-table-header-*` → `--ds-table-head-*`, matching the tokens reference.)
|
|
17
17
|
|
|
18
18
|
<!-- inputs:ds-table -->
|
|
19
19
|
All inputs: `data: required readonly T[]`, `rowId: ((row: T) => string) | null = null`, `columns: required readonly TableColumn<T>[]`, `selectable: boolean = false`, `bordered: boolean | null = null`, `loading: boolean | 'skeleton' | 'overlay' = false`, `stickyHeader: boolean = true`, `printAllRows: boolean = false`, `printHeading: string | null = null`, `printHeadingNote: string | null = null`, `maxHeight: string | null = null`, `density: 'default' | 'compact' = 'default'`, `zebra: boolean = false`, `animateHeight: boolean = false`, `selectedIds: Set<string>`, `sortKey: string | null = null`, `sortDirection: 'asc' | 'desc' = null`, `sortingOrder: SortDirection[]`, `sortAnnouncement: ((label: string, dir: SortDirection) => string) | null = null`, `rangeAnnouncement: ((first: number, last: number, total: number) => string) | null = null`, `skeletonRows: number = 5`, `caption: string = ''`, `rowInteractive: boolean = false`, `activeRowId: string | null = null`, `filterQuery: string = ''`, `columnFilters: Map<string, ReadonlySet<string>>`, `persistLayout: boolean = false`, `storageKey: string = ''`, `stickyScrollbar: boolean | null = null`, `pageSize: number | null = null`, `page: number = 1`, `pageSizeOptions: number[]`, `showPageSize: boolean = true`, `showLabel: boolean = true`, `paginationSize: 'sm' | 'md' | 'lg' = null`, `paginationLayout: 'grouped' | 'spread' = null`, `total: number | null = null`, `scrollToTopOnPageChange: boolean = false`, `sortMode: 'client' | 'server' | 'none' = null`, `filterMode: 'client' | 'server' | 'none' = null`, `columnFilterOptions: ReadonlyMap<string, readonly string[]>`, `stickyScrollbarOffset: string | null = null`, `layout: 'fixed' | 'auto' = null`, `stickyFirstColumn: boolean = false`, `virtualScroll: boolean = false`, `virtualRowSize: number = 44`, `lazy: boolean = false`, `rowActions: readonly TableRowAction<T>[] = []`, `cellTemplateMap: Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>> = {}`, `emptyTemplate: TemplateRef<unknown> | null = null`, `expandableRows: boolean = false`, `expandedIds: Set<string>`, `expandMode: 'multiple' | 'single' = 'multiple'`, `expandAllToggle: boolean = false`, `rowExpandTemplate: TemplateRef<{
|
package/components.md
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
Loaded via `@use 'styles/tokens';` (when the consumer also `@use 'styles/ds';` the full aggregate is pulled in). Brand themes override Tier 1 palette + a few Tier 2 roles in their own `_brand-*.scss`.
|
|
32
32
|
|
|
33
33
|
**Colour roles:**
|
|
34
|
-
- Surfaces: `--surface-canvas`, `--surface-default`, `--surface-secondary`, `--surface-overlay`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
|
|
35
|
-
- Borders: `--border-default`, `--border-strong`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
|
|
36
|
-
- Text: `--text-primary`, `--text-secondary`, `--text-tertiary`, `--text-muted`, `--text-disabled`, `--text-inverted`, `--text-link`, `--text-link-visited`, `--text-on-primary`, `--text-on-success`, `--text-on-error`
|
|
34
|
+
- Surfaces: `--surface-canvas`, `--surface-default`, `--surface-secondary`, `--surface-overlay`, `--surface-overlay-secondary`, `--surface-overlay-muted`, `--surface-overlay-raised`, `--surface-overlay-raised-secondary`, `--surface-overlay-raised-muted`, `--surface-overlay-tint`, `--surface-overlay-raised-tint`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
|
|
35
|
+
- Borders: `--border-default`, `--border-strong`, `--border-field`, `--border-field-hover`, `--border-overlay`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
|
|
36
|
+
- Text: `--text-primary`, `--text-secondary`, `--text-tertiary`, `--text-tertiary-overlay`, `--text-muted`, `--text-disabled`, `--text-inverted`, `--text-link`, `--text-link-visited`, `--text-on-primary`, `--text-on-success`, `--text-on-error`
|
|
37
37
|
- Icons: `--icon-default`, `--icon-strong`, `--icon-muted`, `--icon-on-primary`
|
|
38
38
|
- Primary (main brand fill): `--primary`, `--primary-hover`, `--primary-pressed`, `--primary-selected-hover`, `--primary-strong`, `--primary-subtle`, `--primary-muted`, `--primary-muted-strong`, `--primary-on` + HSL channels `--primary-h/s/l`
|
|
39
39
|
- Secondary (paired CTAs, accent rails, opt-in variants): `--secondary`, `--secondary-hover`, `--secondary-pressed`, `--secondary-strong`, `--secondary-subtle`, `--secondary-muted`, `--secondary-on` + HSL channels `--secondary-h/s/l`
|
|
@@ -188,6 +188,17 @@ Tokens: `--ds-icon-button-bg-color`, `--ds-icon-button-icon-color`, `--ds-icon-b
|
|
|
188
188
|
All inputs: `icon: required IconName`, `ariaLabel: required string`, `ariaDescribedBy: string | null = null`, `variant: 'standard' | 'filled' | 'tonal' | 'outlined' = 'standard'`, `color: ButtonColor = 'primary'`, `size: 'sm' | 'md' | 'lg' = null`, `type: 'button' | 'submit' | 'reset' = 'button'`, `disabled: boolean = false`, `selected: boolean | null = null`, `ariaHasPopup: 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' = null`, `ariaExpanded: boolean | null = null`, `ariaControls: string | null = null`
|
|
189
189
|
<!-- /inputs -->
|
|
190
190
|
|
|
191
|
+
#### `<ds-inline-edit>` — `InlineEditComponent`
|
|
192
|
+
Text that turns into a field of the same font and size when clicked, to rename it in place: a chat or document title, a layer, a list name. Put it inside the element that gives the text its role and type, such as a heading; it inherits the font, and the text keeps its place when the field replaces it.
|
|
193
|
+
At rest it is plain text. Hover shows a tinted background behind the text and a pencil at its end; keyboard focus adds the focus ring; the tooltip reads `DS_INTL.inlineEdit.rename` ("Rename"). Long text truncates with an ellipsis.
|
|
194
|
+
Keyboard: the text is a button, so Enter, Space, a click or F2 edits, with the text selected. Enter or leaving the field saves; Escape cancels (and does not reach a dialog around it). Enter and Escape return focus to the text. A blank or unchanged value saves nothing.
|
|
195
|
+
Value: `value: model<string>` two-way; `(saved): string` emits the trimmed new value after a save that changed it, and `DS_INTL.inlineEdit.saved` ("Saved") is announced. Inputs: `placeholder` (shown muted while empty), `maxLength`, `disabled` (plain text, no affordance), `ariaLabel` (what the text is, e.g. "Chat title"; the text is announced as "Chat title: <value>"). Method: `edit()`.
|
|
196
|
+
Tokens: `--ds-inline-edit-padding`, `--ds-inline-edit-hover-bg-color`, `--ds-inline-edit-border-color`, `--ds-inline-edit-radius`.
|
|
197
|
+
|
|
198
|
+
<!-- inputs:ds-inline-edit -->
|
|
199
|
+
All inputs: `value: string = ''`, `placeholder: string = ''`, `maxLength: number | null = null`, `disabled: boolean = false`, `ariaLabel: string | null = null`
|
|
200
|
+
<!-- /inputs -->
|
|
201
|
+
|
|
191
202
|
#### `<ds-input>` — `InputComponent`
|
|
192
203
|
Inputs: `value: model<string>`, `type: InputType = 'text'` (`'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search'`), `size: 'sm' | 'md' | 'lg' = 'md'`, `label: string = ''`, `hint: string = ''`, `placeholder: string = ''`, `disabled: boolean = false`, `invalid: boolean = false`, `required: boolean = false`, `optional: boolean = false`, `name: string | null = null`, `clearable: boolean | null = null` (inline clear (×) button; `null` resolves to `true` for `type="search"` and `false` otherwise)
|
|
193
204
|
Content slots — addon attributes apply to any child element:
|
|
@@ -230,6 +241,19 @@ Methods: `focus(options?)`, `selectionStart` / `selectionEnd` (reads), `setSelec
|
|
|
230
241
|
All inputs: `hint: string = ''`, `error: string = ''`, `warning: string = ''`, `reserveMessage: boolean | null = null`, `messageIcon: IconName | false | null = null`, `errors: readonly DsFieldError[] = []`, `invalid: boolean = false`, `touched: boolean = false`, `pending: boolean = false`, `dirty: boolean = false`, `showDirty: boolean | null = null`, `hidden: boolean = false`, `value: string = ''`, `size: 'sm' | 'md' | 'lg' = null`, `label: string = ''`, `placeholder: string = ''`, `disabled: boolean = false`, `readOnly: boolean = false`, `readonly: boolean = false`, `success: string = ''`, `required: boolean = false`, `optional: boolean = false`, `rows: number = 3`, `name: string | null = null`, `autosize: boolean = false`, `minRows: number | null = null`, `maxRows: number | null = null`, `resize: 'none' | 'vertical' | 'horizontal' | 'both' = 'vertical'`, `ariaLabel: string | null = null`, `maxLength: number | null = null`, `maxLengthMode: 'hard' | 'soft' = 'hard'`, `countTrimmed: boolean = false`, `minLength: number | null = null`, `pattern: readonly RegExp[] = []`
|
|
231
242
|
<!-- /inputs -->
|
|
232
243
|
|
|
244
|
+
#### `<ds-chat-input>` — `ChatInputComponent`
|
|
245
|
+
Message box for a chat or an instruction: chips above an auto-growing text area, a bottom bar with actions on the left and the send button on the right. Use it instead of a `ds-textarea` beside icon buttons, or a `ds-search` standing in for a message box.
|
|
246
|
+
Slots: `[attachments]` on the page above the frame (the app's own card for a picked element and its snapshot; hidden while empty), `[chips]` above the text inside the frame (project `ds-tag`s for attachments and picked elements; hidden while empty), `[actions]` on the left of the bar (an attach `ds-icon-button`), `[send]` replaces the default send button (render your own states, e.g. Queue / Stop while `busy`; call `submit()` or read `canSubmit`).
|
|
247
|
+
Keyboard: Enter emits `(submitted): string` with the trimmed text; Shift+Enter breaks the line; an Enter that commits an IME composition never submits; blank text, `busy` and `disabled` never submit. Enter on blank text inserts nothing.
|
|
248
|
+
Send button: a 32px `ds-button` with an arrow, named by `DS_INTL.chatInput.send`, disabled while the text is blank. `busy` puts it in `loading` (spinner, `aria-busy`, press refused, focus kept). `layout: ChatInputLayout = 'status-bar'` places the `busyLabel` step: `'status-bar'` beside the fixed square button, `'status-above'` on a reserved line above the box, `'split'` attach outside left and send outside right with the step above, `'send-outside'` a round 40px send outside right, `'toolbar'` attach, step and send in a row under the box.
|
|
249
|
+
Output: `(filesPasted): File[]` — the image files of a paste; the paste inserts no text when it carries images. The value is NOT cleared on submit: set `value` to `''` once the message is accepted.
|
|
250
|
+
Methods: `submit()`, `focus(options?)`; `canSubmit` signal. Text area name: `ariaLabel`, else `DS_INTL.chatInput.label`.
|
|
251
|
+
Tokens: `--ds-chat-input-bg-color`, `--ds-chat-input-radius`, `--ds-chat-input-padding`; border, hover and focus follow the `--ds-field-*` set.
|
|
252
|
+
|
|
253
|
+
<!-- inputs:ds-chat-input -->
|
|
254
|
+
All inputs: `value: string = ''`, `placeholder: string = ''`, `ariaLabel: string | null = null`, `minRows: number = 1`, `maxRows: number = 8`, `disabled: boolean = false`, `busy: boolean = false`, `stoppable: boolean = false`, `busyLabel: string = ''`, `layout: ChatInputLayout = 'status-bar'`
|
|
255
|
+
<!-- /inputs -->
|
|
256
|
+
|
|
233
257
|
#### `<ds-number-stepper>` — `NumberStepperComponent`
|
|
234
258
|
Spinbox for bounded quantities — −/+ buttons around a numeric value.
|
|
235
259
|
Inputs: `value: model<number> = 0`, `min: number = 0`, `max: number | null = null`, `step: number = 1`, `size: 'sm' | 'md' | 'lg' = 'md'`, `disabled: boolean = false`
|
|
@@ -436,6 +460,15 @@ Input: `status: DsStatusKey` (same consumer-registered vocabulary as `ds-badge`;
|
|
|
436
460
|
All inputs: `status: DsStatusKey`, `ariaLabel: string | null = null`
|
|
437
461
|
<!-- /inputs -->
|
|
438
462
|
|
|
463
|
+
#### `<ds-attachment>` — `AttachmentComponent`
|
|
464
|
+
A file attached to a message, for the `[chips]` slot of `<ds-chat-input>`: a 24px type tile (PDF, DOC, IMG, FILE) or an image preview, the file name in bold and a muted second line.
|
|
465
|
+
Inputs: `name: required string`, `meta: string = ''` (e.g. `'PDF · 240 KB'`), `kind: AttachmentKind = 'file'` (`'pdf' | 'doc' | 'image' | 'file'`), `previewUrl: string | null = null` (used when `kind` is `'image'`), `removable: boolean = false`. Output: `(removed): void`.
|
|
466
|
+
Accessibility: the remove button is named `DS_INTL.attachment.remove(name)` ("Remove Brief.pdf"), the kind ("PDF document") is announced before `meta`, an image preview takes `name` as alt text.
|
|
467
|
+
|
|
468
|
+
<!-- inputs:ds-attachment -->
|
|
469
|
+
All inputs: `name: required string`, `meta: string = ''`, `kind: 'pdf' | 'doc' | 'image' | 'file' = 'file'`, `previewUrl: string | null = null`, `removable: boolean = false`
|
|
470
|
+
<!-- /inputs -->
|
|
471
|
+
|
|
439
472
|
#### `<ds-tag>` — `TagComponent`
|
|
440
473
|
Inputs: `variant: 'solid' | 'neutral' = 'solid'`, `closable: boolean = false`
|
|
441
474
|
Output: `(closed): void` — emits when the close button is pressed
|
|
@@ -519,14 +552,15 @@ All inputs: `variant: BannerVariant = 'info'`, `title: string = ''`, `dismissibl
|
|
|
519
552
|
|
|
520
553
|
#### `<ds-alert>` — `AlertComponent`
|
|
521
554
|
Inline message, `ds-banner`'s smaller twin — same anatomy, sized for placement inside a form or a card rather than across a page.
|
|
522
|
-
Inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'neutral' = 'info'`, `title: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null` (variant-derived default)
|
|
555
|
+
Inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'neutral' = 'info'`, `title: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null` (variant-derived default), `fullWidth: boolean = false` (fills the container; unset, the alert hugs its content)
|
|
523
556
|
Output: `(closed): void`
|
|
524
557
|
Content slots: default (body text), `[actions]` (trailing CTAs)
|
|
525
558
|
- `announce` follows `DS_CONFIG.alert.announce` with the same two dev warnings as `ds-banner`, prefixed `[ds-alert]`.
|
|
526
559
|
- Dismissing moves focus as `ds-banner` does: to the next control after the alert, else the one before it.
|
|
560
|
+
- The icon centres on the first line: the title, else the first line of the message.
|
|
527
561
|
|
|
528
562
|
<!-- inputs:ds-alert -->
|
|
529
|
-
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'neutral' = 'info'`, `title: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `announce: boolean | null = null`
|
|
563
|
+
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'neutral' = 'info'`, `title: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `fullWidth: boolean = false`, `announce: boolean | null = null`
|
|
530
564
|
<!-- /inputs -->
|
|
531
565
|
|
|
532
566
|
#### `<ds-toast>` — `ToastComponent`
|
|
@@ -539,7 +573,7 @@ The companion `<ds-toast-region>` lives inside the `ToastService` (see Services)
|
|
|
539
573
|
A toast leaving with focus inside it (its action, its close button, or `ToastRef.dismiss()`) hands focus to the next toast in the region, else back to the element focused before focus entered the region, as a dialog returns it.
|
|
540
574
|
|
|
541
575
|
<!-- inputs:ds-toast -->
|
|
542
|
-
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'loading' = 'info'`, `title: string = ''`, `body: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `action: ToastAction | null = null`
|
|
576
|
+
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'loading' = 'info'`, `title: string = ''`, `body: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `action: ToastAction | null = null`, `occurrences: readonly ToastOccurrence[] = []`
|
|
543
577
|
<!-- /inputs -->
|
|
544
578
|
|
|
545
579
|
---
|
|
@@ -564,10 +598,61 @@ Tokens: `--ds-loading-overlay-radius` (default `0`) rounds the scrim's corners;
|
|
|
564
598
|
All inputs: `loading: boolean = false`, `label: string = ''`, `blur: boolean = true`, `spinnerSize: 'sm' | 'md' | 'lg' = 'md'`, `insetTop: string = '0'`, `inertContent: boolean = true`
|
|
565
599
|
<!-- /inputs -->
|
|
566
600
|
|
|
601
|
+
#### `<ds-timeline>` — `TimelineComponent`
|
|
602
|
+
|
|
603
|
+
The list that holds `ds-timeline-item`s, at any depth: it marks the first and last item so the connector stops at both ends. For an agent's steps beside a chat message use `ds-chat-steps`.
|
|
604
|
+
|
|
605
|
+
<!-- inputs:ds-timeline -->
|
|
606
|
+
<!-- /inputs -->
|
|
607
|
+
|
|
567
608
|
#### `<ds-timeline-item>` — `TimelineItemComponent`
|
|
568
609
|
|
|
610
|
+
Slots: default content below the heading; `[trailing]` at the end of the heading row (Undo, Stop, Retry); `[details]` behind a chevron toggle (down while closed, up while open), closed by default, open state two-way as `expanded`; it opens with a height transition, and an open item sits on a tinted card behind its marker, text and details (`--ds-timeline-open-bg-color`, default `--surface-secondary`). `status` draws the marker and is spoken before the heading; while set, `icon` and `tone` are ignored. Place items inside `<ds-timeline>`, at any depth: it marks the last item, which draws no connector. A `pending` step draws a dashed ring and muted text (a planned step not reached yet).
|
|
611
|
+
|
|
569
612
|
<!-- inputs:ds-timeline-item -->
|
|
570
|
-
All inputs: `heading: string = ''`, `time: string = ''`, `icon: IconName | null = null`, `tone: TimelineTone = 'default'`
|
|
613
|
+
All inputs: `heading: string = ''`, `time: string = ''`, `icon: IconName | null = null`, `tone: TimelineTone = 'default'`, `status: 'done' | 'running' | 'pending' | 'error' = null`, `expanded: boolean = false`
|
|
614
|
+
<!-- /inputs -->
|
|
615
|
+
|
|
616
|
+
#### `<ds-chat-message>` — `ChatMessageComponent`
|
|
617
|
+
|
|
618
|
+
One message of a chat: `role: ChatMessageRole = 'assistant'` puts a filled bubble on the right (`'user'`), a subtle one on the left (`'assistant'`), or a centred notice from the app (`'system'`, spoken as `DS_INTL.chat.system`, `'Notice'`). A notice's `tone: ChatMessageTone = 'neutral'` follows its meaning: `'neutral'` is a quiet one-line plaque for a routine note (saved, switched, started), `'info'` / `'success'` / `'warning'` / `'error'` a card in that status colour with its icon for a note the reader should not miss; `title` adds a bold first line for a note with a detail under it; `icon` sets the icon (a neutral plaque shows one only when given). `author` shows above the bubble; `time` (already formatted) under it, in a thread only under the last message of a run, and not while `streaming`; `sentAt: Date | string | number | null` lets a thread split runs by time; without `author` the role is spoken (`DS_INTL.chat.user` / `assistant`). Slots: default (the text, or the markdown your app renders; a user message keeps its line breaks), `[steps]` above the bubble, on the thread's surface (a `ds-chat-steps` of the agent's steps; a message with only steps draws no bubble), `[attachments]` under the text (`ds-chat-attachment` for something to open, `ds-tag` for a plain file), `[actions]` under the bubble (copy, retry), shown on hover or focus and always without hover. Text is selectable and long words and URLs wrap. The window, tabs, composer and question cards around it stay in the app. `streaming` marks a reply still arriving (caret after the text, `aria-busy`, `[actions]` hidden; the thread reads it when it completes). `status: ChatMessageStatus | null` is the delivery of a sent message, under it in place of the time: `'sending'` (dimmed), `'failed'` with a Retry button emitting `(retry)`; `'sent'` shows nothing and is only spoken; the app resends and sets `status` back. `stepsFolded` (two-way) folds the `[steps]` into a chip at the top of the bubble with the step count and the failed count; the chip toggles them (`aria-expanded`), and stays once shown. Steps are counted from their `ds-chat-step`s; a step that fails while folded opens the steps again.
|
|
619
|
+
Tokens: `--ds-chat-message-max-width` (default `85%`), `--ds-chat-message-radius`, `--ds-chat-message-padding`, `--ds-chat-message-user-bg-color` / `-user-color`, `--ds-chat-message-assistant-bg-color` / `-assistant-color`, `--ds-chat-message-system-color` (default `--text-secondary`) / `-system-bg-color` (`--surface-secondary`) / `-system-border-color` (`--border-default`) for the neutral plaque.
|
|
620
|
+
|
|
621
|
+
<!-- inputs:ds-chat-message -->
|
|
622
|
+
All inputs: `role: 'user' | 'assistant' | 'system' = 'assistant'`, `tone: 'neutral' | 'info' | 'success' | 'warning' | 'error' = 'neutral'`, `title: string = ''`, `icon: IconName | null = null`, `author: string = ''`, `time: string = ''`, `sentAt: Date | string | number | null = null`, `streaming: boolean = false`, `status: 'sending' | 'sent' | 'failed' = null`, `stepsFolded: boolean = false`
|
|
623
|
+
<!-- /inputs -->
|
|
624
|
+
|
|
625
|
+
#### `<ds-chat-thread>` — `ChatThreadComponent`
|
|
626
|
+
|
|
627
|
+
Scrollable list of `ds-chat-message`s; give it a height (or `flex: 1` in a column). Stays at the newest message as messages arrive or grow; once the reader scrolls up it stays put and shows a jump button with the count of messages that arrived below (`DS_INTL.chat.newMessages(count)`, `latest` when none). A message with `role="user"` arriving scrolls back down. Consecutive messages of one role sit at `--ds-chat-thread-group-gap`, speakers apart at `--ds-chat-thread-gap`; only the last message of a run takes the tight bottom corner on the speaker's side (`--ds-radius-inner`), the messages above it stay round. With `sentAt` on the messages, a gap of `timeBreakMinutes` (default `15`) or more starts a new run under a centred divider (`DS_INTL.chat.today` / `yesterday` or the date, then the time, in `DsConfig.locale`); the first dated message gets one too. `working` shows a spinner row with `workingLabel` (else `DS_INTL.chat.working`) at the end; never put a time estimate in it. Screen readers: the list is not a live region; the thread announces a finished assistant reply once (when it arrives while not `working`, or when `working` clears) and the working label, and never the messages present at first render. Older messages: set `hasOlder` and scrolling near the start emits `(loadOlder)` once until the list changes; prepend them and the thread keeps the message in view in place; `loadingOlder` shows a spinner over the top. A user message that arrives folds the steps of the replies before it, except a reply with a failed step the reader has not opened (`foldStepsOnSend`, default `true`); messages and steps that arrive later grow in while a pinned thread keeps its bottom still. Something laid over the bottom of the thread, such as attachments floating above the composer, sets `--ds-chat-thread-inset-bottom` to its height (default `0px`): the last message scrolls clear of it and the jump button sits above it. Method: `scrollToEnd()`.
|
|
628
|
+
Tokens: `--ds-chat-thread-gap`, `--ds-chat-thread-group-gap`, `--ds-chat-thread-padding`, `--ds-chat-thread-inset-bottom`.
|
|
629
|
+
|
|
630
|
+
<!-- inputs:ds-chat-thread -->
|
|
631
|
+
All inputs: `working: boolean = false`, `workingLabel: string = ''`, `ariaLabel: string | null = null`, `foldStepsOnSend: boolean = true`, `timeBreakMinutes: number = 15`, `hasOlder: boolean = false`, `loadingOlder: boolean = false`
|
|
632
|
+
<!-- /inputs -->
|
|
633
|
+
|
|
634
|
+
#### `<ds-chat-attachment>` — `ChatAttachmentComponent`
|
|
635
|
+
|
|
636
|
+
Chip in a message's `[attachments]` slot (`label` required, `source` muted after it, `icon` default `paperclip`). Open, it becomes a card on a line of its own: the same header row, then its default slot framed in a preview (such as a snapshot of a picked element as it was when sent), scrolling past `--ds-chat-attachment-preview-max-height` (default `16rem`). `expanded` binds the open state two-way; the header button carries `aria-expanded` and `aria-controls`. Tokens: `--ds-chat-attachment-bg-color`, `--ds-chat-attachment-preview-bg-color`, `--ds-chat-attachment-preview-max-height`.
|
|
637
|
+
|
|
638
|
+
<!-- inputs:ds-chat-attachment -->
|
|
639
|
+
All inputs: `label: required string`, `source: string = ''`, `icon: IconName | null = 'paperclip'`, `expanded: boolean = false`
|
|
640
|
+
<!-- /inputs -->
|
|
641
|
+
|
|
642
|
+
#### `<ds-chat-steps>` — `ChatStepsComponent`
|
|
643
|
+
|
|
644
|
+
The steps of an agent's work, in the `[steps]` slot of a `ds-chat-message`: `ds-chat-step`s in order, at any depth, with 16px markers, the smaller text size and 4px rows with no connector. Import from `@ids-group-ltd/ids-design-system/components/chat` with the rest of the chat family. `enter: ChatStepsEnter = 'together'` brings steps that arrive at once (a plan given up front) into a message as one block, or `'stagger'` one after another; steps that arrive one at a time grow in either way.
|
|
645
|
+
|
|
646
|
+
<!-- inputs:ds-chat-steps -->
|
|
647
|
+
All inputs: `enter: 'together' | 'stagger' = 'together'`, `minRunningMs: number = 600`, `revealStaggerMs: number = 300`
|
|
648
|
+
<!-- /inputs -->
|
|
649
|
+
|
|
650
|
+
#### `<ds-chat-step>` — `ChatStepComponent`
|
|
651
|
+
|
|
652
|
+
One step: `heading`, optional `time`, and `status: ChatStepStatus | null` (`'done' | 'running' | 'pending' | 'waiting' | 'error'`), which draws the marker (a check, a spinner, a dashed ring with muted text, a grey disc with a pause glyph, a cross) and is spoken before the heading (`DS_INTL.chat.stepDone`, `stepRunning`, `stepPending`, `stepWaiting` "Waiting for your approval", `stepFailed`). Slots: default content under the heading (the reader's answer buttons on a `waiting` step), with the marker beside the heading's first line; `[trailing]` at the end of the heading row (Stop, Retry); `[details]` behind a chevron toggle (`DS_INTL.chat.stepDetails(heading)`), closed by default, open state two-way as `expanded`; it opens with a height transition on a tinted card. A failed step the reader has not opened keeps its message's steps unfolded.
|
|
653
|
+
|
|
654
|
+
<!-- inputs:ds-chat-step -->
|
|
655
|
+
All inputs: `heading: string = ''`, `time: string = ''`, `status: 'done' | 'running' | 'pending' | 'waiting' | 'error' = null`, `expanded: boolean = false`
|
|
571
656
|
<!-- /inputs -->
|
|
572
657
|
|
|
573
658
|
#### `<ds-toast-region>` — `ToastRegionComponent`
|
|
@@ -578,8 +663,10 @@ All inputs: `maxVisible: number`, `showQueueCount: boolean = true`
|
|
|
578
663
|
|
|
579
664
|
#### `<ds-tree>` — `TreeComponent`
|
|
580
665
|
|
|
666
|
+
Nested rows with one tab stop and arrow-key navigation. `(nodeSelected)` emits the node selected; `(nodeHover)` emits the node under the pointer or newly focused, `null` when the pointer leaves the tree. `<ng-template dsTreeTrailing let-node>` draws at the end of every row (a badge, a count, a small icon button); a click inside it neither selects nor toggles the row, and its controls are tab stops on the focused row only. `<ng-template dsTreeLabel let-node>` replaces the row's label (context `node`, `level`, `selected`, `disabled`): the row grows to its height and it takes the width up to the trailing content, so its lines can cut with an ellipsis; its text is the row's accessible name, so a template that draws no text needs a visually hidden name. `selection="multiple"` binds `[(selectedIds)]`: Shift-click, Ctrl-click, Shift+Space or Ctrl+Space adds or removes a row, a plain click or Enter selects it alone, and the host carries `aria-multiselectable`.
|
|
667
|
+
|
|
581
668
|
<!-- inputs:ds-tree -->
|
|
582
|
-
All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selectedId: string | null = null`
|
|
669
|
+
All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selection: 'single' | 'multiple' = 'single'`, `selectedId: string | null = null`, `selectedIds: string[] = []`
|
|
583
670
|
<!-- /inputs -->
|
|
584
671
|
|
|
585
672
|
#### `<ds-description-list>` — `DescriptionListComponent`
|
|
@@ -734,6 +821,17 @@ All inputs: `gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' = null`, `align: 'st
|
|
|
734
821
|
All inputs: `gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' = null`, `align: 'start' | 'center' | 'end' | 'stretch' = null`
|
|
735
822
|
<!-- /inputs -->
|
|
736
823
|
|
|
824
|
+
#### `<ds-splitter>` — `SplitterComponent`
|
|
825
|
+
Two panes with a handle between them that resizes one of them: a preview beside a chat, a list beside a detail, an editor above its output. Slots: `[start]` and `[end]`. `orientation="horizontal"` (default) lays them side by side, `"vertical"` stacks them. `pane` (`'start'` default, or `'end'`) is the pane `size` measures; the other takes the rest. Give the splitter a size: it fills the box its parent gives it.
|
|
826
|
+
Size: `size: model<number | null>` in px, `null` shows `defaultSize` (320); `min` (160) and `max` (640) bound it inclusively, and the pane never takes more than the splitter less the handle. A drag writes `size` once, on release; each key press writes it. `persistKey` saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over the bound `size`.
|
|
827
|
+
Handle: `role="separator"`, focusable, `aria-valuenow` / `aria-valuemin` / `aria-valuemax` in px, `aria-controls` the measured pane. Name it with `ariaLabel` (what it resizes, e.g. "Preview width"); unset falls back to `DS_INTL.splitter.label`. Keyboard: arrows along the axis move it by 16px, with Shift or PageUp / PageDown by 64px, Home / End to `min` / `max`. A double click returns to `defaultSize`. The left button only; the handle stays under the pointer, and while it is dragged the whole page keeps the resize cursor and selects no text. At a limit the cursor shows the one direction still possible. Dragged past `min` or `max` the handle follows with growing resistance (up to 100px, at most a third of the pane it squashes), its line thickening on the same curve up to `--ds-splitter-overdrag-line-scale` times its width (default `3`), and springs back on release; `overdrag: 'elastic' | 'none' = 'elastic'`, off under `prefers-reduced-motion: reduce`.
|
|
828
|
+
Look: at rest a three-dot grip in the gap, no line; hover and drag swap it for a neutral line (stronger while dragging), keyboard focus for a line in `--focus-ring-color`. The handle fills the gap between the panes: for two rounded panels with space between them, set `--ds-splitter-gap` to that space.
|
|
829
|
+
Tokens: `--ds-splitter-gap`, `--ds-splitter-line-color`, `--ds-splitter-drag-color`, `--ds-splitter-grip-color`, `--ds-splitter-overdrag-line-scale` (a number: how many times the line widens at the full pull).
|
|
830
|
+
|
|
831
|
+
<!-- inputs:ds-splitter -->
|
|
832
|
+
All inputs: `orientation: 'horizontal' | 'vertical' = 'horizontal'`, `pane: 'start' | 'end' = 'start'`, `size: number | null = null`, `defaultSize: number = 320`, `min: number = 160`, `max: number = 640`, `persistKey: string = ''`, `ariaLabel: string | null = null`, `overdrag: 'elastic' | 'none' = 'elastic'`
|
|
833
|
+
<!-- /inputs -->
|
|
834
|
+
|
|
737
835
|
#### `<ds-sidenav-footer>` — `SidenavFooterComponent`
|
|
738
836
|
|
|
739
837
|
<!-- inputs:ds-sidenav-footer -->
|
|
@@ -907,7 +1005,7 @@ Cell templates: `<ng-template dsCellTemplate="<colKey>" [dsCellTemplateOf]="rows
|
|
|
907
1005
|
Content slots: `[empty]` (rendered when `data.length === 0`), `[bulk-actions]` (rendered in the bulk action bar when `selectable && some selected`)
|
|
908
1006
|
Loading modes: `'skeleton'` replaces rows with `ds-skeleton` shimmer placeholders; `'overlay'` keeps existing rows visible behind a translucent layer with a centred spinner; under `'skeleton'` the footer pager takes `loading` as well - its controls disable and its range label is masked, so it never quotes the previous query's count. `'overlay'` leaves the pager live, like the header.
|
|
909
1007
|
Footer pager: `pageSizeOptions`, `showPageSize`, `showLabel`, `paginationSize: DsSize | null = null` and `paginationLayout: PaginationLayout | null = null` are the embedded `ds-pagination`'s own inputs forwarded one-to-one; the last two unset resolve `DS_CONFIG.pagination.size` (then `DS_CONFIG.control.size`, then `sm`) and `DS_CONFIG.pagination.layout` (then `'grouped'`), so an app whose every pager wants `md` / `spread` says it once in the config. A paged table with no rows announces its empty state's text (`[empty]` or `emptyTemplate`); with none it announces `rangeAnnouncement(0, 0, 0)`, `Showing 0 of 0` by default.
|
|
910
|
-
Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--radius-md)`, `--ds-table-bg-color`, `--ds-table-head-text-color: var(--text-secondary)`, `--ds-table-head-bg-color: var(--surface-secondary)`, `--ds-table-head-font-size: var(--font-size-xs)`, `--ds-table-row-hover-bg-color`, `--ds-table-row-selected-bg-color`, `--ds-table-divider`, `--ds-table-sort-active-icon-color`, `--ds-table-cell-padding-x/y`, `--ds-table-utility-column-width` (the column the column picker and the row-actions ⋮ ride in; default `--space-6`, the buttons' own size, so the column is as wide as its padding makes it) and `--ds-table-utility-column-padding-x` (one length for both sides; default the cell padding chain), `--ds-table-footer-padding-y` / `-top` / `-bottom` (the pagination footer's block padding; default `--space-3`). (Renamed 2026-06: `--ds-table-header-*` → `--ds-table-head-*`, matching the tokens reference.)
|
|
1008
|
+
Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--radius-md)`, `--ds-table-bg-color`, `--ds-table-head-text-color: var(--text-secondary)`, `--ds-table-head-bg-color: var(--surface-secondary)`, `--ds-table-head-font-size: var(--font-size-xs)`, `--ds-table-row-hover-bg-color`, `--ds-table-row-selected-bg-color`, `--ds-table-divider`, `--ds-table-sort-active-icon-color`, `--ds-table-resize-line-color: var(--text-tertiary)` (the column resize line at rest), `--ds-table-cell-padding-x/y`, `--ds-table-utility-column-width` (the column the column picker and the row-actions ⋮ ride in; default `--space-6`, the buttons' own size, so the column is as wide as its padding makes it) and `--ds-table-utility-column-padding-x` (one length for both sides; default the cell padding chain), `--ds-table-footer-padding-y` / `-top` / `-bottom` (the pagination footer's block padding; default `--space-3`). (Renamed 2026-06: `--ds-table-header-*` → `--ds-table-head-*`, matching the tokens reference.)
|
|
911
1009
|
|
|
912
1010
|
<!-- inputs:ds-table -->
|
|
913
1011
|
All inputs: `data: required readonly T[]`, `rowId: ((row: T) => string) | null = null`, `columns: required readonly TableColumn<T>[]`, `selectable: boolean = false`, `bordered: boolean | null = null`, `loading: boolean | 'skeleton' | 'overlay' = false`, `stickyHeader: boolean = true`, `printAllRows: boolean = false`, `printHeading: string | null = null`, `printHeadingNote: string | null = null`, `maxHeight: string | null = null`, `density: 'default' | 'compact' = 'default'`, `zebra: boolean = false`, `animateHeight: boolean = false`, `selectedIds: Set<string>`, `sortKey: string | null = null`, `sortDirection: 'asc' | 'desc' = null`, `sortingOrder: SortDirection[]`, `sortAnnouncement: ((label: string, dir: SortDirection) => string) | null = null`, `rangeAnnouncement: ((first: number, last: number, total: number) => string) | null = null`, `skeletonRows: number = 5`, `caption: string = ''`, `rowInteractive: boolean = false`, `activeRowId: string | null = null`, `filterQuery: string = ''`, `columnFilters: Map<string, ReadonlySet<string>>`, `persistLayout: boolean = false`, `storageKey: string = ''`, `stickyScrollbar: boolean | null = null`, `pageSize: number | null = null`, `page: number = 1`, `pageSizeOptions: number[]`, `showPageSize: boolean = true`, `showLabel: boolean = true`, `paginationSize: 'sm' | 'md' | 'lg' = null`, `paginationLayout: 'grouped' | 'spread' = null`, `total: number | null = null`, `scrollToTopOnPageChange: boolean = false`, `sortMode: 'client' | 'server' | 'none' = null`, `filterMode: 'client' | 'server' | 'none' = null`, `columnFilterOptions: ReadonlyMap<string, readonly string[]>`, `stickyScrollbarOffset: string | null = null`, `layout: 'fixed' | 'auto' = null`, `stickyFirstColumn: boolean = false`, `virtualScroll: boolean = false`, `virtualRowSize: number = 44`, `lazy: boolean = false`, `rowActions: readonly TableRowAction<T>[] = []`, `cellTemplateMap: Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>> = {}`, `emptyTemplate: TemplateRef<unknown> | null = null`, `expandableRows: boolean = false`, `expandedIds: Set<string>`, `expandMode: 'multiple' | 'single' = 'multiple'`, `expandAllToggle: boolean = false`, `rowExpandTemplate: TemplateRef<{
|
|
@@ -1332,13 +1430,14 @@ this.crumbs.clear();
|
|
|
1332
1430
|
|
|
1333
1431
|
#### `ToastService`
|
|
1334
1432
|
`@Injectable({ providedIn: 'root' })`. Inject and call:
|
|
1335
|
-
- `show(opts: ToastOptions): ToastRef` — `{ title?, body, variant?: 'info' | 'success' | 'warning' | 'error' | 'loading', dismissible?, icon?, action?: ToastAction, durationMs? = 5000 }`. Returns `{ id, dismiss() }
|
|
1336
|
-
- `promise<T>(source: Promise<T>, messages: ToastPromiseMessages): Promise<T>` — shows a `loading` toast, then patches it in place to `success` or `error` when `source` settles. Returns `source` itself, so an un-`catch`ed call still produces an unhandled rejection. The settled toast dismisses after a hard-coded 4s (success) or 6s (error), counted from the moment it becomes visible and not overridable; `dismissAll()` cancels it like any other.
|
|
1433
|
+
- `show(opts: ToastOptions): ToastRef` — `{ title?, body, variant?: 'info' | 'success' | 'warning' | 'error' | 'loading', dismissible?, icon?, action?: ToastAction, durationMs? = 5000, groupKey? }`. Returns `{ id, dismiss(), update(patch) }`: `update` takes a `ToastUpdate` (`title`, `body`, `variant`, `durationMs`, `dismissible`) and changes the toast in place while it is on screen or queued, and does nothing once it is gone; it is announced only when `variant` turns `success` or `error`, `durationMs` restarts the countdown, and a toast leaving `loading` without one counts down 5000 ms. `durationMs: 0` (and any negative) means it never auto-dismisses, and it is counted from the moment the toast becomes VISIBLE, not from the call — a toast queued behind `maxVisible` keeps its full time on screen. A `loading` toast is forced to 0 and discards a supplied `durationMs`.
|
|
1434
|
+
- `promise<T>(source: Promise<T>, messages: ToastPromiseMessages): Promise<T>` — shows a `loading` toast, then patches it in place to `success` or `error` when `source` settles. Returns `source` itself, so an un-`catch`ed call still produces an unhandled rejection. The settled toast dismisses after a hard-coded 4s (success) or 6s (error), counted from the moment it becomes visible and not overridable; `dismissAll()` cancels it like any other. A toast closed before `source` settles stays closed and its outcome is not announced.
|
|
1337
1435
|
- `dismissAll(): void`
|
|
1338
1436
|
|
|
1339
1437
|
Defaults come from `provideDsConfig({ toast: … })`:
|
|
1340
1438
|
- `maxVisible?: number` — cap on concurrently visible toasts. Default `5`; `0` means unlimited. Extras queue and appear as earlier ones dismiss.
|
|
1341
1439
|
- `position?: { horizontalPosition?: 'left' | 'center' | 'right', verticalPosition?: 'top' | 'bottom', offset?: string }` — merged field by field over `right` / `top` / `var(--space-6)`, so naming one key keeps the other two.
|
|
1440
|
+
- `groupDuplicates?: boolean` — fold a `show()` whose `variant`, `title` and `body` match a visible or queued toast into it as a `×N` stack (or, with `groupKey`, any call with the same key), restarting its countdown. The stack lists each occurrence with its time under "Show all"; its close, and the `ToastRef` every folded call returns, dismiss the whole stack. Loading and `promise()` toasts never fold. Default `false`.
|
|
1342
1441
|
- `mirrorDevWarnings?: boolean` — in dev mode, every library warning that reaches the console also shows as a `warning` toast titled "Dev warning" for 10s, once per message, from the moment the app first injects `ToastService` (warnings raised before that show then, up to 50). Default `true`; never in a production build, and an app that never injects `ToastService` gets the console only.
|
|
1343
1442
|
|
|
1344
1443
|
The `toast` section resolves **once, at the root injector**, when the service is first used — unlike every other section, which a `Route` or a component can narrow. `ToastService` is `providedIn: 'root'`, so a route-level `provideDsConfig` never reaches it, and the position cannot change after the first `show()`.
|
|
@@ -14,6 +14,8 @@ class AlertComponent {
|
|
|
14
14
|
dismissible = input(false, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
15
15
|
/** Override the variant's default icon. */
|
|
16
16
|
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
17
|
+
/** Fills the container instead of hugging its content. */
|
|
18
|
+
fullWidth = input(false, { ...(ngDevMode ? { debugName: "fullWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
17
19
|
/** Fires when the user dismisses the alert. */
|
|
18
20
|
closed = output();
|
|
19
21
|
/** Announce this alert to a screen reader when it appears. Unset follows
|
|
@@ -64,12 +66,12 @@ class AlertComponent {
|
|
|
64
66
|
this.closed.emit();
|
|
65
67
|
}
|
|
66
68
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AlertComponent, isStandalone: true, selector: "ds-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, announce: { classPropertyName: "announce", publicName: "announce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.title": "null", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div\n #alert\n [class]=\"classes()\">\n <ds-icon\n
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AlertComponent, isStandalone: true, selector: "ds-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, announce: { classPropertyName: "announce", publicName: "announce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.title": "null", "class.full-width": "fullWidth()", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div\n #alert\n [class]=\"classes()\">\n <span\n class=\"a-lead\"\n [class.titled]=\"title()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\">\n </ds-icon>\n </span>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss(alert)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n</div>\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}:host(.full-width){display:flex;width:100%}:host(.full-width) .alert{flex:1}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-padding-y: var(--ds-alert-padding-y, var(--space-2));--_alert-padding-x: var(--ds-alert-padding-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--ds-radius-control));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-fade-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--ds-motion-enter-surface-duration));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ds-motion-enter-surface-easing));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-padding-y) var(--_alert-padding-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-lead{flex-shrink:0;display:flex;align-items:center;block-size:1lh}.alert .a-lead.titled{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans)}.alert .a-icon{color:inherit}.alert .a-body{flex:1;min-width:0}.alert .a-title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_alert-title-text-color);margin:0 0 var(--space-1)}.alert .a-actions{display:flex;gap:var(--space-2);margin-top:var(--space-2)}.alert .a-actions:empty{display:none}.alert .a-close{display:inline-flex;align-items:center;justify-content:center;padding:var(--space-0-5);border:0;background:none;cursor:pointer}.alert .a-close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.alert .a-close{position:relative}.alert .a-close:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.alert .a-close:focus-visible{outline-style:none}.alert .a-close:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.alert .a-close{color:var(--_alert-close-icon-color);flex-shrink:0}.alert .a-close:hover{color:var(--_alert-close-icon-color-hover)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
68
70
|
}
|
|
69
71
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertComponent, decorators: [{
|
|
70
72
|
type: Component,
|
|
71
|
-
args: [{ selector: 'ds-alert', standalone: true, imports: [IconComponent], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "<div\n #alert\n [class]=\"classes()\">\n <ds-icon\n
|
|
72
|
-
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], announce: [{ type: i0.Input, args: [{ isSignal: true, alias: "announce", required: false }] }], ariaRole: [{
|
|
73
|
+
args: [{ selector: 'ds-alert', standalone: true, imports: [IconComponent], host: { '[attr.title]': 'null', '[class.full-width]': 'fullWidth()' }, encapsulation: ViewEncapsulation.Emulated, template: "<div\n #alert\n [class]=\"classes()\">\n <span\n class=\"a-lead\"\n [class.titled]=\"title()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\">\n </ds-icon>\n </span>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss(alert)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n</div>\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}:host(.full-width){display:flex;width:100%}:host(.full-width) .alert{flex:1}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-padding-y: var(--ds-alert-padding-y, var(--space-2));--_alert-padding-x: var(--ds-alert-padding-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--ds-radius-control));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-fade-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--ds-motion-enter-surface-duration));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ds-motion-enter-surface-easing));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-padding-y) var(--_alert-padding-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-lead{flex-shrink:0;display:flex;align-items:center;block-size:1lh}.alert .a-lead.titled{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans)}.alert .a-icon{color:inherit}.alert .a-body{flex:1;min-width:0}.alert .a-title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_alert-title-text-color);margin:0 0 var(--space-1)}.alert .a-actions{display:flex;gap:var(--space-2);margin-top:var(--space-2)}.alert .a-actions:empty{display:none}.alert .a-close{display:inline-flex;align-items:center;justify-content:center;padding:var(--space-0-5);border:0;background:none;cursor:pointer}.alert .a-close:active:not(:disabled,[disabled],.is-disabled,.disabled,[aria-disabled=true]){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.alert .a-close{position:relative}.alert .a-close:before{content:\"\";position:absolute;top:50%;left:50%;width:max(100%,var(--hit-xs));height:max(100%,var(--hit-xs));translate:-50% -50%;border-radius:inherit}.alert .a-close:focus-visible{outline-style:none}.alert .a-close:focus-visible:before{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(var(--focus-ring-offset) - 2 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.alert .a-close{color:var(--_alert-close-icon-color);flex-shrink:0}.alert .a-close:hover{color:var(--_alert-close-icon-color-hover)}\n"] }]
|
|
74
|
+
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], announce: [{ type: i0.Input, args: [{ isSignal: true, alias: "announce", required: false }] }], ariaRole: [{
|
|
73
75
|
type: HostBinding,
|
|
74
76
|
args: ['attr.role']
|
|
75
77
|
}], ariaLive: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-alert.mjs","sources":["../../../src/lib/components/alert/alert.component.ts","../../../src/lib/components/alert/alert.component.html","../../../src/lib/components/alert/ids-group-ltd-ids-design-system-components-alert.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport {\n DS_INTL,\n resolveWithConfig,\n warnAnnounceOversight,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { moveFocusOutOf } from '@ids-group-ltd/ids-design-system/components';\nimport type { AlertVariant } from './alert.types';\n\n@Component({\n selector: 'ds-alert',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './alert.component.html',\n styleUrl: './alert.component.scss',\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AlertComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Severity: drives colour, the default icon and the ARIA role/live. */\n readonly variant = input<AlertVariant>('info');\n /** Optional bold heading above the message. */\n readonly title = input<string>('');\n /** Show a close button that emits `closed`. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** Override the variant's default icon. */\n readonly icon = input<IconName | null>(null);\n /** Fires when the user dismisses the alert. */\n readonly closed = output<void>();\n\n /** Announce this alert to a screen reader when it appears. Unset follows\n * `DS_CONFIG.alert.announce`, then `false`. */\n readonly announce = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n readonly announceResolved = resolveWithConfig(\n this.announce,\n (config) => config.alert?.announce,\n false,\n );\n\n private readonly liveRole = computed<'alert' | 'status'>(() => {\n const value = this.variant();\n\n return value === 'error' || value === 'warning' ? 'alert' : 'status';\n });\n\n @HostBinding('attr.role')\n protected get ariaRole(): 'alert' | 'status' | null {\n return this.announceResolved() ? this.liveRole() : null;\n }\n\n @HostBinding('attr.aria-live')\n protected get ariaLive(): 'assertive' | 'polite' | null {\n if (!this.announceResolved()) {\n return null;\n }\n\n return this.liveRole() === 'alert' ? 'assertive' : 'polite';\n }\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n warnAnnounceOversight('ds-alert', 'alert', () => ({\n variant: this.variant(),\n title: this.title(),\n assertive: this.liveRole() === 'alert',\n announce: this.announce(),\n }));\n }\n }\n\n protected readonly classes = computed(() => `alert ${this.variant()}`);\n\n protected readonly defaultIcon = computed<IconName>(() => {\n const variant = this.variant();\n if (variant === 'success') {\n return 'success';\n }\n if (variant === 'warning') {\n return 'warn';\n }\n if (variant === 'error') {\n return 'error';\n }\n\n return 'info';\n });\n\n protected readonly resolvedIcon = computed<IconName>(\n () => this.icon() ?? this.defaultIcon(),\n );\n\n // The host app removes the element on `closed`, taking the focused close button with it.\n protected onDismiss(leaving: HTMLElement): void {\n moveFocusOutOf(leaving, leaving.ownerDocument.body);\n this.closed.emit();\n }\n}\n","<div\n #alert\n [class]=\"classes()\">\n <ds-icon\n
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-alert.mjs","sources":["../../../src/lib/components/alert/alert.component.ts","../../../src/lib/components/alert/alert.component.html","../../../src/lib/components/alert/ids-group-ltd-ids-design-system-components-alert.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport {\n DS_INTL,\n resolveWithConfig,\n warnAnnounceOversight,\n} from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { moveFocusOutOf } from '@ids-group-ltd/ids-design-system/components';\nimport type { AlertVariant } from './alert.types';\n\n@Component({\n selector: 'ds-alert',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './alert.component.html',\n styleUrl: './alert.component.scss',\n host: { '[attr.title]': 'null', '[class.full-width]': 'fullWidth()' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AlertComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Severity: drives colour, the default icon and the ARIA role/live. */\n readonly variant = input<AlertVariant>('info');\n /** Optional bold heading above the message. */\n readonly title = input<string>('');\n /** Show a close button that emits `closed`. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** Override the variant's default icon. */\n readonly icon = input<IconName | null>(null);\n /** Fills the container instead of hugging its content. */\n readonly fullWidth = input(false, { transform: booleanAttribute });\n /** Fires when the user dismisses the alert. */\n readonly closed = output<void>();\n\n /** Announce this alert to a screen reader when it appears. Unset follows\n * `DS_CONFIG.alert.announce`, then `false`. */\n readonly announce = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n readonly announceResolved = resolveWithConfig(\n this.announce,\n (config) => config.alert?.announce,\n false,\n );\n\n private readonly liveRole = computed<'alert' | 'status'>(() => {\n const value = this.variant();\n\n return value === 'error' || value === 'warning' ? 'alert' : 'status';\n });\n\n @HostBinding('attr.role')\n protected get ariaRole(): 'alert' | 'status' | null {\n return this.announceResolved() ? this.liveRole() : null;\n }\n\n @HostBinding('attr.aria-live')\n protected get ariaLive(): 'assertive' | 'polite' | null {\n if (!this.announceResolved()) {\n return null;\n }\n\n return this.liveRole() === 'alert' ? 'assertive' : 'polite';\n }\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n warnAnnounceOversight('ds-alert', 'alert', () => ({\n variant: this.variant(),\n title: this.title(),\n assertive: this.liveRole() === 'alert',\n announce: this.announce(),\n }));\n }\n }\n\n protected readonly classes = computed(() => `alert ${this.variant()}`);\n\n protected readonly defaultIcon = computed<IconName>(() => {\n const variant = this.variant();\n if (variant === 'success') {\n return 'success';\n }\n if (variant === 'warning') {\n return 'warn';\n }\n if (variant === 'error') {\n return 'error';\n }\n\n return 'info';\n });\n\n protected readonly resolvedIcon = computed<IconName>(\n () => this.icon() ?? this.defaultIcon(),\n );\n\n // The host app removes the element on `closed`, taking the focused close button with it.\n protected onDismiss(leaving: HTMLElement): void {\n moveFocusOutOf(leaving, leaving.ownerDocument.body);\n this.closed.emit();\n }\n}\n","<div\n #alert\n [class]=\"classes()\">\n <span\n class=\"a-lead\"\n [class.titled]=\"title()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\">\n </ds-icon>\n </span>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss(alert)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\">\n </ds-icon>\n </button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA6Ba,cAAc,CAAA;AACN,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,OAAO,GAAG,KAAK,CAAe,MAAM,8EAAC;;AAErC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;IAEzB,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAE3D,IAAA,IAAI,GAAG,KAAK,CAAkB,IAAI,2EAAC;;IAEnC,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEzD,MAAM,GAAG,MAAM,EAAQ;AAEhC;AACgD;AACvC,IAAA,QAAQ,GAAG,KAAK,CAA0B,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,CAAA,EACrD,SAAS,EAAE,CAAC,KAAK,MAAM,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC,GACtE;IAEO,gBAAgB,GAAG,iBAAiB,CAC3C,IAAI,CAAC,QAAQ,EACb,CAAC,MAAM,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,EAClC,KAAK,CACN;AAEgB,IAAA,QAAQ,GAAG,QAAQ,CAAqB,MAAK;AAC5D,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE;AAE5B,QAAA,OAAO,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,SAAS,GAAG,OAAO,GAAG,QAAQ;AACtE,IAAA,CAAC,+EAAC;AAEF,IAAA,IACc,QAAQ,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI;IACzD;AAEA,IAAA,IACc,QAAQ,GAAA;AACpB,QAAA,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE;AAC5B,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,OAAO,IAAI,CAAC,QAAQ,EAAE,KAAK,OAAO,GAAG,WAAW,GAAG,QAAQ;IAC7D;AAEA,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,EAAE;YACjD,qBAAqB,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO;AAChD,gBAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;AACvB,gBAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;AACnB,gBAAA,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,OAAO;AACtC,gBAAA,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;AAC1B,aAAA,CAAC,CAAC;QACL;IACF;AAEmB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,MAAA,EAAS,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,8EAAC;AAEnD,IAAA,WAAW,GAAG,QAAQ,CAAW,MAAK;AACvD,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,QAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,YAAA,OAAO,MAAM;QACf;AACA,QAAA,IAAI,OAAO,KAAK,OAAO,EAAE;AACvB,YAAA,OAAO,OAAO;QAChB;AAEA,QAAA,OAAO,MAAM;AACf,IAAA,CAAC,kFAAC;AAEiB,IAAA,YAAY,GAAG,QAAQ,CACxC,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,mFACxC;;AAGS,IAAA,SAAS,CAAC,OAAoB,EAAA;QACtC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;AACnD,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;wGApFW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,WAAA,EAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,MAAA,EAAA,kBAAA,EAAA,aAAA,EAAA,WAAA,EAAA,eAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC7B3B,2xBA0CA,EAAA,MAAA,EAAA,CAAA,4qIAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDnBY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAMZ,cAAc,EAAA,UAAA,EAAA,CAAA;kBAT1B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,cACR,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,QAGlB,EAAE,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,aAAa,EAAE,EAAA,aAAA,EACtD,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,2xBAAA,EAAA,MAAA,EAAA,CAAA,4qIAAA,CAAA,EAAA;;sBAoCxC,WAAW;uBAAC,WAAW;;sBAKvB,WAAW;uBAAC,gBAAgB;;;AEpE/B;;AAEG;;;;"}
|