loading-dev 0.3.1 → 0.3.4

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 (108) hide show
  1. package/README.md +2 -2
  2. package/dist/arc.d.ts +11 -0
  3. package/dist/arc.js +10 -0
  4. package/dist/atom.d.ts +10 -0
  5. package/dist/atom.js +9 -0
  6. package/dist/blocks.d.ts +11 -0
  7. package/dist/blocks.js +10 -0
  8. package/dist/bouncing-dots.d.ts +6 -0
  9. package/dist/bouncing-dots.js +8 -0
  10. package/dist/cap.d.ts +8 -0
  11. package/dist/cap.js +8 -0
  12. package/dist/cascade.d.ts +9 -0
  13. package/dist/cascade.js +9 -0
  14. package/dist/chunk-5A6DX4J6.js +62 -0
  15. package/dist/chunk-5DLURQGF.js +88 -0
  16. package/dist/chunk-5DS5PSRD.js +124 -0
  17. package/dist/chunk-5LSP7MQQ.js +69 -0
  18. package/dist/chunk-5R75HMWP.js +55 -0
  19. package/dist/chunk-7C6Q6WUN.js +47 -0
  20. package/dist/chunk-A43AJR54.js +79 -0
  21. package/dist/chunk-AHW6IXXT.js +78 -0
  22. package/dist/chunk-AY4VLQBZ.js +57 -0
  23. package/dist/chunk-BMJ3AGRK.js +62 -0
  24. package/dist/chunk-FKUMWHUL.js +71 -0
  25. package/dist/chunk-HDBQBCTN.js +74 -0
  26. package/dist/chunk-I5CFO2M5.js +78 -0
  27. package/dist/chunk-IQ2WQZFY.js +51 -0
  28. package/dist/chunk-IRMB7CHZ.js +88 -0
  29. package/dist/chunk-IWVH2GKE.js +77 -0
  30. package/dist/chunk-IZ4TRHOC.js +68 -0
  31. package/dist/chunk-JNR4T6LZ.js +10 -0
  32. package/dist/chunk-K5XVX5GB.js +60 -0
  33. package/dist/chunk-LIPOYJAI.js +74 -0
  34. package/dist/chunk-MVL7SVAH.js +79 -0
  35. package/dist/chunk-NHN4FV63.js +78 -0
  36. package/dist/chunk-OMNMMKI7.js +64 -0
  37. package/dist/chunk-PBB2PRPT.js +83 -0
  38. package/dist/chunk-RTKHVDCD.js +82 -0
  39. package/dist/chunk-T5EUYN7R.js +77 -0
  40. package/dist/chunk-T7OV7MUW.js +58 -0
  41. package/dist/chunk-TFHDE6YZ.js +92 -0
  42. package/dist/chunk-UWSCBISJ.js +56 -0
  43. package/dist/chunk-VBI53UGV.js +73 -0
  44. package/dist/chunk-VRX5ZYC6.js +41 -0
  45. package/dist/chunk-X7BJQCYL.js +56 -0
  46. package/dist/chunk-Y7QGIWTL.js +57 -0
  47. package/dist/chunk-ZLJYYX76.js +69 -0
  48. package/dist/circular-dots.d.ts +6 -0
  49. package/dist/circular-dots.js +8 -0
  50. package/dist/classic-v2.d.ts +6 -0
  51. package/dist/classic-v2.js +8 -0
  52. package/dist/classic.d.ts +6 -0
  53. package/dist/classic.js +8 -0
  54. package/dist/clock.d.ts +10 -0
  55. package/dist/clock.js +9 -0
  56. package/dist/comet.d.ts +10 -0
  57. package/dist/comet.js +9 -0
  58. package/dist/compass.d.ts +6 -0
  59. package/dist/compass.js +8 -0
  60. package/dist/dual.d.ts +11 -0
  61. package/dist/dual.js +10 -0
  62. package/dist/easing.d.ts +11 -0
  63. package/dist/easing.js +11 -0
  64. package/dist/eclipse.d.ts +6 -0
  65. package/dist/eclipse.js +8 -0
  66. package/dist/flip.d.ts +6 -0
  67. package/dist/flip.js +8 -0
  68. package/dist/frame.d.ts +20 -0
  69. package/dist/frame.js +13 -0
  70. package/dist/gather.d.ts +6 -0
  71. package/dist/gather.js +8 -0
  72. package/dist/index.d.ts +35 -135
  73. package/dist/index.js +126 -891
  74. package/dist/leap.d.ts +6 -0
  75. package/dist/leap.js +8 -0
  76. package/dist/linear-dots.d.ts +6 -0
  77. package/dist/linear-dots.js +8 -0
  78. package/dist/loading.d.ts +6 -0
  79. package/dist/loading.js +8 -0
  80. package/dist/morph.d.ts +6 -0
  81. package/dist/morph.js +8 -0
  82. package/dist/motion.d.ts +44 -0
  83. package/dist/motion.js +26 -0
  84. package/dist/orbit.d.ts +10 -0
  85. package/dist/orbit.js +9 -0
  86. package/dist/pulse.d.ts +6 -0
  87. package/dist/pulse.js +8 -0
  88. package/dist/radar.d.ts +10 -0
  89. package/dist/radar.js +9 -0
  90. package/dist/ring.d.ts +11 -0
  91. package/dist/ring.js +10 -0
  92. package/dist/ripple.d.ts +11 -0
  93. package/dist/ripple.js +10 -0
  94. package/dist/slide.d.ts +6 -0
  95. package/dist/slide.js +8 -0
  96. package/dist/snake.d.ts +11 -0
  97. package/dist/snake.js +10 -0
  98. package/dist/spinners.d.ts +68 -0
  99. package/dist/spinners.js +39 -0
  100. package/dist/swirl.d.ts +6 -0
  101. package/dist/swirl.js +8 -0
  102. package/dist/trace.d.ts +11 -0
  103. package/dist/trace.js +10 -0
  104. package/dist/types.d.ts +23 -0
  105. package/dist/types.js +0 -0
  106. package/dist/wave.d.ts +11 -0
  107. package/dist/wave.js +10 -0
  108. package/package.json +4 -2
