loading-dev 0.3.4 → 0.3.6
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 +7 -11
- package/dist/arc.js +31 -10
- package/dist/atom.d.ts +6 -10
- package/dist/atom.js +70 -9
- package/dist/blocks.d.ts +8 -10
- package/dist/blocks.js +73 -9
- package/dist/bouncing-dots.d.ts +4 -6
- package/dist/bouncing-dots.js +45 -8
- package/dist/cap-Ba3uZx03.d.ts +9 -0
- package/dist/cap.d.ts +2 -8
- package/dist/cap.js +7 -8
- package/dist/cascade.d.ts +6 -9
- package/dist/cascade.js +50 -9
- package/dist/circular-dots.d.ts +4 -6
- package/dist/circular-dots.js +40 -8
- package/dist/classic-v2.d.ts +4 -6
- package/dist/classic-v2.js +41 -8
- package/dist/classic.d.ts +4 -6
- package/dist/classic.js +48 -8
- package/dist/clock.d.ts +6 -10
- package/dist/clock.js +31 -9
- package/dist/comet.d.ts +6 -10
- package/dist/comet.js +52 -9
- package/dist/compass.d.ts +4 -6
- package/dist/compass.js +39 -8
- package/dist/dual.d.ts +7 -11
- package/dist/dual.js +47 -10
- package/dist/easing-DhnLArHS.d.ts +11 -0
- package/dist/easing.d.ts +2 -11
- package/dist/easing.js +34 -11
- package/dist/eclipse.d.ts +4 -6
- package/dist/eclipse.js +69 -8
- package/dist/fade.d.ts +7 -0
- package/dist/fade.js +27 -0
- package/dist/flip.d.ts +4 -6
- package/dist/flip.js +41 -8
- package/dist/frame.d.ts +15 -19
- package/dist/frame.js +42 -13
- package/dist/gather.d.ts +4 -6
- package/dist/gather.js +85 -8
- package/dist/index.d.ts +35 -35
- package/dist/index.js +34 -145
- package/dist/leap.d.ts +4 -6
- package/dist/leap.js +67 -8
- package/dist/linear-dots.d.ts +4 -6
- package/dist/linear-dots.js +54 -8
- package/dist/loading.d.ts +4 -6
- package/dist/loading.js +64 -8
- package/dist/morph.d.ts +4 -6
- package/dist/morph.js +40 -8
- package/dist/motion-D_zUuA3S.d.ts +45 -0
- package/dist/motion.d.ts +2 -44
- package/dist/motion.js +50 -25
- package/dist/orbit.d.ts +6 -10
- package/dist/orbit.js +44 -9
- package/dist/pulse.d.ts +4 -6
- package/dist/pulse.js +52 -8
- package/dist/radar.d.ts +6 -10
- package/dist/radar.js +64 -9
- package/dist/ring.d.ts +7 -11
- package/dist/ring.js +38 -10
- package/dist/ripple.d.ts +8 -10
- package/dist/ripple.js +57 -10
- package/dist/slide.d.ts +4 -6
- package/dist/slide.js +74 -8
- package/dist/snake.d.ts +7 -11
- package/dist/snake.js +59 -10
- package/dist/spinners.d.ts +61 -67
- package/dist/spinners.js +62 -38
- package/dist/swirl.d.ts +4 -6
- package/dist/swirl.js +50 -8
- package/dist/trace.d.ts +7 -11
- package/dist/trace.js +45 -9
- package/dist/types-BYaenrWm.d.ts +10 -0
- package/dist/types.d.ts +2 -23
- package/dist/types.js +1 -0
- package/dist/wave.d.ts +8 -10
- package/dist/wave.js +56 -10
- package/package.json +19 -17
- package/dist/chunk-5A6DX4J6.js +0 -62
- package/dist/chunk-5DLURQGF.js +0 -88
- package/dist/chunk-5DS5PSRD.js +0 -124
- package/dist/chunk-5LSP7MQQ.js +0 -69
- package/dist/chunk-5R75HMWP.js +0 -55
- package/dist/chunk-7C6Q6WUN.js +0 -47
- package/dist/chunk-A43AJR54.js +0 -79
- package/dist/chunk-AHW6IXXT.js +0 -78
- package/dist/chunk-AY4VLQBZ.js +0 -57
- package/dist/chunk-BMJ3AGRK.js +0 -62
- package/dist/chunk-FKUMWHUL.js +0 -71
- package/dist/chunk-HDBQBCTN.js +0 -74
- package/dist/chunk-I5CFO2M5.js +0 -78
- package/dist/chunk-IQ2WQZFY.js +0 -51
- package/dist/chunk-IRMB7CHZ.js +0 -88
- package/dist/chunk-IWVH2GKE.js +0 -77
- package/dist/chunk-IZ4TRHOC.js +0 -68
- package/dist/chunk-JNR4T6LZ.js +0 -10
- package/dist/chunk-K5XVX5GB.js +0 -60
- package/dist/chunk-LIPOYJAI.js +0 -74
- package/dist/chunk-MVL7SVAH.js +0 -79
- package/dist/chunk-NHN4FV63.js +0 -78
- package/dist/chunk-OMNMMKI7.js +0 -64
- package/dist/chunk-PBB2PRPT.js +0 -83
- package/dist/chunk-RTKHVDCD.js +0 -82
- package/dist/chunk-T5EUYN7R.js +0 -77
- package/dist/chunk-T7OV7MUW.js +0 -58
- package/dist/chunk-TFHDE6YZ.js +0 -92
- package/dist/chunk-UWSCBISJ.js +0 -56
- package/dist/chunk-VBI53UGV.js +0 -73
- package/dist/chunk-VRX5ZYC6.js +0 -41
- package/dist/chunk-X7BJQCYL.js +0 -56
- package/dist/chunk-Y7QGIWTL.js +0 -57
- package/dist/chunk-ZLJYYX76.js +0 -69
package/dist/slide.js
CHANGED
|
@@ -1,8 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { animation, stagger } from "./motion.js";
|
|
2
|
+
import { SpinnerStyle, cssVars, spinnerRoot, step } from "./frame.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/slide.tsx
|
|
5
|
+
const DOT = 34;
|
|
6
|
+
const MARGIN = 6;
|
|
7
|
+
const FAR = `${(54 / DOT * 100).toFixed(1)}%`;
|
|
8
|
+
const RESTS = [
|
|
9
|
+
`translate(${FAR}, 0)`,
|
|
10
|
+
"translate(0, 0)",
|
|
11
|
+
`translate(0, ${FAR})`
|
|
12
|
+
];
|
|
13
|
+
const css = `
|
|
14
|
+
.ld-slide {
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ld-slide-dot {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: ${MARGIN}%;
|
|
21
|
+
left: ${MARGIN}%;
|
|
22
|
+
width: ${DOT}%;
|
|
23
|
+
height: ${DOT}%;
|
|
24
|
+
background: currentColor;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
${animation("slide", "ld-slide-walk", "ease-in-out")}
|
|
27
|
+
animation-delay: ${stagger("slide", RESTS.length)};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes ld-slide-walk {
|
|
31
|
+
0% {
|
|
32
|
+
transform: translate(${FAR}, 0);
|
|
33
|
+
}
|
|
34
|
+
8.33%,
|
|
35
|
+
25% {
|
|
36
|
+
transform: translate(${FAR}, ${FAR});
|
|
37
|
+
}
|
|
38
|
+
33.33%,
|
|
39
|
+
50% {
|
|
40
|
+
transform: translate(0, ${FAR});
|
|
41
|
+
}
|
|
42
|
+
58.33%,
|
|
43
|
+
75% {
|
|
44
|
+
transform: translate(0, 0);
|
|
45
|
+
}
|
|
46
|
+
83.33%,
|
|
47
|
+
100% {
|
|
48
|
+
transform: translate(${FAR}, 0);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (prefers-reduced-motion: reduce) {
|
|
53
|
+
.ld-slide-dot {
|
|
54
|
+
transform: var(--ld-slide-rest);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
function Slide(props) {
|
|
59
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
60
|
+
name: "slide",
|
|
61
|
+
children: css
|
|
62
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
63
|
+
...spinnerRoot("slide", props),
|
|
64
|
+
children: RESTS.map((rest, index) => /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "ld-slide-dot",
|
|
66
|
+
style: cssVars({
|
|
67
|
+
...step(index),
|
|
68
|
+
"--ld-slide-rest": rest
|
|
69
|
+
})
|
|
70
|
+
}, rest))
|
|
71
|
+
})] });
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { Slide };
|
package/dist/snake.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function Snake({ cap, easing, ...rest }: SnakeProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { Snake, type SnakeProps };
|
|
1
|
+
import { n as CapProps } from "./cap-Ba3uZx03.js";
|
|
2
|
+
import { r as EasingProps } from "./easing-DhnLArHS.js";
|
|
3
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
4
|
+
//#region src/snake.d.ts
|
|
5
|
+
export interface SnakeProps extends SpinnerProps, EasingProps, CapProps {}
|
|
6
|
+
export declare function Snake({ cap, easing, ...rest }: SnakeProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
package/dist/snake.js
CHANGED
|
@@ -1,10 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "./
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { linecap } from "./cap.js";
|
|
2
|
+
import { animation } from "./motion.js";
|
|
3
|
+
import { rotationCss, spinClass } from "./easing.js";
|
|
4
|
+
import { SpinnerStyle, spinnerRoot } from "./frame.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/snake.tsx
|
|
7
|
+
const css = `
|
|
8
|
+
${rotationCss("snake")}
|
|
9
|
+
|
|
10
|
+
.ld-snake-dash {
|
|
11
|
+
${animation("snake", "ld-snake-stretch", "ease-in-out")}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes ld-snake-stretch {
|
|
15
|
+
0% {
|
|
16
|
+
stroke-dasharray: 1 100;
|
|
17
|
+
stroke-dashoffset: 0;
|
|
18
|
+
}
|
|
19
|
+
50% {
|
|
20
|
+
stroke-dasharray: 45 100;
|
|
21
|
+
stroke-dashoffset: -17;
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
stroke-dasharray: 45 100;
|
|
25
|
+
stroke-dashoffset: -62;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (prefers-reduced-motion: reduce) {
|
|
30
|
+
.ld-snake-dash {
|
|
31
|
+
stroke-dasharray: 18 100;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
function Snake({ cap, easing, ...rest }) {
|
|
36
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
37
|
+
name: "snake",
|
|
38
|
+
children: css
|
|
39
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
40
|
+
...spinnerRoot("snake", rest),
|
|
41
|
+
fill: "none",
|
|
42
|
+
role: "presentation",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
children: /* @__PURE__ */ jsx("g", {
|
|
45
|
+
className: spinClass("snake", easing),
|
|
46
|
+
children: /* @__PURE__ */ jsx("circle", {
|
|
47
|
+
className: "ld-snake-dash",
|
|
48
|
+
cx: "12",
|
|
49
|
+
cy: "12",
|
|
50
|
+
r: "10",
|
|
51
|
+
stroke: "currentColor",
|
|
52
|
+
strokeLinecap: linecap(cap),
|
|
53
|
+
strokeWidth: "2.5"
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})] });
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Snake };
|
package/dist/spinners.d.ts
CHANGED
|
@@ -1,68 +1,62 @@
|
|
|
1
|
-
import { Arc } from
|
|
2
|
-
import { Atom } from
|
|
3
|
-
import { Blocks } from
|
|
4
|
-
import { BouncingDots } from
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Classic } from
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
slide: typeof Slide;
|
|
62
|
-
snake: typeof Snake;
|
|
63
|
-
swirl: typeof Swirl;
|
|
64
|
-
trace: typeof Trace;
|
|
65
|
-
wave: typeof Wave;
|
|
1
|
+
import { Arc } from "./arc.js";
|
|
2
|
+
import { Atom } from "./atom.js";
|
|
3
|
+
import { Blocks } from "./blocks.js";
|
|
4
|
+
import { BouncingDots } from "./bouncing-dots.js";
|
|
5
|
+
import { Cascade } from "./cascade.js";
|
|
6
|
+
import { CircularDots } from "./circular-dots.js";
|
|
7
|
+
import { ClassicV2 } from "./classic-v2.js";
|
|
8
|
+
import { Classic } from "./classic.js";
|
|
9
|
+
import { Clock } from "./clock.js";
|
|
10
|
+
import { Comet } from "./comet.js";
|
|
11
|
+
import { Compass } from "./compass.js";
|
|
12
|
+
import { Dual } from "./dual.js";
|
|
13
|
+
import { Eclipse } from "./eclipse.js";
|
|
14
|
+
import { Flip } from "./flip.js";
|
|
15
|
+
import { Gather } from "./gather.js";
|
|
16
|
+
import { Leap } from "./leap.js";
|
|
17
|
+
import { LinearDots } from "./linear-dots.js";
|
|
18
|
+
import { Loading } from "./loading.js";
|
|
19
|
+
import { Morph } from "./morph.js";
|
|
20
|
+
import { Orbit } from "./orbit.js";
|
|
21
|
+
import { Pulse } from "./pulse.js";
|
|
22
|
+
import { Radar } from "./radar.js";
|
|
23
|
+
import { Ring } from "./ring.js";
|
|
24
|
+
import { Ripple } from "./ripple.js";
|
|
25
|
+
import { Slide } from "./slide.js";
|
|
26
|
+
import { Snake } from "./snake.js";
|
|
27
|
+
import { Swirl } from "./swirl.js";
|
|
28
|
+
import { Trace } from "./trace.js";
|
|
29
|
+
import { Wave } from "./wave.js";
|
|
30
|
+
//#region src/spinners.d.ts
|
|
31
|
+
export declare const SPINNERS: {
|
|
32
|
+
arc: typeof Arc;
|
|
33
|
+
atom: typeof Atom;
|
|
34
|
+
blocks: typeof Blocks;
|
|
35
|
+
"bouncing-dots": typeof BouncingDots;
|
|
36
|
+
cascade: typeof Cascade;
|
|
37
|
+
"circular-dots": typeof CircularDots;
|
|
38
|
+
classic: typeof Classic;
|
|
39
|
+
"classic-v2": typeof ClassicV2;
|
|
40
|
+
clock: typeof Clock;
|
|
41
|
+
comet: typeof Comet;
|
|
42
|
+
compass: typeof Compass;
|
|
43
|
+
dual: typeof Dual;
|
|
44
|
+
eclipse: typeof Eclipse;
|
|
45
|
+
flip: typeof Flip;
|
|
46
|
+
gather: typeof Gather;
|
|
47
|
+
leap: typeof Leap;
|
|
48
|
+
"linear-dots": typeof LinearDots;
|
|
49
|
+
loading: typeof Loading;
|
|
50
|
+
morph: typeof Morph;
|
|
51
|
+
orbit: typeof Orbit;
|
|
52
|
+
pulse: typeof Pulse;
|
|
53
|
+
radar: typeof Radar;
|
|
54
|
+
ring: typeof Ring;
|
|
55
|
+
ripple: typeof Ripple;
|
|
56
|
+
slide: typeof Slide;
|
|
57
|
+
snake: typeof Snake;
|
|
58
|
+
swirl: typeof Swirl;
|
|
59
|
+
trace: typeof Trace;
|
|
60
|
+
wave: typeof Wave;
|
|
66
61
|
};
|
|
67
|
-
|
|
68
|
-
export { SPINNERS };
|
|
62
|
+
//#endregion
|
package/dist/spinners.js
CHANGED
|
@@ -1,39 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { Arc } from "./arc.js";
|
|
2
|
+
import { Atom } from "./atom.js";
|
|
3
|
+
import { Blocks } from "./blocks.js";
|
|
4
|
+
import { BouncingDots } from "./bouncing-dots.js";
|
|
5
|
+
import { Cascade } from "./cascade.js";
|
|
6
|
+
import { CircularDots } from "./circular-dots.js";
|
|
7
|
+
import { ClassicV2 } from "./classic-v2.js";
|
|
8
|
+
import { Classic } from "./classic.js";
|
|
9
|
+
import { Clock } from "./clock.js";
|
|
10
|
+
import { Comet } from "./comet.js";
|
|
11
|
+
import { Compass } from "./compass.js";
|
|
12
|
+
import { Dual } from "./dual.js";
|
|
13
|
+
import { Eclipse } from "./eclipse.js";
|
|
14
|
+
import { Flip } from "./flip.js";
|
|
15
|
+
import { Gather } from "./gather.js";
|
|
16
|
+
import { Leap } from "./leap.js";
|
|
17
|
+
import { LinearDots } from "./linear-dots.js";
|
|
18
|
+
import { Loading } from "./loading.js";
|
|
19
|
+
import { Morph } from "./morph.js";
|
|
20
|
+
import { Orbit } from "./orbit.js";
|
|
21
|
+
import { Pulse } from "./pulse.js";
|
|
22
|
+
import { Radar } from "./radar.js";
|
|
23
|
+
import { Ring } from "./ring.js";
|
|
24
|
+
import { Ripple } from "./ripple.js";
|
|
25
|
+
import { Slide } from "./slide.js";
|
|
26
|
+
import { Snake } from "./snake.js";
|
|
27
|
+
import { Swirl } from "./swirl.js";
|
|
28
|
+
import { Trace } from "./trace.js";
|
|
29
|
+
import { Wave } from "./wave.js";
|
|
30
|
+
//#region src/spinners.ts
|
|
31
|
+
const SPINNERS = {
|
|
32
|
+
arc: Arc,
|
|
33
|
+
atom: Atom,
|
|
34
|
+
blocks: Blocks,
|
|
35
|
+
"bouncing-dots": BouncingDots,
|
|
36
|
+
cascade: Cascade,
|
|
37
|
+
"circular-dots": CircularDots,
|
|
38
|
+
classic: Classic,
|
|
39
|
+
"classic-v2": ClassicV2,
|
|
40
|
+
clock: Clock,
|
|
41
|
+
comet: Comet,
|
|
42
|
+
compass: Compass,
|
|
43
|
+
dual: Dual,
|
|
44
|
+
eclipse: Eclipse,
|
|
45
|
+
flip: Flip,
|
|
46
|
+
gather: Gather,
|
|
47
|
+
leap: Leap,
|
|
48
|
+
"linear-dots": LinearDots,
|
|
49
|
+
loading: Loading,
|
|
50
|
+
morph: Morph,
|
|
51
|
+
orbit: Orbit,
|
|
52
|
+
pulse: Pulse,
|
|
53
|
+
radar: Radar,
|
|
54
|
+
ring: Ring,
|
|
55
|
+
ripple: Ripple,
|
|
56
|
+
slide: Slide,
|
|
57
|
+
snake: Snake,
|
|
58
|
+
swirl: Swirl,
|
|
59
|
+
trace: Trace,
|
|
60
|
+
wave: Wave
|
|
39
61
|
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { SPINNERS };
|
package/dist/swirl.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Swirl };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/swirl.d.ts
|
|
3
|
+
export declare function Swirl(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/swirl.js
CHANGED
|
@@ -1,8 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { SIZE } from "./motion.js";
|
|
2
|
+
import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
|
|
3
|
+
import { fadeCss } from "./fade.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/swirl.tsx
|
|
6
|
+
const RING = [
|
|
7
|
+
0,
|
|
8
|
+
1,
|
|
9
|
+
2,
|
|
10
|
+
7,
|
|
11
|
+
null,
|
|
12
|
+
3,
|
|
13
|
+
6,
|
|
14
|
+
5,
|
|
15
|
+
4
|
|
16
|
+
];
|
|
17
|
+
const PLACES = RING.filter((place) => place !== null).length;
|
|
18
|
+
const css = `
|
|
19
|
+
.ld-swirl {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(3, 1fr);
|
|
22
|
+
grid-template-rows: repeat(3, 1fr);
|
|
23
|
+
gap: calc(${SIZE} * 0.15625);
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
padding: calc(${SIZE} * 0.0625);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ld-swirl-cell {
|
|
29
|
+
background: currentColor;
|
|
30
|
+
border-radius: calc(${SIZE} * 0.0625);
|
|
31
|
+
}
|
|
32
|
+
${fadeCss("swirl", "cell", PLACES, {
|
|
33
|
+
dim: .2,
|
|
34
|
+
rest: .6
|
|
35
|
+
})}
|
|
36
|
+
`;
|
|
37
|
+
function Swirl(props) {
|
|
38
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
39
|
+
name: "swirl",
|
|
40
|
+
children: css
|
|
41
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
42
|
+
...spinnerRoot("swirl", props),
|
|
43
|
+
children: RING.map((place, index) => place === null ? /* @__PURE__ */ jsx("div", {}, index) : /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "ld-swirl-cell",
|
|
45
|
+
style: step(place)
|
|
46
|
+
}, index))
|
|
47
|
+
})] });
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Swirl };
|
package/dist/trace.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function Trace({ cap, easing, ...rest }: TraceProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { Trace, type TraceProps };
|
|
1
|
+
import { n as CapProps } from "./cap-Ba3uZx03.js";
|
|
2
|
+
import { r as EasingProps } from "./easing-DhnLArHS.js";
|
|
3
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
4
|
+
//#region src/trace.d.ts
|
|
5
|
+
export interface TraceProps extends SpinnerProps, EasingProps, CapProps {}
|
|
6
|
+
export declare function Trace({ cap, easing, ...rest }: TraceProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
package/dist/trace.js
CHANGED
|
@@ -1,10 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { linecap } from "./cap.js";
|
|
2
|
+
import { rotationCss, spinClass } from "./easing.js";
|
|
3
|
+
import { SpinnerStyle, spinnerRoot } from "./frame.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/trace.tsx
|
|
6
|
+
const VIEW = 20;
|
|
7
|
+
const SIDE = 17.5;
|
|
8
|
+
const RADIUS = 4;
|
|
9
|
+
const PERIMETER = 38 + 2 * Math.PI * RADIUS;
|
|
10
|
+
const DASH = 16;
|
|
11
|
+
const RECT = {
|
|
12
|
+
height: SIDE,
|
|
13
|
+
rx: RADIUS,
|
|
14
|
+
width: SIDE,
|
|
15
|
+
x: 2.5 / 2,
|
|
16
|
+
y: 2.5 / 2
|
|
10
17
|
};
|
|
18
|
+
const css = `
|
|
19
|
+
${rotationCss("trace", `to {
|
|
20
|
+
stroke-dashoffset: ${-PERIMETER};
|
|
21
|
+
}`)}
|
|
22
|
+
`;
|
|
23
|
+
function Trace({ cap, easing, ...rest }) {
|
|
24
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
25
|
+
name: "trace",
|
|
26
|
+
children: css
|
|
27
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
28
|
+
...spinnerRoot("trace", rest),
|
|
29
|
+
fill: "none",
|
|
30
|
+
role: "presentation",
|
|
31
|
+
stroke: "currentColor",
|
|
32
|
+
strokeWidth: "2.5",
|
|
33
|
+
viewBox: `0 0 ${VIEW} ${VIEW}`,
|
|
34
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
35
|
+
...RECT,
|
|
36
|
+
opacity: "0.2"
|
|
37
|
+
}), /* @__PURE__ */ jsx("rect", {
|
|
38
|
+
...RECT,
|
|
39
|
+
className: spinClass("trace", easing),
|
|
40
|
+
strokeDasharray: `${DASH} ${PERIMETER - DASH}`,
|
|
41
|
+
strokeLinecap: linecap(cap)
|
|
42
|
+
})]
|
|
43
|
+
})] });
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { Trace };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
className?: string;
|
|
4
|
-
/**
|
|
5
|
-
* Any CSS color — `#f97316`, `oklch(70% 0.19 45)`, `rgb(249 115 22 / 60%)`,
|
|
6
|
-
* `var(--brand)`. Omit to keep inheriting the surrounding text color.
|
|
7
|
-
*/
|
|
8
|
-
color?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Length of one animation cycle in milliseconds. Omit to inherit
|
|
11
|
-
* `--ld-duration` from an ancestor, then the spinner's own default.
|
|
12
|
-
*/
|
|
13
|
-
duration?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Whether the animation runs. Omit to inherit `--ld-play-state` from an
|
|
16
|
-
* ancestor, which defaults to running.
|
|
17
|
-
*/
|
|
18
|
-
playState?: "paused" | "running";
|
|
19
|
-
/** Width and height of the spinner in pixels. Defaults to 20. */
|
|
20
|
-
size?: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type { SpinnerProps };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
export { SpinnerProps };
|
package/dist/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/wave.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
origin?: WaveOrigin;
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/wave.d.ts
|
|
3
|
+
export type WaveOrigin = "bottom" | "center";
|
|
4
|
+
export declare const DEFAULT_WAVE_ORIGIN: WaveOrigin;
|
|
5
|
+
export interface WaveProps extends SpinnerProps {
|
|
6
|
+
origin?: WaveOrigin;
|
|
8
7
|
}
|
|
9
|
-
declare function Wave({ origin, ...rest }: WaveProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { DEFAULT_WAVE_ORIGIN, Wave, type WaveOrigin, type WaveProps };
|
|
8
|
+
export declare function Wave({ origin, ...rest }: WaveProps): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|