@ids-group-ltd/ids-design-system 0.12.2 → 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 (139) hide show
  1. package/CHANGELOG.md +751 -6
  2. package/components.md +87 -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 +6 -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 +20 -21
  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 +107 -40
  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 +10 -4
  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 +3 -2
  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 +2 -2
  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 +12 -16
  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-list.mjs +2 -2
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +3 -2
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +2 -2
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +3 -2
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +2 -2
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +14 -22
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +1 -0
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -6
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +2 -2
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +18 -7
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +1 -0
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +4 -3
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +10 -4
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +30 -71
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +3 -2
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +3 -2
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +31 -9
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +2 -2
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
  96. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +409 -5
  97. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  98. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +17 -1
  99. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  100. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +3 -0
  101. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
  102. package/fesm2022/ids-group-ltd-ids-design-system.mjs +10 -1
  103. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  104. package/migrations/0.12.3.json +83 -0
  105. package/migrations/0.13.0.json +530 -0
  106. package/package.json +57 -1
  107. package/styles/_chart-data-table.scss +95 -0
  108. package/styles/_chart-frame.scss +53 -0
  109. package/styles/_chart-interactive.scss +40 -0
  110. package/styles/_chart-motion.scss +45 -0
  111. package/styles/_control-line.scss +45 -0
  112. package/styles/_field-state.scss +14 -15
  113. package/styles/_focus.scss +31 -60
  114. package/styles/_tokens-charts.scss +149 -39
  115. package/styles/_tokens.scss +35 -31
  116. package/themes/dark/_theme.scss +37 -29
  117. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +11 -9
  118. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +104 -0
  119. package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +8 -17
  120. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +60 -30
  121. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +34 -0
  122. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +78 -0
  123. package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +6 -1
  124. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +105 -0
  125. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -1
  126. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +113 -0
  127. package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +52 -11
  128. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +109 -0
  129. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +5 -7
  130. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +241 -0
  131. package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +10 -10
  132. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +5 -2
  133. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +16 -4
  134. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +6 -1
  135. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +13 -28
  136. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +11 -1
  137. package/types/ids-group-ltd-ids-design-system-components.d.ts +163 -3
  138. package/types/ids-group-ltd-ids-design-system-core.d.ts +12 -1
  139. 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.2",
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
+ }
@@ -0,0 +1,45 @@
1
+ @use 'focus' as focus;
2
+ @use 'control-label' as control-label;
3
+
4
+ // The ring goes on the ROW and $control's own is suppressed: a checked box already draws a brand
5
+ // box, so a ring around the glyph lands concentric with it and reads as a target rather than as two
6
+ // states. ds-table adds its own ring because it has no row to speak for it.
7
+ @mixin line($control, $label-font, $label-color) {
8
+ @include focus.ring-for($control);
9
+
10
+ // The row paints nothing, so this shapes the ring and nothing else.
11
+ border-radius: var(--focus-ring-radius);
12
+
13
+ // No label: the row IS the glyph, so the concentric read comes back and the ring stands off.
14
+ &:has(.control-text:empty) {
15
+ --focus-ring-offset: var(--space-1-5);
16
+ }
17
+
18
+ display: inline-flex;
19
+ align-items: center;
20
+
21
+ .control-text {
22
+ @include control-label.hit-area;
23
+
24
+ font: $label-font;
25
+ color: $label-color;
26
+ cursor: pointer;
27
+ user-select: none;
28
+
29
+ /* Collapse, or the empty caption still takes the row gap and offsets the control. */
30
+ &:empty {
31
+ display: none;
32
+ }
33
+
34
+ .req {
35
+ color: var(--error);
36
+ font-weight: var(--font-weight-semibold);
37
+ margin-inline-start: var(--space-1);
38
+ }
39
+ }
40
+
41
+ &.is-disabled .control-text {
42
+ color: var(--text-disabled);
43
+ cursor: not-allowed;
44
+ }
45
+ }
@@ -1,11 +1,10 @@
1
- // Keyed off `data-field-state` on the host, which each field binds from
2
- // `resolveFieldMessage`'s `controlState`. Only error carries a fill: a warning or
3
- // success tint measures 1.05:1 against a white field, too faint to do the
4
- // findability job a fill exists for, so neither carries one.
1
+ // Keyed off `data-field-state` on the host. Only error carries a fill: a warning or success tint
2
+ // measures 1.05:1 against a white field, too faint to be findable.
5
3
  //
