ngwr 16.3.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 (295) hide show
  1. package/carousel/styles/_index.scss +53 -1
  2. package/charts/bar-chart/styles/_index.scss +494 -305
  3. package/charts/boxplot-chart/styles/_index.scss +114 -48
  4. package/charts/bullet-chart/styles/_index.scss +113 -42
  5. package/charts/calendar-heatmap/styles/_index.scss +111 -20
  6. package/charts/candlestick-chart/styles/_index.scss +61 -26
  7. package/charts/chart-legend/styles/_index.scss +119 -1
  8. package/charts/core/styles/_index.scss +201 -5
  9. package/charts/donut-chart/styles/_index.scss +76 -21
  10. package/charts/funnel-chart/styles/_index.scss +66 -38
  11. package/charts/gauge/styles/_index.scss +12 -1
  12. package/charts/heatmap-chart/styles/_index.scss +90 -53
  13. package/charts/line-chart/styles/_index.scss +143 -139
  14. package/charts/meter-group/styles/_index.scss +87 -25
  15. package/charts/radar-chart/styles/_index.scss +82 -40
  16. package/charts/scatter-chart/styles/_index.scss +117 -44
  17. package/charts/sparkline/styles/_index.scss +7 -1
  18. package/charts/treemap-chart/styles/_index.scss +94 -42
  19. package/charts/waterfall-chart/styles/_index.scss +150 -87
  20. package/color-picker/styles/_index.scss +7 -3
  21. package/copy-value/styles/_index.scss +21 -2
  22. package/date-stamp/styles/_index.scss +2 -1
  23. package/dialog/styles/_index.scss +6 -0
  24. package/drawer/styles/_index.scss +5 -1
  25. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  26. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  27. package/fesm2022/ngwr-carousel-testing.mjs +27 -1
  28. package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
  29. package/fesm2022/ngwr-carousel.mjs +86 -4
  30. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  31. package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
  32. package/fesm2022/ngwr-cascader.mjs +56 -25
  33. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  34. package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
  35. package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
  36. package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
  37. package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
  38. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
  39. package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
  40. package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
  41. package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
  42. package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
  43. package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
  44. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
  45. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  46. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
  47. package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
  48. package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
  49. package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
  50. package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
  51. package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
  52. package/fesm2022/ngwr-charts-core.mjs +299 -18
  53. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  54. package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
  55. package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
  56. package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
  57. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
  58. package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
  59. package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
  60. package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
  61. package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
  62. package/fesm2022/ngwr-charts-gauge.mjs +98 -12
  63. package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
  64. package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
  65. package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
  66. package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
  67. package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
  68. package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
  69. package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
  70. package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
  71. package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
  72. package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
  73. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  74. package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
  75. package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
  76. package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
  77. package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
  78. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
  79. package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
  80. package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
  81. package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
  82. package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
  83. package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
  84. package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
  85. package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
  86. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
  87. package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
  88. package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
  89. package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
  90. package/fesm2022/ngwr-color-picker.mjs +44 -4
  91. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  92. package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
  93. package/fesm2022/ngwr-context-menu.mjs +60 -17
  94. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  95. package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
  96. package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
  97. package/fesm2022/ngwr-copy-value.mjs +38 -2
  98. package/fesm2022/ngwr-copy-value.mjs.map +1 -1
  99. package/fesm2022/ngwr-date-picker.mjs +56 -8
  100. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  101. package/fesm2022/ngwr-dialog.mjs +13 -5
  102. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  103. package/fesm2022/ngwr-drawer.mjs +19 -3
  104. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  105. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  106. package/fesm2022/ngwr-dropdown.mjs +49 -6
  107. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  108. package/fesm2022/ngwr-editor.mjs +1 -0
  109. package/fesm2022/ngwr-editor.mjs.map +1 -1
  110. package/fesm2022/ngwr-file-upload.mjs +7 -3
  111. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  112. package/fesm2022/ngwr-graph-testing.mjs +27 -0
  113. package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
  114. package/fesm2022/ngwr-graph.mjs +643 -14
  115. package/fesm2022/ngwr-graph.mjs.map +1 -1
  116. package/fesm2022/ngwr-i18n-ar.mjs +13 -4
  117. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  118. package/fesm2022/ngwr-i18n-cs.mjs +13 -4
  119. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  120. package/fesm2022/ngwr-i18n-de.mjs +13 -4
  121. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  122. package/fesm2022/ngwr-i18n-en.mjs +13 -4
  123. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  124. package/fesm2022/ngwr-i18n-es.mjs +13 -4
  125. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  126. package/fesm2022/ngwr-i18n-fr.mjs +13 -4
  127. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  128. package/fesm2022/ngwr-i18n-he.mjs +13 -4
  129. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  130. package/fesm2022/ngwr-i18n-hi.mjs +13 -4
  131. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  132. package/fesm2022/ngwr-i18n-id.mjs +13 -4
  133. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  134. package/fesm2022/ngwr-i18n-it.mjs +13 -4
  135. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  136. package/fesm2022/ngwr-i18n-ja.mjs +13 -4
  137. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  138. package/fesm2022/ngwr-i18n-ko.mjs +13 -4
  139. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  140. package/fesm2022/ngwr-i18n-nl.mjs +13 -4
  141. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  142. package/fesm2022/ngwr-i18n-pl.mjs +13 -4
  143. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  144. package/fesm2022/ngwr-i18n-pt.mjs +13 -4
  145. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  146. package/fesm2022/ngwr-i18n-ru.mjs +13 -4
  147. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  148. package/fesm2022/ngwr-i18n-sv.mjs +13 -4
  149. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  150. package/fesm2022/ngwr-i18n-tr.mjs +13 -4
  151. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  152. package/fesm2022/ngwr-i18n-uk.mjs +13 -4
  153. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  154. package/fesm2022/ngwr-i18n-vi.mjs +13 -4
  155. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  156. package/fesm2022/ngwr-i18n-zh-tw.mjs +13 -4
  157. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  158. package/fesm2022/ngwr-i18n-zh.mjs +13 -4
  159. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  160. package/fesm2022/ngwr-lightbox.mjs +22 -5
  161. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  162. package/fesm2022/ngwr-list.mjs +2 -2
  163. package/fesm2022/ngwr-list.mjs.map +1 -1
  164. package/fesm2022/ngwr-overlay.mjs +21 -2
  165. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  166. package/fesm2022/ngwr-pagination.mjs +1 -0
  167. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  168. package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
  169. package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
  170. package/fesm2022/ngwr-popconfirm.mjs +41 -5
  171. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  172. package/fesm2022/ngwr-popover.mjs +67 -12
  173. package/fesm2022/ngwr-popover.mjs.map +1 -1
  174. package/fesm2022/ngwr-schema-form.mjs +3 -0
  175. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  176. package/fesm2022/ngwr-select.mjs +100 -3
  177. package/fesm2022/ngwr-select.mjs.map +1 -1
  178. package/fesm2022/ngwr-sortable-list.mjs +2 -2
  179. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  180. package/fesm2022/ngwr-table-testing.mjs +71 -3
  181. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  182. package/fesm2022/ngwr-table.mjs +173 -11
  183. package/fesm2022/ngwr-table.mjs.map +1 -1
  184. package/fesm2022/ngwr-tour-testing.mjs +13 -1
  185. package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
  186. package/fesm2022/ngwr-tour.mjs +25 -16
  187. package/fesm2022/ngwr-tour.mjs.map +1 -1
  188. package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
  189. package/fesm2022/ngwr-tree.mjs +52 -8
  190. package/fesm2022/ngwr-tree.mjs.map +1 -1
  191. package/fesm2022/ngwr-utils.mjs +64 -1
  192. package/fesm2022/ngwr-utils.mjs.map +1 -1
  193. package/fesm2022/ngwr-version.mjs +1 -1
  194. package/fesm2022/ngwr-version.mjs.map +1 -1
  195. package/fesm2022/ngwr-window.mjs +16 -9
  196. package/fesm2022/ngwr-window.mjs.map +1 -1
  197. package/graph/styles/_index.scss +87 -0
  198. package/i18n/ar.json +13 -4
  199. package/i18n/cs.json +13 -4
  200. package/i18n/de.json +13 -4
  201. package/i18n/en.json +13 -4
  202. package/i18n/es.json +13 -4
  203. package/i18n/fr.json +13 -4
  204. package/i18n/he.json +13 -4
  205. package/i18n/hi.json +13 -4
  206. package/i18n/id.json +13 -4
  207. package/i18n/it.json +13 -4
  208. package/i18n/ja.json +13 -4
  209. package/i18n/ko.json +13 -4
  210. package/i18n/nl.json +13 -4
  211. package/i18n/pl.json +13 -4
  212. package/i18n/pt.json +13 -4
  213. package/i18n/ru.json +13 -4
  214. package/i18n/sv.json +13 -4
  215. package/i18n/tr.json +13 -4
  216. package/i18n/uk.json +13 -4
  217. package/i18n/vi.json +13 -4
  218. package/i18n/zh-TW.json +13 -4
  219. package/i18n/zh.json +13 -4
  220. package/llms-full.txt +12 -12
  221. package/llms.txt +64 -27
  222. package/package.json +1 -1
  223. package/popconfirm/styles/_index.scss +6 -0
  224. package/popover/styles/_index.scss +24 -13
  225. package/schematics/collection.json +5 -0
  226. package/schematics/eject/index.js +158 -0
  227. package/schematics/eject/schema.js +8 -0
  228. package/schematics/eject/schema.json +24 -0
  229. package/schematics/eject/source.js +295 -0
  230. package/schematics/use/symbol-map.json +2 -0
  231. package/select/styles/_index.scss +13 -0
  232. package/skills/ngwr/SKILL.md +30 -3
  233. package/skills/ngwr/references/catalog.md +2 -2
  234. package/table/styles/_index.scss +24 -0
  235. package/theme/styles/_focus.scss +11 -1
  236. package/tour/styles/_index.scss +6 -0
  237. package/types/ngwr-carousel-testing.d.ts +29 -6
  238. package/types/ngwr-carousel.d.ts +52 -5
  239. package/types/ngwr-cascader-testing.d.ts +4 -3
  240. package/types/ngwr-cascader.d.ts +29 -7
  241. package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
  242. package/types/ngwr-charts-bar-chart.d.ts +220 -48
  243. package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
  244. package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
  245. package/types/ngwr-charts-bullet-chart.d.ts +72 -12
  246. package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
  247. package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
  248. package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
  249. package/types/ngwr-charts-chart-legend.d.ts +142 -5
  250. package/types/ngwr-charts-core.d.ts +259 -21
  251. package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
  252. package/types/ngwr-charts-donut-chart.d.ts +124 -16
  253. package/types/ngwr-charts-funnel-chart.d.ts +62 -6
  254. package/types/ngwr-charts-gauge-testing.d.ts +5 -1
  255. package/types/ngwr-charts-gauge.d.ts +72 -10
  256. package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
  257. package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
  258. package/types/ngwr-charts-line-chart.d.ts +215 -86
  259. package/types/ngwr-charts-meter-group.d.ts +96 -7
  260. package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
  261. package/types/ngwr-charts-radar-chart.d.ts +148 -28
  262. package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
  263. package/types/ngwr-charts-scatter-chart.d.ts +188 -18
  264. package/types/ngwr-charts-sparkline.d.ts +26 -4
  265. package/types/ngwr-charts-treemap-chart.d.ts +121 -23
  266. package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
  267. package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
  268. package/types/ngwr-color-picker.d.ts +27 -0
  269. package/types/ngwr-context-menu-testing.d.ts +10 -9
  270. package/types/ngwr-context-menu.d.ts +19 -0
  271. package/types/ngwr-copy-value.d.ts +8 -0
  272. package/types/ngwr-date-picker.d.ts +34 -2
  273. package/types/ngwr-dialog.d.ts +30 -10
  274. package/types/ngwr-drawer.d.ts +32 -1
  275. package/types/ngwr-dropdown-testing.d.ts +8 -5
  276. package/types/ngwr-dropdown.d.ts +31 -6
  277. package/types/ngwr-file-upload.d.ts +8 -2
  278. package/types/ngwr-graph-testing.d.ts +28 -0
  279. package/types/ngwr-graph.d.ts +263 -91
  280. package/types/ngwr-lightbox.d.ts +15 -0
  281. package/types/ngwr-overlay.d.ts +16 -1
  282. package/types/ngwr-popconfirm-testing.d.ts +11 -2
  283. package/types/ngwr-popconfirm.d.ts +28 -1
  284. package/types/ngwr-popover.d.ts +59 -9
  285. package/types/ngwr-select.d.ts +37 -0
  286. package/types/ngwr-table-testing.d.ts +52 -1
  287. package/types/ngwr-table.d.ts +102 -10
  288. package/types/ngwr-tour-testing.d.ts +10 -0
  289. package/types/ngwr-tour.d.ts +32 -4
  290. package/types/ngwr-tree-testing.d.ts +1 -2
  291. package/types/ngwr-tree.d.ts +35 -2
  292. package/types/ngwr-utils.d.ts +79 -1
  293. package/types/ngwr-version.d.ts +1 -1
  294. package/types/ngwr-window.d.ts +14 -11
  295. package/window/styles/_index.scss +5 -10
