@nxgt/material 3.3.0 → 3.4.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/CHANGELOG.md +23 -0
- package/README.md +3 -3
- package/dist/backgrounds/backgrounds.css +30 -1
- package/dist/backgrounds/css-react/blobs.css +65 -0
- package/dist/backgrounds/css-react/bubbles.css +41 -0
- package/dist/backgrounds/css-react/checker.css +47 -0
- package/dist/backgrounds/css-react/chevrons.css +46 -0
- package/dist/backgrounds/css-react/circuit.css +111 -0
- package/dist/backgrounds/css-react/concrete.css +41 -0
- package/dist/backgrounds/css-react/diagonal-checker.css +48 -0
- package/dist/backgrounds/css-react/glass.css +99 -0
- package/dist/backgrounds/css-react/graph-paper.css +74 -0
- package/dist/backgrounds/css-react/halo.css +66 -0
- package/dist/backgrounds/css-react/hexagons.css +79 -0
- package/dist/backgrounds/css-react/illustrated.css +164 -0
- package/dist/backgrounds/css-react/leaves.css +41 -0
- package/dist/backgrounds/css-react/linen.css +44 -0
- package/dist/backgrounds/css-react/marble.css +55 -0
- package/dist/backgrounds/css-react/music.css +2 -0
- package/dist/backgrounds/css-react/night-sky.css +41 -0
- package/dist/backgrounds/css-react/paper.css +49 -0
- package/dist/backgrounds/css-react/plasma.css +53 -0
- package/dist/backgrounds/css-react/rays.css +67 -0
- package/dist/backgrounds/css-react/ripples.css +68 -0
- package/dist/backgrounds/css-react/school.css +2 -0
- package/dist/backgrounds/css-react/science.css +2 -0
- package/dist/backgrounds/css-react/sport.css +2 -0
- package/dist/backgrounds/css-react/travel.css +2 -0
- package/dist/backgrounds.js +57 -33
- package/dist/lib/backgrounds/background/available.d.ts +3 -3
- package/dist/lib/backgrounds/background/background.d.ts +2 -2
- package/dist/lib/backgrounds/index.d.ts +1 -1
- package/dist/material.css +1 -1
- package/docs/components/navigation-and-layout.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/guides/backgrounds.md +94 -16
- package/docs/previews/backgrounds-geometry-more.webp +0 -0
- package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
- package/docs/previews/backgrounds-light-more.webp +0 -0
- package/docs/previews/backgrounds-material-more.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/backgrounds-motif-shapes.webp +0 -0
- package/docs/roadmap.md +16 -4
- package/docs/troubleshooting.md +2 -2
- package/lib/backgrounds/backgrounds.css +30 -1
- package/lib/backgrounds/css-react/blobs.css +65 -0
- package/lib/backgrounds/css-react/bubbles.css +41 -0
- package/lib/backgrounds/css-react/checker.css +47 -0
- package/lib/backgrounds/css-react/chevrons.css +46 -0
- package/lib/backgrounds/css-react/circuit.css +111 -0
- package/lib/backgrounds/css-react/concrete.css +41 -0
- package/lib/backgrounds/css-react/diagonal-checker.css +48 -0
- package/lib/backgrounds/css-react/glass.css +99 -0
- package/lib/backgrounds/css-react/graph-paper.css +74 -0
- package/lib/backgrounds/css-react/halo.css +66 -0
- package/lib/backgrounds/css-react/hexagons.css +79 -0
- package/lib/backgrounds/css-react/illustrated.css +164 -0
- package/lib/backgrounds/css-react/leaves.css +41 -0
- package/lib/backgrounds/css-react/linen.css +44 -0
- package/lib/backgrounds/css-react/marble.css +55 -0
- package/lib/backgrounds/css-react/music.css +2 -0
- package/lib/backgrounds/css-react/night-sky.css +41 -0
- package/lib/backgrounds/css-react/paper.css +49 -0
- package/lib/backgrounds/css-react/plasma.css +53 -0
- package/lib/backgrounds/css-react/rays.css +67 -0
- package/lib/backgrounds/css-react/ripples.css +68 -0
- package/lib/backgrounds/css-react/school.css +2 -0
- package/lib/backgrounds/css-react/science.css +2 -0
- package/lib/backgrounds/css-react/sport.css +2 -0
- package/lib/backgrounds/css-react/travel.css +2 -0
- package/package.json +103 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* The `leaves` preset: line drawings of one theme (see illustrated.css).
|
|
2
|
+
* Motion (opt-in, `animated`): a leaf sways, 14 to 24 s a leg. The builder sets
|
|
3
|
+
* the pace (`p1..p3`) and the delay (`l1..l4`) as classes, so the markup holds
|
|
4
|
+
* no inline style. */
|
|
5
|
+
@import "./illustrated.css";
|
|
6
|
+
|
|
7
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
8
|
+
@keyframes nxgt-bg-leaves-sw {
|
|
9
|
+
to {
|
|
10
|
+
translate: 16px 8px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer components {
|
|
15
|
+
[data-background="leaves"][data-animated] > [data-scene] .sw {
|
|
16
|
+
animation: nxgt-bg-leaves-sw 14s ease-in-out infinite alternate
|
|
17
|
+
var(--nxgt-bg-play, running);
|
|
18
|
+
}
|
|
19
|
+
[data-background="leaves"][data-animated] > [data-scene] .p1 {
|
|
20
|
+
animation-duration: 14s;
|
|
21
|
+
}
|
|
22
|
+
[data-background="leaves"][data-animated] > [data-scene] .p2 {
|
|
23
|
+
animation-duration: 19s;
|
|
24
|
+
}
|
|
25
|
+
[data-background="leaves"][data-animated] > [data-scene] .p3 {
|
|
26
|
+
animation-duration: 24s;
|
|
27
|
+
}
|
|
28
|
+
[data-background="leaves"][data-animated] > [data-scene] .l1 {
|
|
29
|
+
animation-delay: 0s;
|
|
30
|
+
}
|
|
31
|
+
[data-background="leaves"][data-animated] > [data-scene] .l2 {
|
|
32
|
+
animation-delay: -3s;
|
|
33
|
+
}
|
|
34
|
+
[data-background="leaves"][data-animated] > [data-scene] .l3 {
|
|
35
|
+
animation-delay: -7s;
|
|
36
|
+
}
|
|
37
|
+
[data-background="leaves"][data-animated] > [data-scene] .l4 {
|
|
38
|
+
animation-delay: -11s;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* The `linen` preset: a plain weave. A cross-hatch of 1 px threads every 4 px
|
|
2
|
+
* (whole pixels, so crisp at 1x) with faint seeded slubs (a 960 px tile), on a tint of the
|
|
3
|
+
* tone (`wash`). The threads are black in light and white in dark, like the
|
|
4
|
+
* grain overlay. Intensity never goes above the default (`vivid` draws as the default). Static: `animated` does nothing. React only: nothing in the
|
|
5
|
+
* shared `css/` folder. */
|
|
6
|
+
@import "../css/scene.css";
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
/* `vivid` is capped at the default strength: a texture under body text
|
|
10
|
+
* never gets stronger (the tint and the specks read these two). */
|
|
11
|
+
[data-background="linen"][data-intensity="vivid"][data-intensity] {
|
|
12
|
+
--nxgt-bg-a1: 8%;
|
|
13
|
+
--nxgt-bg-op: 0.72;
|
|
14
|
+
}
|
|
15
|
+
[data-background="linen"] > [data-layer="wash"] {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
background-image: linear-gradient(
|
|
19
|
+
180deg,
|
|
20
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
|
|
21
|
+
color-mix(
|
|
22
|
+
in oklab,
|
|
23
|
+
var(--nxgt-bg-c2) calc(var(--nxgt-bg-a1) * 0.6),
|
|
24
|
+
transparent
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
[data-background="linen"] > [data-scene] > svg {
|
|
29
|
+
filter: invert(var(--nxgt-bg-grain-invert));
|
|
30
|
+
}
|
|
31
|
+
[data-background="linen"] > [data-scene] .lw-v,
|
|
32
|
+
[data-background="linen"] > [data-scene] .lw-h {
|
|
33
|
+
fill: black;
|
|
34
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.1);
|
|
35
|
+
shape-rendering: crispEdges;
|
|
36
|
+
}
|
|
37
|
+
[data-background="linen"] > [data-scene] .lw-b {
|
|
38
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.05);
|
|
39
|
+
}
|
|
40
|
+
[data-background="linen"] > [data-scene] .tx1,
|
|
41
|
+
[data-background="linen"] > [data-scene] .tx2 {
|
|
42
|
+
opacity: calc(var(--nxgt-bg-op) * 0.07);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* The `marble` preset: polished marble. A seeded cloudy body and soft veins
|
|
2
|
+
* (an SVG: a cloud of `feTurbulence` on a seamless 960 px tile, and curves
|
|
3
|
+
* blurred soft; black in light, white in dark), very low in contrast, over a pale tint of the tone
|
|
4
|
+
* (`wash`). Intensity never goes above the default (`vivid` draws as the default). Static: `animated` does nothing. React only: nothing in the
|
|
5
|
+
* shared `css/` folder. */
|
|
6
|
+
@import "../css/scene.css";
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
/* `vivid` is capped at the default strength: a texture under body text
|
|
10
|
+
* never gets stronger (the tint and the specks read these two). */
|
|
11
|
+
[data-background="marble"][data-intensity="vivid"][data-intensity] {
|
|
12
|
+
--nxgt-bg-a1: 8%;
|
|
13
|
+
--nxgt-bg-op: 0.72;
|
|
14
|
+
}
|
|
15
|
+
[data-background="marble"] > [data-layer="wash"] {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
background-image: linear-gradient(
|
|
19
|
+
135deg,
|
|
20
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
|
|
21
|
+
color-mix(
|
|
22
|
+
in oklab,
|
|
23
|
+
var(--nxgt-bg-c2) calc(var(--nxgt-bg-a1) * 0.5),
|
|
24
|
+
transparent
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
[data-background="marble"] > [data-scene] > svg {
|
|
29
|
+
filter: invert(var(--nxgt-bg-grain-invert));
|
|
30
|
+
}
|
|
31
|
+
[data-background="marble"] > [data-scene] .tx1 {
|
|
32
|
+
opacity: calc(var(--nxgt-bg-op) * 0.08);
|
|
33
|
+
}
|
|
34
|
+
[data-background="marble"] > [data-scene] .mv-p,
|
|
35
|
+
[data-background="marble"] > [data-scene] .mh-p {
|
|
36
|
+
fill: none;
|
|
37
|
+
stroke: black;
|
|
38
|
+
stroke-linecap: round;
|
|
39
|
+
stroke-linejoin: round;
|
|
40
|
+
}
|
|
41
|
+
[data-background="marble"] > [data-scene] .mv {
|
|
42
|
+
opacity: calc(
|
|
43
|
+
var(--nxgt-bg-op) *
|
|
44
|
+
0.2 *
|
|
45
|
+
(1 - var(--nxgt-bg-grain-invert) * 0.5)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
[data-background="marble"] > [data-scene] .mh {
|
|
49
|
+
opacity: calc(
|
|
50
|
+
var(--nxgt-bg-op) *
|
|
51
|
+
0.07 *
|
|
52
|
+
(1 - var(--nxgt-bg-grain-invert) * 0.5)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* The `night-sky` preset: line drawings of one theme (see illustrated.css).
|
|
2
|
+
* Motion (opt-in, `animated`): a star twinkles, 14 to 24 s a leg. The builder sets
|
|
3
|
+
* the pace (`p1..p3`) and the delay (`l1..l4`) as classes, so the markup holds
|
|
4
|
+
* no inline style. */
|
|
5
|
+
@import "./illustrated.css";
|
|
6
|
+
|
|
7
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
8
|
+
@keyframes nxgt-bg-night-sky-tw {
|
|
9
|
+
to {
|
|
10
|
+
opacity: 0.2;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer components {
|
|
15
|
+
[data-background="night-sky"][data-animated] > [data-scene] .tw {
|
|
16
|
+
animation: nxgt-bg-night-sky-tw 14s ease-in-out infinite alternate
|
|
17
|
+
var(--nxgt-bg-play, running);
|
|
18
|
+
}
|
|
19
|
+
[data-background="night-sky"][data-animated] > [data-scene] .p1 {
|
|
20
|
+
animation-duration: 14s;
|
|
21
|
+
}
|
|
22
|
+
[data-background="night-sky"][data-animated] > [data-scene] .p2 {
|
|
23
|
+
animation-duration: 19s;
|
|
24
|
+
}
|
|
25
|
+
[data-background="night-sky"][data-animated] > [data-scene] .p3 {
|
|
26
|
+
animation-duration: 24s;
|
|
27
|
+
}
|
|
28
|
+
[data-background="night-sky"][data-animated] > [data-scene] .l1 {
|
|
29
|
+
animation-delay: 0s;
|
|
30
|
+
}
|
|
31
|
+
[data-background="night-sky"][data-animated] > [data-scene] .l2 {
|
|
32
|
+
animation-delay: -3s;
|
|
33
|
+
}
|
|
34
|
+
[data-background="night-sky"][data-animated] > [data-scene] .l3 {
|
|
35
|
+
animation-delay: -7s;
|
|
36
|
+
}
|
|
37
|
+
[data-background="night-sky"][data-animated] > [data-scene] .l4 {
|
|
38
|
+
animation-delay: -11s;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* The `paper` preset: a sheet of paper. A seeded fibre grain (an SVG of
|
|
2
|
+
* `feTurbulence` specks on a seamless 400 px tile: black in light, white in
|
|
3
|
+
* dark, like the grain overlay) over a warm tint that the tone cools or warms
|
|
4
|
+
* (`wash`: cream in light, the tone's colour mixed in). Intensity never goes above the default (`vivid` draws as the default). Static: `animated`
|
|
5
|
+
* does nothing. React only: nothing in the shared `css/` folder. */
|
|
6
|
+
@import "../css/scene.css";
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
/* `vivid` is capped at the default strength: a texture under body text
|
|
10
|
+
* never gets stronger (the tint and the specks read these two). */
|
|
11
|
+
[data-background="paper"][data-intensity="vivid"][data-intensity] {
|
|
12
|
+
--nxgt-bg-a1: 8%;
|
|
13
|
+
--nxgt-bg-op: 0.72;
|
|
14
|
+
}
|
|
15
|
+
[data-background="paper"] > [data-layer="wash"] {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
background-image: linear-gradient(
|
|
19
|
+
180deg,
|
|
20
|
+
color-mix(
|
|
21
|
+
in oklab,
|
|
22
|
+
var(--nxgt-bg-c1) calc(var(--nxgt-bg-a1) * 1.6),
|
|
23
|
+
color-mix(
|
|
24
|
+
in oklab,
|
|
25
|
+
rgb(250 233 196) calc(70% * (1 - var(--nxgt-bg-grain-invert))),
|
|
26
|
+
transparent
|
|
27
|
+
)
|
|
28
|
+
),
|
|
29
|
+
color-mix(
|
|
30
|
+
in oklab,
|
|
31
|
+
var(--nxgt-bg-c2) var(--nxgt-bg-a1),
|
|
32
|
+
color-mix(
|
|
33
|
+
in oklab,
|
|
34
|
+
rgb(250 233 196) calc(42% * (1 - var(--nxgt-bg-grain-invert))),
|
|
35
|
+
transparent
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
[data-background="paper"] > [data-scene] > svg {
|
|
41
|
+
filter: invert(var(--nxgt-bg-grain-invert));
|
|
42
|
+
}
|
|
43
|
+
[data-background="paper"] > [data-scene] .tx1 {
|
|
44
|
+
opacity: calc(var(--nxgt-bg-op) * 0.12);
|
|
45
|
+
}
|
|
46
|
+
[data-background="paper"] > [data-scene] .tx2 {
|
|
47
|
+
opacity: calc(var(--nxgt-bg-op) * 0.09);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* The `plasma` preset: a soft colour field. A seeded SVG of soft discs in
|
|
2
|
+
* radial gradients in the tone's three colours, three strengths each (`pm-l1..3`),
|
|
3
|
+
* over a tint (`wash`). Blended with the page: it adds light in dark. Motion
|
|
4
|
+
* (opt-in, `animated`): the field drifts. React only: nothing in the shared
|
|
5
|
+
* `css/` folder. */
|
|
6
|
+
@import "../css/scene.css";
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
[data-background="plasma"] {
|
|
10
|
+
isolation: isolate;
|
|
11
|
+
}
|
|
12
|
+
[data-background="plasma"] > [data-layer="wash"] {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
background-image: linear-gradient(
|
|
16
|
+
160deg,
|
|
17
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
|
|
18
|
+
color-mix(in oklab, var(--nxgt-bg-c3) var(--nxgt-bg-a1), transparent)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
[data-background="plasma"] > [data-scene] > svg {
|
|
22
|
+
mix-blend-mode: var(--nxgt-bg-glow-blend);
|
|
23
|
+
}
|
|
24
|
+
[data-background="plasma"] > [data-scene] .pm-l1 {
|
|
25
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.16);
|
|
26
|
+
}
|
|
27
|
+
[data-background="plasma"] > [data-scene] .pm-l2 {
|
|
28
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.26);
|
|
29
|
+
}
|
|
30
|
+
[data-background="plasma"] > [data-scene] .pm-l3 {
|
|
31
|
+
fill-opacity: calc(var(--nxgt-bg-op) * 0.38);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
36
|
+
@keyframes nxgt-bg-plasma-drift {
|
|
37
|
+
from {
|
|
38
|
+
transform: translate(-3%, -2%) scale(1);
|
|
39
|
+
}
|
|
40
|
+
to {
|
|
41
|
+
transform: translate(3%, 2%) scale(1.06);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@layer components {
|
|
46
|
+
[data-background="plasma"][data-animated] > [data-scene] .pm-field {
|
|
47
|
+
animation: nxgt-bg-plasma-drift 28s ease-in-out infinite alternate
|
|
48
|
+
var(--nxgt-bg-play, running);
|
|
49
|
+
transform-box: view-box;
|
|
50
|
+
transform-origin: 50% 50%;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* The `rays` preset: a sunburst. A conic gradient of alternating rays from
|
|
2
|
+
* the top centre of the frame (`rays`, a layer twice the frame's size and
|
|
3
|
+
* centred on that point, faded with distance) over a tint (`wash`). CSS only.
|
|
4
|
+
* Blended with the page: it adds light in dark. Motion (opt-in, `animated`):
|
|
5
|
+
* the burst turns slowly. React only: nothing in the shared `css/` folder. */
|
|
6
|
+
@layer components {
|
|
7
|
+
[data-background="rays"] {
|
|
8
|
+
overflow: clip;
|
|
9
|
+
isolation: isolate;
|
|
10
|
+
}
|
|
11
|
+
[data-background="rays"] > [data-layer="wash"] {
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
background-image: radial-gradient(
|
|
15
|
+
ellipse 70% 60% at 50% 0%,
|
|
16
|
+
color-mix(in oklab, var(--nxgt-bg-c2) var(--nxgt-bg-a2), transparent),
|
|
17
|
+
transparent 75%
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
[data-background="rays"] > [data-layer="rays"] {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: -100%;
|
|
23
|
+
right: -50%;
|
|
24
|
+
bottom: 0;
|
|
25
|
+
left: -50%;
|
|
26
|
+
opacity: var(--nxgt-bg-op);
|
|
27
|
+
mix-blend-mode: var(--nxgt-bg-glow-blend);
|
|
28
|
+
background-image: repeating-conic-gradient(
|
|
29
|
+
from 0deg at 50% 50%,
|
|
30
|
+
color-mix(in oklab, var(--nxgt-bg-c1) 34%, transparent) 0deg 6deg,
|
|
31
|
+
transparent 6deg 9deg,
|
|
32
|
+
color-mix(in oklab, var(--nxgt-bg-c2) 24%, transparent) 9deg 12deg,
|
|
33
|
+
transparent 12deg 18deg,
|
|
34
|
+
color-mix(in oklab, var(--nxgt-bg-c3) 28%, transparent) 18deg 21deg,
|
|
35
|
+
transparent 21deg 30deg
|
|
36
|
+
);
|
|
37
|
+
-webkit-mask-image: radial-gradient(
|
|
38
|
+
closest-side,
|
|
39
|
+
rgb(0 0 0 / 0.5) 0,
|
|
40
|
+
black 14%,
|
|
41
|
+
rgb(0 0 0 / 0.35) 55%,
|
|
42
|
+
transparent
|
|
43
|
+
);
|
|
44
|
+
mask-image: radial-gradient(
|
|
45
|
+
closest-side,
|
|
46
|
+
rgb(0 0 0 / 0.5) 0,
|
|
47
|
+
black 14%,
|
|
48
|
+
rgb(0 0 0 / 0.35) 55%,
|
|
49
|
+
transparent
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
55
|
+
@keyframes nxgt-bg-rays-turn {
|
|
56
|
+
to {
|
|
57
|
+
transform: rotate(30deg);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@layer components {
|
|
62
|
+
[data-background="rays"][data-animated] > [data-layer="rays"] {
|
|
63
|
+
animation: nxgt-bg-rays-turn 90s linear infinite
|
|
64
|
+
var(--nxgt-bg-play, running);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* The `ripples` preset: rings spreading from three seeded centres, one tone
|
|
2
|
+
* colour each (`rp-c1..3`), fading outward, over a tint (`wash`). Blended
|
|
3
|
+
* with the page: it adds light in dark. Motion (opt-in, `animated`): each set
|
|
4
|
+
* of rings breathes at its own pace (`rp-d1..3`). React only: nothing in the
|
|
5
|
+
* shared `css/` folder. */
|
|
6
|
+
@import "../css/scene.css";
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
[data-background="ripples"] {
|
|
10
|
+
isolation: isolate;
|
|
11
|
+
}
|
|
12
|
+
[data-background="ripples"] > [data-layer="wash"] {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
background-image: radial-gradient(
|
|
16
|
+
ellipse 90% 80% at 50% 50%,
|
|
17
|
+
color-mix(in oklab, var(--nxgt-bg-c1) var(--nxgt-bg-a1), transparent),
|
|
18
|
+
transparent 80%
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
[data-background="ripples"] > [data-scene] > svg {
|
|
22
|
+
mix-blend-mode: var(--nxgt-bg-glow-blend);
|
|
23
|
+
}
|
|
24
|
+
[data-background="ripples"] > [data-scene] circle {
|
|
25
|
+
fill: none;
|
|
26
|
+
stroke-width: 2;
|
|
27
|
+
opacity: var(--nxgt-bg-op);
|
|
28
|
+
}
|
|
29
|
+
[data-background="ripples"] > [data-scene] .rp-c1 {
|
|
30
|
+
stroke: var(--nxgt-bg-c1);
|
|
31
|
+
}
|
|
32
|
+
[data-background="ripples"] > [data-scene] .rp-c2 {
|
|
33
|
+
stroke: var(--nxgt-bg-c2);
|
|
34
|
+
}
|
|
35
|
+
[data-background="ripples"] > [data-scene] .rp-c3 {
|
|
36
|
+
stroke: var(--nxgt-bg-c3);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
41
|
+
@keyframes nxgt-bg-ripples-breathe {
|
|
42
|
+
from {
|
|
43
|
+
transform: scale(0.94);
|
|
44
|
+
}
|
|
45
|
+
to {
|
|
46
|
+
transform: scale(1.06);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@layer components {
|
|
51
|
+
[data-background="ripples"][data-animated] > [data-scene] [class^="rp-c"] {
|
|
52
|
+
animation: nxgt-bg-ripples-breathe 14s ease-in-out infinite alternate
|
|
53
|
+
var(--nxgt-bg-play, running);
|
|
54
|
+
transform-box: fill-box;
|
|
55
|
+
transform-origin: 50% 50%;
|
|
56
|
+
}
|
|
57
|
+
[data-background="ripples"][data-animated] > [data-scene] .rp-d1 {
|
|
58
|
+
animation-direction: alternate;
|
|
59
|
+
}
|
|
60
|
+
[data-background="ripples"][data-animated] > [data-scene] .rp-d2 {
|
|
61
|
+
animation-duration: 19s;
|
|
62
|
+
animation-direction: alternate-reverse;
|
|
63
|
+
}
|
|
64
|
+
[data-background="ripples"][data-animated] > [data-scene] .rp-d3 {
|
|
65
|
+
animation-duration: 24s;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "stevegires@gmail.com"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"lib/backgrounds/backgrounds.css",
|
|
20
20
|
"lib/galleries/galleries.css",
|
|
21
21
|
"lib/backgrounds/css/*.css",
|
|
22
|
+
"lib/backgrounds/css-react/*.css",
|
|
22
23
|
"lib/components/**/*.css",
|
|
23
24
|
"docs",
|
|
24
25
|
"README.md",
|
|
@@ -151,6 +152,106 @@
|
|
|
151
152
|
"./backgrounds/*.css": {
|
|
152
153
|
"style": "./lib/backgrounds/css/*.css",
|
|
153
154
|
"default": "./lib/backgrounds/css/*.css"
|
|
155
|
+
},
|
|
156
|
+
"./backgrounds/hexagons.css": {
|
|
157
|
+
"style": "./lib/backgrounds/css-react/hexagons.css",
|
|
158
|
+
"default": "./lib/backgrounds/css-react/hexagons.css"
|
|
159
|
+
},
|
|
160
|
+
"./backgrounds/circuit.css": {
|
|
161
|
+
"style": "./lib/backgrounds/css-react/circuit.css",
|
|
162
|
+
"default": "./lib/backgrounds/css-react/circuit.css"
|
|
163
|
+
},
|
|
164
|
+
"./backgrounds/graph-paper.css": {
|
|
165
|
+
"style": "./lib/backgrounds/css-react/graph-paper.css",
|
|
166
|
+
"default": "./lib/backgrounds/css-react/graph-paper.css"
|
|
167
|
+
},
|
|
168
|
+
"./backgrounds/checker.css": {
|
|
169
|
+
"style": "./lib/backgrounds/css-react/checker.css",
|
|
170
|
+
"default": "./lib/backgrounds/css-react/checker.css"
|
|
171
|
+
},
|
|
172
|
+
"./backgrounds/diagonal-checker.css": {
|
|
173
|
+
"style": "./lib/backgrounds/css-react/diagonal-checker.css",
|
|
174
|
+
"default": "./lib/backgrounds/css-react/diagonal-checker.css"
|
|
175
|
+
},
|
|
176
|
+
"./backgrounds/chevrons.css": {
|
|
177
|
+
"style": "./lib/backgrounds/css-react/chevrons.css",
|
|
178
|
+
"default": "./lib/backgrounds/css-react/chevrons.css"
|
|
179
|
+
},
|
|
180
|
+
"./backgrounds/rays.css": {
|
|
181
|
+
"style": "./lib/backgrounds/css-react/rays.css",
|
|
182
|
+
"default": "./lib/backgrounds/css-react/rays.css"
|
|
183
|
+
},
|
|
184
|
+
"./backgrounds/halo.css": {
|
|
185
|
+
"style": "./lib/backgrounds/css-react/halo.css",
|
|
186
|
+
"default": "./lib/backgrounds/css-react/halo.css"
|
|
187
|
+
},
|
|
188
|
+
"./backgrounds/plasma.css": {
|
|
189
|
+
"style": "./lib/backgrounds/css-react/plasma.css",
|
|
190
|
+
"default": "./lib/backgrounds/css-react/plasma.css"
|
|
191
|
+
},
|
|
192
|
+
"./backgrounds/glass.css": {
|
|
193
|
+
"style": "./lib/backgrounds/css-react/glass.css",
|
|
194
|
+
"default": "./lib/backgrounds/css-react/glass.css"
|
|
195
|
+
},
|
|
196
|
+
"./backgrounds/ripples.css": {
|
|
197
|
+
"style": "./lib/backgrounds/css-react/ripples.css",
|
|
198
|
+
"default": "./lib/backgrounds/css-react/ripples.css"
|
|
199
|
+
},
|
|
200
|
+
"./backgrounds/blobs.css": {
|
|
201
|
+
"style": "./lib/backgrounds/css-react/blobs.css",
|
|
202
|
+
"default": "./lib/backgrounds/css-react/blobs.css"
|
|
203
|
+
},
|
|
204
|
+
"./backgrounds/paper.css": {
|
|
205
|
+
"style": "./lib/backgrounds/css-react/paper.css",
|
|
206
|
+
"default": "./lib/backgrounds/css-react/paper.css"
|
|
207
|
+
},
|
|
208
|
+
"./backgrounds/linen.css": {
|
|
209
|
+
"style": "./lib/backgrounds/css-react/linen.css",
|
|
210
|
+
"default": "./lib/backgrounds/css-react/linen.css"
|
|
211
|
+
},
|
|
212
|
+
"./backgrounds/concrete.css": {
|
|
213
|
+
"style": "./lib/backgrounds/css-react/concrete.css",
|
|
214
|
+
"default": "./lib/backgrounds/css-react/concrete.css"
|
|
215
|
+
},
|
|
216
|
+
"./backgrounds/marble.css": {
|
|
217
|
+
"style": "./lib/backgrounds/css-react/marble.css",
|
|
218
|
+
"default": "./lib/backgrounds/css-react/marble.css"
|
|
219
|
+
},
|
|
220
|
+
"./backgrounds/school.css": {
|
|
221
|
+
"style": "./lib/backgrounds/css-react/school.css",
|
|
222
|
+
"default": "./lib/backgrounds/css-react/school.css"
|
|
223
|
+
},
|
|
224
|
+
"./backgrounds/night-sky.css": {
|
|
225
|
+
"style": "./lib/backgrounds/css-react/night-sky.css",
|
|
226
|
+
"default": "./lib/backgrounds/css-react/night-sky.css"
|
|
227
|
+
},
|
|
228
|
+
"./backgrounds/bubbles.css": {
|
|
229
|
+
"style": "./lib/backgrounds/css-react/bubbles.css",
|
|
230
|
+
"default": "./lib/backgrounds/css-react/bubbles.css"
|
|
231
|
+
},
|
|
232
|
+
"./backgrounds/leaves.css": {
|
|
233
|
+
"style": "./lib/backgrounds/css-react/leaves.css",
|
|
234
|
+
"default": "./lib/backgrounds/css-react/leaves.css"
|
|
235
|
+
},
|
|
236
|
+
"./backgrounds/science.css": {
|
|
237
|
+
"style": "./lib/backgrounds/css-react/science.css",
|
|
238
|
+
"default": "./lib/backgrounds/css-react/science.css"
|
|
239
|
+
},
|
|
240
|
+
"./backgrounds/music.css": {
|
|
241
|
+
"style": "./lib/backgrounds/css-react/music.css",
|
|
242
|
+
"default": "./lib/backgrounds/css-react/music.css"
|
|
243
|
+
},
|
|
244
|
+
"./backgrounds/travel.css": {
|
|
245
|
+
"style": "./lib/backgrounds/css-react/travel.css",
|
|
246
|
+
"default": "./lib/backgrounds/css-react/travel.css"
|
|
247
|
+
},
|
|
248
|
+
"./backgrounds/sport.css": {
|
|
249
|
+
"style": "./lib/backgrounds/css-react/sport.css",
|
|
250
|
+
"default": "./lib/backgrounds/css-react/sport.css"
|
|
251
|
+
},
|
|
252
|
+
"./backgrounds/illustrated.css": {
|
|
253
|
+
"style": "./lib/backgrounds/css-react/illustrated.css",
|
|
254
|
+
"default": "./lib/backgrounds/css-react/illustrated.css"
|
|
154
255
|
}
|
|
155
256
|
},
|
|
156
257
|
"sideEffects": [
|
|
@@ -181,7 +282,7 @@
|
|
|
181
282
|
"docs:previews": "vitest run --project previews"
|
|
182
283
|
},
|
|
183
284
|
"dependencies": {
|
|
184
|
-
"@nxgt/material-core": "^0.
|
|
285
|
+
"@nxgt/material-core": "^0.26.0",
|
|
185
286
|
"@base-ui/react": "^1.6.0",
|
|
186
287
|
"@dnd-kit/core": "^6.3.1",
|
|
187
288
|
"@dnd-kit/sortable": "^10.0.0",
|