ngwr 15.0.0 → 15.1.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/anchor/styles/_index.scss +13 -2
- package/bits/dot-grid/dot-grid.scss +1 -0
- package/bits/dot-grid/styles/_index.scss +8 -0
- package/bits/dot-grid/styles/_rules.scss +46 -0
- package/bits/ripple-grid/ripple-grid.scss +1 -0
- package/bits/ripple-grid/styles/_index.scss +8 -0
- package/bits/ripple-grid/styles/_rules.scss +55 -0
- package/bits/threads/styles/_index.scss +8 -0
- package/bits/threads/styles/_rules.scss +68 -0
- package/bits/threads/threads.scss +1 -0
- package/charts/bar-chart/styles/_index.scss +607 -7
- package/charts/boxplot-chart/styles/_index.scss +297 -0
- package/charts/bullet-chart/styles/_index.scss +268 -0
- package/charts/calendar-heatmap/styles/_index.scss +25 -3
- package/charts/candlestick-chart/styles/_index.scss +307 -0
- package/charts/chart-legend/styles/_index.scss +143 -0
- package/charts/core/styles/_index.scss +30 -0
- package/charts/donut-chart/styles/_index.scss +39 -3
- package/charts/funnel-chart/styles/_index.scss +237 -0
- package/charts/gauge/styles/_index.scss +4 -2
- package/charts/heatmap-chart/styles/_index.scss +329 -0
- package/charts/line-chart/styles/_index.scss +141 -8
- package/charts/meter-group/styles/_index.scss +44 -13
- package/charts/radar-chart/styles/_index.scss +206 -0
- package/charts/scatter-chart/styles/_index.scss +245 -0
- package/charts/sparkline/styles/_index.scss +10 -1
- package/charts/treemap-chart/styles/_index.scss +215 -0
- package/charts/waterfall-chart/styles/_index.scss +321 -0
- package/collapse/styles/_index.scss +6 -1
- package/fesm2022/ngwr-bits-dot-grid-testing.mjs +40 -0
- package/fesm2022/ngwr-bits-dot-grid-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bits-dot-grid.mjs +479 -0
- package/fesm2022/ngwr-bits-dot-grid.mjs.map +1 -0
- package/fesm2022/ngwr-bits-ripple-grid-testing.mjs +40 -0
- package/fesm2022/ngwr-bits-ripple-grid-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bits-ripple-grid.mjs +808 -0
- package/fesm2022/ngwr-bits-ripple-grid.mjs.map +1 -0
- package/fesm2022/ngwr-bits-threads-testing.mjs +41 -0
- package/fesm2022/ngwr-bits-threads-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bits-threads.mjs +477 -0
- package/fesm2022/ngwr-bits-threads.mjs.map +1 -0
- package/fesm2022/ngwr-bits-waves-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bits-waves.mjs +49 -34
- package/fesm2022/ngwr-bits-waves.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +2 -2
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs +127 -3
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +680 -46
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +161 -0
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +517 -0
- package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-bullet-chart-testing.mjs +68 -0
- package/fesm2022/ngwr-charts-bullet-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-bullet-chart.mjs +459 -0
- package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-calendar-heatmap-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-calendar-heatmap-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +93 -14
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +107 -0
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +508 -0
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-chart-legend-testing.mjs +126 -0
- package/fesm2022/ngwr-charts-chart-legend-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-chart-legend.mjs +251 -0
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -0
- package/fesm2022/ngwr-charts-core.mjs +383 -0
- package/fesm2022/ngwr-charts-core.mjs.map +1 -0
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs +10 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +184 -28
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +100 -0
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-funnel-chart.mjs +415 -0
- package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-gauge-testing.mjs +9 -3
- package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge.mjs +6 -12
- package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-charts-heatmap-chart-testing.mjs +120 -0
- package/fesm2022/ngwr-charts-heatmap-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +519 -0
- package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +43 -1
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +433 -119
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +14 -2
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +98 -29
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs +98 -0
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-radar-chart.mjs +720 -0
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +132 -0
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-scatter-chart.mjs +545 -0
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-sparkline-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +11 -13
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-charts-treemap-chart-testing.mjs +103 -0
- package/fesm2022/ngwr-charts-treemap-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-treemap-chart.mjs +535 -0
- package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -0
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +131 -0
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +462 -0
- package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ar.mjs +90 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +90 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +90 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +90 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +90 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +90 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +90 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +90 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +90 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +90 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +90 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +90 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +90 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +90 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +90 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +90 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +90 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +90 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +90 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +90 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +90 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +90 -4
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +2 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +31 -8
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +2 -2
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +2 -1
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +25 -6
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +61 -5
- package/fesm2022/ngwr-window-testing.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +1526 -883
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/fesm2022/ngwr.mjs.map +1 -1
- package/i18n/ar.json +84 -4
- package/i18n/cs.json +84 -4
- package/i18n/de.json +84 -4
- package/i18n/en.json +84 -4
- package/i18n/es.json +84 -4
- package/i18n/fr.json +84 -4
- package/i18n/he.json +84 -4
- package/i18n/hi.json +84 -4
- package/i18n/id.json +84 -4
- package/i18n/it.json +84 -4
- package/i18n/ja.json +84 -4
- package/i18n/ko.json +84 -4
- package/i18n/nl.json +84 -4
- package/i18n/pl.json +84 -4
- package/i18n/pt.json +84 -4
- package/i18n/ru.json +84 -4
- package/i18n/sv.json +84 -4
- package/i18n/tr.json +84 -4
- package/i18n/uk.json +84 -4
- package/i18n/vi.json +84 -4
- package/i18n/zh-TW.json +84 -4
- package/i18n/zh.json +84 -4
- package/llms-full.txt +254 -8
- package/llms.txt +31 -8
- package/mcp/api.js +69 -1
- package/mcp/catalog.js +10 -1
- package/mcp/tools.js +119 -23
- package/package.json +129 -7
- package/popover/styles/_index.scss +75 -7
- package/schematics/component-style/index.js +3 -0
- package/schematics/migrations/v15/index.js +8 -28
- package/schematics/ng-add/index.js +1 -1
- package/schematics/use/symbol-map.json +13 -0
- package/schematics/utility/global-styles.js +19 -4
- package/schematics/utility/v15-moves.js +55 -0
- package/skills/ngwr/SKILL.md +8 -2
- package/skills/ngwr/references/catalog.md +26 -0
- package/skills/ngwr/references/setup.md +5 -4
- package/theme/styles/_focus.scss +8 -0
- package/toast/styles/_index.scss +103 -12
- package/types/ngwr-bits-dot-grid-testing.d.ts +92 -0
- package/types/ngwr-bits-dot-grid.d.ts +153 -0
- package/types/ngwr-bits-ripple-grid-testing.d.ts +96 -0
- package/types/ngwr-bits-ripple-grid.d.ts +297 -0
- package/types/ngwr-bits-threads-testing.d.ts +97 -0
- package/types/ngwr-bits-threads.d.ts +213 -0
- package/types/ngwr-bits-waves-testing.d.ts +1 -1
- package/types/ngwr-bits-waves.d.ts +16 -2
- package/types/ngwr-charts-bar-chart-testing.d.ts +193 -14
- package/types/ngwr-charts-bar-chart.d.ts +546 -38
- package/types/ngwr-charts-boxplot-chart-testing.d.ts +165 -0
- package/types/ngwr-charts-boxplot-chart.d.ts +308 -0
- package/types/ngwr-charts-bullet-chart-testing.d.ts +99 -0
- package/types/ngwr-charts-bullet-chart.d.ts +262 -0
- package/types/ngwr-charts-calendar-heatmap-testing.d.ts +32 -1
- package/types/ngwr-charts-calendar-heatmap.d.ts +55 -6
- package/types/ngwr-charts-candlestick-chart-testing.d.ts +135 -0
- package/types/ngwr-charts-candlestick-chart.d.ts +361 -0
- package/types/ngwr-charts-chart-legend-testing.d.ts +84 -0
- package/types/ngwr-charts-chart-legend.d.ts +178 -0
- package/types/ngwr-charts-core.d.ts +401 -0
- package/types/ngwr-charts-donut-chart-testing.d.ts +28 -5
- package/types/ngwr-charts-donut-chart.d.ts +124 -12
- package/types/ngwr-charts-funnel-chart-testing.d.ts +130 -0
- package/types/ngwr-charts-funnel-chart.d.ts +296 -0
- package/types/ngwr-charts-gauge-testing.d.ts +5 -0
- package/types/ngwr-charts-gauge.d.ts +6 -4
- package/types/ngwr-charts-heatmap-chart-testing.d.ts +148 -0
- package/types/ngwr-charts-heatmap-chart.d.ts +359 -0
- package/types/ngwr-charts-line-chart-testing.d.ts +72 -11
- package/types/ngwr-charts-line-chart.d.ts +291 -67
- package/types/ngwr-charts-meter-group-testing.d.ts +16 -2
- package/types/ngwr-charts-meter-group.d.ts +71 -11
- package/types/ngwr-charts-radar-chart-testing.d.ts +162 -0
- package/types/ngwr-charts-radar-chart.d.ts +461 -0
- package/types/ngwr-charts-scatter-chart-testing.d.ts +147 -0
- package/types/ngwr-charts-scatter-chart.d.ts +396 -0
- package/types/ngwr-charts-sparkline-testing.d.ts +4 -1
- package/types/ngwr-charts-sparkline.d.ts +8 -6
- package/types/ngwr-charts-treemap-chart-testing.d.ts +131 -0
- package/types/ngwr-charts-treemap-chart.d.ts +295 -0
- package/types/ngwr-charts-waterfall-chart-testing.d.ts +149 -0
- package/types/ngwr-charts-waterfall-chart.d.ts +338 -0
- package/types/ngwr-popover.d.ts +29 -2
- package/types/ngwr-toast-testing.d.ts +6 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window-testing.d.ts +65 -7
- package/types/ngwr-window.d.ts +885 -205
- package/types/ngwr.d.ts +1 -0
- package/window/styles/_index.scss +528 -82
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
@use '../../theme/styles' as theme;
|
|
2
2
|
|
|
3
|
+
// One level of indent: the host's own, and again for a nested list. The active
|
|
4
|
+
// bar reaches back across every indent its link sits behind, so the two are one
|
|
5
|
+
// number.
|
|
6
|
+
$indent: 0.875rem;
|
|
7
|
+
|
|
3
8
|
.wr-anchor {
|
|
4
9
|
--wr-anchor-font-family: var(--wr-font-family-base);
|
|
5
10
|
--wr-anchor-border: var(--wr-border-base);
|
|
@@ -20,7 +25,7 @@
|
|
|
20
25
|
// the 1.5px bar lands at -0.5px and overlaps the rail it replaces. The
|
|
21
26
|
// scale's nearest step is 16px, which paints the bar at 1.5px and opens a
|
|
22
27
|
// gap between the marker and the rail at every nesting level.
|
|
23
|
-
padding-inline-start:
|
|
28
|
+
padding-inline-start: $indent;
|
|
24
29
|
|
|
25
30
|
&__list {
|
|
26
31
|
list-style: none;
|
|
@@ -32,7 +37,13 @@
|
|
|
32
37
|
|
|
33
38
|
&--nested {
|
|
34
39
|
margin-top: var(--wr-anchor-list-nested-margin-top);
|
|
35
|
-
padding-inline-start:
|
|
40
|
+
padding-inline-start: $indent;
|
|
41
|
+
|
|
42
|
+
// A nested link sits one indent further from the rail, so its bar reaches
|
|
43
|
+
// back that much further to land on the rail rather than float beside it.
|
|
44
|
+
.wr-anchor__link::before {
|
|
45
|
+
inset-inline-start: calc(-1rem - #{$indent});
|
|
46
|
+
}
|
|
36
47
|
}
|
|
37
48
|
}
|
|
38
49
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './styles/rules';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/bits/dot-grid'`.
|
|
2
|
+
//
|
|
3
|
+
// `dot-grid.scss` — the component's `styleUrl` — forwards `_rules` and nothing
|
|
4
|
+
// else, so the compiled component styles carry this component's own CSS and no
|
|
5
|
+
// second copy of the theme layer.
|
|
6
|
+
@use '../../../theme/styles';
|
|
7
|
+
|
|
8
|
+
@forward 'rules';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Dot-grid background. The host fills its nearest positioned ancestor and the
|
|
2
|
+
// dots are drawn on a 2D canvas. A canvas reads neither a `var()` nor a
|
|
3
|
+
// `light-dark()`, so `dot-grid.ts` resolves both colour hooks through
|
|
4
|
+
// `resolveCssColor` before it fills with them.
|
|
5
|
+
|
|
6
|
+
.wr-dot-grid {
|
|
7
|
+
--wr-dot-grid-dot-color: var(--wr-border-strong);
|
|
8
|
+
--wr-dot-grid-active-color: var(--wr-color-primary);
|
|
9
|
+
// Mirror the `gap` and `dotSize` inputs; the component publishes both so the
|
|
10
|
+
// stand-in below lands on the canvas's own pitch.
|
|
11
|
+
--wr-dot-grid-gap: 24px;
|
|
12
|
+
--wr-dot-grid-dot-size: 3px;
|
|
13
|
+
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset: 0;
|
|
16
|
+
z-index: 0;
|
|
17
|
+
display: block;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
// The pointer is followed on the parent, so the layer itself never takes a
|
|
20
|
+
// click or a hover from what sits behind or around it.
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
|
|
23
|
+
// Stand-in grid, shown until the canvas has painted.
|
|
24
|
+
//
|
|
25
|
+
// A canvas cannot be prerendered, so on an SSR'd page the host is blank until
|
|
26
|
+
// the bundle has loaded and hydrated. These are the resting dots at the same
|
|
27
|
+
// colour, size and pitch, centred the way `placeDots()` centres the canvas grid,
|
|
28
|
+
// so the handover moves nothing.
|
|
29
|
+
background-image: radial-gradient(
|
|
30
|
+
circle,
|
|
31
|
+
var(--wr-dot-grid-dot-color) calc(var(--wr-dot-grid-dot-size) / 2 - 0.25px),
|
|
32
|
+
transparent calc(var(--wr-dot-grid-dot-size) / 2 + 0.25px)
|
|
33
|
+
);
|
|
34
|
+
background-position: center;
|
|
35
|
+
background-size: var(--wr-dot-grid-gap) var(--wr-dot-grid-gap);
|
|
36
|
+
|
|
37
|
+
&--painted {
|
|
38
|
+
background-image: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&__canvas {
|
|
42
|
+
display: block;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './styles/rules';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/bits/ripple-grid'`.
|
|
2
|
+
//
|
|
3
|
+
// `ripple-grid.scss` — the component's `styleUrl` — forwards `_rules` and
|
|
4
|
+
// nothing else, so the compiled component styles carry this component's own
|
|
5
|
+
// CSS and no second copy of the theme layer.
|
|
6
|
+
@use '../../../theme/styles';
|
|
7
|
+
|
|
8
|
+
@forward 'rules';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Ripple-grid background. The host fills its nearest positioned ancestor and
|
|
2
|
+
// the lines are drawn on a 2D canvas. A canvas reads neither a `var()` nor a
|
|
3
|
+
// `light-dark()`, so `ripple-grid.ts` resolves both colour hooks through
|
|
4
|
+
// `resolveCssColor` before it strokes with them.
|
|
5
|
+
|
|
6
|
+
.wr-ripple-grid {
|
|
7
|
+
--wr-ripple-grid-line-color: var(--wr-border-base);
|
|
8
|
+
--wr-ripple-grid-ripple-color: var(--wr-color-primary);
|
|
9
|
+
// Mirror the `cellSize` and `lineWidth` inputs; the component publishes both
|
|
10
|
+
// so the stand-in below lands on the canvas's own lines.
|
|
11
|
+
--wr-ripple-grid-cell-size: 40px;
|
|
12
|
+
--wr-ripple-grid-line-width: 1px;
|
|
13
|
+
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset: 0;
|
|
16
|
+
z-index: 0;
|
|
17
|
+
display: block;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
// The pointer is followed on the parent, so the layer itself never takes a
|
|
20
|
+
// click or a hover from what sits behind or around it.
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
|
|
23
|
+
// Stand-in grid, shown until the canvas has painted.
|
|
24
|
+
//
|
|
25
|
+
// A canvas cannot be prerendered, so on an SSR'd page the host is blank until
|
|
26
|
+
// the bundle has loaded and hydrated. These are the resting lines at the same
|
|
27
|
+
// colour, width and cell. The tiles are centred, which puts a cell on the
|
|
28
|
+
// centre of the box the way `draw()` lays the canvas grid out, and moved back
|
|
29
|
+
// by half a line so each line sits centred on its position the way a stroke
|
|
30
|
+
// does. The canvas then moves each line by up to half a device pixel so its
|
|
31
|
+
// edges land on whole pixels, which is all the handover moves.
|
|
32
|
+
background-image:
|
|
33
|
+
linear-gradient(
|
|
34
|
+
to right,
|
|
35
|
+
var(--wr-ripple-grid-line-color) var(--wr-ripple-grid-line-width),
|
|
36
|
+
transparent var(--wr-ripple-grid-line-width)
|
|
37
|
+
),
|
|
38
|
+
linear-gradient(
|
|
39
|
+
to bottom,
|
|
40
|
+
var(--wr-ripple-grid-line-color) var(--wr-ripple-grid-line-width),
|
|
41
|
+
transparent var(--wr-ripple-grid-line-width)
|
|
42
|
+
);
|
|
43
|
+
background-position: calc(50% - var(--wr-ripple-grid-line-width) / 2) calc(50% - var(--wr-ripple-grid-line-width) / 2);
|
|
44
|
+
background-size: var(--wr-ripple-grid-cell-size) var(--wr-ripple-grid-cell-size);
|
|
45
|
+
|
|
46
|
+
&--painted {
|
|
47
|
+
background-image: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__canvas {
|
|
51
|
+
display: block;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Public Sass entry for `@use 'ngwr/bits/threads'`.
|
|
2
|
+
//
|
|
3
|
+
// `threads.scss` — the component's `styleUrl` — forwards `_rules` and nothing
|
|
4
|
+
// else, so the compiled component styles carry this component's own CSS and no
|
|
5
|
+
// second copy of the theme layer.
|
|
6
|
+
@use '../../../theme/styles';
|
|
7
|
+
|
|
8
|
+
@forward 'rules';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Threads background. A 2D canvas fills the nearest positioned ancestor; the
|
|
2
|
+
// colour is theme-aware via `--wr-threads-color` unless `[color]` overrides it.
|
|
3
|
+
// A canvas cannot read a `light-dark()` or a `var()`, so `threads.ts` resolves
|
|
4
|
+
// the colour through `resolveCssColor` before it strokes with it.
|
|
5
|
+
|
|
6
|
+
.wr-threads {
|
|
7
|
+
// A soft wash of the primary intent. On the dark canvas the base reads too
|
|
8
|
+
// deep for a hairline to carry, so the dark side washes its `-lighter` shade.
|
|
9
|
+
--wr-threads-color: light-dark(
|
|
10
|
+
color-mix(in srgb, var(--wr-color-primary) 60%, transparent),
|
|
11
|
+
color-mix(in srgb, var(--wr-color-primary-lighter) 60%, transparent)
|
|
12
|
+
);
|
|
13
|
+
// Mirrors of the `lineCount`, `spread` and `lineWidth` inputs. The component
|
|
14
|
+
// publishes each on the host, so the stand-in below draws where the canvas will.
|
|
15
|
+
--wr-threads-count: 18;
|
|
16
|
+
--wr-threads-spread: 0.4;
|
|
17
|
+
--wr-threads-line-width: 1px;
|
|
18
|
+
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
z-index: 0;
|
|
22
|
+
display: block;
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
|
|
28
|
+
// Stand-in threads, shown until the canvas has painted.
|
|
29
|
+
//
|
|
30
|
+
// A canvas cannot be prerendered, so on an SSR'd or prerendered page the
|
|
31
|
+
// element is blank until the bundle has loaded and hydrated. These are the
|
|
32
|
+
// threads at rest — straight, evenly spaced across the band at its widest, in
|
|
33
|
+
// the same colour and width — so the handover reads as the threads starting to
|
|
34
|
+
// move rather than as content appearing. The image is the band's height plus
|
|
35
|
+
// one stroke, so the last line lands on its lower edge rather than outside it,
|
|
36
|
+
// and the mask over the same box fades the outer lines the way the canvas
|
|
37
|
+
// fades its outer threads, from the full colour in the middle to 40% at the
|
|
38
|
+
// edges. On a pseudo-element rather than the host, so the mask cannot reach a
|
|
39
|
+
// background an app gives the host.
|
|
40
|
+
&::before {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
inset: 0;
|
|
44
|
+
background-image: repeating-linear-gradient(
|
|
45
|
+
to bottom,
|
|
46
|
+
var(--wr-threads-color) 0 var(--wr-threads-line-width),
|
|
47
|
+
transparent var(--wr-threads-line-width)
|
|
48
|
+
calc((100% - var(--wr-threads-line-width)) / max(1, var(--wr-threads-count) - 1))
|
|
49
|
+
);
|
|
50
|
+
background-position: center;
|
|
51
|
+
background-repeat: no-repeat;
|
|
52
|
+
background-size: 100% calc(var(--wr-threads-spread) * 100% + var(--wr-threads-line-width));
|
|
53
|
+
mask-image: linear-gradient(to bottom, rgb(0 0 0 / 40%), #000, rgb(0 0 0 / 40%));
|
|
54
|
+
mask-position: center;
|
|
55
|
+
mask-repeat: no-repeat;
|
|
56
|
+
mask-size: 100% calc(var(--wr-threads-spread) * 100% + var(--wr-threads-line-width));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--painted::before {
|
|
60
|
+
content: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__canvas {
|
|
64
|
+
display: block;
|
|
65
|
+
width: 100%;
|
|
66
|
+
height: 100%;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './styles/rules';
|