@ids-group-ltd/ids-design-system 0.14.5 → 0.14.6-beta.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.
- package/CHANGELOG.md +24 -9
- package/components.md +1 -1
- package/docs/agent/charts/ds-config.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +7 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/migrations/0.14.5.json +3 -3
- package/migrations/0.14.6-beta.0.json +9 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +4 -1
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-core.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 0.14.6-beta.0 — 2026-09-30
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`ds-breadcrumbs` crumbs can carry a hover surface.** `--ds-breadcrumbs-bg-color-hover` (default
|
|
8
|
+
`transparent`) tints a link on hover, `--ds-breadcrumbs-padding` (default `0`) pads every crumb,
|
|
9
|
+
the current one included, so labels stay on one baseline, and `--ds-breadcrumbs-radius` (default
|
|
10
|
+
`var(--radius-sm)`) rounds the surface and the focus ring. Rendering is unchanged until one is set.
|
|
11
|
+
|
|
12
|
+
- **A `slash` icon.** `<ds-breadcrumbs separator="slash">` separates crumbs with a "/" in the
|
|
13
|
+
weight of `chevronRight`.
|
|
14
|
+
|
|
3
15
|
## 0.14.5 — 2026-09-30
|
|
4
16
|
|
|
5
17
|
### Breaking
|
|
@@ -40,7 +52,9 @@
|
|
|
40
52
|
- **Three chart tokens lose their declared defaults and fall back to `--ds-chart-bg-color`.**
|
|
41
53
|
`--ds-chart-frame-bg-color`, `--ds-chart-focus-halo-color` and `--ds-chart-hatch-color` no longer
|
|
42
54
|
declare a value; each resolves to `--ds-chart-bg-color` (default `var(--surface-default)`) unless
|
|
43
|
-
you set it. The focus halo, which was white, is now the chart background.
|
|
55
|
+
you set it. The focus halo, which was white, is now the chart background. The hatched swatch in a
|
|
56
|
+
chart tooltip reads `--ds-chart-hatch-color` with `var(--surface-default)` as its fallback, so
|
|
57
|
+
`--ds-chart-bg-color` does not reach it. Setting any of the three
|
|
44
58
|
still overrides as before; reading one in your own CSS, which used to resolve to its old default,
|
|
45
59
|
now resolves to nothing.
|
|
46
60
|
|
|
@@ -55,8 +69,8 @@
|
|
|
55
69
|
|
|
56
70
|
- **Subclassing a chart breaks on moved, grown and renamed members.** The inputs every chart shares
|
|
57
71
|
(`caption`, `summary`, `frame`, `loading`, `error`, `emptyText`, `errorText`, `valueFormat`,
|
|
58
|
-
`interactive`, `tooltipSwatches`, `tooltipLingerMs`, `pinOnClick`)
|
|
59
|
-
to an internal base class (`DsChartBase`) that `BarChartComponent`, `ChartComponent`,
|
|
72
|
+
`interactive`, `tooltipSwatches`, `tooltipLingerMs`, `pinOnClick`), their resolved signals and the
|
|
73
|
+
protected `defaults` and `intl` move to an internal base class (`DsChartBase`) that `BarChartComponent`, `ChartComponent`,
|
|
60
74
|
`ColumnChartComponent`, `FunnelChartComponent`, `HeatmapChartComponent`, `LineChartComponent`,
|
|
61
75
|
`PieChartComponent`, `ScatterChartComponent` and `WaterfallChartComponent` extend, each dropping
|
|
62
76
|
its own declaration of them. On top of that: `ChartComponent` loses `cursorPin` and
|
|
@@ -82,8 +96,8 @@
|
|
|
82
96
|
|
|
83
97
|
- **`--ds-chart-bg-color` paints the chart frame and every knockout.** A new token, default
|
|
84
98
|
`var(--surface-default)`. It fills the frame background and every knockout cut into the plot:
|
|
85
|
-
stacked line band separators, the line halo, the outlined line-marker ring, stacked-column
|
|
86
|
-
|
|
99
|
+
stacked line band separators, the line halo, the outlined line-marker ring, stacked-column hatch
|
|
100
|
+
stripes, bar segment seams, reference-label and annotation halos, the pie centre-text
|
|
87
101
|
knockout and the focus halo. Set it to the surface the chart sits on - a card, say - and the frame
|
|
88
102
|
and every knockout match it. A second new token, `--ds-chart-plot-bg-color` (default
|
|
89
103
|
`transparent`), fills the plot area of `ds-chart` and `ds-scatter-chart`.
|
|
@@ -138,12 +152,13 @@
|
|
|
138
152
|
|
|
139
153
|
- **A clipped `ds-breadcrumbs` label shows its full text in a tooltip.** A crumb label past `16ch`
|
|
140
154
|
(the current page past `32ch`) ended in an ellipsis with no way to read the rest; hovering it, or
|
|
141
|
-
focusing its link, now opens a tooltip with the whole label. A label that fits opens none.
|
|
155
|
+
focusing its link from the keyboard, now opens a tooltip with the whole label. A label that fits opens none.
|
|
142
156
|
|
|
143
|
-
- **A
|
|
157
|
+
- **A modified or non-primary click on a `ds-breadcrumbs` link opens it the browser's way.** Every click
|
|
144
158
|
was prevented and emitted as `(navigate)`, so a consumer routing on it moved the current tab where
|
|
145
159
|
the user asked for a new tab or window. A plain primary click still emits `(navigate)` with the
|
|
146
|
-
default prevented; a
|
|
160
|
+
default prevented; a Ctrl, Cmd, Shift or Alt click and any non-primary button leave `href` to the
|
|
161
|
+
browser and emit nothing.
|
|
147
162
|
|
|
148
163
|
- **A `dsTooltip` with no room on its side opens on the opposite side.** The panel had one
|
|
149
164
|
position, so a tooltip on a trigger near the top of the viewport (a page breadcrumb, a toolbar)
|
|
@@ -1312,7 +1327,7 @@
|
|
|
1312
1327
|
|
|
1313
1328
|
The eight `--ds-description-list-term-*` and `-details-*` tokens are declared in
|
|
1314
1329
|
`description-item.component.scss` and style one item, so they are `--ds-description-item-*`.
|
|
1315
|
-
The three `--ds-segmented-
|
|
1330
|
+
The three `--ds-segmented-btn-*` are `--ds-segmented-segment-*`, because the component calls
|
|
1316
1331
|
its parts segments everywhere else it speaks - `class="segment"` in the template,
|
|
1317
1332
|
`SegmentedOption` as the published type. `--ds-tabs-strip-gap` is `--ds-tabs-gap`: `strip` is
|
|
1318
1333
|
our internal word for the tab list and appears nowhere a consumer reads.
|
package/components.md
CHANGED
|
@@ -1021,7 +1021,7 @@ All inputs: `frame: 'auto' | 'none' = null`, `caption: string | null = null`, `s
|
|
|
1021
1021
|
<!-- /inputs -->
|
|
1022
1022
|
|
|
1023
1023
|
#### Chart defaults — what `DS_CONFIG` decides once
|
|
1024
|
-
Five chart inputs resolve through `DS_CONFIG.chart` because they are one decision per APP, not per plot: `valueFormat` (a number reads one way in a product; a formatter passed per chart drifts as soon as there are two screens), `dataTable` (whether the numbers behind a plot have a non-visual route is an accessibility policy), `frame`, `tooltipLingerMs` and `pinOnClick` (default `true`: a click holds a mark, with a pin disc on it, until a second click, Escape or a press elsewhere). `DS_CONFIG.chart.hoverDelayMs` (default `
|
|
1024
|
+
Five chart inputs resolve through `DS_CONFIG.chart` because they are one decision per APP, not per plot: `valueFormat` (a number reads one way in a product; a formatter passed per chart drifts as soon as there are two screens), `dataTable` (whether the numbers behind a plot have a non-visual route is an accessibility policy), `frame`, `tooltipLingerMs` and `pinOnClick` (default `true`: a click holds a mark, with a pin disc on it, until a second click, Escape or a press elsewhere). `DS_CONFIG.chart.hoverDelayMs` (default `0`) is how long a resting pointer waits before any chart answers it; once a chart has answered, the next mark answers at once until the pointer leaves it, and focus, a tap and a pinning click answer at once. Precedence is the input, then the config, then the built-in — so binding one on a single chart still wins. The empty and error copy is wording, so it lives in `DS_INTL.chart.empty` / `.error`; the number locale is `DsConfig.locale`.
|
|
1025
1025
|
|
|
1026
1026
|
`DS_CONFIG.chart.rendering` decides how charts build on a long page and is off by default: every chart draws as soon as it is created. With `deferUntilVisible: true` each chart shows a still placeholder of its own shape until it comes within `visibleMargin` (default `'10% 0px'`) of the viewport; `buildAheadWhileIdle` (default `true`) builds the charts within `buildAheadMargin` (default `'100% 0px'`) while the page is idle; `frameBudgetMs` (default `8`) caps how long one task spends building; `skipWhileOffscreen` (default `true`) lets the browser skip a built chart's rendering off screen through `content-visibility: auto`. Until a deferred chart is built a screen reader meets its caption only.
|
|
1027
1027
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Group: Charts
|
|
5
5
|
|
|
6
|
-
Five chart inputs resolve through `DS_CONFIG.chart` because they are one decision per APP, not per plot: `valueFormat` (a number reads one way in a product; a formatter passed per chart drifts as soon as there are two screens), `dataTable` (whether the numbers behind a plot have a non-visual route is an accessibility policy), `frame`, `tooltipLingerMs` and `pinOnClick` (default `true`: a click holds a mark, with a pin disc on it, until a second click, Escape or a press elsewhere). `DS_CONFIG.chart.hoverDelayMs` (default `
|
|
6
|
+
Five chart inputs resolve through `DS_CONFIG.chart` because they are one decision per APP, not per plot: `valueFormat` (a number reads one way in a product; a formatter passed per chart drifts as soon as there are two screens), `dataTable` (whether the numbers behind a plot have a non-visual route is an accessibility policy), `frame`, `tooltipLingerMs` and `pinOnClick` (default `true`: a click holds a mark, with a pin disc on it, until a second click, Escape or a press elsewhere). `DS_CONFIG.chart.hoverDelayMs` (default `0`) is how long a resting pointer waits before any chart answers it; once a chart has answered, the next mark answers at once until the pointer leaves it, and focus, a tap and a pinning click answer at once. Precedence is the input, then the config, then the built-in — so binding one on a single chart still wins. The empty and error copy is wording, so it lives in `DS_INTL.chart.empty` / `.error`; the number locale is `DsConfig.locale`.
|
|
7
7
|
|
|
8
8
|
`DS_CONFIG.chart.rendering` decides how charts build on a long page and is off by default: every chart draws as soon as it is created. With `deferUntilVisible: true` each chart shows a still placeholder of its own shape until it comes within `visibleMargin` (default `'10% 0px'`) of the viewport; `buildAheadWhileIdle` (default `true`) builds the charts within `buildAheadMargin` (default `'100% 0px'`) while the page is idle; `frameBudgetMs` (default `8`) caps how long one task spends building; `skipWhileOffscreen` (default `true`) lets the browser skip a built chart's rendering off screen through `content-visibility: auto`. Until a deferred chart is built a screen reader meets its caption only.
|
|
9
9
|
|
|
@@ -35,7 +35,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
35
35
|
|
|
36
36
|
function opensInBrowser(event) {
|
|
37
37
|
return (event instanceof MouseEvent &&
|
|
38
|
-
(event.button !== 0 ||
|
|
38
|
+
(event.button !== 0 ||
|
|
39
|
+
event.ctrlKey ||
|
|
40
|
+
event.metaKey ||
|
|
41
|
+
event.shiftKey ||
|
|
42
|
+
event.altKey));
|
|
39
43
|
}
|
|
40
44
|
class BreadcrumbsComponent {
|
|
41
45
|
cfg = inject(DS_CONFIG);
|
|
@@ -88,11 +92,11 @@ class BreadcrumbsComponent {
|
|
|
88
92
|
this.navigate.emit(item);
|
|
89
93
|
}
|
|
90
94
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BreadcrumbsComponent, isStandalone: true, selector: "ds-breadcrumbs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navigate: "navigate" }, ngImport: i0, template: "<nav\n class=\"breadcrumbs\"\n [attr.aria-label]=\"intl().breadcrumbs.label\"\n [class.is-static]=\"!effectiveClickable()\">\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n (click)=\"onNav($event, item)\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n [attr.aria-current]=\"last ? 'page' : null\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\">\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\" />\n </span>\n }\n }\n</nav>\n", styles: [":where(: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)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_breadcrumbs-label-color: var(--ds-breadcrumbs-label-color, var(--text-tertiary));--_breadcrumbs-label-color-hover: var(--ds-breadcrumbs-label-color-hover, var(--accent));--_breadcrumbs-separator-icon-color: var(--ds-breadcrumbs-separator-icon-color, var(--icon-muted));--_breadcrumbs-current-label-color: var(--ds-breadcrumbs-current-label-color, var(--text-primary));--_breadcrumbs-gap: var(--ds-breadcrumbs-gap, var(--space-2));--_breadcrumbs-font-size: var(--ds-breadcrumbs-font-size, var(--font-size-s));--_breadcrumbs-font-weight: var(--ds-breadcrumbs-font-weight, var(--font-weight-regular));--_breadcrumbs-current-label-font-weight: var(--ds-breadcrumbs-current-label-font-weight, var(--font-weight-bold));--_breadcrumbs-label-max-width: var(--ds-breadcrumbs-label-max-width, 16ch);--_breadcrumbs-current-label-max-width: var(--ds-breadcrumbs-current-label-max-width, 32ch);display:inline-flex;min-width:0;max-width:100%}.breadcrumbs{display:inline-flex;align-items:center;gap:var(--_breadcrumbs-gap);font:var(--_breadcrumbs-font-weight) var(--_breadcrumbs-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_breadcrumbs-label-color);min-width:0;max-width:100%;flex-wrap:nowrap;overflow:hidden;--focus-ring-offset: calc(-1 * var(--focus-ring-width))}.breadcrumbs a,.breadcrumbs .current{display:inline-flex;align-items:center;gap:var(--space-1)}.breadcrumbs a{color:var(--_breadcrumbs-label-color);text-decoration:none;cursor:pointer;transition:color var(--duration-fast) var(--ease-standard)}.breadcrumbs a:hover{color:var(--_breadcrumbs-label-color-hover);text-decoration:underline;text-underline-offset:var(--breadcrumbs-link-uloff)}.breadcrumbs a: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)
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BreadcrumbsComponent, isStandalone: true, selector: "ds-breadcrumbs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navigate: "navigate" }, ngImport: i0, template: "<nav\n class=\"breadcrumbs\"\n [attr.aria-label]=\"intl().breadcrumbs.label\"\n [class.is-static]=\"!effectiveClickable()\">\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n (click)=\"onNav($event, item)\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n [attr.aria-current]=\"last ? 'page' : null\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\">\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\" />\n </span>\n }\n }\n</nav>\n", styles: [":where(: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)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_breadcrumbs-label-color: var(--ds-breadcrumbs-label-color, var(--text-tertiary));--_breadcrumbs-label-color-hover: var(--ds-breadcrumbs-label-color-hover, var(--accent));--_breadcrumbs-bg-color-hover: var(--ds-breadcrumbs-bg-color-hover, transparent);--_breadcrumbs-padding: var(--ds-breadcrumbs-padding, 0);--_breadcrumbs-radius: var(--ds-breadcrumbs-radius, var(--radius-sm));--_breadcrumbs-separator-icon-color: var(--ds-breadcrumbs-separator-icon-color, var(--icon-muted));--_breadcrumbs-current-label-color: var(--ds-breadcrumbs-current-label-color, var(--text-primary));--_breadcrumbs-gap: var(--ds-breadcrumbs-gap, var(--space-2));--_breadcrumbs-font-size: var(--ds-breadcrumbs-font-size, var(--font-size-s));--_breadcrumbs-font-weight: var(--ds-breadcrumbs-font-weight, var(--font-weight-regular));--_breadcrumbs-current-label-font-weight: var(--ds-breadcrumbs-current-label-font-weight, var(--font-weight-bold));--_breadcrumbs-label-max-width: var(--ds-breadcrumbs-label-max-width, 16ch);--_breadcrumbs-current-label-max-width: var(--ds-breadcrumbs-current-label-max-width, 32ch);display:inline-flex;min-width:0;max-width:100%}.breadcrumbs{display:inline-flex;align-items:center;gap:var(--_breadcrumbs-gap);font:var(--_breadcrumbs-font-weight) var(--_breadcrumbs-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_breadcrumbs-label-color);min-width:0;max-width:100%;flex-wrap:nowrap;overflow:hidden;--focus-ring-offset: calc(-1 * var(--focus-ring-width))}.breadcrumbs a,.breadcrumbs .current{display:inline-flex;align-items:center;gap:var(--space-1)}.breadcrumbs a,.breadcrumbs>span:not(.sep){padding:var(--_breadcrumbs-padding);border-radius:var(--_breadcrumbs-radius)}.breadcrumbs a{color:var(--_breadcrumbs-label-color);text-decoration:none;cursor:pointer;transition:color var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.breadcrumbs a:hover{background-color:var(--_breadcrumbs-bg-color-hover);color:var(--_breadcrumbs-label-color-hover);text-decoration:underline;text-underline-offset:var(--breadcrumbs-link-uloff)}.breadcrumbs a: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)}.breadcrumbs.is-static a,.breadcrumbs.is-static .current{cursor:default}.breadcrumbs .sep{color:var(--_breadcrumbs-separator-icon-color);display:inline-flex;align-items:center}.breadcrumbs .current{color:var(--_breadcrumbs-current-label-color);font-weight:var(--_breadcrumbs-current-label-font-weight)}.breadcrumbs .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;max-width:var(--_breadcrumbs-label-max-width)}.breadcrumbs .current .label{max-width:var(--_breadcrumbs-current-label-max-width)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: TooltipDirective, selector: "[dsTooltip], [dsTooltipWhenClipped]", inputs: ["dsTooltip", "dsTooltipPlacement", "dsTooltipDelay", "dsTooltipWhenClipped", "dsTooltipTextSelector"] }] });
|
|
92
96
|
}
|
|
93
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsComponent, decorators: [{
|
|
94
98
|
type: Component,
|
|
95
|
-
args: [{ selector: 'ds-breadcrumbs', standalone: true, imports: [IconComponent, TooltipDirective], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"breadcrumbs\"\n [attr.aria-label]=\"intl().breadcrumbs.label\"\n [class.is-static]=\"!effectiveClickable()\">\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n (click)=\"onNav($event, item)\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n [attr.aria-current]=\"last ? 'page' : null\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\">\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\" />\n </span>\n }\n }\n</nav>\n", styles: [":where(: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)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_breadcrumbs-label-color: var(--ds-breadcrumbs-label-color, var(--text-tertiary));--_breadcrumbs-label-color-hover: var(--ds-breadcrumbs-label-color-hover, var(--accent));--_breadcrumbs-separator-icon-color: var(--ds-breadcrumbs-separator-icon-color, var(--icon-muted));--_breadcrumbs-current-label-color: var(--ds-breadcrumbs-current-label-color, var(--text-primary));--_breadcrumbs-gap: var(--ds-breadcrumbs-gap, var(--space-2));--_breadcrumbs-font-size: var(--ds-breadcrumbs-font-size, var(--font-size-s));--_breadcrumbs-font-weight: var(--ds-breadcrumbs-font-weight, var(--font-weight-regular));--_breadcrumbs-current-label-font-weight: var(--ds-breadcrumbs-current-label-font-weight, var(--font-weight-bold));--_breadcrumbs-label-max-width: var(--ds-breadcrumbs-label-max-width, 16ch);--_breadcrumbs-current-label-max-width: var(--ds-breadcrumbs-current-label-max-width, 32ch);display:inline-flex;min-width:0;max-width:100%}.breadcrumbs{display:inline-flex;align-items:center;gap:var(--_breadcrumbs-gap);font:var(--_breadcrumbs-font-weight) var(--_breadcrumbs-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_breadcrumbs-label-color);min-width:0;max-width:100%;flex-wrap:nowrap;overflow:hidden;--focus-ring-offset: calc(-1 * var(--focus-ring-width))}.breadcrumbs a,.breadcrumbs .current{display:inline-flex;align-items:center;gap:var(--space-1)}.breadcrumbs a{color:var(--_breadcrumbs-label-color);text-decoration:none;cursor:pointer;transition:color var(--duration-fast) var(--ease-standard)}.breadcrumbs a:hover{color:var(--_breadcrumbs-label-color-hover);text-decoration:underline;text-underline-offset:var(--breadcrumbs-link-uloff)}.breadcrumbs a: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)
|
|
99
|
+
args: [{ selector: 'ds-breadcrumbs', standalone: true, imports: [IconComponent, TooltipDirective], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"breadcrumbs\"\n [attr.aria-label]=\"intl().breadcrumbs.label\"\n [class.is-static]=\"!effectiveClickable()\">\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n (click)=\"onNav($event, item)\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n [attr.aria-current]=\"last ? 'page' : null\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\">\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\" />\n </span>\n }\n }\n</nav>\n", styles: [":where(: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)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_breadcrumbs-label-color: var(--ds-breadcrumbs-label-color, var(--text-tertiary));--_breadcrumbs-label-color-hover: var(--ds-breadcrumbs-label-color-hover, var(--accent));--_breadcrumbs-bg-color-hover: var(--ds-breadcrumbs-bg-color-hover, transparent);--_breadcrumbs-padding: var(--ds-breadcrumbs-padding, 0);--_breadcrumbs-radius: var(--ds-breadcrumbs-radius, var(--radius-sm));--_breadcrumbs-separator-icon-color: var(--ds-breadcrumbs-separator-icon-color, var(--icon-muted));--_breadcrumbs-current-label-color: var(--ds-breadcrumbs-current-label-color, var(--text-primary));--_breadcrumbs-gap: var(--ds-breadcrumbs-gap, var(--space-2));--_breadcrumbs-font-size: var(--ds-breadcrumbs-font-size, var(--font-size-s));--_breadcrumbs-font-weight: var(--ds-breadcrumbs-font-weight, var(--font-weight-regular));--_breadcrumbs-current-label-font-weight: var(--ds-breadcrumbs-current-label-font-weight, var(--font-weight-bold));--_breadcrumbs-label-max-width: var(--ds-breadcrumbs-label-max-width, 16ch);--_breadcrumbs-current-label-max-width: var(--ds-breadcrumbs-current-label-max-width, 32ch);display:inline-flex;min-width:0;max-width:100%}.breadcrumbs{display:inline-flex;align-items:center;gap:var(--_breadcrumbs-gap);font:var(--_breadcrumbs-font-weight) var(--_breadcrumbs-font-size)/var(--line-height-flat) var(--font-sans);color:var(--_breadcrumbs-label-color);min-width:0;max-width:100%;flex-wrap:nowrap;overflow:hidden;--focus-ring-offset: calc(-1 * var(--focus-ring-width))}.breadcrumbs a,.breadcrumbs .current{display:inline-flex;align-items:center;gap:var(--space-1)}.breadcrumbs a,.breadcrumbs>span:not(.sep){padding:var(--_breadcrumbs-padding);border-radius:var(--_breadcrumbs-radius)}.breadcrumbs a{color:var(--_breadcrumbs-label-color);text-decoration:none;cursor:pointer;transition:color var(--duration-fast) var(--ease-standard),background-color var(--duration-fast) var(--ease-standard)}.breadcrumbs a:hover{background-color:var(--_breadcrumbs-bg-color-hover);color:var(--_breadcrumbs-label-color-hover);text-decoration:underline;text-underline-offset:var(--breadcrumbs-link-uloff)}.breadcrumbs a: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)}.breadcrumbs.is-static a,.breadcrumbs.is-static .current{cursor:default}.breadcrumbs .sep{color:var(--_breadcrumbs-separator-icon-color);display:inline-flex;align-items:center}.breadcrumbs .current{color:var(--_breadcrumbs-current-label-color);font-weight:var(--_breadcrumbs-current-label-font-weight)}.breadcrumbs .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;max-width:var(--_breadcrumbs-label-max-width)}.breadcrumbs .current .label{max-width:var(--_breadcrumbs-current-label-max-width)}\n"] }]
|
|
96
100
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }] } });
|
|
97
101
|
|
|
98
102
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-breadcrumbs.mjs","sources":["../../../src/lib/components/breadcrumbs/breadcrumbs.service.ts","../../../src/lib/components/breadcrumbs/breadcrumbs.component.ts","../../../src/lib/components/breadcrumbs/breadcrumbs.component.html","../../../src/lib/components/breadcrumbs/ids-group-ltd-ids-design-system-components-breadcrumbs.ts"],"sourcesContent":["import { Injectable, type Signal, signal } from '@angular/core';\nimport type { BreadcrumbItem } from './breadcrumbs.types';\n\n/**\n * Breadcrumb state that `<ds-breadcrumbs>` reads when no `[items]` input is provided.\n */\n@Injectable({ providedIn: 'root' })\nexport class BreadcrumbsService {\n private readonly _items = signal<BreadcrumbItem[]>([]);\n readonly items: Signal<BreadcrumbItem[]> = this._items.asReadonly();\n\n set(items: BreadcrumbItem[]): void {\n this._items.set(items);\n }\n\n push(item: BreadcrumbItem): void {\n this._items.update((arr) => [...arr, item]);\n }\n\n pop(): void {\n this._items.update((arr) => arr.slice(0, -1));\n }\n\n replaceLast(item: BreadcrumbItem): void {\n this._items.update((arr) =>\n arr.length ? [...arr.slice(0, -1), item] : [item],\n );\n }\n\n clear(): void {\n this._items.set([]);\n }\n}\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport {\n DS_CONFIG,\n DS_INTL,\n devWarn,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { BreadcrumbsService } from './breadcrumbs.service';\nimport type { BreadcrumbItem } from './breadcrumbs.types';\n\nfunction opensInBrowser(event: Event): boolean {\n return (\n event instanceof MouseEvent &&\n (event.button !== 0 || event.ctrlKey || event.metaKey || event.shiftKey || event.altKey)\n );\n}\n\n@Component({\n selector: 'ds-breadcrumbs',\n standalone: true,\n imports: [IconComponent, TooltipDirective],\n templateUrl: './breadcrumbs.component.html',\n styleUrl: './breadcrumbs.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BreadcrumbsComponent {\n private readonly cfg = inject(DS_CONFIG);\n private readonly svc = inject(BreadcrumbsService);\n protected readonly intl = inject(DS_INTL);\n\n /** Omitted, the component reads `BreadcrumbsService.items`; an explicit array opts out. */\n readonly items = input<BreadcrumbItem[] | null>(null);\n /** Icon between crumbs; falls back to `DS_CONFIG.breadcrumbs.separator`, then `chevronRight`. */\n readonly separator = input<IconName | null>(null);\n /** Whether crumbs render as links; falls back to `DS_CONFIG.breadcrumbs.clickable`, then `true`. */\n readonly clickable = input<boolean | null>(null);\n /** Caps how many crumbs render, collapsing the middle; the first and the LAST always survive.\n * Uncapped, a long trail is clipped from the END, which is the current page. */\n readonly maxItems = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Fires when a clickable crumb with `href` is activated by a plain primary click, whose default\n * navigation is prevented; a modified or non-primary click opens `href` in the browser instead. */\n readonly navigate = output<BreadcrumbItem>();\n\n private readonly allItems = computed<BreadcrumbItem[]>(\n () => this.items() ?? this.svc.items(),\n );\n\n protected readonly resolvedItems = computed<BreadcrumbItem[]>(() => {\n const items = this.allItems();\n const max = this.maxItems();\n if (!max || max < 2 || items.length <= max) {\n return items;\n }\n // max - 2: the collapsed crumb occupies a slot too.\n const tail = items.slice(items.length - (max - 2));\n\n return [items[0], { label: `… ${items.length - max + 1} more` }, ...tail];\n });\n protected readonly effectiveSeparator = computed<IconName>(\n () => this.separator() ?? this.cfg.breadcrumbs?.separator ?? 'chevronRight',\n );\n protected readonly effectiveClickable = computed<boolean>(\n () => this.clickable() ?? this.cfg.breadcrumbs?.clickable ?? true,\n );\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const nameless = this.resolvedItems().find(\n (item) => item.icon && !item.label && !item.ariaLabel,\n );\n\n return nameless\n ? `[ds-breadcrumbs] the crumb with icon=\"${nameless.icon}\" has no label and no ariaLabel, so it renders as a link with no accessible name. Give it an ariaLabel — the icon id is not a word for the user.`\n : null;\n });\n }\n }\n\n protected onNav(event: Event, item: BreadcrumbItem): void {\n if (!item.href || !this.effectiveClickable()) {\n event.preventDefault();\n\n return;\n }\n if (opensInBrowser(event)) {\n return;\n }\n event.preventDefault();\n this.navigate.emit(item);\n }\n}\n","<nav\n class=\"breadcrumbs\"\n [attr.aria-label]=\"intl().breadcrumbs.label\"\n [class.is-static]=\"!effectiveClickable()\">\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n (click)=\"onNav($event, item)\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n [attr.aria-current]=\"last ? 'page' : null\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\">\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\" />\n </span>\n }\n }\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;AAEG;MAEU,kBAAkB,CAAA;AACZ,IAAA,MAAM,GAAG,MAAM,CAAmB,EAAE,6EAAC;AAC7C,IAAA,KAAK,GAA6B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAEnE,IAAA,GAAG,CAAC,KAAuB,EAAA;AACzB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB;AAEA,IAAA,IAAI,CAAC,IAAoB,EAAA;AACvB,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;IAC7C;IAEA,GAAG,GAAA;QACD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C;AAEA,IAAA,WAAW,CAAC,IAAoB,EAAA;AAC9B,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KACrB,GAAG,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAClD;IACH;IAEA,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EA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AAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnCjC,k8CA4DA,EAAA,MAAA,EAAA,CAAA,+wGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED9BY,aAAa,qGAAE,gBAAgB,EAAA,QAAA,EAAA,qCAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,oBAAA,EAAA,gBAAA,EAAA,sBAAA,EAAA,uBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAK9B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,EAAE,gBAAgB,CAAC,EAAA,aAAA,EAG3B,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,k8CAAA,EAAA,MAAA,EAAA,CAAA,+wGAAA,CAAA,EAAA;;;AEjC3C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-breadcrumbs.mjs","sources":["../../../src/lib/components/breadcrumbs/breadcrumbs.service.ts","../../../src/lib/components/breadcrumbs/breadcrumbs.component.ts","../../../src/lib/components/breadcrumbs/breadcrumbs.component.html","../../../src/lib/components/breadcrumbs/ids-group-ltd-ids-design-system-components-breadcrumbs.ts"],"sourcesContent":["import { Injectable, type Signal, signal } from '@angular/core';\nimport type { BreadcrumbItem } from './breadcrumbs.types';\n\n/**\n * Breadcrumb state that `<ds-breadcrumbs>` reads when no `[items]` input is provided.\n */\n@Injectable({ providedIn: 'root' })\nexport class BreadcrumbsService {\n private readonly _items = signal<BreadcrumbItem[]>([]);\n readonly items: Signal<BreadcrumbItem[]> = this._items.asReadonly();\n\n set(items: BreadcrumbItem[]): void {\n this._items.set(items);\n }\n\n push(item: BreadcrumbItem): void {\n this._items.update((arr) => [...arr, item]);\n }\n\n pop(): void {\n this._items.update((arr) => arr.slice(0, -1));\n }\n\n replaceLast(item: BreadcrumbItem): void {\n this._items.update((arr) =>\n arr.length ? [...arr.slice(0, -1), item] : [item],\n );\n }\n\n clear(): void {\n this._items.set([]);\n }\n}\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport {\n DS_CONFIG,\n DS_INTL,\n devWarn,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { BreadcrumbsService } from './breadcrumbs.service';\nimport type { BreadcrumbItem } from './breadcrumbs.types';\n\nfunction opensInBrowser(event: Event): boolean {\n return (\n event instanceof MouseEvent &&\n (event.button !== 0 ||\n event.ctrlKey ||\n event.metaKey ||\n event.shiftKey ||\n event.altKey)\n );\n}\n\n@Component({\n selector: 'ds-breadcrumbs',\n standalone: true,\n imports: [IconComponent, TooltipDirective],\n templateUrl: './breadcrumbs.component.html',\n styleUrl: './breadcrumbs.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BreadcrumbsComponent {\n private readonly cfg = inject(DS_CONFIG);\n private readonly svc = inject(BreadcrumbsService);\n protected readonly intl = inject(DS_INTL);\n\n /** Omitted, the component reads `BreadcrumbsService.items`; an explicit array opts out. */\n readonly items = input<BreadcrumbItem[] | null>(null);\n /** Icon between crumbs; falls back to `DS_CONFIG.breadcrumbs.separator`, then `chevronRight`. */\n readonly separator = input<IconName | null>(null);\n /** Whether crumbs render as links; falls back to `DS_CONFIG.breadcrumbs.clickable`, then `true`. */\n readonly clickable = input<boolean | null>(null);\n /** Caps how many crumbs render, collapsing the middle; the first and the LAST always survive.\n * Uncapped, a long trail is clipped from the END, which is the current page. */\n readonly maxItems = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Fires when a clickable crumb with `href` is activated by a plain primary click, whose default\n * navigation is prevented; a modified or non-primary click opens `href` in the browser instead. */\n readonly navigate = output<BreadcrumbItem>();\n\n private readonly allItems = computed<BreadcrumbItem[]>(\n () => this.items() ?? this.svc.items(),\n );\n\n protected readonly resolvedItems = computed<BreadcrumbItem[]>(() => {\n const items = this.allItems();\n const max = this.maxItems();\n if (!max || max < 2 || items.length <= max) {\n return items;\n }\n // max - 2: the collapsed crumb occupies a slot too.\n const tail = items.slice(items.length - (max - 2));\n\n return [items[0], { label: `… ${items.length - max + 1} more` }, ...tail];\n });\n protected readonly effectiveSeparator = computed<IconName>(\n () => this.separator() ?? this.cfg.breadcrumbs?.separator ?? 'chevronRight',\n );\n protected readonly effectiveClickable = computed<boolean>(\n () => this.clickable() ?? this.cfg.breadcrumbs?.clickable ?? true,\n );\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() => {\n const nameless = this.resolvedItems().find(\n (item) => item.icon && !item.label && !item.ariaLabel,\n );\n\n return nameless\n ? `[ds-breadcrumbs] the crumb with icon=\"${nameless.icon}\" has no label and no ariaLabel, so it renders as a link with no accessible name. Give it an ariaLabel — the icon id is not a word for the user.`\n : null;\n });\n }\n }\n\n protected onNav(event: Event, item: BreadcrumbItem): void {\n if (!item.href || !this.effectiveClickable()) {\n event.preventDefault();\n\n return;\n }\n if (opensInBrowser(event)) {\n return;\n }\n event.preventDefault();\n this.navigate.emit(item);\n }\n}\n","<nav\n class=\"breadcrumbs\"\n [attr.aria-label]=\"intl().breadcrumbs.label\"\n [class.is-static]=\"!effectiveClickable()\">\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n (click)=\"onNav($event, item)\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-label]=\"item.label ? null : (item.ariaLabel ?? null)\"\n [attr.aria-current]=\"last ? 'page' : null\">\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\" />\n }\n\n @if (item.label) {\n <span\n class=\"label\"\n dsTooltipWhenClipped>\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\">\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\" />\n </span>\n }\n }\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;AAEG;MAEU,kBAAkB,CAAA;AACZ,IAAA,MAAM,GAAG,MAAM,CAAmB,EAAE,6EAAC;AAC7C,IAAA,KAAK,GAA6B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAEnE,IAAA,GAAG,CAAC,KAAuB,EAAA;AACzB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB;AAEA,IAAA,IAAI,CAAC,IAAoB,EAAA;AACvB,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;IAC7C;IAEA,GAAG,GAAA;QACD,IAAI,CAAC,MAAM,CAAC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E,gBAAgB,CAAC,EAAA,aAAA,EAG3B,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,k8CAAA,EAAA,MAAA,EAAA,CAAA,uqHAAA,CAAA,EAAA;;;AErC3C;;AAEG;;;;"}
|
|
@@ -73,7 +73,7 @@ class TooltipDirective {
|
|
|
73
73
|
host = inject((ElementRef));
|
|
74
74
|
/** Tip text. An empty string turns the tooltip off. */
|
|
75
75
|
dsTooltip = input('', ...(ngDevMode ? [{ debugName: "dsTooltip" }] : /* istanbul ignore next */ []));
|
|
76
|
-
/** Which side the tip opens on.
|
|
76
|
+
/** Which side the tip opens on. With no room there it opens on the opposite side. */
|
|
77
77
|
dsTooltipPlacement = input('top', ...(ngDevMode ? [{ debugName: "dsTooltipPlacement" }] : /* istanbul ignore next */ []));
|
|
78
78
|
/** Milliseconds before the tip appears. Hiding is immediate. */
|
|
79
79
|
dsTooltipDelay = input(120, ...(ngDevMode ? [{ debugName: "dsTooltipDelay" }] : /* istanbul ignore next */ []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tooltip.mjs","sources":["../../../src/lib/components/tooltip/tooltip-panel.component.ts","../../../src/lib/components/tooltip/tooltip.directive.ts","../../../src/lib/components/tooltip/ids-group-ltd-ids-design-system-components-tooltip.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\n@Component({\n selector: 'ds-tooltip-panel',\n standalone: true,\n template: `{{ text() }}`,\n styleUrl: './tooltip-panel.component.scss',\n host: {\n role: 'tooltip',\n '[attr.id]': 'panelId()',\n '[class.top]': \"placement() === 'top'\",\n '[class.bottom]': \"placement() === 'bottom'\",\n '[class.left]': \"placement() === 'left'\",\n '[class.right]': \"placement() === 'right'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TooltipPanelComponent {\n /** Tooltip text content. */\n readonly text = input.required<string>();\n /** Side of the trigger the panel is positioned on; also drives the arrow class. */\n readonly placement = input.required<TooltipPlacement>();\n /** Element `id`, referenced by the trigger's `aria-describedby`. */\n readonly panelId = input<string>('');\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n} from '@angular/core';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TooltipPanelComponent } from './tooltip-panel.component';\nimport {\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { isTextClipped } from '@ids-group-ltd/ids-design-system/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\nconst TRIGGER_GAP_PX = 8;\nconst VIEWPORT_MARGIN_PX = 8;\nconst OPPOSITE_PLACEMENT: Record<TooltipPlacement, TooltipPlacement> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\nconst NATIVELY_FOCUSABLE = 'a[href], button, input, select, textarea, summary';\nconst FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]`;\nconst KEYBOARD_FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]:not([tabindex^=\"-\"])`;\nconst INTERACTIVE = [\n NATIVELY_FOCUSABLE,\n 'tr:not([role])',\n ...[\n 'button',\n 'link',\n 'tab',\n 'option',\n 'menuitem',\n 'menuitemcheckbox',\n 'menuitemradio',\n 'row',\n 'gridcell',\n 'combobox',\n 'checkbox',\n 'radio',\n 'switch',\n 'treeitem',\n ].map((role) => `[role=\"${role}\"]`),\n].join(', ');\n\nconst clippedHostsByAncestor = new WeakMap<\n HTMLElement,\n Set<TooltipDirective>\n>();\n\nfunction firstClippedHost(\n tooltips: Set<TooltipDirective>,\n): TooltipDirective | undefined {\n return [...tooltips]\n .sort((a, b) =>\n a.hostElement.compareDocumentPosition(b.hostElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1,\n )\n .find((tooltip) => tooltip.isClipped());\n}\n\nlet nextId = 0;\n\n@Directive({\n selector: '[dsTooltip], [dsTooltipWhenClipped]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** Tip text. An empty string turns the tooltip off. */\n readonly dsTooltip = input<string>('');\n /** Which side the tip opens on. It does NOT flip: with no room it is pushed, not moved. */\n readonly dsTooltipPlacement = input<TooltipPlacement>('top');\n /** Milliseconds before the tip appears. Hiding is immediate. */\n readonly dsTooltipDelay = input<number>(120);\n /** Show the tip only while the host shows less text than it holds. Re-tested on every open.\n *\n * Applies the tooltip on its own: without a `dsTooltip` the host's own text is disclosed. A tip\n * whose text the host already contains sets no `aria-describedby`; one given a `dsTooltip`\n * that says more than the host does describes it as usual. */\n readonly dsTooltipWhenClipped = input(false, { transform: booleanAttribute });\n /** Selector for the element inside the host whose clipping `dsTooltipWhenClipped` tests and\n * whose text it discloses. Resolved on every open; while nothing matches, no clipped tip opens. */\n readonly dsTooltipTextSelector = input<string | null>(null);\n\n get hostElement(): HTMLElement {\n return this.host.nativeElement;\n }\n\n private textElement(): HTMLElement | null {\n const selector = this.dsTooltipTextSelector();\n\n return selector\n ? this.hostElement.querySelector<HTMLElement>(selector)\n : this.hostElement;\n }\n\n isClipped(): boolean {\n const textElement = this.textElement();\n\n return textElement !== null && isTextClipped(textElement);\n }\n\n private tipText(): string {\n const given = this.dsTooltip();\n if (given || !this.dsTooltipWhenClipped()) {\n return given;\n }\n\n return (this.textElement()?.textContent ?? '').trim();\n }\n\n /** A clipped host's full text is already in the DOM; describing it again would announce it twice. */\n private disclosesOwnText(text: string): boolean {\n if (!this.dsTooltipWhenClipped()) {\n return false;\n }\n const collapse = (value: string) => value.replace(/\\s+/g, ' ').trim();\n\n return collapse(this.textElement()?.textContent ?? '').includes(\n collapse(text),\n );\n }\n\n private ref: OverlayRef | null = null;\n private timer: number | null = null;\n private readonly tipId = `ds-tooltip-${++nextId}`;\n\n /**\n * Where `aria-describedby` belongs when focus is involved: a non-focusable host\n * (`ds-menu-item` is `role=\"none\"` around a real `<button>`) never reaches a screen\n * reader, so `focusin`'s target is recorded. A pointer-only open leaves it null.\n */\n private focusedTarget: HTMLElement | null = null;\n\n /**\n * Where `aria-describedby` was written, so teardown strips it from the same element\n * even if focus moved `focusedTarget` after the panel opened.\n */\n private describedElement: HTMLElement | null = null;\n\n private detachAncestor: (() => void) | null = null;\n\n constructor() {\n afterNextRender(() => this.listenToFocusableAncestor());\n }\n\n /** `:focus-visible` keeps a click from opening it. Only the first clipped host of one ancestor opens. */\n private listenToFocusableAncestor(): void {\n const host: HTMLElement = this.host.nativeElement;\n if (!this.dsTooltipWhenClipped() || host.matches(FOCUSABLE)) {\n return;\n }\n const ancestor = host.parentElement?.closest<HTMLElement>(FOCUSABLE);\n if (!ancestor?.matches(INTERACTIVE)) {\n return;\n }\n let tooltips = clippedHostsByAncestor.get(ancestor);\n if (!tooltips) {\n tooltips = new Set();\n clippedHostsByAncestor.set(ancestor, tooltips);\n }\n tooltips.add(this);\n const open = (event: FocusEvent) => {\n if (\n event.target !== ancestor ||\n // Tested here, not at registration: a disabled trigger carries tabindex=\"-1\" until enabled.\n !ancestor.matches(KEYBOARD_FOCUSABLE) ||\n !ancestor.matches(':focus-visible') ||\n firstClippedHost(tooltips) !== this\n ) {\n return;\n }\n this.focusedTarget = ancestor;\n this.scheduleShow();\n };\n const close = () => {\n this.focusedTarget = null;\n this.onClose();\n };\n ancestor.addEventListener('focusin', open);\n ancestor.addEventListener('focusout', close);\n ancestor.addEventListener('click', close);\n ancestor.addEventListener('keydown', close);\n this.detachAncestor = () => {\n tooltips.delete(this);\n ancestor.removeEventListener('focusin', open);\n ancestor.removeEventListener('focusout', close);\n ancestor.removeEventListener('click', close);\n ancestor.removeEventListener('keydown', close);\n };\n }\n\n @HostListener('mouseenter')\n protected onPointerEnter(): void {\n this.scheduleShow();\n }\n\n // Same rule as via a focusable ancestor: keyboard focus opens, a click's focus does not.\n @HostListener('focusin', ['$event'])\n protected onFocusIn(event: FocusEvent): void {\n const host = this.hostElement;\n if (\n this.dsTooltipWhenClipped() &&\n host.matches(FOCUSABLE) &&\n (event.target !== host || !host.matches(':focus-visible'))\n ) {\n return;\n }\n if (event.target instanceof HTMLElement) {\n this.focusedTarget = event.target;\n }\n this.scheduleShow();\n }\n\n @HostListener('focusout')\n protected onFocusOut(): void {\n this.focusedTarget = null;\n this.onClose();\n }\n\n private scheduleShow(): void {\n if (!this.tipText()) {\n return;\n }\n if (this.dsTooltipWhenClipped() && !this.isClipped()) {\n return;\n }\n if (this.timer !== null) {\n clearTimeout(this.timer);\n }\n this.timer = window.setTimeout(() => this.show(), this.dsTooltipDelay());\n }\n\n // Close on click too: a re-rendered anchor under a stationary cursor fires no mouseleave.\n @HostListener('mouseleave')\n @HostListener('click')\n protected onClose(): void {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n this.disposeRef();\n }\n\n private disposeRef(): void {\n this.ref?.dispose();\n this.ref = null;\n const described = this.describedElement;\n if (!described) {\n return;\n }\n this.describedElement = null;\n const remaining = (described.getAttribute('aria-describedby') ?? '')\n .split(' ')\n .filter((id: string) => id && id !== this.tipId)\n .join(' ');\n if (remaining) {\n described.setAttribute('aria-describedby', remaining);\n } else {\n described.removeAttribute('aria-describedby');\n }\n }\n\n @HostListener('keydown')\n protected onKeydown(): void {\n if (this.dsTooltipWhenClipped()) {\n this.onClose();\n }\n }\n\n @HostListener('keydown.escape')\n protected onEscape(): void {\n if (this.ref) {\n this.onClose();\n }\n }\n\n private show(): void {\n // show() can be re-entered with a panel open: dispose it first to avoid a leaked OverlayRef and a duplicate id.\n this.disposeRef();\n const placement = this.dsTooltipPlacement();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([\n this.positionFor(placement),\n this.positionFor(OPPOSITE_PLACEMENT[placement]),\n ])\n .withViewportMargin(VIEWPORT_MARGIN_PX);\n\n this.ref = this.overlay.create({\n positionStrategy,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n });\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n\n const cmpRef = this.ref.attach(new ComponentPortal(TooltipPanelComponent));\n const text = this.tipText();\n cmpRef.setInput('text', text);\n cmpRef.setInput('placement', placement);\n positionStrategy.positionChanges.subscribe(({ connectionPair }) =>\n cmpRef.setInput(\n 'placement',\n overlayPlacementOf(connectionPair.overlayY, connectionPair.overlayX),\n ),\n );\n cmpRef.setInput('panelId', this.tipId);\n if (this.disclosesOwnText(text)) {\n return;\n }\n const described = this.focusedTarget ?? this.host.nativeElement;\n this.describedElement = described;\n const existing = described.getAttribute('aria-describedby');\n described.setAttribute(\n 'aria-describedby',\n existing ? `${existing} ${this.tipId}` : this.tipId,\n );\n }\n\n private positionFor(placement: TooltipPlacement) {\n switch (placement) {\n case 'top':\n return {\n originX: 'center' as const,\n originY: 'top' as const,\n overlayX: 'center' as const,\n overlayY: 'bottom' as const,\n offsetY: -TRIGGER_GAP_PX,\n };\n case 'bottom':\n return {\n originX: 'center' as const,\n originY: 'bottom' as const,\n overlayX: 'center' as const,\n overlayY: 'top' as const,\n offsetY: TRIGGER_GAP_PX,\n };\n case 'left':\n return {\n originX: 'start' as const,\n originY: 'center' as const,\n overlayX: 'end' as const,\n overlayY: 'center' as const,\n offsetX: -TRIGGER_GAP_PX,\n };\n case 'right':\n return {\n originX: 'end' as const,\n originY: 'center' as const,\n overlayX: 'start' as const,\n overlayY: 'center' as const,\n offsetX: TRIGGER_GAP_PX,\n };\n }\n }\n\n ngOnDestroy(): void {\n this.detachAncestor?.();\n this.onClose();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAkBa,qBAAqB,CAAA;;AAEvB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAU;;AAE/B,IAAA,SAAS,GAAG,KAAK,CAA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A,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,cAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,EAAA,WAAA,EAAA,SAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qCAAqC;AAC/C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAiIE,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;sBAgBlC,YAAY;uBAAC,UAAU;;sBAoBvB,YAAY;uBAAC,YAAY;;sBACzB,YAAY;uBAAC,OAAO;;sBA4BpB,YAAY;uBAAC,SAAS;;sBAOtB,YAAY;uBAAC,gBAAgB;;;AC3RhC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tooltip.mjs","sources":["../../../src/lib/components/tooltip/tooltip-panel.component.ts","../../../src/lib/components/tooltip/tooltip.directive.ts","../../../src/lib/components/tooltip/ids-group-ltd-ids-design-system-components-tooltip.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\n@Component({\n selector: 'ds-tooltip-panel',\n standalone: true,\n template: `{{ text() }}`,\n styleUrl: './tooltip-panel.component.scss',\n host: {\n role: 'tooltip',\n '[attr.id]': 'panelId()',\n '[class.top]': \"placement() === 'top'\",\n '[class.bottom]': \"placement() === 'bottom'\",\n '[class.left]': \"placement() === 'left'\",\n '[class.right]': \"placement() === 'right'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TooltipPanelComponent {\n /** Tooltip text content. */\n readonly text = input.required<string>();\n /** Side of the trigger the panel is positioned on; also drives the arrow class. */\n readonly placement = input.required<TooltipPlacement>();\n /** Element `id`, referenced by the trigger's `aria-describedby`. */\n readonly panelId = input<string>('');\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n} from '@angular/core';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TooltipPanelComponent } from './tooltip-panel.component';\nimport {\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { isTextClipped } from '@ids-group-ltd/ids-design-system/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\nconst TRIGGER_GAP_PX = 8;\nconst VIEWPORT_MARGIN_PX = 8;\nconst OPPOSITE_PLACEMENT: Record<TooltipPlacement, TooltipPlacement> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\nconst NATIVELY_FOCUSABLE = 'a[href], button, input, select, textarea, summary';\nconst FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]`;\nconst KEYBOARD_FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]:not([tabindex^=\"-\"])`;\nconst INTERACTIVE = [\n NATIVELY_FOCUSABLE,\n 'tr:not([role])',\n ...[\n 'button',\n 'link',\n 'tab',\n 'option',\n 'menuitem',\n 'menuitemcheckbox',\n 'menuitemradio',\n 'row',\n 'gridcell',\n 'combobox',\n 'checkbox',\n 'radio',\n 'switch',\n 'treeitem',\n ].map((role) => `[role=\"${role}\"]`),\n].join(', ');\n\nconst clippedHostsByAncestor = new WeakMap<\n HTMLElement,\n Set<TooltipDirective>\n>();\n\nfunction firstClippedHost(\n tooltips: Set<TooltipDirective>,\n): TooltipDirective | undefined {\n return [...tooltips]\n .sort((a, b) =>\n a.hostElement.compareDocumentPosition(b.hostElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1,\n )\n .find((tooltip) => tooltip.isClipped());\n}\n\nlet nextId = 0;\n\n@Directive({\n selector: '[dsTooltip], [dsTooltipWhenClipped]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** Tip text. An empty string turns the tooltip off. */\n readonly dsTooltip = input<string>('');\n /** Which side the tip opens on. With no room there it opens on the opposite side. */\n readonly dsTooltipPlacement = input<TooltipPlacement>('top');\n /** Milliseconds before the tip appears. Hiding is immediate. */\n readonly dsTooltipDelay = input<number>(120);\n /** Show the tip only while the host shows less text than it holds. Re-tested on every open.\n *\n * Applies the tooltip on its own: without a `dsTooltip` the host's own text is disclosed. A tip\n * whose text the host already contains sets no `aria-describedby`; one given a `dsTooltip`\n * that says more than the host does describes it as usual. */\n readonly dsTooltipWhenClipped = input(false, { transform: booleanAttribute });\n /** Selector for the element inside the host whose clipping `dsTooltipWhenClipped` tests and\n * whose text it discloses. Resolved on every open; while nothing matches, no clipped tip opens. */\n readonly dsTooltipTextSelector = input<string | null>(null);\n\n get hostElement(): HTMLElement {\n return this.host.nativeElement;\n }\n\n private textElement(): HTMLElement | null {\n const selector = this.dsTooltipTextSelector();\n\n return selector\n ? this.hostElement.querySelector<HTMLElement>(selector)\n : this.hostElement;\n }\n\n isClipped(): boolean {\n const textElement = this.textElement();\n\n return textElement !== null && isTextClipped(textElement);\n }\n\n private tipText(): string {\n const given = this.dsTooltip();\n if (given || !this.dsTooltipWhenClipped()) {\n return given;\n }\n\n return (this.textElement()?.textContent ?? '').trim();\n }\n\n /** A clipped host's full text is already in the DOM; describing it again would announce it twice. */\n private disclosesOwnText(text: string): boolean {\n if (!this.dsTooltipWhenClipped()) {\n return false;\n }\n const collapse = (value: string) => value.replace(/\\s+/g, ' ').trim();\n\n return collapse(this.textElement()?.textContent ?? '').includes(\n collapse(text),\n );\n }\n\n private ref: OverlayRef | null = null;\n private timer: number | null = null;\n private readonly tipId = `ds-tooltip-${++nextId}`;\n\n /**\n * Where `aria-describedby` belongs when focus is involved: a non-focusable host\n * (`ds-menu-item` is `role=\"none\"` around a real `<button>`) never reaches a screen\n * reader, so `focusin`'s target is recorded. A pointer-only open leaves it null.\n */\n private focusedTarget: HTMLElement | null = null;\n\n /**\n * Where `aria-describedby` was written, so teardown strips it from the same element\n * even if focus moved `focusedTarget` after the panel opened.\n */\n private describedElement: HTMLElement | null = null;\n\n private detachAncestor: (() => void) | null = null;\n\n constructor() {\n afterNextRender(() => this.listenToFocusableAncestor());\n }\n\n /** `:focus-visible` keeps a click from opening it. Only the first clipped host of one ancestor opens. */\n private listenToFocusableAncestor(): void {\n const host: HTMLElement = this.host.nativeElement;\n if (!this.dsTooltipWhenClipped() || host.matches(FOCUSABLE)) {\n return;\n }\n const ancestor = host.parentElement?.closest<HTMLElement>(FOCUSABLE);\n if (!ancestor?.matches(INTERACTIVE)) {\n return;\n }\n let tooltips = clippedHostsByAncestor.get(ancestor);\n if (!tooltips) {\n tooltips = new Set();\n clippedHostsByAncestor.set(ancestor, tooltips);\n }\n tooltips.add(this);\n const open = (event: FocusEvent) => {\n if (\n event.target !== ancestor ||\n // Tested here, not at registration: a disabled trigger carries tabindex=\"-1\" until enabled.\n !ancestor.matches(KEYBOARD_FOCUSABLE) ||\n !ancestor.matches(':focus-visible') ||\n firstClippedHost(tooltips) !== this\n ) {\n return;\n }\n this.focusedTarget = ancestor;\n this.scheduleShow();\n };\n const close = () => {\n this.focusedTarget = null;\n this.onClose();\n };\n ancestor.addEventListener('focusin', open);\n ancestor.addEventListener('focusout', close);\n ancestor.addEventListener('click', close);\n ancestor.addEventListener('keydown', close);\n this.detachAncestor = () => {\n tooltips.delete(this);\n ancestor.removeEventListener('focusin', open);\n ancestor.removeEventListener('focusout', close);\n ancestor.removeEventListener('click', close);\n ancestor.removeEventListener('keydown', close);\n };\n }\n\n @HostListener('mouseenter')\n protected onPointerEnter(): void {\n this.scheduleShow();\n }\n\n // Same rule as via a focusable ancestor: keyboard focus opens, a click's focus does not.\n @HostListener('focusin', ['$event'])\n protected onFocusIn(event: FocusEvent): void {\n const host = this.hostElement;\n if (\n this.dsTooltipWhenClipped() &&\n host.matches(FOCUSABLE) &&\n (event.target !== host || !host.matches(':focus-visible'))\n ) {\n return;\n }\n if (event.target instanceof HTMLElement) {\n this.focusedTarget = event.target;\n }\n this.scheduleShow();\n }\n\n @HostListener('focusout')\n protected onFocusOut(): void {\n this.focusedTarget = null;\n this.onClose();\n }\n\n private scheduleShow(): void {\n if (!this.tipText()) {\n return;\n }\n if (this.dsTooltipWhenClipped() && !this.isClipped()) {\n return;\n }\n if (this.timer !== null) {\n clearTimeout(this.timer);\n }\n this.timer = window.setTimeout(() => this.show(), this.dsTooltipDelay());\n }\n\n // Close on click too: a re-rendered anchor under a stationary cursor fires no mouseleave.\n @HostListener('mouseleave')\n @HostListener('click')\n protected onClose(): void {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n this.disposeRef();\n }\n\n private disposeRef(): void {\n this.ref?.dispose();\n this.ref = null;\n const described = this.describedElement;\n if (!described) {\n return;\n }\n this.describedElement = null;\n const remaining = (described.getAttribute('aria-describedby') ?? '')\n .split(' ')\n .filter((id: string) => id && id !== this.tipId)\n .join(' ');\n if (remaining) {\n described.setAttribute('aria-describedby', remaining);\n } else {\n described.removeAttribute('aria-describedby');\n }\n }\n\n @HostListener('keydown')\n protected onKeydown(): void {\n if (this.dsTooltipWhenClipped()) {\n this.onClose();\n }\n }\n\n @HostListener('keydown.escape')\n protected onEscape(): void {\n if (this.ref) {\n this.onClose();\n }\n }\n\n private show(): void {\n // show() can be re-entered with a panel open: dispose it first to avoid a leaked OverlayRef and a duplicate id.\n this.disposeRef();\n const placement = this.dsTooltipPlacement();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([\n this.positionFor(placement),\n this.positionFor(OPPOSITE_PLACEMENT[placement]),\n ])\n .withViewportMargin(VIEWPORT_MARGIN_PX);\n\n this.ref = this.overlay.create({\n positionStrategy,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n });\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n\n const cmpRef = this.ref.attach(new ComponentPortal(TooltipPanelComponent));\n const text = this.tipText();\n cmpRef.setInput('text', text);\n cmpRef.setInput('placement', placement);\n positionStrategy.positionChanges.subscribe(({ connectionPair }) =>\n cmpRef.setInput(\n 'placement',\n overlayPlacementOf(connectionPair.overlayY, connectionPair.overlayX),\n ),\n );\n cmpRef.setInput('panelId', this.tipId);\n if (this.disclosesOwnText(text)) {\n return;\n }\n const described = this.focusedTarget ?? this.host.nativeElement;\n this.describedElement = described;\n const existing = described.getAttribute('aria-describedby');\n described.setAttribute(\n 'aria-describedby',\n existing ? `${existing} ${this.tipId}` : this.tipId,\n );\n }\n\n private positionFor(placement: TooltipPlacement) {\n switch (placement) {\n case 'top':\n return {\n originX: 'center' as const,\n originY: 'top' as const,\n overlayX: 'center' as const,\n overlayY: 'bottom' as const,\n offsetY: -TRIGGER_GAP_PX,\n };\n case 'bottom':\n return {\n originX: 'center' as const,\n originY: 'bottom' as const,\n overlayX: 'center' as const,\n overlayY: 'top' as const,\n offsetY: TRIGGER_GAP_PX,\n };\n case 'left':\n return {\n originX: 'start' as const,\n originY: 'center' as const,\n overlayX: 'end' as const,\n overlayY: 'center' as const,\n offsetX: -TRIGGER_GAP_PX,\n };\n case 'right':\n return {\n originX: 'end' as const,\n originY: 'center' as const,\n overlayX: 'start' as const,\n overlayY: 'center' as const,\n offsetX: TRIGGER_GAP_PX,\n };\n }\n }\n\n ngOnDestroy(): void {\n this.detachAncestor?.();\n this.onClose();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAkBa,qBAAqB,CAAA;;AAEvB,IAAA,IAAI,GAAG,KAAK,CAAC,QA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,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,cAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,EAAA,WAAA,EAAA,SAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qCAAqC;AAC/C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBAiIE,YAAY;uBAAC,YAAY;;sBAMzB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;sBAgBlC,YAAY;uBAAC,UAAU;;sBAoBvB,YAAY;uBAAC,YAAY;;sBACzB,YAAY;uBAAC,OAAO;;sBA4BpB,YAAY;uBAAC,SAAS;;sBAOtB,YAAY;uBAAC,gBAAgB;;;AC3RhC;;AAEG;;;;"}
|
|
@@ -483,6 +483,7 @@ const ICONS = {
|
|
|
483
483
|
x: '<path d="M6 6l12 12M18 6L6 18" />',
|
|
484
484
|
chevronDown: '<path d="m6 9 6 6 6-6" />',
|
|
485
485
|
chevronRight: '<path d="m9 6 6 6-6 6" />',
|
|
486
|
+
slash: '<path d="M15 5 9 19" />',
|
|
486
487
|
chevronLeft: '<path d="m15 6-6 6 6 6" />',
|
|
487
488
|
chevronUp: '<path d="m6 15 6-6 6 6" />',
|
|
488
489
|
menu: '<path d="M4 6h16M4 12h16M4 18h16" />',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-core.mjs","sources":["../../../src/lib/core/backdrop-dismiss.ts","../../../src/lib/core/ds-config.ts","../../../src/lib/core/config-defaults.ts","../../../src/lib/core/dev-warning.ts","../../../src/lib/core/announce-warning.ts","../../../src/lib/core/ds-intl-defaults.ts","../../../src/lib/core/ds-intl.ts","../../../src/lib/core/ds-locale.ts","../../../src/lib/core/field-bounds.ts","../../../src/lib/core/icon-names.ts","../../../src/lib/core/key-target.ts","../../../src/lib/core/text-clip.ts","../../../src/lib/core/list-cursor.ts","../../../src/lib/core/option.ts","../../../src/lib/core/ids-group-ltd-ids-design-system-core.ts"],"sourcesContent":["/**\n * Dismiss-on-backdrop for a backdrop that WRAPS its dialog.\n *\n * `click` cannot be trusted there: it fires at the nearest common ancestor of press and release,\n * so a drag from inside the dialog to the backdrop fires `click` ON THE BACKDROP. Dismiss only\n * when press AND release both land on the backdrop itself.\n * @internal\n */\nexport function backdropDismiss(): {\n down: (event: PointerEvent) => void;\n shouldDismiss: (event: PointerEvent) => boolean;\n} {\n let pressedOnBackdrop = false;\n\n return {\n down(event: PointerEvent): void {\n pressedOnBackdrop =\n event.button === 0 && event.target === event.currentTarget;\n },\n shouldDismiss(event: PointerEvent): boolean {\n const dismiss =\n pressedOnBackdrop &&\n event.button === 0 &&\n event.target === event.currentTarget;\n pressedOnBackdrop = false;\n\n return dismiss;\n },\n };\n}\n","import { InjectionToken, inject, type Provider } from '@angular/core';\nimport type { IconName } from './icon-names';\nimport type { DsSize } from './size';\nimport type { CardElevation, CardPadding } from './card.types';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartRendering,\n ChartValueFormat,\n} from './chart.types';\nimport type { DsToastPosition } from './toast-position';\nimport type { PaginationLayout } from './pagination.types';\n\nexport interface DsConfig {\n /** BCP-47 locale every component formats numbers and dates in. Default is Angular's\n * `LOCALE_ID`. A section key that names a locale (`datePicker.locale`) wins over this. */\n locale?: string;\n field?: {\n /** Default for every field's `reserveMessage`. Default `false`. `true` applies to EVERY field\n * in the injector's subtree; prefer `dsReserveMessages` on the form that validates. */\n reserveMessage?: boolean;\n /** Fallback text per validation-error kind, for validators with no `message` (Angular's\n * built-ins never carry one). A message on the error itself wins. Unmapped kinds warn in dev. */\n errorMessages?: Record<string, string>;\n /** Leading glyph on a field's message line, per state. Defaults carry one for `error`,\n * `warning` and `success` (WCAG 1.4.1: not hue alone) and NONE for `hint`. Each key is\n * independent: a glyph name replaces the default, `false` removes it, and\n * `stateIcons: false` removes all four. */\n stateIcons?:\n | false\n | {\n error?: IconName | false;\n warning?: IconName | false;\n success?: IconName | false;\n /** The `default` state (the hint line). Off unless set. */\n hint?: IconName | false;\n };\n };\n breadcrumbs?: {\n separator?: IconName;\n clickable?: boolean;\n };\n timePicker?: {\n /** Display format for `ds-time-picker` / date-picker time - 24h or 12h AM/PM. Default `'24h'`. */\n format?: '24h' | '12h';\n };\n avatar?: {\n /** How `ds-avatar` turns its `name` into initials, app-wide. The built-in rule takes the\n * first two words (a Latin-script guess). */\n initials?: (name: string) => string;\n };\n brand?: {\n /** Brand text for `ds-sidenav` and `ds-auth-layout`: the wordmark, and the source of the\n * letter-mark's glyph when `logoLetter` is unset. */\n name?: string;\n /** Letter-mark glyph when it differs from the brand's first character. */\n logoLetter?: string;\n /** Strapline under the brand row. `ds-auth-layout` only. */\n tagline?: string;\n };\n modal?: {\n /** Default for `dividers` on `ds-modal` and `ds-modal-card`. Default `true`. */\n dividers?: boolean;\n };\n banner?: {\n /** Default for every `ds-banner`'s `announce`. Default `false`: an `alert` region fires on\n * INSERTION, so page-furniture banners would interrupt on every route. Set `true` where banners\n * answer events, and bind `[announce]=\"false\"` on the furniture. `ds-alert` has its own key. */\n announce?: boolean;\n };\n alert?: {\n /** Default for every `ds-alert`'s `announce`. Default `false`, as `banner.announce`. */\n announce?: boolean;\n };\n toast?: {\n /** Where the stack sits. Merged field by field over the built-in\n * `right` / `top` / `var(--space-6)`. */\n position?: Partial<DsToastPosition>;\n /** Maximum number of toasts visible at once; extras queue. Default `5`; `0` is unlimited. */\n maxVisible?: number;\n /** Show a `+N` strip while toasts wait behind `maxVisible`. Default `true`. */\n showQueueCount?: boolean;\n };\n picker?: {\n /** Default for `ds-multi-select`'s `searchable`. `true` always shows the panel's filter row,\n * `false` never, and a NUMBER is a threshold: the row appears once there are at least that\n * many options. Default `true`. */\n searchable?: boolean | number;\n };\n\n control?: {\n /** Default `size` for every control on the field-height contract. Default `'md'`. A different\n * axis from `[data-density]`, which rewrites hit targets and padding in CSS. */\n size?: DsSize;\n };\n pagination?: {\n /** Default `size` for every pager, `ds-table`'s footer included. Unset falls back to\n * `control.size`. */\n size?: DsSize;\n /** Default `layout` for every pager, `ds-table`'s footer included. Default `'grouped'`. */\n layout?: PaginationLayout;\n };\n card?: {\n /** Default `elevation` for `ds-card`. Default `'flat'`. */\n elevation?: CardElevation;\n /** Default `padding` preset for `ds-card`. Unset keeps the card's own. */\n padding?: CardPadding;\n };\n table?: {\n /** Default for `ds-table`'s `stickyScrollbar` (keeps the horizontal bar reachable). Default `false`. */\n stickyScrollbar?: boolean;\n /** Default for `ds-table`'s `bordered` (the outer border and radius). Default `false`. */\n bordered?: boolean;\n /** Default for `ds-table`'s `stickyScrollbarOffset`, as any CSS length. Unset, each table\n * cancels its scroll container's bottom padding. */\n stickyScrollbarOffset?: string;\n };\n icon?: {\n /** Default pixel `size` for `ds-icon`. Default `16`. */\n size?: number;\n };\n badge?: {\n /** Default for `ds-badge`'s `withDot` (the leading status dot). Default `false`. */\n withDot?: boolean;\n };\n chart?: {\n /** Default `dataTable` for every chart. Default `'none'`; `'toggle'` offers the annex everywhere. */\n dataTable?: ChartDataTable;\n /** Whether every chart draws its own bordered, padded box. Default `'auto'`, which draws it. */\n frame?: ChartFrame;\n /** How long a chart's tooltip stays after the pointer leaves the mark, in milliseconds.\n * Default 500; zero closes it at once. */\n tooltipLingerMs?: number;\n /** Whether a click on a mark or category holds its tooltip and highlight. Default `true`.\n * A second click, Escape or a press elsewhere releases. A tap holds whatever this says. */\n pinOnClick?: boolean;\n /** Milliseconds the pointer rests on a mark, category or legend entry before the chart answers.\n * Default 0. After one answer the next is immediate until the pointer leaves the chart;\n * focus, a tap and a pinning click are always immediate. */\n hoverDelayMs?: number;\n /** Whether a chart's tooltip draws a colour dot beside each reading. Unset draws them for two\n * to four readings. */\n tooltipSwatches?: boolean;\n /** How charts format values, annex table and description included. Default groups digits in\n * `locale` and abbreviates on a tick (`1.2M`). */\n valueFormat?: ChartValueFormat;\n /** How charts build themselves on a long page. All off by default. */\n rendering?: ChartRendering;\n };\n datePicker?: {\n /** BCP-47 locale for `ds-date-picker` names and value format. Unset falls back to\n * `locale`, then `LOCALE_ID`. */\n locale?: string;\n /** Explicit token format, e.g. `'MM/DD/YYYY'`; overrides the locale-derived order. */\n dateFormat?: string;\n /** First weekday column: 0=Sunday to 6=Saturday. Default `1` (Monday). */\n firstDayOfWeek?: number;\n };\n}\n\nexport const DS_CONFIG = new InjectionToken<DsConfig>('DS_CONFIG', {\n factory: () => ({}),\n});\n\n/** Provides DS-level defaults: `providers: [provideDsConfig({ control: { size: 'sm' } })]`.\n *\n * Works at the app root, on a `Route`, or on a component/directive. Component inputs still win.\n *\n * A nested call MERGES with the config above it section by section; only the keys you name are\n * replaced. Several calls in one `providers` array merge in order, the later winning per key.\n */\nexport function provideDsConfig(config: DsConfig): Provider {\n return [\n { provide: DS_CONFIG_LAYERS, useValue: config, multi: true },\n { provide: DS_CONFIG, useFactory: mergeDsConfigLayers },\n ];\n}\n\nconst DS_CONFIG_LAYERS = new InjectionToken<readonly DsConfig[]>(\n 'DS_CONFIG_LAYERS',\n);\n\nfunction mergeDsConfigLayers(): DsConfig {\n return inject(DS_CONFIG_LAYERS, { self: true }).reduce(\n mergeDsConfig,\n inject(DS_CONFIG, { skipSelf: true, optional: true }) ?? {},\n );\n}\n\n/**\n * The factory body behind `provideDsConfig`, exported so a directive can put the provider in its\n * metadata as an object literal: calling `provideDsConfig` there makes the module side-effectful\n * and defeats tree-shaking.\n *\n * Must be called from an injection context.\n */\nexport function inheritDsConfig(config: DsConfig): DsConfig {\n return mergeDsConfig(\n inject(DS_CONFIG, { skipSelf: true, optional: true }) ?? {},\n config,\n );\n}\n\nfunction mergeDsConfig(parent: DsConfig, own: DsConfig): DsConfig {\n const merged: DsConfig = { ...parent };\n for (const section of Object.keys(own) as (keyof DsConfig)[]) {\n const value = own[section];\n Object.assign(merged, {\n [section]:\n typeof value === 'object' && value !== null\n ? { ...(parent[section] as object | undefined), ...value }\n : value,\n });\n }\n\n return merged;\n}\n","import { Signal, computed, inject } from '@angular/core';\nimport { DS_CONFIG, type DsConfig } from './ds-config';\n\n/**\n * Resolve an input against `DS_CONFIG`, then a built-in default.\n *\n * The input must be typed `T | null` and default to `null`: a signal input cannot report\n * whether it was bound. Precedence is input → config → built-in. Call from an injection context.\n * @internal\n */\nexport function resolveWithConfig<T>(\n value: Signal<T | null>,\n pick: (config: DsConfig) => T | undefined,\n fallback: T,\n): Signal<T> {\n const config = inject(DS_CONFIG);\n\n return computed(() => value() ?? pick(config) ?? fallback);\n}\n","import { effect, isDevMode } from '@angular/core';\n\n/**\n * Warns once per distinct message: the effect re-runs whenever a signal the condition reads\n * changes, so a static misconfiguration would otherwise log on every keystroke.\n *\n * Must be called from an injection context.\n *\n * Callers wrap this in `if (typeof ngDevMode === 'undefined' || ngDevMode)`: a BUILD-time\n * expression a minifier folds away with the message, which the opaque `isDevMode()` call never\n * allows. It cannot become a helper function for the same reason.\n * @internal\n */\nexport function devWarn(message: () => string | null): void {\n if (!isDevMode()) {\n return;\n }\n const seen = new Set<string>();\n effect(() => {\n const text = message();\n if (!text || seen.has(text)) {\n return;\n }\n seen.add(text);\n console.warn(text);\n });\n}\n","import { inject } from '@angular/core';\nimport { devWarn } from './dev-warning';\nimport { DS_CONFIG } from './ds-config';\n\nexport interface AnnounceState {\n variant: string;\n title: string;\n /** Whether the element would announce as `role=\"alert\"` rather than `status`. */\n assertive: boolean;\n /** The element's own `announce` input, `null` while unbound. */\n announce: boolean | null;\n}\n\n/**\n * Warns about two undecided `announce` cases on `ds-banner` / `ds-alert`: an assertive element\n * left unbound while `DS_CONFIG.<section>.announce` is unset (not heard), and a polite one that\n * announces only because that key is `true`. Once per instance, dev mode only; the caller wraps\n * the call in the `typeof ngDevMode` guard (see `devWarn`). Must be called from an injection context.\n * @internal\n */\nexport function warnAnnounceOversight(\n tag: 'ds-banner' | 'ds-alert',\n section: 'banner' | 'alert',\n state: () => AnnounceState,\n): void {\n const configured = inject(DS_CONFIG)[section]?.announce;\n devWarn(() => {\n const { variant, title, assertive, announce } = state();\n if (announce !== null) {\n return null;\n }\n const element = `[${tag}] variant=\"${variant}\"${title ? ` title=\"${title}\"` : ''}`;\n if (assertive && configured === undefined) {\n return `${element} is not announced, so a screen reader will not hear it. Decide once for the app with provideDsConfig({ ${section}: { announce: true } }) and bind [announce]=\"false\" on page furniture; this warning ends once the key is set, true or false.`;\n }\n if (!assertive && configured === true) {\n return `${element} announces because DS_CONFIG.${section}.announce is true, not because this element asked to. Bind [announce]=\"false\" if it is page furniture, or [announce]=\"true\" to keep it announced on purpose.`;\n }\n\n return null;\n });\n}\n","import type { DsIntl } from './ds-intl.types';\n\n/** English wording for every string the library invents. Used unless `provideDsIntl` overrides\n * a section. */\nexport const DS_INTL_DEFAULTS: DsIntl = {\n field: {\n optional: '(optional)',\n clearInput: 'Clear input',\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n overLimit: (excess) =>\n excess === 1\n ? '1 character over the limit'\n : `${excess} characters over the limit`,\n },\n picker: {\n placeholder: 'Select…',\n filterPlaceholder: 'Filter…',\n clearSelection: 'Clear selection',\n noMatches: 'No matches',\n noOptions: 'No options',\n selectAll: 'Select all',\n selectAllInGroup: (group) => `All of ${group}`,\n create: (query) => `Create «${query}»`,\n moreChips: (count) => `+${count} more`,\n removeChip: (label) => `Remove ${label}`,\n selectedNoun: 'selected',\n resultCount: (count) =>\n count === 0\n ? 'No results'\n : count === 1\n ? '1 result'\n : `${count} results`,\n },\n datePicker: {\n placeholder: 'Select date',\n openCalendar: 'Choose date',\n selectMonth: 'Select month',\n selectYear: 'Select year',\n previousYears: 'Previous years',\n nextYears: 'Next years',\n invalidDate: (mask) => `Enter a valid date (${mask})`,\n },\n timePicker: {\n selectTime: 'Select time',\n rangeStart: (label) => `${label} (from)`,\n rangeEnd: (label) => `${label} (to)`,\n clear: 'Clear',\n now: 'Now',\n done: 'Done',\n time: 'Time',\n hours: 'Hours',\n minutes: 'Minutes',\n period: 'AM/PM',\n },\n colorPicker: {\n label: 'Choose colour',\n saturationBrightness:\n 'Saturation and brightness — use arrow keys to adjust',\n hue: 'Hue',\n hexValue: 'Hex colour value',\n presets: 'Preset colours',\n },\n otpInput: {\n label: 'Verification code',\n digit: (position) => `Digit ${position}`,\n character: (position) => `Character ${position}`,\n },\n slider: {\n rangeStart: (label) => (label ? `${label} minimum` : 'Minimum'),\n rangeEnd: (label) => (label ? `${label} maximum` : 'Maximum'),\n },\n numberStepper: {\n decrease: 'Decrease',\n increase: 'Increase',\n },\n search: {\n placeholder: 'Search',\n clear: 'Clear search',\n },\n dropzone: {\n label: 'Upload files',\n title: 'Drop files here',\n hint: 'or click to browse',\n remove: (fileName) => `Remove ${fileName}`,\n uploading: 'uploading',\n success: 'success',\n error: 'error',\n },\n passwordRules: {\n pending: 'not yet met',\n met: 'met',\n failed: 'not met',\n },\n tag: {\n remove: 'Remove',\n },\n badge: {\n noun: 'notifications',\n count: (count, noun) => `${count} ${noun}`,\n overMax: (max, noun) => `More than ${max} ${noun}`,\n },\n avatar: {\n online: 'Online',\n offline: 'Offline',\n away: 'Away',\n busy: 'Busy',\n },\n avatarGroup: {\n more: (count) => `${count} more`,\n },\n descriptionList: {\n copy: 'Copy value',\n copied: 'Copied',\n },\n what3words: {\n copy: (address) => `Copy what3words address ${address}`,\n },\n dialog: {\n close: 'Close',\n closeDialog: 'Close dialog',\n dismiss: 'Dismiss',\n confirm: 'Confirm',\n cancel: 'Cancel',\n typeToConfirmBefore: 'Type',\n typeToConfirmAfter: 'to confirm',\n },\n toast: {\n region: 'Notifications',\n },\n spinner: {\n label: 'Loading',\n },\n breadcrumbs: {\n label: 'Breadcrumb',\n },\n appLayout: {\n railLabel: 'Navigation',\n },\n sidenav: {\n expandGroup: (label) => `Expand ${label}`,\n collapseGroup: (label) => `Collapse ${label}`,\n },\n sidenavFooter: {\n search: 'Search',\n searchPlaceholder: 'Search…',\n clear: 'Clear',\n noMatches: (query) => `No matches for “${query}”.`,\n typeToSearch: 'Type to search.',\n alerts: 'Alerts',\n allCaughtUp: 'You’re all caught up.',\n accountMenu: 'Account menu',\n account: 'Account',\n signedInAs: (name) => `Signed in as ${name}`,\n profile: 'Your profile',\n settings: 'Account settings',\n help: 'Help & support',\n signOut: 'Sign out',\n expand: 'Expand',\n collapse: 'Collapse',\n },\n stepper: {\n label: 'Progress',\n step: (position, label, state) => `Step ${position}: ${label} (${state})`,\n },\n tabs: {\n close: (label) => `Close ${label}`,\n },\n splitButton: {\n menuLabel: 'More actions',\n },\n filterBar: {\n more: 'more',\n panelLabel: 'More filters',\n },\n pagination: {\n label: 'Pagination',\n previous: 'Previous page',\n next: 'Next page',\n page: (page) => `Page ${page}`,\n range: (first, last, total) =>\n total === 0 ? 'Showing 0 of 0' : `Showing ${first}–${last} of ${total}`,\n perPage: (size) => `${size} per page`,\n rowsPerPage: 'Rows per page',\n },\n table: {\n actions: 'Actions',\n actionsFor: (row) => `Actions for ${row}`,\n filterColumn: (column) => `Filter ${column}`,\n resizeColumn: (column) => `Resize ${column}`,\n narrowColumn: (column) => `Narrow ${column}`,\n widenColumn: (column) => `Widen ${column}`,\n fitColumn: (column) => `Fit ${column} to its content`,\n fit: 'Fit',\n selectRow: (row) => `Select ${row}`,\n expandRow: 'Expand row',\n collapseRow: 'Collapse row',\n filterValues: 'Filter values',\n filterSearch: 'Search…',\n emptyValue: '(empty)',\n noMatches: 'No matches',\n selectedCount: (count) => `${count} selected`,\n clear: 'Clear',\n loading: 'Loading…',\n sorted: (label, direction) =>\n direction\n ? `Sorted by ${label}, ${direction === 'asc' ? 'ascending' : 'descending'}`\n : 'Sorting cleared',\n rowsExpanded: (count) => `${count} rows expanded`,\n selectAllRows: (onThisPage) =>\n onThisPage ? 'Select all rows on this page' : 'Select all rows',\n expandAllRows: (onThisPage) =>\n `Expand all rows${onThisPage ? ' on this page' : ''}`,\n collapseAllRows: (onThisPage) =>\n `Collapse all rows${onThisPage ? ' on this page' : ''}`,\n },\n tableColumns: {\n title: 'Columns',\n panelLabel: 'Column visibility',\n moveUp: 'Move up',\n moveDown: 'Move down',\n reset: 'Reset to default',\n trigger: 'Choose columns',\n },\n tableExport: {\n button: 'Export CSV',\n buttonBusy: 'Preparing…',\n preparing: 'Preparing export…',\n ready: 'Export ready',\n failed: 'Export failed',\n },\n chart: {\n empty: 'No data',\n error: 'Could not load the data',\n title: 'Chart',\n unpin: 'Unpin',\n dataTable: 'Data table',\n dataTableCaption: 'Chart data',\n legendAll: 'All',\n legendNone: 'None',\n labelColumn: 'Label',\n valueColumn: 'Value',\n shareColumn: 'Share of total',\n seriesColumn: 'Series',\n categoryColumn: 'Category',\n shareOfTotal: (share) => `${share} of total`,\n other: 'Other',\n noVisibleSeries: 'All series are hidden',\n target: (value) => `Target ${value}`,\n noted: (notes) => `Noted: ${notes.join('; ')}.`,\n noData: (label) => `${label}. No data.`,\n onePoint: (label, value, at) => `${label}, one point: ${value} at ${at}.`,\n range: (label, count, lowest, highest) =>\n `${label}, ${count} points, ${lowest} to ${highest}.`,\n trendRisingThroughout: 'Rising throughout',\n trendFallingThroughout: 'Falling throughout',\n trendRisingOverall: 'Rising overall',\n trendFallingOverall: 'Falling overall',\n trendFlat: 'Ending where it started',\n extremes: (highestLabel, highest, lowestLabel, lowest) =>\n `Highest in ${highestLabel} at ${highest}, lowest in ${lowestLabel} at ${lowest}.`,\n tableFollows: 'Full values in the table below.',\n threshold: 'Threshold',\n thresholdAbove: (name, value, count, total) =>\n `${name} at ${value}, ${count} of ${total} ${total === 1 ? 'point' : 'points'} above.`,\n thresholdInside: (name, low, high, count, total) =>\n `${name} from ${low} to ${high}, ${count} of ${total} ${total === 1 ? 'point' : 'points'} inside.`,\n funnelCaption:\n 'Each stage as a percentage of the first, and the drop from the stage above it.',\n stageColumn: 'Stage',\n percentColumn: 'Percent',\n dropColumn: 'Drop',\n fellAway: (drop) => `${drop} fell away since the stage above`,\n noReading: 'No reading',\n heatmapTitle: 'Heat map',\n heatmapSummary: (title, rows, columns, lowest, highest) =>\n `${title}, ${rows} rows by ${columns} columns, readings from ${lowest} to ${highest}.`,\n scatterTitle: 'Scatter chart',\n scatterAxis: (axis, from, to) => `${axis} from ${from} to ${to}`,\n scatterSummary: (title, count, axes, dropped) =>\n `${title}: ${count} readings drawn, ${axes}.${\n dropped > 0\n ? ` ${dropped} further readings were thinned out to keep the plot drawable; the data table lists every one.`\n : ''\n }`,\n scatterThinned: (count) =>\n `${count} readings thinned out to keep the plot drawable - every one is in the data table.`,\n waterfallTitle: 'Waterfall chart',\n waterfallCaption: 'Waterfall',\n increase: 'increase',\n decrease: 'decrease',\n total: 'total',\n stepColumn: 'Step',\n directionColumn: 'Direction',\n runningTotalColumn: 'Running total',\n endsAt: (value) => `Ends at ${value}.`,\n },\n};\n","import {\n InjectionToken,\n computed,\n inject,\n signal,\n type Provider,\n type Signal,\n} from '@angular/core';\nimport { DS_INTL_DEFAULTS } from './ds-intl-defaults';\nimport type { DsIntl, DsIntlOverrides } from './ds-intl.types';\n\nconst DEFAULTS = signal(DS_INTL_DEFAULTS).asReadonly();\n\n/** Every string the library invents, as a signal so a language switch re-renders in place.\n * Unprovided, it holds the English defaults. */\nexport const DS_INTL = new InjectionToken<Signal<DsIntl>>('DS_INTL', {\n factory: () => DEFAULTS,\n});\n\n/** Provide the library's wording.\n *\n * providers: [provideDsIntl({ picker: { selectAll: 'Выбрать все' } })]\n *\n * Pass an object for a fixed language, or a factory returning a signal for a language that\n * changes at runtime (the factory runs in an injection context):\n *\n * provideDsIntl(() => { const language = inject(LanguageService); return computed(() => language.dictionary().ds); })\n *\n * Works at the root, on a `Route` or on a component; a nested call MERGES section by section,\n * as `provideDsConfig` does, and several calls in one `providers` array merge in order. Numbers\n * and dates follow `DsConfig.locale`, then `LOCALE_ID`. */\nexport function provideDsIntl(\n overrides: DsIntlOverrides | (() => Signal<DsIntlOverrides>),\n): Provider {\n return [\n { provide: DS_INTL_LAYERS, useValue: overrides, multi: true },\n { provide: DS_INTL, useFactory: mergeDsIntlLayers },\n ];\n}\n\ntype DsIntlLayer = DsIntlOverrides | (() => Signal<DsIntlOverrides>);\n\nconst DS_INTL_LAYERS = new InjectionToken<readonly DsIntlLayer[]>(\n 'DS_INTL_LAYERS',\n);\n\nfunction mergeDsIntlLayers(): Signal<DsIntl> {\n const parent =\n inject(DS_INTL, { skipSelf: true, optional: true }) ?? DEFAULTS;\n const layers = inject(DS_INTL_LAYERS, { self: true }).map((layer) =>\n typeof layer === 'function' ? layer() : signal(layer).asReadonly(),\n );\n\n return computed(() =>\n layers.reduce((merged, layer) => mergeDsIntl(merged, layer()), parent()),\n );\n}\n\nfunction mergeDsIntl(parent: DsIntl, own: DsIntlOverrides): DsIntl {\n const merged = { ...parent };\n for (const section of Object.keys(own) as (keyof DsIntl)[]) {\n Object.assign(merged, {\n [section]: { ...parent[section], ...own[section] },\n });\n }\n\n return merged;\n}\n","import { LOCALE_ID, inject } from '@angular/core';\nimport { DS_CONFIG } from './ds-config';\n\n/**\n * The BCP-47 tag the library formats numbers and dates in: `DsConfig.locale`, then Angular's\n * `LOCALE_ID`. Call from an injection context.\n * @internal\n */\nexport function injectDsLocale(): string {\n return inject(DS_CONFIG).locale ?? inject(LOCALE_ID);\n}\n","/**\n * Signal forms binds `min`, `max`, `minLength` and `maxLength` BY NAME and sends `undefined`\n * for no bound; the DS spells it `null`, so the write type accepts both.\n * @internal\n */\nexport function optionalBound(value: number | null | undefined): number | null {\n return value ?? null;\n}\n\n/** As `optionalBound`, for a bound the control requires a value for.\n * @internal\n */\nexport function boundOr(fallback: number) {\n return (value: number | undefined): number => value ?? fallback;\n}\n","// All paths render inside <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\">, stroke-width 1.75.\n\nexport const ICONS = {\n search: '<circle cx=\"11\" cy=\"11\" r=\"7\" /><path d=\"m20 20-3.5-3.5\" />',\n plus: '<path d=\"M12 5v14M5 12h14\" />',\n minus: '<path d=\"M5 12h14\" />',\n check: '<path d=\"m4 12 5 5L20 6\" />',\n x: '<path d=\"M6 6l12 12M18 6L6 18\" />',\n chevronDown: '<path d=\"m6 9 6 6 6-6\" />',\n chevronRight: '<path d=\"m9 6 6 6-6 6\" />',\n chevronLeft: '<path d=\"m15 6-6 6 6 6\" />',\n chevronUp: '<path d=\"m6 15 6-6 6 6\" />',\n menu: '<path d=\"M4 6h16M4 12h16M4 18h16\" />',\n arrowRight: '<path d=\"M5 12h14M13 6l6 6-6 6\" />',\n arrowUp: '<path d=\"M12 19V5M6 11l6-6 6 6\" />',\n arrowDown: '<path d=\"M12 5v14M6 13l6 6 6-6\" />',\n info: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 8v.01M11 12h1v4h1\" />',\n warn: '<path d=\"M12 3 2 21h20L12 3z\" /><path d=\"M12 10v4M12 18v.01\" />',\n error: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 8v4M12 16v.01\" />',\n success: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"m8 12 3 3 5-6\" />',\n bell: '<path d=\"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9\" /><path d=\"M10 21a2 2 0 0 0 4 0\" />',\n settings:\n '<circle cx=\"12\" cy=\"12\" r=\"3\" /><path d=\"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z\" />',\n user: '<circle cx=\"12\" cy=\"8\" r=\"4\" /><path d=\"M4 21a8 8 0 0 1 16 0\" />',\n users:\n '<circle cx=\"9\" cy=\"8\" r=\"4\" /><path d=\"M2 21a7 7 0 0 1 14 0\" /><path d=\"M16 4a4 4 0 0 1 0 8M22 21a6 6 0 0 0-6-6\" />',\n home: '<path d=\"m3 11 9-8 9 8\" /><path d=\"M5 10v10h14V10\" />',\n calendar:\n '<rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" /><path d=\"M3 10h18M8 3v4M16 3v4\" />',\n truck:\n '<path d=\"M3 16V6a1 1 0 0 1 1-1h11v11\" /><path d=\"M15 9h4l2 3v4h-6\" /><circle cx=\"7.5\" cy=\"17.5\" r=\"2\" /><circle cx=\"17.5\" cy=\"17.5\" r=\"2\" />',\n box: '<path d=\"m21 8-9-5-9 5 9 5 9-5z\" /><path d=\"M3 8v8l9 5 9-5V8\" /><path d=\"m12 13 .01 8\" />',\n map: '<path d=\"m9 4-6 3v13l6-3 6 3 6-3V4l-6 3-6-3z\" /><path d=\"M9 4v13M15 7v13\" />',\n activity: '<path d=\"M3 12h4l3-9 4 18 3-9h4\" />',\n folder:\n '<path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />',\n edit: '<path d=\"M12 20h9\" /><path d=\"M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4z\" />',\n external:\n '<path d=\"M14 4h6v6\" /><path d=\"M20 4 10 14\" /><path d=\"M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5\" />',\n trash:\n '<path d=\"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" /><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />',\n copy: '<rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M5 15V5a2 2 0 0 1 2-2h10\" />',\n download: '<path d=\"M12 4v12M6 12l6 6 6-6\" /><path d=\"M4 20h16\" />',\n upload: '<path d=\"M12 20V8M6 12l6-6 6 6\" /><path d=\"M4 4h16\" />',\n eye: '<path d=\"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z\" /><circle cx=\"12\" cy=\"12\" r=\"3\" />',\n filter: '<path d=\"M3 5h18l-7 9v6l-4-2v-4z\" />',\n sort: '<path d=\"M7 4v16M3 8l4-4 4 4\" /><path d=\"M17 20V4M21 16l-4 4-4-4\" />',\n sortAsc: '<path d=\"M7 18V6M3 10l4-4 4 4\" />',\n sortDesc: '<path d=\"M7 6v12M11 14l-4 4-4-4\" />',\n grid: '<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" /><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" />',\n list: '<path d=\"M8 6h13M8 12h13M8 18h13\" /><circle cx=\"3.5\" cy=\"6\" r=\"1.2\" /><circle cx=\"3.5\" cy=\"12\" r=\"1.2\" /><circle cx=\"3.5\" cy=\"18\" r=\"1.2\" />',\n moreH:\n '<circle cx=\"5\" cy=\"12\" r=\"1.5\" /><circle cx=\"12\" cy=\"12\" r=\"1.5\" /><circle cx=\"19\" cy=\"12\" r=\"1.5\" />',\n moreV:\n '<circle cx=\"12\" cy=\"5\" r=\"1.5\" /><circle cx=\"12\" cy=\"12\" r=\"1.5\" /><circle cx=\"12\" cy=\"19\" r=\"1.5\" />',\n link: '<path d=\"M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1\" /><path d=\"M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1\" />',\n flag: '<path d=\"M5 21V5a14 14 0 0 1 14 0v9a14 14 0 0 1-14 0z\" />',\n star: '<path d=\"m12 3 2.9 6 6.6.9-4.8 4.6 1.1 6.5L12 17.8 6.2 21l1.1-6.5L2.5 9.9 9.1 9z\" />',\n inbox:\n '<path d=\"M22 12h-6l-2 3h-4l-2-3H2\" /><path d=\"M5 4h14l3 8v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8z\" />',\n archive:\n '<rect x=\"3\" y=\"3\" width=\"18\" height=\"5\" rx=\"1\" /><path d=\"M5 8v11a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8M10 12h4\" />',\n clock: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 7v5l3 2\" />',\n refresh:\n '<path d=\"M3 12a9 9 0 0 1 15-6.7L21 8\" /><path d=\"M21 3v5h-5\" /><path d=\"M21 12a9 9 0 0 1-15 6.7L3 16\" /><path d=\"M3 21v-5h5\" />',\n play: '<path d=\"M6 4l14 8-14 8z\" />',\n pause: '<path d=\"M7 4v16M17 4v16\" />',\n cmd: '<path d=\"M9 9h6v6H9zM6 9V7a3 3 0 1 1 3 3H6zM6 15v2a3 3 0 1 0 3-3H6zM18 9V7a3 3 0 1 0-3 3h3zM18 15v2a3 3 0 1 1-3-3h3z\" />',\n paperclip:\n '<path d=\"m21 11-9 9a5 5 0 0 1-7-7l9-9a3 3 0 0 1 4 4l-9 9a1 1 0 0 1-1-1l8-8\" />',\n file: '<path d=\"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z\" /><path d=\"M14 3v6h6\" />',\n image:\n '<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" /><circle cx=\"9\" cy=\"9\" r=\"2\" /><path d=\"m21 15-5-5L5 21\" />',\n lock: '<rect x=\"4\" y=\"11\" width=\"16\" height=\"10\" rx=\"2\" /><path d=\"M8 11V7a4 4 0 0 1 8 0v4\" />',\n logout:\n '<path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" /><path d=\"m16 17 5-5-5-5M21 12H9\" />',\n help: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9.5 9a2.5 2.5 0 0 1 5 0c0 1.5-2.5 2-2.5 4M12 17v.01\" />',\n pin: '<path d=\"M15 4.5 11 8.5 7 10 5.5 11.5 12.5 18.5 14 17 15.5 13 19.5 9\" /><path d=\"m9 15-4.5 4.5\" /><path d=\"m14.5 4 5.5 5.5\" />',\n bookmark: '<path d=\"M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16l-7-4z\" />',\n sparkle:\n '<path d=\"M12 3v6M12 15v6M3 12h6M15 12h6M5.6 5.6l4.2 4.2M14.2 14.2l4.2 4.2M5.6 18.4l4.2-4.2M14.2 9.8l4.2-4.2\" />',\n layers:\n '<path d=\"m12 3 9 5-9 5-9-5z\" /><path d=\"m3 13 9 5 9-5M3 18l9 5 9-5\" />',\n chart: '<path d=\"M3 3v18h18\" /><path d=\"M7 14l4-4 4 4 5-5\" />',\n gauge:\n '<path d=\"M12 14l4-4\" /><circle cx=\"12\" cy=\"14\" r=\"9\" /><path d=\"M3 14a9 9 0 0 1 18 0\" />',\n package:\n '<path d=\"M3 7v10l9 4 9-4V7l-9-4z\" /><path d=\"m3 7 9 5 9-5M12 12v9\" />',\n git: '<circle cx=\"6\" cy=\"6\" r=\"2.5\" /><circle cx=\"6\" cy=\"18\" r=\"2.5\" /><circle cx=\"18\" cy=\"12\" r=\"2.5\" /><path d=\"M6 8.5v7M8.5 6h4a3 3 0 0 1 3 3v0\" />',\n sun: '<circle cx=\"12\" cy=\"12\" r=\"4\" /><path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />',\n moon: '<path d=\"M21 13a9 9 0 0 1-12-12 9 9 0 1 0 12 12z\" />',\n save: '<path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\" /><path d=\"M17 21v-8H7v8M7 3v5h8\" />',\n rotate: '<path d=\"M3 12a9 9 0 1 0 3-6.7L3 8\" /><path d=\"M3 3v5h5\" />',\n qr: '<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" /><path d=\"M14 14h3v3h-3zM18 18h3v3h-3z\" />',\n globe:\n '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18\" />',\n phone:\n '<path d=\"M5 4h4l2 5-2 1a11 11 0 0 0 5 5l1-2 5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z\" />',\n bin: '<rect x=\"3\" y=\"6\" width=\"18\" height=\"14\" rx=\"2\" /><path d=\"M7 6V4h10v2\" />',\n pen: '<path d=\"M3 17V21h4l11-11-4-4z\" />',\n smile:\n '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9 9v.01M15 9v.01M8 14a5 5 0 0 0 8 0\" />',\n frown:\n '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9 9v.01M15 9v.01M8 16a5 5 0 0 1 8 0\" />',\n mail: '<rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" /><path d=\"m3 7 9 6 9-6\" />',\n 'eye-off':\n '<path d=\"M3 3l18 18\" /><path d=\"M10.6 6.1A10 10 0 0 1 12 6c6 0 10 7 10 7a14 14 0 0 1-2.4 3.1\" /><path d=\"M6.7 6.7A14 14 0 0 0 2 12s4 7 10 7a10 10 0 0 0 4.5-1\" /><path d=\"M9.9 14.1A3 3 0 0 1 9 12a3 3 0 0 1 3-3 3 3 0 0 1 2.1.9\" />',\n 'check-circle': '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"m8 12 3 3 5-6\" />',\n circle: '<circle cx=\"12\" cy=\"12\" r=\"8\" />',\n drag: '<circle cx=\"9\" cy=\"6\" r=\"1.6\" /><circle cx=\"15\" cy=\"6\" r=\"1.6\" /><circle cx=\"9\" cy=\"12\" r=\"1.6\" /><circle cx=\"15\" cy=\"12\" r=\"1.6\" /><circle cx=\"9\" cy=\"18\" r=\"1.6\" /><circle cx=\"15\" cy=\"18\" r=\"1.6\" />',\n scan: '<path d=\"M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3\" />',\n wifi: '<path d=\"M2 9.5a15 15 0 0 1 20 0\" /><path d=\"M5 13a10 10 0 0 1 14 0\" /><path d=\"M8.5 16.5a5 5 0 0 1 7 0\" /><path d=\"M12 20h.01\" />',\n 'wifi-off':\n '<path d=\"m3 3 18 18\" /><path d=\"M12 20h.01\" /><path d=\"M8.5 16.5a5 5 0 0 1 7 0\" /><path d=\"M5 13a10 10 0 0 1 3.5-2.3\" /><path d=\"M11 8.6A10 10 0 0 1 19 13\" /><path d=\"M2 9.5a15 15 0 0 1 5.7-3.2\" /><path d=\"M11.6 5.6A15 15 0 0 1 22 9.5\" />',\n} as const;\n\n/** Built-in DS icon names. Consumers extend the runtime set via `provideDsIcons({...})`; the\n * type widens to `string` so a custom name is accepted, without autocomplete. */\nexport type IconName = keyof typeof ICONS | (string & {});\n","const NON_TEXT_INPUT_TYPES = new Set([\n 'button',\n 'checkbox',\n 'color',\n 'file',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n]);\n\n/** True when the key landed on a control that consumes its own keystrokes.\n * @internal\n */\nexport function isTextEntryTarget(event: Event): boolean {\n const target = event.target;\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n if (target.isContentEditable) {\n return true;\n }\n const tag = target.tagName.toLowerCase();\n if (tag === 'textarea' || tag === 'select') {\n return true;\n }\n\n return (\n tag === 'input' &&\n !NON_TEXT_INPUT_TYPES.has((target as HTMLInputElement).type.toLowerCase())\n );\n}\n","/** True when `element` is showing less text than it holds, horizontally.\n *\n * Descendants count: a template-driven cell puts the ellipsis on a child. Only horizontal:\n * a clamped block hides whole LINES with `scrollWidth` equal to `clientWidth`.\n */\nexport function isTextClipped(element: HTMLElement): boolean {\n if (element.scrollWidth > element.clientWidth) {\n return true;\n }\n\n return [...element.querySelectorAll<HTMLElement>('*')].some(\n (child) => child.scrollWidth > child.clientWidth,\n );\n}\n","/**\n * Index arithmetic for a keyboard cursor over options: skips disabled entries, wraps at the ends.\n */\nexport interface DsListCursorList {\n length: number;\n isEnabled: (index: number) => boolean;\n}\n\n/** Where the cursor lands, or -1 when nothing in the list can take it.\n * @internal\n */\nexport function firstEnabledIndex(list: DsListCursorList): number {\n for (let index = 0; index < list.length; index += 1) {\n if (list.isEnabled(index)) {\n return index;\n }\n }\n\n return -1;\n}\n\n/** @internal */\nexport function lastEnabledIndex(list: DsListCursorList): number {\n for (let index = list.length - 1; index >= 0; index -= 1) {\n if (list.isEnabled(index)) {\n return index;\n }\n }\n\n return -1;\n}\n\n/**\n * The next enabled index `step` away from `from`, wrapping at both ends.\n *\n * `from` of -1 means \"no cursor yet\".\n * @internal\n */\nexport function nextEnabledIndex(\n list: DsListCursorList,\n from: number,\n step: number,\n): number {\n if (list.length === 0) {\n return -1;\n }\n if (from < 0) {\n return step > 0 ? firstEnabledIndex(list) : lastEnabledIndex(list);\n }\n\n let index = from;\n // eslint-disable-next-line @typescript-eslint/prefer-for-of -- walks from `from` with modulo wraparound; `attempts` only bounds the walk, it is not a sequential index\n for (let attempts = 0; attempts < list.length; attempts += 1) {\n index = (index + step + list.length) % list.length;\n if (list.isEnabled(index)) {\n return index;\n }\n }\n\n return from;\n}\n","import type { IconName } from './icon-names';\n\n/**\n * The shape every picker's option shares (select, multi-select, autocomplete). Each keeps its\n * own exported name. `T` exists because autocomplete carries typed values.\n */\nexport interface DsOption<T = string> {\n value: T;\n label: string;\n disabled?: boolean;\n /** Why this option cannot be picked; reaches the row as `aria-describedby`. Needs `disabled`. */\n disabledReason?: string;\n /** Rendered before the label at 16px. */\n icon?: IconName;\n}\n\n/** A labelled section of options. `disabled` turns the whole section off. */\nexport interface DsOptionGroup<T = string> {\n label: string;\n options: DsOption<T>[];\n disabled?: boolean;\n}\n\n/**\n * What a picker's `options` input takes: flat options, groups, or both mixed.\n */\nexport type DsOptionItem<T = string> = DsOption<T> | DsOptionGroup<T>;\n\nexport function isDsOptionGroup<T>(\n item: DsOptionItem<T>,\n): item is DsOptionGroup<T> {\n return 'options' in item && Array.isArray((item as DsOptionGroup<T>).options);\n}\n\n/** Every option in `items`, groups flattened in place, in source order. */\nexport function flattenDsOptions<T>(\n items: readonly DsOptionItem<T>[],\n): DsOption<T>[] {\n return items.flatMap((item) =>\n isDsOptionGroup(item)\n ? item.options.map((option) =>\n // Copy only when the flag is missing: pickers pre-apply a disabled group to the options\n // they render, and a second copy would break the identity their flat-index lookup uses.\n item.disabled && !option.disabled\n ? { ...option, disabled: true }\n : option,\n )\n : [item],\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAOG;SACa,eAAe,GAAA;IAI7B,IAAI,iBAAiB,GAAG,KAAK;IAE7B,OAAO;AACL,QAAA,IAAI,CAAC,KAAmB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A,IAAI,KAAK,GAAG,IAAI;;AAEhB,IAAA,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,IAAI,CAAC,EAAE;AAC5D,QAAA,KAAK,GAAG,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;AAClD,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;AACzB,YAAA,OAAO,KAAK;QACd;IACF;AAEA,IAAA,OAAO,IAAI;AACb;;AChCM,SAAU,eAAe,CAC7B,IAAqB,EAAA;AAErB,IAAA,OAAO,SAAS,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAE,IAAyB,CAAC,OAAO,CAAC;AAC/E;AAEA;AACM,SAAU,gBAAgB,CAC9B,KAAiC,EAAA;AAEjC,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,KACxB,eAAe,CAAC,IAAI;UAChB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM;;;AAGtB,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC;cACrB,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI;cAC3B,MAAM;AAEd,UAAE,CAAC,IAAI,CAAC,CACX;AACH;;ACjDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-core.mjs","sources":["../../../src/lib/core/backdrop-dismiss.ts","../../../src/lib/core/ds-config.ts","../../../src/lib/core/config-defaults.ts","../../../src/lib/core/dev-warning.ts","../../../src/lib/core/announce-warning.ts","../../../src/lib/core/ds-intl-defaults.ts","../../../src/lib/core/ds-intl.ts","../../../src/lib/core/ds-locale.ts","../../../src/lib/core/field-bounds.ts","../../../src/lib/core/icon-names.ts","../../../src/lib/core/key-target.ts","../../../src/lib/core/text-clip.ts","../../../src/lib/core/list-cursor.ts","../../../src/lib/core/option.ts","../../../src/lib/core/ids-group-ltd-ids-design-system-core.ts"],"sourcesContent":["/**\n * Dismiss-on-backdrop for a backdrop that WRAPS its dialog.\n *\n * `click` cannot be trusted there: it fires at the nearest common ancestor of press and release,\n * so a drag from inside the dialog to the backdrop fires `click` ON THE BACKDROP. Dismiss only\n * when press AND release both land on the backdrop itself.\n * @internal\n */\nexport function backdropDismiss(): {\n down: (event: PointerEvent) => void;\n shouldDismiss: (event: PointerEvent) => boolean;\n} {\n let pressedOnBackdrop = false;\n\n return {\n down(event: PointerEvent): void {\n pressedOnBackdrop =\n event.button === 0 && event.target === event.currentTarget;\n },\n shouldDismiss(event: PointerEvent): boolean {\n const dismiss =\n pressedOnBackdrop &&\n event.button === 0 &&\n event.target === event.currentTarget;\n pressedOnBackdrop = false;\n\n return dismiss;\n },\n };\n}\n","import { InjectionToken, inject, type Provider } from '@angular/core';\nimport type { IconName } from './icon-names';\nimport type { DsSize } from './size';\nimport type { CardElevation, CardPadding } from './card.types';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartRendering,\n ChartValueFormat,\n} from './chart.types';\nimport type { DsToastPosition } from './toast-position';\nimport type { PaginationLayout } from './pagination.types';\n\nexport interface DsConfig {\n /** BCP-47 locale every component formats numbers and dates in. Default is Angular's\n * `LOCALE_ID`. A section key that names a locale (`datePicker.locale`) wins over this. */\n locale?: string;\n field?: {\n /** Default for every field's `reserveMessage`. Default `false`. `true` applies to EVERY field\n * in the injector's subtree; prefer `dsReserveMessages` on the form that validates. */\n reserveMessage?: boolean;\n /** Fallback text per validation-error kind, for validators with no `message` (Angular's\n * built-ins never carry one). A message on the error itself wins. Unmapped kinds warn in dev. */\n errorMessages?: Record<string, string>;\n /** Leading glyph on a field's message line, per state. Defaults carry one for `error`,\n * `warning` and `success` (WCAG 1.4.1: not hue alone) and NONE for `hint`. Each key is\n * independent: a glyph name replaces the default, `false` removes it, and\n * `stateIcons: false` removes all four. */\n stateIcons?:\n | false\n | {\n error?: IconName | false;\n warning?: IconName | false;\n success?: IconName | false;\n /** The `default` state (the hint line). Off unless set. */\n hint?: IconName | false;\n };\n };\n breadcrumbs?: {\n separator?: IconName;\n clickable?: boolean;\n };\n timePicker?: {\n /** Display format for `ds-time-picker` / date-picker time - 24h or 12h AM/PM. Default `'24h'`. */\n format?: '24h' | '12h';\n };\n avatar?: {\n /** How `ds-avatar` turns its `name` into initials, app-wide. The built-in rule takes the\n * first two words (a Latin-script guess). */\n initials?: (name: string) => string;\n };\n brand?: {\n /** Brand text for `ds-sidenav` and `ds-auth-layout`: the wordmark, and the source of the\n * letter-mark's glyph when `logoLetter` is unset. */\n name?: string;\n /** Letter-mark glyph when it differs from the brand's first character. */\n logoLetter?: string;\n /** Strapline under the brand row. `ds-auth-layout` only. */\n tagline?: string;\n };\n modal?: {\n /** Default for `dividers` on `ds-modal` and `ds-modal-card`. Default `true`. */\n dividers?: boolean;\n };\n banner?: {\n /** Default for every `ds-banner`'s `announce`. Default `false`: an `alert` region fires on\n * INSERTION, so page-furniture banners would interrupt on every route. Set `true` where banners\n * answer events, and bind `[announce]=\"false\"` on the furniture. `ds-alert` has its own key. */\n announce?: boolean;\n };\n alert?: {\n /** Default for every `ds-alert`'s `announce`. Default `false`, as `banner.announce`. */\n announce?: boolean;\n };\n toast?: {\n /** Where the stack sits. Merged field by field over the built-in\n * `right` / `top` / `var(--space-6)`. */\n position?: Partial<DsToastPosition>;\n /** Maximum number of toasts visible at once; extras queue. Default `5`; `0` is unlimited. */\n maxVisible?: number;\n /** Show a `+N` strip while toasts wait behind `maxVisible`. Default `true`. */\n showQueueCount?: boolean;\n };\n picker?: {\n /** Default for `ds-multi-select`'s `searchable`. `true` always shows the panel's filter row,\n * `false` never, and a NUMBER is a threshold: the row appears once there are at least that\n * many options. Default `true`. */\n searchable?: boolean | number;\n };\n\n control?: {\n /** Default `size` for every control on the field-height contract. Default `'md'`. A different\n * axis from `[data-density]`, which rewrites hit targets and padding in CSS. */\n size?: DsSize;\n };\n pagination?: {\n /** Default `size` for every pager, `ds-table`'s footer included. Unset falls back to\n * `control.size`. */\n size?: DsSize;\n /** Default `layout` for every pager, `ds-table`'s footer included. Default `'grouped'`. */\n layout?: PaginationLayout;\n };\n card?: {\n /** Default `elevation` for `ds-card`. Default `'flat'`. */\n elevation?: CardElevation;\n /** Default `padding` preset for `ds-card`. Unset keeps the card's own. */\n padding?: CardPadding;\n };\n table?: {\n /** Default for `ds-table`'s `stickyScrollbar` (keeps the horizontal bar reachable). Default `false`. */\n stickyScrollbar?: boolean;\n /** Default for `ds-table`'s `bordered` (the outer border and radius). Default `false`. */\n bordered?: boolean;\n /** Default for `ds-table`'s `stickyScrollbarOffset`, as any CSS length. Unset, each table\n * cancels its scroll container's bottom padding. */\n stickyScrollbarOffset?: string;\n };\n icon?: {\n /** Default pixel `size` for `ds-icon`. Default `16`. */\n size?: number;\n };\n badge?: {\n /** Default for `ds-badge`'s `withDot` (the leading status dot). Default `false`. */\n withDot?: boolean;\n };\n chart?: {\n /** Default `dataTable` for every chart. Default `'none'`; `'toggle'` offers the annex everywhere. */\n dataTable?: ChartDataTable;\n /** Whether every chart draws its own bordered, padded box. Default `'auto'`, which draws it. */\n frame?: ChartFrame;\n /** How long a chart's tooltip stays after the pointer leaves the mark, in milliseconds.\n * Default 500; zero closes it at once. */\n tooltipLingerMs?: number;\n /** Whether a click on a mark or category holds its tooltip and highlight. Default `true`.\n * A second click, Escape or a press elsewhere releases. A tap holds whatever this says. */\n pinOnClick?: boolean;\n /** Milliseconds the pointer rests on a mark, category or legend entry before the chart answers.\n * Default 0. After one answer the next is immediate until the pointer leaves the chart;\n * focus, a tap and a pinning click are always immediate. */\n hoverDelayMs?: number;\n /** Whether a chart's tooltip draws a colour dot beside each reading. Unset draws them for two\n * to four readings. */\n tooltipSwatches?: boolean;\n /** How charts format values, annex table and description included. Default groups digits in\n * `locale` and abbreviates on a tick (`1.2M`). */\n valueFormat?: ChartValueFormat;\n /** How charts build themselves on a long page. All off by default. */\n rendering?: ChartRendering;\n };\n datePicker?: {\n /** BCP-47 locale for `ds-date-picker` names and value format. Unset falls back to\n * `locale`, then `LOCALE_ID`. */\n locale?: string;\n /** Explicit token format, e.g. `'MM/DD/YYYY'`; overrides the locale-derived order. */\n dateFormat?: string;\n /** First weekday column: 0=Sunday to 6=Saturday. Default `1` (Monday). */\n firstDayOfWeek?: number;\n };\n}\n\nexport const DS_CONFIG = new InjectionToken<DsConfig>('DS_CONFIG', {\n factory: () => ({}),\n});\n\n/** Provides DS-level defaults: `providers: [provideDsConfig({ control: { size: 'sm' } })]`.\n *\n * Works at the app root, on a `Route`, or on a component/directive. Component inputs still win.\n *\n * A nested call MERGES with the config above it section by section; only the keys you name are\n * replaced. Several calls in one `providers` array merge in order, the later winning per key.\n */\nexport function provideDsConfig(config: DsConfig): Provider {\n return [\n { provide: DS_CONFIG_LAYERS, useValue: config, multi: true },\n { provide: DS_CONFIG, useFactory: mergeDsConfigLayers },\n ];\n}\n\nconst DS_CONFIG_LAYERS = new InjectionToken<readonly DsConfig[]>(\n 'DS_CONFIG_LAYERS',\n);\n\nfunction mergeDsConfigLayers(): DsConfig {\n return inject(DS_CONFIG_LAYERS, { self: true }).reduce(\n mergeDsConfig,\n inject(DS_CONFIG, { skipSelf: true, optional: true }) ?? {},\n );\n}\n\n/**\n * The factory body behind `provideDsConfig`, exported so a directive can put the provider in its\n * metadata as an object literal: calling `provideDsConfig` there makes the module side-effectful\n * and defeats tree-shaking.\n *\n * Must be called from an injection context.\n */\nexport function inheritDsConfig(config: DsConfig): DsConfig {\n return mergeDsConfig(\n inject(DS_CONFIG, { skipSelf: true, optional: true }) ?? {},\n config,\n );\n}\n\nfunction mergeDsConfig(parent: DsConfig, own: DsConfig): DsConfig {\n const merged: DsConfig = { ...parent };\n for (const section of Object.keys(own) as (keyof DsConfig)[]) {\n const value = own[section];\n Object.assign(merged, {\n [section]:\n typeof value === 'object' && value !== null\n ? { ...(parent[section] as object | undefined), ...value }\n : value,\n });\n }\n\n return merged;\n}\n","import { Signal, computed, inject } from '@angular/core';\nimport { DS_CONFIG, type DsConfig } from './ds-config';\n\n/**\n * Resolve an input against `DS_CONFIG`, then a built-in default.\n *\n * The input must be typed `T | null` and default to `null`: a signal input cannot report\n * whether it was bound. Precedence is input → config → built-in. Call from an injection context.\n * @internal\n */\nexport function resolveWithConfig<T>(\n value: Signal<T | null>,\n pick: (config: DsConfig) => T | undefined,\n fallback: T,\n): Signal<T> {\n const config = inject(DS_CONFIG);\n\n return computed(() => value() ?? pick(config) ?? fallback);\n}\n","import { effect, isDevMode } from '@angular/core';\n\n/**\n * Warns once per distinct message: the effect re-runs whenever a signal the condition reads\n * changes, so a static misconfiguration would otherwise log on every keystroke.\n *\n * Must be called from an injection context.\n *\n * Callers wrap this in `if (typeof ngDevMode === 'undefined' || ngDevMode)`: a BUILD-time\n * expression a minifier folds away with the message, which the opaque `isDevMode()` call never\n * allows. It cannot become a helper function for the same reason.\n * @internal\n */\nexport function devWarn(message: () => string | null): void {\n if (!isDevMode()) {\n return;\n }\n const seen = new Set<string>();\n effect(() => {\n const text = message();\n if (!text || seen.has(text)) {\n return;\n }\n seen.add(text);\n console.warn(text);\n });\n}\n","import { inject } from '@angular/core';\nimport { devWarn } from './dev-warning';\nimport { DS_CONFIG } from './ds-config';\n\nexport interface AnnounceState {\n variant: string;\n title: string;\n /** Whether the element would announce as `role=\"alert\"` rather than `status`. */\n assertive: boolean;\n /** The element's own `announce` input, `null` while unbound. */\n announce: boolean | null;\n}\n\n/**\n * Warns about two undecided `announce` cases on `ds-banner` / `ds-alert`: an assertive element\n * left unbound while `DS_CONFIG.<section>.announce` is unset (not heard), and a polite one that\n * announces only because that key is `true`. Once per instance, dev mode only; the caller wraps\n * the call in the `typeof ngDevMode` guard (see `devWarn`). Must be called from an injection context.\n * @internal\n */\nexport function warnAnnounceOversight(\n tag: 'ds-banner' | 'ds-alert',\n section: 'banner' | 'alert',\n state: () => AnnounceState,\n): void {\n const configured = inject(DS_CONFIG)[section]?.announce;\n devWarn(() => {\n const { variant, title, assertive, announce } = state();\n if (announce !== null) {\n return null;\n }\n const element = `[${tag}] variant=\"${variant}\"${title ? ` title=\"${title}\"` : ''}`;\n if (assertive && configured === undefined) {\n return `${element} is not announced, so a screen reader will not hear it. Decide once for the app with provideDsConfig({ ${section}: { announce: true } }) and bind [announce]=\"false\" on page furniture; this warning ends once the key is set, true or false.`;\n }\n if (!assertive && configured === true) {\n return `${element} announces because DS_CONFIG.${section}.announce is true, not because this element asked to. Bind [announce]=\"false\" if it is page furniture, or [announce]=\"true\" to keep it announced on purpose.`;\n }\n\n return null;\n });\n}\n","import type { DsIntl } from './ds-intl.types';\n\n/** English wording for every string the library invents. Used unless `provideDsIntl` overrides\n * a section. */\nexport const DS_INTL_DEFAULTS: DsIntl = {\n field: {\n optional: '(optional)',\n clearInput: 'Clear input',\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n overLimit: (excess) =>\n excess === 1\n ? '1 character over the limit'\n : `${excess} characters over the limit`,\n },\n picker: {\n placeholder: 'Select…',\n filterPlaceholder: 'Filter…',\n clearSelection: 'Clear selection',\n noMatches: 'No matches',\n noOptions: 'No options',\n selectAll: 'Select all',\n selectAllInGroup: (group) => `All of ${group}`,\n create: (query) => `Create «${query}»`,\n moreChips: (count) => `+${count} more`,\n removeChip: (label) => `Remove ${label}`,\n selectedNoun: 'selected',\n resultCount: (count) =>\n count === 0\n ? 'No results'\n : count === 1\n ? '1 result'\n : `${count} results`,\n },\n datePicker: {\n placeholder: 'Select date',\n openCalendar: 'Choose date',\n selectMonth: 'Select month',\n selectYear: 'Select year',\n previousYears: 'Previous years',\n nextYears: 'Next years',\n invalidDate: (mask) => `Enter a valid date (${mask})`,\n },\n timePicker: {\n selectTime: 'Select time',\n rangeStart: (label) => `${label} (from)`,\n rangeEnd: (label) => `${label} (to)`,\n clear: 'Clear',\n now: 'Now',\n done: 'Done',\n time: 'Time',\n hours: 'Hours',\n minutes: 'Minutes',\n period: 'AM/PM',\n },\n colorPicker: {\n label: 'Choose colour',\n saturationBrightness:\n 'Saturation and brightness — use arrow keys to adjust',\n hue: 'Hue',\n hexValue: 'Hex colour value',\n presets: 'Preset colours',\n },\n otpInput: {\n label: 'Verification code',\n digit: (position) => `Digit ${position}`,\n character: (position) => `Character ${position}`,\n },\n slider: {\n rangeStart: (label) => (label ? `${label} minimum` : 'Minimum'),\n rangeEnd: (label) => (label ? `${label} maximum` : 'Maximum'),\n },\n numberStepper: {\n decrease: 'Decrease',\n increase: 'Increase',\n },\n search: {\n placeholder: 'Search',\n clear: 'Clear search',\n },\n dropzone: {\n label: 'Upload files',\n title: 'Drop files here',\n hint: 'or click to browse',\n remove: (fileName) => `Remove ${fileName}`,\n uploading: 'uploading',\n success: 'success',\n error: 'error',\n },\n passwordRules: {\n pending: 'not yet met',\n met: 'met',\n failed: 'not met',\n },\n tag: {\n remove: 'Remove',\n },\n badge: {\n noun: 'notifications',\n count: (count, noun) => `${count} ${noun}`,\n overMax: (max, noun) => `More than ${max} ${noun}`,\n },\n avatar: {\n online: 'Online',\n offline: 'Offline',\n away: 'Away',\n busy: 'Busy',\n },\n avatarGroup: {\n more: (count) => `${count} more`,\n },\n descriptionList: {\n copy: 'Copy value',\n copied: 'Copied',\n },\n what3words: {\n copy: (address) => `Copy what3words address ${address}`,\n },\n dialog: {\n close: 'Close',\n closeDialog: 'Close dialog',\n dismiss: 'Dismiss',\n confirm: 'Confirm',\n cancel: 'Cancel',\n typeToConfirmBefore: 'Type',\n typeToConfirmAfter: 'to confirm',\n },\n toast: {\n region: 'Notifications',\n },\n spinner: {\n label: 'Loading',\n },\n breadcrumbs: {\n label: 'Breadcrumb',\n },\n appLayout: {\n railLabel: 'Navigation',\n },\n sidenav: {\n expandGroup: (label) => `Expand ${label}`,\n collapseGroup: (label) => `Collapse ${label}`,\n },\n sidenavFooter: {\n search: 'Search',\n searchPlaceholder: 'Search…',\n clear: 'Clear',\n noMatches: (query) => `No matches for “${query}”.`,\n typeToSearch: 'Type to search.',\n alerts: 'Alerts',\n allCaughtUp: 'You’re all caught up.',\n accountMenu: 'Account menu',\n account: 'Account',\n signedInAs: (name) => `Signed in as ${name}`,\n profile: 'Your profile',\n settings: 'Account settings',\n help: 'Help & support',\n signOut: 'Sign out',\n expand: 'Expand',\n collapse: 'Collapse',\n },\n stepper: {\n label: 'Progress',\n step: (position, label, state) => `Step ${position}: ${label} (${state})`,\n },\n tabs: {\n close: (label) => `Close ${label}`,\n },\n splitButton: {\n menuLabel: 'More actions',\n },\n filterBar: {\n more: 'more',\n panelLabel: 'More filters',\n },\n pagination: {\n label: 'Pagination',\n previous: 'Previous page',\n next: 'Next page',\n page: (page) => `Page ${page}`,\n range: (first, last, total) =>\n total === 0 ? 'Showing 0 of 0' : `Showing ${first}–${last} of ${total}`,\n perPage: (size) => `${size} per page`,\n rowsPerPage: 'Rows per page',\n },\n table: {\n actions: 'Actions',\n actionsFor: (row) => `Actions for ${row}`,\n filterColumn: (column) => `Filter ${column}`,\n resizeColumn: (column) => `Resize ${column}`,\n narrowColumn: (column) => `Narrow ${column}`,\n widenColumn: (column) => `Widen ${column}`,\n fitColumn: (column) => `Fit ${column} to its content`,\n fit: 'Fit',\n selectRow: (row) => `Select ${row}`,\n expandRow: 'Expand row',\n collapseRow: 'Collapse row',\n filterValues: 'Filter values',\n filterSearch: 'Search…',\n emptyValue: '(empty)',\n noMatches: 'No matches',\n selectedCount: (count) => `${count} selected`,\n clear: 'Clear',\n loading: 'Loading…',\n sorted: (label, direction) =>\n direction\n ? `Sorted by ${label}, ${direction === 'asc' ? 'ascending' : 'descending'}`\n : 'Sorting cleared',\n rowsExpanded: (count) => `${count} rows expanded`,\n selectAllRows: (onThisPage) =>\n onThisPage ? 'Select all rows on this page' : 'Select all rows',\n expandAllRows: (onThisPage) =>\n `Expand all rows${onThisPage ? ' on this page' : ''}`,\n collapseAllRows: (onThisPage) =>\n `Collapse all rows${onThisPage ? ' on this page' : ''}`,\n },\n tableColumns: {\n title: 'Columns',\n panelLabel: 'Column visibility',\n moveUp: 'Move up',\n moveDown: 'Move down',\n reset: 'Reset to default',\n trigger: 'Choose columns',\n },\n tableExport: {\n button: 'Export CSV',\n buttonBusy: 'Preparing…',\n preparing: 'Preparing export…',\n ready: 'Export ready',\n failed: 'Export failed',\n },\n chart: {\n empty: 'No data',\n error: 'Could not load the data',\n title: 'Chart',\n unpin: 'Unpin',\n dataTable: 'Data table',\n dataTableCaption: 'Chart data',\n legendAll: 'All',\n legendNone: 'None',\n labelColumn: 'Label',\n valueColumn: 'Value',\n shareColumn: 'Share of total',\n seriesColumn: 'Series',\n categoryColumn: 'Category',\n shareOfTotal: (share) => `${share} of total`,\n other: 'Other',\n noVisibleSeries: 'All series are hidden',\n target: (value) => `Target ${value}`,\n noted: (notes) => `Noted: ${notes.join('; ')}.`,\n noData: (label) => `${label}. No data.`,\n onePoint: (label, value, at) => `${label}, one point: ${value} at ${at}.`,\n range: (label, count, lowest, highest) =>\n `${label}, ${count} points, ${lowest} to ${highest}.`,\n trendRisingThroughout: 'Rising throughout',\n trendFallingThroughout: 'Falling throughout',\n trendRisingOverall: 'Rising overall',\n trendFallingOverall: 'Falling overall',\n trendFlat: 'Ending where it started',\n extremes: (highestLabel, highest, lowestLabel, lowest) =>\n `Highest in ${highestLabel} at ${highest}, lowest in ${lowestLabel} at ${lowest}.`,\n tableFollows: 'Full values in the table below.',\n threshold: 'Threshold',\n thresholdAbove: (name, value, count, total) =>\n `${name} at ${value}, ${count} of ${total} ${total === 1 ? 'point' : 'points'} above.`,\n thresholdInside: (name, low, high, count, total) =>\n `${name} from ${low} to ${high}, ${count} of ${total} ${total === 1 ? 'point' : 'points'} inside.`,\n funnelCaption:\n 'Each stage as a percentage of the first, and the drop from the stage above it.',\n stageColumn: 'Stage',\n percentColumn: 'Percent',\n dropColumn: 'Drop',\n fellAway: (drop) => `${drop} fell away since the stage above`,\n noReading: 'No reading',\n heatmapTitle: 'Heat map',\n heatmapSummary: (title, rows, columns, lowest, highest) =>\n `${title}, ${rows} rows by ${columns} columns, readings from ${lowest} to ${highest}.`,\n scatterTitle: 'Scatter chart',\n scatterAxis: (axis, from, to) => `${axis} from ${from} to ${to}`,\n scatterSummary: (title, count, axes, dropped) =>\n `${title}: ${count} readings drawn, ${axes}.${\n dropped > 0\n ? ` ${dropped} further readings were thinned out to keep the plot drawable; the data table lists every one.`\n : ''\n }`,\n scatterThinned: (count) =>\n `${count} readings thinned out to keep the plot drawable - every one is in the data table.`,\n waterfallTitle: 'Waterfall chart',\n waterfallCaption: 'Waterfall',\n increase: 'increase',\n decrease: 'decrease',\n total: 'total',\n stepColumn: 'Step',\n directionColumn: 'Direction',\n runningTotalColumn: 'Running total',\n endsAt: (value) => `Ends at ${value}.`,\n },\n};\n","import {\n InjectionToken,\n computed,\n inject,\n signal,\n type Provider,\n type Signal,\n} from '@angular/core';\nimport { DS_INTL_DEFAULTS } from './ds-intl-defaults';\nimport type { DsIntl, DsIntlOverrides } from './ds-intl.types';\n\nconst DEFAULTS = signal(DS_INTL_DEFAULTS).asReadonly();\n\n/** Every string the library invents, as a signal so a language switch re-renders in place.\n * Unprovided, it holds the English defaults. */\nexport const DS_INTL = new InjectionToken<Signal<DsIntl>>('DS_INTL', {\n factory: () => DEFAULTS,\n});\n\n/** Provide the library's wording.\n *\n * providers: [provideDsIntl({ picker: { selectAll: 'Выбрать все' } })]\n *\n * Pass an object for a fixed language, or a factory returning a signal for a language that\n * changes at runtime (the factory runs in an injection context):\n *\n * provideDsIntl(() => { const language = inject(LanguageService); return computed(() => language.dictionary().ds); })\n *\n * Works at the root, on a `Route` or on a component; a nested call MERGES section by section,\n * as `provideDsConfig` does, and several calls in one `providers` array merge in order. Numbers\n * and dates follow `DsConfig.locale`, then `LOCALE_ID`. */\nexport function provideDsIntl(\n overrides: DsIntlOverrides | (() => Signal<DsIntlOverrides>),\n): Provider {\n return [\n { provide: DS_INTL_LAYERS, useValue: overrides, multi: true },\n { provide: DS_INTL, useFactory: mergeDsIntlLayers },\n ];\n}\n\ntype DsIntlLayer = DsIntlOverrides | (() => Signal<DsIntlOverrides>);\n\nconst DS_INTL_LAYERS = new InjectionToken<readonly DsIntlLayer[]>(\n 'DS_INTL_LAYERS',\n);\n\nfunction mergeDsIntlLayers(): Signal<DsIntl> {\n const parent =\n inject(DS_INTL, { skipSelf: true, optional: true }) ?? DEFAULTS;\n const layers = inject(DS_INTL_LAYERS, { self: true }).map((layer) =>\n typeof layer === 'function' ? layer() : signal(layer).asReadonly(),\n );\n\n return computed(() =>\n layers.reduce((merged, layer) => mergeDsIntl(merged, layer()), parent()),\n );\n}\n\nfunction mergeDsIntl(parent: DsIntl, own: DsIntlOverrides): DsIntl {\n const merged = { ...parent };\n for (const section of Object.keys(own) as (keyof DsIntl)[]) {\n Object.assign(merged, {\n [section]: { ...parent[section], ...own[section] },\n });\n }\n\n return merged;\n}\n","import { LOCALE_ID, inject } from '@angular/core';\nimport { DS_CONFIG } from './ds-config';\n\n/**\n * The BCP-47 tag the library formats numbers and dates in: `DsConfig.locale`, then Angular's\n * `LOCALE_ID`. Call from an injection context.\n * @internal\n */\nexport function injectDsLocale(): string {\n return inject(DS_CONFIG).locale ?? inject(LOCALE_ID);\n}\n","/**\n * Signal forms binds `min`, `max`, `minLength` and `maxLength` BY NAME and sends `undefined`\n * for no bound; the DS spells it `null`, so the write type accepts both.\n * @internal\n */\nexport function optionalBound(value: number | null | undefined): number | null {\n return value ?? null;\n}\n\n/** As `optionalBound`, for a bound the control requires a value for.\n * @internal\n */\nexport function boundOr(fallback: number) {\n return (value: number | undefined): number => value ?? fallback;\n}\n","// All paths render inside <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\">, stroke-width 1.75.\n\nexport const ICONS = {\n search: '<circle cx=\"11\" cy=\"11\" r=\"7\" /><path d=\"m20 20-3.5-3.5\" />',\n plus: '<path d=\"M12 5v14M5 12h14\" />',\n minus: '<path d=\"M5 12h14\" />',\n check: '<path d=\"m4 12 5 5L20 6\" />',\n x: '<path d=\"M6 6l12 12M18 6L6 18\" />',\n chevronDown: '<path d=\"m6 9 6 6 6-6\" />',\n chevronRight: '<path d=\"m9 6 6 6-6 6\" />',\n slash: '<path d=\"M15 5 9 19\" />',\n chevronLeft: '<path d=\"m15 6-6 6 6 6\" />',\n chevronUp: '<path d=\"m6 15 6-6 6 6\" />',\n menu: '<path d=\"M4 6h16M4 12h16M4 18h16\" />',\n arrowRight: '<path d=\"M5 12h14M13 6l6 6-6 6\" />',\n arrowUp: '<path d=\"M12 19V5M6 11l6-6 6 6\" />',\n arrowDown: '<path d=\"M12 5v14M6 13l6 6 6-6\" />',\n info: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 8v.01M11 12h1v4h1\" />',\n warn: '<path d=\"M12 3 2 21h20L12 3z\" /><path d=\"M12 10v4M12 18v.01\" />',\n error: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 8v4M12 16v.01\" />',\n success: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"m8 12 3 3 5-6\" />',\n bell: '<path d=\"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9\" /><path d=\"M10 21a2 2 0 0 0 4 0\" />',\n settings:\n '<circle cx=\"12\" cy=\"12\" r=\"3\" /><path d=\"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z\" />',\n user: '<circle cx=\"12\" cy=\"8\" r=\"4\" /><path d=\"M4 21a8 8 0 0 1 16 0\" />',\n users:\n '<circle cx=\"9\" cy=\"8\" r=\"4\" /><path d=\"M2 21a7 7 0 0 1 14 0\" /><path d=\"M16 4a4 4 0 0 1 0 8M22 21a6 6 0 0 0-6-6\" />',\n home: '<path d=\"m3 11 9-8 9 8\" /><path d=\"M5 10v10h14V10\" />',\n calendar:\n '<rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" /><path d=\"M3 10h18M8 3v4M16 3v4\" />',\n truck:\n '<path d=\"M3 16V6a1 1 0 0 1 1-1h11v11\" /><path d=\"M15 9h4l2 3v4h-6\" /><circle cx=\"7.5\" cy=\"17.5\" r=\"2\" /><circle cx=\"17.5\" cy=\"17.5\" r=\"2\" />',\n box: '<path d=\"m21 8-9-5-9 5 9 5 9-5z\" /><path d=\"M3 8v8l9 5 9-5V8\" /><path d=\"m12 13 .01 8\" />',\n map: '<path d=\"m9 4-6 3v13l6-3 6 3 6-3V4l-6 3-6-3z\" /><path d=\"M9 4v13M15 7v13\" />',\n activity: '<path d=\"M3 12h4l3-9 4 18 3-9h4\" />',\n folder:\n '<path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />',\n edit: '<path d=\"M12 20h9\" /><path d=\"M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4z\" />',\n external:\n '<path d=\"M14 4h6v6\" /><path d=\"M20 4 10 14\" /><path d=\"M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5\" />',\n trash:\n '<path d=\"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\" /><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\" />',\n copy: '<rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M5 15V5a2 2 0 0 1 2-2h10\" />',\n download: '<path d=\"M12 4v12M6 12l6 6 6-6\" /><path d=\"M4 20h16\" />',\n upload: '<path d=\"M12 20V8M6 12l6-6 6 6\" /><path d=\"M4 4h16\" />',\n eye: '<path d=\"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z\" /><circle cx=\"12\" cy=\"12\" r=\"3\" />',\n filter: '<path d=\"M3 5h18l-7 9v6l-4-2v-4z\" />',\n sort: '<path d=\"M7 4v16M3 8l4-4 4 4\" /><path d=\"M17 20V4M21 16l-4 4-4-4\" />',\n sortAsc: '<path d=\"M7 18V6M3 10l4-4 4 4\" />',\n sortDesc: '<path d=\"M7 6v12M11 14l-4 4-4-4\" />',\n grid: '<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" /><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" />',\n list: '<path d=\"M8 6h13M8 12h13M8 18h13\" /><circle cx=\"3.5\" cy=\"6\" r=\"1.2\" /><circle cx=\"3.5\" cy=\"12\" r=\"1.2\" /><circle cx=\"3.5\" cy=\"18\" r=\"1.2\" />',\n moreH:\n '<circle cx=\"5\" cy=\"12\" r=\"1.5\" /><circle cx=\"12\" cy=\"12\" r=\"1.5\" /><circle cx=\"19\" cy=\"12\" r=\"1.5\" />',\n moreV:\n '<circle cx=\"12\" cy=\"5\" r=\"1.5\" /><circle cx=\"12\" cy=\"12\" r=\"1.5\" /><circle cx=\"12\" cy=\"19\" r=\"1.5\" />',\n link: '<path d=\"M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1\" /><path d=\"M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1\" />',\n flag: '<path d=\"M5 21V5a14 14 0 0 1 14 0v9a14 14 0 0 1-14 0z\" />',\n star: '<path d=\"m12 3 2.9 6 6.6.9-4.8 4.6 1.1 6.5L12 17.8 6.2 21l1.1-6.5L2.5 9.9 9.1 9z\" />',\n inbox:\n '<path d=\"M22 12h-6l-2 3h-4l-2-3H2\" /><path d=\"M5 4h14l3 8v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8z\" />',\n archive:\n '<rect x=\"3\" y=\"3\" width=\"18\" height=\"5\" rx=\"1\" /><path d=\"M5 8v11a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8M10 12h4\" />',\n clock: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M12 7v5l3 2\" />',\n refresh:\n '<path d=\"M3 12a9 9 0 0 1 15-6.7L21 8\" /><path d=\"M21 3v5h-5\" /><path d=\"M21 12a9 9 0 0 1-15 6.7L3 16\" /><path d=\"M3 21v-5h5\" />',\n play: '<path d=\"M6 4l14 8-14 8z\" />',\n pause: '<path d=\"M7 4v16M17 4v16\" />',\n cmd: '<path d=\"M9 9h6v6H9zM6 9V7a3 3 0 1 1 3 3H6zM6 15v2a3 3 0 1 0 3-3H6zM18 9V7a3 3 0 1 0-3 3h3zM18 15v2a3 3 0 1 1-3-3h3z\" />',\n paperclip:\n '<path d=\"m21 11-9 9a5 5 0 0 1-7-7l9-9a3 3 0 0 1 4 4l-9 9a1 1 0 0 1-1-1l8-8\" />',\n file: '<path d=\"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z\" /><path d=\"M14 3v6h6\" />',\n image:\n '<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" /><circle cx=\"9\" cy=\"9\" r=\"2\" /><path d=\"m21 15-5-5L5 21\" />',\n lock: '<rect x=\"4\" y=\"11\" width=\"16\" height=\"10\" rx=\"2\" /><path d=\"M8 11V7a4 4 0 0 1 8 0v4\" />',\n logout:\n '<path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" /><path d=\"m16 17 5-5-5-5M21 12H9\" />',\n help: '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9.5 9a2.5 2.5 0 0 1 5 0c0 1.5-2.5 2-2.5 4M12 17v.01\" />',\n pin: '<path d=\"M15 4.5 11 8.5 7 10 5.5 11.5 12.5 18.5 14 17 15.5 13 19.5 9\" /><path d=\"m9 15-4.5 4.5\" /><path d=\"m14.5 4 5.5 5.5\" />',\n bookmark: '<path d=\"M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16l-7-4z\" />',\n sparkle:\n '<path d=\"M12 3v6M12 15v6M3 12h6M15 12h6M5.6 5.6l4.2 4.2M14.2 14.2l4.2 4.2M5.6 18.4l4.2-4.2M14.2 9.8l4.2-4.2\" />',\n layers:\n '<path d=\"m12 3 9 5-9 5-9-5z\" /><path d=\"m3 13 9 5 9-5M3 18l9 5 9-5\" />',\n chart: '<path d=\"M3 3v18h18\" /><path d=\"M7 14l4-4 4 4 5-5\" />',\n gauge:\n '<path d=\"M12 14l4-4\" /><circle cx=\"12\" cy=\"14\" r=\"9\" /><path d=\"M3 14a9 9 0 0 1 18 0\" />',\n package:\n '<path d=\"M3 7v10l9 4 9-4V7l-9-4z\" /><path d=\"m3 7 9 5 9-5M12 12v9\" />',\n git: '<circle cx=\"6\" cy=\"6\" r=\"2.5\" /><circle cx=\"6\" cy=\"18\" r=\"2.5\" /><circle cx=\"18\" cy=\"12\" r=\"2.5\" /><path d=\"M6 8.5v7M8.5 6h4a3 3 0 0 1 3 3v0\" />',\n sun: '<circle cx=\"12\" cy=\"12\" r=\"4\" /><path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />',\n moon: '<path d=\"M21 13a9 9 0 0 1-12-12 9 9 0 1 0 12 12z\" />',\n save: '<path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\" /><path d=\"M17 21v-8H7v8M7 3v5h8\" />',\n rotate: '<path d=\"M3 12a9 9 0 1 0 3-6.7L3 8\" /><path d=\"M3 3v5h5\" />',\n qr: '<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" /><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" /><path d=\"M14 14h3v3h-3zM18 18h3v3h-3z\" />',\n globe:\n '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18\" />',\n phone:\n '<path d=\"M5 4h4l2 5-2 1a11 11 0 0 0 5 5l1-2 5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z\" />',\n bin: '<rect x=\"3\" y=\"6\" width=\"18\" height=\"14\" rx=\"2\" /><path d=\"M7 6V4h10v2\" />',\n pen: '<path d=\"M3 17V21h4l11-11-4-4z\" />',\n smile:\n '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9 9v.01M15 9v.01M8 14a5 5 0 0 0 8 0\" />',\n frown:\n '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9 9v.01M15 9v.01M8 16a5 5 0 0 1 8 0\" />',\n mail: '<rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" /><path d=\"m3 7 9 6 9-6\" />',\n 'eye-off':\n '<path d=\"M3 3l18 18\" /><path d=\"M10.6 6.1A10 10 0 0 1 12 6c6 0 10 7 10 7a14 14 0 0 1-2.4 3.1\" /><path d=\"M6.7 6.7A14 14 0 0 0 2 12s4 7 10 7a10 10 0 0 0 4.5-1\" /><path d=\"M9.9 14.1A3 3 0 0 1 9 12a3 3 0 0 1 3-3 3 3 0 0 1 2.1.9\" />',\n 'check-circle': '<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"m8 12 3 3 5-6\" />',\n circle: '<circle cx=\"12\" cy=\"12\" r=\"8\" />',\n drag: '<circle cx=\"9\" cy=\"6\" r=\"1.6\" /><circle cx=\"15\" cy=\"6\" r=\"1.6\" /><circle cx=\"9\" cy=\"12\" r=\"1.6\" /><circle cx=\"15\" cy=\"12\" r=\"1.6\" /><circle cx=\"9\" cy=\"18\" r=\"1.6\" /><circle cx=\"15\" cy=\"18\" r=\"1.6\" />',\n scan: '<path d=\"M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3\" />',\n wifi: '<path d=\"M2 9.5a15 15 0 0 1 20 0\" /><path d=\"M5 13a10 10 0 0 1 14 0\" /><path d=\"M8.5 16.5a5 5 0 0 1 7 0\" /><path d=\"M12 20h.01\" />',\n 'wifi-off':\n '<path d=\"m3 3 18 18\" /><path d=\"M12 20h.01\" /><path d=\"M8.5 16.5a5 5 0 0 1 7 0\" /><path d=\"M5 13a10 10 0 0 1 3.5-2.3\" /><path d=\"M11 8.6A10 10 0 0 1 19 13\" /><path d=\"M2 9.5a15 15 0 0 1 5.7-3.2\" /><path d=\"M11.6 5.6A15 15 0 0 1 22 9.5\" />',\n} as const;\n\n/** Built-in DS icon names. Consumers extend the runtime set via `provideDsIcons({...})`; the\n * type widens to `string` so a custom name is accepted, without autocomplete. */\nexport type IconName = keyof typeof ICONS | (string & {});\n","const NON_TEXT_INPUT_TYPES = new Set([\n 'button',\n 'checkbox',\n 'color',\n 'file',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n]);\n\n/** True when the key landed on a control that consumes its own keystrokes.\n * @internal\n */\nexport function isTextEntryTarget(event: Event): boolean {\n const target = event.target;\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n if (target.isContentEditable) {\n return true;\n }\n const tag = target.tagName.toLowerCase();\n if (tag === 'textarea' || tag === 'select') {\n return true;\n }\n\n return (\n tag === 'input' &&\n !NON_TEXT_INPUT_TYPES.has((target as HTMLInputElement).type.toLowerCase())\n );\n}\n","/** True when `element` is showing less text than it holds, horizontally.\n *\n * Descendants count: a template-driven cell puts the ellipsis on a child. Only horizontal:\n * a clamped block hides whole LINES with `scrollWidth` equal to `clientWidth`.\n */\nexport function isTextClipped(element: HTMLElement): boolean {\n if (element.scrollWidth > element.clientWidth) {\n return true;\n }\n\n return [...element.querySelectorAll<HTMLElement>('*')].some(\n (child) => child.scrollWidth > child.clientWidth,\n );\n}\n","/**\n * Index arithmetic for a keyboard cursor over options: skips disabled entries, wraps at the ends.\n */\nexport interface DsListCursorList {\n length: number;\n isEnabled: (index: number) => boolean;\n}\n\n/** Where the cursor lands, or -1 when nothing in the list can take it.\n * @internal\n */\nexport function firstEnabledIndex(list: DsListCursorList): number {\n for (let index = 0; index < list.length; index += 1) {\n if (list.isEnabled(index)) {\n return index;\n }\n }\n\n return -1;\n}\n\n/** @internal */\nexport function lastEnabledIndex(list: DsListCursorList): number {\n for (let index = list.length - 1; index >= 0; index -= 1) {\n if (list.isEnabled(index)) {\n return index;\n }\n }\n\n return -1;\n}\n\n/**\n * The next enabled index `step` away from `from`, wrapping at both ends.\n *\n * `from` of -1 means \"no cursor yet\".\n * @internal\n */\nexport function nextEnabledIndex(\n list: DsListCursorList,\n from: number,\n step: number,\n): number {\n if (list.length === 0) {\n return -1;\n }\n if (from < 0) {\n return step > 0 ? firstEnabledIndex(list) : lastEnabledIndex(list);\n }\n\n let index = from;\n // eslint-disable-next-line @typescript-eslint/prefer-for-of -- walks from `from` with modulo wraparound; `attempts` only bounds the walk, it is not a sequential index\n for (let attempts = 0; attempts < list.length; attempts += 1) {\n index = (index + step + list.length) % list.length;\n if (list.isEnabled(index)) {\n return index;\n }\n }\n\n return from;\n}\n","import type { IconName } from './icon-names';\n\n/**\n * The shape every picker's option shares (select, multi-select, autocomplete). Each keeps its\n * own exported name. `T` exists because autocomplete carries typed values.\n */\nexport interface DsOption<T = string> {\n value: T;\n label: string;\n disabled?: boolean;\n /** Why this option cannot be picked; reaches the row as `aria-describedby`. Needs `disabled`. */\n disabledReason?: string;\n /** Rendered before the label at 16px. */\n icon?: IconName;\n}\n\n/** A labelled section of options. `disabled` turns the whole section off. */\nexport interface DsOptionGroup<T = string> {\n label: string;\n options: DsOption<T>[];\n disabled?: boolean;\n}\n\n/**\n * What a picker's `options` input takes: flat options, groups, or both mixed.\n */\nexport type DsOptionItem<T = string> = DsOption<T> | DsOptionGroup<T>;\n\nexport function isDsOptionGroup<T>(\n item: DsOptionItem<T>,\n): item is DsOptionGroup<T> {\n return 'options' in item && Array.isArray((item as DsOptionGroup<T>).options);\n}\n\n/** Every option in `items`, groups flattened in place, in source order. */\nexport function flattenDsOptions<T>(\n items: readonly DsOptionItem<T>[],\n): DsOption<T>[] {\n return items.flatMap((item) =>\n isDsOptionGroup(item)\n ? item.options.map((option) =>\n // Copy only when the flag is missing: pickers pre-apply a disabled group to the options\n // they render, and a second copy would break the identity their flat-index lookup uses.\n item.disabled && !option.disabled\n ? { ...option, disabled: true }\n : option,\n )\n : [item],\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAOG;SACa,eAAe,GAAA;IAI7B,IAAI,iBAAiB,GAAG,KAAK;IAE7B,OAAO;AACL,QAAA,IAAI,CAAC,KAAmB,EAAA;YACtB,iBAAiB;AACf,gBAAA,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,aAAa;QAC9D,CAAC;AACD,QAAA,aAAa,CAAC,KAAmB,EAAA;YAC/B,MAAM,OAAO,GACX,iBAAiB;gBACjB,KAAK,CAAC,MAAM,KAAK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AG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;AAClD,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;AACzB,YAAA,OAAO,KAAK;QACd;IACF;AAEA,IAAA,OAAO,IAAI;AACb;;AChCM,SAAU,eAAe,CAC7B,IAAqB,EAAA;AAErB,IAAA,OAAO,SAAS,IAAI,IAAI,IAAI,KAAK,CAAC,OAAO,CAAE,IAAyB,CAAC,OAAO,CAAC;AAC/E;AAEA;AACM,SAAU,gBAAgB,CAC9B,KAAiC,EAAA;AAEjC,IAAA,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,KACxB,eAAe,CAAC,IAAI;UAChB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM;;;AAGtB,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC;cACrB,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE,IAAI;cAC3B,MAAM;AAEd,UAAE,CAAC,IAAI,CAAC,CACX;AACH;;ACjDA;;AAEG;;;;"}
|
package/migrations/0.14.5.json
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"surface": "style",
|
|
75
75
|
"action": "Where your own CSS reads var(--ds-chart-frame-bg-color), var(--ds-chart-focus-halo-color) or var(--ds-chart-hatch-color), read var(--ds-chart-bg-color) instead. Setting the three still overrides. To keep the white focus halo, set --ds-chart-focus-halo-color: white.",
|
|
76
76
|
"appliesWhen": "Stylesheets that read one of the three tokens, which ship in styles/tokens-charts, which styles/ds forwards, and every chart's keyboard focus halo, which follows the chart background instead of white. Setting the tokens is unaffected.",
|
|
77
|
-
"pitfall": "A var(--ds-chart-frame-bg-color) with no fallback in your CSS resolves to nothing and the declaration it sits in is dropped without an error.",
|
|
77
|
+
"pitfall": "A var(--ds-chart-frame-bg-color) with no fallback in your CSS resolves to nothing and the declaration it sits in is dropped without an error. The hatched swatch in a chart tooltip reads --ds-chart-hatch-color with the fallback var(--surface-default), so --ds-chart-bg-color does not reach it.",
|
|
78
78
|
"restore": ":root { --ds-chart-focus-halo-color: white; }",
|
|
79
79
|
"searchHints": [
|
|
80
80
|
"--ds-chart-frame-bg-color",
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"extends ChartTooltipDirective"
|
|
225
225
|
],
|
|
226
226
|
"verify": "The app builds with no TS4114 or TS2416 against a DS chart class.",
|
|
227
|
-
"note": "The shared chart inputs and their resolved signals moved to an internal base class. ChartComponent lost cursorPin and cursorPinResolved and gained pinOnClickResolved, BarChartComponent lost dimsOthers and hoveredLabel, LineChartComponent lost markAnchor, PieChartComponent lost staggerMs; the internal ChartTooltipDirective gained host, LineSeriesComponent fadeId, SparklineComponent area, WaterfallChartComponent dimOthers and tooltip; data, categories and series became optional. The compiler names every collision."
|
|
227
|
+
"note": "The shared chart inputs and their resolved signals moved to an internal base class, DsChartBase, together with the protected defaults and intl. ChartComponent lost cursorPin and cursorPinResolved and gained pinOnClickResolved, BarChartComponent lost dimsOthers and hoveredLabel, LineChartComponent lost markAnchor, PieChartComponent lost staggerMs; the internal ChartTooltipDirective gained host, LineSeriesComponent fadeId, SparklineComponent area, WaterfallChartComponent dimOthers and tooltip; data, categories and series became optional. The compiler names every collision."
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
230
|
"id": "tooltip-light-panel",
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
"--ds-chart-tooltip-bg-color, --ds-chart-tooltip-text-color and --ds-chart-tooltip-border-color set on a chart element or an ancestor reach the tooltip panel, which copies them onto its overlay pane on every open; before, only :root reached it.",
|
|
258
258
|
"--ds-chart-bg-color (default var(--surface-default)) paints the chart frame and every knockout, and --ds-chart-plot-bg-color (default transparent) fills the plot area of ds-chart and ds-scatter-chart.",
|
|
259
259
|
"data on ds-bar-chart, ds-column-chart, ds-funnel-chart, ds-pie-chart and ds-sparkline, and categories and series on ds-line-chart, are optional and default to empty, so an omitted one shows the empty state instead of throwing NG0950.",
|
|
260
|
-
"A ds-breadcrumbs label clipped at 16ch (the current page at 32ch) opens a tooltip with its full text on hover, and on focus of its link; a label that fits opens none.",
|
|
260
|
+
"A ds-breadcrumbs label clipped at 16ch (the current page at 32ch) opens a tooltip with its full text on hover, and on keyboard focus (:focus-visible) of its link; a label that fits opens none.",
|
|
261
261
|
"ds-tooltip and the chart tooltip read three new theme tokens, --tooltip-bg-color, --tooltip-text-color and --tooltip-border-color, so one override on :root recolours both; ds-tooltip gains the --ds-tooltip-border-color hook for its border and caret.",
|
|
262
262
|
"dsTooltipWhenClipped applies the tooltip directive on its own, so the empty dsTooltip written beside it is redundant (delete list: tooltip-empty-beside-when-clipped).",
|
|
263
263
|
"A ds-breadcrumbs link clicked with Ctrl, Cmd, Shift or Alt, or with a non-primary button, opens its href the browser's way and emits no (navigate); a plain primary click is unchanged.",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.14.6-beta.0",
|
|
3
|
+
"items": [],
|
|
4
|
+
"informational": [
|
|
5
|
+
"ds-breadcrumbs gains --ds-breadcrumbs-bg-color-hover (default transparent), --ds-breadcrumbs-padding (0) and --ds-breadcrumbs-radius (var(--radius-sm)); rendering is unchanged until one is set.",
|
|
6
|
+
"The slash icon is built in, so ds-breadcrumbs separator=\"slash\" and DS_CONFIG.breadcrumbs.separator: 'slash' render a \"/\" between crumbs."
|
|
7
|
+
],
|
|
8
|
+
"deleteList": []
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.14.
|
|
2
|
+
"version": "0.14.6-beta.0",
|
|
3
3
|
"tokens": [
|
|
4
4
|
"--ds-accordion-body-padding",
|
|
5
5
|
"--ds-accordion-body-text-color",
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"--ds-bottom-sheet-radius",
|
|
130
130
|
"--ds-bottom-sheet-scrim-color",
|
|
131
131
|
"--ds-bottom-sheet-title-text-color",
|
|
132
|
+
"--ds-breadcrumbs-bg-color-hover",
|
|
132
133
|
"--ds-breadcrumbs-current-label-color",
|
|
133
134
|
"--ds-breadcrumbs-current-label-font-weight",
|
|
134
135
|
"--ds-breadcrumbs-current-label-max-width",
|
|
@@ -138,6 +139,8 @@
|
|
|
138
139
|
"--ds-breadcrumbs-label-color",
|
|
139
140
|
"--ds-breadcrumbs-label-color-hover",
|
|
140
141
|
"--ds-breadcrumbs-label-max-width",
|
|
142
|
+
"--ds-breadcrumbs-padding",
|
|
143
|
+
"--ds-breadcrumbs-radius",
|
|
141
144
|
"--ds-breadcrumbs-separator-icon-color",
|
|
142
145
|
"--ds-button-bg-color",
|
|
143
146
|
"--ds-button-bg-color-active",
|
|
@@ -8,7 +8,7 @@ declare class TooltipDirective implements OnDestroy {
|
|
|
8
8
|
private readonly host;
|
|
9
9
|
/** Tip text. An empty string turns the tooltip off. */
|
|
10
10
|
readonly dsTooltip: _angular_core.InputSignal<string>;
|
|
11
|
-
/** Which side the tip opens on.
|
|
11
|
+
/** Which side the tip opens on. With no room there it opens on the opposite side. */
|
|
12
12
|
readonly dsTooltipPlacement: _angular_core.InputSignal<TooltipPlacement>;
|
|
13
13
|
/** Milliseconds before the tip appears. Hiding is immediate. */
|
|
14
14
|
readonly dsTooltipDelay: _angular_core.InputSignal<number>;
|
|
@@ -96,6 +96,7 @@ declare const ICONS: {
|
|
|
96
96
|
readonly x: "<path d=\"M6 6l12 12M18 6L6 18\" />";
|
|
97
97
|
readonly chevronDown: "<path d=\"m6 9 6 6 6-6\" />";
|
|
98
98
|
readonly chevronRight: "<path d=\"m9 6 6 6-6 6\" />";
|
|
99
|
+
readonly slash: "<path d=\"M15 5 9 19\" />";
|
|
99
100
|
readonly chevronLeft: "<path d=\"m15 6-6 6 6 6\" />";
|
|
100
101
|
readonly chevronUp: "<path d=\"m6 15 6-6 6 6\" />";
|
|
101
102
|
readonly menu: "<path d=\"M4 6h16M4 12h16M4 18h16\" />";
|