@ids-group-ltd/ids-design-system 0.14.1 → 0.14.2
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 +243 -0
- package/components.md +29 -26
- package/docs/agent/INDEX.md +3 -3
- package/docs/agent/charts/column-series-component.md +1 -1
- package/docs/agent/charts/ds-bar-chart.md +3 -3
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +3 -3
- package/docs/agent/charts/ds-config.md +1 -1
- package/docs/agent/charts/ds-funnel-chart.md +3 -3
- package/docs/agent/charts/ds-heatmap-chart.md +1 -1
- package/docs/agent/charts/ds-line-chart.md +2 -2
- package/docs/agent/charts/ds-pie-chart.md +2 -2
- package/docs/agent/charts/ds-scatter-chart.md +1 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/charts/line-series-component.md +1 -1
- package/docs/agent/feedback/ds-description-list.md +3 -0
- package/docs/agent/forms/ds-textarea.md +1 -1
- package/docs/agent/navigation/ds-pagination.md +1 -1
- package/docs/agent/navigation/ds-tabs.md +1 -0
- package/docs/agent/overlays/ds-tooltip.md +3 -3
- package/docs/agent/tables/ds-table.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +22 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +19 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +180 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +175 -93
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +10 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +32 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +47 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +11 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +11 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +15 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +35 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +32 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +66 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +61 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +78 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +25 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +85 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.14.2.json +427 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +31 -2
- package/styles/_chart-frame.scss +34 -12
- package/styles/_chart-interactive.scss +10 -9
- package/styles/_chart-motion.scss +139 -16
- package/styles/_overlay-motion.scss +6 -0
- package/styles/_tokens.scss +19 -4
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +24 -10
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +33 -2
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +151 -103
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +8 -9
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +23 -11
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +29 -2
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +8 -8
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +17 -7
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +20 -2
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +6 -2
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +13 -2
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +22 -4
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +10 -1
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +11 -2
- package/types/ids-group-ltd-ids-design-system-components.d.ts +33 -6
- package/types/ids-group-ltd-ids-design-system-core.d.ts +14 -1
- package/types/ids-group-ltd-ids-design-system.d.ts +1 -1
package/styles/_chart-frame.scss
CHANGED
|
@@ -133,25 +133,38 @@
|
|
|
133
133
|
position: relative;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
:host(.framed) {
|
|
137
|
+
--_chart-pin-reset-inset: var(--ds-chart-frame-padding);
|
|
138
|
+
}
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
// Room on the caption's line while the control is up, so a long caption wraps short of it rather
|
|
141
|
+
// than running under it; a chart with no caption gains the line. The shift answers a click.
|
|
142
|
+
// ponytail: a fixed room fits `Unpin`; a translation longer than about ten characters overlaps
|
|
143
|
+
// the caption's end, measure the control if one ever does.
|
|
144
|
+
:host:has(.pin-reset) figure > figcaption {
|
|
145
|
+
padding-inline-end: calc(5rem + var(--space-2));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host:has(.pin-reset) figure:not(:has(> figcaption)) {
|
|
149
|
+
padding-block-start: calc(var(--space-6) + var(--space-2));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Top END, on the caption's line: the bottom of a chart carries its axis labels, its legend or its
|
|
153
|
+
table, and a control floating over them hides the words the reader is comparing. The caption
|
|
154
|
+
line is the one run of a chart with room to its end.
|
|
155
|
+
|
|
156
|
+
Drawn at the caption's height; the 44px the library's touch rule asks of a real control is the
|
|
157
|
+
hit area around it, not its box. */
|
|
142
158
|
.pin-reset {
|
|
143
159
|
position: absolute;
|
|
144
|
-
inset-block-
|
|
145
|
-
inset-inline: 0;
|
|
160
|
+
inset-block-start: var(--_chart-pin-reset-inset, 0);
|
|
161
|
+
inset-inline-end: var(--_chart-pin-reset-inset, 0);
|
|
146
162
|
z-index: 1;
|
|
147
|
-
justify-self: center;
|
|
148
|
-
margin-inline: auto;
|
|
149
163
|
display: inline-flex;
|
|
150
164
|
align-items: center;
|
|
151
165
|
gap: var(--space-1);
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
padding: var(--space-1) var(--space-3);
|
|
166
|
+
block-size: var(--space-6);
|
|
167
|
+
padding: 0 var(--space-2-5);
|
|
155
168
|
border: var(--border-width-default) solid var(--border-divider);
|
|
156
169
|
border-radius: var(--radius-pill);
|
|
157
170
|
background: var(--surface-default);
|
|
@@ -161,6 +174,15 @@
|
|
|
161
174
|
box-shadow: var(--shadow-1);
|
|
162
175
|
cursor: pointer;
|
|
163
176
|
|
|
177
|
+
&::before {
|
|
178
|
+
position: absolute;
|
|
179
|
+
inset: 50% auto auto 50%;
|
|
180
|
+
inline-size: max(100%, var(--hit-comfy));
|
|
181
|
+
block-size: var(--hit-comfy);
|
|
182
|
+
transform: translate(-50%, -50%);
|
|
183
|
+
content: '';
|
|
184
|
+
}
|
|
185
|
+
|
|
164
186
|
&:hover {
|
|
165
187
|
color: var(--text-primary);
|
|
166
188
|
border-color: var(--border-strong);
|
|
@@ -23,8 +23,10 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
// Include on the CONTAINER, never on the mark: `:has()` asks the container whether
|
|
27
|
-
//
|
|
26
|
+
// Include on the CONTAINER, never on the mark: `:has()` asks the container whether one of its
|
|
27
|
+
// marks is the active one. `.is-active` is the component's, set from the same state the tooltip
|
|
28
|
+
// reads, so the highlight waits out the hover delay with the tooltip rather than flashing on every
|
|
29
|
+
// mark the pointer crosses. The component also sets it on focus.
|
|
28
30
|
//
|
|
29
31
|
// Gated on `.dims-others`, which the chart puts on the container from its `dimOthers` input. Off by
|
|
30
32
|
// default, because dimming is not free: measured 2026-09-13, OKLab dE x100, the worst pair of three
|
|
@@ -40,12 +42,8 @@
|
|
|
40
42
|
// it the two rules dim each other out: the hover rule takes down the pinned mark because the
|
|
41
43
|
// pointer has moved off it, the pin rule takes down the hovered mark because it is not the pinned
|
|
42
44
|
// one, and every mark on the chart ends up faded with nothing lit.
|
|
43
|
-
&.dims-others:not(:has(#{$mark}.is-pinned)):has(#{$mark}.
|
|
44
|
-
#{$mark}
|
|
45
|
-
&.dims-others:not(:has(#{$mark}.is-pinned)):has(
|
|
46
|
-
#{$mark}.interactive:focus-visible
|
|
47
|
-
)
|
|
48
|
-
#{$mark}.interactive:not(:focus-visible),
|
|
45
|
+
&.dims-others:not(:has(#{$mark}.is-pinned)):has(#{$mark}.is-active)
|
|
46
|
+
#{$mark}:not(.is-active),
|
|
49
47
|
// A pinned mark keeps the others down after the pointer has gone, which is the whole point of
|
|
50
48
|
// pinning: the reader looks away from the chart and the comparison is still on screen.
|
|
51
49
|
&.dims-others:has(#{$mark}.is-pinned) #{$mark}:not(.is-pinned) {
|
|
@@ -53,8 +51,11 @@
|
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
|
|
54
|
+
// `.interactive` is a mark a consumer made clickable, `.pins` one a click would hold. The pointer
|
|
55
|
+
// cursor promises a click, so it goes where one of the two is true and nowhere else.
|
|
56
56
|
@mixin clickable($mark) {
|
|
57
|
-
#{$mark}.interactive
|
|
57
|
+
#{$mark}.interactive,
|
|
58
|
+
#{$mark}.pins {
|
|
58
59
|
cursor: pointer;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
@@ -14,23 +14,26 @@
|
|
|
14
14
|
// its function form: the component puts `.mark-leave` on the mark and Angular removes it on
|
|
15
15
|
// `animationend`, with no `getAnimations()` call.
|
|
16
16
|
//
|
|
17
|
-
// A mark ARRIVES BY GROWING FROM
|
|
18
|
-
// scale reads as the whole chart zooming, and it moves the
|
|
19
|
-
//
|
|
20
|
-
// a line
|
|
17
|
+
// A mark with a baseline ARRIVES BY GROWING FROM IT, never by scaling about its centre: a uniform
|
|
18
|
+
// scale reads as the whole chart zooming, and it moves the baseline, which is the one line on a
|
|
19
|
+
// chart that must not move. A mark with no baseline - a point, a cell, a ring - settles in from a
|
|
20
|
+
// scale close to one, and a line draws on along its own path.
|
|
21
21
|
//
|
|
22
|
-
//
|
|
22
|
+
// The phases are staged by delay, not by script: the marks arrive after the exit, and what follows a
|
|
23
|
+
// mark (its value label, a marker) waits `$after` on top of that.
|
|
24
|
+
//
|
|
25
|
+
// `prefers-reduced-motion` zeroes the durations in `_tokens.scss`. The delays are the one thing that
|
|
26
|
+
// stays, because a stagger is written per mark as a plain length, so `enters` zeroes them here: with
|
|
27
|
+
// a zero duration and `backwards` fill a delayed mark would stay invisible for its delay.
|
|
23
28
|
|
|
24
29
|
@keyframes ds-chart-mark-grow-y {
|
|
25
30
|
from {
|
|
26
|
-
opacity: 0;
|
|
27
31
|
transform: scaleY(0);
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
@keyframes ds-chart-mark-grow-x {
|
|
32
36
|
from {
|
|
33
|
-
opacity: 0;
|
|
34
37
|
transform: scaleX(0);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
@@ -41,6 +44,36 @@
|
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
|
|
47
|
+
// `--_chart-rise-distance` is for a canvas whose viewBox stretches: there a pixel is a user unit,
|
|
48
|
+
// so a chart sets a percentage of the mark's own box on the canvas instead.
|
|
49
|
+
@keyframes ds-chart-mark-rise {
|
|
50
|
+
from {
|
|
51
|
+
opacity: 0;
|
|
52
|
+
transform: translateY(var(--_chart-rise-distance, 4px));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes ds-chart-mark-settle {
|
|
57
|
+
from {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transform: scale(0.96);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes ds-chart-ring-sweep {
|
|
64
|
+
from {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
transform: rotate(-30deg) scale(0.96);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Needs `pathLength="1"` and `stroke-dasharray: 1` on the path, so one unit is the whole line.
|
|
71
|
+
@keyframes ds-chart-line-draw {
|
|
72
|
+
from {
|
|
73
|
+
stroke-dashoffset: 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
44
77
|
@keyframes ds-chart-mark-exit {
|
|
45
78
|
to {
|
|
46
79
|
opacity: 0;
|
|
@@ -54,14 +87,23 @@
|
|
|
54
87
|
}
|
|
55
88
|
}
|
|
56
89
|
|
|
57
|
-
@mixin enters(
|
|
90
|
+
@mixin enters(
|
|
91
|
+
$selector,
|
|
92
|
+
$keyframes,
|
|
93
|
+
$duration: var(--ds-motion-chart-mark-enter-duration),
|
|
94
|
+
$easing: var(--ds-motion-chart-mark-enter-easing),
|
|
95
|
+
$after: 0ms
|
|
96
|
+
) {
|
|
58
97
|
#{$selector} {
|
|
59
|
-
animation: #{$keyframes}
|
|
60
|
-
var(--ds-motion-chart-mark-enter-easing)
|
|
98
|
+
animation: #{$keyframes} #{$duration} #{$easing}
|
|
61
99
|
calc(
|
|
62
|
-
var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms)
|
|
100
|
+
var(--ds-motion-chart-mark-exit-duration) + #{$after} + var(--_chart-mark-stagger, 0ms)
|
|
63
101
|
)
|
|
64
102
|
backwards;
|
|
103
|
+
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
animation-delay: 0ms;
|
|
106
|
+
}
|
|
65
107
|
}
|
|
66
108
|
}
|
|
67
109
|
|
|
@@ -74,7 +116,12 @@
|
|
|
74
116
|
transform-origin: bottom;
|
|
75
117
|
}
|
|
76
118
|
|
|
77
|
-
@include enters(
|
|
119
|
+
@include enters(
|
|
120
|
+
'#{$fill}',
|
|
121
|
+
ds-chart-mark-grow-y,
|
|
122
|
+
var(--ds-motion-chart-mark-grow-duration),
|
|
123
|
+
var(--ds-motion-chart-mark-grow-easing)
|
|
124
|
+
);
|
|
78
125
|
@include leaves($mark);
|
|
79
126
|
}
|
|
80
127
|
|
|
@@ -84,12 +131,88 @@
|
|
|
84
131
|
transform-origin: left;
|
|
85
132
|
}
|
|
86
133
|
|
|
87
|
-
|
|
134
|
+
#{$mark} #{$fill}:dir(rtl) {
|
|
135
|
+
transform-origin: right;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@include enters(
|
|
139
|
+
'#{$fill}',
|
|
140
|
+
ds-chart-mark-grow-x,
|
|
141
|
+
var(--ds-motion-chart-mark-grow-duration),
|
|
142
|
+
var(--ds-motion-chart-mark-grow-easing)
|
|
143
|
+
);
|
|
88
144
|
@include leaves($mark);
|
|
89
145
|
}
|
|
90
146
|
|
|
91
|
-
/* A mark
|
|
92
|
-
@mixin fades-in($mark) {
|
|
93
|
-
@include enters(
|
|
147
|
+
/* A mark that only appears - an area under its line, a connector, a legend swatch. */
|
|
148
|
+
@mixin fades-in($mark, $after: 0ms, $duration: var(--ds-motion-chart-mark-enter-duration)) {
|
|
149
|
+
@include enters(
|
|
150
|
+
'#{$mark}',
|
|
151
|
+
ds-chart-mark-fade-in,
|
|
152
|
+
$duration,
|
|
153
|
+
var(--ds-motion-chart-mark-enter-easing),
|
|
154
|
+
$after
|
|
155
|
+
);
|
|
156
|
+
@include leaves($mark);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* A mark with no baseline that stands for one reading - a scatter point, a heat map cell - settles
|
|
160
|
+
in about its own centre. */
|
|
161
|
+
@mixin settles-in($mark, $after: 0ms) {
|
|
162
|
+
#{$mark} {
|
|
163
|
+
transform-box: fill-box;
|
|
164
|
+
transform-origin: center;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@include enters(
|
|
168
|
+
'#{$mark}',
|
|
169
|
+
ds-chart-mark-settle,
|
|
170
|
+
var(--ds-motion-chart-mark-enter-duration),
|
|
171
|
+
var(--ds-motion-chart-mark-enter-easing),
|
|
172
|
+
$after
|
|
173
|
+
);
|
|
94
174
|
@include leaves($mark);
|
|
95
175
|
}
|
|
176
|
+
|
|
177
|
+
/* A ring turns into place as one element, so its slices keep their angles relative to each other. */
|
|
178
|
+
@mixin sweeps-in($ring) {
|
|
179
|
+
#{$ring} {
|
|
180
|
+
transform-box: fill-box;
|
|
181
|
+
transform-origin: center;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@include enters(
|
|
185
|
+
'#{$ring}',
|
|
186
|
+
ds-chart-ring-sweep,
|
|
187
|
+
var(--ds-motion-chart-mark-sweep-duration),
|
|
188
|
+
var(--ds-motion-chart-mark-grow-easing)
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* A solid line draws on from its first reading. A dashed line fades instead: the draw animates the
|
|
193
|
+
same dash properties the dash pattern is made of. */
|
|
194
|
+
@mixin draws-on($path) {
|
|
195
|
+
#{$path} {
|
|
196
|
+
stroke-dasharray: 1;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@include enters(
|
|
200
|
+
'#{$path}',
|
|
201
|
+
ds-chart-line-draw,
|
|
202
|
+
var(--ds-motion-chart-mark-sweep-duration),
|
|
203
|
+
var(--ds-motion-chart-mark-enter-easing)
|
|
204
|
+
);
|
|
205
|
+
@include leaves($path);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* What belongs to a mark - its value label, a marker on a line - rises in once the mark has
|
|
209
|
+
arrived. `$after` is how long the mark takes. */
|
|
210
|
+
@mixin follows($detail, $after) {
|
|
211
|
+
@include enters(
|
|
212
|
+
'#{$detail}',
|
|
213
|
+
ds-chart-mark-rise,
|
|
214
|
+
var(--ds-motion-chart-mark-detail-duration),
|
|
215
|
+
var(--ds-motion-chart-mark-enter-easing),
|
|
216
|
+
$after
|
|
217
|
+
);
|
|
218
|
+
}
|
|
@@ -47,6 +47,12 @@
|
|
|
47
47
|
--_overlay-enter-origin: center left;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
// A chart tooltip reopens on every mark the pointer crosses, and a scale shifts its rows while it
|
|
51
|
+
// settles, so a hop reads as the swatch drifting into place. It fades instead.
|
|
52
|
+
&.ds-chart-tooltip-pane {
|
|
53
|
+
--_overlay-enter-keyframes: var(--ds-overlay-enter-keyframes, ds-fade-in);
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
@media (prefers-reduced-motion: reduce) {
|
|
51
57
|
--_overlay-enter-duration: 0ms;
|
|
52
58
|
}
|
package/styles/_tokens.scss
CHANGED
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
--duration-base: 180ms;
|
|
116
116
|
--duration-slow: 260ms;
|
|
117
117
|
--duration-slower: 400ms;
|
|
118
|
+
--duration-slowest: 600ms;
|
|
118
119
|
|
|
119
120
|
/* Loop durations sit outside the transition scale on purpose — they describe
|
|
120
121
|
rhythm, not response. */
|
|
@@ -126,12 +127,17 @@
|
|
|
126
127
|
- emphasized: overlay / modal / drawer entries and exits; overshoots
|
|
127
128
|
- decelerate: something appearing (toast, tooltip, popover open)
|
|
128
129
|
- accelerate: something leaving (toast dismiss, modal close)
|
|
129
|
-
- spring: overshoot for small celebratory feedback; sparingly
|
|
130
|
+
- spring: overshoot for small celebratory feedback; sparingly
|
|
131
|
+
- emphasized-decelerate: a large mark arriving, long and calm at the end
|
|
132
|
+
- settle: a mark growing into its value; a critically damped spring, so it never
|
|
133
|
+
overshoots and never shows a value the data does not hold */
|
|
130
134
|
--ease-standard: cubic-bezier(.2, 0, 0, 1);
|
|
131
135
|
--ease-emphasized: cubic-bezier(.3, 0, .1, 1.4);
|
|
132
136
|
--ease-decelerate: cubic-bezier(0, 0, 0, 1);
|
|
133
137
|
--ease-accelerate: cubic-bezier(.3, 0, 1, 1);
|
|
134
138
|
--ease-spring: cubic-bezier(.5, 1.5, .5, 1);
|
|
139
|
+
--ease-emphasized-decelerate: cubic-bezier(.05, .7, .1, 1);
|
|
140
|
+
--ease-settle: linear(0, 0.09 6.3%, 0.265 12.5%, 0.444 18.8%, 0.596 25%, 0.715 31.3%, 0.803 37.5%, 0.867 43.8%, 0.911 50%, 0.942 56.3%, 0.962 62.5%, 0.976 68.8%, 0.986 75%, 0.992 81.3%, 0.996 87.5%, 0.998 93.8%, 1);
|
|
135
141
|
|
|
136
142
|
/* Motion ROLES — name the intent once and every surface at that scale follows. `exit` and
|
|
137
143
|
`exit-large` stay separate because panel LEAVES run at --duration-base, not fast, and a few
|
|
@@ -163,9 +169,16 @@
|
|
|
163
169
|
--ds-motion-chart-mark-easing: var(--ease-decelerate);
|
|
164
170
|
|
|
165
171
|
/* A mark arriving and a mark leaving are separate roles because the enter waits out the exit:
|
|
166
|
-
the two durations are added, and one role could not carry both halves of that sum.
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
the two durations are added, and one role could not carry both halves of that sum. An arrival
|
|
173
|
+
is timed by what arrives: `enter` for a mark that fades or settles in place, `grow` for one that
|
|
174
|
+
grows out of its baseline and `sweep` for a ring or a line drawing on, `detail` for what
|
|
175
|
+
follows a mark (its value label, a marker). */
|
|
176
|
+
--ds-motion-chart-mark-enter-duration: var(--duration-slower);
|
|
177
|
+
--ds-motion-chart-mark-enter-easing: var(--ease-emphasized-decelerate);
|
|
178
|
+
--ds-motion-chart-mark-grow-duration: var(--duration-slowest);
|
|
179
|
+
--ds-motion-chart-mark-grow-easing: var(--ease-settle);
|
|
180
|
+
--ds-motion-chart-mark-sweep-duration: var(--duration-slowest);
|
|
181
|
+
--ds-motion-chart-mark-detail-duration: var(--duration-base);
|
|
169
182
|
--ds-motion-chart-mark-exit-duration: var(--duration-fast);
|
|
170
183
|
--ds-motion-chart-mark-exit-easing: var(--ease-accelerate);
|
|
171
184
|
|
|
@@ -495,6 +508,7 @@
|
|
|
495
508
|
--grid-cols-card-minh: 120px;
|
|
496
509
|
--grid-cols-card-thumb: 80px;
|
|
497
510
|
--dl-spec-label-w: 120px;
|
|
511
|
+
--dl-spec-value-min-w: 14rem;
|
|
498
512
|
--scroll-spec-h: 220px;
|
|
499
513
|
--tab-spec-maxw: 220px;
|
|
500
514
|
--tab-spec-dot-offset: var(--border-width-strong); /* negated at the use site */
|
|
@@ -507,6 +521,7 @@
|
|
|
507
521
|
--duration-base: 0ms;
|
|
508
522
|
--duration-slow: 0ms;
|
|
509
523
|
--duration-slower: 0ms;
|
|
524
|
+
--duration-slowest: 0ms;
|
|
510
525
|
|
|
511
526
|
/* Loops are slowed, never frozen: a stopped spinner reads as "hung", not
|
|
512
527
|
"loading". The one large motion that does halt is the page-wide skeleton
|
|
@@ -122,7 +122,21 @@ declare class BarChartComponent {
|
|
|
122
122
|
* included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then `DS_CONFIG.locale` /
|
|
123
123
|
* `LOCALE_ID`. */
|
|
124
124
|
readonly valueFormat: _angular_core.InputSignal<ChartValueFormat | null>;
|
|
125
|
-
|
|
125
|
+
/** Holds the clicked row and its tooltip in place, with a pin disc on it, until a second click,
|
|
126
|
+
* Escape or a press outside releases it. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then
|
|
127
|
+
* `true`. `rowClicked` fires either way - pinning is a state, not a handler. */
|
|
128
|
+
readonly pinOnClick: _angular_core.InputSignalWithTransform<boolean | null, unknown>;
|
|
129
|
+
protected readonly defaults: {
|
|
130
|
+
locale: string;
|
|
131
|
+
frame: _angular_core.Signal<ChartFrame>;
|
|
132
|
+
dataTable: _angular_core.Signal<ChartDataTable>;
|
|
133
|
+
emptyText: _angular_core.Signal<string>;
|
|
134
|
+
errorText: _angular_core.Signal<string>;
|
|
135
|
+
valueFormat: _angular_core.Signal<ChartValueFormat>;
|
|
136
|
+
tooltipLingerMs: _angular_core.Signal<number>;
|
|
137
|
+
pinOnClick: _angular_core.Signal<boolean>;
|
|
138
|
+
hoverDelayMs: _angular_core.Signal<number>;
|
|
139
|
+
};
|
|
126
140
|
protected readonly intl: _angular_core.Signal<_ids_group_ltd_ids_design_system_core.DsIntl>;
|
|
127
141
|
readonly frameResolved: _angular_core.Signal<ChartFrame>;
|
|
128
142
|
readonly dataTableResolved: _angular_core.Signal<ChartDataTable>;
|
|
@@ -136,11 +150,6 @@ declare class BarChartComponent {
|
|
|
136
150
|
/** The row that was clicked, or activated with Enter or Space. Fires whether or not
|
|
137
151
|
* `interactive` is set. */
|
|
138
152
|
readonly rowClicked: _angular_core.OutputEmitterRef<BarChartRow>;
|
|
139
|
-
/** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press
|
|
140
|
-
* outside releases it. Off by default: a click is already the drill-down hook, and a mark left
|
|
141
|
-
* lit after the pointer has gone needs a reader who knows why it is lit. `rowClicked` fires
|
|
142
|
-
* either way — pinning is a state, not a handler. */
|
|
143
|
-
readonly pinOnClick: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
144
153
|
/** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
|
|
145
154
|
* one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
|
|
146
155
|
* marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
|
|
@@ -153,9 +162,9 @@ declare class BarChartComponent {
|
|
|
153
162
|
* is unaffected. */
|
|
154
163
|
readonly highlighted: _angular_core.InputSignal<string | null>;
|
|
155
164
|
protected isSegmentDimmed(key: string): boolean;
|
|
156
|
-
/** Milliseconds between one
|
|
157
|
-
*
|
|
158
|
-
*
|
|
165
|
+
/** Milliseconds between one row's entrance and the next, `40` by default; `0` turns the stagger
|
|
166
|
+
* off. The whole spread stays within 260ms, so a long chart
|
|
167
|
+
* narrows the step instead of crawling in. */
|
|
159
168
|
readonly staggerMs: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
160
169
|
protected markStagger(index: number): string;
|
|
161
170
|
/** Whether a hovered or focused row opens a tooltip. `'axis'` is not offered — a bar
|
|
@@ -166,6 +175,11 @@ declare class BarChartComponent {
|
|
|
166
175
|
}> | undefined>;
|
|
167
176
|
private readonly tooltipLingerResolved;
|
|
168
177
|
protected readonly activeMark: _ids_group_ltd_ids_design_system_components_chart_tooltip.ChartActiveMark;
|
|
178
|
+
protected readonly hoveredLabel: _angular_core.WritableSignal<number>;
|
|
179
|
+
/** Naming a row by its label fades the rest whether or not `dimOthers` is set, the way a legend
|
|
180
|
+
* singles out its series. The row itself answers the pointer, so the fade waits out the same
|
|
181
|
+
* hover delay as the tooltip. */
|
|
182
|
+
protected readonly dimsOthers: _angular_core.Signal<boolean>;
|
|
169
183
|
protected onMarkClick(payload: BarChartRow, index: number, event: Event): void;
|
|
170
184
|
protected readonly roving: _ids_group_ltd_ids_design_system_components.RovingMarks;
|
|
171
185
|
protected onMarkFocus(index: number, event: FocusEvent): void;
|
|
@@ -214,7 +228,7 @@ declare class BarChartComponent {
|
|
|
214
228
|
* when the data lands; falls back to three when `data` is still empty. */
|
|
215
229
|
protected readonly skeletonRows: _angular_core.Signal<unknown[]>;
|
|
216
230
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BarChartComponent, never>;
|
|
217
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChartComponent, "ds-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "frame": { "alias": "frame"; "required": false; "isSignal": true; }; "tooltipLingerMs": { "alias": "tooltipLingerMs"; "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; }; "partOfWhole": { "alias": "partOfWhole"; "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; }; "
|
|
231
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BarChartComponent, "ds-bar-chart", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "frame": { "alias": "frame"; "required": false; "isSignal": true; }; "tooltipLingerMs": { "alias": "tooltipLingerMs"; "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; }; "partOfWhole": { "alias": "partOfWhole"; "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; }; "pinOnClick": { "alias": "pinOnClick"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "dimOthers": { "alias": "dimOthers"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; }, ["tooltipTemplate"], never, true, never>;
|
|
218
232
|
}
|
|
219
233
|
|
|
220
234
|
export { BarChartComponent };
|
|
@@ -33,8 +33,13 @@ declare class ChartLegendComponent {
|
|
|
33
33
|
* so it renders as a radio group with an "All" option, and toggle renders as checkboxes. That is
|
|
34
34
|
* what gives each the keyboard and screen-reader behaviour it should have. */
|
|
35
35
|
readonly mode: _angular_core.InputSignal<"toggle" | "isolate">;
|
|
36
|
-
/** The item under the pointer or holding focus, which is what the chart dims from.
|
|
36
|
+
/** The item under the pointer or holding focus, which is what the chart dims from. A pointer
|
|
37
|
+
* names it once it has rested for `DS_CONFIG.chart.hoverDelayMs`; focus names it at once. */
|
|
37
38
|
readonly highlighted: _angular_core.ModelSignal<string | null>;
|
|
39
|
+
private readonly dwell;
|
|
40
|
+
constructor();
|
|
41
|
+
protected onItemEnter(id: string, event: PointerEvent): void;
|
|
42
|
+
protected onItemLeave(): void;
|
|
38
43
|
protected isHidden(id: string): boolean;
|
|
39
44
|
protected toggle(id: string): void;
|
|
40
45
|
/** Radio groups are scoped by NAME across the whole document, so a shared name would make every
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { TemplateRef, Signal } from '@angular/core';
|
|
3
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
4
|
|
|
4
5
|
/** Which mark a chart's tooltip answers for. `'item'` is the mark under the pointer;
|
|
5
6
|
* `'axis'` is every series at the category under the pointer, which is what a line
|
|
@@ -98,13 +99,43 @@ interface ChartActiveMark {
|
|
|
98
99
|
* Pointer and keyboard write the same pair, so a chart wires `pointerenter` and `focus` to
|
|
99
100
|
* `enter` and gets one code path rather than two.
|
|
100
101
|
*
|
|
102
|
+
* A POINTER WAITS. It is answered once it has rested on a mark for `hoverDelayMs`, and at once
|
|
103
|
+
* while the chart has already answered it; focus, a tap and a pin are answered at once.
|
|
104
|
+
*
|
|
101
105
|
* A TAP LATCHES. A touch fires `pointerleave` the moment the finger lifts, so without this the
|
|
102
106
|
* panel would flash and vanish; latched, it stays until the next tap lands outside the mark. Call
|
|
103
107
|
* from an injection context — the release listener is torn down with the component.
|
|
104
108
|
*
|
|
105
109
|
* @internal
|
|
106
110
|
*/
|
|
107
|
-
declare function chartActiveMark(lingerMs?: () => number): ChartActiveMark;
|
|
111
|
+
declare function chartActiveMark(lingerMs?: () => number, hoverDelayMs?: () => number): ChartActiveMark;
|
|
112
|
+
|
|
113
|
+
/** Radius of the pin disc, in plot pixels. A mark that places a disc inside itself keeps this
|
|
114
|
+
* much room from its edge.
|
|
115
|
+
*
|
|
116
|
+
* @internal */
|
|
117
|
+
declare const CHART_PIN_RADIUS = 11;
|
|
118
|
+
/** How far a disc sits inside the top edge of what it holds. At one radius it sits flush against
|
|
119
|
+
* the edge and reads as part of the mark rather than as a badge on it.
|
|
120
|
+
*
|
|
121
|
+
* @internal */
|
|
122
|
+
declare const CHART_PIN_GAP = 4;
|
|
123
|
+
/**
|
|
124
|
+
* The disc an SVG chart draws on the mark or category it holds. Drawn rather than composed:
|
|
125
|
+
* `ds-icon`'s host is an HTML element, and an element the SVG specification does not know renders
|
|
126
|
+
* nothing inside a canvas. The opaque disc is what keeps the glyph legible on any series colour.
|
|
127
|
+
* Centred on the host's origin; place it with a `transform`.
|
|
128
|
+
*
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
declare class ChartPinMarkerComponent {
|
|
132
|
+
protected readonly radius = 11;
|
|
133
|
+
protected readonly glyphSize = 14;
|
|
134
|
+
protected readonly glyphOffset: number;
|
|
135
|
+
protected readonly glyph: SafeHtml;
|
|
136
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartPinMarkerComponent, never>;
|
|
137
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartPinMarkerComponent, "g[dsChartPinMarker]", never, {}, {}, never, never, true, never>;
|
|
138
|
+
}
|
|
108
139
|
|
|
109
|
-
export { ChartTooltipDirective, chartActiveMark };
|
|
140
|
+
export { CHART_PIN_GAP, CHART_PIN_RADIUS, ChartPinMarkerComponent, ChartTooltipDirective, chartActiveMark };
|
|
110
141
|
export type { ChartActiveMark, ChartItemTooltipTrigger, ChartTooltipContext, ChartTooltipEntry, ChartTooltipOrigin, ChartTooltipTrigger };
|