ngwr 16.4.0 → 16.5.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 (258) hide show
  1. package/charts/bar-chart/styles/_index.scss +494 -305
  2. package/charts/boxplot-chart/styles/_index.scss +114 -48
  3. package/charts/bullet-chart/styles/_index.scss +113 -42
  4. package/charts/calendar-heatmap/styles/_index.scss +111 -20
  5. package/charts/candlestick-chart/styles/_index.scss +61 -26
  6. package/charts/chart-legend/styles/_index.scss +119 -1
  7. package/charts/core/styles/_index.scss +201 -5
  8. package/charts/donut-chart/styles/_index.scss +76 -21
  9. package/charts/funnel-chart/styles/_index.scss +66 -38
  10. package/charts/gauge/styles/_index.scss +12 -1
  11. package/charts/heatmap-chart/styles/_index.scss +90 -53
  12. package/charts/line-chart/styles/_index.scss +143 -139
  13. package/charts/meter-group/styles/_index.scss +87 -25
  14. package/charts/radar-chart/styles/_index.scss +82 -40
  15. package/charts/scatter-chart/styles/_index.scss +117 -44
  16. package/charts/sparkline/styles/_index.scss +7 -1
  17. package/charts/treemap-chart/styles/_index.scss +94 -42
  18. package/charts/waterfall-chart/styles/_index.scss +150 -87
  19. package/color-picker/styles/_index.scss +7 -3
  20. package/copy-value/styles/_index.scss +21 -2
  21. package/date-stamp/styles/_index.scss +2 -1
  22. package/dialog/styles/_index.scss +6 -0
  23. package/drawer/styles/_index.scss +5 -1
  24. package/fesm2022/ngwr-carousel-testing.mjs +4 -1
  25. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  26. package/fesm2022/ngwr-carousel.mjs +21 -2
  27. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  28. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  29. package/fesm2022/ngwr-cascader.mjs +48 -4
  30. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  31. package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
  32. package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
  33. package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
  34. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  35. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
  36. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
  37. package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
  38. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  39. package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
  40. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  41. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
  42. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  43. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
  44. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
  45. package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
  46. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  47. package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
  48. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  49. package/fesm2022/ngwr-charts-core.mjs +299 -18
  50. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  51. package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
  52. package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
  53. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  54. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
  55. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
  56. package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
  57. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  58. package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
  59. package/fesm2022/ngwr-charts-gauge.mjs +98 -12
  60. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  61. package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
  62. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  63. package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
  64. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  65. package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
  66. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  67. package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
  68. package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
  69. package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
  70. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  71. package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
  72. package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
  73. package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
  74. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  75. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
  76. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
  77. package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
  78. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  79. package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
  80. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  81. package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
  82. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  83. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
  84. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
  85. package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
  86. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  87. package/fesm2022/ngwr-color-picker.mjs +44 -4
  88. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  89. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  90. package/fesm2022/ngwr-context-menu.mjs +47 -19
  91. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  92. package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
  93. package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
  94. package/fesm2022/ngwr-copy-value.mjs +38 -2
  95. package/fesm2022/ngwr-copy-value.mjs.map +1 -1
  96. package/fesm2022/ngwr-date-picker.mjs +56 -8
  97. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  98. package/fesm2022/ngwr-dialog.mjs +13 -5
  99. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  100. package/fesm2022/ngwr-drawer.mjs +19 -3
  101. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  102. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  103. package/fesm2022/ngwr-dropdown.mjs +35 -6
  104. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  105. package/fesm2022/ngwr-editor.mjs +1 -0
  106. package/fesm2022/ngwr-editor.mjs.map +1 -1
  107. package/fesm2022/ngwr-graph.mjs +81 -13
  108. package/fesm2022/ngwr-graph.mjs.map +1 -1
  109. package/fesm2022/ngwr-i18n-ar.mjs +5 -0
  110. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  111. package/fesm2022/ngwr-i18n-cs.mjs +5 -0
  112. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  113. package/fesm2022/ngwr-i18n-de.mjs +5 -0
  114. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  115. package/fesm2022/ngwr-i18n-en.mjs +5 -0
  116. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  117. package/fesm2022/ngwr-i18n-es.mjs +5 -0
  118. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  119. package/fesm2022/ngwr-i18n-fr.mjs +5 -0
  120. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  121. package/fesm2022/ngwr-i18n-he.mjs +5 -0
  122. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  123. package/fesm2022/ngwr-i18n-hi.mjs +5 -0
  124. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  125. package/fesm2022/ngwr-i18n-id.mjs +5 -0
  126. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  127. package/fesm2022/ngwr-i18n-it.mjs +5 -0
  128. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  129. package/fesm2022/ngwr-i18n-ja.mjs +5 -0
  130. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  131. package/fesm2022/ngwr-i18n-ko.mjs +5 -0
  132. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  133. package/fesm2022/ngwr-i18n-nl.mjs +5 -0
  134. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  135. package/fesm2022/ngwr-i18n-pl.mjs +5 -0
  136. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  137. package/fesm2022/ngwr-i18n-pt.mjs +5 -0
  138. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  139. package/fesm2022/ngwr-i18n-ru.mjs +5 -0
  140. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  141. package/fesm2022/ngwr-i18n-sv.mjs +5 -0
  142. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  143. package/fesm2022/ngwr-i18n-tr.mjs +5 -0
  144. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  145. package/fesm2022/ngwr-i18n-uk.mjs +5 -0
  146. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  147. package/fesm2022/ngwr-i18n-vi.mjs +5 -0
  148. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  149. package/fesm2022/ngwr-i18n-zh-tw.mjs +5 -0
  150. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  151. package/fesm2022/ngwr-i18n-zh.mjs +5 -0
  152. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  153. package/fesm2022/ngwr-lightbox.mjs +20 -3
  154. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  155. package/fesm2022/ngwr-overlay.mjs +21 -2
  156. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  157. package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
  158. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  159. package/fesm2022/ngwr-popconfirm.mjs +41 -5
  160. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  161. package/fesm2022/ngwr-popover.mjs +67 -12
  162. package/fesm2022/ngwr-popover.mjs.map +1 -1
  163. package/fesm2022/ngwr-schema-form.mjs +2 -0
  164. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  165. package/fesm2022/ngwr-table.mjs +2 -0
  166. package/fesm2022/ngwr-table.mjs.map +1 -1
  167. package/fesm2022/ngwr-tour.mjs +14 -9
  168. package/fesm2022/ngwr-tour.mjs.map +1 -1
  169. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  170. package/fesm2022/ngwr-tree.mjs +49 -16
  171. package/fesm2022/ngwr-tree.mjs.map +1 -1
  172. package/fesm2022/ngwr-version.mjs +1 -1
  173. package/fesm2022/ngwr-version.mjs.map +1 -1
  174. package/fesm2022/ngwr-window.mjs +16 -9
  175. package/fesm2022/ngwr-window.mjs.map +1 -1
  176. package/i18n/ar.json +5 -0
  177. package/i18n/cs.json +5 -0
  178. package/i18n/de.json +5 -0
  179. package/i18n/en.json +5 -0
  180. package/i18n/es.json +5 -0
  181. package/i18n/fr.json +5 -0
  182. package/i18n/he.json +5 -0
  183. package/i18n/hi.json +5 -0
  184. package/i18n/id.json +5 -0
  185. package/i18n/it.json +5 -0
  186. package/i18n/ja.json +5 -0
  187. package/i18n/ko.json +5 -0
  188. package/i18n/nl.json +5 -0
  189. package/i18n/pl.json +5 -0
  190. package/i18n/pt.json +5 -0
  191. package/i18n/ru.json +5 -0
  192. package/i18n/sv.json +5 -0
  193. package/i18n/tr.json +5 -0
  194. package/i18n/uk.json +5 -0
  195. package/i18n/vi.json +5 -0
  196. package/i18n/zh-TW.json +5 -0
  197. package/i18n/zh.json +5 -0
  198. package/llms-full.txt +8 -8
  199. package/llms.txt +7 -3
  200. package/package.json +1 -1
  201. package/popconfirm/styles/_index.scss +6 -0
  202. package/popover/styles/_index.scss +24 -13
  203. package/schematics/use/symbol-map.json +1 -0
  204. package/skills/ngwr/references/catalog.md +1 -1
  205. package/tour/styles/_index.scss +6 -0
  206. package/types/ngwr-carousel-testing.d.ts +6 -4
  207. package/types/ngwr-carousel.d.ts +14 -3
  208. package/types/ngwr-cascader-testing.d.ts +4 -3
  209. package/types/ngwr-cascader.d.ts +27 -3
  210. package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
  211. package/types/ngwr-charts-bar-chart.d.ts +220 -48
  212. package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
  213. package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
  214. package/types/ngwr-charts-bullet-chart.d.ts +72 -12
  215. package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
  216. package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
  217. package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
  218. package/types/ngwr-charts-chart-legend.d.ts +142 -5
  219. package/types/ngwr-charts-core.d.ts +259 -21
  220. package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
  221. package/types/ngwr-charts-donut-chart.d.ts +124 -16
  222. package/types/ngwr-charts-funnel-chart.d.ts +62 -6
  223. package/types/ngwr-charts-gauge-testing.d.ts +5 -1
  224. package/types/ngwr-charts-gauge.d.ts +72 -10
  225. package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
  226. package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
  227. package/types/ngwr-charts-line-chart.d.ts +215 -86
  228. package/types/ngwr-charts-meter-group.d.ts +96 -7
  229. package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
  230. package/types/ngwr-charts-radar-chart.d.ts +148 -28
  231. package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
  232. package/types/ngwr-charts-scatter-chart.d.ts +188 -18
  233. package/types/ngwr-charts-sparkline.d.ts +26 -4
  234. package/types/ngwr-charts-treemap-chart.d.ts +121 -23
  235. package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
  236. package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
  237. package/types/ngwr-color-picker.d.ts +27 -0
  238. package/types/ngwr-context-menu-testing.d.ts +10 -9
  239. package/types/ngwr-context-menu.d.ts +17 -0
  240. package/types/ngwr-copy-value.d.ts +8 -0
  241. package/types/ngwr-date-picker.d.ts +34 -2
  242. package/types/ngwr-dialog.d.ts +30 -10
  243. package/types/ngwr-drawer.d.ts +32 -1
  244. package/types/ngwr-dropdown-testing.d.ts +8 -5
  245. package/types/ngwr-dropdown.d.ts +29 -6
  246. package/types/ngwr-graph.d.ts +22 -6
  247. package/types/ngwr-lightbox.d.ts +15 -0
  248. package/types/ngwr-overlay.d.ts +16 -1
  249. package/types/ngwr-popconfirm-testing.d.ts +11 -2
  250. package/types/ngwr-popconfirm.d.ts +28 -1
  251. package/types/ngwr-popover.d.ts +59 -9
  252. package/types/ngwr-table.d.ts +1 -1
  253. package/types/ngwr-tour.d.ts +21 -2
  254. package/types/ngwr-tree-testing.d.ts +1 -2
  255. package/types/ngwr-tree.d.ts +33 -2
  256. package/types/ngwr-version.d.ts +1 -1
  257. package/types/ngwr-window.d.ts +14 -11
  258. package/window/styles/_index.scss +5 -10
