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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +261 -3
  2. package/agent/INDEX.md +12 -2
  3. package/agent/feedback/ds-attachment.md +12 -0
  4. package/agent/feedback/ds-chat-attachment.md +10 -0
  5. package/agent/feedback/ds-chat-message.md +11 -0
  6. package/agent/feedback/ds-chat-step.md +10 -0
  7. package/agent/feedback/ds-chat-steps.md +10 -0
  8. package/agent/feedback/ds-chat-thread.md +11 -0
  9. package/agent/feedback/ds-timeline-item.md +3 -1
  10. package/agent/feedback/ds-timeline.md +9 -0
  11. package/agent/feedback/ds-toast.md +1 -1
  12. package/agent/feedback/ds-tree.md +3 -1
  13. package/agent/forms/ds-chat-input.md +16 -0
  14. package/agent/forms/ds-inline-edit.md +14 -0
  15. package/agent/foundations/tokens.md +3 -3
  16. package/agent/navigation/ds-splitter.md +14 -0
  17. package/agent/platform/toast-service.md +3 -2
  18. package/agent/tables/ds-table.md +1 -1
  19. package/components.md +107 -9
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +2 -2
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +7 -4
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +858 -0
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -0
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +107 -0
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs.map +1 -0
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +2 -2
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs +359 -0
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-splitter.mjs.map +1 -0
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +2 -2
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +74 -17
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +163 -20
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +2 -2
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +146 -24
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +54 -0
  59. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  62. package/migrations/1.0.2.json +28 -0
  63. package/migrations/1.0.3.json +15 -0
  64. package/migrations/1.1.0.json +183 -0
  65. package/package.json +25 -1
  66. package/schematics/check-overrides/surface.json +181 -5
  67. package/styles/_dropdown-overlay.scss +6 -4
  68. package/styles/_step-marker.scss +51 -0
  69. package/styles/_tokens.scss +5 -3
  70. package/themes/README.md +2 -1
  71. package/themes/_semantic.scss +10 -0
  72. package/themes/dark/_palette.scss +1 -2
  73. package/themes/dark/_theme.scss +24 -3
  74. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +3 -1
  75. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  76. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
  77. package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +340 -0
  78. package/types/ids-group-ltd-ids-design-system-components-inline-edit.d.ts +43 -0
  79. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
  80. package/types/ids-group-ltd-ids-design-system-components-splitter.d.ts +83 -0
  81. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +34 -5
  82. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +53 -4
  83. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +51 -7
  84. package/types/ids-group-ltd-ids-design-system-core.d.ts +104 -0
  85. package/types/ids-group-ltd-ids-design-system.d.ts +6 -3
