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.
Files changed (114) hide show
  1. package/dist/arc.d.ts +7 -11
  2. package/dist/arc.js +31 -10
  3. package/dist/atom.d.ts +6 -10
  4. package/dist/atom.js +70 -9
  5. package/dist/blocks.d.ts +8 -10
  6. package/dist/blocks.js +73 -9
  7. package/dist/bouncing-dots.d.ts +4 -6
  8. package/dist/bouncing-dots.js +45 -8
  9. package/dist/cap-Ba3uZx03.d.ts +9 -0
  10. package/dist/cap.d.ts +2 -8
  11. package/dist/cap.js +7 -8
  12. package/dist/cascade.d.ts +6 -9
  13. package/dist/cascade.js +50 -9
  14. package/dist/circular-dots.d.ts +4 -6
  15. package/dist/circular-dots.js +40 -9
  16. package/dist/classic-v2.d.ts +4 -6
  17. package/dist/classic-v2.js +41 -9
  18. package/dist/classic.d.ts +4 -6
  19. package/dist/classic.js +48 -9
  20. package/dist/clock.d.ts +6 -10
  21. package/dist/clock.js +31 -9
  22. package/dist/comet.d.ts +6 -10
  23. package/dist/comet.js +52 -9
  24. package/dist/compass.d.ts +4 -6
  25. package/dist/compass.js +39 -8
  26. package/dist/dual.d.ts +7 -11
  27. package/dist/dual.js +47 -10
  28. package/dist/easing-DhnLArHS.d.ts +11 -0
  29. package/dist/easing.d.ts +2 -11
  30. package/dist/easing.js +34 -11
  31. package/dist/eclipse.d.ts +4 -6
  32. package/dist/eclipse.js +69 -8
  33. package/dist/fade.d.ts +6 -7
  34. package/dist/fade.js +27 -7
  35. package/dist/flip.d.ts +4 -6
  36. package/dist/flip.js +41 -8
  37. package/dist/frame.d.ts +15 -17
  38. package/dist/frame.js +42 -13
  39. package/dist/gather.d.ts +4 -6
  40. package/dist/gather.js +85 -8
  41. package/dist/index.d.ts +35 -35
  42. package/dist/index.js +34 -146
  43. package/dist/leap.d.ts +4 -6
  44. package/dist/leap.js +67 -8
  45. package/dist/linear-dots.d.ts +4 -6
  46. package/dist/linear-dots.js +54 -8
  47. package/dist/loading.d.ts +4 -6
  48. package/dist/loading.js +64 -9
  49. package/dist/morph.d.ts +4 -6
  50. package/dist/morph.js +40 -8
  51. package/dist/motion-D_zUuA3S.d.ts +45 -0
  52. package/dist/motion.d.ts +2 -44
  53. package/dist/motion.js +50 -25
  54. package/dist/orbit.d.ts +6 -10
  55. package/dist/orbit.js +44 -9
  56. package/dist/pulse.d.ts +4 -6
  57. package/dist/pulse.js +52 -8
  58. package/dist/radar.d.ts +6 -10
  59. package/dist/radar.js +64 -9
  60. package/dist/ring.d.ts +7 -11
  61. package/dist/ring.js +38 -10
  62. package/dist/ripple.d.ts +8 -10
  63. package/dist/ripple.js +57 -10
  64. package/dist/slide.d.ts +4 -6
  65. package/dist/slide.js +74 -8
  66. package/dist/snake.d.ts +7 -11
  67. package/dist/snake.js +59 -10
  68. package/dist/spinners.d.ts +61 -67
  69. package/dist/spinners.js +62 -39
  70. package/dist/swirl.d.ts +4 -6
  71. package/dist/swirl.js +50 -9
  72. package/dist/trace.d.ts +7 -11
  73. package/dist/trace.js +45 -9
  74. package/dist/types-BYaenrWm.d.ts +10 -0
  75. package/dist/types.d.ts +2 -9
  76. package/dist/types.js +1 -0
  77. package/dist/wave.d.ts +8 -10
  78. package/dist/wave.js +56 -10
  79. package/package.json +14 -14
  80. package/dist/chunk-2LMGBBRJ.js +0 -77
  81. package/dist/chunk-2OX27TAE.js +0 -69
  82. package/dist/chunk-2TYML5J2.js +0 -51
  83. package/dist/chunk-3WMZVDPS.js +0 -61
  84. package/dist/chunk-4O4ADYWE.js +0 -73
  85. package/dist/chunk-5UAEBEER.js +0 -78
  86. package/dist/chunk-A2PZBHTA.js +0 -41
  87. package/dist/chunk-BAVSTTWG.js +0 -88
  88. package/dist/chunk-BCIAMPLU.js +0 -87
  89. package/dist/chunk-DKYEZLIN.js +0 -72
  90. package/dist/chunk-FQ2U2M7F.js +0 -76
  91. package/dist/chunk-FWH6VWVK.js +0 -59
  92. package/dist/chunk-HL7TIIDB.js +0 -124
  93. package/dist/chunk-IJJULNRU.js +0 -53
  94. package/dist/chunk-JKLL7YYG.js +0 -85
  95. package/dist/chunk-JNR4T6LZ.js +0 -10
  96. package/dist/chunk-JQNF5GYA.js +0 -52
  97. package/dist/chunk-KAZ5BTXC.js +0 -74
  98. package/dist/chunk-KOYM24WV.js +0 -72
  99. package/dist/chunk-L2DUMHO4.js +0 -69
  100. package/dist/chunk-LDXBT62V.js +0 -57
  101. package/dist/chunk-MAKBZTL3.js +0 -56
  102. package/dist/chunk-OMNMMKI7.js +0 -64
  103. package/dist/chunk-P4BSSDSY.js +0 -51
  104. package/dist/chunk-PM6DU637.js +0 -70
  105. package/dist/chunk-PVVWLDIS.js +0 -33
  106. package/dist/chunk-R5ZDKN3Z.js +0 -59
  107. package/dist/chunk-RAHAQ7XK.js +0 -61
  108. package/dist/chunk-SUUR5WMA.js +0 -46
  109. package/dist/chunk-UAO52LUL.js +0 -48
  110. package/dist/chunk-ULWRXY3A.js +0 -50
  111. package/dist/chunk-UOXB5QOZ.js +0 -81
  112. package/dist/chunk-UXTZTFNZ.js +0 -62
  113. package/dist/chunk-VZX7APSS.js +0 -82
  114. package/dist/chunk-YIB63EKJ.js +0 -49
