loading-dev 0.3.1 → 0.3.4
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/README.md +2 -2
- package/dist/arc.d.ts +11 -0
- package/dist/arc.js +10 -0
- package/dist/atom.d.ts +10 -0
- package/dist/atom.js +9 -0
- package/dist/blocks.d.ts +11 -0
- package/dist/blocks.js +10 -0
- package/dist/bouncing-dots.d.ts +6 -0
- package/dist/bouncing-dots.js +8 -0
- package/dist/cap.d.ts +8 -0
- package/dist/cap.js +8 -0
- package/dist/cascade.d.ts +9 -0
- package/dist/cascade.js +9 -0
- package/dist/chunk-5A6DX4J6.js +62 -0
- package/dist/chunk-5DLURQGF.js +88 -0
- package/dist/chunk-5DS5PSRD.js +124 -0
- package/dist/chunk-5LSP7MQQ.js +69 -0
- package/dist/chunk-5R75HMWP.js +55 -0
- package/dist/chunk-7C6Q6WUN.js +47 -0
- package/dist/chunk-A43AJR54.js +79 -0
- package/dist/chunk-AHW6IXXT.js +78 -0
- package/dist/chunk-AY4VLQBZ.js +57 -0
- package/dist/chunk-BMJ3AGRK.js +62 -0
- package/dist/chunk-FKUMWHUL.js +71 -0
- package/dist/chunk-HDBQBCTN.js +74 -0
- package/dist/chunk-I5CFO2M5.js +78 -0
- package/dist/chunk-IQ2WQZFY.js +51 -0
- package/dist/chunk-IRMB7CHZ.js +88 -0
- package/dist/chunk-IWVH2GKE.js +77 -0
- package/dist/chunk-IZ4TRHOC.js +68 -0
- package/dist/chunk-JNR4T6LZ.js +10 -0
- package/dist/chunk-K5XVX5GB.js +60 -0
- package/dist/chunk-LIPOYJAI.js +74 -0
- package/dist/chunk-MVL7SVAH.js +79 -0
- package/dist/chunk-NHN4FV63.js +78 -0
- package/dist/chunk-OMNMMKI7.js +64 -0
- package/dist/chunk-PBB2PRPT.js +83 -0
- package/dist/chunk-RTKHVDCD.js +82 -0
- package/dist/chunk-T5EUYN7R.js +77 -0
- package/dist/chunk-T7OV7MUW.js +58 -0
- package/dist/chunk-TFHDE6YZ.js +92 -0
- package/dist/chunk-UWSCBISJ.js +56 -0
- package/dist/chunk-VBI53UGV.js +73 -0
- package/dist/chunk-VRX5ZYC6.js +41 -0
- package/dist/chunk-X7BJQCYL.js +56 -0
- package/dist/chunk-Y7QGIWTL.js +57 -0
- package/dist/chunk-ZLJYYX76.js +69 -0
- package/dist/circular-dots.d.ts +6 -0
- package/dist/circular-dots.js +8 -0
- package/dist/classic-v2.d.ts +6 -0
- package/dist/classic-v2.js +8 -0
- package/dist/classic.d.ts +6 -0
- package/dist/classic.js +8 -0
- package/dist/clock.d.ts +10 -0
- package/dist/clock.js +9 -0
- package/dist/comet.d.ts +10 -0
- package/dist/comet.js +9 -0
- package/dist/compass.d.ts +6 -0
- package/dist/compass.js +8 -0
- package/dist/dual.d.ts +11 -0
- package/dist/dual.js +10 -0
- package/dist/easing.d.ts +11 -0
- package/dist/easing.js +11 -0
- package/dist/eclipse.d.ts +6 -0
- package/dist/eclipse.js +8 -0
- package/dist/flip.d.ts +6 -0
- package/dist/flip.js +8 -0
- package/dist/frame.d.ts +20 -0
- package/dist/frame.js +13 -0
- package/dist/gather.d.ts +6 -0
- package/dist/gather.js +8 -0
- package/dist/index.d.ts +35 -135
- package/dist/index.js +126 -891
- package/dist/leap.d.ts +6 -0
- package/dist/leap.js +8 -0
- package/dist/linear-dots.d.ts +6 -0
- package/dist/linear-dots.js +8 -0
- package/dist/loading.d.ts +6 -0
- package/dist/loading.js +8 -0
- package/dist/morph.d.ts +6 -0
- package/dist/morph.js +8 -0
- package/dist/motion.d.ts +44 -0
- package/dist/motion.js +26 -0
- package/dist/orbit.d.ts +10 -0
- package/dist/orbit.js +9 -0
- package/dist/pulse.d.ts +6 -0
- package/dist/pulse.js +8 -0
- package/dist/radar.d.ts +10 -0
- package/dist/radar.js +9 -0
- package/dist/ring.d.ts +11 -0
- package/dist/ring.js +10 -0
- package/dist/ripple.d.ts +11 -0
- package/dist/ripple.js +10 -0
- package/dist/slide.d.ts +6 -0
- package/dist/slide.js +8 -0
- package/dist/snake.d.ts +11 -0
- package/dist/snake.js +10 -0
- package/dist/spinners.d.ts +68 -0
- package/dist/spinners.js +39 -0
- package/dist/swirl.d.ts +6 -0
- package/dist/swirl.js +8 -0
- package/dist/trace.d.ts +11 -0
- package/dist/trace.js +10 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.js +0 -0
- package/dist/wave.d.ts +11 -0
- package/dist/wave.js +10 -0
- package/package.json +4 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
STEP_VAR,
|
|
9
|
+
animation,
|
|
10
|
+
stagger
|
|
11
|
+
} from "./chunk-OMNMMKI7.js";
|
|
12
|
+
|
|
13
|
+
// src/eclipse.tsx
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var DOTS = [0, 1];
|
|
16
|
+
var css = `
|
|
17
|
+
.ld-eclipse {
|
|
18
|
+
position: relative;
|
|
19
|
+
width: ${SIZE};
|
|
20
|
+
height: ${SIZE};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ld-eclipse-dot {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 30%;
|
|
26
|
+
left: 30%;
|
|
27
|
+
width: 40%;
|
|
28
|
+
height: 40%;
|
|
29
|
+
background: currentColor;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
${animation("eclipse", ["ld-eclipse-slide", "ld-eclipse-depth"], "ease-in-out")}
|
|
32
|
+
animation-delay: ${stagger("eclipse", DOTS.length)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes ld-eclipse-slide {
|
|
36
|
+
0%,
|
|
37
|
+
100% {
|
|
38
|
+
translate: 75% 0;
|
|
39
|
+
}
|
|
40
|
+
50% {
|
|
41
|
+
translate: -75% 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes ld-eclipse-depth {
|
|
46
|
+
0%,
|
|
47
|
+
50%,
|
|
48
|
+
100% {
|
|
49
|
+
opacity: 0.75;
|
|
50
|
+
scale: 1;
|
|
51
|
+
}
|
|
52
|
+
25% {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
scale: 1.3;
|
|
55
|
+
}
|
|
56
|
+
75% {
|
|
57
|
+
opacity: 0.5;
|
|
58
|
+
scale: 0.7;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
.ld-eclipse-dot {
|
|
64
|
+
translate: calc(var(${STEP_VAR}) * 150% - 75%) 0;
|
|
65
|
+
animation: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
function Eclipse(props) {
|
|
70
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "eclipse", children: css }),
|
|
72
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("eclipse", props), children: DOTS.map((index) => /* @__PURE__ */ jsx("div", { className: "ld-eclipse-dot", style: step(index) }, index)) })
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
Eclipse
|
|
78
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot
|
|
4
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
5
|
+
import {
|
|
6
|
+
SIZE,
|
|
7
|
+
animation
|
|
8
|
+
} from "./chunk-OMNMMKI7.js";
|
|
9
|
+
|
|
10
|
+
// src/morph.tsx
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var css = `
|
|
13
|
+
.ld-morph {
|
|
14
|
+
width: ${SIZE};
|
|
15
|
+
height: ${SIZE};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ld-morph-shape {
|
|
19
|
+
width: 64%;
|
|
20
|
+
height: 64%;
|
|
21
|
+
margin: 18%;
|
|
22
|
+
background: currentColor;
|
|
23
|
+
border-radius: calc(${SIZE} * 0.08);
|
|
24
|
+
${animation("morph", "ld-morph-round", "ease-in-out")}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes ld-morph-round {
|
|
28
|
+
0% {
|
|
29
|
+
border-radius: calc(${SIZE} * 0.08);
|
|
30
|
+
transform: rotate(0);
|
|
31
|
+
}
|
|
32
|
+
50% {
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
transform: rotate(45deg);
|
|
35
|
+
}
|
|
36
|
+
100% {
|
|
37
|
+
border-radius: calc(${SIZE} * 0.08);
|
|
38
|
+
transform: rotate(90deg);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (prefers-reduced-motion: reduce) {
|
|
43
|
+
.ld-morph-shape {
|
|
44
|
+
animation: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
function Morph(props) {
|
|
49
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
50
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "morph", children: css }),
|
|
51
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("morph", props), children: /* @__PURE__ */ jsx("div", { className: "ld-morph-shape" }) })
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
Morph
|
|
57
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
animation,
|
|
9
|
+
stagger
|
|
10
|
+
} from "./chunk-OMNMMKI7.js";
|
|
11
|
+
|
|
12
|
+
// src/swirl.tsx
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var RING = [0, 1, 2, 7, null, 3, 6, 5, 4];
|
|
15
|
+
var PLACES = RING.filter((place) => place !== null).length;
|
|
16
|
+
var css = `
|
|
17
|
+
.ld-swirl {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-columns: repeat(3, 1fr);
|
|
20
|
+
grid-template-rows: repeat(3, 1fr);
|
|
21
|
+
gap: calc(${SIZE} * 0.15625);
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
width: ${SIZE};
|
|
24
|
+
height: ${SIZE};
|
|
25
|
+
padding: calc(${SIZE} * 0.0625);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ld-swirl-cell {
|
|
29
|
+
background: currentColor;
|
|
30
|
+
border-radius: calc(${SIZE} * 0.0625);
|
|
31
|
+
${animation("swirl", "ld-swirl-fade", "linear")}
|
|
32
|
+
animation-delay: ${stagger("swirl", PLACES)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes ld-swirl-fade {
|
|
36
|
+
from {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
to {
|
|
40
|
+
opacity: 0.2;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
.ld-swirl-cell {
|
|
46
|
+
opacity: 0.6;
|
|
47
|
+
animation: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
function Swirl(props) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "swirl", children: css }),
|
|
54
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("swirl", props), children: RING.map(
|
|
55
|
+
(place, index) => place === null ? /* @__PURE__ */ jsx("div", {}, index) : /* @__PURE__ */ jsx("div", { className: "ld-swirl-cell", style: step(place) }, index)
|
|
56
|
+
) })
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
Swirl
|
|
62
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot
|
|
4
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
5
|
+
import {
|
|
6
|
+
SIZE,
|
|
7
|
+
animation
|
|
8
|
+
} from "./chunk-OMNMMKI7.js";
|
|
9
|
+
|
|
10
|
+
// src/pulse.tsx
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var css = `
|
|
13
|
+
.ld-pulse {
|
|
14
|
+
width: ${SIZE};
|
|
15
|
+
height: ${SIZE};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ld-pulse-ring {
|
|
19
|
+
transform-origin: center;
|
|
20
|
+
${animation("pulse", "ld-pulse-ripple", "ease-out")}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes ld-pulse-ripple {
|
|
24
|
+
from {
|
|
25
|
+
opacity: 0.4;
|
|
26
|
+
transform: scale(0.25);
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (prefers-reduced-motion: reduce) {
|
|
35
|
+
.ld-pulse-ring {
|
|
36
|
+
opacity: 0.2;
|
|
37
|
+
animation: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
function Pulse(props) {
|
|
42
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "pulse", children: css }),
|
|
44
|
+
/* @__PURE__ */ jsxs(
|
|
45
|
+
"svg",
|
|
46
|
+
{
|
|
47
|
+
...spinnerRoot("pulse", props),
|
|
48
|
+
fill: "none",
|
|
49
|
+
role: "presentation",
|
|
50
|
+
viewBox: "0 0 16 16",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
"circle",
|
|
54
|
+
{
|
|
55
|
+
className: "ld-pulse-ring",
|
|
56
|
+
cx: "8",
|
|
57
|
+
cy: "8",
|
|
58
|
+
fill: "currentColor",
|
|
59
|
+
r: "8"
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
Pulse
|
|
71
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rotationCss,
|
|
3
|
+
spinClass
|
|
4
|
+
} from "./chunk-7C6Q6WUN.js";
|
|
5
|
+
import {
|
|
6
|
+
linecap
|
|
7
|
+
} from "./chunk-JNR4T6LZ.js";
|
|
8
|
+
import {
|
|
9
|
+
SpinnerStyle,
|
|
10
|
+
spinnerRoot
|
|
11
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
12
|
+
import {
|
|
13
|
+
SIZE
|
|
14
|
+
} from "./chunk-OMNMMKI7.js";
|
|
15
|
+
|
|
16
|
+
// src/trace.tsx
|
|
17
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
var VIEW = 20;
|
|
19
|
+
var SIDE = 17.5;
|
|
20
|
+
var RADIUS = 4;
|
|
21
|
+
var PERIMETER = 4 * (SIDE - 2 * RADIUS) + 2 * Math.PI * RADIUS;
|
|
22
|
+
var DASH = 16;
|
|
23
|
+
var RECT = {
|
|
24
|
+
height: SIDE,
|
|
25
|
+
rx: RADIUS,
|
|
26
|
+
width: SIDE,
|
|
27
|
+
x: (VIEW - SIDE) / 2,
|
|
28
|
+
y: (VIEW - SIDE) / 2
|
|
29
|
+
};
|
|
30
|
+
var css = `
|
|
31
|
+
.ld-trace {
|
|
32
|
+
width: ${SIZE};
|
|
33
|
+
height: ${SIZE};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
${rotationCss(
|
|
37
|
+
"trace",
|
|
38
|
+
`to {
|
|
39
|
+
stroke-dashoffset: ${-PERIMETER};
|
|
40
|
+
}`
|
|
41
|
+
)}
|
|
42
|
+
`;
|
|
43
|
+
function Trace({ cap, easing, ...rest }) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "trace", children: css }),
|
|
46
|
+
/* @__PURE__ */ jsxs(
|
|
47
|
+
"svg",
|
|
48
|
+
{
|
|
49
|
+
...spinnerRoot("trace", rest),
|
|
50
|
+
fill: "none",
|
|
51
|
+
role: "presentation",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
strokeWidth: "2.5",
|
|
54
|
+
viewBox: `0 0 ${VIEW} ${VIEW}`,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx("rect", { ...RECT, opacity: "0.2" }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
"rect",
|
|
59
|
+
{
|
|
60
|
+
...RECT,
|
|
61
|
+
className: spinClass("trace", easing),
|
|
62
|
+
strokeDasharray: `${DASH} ${PERIMETER - DASH}`,
|
|
63
|
+
strokeLinecap: linecap(cap)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
Trace
|
|
74
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
linecap
|
|
3
|
+
} from "./chunk-JNR4T6LZ.js";
|
|
4
|
+
import {
|
|
5
|
+
SpinnerStyle,
|
|
6
|
+
spinnerRoot,
|
|
7
|
+
step
|
|
8
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
9
|
+
import {
|
|
10
|
+
SIZE,
|
|
11
|
+
animation,
|
|
12
|
+
stagger
|
|
13
|
+
} from "./chunk-OMNMMKI7.js";
|
|
14
|
+
|
|
15
|
+
// src/cascade.tsx
|
|
16
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var RADII = [10.5, 7, 3.5];
|
|
18
|
+
var SLOTS = 24;
|
|
19
|
+
var css = `
|
|
20
|
+
.ld-cascade {
|
|
21
|
+
width: ${SIZE};
|
|
22
|
+
height: ${SIZE};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ld-cascade-arc {
|
|
26
|
+
transform-origin: center;
|
|
27
|
+
${animation("cascade", "ld-cascade-turn", "cubic-bezier(0.68, -0.75, 0.265, 1.75)")}
|
|
28
|
+
animation-delay: ${stagger("cascade", SLOTS)};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes ld-cascade-turn {
|
|
32
|
+
to {
|
|
33
|
+
transform: rotate(360deg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
.ld-cascade-arc {
|
|
39
|
+
animation: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
function Cascade({ cap, ...rest }) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "cascade", children: css }),
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
"svg",
|
|
48
|
+
{
|
|
49
|
+
...spinnerRoot("cascade", rest),
|
|
50
|
+
fill: "none",
|
|
51
|
+
role: "presentation",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
strokeLinecap: linecap(cap),
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
viewBox: "0 0 24 24",
|
|
56
|
+
children: RADII.map((r, index) => {
|
|
57
|
+
const circumference = 2 * Math.PI * r;
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
"circle",
|
|
60
|
+
{
|
|
61
|
+
className: "ld-cascade-arc",
|
|
62
|
+
cx: "12",
|
|
63
|
+
cy: "12",
|
|
64
|
+
r,
|
|
65
|
+
strokeDasharray: `${circumference / 4} ${circumference * 3 / 4}`,
|
|
66
|
+
style: step(index)
|
|
67
|
+
},
|
|
68
|
+
r
|
|
69
|
+
);
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
Cascade
|
|
78
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rotationCss,
|
|
3
|
+
spinClass
|
|
4
|
+
} from "./chunk-7C6Q6WUN.js";
|
|
5
|
+
import {
|
|
6
|
+
SpinnerStyle,
|
|
7
|
+
spinnerRoot
|
|
8
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
9
|
+
import {
|
|
10
|
+
SIZE
|
|
11
|
+
} from "./chunk-OMNMMKI7.js";
|
|
12
|
+
|
|
13
|
+
// src/clock.tsx
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var css = `
|
|
16
|
+
.ld-clock {
|
|
17
|
+
width: ${SIZE};
|
|
18
|
+
height: ${SIZE};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
${rotationCss("clock")}
|
|
22
|
+
`;
|
|
23
|
+
function Clock({ easing, ...rest }) {
|
|
24
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "clock", children: css }),
|
|
26
|
+
/* @__PURE__ */ jsxs(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
...spinnerRoot("clock", rest),
|
|
30
|
+
fill: "none",
|
|
31
|
+
role: "presentation",
|
|
32
|
+
viewBox: "0 0 16 16",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.1", r: "8" }),
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
"path",
|
|
37
|
+
{
|
|
38
|
+
className: spinClass("clock", easing),
|
|
39
|
+
d: "M11.1937 2.92061C10.5206 2.49739 9.77304 2.21397 8.9954 2.08314C8.45076 1.99151 8 2.44772 8 3V7.20324C8 7.49211 8.12492 7.76686 8.34259 7.95677L11.8999 11.0603C12.3287 11.4344 12.9913 11.378 13.2643 10.8787C13.6356 10.1998 13.8736 9.45248 13.9617 8.67713C14.0892 7.55433 13.8971 6.41834 13.4074 5.39993C12.9177 4.38152 12.1503 3.5221 11.1937 2.92061Z",
|
|
40
|
+
fill: "currentColor"
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
Clock
|
|
51
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
cssVars,
|
|
4
|
+
spinnerRoot,
|
|
5
|
+
step
|
|
6
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
7
|
+
import {
|
|
8
|
+
SIZE,
|
|
9
|
+
animation,
|
|
10
|
+
stagger
|
|
11
|
+
} from "./chunk-OMNMMKI7.js";
|
|
12
|
+
|
|
13
|
+
// src/slide.tsx
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var DOT = 34;
|
|
16
|
+
var GAP = 20;
|
|
17
|
+
var MARGIN = (100 - 2 * DOT - GAP) / 2;
|
|
18
|
+
var FAR = `${((DOT + GAP) / DOT * 100).toFixed(1)}%`;
|
|
19
|
+
var RESTS = [
|
|
20
|
+
`translate(${FAR}, 0)`,
|
|
21
|
+
"translate(0, 0)",
|
|
22
|
+
`translate(0, ${FAR})`
|
|
23
|
+
];
|
|
24
|
+
var css = `
|
|
25
|
+
.ld-slide {
|
|
26
|
+
position: relative;
|
|
27
|
+
width: ${SIZE};
|
|
28
|
+
height: ${SIZE};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ld-slide-dot {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: ${MARGIN}%;
|
|
34
|
+
left: ${MARGIN}%;
|
|
35
|
+
width: ${DOT}%;
|
|
36
|
+
height: ${DOT}%;
|
|
37
|
+
background: currentColor;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
${animation("slide", "ld-slide-walk", "ease-in-out")}
|
|
40
|
+
animation-delay: ${stagger("slide", RESTS.length)};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes ld-slide-walk {
|
|
44
|
+
0% {
|
|
45
|
+
transform: translate(${FAR}, 0);
|
|
46
|
+
}
|
|
47
|
+
8.33%,
|
|
48
|
+
25% {
|
|
49
|
+
transform: translate(${FAR}, ${FAR});
|
|
50
|
+
}
|
|
51
|
+
33.33%,
|
|
52
|
+
50% {
|
|
53
|
+
transform: translate(0, ${FAR});
|
|
54
|
+
}
|
|
55
|
+
58.33%,
|
|
56
|
+
75% {
|
|
57
|
+
transform: translate(0, 0);
|
|
58
|
+
}
|
|
59
|
+
83.33%,
|
|
60
|
+
100% {
|
|
61
|
+
transform: translate(${FAR}, 0);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
.ld-slide-dot {
|
|
67
|
+
transform: var(--ld-slide-rest);
|
|
68
|
+
animation: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
function Slide(props) {
|
|
73
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
74
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "slide", children: css }),
|
|
75
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("slide", props), children: RESTS.map((rest, index) => /* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: "ld-slide-dot",
|
|
79
|
+
style: cssVars({ ...step(index), "--ld-slide-rest": rest })
|
|
80
|
+
},
|
|
81
|
+
rest
|
|
82
|
+
)) })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
Slide
|
|
88
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
STEP_VAR,
|
|
9
|
+
animation,
|
|
10
|
+
stagger
|
|
11
|
+
} from "./chunk-OMNMMKI7.js";
|
|
12
|
+
|
|
13
|
+
// src/ripple.tsx
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var DEFAULT_RIPPLE_DIRECTION = "out";
|
|
16
|
+
var RINGS = Array.from({ length: 3 }, (_, index) => index);
|
|
17
|
+
var css = `
|
|
18
|
+
.ld-ripple {
|
|
19
|
+
position: relative;
|
|
20
|
+
width: ${SIZE};
|
|
21
|
+
height: ${SIZE};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ld-ripple-ring {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
border: calc(${SIZE} * 0.08) solid currentColor;
|
|
29
|
+
border-radius: 9999px;
|
|
30
|
+
${animation("ripple", "ld-ripple-spread", "ease-out")}
|
|
31
|
+
animation-delay: ${stagger("ripple", RINGS.length)};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ld-ripple-ring-in {
|
|
35
|
+
animation-direction: reverse;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes ld-ripple-spread {
|
|
39
|
+
from {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
transform: scale(0);
|
|
42
|
+
}
|
|
43
|
+
to {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
transform: scale(1);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (prefers-reduced-motion: reduce) {
|
|
50
|
+
.ld-ripple-ring {
|
|
51
|
+
opacity: 0.4;
|
|
52
|
+
transform: scale(calc((var(${STEP_VAR}) + 1) / ${RINGS.length}));
|
|
53
|
+
animation: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
function Ripple({
|
|
58
|
+
direction = DEFAULT_RIPPLE_DIRECTION,
|
|
59
|
+
...rest
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
62
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "ripple", children: css }),
|
|
63
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("ripple", rest), children: RINGS.map((index) => /* @__PURE__ */ jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: `ld-ripple-ring ld-ripple-ring-${direction}`,
|
|
67
|
+
style: step(index)
|
|
68
|
+
},
|
|
69
|
+
index
|
|
70
|
+
)) })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
DEFAULT_RIPPLE_DIRECTION,
|
|
76
|
+
Ripple
|
|
77
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-VRX5ZYC6.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
STEP_VAR,
|
|
9
|
+
animation,
|
|
10
|
+
stagger
|
|
11
|
+
} from "./chunk-OMNMMKI7.js";
|
|
12
|
+
|
|
13
|
+
// src/classic.tsx
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var BARS = Array.from({ length: 12 }, (_, index) => index);
|
|
16
|
+
var css = `
|
|
17
|
+
.ld-classic {
|
|
18
|
+
width: ${SIZE};
|
|
19
|
+
height: ${SIZE};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ld-classic-inner {
|
|
23
|
+
position: relative;
|
|
24
|
+
top: 50%;
|
|
25
|
+
left: 50%;
|
|
26
|
+
width: ${SIZE};
|
|
27
|
+
height: ${SIZE};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ld-classic-bar {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: -3.9%;
|
|
33
|
+
left: -10%;
|
|
34
|
+
width: 24%;
|
|
35
|
+
height: 8%;
|
|
36
|
+
background: currentColor;
|
|
37
|
+
border-radius: 6px;
|
|
38
|
+
transform: rotate(calc(var(${STEP_VAR}) * 30deg)) translate(146%);
|
|
39
|
+
${animation("classic", "ld-classic-spin", "linear")}
|
|
40
|
+
animation-delay: ${stagger("classic", BARS.length)};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes ld-classic-spin {
|
|
44
|
+
0% {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
}
|
|
47
|
+
100% {
|
|
48
|
+
opacity: 0.15;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (prefers-reduced-motion: reduce) {
|
|
53
|
+
.ld-classic-bar {
|
|
54
|
+
opacity: 0.5;
|
|
55
|
+
animation: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
function Classic(props) {
|
|
60
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "classic", children: css }),
|
|
62
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("classic", props), children: /* @__PURE__ */ jsx("div", { className: "ld-classic-inner", children: BARS.map((bar) => /* @__PURE__ */ jsx("div", { className: "ld-classic-bar", style: step(bar) }, bar)) }) })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
Classic
|
|
68
|
+
};
|