@@ -0,0 +1,359 @@
1
+ import { DOCUMENT } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, ElementRef, NgZone, viewChild, input, model, numberAttribute, signal, computed } from '@angular/core';
4
+ import { nextControlId } from '@ids-group-ltd/ids-design-system/components';
5
+ import { DS_INTL, DS_INTL_DEFAULTS, retainStyles } from '@ids-group-ltd/ids-design-system/core';
6
+
7
+ /** @internal Never rendered: creating it once registers the page-wide drag rules globally. */
8
+ class SplitterDraggingStylesComponent {
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SplitterDraggingStylesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: SplitterDraggingStylesComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true, styles: ["html[data-ds-splitter-dragging],html[data-ds-splitter-dragging] *{cursor:var(--_ds-splitter-cursor)!important;-webkit-user-select:none!important;user-select:none!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SplitterDraggingStylesComponent, decorators: [{
13
+ type: Component,
14
+ args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["html[data-ds-splitter-dragging],html[data-ds-splitter-dragging] *{cursor:var(--_ds-splitter-cursor)!important;-webkit-user-select:none!important;user-select:none!important}\n"] }]
15
+ }] });
16
+
17
+ const STEP = 16;
18
+ const LARGE_STEP = 64;
19
+ // The farthest the rubber band pulls past a limit, approached and never reached: 100px, and never more
20
+ // than a third of the pane it squashes, whose content would otherwise read as distorted.
21
+ const OVERDRAG_CAP = 100;
22
+ const OVERDRAG_SQUASH = 1 / 3;
23
+ /**
24
+ * Two panes with a handle between them that resizes one of them. Slots: `[start]` and `[end]`.
25
+ * Drag the handle, or focus it and use the arrow keys (Shift or PageUp / PageDown for a large step,
26
+ * Home / End for the limits); a double click returns to `defaultSize`. Give the splitter a size: it
27
+ * fills the box its parent gives it and never grows to its content.
28
+ */
29
+ class SplitterComponent {
30
+ intl = inject(DS_INTL);
31
+ host = inject(ElementRef);
32
+ document = inject(DOCUMENT);
33
+ zone = inject(NgZone);
34
+ handle = viewChild.required('handle');
35
+ /** `'horizontal'`: panes side by side. `'vertical'`: panes stacked. */
36
+ orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
37
+ /** The pane `size` measures; the other pane takes the rest. */
38
+ pane = input('start', ...(ngDevMode ? [{ debugName: "pane" }] : /* istanbul ignore next */ []));
39
+ /** Size of `pane` in px, two-way bound; `null` shows `defaultSize`. A drag writes it once, on release. */
40
+ size = model(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
41
+ /** Size in px when `size` is `null`, and what a double click on the handle returns to. */
42
+ defaultSize = input(320, { ...(ngDevMode ? { debugName: "defaultSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
43
+ /** Smallest size in px, inclusive. */
44
+ min = input(160, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: numberAttribute });
45
+ /** Largest size in px, inclusive. The pane never takes more than the splitter less the handle. */
46
+ max = input(640, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
47
+ /** Saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over `size`. */
48
+ persistKey = input('', ...(ngDevMode ? [{ debugName: "persistKey" }] : /* istanbul ignore next */ []));
49
+ /** Accessible name of the handle; unset falls back to `DS_INTL.splitter.label`. Name what it resizes. */
50
+ ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
51
+ /** Dragged past `min` or `max`: `'elastic'` follows the pointer with growing resistance and springs
52
+ * back on release, `'none'` stops at the limit. Off under `prefers-reduced-motion: reduce`. */
53
+ overdrag = input('elastic', ...(ngDevMode ? [{ debugName: "overdrag" }] : /* istanbul ignore next */ []));
54
+ startId = nextControlId('ds-splitter-pane');
55
+ endId = nextControlId('ds-splitter-pane');
56
+ dragging = signal(false, ...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
57
+ springing = signal(false, ...(ngDevMode ? [{ debugName: "springing" }] : /* istanbul ignore next */ []));
58
+ current = computed(() => this.clamp(this.size() ?? this.defaultSize(), this.max()), ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
59
+ cursor = computed(() => this.cursorFor(this.current()), ...(ngDevMode ? [{ debugName: "cursor" }] : /* istanbul ignore next */ []));
60
+ label = computed(() => this.ariaLabel() ||
61
+ this.intl().splitter?.label ||
62
+ DS_INTL_DEFAULTS.splitter.label, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
63
+ // ARIA names the orientation of the separator line, which is across the panes' axis.
64
+ lineOrientation = computed(() => this.orientation() === 'horizontal' ? 'vertical' : 'horizontal', ...(ngDevMode ? [{ debugName: "lineOrientation" }] : /* istanbul ignore next */ []));
65
+ drag = null;
66
+ pendingMove = null;
67
+ frame = 0;
68
+ springTimer = 0;
69
+ constructor() {
70
+ retainStyles(SplitterDraggingStylesComponent);
71
+ }
72
+ ngOnInit() {
73
+ const key = this.storageKey();
74
+ if (!key) {
75
+ return;
76
+ }
77
+ try {
78
+ const stored = Number(localStorage.getItem(key) ?? NaN);
79
+ if (Number.isFinite(stored)) {
80
+ this.size.set(stored);
81
+ }
82
+ }
83
+ catch {
84
+ // Storage blocked or absent (SSR): keep the bound size.
85
+ }
86
+ }
87
+ ngOnDestroy() {
88
+ this.endDrag();
89
+ }
90
+ onPointerDown(event) {
91
+ if (event.button !== 0) {
92
+ return;
93
+ }
94
+ event.preventDefault();
95
+ const handle = this.handle().nativeElement;
96
+ handle.setPointerCapture(event.pointerId);
97
+ // A grab during the spring-back stops it where the layout puts the handle, before anything is measured.
98
+ this.stopSpring();
99
+ // The grab point's distance from the measured pane's edge stays fixed, so the handle never jumps.
100
+ this.drag = {
101
+ pointerId: event.pointerId,
102
+ grab: this.fromPaneEdge(event, handle.getBoundingClientRect()),
103
+ size: this.current(),
104
+ box: this.panesBox(),
105
+ elastic: this.overdrag() === 'elastic' &&
106
+ !this.document.defaultView?.matchMedia('(prefers-reduced-motion: reduce)').matches,
107
+ pull: 0,
108
+ };
109
+ this.dragging.set(true);
110
+ // Outside Angular: a move writes the DOM itself, so it must not start change detection per frame.
111
+ this.zone.runOutsideAngular(() => handle.addEventListener('pointermove', this.onPointerMove));
112
+ const root = this.document.documentElement;
113
+ root.setAttribute('data-ds-splitter-dragging', '');
114
+ root.style.setProperty('--_ds-splitter-cursor', this.cursor());
115
+ }
116
+ onPointerMove = (event) => {
117
+ if (event.pointerId !== this.drag?.pointerId) {
118
+ return;
119
+ }
120
+ this.pendingMove = event;
121
+ if (!this.frame) {
122
+ this.frame = requestAnimationFrame(() => this.applyMove());
123
+ }
124
+ };
125
+ applyMove() {
126
+ this.frame = 0;
127
+ const event = this.pendingMove;
128
+ this.pendingMove = null;
129
+ if (!event || !this.drag) {
130
+ return;
131
+ }
132
+ const { box } = this.drag;
133
+ const raw = this.fromPaneEdge(event, box) - this.drag.grab;
134
+ const room = this.room(box);
135
+ const size = this.clamp(Math.round(raw), room);
136
+ if (this.drag.elastic) {
137
+ // Against the unrounded limit: within min and max the excess is exactly 0, not the rounding.
138
+ this.stretch(raw - this.clamp(raw, room));
139
+ }
140
+ if (size === this.drag.size) {
141
+ return;
142
+ }
143
+ this.drag.size = size;
144
+ // Written straight to the DOM: no change detection per frame. `size` is set once, on release.
145
+ const cursor = this.cursorFor(size);
146
+ const handle = this.handle().nativeElement;
147
+ this.host.nativeElement.style.setProperty('--_splitter-size', `${size}px`);
148
+ handle.setAttribute('aria-valuenow', String(size));
149
+ handle.style.cursor = cursor;
150
+ this.document.documentElement.style.setProperty('--_ds-splitter-cursor', cursor);
151
+ }
152
+ // Past a limit by `excess` px of size, the pull approaches the cap and never reaches it. The handle
153
+ // moves by the pull, the measured pane stretches by it and the other squashes by it (the other way
154
+ // round past `min`), each from its outer edge, so no gap opens. Transforms only: the layout keeps
155
+ // the clamped size.
156
+ stretch(excess) {
157
+ const drag = this.drag;
158
+ const [handle, measured, other] = this.movingParts();
159
+ const horizontal = this.orientation() === 'horizontal';
160
+ const extent = (element) => horizontal ? element.offsetWidth : element.offsetHeight;
161
+ const squashed = excess > 0 ? other : measured;
162
+ const cap = Math.min(OVERDRAG_CAP, extent(squashed) * OVERDRAG_SQUASH);
163
+ const pull = cap > 0
164
+ ? Math.sign(excess) * cap * (1 - 1 / (Math.abs(excess) / cap + 1))
165
+ : 0;
166
+ if (pull === drag.pull) {
167
+ return;
168
+ }
169
+ drag.pull = pull;
170
+ if (pull === 0) {
171
+ this.clearTransforms();
172
+ return;
173
+ }
174
+ const scale = horizontal ? 'scaleX' : 'scaleY';
175
+ const shift = this.pane() === 'start' ? pull : -pull;
176
+ handle.style.transform = `translate${horizontal ? 'X' : 'Y'}(${shift}px)`;
177
+ // The line thickens on the same resistance curve; a custom property, because the line is a pseudo-element.
178
+ handle.style.setProperty('--_splitter-pull-ratio', String(Math.abs(pull) / cap));
179
+ measured.style.transform = `${scale}(${(extent(measured) + pull) / extent(measured)})`;
180
+ other.style.transform = `${scale}(${Math.max(0, extent(other) - pull) / extent(other)})`;
181
+ }
182
+ // The handle, the pane `size` measures, then the other pane.
183
+ movingParts() {
184
+ const handle = this.handle().nativeElement;
185
+ const start = handle.previousElementSibling;
186
+ const end = handle.nextElementSibling;
187
+ return this.pane() === 'start'
188
+ ? [handle, start, end]
189
+ : [handle, end, start];
190
+ }
191
+ clearTransforms() {
192
+ for (const element of this.movingParts()) {
193
+ element.style.transform = '';
194
+ }
195
+ this.handle().nativeElement.style.removeProperty('--_splitter-pull-ratio');
196
+ }
197
+ stopSpring() {
198
+ clearTimeout(this.springTimer);
199
+ this.springing.set(false);
200
+ this.clearTransforms();
201
+ }
202
+ // The class adds the transition; clearing the transforms in the next frame plays it back to rest.
203
+ springBack() {
204
+ this.springing.set(true);
205
+ this.zone.runOutsideAngular(() => {
206
+ requestAnimationFrame(() => {
207
+ this.clearTransforms();
208
+ this.springTimer = window.setTimeout(() => this.zone.run(() => this.springing.set(false)), 600);
209
+ });
210
+ });
211
+ }
212
+ onPointerUp(event) {
213
+ if (event.pointerId !== this.drag?.pointerId) {
214
+ return;
215
+ }
216
+ if (this.frame) {
217
+ cancelAnimationFrame(this.frame);
218
+ this.applyMove();
219
+ }
220
+ const { size, pull } = this.drag;
221
+ this.endDrag();
222
+ if (pull !== 0) {
223
+ this.springBack();
224
+ }
225
+ if (size !== this.current()) {
226
+ this.commit(size);
227
+ }
228
+ }
229
+ onKeydown(event) {
230
+ const horizontal = this.orientation() === 'horizontal';
231
+ // An arrow moves the handle; the end pane grows as the handle moves towards the start.
232
+ const towardsEnd = this.pane() === 'start' ? 1 : -1;
233
+ const step = event.shiftKey ? LARGE_STEP : STEP;
234
+ const now = this.current();
235
+ const next = {
236
+ [horizontal ? 'ArrowRight' : 'ArrowDown']: now + step * towardsEnd,
237
+ [horizontal ? 'ArrowLeft' : 'ArrowUp']: now - step * towardsEnd,
238
+ PageUp: now + LARGE_STEP,
239
+ PageDown: now - LARGE_STEP,
240
+ Home: this.min(),
241
+ End: this.max(),
242
+ };
243
+ if (!(event.key in next)) {
244
+ return;
245
+ }
246
+ event.preventDefault();
247
+ this.commit(this.clampToBox(next[event.key]));
248
+ }
249
+ reset() {
250
+ this.size.set(null);
251
+ const key = this.storageKey();
252
+ if (key) {
253
+ try {
254
+ localStorage.removeItem(key);
255
+ }
256
+ catch {
257
+ // Storage blocked: the reset still applies for this session.
258
+ }
259
+ }
260
+ }
261
+ commit(size) {
262
+ this.size.set(size);
263
+ const key = this.storageKey();
264
+ if (key) {
265
+ try {
266
+ localStorage.setItem(key, String(size));
267
+ }
268
+ catch {
269
+ // Full or blocked: a lost pane size is not worth an error.
270
+ }
271
+ }
272
+ }
273
+ endDrag() {
274
+ if (!this.drag) {
275
+ return;
276
+ }
277
+ const handle = this.handle().nativeElement;
278
+ handle.removeEventListener('pointermove', this.onPointerMove);
279
+ cancelAnimationFrame(this.frame);
280
+ this.frame = 0;
281
+ this.pendingMove = null;
282
+ try {
283
+ handle.releasePointerCapture(this.drag.pointerId);
284
+ }
285
+ catch {
286
+ // The pointer can already be gone.
287
+ }
288
+ this.drag = null;
289
+ this.dragging.set(false);
290
+ const root = this.document.documentElement;
291
+ root.removeAttribute('data-ds-splitter-dragging');
292
+ root.style.removeProperty('--_ds-splitter-cursor');
293
+ }
294
+ storageKey() {
295
+ const key = this.persistKey().trim();
296
+ return key ? `ds-splitter:${key}` : null;
297
+ }
298
+ // ponytail: left-to-right only; under `dir="rtl"` a horizontal start pane is measured from the left.
299
+ fromPaneEdge(event, box) {
300
+ const horizontal = this.orientation() === 'horizontal';
301
+ if (this.pane() === 'start') {
302
+ return horizontal ? event.clientX - box.left : event.clientY - box.top;
303
+ }
304
+ return horizontal ? box.right - event.clientX : box.bottom - event.clientY;
305
+ }
306
+ clamp(size, upper) {
307
+ return Math.max(this.min(), Math.min(upper, size));
308
+ }
309
+ clampToBox(size) {
310
+ return this.clamp(size, this.room(this.panesBox()));
311
+ }
312
+ room(box) {
313
+ const handle = this.handle().nativeElement;
314
+ const room = this.orientation() === 'horizontal'
315
+ ? box.width - handle.offsetWidth
316
+ : box.height - handle.offsetHeight;
317
+ return Math.min(this.max(), room);
318
+ }
319
+ // From the start pane's leading edge to the end pane's trailing edge: the host's border and
320
+ // padding lie outside it.
321
+ panesBox() {
322
+ const handle = this.handle().nativeElement;
323
+ const start = handle.previousElementSibling.getBoundingClientRect();
324
+ const end = handle.nextElementSibling.getBoundingClientRect();
325
+ return new DOMRect(start.left, start.top, end.right - start.left, end.bottom - start.top);
326
+ }
327
+ // At a limit the cursor shows the one direction the handle can still move. `ew-resize`, not
328
+ // `col-resize`: Windows draws `ew`, `e` and `w-resize` alike, so the cursor keeps its shape there.
329
+ cursorFor(size) {
330
+ const horizontal = this.orientation() === 'horizontal';
331
+ const atMin = size <= this.min();
332
+ if (!atMin && size < this.max()) {
333
+ return horizontal ? 'ew-resize' : 'ns-resize';
334
+ }
335
+ const towardsEnd = this.pane() === 'start' ? atMin : !atMin;
336
+ if (horizontal) {
337
+ return towardsEnd ? 'e-resize' : 'w-resize';
338
+ }
339
+ return towardsEnd ? 's-resize' : 'n-resize';
340
+ }
341
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SplitterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
342
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: SplitterComponent, isStandalone: true, selector: "ds-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, pane: { classPropertyName: "pane", publicName: "pane", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, defaultSize: { classPropertyName: "defaultSize", publicName: "defaultSize", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, persistKey: { classPropertyName: "persistKey", publicName: "persistKey", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, overdrag: { classPropertyName: "overdrag", publicName: "overdrag", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { size: "sizeChange" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.data-pane": "pane()", "style.--_splitter-size": "current() + \"px\"", "class.springing": "springing()" } }, viewQueries: [{ propertyName: "handle", first: true, predicate: ["handle"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"pane pane-start\"\n [id]=\"startId\">\n <ng-content select=\"[start]\" />\n</div>\n\n<div\n #handle\n class=\"handle\"\n role=\"separator\"\n tabindex=\"0\"\n [class.dragging]=\"dragging()\"\n [style.cursor]=\"cursor()\"\n [attr.aria-orientation]=\"lineOrientation()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-controls]=\"pane() === 'start' ? startId : endId\"\n [attr.aria-valuenow]=\"current()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (dblclick)=\"reset()\"\n (keydown)=\"onKeydown($event)\">\n</div>\n\n<div\n class=\"pane pane-end\"\n [id]=\"endId\">\n <ng-content select=\"[end]\" />\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{--_splitter-gap: var(--ds-splitter-gap, var(--space-2));--_splitter-line-color: var(--ds-splitter-line-color, var(--border-strong));--_splitter-drag-color: var(--ds-splitter-drag-color, var(--text-muted));--_splitter-grip-color: var(--ds-splitter-grip-color, var(--text-muted));--_splitter-overdrag-line-scale: var(--ds-splitter-overdrag-line-scale, 3);--_splitter-grip-dot: calc(var(--border-width-strong) + var(--border-width-default));--_splitter-sized: min(var(--_splitter-size), 100% - var(--_splitter-gap));--_splitter-rest: minmax(0, 1fr);display:grid;min-inline-size:0;min-block-size:0}:host([data-pane=start]){--_splitter-start: var(--_splitter-sized);--_splitter-end: var(--_splitter-rest)}:host([data-pane=end]){--_splitter-start: var(--_splitter-rest);--_splitter-end: var(--_splitter-sized)}:host([data-orientation=horizontal]){grid-template-columns:var(--_splitter-start) var(--_splitter-gap) var(--_splitter-end);grid-template-rows:minmax(0,1fr)}:host([data-orientation=vertical]){grid-template-columns:minmax(0,1fr);grid-template-rows:var(--_splitter-start) var(--_splitter-gap) var(--_splitter-end)}.pane{min-inline-size:0;min-block-size:0;overflow:auto}:host([data-orientation=horizontal]) .pane-start{transform-origin:left center}:host([data-orientation=horizontal]) .pane-end{transform-origin:right center}:host([data-orientation=vertical]) .pane-start{transform-origin:center top}:host([data-orientation=vertical]) .pane-end{transform-origin:center bottom}:host(.springing) :is(.pane,.handle){transition:transform var(--duration-slower) var(--ease-spring)}.handle{--_splitter-line-thickness: calc( 1 + (var(--_splitter-overdrag-line-scale) - 1) * var(--_splitter-pull-ratio, 0) )}:host([data-orientation=horizontal]) .handle:after{transform:scaleX(var(--_splitter-line-thickness))}:host([data-orientation=vertical]) .handle:after{transform:scaleY(var(--_splitter-line-thickness))}:host(.springing) .handle:after{transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),transform var(--duration-slower) var(--ease-spring)}.handle{position:relative;touch-action:none;-webkit-user-select:none;user-select:none}.handle:after{position:absolute;content:\"\";background-color:var(--_splitter-line-color);border-radius:var(--radius-pill);opacity:0;transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.handle:before{position:absolute;inset-block-start:50%;inset-inline-start:50%;content:\"\";background-image:radial-gradient(circle closest-side,var(--_splitter-grip-color) 98%,transparent);background-position:0 0;translate:-50% -50%;transition:opacity var(--duration-fast) var(--ease-standard)}.handle:hover:after,.handle:hover:before{transition-delay:var(--duration-slow)}.handle:hover:after,.handle.dragging:after,.handle:focus-visible:after{opacity:1}.handle:hover:before,.handle.dragging:before,.handle:focus-visible:before{opacity:0}.handle.dragging:after{background-color:var(--_splitter-drag-color)}.handle.dragging:after,.handle.dragging:before{transition-delay:0s}@media not (forced-colors:active){.handle:focus-visible{outline:none}}.handle:focus-visible:after{background-color:var(--focus-ring-color)}:host([data-orientation=horizontal]) .handle:after{inset-block:0;inset-inline-start:calc(50% - var(--border-width-strong) / 2);inline-size:var(--border-width-strong)}:host([data-orientation=horizontal]) .handle:before{inline-size:var(--_splitter-grip-dot);block-size:calc(var(--_splitter-grip-dot) * 6);background-size:var(--_splitter-grip-dot) calc(var(--_splitter-grip-dot) * 2);background-repeat:repeat-y}:host([data-orientation=vertical]) .handle:after{inset-inline:0;inset-block-start:calc(50% - var(--border-width-strong) / 2);block-size:var(--border-width-strong)}:host([data-orientation=vertical]) .handle:before{inline-size:calc(var(--_splitter-grip-dot) * 6);block-size:var(--_splitter-grip-dot);background-size:calc(var(--_splitter-grip-dot) * 2) var(--_splitter-grip-dot);background-repeat:repeat-x}\n"] });
343
+ }
344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SplitterComponent, decorators: [{
345
+ type: Component,
346
+ args: [{ selector: 'ds-splitter', standalone: true, encapsulation: ViewEncapsulation.Emulated, host: {
347
+ '[attr.data-orientation]': 'orientation()',
348
+ '[attr.data-pane]': 'pane()',
349
+ '[style.--_splitter-size]': 'current() + "px"',
350
+ '[class.springing]': 'springing()',
351
+ }, template: "<div\n class=\"pane pane-start\"\n [id]=\"startId\">\n <ng-content select=\"[start]\" />\n</div>\n\n<div\n #handle\n class=\"handle\"\n role=\"separator\"\n tabindex=\"0\"\n [class.dragging]=\"dragging()\"\n [style.cursor]=\"cursor()\"\n [attr.aria-orientation]=\"lineOrientation()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-controls]=\"pane() === 'start' ? startId : endId\"\n [attr.aria-valuenow]=\"current()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (dblclick)=\"reset()\"\n (keydown)=\"onKeydown($event)\">\n</div>\n\n<div\n class=\"pane pane-end\"\n [id]=\"endId\">\n <ng-content select=\"[end]\" />\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{--_splitter-gap: var(--ds-splitter-gap, var(--space-2));--_splitter-line-color: var(--ds-splitter-line-color, var(--border-strong));--_splitter-drag-color: var(--ds-splitter-drag-color, var(--text-muted));--_splitter-grip-color: var(--ds-splitter-grip-color, var(--text-muted));--_splitter-overdrag-line-scale: var(--ds-splitter-overdrag-line-scale, 3);--_splitter-grip-dot: calc(var(--border-width-strong) + var(--border-width-default));--_splitter-sized: min(var(--_splitter-size), 100% - var(--_splitter-gap));--_splitter-rest: minmax(0, 1fr);display:grid;min-inline-size:0;min-block-size:0}:host([data-pane=start]){--_splitter-start: var(--_splitter-sized);--_splitter-end: var(--_splitter-rest)}:host([data-pane=end]){--_splitter-start: var(--_splitter-rest);--_splitter-end: var(--_splitter-sized)}:host([data-orientation=horizontal]){grid-template-columns:var(--_splitter-start) var(--_splitter-gap) var(--_splitter-end);grid-template-rows:minmax(0,1fr)}:host([data-orientation=vertical]){grid-template-columns:minmax(0,1fr);grid-template-rows:var(--_splitter-start) var(--_splitter-gap) var(--_splitter-end)}.pane{min-inline-size:0;min-block-size:0;overflow:auto}:host([data-orientation=horizontal]) .pane-start{transform-origin:left center}:host([data-orientation=horizontal]) .pane-end{transform-origin:right center}:host([data-orientation=vertical]) .pane-start{transform-origin:center top}:host([data-orientation=vertical]) .pane-end{transform-origin:center bottom}:host(.springing) :is(.pane,.handle){transition:transform var(--duration-slower) var(--ease-spring)}.handle{--_splitter-line-thickness: calc( 1 + (var(--_splitter-overdrag-line-scale) - 1) * var(--_splitter-pull-ratio, 0) )}:host([data-orientation=horizontal]) .handle:after{transform:scaleX(var(--_splitter-line-thickness))}:host([data-orientation=vertical]) .handle:after{transform:scaleY(var(--_splitter-line-thickness))}:host(.springing) .handle:after{transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard),transform var(--duration-slower) var(--ease-spring)}.handle{position:relative;touch-action:none;-webkit-user-select:none;user-select:none}.handle:after{position:absolute;content:\"\";background-color:var(--_splitter-line-color);border-radius:var(--radius-pill);opacity:0;transition:opacity var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.handle:before{position:absolute;inset-block-start:50%;inset-inline-start:50%;content:\"\";background-image:radial-gradient(circle closest-side,var(--_splitter-grip-color) 98%,transparent);background-position:0 0;translate:-50% -50%;transition:opacity var(--duration-fast) var(--ease-standard)}.handle:hover:after,.handle:hover:before{transition-delay:var(--duration-slow)}.handle:hover:after,.handle.dragging:after,.handle:focus-visible:after{opacity:1}.handle:hover:before,.handle.dragging:before,.handle:focus-visible:before{opacity:0}.handle.dragging:after{background-color:var(--_splitter-drag-color)}.handle.dragging:after,.handle.dragging:before{transition-delay:0s}@media not (forced-colors:active){.handle:focus-visible{outline:none}}.handle:focus-visible:after{background-color:var(--focus-ring-color)}:host([data-orientation=horizontal]) .handle:after{inset-block:0;inset-inline-start:calc(50% - var(--border-width-strong) / 2);inline-size:var(--border-width-strong)}:host([data-orientation=horizontal]) .handle:before{inline-size:var(--_splitter-grip-dot);block-size:calc(var(--_splitter-grip-dot) * 6);background-size:var(--_splitter-grip-dot) calc(var(--_splitter-grip-dot) * 2);background-repeat:repeat-y}:host([data-orientation=vertical]) .handle:after{inset-inline:0;inset-block-start:calc(50% - var(--border-width-strong) / 2);block-size:var(--border-width-strong)}:host([data-orientation=vertical]) .handle:before{inline-size:calc(var(--_splitter-grip-dot) * 6);block-size:var(--_splitter-grip-dot);background-size:calc(var(--_splitter-grip-dot) * 2) var(--_splitter-grip-dot);background-repeat:repeat-x}\n"] }]
352
+ }], ctorParameters: () => [], propDecorators: { handle: [{ type: i0.ViewChild, args: ['handle', { isSignal: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], pane: [{ type: i0.Input, args: [{ isSignal: true, alias: "pane", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], defaultSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSize", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], persistKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistKey", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], overdrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "overdrag", required: false }] }] } });
353
+
354
+ /**
355
+ * Generated bundle index. Do not edit.
356
+ */
357
+
358
+ export { SplitterComponent };
359
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-splitter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-splitter.mjs","sources":["../../../src/lib/components/splitter/splitter-dragging-styles.component.ts","../../../src/lib/components/splitter/splitter.component.ts","../../../src/lib/components/splitter/splitter.component.html","../../../src/lib/components/splitter/ids-group-ltd-ids-design-system-components-splitter.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\n/** @internal Never rendered: creating it once registers the page-wide drag rules globally. */\n@Component({\n standalone: true,\n template: '',\n styleUrl: './splitter-dragging.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SplitterDraggingStylesComponent {}\n","import { DOCUMENT } from '@angular/common';\nimport {\n Component,\n ElementRef,\n OnDestroy,\n NgZone,\n OnInit,\n ViewEncapsulation,\n computed,\n inject,\n input,\n model,\n numberAttribute,\n signal,\n viewChild,\n} from '@angular/core';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport {\n DS_INTL,\n DS_INTL_DEFAULTS,\n retainStyles,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { SplitterDraggingStylesComponent } from './splitter-dragging-styles.component';\nimport type {\n SplitterOrientation,\n SplitterOverdrag,\n SplitterPane,\n} from './splitter.types';\n\nconst STEP = 16;\nconst LARGE_STEP = 64;\n// The farthest the rubber band pulls past a limit, approached and never reached: 100px, and never more\n// than a third of the pane it squashes, whose content would otherwise read as distorted.\nconst OVERDRAG_CAP = 100;\nconst OVERDRAG_SQUASH = 1 / 3;\n\n/**\n * Two panes with a handle between them that resizes one of them. Slots: `[start]` and `[end]`.\n * Drag the handle, or focus it and use the arrow keys (Shift or PageUp / PageDown for a large step,\n * Home / End for the limits); a double click returns to `defaultSize`. Give the splitter a size: it\n * fills the box its parent gives it and never grows to its content.\n */\n@Component({\n selector: 'ds-splitter',\n standalone: true,\n templateUrl: './splitter.component.html',\n styleUrl: './splitter.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-pane]': 'pane()',\n '[style.--_splitter-size]': 'current() + \"px\"',\n '[class.springing]': 'springing()',\n },\n})\nexport class SplitterComponent implements OnInit, OnDestroy {\n private readonly intl = inject(DS_INTL);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n private readonly zone = inject(NgZone);\n private readonly handle =\n viewChild.required<ElementRef<HTMLElement>>('handle');\n\n /** `'horizontal'`: panes side by side. `'vertical'`: panes stacked. */\n readonly orientation = input<SplitterOrientation>('horizontal');\n /** The pane `size` measures; the other pane takes the rest. */\n readonly pane = input<SplitterPane>('start');\n /** Size of `pane` in px, two-way bound; `null` shows `defaultSize`. A drag writes it once, on release. */\n readonly size = model<number | null>(null);\n /** Size in px when `size` is `null`, and what a double click on the handle returns to. */\n readonly defaultSize = input(320, { transform: numberAttribute });\n /** Smallest size in px, inclusive. */\n readonly min = input(160, { transform: numberAttribute });\n /** Largest size in px, inclusive. The pane never takes more than the splitter less the handle. */\n readonly max = input(640, { transform: numberAttribute });\n /** Saves the size in `localStorage` under `ds-splitter:<key>` and restores it on init, over `size`. */\n readonly persistKey = input<string>('');\n /** Accessible name of the handle; unset falls back to `DS_INTL.splitter.label`. Name what it resizes. */\n readonly ariaLabel = input<string | null>(null);\n /** Dragged past `min` or `max`: `'elastic'` follows the pointer with growing resistance and springs\n * back on release, `'none'` stops at the limit. Off under `prefers-reduced-motion: reduce`. */\n readonly overdrag = input<SplitterOverdrag>('elastic');\n\n protected readonly startId = nextControlId('ds-splitter-pane');\n protected readonly endId = nextControlId('ds-splitter-pane');\n protected readonly dragging = signal(false);\n protected readonly springing = signal(false);\n protected readonly current = computed(() =>\n this.clamp(this.size() ?? this.defaultSize(), this.max()),\n );\n protected readonly cursor = computed(() => this.cursorFor(this.current()));\n protected readonly label = computed(\n () =>\n this.ariaLabel() ||\n this.intl().splitter?.label ||\n DS_INTL_DEFAULTS.splitter.label,\n );\n // ARIA names the orientation of the separator line, which is across the panes' axis.\n protected readonly lineOrientation = computed(() =>\n this.orientation() === 'horizontal' ? 'vertical' : 'horizontal',\n );\n\n private drag: {\n pointerId: number;\n grab: number;\n size: number;\n // Measured once at the grab: the rubber band transforms the panes, so their boxes are not read mid-drag.\n box: DOMRect;\n elastic: boolean;\n pull: number;\n } | null = null;\n private pendingMove: PointerEvent | null = null;\n private frame = 0;\n private springTimer = 0;\n\n constructor() {\n retainStyles(SplitterDraggingStylesComponent);\n }\n\n ngOnInit(): void {\n const key = this.storageKey();\n if (!key) {\n return;\n }\n try {\n const stored = Number(localStorage.getItem(key) ?? NaN);\n if (Number.isFinite(stored)) {\n this.size.set(stored);\n }\n } catch {\n // Storage blocked or absent (SSR): keep the bound size.\n }\n }\n\n ngOnDestroy(): void {\n this.endDrag();\n }\n\n protected onPointerDown(event: PointerEvent): void {\n if (event.button !== 0) {\n return;\n }\n event.preventDefault();\n const handle = this.handle().nativeElement;\n handle.setPointerCapture(event.pointerId);\n // A grab during the spring-back stops it where the layout puts the handle, before anything is measured.\n this.stopSpring();\n // The grab point's distance from the measured pane's edge stays fixed, so the handle never jumps.\n this.drag = {\n pointerId: event.pointerId,\n grab: this.fromPaneEdge(event, handle.getBoundingClientRect()),\n size: this.current(),\n box: this.panesBox(),\n elastic:\n this.overdrag() === 'elastic' &&\n !this.document.defaultView?.matchMedia(\n '(prefers-reduced-motion: reduce)',\n ).matches,\n pull: 0,\n };\n this.dragging.set(true);\n // Outside Angular: a move writes the DOM itself, so it must not start change detection per frame.\n this.zone.runOutsideAngular(() =>\n handle.addEventListener('pointermove', this.onPointerMove),\n );\n const root = this.document.documentElement;\n root.setAttribute('data-ds-splitter-dragging', '');\n root.style.setProperty('--_ds-splitter-cursor', this.cursor());\n }\n\n private readonly onPointerMove = (event: PointerEvent): void => {\n if (event.pointerId !== this.drag?.pointerId) {\n return;\n }\n this.pendingMove = event;\n if (!this.frame) {\n this.frame = requestAnimationFrame(() => this.applyMove());\n }\n };\n\n private applyMove(): void {\n this.frame = 0;\n const event = this.pendingMove;\n this.pendingMove = null;\n if (!event || !this.drag) {\n return;\n }\n const { box } = this.drag;\n const raw = this.fromPaneEdge(event, box) - this.drag.grab;\n const room = this.room(box);\n const size = this.clamp(Math.round(raw), room);\n if (this.drag.elastic) {\n // Against the unrounded limit: within min and max the excess is exactly 0, not the rounding.\n this.stretch(raw - this.clamp(raw, room));\n }\n if (size === this.drag.size) {\n return;\n }\n this.drag.size = size;\n // Written straight to the DOM: no change detection per frame. `size` is set once, on release.\n const cursor = this.cursorFor(size);\n const handle = this.handle().nativeElement;\n this.host.nativeElement.style.setProperty('--_splitter-size', `${size}px`);\n handle.setAttribute('aria-valuenow', String(size));\n handle.style.cursor = cursor;\n this.document.documentElement.style.setProperty(\n '--_ds-splitter-cursor',\n cursor,\n );\n }\n\n // Past a limit by `excess` px of size, the pull approaches the cap and never reaches it. The handle\n // moves by the pull, the measured pane stretches by it and the other squashes by it (the other way\n // round past `min`), each from its outer edge, so no gap opens. Transforms only: the layout keeps\n // the clamped size.\n private stretch(excess: number): void {\n const drag = this.drag!;\n const [handle, measured, other] = this.movingParts();\n const horizontal = this.orientation() === 'horizontal';\n const extent = (element: HTMLElement) =>\n horizontal ? element.offsetWidth : element.offsetHeight;\n const squashed = excess > 0 ? other : measured;\n const cap = Math.min(OVERDRAG_CAP, extent(squashed) * OVERDRAG_SQUASH);\n const pull =\n cap > 0\n ? Math.sign(excess) * cap * (1 - 1 / (Math.abs(excess) / cap + 1))\n : 0;\n if (pull === drag.pull) {\n return;\n }\n drag.pull = pull;\n if (pull === 0) {\n this.clearTransforms();\n\n return;\n }\n const scale = horizontal ? 'scaleX' : 'scaleY';\n const shift = this.pane() === 'start' ? pull : -pull;\n handle.style.transform = `translate${horizontal ? 'X' : 'Y'}(${shift}px)`;\n // The line thickens on the same resistance curve; a custom property, because the line is a pseudo-element.\n handle.style.setProperty(\n '--_splitter-pull-ratio',\n String(Math.abs(pull) / cap),\n );\n measured.style.transform = `${scale}(${(extent(measured) + pull) / extent(measured)})`;\n other.style.transform = `${scale}(${Math.max(0, extent(other) - pull) / extent(other)})`;\n }\n\n // The handle, the pane `size` measures, then the other pane.\n private movingParts(): [HTMLElement, HTMLElement, HTMLElement] {\n const handle = this.handle().nativeElement;\n const start = handle.previousElementSibling as HTMLElement;\n const end = handle.nextElementSibling as HTMLElement;\n\n return this.pane() === 'start'\n ? [handle, start, end]\n : [handle, end, start];\n }\n\n private clearTransforms(): void {\n for (const element of this.movingParts()) {\n element.style.transform = '';\n }\n this.handle().nativeElement.style.removeProperty('--_splitter-pull-ratio');\n }\n\n private stopSpring(): void {\n clearTimeout(this.springTimer);\n this.springing.set(false);\n this.clearTransforms();\n }\n\n // The class adds the transition; clearing the transforms in the next frame plays it back to rest.\n private springBack(): void {\n this.springing.set(true);\n this.zone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n this.clearTransforms();\n this.springTimer = window.setTimeout(\n () => this.zone.run(() => this.springing.set(false)),\n 600,\n );\n });\n });\n }\n\n protected onPointerUp(event: PointerEvent): void {\n if (event.pointerId !== this.drag?.pointerId) {\n return;\n }\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n this.applyMove();\n }\n const { size, pull } = this.drag;\n this.endDrag();\n if (pull !== 0) {\n this.springBack();\n }\n if (size !== this.current()) {\n this.commit(size);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const horizontal = this.orientation() === 'horizontal';\n // An arrow moves the handle; the end pane grows as the handle moves towards the start.\n const towardsEnd = this.pane() === 'start' ? 1 : -1;\n const step = event.shiftKey ? LARGE_STEP : STEP;\n const now = this.current();\n const next: Record<string, number> = {\n [horizontal ? 'ArrowRight' : 'ArrowDown']: now + step * towardsEnd,\n [horizontal ? 'ArrowLeft' : 'ArrowUp']: now - step * towardsEnd,\n PageUp: now + LARGE_STEP,\n PageDown: now - LARGE_STEP,\n Home: this.min(),\n End: this.max(),\n };\n if (!(event.key in next)) {\n return;\n }\n event.preventDefault();\n this.commit(this.clampToBox(next[event.key]));\n }\n\n protected reset(): void {\n this.size.set(null);\n const key = this.storageKey();\n if (key) {\n try {\n localStorage.removeItem(key);\n } catch {\n // Storage blocked: the reset still applies for this session.\n }\n }\n }\n\n private commit(size: number): void {\n this.size.set(size);\n const key = this.storageKey();\n if (key) {\n try {\n localStorage.setItem(key, String(size));\n } catch {\n // Full or blocked: a lost pane size is not worth an error.\n }\n }\n }\n\n private endDrag(): void {\n if (!this.drag) {\n return;\n }\n const handle = this.handle().nativeElement;\n handle.removeEventListener('pointermove', this.onPointerMove);\n cancelAnimationFrame(this.frame);\n this.frame = 0;\n this.pendingMove = null;\n try {\n handle.releasePointerCapture(this.drag.pointerId);\n } catch {\n // The pointer can already be gone.\n }\n this.drag = null;\n this.dragging.set(false);\n const root = this.document.documentElement;\n root.removeAttribute('data-ds-splitter-dragging');\n root.style.removeProperty('--_ds-splitter-cursor');\n }\n\n private storageKey(): string | null {\n const key = this.persistKey().trim();\n\n return key ? `ds-splitter:${key}` : null;\n }\n\n // ponytail: left-to-right only; under `dir=\"rtl\"` a horizontal start pane is measured from the left.\n private fromPaneEdge(event: PointerEvent, box: DOMRect): number {\n const horizontal = this.orientation() === 'horizontal';\n if (this.pane() === 'start') {\n return horizontal ? event.clientX - box.left : event.clientY - box.top;\n }\n\n return horizontal ? box.right - event.clientX : box.bottom - event.clientY;\n }\n\n private clamp(size: number, upper: number): number {\n return Math.max(this.min(), Math.min(upper, size));\n }\n\n private clampToBox(size: number): number {\n return this.clamp(size, this.room(this.panesBox()));\n }\n\n private room(box: DOMRect): number {\n const handle = this.handle().nativeElement;\n const room =\n this.orientation() === 'horizontal'\n ? box.width - handle.offsetWidth\n : box.height - handle.offsetHeight;\n\n return Math.min(this.max(), room);\n }\n\n // From the start pane's leading edge to the end pane's trailing edge: the host's border and\n // padding lie outside it.\n private panesBox(): DOMRect {\n const handle = this.handle().nativeElement;\n const start = (\n handle.previousElementSibling as HTMLElement\n ).getBoundingClientRect();\n const end = (\n handle.nextElementSibling as HTMLElement\n ).getBoundingClientRect();\n\n return new DOMRect(\n start.left,\n start.top,\n end.right - start.left,\n end.bottom - start.top,\n );\n }\n\n // At a limit the cursor shows the one direction the handle can still move. `ew-resize`, not\n // `col-resize`: Windows draws `ew`, `e` and `w-resize` alike, so the cursor keeps its shape there.\n private cursorFor(size: number): string {\n const horizontal = this.orientation() === 'horizontal';\n const atMin = size <= this.min();\n if (!atMin && size < this.max()) {\n return horizontal ? 'ew-resize' : 'ns-resize';\n }\n const towardsEnd = this.pane() === 'start' ? atMin : !atMin;\n if (horizontal) {\n return towardsEnd ? 'e-resize' : 'w-resize';\n }\n\n return towardsEnd ? 's-resize' : 'n-resize';\n }\n}\n","<div\n class=\"pane pane-start\"\n [id]=\"startId\">\n <ng-content select=\"[start]\" />\n</div>\n\n<div\n #handle\n class=\"handle\"\n role=\"separator\"\n tabindex=\"0\"\n [class.dragging]=\"dragging()\"\n [style.cursor]=\"cursor()\"\n [attr.aria-orientation]=\"lineOrientation()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-controls]=\"pane() === 'start' ? startId : endId\"\n [attr.aria-valuenow]=\"current()\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (dblclick)=\"reset()\"\n (keydown)=\"onKeydown($event)\">\n</div>\n\n<div\n class=\"pane pane-end\"\n [id]=\"endId\">\n <ng-content select=\"[end]\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;MAQa,+BAA+B,CAAA;wGAA/B,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA/B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,+BAA+B,wEALhC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,gLAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4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AA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7DxD;;AAEG;;;;"}
@@ -56,7 +56,7 @@ class StepperComponent {
56
56
  }
57
57
  }
58
58
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StepperComponent, isStandalone: true, selector: "ds-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, errorSteps: { classPropertyName: "errorSteps", publicName: "errorSteps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepClicked: "stepClicked" }, host: { attributes: { "role": "list" }, properties: { "attr.aria-label": "intl().stepper.label", "class.labels-inline": "labelPosition() === 'inline'", "class.is-vertical": "orientation() === 'vertical'" } }, ngImport: i0, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n {{ i + 1 }}\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n {{ i + 1 }}\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;align-items:flex-start;--_stepper-label-color: var(--ds-stepper-label-color, var(--text-tertiary));--_stepper-label-color-current: var(--ds-stepper-label-color-current, var(--text-primary));--_stepper-label-font-size: var(--ds-stepper-label-font-size, var(--font-size-xs));--_stepper-node-bg-color: var(--ds-stepper-node-bg-color, var(--surface-default));--_stepper-node-active-bg-color: var(--ds-stepper-node-active-bg-color, var(--accent));--_stepper-node-active-text-color: var(--ds-stepper-node-active-text-color, var(--accent-on));--_stepper-node-done-text-color: var(--ds-stepper-node-done-text-color, var(--accent));--_stepper-connector-color: var(--ds-stepper-connector-color, var(--border-divider));--_stepper-connector-done-color: var(--ds-stepper-connector-done-color, var(--accent))}:host .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host .step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}:host .node{position:relative;z-index:1;width:var(--stepper-node-size);height:var(--stepper-node-size);border-radius:var(--radius-pill);display:grid;place-items:center;border:var(--border-width-default) solid var(--border-strong);background:var(--_stepper-node-bg-color);color:var(--text-tertiary);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);transition:background-color var(--duration-base) var(--ease-standard),border-color var(--duration-base) var(--ease-standard),color var(--duration-base) var(--ease-standard)}:host .node.done{background:var(--accent-subtitle);border-color:var(--accent);color:var(--_stepper-node-done-text-color)}:host .node.active{background:var(--_stepper-node-active-bg-color);border-color:var(--accent);color:var(--_stepper-node-active-text-color)}:host .node.error{background:var(--error-subtitle);border-color:var(--error);color:var(--error)}:host button.node{padding:0;appearance:none;cursor:pointer}:host button.node: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)}:host .connector{position:absolute;z-index:0;top:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);left:50%;width:100%;height:var(--stepper-bar-h);background:var(--_stepper-connector-color);transition:background-color var(--duration-base) var(--ease-standard)}:host .connector.done{background:var(--_stepper-connector-done-color)}:host .step-label{max-width:14ch;margin-top:var(--space-2);font-size:var(--_stepper-label-font-size);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);color:var(--_stepper-label-color);overflow-wrap:anywhere;transition:color var(--duration-base) var(--ease-standard)}:host .step.is-current .step-label{font-weight:var(--font-weight-bold);color:var(--_stepper-label-color-current)}:host(.labels-inline){display:inline-flex;align-items:center;gap:var(--space-2)}:host(.labels-inline) .step{flex:0 0 auto;flex-direction:row;gap:var(--space-2)}:host(.labels-inline) .step-label{max-width:none;margin-top:0;white-space:nowrap}:host(.labels-inline) .connector{position:static;flex:0 0 auto;width:var(--stepper-bar-w)}:host(.is-vertical){flex-direction:column;align-items:stretch}:host(.is-vertical) .step{flex:0 0 auto;flex-direction:row;align-items:flex-start;text-align:left;gap:var(--space-3);padding-bottom:var(--space-4)}:host(.is-vertical) .step:last-child{padding-bottom:0}:host(.is-vertical) .step-label{max-width:none;margin-top:0;align-self:center}:host(.is-vertical) .connector{position:absolute;top:var(--stepper-node-size);left:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);width:var(--stepper-bar-h);height:calc(100% - var(--stepper-node-size))}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
59
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: StepperComponent, isStandalone: true, selector: "ds-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, errorSteps: { classPropertyName: "errorSteps", publicName: "errorSteps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepClicked: "stepClicked" }, host: { attributes: { "role": "list" }, properties: { "attr.aria-label": "intl().stepper.label", "class.labels-inline": "labelPosition() === 'inline'", "class.is-vertical": "orientation() === 'vertical'" } }, ngImport: i0, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">{{ i + 1 }}</span>\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">{{ i + 1 }}</span>\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;align-items:flex-start;--_stepper-label-color: var(--ds-stepper-label-color, var(--text-tertiary));--_stepper-label-color-current: var(--ds-stepper-label-color-current, var(--text-primary));--_stepper-label-font-size: var(--ds-stepper-label-font-size, var(--font-size-xs));--_stepper-node-bg-color: var(--ds-stepper-node-bg-color, var(--surface-default));--_stepper-node-active-bg-color: var(--ds-stepper-node-active-bg-color, var(--accent));--_stepper-node-active-text-color: var(--ds-stepper-node-active-text-color, var(--accent-on));--_stepper-node-done-text-color: var(--ds-stepper-node-done-text-color, var(--accent));--_stepper-connector-color: var(--ds-stepper-connector-color, var(--border-divider));--_stepper-connector-done-color: var(--ds-stepper-connector-done-color, var(--accent))}:host .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host .step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}:host .node{position:relative;z-index:1;width:var(--stepper-node-size);height:var(--stepper-node-size);border-radius:var(--radius-pill);display:grid;place-items:center;border:var(--border-width-default) solid var(--text-tertiary);background:var(--_stepper-node-bg-color);color:var(--text-tertiary);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);transition:background-color var(--duration-base) var(--ease-standard),border-color var(--duration-base) var(--ease-standard),color var(--duration-base) var(--ease-standard)}:host .node .number{display:inline-block;translate:0 .033em}:host .node.done{background:var(--accent-subtitle);border-color:var(--accent);color:var(--_stepper-node-done-text-color)}:host .node.active{background:var(--_stepper-node-active-bg-color);border-color:var(--accent);color:var(--_stepper-node-active-text-color)}:host .node.error{background:var(--error-subtitle);border-color:var(--error);color:var(--error)}:host button.node{padding:0;appearance:none;cursor:pointer}:host button.node: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)}:host .connector{position:absolute;z-index:0;top:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);left:50%;width:100%;height:var(--stepper-bar-h);background:var(--_stepper-connector-color);transition:background-color var(--duration-base) var(--ease-standard)}:host .connector.done{background:var(--_stepper-connector-done-color)}:host .step-label{max-width:14ch;margin-top:var(--space-2);font-size:var(--_stepper-label-font-size);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);color:var(--_stepper-label-color);overflow-wrap:anywhere;transition:color var(--duration-base) var(--ease-standard)}:host .step.is-current .step-label{font-weight:var(--font-weight-bold);color:var(--_stepper-label-color-current)}:host(.labels-inline){display:inline-flex;align-items:center;gap:var(--space-2)}:host(.labels-inline) .step{flex:0 0 auto;flex-direction:row;gap:var(--space-2)}:host(.labels-inline) .step-label{max-width:none;margin-top:0;white-space:nowrap}:host(.labels-inline) .connector{position:static;flex:0 0 auto;width:var(--stepper-bar-w)}:host(.is-vertical){flex-direction:column;align-items:stretch}:host(.is-vertical) .step{flex:0 0 auto;flex-direction:row;align-items:flex-start;text-align:left;gap:var(--space-3);padding-bottom:var(--space-4)}:host(.is-vertical) .step:last-child{padding-bottom:0}:host(.is-vertical) .step-label{max-width:none;margin-top:0;align-self:center}:host(.is-vertical) .connector{position:absolute;top:var(--stepper-node-size);left:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);width:var(--stepper-bar-h);height:calc(100% - var(--stepper-node-size))}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
60
60
  }
