ngwr 15.6.0 → 15.7.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/animations/aurora/styles/_index.scss +44 -0
- package/animations/blur-reveal/styles/_index.scss +70 -0
- package/animations/click-sparks/styles/_index.scss +88 -0
- package/animations/confetti/styles/_index.scss +35 -0
- package/animations/core/styles/_mixins.scss +21 -0
- package/animations/decode/styles/_index.scss +68 -0
- package/animations/destruct/styles/_index.scss +31 -0
- package/animations/dot-grid/styles/_index.scss +41 -0
- package/animations/falling-letters/styles/_index.scss +72 -0
- package/animations/flow-lines/styles/_index.scss +39 -0
- package/animations/fluid-cursor/styles/_index.scss +44 -0
- package/animations/glitch/styles/_index.scss +189 -0
- package/animations/glow-border/styles/_index.scss +89 -0
- package/animations/gradient-flow/styles/_index.scss +101 -0
- package/animations/marquee/styles/_index.scss +179 -0
- package/animations/orbit/styles/_index.scss +77 -0
- package/animations/reveal/styles/_index.scss +96 -0
- package/animations/ripple-grid/styles/_index.scss +42 -0
- package/animations/rotate-reveal/styles/_index.scss +132 -0
- package/animations/shimmer/styles/_index.scss +102 -0
- package/animations/spotlight/styles/_index.scss +119 -0
- package/animations/thread-lines/styles/_index.scss +41 -0
- package/animations/typewriter/styles/_index.scss +94 -0
- package/date-picker/styles/_index.scss +28 -13
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-animations-aurora.mjs +1000 -0
- package/fesm2022/ngwr-animations-aurora.mjs.map +1 -0
- package/fesm2022/ngwr-animations-blur-reveal.mjs +227 -0
- package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -0
- package/fesm2022/ngwr-animations-click-sparks.mjs +145 -0
- package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -0
- package/fesm2022/ngwr-animations-confetti.mjs +233 -0
- package/fesm2022/ngwr-animations-confetti.mjs.map +1 -0
- package/fesm2022/ngwr-animations-core.mjs +343 -0
- package/fesm2022/ngwr-animations-core.mjs.map +1 -0
- package/fesm2022/ngwr-animations-decode.mjs +301 -0
- package/fesm2022/ngwr-animations-decode.mjs.map +1 -0
- package/fesm2022/ngwr-animations-destruct.mjs +232 -0
- package/fesm2022/ngwr-animations-destruct.mjs.map +1 -0
- package/fesm2022/ngwr-animations-dot-grid.mjs +330 -0
- package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -0
- package/fesm2022/ngwr-animations-falling-letters.mjs +526 -0
- package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -0
- package/fesm2022/ngwr-animations-flow-lines.mjs +1102 -0
- package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -0
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +1187 -0
- package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -0
- package/fesm2022/ngwr-animations-glitch.mjs +164 -0
- package/fesm2022/ngwr-animations-glitch.mjs.map +1 -0
- package/fesm2022/ngwr-animations-glow-border.mjs +81 -0
- package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -0
- package/fesm2022/ngwr-animations-gradient-flow.mjs +81 -0
- package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -0
- package/fesm2022/ngwr-animations-marquee.mjs +321 -0
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -0
- package/fesm2022/ngwr-animations-orbit.mjs +264 -0
- package/fesm2022/ngwr-animations-orbit.mjs.map +1 -0
- package/fesm2022/ngwr-animations-reveal.mjs +279 -0
- package/fesm2022/ngwr-animations-reveal.mjs.map +1 -0
- package/fesm2022/ngwr-animations-ripple-grid.mjs +320 -0
- package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -0
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +285 -0
- package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -0
- package/fesm2022/ngwr-animations-shimmer.mjs +121 -0
- package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -0
- package/fesm2022/ngwr-animations-spotlight.mjs +90 -0
- package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -0
- package/fesm2022/ngwr-animations-thread-lines.mjs +926 -0
- package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -0
- package/fesm2022/ngwr-animations-tilt.mjs +134 -0
- package/fesm2022/ngwr-animations-tilt.mjs.map +1 -0
- package/fesm2022/ngwr-animations-typewriter.mjs +335 -0
- package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -0
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +3 -3
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +6 -6
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +7 -4
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +11 -9
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +7 -6
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-comment.mjs +6 -6
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +17 -15
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker.mjs +34 -26
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +6 -6
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +24 -22
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +16 -13
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +27 -24
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +15 -13
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -4
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +7 -7
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-graph.mjs +6 -6
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +6 -1
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +6 -1
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +6 -1
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +6 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +6 -1
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +6 -1
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +6 -1
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +6 -1
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +6 -1
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +6 -1
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +6 -1
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +6 -1
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +6 -1
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +6 -1
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +6 -1
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +6 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +6 -1
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +6 -1
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +6 -1
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +6 -1
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +6 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +6 -1
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +7 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +6 -6
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +27 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +3 -3
- package/fesm2022/ngwr-pipes.mjs +27 -27
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +12 -10
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +15 -15
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +16 -16
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +9 -9
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +19 -19
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +17 -15
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +7 -7
- package/fesm2022/ngwr-transfer.mjs +4 -4
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +5 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +5 -5
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +17 -16
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/ar.json +7 -0
- package/i18n/cs.json +7 -0
- package/i18n/de.json +7 -0
- package/i18n/en.json +7 -0
- package/i18n/es.json +7 -0
- package/i18n/fr.json +7 -0
- package/i18n/he.json +7 -0
- package/i18n/hi.json +7 -0
- package/i18n/id.json +7 -0
- package/i18n/it.json +7 -0
- package/i18n/ja.json +7 -0
- package/i18n/ko.json +7 -0
- package/i18n/nl.json +7 -0
- package/i18n/pl.json +7 -0
- package/i18n/pt.json +7 -0
- package/i18n/ru.json +7 -0
- package/i18n/sv.json +7 -0
- package/i18n/tr.json +7 -0
- package/i18n/uk.json +7 -0
- package/i18n/vi.json +7 -0
- package/i18n/zh-TW.json +7 -0
- package/i18n/zh.json +7 -0
- package/llms-full.txt +162 -2
- package/llms.txt +1 -0
- package/package.json +119 -1
- package/schematics/use/rule.js +1 -0
- package/schematics/use/symbol-map.json +23 -0
- package/skills/ngwr/SKILL.md +3 -2
- package/skills/ngwr/references/catalog.md +23 -0
- package/theme/_index.scss +7 -1
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_scrollbar.scss +69 -0
- package/theme/styles/_variables.scss +8 -0
- package/types/ngwr-animations-aurora.d.ts +186 -0
- package/types/ngwr-animations-blur-reveal.d.ts +84 -0
- package/types/ngwr-animations-click-sparks.d.ts +67 -0
- package/types/ngwr-animations-confetti.d.ts +93 -0
- package/types/ngwr-animations-core.d.ts +294 -0
- package/types/ngwr-animations-decode.d.ts +104 -0
- package/types/ngwr-animations-destruct.d.ts +96 -0
- package/types/ngwr-animations-dot-grid.d.ts +87 -0
- package/types/ngwr-animations-falling-letters.d.ts +165 -0
- package/types/ngwr-animations-flow-lines.d.ts +208 -0
- package/types/ngwr-animations-fluid-cursor.d.ts +183 -0
- package/types/ngwr-animations-glitch.d.ts +86 -0
- package/types/ngwr-animations-glow-border.d.ts +29 -0
- package/types/ngwr-animations-gradient-flow.d.ts +38 -0
- package/types/ngwr-animations-marquee.d.ts +148 -0
- package/types/ngwr-animations-orbit.d.ts +112 -0
- package/types/ngwr-animations-reveal.d.ts +134 -0
- package/types/ngwr-animations-ripple-grid.d.ts +74 -0
- package/types/ngwr-animations-rotate-reveal.d.ts +134 -0
- package/types/ngwr-animations-shimmer.d.ts +68 -0
- package/types/ngwr-animations-spotlight.d.ts +36 -0
- package/types/ngwr-animations-thread-lines.d.ts +155 -0
- package/types/ngwr-animations-tilt.d.ts +49 -0
- package/types/ngwr-animations-typewriter.d.ts +144 -0
- package/types/ngwr-clipboard.d.ts +1 -0
- package/types/ngwr-color-picker.d.ts +1 -0
- package/types/ngwr-command-palette.d.ts +1 -0
- package/types/ngwr-compare.d.ts +1 -1
- package/types/ngwr-context-menu.d.ts +1 -0
- package/types/ngwr-dialog.d.ts +1 -0
- package/types/ngwr-directives.d.ts +1 -0
- package/types/ngwr-drawer.d.ts +9 -2
- package/types/ngwr-dropdown.d.ts +1 -0
- package/types/ngwr-lightbox.d.ts +1 -0
- package/types/ngwr-overlay.d.ts +19 -0
- package/types/ngwr-popconfirm.d.ts +1 -0
- package/types/ngwr-sortable-list.d.ts +1 -1
- package/types/ngwr-splitter.d.ts +1 -1
- package/types/ngwr-stepper.d.ts +1 -1
- package/types/ngwr-timeline.d.ts +1 -1
- package/types/ngwr-utils.d.ts +11 -6
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +1 -0
- package/virtual-scroll/styles/_rules.scss +5 -9
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/aurora');
|
|
3
|
+
|
|
4
|
+
// `<wr-aurora />`: a curtain of light hanging from one edge of a section,
|
|
5
|
+
// like an aurora, behind the section's content. The component paints one
|
|
6
|
+
// WebGL canvas and reads its three stops and the surface back from the hooks
|
|
7
|
+
// below through `resolveCssColorChannels`, so a retheme and a scheme switch
|
|
8
|
+
// both reach the pixels. How bright it is, how far it reaches and how it
|
|
9
|
+
// moves are inputs and the shader's numbers, not the sheet's.
|
|
10
|
+
.wr-aurora {
|
|
11
|
+
// The three stops the colour flows through across the width, from the
|
|
12
|
+
// inline start: green, blue, violet, the hues an aurora shows, in that
|
|
13
|
+
// order so the hue only ever turns one way between them. Bare intents, not
|
|
14
|
+
// inks: these are graphics, not text, and the roles are `light-dark()`
|
|
15
|
+
// pairs already, so the dark scheme gets the intents re-tuned for its
|
|
16
|
+
// canvas with nothing re-declared. The violet is mixed from two roles
|
|
17
|
+
// rather than a step, so a rebrand moves it.
|
|
18
|
+
--wr-aurora-color-1: var(--wr-color-success);
|
|
19
|
+
--wr-aurora-color-2: var(--wr-color-primary);
|
|
20
|
+
--wr-aurora-color-3: color-mix(in oklch, var(--wr-color-primary) 60%, var(--wr-color-danger));
|
|
21
|
+
|
|
22
|
+
position: absolute;
|
|
23
|
+
inset: 0;
|
|
24
|
+
// Under the content, over the page: the parent is positioned and isolated,
|
|
25
|
+
// so this is the floor of its stacking context.
|
|
26
|
+
z-index: -1;
|
|
27
|
+
display: block;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
user-select: none;
|
|
31
|
+
|
|
32
|
+
// The canvas is drawn at half resolution at most and stretched to the host:
|
|
33
|
+
// the browser's upscale is the last blur the soft picture needs.
|
|
34
|
+
&__canvas {
|
|
35
|
+
display: block;
|
|
36
|
+
inline-size: 100%;
|
|
37
|
+
block-size: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Nothing drawn: a tinted wash under system colours is noise, not decoration.
|
|
41
|
+
@media (forced-colors: active) {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@use '../../core/styles/mixins' as core;
|
|
3
|
+
@include theme.loaded('animations/blur-reveal');
|
|
4
|
+
|
|
5
|
+
// `[wrBlurReveal]`: the host's text comes in piece by piece the first time it
|
|
6
|
+
// scrolls into view. At rest the block declares only its hooks, so the host
|
|
7
|
+
// looks the way its own rules say; the pieces, the screen-reader copy and
|
|
8
|
+
// `--run` exist only while the reveal plays, and the host holds its authored
|
|
9
|
+
// children again when it ends.
|
|
10
|
+
.wr-blur-reveal {
|
|
11
|
+
// In `em`, so a 40px heading and a 16px line soften by the same share of
|
|
12
|
+
// their size. 0.2em is where a 40px heading reads as soft rather than a
|
|
13
|
+
// smear in the first frames it can be seen in.
|
|
14
|
+
--wr-blur-reveal-blur: 0.2em;
|
|
15
|
+
--wr-blur-reveal-offset: 0.35em;
|
|
16
|
+
--wr-blur-reveal-duration: 0.6s;
|
|
17
|
+
// Eases out with no overshoot, so a piece settles rather than bounces.
|
|
18
|
+
--wr-blur-reveal-ease: var(--wr-ease-out);
|
|
19
|
+
--wr-blur-reveal-direction: 1;
|
|
20
|
+
// Written by the directive on the pieces wrapper: the pause before the first
|
|
21
|
+
// piece and the gap from one piece to the next.
|
|
22
|
+
--wr-blur-reveal-delay: 0ms;
|
|
23
|
+
--wr-blur-reveal-stagger: 70ms;
|
|
24
|
+
|
|
25
|
+
&--above {
|
|
26
|
+
--wr-blur-reveal-direction: -1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// The graphemes of one word, in letter mode: a word never parts across lines.
|
|
30
|
+
&__word {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// `inline-block`, because a filter and a translate do nothing on an inline
|
|
36
|
+
// box. A word still wraps at the spaces between pieces, which stay real text.
|
|
37
|
+
&__piece {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--run &__piece {
|
|
42
|
+
animation: wr-blur-reveal-in var(--wr-blur-reveal-duration) var(--wr-blur-reveal-ease) both;
|
|
43
|
+
animation-delay: calc(var(--wr-blur-reveal-delay) + var(--wr-blur-reveal-i, 0) * var(--wr-blur-reveal-stagger));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// The sentence for a screen reader, once, while the pieces are `aria-hidden`.
|
|
47
|
+
&__sr {
|
|
48
|
+
@include core.sr-only;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-reduced-motion: reduce) {
|
|
52
|
+
&--run &__piece {
|
|
53
|
+
animation: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes wr-blur-reveal-in {
|
|
59
|
+
from {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
filter: blur(var(--wr-blur-reveal-blur));
|
|
62
|
+
translate: 0 calc(var(--wr-blur-reveal-offset) * var(--wr-blur-reveal-direction));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
to {
|
|
66
|
+
opacity: 1;
|
|
67
|
+
filter: blur(0);
|
|
68
|
+
translate: 0 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/click-sparks');
|
|
3
|
+
|
|
4
|
+
// `[wrClickSparks]`: on a click, a ring of short strokes bursts out from the
|
|
5
|
+
// click point, flies a short way, shrinks and fades. The directive makes one
|
|
6
|
+
// layer per burst in `document.body`, fixed at the click's client coordinates,
|
|
7
|
+
// with one span per stroke, and writes the point, the burst length and each
|
|
8
|
+
// stroke's angle into custom properties; this sheet owns the paint. The layer
|
|
9
|
+
// has no size and takes no pointer, so nothing on the page moves or misses a
|
|
10
|
+
// click because of it. At rest a stroke is invisible, so a layer that outlives
|
|
11
|
+
// its animation (a preference flipped mid-burst) paints nothing until the
|
|
12
|
+
// directive's fallback timer takes it out.
|
|
13
|
+
.wr-click-sparks {
|
|
14
|
+
// Written by the directive on the layer: where the burst is, in the viewport.
|
|
15
|
+
--wr-click-sparks-x: 0px;
|
|
16
|
+
--wr-click-sparks-y: 0px;
|
|
17
|
+
// Written by the directive on the layer: how long this burst lasts, so the
|
|
18
|
+
// strokes end exactly when the layer goes.
|
|
19
|
+
--wr-click-sparks-duration: 480ms;
|
|
20
|
+
// All in `em` of the host's font size, which the directive copies onto the
|
|
21
|
+
// layer: a large hero button throws longer, farther sparks than a small one.
|
|
22
|
+
// A stroke's length at the start; it shrinks to a tenth of this as it flies.
|
|
23
|
+
--wr-click-sparks-length: 0.55em;
|
|
24
|
+
// A stroke's thickness: never under two pixels, so a thin one still reads.
|
|
25
|
+
--wr-click-sparks-width: max(2px, 0.12em);
|
|
26
|
+
// Where a stroke's tail starts and ends, from the click point: it leaves a
|
|
27
|
+
// small clear ring round the point and stops well inside a button's reach.
|
|
28
|
+
--wr-click-sparks-from: 0.3em;
|
|
29
|
+
--wr-click-sparks-to: 1.7em;
|
|
30
|
+
// Fast out of the gate, settling as it fades: a spark, not a slide.
|
|
31
|
+
--wr-click-sparks-ease: var(--wr-ease-out);
|
|
32
|
+
|
|
33
|
+
// Physical on purpose: the point is a client coordinate, the same in either
|
|
34
|
+
// direction, and the layer measures from the viewport's top left corner.
|
|
35
|
+
// rtl-ok: client coordinates are physical by nature
|
|
36
|
+
position: fixed;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
translate: var(--wr-click-sparks-x) var(--wr-click-sparks-y);
|
|
40
|
+
width: 0;
|
|
41
|
+
height: 0;
|
|
42
|
+
z-index: var(--wr-z-top);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
user-select: none;
|
|
45
|
+
|
|
46
|
+
// One stroke: a rounded bar in the layer's colour (the host's own colour, or
|
|
47
|
+
// the hook, both set inline by the directive), its inner end on the click
|
|
48
|
+
// point, centred on it across. The rotation turns it to its angle, the
|
|
49
|
+
// translation pushes it along that angle, and a scale from the inner end
|
|
50
|
+
// shortens it, so the tail catches up with the head as it flies.
|
|
51
|
+
&__spark {
|
|
52
|
+
position: absolute;
|
|
53
|
+
// rtl-ok: the stroke starts on the click point and `rotate()` turns it to its angle; the pair is physical
|
|
54
|
+
top: calc(var(--wr-click-sparks-width) / -2);
|
|
55
|
+
left: 0;
|
|
56
|
+
width: var(--wr-click-sparks-length);
|
|
57
|
+
height: var(--wr-click-sparks-width);
|
|
58
|
+
border-radius: var(--wr-click-sparks-width);
|
|
59
|
+
background: currentColor;
|
|
60
|
+
transform-origin: 0 50%;
|
|
61
|
+
opacity: 0;
|
|
62
|
+
will-change: transform, opacity;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
|
|
66
|
+
&__spark {
|
|
67
|
+
animation: wr-click-sparks-fly var(--wr-click-sparks-duration) var(--wr-click-sparks-ease) both;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// The flight of one stroke, from its own angle: out to the far distance, down
|
|
73
|
+
// to a tenth of its length, solid for the first part and gone by the end.
|
|
74
|
+
@keyframes wr-click-sparks-fly {
|
|
75
|
+
0% {
|
|
76
|
+
transform: rotate(var(--wr-click-sparks-angle, 0deg)) translateX(var(--wr-click-sparks-from)) scaleX(1);
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
55% {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
100% {
|
|
85
|
+
transform: rotate(var(--wr-click-sparks-angle, 0deg)) translateX(var(--wr-click-sparks-to)) scaleX(0.1);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/confetti');
|
|
3
|
+
|
|
4
|
+
// `WrConfetti.burst()`: one fixed, full-viewport canvas in `document.body` for as
|
|
5
|
+
// long as pieces are in the air, then gone. The service paints every piece
|
|
6
|
+
// itself; this sheet places the canvas and names the colours it resolves at
|
|
7
|
+
// each burst. The canvas takes no pointer and has no content, so nothing on the
|
|
8
|
+
// page moves or misses a click while it is there.
|
|
9
|
+
.wr-confetti {
|
|
10
|
+
// Read by the service through the cascade when a burst starts, so a
|
|
11
|
+
// `light-dark()` token paints the scheme the reader is in. Bare intents, not
|
|
12
|
+
// `-ink`: confetti is a graphic, and the text role is for text.
|
|
13
|
+
--wr-confetti-color-1: var(--wr-color-primary);
|
|
14
|
+
--wr-confetti-color-2: var(--wr-color-success);
|
|
15
|
+
--wr-confetti-color-3: var(--wr-color-warning);
|
|
16
|
+
--wr-confetti-color-4: var(--wr-color-danger);
|
|
17
|
+
--wr-confetti-color-5: var(--wr-color-info);
|
|
18
|
+
|
|
19
|
+
// Physical on purpose: the pieces fly in client coordinates, the same in
|
|
20
|
+
// either direction, and the canvas covers the whole viewport.
|
|
21
|
+
// rtl-ok: client coordinates are physical by nature
|
|
22
|
+
position: fixed;
|
|
23
|
+
inset: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
z-index: var(--wr-z-top);
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
user-select: none;
|
|
29
|
+
|
|
30
|
+
// The service mounts nothing under forced colours; this covers a preference
|
|
31
|
+
// that flips while a burst is in the air.
|
|
32
|
+
@media (forced-colors: active) {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Sass shared by the animation sheets. Not a public entry: there is no
|
|
2
|
+
// `styles/_index.scss` here, so `@use 'ngwr/animations/core'` resolves to
|
|
3
|
+
// nothing and the manifest carries no `sass` condition for it. An effect's own
|
|
4
|
+
// `_index.scss` loads this file by its relative path.
|
|
5
|
+
|
|
6
|
+
/// Text that exists for assistive technology and not for the eye: the one copy
|
|
7
|
+
/// of a sentence a screen reader hears while the pieces it is drawn as are
|
|
8
|
+
/// `aria-hidden`. Out of flow rather than hidden, since `display: none` and
|
|
9
|
+
/// `visibility: hidden` take it out of the accessible tree too.
|
|
10
|
+
@mixin sr-only {
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 1px;
|
|
13
|
+
height: 1px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
// `clip-path`, not the deprecated `clip`: same effect, and it survives
|
|
17
|
+
// `forced-colors`, where a clipped element is still measured.
|
|
18
|
+
clip-path: inset(50%);
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
border: 0;
|
|
21
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@use '../../core/styles/mixins' as core;
|
|
3
|
+
@include theme.loaded('animations/decode');
|
|
4
|
+
|
|
5
|
+
// `[wrDecode]`: the host's text shows random glyphs that lock on to the real
|
|
6
|
+
// characters one after another. At rest the block declares only its hooks, so
|
|
7
|
+
// the host looks the way its own rules say; the slots, the screen-reader copy
|
|
8
|
+
// and `--run` exist only while the effect plays, and the host holds its
|
|
9
|
+
// authored children again when it ends.
|
|
10
|
+
.wr-decode {
|
|
11
|
+
// What a glyph that has not locked yet paints in: the host's own text colour
|
|
12
|
+
// at reduced strength, so a primary chip scrambles in a quieter primary and a
|
|
13
|
+
// body line in a quieter ink, and each slot eases up to the full colour as it
|
|
14
|
+
// locks. Mixed from `currentColor`, never from a ramp step.
|
|
15
|
+
--wr-decode-tint: color-mix(in srgb, currentColor 45%, transparent);
|
|
16
|
+
// Written by the directive on the slots wrapper: how long a locked slot takes
|
|
17
|
+
// to reach the text colour.
|
|
18
|
+
--wr-decode-settle: 240ms;
|
|
19
|
+
--wr-decode-ease: var(--wr-ease-out);
|
|
20
|
+
|
|
21
|
+
// One character. Inline, not inline-block, so the line breaks and the
|
|
22
|
+
// baseline are exactly what the plain text had. The real character is the
|
|
23
|
+
// slot's only text and stays in flow throughout: it is what gives the slot
|
|
24
|
+
// its width, so a glyph never moves the line.
|
|
25
|
+
&__slot {
|
|
26
|
+
position: relative;
|
|
27
|
+
transition: color var(--wr-decode-settle) var(--wr-decode-ease);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Scrambled: the real character is hidden, not removed, so the slot keeps
|
|
31
|
+
// its width, and the glyph in `data-glyph` is painted over it out of flow.
|
|
32
|
+
// `visibility`, not `color: transparent`, so the lock can ease the colour
|
|
33
|
+
// from the tint up to the text's.
|
|
34
|
+
&__slot--scramble {
|
|
35
|
+
color: var(--wr-decode-tint);
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
|
|
38
|
+
// Centred in the slot by flex, whose default `center` is unsafe: a glyph
|
|
39
|
+
// wider than the slot hangs over both neighbours by the same amount
|
|
40
|
+
// instead of only the end one. Centred on the block axis too, so the glyph
|
|
41
|
+
// box sits where the real character's does and the baselines coincide.
|
|
42
|
+
&::after {
|
|
43
|
+
content: attr(data-glyph);
|
|
44
|
+
position: absolute;
|
|
45
|
+
inset: 0;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
visibility: visible;
|
|
50
|
+
white-space: pre;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// The text for a screen reader, once, while the slots are `aria-hidden`.
|
|
56
|
+
// Out of the selection, so a copy of the line gives the slots' text once.
|
|
57
|
+
&__sr {
|
|
58
|
+
@include core.sr-only;
|
|
59
|
+
|
|
60
|
+
user-select: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media (prefers-reduced-motion: reduce) {
|
|
64
|
+
&__slot {
|
|
65
|
+
transition: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/destruct');
|
|
3
|
+
|
|
4
|
+
// `[wrDestruct]`: while a pointer is over the host, or focus is in it, its
|
|
5
|
+
// text wobbles with a fine, living noise, and settles back to crisp text when
|
|
6
|
+
// the pointer leaves. The text stays real text: the directive mounts one 0 by 0
|
|
7
|
+
// `<svg>` with a fractal-noise displacement filter beside the host, drives the
|
|
8
|
+
// displacement every frame, and puts `--on` with the filter's url on the host
|
|
9
|
+
// only while the noise is above zero. At rest the block declares nothing, so
|
|
10
|
+
// the host renders exactly as its own rules say.
|
|
11
|
+
.wr-destruct {
|
|
12
|
+
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
|
|
13
|
+
&--on {
|
|
14
|
+
// Written by the directive: `url(#id)` of this instance's filter.
|
|
15
|
+
filter: var(--wr-destruct-filter);
|
|
16
|
+
// Only while the directive drives it: a promoted layer costs memory, and
|
|
17
|
+
// still text has no reason to hold one.
|
|
18
|
+
will-change: filter;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// The filter's home: no box, no hit area, nothing a reader can land on. Not
|
|
23
|
+
// `display: none`, which would take the filter out of rendering with it.
|
|
24
|
+
&__filter {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inline-size: 0;
|
|
27
|
+
block-size: 0;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/dot-grid');
|
|
3
|
+
|
|
4
|
+
// `<wr-dot-grid />`: an even field of small, faint dots behind a section's
|
|
5
|
+
// content. The component paints one canvas and reads its two colours back
|
|
6
|
+
// from the hooks below through `resolveCssColorChannels`, so a retheme and a
|
|
7
|
+
// scheme switch both reach the pixels. The strengths (how much of each colour
|
|
8
|
+
// a dot shows at rest and lit) and the dot sizes live in `dot-grid.ts`: they
|
|
9
|
+
// are the canvas's numbers, not the sheet's.
|
|
10
|
+
.wr-dot-grid {
|
|
11
|
+
// A dot at rest: the muted role, the bare intent, since a dot is a graphic
|
|
12
|
+
// and not text. The canvas shows it at about a third, so the text and the
|
|
13
|
+
// cards over the field read as they do on the plain surface.
|
|
14
|
+
--wr-dot-grid-ink: var(--wr-color-on-surface-muted);
|
|
15
|
+
// A dot under the pointer: the primary intent, never at full strength, so
|
|
16
|
+
// the lit patch stays under the content's own accents.
|
|
17
|
+
--wr-dot-grid-glow: var(--wr-color-primary);
|
|
18
|
+
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
// Under the content, over the page: the parent is positioned and isolated,
|
|
22
|
+
// so this is the floor of its stacking context.
|
|
23
|
+
z-index: -1;
|
|
24
|
+
display: block;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
// Gone at the edges, so there is no rectangle where the section ends.
|
|
29
|
+
mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 35%, transparent 100%);
|
|
30
|
+
|
|
31
|
+
&__canvas {
|
|
32
|
+
display: block;
|
|
33
|
+
inline-size: 100%;
|
|
34
|
+
block-size: 100%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Nothing drawn: a field of dots under system colours is noise, not decoration.
|
|
38
|
+
@media (forced-colors: active) {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/falling-letters');
|
|
3
|
+
|
|
4
|
+
// `[wrFallingLetters]`: click a line of text and its letters let go, fall,
|
|
5
|
+
// and pile into a heap on the floor of a container; click again, or wait, and
|
|
6
|
+
// they spring back into the line. At rest the block declares only the anchor
|
|
7
|
+
// for the pieces, so the target looks the way its own rules say; the wrapper,
|
|
8
|
+
// the pieces and `--out` exist only while the letters are out, and the target
|
|
9
|
+
// holds its authored children again when they are back. The directive owns
|
|
10
|
+
// every position (it measures, integrates and writes one transform per piece
|
|
11
|
+
// per frame); the sheet owns what a piece is.
|
|
12
|
+
.wr-falling-letters {
|
|
13
|
+
// The anchor for the pieces: each is placed from this box, so the pieces
|
|
14
|
+
// scroll with the page and a letter in flight never moves the line.
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
// The authored nodes while the pieces are out: in flow, so the line keeps
|
|
18
|
+
// exactly its space and a screen reader and the clipboard still get the real
|
|
19
|
+
// text once; invisible, so it is not drawn under the pieces. `opacity`, not
|
|
20
|
+
// `visibility`, which would take the text out of the accessibility tree.
|
|
21
|
+
&--out &__text {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// One grapheme during the measurement: an inline-block, so its box is the
|
|
26
|
+
// line's height and a piece with the same font puts the glyph at the same
|
|
27
|
+
// offset in its own box. Exists for one synchronous layout, never painted.
|
|
28
|
+
&__glyph {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
white-space: pre;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// The pieces' layer over the target's box: out of the selection, under no
|
|
34
|
+
// pointer, so a button a letter falls across stays clickable.
|
|
35
|
+
&__pieces {
|
|
36
|
+
position: absolute;
|
|
37
|
+
inset: 0;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
user-select: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// One letter: a block at the origin of the layer, moved by transform alone,
|
|
43
|
+
// so every frame is composited and nothing under it reflows. It inherits the
|
|
44
|
+
// font and the colour from the target, as the line it left did. The
|
|
45
|
+
// directive sets each piece's `transform-origin` inline, at the centre of
|
|
46
|
+
// the glyph's ink, so a letter turns about the letter and not about the air
|
|
47
|
+
// of its line box; the centre here is the fallback for a piece it could not
|
|
48
|
+
// measure.
|
|
49
|
+
&__piece {
|
|
50
|
+
position: absolute;
|
|
51
|
+
// rtl-ok: the directive places each piece from measured geometry on the
|
|
52
|
+
// physical axes, from the layer's top-left corner in either direction.
|
|
53
|
+
top: 0;
|
|
54
|
+
left: 0;
|
|
55
|
+
display: block;
|
|
56
|
+
white-space: pre;
|
|
57
|
+
transform-origin: center;
|
|
58
|
+
will-change: transform;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Belt and braces: the directive puts the text back the moment the
|
|
62
|
+
// preference flips, but a frame in between must not show a doubled line.
|
|
63
|
+
@media (prefers-reduced-motion: reduce) {
|
|
64
|
+
&--out &__text {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__pieces {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/flow-lines');
|
|
3
|
+
|
|
4
|
+
// `<wr-flow-lines />`: a dense field of thin parallel lines behind a section's
|
|
5
|
+
// content, bent in slow waves and pushed aside round the pointer. The component
|
|
6
|
+
// paints one WebGL canvas and reads its two colours and the surface back from
|
|
7
|
+
// the hooks below through `resolveCssColorChannels`, so a retheme and a scheme
|
|
8
|
+
// switch both reach the pixels. How much of a colour a line lays and its
|
|
9
|
+
// thickness live in the component and its shader: they are the canvas's
|
|
10
|
+
// numbers, not the sheet's.
|
|
11
|
+
.wr-flow-lines {
|
|
12
|
+
// A line: the muted ink, a graphic and so the bare role; the canvas lays it
|
|
13
|
+
// at a fraction, as ink on a light surface and as light on a dark one.
|
|
14
|
+
--wr-flow-lines-color: var(--wr-color-on-surface-muted);
|
|
15
|
+
// A pushed line and a ripple's crest: the primary intent, never at full
|
|
16
|
+
// strength, so they stay under the content's own accents.
|
|
17
|
+
--wr-flow-lines-accent: var(--wr-color-primary);
|
|
18
|
+
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
// Under the content, over the page: the parent is positioned and isolated,
|
|
22
|
+
// so this is the floor of its stacking context.
|
|
23
|
+
z-index: -1;
|
|
24
|
+
display: block;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
|
|
29
|
+
&__canvas {
|
|
30
|
+
display: block;
|
|
31
|
+
inline-size: 100%;
|
|
32
|
+
block-size: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Nothing drawn: hairlines under system colours are noise, not decoration.
|
|
36
|
+
@media (forced-colors: active) {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@use '../../../theme/styles' as theme;
|
|
2
|
+
@include theme.loaded('animations/fluid-cursor');
|
|
3
|
+
|
|
4
|
+
// `<wr-fluid-cursor />`: coloured ink behind a region's content, stirred by
|
|
5
|
+
// the pointer and gone a few seconds later. The component paints one WebGL
|
|
6
|
+
// canvas and reads its palette back from the hooks below through
|
|
7
|
+
// `resolveCssColorChannels`, so a retheme and a scheme switch both reach the
|
|
8
|
+
// pixels. How the ink covers the surface (as ink on a light one, lifted on a
|
|
9
|
+
// dark one) and the splat sizes live in the component and its model: they
|
|
10
|
+
// are the canvas's numbers, not the sheet's.
|
|
11
|
+
.wr-fluid-cursor {
|
|
12
|
+
// The palette a stroke cycles through, in order: the bare intents, since
|
|
13
|
+
// the ink is a graphic and not text. Warm and cool alternate, so neighbours
|
|
14
|
+
// in the cycle stay apart.
|
|
15
|
+
--wr-fluid-cursor-color-1: var(--wr-color-primary);
|
|
16
|
+
--wr-fluid-cursor-color-2: var(--wr-color-danger);
|
|
17
|
+
--wr-fluid-cursor-color-3: var(--wr-color-warning);
|
|
18
|
+
--wr-fluid-cursor-color-4: var(--wr-color-success);
|
|
19
|
+
--wr-fluid-cursor-color-5: var(--wr-color-info);
|
|
20
|
+
|
|
21
|
+
position: absolute;
|
|
22
|
+
inset: 0;
|
|
23
|
+
// Under the content, over the page: the parent is positioned and isolated,
|
|
24
|
+
// so this is the floor of its stacking context.
|
|
25
|
+
z-index: -1;
|
|
26
|
+
display: block;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
// Gone at the edges, so ink carried to the border dissolves rather than
|
|
31
|
+
// ending in a straight cut. Symmetric, so it needs no mirroring.
|
|
32
|
+
mask-image: radial-gradient(ellipse 85% 90% at 50% 50%, #000 45%, transparent 100%);
|
|
33
|
+
|
|
34
|
+
&__canvas {
|
|
35
|
+
display: block;
|
|
36
|
+
inline-size: 100%;
|
|
37
|
+
block-size: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Nothing drawn: ink under system colours is noise, not decoration.
|
|
41
|
+
@media (forced-colors: active) {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
}
|