@@ -1,10 +1,10 @@
1
1
  @use '../../../theme/styles' as theme;
2
2
  @use '../../../popover/styles' as popover-styles; // the `.wr-tooltip` chip the hover tooltip renders into
3
3
 
4
- // Styles for the entry points this component's own markup renders. With `dataTable`,
5
- // the figures render as a `<wr-chart-table>` beside the plot, which its own sheet clips
6
- // out of sight.
7
- @use '../../core/styles' as core-styles; // WrChartTable
4
+ // The chart theme every hook below defaults to (`--wr-chart-*`), the empty / loading /
5
+ // error message, and the `<wr-chart-table>` that `dataTable` renders beside the plot,
6
+ // which its own rule clips out of sight.
7
+ @use '../../core/styles' as core-styles; // WrChartTable, WrChartState
8
8
  @include theme.loaded('charts/boxplot-chart');
9
9
 
10
10
  .wr-boxplot-chart {
@@ -15,45 +15,49 @@
15
15
  // top or the bottom by half its dot.
16
16
  --wr-boxplot-chart-plot-inset-x: var(--wr-space-sm);
17
17
  --wr-boxplot-chart-plot-inset-y: var(--wr-space-sm);
18
- --wr-boxplot-chart-grid-color: color-mix(in srgb, var(--wr-border-base) 70%, transparent);
19
- --wr-boxplot-chart-tick-gap: var(--wr-space-xs);
20
- --wr-boxplot-chart-tick-font-size: var(--wr-text-xs);
18
+ // The gridlines and the one at zero: the chart theme's, as on every chart.
19
+ --wr-boxplot-chart-grid-color: var(--wr-chart-grid);
20
+ --wr-boxplot-chart-zero-color: var(--wr-chart-zero);
21
+ --wr-boxplot-chart-tick-gap: var(--wr-space-sm);
22
+ --wr-boxplot-chart-tick-font-size: var(--wr-chart-label-size);
21
23
  --wr-boxplot-chart-tick-line-height: var(--wr-text-xs-leading);
22
- --wr-boxplot-chart-tick-color: var(--wr-color-on-surface-muted);
23
- // The group names under the drawing: what each box IS, so in the text colour rather
24
- // than the ticks' muted one, as the radar's axis names are.
25
- --wr-boxplot-chart-label-font-size: var(--wr-text-xs);
24
+ --wr-boxplot-chart-tick-color: var(--wr-chart-label);
25
+ // The group names under the drawing, in the chart theme's label colour, as the names
26
+ // under a bar chart's bars are.
27
+ --wr-boxplot-chart-label-font-size: var(--wr-chart-label-size);
26
28
  --wr-boxplot-chart-label-line-height: var(--wr-text-xs-leading);
27
- --wr-boxplot-chart-label-color: var(--wr-color-on-surface);
29
+ --wr-boxplot-chart-label-color: var(--wr-chart-label);
28
30
  --wr-boxplot-chart-label-gap: var(--wr-space-xs);
29
- --wr-boxplot-chart-title-font-size: var(--wr-text-xs);
30
- --wr-boxplot-chart-title-font-weight: var(--wr-font-weight-medium);
31
- --wr-boxplot-chart-title-color: var(--wr-color-on-surface-muted);
31
+ // An axis' name: the scale's size, heavier and in full ink, so it reads as the name of
32
+ // the numbers beside it.
33
+ --wr-boxplot-chart-title-font-size: var(--wr-chart-label-size);
34
+ --wr-boxplot-chart-title-font-weight: var(--wr-font-weight-semibold);
35
+ --wr-boxplot-chart-title-color: var(--wr-color-on-surface);
32
36
  --wr-boxplot-chart-title-gap: var(--wr-space-xs);
33
37
  // A box is a share of its slot, up to a width that keeps one group from becoming a
34
38
  // slab; the caps are half as wide. A percentage here is the SLOT's: it resolves where
35
39
  // the box reads it.
36
40
  --wr-boxplot-chart-box-width: min(3rem, 60%);
37
41
  --wr-boxplot-chart-cap-width: calc(var(--wr-boxplot-chart-box-width) / 2);
38
- --wr-boxplot-chart-box-radius: var(--wr-border-radius-sm);
42
+ --wr-boxplot-chart-box-radius: var(--wr-chart-bar-radius);
39
43
  // How much of the group's colour the box is filled with, at rest and while hovered.
40
44
  // See-through, so the gridlines read across it.
41
45
  --wr-boxplot-chart-box-tint: 20%;
42
46
  --wr-boxplot-chart-box-tint-active: 40%;
43
- // The box's edge, the whiskers, the caps and the outliers' rings, all in the group's
44
- // colour.
45
- --wr-boxplot-chart-line-width: 2px;
46
- // The median in the text colour and heavier than the box's edge, so it reads by tone
47
- // and by weight whatever the group's colour is.
47
+ // The box's edge, the whiskers and the caps, all in the group's colour and as wide as
48
+ // every chart's line.
49
+ --wr-boxplot-chart-line-width: var(--wr-chart-stroke);
50
+ // The median in the text colour and a pixel heavier than the box's edge, so it reads by
51
+ // tone and by weight whatever the group's colour is.
48
52
  --wr-boxplot-chart-median-color: var(--wr-color-on-surface);
49
- --wr-boxplot-chart-median-width: 3px;
50
- // An outlier is a ring, hollow so two that overlap stay two.
51
- --wr-boxplot-chart-outlier-size: 0.5rem;
52
- --wr-boxplot-chart-outlier-fill: var(--wr-color-surface);
53
- // The slot the tooltip is reading, washed top to bottom. See-through, as the box is, so
54
- // the gridlines read across it: the theme's hover fill is opaque, and the slot is drawn
55
- // over the gridlines. The waterfall's wash, under the same name.
56
- --wr-boxplot-chart-active-bg: color-mix(in srgb, var(--wr-color-on-surface) 6%, transparent);
53
+ --wr-boxplot-chart-median-width: calc(var(--wr-chart-stroke) + 1px);
54
+ // An outlier is a dot the size of every chart's marker, in the group's colour, with a
55
+ // hairline of the surface round it so two that overlap stay two.
56
+ --wr-boxplot-chart-outlier-size: var(--wr-chart-marker);
57
+ --wr-boxplot-chart-outlier-ring: var(--wr-chart-separator);
58
+ // The slot the tooltip is reading, washed top to bottom: the chart theme's band, which
59
+ // is see-through, as the box is, so the gridlines read across it.
60
+ --wr-boxplot-chart-active-bg: var(--wr-chart-band);
57
61
 
58
62
  $inset-y: var(--wr-boxplot-chart-plot-inset-y);
59
63
  $line: var(--wr-boxplot-chart-line-width);
@@ -74,33 +78,78 @@
74
78
  // are categories with no order of their own, so they read in the page's direction and
75
79
  // the first stands beside the axis either way. A chart whose x axis is ordered — a
76
80
  // sequence on the line and candlestick charts, a number on the scatter — keeps it
77
- // physical instead.
81
+ // physical instead. Three columns: the value axis' name, its ticks, the plot; a column
82
+ // with nothing in it is no width at all.
78
83
  &__body {
79
84
  display: grid;
80
- grid-template-columns: auto minmax(0, 1fr);
85
+ grid-template-columns: auto auto minmax(0, 1fr);
81
86
  }
82
87
 
83
- // The axes' names, set horizontally: the value axis' above the plot at the ticks' side,
84
- // where a reader looks first, and the groups' centred under their names.
88
+ // The top tick is centred on the top gridline, so half of it stands above the drawing:
89
+ // the plot's block padding holds it by default, and this keeps it inside the chart's
90
+ // box when the tick grows or the padding shrinks.
91
+ &--axis &__body {
92
+ padding-block-start: max(
93
+ 0px,
94
+ calc(var(--wr-boxplot-chart-tick-line-height) / 2 - var(--wr-boxplot-chart-plot-inset-y))
95
+ );
96
+ }
97
+
98
+ // Empty, loading or failed: the shared message, over the plot. A grid item in the
99
+ // plot's own cell rather than a child of the plot, which is an `img`.
100
+ &__body > .wr-chart-state {
101
+ position: relative;
102
+ inset: auto;
103
+ grid-column: 3;
104
+ grid-row: 1;
105
+ }
106
+
107
+ // The axes' names. A name is the host's own text, in whatever language, so it takes its
108
+ // direction from that text (`plaintext`).
85
109
  &__y-title,
86
110
  &__x-title {
87
111
  font-size: var(--wr-boxplot-chart-title-font-size);
88
112
  font-weight: var(--wr-boxplot-chart-title-font-weight);
89
113
  color: var(--wr-boxplot-chart-title-color);
90
- overflow-wrap: anywhere;
114
+ unicode-bidi: plaintext;
91
115
  }
92
116
 
117
+ // The value axis' name runs ALONG its axis, reading upwards, in a column of its own
118
+ // outside the scale, as the scatter chart's does. Set level above the plot it read as a
119
+ // caption or a legend entry; turned, it is the name of the axis it lies along and of
120
+ // nothing else. One line: a name longer than the plot is tall is cut with an ellipsis
121
+ // rather than growing the plot - it contributes no height to its row (`height: 0`) and
122
+ // then takes the row's (`min-height: 100%`).
93
123
  &__y-title {
94
- grid-column: 1 / -1;
124
+ grid-column: 1;
95
125
  grid-row: 1;
96
- margin-block-end: var(--wr-boxplot-chart-title-gap);
97
- text-align: start;
126
+ justify-self: center;
127
+ height: 0;
128
+ min-height: 100%;
129
+ // In a vertical line the block axis runs across the page: this is the room between
130
+ // the name and the scale, on the name's plot side.
131
+ margin-block-start: var(--wr-boxplot-chart-title-gap);
132
+ overflow: hidden;
133
+ line-height: var(--wr-boxplot-chart-tick-line-height);
134
+ text-align: center;
135
+ text-overflow: ellipsis;
136
+ white-space: nowrap;
137
+ writing-mode: vertical-rl;
138
+ text-orientation: sideways;
139
+ transform: rotate(180deg);
140
+
141
+ // The gutter is on the other side of the plot, and so is the room.
142
+ &:dir(rtl) {
143
+ margin-block-start: 0;
144
+ margin-block-end: var(--wr-boxplot-chart-title-gap);
145
+ }
98
146
  }
99
147
 
100
148
  &__x-title {
101
- grid-column: 2;
102
- grid-row: 4;
149
+ grid-column: 3;
150
+ grid-row: 3;
103
151
  margin-block-start: var(--wr-boxplot-chart-title-gap);
152
+ overflow-wrap: anywhere;
104
153
  text-align: center;
105
154
  }
106
155
 
@@ -109,8 +158,8 @@
109
158
  // moves down by its own gridline's share of the drawing, inside the plot's block
110
159
  // padding, then up by half itself: the scatter's y axis, for the same reasons.
111
160
  &__y-axis {
112
- grid-column: 1;
113
- grid-row: 2;
161
+ grid-column: 2;
162
+ grid-row: 1;
114
163
  display: grid;
115
164
  grid-template-rows: minmax(0, 1fr);
116
165
  padding-inline-end: var(--wr-boxplot-chart-tick-gap);
@@ -137,8 +186,8 @@
137
186
  }
138
187
 
139
188
  &__plot {
140
- grid-column: 2;
141
- grid-row: 2;
189
+ grid-column: 3;
190
+ grid-row: 1;
142
191
  position: relative;
143
192
  padding: $inset-y var(--wr-boxplot-chart-plot-inset-x);
144
193
  }
@@ -157,6 +206,11 @@
157
206
  transform: translateY(-50%);
158
207
  }