61
61
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: StepperComponent, decorators: [{
62
62
  type: Component,
@@ -65,7 +65,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
65
65
  '[attr.aria-label]': 'intl().stepper.label',
66
66
  '[class.labels-inline]': "labelPosition() === 'inline'",
67
67
  '[class.is-vertical]': "orientation() === 'vertical'",
68
- }, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n {{ i + 1 }}\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n {{ i + 1 }}\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;align-items:flex-start;--_stepper-label-color: var(--ds-stepper-label-color, var(--text-tertiary));--_stepper-label-color-current: var(--ds-stepper-label-color-current, var(--text-primary));--_stepper-label-font-size: var(--ds-stepper-label-font-size, var(--font-size-xs));--_stepper-node-bg-color: var(--ds-stepper-node-bg-color, var(--surface-default));--_stepper-node-active-bg-color: var(--ds-stepper-node-active-bg-color, var(--accent));--_stepper-node-active-text-color: var(--ds-stepper-node-active-text-color, var(--accent-on));--_stepper-node-done-text-color: var(--ds-stepper-node-done-text-color, var(--accent));--_stepper-connector-color: var(--ds-stepper-connector-color, var(--border-divider));--_stepper-connector-done-color: var(--ds-stepper-connector-done-color, var(--accent))}:host .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host .step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}:host .node{position:relative;z-index:1;width:var(--stepper-node-size);height:var(--stepper-node-size);border-radius:var(--radius-pill);display:grid;place-items:center;border:var(--border-width-default) solid var(--border-strong);background:var(--_stepper-node-bg-color);color:var(--text-tertiary);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);transition:background-color var(--duration-base) var(--ease-standard),border-color var(--duration-base) var(--ease-standard),color var(--duration-base) var(--ease-standard)}:host .node.done{background:var(--accent-subtitle);border-color:var(--accent);color:var(--_stepper-node-done-text-color)}:host .node.active{background:var(--_stepper-node-active-bg-color);border-color:var(--accent);color:var(--_stepper-node-active-text-color)}:host .node.error{background:var(--error-subtitle);border-color:var(--error);color:var(--error)}:host button.node{padding:0;appearance:none;cursor:pointer}:host button.node: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)}:host .connector{position:absolute;z-index:0;top:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);left:50%;width:100%;height:var(--stepper-bar-h);background:var(--_stepper-connector-color);transition:background-color var(--duration-base) var(--ease-standard)}:host .connector.done{background:var(--_stepper-connector-done-color)}:host .step-label{max-width:14ch;margin-top:var(--space-2);font-size:var(--_stepper-label-font-size);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);color:var(--_stepper-label-color);overflow-wrap:anywhere;transition:color var(--duration-base) var(--ease-standard)}:host .step.is-current .step-label{font-weight:var(--font-weight-bold);color:var(--_stepper-label-color-current)}:host(.labels-inline){display:inline-flex;align-items:center;gap:var(--space-2)}:host(.labels-inline) .step{flex:0 0 auto;flex-direction:row;gap:var(--space-2)}:host(.labels-inline) .step-label{max-width:none;margin-top:0;white-space:nowrap}:host(.labels-inline) .connector{position:static;flex:0 0 auto;width:var(--stepper-bar-w)}:host(.is-vertical){flex-direction:column;align-items:stretch}:host(.is-vertical) .step{flex:0 0 auto;flex-direction:row;align-items:flex-start;text-align:left;gap:var(--space-3);padding-bottom:var(--space-4)}:host(.is-vertical) .step:last-child{padding-bottom:0}:host(.is-vertical) .step-label{max-width:none;margin-top:0;align-self:center}:host(.is-vertical) .connector{position:absolute;top:var(--stepper-node-size);left:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);width:var(--stepper-bar-h);height:calc(100% - var(--stepper-node-size))}\n"] }]
68
+ }, template: "@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">{{ i + 1 }}</span>\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">{{ i + 1 }}</span>\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:flex;align-items:flex-start;--_stepper-label-color: var(--ds-stepper-label-color, var(--text-tertiary));--_stepper-label-color-current: var(--ds-stepper-label-color-current, var(--text-primary));--_stepper-label-font-size: var(--ds-stepper-label-font-size, var(--font-size-xs));--_stepper-node-bg-color: var(--ds-stepper-node-bg-color, var(--surface-default));--_stepper-node-active-bg-color: var(--ds-stepper-node-active-bg-color, var(--accent));--_stepper-node-active-text-color: var(--ds-stepper-node-active-text-color, var(--accent-on));--_stepper-node-done-text-color: var(--ds-stepper-node-done-text-color, var(--accent));--_stepper-connector-color: var(--ds-stepper-connector-color, var(--border-divider));--_stepper-connector-done-color: var(--ds-stepper-connector-done-color, var(--accent))}:host .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host .step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center}:host .node{position:relative;z-index:1;width:var(--stepper-node-size);height:var(--stepper-node-size);border-radius:var(--radius-pill);display:grid;place-items:center;border:var(--border-width-default) solid var(--text-tertiary);background:var(--_stepper-node-bg-color);color:var(--text-tertiary);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);transition:background-color var(--duration-base) var(--ease-standard),border-color var(--duration-base) var(--ease-standard),color var(--duration-base) var(--ease-standard)}:host .node .number{display:inline-block;translate:0 .033em}:host .node.done{background:var(--accent-subtitle);border-color:var(--accent);color:var(--_stepper-node-done-text-color)}:host .node.active{background:var(--_stepper-node-active-bg-color);border-color:var(--accent);color:var(--_stepper-node-active-text-color)}:host .node.error{background:var(--error-subtitle);border-color:var(--error);color:var(--error)}:host button.node{padding:0;appearance:none;cursor:pointer}:host button.node: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)}:host .connector{position:absolute;z-index:0;top:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);left:50%;width:100%;height:var(--stepper-bar-h);background:var(--_stepper-connector-color);transition:background-color var(--duration-base) var(--ease-standard)}:host .connector.done{background:var(--_stepper-connector-done-color)}:host .step-label{max-width:14ch;margin-top:var(--space-2);font-size:var(--_stepper-label-font-size);font-weight:var(--font-weight-medium);line-height:var(--line-height-snug);color:var(--_stepper-label-color);overflow-wrap:anywhere;transition:color var(--duration-base) var(--ease-standard)}:host .step.is-current .step-label{font-weight:var(--font-weight-bold);color:var(--_stepper-label-color-current)}:host(.labels-inline){display:inline-flex;align-items:center;gap:var(--space-2)}:host(.labels-inline) .step{flex:0 0 auto;flex-direction:row;gap:var(--space-2)}:host(.labels-inline) .step-label{max-width:none;margin-top:0;white-space:nowrap}:host(.labels-inline) .connector{position:static;flex:0 0 auto;width:var(--stepper-bar-w)}:host(.is-vertical){flex-direction:column;align-items:stretch}:host(.is-vertical) .step{flex:0 0 auto;flex-direction:row;align-items:flex-start;text-align:left;gap:var(--space-3);padding-bottom:var(--space-4)}:host(.is-vertical) .step:last-child{padding-bottom:0}:host(.is-vertical) .step-label{max-width:none;margin-top:0;align-self:center}:host(.is-vertical) .connector{position:absolute;top:var(--stepper-node-size);left:calc((var(--stepper-node-size) - var(--stepper-bar-h)) / 2);width:var(--stepper-bar-h);height:calc(100% - var(--stepper-node-size))}\n"] }]
69
69
  }], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], errorSteps: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorSteps", required: false }] }], stepClicked: [{ type: i0.Output, args: ["stepClicked"] }] } });
