@ids-group-ltd/ids-design-system 0.12.3 → 0.13.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 +603 -6
- package/components.md +85 -2
- package/docs/agent/INDEX.md +11 -1
- package/docs/agent/charts/chart-colour-which-palette-a-chart-takes.md +9 -0
- package/docs/agent/charts/chart-frame-the-box-a-chart-draws-around-itself.md +12 -0
- package/docs/agent/charts/ds-bar-chart.md +15 -0
- package/docs/agent/charts/ds-column-chart.md +14 -0
- package/docs/agent/charts/ds-donut-chart.md +17 -0
- package/docs/agent/charts/ds-funnel-chart.md +16 -0
- package/docs/agent/charts/ds-line-chart.md +15 -0
- package/docs/agent/forms/ds-button.md +4 -2
- package/docs/agent/forms/ds-number-stepper.md +1 -0
- package/docs/agent/navigation/ds-sidenav-item.md +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +16 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +161 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +58 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +197 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +173 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +299 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +69 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +366 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +10 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +631 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +18 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +30 -71
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +31 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +393 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +17 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +10 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.0.json +530 -0
- package/package.json +57 -1
- package/styles/_chart-data-table.scss +95 -0
- package/styles/_chart-frame.scss +53 -0
- package/styles/_chart-interactive.scss +40 -0
- package/styles/_chart-motion.scss +45 -0
- package/styles/_focus.scss +1 -1
- package/styles/_tokens-charts.scss +149 -39
- package/styles/_tokens.scss +17 -4
- package/themes/dark/_theme.scss +37 -29
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +11 -9
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +104 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +37 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +34 -0
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +78 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +105 -0
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +113 -0
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +52 -11
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +109 -0
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +5 -7
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +241 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +5 -2
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +16 -4
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +13 -28
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +11 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +154 -4
- package/types/ids-group-ltd-ids-design-system-core.d.ts +12 -1
- package/types/ids-group-ltd-ids-design-system.d.ts +9 -2
package/themes/dark/_theme.scss
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// Dark theme — Tier 2 role overrides. Activation (:root[data-theme='dark']) lives in
|
|
2
|
+
// styles/_theme-activation.scss; dark is opt-in, with no prefers-color-scheme switch.
|
|
3
3
|
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// lives in styles/_theme-activation.scss. Dark is opt-in — light is the
|
|
8
|
-
// default; there is no automatic prefers-color-scheme switch.
|
|
9
|
-
//
|
|
10
|
-
// Most roles follow the inverted --neutral-* ramp automatically (custom
|
|
11
|
-
// props resolve at use-time). This file overrides ONLY roles that can't
|
|
12
|
-
// follow the flip: tint/subtle surfaces (near-white *-50 picks → dark hue
|
|
13
|
-
// tints), on-tint text (*-text / *-strong → lighter stops), hover/pressed
|
|
14
|
-
// direction, scrim (must stay dark), focus halo alpha, and charts.
|
|
4
|
+
// Most roles follow the inverted --neutral-* ramp on their own, because custom props resolve at
|
|
5
|
+
// use-time. Overridden here are ONLY the roles that cannot follow the flip: tint/subtle surfaces,
|
|
6
|
+
// on-tint text, hover/pressed direction, scrim (must stay dark), focus halo alpha, and charts.
|
|
15
7
|
// On-dark-fill text points at --static-ink; on-light-fill uses literal white.
|
|
16
|
-
// =========================================================================
|
|
17
8
|
|
|
18
9
|
@use 'palette';
|
|
19
10
|
@use '../semantic';
|
|
@@ -60,7 +51,6 @@
|
|
|
60
51
|
--text-link: hsl(var(--primary-h) 90% 74%);
|
|
61
52
|
--link-visited: hsl(var(--primary-h) 50% 70%);
|
|
62
53
|
|
|
63
|
-
// Status families: dark tint bg + border, lighter text.
|
|
64
54
|
--success-subtitle: hsl(132deg 38% 14%);
|
|
65
55
|
--success-muted: hsl(132deg 34% 20%);
|
|
66
56
|
--success-muted-strong: hsl(132deg 30% 28%);
|
|
@@ -95,22 +85,40 @@
|
|
|
95
85
|
--chart-hover-bg-color: hsl(0deg 0% 100% / 6%); // light wash (default dark wash is invisible on dark)
|
|
96
86
|
--chart-tooltip-bg-color: var(--surface-overlay); // native dark tooltip, not an inverted light box
|
|
97
87
|
--chart-tooltip-text-color: var(--text-primary);
|
|
98
|
-
--chart-tooltip-border: var(--border-strong);
|
|
88
|
+
--chart-tooltip-border-color: var(--border-strong);
|
|
89
|
+
|
|
90
|
+
// The two neutrals of the chart palette. Both are pushed dark on light so a lightness gap keeps
|
|
91
|
+
// them off the emerald; on a dark canvas that gap points the wrong way and they read as holes in
|
|
92
|
+
// the chart, so both flip. Slot 8 lands at dE 12 from the orchid under protanopia rather than the
|
|
93
|
+
// dE 15 the rest of the set holds — the orchid desaturates almost to grey there, and 7 and 8 are
|
|
94
|
+
// the "rest" / "other" buckets where such a collision is placed on purpose.
|
|
95
|
+
--chart-categorical-8: hsl(222deg 14% 60%);
|
|
96
|
+
--chart-series-default: hsl(222deg 14% 64%);
|
|
97
|
+
|
|
98
|
+
// Ramp — flip so first → last reads deep → bright on a dark canvas.
|
|
99
|
+
--chart-ramp-1: hsl( 8deg 52% 32%);
|
|
100
|
+
--chart-ramp-2: hsl( 8deg 56% 37%);
|
|
101
|
+
--chart-ramp-3: hsl( 8deg 61% 42%);
|
|
102
|
+
--chart-ramp-4: hsl( 8deg 66% 47%);
|
|
103
|
+
--chart-ramp-5: hsl( 8deg 70% 53%);
|
|
104
|
+
--chart-ramp-6: hsl( 8deg 75% 58%);
|
|
105
|
+
--chart-ramp-7: hsl( 8deg 79% 64%);
|
|
106
|
+
--chart-ramp-8: hsl( 8deg 84% 70%);
|
|
99
107
|
|
|
100
108
|
// Sequential — flip so low → high reads dark → bright on a dark canvas.
|
|
101
|
-
--chart-
|
|
102
|
-
--chart-
|
|
103
|
-
--chart-
|
|
104
|
-
--chart-
|
|
105
|
-
--chart-
|
|
106
|
-
--chart-
|
|
109
|
+
--chart-sequential-1: var(--blue-800);
|
|
110
|
+
--chart-sequential-2: var(--blue-700);
|
|
111
|
+
--chart-sequential-3: var(--blue-600);
|
|
112
|
+
--chart-sequential-4: var(--blue-500);
|
|
113
|
+
--chart-sequential-5: var(--blue-400);
|
|
114
|
+
--chart-sequential-6: var(--blue-300);
|
|
107
115
|
|
|
108
116
|
// Divergent — bright red ← dark-neutral zero → bright green (|value| → brightness).
|
|
109
|
-
--chart-
|
|
110
|
-
--chart-
|
|
111
|
-
--chart-
|
|
112
|
-
--chart-
|
|
113
|
-
--chart-
|
|
114
|
-
--chart-
|
|
115
|
-
--chart-
|
|
117
|
+
--chart-divergent--3: hsl(0deg 70% 62%);
|
|
118
|
+
--chart-divergent--2: hsl(0deg 55% 46%);
|
|
119
|
+
--chart-divergent--1: hsl(0deg 45% 32%);
|
|
120
|
+
--chart-divergent-0: var(--neutral-150);
|
|
121
|
+
--chart-divergent-1: hsl(140deg 40% 32%);
|
|
122
|
+
--chart-divergent-2: hsl(140deg 48% 46%);
|
|
123
|
+
--chart-divergent-3: hsl(140deg 55% 60%);
|
|
116
124
|
}
|
|
@@ -5,6 +5,7 @@ import * as _ids_group_ltd_ids_design_system_core from '@ids-group-ltd/ids-desig
|
|
|
5
5
|
import { DsOptionItem, DsOption, DsOptionGroup, DsControlWidth, DsSize } from '@ids-group-ltd/ids-design-system/core';
|
|
6
6
|
import * as _angular_core from '@angular/core';
|
|
7
7
|
import { OnDestroy, TemplateRef, ElementRef } from '@angular/core';
|
|
8
|
+
import { describedByIds } from '@ids-group-ltd/ids-design-system/components/field-group';
|
|
8
9
|
|
|
9
10
|
/** `content` here also reserves a minimum typing area beside the chips. */
|
|
10
11
|
type AutocompleteWidth = DsControlWidth;
|
|
@@ -23,8 +24,8 @@ declare class AutocompleteComponent<T = unknown> extends DsControlValueAccessor<
|
|
|
23
24
|
private readonly overlay;
|
|
24
25
|
private readonly vcr;
|
|
25
26
|
private readonly host;
|
|
26
|
-
/** Public panel tokens forwarded onto the portaled overlay pane on open so
|
|
27
|
-
*
|
|
27
|
+
/** Public panel tokens forwarded onto the portaled overlay pane on open, so a consumer's
|
|
28
|
+
* `ds-autocomplete { --ds-autocomplete-panel-bg-color | -radius | -maxh: … }` reaches it. */
|
|
28
29
|
private readonly panelTokens;
|
|
29
30
|
/** Options, groups, or both mixed — rendered in the order given. */
|
|
30
31
|
readonly options: _angular_core.InputSignal<readonly AutocompleteItem<T>[]>;
|
|
@@ -51,10 +52,9 @@ declare class AutocompleteComponent<T = unknown> extends DsControlValueAccessor<
|
|
|
51
52
|
readonly sizeResolved: _angular_core.Signal<DsSize>;
|
|
52
53
|
/** Trigger width — `fill` stretches to the container, `content` hugs the value. */
|
|
53
54
|
readonly width: _angular_core.InputSignal<_ids_group_ltd_ids_design_system_core.DsControlWidth>;
|
|
54
|
-
/** What a settled single value does when it is wider than the trigger. Defaults
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* unaffected — its chips have their own measured cap. */
|
|
55
|
+
/** What a settled single value does when it is wider than the trigger. Defaults to
|
|
56
|
+
* `ellipsis`; `wrap` lets the value break onto a second line and pushes the chevron
|
|
57
|
+
* down. Multi mode is unaffected — its chips have their own measured cap. */
|
|
58
58
|
readonly valueOverflow: _angular_core.InputSignal<AutocompleteValueOverflow>;
|
|
59
59
|
/** Placeholder shown in the input when empty. */
|
|
60
60
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
@@ -77,15 +77,15 @@ declare class AutocompleteComponent<T = unknown> extends DsControlValueAccessor<
|
|
|
77
77
|
/** Prevents opening the panel while still allowing focus. */
|
|
78
78
|
readonly readOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
79
79
|
/**
|
|
80
|
-
* The contract spelling of `readOnly
|
|
81
|
-
*
|
|
80
|
+
* The contract spelling of `readOnly`: signal forms binds by NAME, so a
|
|
81
|
+
* `readonly()` rule reaches nothing without it.
|
|
82
82
|
*/
|
|
83
83
|
readonly readonlyBinding: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
84
84
|
/** Shows a clear affordance once there is something to clear. */
|
|
85
85
|
readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
86
86
|
/** Placeholder while the field is being typed in, when a value is already
|
|
87
87
|
* settled — `placeholder` is the empty-field caption and cannot be both.
|
|
88
|
-
* Empty (the default) keeps `placeholder` doing both jobs
|
|
88
|
+
* Empty (the default) keeps `placeholder` doing both jobs. */
|
|
89
89
|
readonly searchPlaceholder: _angular_core.InputSignal<string>;
|
|
90
90
|
/** How the typed query narrows the list.
|
|
91
91
|
*
|
|
@@ -125,6 +125,8 @@ declare class AutocompleteComponent<T = unknown> extends DsControlValueAccessor<
|
|
|
125
125
|
private readonly fieldMessage;
|
|
126
126
|
protected readonly message: _angular_core.Signal<_ids_group_ltd_ids_design_system_components.DsFieldMessage>;
|
|
127
127
|
protected readonly controlState: _angular_core.Signal<_ids_group_ltd_ids_design_system_components_field_message.FieldMessageState | null>;
|
|
128
|
+
protected readonly groupMessage: _angular_core.Signal<string | null>;
|
|
129
|
+
protected readonly describedByIds: typeof describedByIds;
|
|
128
130
|
protected readonly invalidResolved: _angular_core.Signal<boolean>;
|
|
129
131
|
protected readonly optionTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
130
132
|
protected readonly chipTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as _ids_group_ltd_ids_design_system_components_chart_tooltip from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
2
|
+
import { ChartItemTooltipTrigger, ChartTooltipContext } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { TemplateRef } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
interface BarChartRow {
|
|
7
|
+
/** Falls back to the row's position when left out, so a reorder rewrites the DOM. */
|
|
8
|
+
id?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
value: number;
|
|
11
|
+
/** A percentage already out of 100, not a fraction: `42`, never `0.42`. Printed at
|
|
12
|
+
* the row's end while `showPercent` is on; derived from `value / max` when omitted. */
|
|
13
|
+
percent?: number;
|
|
14
|
+
/** Overrides this row's colour. The rows are one series, so they share one
|
|
15
|
+
* colour by default; set this on the row the reader should land on, usually
|
|
16
|
+
* to `var(--ds-chart-series-accent-color)`. There is no separate accent
|
|
17
|
+
* flag — the accent is a colour, so a boolean would only be a less flexible
|
|
18
|
+
* way of setting one. */
|
|
19
|
+
color?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class BarChartComponent {
|
|
23
|
+
/** One row per bar, drawn in the order given. */
|
|
24
|
+
readonly data: _angular_core.InputSignal<readonly BarChartRow[]>;
|
|
25
|
+
/** Track length is relative to this. Null uses the largest value, so the
|
|
26
|
+
* longest row always fills its track. */
|
|
27
|
+
readonly max: _angular_core.InputSignalWithTransform<number | null, number | null>;
|
|
28
|
+
/** Printed above the plot as the chart's visible title, and reused as the annex table's
|
|
29
|
+
* caption. */
|
|
30
|
+
readonly caption: _angular_core.InputSignal<string | null>;
|
|
31
|
+
/** Accessible name. Generated from the data when omitted. */
|
|
32
|
+
readonly summary: _angular_core.InputSignal<string | null>;
|
|
33
|
+
/** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
|
|
34
|
+
* `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
|
|
35
|
+
* `'none'` belongs only where the same data is already in a table on the page. */
|
|
36
|
+
readonly dataTable: _angular_core.InputSignal<"toggle" | "visible" | "none">;
|
|
37
|
+
/** Prints each row's share of `max` beside its value. */
|
|
38
|
+
readonly showPercent: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
39
|
+
/** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
|
|
40
|
+
* when the data lands. */
|
|
41
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
42
|
+
/** Shown in place of the plot when `data` is empty. */
|
|
43
|
+
readonly emptyText: _angular_core.InputSignal<string>;
|
|
44
|
+
/** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,
|
|
45
|
+
* because "the request failed" and "there is nothing to show" read the same to a reader and
|
|
46
|
+
* mean opposite things. */
|
|
47
|
+
readonly error: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
48
|
+
/** The message the error state prints. */
|
|
49
|
+
readonly errorText: _angular_core.InputSignal<string>;
|
|
50
|
+
/** Formats every value the chart prints, the annex table and the generated description
|
|
51
|
+
* included. Defaults to the browser's locale grouping with a K/M/B suffix past four digits. */
|
|
52
|
+
readonly valueFormat: _angular_core.InputSignal<(value: number) => string>;
|
|
53
|
+
/** Turns on the click affordance — the pointer cursor and any hover tint.
|
|
54
|
+
* The click output fires whether or not this is set, so a consumer that
|
|
55
|
+
* binds the output and forgets the flag still receives every click. */
|
|
56
|
+
readonly interactive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
57
|
+
/** The row that was clicked, or activated with Enter or Space. Fires whether or not
|
|
58
|
+
* `interactive` is set. */
|
|
59
|
+
readonly rowClicked: _angular_core.OutputEmitterRef<BarChartRow>;
|
|
60
|
+
/** Milliseconds between one mark's entrance and the next. `0`, the default, is no stagger at
|
|
61
|
+
* all; `40` is the documented non-zero step. The total is capped, so a long series does not
|
|
62
|
+
* crawl in. */
|
|
63
|
+
readonly staggerMs: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
64
|
+
protected markStagger(index: number): string;
|
|
65
|
+
/** Whether a hovered or focused row opens a tooltip. `'axis'` is not offered — a bar
|
|
66
|
+
* chart's marks ARE its categories, so an axis tooltip would repeat the item one. */
|
|
67
|
+
readonly tooltip: _angular_core.InputSignal<ChartItemTooltipTrigger>;
|
|
68
|
+
protected readonly tooltipTemplate: _angular_core.Signal<TemplateRef<{
|
|
69
|
+
$implicit: ChartTooltipContext;
|
|
70
|
+
}> | undefined>;
|
|
71
|
+
protected readonly activeMark: _ids_group_ltd_ids_design_system_components_chart_tooltip.ChartActiveMark;
|
|
72
|
+
/** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not
|
|
73
|
+
* every mouse-operable control has to be separately focusable, and that is what keeps a
|
|
74
|
+
* twenty-five mark chart from being twenty-five stops in the page's tab order. */
|
|
75
|
+
protected readonly rovingIndex: _angular_core.WritableSignal<number>;
|
|
76
|
+
protected readonly tabStopIndex: _angular_core.Signal<number>;
|
|
77
|
+
protected onMarkFocus(index: number, event: FocusEvent): void;
|
|
78
|
+
protected onMarkNavigation(event: KeyboardEvent, index: number): void;
|
|
79
|
+
protected readonly tooltipContext: _angular_core.Signal<ChartTooltipContext | null>;
|
|
80
|
+
protected readonly resolvedMax: _angular_core.Signal<number>;
|
|
81
|
+
protected readonly rows: _angular_core.Signal<{
|
|
82
|
+
key: string;
|
|
83
|
+
row: BarChartRow;
|
|
84
|
+
widthPercent: number;
|
|
85
|
+
formattedValue: string;
|
|
86
|
+
formattedPercent: string;
|
|
87
|
+
color: string;
|
|
88
|
+
}[]>;
|
|
89
|
+
protected readonly accessibleName: _angular_core.Signal<string>;
|
|
90
|
+
protected entryLabel(entry: {
|
|
91
|
+
row: BarChartRow;
|
|
92
|
+
formattedValue: string;
|
|
93
|
+
}): string;
|
|
94
|
+
protected onRowKey(row: BarChartRow, event: Event): void;
|
|
95
|
+
protected readonly isEmpty: _angular_core.Signal<boolean>;
|
|
96
|
+
/** Placeholder bars while loading. Follows the real row count so the chart does not resize
|
|
97
|
+
* when the data lands; falls back to three when `data` is still empty. */
|
|
98
|
+
protected readonly skeletonRows: _angular_core.Signal<unknown[]>;
|
|
99
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BarChartComponent, never>;
|
|
100
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChartComponent, "ds-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "summary": { "alias": "summary"; "required": false; "isSignal": true; }; "dataTable": { "alias": "dataTable"; "required": false; "isSignal": true; }; "showPercent": { "alias": "showPercent"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { BarChartComponent };
|
|
104
|
+
export type { BarChartRow };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _ids_group_ltd_ids_design_system_components from '@ids-group-ltd/ids-design-system/components';
|
|
2
|
-
import { DsMessageBase } from '@ids-group-ltd/ids-design-system/components';
|
|
2
|
+
import { DsMessageBase, DsRouterLink, DsAriaCurrent, DsLinkModifiers } from '@ids-group-ltd/ids-design-system/components';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
4
|
import { ElementRef } from '@angular/core';
|
|
5
|
+
import { Params, QueryParamsHandling, IsActiveMatchOptions } from '@angular/router';
|
|
5
6
|
import { DsSize, IconName } from '@ids-group-ltd/ids-design-system/core';
|
|
6
7
|
|
|
7
8
|
type ButtonColor = 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'error' | 'success' | 'warning';
|
|
@@ -22,11 +23,41 @@ declare class ButtonComponent extends DsMessageBase {
|
|
|
22
23
|
readonly sizeResolved: _angular_core.Signal<DsSize>;
|
|
23
24
|
/** `RouterLink` target. Set it and the button renders an `<a [routerLink]>` with
|
|
24
25
|
* `routerLinkActive`: middle-click, open-in-new-tab and the announced "link" role depend on the
|
|
25
|
-
* element, not on the look.
|
|
26
|
-
|
|
26
|
+
* element, not on the look.
|
|
27
|
+
*
|
|
28
|
+
* Accepts a `UrlTree` as well as a path or a command array — `Router.createUrlTree` is the way
|
|
29
|
+
* to reach the `UrlCreationOptions` that have no input of their own here (`relativeTo`,
|
|
30
|
+
* `preserveFragment`). */
|
|
31
|
+
readonly routerLink: _angular_core.InputSignal<DsRouterLink>;
|
|
27
32
|
/** Plain `href` target, used when `routerLink` is not set — an external address or a download.
|
|
28
33
|
* Renders an `<a href>`; same reasoning as `routerLink`. */
|
|
29
34
|
readonly href: _angular_core.InputSignal<string>;
|
|
35
|
+
/** Hash to append to a `routerLink` destination — the section of the page to land on.
|
|
36
|
+
* routerLink-only: on an `href` put it in the URL, and on a plain button it is ignored with a
|
|
37
|
+
* dev warning. */
|
|
38
|
+
readonly fragment: _angular_core.InputSignal<string | undefined>;
|
|
39
|
+
/** Query parameters for a `routerLink` destination. routerLink-only, same as `fragment`. */
|
|
40
|
+
readonly queryParams: _angular_core.InputSignal<Params | null | undefined>;
|
|
41
|
+
/** How the destination's query merges with the current one — `'merge'`, `'preserve'` or
|
|
42
|
+
* `'replace'`. routerLink-only. */
|
|
43
|
+
readonly queryParamsHandling: _angular_core.InputSignal<QueryParamsHandling | null | undefined>;
|
|
44
|
+
/** Browsing context for the link — `'_blank'` and the rest. Both link destinations take it; on a
|
|
45
|
+
* plain button it is ignored with a dev warning. */
|
|
46
|
+
readonly target: _angular_core.InputSignal<string | undefined>;
|
|
47
|
+
/** `rel` for the link. Pair it with `target="_blank"`: without `noopener` the opened page can
|
|
48
|
+
* reach back through `window.opener`. Both link destinations take it. */
|
|
49
|
+
readonly rel: _angular_core.InputSignal<string | undefined>;
|
|
50
|
+
/** How `routerLinkActive` decides the `active` CLASS — prefix by default, so a section link
|
|
51
|
+
* stays lit inside its own pages. It also bounds the announcement, because the same directive
|
|
52
|
+
* writes it: narrowed to `{ exact: true }`, a prefix match is no longer active and the link
|
|
53
|
+
* announces nothing rather than `true`. Pass `ariaCurrent` alongside to keep one. */
|
|
54
|
+
readonly routerLinkActiveOptions: _angular_core.InputSignal<IsActiveMatchOptions | {
|
|
55
|
+
exact: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
/** Overrides what the link announces. Unset, an exact match announces `page` and a prefix match
|
|
58
|
+
* announces `true`, which is what ARIA means by each; pass `null` to announce nothing, or one
|
|
59
|
+
* of the other values when the link is a step or a location rather than a page. */
|
|
60
|
+
readonly ariaCurrent: _angular_core.InputSignal<DsAriaCurrent | null | undefined>;
|
|
30
61
|
/** Native `type`, defaulting to `'button'` so it never submits an ancestor form by accident.
|
|
31
62
|
* Button-only: ignored on a link, with a dev warning. */
|
|
32
63
|
readonly type: _angular_core.InputSignal<ButtonType>;
|
|
@@ -68,6 +99,8 @@ declare class ButtonComponent extends DsMessageBase {
|
|
|
68
99
|
* `HTMLElement`, not `HTMLButtonElement`: the element follows the destination. */
|
|
69
100
|
readonly controlRef: _angular_core.Signal<ElementRef<HTMLElement>>;
|
|
70
101
|
protected readonly destination: _angular_core.Signal<_ids_group_ltd_ids_design_system_components.DsDestination>;
|
|
102
|
+
protected readonly linkModifiers: _angular_core.Signal<DsLinkModifiers>;
|
|
103
|
+
protected readonly ariaCurrentResolved: _angular_core.Signal<DsAriaCurrent | undefined>;
|
|
71
104
|
protected readonly classes: _angular_core.Signal<string>;
|
|
72
105
|
protected readonly softDisabled: _angular_core.Signal<boolean>;
|
|
73
106
|
private readonly uid;
|
|
@@ -80,7 +113,7 @@ declare class ButtonComponent extends DsMessageBase {
|
|
|
80
113
|
constructor();
|
|
81
114
|
protected onClick(event: MouseEvent): void;
|
|
82
115
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
83
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ds-button", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, ["*", "[dsButtonSubtext]"], true, never>;
|
|
116
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ds-button", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; "isSignal": true; }; "ariaCurrent": { "alias": "ariaCurrent"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; "isSignal": true; }; "ariaHasPopup": { "alias": "ariaHasPopup"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "ariaControls"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "pressed": "pressed"; }, never, ["*", "[dsButtonSubtext]"], true, never>;
|
|
84
117
|
}
|
|
85
118
|
|
|
86
119
|
export { ButtonComponent };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
interface ChartLegendItem {
|
|
4
|
+
/** Matches the series or slice id the chart hides by. */
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly color: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The key beside a chart, and — when `toggleable` — the control that hides a series.
|
|
12
|
+
*
|
|
13
|
+
* Ordinary DOM, never inside the `<svg>`: an item is a real `<input type="checkbox">`, which is
|
|
14
|
+
* what makes the toggle keyboard-operable and correctly announced without inventing a role.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
declare class ChartLegendComponent {
|
|
19
|
+
readonly items: _angular_core.InputSignal<readonly ChartLegendItem[]>;
|
|
20
|
+
/** Ids of the hidden items. Two-way, so a page can drive it from a URL parameter and so
|
|
21
|
+
* cross-chart filtering later is this same mechanism. */
|
|
22
|
+
readonly hidden: _angular_core.ModelSignal<readonly string[]>;
|
|
23
|
+
/** Offers the toggle. Off leaves the legend a plain key. */
|
|
24
|
+
readonly toggleable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
25
|
+
/** The item under the pointer or holding focus, which is what the chart dims from. */
|
|
26
|
+
readonly highlighted: _angular_core.ModelSignal<string | null>;
|
|
27
|
+
protected isHidden(id: string): boolean;
|
|
28
|
+
protected toggle(id: string): void;
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartLegendComponent, never>;
|
|
30
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartLegendComponent, "ds-chart-legend", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; "highlighted": "highlightedChange"; }, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { ChartLegendComponent };
|
|
34
|
+
export type { ChartLegendItem };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, Signal } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** Which mark a chart's tooltip answers for. `'item'` is the mark under the pointer;
|
|
5
|
+
* `'axis'` is every series at the category under the pointer, which is what a line
|
|
6
|
+
* chart needs and a bar chart does not. */
|
|
7
|
+
type ChartTooltipTrigger = 'item' | 'axis' | 'none';
|
|
8
|
+
/** The subset a chart whose marks ARE its categories offers. Spelled out rather than written as
|
|
9
|
+
* `Exclude<ChartTooltipTrigger, 'axis'>`: the React wrapper generator cannot resolve a built-in
|
|
10
|
+
* utility type, so the conditional collapses the whole input to `unknown` on that side. */
|
|
11
|
+
type ChartItemTooltipTrigger = 'item' | 'none';
|
|
12
|
+
interface ChartTooltipEntry {
|
|
13
|
+
readonly label: string;
|
|
14
|
+
readonly value: number;
|
|
15
|
+
/** Already through the chart's `valueFormat`, so the panel never formats. */
|
|
16
|
+
readonly formatted: string;
|
|
17
|
+
readonly color: string;
|
|
18
|
+
}
|
|
19
|
+
interface ChartTooltipContext {
|
|
20
|
+
/** Empty on a chart whose marks are the categories, where the entry label says it. */
|
|
21
|
+
readonly category: string;
|
|
22
|
+
readonly entries: readonly ChartTooltipEntry[];
|
|
23
|
+
}
|
|
24
|
+
/** Where the panel is anchored: the mark's own element, or a point in client
|
|
25
|
+
* coordinates for a chart whose active mark has no element of its own. */
|
|
26
|
+
type ChartTooltipOrigin = Element | {
|
|
27
|
+
readonly x: number;
|
|
28
|
+
readonly y: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The chart tooltip, driven entirely by the context a chart hands it: non-null opens the
|
|
33
|
+
* panel, null closes it. Pointer and keyboard therefore share one path — a chart that
|
|
34
|
+
* sets the context on `focus` gets the panel with no pointer involved.
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
declare class ChartTooltipDirective {
|
|
39
|
+
private readonly overlay;
|
|
40
|
+
private readonly viewContainerRef;
|
|
41
|
+
readonly dsChartTooltip: _angular_core.InputSignal<ChartTooltipContext | null>;
|
|
42
|
+
readonly dsChartTooltipOrigin: _angular_core.InputSignal<ChartTooltipOrigin | null>;
|
|
43
|
+
readonly dsChartTooltipTemplate: _angular_core.InputSignal<TemplateRef<{
|
|
44
|
+
$implicit: ChartTooltipContext;
|
|
45
|
+
}> | null>;
|
|
46
|
+
private overlayRef;
|
|
47
|
+
private panelRef;
|
|
48
|
+
constructor();
|
|
49
|
+
private open;
|
|
50
|
+
private strategyFor;
|
|
51
|
+
private close;
|
|
52
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartTooltipDirective, never>;
|
|
53
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ChartTooltipDirective, "[dsChartTooltip]", never, { "dsChartTooltip": { "alias": "dsChartTooltip"; "required": false; "isSignal": true; }; "dsChartTooltipOrigin": { "alias": "dsChartTooltipOrigin"; "required": false; "isSignal": true; }; "dsChartTooltipTemplate": { "alias": "dsChartTooltipTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface ChartActiveMark {
|
|
57
|
+
/** Index of the mark under the pointer or holding focus; `-1` when none is. */
|
|
58
|
+
readonly index: Signal<number>;
|
|
59
|
+
/** The mark's own element, which is what the tooltip anchors to. */
|
|
60
|
+
readonly origin: Signal<Element | null>;
|
|
61
|
+
enter(index: number, event: Event): void;
|
|
62
|
+
leave(): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.
|
|
66
|
+
* Pointer and keyboard write the same pair, so a chart wires `pointerenter` and `focus` to
|
|
67
|
+
* `enter` and gets one code path rather than two.
|
|
68
|
+
*
|
|
69
|
+
* A TAP LATCHES. A touch fires `pointerleave` the moment the finger lifts, so without this the
|
|
70
|
+
* panel would flash and vanish; latched, it stays until the next tap lands outside the mark. Call
|
|
71
|
+
* from an injection context — the release listener is torn down with the component.
|
|
72
|
+
*
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
declare function chartActiveMark(): ChartActiveMark;
|
|
76
|
+
|
|
77
|
+
export { ChartTooltipDirective, chartActiveMark };
|
|
78
|
+
export type { ChartActiveMark, ChartItemTooltipTrigger, ChartTooltipContext, ChartTooltipEntry, ChartTooltipOrigin, ChartTooltipTrigger };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as _ids_group_ltd_ids_design_system_components_chart_tooltip from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
2
|
+
import { ChartItemTooltipTrigger, ChartTooltipContext } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { TemplateRef } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
interface ColumnChartPoint {
|
|
7
|
+
/** Falls back to the column's position when left out, so a reorder rewrites the DOM. */
|
|
8
|
+
id?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
value: number;
|
|
11
|
+
/** Overrides this column's colour. Columns take the categorical palette by
|
|
12
|
+
* position; set this where a column carries a meaning its position does not,
|
|
13
|
+
* such as the accent on the period the reader should land on. */
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class ColumnChartComponent {
|
|
18
|
+
/** One column per point, drawn in the order given. */
|
|
19
|
+
readonly data: _angular_core.InputSignal<readonly ColumnChartPoint[]>;
|
|
20
|
+
/** Prints each column's value above the column. */
|
|
21
|
+
readonly showValues: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
22
|
+
/** How many value-axis ticks to aim for. A hint, not a count: ticks are
|
|
23
|
+
* snapped to a round step, so the axis may carry one more or one fewer. */
|
|
24
|
+
readonly tickCount: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
25
|
+
/** Printed above the plot as the chart's visible title, and reused as the annex table's
|
|
26
|
+
* caption. */
|
|
27
|
+
readonly caption: _angular_core.InputSignal<string | null>;
|
|
28
|
+
/** Accessible name. Generated from the data when omitted. */
|
|
29
|
+
readonly summary: _angular_core.InputSignal<string | null>;
|
|
30
|
+
/** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
|
|
31
|
+
* `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
|
|
32
|
+
* `'none'` belongs only where the same data is already in a table on the page. */
|
|
33
|
+
readonly dataTable: _angular_core.InputSignal<"toggle" | "visible" | "none">;
|
|
34
|
+
/** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
|
|
35
|
+
* when the data lands. */
|
|
36
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
37
|
+
/** Shown in place of the plot when `data` is empty. */
|
|
38
|
+
readonly emptyText: _angular_core.InputSignal<string>;
|
|
39
|
+
/** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,
|
|
40
|
+
* because "the request failed" and "there is nothing to show" read the same to a reader and
|
|
41
|
+
* mean opposite things. */
|
|
42
|
+
readonly error: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
43
|
+
/** The message the error state prints. */
|
|
44
|
+
readonly errorText: _angular_core.InputSignal<string>;
|
|
45
|
+
/** Formats every value the chart prints, the annex table and the generated description
|
|
46
|
+
* included. Defaults to the browser's locale grouping with a K/M/B suffix past four digits. */
|
|
47
|
+
readonly valueFormat: _angular_core.InputSignal<(value: number) => string>;
|
|
48
|
+
/** Turns on the click affordance — the pointer cursor and any hover tint.
|
|
49
|
+
* The click output fires whether or not this is set, so a consumer that
|
|
50
|
+
* binds the output and forgets the flag still receives every click. */
|
|
51
|
+
readonly interactive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
52
|
+
/** The point that was clicked, or activated with Enter or Space. Fires whether or not
|
|
53
|
+
* `interactive` is set. */
|
|
54
|
+
readonly pointClicked: _angular_core.OutputEmitterRef<ColumnChartPoint>;
|
|
55
|
+
/** Milliseconds between one mark's entrance and the next. `0`, the default, is no stagger at
|
|
56
|
+
* all; `40` is the documented non-zero step. The total is capped, so a long series does not
|
|
57
|
+
* crawl in. */
|
|
58
|
+
readonly staggerMs: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
59
|
+
protected markStagger(index: number): string;
|
|
60
|
+
/** Whether a hovered or focused column opens a tooltip. `'axis'` is not offered — a
|
|
61
|
+
* column chart's marks ARE its categories, so an axis tooltip would repeat the item one. */
|
|
62
|
+
readonly tooltip: _angular_core.InputSignal<ChartItemTooltipTrigger>;
|
|
63
|
+
protected readonly tooltipTemplate: _angular_core.Signal<TemplateRef<{
|
|
64
|
+
$implicit: ChartTooltipContext;
|
|
65
|
+
}> | undefined>;
|
|
66
|
+
protected readonly activeMark: _ids_group_ltd_ids_design_system_components_chart_tooltip.ChartActiveMark;
|
|
67
|
+
/** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not
|
|
68
|
+
* every mouse-operable control has to be separately focusable, and that is what keeps a
|
|
69
|
+
* twenty-five mark chart from being twenty-five stops in the page's tab order. */
|
|
70
|
+
protected readonly rovingIndex: _angular_core.WritableSignal<number>;
|
|
71
|
+
protected readonly tabStopIndex: _angular_core.Signal<number>;
|
|
72
|
+
protected onMarkFocus(index: number, event: FocusEvent): void;
|
|
73
|
+
protected onMarkNavigation(event: KeyboardEvent, index: number): void;
|
|
74
|
+
protected readonly tooltipContext: _angular_core.Signal<ChartTooltipContext | null>;
|
|
75
|
+
protected readonly domainMax: _angular_core.Signal<number>;
|
|
76
|
+
/** Top of the value axis: the domain rounded up to a whole tick, so the
|
|
77
|
+
* tallest column ends on a gridline rather than between two. */
|
|
78
|
+
protected readonly axisMax: _angular_core.Signal<number>;
|
|
79
|
+
protected readonly ticks: _angular_core.Signal<{
|
|
80
|
+
label: string;
|
|
81
|
+
offsetPercent: number;
|
|
82
|
+
}[]>;
|
|
83
|
+
protected readonly columns: _angular_core.Signal<{
|
|
84
|
+
key: string;
|
|
85
|
+
point: ColumnChartPoint;
|
|
86
|
+
heightPercent: number;
|
|
87
|
+
formattedValue: string;
|
|
88
|
+
color: string;
|
|
89
|
+
}[]>;
|
|
90
|
+
protected readonly accessibleName: _angular_core.Signal<string>;
|
|
91
|
+
protected entryLabel(entry: {
|
|
92
|
+
point: ColumnChartPoint;
|
|
93
|
+
formattedValue: string;
|
|
94
|
+
}): string;
|
|
95
|
+
protected onPointKey(point: ColumnChartPoint, event: Event): void;
|
|
96
|
+
protected readonly isEmpty: _angular_core.Signal<boolean>;
|
|
97
|
+
/** Placeholder columns while loading. Follows the real point count so the chart does not resize
|
|
98
|
+
* when the data lands; falls back to three when `data` is still empty. */
|
|
99
|
+
protected readonly skeletonColumns: _angular_core.Signal<unknown[]>;
|
|
100
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColumnChartComponent, never>;
|
|
101
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColumnChartComponent, "ds-column-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; "tickCount": { "alias": "tickCount"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "summary": { "alias": "summary"; "required": false; "isSignal": true; }; "dataTable": { "alias": "dataTable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, { "pointClicked": "pointClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { ColumnChartComponent };
|
|
105
|
+
export type { ColumnChartPoint };
|
|
@@ -4,6 +4,7 @@ import { DsControlValueAccessor, DsOverlayCloseCause } from '@ids-group-ltd/ids-
|
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
5
|
import { OnDestroy, ElementRef, TemplateRef } from '@angular/core';
|
|
6
6
|
import { DsSize } from '@ids-group-ltd/ids-design-system/core';
|
|
7
|
+
import { describedByIds } from '@ids-group-ltd/ids-design-system/components/field-group';
|
|
7
8
|
|
|
8
9
|
interface DateFormatSpec {
|
|
9
10
|
order: ('D' | 'M' | 'Y')[];
|
|
@@ -64,7 +65,7 @@ declare class DatePickerComponent extends DsControlValueAccessor<Date | RangeVal
|
|
|
64
65
|
private readonly config;
|
|
65
66
|
private readonly host;
|
|
66
67
|
/** Public panel tokens forwarded onto the portaled overlay pane on open so
|
|
67
|
-
* a consumer's `ds-date-picker { --ds-date-picker
|
|
68
|
+
* a consumer's `ds-date-picker { --ds-date-picker-*: … }` reaches it. */
|
|
68
69
|
private readonly panelTokens;
|
|
69
70
|
/** Selection mode — single date or start/end range. */
|
|
70
71
|
readonly mode: _angular_core.InputSignal<DatePickerMode>;
|
|
@@ -124,6 +125,8 @@ declare class DatePickerComponent extends DsControlValueAccessor<Date | RangeVal
|
|
|
124
125
|
private readonly fieldMessage;
|
|
125
126
|
protected readonly message: _angular_core.Signal<_ids_group_ltd_ids_design_system_components.DsFieldMessage>;
|
|
126
127
|
protected readonly controlState: _angular_core.Signal<_ids_group_ltd_ids_design_system_components_field_message.FieldMessageState | null>;
|
|
128
|
+
protected readonly groupMessage: _angular_core.Signal<string | null>;
|
|
129
|
+
protected readonly describedByIds: typeof describedByIds;
|
|
127
130
|
protected readonly invalidResolved: _angular_core.Signal<boolean>;
|
|
128
131
|
readonly resolvedLocale: _angular_core.Signal<string>;
|
|
129
132
|
protected readonly resolvedFirstDay: _angular_core.Signal<number>;
|