@ids-group-ltd/ids-design-system 1.1.0 → 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 +175 -0
- package/agent/INDEX.md +1 -1
- package/agent/feedback/ds-alert.md +3 -2
- package/agent/feedback/ds-chat-message.md +3 -3
- package/agent/feedback/ds-chat-step.md +1 -1
- package/agent/feedback/ds-chat-steps.md +1 -1
- package/agent/feedback/ds-chat-thread.md +2 -2
- package/agent/feedback/ds-tree.md +1 -1
- package/agent/forms/ds-chat-input.md +1 -1
- package/agent/foundations/tokens.md +2 -2
- package/components.md +14 -13
- 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 +141 -71
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
- 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-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-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 +116 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -1
- 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-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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.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 +40 -4
- 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 +20 -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 +1 -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 +9 -1
- package/migrations/1.1.0.json +25 -0
- package/migrations/1.1.1.json +190 -0
- package/migrations/README.md +6 -6
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +20 -3
- package/styles/_dropdown-overlay.scss +5 -2
- package/styles/_field-box.scss +2 -2
- package/themes/README.md +1 -1
- package/themes/_semantic.scss +5 -0
- package/themes/dark/_theme.scss +11 -3
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +42 -5
- package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +15 -1
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +39 -3
- package/types/ids-group-ltd-ids-design-system-components.d.ts +8 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,180 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 1.1.1 — 2026-11-08
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`ds-splitter` shades the pane you drag towards, with `dragFog`.** While the handle moves, a fog
|
|
8
|
+
falls on the pane it moves towards, stronger the faster and farther the drag, and turns when the
|
|
9
|
+
hand turns. Past `min` or `max` it rides the rubber band with its pane; it fades when the hand stops
|
|
10
|
+
or lets go, and a splitter at rest paints as before. Off by default and under
|
|
11
|
+
`prefers-reduced-motion: reduce`. Its colour is the new CSS hook `--ds-splitter-fog-color`
|
|
12
|
+
(default `--text-primary` at 22%).
|
|
13
|
+
- **`--surface-overlay-tint`, `--surface-overlay-raised-tint` and `--accent-strong-overlay`, the
|
|
14
|
+
selected-row tint and its text inside an overlay.** In light the two surface tints equal
|
|
15
|
+
`--surface-tint` and `--accent-strong-overlay` equals `--accent-strong`. Under `data-theme="dark"`
|
|
16
|
+
the surface tints mix 30% of `--primary` into the overlay fill:
|
|
17
|
+
`color-mix(in srgb, var(--primary) 30%, var(--surface-overlay))` and the same over
|
|
18
|
+
`--surface-overlay-raised`, and `--accent-strong-overlay` is `hsl(from var(--primary) h 90% 80%)`.
|
|
19
|
+
- **`--border-field` and `--border-field-hover`, the outline of a field.** `--border-field` is
|
|
20
|
+
`--neutral-500` in light and `--neutral-400` under `data-theme="dark"` (`#6B7388` in both), at
|
|
21
|
+
least 3:1 against the page, a card, a modal or drawer and a popover. `--border-field-hover` is one
|
|
22
|
+
step stronger: `--neutral-600` in light, `--neutral-500` on dark.
|
|
23
|
+
- **`ds-tree` draws a row label of your own.** `<ng-template dsTreeLabel let-node>` replaces the
|
|
24
|
+
label of every row, for a label of two lines or one that mixes styles. Its context carries `node`
|
|
25
|
+
(also `$implicit`), `level` (`0` for a root node), `selected` and `disabled`. The row grows to the
|
|
26
|
+
template's height, and the label takes the width between the icon and the trailing content, so an
|
|
27
|
+
element inside it can cut its text with an ellipsis or pair it with `dsTooltipWhenClipped`. The
|
|
28
|
+
text the template renders is the row's accessible name: a template that draws no text needs a
|
|
29
|
+
visually hidden element carrying the name. Without the template a row renders as before. New
|
|
30
|
+
exports `TreeLabelDirective` and `TreeLabelContext`.
|
|
31
|
+
- **Six icons: `mouse-pointer`, `pencil-ruler`, `columns`, `history`, `flask` and `panel-right`.**
|
|
32
|
+
An arrow cursor for picking an element, a pencil and ruler for opening a design, two columns for a
|
|
33
|
+
side-by-side compare, a clock with a back arrow for history and restore, a flask for an
|
|
34
|
+
experimental feature, and a frame with a right panel for showing or hiding a side panel. They
|
|
35
|
+
are drawn from Lucide (ISC) on the 24-unit grid and take the set's stroke.
|
|
36
|
+
- **`ds-chat-input` offers Stop while it is busy.** With `stoppable` set and `busy` on, the default
|
|
37
|
+
send button shows a square inside a turning ring, stays enabled and emits `stopRequested` when
|
|
38
|
+
pressed; its accessible name is the new `DsIntl` key `chatInput.stop` (`'Stop'`). Enter still
|
|
39
|
+
does not submit while busy, and a `disabled` input keeps the spinner. Without `stoppable` the
|
|
40
|
+
busy button renders as before. New icon `stop`.
|
|
41
|
+
- **`ds-chat-thread` keeps room for something laid over its bottom edge.** Set
|
|
42
|
+
`--ds-chat-thread-inset-bottom` to the height of what floats over the thread, such as attachments
|
|
43
|
+
above the composer: the last message scrolls clear of it and the jump button sits above it. The
|
|
44
|
+
default `0px` renders as before.
|
|
45
|
+
- **`ds-alert` can fill its container.** With `fullWidth` set the host becomes block-level and
|
|
46
|
+
100% wide, and the alert stretches across it, for a bar along a panel or a preview. Without it the
|
|
47
|
+
alert hugs its content as before.
|
|
48
|
+
- **`ds-chat-message` takes `role="system"`, a notice from the app.** It sits centred and splits a
|
|
49
|
+
run of replies. `tone` (new type `ChatMessageTone`) says what it means: `'neutral'`, the default, is
|
|
50
|
+
a quiet plaque in `--text-secondary` at `--font-size-xs` for a routine note; `'info'`, `'success'`,
|
|
51
|
+
`'warning'` and `'error'` draw a card in that status colour (`--*-subtitle` fill, `--*-border`
|
|
52
|
+
outline, `--*-text`) with the tone's icon. `title` adds a bold first line; `icon` sets the icon, and
|
|
53
|
+
a neutral plaque shows one only when given. Without `author` it is spoken as the new `DsIntl` key
|
|
54
|
+
`chat.system` (`'Notice'`). Tokens `--ds-chat-message-system-color`,
|
|
55
|
+
`--ds-chat-message-system-bg-color` and `--ds-chat-message-system-border-color` style the neutral
|
|
56
|
+
plaque. `ChatMessageRole` gains `'system'`: a `switch` of yours that must cover every role needs a
|
|
57
|
+
case for it.
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- **Folding the steps of a `ds-chat-message` slides them under the chip.** The steps shrank toward a
|
|
62
|
+
corner at 60% scale while fading over 380ms, and opening overshot on another easing. Now, over
|
|
63
|
+
360ms on one easing, their height closes from the bottom so the rows nearest the chip slide under it
|
|
64
|
+
first, unsquashed, and the last rows fade as the chip reaches the top; the bubble rides up with the
|
|
65
|
+
layout, and opening slides the rows back out. Under `prefers-reduced-motion: reduce` nothing
|
|
66
|
+
animates, as before. Nothing to change in your code.
|
|
67
|
+
- **Steps of a `ds-chat-steps` that finish at once settle one after another.** A step whose
|
|
68
|
+
`status` turns to `done` or `error` keeps showing as running until it has for at least 600ms,
|
|
69
|
+
and two steps show their final status at least 300ms apart, so a batch that finishes together
|
|
70
|
+
reads as a sequence. Under `prefers-reduced-motion: reduce` the final status shows at once. Only
|
|
71
|
+
what is drawn waits: `status` and everything bound to it change when you set them. New inputs
|
|
72
|
+
`minRunningMs` (default `600`) and `revealStaggerMs` (default `300`); set both to `0` to show
|
|
73
|
+
every final status at once.
|
|
74
|
+
- **The `ds-chat-input` send button stays enabled while the text is blank.** It keeps its colour
|
|
75
|
+
from an empty box to a typed message and back, where it turned gray and disabled. Pressed while the
|
|
76
|
+
text is blank it sends nothing and moves the focus to the text area; Enter on blank text sends
|
|
77
|
+
nothing, as before. `disabled` still disables it. Nothing to change in your code; a `[send]` slot
|
|
78
|
+
of your own keeps the state you bind.
|
|
79
|
+
- **Field outlines meet 3:1 (WCAG 1.4.11).** `ds-input`, `ds-textarea`, `ds-select`,
|
|
80
|
+
`ds-multi-select`, `ds-autocomplete`, `ds-search`, `ds-chat-input`, the `ds-date-picker`,
|
|
81
|
+
`ds-time-picker` and `ds-color-picker` triggers, `ds-number-stepper`, the `ds-otp-input` cells
|
|
82
|
+
and `ds-field-group` draw their resting border in `--border-field` and their hover border in
|
|
83
|
+
`--border-field-hover`, where they drew `--border-default` (1.31:1 on white, 1.19:1 on a dark
|
|
84
|
+
drawer) and `--border-strong`. `--ds-field-border-color`, `--ds-field-border-color-hover`,
|
|
85
|
+
`--ds-date-picker-trigger-border-color`, `--ds-time-picker-trigger-border`,
|
|
86
|
+
`--ds-color-picker-trigger-border-color`, `--ds-number-stepper-border-color`,
|
|
87
|
+
`--ds-otp-cell-border-color` and `--ds-field-group-border-color` default to them, and through
|
|
88
|
+
them `--ds-input-border`, `--ds-search-border`, `--ds-select-border-color`,
|
|
89
|
+
`--ds-multi-select-border-color` and `--ds-autocomplete-border-color` with their `-hover`
|
|
90
|
+
pairs. Nothing to change in your code, unless a screen must keep the faint outline: set
|
|
91
|
+
`--border-field: var(--border-default)` and
|
|
92
|
+
`--border-field-hover: var(--border-strong)` on `:root`.
|
|
93
|
+
- **Selected and current rows inside dark overlays are lighter than the overlay.** Modals, drawers
|
|
94
|
+
and the `ds-app-layout` rail below `lg` set `--surface-tint` and `--accent-surface-tint` to
|
|
95
|
+
`--surface-overlay-tint` on themselves, and `ds-popover` and the dropdown panels
|
|
96
|
+
of `ds-select`, `ds-multi-select` and `ds-autocomplete` to `--surface-overlay-raised-tint`. Under
|
|
97
|
+
`data-theme="dark"` the selected `ds-list-item`, the selected `ds-tree` row, the selected option
|
|
98
|
+
of those dropdown panels, the `ds-empty-state` tile and any row of your own painted with
|
|
99
|
+
`--surface-tint` read about 1.31:1 against a drawer
|
|
100
|
+
and 1.29:1 against a popover, where `--surface-tint` was darker than both (1.05:1 and 1.15:1).
|
|
101
|
+
The same overlays set `--accent-strong` to `--accent-strong-overlay`, `--accent-strong` in light
|
|
102
|
+
and `hsl(from var(--primary) h 90% 80%)` on dark, so a selected label keeps 4.5:1 on the lighter
|
|
103
|
+
tint.
|
|
104
|
+
The light theme is unchanged. Nothing to change in your code, unless you set `--surface-tint`
|
|
105
|
+
on `:root` for a brand: set `--surface-overlay-tint` and `--surface-overlay-raised-tint` there
|
|
106
|
+
too, or the overlays keep the library tint.
|
|
107
|
+
|
|
108
|
+
### Fixed
|
|
109
|
+
|
|
110
|
+
- **A `ds-chat-thread` is as wide on both sides with or without a scrollbar.** The scrollbar room it
|
|
111
|
+
keeps was added to the end padding, so the right side read wider than the left. The room, as wide as
|
|
112
|
+
the platform's scrollbar, now comes out of the end padding. Nothing to change in your code.
|
|
113
|
+
- **A `ds-chat-thread` keeps its width when the messages start or stop overflowing it.** The
|
|
114
|
+
scrollbar took its room from the messages only while they overflowed, so at the end of a fold that
|
|
115
|
+
brought the list back inside the view every message rewrapped at a new width in one frame. The
|
|
116
|
+
room is now always kept. Nothing to change in your code.
|
|
117
|
+
- **A `ds-tree` row without children shows its `icon` in the caret's place.** It drew the icon after
|
|
118
|
+
an empty caret slot, so its label started 24px right of a sibling without an icon. Its label now
|
|
119
|
+
starts where the sibling's does. A row with children keeps the caret, then the icon, then the
|
|
120
|
+
label. Nothing to change in your code.
|
|
121
|
+
- **Folding or opening the steps of a `ds-chat-message` ends without a jump.** The gap under the
|
|
122
|
+
steps appeared or vanished at once at the end of the motion, so the bubble and every message below
|
|
123
|
+
it moved 8px in one frame. The gap now shrinks and grows with the steps. Nothing to change in your
|
|
124
|
+
code.
|
|
125
|
+
- **The `ds-alert` icon sits by the first line.** It centred on the whole alert, so with a title
|
|
126
|
+
and a message, a long message or actions it stood halfway down the alert. It now centres on the
|
|
127
|
+
title, or on the first line of the message when there is no title. Nothing to change in your
|
|
128
|
+
code.
|
|
129
|
+
- **An empty `ds-chat-input`, or an empty `autosize` `ds-textarea`, is as tall as one character
|
|
130
|
+
typed into it.** A placeholder longer than the field wrapped and set the height, so the field
|
|
131
|
+
shrank on the first character. The placeholder wraps over up to `minRows` lines and ends in an
|
|
132
|
+
ellipsis after the last; the height follows `minRows` and the text.
|
|
133
|
+
- **`minRows` and `maxRows` of an `autosize` `ds-textarea` count lines of text.** The field's
|
|
134
|
+
block padding counted against them, so `minRows="2"` showed less than two lines of text and a
|
|
135
|
+
field with `maxRows` scrolled before that many. An `autosize` field with `maxRows` now grows up to
|
|
136
|
+
its block padding taller before it scrolls: 24px at the default size, 8px in a `ds-chat-input`.
|
|
137
|
+
Nothing to change in your code.
|
|
138
|
+
- **A `ds-splitter` drag ends when it is released over an iframe or an embedded webview.** Such a
|
|
139
|
+
document took the pointer away from the handle, so the release never arrived: the page kept the
|
|
140
|
+
resize cursor on every element and blocked text selection until the next click. While a handle is
|
|
141
|
+
dragged, every `iframe`, `webview`, `embed` and `object` on the page now ignores the pointer, and
|
|
142
|
+
the drag also ends when the handle loses pointer capture or the window loses focus. Nothing to
|
|
143
|
+
change in your code; a `pointer-events: none` you set on an embedded document during a drag can
|
|
144
|
+
be removed.
|
|
145
|
+
- **A `ds-icon` box is as large as its glyph.** `ds-icon` sets `--ds-icon-size` on itself as well
|
|
146
|
+
as on its `svg`, so a host that also carries the global `.icon` class takes the glyph's size
|
|
147
|
+
instead of `--icon-md` (16px). In `ds-banner` and the file rows of `ds-dropzone` the icon box
|
|
148
|
+
grows from 16px to 20px, the size its glyph already drew, and the text beside it moves 4px further
|
|
149
|
+
from the icon; in `ds-chat-attachment` it shrinks from 16px to 14px.
|
|
150
|
+
- **The marker of a `ds-chat-step` sits beside the first line of its heading.** A step with
|
|
151
|
+
content or a `time` under its heading, or a heading on two lines, centred its marker on the whole
|
|
152
|
+
step, below the heading's first line; only a `waiting` step kept it on the heading row. Every
|
|
153
|
+
status now keeps the marker beside the heading's first line, as a `waiting` step does, and a step
|
|
154
|
+
with content under its heading is about 4px taller. A step whose trailing action is not the toggle
|
|
155
|
+
centres its marker on that control, where a `waiting` one drew it above the heading. A step with a
|
|
156
|
+
one-line heading and nothing under it renders as before. Nothing to change in your code.
|
|
157
|
+
- **The marker of a `ds-timeline-item` with content under its heading sits beside the heading.** An
|
|
158
|
+
item with content or a `time` under its heading centred its marker on the whole item, below the
|
|
159
|
+
heading. The marker now sits beside the heading's first line, and such an item is about 8px
|
|
160
|
+
taller. With a trailing action other than the toggle, such an item centres its marker on that control.
|
|
161
|
+
An item with nothing under its heading renders as before. Nothing to change in your code.
|
|
162
|
+
- **A `ds-button` clicked while `loading` keeps the focus.** The button took no pointer events while
|
|
163
|
+
loading, so a second click landed on the page and moved the focus off the button. The click now
|
|
164
|
+
reaches the button, which still refuses it, and the focus stays. Nothing to change in your code.
|
|
165
|
+
- **Under `data-theme="dark"`, an element raised by `--shadow-1` has an edge.** The selected
|
|
166
|
+
`ds-segmented` segment, the active pill `ds-tabs` tab, the `ds-switch` and `ds-slider` thumbs and a
|
|
167
|
+
`raised` `ds-card` sit on a surface no darker than themselves, and with the dark shadow they lost
|
|
168
|
+
their outline. `--shadow-1` (and `--ds-elevation-raised`, `--shadow-card`) adds the 1px light hairline
|
|
169
|
+
at 8% alpha that `--shadow-4` draws. The light theme is unchanged. Nothing to change in your code.
|
|
170
|
+
- **The `arrow` of a `ds-popover` is a caret outside the panel, pointing at the middle of the
|
|
171
|
+
trigger.** It was a faint chevron drawn inside the panel near its corner, and a panel opened to the
|
|
172
|
+
left or right drew it on its top edge, pointing up. The caret now stands out of the edge that faces
|
|
173
|
+
the trigger, filled like the panel with the border running round it, as on `ds-tooltip`, and follows
|
|
174
|
+
the trigger when the panel flips or is pushed in from the viewport edge. A left or right panel
|
|
175
|
+
centres on its trigger. `--ds-popover-arrow-size` is the caret's edge length. A submenu of `ds-menu`
|
|
176
|
+
enters from the side of its item rather than from above. Nothing to change in your code.
|
|
177
|
+
|
|
3
178
|
## 1.1.0 — 2026-11-02
|
|
4
179
|
|
|
5
180
|
### Added
|
package/agent/INDEX.md
CHANGED
|
@@ -63,7 +63,7 @@ and token names.** These leaves are for orientation and usage.
|
|
|
63
63
|
- [<ds-loading-overlay> — LoadingOverlayComponent](feedback/ds-loading-overlay.md) — <!-- inputs:ds-loading-overlay -->
|
|
64
64
|
- [<ds-timeline> — TimelineComponent](feedback/ds-timeline.md) — The list that holds ds-timeline-items, at any depth: it marks the first and last item so the connector stops a
|
|
65
65
|
- [<ds-timeline-item> — TimelineItemComponent](feedback/ds-timeline-item.md) — Slots: default content below the heading; [trailing] at the end of the heading row (Undo, Stop, Retry); [detai
|
|
66
|
-
- [<ds-chat-message> — ChatMessageComponent](feedback/ds-chat-message.md) — One message of a chat: role: ChatMessageRole = 'assistant' puts a filled bubble on the right ('user')
|
|
66
|
+
- [<ds-chat-message> — ChatMessageComponent](feedback/ds-chat-message.md) — One message of a chat: role: ChatMessageRole = 'assistant' puts a filled bubble on the right ('user'), a subtl
|
|
67
67
|
- [<ds-chat-thread> — ChatThreadComponent](feedback/ds-chat-thread.md) — Scrollable list of ds-chat-messages; give it a height (or flex: 1 in a column). Stays at the newest message as
|
|
68
68
|
- [<ds-chat-attachment> — ChatAttachmentComponent](feedback/ds-chat-attachment.md) — Chip in a message's [attachments] slot (label required, source muted after it, icon default paperclip). Open,
|
|
69
69
|
- [<ds-chat-steps> — ChatStepsComponent](feedback/ds-chat-steps.md) — The steps of an agent's work, in the [steps] slot of a ds-chat-message: ds-chat-steps in order, at any depth,
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
Group: Display & feedback
|
|
5
5
|
|
|
6
6
|
Inline message, `ds-banner`'s smaller twin — same anatomy, sized for placement inside a form or a card rather than across a page.
|
|
7
|
-
Inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'neutral' = 'info'`, `title: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null` (variant-derived default)
|
|
7
|
+
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)
|
|
8
8
|
Output: `(closed): void`
|
|
9
9
|
Content slots: default (body text), `[actions]` (trailing CTAs)
|
|
10
10
|
- `announce` follows `DS_CONFIG.alert.announce` with the same two dev warnings as `ds-banner`, prefixed `[ds-alert]`.
|
|
11
11
|
- Dismissing moves focus as `ds-banner` does: to the next control after the alert, else the one before it.
|
|
12
|
+
- The icon centres on the first line: the title, else the first line of the message.
|
|
12
13
|
|
|
13
14
|
<!-- inputs:ds-alert -->
|
|
14
|
-
All inputs: `variant: 'info' | 'success' | 'warning' | 'error' | 'neutral' = 'info'`, `title: string = ''`, `dismissible: boolean = false`, `icon: IconName | null = null`, `announce: boolean | null = null`
|
|
15
|
+
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`
|
|
15
16
|
<!-- /inputs -->
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Group: Display & feedback
|
|
5
5
|
|
|
6
|
-
One message of a chat: `role: ChatMessageRole = 'assistant'` puts a filled bubble on the right (`'user'`)
|
|
7
|
-
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
|
|
6
|
+
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.
|
|
7
|
+
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.
|
|
8
8
|
|
|
9
9
|
<!-- inputs:ds-chat-message -->
|
|
10
|
-
All inputs: `role: 'user' | 'assistant' = 'assistant'`, `author: string = ''`, `time: string = ''`, `sentAt: Date | string | number | null = null`, `streaming: boolean = false`, `status: 'sending' | 'sent' | 'failed' = null`, `stepsFolded: boolean = false`
|
|
10
|
+
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`
|
|
11
11
|
<!-- /inputs -->
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Group: Display & feedback
|
|
5
5
|
|
|
6
|
-
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,
|
|
6
|
+
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.
|
|
7
7
|
|
|
8
8
|
<!-- inputs:ds-chat-step -->
|
|
9
9
|
All inputs: `heading: string = ''`, `time: string = ''`, `status: 'done' | 'running' | 'pending' | 'waiting' | 'error' = null`, `expanded: boolean = false`
|
|
@@ -6,5 +6,5 @@ Group: Display & feedback
|
|
|
6
6
|
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.
|
|
7
7
|
|
|
8
8
|
<!-- inputs:ds-chat-steps -->
|
|
9
|
-
All inputs: `enter: 'together' | 'stagger' = 'together'`
|
|
9
|
+
All inputs: `enter: 'together' | 'stagger' = 'together'`, `minRunningMs: number = 600`, `revealStaggerMs: number = 300`
|
|
10
10
|
<!-- /inputs -->
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Group: Display & feedback
|
|
5
5
|
|
|
6
|
-
Scrollable list of `ds-chat-message`s; give it a height (or `flex: 1` in a column). Stays at the newest message as messages arrive or grow; once the reader scrolls up it stays put and shows a jump button with the count of messages that arrived below (`DS_INTL.chat.newMessages(count)`, `latest` when none). A message with `role="user"` arriving scrolls back down. Consecutive messages of one role sit at `--ds-chat-thread-group-gap`, speakers apart at `--ds-chat-thread-gap`; only the last message of a run takes the tight bottom corner on the speaker's side (`--ds-radius-inner`), the messages above it stay round. With `sentAt` on the messages, a gap of `timeBreakMinutes` (default `15`) or more starts a new run under a centred divider (`DS_INTL.chat.today` / `yesterday` or the date, then the time, in `DsConfig.locale`); the first dated message gets one too. `working` shows a spinner row with `workingLabel` (else `DS_INTL.chat.working`) at the end; never put a time estimate in it. Screen readers: the list is not a live region; the thread announces a finished assistant reply once (when it arrives while not `working`, or when `working` clears) and the working label, and never the messages present at first render. Older messages: set `hasOlder` and scrolling near the start emits `(loadOlder)` once until the list changes; prepend them and the thread keeps the message in view in place; `loadingOlder` shows a spinner over the top. A user message that arrives folds the steps of the replies before it, except a reply with a failed step the reader has not opened (`foldStepsOnSend`, default `true`); messages and steps that arrive later grow in while a pinned thread keeps its bottom still. Method: `scrollToEnd()`.
|
|
7
|
-
Tokens: `--ds-chat-thread-gap`, `--ds-chat-thread-group-gap`, `--ds-chat-thread-padding`.
|
|
6
|
+
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()`.
|
|
7
|
+
Tokens: `--ds-chat-thread-gap`, `--ds-chat-thread-group-gap`, `--ds-chat-thread-padding`, `--ds-chat-thread-inset-bottom`.
|
|
8
8
|
|
|
9
9
|
<!-- inputs:ds-chat-thread -->
|
|
10
10
|
All inputs: `working: boolean = false`, `workingLabel: string = ''`, `ariaLabel: string | null = null`, `foldStepsOnSend: boolean = true`, `timeBreakMinutes: number = 15`, `hasOlder: boolean = false`, `loadingOlder: boolean = false`
|
|
@@ -3,7 +3,7 @@
|
|
|
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. `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`.
|
|
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
7
|
|
|
8
8
|
<!-- inputs:ds-tree -->
|
|
9
9
|
All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selection: 'single' | 'multiple' = 'single'`, `selectedId: string | null = null`, `selectedIds: string[] = []`
|
|
@@ -12,5 +12,5 @@ Methods: `submit()`, `focus(options?)`; `canSubmit` signal. Text area name: `ari
|
|
|
12
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
13
|
|
|
14
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`, `busyLabel: string = ''`, `layout: ChatInputLayout = 'status-bar'`
|
|
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
16
|
<!-- /inputs -->
|
|
@@ -4,8 +4,8 @@
|
|
|
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-overlay-secondary`, `--surface-overlay-muted`, `--surface-overlay-raised`, `--surface-overlay-raised-secondary`, `--surface-overlay-raised-muted`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
|
|
8
|
-
- Borders: `--border-default`, `--border-strong`, `--border-overlay`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
|
|
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
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`
|
package/components.md
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
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-overlay-secondary`, `--surface-overlay-muted`, `--surface-overlay-raised`, `--surface-overlay-raised-secondary`, `--surface-overlay-raised-muted`, `--surface-tint`, `--surface-disabled`, `--surface-muted`, `--surface-inverted`, `--surface-inverted-hover`, `--surface-scrim`
|
|
35
|
-
- Borders: `--border-default`, `--border-strong`, `--border-overlay`, `--border-subtle`, `--border-divider`, `--border-disabled`, `--border-inverted`
|
|
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
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`
|
|
@@ -251,7 +251,7 @@ Methods: `submit()`, `focus(options?)`; `canSubmit` signal. Text area name: `ari
|
|
|
251
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
252
|
|
|
253
253
|
<!-- inputs:ds-chat-input -->
|
|
254
|
-
All inputs: `value: string = ''`, `placeholder: string = ''`, `ariaLabel: string | null = null`, `minRows: number = 1`, `maxRows: number = 8`, `disabled: boolean = false`, `busy: boolean = false`, `busyLabel: string = ''`, `layout: ChatInputLayout = 'status-bar'`
|
|
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
255
|
<!-- /inputs -->
|
|
256
256
|
|
|
257
257
|
#### `<ds-number-stepper>` — `NumberStepperComponent`
|
|
@@ -552,14 +552,15 @@ All inputs: `variant: BannerVariant = 'info'`, `title: string = ''`, `dismissibl
|
|
|
552
552
|
|
|
553
553
|
#### `<ds-alert>` — `AlertComponent`
|
|
554
554
|
Inline message, `ds-banner`'s smaller twin — same anatomy, sized for placement inside a form or a card rather than across a page.
|
|
555
|
-
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)
|
|
556
556
|
Output: `(closed): void`
|
|
557
557
|
Content slots: default (body text), `[actions]` (trailing CTAs)
|
|
558
558
|
- `announce` follows `DS_CONFIG.alert.announce` with the same two dev warnings as `ds-banner`, prefixed `[ds-alert]`.
|
|
559
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.
|
|
560
561
|
|
|
561
562
|
<!-- inputs:ds-alert -->
|
|
562
|
-
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`
|
|
563
564
|
<!-- /inputs -->
|
|
564
565
|
|
|
565
566
|
#### `<ds-toast>` — `ToastComponent`
|
|
@@ -614,17 +615,17 @@ All inputs: `heading: string = ''`, `time: string = ''`, `icon: IconName | null
|
|
|
614
615
|
|
|
615
616
|
#### `<ds-chat-message>` — `ChatMessageComponent`
|
|
616
617
|
|
|
617
|
-
One message of a chat: `role: ChatMessageRole = 'assistant'` puts a filled bubble on the right (`'user'`)
|
|
618
|
-
Tokens: `--ds-chat-message-max-width` (default `85%`), `--ds-chat-message-radius`, `--ds-chat-message-padding`, `--ds-chat-message-user-bg-color` / `-user-color`, `--ds-chat-message-assistant-bg-color` / `-assistant-color
|
|
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.
|
|
619
620
|
|
|
620
621
|
<!-- inputs:ds-chat-message -->
|
|
621
|
-
All inputs: `role: 'user' | 'assistant' = 'assistant'`, `author: string = ''`, `time: string = ''`, `sentAt: Date | string | number | null = null`, `streaming: boolean = false`, `status: 'sending' | 'sent' | 'failed' = null`, `stepsFolded: boolean = false`
|
|
622
|
+
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`
|
|
622
623
|
<!-- /inputs -->
|
|
623
624
|
|
|
624
625
|
#### `<ds-chat-thread>` — `ChatThreadComponent`
|
|
625
626
|
|
|
626
|
-
Scrollable list of `ds-chat-message`s; give it a height (or `flex: 1` in a column). Stays at the newest message as messages arrive or grow; once the reader scrolls up it stays put and shows a jump button with the count of messages that arrived below (`DS_INTL.chat.newMessages(count)`, `latest` when none). A message with `role="user"` arriving scrolls back down. Consecutive messages of one role sit at `--ds-chat-thread-group-gap`, speakers apart at `--ds-chat-thread-gap`; only the last message of a run takes the tight bottom corner on the speaker's side (`--ds-radius-inner`), the messages above it stay round. With `sentAt` on the messages, a gap of `timeBreakMinutes` (default `15`) or more starts a new run under a centred divider (`DS_INTL.chat.today` / `yesterday` or the date, then the time, in `DsConfig.locale`); the first dated message gets one too. `working` shows a spinner row with `workingLabel` (else `DS_INTL.chat.working`) at the end; never put a time estimate in it. Screen readers: the list is not a live region; the thread announces a finished assistant reply once (when it arrives while not `working`, or when `working` clears) and the working label, and never the messages present at first render. Older messages: set `hasOlder` and scrolling near the start emits `(loadOlder)` once until the list changes; prepend them and the thread keeps the message in view in place; `loadingOlder` shows a spinner over the top. A user message that arrives folds the steps of the replies before it, except a reply with a failed step the reader has not opened (`foldStepsOnSend`, default `true`); messages and steps that arrive later grow in while a pinned thread keeps its bottom still. Method: `scrollToEnd()`.
|
|
627
|
-
Tokens: `--ds-chat-thread-gap`, `--ds-chat-thread-group-gap`, `--ds-chat-thread-padding`.
|
|
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`.
|
|
628
629
|
|
|
629
630
|
<!-- inputs:ds-chat-thread -->
|
|
630
631
|
All inputs: `working: boolean = false`, `workingLabel: string = ''`, `ariaLabel: string | null = null`, `foldStepsOnSend: boolean = true`, `timeBreakMinutes: number = 15`, `hasOlder: boolean = false`, `loadingOlder: boolean = false`
|
|
@@ -643,12 +644,12 @@ All inputs: `label: required string`, `source: string = ''`, `icon: IconName | n
|
|
|
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.
|
|
644
645
|
|
|
645
646
|
<!-- inputs:ds-chat-steps -->
|
|
646
|
-
All inputs: `enter: 'together' | 'stagger' = 'together'`
|
|
647
|
+
All inputs: `enter: 'together' | 'stagger' = 'together'`, `minRunningMs: number = 600`, `revealStaggerMs: number = 300`
|
|
647
648
|
<!-- /inputs -->
|
|
648
649
|
|
|
649
650
|
#### `<ds-chat-step>` — `ChatStepComponent`
|
|
650
651
|
|
|
651
|
-
One step: `heading`, optional `time`, and `status: ChatStepStatus | null` (`'done' | 'running' | 'pending' | 'waiting' | 'error'`), which draws the marker (a check, a spinner, a dashed ring with muted text, a grey disc with a pause glyph, a cross) and is spoken before the heading (`DS_INTL.chat.stepDone`, `stepRunning`, `stepPending`, `stepWaiting` "Waiting for your approval", `stepFailed`). Slots: default content under the heading (the reader's answer buttons on a `waiting` step,
|
|
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.
|
|
652
653
|
|
|
653
654
|
<!-- inputs:ds-chat-step -->
|
|
654
655
|
All inputs: `heading: string = ''`, `time: string = ''`, `status: 'done' | 'running' | 'pending' | 'waiting' | 'error' = null`, `expanded: boolean = false`
|
|
@@ -662,7 +663,7 @@ All inputs: `maxVisible: number`, `showQueueCount: boolean = true`
|
|
|
662
663
|
|
|
663
664
|
#### `<ds-tree>` — `TreeComponent`
|
|
664
665
|
|
|
665
|
-
Nested rows with one tab stop and arrow-key navigation. `(nodeSelected)` emits the node selected; `(nodeHover)` emits the node under the pointer or newly focused, `null` when the pointer leaves the tree. `<ng-template dsTreeTrailing let-node>` draws at the end of every row (a badge, a count, a small icon button); a click inside it neither selects nor toggles the row, and its controls are tab stops on the focused row only. `selection="multiple"` binds `[(selectedIds)]`: Shift-click, Ctrl-click, Shift+Space or Ctrl+Space adds or removes a row, a plain click or Enter selects it alone, and the host carries `aria-multiselectable`.
|
|
666
|
+
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`.
|
|
666
667
|
|
|
667
668
|
<!-- inputs:ds-tree -->
|
|
668
669
|
All inputs: `nodes: readonly TreeNode[] = []`, `expandedIds: Set<string>`, `selection: 'single' | 'multiple' = 'single'`, `selectedId: string | null = null`, `selectedIds: string[] = []`
|
|
@@ -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":"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"}
|