@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.
Files changed (126) hide show
  1. package/CHANGELOG.md +603 -6
  2. package/components.md +85 -2
  3. package/docs/agent/INDEX.md +11 -1
  4. package/docs/agent/charts/chart-colour-which-palette-a-chart-takes.md +9 -0
  5. package/docs/agent/charts/chart-frame-the-box-a-chart-draws-around-itself.md +12 -0
  6. package/docs/agent/charts/ds-bar-chart.md +15 -0
  7. package/docs/agent/charts/ds-column-chart.md +14 -0
  8. package/docs/agent/charts/ds-donut-chart.md +17 -0
  9. package/docs/agent/charts/ds-funnel-chart.md +16 -0
  10. package/docs/agent/charts/ds-line-chart.md +15 -0
  11. package/docs/agent/forms/ds-button.md +4 -2
  12. package/docs/agent/forms/ds-number-stepper.md +1 -0
  13. package/docs/agent/navigation/ds-sidenav-item.md +1 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +16 -14
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +2 -2
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +161 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -0
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +2 -2
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +58 -8
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +43 -0
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +197 -0
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -0
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +1 -0
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +1 -0
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +173 -0
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -0
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -6
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +299 -0
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -0
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +2 -2
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +69 -17
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +366 -0
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -0
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +10 -14
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +631 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -0
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +1 -0
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +1 -0
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -10
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +1 -0
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -6
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +18 -7
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +1 -0
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +4 -3
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +1 -0
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +30 -71
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +1 -0
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +1 -0
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +31 -9
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  90. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +393 -5
  91. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  92. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +17 -1
  93. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  94. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +3 -0
  95. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  96. package/fesm2022/ids-group-ltd-ids-design-system.mjs +10 -1
  97. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  98. package/migrations/0.13.0.json +530 -0
  99. package/package.json +57 -1
  100. package/styles/_chart-data-table.scss +95 -0
  101. package/styles/_chart-frame.scss +53 -0
  102. package/styles/_chart-interactive.scss +40 -0
  103. package/styles/_chart-motion.scss +45 -0
  104. package/styles/_focus.scss +1 -1
  105. package/styles/_tokens-charts.scss +149 -39
  106. package/styles/_tokens.scss +17 -4
  107. package/themes/dark/_theme.scss +37 -29
  108. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +11 -9
  109. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +104 -0
  110. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +37 -4
  111. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +34 -0
  112. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +78 -0
  113. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +105 -0
  114. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -1
  115. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +113 -0
  116. package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +52 -11
  117. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +109 -0
  118. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +5 -7
  119. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +241 -0
  120. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +5 -2
  121. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +16 -4
  122. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +13 -28
  123. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +11 -1
  124. package/types/ids-group-ltd-ids-design-system-components.d.ts +154 -4
  125. package/types/ids-group-ltd-ids-design-system-core.d.ts +12 -1
  126. package/types/ids-group-ltd-ids-design-system.d.ts +9 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ids-group-ltd/ids-design-system",
3
- "version": "0.12.3",
3
+ "version": "0.13.0",
4
4
  "description": "IDS Group Angular design system: components, tokens, themes",
5
5
  "license": "MIT",
6
6
  "homepage": "https://ids-ds.proto.ids-group.co.uk/",
@@ -65,6 +65,10 @@
65
65
  "types": "./types/ids-group-ltd-ids-design-system-components-banner.d.ts",
66
66
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs"
67
67
  },
68
+ "./components/bar-chart": {
69
+ "types": "./types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts",
70
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs"
71
+ },
68
72
  "./components/bottom-sheet": {
69
73
  "types": "./types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts",
70
74
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs"
@@ -89,6 +93,14 @@
89
93
  "types": "./types/ids-group-ltd-ids-design-system-components-card.d.ts",
90
94
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-card.mjs"
91
95
  },
96
+ "./components/chart-legend": {
97
+ "types": "./types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts",
98
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs"
99
+ },
100
+ "./components/chart-tooltip": {
101
+ "types": "./types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts",
102
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs"
103
+ },
92
104
  "./components/checkbox": {
93
105
  "types": "./types/ids-group-ltd-ids-design-system-components-checkbox.d.ts",
94
106
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs"
@@ -97,6 +109,10 @@
97
109
  "types": "./types/ids-group-ltd-ids-design-system-components-color-picker.d.ts",
98
110
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs"
99
111
  },