6
- // The colour arguments exist so a component can pass its own `--ds-<name>-*-error`
7
- // resolver: hardcoding the family token here would silently drop overrides
8
- // published since 0.7.x.
4
+ // Disabled takes no state paint — it is neither submitted nor validated, so an error border
5
+ // promises a correction that cannot be made. Read-only keeps it, because it IS submitted.
6
+ //
7
+ // The colour arguments let a component pass its own `--ds-<name>-*-error` resolver.
9
8
  @mixin field-state(
10
9
  $box,
11
10
  $error-border: var(--error),
@@ -14,9 +13,10 @@
14
13
  $warning-border: var(--warning-text),
15
14
  $success-border: var(--success)
16
15
  ) {
17
- // `:not(.in-group)` on all three: a segment ties `.in-group` at (0,3,0) and this
18
- // mixin is included last, so without it the fill repaints one segment mid-row.
19
- :host([data-field-state='error']:not(.in-group)) #{$box} {
16
+ // `:not(.in-group)`: a segment ties `.in-group` at (0,3,0) and this mixin is included last, so
17
+ // without it the fill repaints one segment mid-row. `:not(.disabled)`: state is (0,3,0) against
18
+ // (0,2,0), so it out-ranks every disabled rule unless it stops matching.
19
+ :host([data-field-state='error']:not(.in-group)) #{$box}:not(.disabled):not(:disabled) {
20
20
  border-color: #{$error-border};
21
21
  background-color: #{$error-bg};
22
22
 
@@ -26,14 +26,13 @@
26
26
  }
27
27
  }
28
28
 
29
- // --warning is yellow-400, 1.47:1 against a white field — invisible as a
30
- // boundary, where WCAG 1.4.11 asks 3:1. --warning-text (yellow-700) is the
31
- // first rung of the ramp that clears it, at 4.59:1.
32
- :host([data-field-state='warning']:not(.in-group)) #{$box} {
29
+ // --warning is 1.47:1 against a white field, where WCAG 1.4.11 asks 3:1 for a boundary.
30
+ // --warning-text is the first rung of the ramp that clears it, at 4.59:1.
31
+ :host([data-field-state='warning']:not(.in-group)) #{$box}:not(.disabled):not(:disabled) {
33
32
  border-color: #{$warning-border};
34
33
  }
35
34
 
36
- :host([data-field-state='success']:not(.in-group)) #{$box} {
35
+ :host([data-field-state='success']:not(.in-group)) #{$box}:not(.disabled):not(:disabled) {
37
36
  border-color: #{$success-border};
38
37
  }
39
38
  }
@@ -1,38 +1,28 @@
1
1
  // Focus-indicator style, switched in ONE place: `<html data-focus="…">`.
2
2
  //
3
- // Two families, two mechanisms, because one property cannot give both:
4
- // controls — an `outline`, drawn by the `ring` mixin off `--focus-ring-width`
5
- // / `--focus-ring-color` / `--focus-ring-offset`;
6
- // fields — a soft halo, resolved through the `--ds-field-focus-shadow` role.
7
- //
8
- // An outline is what the control family needs: `outline-offset` leaves its gap
9
- // UNPAINTED, so the ring floats over whatever the control actually sits on, while a
10
- // shadow gap has to be filled with a guessed colour that is a coloured rim everywhere
11
- // the guess is wrong. A negative offset draws the ring inside the element, where an
12
- // `overflow` ancestor cannot clip it.
3
+ // Two families, two mechanisms: controls take an `outline`, fields a soft halo through
4
+ // `--ds-field-focus-shadow`. An outline is right for a control because `outline-offset` leaves its
5
+ // gap UNPAINTED, so the ring floats over whatever the control sits on, and a negative offset draws
6
+ // it inside the element where an `overflow` ancestor cannot clip it.
13
7
 
14
8
  // The control indicator.
15
9
  //
16
- // Does NOT touch box-shadow, so a focused card keeps its elevation. Where a state paints its
17
- // own shadow on the same element, that one still has to yield — `state-shadow` below, and its
18
- // conditions.
10
+ // Does NOT touch box-shadow, so a focused card keeps its elevation; a state that paints its own
11
+ // shadow there has to yield instead — see `state-shadow`.
12
+ //
13
+ // A ring HOST must have a radius: there is no `outline-radius`, an outline follows the
14
+ // border-radius of the box it is painted on, so a square-cornered shell rings square. A shell that
15
+ // exists only to carry the ring takes `--focus-ring-radius`.
19
16
  //
20
- // Usage — @include inside the element's own `&:focus-visible` block:
21
- // @use '../../styles/focus' as focus;
22
- // &:focus-visible { @include focus.ring; }
23
- // &:focus-visible { @include focus.ring(calc(-1 * var(--focus-ring-offset))); } // clipped
17
+ // Usage, inside the element's own `&:focus-visible` block: `@include focus.ring;`, or
18
+ // `@include focus.ring(calc(-1 * var(--focus-ring-offset)))` where an ancestor clips.
24
19
  @mixin ring($offset: var(--focus-ring-offset)) {
25
20
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
26
21
  outline-offset: $offset;
27
22
 
28
- // An ANIMATION, not a transition, and the distinction is load-bearing. `transition` is one
29
- // property: 46 component stylesheets declare their own list, and whichever rule wins REPLACES
30
- // the other's entirely — a transition here would silently drop the component's background and
31
- // border easing for as long as the element held focus. `animation` is a separate property that
32
- // nothing else on a focusable element sets, so both survive.
33
- //
34
- // Colour only: animating `outline-offset` makes the ring lag the caret on a fast Tab, and the
35
- // indicator is a keyboard user's only signal of where they are.
23
+ // An ANIMATION, not a transition: `transition` is one property, so a declaration here would
24
+ // REPLACE the component's own list while the element held focus. Colour only — animating the
25
+ // offset makes the ring lag the caret on a fast Tab.
36
26
  animation: ds-focus-ring-in var(--duration-fast) var(--ease-standard);
37
27
  }