@@ -4,19 +4,50 @@
4
4
  // Styles for the entry points this component's own markup renders. With `dataTable`, the
5
5
  // figures render as a `<wr-chart-table>` beside the grid, which its own sheet clips out of
6
6
  // sight.
7
- @use '../../core/styles' as core-styles; // WrChartTable
7
+ @use '../../core/styles' as core-styles; // WrChartTable, WrChartState
8
+ @use '../../chart-legend/styles' as chart-legend-styles; // WrChartScale
8
9
  @include theme.loaded('charts/calendar-heatmap');
9
10
 
10
11
  .wr-calendar-heatmap {
11
12
  --wr-calendar-heatmap-font-family: var(--wr-font-family-base);
12
13
  --wr-calendar-heatmap-grid-gap: var(--wr-space-sm);
13
- --wr-calendar-heatmap-weekday-font-size: var(--wr-text-xs);
14
+ --wr-calendar-heatmap-weekday-font-size: var(--wr-chart-label-size);
14
15
  --wr-calendar-heatmap-weekday-line-height: var(--wr-leading-none);
15
- --wr-calendar-heatmap-month-font-size: var(--wr-text-xs);
16
+ --wr-calendar-heatmap-month-font-size: var(--wr-chart-label-size);
16
17
  // The weekday and month names, muted as an axis' labels are on every chart.
17
- --wr-calendar-heatmap-label-color: var(--wr-color-on-surface-muted);
18
+ --wr-calendar-heatmap-label-color: var(--wr-chart-label);
19
+ // What a colour of the chart's own is stepped toward.
20
+ --wr-calendar-heatmap-surface: var(--wr-color-surface);
21
+ // The five levels of a day of something: the chart theme's sequential scale, the first
22
+ // palette colour stepped toward the surface, so the scale turns over with the scheme and
23
+ // an app that retints the theme retints the calendar. They were four steps of opacity
24
+ // over one colour.
25
+ --wr-calendar-heatmap-step-1: var(--wr-chart-seq-1);
26
+ --wr-calendar-heatmap-step-2: var(--wr-chart-seq-2);
27
+ --wr-calendar-heatmap-step-3: var(--wr-chart-seq-3);
28
+ --wr-calendar-heatmap-step-4: var(--wr-chart-seq-4);
29
+ --wr-calendar-heatmap-step-5: var(--wr-chart-seq-5);
30
+ // A day of nothing: the track every chart paints an unfilled scale with.
31
+ --wr-calendar-heatmap-empty: var(--wr-chart-track);
32
+ // The chart theme's radius, small enough for a square a dozen pixels wide.
33
+ --wr-calendar-heatmap-cell-radius: var(--wr-chart-bar-radius);
34
+ // A faint line inside every square's edge, in the text colour: the lowest level is a
35
+ // tint of the surface (1.3:1 against it in light, 1.2:1 in dark), and the edge is what
36
+ // keeps it readable as a day of something. On the higher levels it disappears into the
37
+ // paint.
38
+ --wr-calendar-heatmap-cell-edge: color-mix(in srgb, var(--wr-color-on-surface) 14%, transparent);
39
+ // The day the tooltip reads, and the one under the pointer, ringed just outside its
40
+ // edge: the ring the heatmap draws round its reading cell. It was a square grown by 40%.
41
+ --wr-calendar-heatmap-active-ring: var(--wr-color-on-surface);
42
+ --wr-calendar-heatmap-active-ring-width: 2px;
43
+ // The scale key under the grid, and the message that takes its place.
44
+ --wr-calendar-heatmap-legend-space: var(--wr-space-sm);
18
45
 
19
- display: inline-block;
46
+ // One column as wide as the year, which the grid, the scale key and the state message
47
+ // share: the key is then placed, and held, against the year's own width rather than
48
+ // the scroller's.
49
+ display: inline-grid;
50
+ grid-template-columns: max-content;
20
51
  // The containing block of the out-of-flow `dataTable` copy, as on every chart that
21
52
  // renders one: in a scroller it would otherwise keep its place in the scrolled content.
22
53
  position: relative;
@@ -38,6 +69,32 @@
38
69
  font-family: var(--wr-calendar-heatmap-font-family);
39
70
  color: var(--wr-calendar-heatmap-label-color);
40
71
 
72
+ // A colour of the chart's own (`color`): the same five steps, from that colour toward
73
+ // the surface, in the shares the chart theme steps its own scale by.
74
+ &--tinted {
75
+ --wr-calendar-heatmap-step-1: color-mix(
76
+ in srgb,
77
+ var(--wr-calendar-heatmap-scale-color) 20%,
78
+ var(--wr-calendar-heatmap-surface)
79
+ );
80
+ --wr-calendar-heatmap-step-2: color-mix(
81
+ in srgb,
82
+ var(--wr-calendar-heatmap-scale-color) 40%,
83
+ var(--wr-calendar-heatmap-surface)
84
+ );
85
+ --wr-calendar-heatmap-step-3: color-mix(
86
+ in srgb,
87
+ var(--wr-calendar-heatmap-scale-color) 60%,
88
+ var(--wr-calendar-heatmap-surface)
89
+ );
90
+ --wr-calendar-heatmap-step-4: color-mix(
91
+ in srgb,
92
+ var(--wr-calendar-heatmap-scale-color) 80%,
93
+ var(--wr-calendar-heatmap-surface)
94
+ );
95
+ --wr-calendar-heatmap-step-5: var(--wr-calendar-heatmap-scale-color);
96
+ }
97
+
41
98
  // The host is a tab stop while it scrolls (see the component), so the keyboard can move
42
99
  // it. Outset: an element's own `overflow` does not clip its outline.
43
100
  &:focus-visible {
@@ -93,33 +150,67 @@
93
150
  &__cells {
94
151
  grid-area: cells;
95
152
  grid-template-rows: repeat(7, var(--wr-calendar-heatmap-cell-size));
96
- // The bottom row sits on the host's own edge, and the host now clips its
97
- // block axis (see above) — so the 40% a hovered cell grows by, half of it
98
- // below the row, had nowhere to go. Reserve that half. Scaled from the cell
99
- // size rather than written as a length, because the size is an input.
100
- padding-block-end: calc(var(--wr-calendar-heatmap-cell-size) * 0.2);
153
+ // The bottom row sits on the host's own edge, and the host clips its block axis (see
154
+ // above), so the ring round a day of that row, drawn outside the square, had nowhere
155
+ // to go. Reserve it: the ring's width and the pixel it stands off by.
156
+ padding-block-end: calc(var(--wr-calendar-heatmap-active-ring-width) + 1px);
101
157
  }
102
158
 
103
159
  &__cell {
104
160
  width: var(--wr-calendar-heatmap-cell-size);
105
161
  height: var(--wr-calendar-heatmap-cell-size);
106
- // 2px — intentional micro-radius for the tiny (~11px) cells; the control /
107
- // border-radius tokens (5px+) would read as near-circles at this size.
108
- border-radius: 2px;
109
- transition: transform var(--wr-transition-base);
162
+ border-radius: var(--wr-calendar-heatmap-cell-radius);
163
+ box-shadow: inset 0 0 0 1px var(--wr-calendar-heatmap-cell-edge);
110
164
  // An inline `background`, which forced colors resets to `Canvas`: the whole
111
165
  // year vanished and left the month and weekday labels. The SVG charts keep
112
166
  // their fills there, so the squares do too.
113
167
  forced-color-adjust: none;
114
168
 
115
- &:hover {
116
- transform: scale(1.4);
169
+ // The day under the pointer, and the one the tooltip reads while the pointer is on its
170
+ // way to the chip (`--active`, set by hand on that one square): ringed at once, with
171
+ // no transition, so a pointer crossing the year tweens nothing.
172
+ &:hover,
173
+ &--active {
174
+ outline: var(--wr-calendar-heatmap-active-ring-width) solid var(--wr-calendar-heatmap-active-ring);
175
+ outline-offset: 1px;
117
176
  }
177
+ }
118
178
 
119
- // The hovered square still grows, so the pointer's place stays marked; it just lands
120
- // there at once rather than tweening on every square the pointer crosses.
121
- @media (prefers-reduced-motion: reduce) {
122
- transition: none;
179
+ // The scale key and the state message sit in the scroller with the grid, which is as
180
+ // wide as the year: held to the scroller's inline end, where the newest weeks are, they
181
+ // stay in sight wherever the year is scrolled to.
182
+ &__legend,
183
+ &__status {
184
+ justify-self: end;
185
+ position: sticky;
186
+ inset-inline-end: 0;
187
+ }
188
+
189
+ &__legend {
190
+ --wr-chart-legend-space: var(--wr-calendar-heatmap-legend-space);
191
+ --wr-chart-scale-step-width: var(--wr-calendar-heatmap-cell-size, 0.75rem);
192
+ --wr-chart-scale-step-height: var(--wr-calendar-heatmap-cell-size, 0.75rem);
193
+ --wr-chart-scale-step-radius: var(--wr-calendar-heatmap-cell-radius);
194
+ --wr-chart-scale-step-edge: var(--wr-calendar-heatmap-cell-edge);
195
+ --wr-chart-scale-color: var(--wr-calendar-heatmap-label-color);
196
+ }
197
+
198
+ &__status {
199
+ margin-block-start: var(--wr-calendar-heatmap-legend-space);
200
+
201
+ // In flow here, where the shared rule lays the message over a positioned plot.
202
+ > .wr-chart-state {
203
+ position: static;
204
+ padding: 0;
123
205
  }
124
206
  }
125
207
  }
208
+
209
+ // The squares keep their colours under forced colors, so the ring drawn in a theme colour
210
+ // would keep a colour the forced palette no longer has.
211
+ @media (forced-colors: active) {
212
+ .wr-calendar-heatmap__cell:hover,
213
+ .wr-calendar-heatmap__cell--active {
214
+ outline-color: Highlight;
215
+ }
216
+ }
@@ -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/candlestick-chart');
9
9
 
10
10
  // The lengths inside a candle, each against the candle's own height as every percentage
@@ -37,27 +37,30 @@ $-body: calc(100% - $-upper - $-lower);
37
37
  --wr-candlestick-chart-font-family: var(--wr-font-family-base);
38
38
  --wr-candlestick-chart-color: var(--wr-color-on-surface);
39
39
  // A rising candle and a falling one, named as the waterfall's change up and change
40
- // down are. The two intents sit within 1.004:1 of each other in luminance, so they are
41
- // never the only thing that tells the candles apart: a rising body is hollow and a
42
- // falling one filled, whatever these say. Both measure over 4:1 against the surface in
43
- // either scheme, past the 3:1 WCAG 1.4.11 asks of a mark a reader needs.
40
+ // down are: the status roles on purpose, since up and down are what they mean here,
41
+ // where a series of the chart palette would mean nothing. Both measure over 4:1 against
42
+ // the surface in either scheme, past the 3:1 WCAG 1.4.11 asks of a mark a reader needs.
43
+ // They sit within 1.004:1 of each other in luminance, so `hollow` is the cue for a
44
+ // reader who cannot split them: it draws a rising body as an outline.
44
45
  --wr-candlestick-chart-increase-color: var(--wr-color-success);
45
46
  --wr-candlestick-chart-decrease-color: var(--wr-color-danger);
46
47
  // The room above and below the drawing inside the plot, which the y labels read to
47
48
  // meet their gridlines.
48
49
  --wr-candlestick-chart-plot-inset-y: var(--wr-space-sm);
49
- --wr-candlestick-chart-grid-color: color-mix(in srgb, var(--wr-border-base) 70%, transparent);
50
- --wr-candlestick-chart-tick-gap: var(--wr-space-xs);
51
- --wr-candlestick-chart-tick-font-size: var(--wr-text-xs);
50
+ --wr-candlestick-chart-grid-color: var(--wr-chart-grid);
51
+ // The gridline at zero, when the prices reach it: the line they are read against.
52
+ --wr-candlestick-chart-zero-color: var(--wr-chart-zero);
53
+ --wr-candlestick-chart-tick-gap: var(--wr-space-sm);
54
+ --wr-candlestick-chart-tick-font-size: var(--wr-chart-label-size);
52
55
  --wr-candlestick-chart-tick-line-height: var(--wr-text-xs-leading);
53
- --wr-candlestick-chart-tick-color: var(--wr-color-on-surface-muted);
56
+ --wr-candlestick-chart-tick-color: var(--wr-chart-label);
54
57
  // A body is 70% of its slot, never under 1px and never over this; the gap between two
55
58
  // candles is the rest of the slot, so it closes as the candles crowd.
56
59
  --wr-candlestick-chart-body-max-width: 1.5rem;
57
60
  --wr-candlestick-chart-body-border-width: 1px;
58
61
  --wr-candlestick-chart-wick-width: 1px;
59
62
  // The band behind the candle being read, under the gridlines, so they read across it.
60
- --wr-candlestick-chart-cursor-bg: var(--wr-color-hover);
63
+ --wr-candlestick-chart-cursor-bg: var(--wr-chart-band);
61
64
 
62
65
  display: block;
63
66
  // The containing block of the out-of-flow `dataTable` copy, as on the line chart: a
@@ -77,6 +80,28 @@ $-body: calc(100% - $-upper - $-lower);
77
80
  grid-template-columns: auto minmax(0, 1fr);
78
81
  }
79
82
 
83
+ // The top tick is centred on the top gridline, so half of it stands above the drawing.
84
+ // The plot's own block padding holds it while that is at least half a line; past that
85
+ // - a larger tick line-height, a smaller inset - the body keeps the rest, or the tick
86
+ // hangs out of the chart's own box and a card that clips cuts it. Nothing at the
87
+ // defaults, where the padding is exactly half a line.
88
+ &--axis &__body {
89
+ padding-block-start: max(
90
+ 0px,
91
+ calc(var(--wr-candlestick-chart-tick-line-height) / 2 - var(--wr-candlestick-chart-plot-inset-y))
92
+ );
93
+ }
94
+
95
+ // Empty, loading or failed: the shared message, over the plot. A grid item in the
96
+ // plot's own cell rather than a child of it, since the plot is an `img`; the shared
97
+ // rule's `inset` has nothing to resolve against here and the cell sizes it instead.
98
+ &__body > .wr-chart-state {
99
+ position: relative;
100
+ inset: auto;
101
+ grid-column: 2;
102
+ grid-row: 1;
103
+ }
104
+
80
105
  // As wide as the longest label: every label is in flow, in the one cell of a one-cell
81
106
  // grid, so the column sizes to the widest while its height stays one label. Stretched
82
107
  // to the plot's row, each label moves down from the top by its own gridline's share of
@@ -131,6 +156,11 @@ $-body: calc(100% - $-upper - $-lower);
131
156
  border-block-start: 1px solid var(--wr-candlestick-chart-grid-color);
132
157
  }
133
158
 
159
+ // Zero, where the prices reach it.
160
+ &__grid-line--zero {
161
+ border-block-start-color: var(--wr-candlestick-chart-zero-color);
162
+ }
163
+
134
164
  // One slot wide, the full height of the drawing.
135
165
  &__cursor {
136
166
  position: absolute;
@@ -140,11 +170,10 @@ $-body: calc(100% - $-upper - $-lower);
140
170
  pointer-events: none;
141
171
  }
142
172
 
143
- // A body is drawn at least tall enough to show what tells a rising one from a falling
144
- // one: its two edges and a 2px inside while hollow, or two dashes and the gap between
145
- // them while dense. Shorter — a candle that barely moved — it would draw as a solid
146
- // line in either direction, and leave colour the only channel. Both directions grow
147
- // alike, so a small rise never looks larger than a fall of the same size, and a body
173
+ // A body is drawn at least tall enough to read as a body, and under `hollow` to show
174
+ // what tells a rising one from a falling one: its two edges and a 2px inside, or two
175
+ // dashes and the gap between them while dense. Shorter - a candle that barely moved -
176
+ // it would draw as a line across its wick. Both directions grow alike, so a small rise never looks larger than a fall of the same size, and a body
148
177
  // grows into its own wicks, so the high and the low stay where they are (see the
149
178
  // functions at the top).
150
179
  $dash: 2px;
@@ -201,17 +230,22 @@ $-body: calc(100% - $-upper - $-lower);
201
230
  top: _wick($body-min, $-upper, $-lower);
202
231
  height: _body-height($body-min);
203
232
  border: var(--wr-candlestick-chart-body-border-width) solid currentColor;
233
+ // Solid both ways: a rise and a fall are the same mark in two colours, as heavy as
234
+ // every other chart's. An outlined rising body was two 1px edges, which read thin.
235
+ background: currentColor;
204
236
  }