112
+ "./components/column-chart": {
113
+ "types": "./types/ids-group-ltd-ids-design-system-components-column-chart.d.ts",
114
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs"
115
+ },
100
116
  "./components/date-picker": {
101
117
  "types": "./types/ids-group-ltd-ids-design-system-components-date-picker.d.ts",
102
118
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs"
@@ -109,6 +125,10 @@
109
125
  "types": "./types/ids-group-ltd-ids-design-system-components-divider.d.ts",
110
126
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs"
111
127
  },
128
+ "./components/donut-chart": {
129
+ "types": "./types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts",
130
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs"
131
+ },
112
132
  "./components/drawer": {
113
133
  "types": "./types/ids-group-ltd-ids-design-system-components-drawer.d.ts",
114
134
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs"
@@ -133,6 +153,10 @@
133
153
  "types": "./types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts",
134
154
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs"
135
155
  },
156
+ "./components/funnel-chart": {
157
+ "types": "./types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts",
158
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs"
159
+ },
136
160
  "./components/icon-button": {
137
161
  "types": "./types/ids-group-ltd-ids-design-system-components-icon-button.d.ts",
138
162
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs"
@@ -145,6 +169,10 @@
145
169
  "types": "./types/ids-group-ltd-ids-design-system-components-layout.d.ts",
146
170
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs"
147
171
  },
172
+ "./components/line-chart": {
173
+ "types": "./types/ids-group-ltd-ids-design-system-components-line-chart.d.ts",
174
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs"
175
+ },
148
176
  "./components/list": {
149
177
  "types": "./types/ids-group-ltd-ids-design-system-components-list.d.ts",
150
178
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-list.mjs"
@@ -369,6 +397,10 @@
369
397
  "types": "./types/ids-group-ltd-ids-design-system-components-banner.d.ts",
370
398
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs"
371
399
  },
400
+ "./bar-chart": {
401
+ "types": "./types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts",
402
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs"
403
+ },
372
404
  "./bottom-sheet": {
373
405
  "types": "./types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts",
374
406
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs"
@@ -393,6 +425,14 @@
393
425
  "types": "./types/ids-group-ltd-ids-design-system-components-card.d.ts",
394
426
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-card.mjs"
395
427
  },
428
+ "./chart-legend": {
429
+ "types": "./types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts",
430
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs"
431
+ },
432
+ "./chart-tooltip": {
433
+ "types": "./types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts",
434
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs"
435
+ },
396
436
  "./checkbox": {
397
437
  "types": "./types/ids-group-ltd-ids-design-system-components-checkbox.d.ts",
398
438
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs"
@@ -401,6 +441,10 @@
401
441
  "types": "./types/ids-group-ltd-ids-design-system-components-color-picker.d.ts",
402
442
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs"
403
443
  },
444
+ "./column-chart": {
445
+ "types": "./types/ids-group-ltd-ids-design-system-components-column-chart.d.ts",
446
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs"
447
+ },
404
448
  "./date-picker": {
405
449
  "types": "./types/ids-group-ltd-ids-design-system-components-date-picker.d.ts",
406
450
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs"
@@ -413,6 +457,10 @@
413
457
  "types": "./types/ids-group-ltd-ids-design-system-components-divider.d.ts",
414
458
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs"
415
459
  },
460
+ "./donut-chart": {
461
+ "types": "./types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts",
462
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs"
463
+ },
416
464
  "./drawer": {
417
465
  "types": "./types/ids-group-ltd-ids-design-system-components-drawer.d.ts",
418
466
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs"
@@ -437,6 +485,10 @@
437
485
  "types": "./types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts",
438
486
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs"
439
487
  },
488
+ "./funnel-chart": {
489
+ "types": "./types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts",
490
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs"
491
+ },
440
492
  "./icon-button": {
441
493
  "types": "./types/ids-group-ltd-ids-design-system-components-icon-button.d.ts",
442
494
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs"
@@ -449,6 +501,10 @@
449
501
  "types": "./types/ids-group-ltd-ids-design-system-components-layout.d.ts",
450
502
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs"
451
503
  },
