loading-dev 0.3.3 → 0.3.5
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 +7 -9
- 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-2LMGBBRJ.js +77 -0
- package/dist/chunk-2OX27TAE.js +69 -0
- package/dist/chunk-2TYML5J2.js +51 -0
- package/dist/chunk-3WMZVDPS.js +61 -0
- package/dist/chunk-4O4ADYWE.js +73 -0
- package/dist/chunk-5UAEBEER.js +78 -0
- package/dist/chunk-A2PZBHTA.js +41 -0
- package/dist/chunk-BAVSTTWG.js +88 -0
- package/dist/chunk-BCIAMPLU.js +87 -0
- package/dist/chunk-DKYEZLIN.js +72 -0
- package/dist/chunk-FQ2U2M7F.js +76 -0
- package/dist/chunk-FWH6VWVK.js +59 -0
- package/dist/chunk-HL7TIIDB.js +124 -0
- package/dist/chunk-IJJULNRU.js +53 -0
- package/dist/chunk-JKLL7YYG.js +85 -0
- package/dist/chunk-JNR4T6LZ.js +10 -0
- package/dist/chunk-JQNF5GYA.js +52 -0
- package/dist/chunk-KAZ5BTXC.js +74 -0
- package/dist/chunk-KOYM24WV.js +72 -0
- package/dist/chunk-L2DUMHO4.js +69 -0
- package/dist/chunk-LDXBT62V.js +57 -0
- package/dist/chunk-MAKBZTL3.js +56 -0
- package/dist/chunk-OMNMMKI7.js +64 -0
- package/dist/chunk-P4BSSDSY.js +51 -0
- package/dist/chunk-PM6DU637.js +70 -0
- package/dist/chunk-PVVWLDIS.js +33 -0
- package/dist/chunk-R5ZDKN3Z.js +59 -0
- package/dist/chunk-RAHAQ7XK.js +61 -0
- package/dist/chunk-SUUR5WMA.js +46 -0
- package/dist/chunk-UAO52LUL.js +48 -0
- package/dist/chunk-ULWRXY3A.js +50 -0
- package/dist/chunk-UOXB5QOZ.js +81 -0
- package/dist/chunk-UXTZTFNZ.js +62 -0
- package/dist/chunk-VZX7APSS.js +82 -0
- package/dist/chunk-YIB63EKJ.js +49 -0
- package/dist/circular-dots.d.ts +6 -0
- package/dist/circular-dots.js +9 -0
- package/dist/classic-v2.d.ts +6 -0
- package/dist/classic-v2.js +9 -0
- package/dist/classic.d.ts +6 -0
- package/dist/classic.js +9 -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/fade.d.ts +8 -0
- package/dist/fade.js +7 -0
- package/dist/flip.d.ts +6 -0
- package/dist/flip.js +8 -0
- package/dist/frame.d.ts +18 -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 -199
- package/dist/index.js +106 -1794
- 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 +9 -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 +40 -0
- package/dist/swirl.d.ts +6 -0
- package/dist/swirl.js +9 -0
- package/dist/trace.d.ts +11 -0
- package/dist/trace.js +10 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +0 -0
- package/dist/wave.d.ts +11 -0
- package/dist/wave.js +10 -0
- package/package.json +12 -9
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
rotationCss,
|
|
3
|
+
spinClass
|
|
4
|
+
} from "./chunk-A2PZBHTA.js";
|
|
5
|
+
import {
|
|
6
|
+
SpinnerStyle,
|
|
7
|
+
cssVars,
|
|
8
|
+
spinnerRoot,
|
|
9
|
+
step
|
|
10
|
+
} from "./chunk-UAO52LUL.js";
|
|
11
|
+
import {
|
|
12
|
+
SIZE,
|
|
13
|
+
stagger
|
|
14
|
+
} from "./chunk-OMNMMKI7.js";
|
|
15
|
+
|
|
16
|
+
// src/atom.tsx
|
|
17
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
var ORBITS = Array.from({ length: 3 }, (_, index) => index);
|
|
19
|
+
var TILT = 180 / ORBITS.length;
|
|
20
|
+
var STROKE = `calc(${SIZE} * 0.055)`;
|
|
21
|
+
var INNER_STROKE = `calc(${SIZE} * 0.045)`;
|
|
22
|
+
var css = `
|
|
23
|
+
.ld-atom {
|
|
24
|
+
position: relative;
|
|
25
|
+
width: ${SIZE};
|
|
26
|
+
height: ${SIZE};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ld-atom-shell {
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 0;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
border: ${STROKE} solid currentColor;
|
|
34
|
+
border-radius: 9999px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ld-atom-orbit {
|
|
38
|
+
position: absolute;
|
|
39
|
+
inset: 0;
|
|
40
|
+
transform-style: preserve-3d;
|
|
41
|
+
transform: rotate(var(--ld-atom-tilt)) rotateX(90deg);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ld-atom-ring {
|
|
45
|
+
position: absolute;
|
|
46
|
+
inset: 0;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
border: ${INNER_STROKE} solid currentColor;
|
|
49
|
+
border-radius: 9999px;
|
|
50
|
+
transform: rotateX(90deg);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
${rotationCss("atom")}
|
|
54
|
+
|
|
55
|
+
.ld-atom-spin {
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
transform-style: preserve-3d;
|
|
59
|
+
animation-delay: ${stagger("atom", ORBITS.length)};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
.ld-atom-spin {
|
|
64
|
+
transform: rotate(${TILT}deg);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
function Atom({ easing, ...rest }) {
|
|
69
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "atom", children: css }),
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { ...spinnerRoot("atom", rest), children: [
|
|
72
|
+
/* @__PURE__ */ jsx("div", { className: "ld-atom-shell" }),
|
|
73
|
+
ORBITS.map((index) => /* @__PURE__ */ jsx(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: "ld-atom-orbit",
|
|
77
|
+
style: cssVars({ "--ld-atom-tilt": `${index * TILT}deg` }),
|
|
78
|
+
children: /* @__PURE__ */ jsx("div", { className: spinClass("atom", easing), style: step(index), children: /* @__PURE__ */ jsx("div", { className: "ld-atom-ring" }) })
|
|
79
|
+
},
|
|
80
|
+
index
|
|
81
|
+
))
|
|
82
|
+
] })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
Atom
|
|
88
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
cssVars,
|
|
4
|
+
spinnerRoot,
|
|
5
|
+
step
|
|
6
|
+
} from "./chunk-UAO52LUL.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
|
+
}
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
function Slide(props) {
|
|
72
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
73
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "slide", children: css }),
|
|
74
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("slide", props), children: RESTS.map((rest, index) => /* @__PURE__ */ jsx(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
className: "ld-slide-dot",
|
|
78
|
+
style: cssVars({ ...step(index), "--ld-slide-rest": rest })
|
|
79
|
+
},
|
|
80
|
+
rest
|
|
81
|
+
)) })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
Slide
|
|
87
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-UAO52LUL.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
STEP_VAR,
|
|
9
|
+
animation,
|
|
10
|
+
stagger
|
|
11
|
+
} from "./chunk-OMNMMKI7.js";
|
|
12
|
+
|
|
13
|
+
// src/wave.tsx
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var DEFAULT_WAVE_ORIGIN = "center";
|
|
16
|
+
var BARS = Array.from({ length: 5 }, (_, index) => index);
|
|
17
|
+
var css = `
|
|
18
|
+
.ld-wave {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
width: ${SIZE};
|
|
23
|
+
height: ${SIZE};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ld-wave-bar {
|
|
27
|
+
width: calc(${SIZE} * 0.12);
|
|
28
|
+
height: 100%;
|
|
29
|
+
background: currentColor;
|
|
30
|
+
border-radius: 9999px;
|
|
31
|
+
${animation("wave", "ld-wave-rise", "ease-in-out")}
|
|
32
|
+
animation-delay: ${stagger("wave", BARS.length)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ld-wave-bar-bottom {
|
|
36
|
+
align-self: flex-end;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@keyframes ld-wave-rise {
|
|
40
|
+
0%,
|
|
41
|
+
100% {
|
|
42
|
+
height: 30%;
|
|
43
|
+
}
|
|
44
|
+
50% {
|
|
45
|
+
height: 100%;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (prefers-reduced-motion: reduce) {
|
|
50
|
+
.ld-wave-bar {
|
|
51
|
+
height: calc((0.4 + var(${STEP_VAR}) * 0.15) * 100%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
function Wave({ origin = DEFAULT_WAVE_ORIGIN, ...rest }) {
|
|
56
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "wave", children: css }),
|
|
58
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("wave", rest), children: BARS.map((index) => /* @__PURE__ */ jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: `ld-wave-bar ld-wave-bar-${origin}`,
|
|
62
|
+
style: step(index)
|
|
63
|
+
},
|
|
64
|
+
index
|
|
65
|
+
)) })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
DEFAULT_WAVE_ORIGIN,
|
|
71
|
+
Wave
|
|
72
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-UAO52LUL.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
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
function Ripple({
|
|
57
|
+
direction = DEFAULT_RIPPLE_DIRECTION,
|
|
58
|
+
...rest
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "ripple", children: css }),
|
|
62
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("ripple", rest), children: RINGS.map((index) => /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: `ld-ripple-ring ld-ripple-ring-${direction}`,
|
|
66
|
+
style: step(index)
|
|
67
|
+
},
|
|
68
|
+
index
|
|
69
|
+
)) })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
DEFAULT_RIPPLE_DIRECTION,
|
|
75
|
+
Ripple
|
|
76
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot,
|
|
4
|
+
step
|
|
5
|
+
} from "./chunk-UAO52LUL.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
animation,
|
|
9
|
+
stagger
|
|
10
|
+
} from "./chunk-OMNMMKI7.js";
|
|
11
|
+
|
|
12
|
+
// src/linear-dots.tsx
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var DOTS = Array.from({ length: 3 }, (_, index) => index);
|
|
15
|
+
var css = `
|
|
16
|
+
.ld-linear-dots {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: calc(${SIZE} * 0.1875);
|
|
20
|
+
height: ${SIZE};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ld-linear-dots-dot {
|
|
24
|
+
width: calc(${SIZE} * 0.1875);
|
|
25
|
+
height: calc(${SIZE} * 0.1875);
|
|
26
|
+
background: currentColor;
|
|
27
|
+
border-radius: 9999px;
|
|
28
|
+
${animation("linear-dots", "ld-linear-dots-fade", "linear")}
|
|
29
|
+
animation-delay: ${stagger("linear-dots", DOTS.length)};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes ld-linear-dots-fade {
|
|
33
|
+
0% {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
}
|
|
36
|
+
66.67% {
|
|
37
|
+
opacity: 0.5;
|
|
38
|
+
}
|
|
39
|
+
100% {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
.ld-linear-dots-dot {
|
|
46
|
+
opacity: 0.75;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
function LinearDots(props) {
|
|
51
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "linear-dots", children: css }),
|
|
53
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("linear-dots", props), children: DOTS.map((dot) => /* @__PURE__ */ jsx("div", { className: "ld-linear-dots-dot", style: step(dot) }, dot)) })
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
LinearDots
|
|
59
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Swirl
|
|
3
|
+
} from "./chunk-SUUR5WMA.js";
|
|
4
|
+
import {
|
|
5
|
+
Trace
|
|
6
|
+
} from "./chunk-KAZ5BTXC.js";
|
|
7
|
+
import {
|
|
8
|
+
Wave
|
|
9
|
+
} from "./chunk-DKYEZLIN.js";
|
|
10
|
+
import {
|
|
11
|
+
Orbit
|
|
12
|
+
} from "./chunk-LDXBT62V.js";
|
|
13
|
+
import {
|
|
14
|
+
Pulse
|
|
15
|
+
} from "./chunk-PM6DU637.js";
|
|
16
|
+
import {
|
|
17
|
+
Radar
|
|
18
|
+
} from "./chunk-2OX27TAE.js";
|
|
19
|
+
import {
|
|
20
|
+
Ring
|
|
21
|
+
} from "./chunk-L2DUMHO4.js";
|
|
22
|
+
import {
|
|
23
|
+
Ripple
|
|
24
|
+
} from "./chunk-FQ2U2M7F.js";
|
|
25
|
+
import {
|
|
26
|
+
Slide
|
|
27
|
+
} from "./chunk-BCIAMPLU.js";
|
|
28
|
+
import {
|
|
29
|
+
Snake
|
|
30
|
+
} from "./chunk-UOXB5QOZ.js";
|
|
31
|
+
import {
|
|
32
|
+
Flip
|
|
33
|
+
} from "./chunk-YIB63EKJ.js";
|
|
34
|
+
import {
|
|
35
|
+
Gather
|
|
36
|
+
} from "./chunk-JKLL7YYG.js";
|
|
37
|
+
import {
|
|
38
|
+
Leap
|
|
39
|
+
} from "./chunk-4O4ADYWE.js";
|
|
40
|
+
import {
|
|
41
|
+
LinearDots
|
|
42
|
+
} from "./chunk-FWH6VWVK.js";
|
|
43
|
+
import {
|
|
44
|
+
Loading
|
|
45
|
+
} from "./chunk-RAHAQ7XK.js";
|
|
46
|
+
import {
|
|
47
|
+
Morph
|
|
48
|
+
} from "./chunk-P4BSSDSY.js";
|
|
49
|
+
import {
|
|
50
|
+
Classic
|
|
51
|
+
} from "./chunk-IJJULNRU.js";
|
|
52
|
+
import {
|
|
53
|
+
Clock
|
|
54
|
+
} from "./chunk-2TYML5J2.js";
|
|
55
|
+
import {
|
|
56
|
+
Comet
|
|
57
|
+
} from "./chunk-UXTZTFNZ.js";
|
|
58
|
+
import {
|
|
59
|
+
Compass
|
|
60
|
+
} from "./chunk-JQNF5GYA.js";
|
|
61
|
+
import {
|
|
62
|
+
Dual
|
|
63
|
+
} from "./chunk-5UAEBEER.js";
|
|
64
|
+
import {
|
|
65
|
+
Eclipse
|
|
66
|
+
} from "./chunk-2LMGBBRJ.js";
|
|
67
|
+
import {
|
|
68
|
+
Arc
|
|
69
|
+
} from "./chunk-MAKBZTL3.js";
|
|
70
|
+
import {
|
|
71
|
+
Atom
|
|
72
|
+
} from "./chunk-BAVSTTWG.js";
|
|
73
|
+
import {
|
|
74
|
+
Blocks
|
|
75
|
+
} from "./chunk-VZX7APSS.js";
|
|
76
|
+
import {
|
|
77
|
+
BouncingDots
|
|
78
|
+
} from "./chunk-ULWRXY3A.js";
|
|
79
|
+
import {
|
|
80
|
+
Cascade
|
|
81
|
+
} from "./chunk-KOYM24WV.js";
|
|
82
|
+
import {
|
|
83
|
+
CircularDots
|
|
84
|
+
} from "./chunk-3WMZVDPS.js";
|
|
85
|
+
import {
|
|
86
|
+
ClassicV2
|
|
87
|
+
} from "./chunk-R5ZDKN3Z.js";
|
|
88
|
+
|
|
89
|
+
// src/spinners.ts
|
|
90
|
+
var SPINNERS = {
|
|
91
|
+
arc: Arc,
|
|
92
|
+
atom: Atom,
|
|
93
|
+
blocks: Blocks,
|
|
94
|
+
"bouncing-dots": BouncingDots,
|
|
95
|
+
cascade: Cascade,
|
|
96
|
+
"circular-dots": CircularDots,
|
|
97
|
+
classic: Classic,
|
|
98
|
+
"classic-v2": ClassicV2,
|
|
99
|
+
clock: Clock,
|
|
100
|
+
comet: Comet,
|
|
101
|
+
compass: Compass,
|
|
102
|
+
dual: Dual,
|
|
103
|
+
eclipse: Eclipse,
|
|
104
|
+
flip: Flip,
|
|
105
|
+
gather: Gather,
|
|
106
|
+
leap: Leap,
|
|
107
|
+
"linear-dots": LinearDots,
|
|
108
|
+
loading: Loading,
|
|
109
|
+
morph: Morph,
|
|
110
|
+
orbit: Orbit,
|
|
111
|
+
pulse: Pulse,
|
|
112
|
+
radar: Radar,
|
|
113
|
+
ring: Ring,
|
|
114
|
+
ripple: Ripple,
|
|
115
|
+
slide: Slide,
|
|
116
|
+
snake: Snake,
|
|
117
|
+
swirl: Swirl,
|
|
118
|
+
trace: Trace,
|
|
119
|
+
wave: Wave
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export {
|
|
123
|
+
SPINNERS
|
|
124
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fadeCss
|
|
3
|
+
} from "./chunk-PVVWLDIS.js";
|
|
4
|
+
import {
|
|
5
|
+
SpinnerStyle,
|
|
6
|
+
spinnerRoot,
|
|
7
|
+
step
|
|
8
|
+
} from "./chunk-UAO52LUL.js";
|
|
9
|
+
import {
|
|
10
|
+
SIZE,
|
|
11
|
+
STEP_VAR
|
|
12
|
+
} from "./chunk-OMNMMKI7.js";
|
|
13
|
+
|
|
14
|
+
// src/classic.tsx
|
|
15
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
var BARS = Array.from({ length: 12 }, (_, index) => index);
|
|
17
|
+
var css = `
|
|
18
|
+
.ld-classic {
|
|
19
|
+
width: ${SIZE};
|
|
20
|
+
height: ${SIZE};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ld-classic-inner {
|
|
24
|
+
position: relative;
|
|
25
|
+
top: 50%;
|
|
26
|
+
left: 50%;
|
|
27
|
+
width: ${SIZE};
|
|
28
|
+
height: ${SIZE};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ld-classic-bar {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: -3.9%;
|
|
34
|
+
left: -10%;
|
|
35
|
+
width: 24%;
|
|
36
|
+
height: 8%;
|
|
37
|
+
background: currentColor;
|
|
38
|
+
border-radius: 6px;
|
|
39
|
+
transform: rotate(calc(var(${STEP_VAR}) * 30deg)) translate(146%);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${fadeCss("classic", "bar", BARS.length, { dim: 0.15, rest: 0.5 })}
|
|
43
|
+
`;
|
|
44
|
+
function Classic(props) {
|
|
45
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "classic", children: css }),
|
|
47
|
+
/* @__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)) }) })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
Classic
|
|
53
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
cssVars,
|
|
4
|
+
spinnerRoot
|
|
5
|
+
} from "./chunk-UAO52LUL.js";
|
|
6
|
+
import {
|
|
7
|
+
SIZE,
|
|
8
|
+
animation
|
|
9
|
+
} from "./chunk-OMNMMKI7.js";
|
|
10
|
+
|
|
11
|
+
// src/gather.tsx
|
|
12
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var BLOCKS = [
|
|
14
|
+
{ x: 1, y: 1 },
|
|
15
|
+
{ x: -1, y: 1 },
|
|
16
|
+
{ x: 1, y: -1 },
|
|
17
|
+
{ x: -1, y: -1 }
|
|
18
|
+
];
|
|
19
|
+
var GAP = 24;
|
|
20
|
+
var GAP_IN = 8;
|
|
21
|
+
var BLOCK = (100 - GAP) / 2;
|
|
22
|
+
var PULL = `${((GAP - GAP_IN) / 2 / BLOCK * 100).toFixed(1)}%`;
|
|
23
|
+
var css = `
|
|
24
|
+
.ld-gather {
|
|
25
|
+
width: ${SIZE};
|
|
26
|
+
height: ${SIZE};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ld-gather-group {
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template-columns: 1fr 1fr;
|
|
32
|
+
gap: ${GAP}%;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
${animation("gather", "ld-gather-turn", "ease-in-out")}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ld-gather-block {
|
|
39
|
+
background: currentColor;
|
|
40
|
+
border-radius: calc(${SIZE} * 0.14);
|
|
41
|
+
${animation("gather", "ld-gather-pull", "ease-in-out")}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes ld-gather-pull {
|
|
45
|
+
0%,
|
|
46
|
+
100% {
|
|
47
|
+
transform: translate(0, 0);
|
|
48
|
+
}
|
|
49
|
+
30%,
|
|
50
|
+
60% {
|
|
51
|
+
transform: translate(
|
|
52
|
+
calc(var(--ld-gather-x) * ${PULL}),
|
|
53
|
+
calc(var(--ld-gather-y) * ${PULL})
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes ld-gather-turn {
|
|
59
|
+
0%,
|
|
60
|
+
30% {
|
|
61
|
+
transform: rotate(0);
|
|
62
|
+
}
|
|
63
|
+
60%,
|
|
64
|
+
100% {
|
|
65
|
+
transform: rotate(90deg);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
function Gather(props) {
|
|
70
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "gather", children: css }),
|
|
72
|
+
/* @__PURE__ */ jsx("div", { ...spinnerRoot("gather", props), children: /* @__PURE__ */ jsx("div", { className: "ld-gather-group", children: BLOCKS.map(({ x, y }) => /* @__PURE__ */ jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "ld-gather-block",
|
|
76
|
+
style: cssVars({ "--ld-gather-x": x, "--ld-gather-y": y })
|
|
77
|
+
},
|
|
78
|
+
`${x}${y}`
|
|
79
|
+
)) }) })
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
Gather
|
|
85
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SpinnerStyle,
|
|
3
|
+
spinnerRoot
|
|
4
|
+
} from "./chunk-UAO52LUL.js";
|
|
5
|
+
import {
|
|
6
|
+
SIZE,
|
|
7
|
+
animation
|
|
8
|
+
} from "./chunk-OMNMMKI7.js";
|
|
9
|
+
|
|
10
|
+
// src/compass.tsx
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var css = `
|
|
13
|
+
.ld-compass {
|
|
14
|
+
width: ${SIZE};
|
|
15
|
+
height: ${SIZE};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ld-compass-ticks {
|
|
19
|
+
transform-origin: center;
|
|
20
|
+
${animation("compass", "ld-compass-turn", "ease-in-out")}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes ld-compass-turn {
|
|
24
|
+
to {
|
|
25
|
+
transform: rotate(90deg);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
function Compass(props) {
|
|
30
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
+
/* @__PURE__ */ jsx(SpinnerStyle, { name: "compass", children: css }),
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"svg",
|
|
34
|
+
{
|
|
35
|
+
...spinnerRoot("compass", props),
|
|
36
|
+
fill: "none",
|
|
37
|
+
role: "presentation",
|
|
38
|
+
viewBox: "0 0 16 16",
|
|
39
|
+
children: /* @__PURE__ */ jsxs("g", { className: "ld-compass-ticks", fill: "currentColor", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("path", { d: "M7.33334 0.666667C7.33334 0.298477 7.63181 0 8 0C8.36819 0 8.66667 0.298477 8.66667 0.666667V3.33333C8.66667 3.70152 8.36819 4 8 4C7.63181 4 7.33334 3.70152 7.33334 3.33333V0.666667Z" }),
|
|
41
|
+
/* @__PURE__ */ jsx("path", { d: "M12.6667 8.66667C12.2985 8.66667 12 8.3682 12 8.00001C12 7.63182 12.2985 7.33334 12.6667 7.33334H15.3333C15.7015 7.33334 16 7.63182 16 8.00001C16 8.3682 15.7015 8.66667 15.3333 8.66667H12.6667Z" }),
|
|
42
|
+
/* @__PURE__ */ jsx("path", { d: "M7.33333 12.6667C7.33333 12.2985 7.63181 12 8 12C8.36819 12 8.66667 12.2985 8.66667 12.6667V15.3333C8.66667 15.7015 8.36819 16 8 16C7.63181 16 7.33333 15.7015 7.33333 15.3333V12.6667Z" }),
|
|
43
|
+
/* @__PURE__ */ jsx("path", { d: "M0.666667 8.66667C0.298477 8.66667 1.60941e-08 8.3682 0 8.00001C-1.60941e-08 7.63182 0.298477 7.33334 0.666667 7.33334H3.33333C3.70152 7.33334 4 7.63182 4 8.00001C4 8.3682 3.70152 8.66667 3.33333 8.66667H0.666667Z" })
|
|
44
|
+
] })
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
Compass
|
|
52
|
+
};
|