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/wave.js
CHANGED
|
@@ -1,10 +1,56 @@
|
|
|
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/wave.tsx
|
|
5
|
+
const DEFAULT_WAVE_ORIGIN = "center";
|
|
6
|
+
const BARS = Array.from({ length: 5 }, (_, index) => index);
|
|
7
|
+
const css = `
|
|
8
|
+
.ld-wave {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ld-wave-bar {
|
|
15
|
+
width: calc(${SIZE} * 0.12);
|
|
16
|
+
height: 100%;
|
|
17
|
+
background: currentColor;
|
|
18
|
+
border-radius: 9999px;
|
|
19
|
+
${animation("wave", "ld-wave-rise", "ease-in-out")}
|
|
20
|
+
animation-delay: ${stagger("wave", BARS.length)};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ld-wave-bar-bottom {
|
|
24
|
+
align-self: flex-end;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes ld-wave-rise {
|
|
28
|
+
0%,
|
|
29
|
+
100% {
|
|
30
|
+
height: 30%;
|
|
31
|
+
}
|
|
32
|
+
50% {
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
.ld-wave-bar {
|
|
39
|
+
height: calc((0.4 + var(${STEP_VAR}) * 0.15) * 100%);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
function Wave({ origin = DEFAULT_WAVE_ORIGIN, ...rest }) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
45
|
+
name: "wave",
|
|
46
|
+
children: css
|
|
47
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
48
|
+
...spinnerRoot("wave", rest),
|
|
49
|
+
children: BARS.map((index) => /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: `ld-wave-bar ld-wave-bar-${origin}`,
|
|
51
|
+
style: step(index)
|
|
52
|
+
}, index))
|
|
53
|
+
})] });
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { DEFAULT_WAVE_ORIGIN, Wave };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loading-dev",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "A lightweight library full of beautiful loading indicators for React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -28,34 +28,36 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "
|
|
31
|
+
"build": "tsdown",
|
|
32
32
|
"build:web": "pnpm --filter web build",
|
|
33
|
+
"check": "pnpm lint && biome check --error-on-warnings .",
|
|
33
34
|
"dev": "pnpm run \"/^dev:/\"",
|
|
34
|
-
"dev:lib": "
|
|
35
|
+
"dev:lib": "tsdown --watch src",
|
|
35
36
|
"dev:web": "pnpm --filter web dev",
|
|
36
|
-
"fix": "biome check --write .",
|
|
37
|
+
"fix": "oxlint --fix . && biome check --write .",
|
|
37
38
|
"format": "biome format --write .",
|
|
38
|
-
"lint": "
|
|
39
|
-
"prepublishOnly": "
|
|
39
|
+
"lint": "oxlint --deny-warnings --report-unused-disable-directives-severity error .",
|
|
40
|
+
"prepublishOnly": "tsdown",
|
|
40
41
|
"test": "vitest run",
|
|
41
42
|
"test:watch": "vitest",
|
|
42
43
|
"typecheck": "tsc --noEmit && pnpm build && pnpm --filter web typecheck"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@biomejs/biome": "^2.5.
|
|
46
|
-
"@types/node": "^
|
|
47
|
-
"@types/react": "^19",
|
|
48
|
-
"@types/react-dom": "^19.
|
|
49
|
-
"
|
|
50
|
-
"react
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
46
|
+
"@biomejs/biome": "^2.5.15",
|
|
47
|
+
"@types/node": "^26.6.4",
|
|
48
|
+
"@types/react": "^19.3.0",
|
|
49
|
+
"@types/react-dom": "^19.3.0",
|
|
50
|
+
"oxlint": "1.87.0",
|
|
51
|
+
"react": "19.3.0",
|
|
52
|
+
"react-dom": "19.3.0",
|
|
53
|
+
"tsdown": "^0.23.0",
|
|
54
|
+
"typescript": "^7.0.2",
|
|
55
|
+
"ultracite": "8.0.0",
|
|
56
|
+
"vitest": "^5.0.3"
|
|
55
57
|
},
|
|
56
58
|
"peerDependencies": {
|
|
57
59
|
"react": ">=19.0.0",
|
|
58
60
|
"react-dom": ">=19.0.0"
|
|
59
61
|
},
|
|
60
|
-
"packageManager": "pnpm@
|
|
62
|
+
"packageManager": "pnpm@12.10.1"
|
|
61
63
|
}
|
package/dist/chunk-5A6DX4J6.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
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/comet.tsx
|
|
14
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
var css = `
|
|
16
|
-
.ld-comet {
|
|
17
|
-
--ld-comet-stroke: calc(${SIZE} * 0.12);
|
|
18
|
-
position: relative;
|
|
19
|
-
width: ${SIZE};
|
|
20
|
-
height: ${SIZE};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ld-comet-spin {
|
|
24
|
-
position: absolute;
|
|
25
|
-
inset: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.ld-comet-tail {
|
|
29
|
-
position: absolute;
|
|
30
|
-
inset: 0;
|
|
31
|
-
border-radius: 9999px;
|
|
32
|
-
background: conic-gradient(from 0deg, transparent, currentColor);
|
|
33
|
-
-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-comet-stroke)), #000 0);
|
|
34
|
-
mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-comet-stroke)), #000 0);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.ld-comet-head {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 0;
|
|
40
|
-
left: 50%;
|
|
41
|
-
width: var(--ld-comet-stroke);
|
|
42
|
-
height: var(--ld-comet-stroke);
|
|
43
|
-
background: currentColor;
|
|
44
|
-
border-radius: 9999px;
|
|
45
|
-
transform: translateX(-50%);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
${rotationCss("comet")}
|
|
49
|
-
`;
|
|
50
|
-
function Comet({ easing, ...rest }) {
|
|
51
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
-
/* @__PURE__ */ jsx(SpinnerStyle, { name: "comet", children: css }),
|
|
53
|
-
/* @__PURE__ */ jsx("div", { ...spinnerRoot("comet", rest), children: /* @__PURE__ */ jsxs("div", { className: spinClass("comet", easing), children: [
|
|
54
|
-
/* @__PURE__ */ jsx("div", { className: "ld-comet-tail" }),
|
|
55
|
-
/* @__PURE__ */ jsx("div", { className: "ld-comet-head" })
|
|
56
|
-
] }) })
|
|
57
|
-
] });
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
Comet
|
|
62
|
-
};
|
package/dist/chunk-5DLURQGF.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
rotationCss,
|
|
3
|
-
spinClass
|
|
4
|
-
} from "./chunk-7C6Q6WUN.js";
|
|
5
|
-
import {
|
|
6
|
-
SpinnerStyle,
|
|
7
|
-
cssVars,
|
|
8
|
-
spinnerRoot,
|
|
9
|
-
step
|
|
10
|
-
} from "./chunk-VRX5ZYC6.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
|
-
};
|
package/dist/chunk-5DS5PSRD.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Swirl
|
|
3
|
-
} from "./chunk-BMJ3AGRK.js";
|
|
4
|
-
import {
|
|
5
|
-
Trace
|
|
6
|
-
} from "./chunk-HDBQBCTN.js";
|
|
7
|
-
import {
|
|
8
|
-
Wave
|
|
9
|
-
} from "./chunk-VBI53UGV.js";
|
|
10
|
-
import {
|
|
11
|
-
Orbit
|
|
12
|
-
} from "./chunk-Y7QGIWTL.js";
|
|
13
|
-
import {
|
|
14
|
-
Pulse
|
|
15
|
-
} from "./chunk-FKUMWHUL.js";
|
|
16
|
-
import {
|
|
17
|
-
Radar
|
|
18
|
-
} from "./chunk-5LSP7MQQ.js";
|
|
19
|
-
import {
|
|
20
|
-
Ring
|
|
21
|
-
} from "./chunk-ZLJYYX76.js";
|
|
22
|
-
import {
|
|
23
|
-
Ripple
|
|
24
|
-
} from "./chunk-IWVH2GKE.js";
|
|
25
|
-
import {
|
|
26
|
-
Slide
|
|
27
|
-
} from "./chunk-IRMB7CHZ.js";
|
|
28
|
-
import {
|
|
29
|
-
Snake
|
|
30
|
-
} from "./chunk-RTKHVDCD.js";
|
|
31
|
-
import {
|
|
32
|
-
Gather
|
|
33
|
-
} from "./chunk-TFHDE6YZ.js";
|
|
34
|
-
import {
|
|
35
|
-
Leap
|
|
36
|
-
} from "./chunk-LIPOYJAI.js";
|
|
37
|
-
import {
|
|
38
|
-
LinearDots
|
|
39
|
-
} from "./chunk-K5XVX5GB.js";
|
|
40
|
-
import {
|
|
41
|
-
Loading
|
|
42
|
-
} from "./chunk-MVL7SVAH.js";
|
|
43
|
-
import {
|
|
44
|
-
Morph
|
|
45
|
-
} from "./chunk-AY4VLQBZ.js";
|
|
46
|
-
import {
|
|
47
|
-
Classic
|
|
48
|
-
} from "./chunk-IZ4TRHOC.js";
|
|
49
|
-
import {
|
|
50
|
-
Clock
|
|
51
|
-
} from "./chunk-IQ2WQZFY.js";
|
|
52
|
-
import {
|
|
53
|
-
Comet
|
|
54
|
-
} from "./chunk-5A6DX4J6.js";
|
|
55
|
-
import {
|
|
56
|
-
Compass
|
|
57
|
-
} from "./chunk-T7OV7MUW.js";
|
|
58
|
-
import {
|
|
59
|
-
Dual
|
|
60
|
-
} from "./chunk-NHN4FV63.js";
|
|
61
|
-
import {
|
|
62
|
-
Eclipse
|
|
63
|
-
} from "./chunk-AHW6IXXT.js";
|
|
64
|
-
import {
|
|
65
|
-
Flip
|
|
66
|
-
} from "./chunk-5R75HMWP.js";
|
|
67
|
-
import {
|
|
68
|
-
Arc
|
|
69
|
-
} from "./chunk-X7BJQCYL.js";
|
|
70
|
-
import {
|
|
71
|
-
Atom
|
|
72
|
-
} from "./chunk-5DLURQGF.js";
|
|
73
|
-
import {
|
|
74
|
-
Blocks
|
|
75
|
-
} from "./chunk-PBB2PRPT.js";
|
|
76
|
-
import {
|
|
77
|
-
BouncingDots
|
|
78
|
-
} from "./chunk-UWSCBISJ.js";
|
|
79
|
-
import {
|
|
80
|
-
Cascade
|
|
81
|
-
} from "./chunk-I5CFO2M5.js";
|
|
82
|
-
import {
|
|
83
|
-
CircularDots
|
|
84
|
-
} from "./chunk-A43AJR54.js";
|
|
85
|
-
import {
|
|
86
|
-
ClassicV2
|
|
87
|
-
} from "./chunk-T5EUYN7R.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
|
-
};
|
package/dist/chunk-5LSP7MQQ.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
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/radar.tsx
|
|
14
|
-
import { useId } from "react";
|
|
15
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
var css = `
|
|
17
|
-
.ld-radar {
|
|
18
|
-
width: ${SIZE};
|
|
19
|
-
height: ${SIZE};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
${rotationCss("radar")}
|
|
23
|
-
`;
|
|
24
|
-
function Radar({ easing, ...rest }) {
|
|
25
|
-
const beamGradient = useId();
|
|
26
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27
|
-
/* @__PURE__ */ jsx(SpinnerStyle, { name: "radar", children: css }),
|
|
28
|
-
/* @__PURE__ */ jsxs(
|
|
29
|
-
"svg",
|
|
30
|
-
{
|
|
31
|
-
...spinnerRoot("radar", rest),
|
|
32
|
-
fill: "none",
|
|
33
|
-
role: "presentation",
|
|
34
|
-
viewBox: "0 0 16 16",
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
37
|
-
"radialGradient",
|
|
38
|
-
{
|
|
39
|
-
cx: "8",
|
|
40
|
-
cy: "8",
|
|
41
|
-
gradientUnits: "userSpaceOnUse",
|
|
42
|
-
id: beamGradient,
|
|
43
|
-
r: "8",
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.3334", stopColor: "currentColor" }),
|
|
46
|
-
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
) }),
|
|
50
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.2", r: "8" }),
|
|
51
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", opacity: "0.2", r: "5.5", stroke: "currentColor" }),
|
|
52
|
-
/* @__PURE__ */ jsx(
|
|
53
|
-
"path",
|
|
54
|
-
{
|
|
55
|
-
className: spinClass("radar", easing),
|
|
56
|
-
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",
|
|
57
|
-
fill: `url(#${beamGradient})`
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", r: "2" })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
] });
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export {
|
|
68
|
-
Radar
|
|
69
|
-
};
|
package/dist/chunk-5R75HMWP.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
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/flip.tsx
|
|
11
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
var css = `
|
|
13
|
-
.ld-flip {
|
|
14
|
-
width: ${SIZE};
|
|
15
|
-
height: ${SIZE};
|
|
16
|
-
perspective: calc(${SIZE} * 3);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.ld-flip-face {
|
|
20
|
-
width: 64%;
|
|
21
|
-
height: 64%;
|
|
22
|
-
margin: 18%;
|
|
23
|
-
background: currentColor;
|
|
24
|
-
border-radius: calc(${SIZE} * 0.06);
|
|
25
|
-
${animation("flip", "ld-flip-turn", "ease-in-out")}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@keyframes ld-flip-turn {
|
|
29
|
-
0% {
|
|
30
|
-
transform: rotateX(0) rotateY(0);
|
|
31
|
-
}
|
|
32
|
-
50% {
|
|
33
|
-
transform: rotateX(-180deg) rotateY(0);
|
|
34
|
-
}
|
|
35
|
-
100% {
|
|
36
|
-
transform: rotateX(-180deg) rotateY(-180deg);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@media (prefers-reduced-motion: reduce) {
|
|
41
|
-
.ld-flip-face {
|
|
42
|
-
animation: none;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
function Flip(props) {
|
|
47
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48
|
-
/* @__PURE__ */ jsx(SpinnerStyle, { name: "flip", children: css }),
|
|
49
|
-
/* @__PURE__ */ jsx("div", { ...spinnerRoot("flip", props), children: /* @__PURE__ */ jsx("div", { className: "ld-flip-face" }) })
|
|
50
|
-
] });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export {
|
|
54
|
-
Flip
|
|
55
|
-
};
|
package/dist/chunk-7C6Q6WUN.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
animation
|
|
3
|
-
} from "./chunk-OMNMMKI7.js";
|
|
4
|
-
|
|
5
|
-
// src/easing.ts
|
|
6
|
-
var DEFAULT_EASING = "linear";
|
|
7
|
-
function spinClass(name, easing = DEFAULT_EASING) {
|
|
8
|
-
const base = `ld-${name}-spin`;
|
|
9
|
-
return easing === "linear" ? base : `${base} ${base}-${easing}`;
|
|
10
|
-
}
|
|
11
|
-
var ROTATE = `to {
|
|
12
|
-
transform: rotate(360deg);
|
|
13
|
-
}`;
|
|
14
|
-
function rotationCss(name, turn = ROTATE) {
|
|
15
|
-
return `
|
|
16
|
-
.ld-${name}-spin {
|
|
17
|
-
transform-origin: center;
|
|
18
|
-
${animation(name, `ld-${name}-rotate`, "linear")}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.ld-${name}-spin-ease-in-out {
|
|
22
|
-
animation-timing-function: ease-in-out;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.ld-${name}-spin-stacked {
|
|
26
|
-
animation-name: ld-${name}-rotate, ld-${name}-rotate;
|
|
27
|
-
animation-timing-function: linear, ease-in-out;
|
|
28
|
-
animation-composition: add;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@keyframes ld-${name}-rotate {
|
|
32
|
-
${turn}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@media (prefers-reduced-motion: reduce) {
|
|
36
|
-
.ld-${name}-spin {
|
|
37
|
-
animation: none;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export {
|
|
44
|
-
DEFAULT_EASING,
|
|
45
|
-
spinClass,
|
|
46
|
-
rotationCss
|
|
47
|
-
};
|
package/dist/chunk-A43AJR54.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
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/circular-dots.tsx
|
|
13
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
var DOTS = [
|
|
15
|
-
[8, 1.5],
|
|
16
|
-
[12.5962, 3.4038],
|
|
17
|
-
[14.5, 8],
|
|
18
|
-
[12.5962, 12.5962],
|
|
19
|
-
[8, 14.5],
|
|
20
|
-
[3.4038, 12.5962],
|
|
21
|
-
[1.5, 8],
|
|
22
|
-
[3.4038, 3.4038]
|
|
23
|
-
];
|
|
24
|
-
var css = `
|
|
25
|
-
.ld-circular-dots {
|
|
26
|
-
width: ${SIZE};
|
|
27
|
-
height: ${SIZE};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.ld-circular-dots-dot {
|
|
31
|
-
${animation("circular-dots", "ld-circular-dots-fade", "linear")}
|
|
32
|
-
animation-delay: ${stagger("circular-dots", DOTS.length)};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@keyframes ld-circular-dots-fade {
|
|
36
|
-
from {
|
|
37
|
-
opacity: 1;
|
|
38
|
-
}
|
|
39
|
-
to {
|
|
40
|
-
opacity: 0.2;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@media (prefers-reduced-motion: reduce) {
|
|
45
|
-
.ld-circular-dots-dot {
|
|
46
|
-
opacity: 0.6;
|
|
47
|
-
animation: none;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
function CircularDots(props) {
|
|
52
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
-
/* @__PURE__ */ jsx(SpinnerStyle, { name: "circular-dots", children: css }),
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
"svg",
|
|
56
|
-
{
|
|
57
|
-
...spinnerRoot("circular-dots", props),
|
|
58
|
-
fill: "currentColor",
|
|
59
|
-
role: "presentation",
|
|
60
|
-
viewBox: "0 0 16 16",
|
|
61
|
-
children: DOTS.map(([cx, cy], index) => /* @__PURE__ */ jsx(
|
|
62
|
-
"circle",
|
|
63
|
-
{
|
|
64
|
-
className: "ld-circular-dots-dot",
|
|
65
|
-
cx,
|
|
66
|
-
cy,
|
|
67
|
-
r: "1.5",
|
|
68
|
-
style: step(index)
|
|
69
|
-
},
|
|
70
|
-
`${cx}-${cy}`
|
|
71
|
-
))
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
] });
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
CircularDots
|
|
79
|
-
};
|