205
237
 
206
- &__candle--decrease &__candle-body {
207
- background: currentColor;
238
+ // On request, a rising body is an outline: the fill is then a second cue beside the
239
+ // colour, the one that survives greyscale and print.
240
+ &--hollow &__candle--increase &__candle-body {
241
+ background: transparent;
208
242
  }
209
243
 
210
244
  // A body under 4px wide has no inside to leave hollow — its two edges and at most a
211
- // pixel between them read as one bar — so a rising body is DOTTED instead, solid
212
- // pixels with gaps between them down its length, and a falling one stays solid. A
213
- // pattern is a channel that survives greyscale, where a lighter tint of the colour
214
- // would fall under 3:1 against the surface.
245
+ // pixel between them read as one bar — so under `hollow` a rising body is DOTTED
246
+ // instead, solid pixels with gaps between them down its length, and a falling one
247
+ // stays solid. A pattern is a channel that survives greyscale, where a lighter tint of
248
+ // the colour would fall under 3:1 against the surface.
215
249
  &--dense &__candle::before {
216
250
  height: max(0px, _wick($dense-body-min, $-upper, $-lower));
217
251
  }
@@ -226,7 +260,7 @@ $-body: calc(100% - $-upper - $-lower);
226
260
  border-width: 0;
227
261
  }
