loading-dev 0.3.5 → 0.3.7

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.
Files changed (129) hide show
  1. package/README.md +9 -1
  2. package/dist/arc.d.ts +5 -11
  3. package/dist/arc.js +30 -10
  4. package/dist/atom.d.ts +4 -10
  5. package/dist/atom.js +69 -9
  6. package/dist/blocks.d.ts +6 -10
  7. package/dist/blocks.js +72 -9
  8. package/dist/bouncing-dots.d.ts +2 -6
  9. package/dist/bouncing-dots.js +44 -8
  10. package/dist/cap-B_Mo1a7N.d.ts +7 -0
  11. package/dist/cap.d.ts +2 -8
  12. package/dist/cap.js +6 -8
  13. package/dist/cascade.d.ts +4 -9
  14. package/dist/cascade.js +49 -9
  15. package/dist/chevrons.d.ts +2 -0
  16. package/dist/chevrons.js +36 -0
  17. package/dist/circular-dots.d.ts +2 -6
  18. package/dist/circular-dots.js +39 -9
  19. package/dist/classic-v2.d.ts +2 -6
  20. package/dist/classic-v2.js +40 -9
  21. package/dist/classic.d.ts +2 -6
  22. package/dist/classic.js +47 -9
  23. package/dist/clock.d.ts +4 -10
  24. package/dist/clock.js +30 -9
  25. package/dist/comet.d.ts +4 -10
  26. package/dist/comet.js +51 -9
  27. package/dist/compass.d.ts +2 -6
  28. package/dist/compass.js +38 -8
  29. package/dist/dual.d.ts +5 -11
  30. package/dist/dual.js +46 -10
  31. package/dist/easing-BM_1QWrA.d.ts +9 -0
  32. package/dist/easing.d.ts +2 -11
  33. package/dist/easing.js +33 -11
  34. package/dist/eclipse.d.ts +2 -6
  35. package/dist/eclipse.js +68 -8
  36. package/dist/fade.d.ts +5 -8
  37. package/dist/fade.js +26 -7
  38. package/dist/fill.d.ts +2 -0
  39. package/dist/fill.js +59 -0
  40. package/dist/flip.d.ts +2 -6
  41. package/dist/flip.js +40 -8
  42. package/dist/frame.d.ts +14 -18
  43. package/dist/frame.js +41 -13
  44. package/dist/gather.d.ts +2 -6
  45. package/dist/gather.js +84 -8
  46. package/dist/index.d.ts +42 -35
  47. package/dist/index.js +41 -146
  48. package/dist/leap.d.ts +2 -6
  49. package/dist/leap.js +66 -8
  50. package/dist/linear-dots.d.ts +2 -6
  51. package/dist/linear-dots.js +53 -8
  52. package/dist/loading.d.ts +2 -6
  53. package/dist/loading.js +63 -9
  54. package/dist/loop.d.ts +5 -0
  55. package/dist/loop.js +37 -0
  56. package/dist/morph.d.ts +2 -6
  57. package/dist/morph.js +39 -8
  58. package/dist/motion-trIEyOxA.d.ts +50 -0
  59. package/dist/motion.d.ts +2 -44
  60. package/dist/motion.js +56 -25
  61. package/dist/orbit.d.ts +4 -10
  62. package/dist/orbit.js +43 -9
  63. package/dist/phases.d.ts +2 -0
  64. package/dist/phases.js +73 -0
  65. package/dist/pulse.d.ts +2 -6
  66. package/dist/pulse.js +51 -8
  67. package/dist/radar.d.ts +4 -10
  68. package/dist/radar.js +63 -9
  69. package/dist/ring.d.ts +5 -11
  70. package/dist/ring.js +37 -10
  71. package/dist/ripple.d.ts +6 -10
  72. package/dist/ripple.js +56 -10
  73. package/dist/scan.d.ts +2 -0
  74. package/dist/scan.js +56 -0
  75. package/dist/slide.d.ts +2 -6
  76. package/dist/slide.js +73 -8
  77. package/dist/snake.d.ts +5 -11
  78. package/dist/snake.js +58 -10
  79. package/dist/spinners.d.ts +74 -68
  80. package/dist/spinners.js +75 -39
  81. package/dist/split.d.ts +2 -0
  82. package/dist/split.js +52 -0
  83. package/dist/steps.d.ts +2 -0
  84. package/dist/steps.js +55 -0
  85. package/dist/swirl.d.ts +2 -6
  86. package/dist/swirl.js +49 -9
  87. package/dist/trace.d.ts +5 -11
  88. package/dist/trace.js +44 -9
  89. package/dist/types-D9_cXnjI.d.ts +8 -0
  90. package/dist/types.d.ts +2 -9
  91. package/dist/types.js +1 -0
  92. package/dist/wave.d.ts +6 -10
  93. package/dist/wave.js +55 -10
  94. package/package.json +14 -14
  95. package/dist/chunk-2LMGBBRJ.js +0 -77
  96. package/dist/chunk-2OX27TAE.js +0 -69
  97. package/dist/chunk-2TYML5J2.js +0 -51
  98. package/dist/chunk-3WMZVDPS.js +0 -61
  99. package/dist/chunk-4O4ADYWE.js +0 -73
  100. package/dist/chunk-5UAEBEER.js +0 -78
  101. package/dist/chunk-A2PZBHTA.js +0 -41
  102. package/dist/chunk-BAVSTTWG.js +0 -88
  103. package/dist/chunk-BCIAMPLU.js +0 -87
  104. package/dist/chunk-DKYEZLIN.js +0 -72
  105. package/dist/chunk-FQ2U2M7F.js +0 -76
  106. package/dist/chunk-FWH6VWVK.js +0 -59
  107. package/dist/chunk-HL7TIIDB.js +0 -124
  108. package/dist/chunk-IJJULNRU.js +0 -53
  109. package/dist/chunk-JKLL7YYG.js +0 -85
  110. package/dist/chunk-JNR4T6LZ.js +0 -10
  111. package/dist/chunk-JQNF5GYA.js +0 -52
  112. package/dist/chunk-KAZ5BTXC.js +0 -74
  113. package/dist/chunk-KOYM24WV.js +0 -72
  114. package/dist/chunk-L2DUMHO4.js +0 -69
  115. package/dist/chunk-LDXBT62V.js +0 -57
  116. package/dist/chunk-MAKBZTL3.js +0 -56
  117. package/dist/chunk-OMNMMKI7.js +0 -64
  118. package/dist/chunk-P4BSSDSY.js +0 -51
  119. package/dist/chunk-PM6DU637.js +0 -70
  120. package/dist/chunk-PVVWLDIS.js +0 -33
  121. package/dist/chunk-R5ZDKN3Z.js +0 -59
  122. package/dist/chunk-RAHAQ7XK.js +0 -61
  123. package/dist/chunk-SUUR5WMA.js +0 -46
  124. package/dist/chunk-UAO52LUL.js +0 -48
  125. package/dist/chunk-ULWRXY3A.js +0 -50
  126. package/dist/chunk-UOXB5QOZ.js +0 -81
  127. package/dist/chunk-UXTZTFNZ.js +0 -62
  128. package/dist/chunk-VZX7APSS.js +0 -82
  129. package/dist/chunk-YIB63EKJ.js +0 -49