38
28
 
@@ -51,20 +41,13 @@
51
41
  }
52
42
  }
53
43
 
54
- // A shell that rings on its control's behalf: the whole contract in one call.
55
- //
56
- // The SELECTOR is the reason this exists. `:focus-within` is the obvious spelling and it is wrong
57
- // here — it matches a POINTER focus too, and a checkbox or radio is not granted `:focus-visible`
58
- // on click, so a clicked control kept its ring until focus moved away. `:has(:focus-visible)` asks
59
- // the question that was meant: is something inside focused THE WAY A KEYBOARD FOCUSES IT. Written
60
- // per component, that choice was got wrong once and would be got wrong again.
61
- //
62
- // It also silences $control, because a shell that rings without silencing paints two rings — the
63
- // other half of the same contract, and the reason `tools/check-focus-rings.mjs` exists. One call
64
- // cannot forget the half the other is checking for.
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 rings.
65
46
  //
66
- // NOT for a field shell: those ring with the `--ds-field-focus-shadow` halo, and `:focus-within`
67
- // is correct there because clicking into a text input DOES grant it `:focus-visible`.
47
+ // `:has(:focus-visible)`, NOT `:focus-within`: the latter matches a pointer focus too, and a
48
+ // checkbox is not granted `:focus-visible` on click, so a clicked control kept its ring until
49
+ // focus moved away. NOT for a field shell — there `:focus-within` is correct, because clicking
50
+ // into a text input does grant `:focus-visible`.
68
51
  //
69
52
  // Usage: `.control-line { @include focus.ring-for('.check'); }`
70
53
  @mixin ring-for($control, $offset: var(--focus-ring-offset)) {
@@ -75,46 +58,34 @@
75
58
  @include owns-the-focus-ring($control);
76
59
  }
77
60
 
78
- // `$control` names ONE control and must never be a blanket: a box-wide reset also
79
- // silences the tab stops living in the box — a clear button, a stepper arrow — and
80
- // then tabbing from the field to that button changes nothing on screen.
61
+ // `$control` names ONE control, never a blanket: a box-wide reset also silences the tab stops
62
+ // inside the box — a clear button, a stepper arrow.
81
63
  @mixin owns-the-focus-ring($control) {
82
64
  #{$control}:where(:focus-visible) {
83
65
  @include own-indicator;
84
66
  }
85
67
  }
86
68
 
87
- // Turns the base indicator off, for a control whose SHELL rings on its behalf.
88
- //
89
- // The media query is the whole point and a bare `outline: none` is the bug it replaces.
90
- // Forced colours drops `box-shadow` entirely, so a field whose shell rings with the halo
91
- // has nothing left once the control is silenced — the one mode where an indicator is
92
- // mandatory is the one where it disappeared. Skipping the suppression there costs a
93
- // second ring in a palette the author does not control anyway, which is the cheaper wrong.
69
+ // Turns the base indicator off, for a control whose SHELL rings on its behalf. The media query is
70
+ // the whole point: forced colours drops `box-shadow`, so a silenced control under a halo-ringing
71
+ // shell would have no indicator at all in the one mode where it is mandatory.
94
72
  @mixin own-indicator {
95
73
  @media not (forced-colors: active) {
96
74
  outline: none;
97
75
  }
98
76
  }
99
77
 
100
- // For a persistent state — selected, active, current — that paints its own box-shadow on
101
- // the element that also carries the focus ring. One property cannot hold both, so the
102
- // later rule wins and one signal vanishes silently; this hands the ring the tie by
103
- // intent rather than by line order.
104
- //
105
- // Only for a state whose OTHER properties keep it identifiable while focused (a fill, a
106
- // label colour). A state carried by the shadow ALONE must not use it — the state would
107
- // go unreadable exactly while the user stands on it.
108
- //
109
- // Usage: `&.active { @include focus.state-shadow(inset 3px 0 0 var(--_rail)); }`
78
+ // For a persistent state that paints its own box-shadow on the element carrying the ring: one
79
+ // property cannot hold both, so this hands the ring the tie by intent rather than by line order.
80
+ // Only where the state has ANOTHER channel — a state carried by the shadow alone would go
81
+ // unreadable exactly while the user stands on it.
110
82
  @mixin state-shadow($shadow) {
111
83
  &:not(:focus-visible) {
112
84
  box-shadow: $shadow;
113
85
  }
114
86
  }
115
87
 
116
- // Fields ring like controls: the halo role is retargeted at the ring token so both
117
- // families read the same colour and thickness.
88
+ // Fields ring like controls: the halo role is retargeted at the ring token.
118
89
  :root[data-focus='ring'] {
119
90
  --ds-field-focus-shadow: var(--focus-ring);
120
91
  --ds-field-focus-shadow-error: var(--focus-ring-error);