504
+ "./line-chart": {
505
+ "types": "./types/ids-group-ltd-ids-design-system-components-line-chart.d.ts",
506
+ "default": "./fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs"
507
+ },
452
508
  "./list": {
453
509
  "types": "./types/ids-group-ltd-ids-design-system-components-list.d.ts",
454
510
  "default": "./fesm2022/ids-group-ltd-ids-design-system-components-list.mjs"
@@ -0,0 +1,95 @@
1
+ @use 'visually-hidden';
2
+
3
+ // The annex table every chart offers under a disclosure. All five render the same markup, so the
4
+ // rules live here rather than five times over.
5
+ @mixin chart-data-table {
6
+ .data-table {
7
+ // Half the marker triangle's height. A border-drawn triangle has no token equivalent — these
8
+ // are the arrow's own geometry, not spacing — so the two numbers behind it live in one name.
9
+ --_chart-data-table-marker: var(--space-1);
10
+
11
+ margin-block-start: var(--space-4);
12
+ color: var(--text-secondary);
13
+ font-size: var(--font-size-s);
14
+ }
15
+
16
+ .data-table > summary {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ gap: var(--space-1);
20
+ padding-block: var(--space-1);
21
+ color: var(--text-tertiary);
22
+ font-size: var(--font-size-xs);
23
+ cursor: pointer;
24
+ list-style: none;
25
+ }
26
+
27
+ // Safari still draws the default triangle through `list-style: none`.
28
+ .data-table > summary::-webkit-details-marker {
29
+ display: none;
30
+ }
31
+
32
+ .data-table > summary::before {
33
+ content: '';
34
+ inline-size: 0;
35
+ block-size: 0;
36
+ border-block-start: var(--_chart-data-table-marker) solid transparent;
37
+ border-block-end: var(--_chart-data-table-marker) solid transparent;
38
+ border-inline-start: calc(var(--_chart-data-table-marker) * 1.25) solid
39
+ currentcolor;
40
+ transition: transform var(--duration-fast) var(--ease-standard);
41
+
42
+ @media (prefers-reduced-motion: reduce) {
43
+ transition: none;
44
+ }
45
+ }
46
+
47
+ .data-table[open] > summary::before {
48
+ transform: rotate(90deg);
49
+ }
50
+
51
+ // An outline follows the border-radius of the box it is painted on, and the focus catch-all in
52
+ // `styles/focus` rings this summary without any help; a square-cornered box would ring square.
53
+ .data-table > summary {
54
+ border-radius: var(--radius-sm);
55
+ }
56
+
57
+ // The caption repeats the figure's own caption directly beneath it. Kept for a screen reader
58
+ // reaching the table out of context, hidden for the eye — same call as ds-table.
59
+ .data-table caption {
60
+ @include visually-hidden.visually-hidden;
61
+ }
62
+
63
+ .data-table table {
64
+ inline-size: 100%;
65
+ margin-block-start: var(--space-2);
66
+ border-collapse: collapse;
67
+ font-variant-numeric: tabular-nums;
68
+ }
69
+
70
+ .data-table th,
71
+ .data-table td {
72
+ padding-block: var(--space-2);
73
+ border-block-end: var(--border-width-default) solid
74
+ var(--ds-chart-grid-line-color);
75
+ text-align: end;
76
+ }
77
+
78
+ .data-table thead th {
79
+ color: var(--text-tertiary);
80
+ font-size: var(--font-size-xs);
81
+ font-weight: 600;
82
+ }
83
+
84
+ .data-table th:first-child,
85
+ .data-table td:first-child {
86
+ text-align: start;
87
+ }
88
+
89
+ // Numeric columns end-align, so without a start gutter two adjacent figures touch as soon as the
90
+ // measure tightens. Body cells only, and never the first: the header labels set the table's
91
+ // minimum width, and a gutter on the first column indents the labels off their own heading.
92
+ .data-table td + td {
93
+ padding-inline-start: var(--space-3);
94
+ }
95
+ }
@@ -0,0 +1,53 @@
1
+ // The box a chart draws around itself. All five draw the same one, so the rules live here.
2
+ //
3
+ // On by default, which is unusual for this library: most components resist owning chrome. A chart
4
+ // is the exception because it is read as an OBJECT — a plot with axes, a legend and an annex table
5
+ // — and without an edge those parts run into whatever sits beside them on the page. A chart already
6
+ // inside a card drops the frame with two declarations rather than a mode flag:
7
+ //
8
+ // ds-bar-chart { --ds-chart-frame-border-width: 0; --ds-chart-frame-padding: 0; }
9
+ @mixin chart-frame {
10
+ :host {
11
+ display: block;
12
+ padding: var(--ds-chart-frame-padding);
13
+ background: var(--ds-chart-frame-bg-color);
14
+ border: var(--ds-chart-frame-border-width) solid
15
+ var(--ds-chart-frame-border-color);
16
+ border-radius: var(--ds-chart-frame-radius);
17
+ }
18
+ }
19
+
20
+ // The focus indicator, drawn rather than outlined: `outline` on an SVG element paints its BOUNDING
21
+ // BOX, not its silhouette, so a slice would ring as a rectangle. Two tones, because one is not
22
+ // enough — a light stroke carries against a dark mark, the dark halo around it carries against a
23
+ // light one and against the surface, and between them the ring clears 3:1 on every series colour
24
+ // the palette holds. `drop-shadow` rather than a second stroke: an SVG shape has one stroke.
25
+ @mixin drawn-focus-ring {
26
+ stroke: var(--ds-chart-focus-ring-color);
27
+ stroke-width: var(--focus-ring-width);
28
+ paint-order: stroke;
29
+ filter: drop-shadow(0 0 1px var(--ds-chart-focus-halo-color))
30
+ drop-shadow(0 0 1px var(--ds-chart-focus-halo-color));
31
+ }
32
+
33
+ // `fill` and `stroke` are NOT remapped by forced colours: the chart keeps every series colour and
34
+ // they all become the same one against the forced background, with nothing reporting a problem.
35
+ // The system keywords are what put the structure back.
36
+ @mixin forced-colors {
37
+ @media (forced-colors: active) {
38
+ .axis-line,
39
+ .grid-line {
40
+ stroke: CanvasText;
41
+ }
42
+
43
+ .axis-label,
44
+ .category-label {
45
+ fill: CanvasText;
46
+ }
47
+
48
+ :focus-visible {
49
+ stroke: Highlight;
50
+ filter: none;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,40 @@
1
+ // The ONLY place a chart derives a hover state.
2
+ //
3
+ // TODO(ds-interactive): migrate this onto `_interaction.scss` once that file exists.
4
+ //
5
+ // Only the fade half lives here. Singling a mark OUT is a direct value label, which the component
6
+ // renders as markup, because a label has to be a node a screen reader can reach — an ::after
7
+ // cannot be.
8
+
9
+ // `.is-dimmed` alone, for a mark whose highlight only ever comes from outside — a legend, or a
10
+ // consumer. A line has no mark between two readings, so it has no `:hover` half to derive.
11
+ @mixin dims($mark) {
12
+ #{$mark} {
13
+ transition: opacity var(--ds-motion-chart-state-duration)
14
+ var(--ds-motion-chart-state-easing);
15
+ }
16
+
17
+ #{$mark}.is-dimmed {
18
+ opacity: var(--ds-chart-dim-opacity);
19
+ }
20
+ }
21
+
22
+ // Include on the CONTAINER, never on the mark: `:has()` asks the container whether anything inside
23
+ // it is hovered, which is what lets a pointer highlight work with no component state.
24
+ //
25
+ // Usage: `.columns { @include chart-interactive.fades('.column'); }`
26
+ @mixin fades($mark) {
27
+ @include dims($mark);
28
+
29
+ &:has(#{$mark}.interactive:hover) #{$mark}.interactive:not(:hover),
30
+ &:has(#{$mark}.interactive:focus-visible)
31
+ #{$mark}.interactive:not(:focus-visible) {
32
+ opacity: var(--ds-chart-dim-opacity);
33
+ }
34
+ }
35
+
36
+ @mixin clickable($mark) {
37
+ #{$mark}.interactive {
38
+ cursor: pointer;
39
+ }
40
+ }
@@ -0,0 +1,45 @@
1
+ // Mark enter and exit, in one place for all five charts.
2
+ //
3
+ // The enter is DELAYED by the exit duration, and that delay is what stages the three phases:
4
+ // removals finish before additions start, so a vanishing mark and an arriving one are never on
5
+ // screen together. Angular's `animate.enter` / `animate.leave` own the classes; this file owns
6
+ // what they mean.
7
+ //
8
+ // `prefers-reduced-motion` is handled globally in `_tokens.scss` — nothing here re-handles it.
9
+
10
+ @keyframes ds-chart-mark-enter {
11
+ from {
12
+ opacity: 0;
13
+ transform: scale(0.94);
14
+ }
15
+ }
16
+
17
+ @keyframes ds-chart-mark-exit {
18
+ to {
19
+ opacity: 0;
20
+ transform: scale(0.94);
21
+ }
22
+ }
23
+
24
+ @mixin staged($mark) {
25
+ #{$mark} {
26
+ // An SVG shape's transform box is the whole viewBox, so without this a mark scales about the
27
+ // chart's origin and flies in from the corner instead of growing in place.
28
+ transform-box: fill-box;
29
+ transform-origin: center;
30
+ }
31
+
32
+ // The delay is the exit duration plus this mark's own stagger step, which the component sets
33
+ // per mark. Unset, `0ms` leaves the staging and adds nothing.
34
+ #{$mark}.mark-enter {
35
+ animation: ds-chart-mark-enter var(--ds-motion-chart-mark-enter-duration)
36
+ var(--ds-motion-chart-mark-enter-easing)
37
+ calc(var(--ds-motion-chart-mark-exit-duration) + var(--_chart-mark-stagger, 0ms))
38
+ both;
39
+ }
40
+
41
+ #{$mark}.mark-leave {
42
+ animation: ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration)
43
+ var(--ds-motion-chart-mark-exit-easing) both;
44
+ }
45
+ }
@@ -42,7 +42,7 @@
42
42
  }