package/README.md CHANGED
@@ -12,9 +12,9 @@ import { Arc } from "loading-dev";
12
12
  <Arc size={16} />
13
13
  ```
14
14
 
15
- You can set `size`, `color`, `duration` and `easing`. The library exposes `playState` and also allows you to add custom styling. They work in Server Components and respect reduced motion out of the box. Requires React 19 or later.
15
+ You can set `size`, `color` and `duration`, plus `easing` on the rotating spinners, `cap` on the stroked ones and a prop of its own on a few others. The library exposes `playState` and also allows you to add custom styling. They work in Server Components and respect reduced motion out of the box. Requires React 19 or later.
16
16
 
17
- Available: `Arc`, `BouncingDots`, `CircularDots`, `Classic`, `ClassicV2`, `Clock`, `Comet`, `Compass`, `LinearDots`, `Orbit`, `Pulse`, `Radar`, `Ring`, `Swirl`.
17
+ Available: `Arc`, `Atom`, `Blocks`, `BouncingDots`, `Cascade`, `CircularDots`, `Classic`, `ClassicV2`, `Clock`, `Comet`, `Compass`, `Dual`, `Eclipse`, `Flip`, `Gather`, `Leap`, `LinearDots`, `Loading`, `Morph`, `Orbit`, `Pulse`, `Radar`, `Ring`, `Ripple`, `Slide`, `Snake`, `Swirl`, `Trace`, `Wave`.
18
18
 
19
19
  You can find docs and live previews at [loading.dev](https://loading.dev).
20
20
 
package/dist/arc.d.ts ADDED
@@ -0,0 +1,11 @@
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 ArcProps extends SpinnerProps, EasingProps, CapProps {
8
+ }
9
+ declare function Arc({ cap, easing, ...rest }: ArcProps): react.JSX.Element;
10
+
11
+ export { Arc, type ArcProps };
package/dist/arc.js ADDED
@@ -0,0 +1,10 @@
1
+ import {
2
+ Arc
3
+ } from "./chunk-X7BJQCYL.js";
4
+ import "./chunk-7C6Q6WUN.js";
5
+ import "./chunk-JNR4T6LZ.js";
6
+ import "./chunk-VRX5ZYC6.js";
7
+ import "./chunk-OMNMMKI7.js";
8
+ export {
9
+ Arc
10
+ };
package/dist/atom.d.ts ADDED
@@ -0,0 +1,10 @@
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 AtomProps extends SpinnerProps, EasingProps {
7
+ }
8
+ declare function Atom({ easing, ...rest }: AtomProps): react.JSX.Element;
9
+
10
+ export { Atom, type AtomProps };
package/dist/atom.js ADDED
@@ -0,0 +1,9 @@
1
+ import {
2
+ Atom
3
+ } from "./chunk-5DLURQGF.js";
4
+ import "./chunk-7C6Q6WUN.js";
5
+ import "./chunk-VRX5ZYC6.js";
6
+ import "./chunk-OMNMMKI7.js";
7
+ export {
8
+ Atom
9
+ };
@@ -0,0 +1,11 @@
1
+ import * as react from 'react';
2
+ import { SpinnerProps } from './types.js';
3
+
4
+ type BlocksSweep = "columns" | "diagonal" | "rows";
5
+ declare const DEFAULT_BLOCKS_SWEEP: BlocksSweep;
6
+ interface BlocksProps extends SpinnerProps {
7
+ sweep?: BlocksSweep;
8
+ }
9
+ declare function Blocks({ sweep, ...rest }: BlocksProps): react.JSX.Element;
10
+
11
+ export { Blocks, type BlocksProps, type BlocksSweep, DEFAULT_BLOCKS_SWEEP };
package/dist/blocks.js ADDED
@@ -0,0 +1,10 @@
1
+ import {
2
+ Blocks,
3
+ DEFAULT_BLOCKS_SWEEP
4
+ } from "./chunk-PBB2PRPT.js";
5
+ import "./chunk-VRX5ZYC6.js";
6
+ import "./chunk-OMNMMKI7.js";
7
+ export {
8
+ Blocks,
9
+ DEFAULT_BLOCKS_SWEEP
10
+ };
@@ -0,0 +1,6 @@
1
+ import * as react from 'react';
2
+ import { SpinnerProps } from './types.js';
3
+
4
+ declare function BouncingDots(props: SpinnerProps): react.JSX.Element;
5
+
6
+ export { BouncingDots };
@@ -0,0 +1,8 @@
1
+ import {
2
+ BouncingDots
3
+ } from "./chunk-UWSCBISJ.js";
4
+ import "./chunk-VRX5ZYC6.js";
5
+ import "./chunk-OMNMMKI7.js";
6
+ export {
7
+ BouncingDots
8
+ };
package/dist/cap.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ type Cap = "flat" | "round";
2
+ declare const DEFAULT_CAP: Cap;
3
+ interface CapProps {
4
+ cap?: Cap;
5
+ }
6
+ declare function linecap(cap?: Cap): "butt" | "round";
7
+
8
+ export { type Cap, type CapProps, DEFAULT_CAP, linecap };
package/dist/cap.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ DEFAULT_CAP,
3
+ linecap
4
+ } from "./chunk-JNR4T6LZ.js";
5
+ export {
6
+ DEFAULT_CAP,
7
+ linecap
8
+ };
@@ -0,0 +1,9 @@
1
+ import * as react from 'react';
2
+ import { CapProps } from './cap.js';
3
+ import { SpinnerProps } from './types.js';
4
+
5
+ interface CascadeProps extends SpinnerProps, CapProps {
6
+ }
7
+ declare function Cascade({ cap, ...rest }: CascadeProps): react.JSX.Element;
8
+
9
+ export { Cascade, type CascadeProps };
@@ -0,0 +1,9 @@
1
+ import {
2
+ Cascade
3
+ } from "./chunk-I5CFO2M5.js";
4
+ import "./chunk-JNR4T6LZ.js";
5
+ import "./chunk-VRX5ZYC6.js";
6
+ import "./chunk-OMNMMKI7.js";
7
+ export {
8
+ Cascade
9
+ };
@@ -0,0 +1,62 @@
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
+ };
@@ -0,0 +1,88 @@
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
+ };
@@ -0,0 +1,124 @@
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
+ };
@@ -0,0 +1,69 @@
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
+ };
@@ -0,0 +1,55 @@
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
+ };
@@ -0,0 +1,47 @@
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
+ };
@@ -0,0 +1,79 @@
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
+ };