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/morph.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Morph };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/morph.d.ts
|
|
3
|
+
export declare function Morph(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/morph.js
CHANGED
|
@@ -1,8 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { SIZE, animation } from "./motion.js";
|
|
2
|
+
import { SpinnerStyle, spinnerRoot } from "./frame.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/morph.tsx
|
|
5
|
+
const css = `
|
|
6
|
+
.ld-morph-shape {
|
|
7
|
+
width: 64%;
|
|
8
|
+
height: 64%;
|
|
9
|
+
margin: 18%;
|
|
10
|
+
background: currentColor;
|
|
11
|
+
border-radius: calc(${SIZE} * 0.08);
|
|
12
|
+
${animation("morph", "ld-morph-round", "ease-in-out")}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@keyframes ld-morph-round {
|
|
16
|
+
0% {
|
|
17
|
+
border-radius: calc(${SIZE} * 0.08);
|
|
18
|
+
transform: rotate(0);
|
|
19
|
+
}
|
|
20
|
+
50% {
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
transform: rotate(45deg);
|
|
23
|
+
}
|
|
24
|
+
100% {
|
|
25
|
+
border-radius: calc(${SIZE} * 0.08);
|
|
26
|
+
transform: rotate(90deg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
function Morph(props) {
|
|
31
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
32
|
+
name: "morph",
|
|
33
|
+
children: css
|
|
34
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
35
|
+
...spinnerRoot("morph", props),
|
|
36
|
+
children: /* @__PURE__ */ jsx("div", { className: "ld-morph-shape" })
|
|
37
|
+
})] });
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Morph };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//#region src/motion.d.ts
|
|
2
|
+
declare const DURATION_VAR = "--ld-duration";
|
|
3
|
+
declare const PLAY_STATE_VAR = "--ld-play-state";
|
|
4
|
+
declare const SIZE_VAR = "--ld-size";
|
|
5
|
+
declare const STEP_VAR = "--ld-step";
|
|
6
|
+
declare const DEFAULT_SIZE = 20;
|
|
7
|
+
declare const SIZE = "var(--ld-size, 20px)";
|
|
8
|
+
declare const SPINNER_MOTION: {
|
|
9
|
+
readonly arc: 800;
|
|
10
|
+
readonly atom: 1000;
|
|
11
|
+
readonly blocks: 1300;
|
|
12
|
+
readonly "bouncing-dots": 500;
|
|
13
|
+
readonly cascade: 1500;
|
|
14
|
+
readonly "circular-dots": 800;
|
|
15
|
+
readonly classic: 1200;
|
|
16
|
+
readonly "classic-v2": 800;
|
|
17
|
+
readonly clock: 1200;
|
|
18
|
+
readonly comet: 700;
|
|
19
|
+
readonly compass: 500;
|
|
20
|
+
readonly dual: 1000;
|
|
21
|
+
readonly eclipse: 1200;
|
|
22
|
+
readonly flip: 1200;
|
|
23
|
+
readonly gather: 1600;
|
|
24
|
+
readonly leap: 1800;
|
|
25
|
+
readonly "linear-dots": 900;
|
|
26
|
+
readonly loading: 1000;
|
|
27
|
+
readonly morph: 1200;
|
|
28
|
+
readonly orbit: 750;
|
|
29
|
+
readonly pulse: 1200;
|
|
30
|
+
readonly radar: 1500;
|
|
31
|
+
readonly ring: 800;
|
|
32
|
+
readonly ripple: 1200;
|
|
33
|
+
readonly slide: 2400;
|
|
34
|
+
readonly snake: 1400;
|
|
35
|
+
readonly swirl: 1200;
|
|
36
|
+
readonly trace: 1200;
|
|
37
|
+
readonly wave: 900;
|
|
38
|
+
};
|
|
39
|
+
type SpinnerName = keyof typeof SPINNER_MOTION;
|
|
40
|
+
declare function duration(name: SpinnerName): string;
|
|
41
|
+
declare function stagger(name: SpinnerName, count: number): string;
|
|
42
|
+
declare const PLAY_STATE = "var(--ld-play-state, running)";
|
|
43
|
+
declare function animation(name: SpinnerName, keyframes: string | string[], timing: string): string;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { SIZE as a, STEP_VAR as c, duration as d, stagger as f, PLAY_STATE_VAR as i, SpinnerName as l, DURATION_VAR as n, SIZE_VAR as o, PLAY_STATE as r, SPINNER_MOTION as s, DEFAULT_SIZE as t, animation as u };
|
package/dist/motion.d.ts
CHANGED
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const SIZE_VAR = "--ld-size";
|
|
4
|
-
declare const STEP_VAR = "--ld-step";
|
|
5
|
-
declare const DEFAULT_SIZE = 20;
|
|
6
|
-
declare const SIZE = "var(--ld-size, 20px)";
|
|
7
|
-
declare const SPINNER_MOTION: {
|
|
8
|
-
readonly arc: 800;
|
|
9
|
-
readonly atom: 1000;
|
|
10
|
-
readonly blocks: 1300;
|
|
11
|
-
readonly "bouncing-dots": 500;
|
|
12
|
-
readonly cascade: 1500;
|
|
13
|
-
readonly "circular-dots": 800;
|
|
14
|
-
readonly classic: 1200;
|
|
15
|
-
readonly "classic-v2": 800;
|
|
16
|
-
readonly clock: 1200;
|
|
17
|
-
readonly comet: 700;
|
|
18
|
-
readonly compass: 500;
|
|
19
|
-
readonly dual: 1000;
|
|
20
|
-
readonly eclipse: 1200;
|
|
21
|
-
readonly flip: 1200;
|
|
22
|
-
readonly gather: 1600;
|
|
23
|
-
readonly leap: 1800;
|
|
24
|
-
readonly "linear-dots": 900;
|
|
25
|
-
readonly loading: 1000;
|
|
26
|
-
readonly morph: 1200;
|
|
27
|
-
readonly orbit: 750;
|
|
28
|
-
readonly pulse: 1200;
|
|
29
|
-
readonly radar: 1500;
|
|
30
|
-
readonly ring: 800;
|
|
31
|
-
readonly ripple: 1200;
|
|
32
|
-
readonly slide: 2400;
|
|
33
|
-
readonly snake: 1400;
|
|
34
|
-
readonly swirl: 1200;
|
|
35
|
-
readonly trace: 1200;
|
|
36
|
-
readonly wave: 900;
|
|
37
|
-
};
|
|
38
|
-
type SpinnerName = keyof typeof SPINNER_MOTION;
|
|
39
|
-
declare function duration(name: SpinnerName): string;
|
|
40
|
-
declare function stagger(name: SpinnerName, count: number): string;
|
|
41
|
-
declare const PLAY_STATE = "var(--ld-play-state, running)";
|
|
42
|
-
declare function animation(name: SpinnerName, keyframes: string | string[], timing: string): string;
|
|
43
|
-
|
|
44
|
-
export { DEFAULT_SIZE, DURATION_VAR, PLAY_STATE, PLAY_STATE_VAR, SIZE, SIZE_VAR, SPINNER_MOTION, STEP_VAR, type SpinnerName, animation, duration, stagger };
|
|
1
|
+
import { a as SIZE, c as STEP_VAR, d as duration, f as stagger, i as PLAY_STATE_VAR, l as SpinnerName, n as DURATION_VAR, o as SIZE_VAR, r as PLAY_STATE, s as SPINNER_MOTION, t as DEFAULT_SIZE, u as animation } from "./motion-D_zUuA3S.js";
|
|
2
|
+
export { DEFAULT_SIZE, DURATION_VAR, PLAY_STATE, PLAY_STATE_VAR, SIZE, SIZE_VAR, SPINNER_MOTION, STEP_VAR, SpinnerName, animation, duration, stagger };
|
package/dist/motion.js
CHANGED
|
@@ -1,26 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
//#region src/motion.ts
|
|
2
|
+
const DURATION_VAR = "--ld-duration";
|
|
3
|
+
const PLAY_STATE_VAR = "--ld-play-state";
|
|
4
|
+
const SIZE_VAR = "--ld-size";
|
|
5
|
+
const STEP_VAR = "--ld-step";
|
|
6
|
+
const DEFAULT_SIZE = 20;
|
|
7
|
+
const SIZE = `var(${SIZE_VAR}, 20px)`;
|
|
8
|
+
const SPINNER_MOTION = {
|
|
9
|
+
arc: 800,
|
|
10
|
+
atom: 1e3,
|
|
11
|
+
blocks: 1300,
|
|
12
|
+
"bouncing-dots": 500,
|
|
13
|
+
cascade: 1500,
|
|
14
|
+
"circular-dots": 800,
|
|
15
|
+
classic: 1200,
|
|
16
|
+
"classic-v2": 800,
|
|
17
|
+
clock: 1200,
|
|
18
|
+
comet: 700,
|
|
19
|
+
compass: 500,
|
|
20
|
+
dual: 1e3,
|
|
21
|
+
eclipse: 1200,
|
|
22
|
+
flip: 1200,
|
|
23
|
+
gather: 1600,
|
|
24
|
+
leap: 1800,
|
|
25
|
+
"linear-dots": 900,
|
|
26
|
+
loading: 1e3,
|
|
27
|
+
morph: 1200,
|
|
28
|
+
orbit: 750,
|
|
29
|
+
pulse: 1200,
|
|
30
|
+
radar: 1500,
|
|
31
|
+
ring: 800,
|
|
32
|
+
ripple: 1200,
|
|
33
|
+
slide: 2400,
|
|
34
|
+
snake: 1400,
|
|
35
|
+
swirl: 1200,
|
|
36
|
+
trace: 1200,
|
|
37
|
+
wave: 900
|
|
26
38
|
};
|
|
39
|
+
function duration(name) {
|
|
40
|
+
return `var(${DURATION_VAR}, ${SPINNER_MOTION[name]}ms)`;
|
|
41
|
+
}
|
|
42
|
+
function stagger(name, count) {
|
|
43
|
+
return `calc(${duration(name)} * (var(${STEP_VAR}) - ${count}) / ${count})`;
|
|
44
|
+
}
|
|
45
|
+
const PLAY_STATE = `var(${PLAY_STATE_VAR}, running)`;
|
|
46
|
+
function animation(name, keyframes, timing) {
|
|
47
|
+
return `animation: ${[keyframes].flat().map((frames) => `${frames} ${duration(name)} ${timing} infinite`).join(", ")};
|
|
48
|
+
animation-play-state: ${PLAY_STATE};`;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { DEFAULT_SIZE, DURATION_VAR, PLAY_STATE, PLAY_STATE_VAR, SIZE, SIZE_VAR, SPINNER_MOTION, STEP_VAR, animation, duration, stagger };
|
package/dist/orbit.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
declare function Orbit({ easing, ...rest }: OrbitProps): react.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { Orbit, type OrbitProps };
|
|
1
|
+
import { r as EasingProps } from "./easing-DhnLArHS.js";
|
|
2
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
3
|
+
//#region src/orbit.d.ts
|
|
4
|
+
export interface OrbitProps extends SpinnerProps, EasingProps {}
|
|
5
|
+
export declare function Orbit({ easing, ...rest }: OrbitProps): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
package/dist/orbit.js
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { SIZE } from "./motion.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/orbit.tsx
|
|
6
|
+
const css = `
|
|
7
|
+
.ld-orbit {
|
|
8
|
+
--ld-orbit-stroke: calc(${SIZE} * 0.0625);
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ld-orbit-track {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 8%;
|
|
15
|
+
border-radius: 9999px;
|
|
16
|
+
background: conic-gradient(from 180deg, transparent 0deg, currentColor 180deg, transparent 180deg);
|
|
17
|
+
-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
|
|
18
|
+
mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-orbit-stroke)), #000 0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ld-orbit-dot {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 50%;
|
|
24
|
+
left: 50%;
|
|
25
|
+
width: 25%;
|
|
26
|
+
height: 25%;
|
|
27
|
+
background: currentColor;
|
|
28
|
+
border-radius: 9999px;
|
|
29
|
+
transform: translate(-50%, -50%);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
${rotationCss("orbit")}
|
|
33
|
+
`;
|
|
34
|
+
function Orbit({ easing, ...rest }) {
|
|
35
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
36
|
+
name: "orbit",
|
|
37
|
+
children: css
|
|
38
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
39
|
+
...spinnerRoot("orbit", rest),
|
|
40
|
+
children: [/* @__PURE__ */ jsx("div", { className: "ld-orbit-dot" }), /* @__PURE__ */ jsx("div", { className: `ld-orbit-track ${spinClass("orbit", easing)}` })]
|
|
41
|
+
})] });
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Orbit };
|
package/dist/pulse.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Pulse };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/pulse.d.ts
|
|
3
|
+
export declare function Pulse(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/pulse.js
CHANGED
|
@@ -1,8 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
import { animation } from "./motion.js";
|
|
2
|
+
import { SpinnerStyle, spinnerRoot } from "./frame.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/pulse.tsx
|
|
5
|
+
const css = `
|
|
6
|
+
.ld-pulse-ring {
|
|
7
|
+
transform-origin: center;
|
|
8
|
+
${animation("pulse", "ld-pulse-ripple", "ease-out")}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@keyframes ld-pulse-ripple {
|
|
12
|
+
from {
|
|
13
|
+
opacity: 0.4;
|
|
14
|
+
transform: scale(0.25);
|
|
15
|
+
}
|
|
16
|
+
to {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
transform: scale(1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media (prefers-reduced-motion: reduce) {
|
|
23
|
+
.ld-pulse-ring {
|
|
24
|
+
opacity: 0.2;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
function Pulse(props) {
|
|
29
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
30
|
+
name: "pulse",
|
|
31
|
+
children: css
|
|
32
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
33
|
+
...spinnerRoot("pulse", props),
|
|
34
|
+
fill: "none",
|
|
35
|
+
role: "presentation",
|
|
36
|
+
viewBox: "0 0 16 16",
|
|
37
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
38
|
+
className: "ld-pulse-ring",
|
|
39
|
+
cx: "8",
|
|
40
|
+
cy: "8",
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
r: "8"
|
|
43
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
44
|
+
cx: "8",
|
|
45
|
+
cy: "8",
|
|
46
|
+
fill: "currentColor",
|
|
47
|
+
r: "2"
|
|
48
|
+
})]
|
|
49
|
+
})] });
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Pulse };
|
package/dist/radar.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
declare function Radar({ easing, ...rest }: RadarProps): react.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { Radar, type RadarProps };
|
|
1
|
+
import { r as EasingProps } from "./easing-DhnLArHS.js";
|
|
2
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
3
|
+
//#region src/radar.d.ts
|
|
4
|
+
export interface RadarProps extends SpinnerProps, EasingProps {}
|
|
5
|
+
export declare function Radar({ easing, ...rest }: RadarProps): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
package/dist/radar.js
CHANGED
|
@@ -1,9 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
import { rotationCss, spinClass } from "./easing.js";
|
|
2
|
+
import { SpinnerStyle, spinnerRoot } from "./frame.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
//#region src/radar.tsx
|
|
6
|
+
const css = `
|
|
7
|
+
${rotationCss("radar")}
|
|
8
|
+
`;
|
|
9
|
+
function Radar({ easing, ...rest }) {
|
|
10
|
+
const beamGradient = useId();
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
12
|
+
name: "radar",
|
|
13
|
+
children: css
|
|
14
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
15
|
+
...spinnerRoot("radar", rest),
|
|
16
|
+
fill: "none",
|
|
17
|
+
role: "presentation",
|
|
18
|
+
viewBox: "0 0 16 16",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("radialGradient", {
|
|
21
|
+
cx: "8",
|
|
22
|
+
cy: "8",
|
|
23
|
+
gradientUnits: "userSpaceOnUse",
|
|
24
|
+
id: beamGradient,
|
|
25
|
+
r: "8",
|
|
26
|
+
children: [/* @__PURE__ */ jsx("stop", {
|
|
27
|
+
offset: "0.3334",
|
|
28
|
+
stopColor: "currentColor"
|
|
29
|
+
}), /* @__PURE__ */ jsx("stop", {
|
|
30
|
+
offset: "1",
|
|
31
|
+
stopColor: "currentColor",
|
|
32
|
+
stopOpacity: "0"
|
|
33
|
+
})]
|
|
34
|
+
}) }),
|
|
35
|
+
/* @__PURE__ */ jsx("circle", {
|
|
36
|
+
cx: "8",
|
|
37
|
+
cy: "8",
|
|
38
|
+
fill: "currentColor",
|
|
39
|
+
opacity: "0.2",
|
|
40
|
+
r: "8"
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx("circle", {
|
|
43
|
+
cx: "8",
|
|
44
|
+
cy: "8",
|
|
45
|
+
opacity: "0.2",
|
|
46
|
+
r: "5.5",
|
|
47
|
+
stroke: "currentColor"
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("path", {
|
|
50
|
+
className: spinClass("radar", easing),
|
|
51
|
+
d: "M8 0C9.50657 0 10.9824 0.425672 12.2578 1.22754C13.5333 2.02953 14.557 3.17533 15.21 4.5332C15.8629 5.89107 16.1193 7.40626 15.9492 8.90332C15.7791 10.4001 15.1896 11.8184 14.249 12.9951L10.4707 9.69922C10.8037 9.21598 11 8.63123 11 8C11 6.34315 9.65685 5 8 5V0Z",
|
|
52
|
+
fill: `url(#${beamGradient})`
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx("circle", {
|
|
55
|
+
cx: "8",
|
|
56
|
+
cy: "8",
|
|
57
|
+
fill: "currentColor",
|
|
58
|
+
r: "2"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})] });
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { Radar };
|
package/dist/ring.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function Ring({ cap, easing, ...rest }: RingProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { Ring, type RingProps };
|
|
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/ring.d.ts
|
|
5
|
+
export interface RingProps extends SpinnerProps, EasingProps, CapProps {}
|
|
6
|
+
export declare function Ring({ cap, easing, ...rest }: RingProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
package/dist/ring.js
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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/ring.tsx
|
|
6
|
+
const css = `
|
|
7
|
+
${rotationCss("ring")}
|
|
8
|
+
`;
|
|
9
|
+
function Ring({ cap, easing, ...rest }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
11
|
+
name: "ring",
|
|
12
|
+
children: css
|
|
13
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
14
|
+
...spinnerRoot("ring", rest),
|
|
15
|
+
fill: "none",
|
|
16
|
+
role: "presentation",
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
19
|
+
cx: "12",
|
|
20
|
+
cy: "12",
|
|
21
|
+
opacity: "0.2",
|
|
22
|
+
r: "10",
|
|
23
|
+
stroke: "currentColor",
|
|
24
|
+
strokeWidth: "2.5"
|
|
25
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
26
|
+
className: spinClass("ring", easing),
|
|
27
|
+
cx: "12",
|
|
28
|
+
cy: "12",
|
|
29
|
+
r: "10",
|
|
30
|
+
stroke: "currentColor",
|
|
31
|
+
strokeDasharray: "16 46.8",
|
|
32
|
+
strokeLinecap: linecap(cap),
|
|
33
|
+
strokeWidth: "2.5"
|
|
34
|
+
})]
|
|
35
|
+
})] });
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Ring };
|
package/dist/ripple.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
direction?: RippleDirection;
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/ripple.d.ts
|
|
3
|
+
export type RippleDirection = "in" | "out";
|
|
4
|
+
export declare const DEFAULT_RIPPLE_DIRECTION: RippleDirection;
|
|
5
|
+
export interface RippleProps extends SpinnerProps {
|
|
6
|
+
direction?: RippleDirection;
|
|
8
7
|
}
|
|
9
|
-
declare function Ripple({ direction, ...rest }: RippleProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { DEFAULT_RIPPLE_DIRECTION, Ripple, type RippleDirection, type RippleProps };
|
|
8
|
+
export declare function Ripple({ direction, ...rest }: RippleProps): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
package/dist/ripple.js
CHANGED
|
@@ -1,10 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { SIZE, STEP_VAR, animation, stagger } from "./motion.js";
|
|
2
|
+
import { SpinnerStyle, spinnerRoot, step } from "./frame.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/ripple.tsx
|
|
5
|
+
const DEFAULT_RIPPLE_DIRECTION = "out";
|
|
6
|
+
const RINGS = Array.from({ length: 3 }, (_, index) => index);
|
|
7
|
+
const css = `
|
|
8
|
+
.ld-ripple {
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ld-ripple-ring {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
border: calc(${SIZE} * 0.08) solid currentColor;
|
|
17
|
+
border-radius: 9999px;
|
|
18
|
+
${animation("ripple", "ld-ripple-spread", "ease-out")}
|
|
19
|
+
animation-delay: ${stagger("ripple", RINGS.length)};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ld-ripple-ring-in {
|
|
23
|
+
animation-direction: reverse;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes ld-ripple-spread {
|
|
27
|
+
from {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
transform: scale(0);
|
|
30
|
+
}
|
|
31
|
+
to {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: scale(1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
.ld-ripple-ring {
|
|
39
|
+
opacity: 0.4;
|
|
40
|
+
transform: scale(calc((var(${STEP_VAR}) + 1) / ${RINGS.length}));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
function Ripple({ direction = "out", ...rest }) {
|
|
45
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
46
|
+
name: "ripple",
|
|
47
|
+
children: css
|
|
48
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
49
|
+
...spinnerRoot("ripple", rest),
|
|
50
|
+
children: RINGS.map((index) => /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: `ld-ripple-ring ld-ripple-ring-${direction}`,
|
|
52
|
+
style: step(index)
|
|
53
|
+
}, index))
|
|
54
|
+
})] });
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { DEFAULT_RIPPLE_DIRECTION, Ripple };
|
package/dist/slide.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Slide };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/slide.d.ts
|
|
3
|
+
export declare function Slide(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|