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.
- package/charts/bar-chart/styles/_index.scss +494 -305
- package/charts/boxplot-chart/styles/_index.scss +114 -48
- package/charts/bullet-chart/styles/_index.scss +113 -42
- package/charts/calendar-heatmap/styles/_index.scss +111 -20
- package/charts/candlestick-chart/styles/_index.scss +61 -26
- package/charts/chart-legend/styles/_index.scss +119 -1
- package/charts/core/styles/_index.scss +201 -5
- package/charts/donut-chart/styles/_index.scss +76 -21
- package/charts/funnel-chart/styles/_index.scss +66 -38
- package/charts/gauge/styles/_index.scss +12 -1
- package/charts/heatmap-chart/styles/_index.scss +90 -53
- package/charts/line-chart/styles/_index.scss +143 -139
- package/charts/meter-group/styles/_index.scss +87 -25
- package/charts/radar-chart/styles/_index.scss +82 -40
- package/charts/scatter-chart/styles/_index.scss +117 -44
- package/charts/sparkline/styles/_index.scss +7 -1
- package/charts/treemap-chart/styles/_index.scss +94 -42
- package/charts/waterfall-chart/styles/_index.scss +150 -87
- package/color-picker/styles/_index.scss +7 -3
- package/copy-value/styles/_index.scss +21 -2
- package/date-stamp/styles/_index.scss +2 -1
- package/dialog/styles/_index.scss +6 -0
- package/drawer/styles/_index.scss +5 -1
- package/fesm2022/ngwr-carousel-testing.mjs +4 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +21 -2
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +48 -4
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
- package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
- package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +299 -18
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
- package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge.mjs +98 -12
- package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
- package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
- package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
- package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +44 -4
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +47 -19
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
- package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +38 -2
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +56 -8
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +13 -5
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +19 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +35 -6
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +1 -0
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +81 -13
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +5 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +5 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +5 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +5 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +5 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +5 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +5 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +5 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +5 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +5 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +5 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +5 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +5 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +5 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +5 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +5 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +5 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +5 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +5 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +5 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +5 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +5 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +20 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +21 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +41 -5
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +67 -12
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +2 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +2 -0
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +14 -9
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +49 -16
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +16 -9
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/ar.json +5 -0
- package/i18n/cs.json +5 -0
- package/i18n/de.json +5 -0
- package/i18n/en.json +5 -0
- package/i18n/es.json +5 -0
- package/i18n/fr.json +5 -0
- package/i18n/he.json +5 -0
- package/i18n/hi.json +5 -0
- package/i18n/id.json +5 -0
- package/i18n/it.json +5 -0
- package/i18n/ja.json +5 -0
- package/i18n/ko.json +5 -0
- package/i18n/nl.json +5 -0
- package/i18n/pl.json +5 -0
- package/i18n/pt.json +5 -0
- package/i18n/ru.json +5 -0
- package/i18n/sv.json +5 -0
- package/i18n/tr.json +5 -0
- package/i18n/uk.json +5 -0
- package/i18n/vi.json +5 -0
- package/i18n/zh-TW.json +5 -0
- package/i18n/zh.json +5 -0
- package/llms-full.txt +8 -8
- package/llms.txt +7 -3
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +24 -13
- package/schematics/use/symbol-map.json +1 -0
- package/skills/ngwr/references/catalog.md +1 -1
- package/tour/styles/_index.scss +6 -0
- package/types/ngwr-carousel-testing.d.ts +6 -4
- package/types/ngwr-carousel.d.ts +14 -3
- package/types/ngwr-cascader-testing.d.ts +4 -3
- package/types/ngwr-cascader.d.ts +27 -3
- package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
- package/types/ngwr-charts-bar-chart.d.ts +220 -48
- package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
- package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
- package/types/ngwr-charts-bullet-chart.d.ts +72 -12
- package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
- package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
- package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
- package/types/ngwr-charts-chart-legend.d.ts +142 -5
- package/types/ngwr-charts-core.d.ts +259 -21
- package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
- package/types/ngwr-charts-donut-chart.d.ts +124 -16
- package/types/ngwr-charts-funnel-chart.d.ts +62 -6
- package/types/ngwr-charts-gauge-testing.d.ts +5 -1
- package/types/ngwr-charts-gauge.d.ts +72 -10
- package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
- package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
- package/types/ngwr-charts-line-chart.d.ts +215 -86
- package/types/ngwr-charts-meter-group.d.ts +96 -7
- package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
- package/types/ngwr-charts-radar-chart.d.ts +148 -28
- package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
- package/types/ngwr-charts-scatter-chart.d.ts +188 -18
- package/types/ngwr-charts-sparkline.d.ts +26 -4
- package/types/ngwr-charts-treemap-chart.d.ts +121 -23
- package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
- package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
- package/types/ngwr-color-picker.d.ts +27 -0
- package/types/ngwr-context-menu-testing.d.ts +10 -9
- package/types/ngwr-context-menu.d.ts +17 -0
- package/types/ngwr-copy-value.d.ts +8 -0
- package/types/ngwr-date-picker.d.ts +34 -2
- package/types/ngwr-dialog.d.ts +30 -10
- package/types/ngwr-drawer.d.ts +32 -1
- package/types/ngwr-dropdown-testing.d.ts +8 -5
- package/types/ngwr-dropdown.d.ts +29 -6
- package/types/ngwr-graph.d.ts +22 -6
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-overlay.d.ts +16 -1
- package/types/ngwr-popconfirm-testing.d.ts +11 -2
- package/types/ngwr-popconfirm.d.ts +28 -1
- package/types/ngwr-popover.d.ts +59 -9
- package/types/ngwr-table.d.ts +1 -1
- package/types/ngwr-tour.d.ts +21 -2
- package/types/ngwr-tree-testing.d.ts +1 -2
- package/types/ngwr-tree.d.ts +33 -2
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +14 -11
- package/window/styles/_index.scss +5 -10
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
@use '../../../popover/styles'; // the `.wr-tooltip` chip the hover tooltip renders into
|
|
2
2
|
@use '../../../theme/styles/loaded' as theme;
|
|
3
|
+
|
|
4
|
+
// The chart theme the line's colour and the marker's ring default to.
|
|
5
|
+
@use '../../core/styles' as core-styles;
|
|
3
6
|
@include theme.loaded('charts/sparkline');
|
|
4
7
|
|
|
5
8
|
.wr-sparkline {
|
|
6
9
|
// How much of the line's colour the `showArea` fill takes, and the ring round the hover
|
|
7
10
|
// marker: the surface the sparkline sits on, so the marker reads on the line under it.
|
|
8
11
|
--wr-sparkline-area-opacity: 0.15;
|
|
9
|
-
--wr-sparkline-marker-ring: var(--wr-
|
|
12
|
+
--wr-sparkline-marker-ring: var(--wr-chart-separator);
|
|
10
13
|
|
|
11
14
|
display: inline-block;
|
|
12
15
|
// The hover marker is placed from this box's padding edge, measured off the drawing.
|
|
13
16
|
position: relative;
|
|
14
17
|
line-height: 0;
|
|
15
18
|
|
|
19
|
+
// The padding is the component's, the tip dot's radius: inside the box, so the drawing
|
|
20
|
+
// is `width` by `height` whatever the dot's size and the dot never reaches past it.
|
|
16
21
|
svg {
|
|
17
22
|
display: block;
|
|
23
|
+
box-sizing: border-box;
|
|
18
24
|
overflow: visible;
|
|
19
25
|
}
|
|
20
26
|
|
|
@@ -4,36 +4,44 @@
|
|
|
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 drawing, which its own sheet clips
|
|
6
6
|
// out of 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; // WrChartLegend
|
|
8
9
|
@include theme.loaded('charts/treemap-chart');
|
|
9
10
|
|
|
11
|
+
// A tile's paint: its colour (`--wr-treemap-chart-tile-color`, which the component writes
|
|
12
|
+
// on every tile), by default whole. The share is a hook, so an app that wants the tints
|
|
13
|
+
// the chart had before 16.5 sets it back; it mixes toward the chart's background.
|
|
14
|
+
@function fill($share) {
|
|
15
|
+
@return color-mix(in srgb, var(--wr-treemap-chart-tile-color, var(--wr-chart-1)) $share, var(--wr-treemap-chart-bg));
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
.wr-treemap-chart {
|
|
11
19
|
--wr-treemap-chart-font-family: var(--wr-font-family-base);
|
|
12
|
-
// What the tiles'
|
|
20
|
+
// What shows behind the tiles, and what a tile's colour mixes toward below a whole share.
|
|
13
21
|
--wr-treemap-chart-bg: var(--wr-color-surface);
|
|
14
22
|
// The gap round every tile: an inset line in the surface colour on each, so two
|
|
15
23
|
// neighbours sit twice this apart. Drawn as an inset shadow, never a border or a margin:
|
|
16
24
|
// a margin takes area from the layout, and a border on a `border-box` tile is a floor
|
|
17
25
|
// under its size, so a sliver worth a fraction of a pixel would be drawn two wide and
|
|
18
|
-
// cover its group's edge.
|
|
19
|
-
//
|
|
20
|
-
// turns it into a line that is one.
|
|
26
|
+
// cover its group's edge. The chart theme's separator: the surface, which every palette
|
|
27
|
+
// colour holds 3:1 against, so the line between two solid tiles is one a reader can see.
|
|
21
28
|
--wr-treemap-chart-gap: 1px;
|
|
22
|
-
--wr-treemap-chart-gap-color: var(--wr-
|
|
23
|
-
--wr-treemap-chart-radius: var(--wr-
|
|
24
|
-
// How much of its colour a tile carries
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
--wr-treemap-chart-
|
|
29
|
+
--wr-treemap-chart-gap-color: var(--wr-chart-separator);
|
|
30
|
+
--wr-treemap-chart-radius: var(--wr-chart-bar-radius);
|
|
31
|
+
// How much of its colour a tile carries: all of it, the fill every chart on the theme
|
|
32
|
+
// draws. They were 34% and 14% tints, which went murky on a dark surface. The text on a
|
|
33
|
+
// tile is picked against the paint these make (see `__tile`), so a tint still reads.
|
|
34
|
+
--wr-treemap-chart-leaf-tint: 100%;
|
|
35
|
+
--wr-treemap-chart-group-tint: 100%;
|
|
36
|
+
// The box the chart keeps while it has no tiles to draw: empty, loading, a failed load.
|
|
37
|
+
--wr-treemap-chart-idle-bg: var(--wr-chart-track);
|
|
31
38
|
// The names and values written inside the tiles. The layout leaves a tile its name
|
|
32
39
|
// only from about 36 × 22 px, and its value under it from 38 px tall, measured for
|
|
33
40
|
// this type and padding; a larger type is clipped by the tile rather than spilling.
|
|
34
41
|
--wr-treemap-chart-label-font-size: var(--wr-text-xs);
|
|
35
42
|
--wr-treemap-chart-label-line-height: var(--wr-text-xs-leading);
|
|
36
|
-
|
|
43
|
+
// The fallback text colour, where the per-tile pick is not supported (see `__tile`).
|
|
44
|
+
--wr-treemap-chart-fallback-color: var(--wr-color-on-surface);
|
|
37
45
|
--wr-treemap-chart-label-font-weight: var(--wr-font-weight-medium);
|
|
38
46
|
--wr-treemap-chart-header-font-weight: var(--wr-font-weight-semibold);
|
|
39
47
|
--wr-treemap-chart-value-font-weight: var(--wr-font-weight-regular);
|
|
@@ -41,7 +49,9 @@
|
|
|
41
49
|
--wr-treemap-chart-header-gap: var(--wr-space-xs);
|
|
42
50
|
--wr-treemap-chart-label-padding-x: var(--wr-space-xs);
|
|
43
51
|
--wr-treemap-chart-label-padding-y: calc(var(--wr-space-xs) / 2);
|
|
44
|
-
// The tile the tooltip is about, ringed inside its own edge so it covers no neighbour
|
|
52
|
+
// The tile the tooltip is about, ringed inside its own edge so it covers no neighbour:
|
|
53
|
+
// a ring in the text colour with a line of the surface inside it, so one of the two
|
|
54
|
+
// shows on a tile of any colour.
|
|
45
55
|
--wr-treemap-chart-active-ring: var(--wr-color-on-surface);
|
|
46
56
|
--wr-treemap-chart-active-ring-width: 2px;
|
|
47
57
|
|
|
@@ -52,6 +62,12 @@
|
|
|
52
62
|
position: relative;
|
|
53
63
|
font-family: var(--wr-treemap-chart-font-family);
|
|
54
64
|
|
|
65
|
+
// What the state message is laid over: the plot's own box.
|
|
66
|
+
&__body {
|
|
67
|
+
position: relative;
|
|
68
|
+
min-width: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
55
71
|
// The tiles are positioned in percentages of this box, which is as wide as the chart
|
|
56
72
|
// and as tall as `height`.
|
|
57
73
|
&__plot {
|
|
@@ -60,6 +76,10 @@
|
|
|
60
76
|
overflow: hidden;
|
|
61
77
|
border-radius: var(--wr-treemap-chart-radius);
|
|
62
78
|
background: var(--wr-treemap-chart-bg);
|
|
79
|
+
|
|
80
|
+
&--idle {
|
|
81
|
+
background: var(--wr-treemap-chart-idle-bg);
|
|
82
|
+
}
|
|
63
83
|
}
|
|
64
84
|
|
|
65
85
|
&__tile {
|
|
@@ -77,29 +97,51 @@
|
|
|
77
97
|
// it. The text carries its own padding, below, and the gap is a shadow inside the edge.
|
|
78
98
|
border-radius: var(--wr-treemap-chart-radius);
|
|
79
99
|
box-shadow: inset 0 0 0 var(--wr-treemap-chart-gap) var(--wr-treemap-chart-gap-color);
|
|
80
|
-
background:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
);
|
|
85
|
-
color: var(--wr-treemap-chart-label-color);
|
|
100
|
+
background: fill(var(--wr-treemap-chart-leaf-tint));
|
|
101
|
+
// `--wr-treemap-chart-label-color` is not set by default: the text is picked per
|
|
102
|
+
// tile. Set it to paint every name and value in one colour instead.
|
|
103
|
+
color: var(--wr-treemap-chart-label-color, #{core-styles.ink(fill(var(--wr-treemap-chart-leaf-tint)))});
|
|
86
104
|
font-size: var(--wr-treemap-chart-label-font-size);
|
|
87
105
|
line-height: var(--wr-treemap-chart-label-line-height);
|
|
106
|
+
// The shared hover-dim fades a mark by its opacity, and a tile lies over its group:
|
|
107
|
+
// two faded layers would show through each other. A tile stays whole and takes a veil
|
|
108
|
+
// of the background instead (`::after`, below), which reads the same and stacks clean.
|
|
109
|
+
opacity: 1;
|
|
88
110
|
|
|
89
111
|
&--group {
|
|
90
|
-
background:
|
|
91
|
-
|
|
92
|
-
var(--wr-treemap-chart-tile-color, var(--wr-color-primary)) var(--wr-treemap-chart-group-tint),
|
|
93
|
-
var(--wr-treemap-chart-bg)
|
|
94
|
-
);
|
|
112
|
+
background: fill(var(--wr-treemap-chart-group-tint));
|
|
113
|
+
color: var(--wr-treemap-chart-label-color, #{core-styles.ink(fill(var(--wr-treemap-chart-group-tint)))});
|
|
95
114
|
}
|
|
96
115
|
|
|
116
|
+
// Set by hand on the one tile the tooltip is about, never bound on every tile.
|
|
97
117
|
&--active {
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
box-shadow:
|
|
119
|
+
inset 0 0 0 var(--wr-treemap-chart-active-ring-width) var(--wr-treemap-chart-active-ring),
|
|
120
|
+
inset 0 0 0 calc(var(--wr-treemap-chart-active-ring-width) + var(--wr-treemap-chart-gap))
|
|
121
|
+
var(--wr-treemap-chart-gap-color);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Where relative colour syntax is missing - Firefox before 128, inside the documented
|
|
126
|
+
// floor - the pick above is dropped. There the text sits on a chip of the background in
|
|
127
|
+
// the chart's text colour, which reads on a tile of any colour and in either scheme.
|
|
128
|
+
@supports not (color: #{core-styles.ink(red)}) {
|
|
129
|
+
&__tile {
|
|
130
|
+
color: var(--wr-treemap-chart-label-color, var(--wr-treemap-chart-fallback-color));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&__label,
|
|
134
|
+
&__value {
|
|
135
|
+
background: var(--wr-treemap-chart-bg);
|
|
100
136
|
}
|
|
101
137
|
}
|
|
102
138
|
|
|
139
|
+
// The legend's room from the plot, on whichever side it sits.
|
|
140
|
+
&__legend {
|
|
141
|
+
--wr-treemap-chart-legend-space: var(--wr-space-md);
|
|
142
|
+
--wr-chart-legend-space: var(--wr-treemap-chart-legend-space);
|
|
143
|
+
}
|
|
144
|
+
|
|
103
145
|
// A group's name and figure, in the strip the layout left above its children. Its
|
|
104
146
|
// height is written inline from the layout's own number. The figure WRAPS rather than
|
|
105
147
|
// shrinks when the two do not fit on one line, onto a second line the strip clips: the
|
|
@@ -182,27 +224,33 @@
|
|
|
182
224
|
}
|
|
183
225
|
}
|
|
184
226
|
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
227
|
+
// Hover. The shared rule dims by opacity, which a tile opts out of (see `__tile`): every
|
|
228
|
+
// tile outside the top-level node under the pointer, or outside a hovered legend row's,
|
|
229
|
+
// takes a veil of the background at the theme's dim instead. A pseudo-element that exists
|
|
230
|
+
// only while the chart is dimmed, so a thousand tiles at rest carry no extra box; it
|
|
231
|
+
// fades in where the browser can start a transition from `@starting-style`.
|
|
232
|
+
.wr-chart--dim .wr-treemap-chart__tile:not(.wr-chart-mark--on)::after {
|
|
233
|
+
content: '';
|
|
234
|
+
position: absolute;
|
|
235
|
+
inset: 0;
|
|
236
|
+
background: var(--wr-treemap-chart-bg);
|
|
237
|
+
opacity: calc(1 - var(--wr-chart-dim));
|
|
238
|
+
pointer-events: none;
|
|
239
|
+
transition: opacity var(--wr-chart-duration-short) var(--wr-chart-ease);
|
|
240
|
+
|
|
241
|
+
@starting-style {
|
|
242
|
+
opacity: 0;
|
|
196
243
|
}
|
|
197
244
|
}
|
|
198
245
|
|
|
199
|
-
// Forced colors resets every tile's
|
|
246
|
+
// Forced colors resets every tile's background to `Canvas`, and that is left to
|
|
200
247
|
// happen rather than opted out of, as the bars are: a bar painted as the page vanishes,
|
|
201
248
|
// while a tile keeps its edge, its name and its place inside its group, which are what
|
|
202
249
|
// tell the groups apart anyway. The edge is what has to survive, and the shadow that
|
|
203
250
|
// draws the gap is dropped here, so it is an inset OUTLINE in the text colour — an outline
|
|
204
251
|
// because, like the shadow, it takes no room and sets no floor under a tile's size. The
|
|
205
|
-
// tile the tooltip is about keeps its wider outline, in the highlight colour.
|
|
252
|
+
// tile the tooltip is about keeps its wider outline, in the highlight colour. The veil of
|
|
253
|
+
// a dimmed tile would be `Canvas` over `Canvas`, and is dropped.
|
|
206
254
|
@media (forced-colors: active) {
|
|
207
255
|
.wr-treemap-chart__tile {
|
|
208
256
|
outline: var(--wr-treemap-chart-gap) solid CanvasText;
|
|
@@ -213,4 +261,8 @@
|
|
|
213
261
|
outline: var(--wr-treemap-chart-active-ring-width) solid Highlight;
|
|
214
262
|
outline-offset: calc(-1 * var(--wr-treemap-chart-active-ring-width));
|
|
215
263
|
}
|
|
264
|
+
|
|
265
|
+
.wr-chart--dim .wr-treemap-chart__tile:not(.wr-chart-mark--on)::after {
|
|
266
|
+
content: none;
|
|
267
|
+
}
|
|
216
268
|
}
|
|
@@ -1,71 +1,77 @@
|
|
|
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
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
|
|
4
|
+
// Styles for the entry points this component's own markup renders: the chart theme every
|
|
5
|
+
// hook below defaults to (`--wr-chart-*`), the empty / loading / error message, and the
|
|
6
|
+
// `<wr-chart-table>` that `dataTable` renders beside the plot, which its own rule clips
|
|
7
|
+
// out of sight.
|
|
8
|
+
@use '../../core/styles' as core-styles; // WrChartTable, WrChartState
|
|
8
9
|
@include theme.loaded('charts/waterfall-chart');
|
|
9
10
|
|
|
10
11
|
.wr-waterfall-chart {
|
|
11
12
|
--wr-waterfall-chart-font-family: var(--wr-font-family-base);
|
|
12
13
|
--wr-waterfall-chart-color: var(--wr-color-on-surface);
|
|
13
|
-
// Between two bars, and so the length of the connector that crosses it
|
|
14
|
-
//
|
|
15
|
-
|
|
14
|
+
// Between two bars, and so the length of the connector that crosses it: a share of one
|
|
15
|
+
// step's band, which is the step's own box, so every part of a step reads it against the
|
|
16
|
+
// same width. A length works too. Never more than half a band (see `$gap` below).
|
|
17
|
+
--wr-waterfall-chart-gap: var(--wr-chart-gap);
|
|
16
18
|
// The room over and under the drawing with no figures printed; with them it grows to a
|
|
17
19
|
// figure's line (see `$value-room` below).
|
|
18
20
|
--wr-waterfall-chart-plot-inset-y: var(--wr-space-sm);
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
--wr-waterfall-chart-bar-radius:
|
|
22
|
-
--wr-waterfall-chart-grid-color:
|
|
23
|
-
|
|
21
|
+
// On the end a bar runs to only - the top of a change up, the bottom of a change down -
|
|
22
|
+
// so the end it starts from, which a connector meets, stays square.
|
|
23
|
+
--wr-waterfall-chart-bar-radius: var(--wr-chart-bar-radius);
|
|
24
|
+
--wr-waterfall-chart-grid-color: var(--wr-chart-grid);
|
|
25
|
+
// The zero line, which every total stands on.
|
|
26
|
+
--wr-waterfall-chart-baseline-color: var(--wr-chart-zero);
|
|
24
27
|
// Dashed, so a connector is never read as a gridline: both are thin horizontal lines, and
|
|
25
28
|
// a connector stops at the next bar where a gridline crosses the plot.
|
|
26
|
-
--wr-waterfall-chart-connector-color: var(--wr-
|
|
29
|
+
--wr-waterfall-chart-connector-color: var(--wr-chart-axis);
|
|
27
30
|
--wr-waterfall-chart-connector-width: 1px;
|
|
28
31
|
// The hairline of a change of zero: neither an increase nor a decrease, so no intent —
|
|
29
|
-
// the running total carried through, in the
|
|
30
|
-
--wr-waterfall-chart-flat-color: var(--wr-
|
|
31
|
-
--wr-waterfall-chart-tick-gap: var(--wr-space-
|
|
32
|
-
--wr-waterfall-chart-tick-font-size: var(--wr-
|
|
32
|
+
// the running total carried through, in the palette's neutral.
|
|
33
|
+
--wr-waterfall-chart-flat-color: var(--wr-chart-8);
|
|
34
|
+
--wr-waterfall-chart-tick-gap: var(--wr-space-sm);
|
|
35
|
+
--wr-waterfall-chart-tick-font-size: var(--wr-chart-label-size);
|
|
33
36
|
--wr-waterfall-chart-tick-line-height: var(--wr-text-xs-leading);
|
|
34
|
-
--wr-waterfall-chart-tick-color: var(--wr-
|
|
35
|
-
// The figure past a bar's end
|
|
36
|
-
|
|
37
|
-
--wr-waterfall-chart-value-font-size: var(--wr-text-xs);
|
|
37
|
+
--wr-waterfall-chart-tick-color: var(--wr-chart-label);
|
|
38
|
+
// The figure past a bar's end, in the muted ink every chart prints its values in.
|
|
39
|
+
--wr-waterfall-chart-value-font-size: var(--wr-chart-label-size);
|
|
38
40
|
--wr-waterfall-chart-value-line-height: var(--wr-text-xs-leading);
|
|
39
|
-
--wr-waterfall-chart-value-color: var(--wr-
|
|
41
|
+
--wr-waterfall-chart-value-color: var(--wr-chart-label);
|
|
40
42
|
--wr-waterfall-chart-value-gap: var(--wr-space-xs);
|
|
41
|
-
--wr-waterfall-chart-label-font-size: var(--wr-
|
|
42
|
-
--wr-waterfall-chart-label-color: var(--wr-
|
|
43
|
+
--wr-waterfall-chart-label-font-size: var(--wr-chart-label-size);
|
|
44
|
+
--wr-waterfall-chart-label-color: var(--wr-chart-label);
|
|
43
45
|
--wr-waterfall-chart-labels-margin-top: var(--wr-space-sm);
|
|
44
46
|
// A total's figure and label, a step heavier than a change's: one of the cues that tells
|
|
45
47
|
// a total apart without its colour.
|
|
46
48
|
--wr-waterfall-chart-total-font-weight: var(--wr-font-weight-medium);
|
|
47
|
-
// The
|
|
48
|
-
--wr-waterfall-chart-active-bg:
|
|
49
|
+
// The band behind the step the tooltip is about.
|
|
50
|
+
--wr-waterfall-chart-active-bg: var(--wr-chart-band);
|
|
51
|
+
// How long a bar takes to reach a new value. 0s under reduced motion, with the token.
|
|
52
|
+
--wr-waterfall-chart-duration: var(--wr-chart-duration);
|
|
49
53
|
|
|
50
54
|
// The room over and under the drawing: a figure's line and its gap when figures are
|
|
51
55
|
// printed, so one past the highest or lowest bar stays inside the plot rather than over
|
|
52
|
-
//
|
|
56
|
+
// whatever is above or the labels below.
|
|
53
57
|
$room: var(--wr-waterfall-chart-plot-inset-y);
|
|
54
58
|
$value-room: max(
|
|
55
59
|
var(--wr-waterfall-chart-plot-inset-y),
|
|
56
60
|
calc(var(--wr-waterfall-chart-value-line-height) + var(--wr-waterfall-chart-value-gap))
|
|
57
61
|
);
|
|
58
62
|
|
|
59
|
-
// The gap as drawn: the hook, held to a
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
// The gap as drawn: the hook, held to half a band. Every step is a whole band - an nth
|
|
64
|
+
// of the drawing, with no gap between two - and its bar sits half the gap in from each
|
|
65
|
+
// side of it, so the gap between two bars is the hook resolved against a band wherever
|
|
66
|
+
// it is read: by the bar, by the connector that crosses it and by the figure's padding.
|
|
67
|
+
// A share of a band narrows with the bars; a length that outgrows them stops at half a
|
|
68
|
+
// band, where a fixed 8px squeezed the bars of a 150-step chart to nothing.
|
|
69
|
+
$gap: min(var(--wr-waterfall-chart-gap), 50%);
|
|
70
|
+
|
|
71
|
+
// The bar's two ends, as shares of the drawing's height from its bottom, which the
|
|
72
|
+
// component writes on the step.
|
|
73
|
+
$lo: var(--wr-waterfall-chart-lo, 0);
|
|
74
|
+
$hi: var(--wr-waterfall-chart-hi, 0);
|
|
69
75
|
|
|
70
76
|
display: block;
|
|
71
77
|
// The containing block of the out-of-flow `dataTable` copy, as on every chart that
|
|
@@ -81,6 +87,16 @@
|
|
|
81
87
|
grid-template-columns: auto minmax(0, 1fr);
|
|
82
88
|
}
|
|
83
89
|
|
|
90
|
+
// The top tick is centred on the top gridline, so half of it stands over the drawing's
|
|
91
|
+
// top: inside the plot's own block padding by default, and given room here where a hook
|
|
92
|
+
// makes the tick taller than that, so it never leaves the chart's box.
|
|
93
|
+
&--axis &__body {
|
|
94
|
+
padding-block-start: max(
|
|
95
|
+
0px,
|
|
96
|
+
calc(var(--wr-waterfall-chart-tick-line-height) / 2 - var(--wr-waterfall-chart-plot-inset-y))
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
// As wide as the longest label: every label is in flow, in the one cell of a one-cell
|
|
85
101
|
// grid, so the column sizes to the widest while its height stays one label. It carries
|
|
86
102
|
// the plot's block padding, so its cell is exactly the drawing's height, and each label
|
|
@@ -124,12 +140,12 @@
|
|
|
124
140
|
padding-block: $value-room;
|
|
125
141
|
}
|
|
126
142
|
|
|
127
|
-
// The drawing: one
|
|
128
|
-
//
|
|
143
|
+
// The drawing: one band per step, side by side with nothing between them, so the pointer
|
|
144
|
+
// is always on one. The gridlines, the zero line and each band's parts are placed in it
|
|
145
|
+
// by percentage of its height from the bottom. Also the box the state message sits in.
|
|
129
146
|
&__track {
|
|
130
147
|
position: relative;
|
|
131
148
|
display: flex;
|
|
132
|
-
gap: $gap-in-row;
|
|
133
149
|
height: 100%;
|
|
134
150
|
}
|
|
135
151
|
|
|
@@ -137,8 +153,8 @@
|
|
|
137
153
|
&__baseline {
|
|
138
154
|
position: absolute;
|
|
139
155
|
inset-inline: 0;
|
|
140
|
-
//
|
|
141
|
-
|
|
156
|
+
// On the pixel just above its level, inside the plot: a bar that reaches the level
|
|
157
|
+
// covers it, and a bar of 0 is no bar at all.
|
|
142
158
|
pointer-events: none;
|
|
143
159
|
}
|
|
144
160
|
|
|
@@ -152,44 +168,99 @@
|
|
|
152
168
|
border-block-start: 1px solid var(--wr-waterfall-chart-baseline-color);
|
|
153
169
|
}
|
|
154
170
|
|
|
155
|
-
// The full height of the drawing, so the whole
|
|
156
|
-
//
|
|
171
|
+
// The full height of the drawing, so the whole band answers the pointer, and as wide as
|
|
172
|
+
// a share of the plot.
|
|
157
173
|
&__step {
|
|
158
174
|
position: relative;
|
|
159
175
|
flex: 1 1 0;
|
|
160
176
|
min-width: 0;
|
|
177
|
+
transition: background-color var(--wr-chart-duration-short) var(--wr-chart-ease);
|
|
161
178
|
}
|
|
162
179
|
|
|
163
180
|
&__step--active {
|
|
164
|
-
background: var(--wr-waterfall-chart-active-bg);
|
|
181
|
+
background-color: var(--wr-waterfall-chart-active-bg);
|
|
165
182
|
}
|
|
166
183
|
|
|
184
|
+
// ── The bar ───────────────────────────────────────────────────────────────────────
|
|
185
|
+
//
|
|
167
186
|
// From one end to the other of what the step spans: a change from the running total
|
|
168
|
-
// before it to the one after, a total from zero.
|
|
187
|
+
// before it to the one after, a total from zero. Two boxes, each as tall as the drawing
|
|
188
|
+
// and each moved by a TRANSFORM, so a new value is a compositor animation rather than a
|
|
189
|
+
// layout pass per frame per bar, which transitions of `bottom` and `height` were:
|
|
190
|
+
//
|
|
191
|
+
// - the CLIP is lifted until its bottom edge is the bar's lower end, and clips what it
|
|
192
|
+
// holds;
|
|
193
|
+
// - the BAR inside it, which carries the paint, is lowered until its top edge is the
|
|
194
|
+
// bar's upper end.
|
|
195
|
+
//
|
|
196
|
+
// What shows is where the two overlap: the bar. Nothing is scaled, so a rounded end
|
|
197
|
+
// keeps its shape while it moves - the clip rounds the lower end and the painted box
|
|
198
|
+
// the upper one, each only on the step that runs that way. The clip reaches above the
|
|
199
|
+
// drawing by however far the bar starts from the bottom, painting nothing there; it
|
|
200
|
+
// takes no pointer, and room above a box is never scrollable. The painted box reaches
|
|
201
|
+
// below, inside the clip, which is what keeps it out of any scroller's reach.
|
|
202
|
+
&__clip {
|
|
203
|
+
position: absolute;
|
|
204
|
+
inset-block: 0;
|
|
205
|
+
inset-inline: calc($gap / 2);
|
|
206
|
+
overflow: clip;
|
|
207
|
+
transform: translateY(calc($lo * -1%));
|
|
208
|
+
transition: transform var(--wr-waterfall-chart-duration) var(--wr-chart-ease);
|
|
209
|
+
pointer-events: none;
|
|
210
|
+
}
|
|
211
|
+
|
|
169
212
|
&__bar {
|
|
170
213
|
position: absolute;
|
|
171
|
-
inset
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
min-height: 1px;
|
|
175
|
-
border-radius: var(--wr-waterfall-chart-bar-radius);
|
|
176
|
-
transition:
|
|
177
|
-
bottom var(--wr-duration-slow) var(--wr-ease-out),
|
|
178
|
-
height var(--wr-duration-slow) var(--wr-ease-out);
|
|
214
|
+
inset: 0;
|
|
215
|
+
transform: translateY(calc((100 - ($hi - $lo)) * 1%));
|
|
216
|
+
transition: transform var(--wr-waterfall-chart-duration) var(--wr-chart-ease);
|
|
179
217
|
// The bar is an inline `background`, which forced colors resets to `Canvas`: every bar
|
|
180
218
|
// would vanish into the page and leave its figure floating. The SVG charts keep their
|
|
181
219
|
// fills there, so the HTML marks do too.
|
|
182
220
|
forced-color-adjust: none;
|
|
183
221
|
}
|
|
184
222
|
|
|
185
|
-
//
|
|
223
|
+
// The end a step runs to, rounded: the top of a change up and of a total above zero,
|
|
224
|
+
// which is the painted box's own top edge.
|
|
225
|
+
&__step--increase &__bar,
|
|
226
|
+
&__step--total:not(&__step--down) &__bar {
|
|
227
|
+
border-start-start-radius: var(--wr-waterfall-chart-bar-radius);
|
|
228
|
+
border-start-end-radius: var(--wr-waterfall-chart-bar-radius);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// And the bottom of a change down and of a total below zero, which is the clip's.
|
|
232
|
+
&__step--down &__clip {
|
|
233
|
+
border-end-start-radius: var(--wr-waterfall-chart-bar-radius);
|
|
234
|
+
border-end-end-radius: var(--wr-waterfall-chart-bar-radius);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// No inline paint on a change of zero, so the hook paints it: a hairline, since its two
|
|
238
|
+
// ends are one level and the overlap would be nothing.
|
|
186
239
|
&__step--flat &__bar {
|
|
187
240
|
background: var(--wr-waterfall-chart-flat-color);
|
|
241
|
+
transform: translateY(calc(100% - 1px));
|
|
188
242
|
}
|
|
189
243
|
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
//
|
|
244
|
+
// ── The figure ────────────────────────────────────────────────────────────────────
|
|
245
|
+
//
|
|
246
|
+
// Past the end the step runs to: over its top, or under its bottom with `--below`. The
|
|
247
|
+
// slot is as tall as the drawing and lifted by a transform until its bottom edge is
|
|
248
|
+
// that end, so the figure follows its bar without a layout pass; the line stands on
|
|
249
|
+
// that edge, or hangs from it. Upwards only, as the bar's clip: nothing to scroll to.
|
|
250
|
+
&__value-slot {
|
|
251
|
+
position: absolute;
|
|
252
|
+
inset: 0;
|
|
253
|
+
transform: translateY(calc($hi * -1%));
|
|
254
|
+
transition: transform var(--wr-waterfall-chart-duration) var(--wr-chart-ease);
|
|
255
|
+
pointer-events: none;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&__value-slot--below {
|
|
259
|
+
transform: translateY(calc($lo * -1%));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Its room is its band, less a quarter of the gap of padding on either side, so two
|
|
263
|
+
// neighbours' figures always stand half a gap apart.
|
|
193
264
|
//
|
|
194
265
|
// A figure is printed whole or not at all, with no measuring, as the heatmap's values
|
|
195
266
|
// are: the box is a wrapping flex line one figure tall, led by a zero-width item. A
|
|
@@ -199,21 +270,19 @@
|
|
|
199
270
|
// the name and the data table carry the whole figure.
|
|
200
271
|
&__value {
|
|
201
272
|
position: absolute;
|
|
202
|
-
inset-inline:
|
|
203
|
-
bottom:
|
|
273
|
+
inset-inline: 0;
|
|
274
|
+
bottom: var(--wr-waterfall-chart-value-gap);
|
|
204
275
|
display: flex;
|
|
205
276
|
flex-wrap: wrap;
|
|
206
277
|
justify-content: center;
|
|
207
278
|
box-sizing: border-box;
|
|
208
279
|
block-size: var(--wr-waterfall-chart-value-line-height);
|
|
209
|
-
padding-inline: calc($gap
|
|
280
|
+
padding-inline: calc($gap / 4);
|
|
210
281
|
overflow: hidden;
|
|
211
282
|
font-size: var(--wr-waterfall-chart-value-font-size);
|
|
212
283
|
line-height: var(--wr-waterfall-chart-value-line-height);
|
|
213
284
|
color: var(--wr-waterfall-chart-value-color);
|
|
214
285
|
font-variant-numeric: tabular-nums;
|
|
215
|
-
pointer-events: none;
|
|
216
|
-
transition: bottom var(--wr-duration-slow) var(--wr-ease-out);
|
|
217
286
|
|
|
218
287
|
&::before {
|
|
219
288
|
content: '';
|
|
@@ -232,46 +301,38 @@
|
|
|
232
301
|
unicode-bidi: plaintext;
|
|
233
302
|
}
|
|
234
303
|
|
|
235
|
-
// Not past either end of the plot, where there is no gap to borrow: past the last bar
|
|
236
|
-
// it would reach out of the chart's own box and give a scroller 4px to scroll. The steps
|
|
237
|
-
// are the track's only `div`s, between the gridlines and the zero line.
|
|
238
|
-
&__step:first-of-type &__value {
|
|
239
|
-
inset-inline-start: 0;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
&__step:last-of-type &__value {
|
|
243
|
-
inset-inline-end: 0;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
304
|
&__value--below {
|
|
247
|
-
top: calc(
|
|
305
|
+
top: calc(100% + var(--wr-waterfall-chart-value-gap));
|
|
248
306
|
bottom: auto;
|
|
249
|
-
transition: top var(--wr-duration-slow) var(--wr-ease-out);
|
|
250
307
|
}
|
|
251
308
|
|
|
252
309
|
&__step--total &__value {
|
|
253
310
|
font-weight: var(--wr-waterfall-chart-total-font-weight);
|
|
254
311
|
}
|
|
255
312
|
|
|
256
|
-
// From this
|
|
257
|
-
//
|
|
313
|
+
// From this bar's inline end across the gap to the next one, on the running total the
|
|
314
|
+
// next bar starts from. Logical, so under RTL it crosses to the left. As tall as the
|
|
315
|
+
// drawing with the line on its bottom edge, and lifted to its level by a transform, as
|
|
316
|
+
// the bar is.
|
|
258
317
|
&__connector {
|
|
259
318
|
position: absolute;
|
|
260
|
-
inset-
|
|
261
|
-
|
|
262
|
-
inline-size: $gap
|
|
263
|
-
|
|
264
|
-
|
|
319
|
+
inset-block: 0;
|
|
320
|
+
inset-inline-start: calc(100% - $gap / 2);
|
|
321
|
+
inline-size: $gap;
|
|
322
|
+
box-sizing: border-box;
|
|
323
|
+
border-block-end: var(--wr-waterfall-chart-connector-width) dashed var(--wr-waterfall-chart-connector-color);
|
|
324
|
+
transform: translateY(
|
|
325
|
+
calc(var(--wr-waterfall-chart-level, 0) * -1% + var(--wr-waterfall-chart-connector-width) / 2)
|
|
326
|
+
);
|
|
327
|
+
transition: transform var(--wr-waterfall-chart-duration) var(--wr-chart-ease);
|
|
265
328
|
pointer-events: none;
|
|
266
|
-
transition: bottom var(--wr-duration-slow) var(--wr-ease-out);
|
|
267
329
|
}
|
|
268
330
|
|
|
269
|
-
// A slot per step
|
|
331
|
+
// A slot per step, each a whole band, so each label sits under its bar.
|
|
270
332
|
&__labels {
|
|
271
333
|
grid-column: 2;
|
|
272
334
|
grid-row: 2;
|
|
273
335
|
display: flex;
|
|
274
|
-
gap: $gap-in-row;
|
|
275
336
|
margin-block-start: var(--wr-waterfall-chart-labels-margin-top);
|
|
276
337
|
}
|
|
277
338
|
|
|
@@ -297,8 +358,10 @@
|
|
|
297
358
|
// A bar that moves to its new ends is motion nothing asked for twice: the new figure is
|
|
298
359
|
// what matters, and it is drawn at once.
|
|
299
360
|
@media (prefers-reduced-motion: reduce) {
|
|
361
|
+
.wr-waterfall-chart__step,
|
|
362
|
+
.wr-waterfall-chart__clip,
|
|
300
363
|
.wr-waterfall-chart__bar,
|
|
301
|
-
.wr-waterfall-chart__value,
|
|
364
|
+
.wr-waterfall-chart__value-slot,
|
|
302
365
|
.wr-waterfall-chart__connector {
|
|
303
366
|
transition: none;
|
|
304
367
|
}
|
|
@@ -358,6 +358,10 @@
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
// The overlay pane `[wrColorPickerTrigger]` opens needs no
|
|
362
|
-
// `.wr-color-picker` brings its own border and shadow, and a `z-index` on
|
|
363
|
-
// pane does nothing — see the note in `ngwr/date-picker`.
|
|
361
|
+
// The overlay pane `[wrColorPickerTrigger]` opens needs no box of its own: the
|
|
362
|
+
// inner `.wr-color-picker` brings its own border and shadow, and a `z-index` on
|
|
363
|
+
// a pane does nothing — see the note in `ngwr/date-picker`. It takes focus under
|
|
364
|
+
// `autoFocus="dialog"`, as `tabindex="-1"`: a container is not a control to ring.
|
|
365
|
+
.wr-color-picker-overlay:focus {
|
|
366
|
+
outline: none;
|
|
367
|
+
}
|