228
262
 
229
- &--dense &__candle--increase &__candle-body {
263
+ &--hollow#{&}--dense &__candle--increase &__candle-body {
230
264
  background: repeating-linear-gradient(to bottom, currentColor 0 $dash, transparent $dash 2 * $dash);
231
265
  }
232
266
 
@@ -250,7 +284,7 @@ $-body: calc(100% - $-upper - $-lower);
250
284
  overflow: hidden;
251
285
  }
252
286
 
253
- // Every label, a line each, laid out and never seen: the component measures it to
287
+ // The longest few labels, a line each, laid out and never seen: the component measures it to
254
288
  // decide how many labels fit. A line breaks only where the component put a break, and
255
289
  // spaces collapse as a printed label's do, so the copy is exactly as wide as the widest
256
290
  // label.
@@ -293,6 +327,7 @@ $-body: calc(100% - $-upper - $-lower);
293
327
  @media (forced-colors: active) {
294
328
  .wr-candlestick-chart {
295
329
  --wr-candlestick-chart-grid-color: GrayText;
330
+ --wr-candlestick-chart-zero-color: CanvasText;
296
331
  }
297
332
 
298
333
  .wr-candlestick-chart__candle {
@@ -14,7 +14,8 @@
14
14
  --wr-chart-legend-color: var(--wr-color-on-surface);
15
15
  --wr-chart-legend-label-font-weight: inherit;
16
16
  --wr-chart-legend-value-color: var(--wr-color-on-surface-muted);
17
- --wr-chart-legend-dot-size: 0.625rem;
17
+ // 8px, the dot the tooltip keys a row with.
18
+ --wr-chart-legend-dot-size: 0.5rem;
18
19
  --wr-chart-legend-marker-size: 0.75rem;
19
20
  // A hidden series is struck through as well as muted, so its state is not carried by
20
21
  // colour alone, and its key fades: the key is `aria-hidden`, the label says it.
@@ -25,6 +26,8 @@
25
26
  --wr-chart-legend-toggle-padding-x: var(--wr-space-xs);
26
27
  --wr-chart-legend-toggle-radius: var(--wr-border-radius-sm);
27
28
  --wr-chart-legend-toggle-hover-bg: var(--wr-color-hover);
29
+ // The room between the legend and the chart it sits beside, on whichever side that is.
30
+ --wr-chart-legend-space: var(--wr-space-md);
28
31
 
29
32
  margin: 0;
30
33
  gap: var(--wr-chart-legend-gap-y) var(--wr-chart-legend-gap-x);
@@ -40,6 +43,39 @@
40
43
  flex-wrap: wrap;
41
44
  }
42
45
 
46
+ // At inline start or end the rows run down a column, as wide as the longest of them.
47
+ .wr-chart-legend--start,
48
+ .wr-chart-legend--end {
49
+ flex: none;
50
+ flex-direction: column;
51
+ flex-wrap: nowrap;
52
+ }
53
+
54
+ // Nothing drawn, and nothing for a pointer or a screen reader to find.
55
+ .wr-chart-legend--none {
56
+ display: none;
57
+ }
58
+
59
+ // The room between a chart and the legend it draws. Only inside a chart that opted in
60
+ // (`wr-chart--legend`), so a legend an app places itself keeps no margin it did not ask
61
+ // for, and a chart that still places its own legend keeps its own.
62
+ :where(.wr-chart--legend) > .wr-chart-legend--top {
63
+ margin-block-end: var(--wr-chart-legend-space);
64
+ }
65
+
66
+ :where(.wr-chart--legend) > .wr-chart-legend--bottom {
67
+ margin-block-start: var(--wr-chart-legend-space);
68
+ justify-content: center;
69
+ }
70
+
71
+ :where(.wr-chart--legend) > .wr-chart-legend--start {
72
+ margin-inline-end: var(--wr-chart-legend-space);
73
+ }
74
+
75
+ :where(.wr-chart--legend) > .wr-chart-legend--end {
76
+ margin-inline-start: var(--wr-chart-legend-space);
77
+ }
78
+
43
79
  .wr-chart-legend__item {
44
80
  display: inline-flex;
45
81
  align-items: center;
@@ -142,3 +178,85 @@
142
178
  opacity: var(--wr-chart-legend-hidden-swatch-opacity);
143
179
  }
144
180
  }
