premium-react-loaders 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -3
- package/dist/components/3d/CubeSpinner.d.ts +21 -0
- package/dist/components/3d/CubeSpinner.d.ts.map +1 -0
- package/dist/components/3d/FlipCard.d.ts +21 -0
- package/dist/components/3d/FlipCard.d.ts.map +1 -0
- package/dist/components/3d/Helix.d.ts +23 -0
- package/dist/components/3d/Helix.d.ts.map +1 -0
- package/dist/components/3d/PerspectiveRing.d.ts +21 -0
- package/dist/components/3d/PerspectiveRing.d.ts.map +1 -0
- package/dist/components/3d/PlaneRotate.d.ts +21 -0
- package/dist/components/3d/PlaneRotate.d.ts.map +1 -0
- package/dist/components/3d/index.d.ts +6 -0
- package/dist/components/3d/index.d.ts.map +1 -0
- package/dist/components/accessibility/LiveRegion.d.ts +34 -0
- package/dist/components/accessibility/LiveRegion.d.ts.map +1 -0
- package/dist/components/accessibility/index.d.ts +2 -0
- package/dist/components/accessibility/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/skeleton/DataTableSkeleton.d.ts +25 -0
- package/dist/components/skeleton/DataTableSkeleton.d.ts.map +1 -0
- package/dist/components/skeleton/SmartSkeleton.d.ts +23 -0
- package/dist/components/skeleton/SmartSkeleton.d.ts.map +1 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.d.ts.map +1 -1
- package/dist/components/smart/FormFieldLoader.d.ts +22 -0
- package/dist/components/smart/FormFieldLoader.d.ts.map +1 -0
- package/dist/components/smart/index.d.ts +2 -0
- package/dist/components/smart/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useLoadingAnalytics.d.ts +101 -0
- package/dist/hooks/useLoadingAnalytics.d.ts.map +1 -0
- package/dist/hooks/useLoadingOrchestrator.d.ts +104 -0
- package/dist/hooks/useLoadingOrchestrator.d.ts.map +1 -0
- package/dist/hooks/useSmartLoader.d.ts +98 -0
- package/dist/hooks/useSmartLoader.d.ts.map +1 -0
- package/dist/index.cjs +49 -31
- package/dist/index.js +49 -31
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +131 -66
- package/dist/index16.js +132 -67
- package/dist/index17.cjs +245 -30
- package/dist/index17.js +246 -31
- package/dist/index18.cjs +24 -36
- package/dist/index18.js +24 -36
- package/dist/index19.cjs +19 -21
- package/dist/index19.js +19 -21
- package/dist/index20.cjs +25 -20
- package/dist/index20.js +25 -20
- package/dist/index21.cjs +22 -32
- package/dist/index21.js +22 -32
- package/dist/index22.cjs +26 -35
- package/dist/index22.js +28 -37
- package/dist/index23.cjs +40 -76
- package/dist/index23.js +42 -78
- package/dist/index24.cjs +53 -102
- package/dist/index24.js +54 -103
- package/dist/index25.cjs +46 -80
- package/dist/index25.js +47 -81
- package/dist/index26.cjs +105 -103
- package/dist/index26.js +107 -105
- package/dist/index27.cjs +108 -27
- package/dist/index27.js +111 -30
- package/dist/index28.cjs +104 -36
- package/dist/index28.js +106 -38
- package/dist/index29.cjs +22 -30
- package/dist/index29.js +23 -31
- package/dist/index30.cjs +30 -32
- package/dist/index30.js +31 -33
- package/dist/index31.cjs +49 -52
- package/dist/index31.js +50 -53
- package/dist/index32.cjs +37 -108
- package/dist/index32.js +38 -109
- package/dist/index33.cjs +54 -72
- package/dist/index33.js +55 -73
- package/dist/index34.cjs +112 -80
- package/dist/index34.js +112 -80
- package/dist/index35.cjs +78 -145
- package/dist/index35.js +80 -147
- package/dist/index36.cjs +78 -57
- package/dist/index36.js +79 -58
- package/dist/index37.cjs +138 -84
- package/dist/index37.js +140 -86
- package/dist/index38.cjs +33 -106
- package/dist/index38.js +34 -107
- package/dist/index39.cjs +66 -50
- package/dist/index39.js +66 -50
- package/dist/index40.cjs +123 -44
- package/dist/index40.js +124 -45
- package/dist/index41.cjs +43 -85
- package/dist/index41.js +44 -86
- package/dist/index42.cjs +35 -27
- package/dist/index42.js +35 -27
- package/dist/index43.cjs +87 -58
- package/dist/index43.js +87 -58
- package/dist/index44.cjs +35 -88
- package/dist/index44.js +36 -89
- package/dist/index45.cjs +62 -58
- package/dist/index45.js +63 -59
- package/dist/index46.cjs +87 -110
- package/dist/index46.js +88 -111
- package/dist/index47.cjs +101 -120
- package/dist/index47.js +102 -121
- package/dist/index48.cjs +158 -0
- package/dist/index48.js +158 -0
- package/dist/index49.cjs +167 -0
- package/dist/index49.js +167 -0
- package/dist/index50.cjs +110 -0
- package/dist/index50.js +110 -0
- package/dist/index51.cjs +112 -0
- package/dist/index51.js +112 -0
- package/dist/index52.cjs +144 -0
- package/dist/index52.js +144 -0
- package/dist/index53.cjs +112 -0
- package/dist/index53.js +112 -0
- package/dist/index54.cjs +189 -0
- package/dist/index54.js +189 -0
- package/dist/index55.cjs +53 -0
- package/dist/index55.js +53 -0
- package/dist/index56.cjs +125 -0
- package/dist/index56.js +125 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +1 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +1 -1
- package/dist/premium-react-loaders.css +140 -0
- package/dist/types/3d.d.ts +85 -0
- package/dist/types/3d.d.ts.map +1 -0
- package/dist/types/accessibility.d.ts +35 -0
- package/dist/types/accessibility.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/smart.d.ts +63 -0
- package/dist/types/smart.d.ts.map +1 -0
- package/dist/utils/accessibility.d.ts +67 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index41.cjs
CHANGED
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
|
-
const hooks = require("./
|
|
5
|
+
const hooks = require("./index56.cjs");
|
|
6
6
|
const colors = require("./index4.cjs");
|
|
7
7
|
const classNames = require("./index3.cjs");
|
|
8
|
-
const
|
|
8
|
+
const OrbitDots = react.forwardRef(
|
|
9
9
|
({
|
|
10
10
|
size = "md",
|
|
11
11
|
color = "#3b82f6",
|
|
12
12
|
secondaryColor,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
thickness = 1,
|
|
13
|
+
dotCount = 4,
|
|
14
|
+
dotSize = 8,
|
|
15
|
+
orbitRadius = 0.4,
|
|
16
|
+
stagger = true,
|
|
18
17
|
speed = "normal",
|
|
19
18
|
reverse = false,
|
|
20
19
|
respectMotionPreference = true,
|
|
@@ -23,7 +22,7 @@ const AtomLoader = react.forwardRef(
|
|
|
23
22
|
transition,
|
|
24
23
|
className,
|
|
25
24
|
style,
|
|
26
|
-
testId = "
|
|
25
|
+
testId = "orbit-dots",
|
|
27
26
|
visible = true,
|
|
28
27
|
ariaLabel = "Loading...",
|
|
29
28
|
...rest
|
|
@@ -38,8 +37,8 @@ const AtomLoader = react.forwardRef(
|
|
|
38
37
|
);
|
|
39
38
|
if (!shouldRender) return null;
|
|
40
39
|
const normalizedSize = colors.normalizeSize(size);
|
|
41
|
-
const
|
|
42
|
-
const
|
|
40
|
+
const sizeNum = parseInt(normalizedSize, 10);
|
|
41
|
+
const radius = sizeNum * orbitRadius;
|
|
43
42
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44
43
|
"div",
|
|
45
44
|
{
|
|
@@ -57,83 +56,42 @@ const AtomLoader = react.forwardRef(
|
|
|
57
56
|
"aria-label": ariaLabel,
|
|
58
57
|
"aria-busy": "true",
|
|
59
58
|
...rest,
|
|
60
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
59
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: "relative w-full h-full",
|
|
63
|
+
style: {
|
|
64
|
+
animation: `orbit-rotate ${effectiveDuration} linear infinite`,
|
|
65
|
+
animationDirection: reverse ? "reverse" : "normal"
|
|
66
|
+
},
|
|
67
|
+
children: Array.from({ length: dotCount }, (_, index) => {
|
|
68
|
+
const angle = 360 / dotCount * index;
|
|
69
|
+
const dotColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
|
|
70
|
+
const staggerDelay = stagger ? `${index / dotCount * 300}ms` : "0ms";
|
|
71
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
className: "absolute rounded-full",
|
|
75
|
+
style: {
|
|
76
|
+
width: dotSize,
|
|
77
|
+
height: dotSize,
|
|
78
|
+
backgroundColor: dotColor,
|
|
79
|
+
left: "50%",
|
|
80
|
+
top: "50%",
|
|
81
|
+
transform: `translate(-50%, -50%) rotate(${angle}deg) translateX(${radius}px)`,
|
|
82
|
+
opacity: stagger ? void 0 : 1,
|
|
83
|
+
animation: stagger ? `orbit-dot-pulse 1s ease-in-out infinite` : void 0,
|
|
84
|
+
animationDelay: staggerDelay
|
|
85
|
+
}
|
|
85
86
|
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
style: {
|
|
92
|
-
width: "100%",
|
|
93
|
-
height: "60%",
|
|
94
|
-
left: "0",
|
|
95
|
-
top: "20%",
|
|
96
|
-
border: `${thickness}px solid ${color}20`
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
101
|
-
"div",
|
|
102
|
-
{
|
|
103
|
-
className: "absolute",
|
|
104
|
-
style: {
|
|
105
|
-
width: "100%",
|
|
106
|
-
height: "60%",
|
|
107
|
-
left: "0",
|
|
108
|
-
top: "20%",
|
|
109
|
-
animation: `atom-orbit ${orbitDuration}ms linear infinite`,
|
|
110
|
-
animationDirection: shouldReverse ? "reverse" : "normal"
|
|
111
|
-
},
|
|
112
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
113
|
-
"div",
|
|
114
|
-
{
|
|
115
|
-
className: "absolute rounded-full",
|
|
116
|
-
style: {
|
|
117
|
-
width: electronSize,
|
|
118
|
-
height: electronSize,
|
|
119
|
-
backgroundColor: electronColor,
|
|
120
|
-
left: "50%",
|
|
121
|
-
top: 0,
|
|
122
|
-
transform: "translate(-50%, -50%)"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
]
|
|
129
|
-
},
|
|
130
|
-
index
|
|
131
|
-
);
|
|
132
|
-
})
|
|
133
|
-
] })
|
|
87
|
+
index
|
|
88
|
+
);
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
)
|
|
134
92
|
}
|
|
135
93
|
);
|
|
136
94
|
}
|
|
137
95
|
);
|
|
138
|
-
|
|
139
|
-
exports.
|
|
96
|
+
OrbitDots.displayName = "OrbitDots";
|
|
97
|
+
exports.OrbitDots = OrbitDots;
|
package/dist/index41.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./
|
|
3
|
+
import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index56.js";
|
|
4
4
|
import { normalizeSize } from "./index4.js";
|
|
5
5
|
import { cn } from "./index3.js";
|
|
6
|
-
const
|
|
6
|
+
const OrbitDots = forwardRef(
|
|
7
7
|
({
|
|
8
8
|
size = "md",
|
|
9
9
|
color = "#3b82f6",
|
|
10
10
|
secondaryColor,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
thickness = 1,
|
|
11
|
+
dotCount = 4,
|
|
12
|
+
dotSize = 8,
|
|
13
|
+
orbitRadius = 0.4,
|
|
14
|
+
stagger = true,
|
|
16
15
|
speed = "normal",
|
|
17
16
|
reverse = false,
|
|
18
17
|
respectMotionPreference = true,
|
|
@@ -21,7 +20,7 @@ const AtomLoader = forwardRef(
|
|
|
21
20
|
transition,
|
|
22
21
|
className,
|
|
23
22
|
style,
|
|
24
|
-
testId = "
|
|
23
|
+
testId = "orbit-dots",
|
|
25
24
|
visible = true,
|
|
26
25
|
ariaLabel = "Loading...",
|
|
27
26
|
...rest
|
|
@@ -36,8 +35,8 @@ const AtomLoader = forwardRef(
|
|
|
36
35
|
);
|
|
37
36
|
if (!shouldRender) return null;
|
|
38
37
|
const normalizedSize = normalizeSize(size);
|
|
39
|
-
const
|
|
40
|
-
const
|
|
38
|
+
const sizeNum = parseInt(normalizedSize, 10);
|
|
39
|
+
const radius = sizeNum * orbitRadius;
|
|
41
40
|
return /* @__PURE__ */ jsx(
|
|
42
41
|
"div",
|
|
43
42
|
{
|
|
@@ -55,85 +54,44 @@ const AtomLoader = forwardRef(
|
|
|
55
54
|
"aria-label": ariaLabel,
|
|
56
55
|
"aria-busy": "true",
|
|
57
56
|
...rest,
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
57
|
+
children: /* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: "relative w-full h-full",
|
|
61
|
+
style: {
|
|
62
|
+
animation: `orbit-rotate ${effectiveDuration} linear infinite`,
|
|
63
|
+
animationDirection: reverse ? "reverse" : "normal"
|
|
64
|
+
},
|
|
65
|
+
children: Array.from({ length: dotCount }, (_, index) => {
|
|
66
|
+
const angle = 360 / dotCount * index;
|
|
67
|
+
const dotColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
|
|
68
|
+
const staggerDelay = stagger ? `${index / dotCount * 300}ms` : "0ms";
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: "absolute rounded-full",
|
|
73
|
+
style: {
|
|
74
|
+
width: dotSize,
|
|
75
|
+
height: dotSize,
|
|
76
|
+
backgroundColor: dotColor,
|
|
77
|
+
left: "50%",
|
|
78
|
+
top: "50%",
|
|
79
|
+
transform: `translate(-50%, -50%) rotate(${angle}deg) translateX(${radius}px)`,
|
|
80
|
+
opacity: stagger ? void 0 : 1,
|
|
81
|
+
animation: stagger ? `orbit-dot-pulse 1s ease-in-out infinite` : void 0,
|
|
82
|
+
animationDelay: staggerDelay
|
|
83
|
+
}
|
|
83
84
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
style: {
|
|
90
|
-
width: "100%",
|
|
91
|
-
height: "60%",
|
|
92
|
-
left: "0",
|
|
93
|
-
top: "20%",
|
|
94
|
-
border: `${thickness}px solid ${color}20`
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
/* @__PURE__ */ jsx(
|
|
99
|
-
"div",
|
|
100
|
-
{
|
|
101
|
-
className: "absolute",
|
|
102
|
-
style: {
|
|
103
|
-
width: "100%",
|
|
104
|
-
height: "60%",
|
|
105
|
-
left: "0",
|
|
106
|
-
top: "20%",
|
|
107
|
-
animation: `atom-orbit ${orbitDuration}ms linear infinite`,
|
|
108
|
-
animationDirection: shouldReverse ? "reverse" : "normal"
|
|
109
|
-
},
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
111
|
-
"div",
|
|
112
|
-
{
|
|
113
|
-
className: "absolute rounded-full",
|
|
114
|
-
style: {
|
|
115
|
-
width: electronSize,
|
|
116
|
-
height: electronSize,
|
|
117
|
-
backgroundColor: electronColor,
|
|
118
|
-
left: "50%",
|
|
119
|
-
top: 0,
|
|
120
|
-
transform: "translate(-50%, -50%)"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
index
|
|
129
|
-
);
|
|
130
|
-
})
|
|
131
|
-
] })
|
|
85
|
+
index
|
|
86
|
+
);
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
)
|
|
132
90
|
}
|
|
133
91
|
);
|
|
134
92
|
}
|
|
135
93
|
);
|
|
136
|
-
|
|
94
|
+
OrbitDots.displayName = "OrbitDots";
|
|
137
95
|
export {
|
|
138
|
-
|
|
96
|
+
OrbitDots
|
|
139
97
|
};
|
package/dist/index42.cjs
CHANGED
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
|
-
const hooks = require("./
|
|
5
|
+
const hooks = require("./index56.cjs");
|
|
6
|
+
const colors = require("./index4.cjs");
|
|
6
7
|
const classNames = require("./index3.cjs");
|
|
7
|
-
const
|
|
8
|
+
const OrbitRings = react.forwardRef(
|
|
8
9
|
({
|
|
9
10
|
size = "md",
|
|
10
11
|
color = "#3b82f6",
|
|
11
12
|
secondaryColor,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
staggerDelay = 150,
|
|
13
|
+
thickness = 2,
|
|
14
|
+
ringCount = 3,
|
|
15
|
+
ringGap = 6,
|
|
16
|
+
alternate = true,
|
|
17
17
|
speed = "normal",
|
|
18
|
+
reverse = false,
|
|
18
19
|
respectMotionPreference = true,
|
|
19
20
|
delay = 0,
|
|
20
21
|
minDuration = 0,
|
|
21
22
|
transition,
|
|
22
23
|
className,
|
|
23
24
|
style,
|
|
24
|
-
testId = "
|
|
25
|
+
testId = "orbit-rings",
|
|
25
26
|
visible = true,
|
|
26
27
|
ariaLabel = "Loading...",
|
|
27
28
|
...rest
|
|
@@ -35,17 +36,18 @@ const BouncingDots = react.forwardRef(
|
|
|
35
36
|
transition
|
|
36
37
|
);
|
|
37
38
|
if (!shouldRender) return null;
|
|
38
|
-
const
|
|
39
|
-
const
|
|
39
|
+
const normalizedSize = colors.normalizeSize(size);
|
|
40
|
+
const sizeNum = parseInt(normalizedSize, 10);
|
|
41
|
+
const durationNum = parseInt(effectiveDuration, 10);
|
|
40
42
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41
43
|
"div",
|
|
42
44
|
{
|
|
43
45
|
ref,
|
|
44
46
|
"data-testid": testId,
|
|
45
|
-
className: classNames.cn("inline-flex items-
|
|
47
|
+
className: classNames.cn("inline-flex items-center justify-center", className),
|
|
46
48
|
style: {
|
|
47
|
-
width:
|
|
48
|
-
height:
|
|
49
|
+
width: normalizedSize,
|
|
50
|
+
height: normalizedSize,
|
|
49
51
|
opacity,
|
|
50
52
|
transition: transitionStyle,
|
|
51
53
|
...style
|
|
@@ -54,29 +56,35 @@ const BouncingDots = react.forwardRef(
|
|
|
54
56
|
"aria-label": ariaLabel,
|
|
55
57
|
"aria-busy": "true",
|
|
56
58
|
...rest,
|
|
57
|
-
children: Array.from({ length:
|
|
58
|
-
const
|
|
59
|
-
|
|
59
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full", children: Array.from({ length: ringCount }, (_, index) => {
|
|
60
|
+
const ringSize = sizeNum - index * (ringGap + thickness) * 2;
|
|
61
|
+
if (ringSize <= 0) return null;
|
|
62
|
+
const ringColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
|
|
63
|
+
const shouldReverse = alternate ? index % 2 === 1 !== reverse : reverse;
|
|
64
|
+
const ringDuration = durationNum + index * 200;
|
|
60
65
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
61
66
|
"div",
|
|
62
67
|
{
|
|
63
|
-
className: "rounded-full",
|
|
68
|
+
className: "absolute rounded-full",
|
|
64
69
|
style: {
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
width: ringSize,
|
|
71
|
+
height: ringSize,
|
|
72
|
+
left: "50%",
|
|
73
|
+
top: "50%",
|
|
74
|
+
transform: "translate(-50%, -50%)",
|
|
75
|
+
border: `${thickness}px solid transparent`,
|
|
76
|
+
borderTopColor: ringColor,
|
|
77
|
+
borderRightColor: ringColor,
|
|
78
|
+
animation: `orbit-rotate ${ringDuration}ms linear infinite`,
|
|
79
|
+
animationDirection: shouldReverse ? "reverse" : "normal"
|
|
72
80
|
}
|
|
73
81
|
},
|
|
74
82
|
index
|
|
75
83
|
);
|
|
76
|
-
})
|
|
84
|
+
}) })
|
|
77
85
|
}
|
|
78
86
|
);
|
|
79
87
|
}
|
|
80
88
|
);
|
|
81
|
-
|
|
82
|
-
exports.
|
|
89
|
+
OrbitRings.displayName = "OrbitRings";
|
|
90
|
+
exports.OrbitRings = OrbitRings;
|
package/dist/index42.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./
|
|
3
|
+
import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index56.js";
|
|
4
|
+
import { normalizeSize } from "./index4.js";
|
|
4
5
|
import { cn } from "./index3.js";
|
|
5
|
-
const
|
|
6
|
+
const OrbitRings = forwardRef(
|
|
6
7
|
({
|
|
7
8
|
size = "md",
|
|
8
9
|
color = "#3b82f6",
|
|
9
10
|
secondaryColor,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
staggerDelay = 150,
|
|
11
|
+
thickness = 2,
|
|
12
|
+
ringCount = 3,
|
|
13
|
+
ringGap = 6,
|
|
14
|
+
alternate = true,
|
|
15
15
|
speed = "normal",
|
|
16
|
+
reverse = false,
|
|
16
17
|
respectMotionPreference = true,
|
|
17
18
|
delay = 0,
|
|
18
19
|
minDuration = 0,
|
|
19
20
|
transition,
|
|
20
21
|
className,
|
|
21
22
|
style,
|
|
22
|
-
testId = "
|
|
23
|
+
testId = "orbit-rings",
|
|
23
24
|
visible = true,
|
|
24
25
|
ariaLabel = "Loading...",
|
|
25
26
|
...rest
|
|
@@ -33,17 +34,18 @@ const BouncingDots = forwardRef(
|
|
|
33
34
|
transition
|
|
34
35
|
);
|
|
35
36
|
if (!shouldRender) return null;
|
|
36
|
-
const
|
|
37
|
-
const
|
|
37
|
+
const normalizedSize = normalizeSize(size);
|
|
38
|
+
const sizeNum = parseInt(normalizedSize, 10);
|
|
39
|
+
const durationNum = parseInt(effectiveDuration, 10);
|
|
38
40
|
return /* @__PURE__ */ jsx(
|
|
39
41
|
"div",
|
|
40
42
|
{
|
|
41
43
|
ref,
|
|
42
44
|
"data-testid": testId,
|
|
43
|
-
className: cn("inline-flex items-
|
|
45
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
44
46
|
style: {
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
47
|
+
width: normalizedSize,
|
|
48
|
+
height: normalizedSize,
|
|
47
49
|
opacity,
|
|
48
50
|
transition: transitionStyle,
|
|
49
51
|
...style
|
|
@@ -52,31 +54,37 @@ const BouncingDots = forwardRef(
|
|
|
52
54
|
"aria-label": ariaLabel,
|
|
53
55
|
"aria-busy": "true",
|
|
54
56
|
...rest,
|
|
55
|
-
children: Array.from({ length:
|
|
56
|
-
const
|
|
57
|
-
|
|
57
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative w-full h-full", children: Array.from({ length: ringCount }, (_, index) => {
|
|
58
|
+
const ringSize = sizeNum - index * (ringGap + thickness) * 2;
|
|
59
|
+
if (ringSize <= 0) return null;
|
|
60
|
+
const ringColor = secondaryColor && index % 2 === 1 ? secondaryColor : color;
|
|
61
|
+
const shouldReverse = alternate ? index % 2 === 1 !== reverse : reverse;
|
|
62
|
+
const ringDuration = durationNum + index * 200;
|
|
58
63
|
return /* @__PURE__ */ jsx(
|
|
59
64
|
"div",
|
|
60
65
|
{
|
|
61
|
-
className: "rounded-full",
|
|
66
|
+
className: "absolute rounded-full",
|
|
62
67
|
style: {
|
|
63
|
-
width:
|
|
64
|
-
height:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
width: ringSize,
|
|
69
|
+
height: ringSize,
|
|
70
|
+
left: "50%",
|
|
71
|
+
top: "50%",
|
|
72
|
+
transform: "translate(-50%, -50%)",
|
|
73
|
+
border: `${thickness}px solid transparent`,
|
|
74
|
+
borderTopColor: ringColor,
|
|
75
|
+
borderRightColor: ringColor,
|
|
76
|
+
animation: `orbit-rotate ${ringDuration}ms linear infinite`,
|
|
77
|
+
animationDirection: shouldReverse ? "reverse" : "normal"
|
|
70
78
|
}
|
|
71
79
|
},
|
|
72
80
|
index
|
|
73
81
|
);
|
|
74
|
-
})
|
|
82
|
+
}) })
|
|
75
83
|
}
|
|
76
84
|
);
|
|
77
85
|
}
|
|
78
86
|
);
|
|
79
|
-
|
|
87
|
+
OrbitRings.displayName = "OrbitRings";
|
|
80
88
|
export {
|
|
81
|
-
|
|
89
|
+
OrbitRings
|
|
82
90
|
};
|