package/dist/classic.js CHANGED
@@ -1,9 +1,47 @@
1
- import {
2
- Classic
3
- } from "./chunk-IJJULNRU.js";
4
- import "./chunk-PVVWLDIS.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Classic
9
- };
1
+ import { SIZE, STEP_VAR } 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
+ // src/classic.tsx
6
+ const BARS = Array.from({ length: 12 }, (_, index) => index);
7
+ const css = `
8
+ .ld-classic-inner {
9
+ position: relative;
10
+ top: 50%;
11
+ left: 50%;
12
+ width: ${SIZE};
13
+ height: ${SIZE};
14
+ }
15
+
16
+ .ld-classic-bar {
17
+ position: absolute;
18
+ top: -3.9%;
19
+ left: -10%;
20
+ width: 24%;
21
+ height: 8%;
22
+ background: currentColor;
23
+ border-radius: 6px;
24
+ transform: rotate(calc(var(${STEP_VAR}) * 30deg)) translate(146%);
25
+ }
26
+
27
+ ${fadeCss("classic", "bar", BARS.length, {
28
+ dim: .15,
29
+ rest: .5
30
+ })}
31
+ `;
32
+ function Classic(props) {
33
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
34
+ name: "classic",
35
+ children: css
36
+ }), /* @__PURE__ */ jsx("div", {
37
+ ...spinnerRoot("classic", props),
38
+ children: /* @__PURE__ */ jsx("div", {
39
+ className: "ld-classic-inner",
40
+ children: BARS.map((bar) => /* @__PURE__ */ jsx("div", {
41
+ className: "ld-classic-bar",
42
+ style: step(bar)
43
+ }, bar))
44
+ })
45
+ })] });
46
+ }
47
+ export { Classic };
package/dist/clock.d.ts CHANGED
@@ -1,10 +1,4 @@
1
- import * as react from 'react';
2
- import { EasingProps } from './easing.js';
3
- import { SpinnerProps } from './types.js';
4
- import './motion.js';
5
-
6
- interface ClockProps extends SpinnerProps, EasingProps {
7
- }
8
- declare function Clock({ easing, ...rest }: ClockProps): react.JSX.Element;
9
-
10
- export { Clock, type ClockProps };
1
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
2
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
3
+ export interface ClockProps extends SpinnerProps, EasingProps {}
4
+ export declare function Clock({ easing, ...rest }: ClockProps): import("react").JSX.Element;
package/dist/clock.js CHANGED
@@ -1,9 +1,30 @@
1
- import {
2
- Clock
3
- } from "./chunk-2TYML5J2.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Clock
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
+ // 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
+ export { Clock };
package/dist/comet.d.ts CHANGED
@@ -1,10 +1,4 @@
1
- import * as react from 'react';
2
- import { EasingProps } from './easing.js';
3
- import { SpinnerProps } from './types.js';
4
- import './motion.js';
5
-
6
- interface CometProps extends SpinnerProps, EasingProps {
7
- }
8
- declare function Comet({ easing, ...rest }: CometProps): react.JSX.Element;
9
-
10
- export { Comet, type CometProps };
1
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
2
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
3
+ export interface CometProps extends SpinnerProps, EasingProps {}
4
+ export declare function Comet({ easing, ...rest }: CometProps): import("react").JSX.Element;
package/dist/comet.js CHANGED
@@ -1,9 +1,51 @@
1
- import {
2
- Comet
3
- } from "./chunk-UXTZTFNZ.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-UAO52LUL.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- Comet
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
+ // 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
+ export { Comet };
package/dist/compass.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Compass(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Compass };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Compass(props: SpinnerProps): import("react").JSX.Element;
package/dist/compass.js CHANGED
@@ -1,8 +1,38 @@
1
- import {
2
- Compass
3
- } from "./chunk-JQNF5GYA.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Compass
8
- };
1
+ import { animation } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // 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
+ export { Compass };
package/dist/dual.d.ts CHANGED
@@ -1,11 +1,5 @@
1
- import * as react from 'react';
2
- import { CapProps } from './cap.js';
3
- import { EasingProps } from './easing.js';
4
- import { SpinnerProps } from './types.js';
5
- import './motion.js';
6
-
7
- interface DualProps extends SpinnerProps, EasingProps, CapProps {
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-B_Mo1a7N.js";
2
+ import { r as EasingProps } from "./easing-BM_1QWrA.js";
3
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
4
+ export interface DualProps extends SpinnerProps, EasingProps, CapProps {}
5
+ export declare function Dual({ cap, easing, ...rest }: DualProps): import("react").JSX.Element;
package/dist/dual.js CHANGED
@@ -1,10 +1,46 @@
1
- import {
2
- Dual
3
- } from "./chunk-5UAEBEER.js";
4
- import "./chunk-A2PZBHTA.js";
5
- import "./chunk-JNR4T6LZ.js";
6
- import "./chunk-UAO52LUL.js";
7
- import "./chunk-OMNMMKI7.js";
8
- export {
9
- Dual
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
+ // 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
+ export { Dual };
@@ -0,0 +1,9 @@
1
+ import { l as SpinnerName } from "./motion-trIEyOxA.js";
2
+ type Easing = "linear" | "ease-in-out" | "stacked";
3
+ declare const DEFAULT_EASING: Easing;
4
+ interface EasingProps {
5
+ easing?: Easing;
6
+ }
7
+ declare function spinClass(name: SpinnerName, easing?: Easing): string;
8
+ declare function rotationCss(name: SpinnerName, turn?: string): string;
9
+ 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 { SpinnerName } from './motion.js';
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-BM_1QWrA.js";
2
+ export { DEFAULT_EASING, Easing, EasingProps, rotationCss, spinClass };
package/dist/easing.js CHANGED
@@ -1,11 +1,33 @@
1
- import {
2
- DEFAULT_EASING,
3
- rotationCss,
4
- spinClass
5
- } from "./chunk-A2PZBHTA.js";
6
- import "./chunk-OMNMMKI7.js";
7
- export {
8
- DEFAULT_EASING,
9
- rotationCss,
10
- spinClass
11
- };
1
+ import { animation } from "./motion.js";
2
+ // 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
+ export { DEFAULT_EASING, rotationCss, spinClass };
package/dist/eclipse.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Eclipse(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Eclipse };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Eclipse(props: SpinnerProps): import("react").JSX.Element;
package/dist/eclipse.js CHANGED
@@ -1,8 +1,68 @@
1
- import {
2
- Eclipse
3
- } from "./chunk-2LMGBBRJ.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Eclipse
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
+ // 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
+ export { Eclipse };
package/dist/fade.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- import { SpinnerName } from './motion.js';
2
-
3
- declare function fadeCss(name: SpinnerName, element: string, count: number, { dim, rest }: {
4
- dim: number;
5
- rest: number;
6
- }): string;
7
-
8
- export { fadeCss };
1
+ import { l as SpinnerName } from "./motion-trIEyOxA.js";
2
+ export declare function fadeCss(name: SpinnerName, element: string, count: number, { dim, rest }: {
3
+ dim: number;
4
+ rest: number;
5
+ }): string;
package/dist/fade.js CHANGED
@@ -1,7 +1,26 @@
1
- import {
2
- fadeCss
3
- } from "./chunk-PVVWLDIS.js";
4
- import "./chunk-OMNMMKI7.js";
5
- export {
6
- fadeCss
7
- };
1
+ import { animation, stagger } from "./motion.js";
2
+ // 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
+ export { fadeCss };
package/dist/fill.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Fill(props: SpinnerProps): import("react").JSX.Element;
package/dist/fill.js ADDED
@@ -0,0 +1,59 @@
1
+ import { animation } from "./motion.js";
2
+ import { SpinnerStyle, spinnerRoot } from "./frame.js";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ // src/fill.tsx
5
+ const LENGTH = 100;
6
+ const css = `
7
+ .ld-fill-pie {
8
+ ${animation("fill", "ld-fill-sweep", "cubic-bezier(0.65, 0, 0.35, 1)")}
9
+ }
10
+
11
+ @keyframes ld-fill-sweep {
12
+ 0% {
13
+ stroke-dasharray: 0 ${LENGTH};
14
+ stroke-dashoffset: 0;
15
+ }
16
+ 50% {
17
+ stroke-dasharray: ${LENGTH} ${LENGTH};
18
+ stroke-dashoffset: 0;
19
+ }
20
+ 100% {
21
+ stroke-dasharray: ${LENGTH} ${LENGTH};
22
+ stroke-dashoffset: -100;
23
+ }
24
+ }
25
+
26
+ @media (prefers-reduced-motion: reduce) {
27
+ .ld-fill-pie {
28
+ stroke-dasharray: ${LENGTH / 4} ${LENGTH};
29
+ }
30
+ }
31
+ `;
32
+ function Fill(props) {
33
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerStyle, {
34
+ name: "fill",
35
+ children: css
36
+ }), /* @__PURE__ */ jsxs("svg", {
37
+ ...spinnerRoot("fill", props),
38
+ fill: "none",
39
+ role: "presentation",
40
+ stroke: "currentColor",
41
+ viewBox: "0 0 24 24",
42
+ children: [/* @__PURE__ */ jsx("circle", {
43
+ cx: "12",
44
+ cy: "12",
45
+ opacity: "0.2",
46
+ r: "10.25",
47
+ strokeWidth: "2.5"
48
+ }), /* @__PURE__ */ jsx("circle", {
49
+ className: "ld-fill-pie",
50
+ cx: "12",
51
+ cy: "12",
52
+ pathLength: LENGTH,
53
+ r: "3.75",
54
+ strokeWidth: "7.5",
55
+ transform: "rotate(-90 12 12)"
56
+ })]
57
+ })] });
58
+ }
59
+ export { Fill };
package/dist/flip.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import * as react from 'react';
2
- import { SpinnerProps } from './types.js';
3
-
4
- declare function Flip(props: SpinnerProps): react.JSX.Element;
5
-
6
- export { Flip };
1
+ import { t as SpinnerProps } from "./types-D9_cXnjI.js";
2
+ export declare function Flip(props: SpinnerProps): import("react").JSX.Element;
package/dist/flip.js CHANGED
@@ -1,8 +1,40 @@
1
- import {
2
- Flip
3
- } from "./chunk-YIB63EKJ.js";
4
- import "./chunk-UAO52LUL.js";
5
- import "./chunk-OMNMMKI7.js";
6
- export {
7
- Flip
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
+ // 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
+ export { Flip };