43
43
 
44
44
  // A shell that rings on its control's behalf, and silences $control in the same call — a shell
45
- // that rings without silencing paints two, which `tools/check-focus-rings.mjs` checks for.
45
+ // that rings without silencing paints two rings.
46
46
  //
47
47
  // `:has(:focus-visible)`, NOT `:focus-within`: the latter matches a pointer focus too, and a
48
48
  // checkbox is not granted `:focus-visible` on click, so a clicked control kept its ring until
@@ -1,9 +1,20 @@
1
1
  /* Chart and dataviz tokens.
2
2
 
3
- Categorical: 8 hues, ordered by perceptual distance not
4
- ramp position. First six are AA against both light and
5
- dark surface-default; the last two are reserved for
6
- "rest" / "other" buckets where contrast is less critical.
3
+ Categorical: led by the coral and teal the product's own
4
+ screens are built on. NO HUE BETWEEN 35 and 130: yellow and
5
+ lime sit at high luminance by nature, so dragging one down
6
+ to clear 3:1 on white turns it to mustard — an earlier set
7
+ tried, and the donut read as mud. Every hue clears 3:1 for
8
+ WCAG 1.4.11 and sits in a narrow perceptual band (L* 56-62)
9
+ so no series shouts over another; an older set ran 45% to
10
+ 100% saturation and the first bar drowned the last.
11
+ Slot 8 is the "rest" / "other" bucket: neutral, and darker
12
+ than the band on purpose. Neutral, because every eighth HUE
13
+ that clears the floor lands within dE 4 of one of the seven
14
+ under protanopia or deuteranopia. Darker, because a mid
15
+ grey is not safe either — colour-vision deficiency drains
16
+ the emerald toward grey, and only the lightness gap keeps
17
+ the two apart.
7
18
 
8
19
  Sequential: single-hue ramp (blue) for ordinal data —
9
20
  "low → high" magnitudes.
@@ -14,55 +25,154 @@
14
25
 
15
26
  :root {
16
27
  /* CATEGORICAL (8) ----------------------------------------- */