181
+
182
+ // ── The key of a colour scale ──────────────────────────────────────────────────────
183
+ //
184
+ // What a heatmap draws in the legend's place: the steps of its scale side by side,
185
+ // between the labels of the two ends. The hooks at zero specificity, as the legend's are,
186
+ // so the chart that draws it re-points one from any selector.
187
+ :where(.wr-chart-scale) {
188
+ --wr-chart-scale-gap: var(--wr-space-sm);
189
+ --wr-chart-scale-font-size: var(--wr-text-xs);
190
+ --wr-chart-scale-color: var(--wr-color-on-surface-muted);
191
+ // A step is a small square, as a cell of the scale's chart is, and two steps sit as far
192
+ // apart as two cells do.
193
+ --wr-chart-scale-step-width: 0.75rem;
194
+ --wr-chart-scale-step-height: 0.75rem;
195
+ --wr-chart-scale-step-gap: 2px;
196
+ --wr-chart-scale-step-radius: var(--wr-chart-bar-radius, 2px);
197
+ // The faint edge that keeps the lowest steps, tints of the surface, readable as steps.
198
+ --wr-chart-scale-step-edge: color-mix(in srgb, var(--wr-color-on-surface) 14%, transparent);
199
+ }
200
+
201
+ .wr-chart-scale {
202
+ display: flex;
203
+ flex-wrap: wrap;
204
+ align-items: center;
205
+ gap: var(--wr-chart-scale-gap);
206
+ font-size: var(--wr-chart-scale-font-size);
207
+ color: var(--wr-chart-scale-color);
208
+ }
209
+
210
+ .wr-chart-scale--start,
211
+ .wr-chart-scale--end {
212
+ flex: none;
213
+ }
214
+
215
+ .wr-chart-scale--none {
216
+ display: none;
217
+ }
218
+
219
+ // The room between a chart and the key it draws, as for a legend: only inside a chart
220
+ // that opted in (`wr-chart--legend`).
221
+ :where(.wr-chart--legend) > .wr-chart-scale--top {
222
+ margin-block-end: var(--wr-chart-legend-space, var(--wr-space-md));
223
+ justify-content: center;
224
+ }
225
+
226
+ :where(.wr-chart--legend) > .wr-chart-scale--bottom {
227
+ margin-block-start: var(--wr-chart-legend-space, var(--wr-space-md));
228
+ justify-content: center;
229
+ }
230
+
231
+ :where(.wr-chart--legend) > .wr-chart-scale--start {
232
+ margin-inline-end: var(--wr-chart-legend-space, var(--wr-space-md));
233
+ }
234
+
235
+ :where(.wr-chart--legend) > .wr-chart-scale--end {
236
+ margin-inline-start: var(--wr-chart-legend-space, var(--wr-space-md));
237
+ }
238
+
239
+ .wr-chart-scale__label {
240
+ font-variant-numeric: tabular-nums;
241
+ white-space: nowrap;
242
+ // The scale's ends, `-50` among them: a figure has no strong character of its own, so
243
+ // on an RTL page its minus landed after the digits. Plaintext takes the direction from
244
+ // the text. Shrunk to its text, so the direction moves nothing but the sign.
245
+ unicode-bidi: plaintext;
246
+ }
247
+
248
+ .wr-chart-scale__ramp {
249
+ display: inline-flex;
250
+ gap: var(--wr-chart-scale-step-gap);
251
+ }
252
+
253
+ .wr-chart-scale__step {
254
+ flex: none;
255
+ inline-size: var(--wr-chart-scale-step-width);
256
+ block-size: var(--wr-chart-scale-step-height);
257
+ border-radius: var(--wr-chart-scale-step-radius);
258
+ box-shadow: inset 0 0 0 1px var(--wr-chart-scale-step-edge);
259
+ // The key to colours the chart keeps under forced colors, painted by an inline
260
+ // `background`, which forced colors would reset to `Canvas`.
261
+ forced-color-adjust: none;
262
+ }