159
208
 
209
+ // Zero, when the axis reaches it: the stronger line of the chart theme.
210
+ &__grid-line--zero {
211
+ border-block-start-color: var(--wr-boxplot-chart-zero-color);
212
+ }
213
+
160
214
  // One slot of the drawing, top to bottom, and the group's hover target. Every mark
161
215
  // inside is centred on it, so it needs no rule of its own under RTL.
162
216
  &__group {
@@ -234,9 +288,10 @@
234
288
  top: calc(var(--wr-boxplot-chart-y, 0) * 1%);
235
289
  width: var(--wr-boxplot-chart-outlier-size);
236
290
  height: var(--wr-boxplot-chart-outlier-size);
237
- border: $line solid $color;
238
291
  border-radius: 50%;
239
- background: var(--wr-boxplot-chart-outlier-fill);
292
+ background: $color;
293
+ // A ring that takes no room, so the dot is the marker's size whatever the ring's is.
294
+ box-shadow: 0 0 0 1px var(--wr-boxplot-chart-outlier-ring);
240
295
  transform: translate(-50%, -50%);
241
296
  }
242
297
 
@@ -254,8 +309,8 @@
254
309
  // percentages are the drawing's. The names are out of flow, so the strip is given one
255
310
  // line's height.
256
311
  &__x-axis {
257
- grid-column: 2;
258
- grid-row: 3;
312
+ grid-column: 3;
313
+ grid-row: 2;
259
314
  position: relative;
260
315
  height: var(--wr-boxplot-chart-label-line-height);
261
316
  margin-block-start: var(--wr-boxplot-chart-label-gap);
@@ -289,10 +344,21 @@
289
344
  // page, which is the right drawing here: the colour of a group says nothing its name
290
345
  // does not, the outlines all stay, and the box's tint and the hover wash go. Only the
291
346
  // gridlines would come out as heavy as the boxes, so they keep the system's muted
292
- // colour.
347
+ // colour, the one at zero the text's; and an outlier is a background with no border, so
348
+ // it is painted in the text colour by hand rather than left to vanish into the page.
293
349
  @media (forced-colors: active) {
294
350
  .wr-boxplot-chart__grid-line {
295
351
  border-color: GrayText;
296
352
  forced-color-adjust: none;
297
353
  }
354
+
355
+ .wr-boxplot-chart__grid-line--zero {
356
+ border-color: CanvasText;
357
+ }
358
+
359
+ .wr-boxplot-chart__outlier {
360
+ background: CanvasText;
361
+ box-shadow: none;
362
+ forced-color-adjust: none;
363
+ }
298
364
  }
@@ -1,5 +1,9 @@
1
1
  @use '../../../theme/styles' as theme;
2
2
  @use '../../../popover/styles' as popover-styles; // the `.wr-tooltip` chip the hover tooltip renders into
3
+
4
+ // Styles for the entry points this component's own markup renders, and the chart theme
5
+ // the hooks below default to.
6
+ @use '../../core/styles' as core-styles; // WrChartState
3
7
  @include theme.loaded('charts/bullet-chart');
4
8
 
5
9
  .wr-bullet-chart {
@@ -11,26 +15,30 @@
11
15
  // The least the drawing narrows to, so a chart in a shrink-to-fit parent (a flex row of
12
16
  // tiles) still draws one rather than collapsing to its label.
13
17
  --wr-bullet-chart-track-min-width: 6rem;
14
- --wr-bullet-chart-track-radius: var(--wr-border-radius-sm);
15
- // The track is what shows past the last band, and with no `ranges` the whole frame.
16
- --wr-bullet-chart-track-color: var(--wr-color-fill);
18
+ --wr-bullet-chart-track-radius: var(--wr-chart-bar-radius);
19
+ // The track is what shows past the last band, and with no `ranges` the whole frame: the
20
+ // chart theme's track, as the unfilled part of a meter or a gauge is.
21
+ --wr-bullet-chart-track-color: var(--wr-chart-track);
17
22
  // The bands step from the first colour, nearest zero, to the second, at the last range
18
- // limit: steps in LIGHTNESS, which survive greyscale. Both are the theme's neutral fill
19
- // roles, so each scheme and `prefers-contrast: more` (which deepens the muted ink) moves
20
- // them on its own. The first is the strong fill pulled halfway to the muted ink, since
21
- // the fills alone are too close to the surface to read as bands.
22
- --wr-bullet-chart-range-start: color-mix(in srgb, var(--wr-color-on-surface-muted) 50%, var(--wr-color-fill-strong));
23
- --wr-bullet-chart-range-end: var(--wr-color-fill-strong);
23
+ // limit: steps in LIGHTNESS, which survive greyscale. Both are steps of the chart
24
+ // theme's sequential scale, tints of the first palette colour, so the bands follow the
25
+ // palette and each scheme turns them over on its own. They were greys of this chart's
26
+ // own. Against the surface the three steps measure 2.42, 1.76 and 1.31 in light and
27
+ // 2.21, 1.62 and 1.22 in dark.
28
+ --wr-bullet-chart-range-start: var(--wr-chart-seq-3);
29
+ --wr-bullet-chart-range-end: var(--wr-chart-seq-1);
30
+ // The line between two bands: the chart theme's separator, the surface.
31
+ --wr-bullet-chart-separator: var(--wr-chart-separator);
24
32
  // The rule where the last band ends, drawn only where the scale runs on past it — a
25
33
  // value or a target above the last limit, or a `max` beyond it. The faintest band and
26
34
  // the track are a step of lightness apart that no reader can see, so the end of the
27
35
  // last band is a line rather than a shade.
28
- --wr-bullet-chart-range-edge-color: var(--wr-color-on-surface-muted);
36
+ --wr-bullet-chart-range-edge-color: var(--wr-chart-label);
29
37
  // The value and the target are drawn in the text colour, as in Few's own design, and
30
- // told apart by shape. Measured in Chromium against the strongest band, the text colour
31
- // holds 6.6:1 in light and 5.0:1 in dark (6.4 and 4.7 under `prefers-contrast: more`),
32
- // where the primary blue reads 1.8:1 and 1.3:1 — under the 3:1 WCAG 1.4.11 asks of a
33
- // mark a reader needs.
38
+ // told apart by shape. Against the strongest band the text colour holds 7.3:1 in light
39
+ // and 7.1:1 in dark; the palette colour the bands are tinted from is a step of the same
40
+ // scale, and reads 2.0:1 and 1.8:1 there — under the 3:1 WCAG 1.4.11 asks of a mark a
41
+ // reader needs.
34
42
  --wr-bullet-chart-value-color: var(--wr-color-on-surface);
35
43
  --wr-bullet-chart-bar-thickness: calc(100% / 3);
36
44
  --wr-bullet-chart-target-color: var(--wr-color-on-surface);
@@ -47,17 +55,27 @@
47
55
  --wr-bullet-chart-label-max-width: 12rem;
48
56
  --wr-bullet-chart-label-width: fit-content(var(--wr-bullet-chart-label-max-width));
49
57
  --wr-bullet-chart-label-gap: var(--wr-space-md);
50
- --wr-bullet-chart-label-font-size: var(--wr-text-sm);
51
- --wr-bullet-chart-label-font-weight: var(--wr-font-weight-semibold);
58
+ // The label is the chart's one category name: the size every chart on the theme writes
59
+ // its labels in, a weight up so it still heads the row. It was a step larger and
60
+ // semibold. The sub-label and the ticks are the theme's muted label.
61
+ --wr-bullet-chart-label-font-size: var(--wr-chart-label-size);
62
+ --wr-bullet-chart-label-font-weight: var(--wr-font-weight-medium);
52
63
  --wr-bullet-chart-label-color: var(--wr-color-on-surface);
53
- --wr-bullet-chart-sub-label-font-size: var(--wr-text-xs);
64
+ --wr-bullet-chart-sub-label-font-size: var(--wr-chart-label-size);
54
65
  --wr-bullet-chart-sub-label-line-height: var(--wr-text-xs-leading);
55
- --wr-bullet-chart-sub-label-color: var(--wr-color-on-surface-muted);
66
+ --wr-bullet-chart-sub-label-color: var(--wr-chart-label);
56
67
  --wr-bullet-chart-scale-gap: var(--wr-space-xs);
57
68
  --wr-bullet-chart-tick-length: var(--wr-space-xs);
58
- --wr-bullet-chart-tick-color: var(--wr-color-on-surface-muted);
59
- --wr-bullet-chart-tick-font-size: var(--wr-text-xs);
69
+ --wr-bullet-chart-tick-color: var(--wr-chart-label);
70
+ --wr-bullet-chart-tick-mark-color: var(--wr-chart-axis);
71
+ --wr-bullet-chart-tick-font-size: var(--wr-chart-label-size);
60
72
  --wr-bullet-chart-tick-line-height: var(--wr-text-xs-leading);
73
+ // The bar growing to a new value and the marker sliding to a new target.
74
+ --wr-bullet-chart-duration: var(--wr-chart-duration);
75
+ --wr-bullet-chart-ease: var(--wr-chart-ease);
76
+ // Which way the bar and the marker move: 1 from the left, -1 from the right. A
77
+ // transform is physical, so the stylesheet turns it over under RTL.
78
+ --wr-bullet-chart-dir: 1;
61
79
 
62
80
  // The drawing above its scale, and with a label, the label column at inline start of
63
81
  // both. A grid follows `direction`, so under RTL the labels are on the right.
@@ -69,6 +87,10 @@
69
87
  font-family: var(--wr-bullet-chart-font-family);
70
88
  color: var(--wr-bullet-chart-color);
71
89
 
90
+ &:dir(rtl) {
91
+ --wr-bullet-chart-dir: -1;
92
+ }
93
+
72
94
  &--labelled {
73
95
  grid-template-areas:
74
96
  'labels track'
@@ -116,6 +138,11 @@
116
138
  align-self: start;
117
139
  position: relative;
118
140
  block-size: var(--wr-bullet-chart-track-height);
141
+ // The marker is a box as wide as the track moved by a transform, so its box runs past
142
+ // the track's end and gave the page a horizontal scroll. Clipped inline, with room for
143
+ // the marker's ring at either end.
144
+ overflow-x: clip;
145
+ overflow-clip-margin: var(--wr-bullet-chart-target-ring-width);
119
146
  }
120
147
 
121
148
  &__ranges {
@@ -131,12 +158,19 @@
131
158
  inset-block: 0;
132
159
  inset-inline-start: calc(var(--wr-bullet-chart-start, 0) * 100%);
133
160
  inline-size: calc(var(--wr-bullet-chart-size, 0) * 100%);
161
+ box-sizing: border-box;
134
162
  background: color-mix(
135
163
  in srgb,
136
164
  var(--wr-bullet-chart-range-end) var(--wr-bullet-chart-range-mix, 0%),
137
165
  var(--wr-bullet-chart-range-start)
138
166
  );
139
167
 
168
+ // Two bands that touch are parted by a line in the surface, inside the first one's
169
+ // own box, so each still ends at its exact limit.
170
+ &:not(:last-child) {
171
+ border-inline-end: 1px solid var(--wr-bullet-chart-separator);
172
+ }
173
+
140
174
  // The end of the last band, as a rule just past it. A last band that reaches the end
141
175
  // of the scale puts the rule outside the track, where the layer above clips it, so it
142
176
  // shows only where the scale runs on past the last limit.
@@ -150,33 +184,69 @@
150
184
  }
151
185
 
152
186
  // A third of the line high and centred on it, from zero to the value; a zero value is
153
- // still a sliver, since it is a reading.
187
+ // still a sliver, since it is a reading. As wide as the track, moved to where it starts
188
+ // and scaled to its share (`--wr-bullet-chart-start` and `-size`, 0 to 1): a new value
189
+ // moves a transform, which lays nothing out, where it used to move an inset and a size.
190
+ // The bar has square ends, so the scale bends nothing.
154
191
  &__bar {
155
192
  position: absolute;
156
193
  inset-block: calc(50% - var(--wr-bullet-chart-bar-thickness) / 2);
157
- inset-inline-start: calc(var(--wr-bullet-chart-start, 0) * 100%);
158
- inline-size: calc(var(--wr-bullet-chart-size, 0) * 100%);
159
- min-inline-size: 1px;
194
+ inset-inline: 0;
195
+ transform-origin: 0 50%;
196
+ transform: translateX(calc(var(--wr-bullet-chart-start, 0) * 100% * var(--wr-bullet-chart-dir)))
197
+ scaleX(max(var(--wr-bullet-chart-size, 0), 0.004));
160
198
  background: var(--wr-bullet-chart-value-color);
161
- transition:
162
- inset-inline-start var(--wr-duration-slow) var(--wr-ease-out),
163
- inline-size var(--wr-duration-slow) var(--wr-ease-out);
199
+ transition: transform var(--wr-bullet-chart-duration) var(--wr-bullet-chart-ease);
200
+
201
+ &:dir(rtl) {
202
+ transform-origin: 100% 50%;
203
+ }
164
204
  }
165
205
 
166
206
  // Across the line on its value, held inside the drawing at either end so no part of it
167
- // is cut off or reaches past the chart's box.
207
+ // is cut off or reaches past the chart's box. A box as wide as the track, slid to the
208
+ // target's share of it, with the marker itself on its starting edge.
168
209
  &__target {
169
210
  position: absolute;
170
211
  inset-block: calc(50% - var(--wr-bullet-chart-target-length) / 2);
171
- inset-inline-start: clamp(
172
- 0px,
173
- calc(var(--wr-bullet-chart-at, 0) * 100% - var(--wr-bullet-chart-target-thickness) / 2),
174
- calc(100% - var(--wr-bullet-chart-target-thickness))
212
+ inset-inline: 0;
213
+ pointer-events: none;
214
+ transform: translateX(
215
+ calc(
216
+ clamp(
217
+ 0px,
218
+ var(--wr-bullet-chart-at, 0) * 100% - var(--wr-bullet-chart-target-thickness) / 2,
219
+ 100% - var(--wr-bullet-chart-target-thickness)
220
+ ) *
221
+ var(--wr-bullet-chart-dir)
222
+ )
175
223
  );
176
- inline-size: var(--wr-bullet-chart-target-thickness);
177
- background: var(--wr-bullet-chart-target-color);
178
- outline: var(--wr-bullet-chart-target-ring-width) solid var(--wr-bullet-chart-target-ring);
179
- transition: inset-inline-start var(--wr-duration-slow) var(--wr-ease-out);
224
+ transition: transform var(--wr-bullet-chart-duration) var(--wr-bullet-chart-ease);
225
+
226
+ &::before {
227
+ content: '';
228
+ position: absolute;
229
+ inset-block: 0;
230
+ inset-inline-start: 0;
231
+ inline-size: var(--wr-bullet-chart-target-thickness);
232
+ background: var(--wr-bullet-chart-target-color);
233
+ outline: var(--wr-bullet-chart-target-ring-width) solid var(--wr-bullet-chart-target-ring);
234
+ }
235
+ }
236
+
237
+ // The message of an empty, loading or failed chart, laid over the track.
238
+ &__status {
239
+ grid-area: track;
240
+ position: relative;
241
+ block-size: var(--wr-bullet-chart-track-height);
242
+
243
+ // On the message itself: the shared sheet declares these on it, which would win over
244
+ // a value inherited from here.
245
+ .wr-chart-state {
246
+ --wr-chart-state-gap: var(--wr-space-xs);
247
+ --wr-chart-state-font-size: var(--wr-chart-label-size);
248
+ --wr-chart-state-padding: 0 var(--wr-space-xs);
249
+ }
180
250
  }
181
251
 
182
252
  // As wide as the drawing, so a tick's share is of the drawing too. Every tick is out of
@@ -207,7 +277,7 @@
207
277
  &::before {
208
278
  content: '';
209
279
  block-size: var(--wr-bullet-chart-tick-length);
210
- border-inline-start: 1px solid var(--wr-bullet-chart-tick-color);
280
+ border-inline-start: 1px solid var(--wr-bullet-chart-tick-mark-color);
211
281
  }
212
282
 
213
283
  &--start {
@@ -253,6 +323,7 @@
253
323
  border-inline-start: 1px solid GrayText;
254
324
  }
255
325
 
326
+ // Inherited, so the marker drawn on the target's starting edge keeps its paint too.
256
327
  .wr-bullet-chart__bar,
257
328
  .wr-bullet-chart__target {
258
329
  forced-color-adjust: none;
@@ -260,10 +331,10 @@
260
331
  }
261
332
 
262
333
  // The bar grows to its value and the marker slides to its target; with reduced motion
263
- // both land there at once.
264
- @media (prefers-reduced-motion: reduce) {
265
- .wr-bullet-chart__bar,
266
- .wr-bullet-chart__target {
267
- transition: none;
334
+ // the theme's duration is 0s, and both land there at once. A bar entering the page grows
335
+ // from where it starts, where the browser can start a transition from a style of its own.
336
+ @starting-style {
337
+ .wr-bullet-chart__bar {
338
+ transform: translateX(calc(var(--wr-bullet-chart-start, 0) * 100% * var(--wr-bullet-chart-dir))) scaleX(0);
268
339
  }
269
340
  }