17
- --chart-cat-1: hsl(229deg 100% 59%); /* blue (primary) */
18
- --chart-cat-2: hsl(165deg 72% 38%); /* teal */
19
- --chart-cat-3: hsl( 24deg 95% 55%); /* orange */
20
- --chart-cat-4: hsl(330deg 82% 55%); /* magenta */
21
- --chart-cat-5: hsl(45deg 95% 50%); /* amber */
22
- --chart-cat-6: hsl(190deg 85% 45%); /* cyan */
23
- --chart-cat-7: hsl(280deg 60% 60%); /* lavender */
24
- --chart-cat-8: hsl(130deg 45% 50%); /* moss */
28
+ --chart-categorical-1: hsl( 8deg 78% 58%); /* coral */
29
+ --chart-categorical-2: hsl(172deg 82% 36%); /* teal */
30
+ --chart-categorical-3: hsl(222deg 70% 62%); /* blue */
31
+ --chart-categorical-4: hsl(266deg 62% 66%); /* violet */
32
+ --chart-categorical-5: hsl(330deg 70% 62%); /* pink */
33
+ --chart-categorical-6: hsl(152deg 58% 41%); /* emerald */
34
+ --chart-categorical-7: hsl(300deg 62% 60%); /* orchid */
35
+ --chart-categorical-8: hsl(222deg 14% 29%); /* slate */
36
+
37
+ /* SINGLE SERIES — every row of ONE series, plus the accent that marks the
38
+ row the reader is meant to land on. A categorical slot is the wrong tool
39
+ here: those separate series from each other, not rows within one. */
40
+ --chart-series-default: hsl(222deg 16% 42%);
41
+ --chart-series-accent: var(--chart-categorical-2);
42
+
43
+ /* RAMP — one hue, light → deep, for the ordered stages of a single
44
+ quantity. Shares the lead hue so a funnel reads as one object rather
45
+ than as eight unrelated categories. Contrast on white is NOT held at
46
+ 3:1 across the ramp: a sequential scale that clears the floor at every
47
+ step has to compress into its dark half, and then consecutive stages
48
+ stop being separable from each other, which is the distinction the
49
+ ramp exists to carry. */
50
+ --chart-ramp-1: hsl( 8deg 78% 76%);
51
+ --chart-ramp-2: hsl( 8deg 78% 72%);
52
+ --chart-ramp-3: hsl( 8deg 78% 69%);
53
+ --chart-ramp-4: hsl( 8deg 78% 65%);
54
+ --chart-ramp-5: hsl( 8deg 78% 62%);
55
+ --chart-ramp-6: hsl( 8deg 77% 58%);
56
+ --chart-ramp-7: hsl( 8deg 75% 55%);
57
+ --chart-ramp-8: hsl( 8deg 72% 51%);
25
58
 