70
70
 
71
71
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-stepper.mjs","sources":["../../../src/lib/components/stepper/stepper.component.ts","../../../src/lib/components/stepper/stepper.component.html","../../../src/lib/components/stepper/ids-group-ltd-ids-design-system-components-stepper.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/** Where the step caption sits: beneath its node (`bottom`) or beside it (`inline`, compact row). */\nexport type StepperLabelPosition = 'bottom' | 'inline';\n\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n@Component({\n selector: 'ds-stepper',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './stepper.component.html',\n styleUrl: './stepper.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'list',\n '[attr.aria-label]': 'intl().stepper.label',\n '[class.labels-inline]': \"labelPosition() === 'inline'\",\n '[class.is-vertical]': \"orientation() === 'vertical'\",\n },\n})\nexport class StepperComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Step labels in order; one node per entry. */\n readonly steps = input<readonly string[]>([]);\n /** Zero-based index of the active step; earlier steps render as completed. */\n readonly current = input<number>(0);\n /** Where the step caption sits relative to its node. */\n readonly labelPosition = input<StepperLabelPosition>('bottom');\n /** Layout axis of the stepper. */\n readonly orientation = input<StepperOrientation>('horizontal');\n /** Renders each step node as a button that emits its index. */\n readonly clickable = input(false, { transform: booleanAttribute });\n /** Zero-based indices of steps in an error state. Error wins over completed/current/upcoming. */\n readonly errorSteps = input<readonly number[]>([]);\n\n /** Fires with a step's index when activated; only when `clickable`. */\n readonly stepClicked = output<number>();\n\n protected stepState(\n index: number,\n ): 'error' | 'completed' | 'current' | 'upcoming' {\n if (this.errorSteps().includes(index)) {\n return 'error';\n }\n const currentStep = this.current();\n if (index < currentStep) {\n return 'completed';\n }\n if (index === currentStep) {\n return 'current';\n }\n\n return 'upcoming';\n }\n\n protected nodeClass(index: number): string {\n const state = this.stepState(index);\n if (state === 'error') {\n return 'node error';\n }\n if (state === 'completed') {\n return 'node done';\n }\n if (state === 'current') {\n return 'node active';\n }\n\n return 'node';\n }\n\n protected connectorClass(index: number): string {\n return index < this.current() && !this.errorSteps().includes(index)\n ? 'connector done'\n : 'connector';\n }\n\n protected onStepClick(index: number): void {\n if (this.clickable()) {\n this.stepClicked.emit(index);\n }\n }\n}\n","@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n {{ i + 1 }}\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n {{ i + 1 }}\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA8Ba,gBAAgB,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,KAAK,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AA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,qBAAA,EAAA,8BAAA,EAAA,mBAAA,EAAA,8BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC9B7B,6iDA8DA,EAAA,MAAA,EAAA,CAAA,i6IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED3CY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAWZ,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAd5B,SAAS;+BACE,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,mBAAmB,EAAE,sBAAsB;AAC3C,wBAAA,uBAAuB,EAAE,8BAA8B;AACvD,wBAAA,qBAAqB,EAAE,8BAA8B;AACtD,qBAAA,EAAA,QAAA,EAAA,6iDAAA,EAAA,MAAA,EAAA,CAAA,i6IAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-stepper.mjs","sources":["../../../src/lib/components/stepper/stepper.component.ts","../../../src/lib/components/stepper/stepper.component.html","../../../src/lib/components/stepper/ids-group-ltd-ids-design-system-components-stepper.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n/** Where the step caption sits: beneath its node (`bottom`) or beside it (`inline`, compact row). */\nexport type StepperLabelPosition = 'bottom' | 'inline';\n\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n@Component({\n selector: 'ds-stepper',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './stepper.component.html',\n styleUrl: './stepper.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'list',\n '[attr.aria-label]': 'intl().stepper.label',\n '[class.labels-inline]': \"labelPosition() === 'inline'\",\n '[class.is-vertical]': \"orientation() === 'vertical'\",\n },\n})\nexport class StepperComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Step labels in order; one node per entry. */\n readonly steps = input<readonly string[]>([]);\n /** Zero-based index of the active step; earlier steps render as completed. */\n readonly current = input<number>(0);\n /** Where the step caption sits relative to its node. */\n readonly labelPosition = input<StepperLabelPosition>('bottom');\n /** Layout axis of the stepper. */\n readonly orientation = input<StepperOrientation>('horizontal');\n /** Renders each step node as a button that emits its index. */\n readonly clickable = input(false, { transform: booleanAttribute });\n /** Zero-based indices of steps in an error state. Error wins over completed/current/upcoming. */\n readonly errorSteps = input<readonly number[]>([]);\n\n /** Fires with a step's index when activated; only when `clickable`. */\n readonly stepClicked = output<number>();\n\n protected stepState(\n index: number,\n ): 'error' | 'completed' | 'current' | 'upcoming' {\n if (this.errorSteps().includes(index)) {\n return 'error';\n }\n const currentStep = this.current();\n if (index < currentStep) {\n return 'completed';\n }\n if (index === currentStep) {\n return 'current';\n }\n\n return 'upcoming';\n }\n\n protected nodeClass(index: number): string {\n const state = this.stepState(index);\n if (state === 'error') {\n return 'node error';\n }\n if (state === 'completed') {\n return 'node done';\n }\n if (state === 'current') {\n return 'node active';\n }\n\n return 'node';\n }\n\n protected connectorClass(index: number): string {\n return index < this.current() && !this.errorSteps().includes(index)\n ? 'connector done'\n : 'connector';\n }\n\n protected onStepClick(index: number): void {\n if (this.clickable()) {\n this.stepClicked.emit(index);\n }\n }\n}\n","@for (label of steps(); track $index; let i = $index, last = $last) {\n <span\n role=\"listitem\"\n class=\"step\"\n [class.is-current]=\"i === current()\"\n [attr.aria-current]=\"i === current() ? 'step' : null\">\n @if (clickable()) {\n <button\n type=\"button\"\n [class]=\"nodeClass(i)\"\n [attr.aria-label]=\"intl().stepper.step(i + 1, label, stepState(i))\"\n (click)=\"onStepClick(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">{{ i + 1 }}</span>\n }\n </button>\n } @else {\n <span\n aria-hidden=\"true\"\n [class]=\"nodeClass(i)\">\n @if (stepState(i) === 'completed') {\n <ds-icon\n name=\"check\"\n [size]=\"14\" />\n } @else if (stepState(i) === 'error') {\n <ds-icon\n name=\"error\"\n [size]=\"14\" />\n } @else {\n <span class=\"number\">{{ i + 1 }}</span>\n }\n </span>\n }\n\n <span\n aria-hidden=\"true\"\n class=\"step-label\">\n {{ label }}\n </span>\n\n @if (!last) {\n <span\n aria-hidden=\"true\"\n [class]=\"connectorClass(i)\">\n </span>\n }\n\n @if (!clickable()) {\n <span class=\"visually-hidden\">\n {{ intl().stepper.step(i + 1, label, stepState(i)) }}\n </span>\n }\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA8Ba,gBAAgB,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,KAAK,GAAG,KAAK,CAAoB,EAAE,4EAAC;;AAEpC,IAAA,OAAO,GAAG,KAAK,CAAS,CAAC,8EAAC;;AAE1B,IAAA,aAAa,GAAG,KAAK,CAAuB,QAAQ,oFAAC;;AAErD,IAAA,WAAW,GAAG,KAAK,CAAqB,YAAY,kFAAC;;IAErD,SAAS,GAAG,KAAK,CAAC,KAAK,iFAAI,SAAS,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