loading-dev 0.3.5 → 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/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 -9
- package/dist/classic-v2.d.ts +4 -6
- package/dist/classic-v2.js +41 -9
- package/dist/classic.d.ts +4 -6
- package/dist/classic.js +48 -9
- 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 +6 -7
- package/dist/fade.js +27 -7
- package/dist/flip.d.ts +4 -6
- package/dist/flip.js +41 -8
- package/dist/frame.d.ts +15 -17
- 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 -146
- 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 -9
- 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 -39
- package/dist/swirl.d.ts +4 -6
- package/dist/swirl.js +50 -9
- 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 -9
- package/dist/types.js +1 -0
- package/dist/wave.d.ts +8 -10
- package/dist/wave.js +56 -10
- package/package.json +14 -14
- package/dist/chunk-2LMGBBRJ.js +0 -77
- package/dist/chunk-2OX27TAE.js +0 -69
- package/dist/chunk-2TYML5J2.js +0 -51
- package/dist/chunk-3WMZVDPS.js +0 -61
- package/dist/chunk-4O4ADYWE.js +0 -73
- package/dist/chunk-5UAEBEER.js +0 -78
- package/dist/chunk-A2PZBHTA.js +0 -41
- package/dist/chunk-BAVSTTWG.js +0 -88
- package/dist/chunk-BCIAMPLU.js +0 -87
- package/dist/chunk-DKYEZLIN.js +0 -72
- package/dist/chunk-FQ2U2M7F.js +0 -76
- package/dist/chunk-FWH6VWVK.js +0 -59
- package/dist/chunk-HL7TIIDB.js +0 -124
- package/dist/chunk-IJJULNRU.js +0 -53
- package/dist/chunk-JKLL7YYG.js +0 -85
- package/dist/chunk-JNR4T6LZ.js +0 -10
- package/dist/chunk-JQNF5GYA.js +0 -52
- package/dist/chunk-KAZ5BTXC.js +0 -74
- package/dist/chunk-KOYM24WV.js +0 -72
- package/dist/chunk-L2DUMHO4.js +0 -69
- package/dist/chunk-LDXBT62V.js +0 -57
- package/dist/chunk-MAKBZTL3.js +0 -56
- package/dist/chunk-OMNMMKI7.js +0 -64
- package/dist/chunk-P4BSSDSY.js +0 -51
- package/dist/chunk-PM6DU637.js +0 -70
- package/dist/chunk-PVVWLDIS.js +0 -33
- package/dist/chunk-R5ZDKN3Z.js +0 -59
- package/dist/chunk-RAHAQ7XK.js +0 -61
- package/dist/chunk-SUUR5WMA.js +0 -46
- package/dist/chunk-UAO52LUL.js +0 -48
- package/dist/chunk-ULWRXY3A.js +0 -50
- package/dist/chunk-UOXB5QOZ.js +0 -81
- package/dist/chunk-UXTZTFNZ.js +0 -62
- package/dist/chunk-VZX7APSS.js +0 -82
- package/dist/chunk-YIB63EKJ.js +0 -49
package/dist/clock.js
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
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
|
+
//#region src/clock.tsx
|
|
5
|
+
const css = `
|
|
6
|
+
${rotationCss("clock")}
|
|
7
|
+
`;
|
|
8
|
+
function Clock({ easing, ...rest }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
10
|
+
name: "clock",
|
|
11
|
+
children: css
|
|
12
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
13
|
+
...spinnerRoot("clock", rest),
|
|
14
|
+
fill: "none",
|
|
15
|
+
role: "presentation",
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
17
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
18
|
+
cx: "8",
|
|
19
|
+
cy: "8",
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
opacity: "0.1",
|
|
22
|
+
r: "8"
|
|
23
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
24
|
+
className: spinClass("clock", easing),
|
|
25
|
+
d: "M11.1937 2.92061C10.5206 2.49739 9.77304 2.21397 8.9954 2.08314C8.45076 1.99151 8 2.44772 8 3V7.20324C8 7.49211 8.12492 7.76686 8.34259 7.95677L11.8999 11.0603C12.3287 11.4344 12.9913 11.378 13.2643 10.8787C13.6356 10.1998 13.8736 9.45248 13.9617 8.67713C14.0892 7.55433 13.8971 6.41834 13.4074 5.39993C12.9177 4.38152 12.1503 3.5221 11.1937 2.92061Z",
|
|
26
|
+
fill: "currentColor"
|
|
27
|
+
})]
|
|
28
|
+
})] });
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Clock };
|
package/dist/comet.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
declare function Comet({ easing, ...rest }: CometProps): react.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { Comet, type CometProps };
|
|
1
|
+
import { r as EasingProps } from "./easing-DhnLArHS.js";
|
|
2
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
3
|
+
//#region src/comet.d.ts
|
|
4
|
+
export interface CometProps extends SpinnerProps, EasingProps {}
|
|
5
|
+
export declare function Comet({ easing, ...rest }: CometProps): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
package/dist/comet.js
CHANGED
|
@@ -1,9 +1,52 @@
|
|
|
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/comet.tsx
|
|
6
|
+
const css = `
|
|
7
|
+
.ld-comet {
|
|
8
|
+
--ld-comet-stroke: calc(${SIZE} * 0.12);
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ld-comet-spin {
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ld-comet-tail {
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset: 0;
|
|
20
|
+
border-radius: 9999px;
|
|
21
|
+
background: conic-gradient(from 0deg, transparent, currentColor);
|
|
22
|
+
-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-comet-stroke)), #000 0);
|
|
23
|
+
mask: radial-gradient(farthest-side, transparent calc(100% - var(--ld-comet-stroke)), #000 0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ld-comet-head {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0;
|
|
29
|
+
left: 50%;
|
|
30
|
+
width: var(--ld-comet-stroke);
|
|
31
|
+
height: var(--ld-comet-stroke);
|
|
32
|
+
background: currentColor;
|
|
33
|
+
border-radius: 9999px;
|
|
34
|
+
transform: translateX(-50%);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
${rotationCss("comet")}
|
|
38
|
+
`;
|
|
39
|
+
function Comet({ easing, ...rest }) {
|
|
40
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
41
|
+
name: "comet",
|
|
42
|
+
children: css
|
|
43
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
44
|
+
...spinnerRoot("comet", rest),
|
|
45
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className: spinClass("comet", easing),
|
|
47
|
+
children: [/* @__PURE__ */ jsx("div", { className: "ld-comet-tail" }), /* @__PURE__ */ jsx("div", { className: "ld-comet-head" })]
|
|
48
|
+
})
|
|
49
|
+
})] });
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Comet };
|
package/dist/compass.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Compass };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/compass.d.ts
|
|
3
|
+
export declare function Compass(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/compass.js
CHANGED
|
@@ -1,8 +1,39 @@
|
|
|
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/compass.tsx
|
|
5
|
+
const css = `
|
|
6
|
+
.ld-compass-ticks {
|
|
7
|
+
transform-origin: center;
|
|
8
|
+
${animation("compass", "ld-compass-turn", "ease-in-out")}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@keyframes ld-compass-turn {
|
|
12
|
+
to {
|
|
13
|
+
transform: rotate(90deg);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
function Compass(props) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
19
|
+
name: "compass",
|
|
20
|
+
children: css
|
|
21
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
22
|
+
...spinnerRoot("compass", props),
|
|
23
|
+
fill: "none",
|
|
24
|
+
role: "presentation",
|
|
25
|
+
viewBox: "0 0 16 16",
|
|
26
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
27
|
+
className: "ld-compass-ticks",
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__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" }),
|
|
31
|
+
/* @__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" }),
|
|
32
|
+
/* @__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" }),
|
|
33
|
+
/* @__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" })
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
})] });
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Compass };
|
package/dist/dual.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
declare function Dual({ cap, easing, ...rest }: DualProps): react.JSX.Element;
|
|
10
|
-
|
|
11
|
-
export { Dual, type DualProps };
|
|
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/dual.d.ts
|
|
5
|
+
export interface DualProps extends SpinnerProps, EasingProps, CapProps {}
|
|
6
|
+
export declare function Dual({ cap, easing, ...rest }: DualProps): import("react").JSX.Element;
|
|
7
|
+
//#endregion
|
package/dist/dual.js
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
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/dual.tsx
|
|
6
|
+
const css = `
|
|
7
|
+
${rotationCss("dual")}
|
|
8
|
+
|
|
9
|
+
.ld-dual-inner {
|
|
10
|
+
animation-direction: reverse;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media (prefers-reduced-motion: reduce) {
|
|
14
|
+
.ld-dual-inner {
|
|
15
|
+
transform: rotate(180deg);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
function Dual({ cap, easing, ...rest }) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
21
|
+
name: "dual",
|
|
22
|
+
children: css
|
|
23
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
24
|
+
...spinnerRoot("dual", rest),
|
|
25
|
+
fill: "none",
|
|
26
|
+
role: "presentation",
|
|
27
|
+
stroke: "currentColor",
|
|
28
|
+
strokeLinecap: linecap(cap),
|
|
29
|
+
strokeWidth: "2.5",
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
32
|
+
className: spinClass("dual", easing),
|
|
33
|
+
cx: "12",
|
|
34
|
+
cy: "12",
|
|
35
|
+
r: "10",
|
|
36
|
+
strokeDasharray: "18 44.8"
|
|
37
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
38
|
+
className: `ld-dual-inner ${spinClass("dual", easing)}`,
|
|
39
|
+
cx: "12",
|
|
40
|
+
cy: "12",
|
|
41
|
+
r: "5.5",
|
|
42
|
+
strokeDasharray: "10 24.6"
|
|
43
|
+
})]
|
|
44
|
+
})] });
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Dual };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { l as SpinnerName } from "./motion-D_zUuA3S.js";
|
|
2
|
+
//#region src/easing.d.ts
|
|
3
|
+
type Easing = "linear" | "ease-in-out" | "stacked";
|
|
4
|
+
declare const DEFAULT_EASING: Easing;
|
|
5
|
+
interface EasingProps {
|
|
6
|
+
easing?: Easing;
|
|
7
|
+
}
|
|
8
|
+
declare function spinClass(name: SpinnerName, easing?: Easing): string;
|
|
9
|
+
declare function rotationCss(name: SpinnerName, turn?: string): string;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { spinClass as a, rotationCss as i, Easing as n, EasingProps as r, DEFAULT_EASING as t };
|
package/dist/easing.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type Easing = "linear" | "ease-in-out" | "stacked";
|
|
4
|
-
declare const DEFAULT_EASING: Easing;
|
|
5
|
-
interface EasingProps {
|
|
6
|
-
easing?: Easing;
|
|
7
|
-
}
|
|
8
|
-
declare function spinClass(name: SpinnerName, easing?: Easing): string;
|
|
9
|
-
declare function rotationCss(name: SpinnerName, turn?: string): string;
|
|
10
|
-
|
|
11
|
-
export { DEFAULT_EASING, type Easing, type EasingProps, rotationCss, spinClass };
|
|
1
|
+
import { a as spinClass, i as rotationCss, n as Easing, r as EasingProps, t as DEFAULT_EASING } from "./easing-DhnLArHS.js";
|
|
2
|
+
export { DEFAULT_EASING, Easing, EasingProps, rotationCss, spinClass };
|
package/dist/easing.js
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { animation } from "./motion.js";
|
|
2
|
+
//#region src/easing.ts
|
|
3
|
+
const DEFAULT_EASING = "linear";
|
|
4
|
+
function spinClass(name, easing = DEFAULT_EASING) {
|
|
5
|
+
const base = `ld-${name}-spin`;
|
|
6
|
+
return easing === "linear" ? base : `${base} ${base}-${easing}`;
|
|
7
|
+
}
|
|
8
|
+
const ROTATE = `to {
|
|
9
|
+
transform: rotate(360deg);
|
|
10
|
+
}`;
|
|
11
|
+
function rotationCss(name, turn = ROTATE) {
|
|
12
|
+
return `
|
|
13
|
+
.ld-${name}-spin {
|
|
14
|
+
transform-origin: center;
|
|
15
|
+
${animation(name, `ld-${name}-rotate`, "linear")}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ld-${name}-spin-ease-in-out {
|
|
19
|
+
animation-timing-function: ease-in-out;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ld-${name}-spin-stacked {
|
|
23
|
+
animation-name: ld-${name}-rotate, ld-${name}-rotate;
|
|
24
|
+
animation-timing-function: linear, ease-in-out;
|
|
25
|
+
animation-composition: add;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes ld-${name}-rotate {
|
|
29
|
+
${turn}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { DEFAULT_EASING, rotationCss, spinClass };
|
package/dist/eclipse.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Eclipse };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/eclipse.d.ts
|
|
3
|
+
export declare function Eclipse(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/eclipse.js
CHANGED
|
@@ -1,8 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { 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/eclipse.tsx
|
|
5
|
+
const DOTS = [0, 1];
|
|
6
|
+
const css = `
|
|
7
|
+
.ld-eclipse {
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ld-eclipse-dot {
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 30%;
|
|
14
|
+
left: 30%;
|
|
15
|
+
width: 40%;
|
|
16
|
+
height: 40%;
|
|
17
|
+
background: currentColor;
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
${animation("eclipse", ["ld-eclipse-slide", "ld-eclipse-depth"], "ease-in-out")}
|
|
20
|
+
animation-delay: ${stagger("eclipse", DOTS.length)};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes ld-eclipse-slide {
|
|
24
|
+
0%,
|
|
25
|
+
100% {
|
|
26
|
+
translate: 75% 0;
|
|
27
|
+
}
|
|
28
|
+
50% {
|
|
29
|
+
translate: -75% 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes ld-eclipse-depth {
|
|
34
|
+
0%,
|
|
35
|
+
50%,
|
|
36
|
+
100% {
|
|
37
|
+
opacity: 0.75;
|
|
38
|
+
scale: 1;
|
|
39
|
+
}
|
|
40
|
+
25% {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
scale: 1.3;
|
|
43
|
+
}
|
|
44
|
+
75% {
|
|
45
|
+
opacity: 0.5;
|
|
46
|
+
scale: 0.7;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (prefers-reduced-motion: reduce) {
|
|
51
|
+
.ld-eclipse-dot {
|
|
52
|
+
translate: calc(var(${STEP_VAR}) * 150% - 75%) 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
function Eclipse(props) {
|
|
57
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
58
|
+
name: "eclipse",
|
|
59
|
+
children: css
|
|
60
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
61
|
+
...spinnerRoot("eclipse", props),
|
|
62
|
+
children: DOTS.map((index) => /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: "ld-eclipse-dot",
|
|
64
|
+
style: step(index)
|
|
65
|
+
}, index))
|
|
66
|
+
})] });
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { Eclipse };
|
package/dist/fade.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { SpinnerName } from
|
|
2
|
-
|
|
3
|
-
declare function fadeCss(name: SpinnerName, element: string, count: number, { dim, rest }: {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { l as SpinnerName } from "./motion-D_zUuA3S.js";
|
|
2
|
+
//#region src/fade.d.ts
|
|
3
|
+
export declare function fadeCss(name: SpinnerName, element: string, count: number, { dim, rest }: {
|
|
4
|
+
dim: number;
|
|
5
|
+
rest: number;
|
|
6
6
|
}): string;
|
|
7
|
-
|
|
8
|
-
export { fadeCss };
|
|
7
|
+
//#endregion
|
package/dist/fade.js
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
1
|
+
import { animation, stagger } from "./motion.js";
|
|
2
|
+
//#region src/fade.ts
|
|
3
|
+
function fadeCss(name, element, count, { dim, rest }) {
|
|
4
|
+
return `
|
|
5
|
+
.ld-${name}-${element} {
|
|
6
|
+
${animation(name, `ld-${name}-fade`, "linear")}
|
|
7
|
+
animation-delay: ${stagger(name, count)};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes ld-${name}-fade {
|
|
11
|
+
from {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
to {
|
|
15
|
+
opacity: ${dim};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (prefers-reduced-motion: reduce) {
|
|
20
|
+
.ld-${name}-${element} {
|
|
21
|
+
opacity: ${rest};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { fadeCss };
|
package/dist/flip.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Flip };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/flip.d.ts
|
|
3
|
+
export declare function Flip(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|
package/dist/flip.js
CHANGED
|
@@ -1,8 +1,41 @@
|
|
|
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/flip.tsx
|
|
5
|
+
const css = `
|
|
6
|
+
.ld-flip {
|
|
7
|
+
perspective: calc(${SIZE} * 3);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ld-flip-face {
|
|
11
|
+
width: 64%;
|
|
12
|
+
height: 64%;
|
|
13
|
+
margin: 18%;
|
|
14
|
+
background: currentColor;
|
|
15
|
+
border-radius: calc(${SIZE} * 0.06);
|
|
16
|
+
${animation("flip", "ld-flip-turn", "ease-in-out")}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes ld-flip-turn {
|
|
20
|
+
0% {
|
|
21
|
+
transform: rotateX(0) rotateY(0);
|
|
22
|
+
}
|
|
23
|
+
50% {
|
|
24
|
+
transform: rotateX(-180deg) rotateY(0);
|
|
25
|
+
}
|
|
26
|
+
100% {
|
|
27
|
+
transform: rotateX(-180deg) rotateY(-180deg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
function Flip(props) {
|
|
32
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
|
|
33
|
+
name: "flip",
|
|
34
|
+
children: css
|
|
35
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
36
|
+
...spinnerRoot("flip", props),
|
|
37
|
+
children: /* @__PURE__ */ jsx("div", { className: "ld-flip-face" })
|
|
38
|
+
})] });
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Flip };
|
package/dist/frame.d.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}):
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
style: CSSProperties;
|
|
1
|
+
import { l as SpinnerName } from "./motion-D_zUuA3S.js";
|
|
2
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
3
|
+
import { CSSProperties } from "react";
|
|
4
|
+
//#region src/frame.d.ts
|
|
5
|
+
export declare function SpinnerStyle({ children, name }: {
|
|
6
|
+
children: string;
|
|
7
|
+
name: SpinnerName;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export declare function cssVars(vars: CSSProperties & Record<`--ld-${string}`, number | string>): CSSProperties;
|
|
10
|
+
export declare function step(index: number): CSSProperties;
|
|
11
|
+
export declare function spinnerRoot(name: SpinnerName, { className, color, duration, playState, size }: SpinnerProps): {
|
|
12
|
+
"aria-hidden": boolean;
|
|
13
|
+
className: string;
|
|
14
|
+
style: CSSProperties;
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
export { SpinnerStyle, cssVars, spinnerRoot, step };
|
|
16
|
+
//#endregion
|
package/dist/frame.js
CHANGED
|
@@ -1,13 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
import { DURATION_VAR, PLAY_STATE_VAR, SIZE, SIZE_VAR, STEP_VAR } from "./motion.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/frame.tsx
|
|
4
|
+
function SpinnerStyle({ children, name }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("style", {
|
|
6
|
+
href: `ld-${name}`,
|
|
7
|
+
precedence: "loading-dev",
|
|
8
|
+
children: `
|
|
9
|
+
.ld-${name} {
|
|
10
|
+
width: ${SIZE};
|
|
11
|
+
height: ${SIZE};
|
|
12
|
+
}
|
|
13
|
+
${children}
|
|
14
|
+
@media (prefers-reduced-motion: reduce) {
|
|
15
|
+
.ld-${name},
|
|
16
|
+
.ld-${name} * {
|
|
17
|
+
animation: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function cssVars(vars) {
|
|
24
|
+
return vars;
|
|
25
|
+
}
|
|
26
|
+
function step(index) {
|
|
27
|
+
return cssVars({ [STEP_VAR]: index });
|
|
28
|
+
}
|
|
29
|
+
function spinnerRoot(name, { className, color, duration, playState, size = 20 }) {
|
|
30
|
+
return {
|
|
31
|
+
"aria-hidden": true,
|
|
32
|
+
className: [`ld-${name}`, className].filter(Boolean).join(" "),
|
|
33
|
+
style: cssVars({
|
|
34
|
+
[SIZE_VAR]: `${size}px`,
|
|
35
|
+
...color === void 0 ? null : { color },
|
|
36
|
+
...duration === void 0 ? null : { [DURATION_VAR]: `${duration}ms` },
|
|
37
|
+
...playState === void 0 ? null : { [PLAY_STATE_VAR]: playState }
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { SpinnerStyle, cssVars, spinnerRoot, step };
|
package/dist/gather.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { Gather };
|
|
1
|
+
import { t as SpinnerProps } from "./types-BYaenrWm.js";
|
|
2
|
+
//#region src/gather.d.ts
|
|
3
|
+
export declare function Gather(props: SpinnerProps): import("react").JSX.Element;
|
|
4
|
+
//#endregion
|