26
59
  /* SEQUENTIAL — single-hue, light → dark */
27
- --chart-seq-1: var(--blue-100);
28
- --chart-seq-2: var(--blue-200);
29
- --chart-seq-3: var(--blue-300);
30
- --chart-seq-4: var(--blue-500);
31
- --chart-seq-5: var(--blue-700);
32
- --chart-seq-6: var(--blue-900);
60
+ --chart-sequential-1: var(--blue-100);
61
+ --chart-sequential-2: var(--blue-200);
62
+ --chart-sequential-3: var(--blue-300);
63
+ --chart-sequential-4: var(--blue-500);
64
+ --chart-sequential-5: var(--blue-700);
65
+ --chart-sequential-6: var(--blue-900);
33
66
 
34
67
  /* DIVERGENT — red ← neutral → green
35
68
  Explicit HSL keeps the ramp
36
69
  independent of palette retunes — re-skinning brand/red/green
37
70
  should not shift the dataviz colour story. */
38
- --chart-div--3: hsl(0deg 70% 40%); /* large negative (worst) */
39
- --chart-div--2: hsl(0deg 60% 58%);
40
- --chart-div--1: hsl(0deg 50% 80%);
41
- --chart-div-0: hsl(225deg 8% 92%); /* zero */
42
- --chart-div-1: hsl(140deg 35% 80%);
43
- --chart-div-2: hsl(140deg 45% 55%);
44
- --chart-div-3: hsl(140deg 55% 35%); /* large positive (best) */
71
+ --chart-divergent--3: hsl( 8deg 48% 38%); /* large negative (worst) */
72
+ --chart-divergent--2: hsl( 8deg 42% 56%);
73
+ --chart-divergent--1: hsl( 8deg 34% 80%);
74
+ --chart-divergent-0: hsl(225deg 8% 92%); /* zero */
75
+ --chart-divergent-1: hsl(145deg 28% 80%);
76
+ --chart-divergent-2: hsl(145deg 38% 52%);
77
+ --chart-divergent-3: hsl(145deg 46% 34%); /* large positive (best) */
78
+
79
+ /* FRAME — the box a chart draws around itself. On by default: a chart is
80
+ read as an object on the page, not as a block of text, and without an
81
+ edge it bleeds into whatever sits under it. A chart already inside a
82
+ card drops it with --ds-chart-frame-border-width: 0 and
83
+ --ds-chart-frame-padding: 0. */
84
+ --chart-frame-border-color: var(--border-default);
85
+ --chart-frame-border-width: var(--border-width-default);
86
+ --chart-frame-radius: var(--radius-lg);
87
+ --chart-frame-padding: var(--space-5);
88
+ --chart-frame-bg-color: var(--surface-default);
45
89
 