@@ -1,77 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot,
4
- step
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- STEP_VAR,
9
- animation,
10
- stagger
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/eclipse.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DOTS = [0, 1];
16
- var css = `
17
- .ld-eclipse {
18
- position: relative;
19
- width: ${SIZE};
20
- height: ${SIZE};
21
- }
22
-
23
- .ld-eclipse-dot {
24
- position: absolute;
25
- top: 30%;
26
- left: 30%;
27
- width: 40%;
28
- height: 40%;
29
- background: currentColor;
30
- border-radius: 50%;
31
- ${animation("eclipse", ["ld-eclipse-slide", "ld-eclipse-depth"], "ease-in-out")}
32
- animation-delay: ${stagger("eclipse", DOTS.length)};
33
- }
34
-
35
- @keyframes ld-eclipse-slide {
36
- 0%,
37
- 100% {
38
- translate: 75% 0;
39
- }
40
- 50% {
41
- translate: -75% 0;
42
- }
43
- }
44
-
45
- @keyframes ld-eclipse-depth {
46
- 0%,
47
- 50%,
48
- 100% {
49
- opacity: 0.75;
50
- scale: 1;
51
- }
52
- 25% {
53
- opacity: 1;
54
- scale: 1.3;
55
- }
56
- 75% {
57
- opacity: 0.5;
58
- scale: 0.7;
59
- }
60
- }
61
-
62
- @media (prefers-reduced-motion: reduce) {
63
- .ld-eclipse-dot {
64
- translate: calc(var(${STEP_VAR}) * 150% - 75%) 0;
65
- }
66
- }
67
- `;
68
- function Eclipse(props) {
69
- return /* @__PURE__ */ jsxs(Fragment, { children: [
70
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "eclipse", children: css }),
71
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("eclipse", props), children: DOTS.map((index) => /* @__PURE__ */ jsx("div", { className: "ld-eclipse-dot", style: step(index) }, index)) })
72
- ] });
73
- }
74
-
75
- export {
76
- Eclipse
77
- };
@@ -1,69 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- SpinnerStyle,
7
- spinnerRoot
8
- } from "./chunk-UAO52LUL.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
- };
@@ -1,51 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- SpinnerStyle,
7
- spinnerRoot
8
- } from "./chunk-UAO52LUL.js";
9
- import {
10
- SIZE
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/clock.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var css = `
16
- .ld-clock {
17
- width: ${SIZE};
18
- height: ${SIZE};
19
- }
20
-
21
- ${rotationCss("clock")}
22
- `;
23
- function Clock({ easing, ...rest }) {
24
- return /* @__PURE__ */ jsxs(Fragment, { children: [
25
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "clock", children: css }),
26
- /* @__PURE__ */ jsxs(
27
- "svg",
28
- {
29
- ...spinnerRoot("clock", rest),
30
- fill: "none",
31
- role: "presentation",
32
- viewBox: "0 0 16 16",
33
- children: [
34
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", fill: "currentColor", opacity: "0.1", r: "8" }),
35
- /* @__PURE__ */ jsx(
36
- "path",
37
- {
38
- className: spinClass("clock", easing),
39
- 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",
40
- fill: "currentColor"
41
- }
42
- )
43
- ]
44
- }
45
- )
46
- ] });
47
- }
48
-
49
- export {
50
- Clock
51
- };
@@ -1,61 +0,0 @@
1
- import {
2
- fadeCss
3
- } from "./chunk-PVVWLDIS.js";
4
- import {
5
- SpinnerStyle,
6
- spinnerRoot,
7
- step
8
- } from "./chunk-UAO52LUL.js";
9
- import {
10
- SIZE
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/circular-dots.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DOTS = [
16
- [8, 1.5],
17
- [12.5962, 3.4038],
18
- [14.5, 8],
19
- [12.5962, 12.5962],
20
- [8, 14.5],
21
- [3.4038, 12.5962],
22
- [1.5, 8],
23
- [3.4038, 3.4038]
24
- ];
25
- var css = `
26
- .ld-circular-dots {
27
- width: ${SIZE};
28
- height: ${SIZE};
29
- }
30
-
31
- ${fadeCss("circular-dots", "dot", DOTS.length, { dim: 0.2, rest: 0.6 })}
32
- `;
33
- function CircularDots(props) {
34
- return /* @__PURE__ */ jsxs(Fragment, { children: [
35
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "circular-dots", children: css }),
36
- /* @__PURE__ */ jsx(
37
- "svg",
38
- {
39
- ...spinnerRoot("circular-dots", props),
40
- fill: "currentColor",
41
- role: "presentation",
42
- viewBox: "0 0 16 16",
43
- children: DOTS.map(([cx, cy], index) => /* @__PURE__ */ jsx(
44
- "circle",
45
- {
46
- className: "ld-circular-dots-dot",
47
- cx,
48
- cy,
49
- r: "1.5",
50
- style: step(index)
51
- },
52
- `${cx}-${cy}`
53
- ))
54
- }
55
- )
56
- ] });
57
- }
58
-
59
- export {
60
- CircularDots
61
- };
@@ -1,73 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot,
4
- step
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- STEP_VAR,
9
- animation,
10
- stagger
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/leap.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DOTS = Array.from({ length: 3 }, (_, index) => index);
16
- var css = `
17
- .ld-leap {
18
- --ld-leap-dot: round(calc(${SIZE} * 0.22), 1px);
19
- --ld-leap-gap: round(down, calc((${SIZE} - var(--ld-leap-dot)) / 2), 1px);
20
- position: relative;
21
- width: ${SIZE};
22
- height: ${SIZE};
23
- }
24
-
25
- .ld-leap-wrapper {
26
- position: absolute;
27
- top: round(calc((${SIZE} - var(--ld-leap-dot)) / 2), 1px);
28
- left: calc(${SIZE} - var(--ld-leap-dot) - var(--ld-leap-gap) * 2);
29
- width: calc(var(--ld-leap-gap) * 2 + var(--ld-leap-dot));
30
- height: var(--ld-leap-dot);
31
- ${animation("leap", "ld-leap-hop", "ease-in-out")}
32
- animation-delay: ${stagger("leap", DOTS.length)};
33
- }
34
-
35
- .ld-leap-dot {
36
- position: absolute;
37
- inset: 0 auto 0 0;
38
- width: var(--ld-leap-dot);
39
- background: currentColor;
40
- border-radius: 50%;
41
- }
42
-
43
- @keyframes ld-leap-hop {
44
- 0% {
45
- transform: translateX(0) rotate(0);
46
- }
47
- 33.33% {
48
- transform: translateX(0) rotate(180deg);
49
- }
50
- 66.66% {
51
- transform: translateX(calc(var(--ld-leap-gap) * -1)) rotate(180deg);
52
- }
53
- 100% {
54
- transform: translateX(calc(var(--ld-leap-gap) * -2)) rotate(180deg);
55
- }
56
- }
57
-
58
- @media (prefers-reduced-motion: reduce) {
59
- .ld-leap-wrapper {
60
- transform: translateX(calc(var(${STEP_VAR}) * var(--ld-leap-gap)));
61
- }
62
- }
63
- `;
64
- function Leap(props) {
65
- return /* @__PURE__ */ jsxs(Fragment, { children: [
66
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "leap", children: css }),
67
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("leap", props), children: DOTS.map((index) => /* @__PURE__ */ jsx("div", { className: "ld-leap-wrapper", style: step(index), children: /* @__PURE__ */ jsx("div", { className: "ld-leap-dot" }) }, index)) })
68
- ] });
69
- }
70
-
71
- export {
72
- Leap
73
- };
@@ -1,78 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- linecap
7
- } from "./chunk-JNR4T6LZ.js";
8
- import {
9
- SpinnerStyle,
10
- spinnerRoot
11
- } from "./chunk-UAO52LUL.js";
12
- import {
13
- SIZE
14
- } from "./chunk-OMNMMKI7.js";
15
-
16
- // src/dual.tsx
17
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
- var css = `
19
- .ld-dual {
20
- width: ${SIZE};
21
- height: ${SIZE};
22
- }
23
-
24
- ${rotationCss("dual")}
25
-
26
- .ld-dual-inner {
27
- animation-direction: reverse;
28
- }
29
-
30
- @media (prefers-reduced-motion: reduce) {
31
- .ld-dual-inner {
32
- transform: rotate(180deg);
33
- }
34
- }
35
- `;
36
- function Dual({ cap, easing, ...rest }) {
37
- return /* @__PURE__ */ jsxs(Fragment, { children: [
38
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "dual", children: css }),
39
- /* @__PURE__ */ jsxs(
40
- "svg",
41
- {
42
- ...spinnerRoot("dual", rest),
43
- fill: "none",
44
- role: "presentation",
45
- stroke: "currentColor",
46
- strokeLinecap: linecap(cap),
47
- strokeWidth: "2.5",
48
- viewBox: "0 0 24 24",
49
- children: [
50
- /* @__PURE__ */ jsx(
51
- "circle",
52
- {
53
- className: spinClass("dual", easing),
54
- cx: "12",
55
- cy: "12",
56
- r: "10",
57
- strokeDasharray: "18 44.8"
58
- }
59
- ),
60
- /* @__PURE__ */ jsx(
61
- "circle",
62
- {
63
- className: `ld-dual-inner ${spinClass("dual", easing)}`,
64
- cx: "12",
65
- cy: "12",
66
- r: "5.5",
67
- strokeDasharray: "10 24.6"
68
- }
69
- )
70
- ]
71
- }
72
- )
73
- ] });
74
- }
75
-
76
- export {
77
- Dual
78
- };
@@ -1,41 +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
- }
36
-
37
- export {
38
- DEFAULT_EASING,
39
- spinClass,
40
- rotationCss
41
- };
@@ -1,88 +0,0 @@
1
- import {
2
- rotationCss,
3
- spinClass
4
- } from "./chunk-A2PZBHTA.js";
5
- import {
6
- SpinnerStyle,
7
- cssVars,
8
- spinnerRoot,
9
- step
10
- } from "./chunk-UAO52LUL.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
- };
@@ -1,87 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- cssVars,
4
- spinnerRoot,
5
- step
6
- } from "./chunk-UAO52LUL.js";
7
- import {
8
- SIZE,
9
- animation,
10
- stagger
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/slide.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DOT = 34;
16
- var GAP = 20;
17
- var MARGIN = (100 - 2 * DOT - GAP) / 2;
18
- var FAR = `${((DOT + GAP) / DOT * 100).toFixed(1)}%`;
19
- var RESTS = [
20
- `translate(${FAR}, 0)`,
21
- "translate(0, 0)",
22
- `translate(0, ${FAR})`
23
- ];
24
- var css = `
25
- .ld-slide {
26
- position: relative;
27
- width: ${SIZE};
28
- height: ${SIZE};
29
- }
30
-
31
- .ld-slide-dot {
32
- position: absolute;
33
- top: ${MARGIN}%;
34
- left: ${MARGIN}%;
35
- width: ${DOT}%;
36
- height: ${DOT}%;
37
- background: currentColor;
38
- border-radius: 50%;
39
- ${animation("slide", "ld-slide-walk", "ease-in-out")}
40
- animation-delay: ${stagger("slide", RESTS.length)};
41
- }
42
-
43
- @keyframes ld-slide-walk {
44
- 0% {
45
- transform: translate(${FAR}, 0);
46
- }
47
- 8.33%,
48
- 25% {
49
- transform: translate(${FAR}, ${FAR});
50
- }
51
- 33.33%,
52
- 50% {
53
- transform: translate(0, ${FAR});
54
- }
55
- 58.33%,
56
- 75% {
57
- transform: translate(0, 0);
58
- }
59
- 83.33%,
60
- 100% {
61
- transform: translate(${FAR}, 0);
62
- }
63
- }
64
-
65
- @media (prefers-reduced-motion: reduce) {
66
- .ld-slide-dot {
67
- transform: var(--ld-slide-rest);
68
- }
69
- }
70
- `;
71
- function Slide(props) {
72
- return /* @__PURE__ */ jsxs(Fragment, { children: [
73
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "slide", children: css }),
74
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("slide", props), children: RESTS.map((rest, index) => /* @__PURE__ */ jsx(
75
- "div",
76
- {
77
- className: "ld-slide-dot",
78
- style: cssVars({ ...step(index), "--ld-slide-rest": rest })
79
- },
80
- rest
81
- )) })
82
- ] });
83
- }
84
-
85
- export {
86
- Slide
87
- };
@@ -1,72 +0,0 @@
1
- import {
2
- SpinnerStyle,
3
- spinnerRoot,
4
- step
5
- } from "./chunk-UAO52LUL.js";
6
- import {
7
- SIZE,
8
- STEP_VAR,
9
- animation,
10
- stagger
11
- } from "./chunk-OMNMMKI7.js";
12
-
13
- // src/wave.tsx
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
- var DEFAULT_WAVE_ORIGIN = "center";
16
- var BARS = Array.from({ length: 5 }, (_, index) => index);
17
- var css = `
18
- .ld-wave {
19
- display: flex;
20
- align-items: center;
21
- justify-content: space-between;
22
- width: ${SIZE};
23
- height: ${SIZE};
24
- }
25
-
26
- .ld-wave-bar {
27
- width: calc(${SIZE} * 0.12);
28
- height: 100%;
29
- background: currentColor;
30
- border-radius: 9999px;
31
- ${animation("wave", "ld-wave-rise", "ease-in-out")}
32
- animation-delay: ${stagger("wave", BARS.length)};
33
- }
34
-
35
- .ld-wave-bar-bottom {
36
- align-self: flex-end;
37
- }
38
-
39
- @keyframes ld-wave-rise {
40
- 0%,
41
- 100% {
42
- height: 30%;
43
- }
44
- 50% {
45
- height: 100%;
46
- }
47
- }
48
-
49
- @media (prefers-reduced-motion: reduce) {
50
- .ld-wave-bar {
51
- height: calc((0.4 + var(${STEP_VAR}) * 0.15) * 100%);
52
- }
53
- }
54
- `;
55
- function Wave({ origin = DEFAULT_WAVE_ORIGIN, ...rest }) {
56
- return /* @__PURE__ */ jsxs(Fragment, { children: [
57
- /* @__PURE__ */ jsx(SpinnerStyle, { name: "wave", children: css }),
58
- /* @__PURE__ */ jsx("div", { ...spinnerRoot("wave", rest), children: BARS.map((index) => /* @__PURE__ */ jsx(
59
- "div",
60
- {
61
- className: `ld-wave-bar ld-wave-bar-${origin}`,
62
- style: step(index)
63
- },
64
- index
65
- )) })
66
- ] });
67
- }
68
-
69
- export {
70
- DEFAULT_WAVE_ORIGIN,
71
- Wave
72
- };