46
90
  /* AXIS / GRID / LEGEND */
47
- --chart-axis-line: var(--neutral-300);
48
- --chart-axis-label: var(--text-tertiary);
49
- --chart-axis-title: var(--text-secondary);
50
- --chart-grid-line: var(--neutral-150);
51
- --chart-grid-line-strong: var(--neutral-200);
52
- --chart-tick-size: 4px;
53
- --chart-axis-fs: var(--font-size-2xs);
91
+ --chart-axis-line-color: var(--neutral-300);
92
+ --chart-axis-label-color: var(--text-tertiary);
93
+ --chart-grid-line-color: var(--neutral-150);
94
+ --chart-axis-font-size: var(--font-size-2xs);
54
95
 
55
96
  /* HIGHLIGHT / HOVER */
97
+
98
+ /* Every level of dimming costs the separation BETWEEN the dimmed series: measured 2026-09-13,
99
+ OKLab dE x100, the worst pair of three dimmed series falls from 14.8 at full opacity to 5.2 at
100
+ 60% and 2.1 at 30%. There is no level that keeps them apart, so this number buys accent
101
+ loudness, not readable context. 30% is Carbon's. */
102
+ --chart-dim-opacity: 0.3;
56
103
  --chart-hover-bg-color: hsl(225deg 39% 7% / 4%);
57
- --chart-cursor-line: var(--neutral-400);
104
+ --chart-cursor-line-color: var(--neutral-400);
105
+
106
+ /* The focus indicator is TWO tones, not one: a light stroke with a dark halo around it. A
107
+ single accent ring disappears on a mark of the same hue family, and a chart's marks are
108
+ exactly the surfaces a ring has to survive. */
109
+ --chart-focus-ring-color: white;
110
+ --chart-focus-halo-color: var(--static-ink);
111
+
58
112
  --chart-tooltip-bg-color: var(--neutral-900);
59
113
  --chart-tooltip-text-color: var(--neutral-0);
60
- --chart-tooltip-border: var(--neutral-700);
114
+ --chart-tooltip-border-color: var(--neutral-700);
61
115
 
62
116
  /* DIMENSIONS */
63
117
  --chart-bar-gap: 4px;
64
- --chart-line-w: 2px;
65
- --chart-line-w-bold: 3px;
66
- --chart-dot-r: 4px;
67
- --chart-dot-r-active: 6px;
68
- }
118
+ --chart-line-width: 2px;
119
+ --chart-line-width-bold: 3px;
120
+ --chart-dot-radius: 4px;
121
+ --chart-dot-radius-active: 6px;
122
+ }
123
+
124
+ /* Public override layer.
125
+ The block above is the palette; this block is the contract. A consumer sets
126
+ --ds-chart-*, never the palette itself, so recolouring one series costs one
127
+ declaration instead of the whole ramp. Series slots are numbered rather than
128
+ named after a hue: --ds-chart-series-3-color stays meaningful after a retune,
129
+ --ds-chart-orange-color would not.
130
+ ============================================================ */
131
+
132
+ :root {
133
+ --ds-chart-series-1-color: var(--chart-categorical-1);
134
+ --ds-chart-series-2-color: var(--chart-categorical-2);
135
+ --ds-chart-series-3-color: var(--chart-categorical-3);
136
+ --ds-chart-series-4-color: var(--chart-categorical-4);
137
+ --ds-chart-series-5-color: var(--chart-categorical-5);
138
+ --ds-chart-series-6-color: var(--chart-categorical-6);
139
+ --ds-chart-series-7-color: var(--chart-categorical-7);
140
+ --ds-chart-series-8-color: var(--chart-categorical-8);
141
+ --ds-chart-series-default-color: var(--chart-series-default);
142
+ --ds-chart-series-accent-color: var(--chart-series-accent);
143
+
144
+ --ds-chart-ramp-1-color: var(--chart-ramp-1);
145
+ --ds-chart-ramp-2-color: var(--chart-ramp-2);
146
+ --ds-chart-ramp-3-color: var(--chart-ramp-3);
147
+ --ds-chart-ramp-4-color: var(--chart-ramp-4);
148
+ --ds-chart-ramp-5-color: var(--chart-ramp-5);
149
+ --ds-chart-ramp-6-color: var(--chart-ramp-6);
150
+ --ds-chart-ramp-7-color: var(--chart-ramp-7);
151
+ --ds-chart-ramp-8-color: var(--chart-ramp-8);
152
+
153
+ --ds-chart-frame-border-color: var(--chart-frame-border-color);
154
+ --ds-chart-frame-border-width: var(--chart-frame-border-width);
155
+ --ds-chart-frame-radius: var(--chart-frame-radius);
156
+ --ds-chart-frame-padding: var(--chart-frame-padding);
157
+ --ds-chart-frame-bg-color: var(--chart-frame-bg-color);
158
+
159
+ --ds-chart-axis-line-color: var(--chart-axis-line-color);
160
+ --ds-chart-axis-label-color: var(--chart-axis-label-color);
161
+ --ds-chart-axis-font-size: var(--chart-axis-font-size);
162
+ --ds-chart-grid-line-color: var(--chart-grid-line-color);
163
+
164
+ --ds-chart-dim-opacity: var(--chart-dim-opacity);
165
+ --ds-chart-hover-bg-color: var(--chart-hover-bg-color);
166
+ --ds-chart-cursor-line-color: var(--chart-cursor-line-color);
167
+ --ds-chart-focus-ring-color: var(--chart-focus-ring-color);
168
+ --ds-chart-focus-halo-color: var(--chart-focus-halo-color);
169
+ --ds-chart-tooltip-bg-color: var(--chart-tooltip-bg-color);
170
+ --ds-chart-tooltip-text-color: var(--chart-tooltip-text-color);
171
+ --ds-chart-tooltip-border-color: var(--chart-tooltip-border-color);
172
+
173
+ --ds-chart-bar-gap: var(--chart-bar-gap);
174
+ --ds-chart-line-width: var(--chart-line-width);
175
+ --ds-chart-line-width-bold: var(--chart-line-width-bold);
176
+ --ds-chart-dot-radius: var(--chart-dot-radius);
177
+ --ds-chart-dot-radius-active: var(--chart-dot-radius-active);
178
+ }
@@ -154,6 +154,21 @@
154
154
  --ds-motion-check-exit-duration: var(--duration-fast);
155
155
  --ds-motion-check-exit-easing: var(--ease-accelerate);
156
156
 
157
+ /* `state` is a hover or focus answering a pointer, so it runs at the fast step — anything slower
158
+ reads as lag on a mark the cursor is already leaving. `mark` is a datum changing size, which is
159
+ a redraw the reader is meant to follow rather than catch up with. */
160
+ --ds-motion-chart-state-duration: var(--duration-fast);
161
+ --ds-motion-chart-state-easing: var(--ease-standard);
162
+ --ds-motion-chart-mark-duration: var(--duration-base);
163
+ --ds-motion-chart-mark-easing: var(--ease-decelerate);
164
+
165
+ /* 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
+ --ds-motion-chart-mark-enter-duration: var(--duration-base);
168
+ --ds-motion-chart-mark-enter-easing: var(--ease-decelerate);
169
+ --ds-motion-chart-mark-exit-duration: var(--duration-fast);
170
+ --ds-motion-chart-mark-exit-easing: var(--ease-accelerate);
171
+
157
172
  --opacity-disabled: 0.5;
158
173
  --opacity-text-disabled: 0.38; /* WCAG-derived */
159
174
  --opacity-scrim: 0.55;
@@ -245,10 +260,8 @@
245
260
  the crisp ring. Components default their own --ds-*-focus-shadow to these,
246
261
  so a consumer can retune a whole family or a single component. */
247
262
 
248
- /* The flat tokens, NOT the --accent-focus-* aliases — see docs/todo.md, "zone colour and
249
- data-focus shape cannot both reach one role". A `var()` inside a custom property is
250
- substituted where it is DECLARED, so a ds-color zone can never reach what is written here;
251
- the switch wins because it is the documented one. */
263
+ /* The flat tokens, NOT the --accent-focus-* aliases. A `var()` inside a custom property is
264
+ substituted where it is DECLARED, so a ds-color zone can never reach what is written here. */
252
265
  --ds-field-focus-shadow: var(--focus-field);
253
266
  --ds-field-focus-shadow-error: var(--focus-field-error);
254
267
  --ds-control-focus-shadow: var(--focus-ring);