premium-react-loaders 3.1.1 → 4.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 +30 -3
- package/dist/components/gradient/GradientBar.d.ts +13 -0
- package/dist/components/gradient/GradientBar.d.ts.map +1 -0
- package/dist/components/gradient/GradientRing.d.ts +12 -0
- package/dist/components/gradient/GradientRing.d.ts.map +1 -0
- package/dist/components/gradient/GradientSpinner.d.ts +12 -0
- package/dist/components/gradient/GradientSpinner.d.ts.map +1 -0
- package/dist/components/gradient/index.d.ts +4 -0
- package/dist/components/gradient/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/morph/LiquidFill.d.ts +13 -0
- package/dist/components/morph/LiquidFill.d.ts.map +1 -0
- package/dist/components/morph/MorphBlob.d.ts +12 -0
- package/dist/components/morph/MorphBlob.d.ts.map +1 -0
- package/dist/components/morph/WaveCircle.d.ts +12 -0
- package/dist/components/morph/WaveCircle.d.ts.map +1 -0
- package/dist/components/morph/index.d.ts +4 -0
- package/dist/components/morph/index.d.ts.map +1 -0
- package/dist/components/neon/NeonPulse.d.ts +12 -0
- package/dist/components/neon/NeonPulse.d.ts.map +1 -0
- package/dist/components/neon/NeonSpinner.d.ts +12 -0
- package/dist/components/neon/NeonSpinner.d.ts.map +1 -0
- package/dist/components/neon/NeonText.d.ts +12 -0
- package/dist/components/neon/NeonText.d.ts.map +1 -0
- package/dist/components/neon/index.d.ts +4 -0
- package/dist/components/neon/index.d.ts.map +1 -0
- package/dist/components/particle/ParticleBurst.d.ts +12 -0
- package/dist/components/particle/ParticleBurst.d.ts.map +1 -0
- package/dist/components/particle/ParticleField.d.ts +3 -0
- package/dist/components/particle/ParticleField.d.ts.map +1 -0
- package/dist/components/particle/ParticleOrbit.d.ts +12 -0
- package/dist/components/particle/ParticleOrbit.d.ts.map +1 -0
- package/dist/components/particle/ParticleTrail.d.ts +12 -0
- package/dist/components/particle/ParticleTrail.d.ts.map +1 -0
- package/dist/components/particle/index.d.ts +5 -0
- package/dist/components/particle/index.d.ts.map +1 -0
- package/dist/components/progress/ProgressBar.d.ts.map +1 -1
- package/dist/components/progress/ProgressCircle.d.ts.map +1 -1
- package/dist/components/progress/ProgressRing.d.ts.map +1 -1
- package/dist/components/status/InfoIndicator.d.ts +29 -0
- package/dist/components/status/InfoIndicator.d.ts.map +1 -0
- package/dist/components/status/WarningIndicator.d.ts +29 -0
- package/dist/components/status/WarningIndicator.d.ts.map +1 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.d.ts.map +1 -1
- package/dist/index.cjs +50 -20
- package/dist/index.d.ts +1 -1
- package/dist/index.js +50 -20
- 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/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +1 -1
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +1 -1
- package/dist/index25.cjs +17 -2
- package/dist/index25.js +18 -3
- package/dist/index26.cjs +17 -2
- package/dist/index26.js +18 -3
- package/dist/index27.cjs +17 -2
- package/dist/index27.js +18 -3
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.cjs +59 -145
- package/dist/index37.js +61 -147
- package/dist/index38.cjs +32 -53
- package/dist/index38.js +33 -54
- package/dist/index39.cjs +138 -84
- package/dist/index39.js +140 -86
- package/dist/index4.cjs +10 -0
- package/dist/index4.js +10 -0
- package/dist/index40.cjs +33 -106
- package/dist/index40.js +34 -107
- package/dist/index41.cjs +66 -50
- package/dist/index41.js +66 -50
- package/dist/index42.cjs +123 -44
- package/dist/index42.js +124 -45
- package/dist/index43.cjs +43 -85
- package/dist/index43.js +44 -86
- package/dist/index44.cjs +35 -27
- package/dist/index44.js +35 -27
- package/dist/index45.cjs +87 -58
- package/dist/index45.js +87 -58
- package/dist/index46.cjs +35 -88
- package/dist/index46.js +36 -89
- package/dist/index47.cjs +62 -58
- package/dist/index47.js +63 -59
- package/dist/index48.cjs +87 -110
- package/dist/index48.js +88 -111
- package/dist/index49.cjs +48 -109
- package/dist/index49.js +49 -110
- package/dist/index50.cjs +110 -62
- package/dist/index50.js +111 -63
- package/dist/index51.cjs +104 -49
- package/dist/index51.js +104 -49
- package/dist/index52.cjs +43 -77
- package/dist/index52.js +44 -78
- package/dist/index53.cjs +56 -56
- package/dist/index53.js +56 -56
- package/dist/index54.cjs +104 -149
- package/dist/index54.js +106 -151
- package/dist/index55.cjs +97 -38
- package/dist/index55.js +99 -40
- package/dist/index56.cjs +184 -120
- package/dist/index56.js +185 -121
- package/dist/index57.cjs +53 -0
- package/dist/index57.js +53 -0
- package/dist/index58.cjs +55 -0
- package/dist/index58.js +55 -0
- package/dist/index59.cjs +119 -0
- package/dist/index59.js +119 -0
- package/dist/index60.cjs +70 -0
- package/dist/index60.js +70 -0
- package/dist/index61.cjs +66 -0
- package/dist/index61.js +66 -0
- package/dist/index62.cjs +68 -0
- package/dist/index62.js +68 -0
- package/dist/index63.cjs +99 -0
- package/dist/index63.js +99 -0
- package/dist/index64.cjs +75 -0
- package/dist/index64.js +75 -0
- package/dist/index65.cjs +92 -0
- package/dist/index65.js +92 -0
- package/dist/index66.cjs +76 -0
- package/dist/index66.js +76 -0
- package/dist/index67.cjs +76 -0
- package/dist/index67.js +76 -0
- package/dist/index68.cjs +64 -0
- package/dist/index68.js +64 -0
- package/dist/index69.cjs +60 -0
- package/dist/index69.js +60 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.cjs +57 -0
- package/dist/index70.js +57 -0
- package/dist/index71.cjs +125 -0
- package/dist/index71.js +125 -0
- 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 +126 -0
- package/dist/types/gradient.d.ts +38 -0
- package/dist/types/gradient.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/morph.d.ts +28 -0
- package/dist/types/morph.d.ts.map +1 -0
- package/dist/types/neon.d.ts +26 -0
- package/dist/types/neon.d.ts.map +1 -0
- package/dist/types/particle.d.ts +40 -0
- package/dist/types/particle.d.ts.map +1 -0
- package/dist/types/progress.d.ts +6 -0
- package/dist/types/progress.d.ts.map +1 -1
- package/dist/types/status.d.ts +30 -0
- package/dist/types/status.d.ts.map +1 -1
- package/dist/utils/colors.d.ts +5 -0
- package/dist/utils/colors.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index42.cjs
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
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("./
|
|
6
|
-
const colors = require("./index4.cjs");
|
|
5
|
+
const hooks = require("./index71.cjs");
|
|
7
6
|
const classNames = require("./index3.cjs");
|
|
8
|
-
const
|
|
7
|
+
const ShimmerButton = react.forwardRef(
|
|
9
8
|
({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
width = 120,
|
|
10
|
+
height = 40,
|
|
11
|
+
borderRadius = 8,
|
|
12
|
+
baseColor = "#e5e7eb",
|
|
13
|
+
highlightColor = "#f3f4f6",
|
|
14
|
+
direction = "left-to-right",
|
|
15
|
+
variant = "solid",
|
|
16
|
+
showIcon = false,
|
|
17
|
+
iconPosition = "left",
|
|
17
18
|
speed = "normal",
|
|
18
|
-
reverse = false,
|
|
19
19
|
respectMotionPreference = true,
|
|
20
20
|
delay = 0,
|
|
21
21
|
minDuration = 0,
|
|
22
22
|
transition,
|
|
23
23
|
className,
|
|
24
24
|
style,
|
|
25
|
-
testId = "
|
|
25
|
+
testId = "shimmer-button",
|
|
26
26
|
visible = true,
|
|
27
|
-
ariaLabel = "Loading...",
|
|
27
|
+
ariaLabel = "Loading button...",
|
|
28
28
|
...rest
|
|
29
29
|
}, ref) => {
|
|
30
30
|
const prefersReducedMotion = hooks.useReducedMotion();
|
|
@@ -36,18 +36,48 @@ const OrbitRings = react.forwardRef(
|
|
|
36
36
|
transition
|
|
37
37
|
);
|
|
38
38
|
if (!shouldRender) return null;
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
const getAnimationName = () => {
|
|
40
|
+
switch (direction) {
|
|
41
|
+
case "right-to-left":
|
|
42
|
+
return "shimmer-rtl";
|
|
43
|
+
case "top-to-bottom":
|
|
44
|
+
return "shimmer-ttb";
|
|
45
|
+
case "bottom-to-top":
|
|
46
|
+
return "shimmer-btt";
|
|
47
|
+
default:
|
|
48
|
+
return "shimmer-ltr";
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const getGradientDirection = () => {
|
|
52
|
+
switch (direction) {
|
|
53
|
+
case "right-to-left":
|
|
54
|
+
return "to left";
|
|
55
|
+
case "top-to-bottom":
|
|
56
|
+
return "to bottom";
|
|
57
|
+
case "bottom-to-top":
|
|
58
|
+
return "to top";
|
|
59
|
+
default:
|
|
60
|
+
return "to right";
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const normalizedHeight = typeof height === "number" ? height : 40;
|
|
64
|
+
const iconSize = Math.floor(normalizedHeight * 0.5);
|
|
65
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
43
66
|
"div",
|
|
44
67
|
{
|
|
45
68
|
ref,
|
|
46
69
|
"data-testid": testId,
|
|
47
|
-
className: classNames.cn(
|
|
70
|
+
className: classNames.cn(
|
|
71
|
+
"relative overflow-hidden inline-flex items-center justify-center gap-2",
|
|
72
|
+
className
|
|
73
|
+
),
|
|
48
74
|
style: {
|
|
49
|
-
width:
|
|
50
|
-
height:
|
|
75
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
76
|
+
height: typeof height === "number" ? `${height}px` : height,
|
|
77
|
+
borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius,
|
|
78
|
+
backgroundColor: variant === "solid" ? baseColor : "transparent",
|
|
79
|
+
border: variant === "outline" ? `2px solid ${baseColor}` : "none",
|
|
80
|
+
padding: "0 16px",
|
|
51
81
|
opacity,
|
|
52
82
|
transition: transitionStyle,
|
|
53
83
|
...style
|
|
@@ -56,35 +86,84 @@ const OrbitRings = react.forwardRef(
|
|
|
56
86
|
"aria-label": ariaLabel,
|
|
57
87
|
"aria-busy": "true",
|
|
58
88
|
...rest,
|
|
59
|
-
children:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
89
|
+
children: [
|
|
90
|
+
showIcon && iconPosition === "left" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
className: "relative overflow-hidden rounded-full flex-shrink-0",
|
|
94
|
+
style: {
|
|
95
|
+
width: iconSize,
|
|
96
|
+
height: iconSize,
|
|
97
|
+
backgroundColor: variant === "solid" ? highlightColor : baseColor
|
|
98
|
+
},
|
|
99
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: "absolute inset-0",
|
|
103
|
+
style: {
|
|
104
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, ${variant === "solid" ? baseColor : highlightColor} 50%, transparent 100%)`,
|
|
105
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
className: "relative overflow-hidden flex-1",
|
|
115
|
+
style: {
|
|
116
|
+
height: Math.floor(normalizedHeight * 0.35),
|
|
117
|
+
borderRadius: 4,
|
|
118
|
+
backgroundColor: variant === "solid" ? highlightColor : baseColor
|
|
119
|
+
},
|
|
120
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
className: "absolute inset-0",
|
|
124
|
+
style: {
|
|
125
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, ${variant === "solid" ? baseColor : highlightColor} 50%, transparent 100%)`,
|
|
126
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
showIcon && iconPosition === "right" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: "relative overflow-hidden rounded-full flex-shrink-0",
|
|
136
|
+
style: {
|
|
137
|
+
width: iconSize,
|
|
138
|
+
height: iconSize,
|
|
139
|
+
backgroundColor: variant === "solid" ? highlightColor : baseColor
|
|
140
|
+
},
|
|
141
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
className: "absolute inset-0",
|
|
145
|
+
style: {
|
|
146
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, ${variant === "solid" ? baseColor : highlightColor} 50%, transparent 100%)`,
|
|
147
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
variant === "solid" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
154
|
"div",
|
|
67
155
|
{
|
|
68
|
-
className: "absolute
|
|
156
|
+
className: "absolute inset-0 pointer-events-none",
|
|
69
157
|
style: {
|
|
70
|
-
|
|
71
|
-
|
|
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"
|
|
158
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%)`,
|
|
159
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
80
160
|
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}) })
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
]
|
|
85
164
|
}
|
|
86
165
|
);
|
|
87
166
|
}
|
|
88
167
|
);
|
|
89
|
-
|
|
90
|
-
exports.
|
|
168
|
+
ShimmerButton.displayName = "ShimmerButton";
|
|
169
|
+
exports.ShimmerButton = ShimmerButton;
|
package/dist/index42.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./
|
|
4
|
-
import { normalizeSize } from "./index4.js";
|
|
3
|
+
import { useReducedMotion, useLoaderVisibility, getEffectiveDuration } from "./index71.js";
|
|
5
4
|
import { cn } from "./index3.js";
|
|
6
|
-
const
|
|
5
|
+
const ShimmerButton = forwardRef(
|
|
7
6
|
({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
width = 120,
|
|
8
|
+
height = 40,
|
|
9
|
+
borderRadius = 8,
|
|
10
|
+
baseColor = "#e5e7eb",
|
|
11
|
+
highlightColor = "#f3f4f6",
|
|
12
|
+
direction = "left-to-right",
|
|
13
|
+
variant = "solid",
|
|
14
|
+
showIcon = false,
|
|
15
|
+
iconPosition = "left",
|
|
15
16
|
speed = "normal",
|
|
16
|
-
reverse = false,
|
|
17
17
|
respectMotionPreference = true,
|
|
18
18
|
delay = 0,
|
|
19
19
|
minDuration = 0,
|
|
20
20
|
transition,
|
|
21
21
|
className,
|
|
22
22
|
style,
|
|
23
|
-
testId = "
|
|
23
|
+
testId = "shimmer-button",
|
|
24
24
|
visible = true,
|
|
25
|
-
ariaLabel = "Loading...",
|
|
25
|
+
ariaLabel = "Loading button...",
|
|
26
26
|
...rest
|
|
27
27
|
}, ref) => {
|
|
28
28
|
const prefersReducedMotion = useReducedMotion();
|
|
@@ -34,18 +34,48 @@ const OrbitRings = forwardRef(
|
|
|
34
34
|
transition
|
|
35
35
|
);
|
|
36
36
|
if (!shouldRender) return null;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
const getAnimationName = () => {
|
|
38
|
+
switch (direction) {
|
|
39
|
+
case "right-to-left":
|
|
40
|
+
return "shimmer-rtl";
|
|
41
|
+
case "top-to-bottom":
|
|
42
|
+
return "shimmer-ttb";
|
|
43
|
+
case "bottom-to-top":
|
|
44
|
+
return "shimmer-btt";
|
|
45
|
+
default:
|
|
46
|
+
return "shimmer-ltr";
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const getGradientDirection = () => {
|
|
50
|
+
switch (direction) {
|
|
51
|
+
case "right-to-left":
|
|
52
|
+
return "to left";
|
|
53
|
+
case "top-to-bottom":
|
|
54
|
+
return "to bottom";
|
|
55
|
+
case "bottom-to-top":
|
|
56
|
+
return "to top";
|
|
57
|
+
default:
|
|
58
|
+
return "to right";
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const normalizedHeight = typeof height === "number" ? height : 40;
|
|
62
|
+
const iconSize = Math.floor(normalizedHeight * 0.5);
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
41
64
|
"div",
|
|
42
65
|
{
|
|
43
66
|
ref,
|
|
44
67
|
"data-testid": testId,
|
|
45
|
-
className: cn(
|
|
68
|
+
className: cn(
|
|
69
|
+
"relative overflow-hidden inline-flex items-center justify-center gap-2",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
46
72
|
style: {
|
|
47
|
-
width:
|
|
48
|
-
height:
|
|
73
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
74
|
+
height: typeof height === "number" ? `${height}px` : height,
|
|
75
|
+
borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius,
|
|
76
|
+
backgroundColor: variant === "solid" ? baseColor : "transparent",
|
|
77
|
+
border: variant === "outline" ? `2px solid ${baseColor}` : "none",
|
|
78
|
+
padding: "0 16px",
|
|
49
79
|
opacity,
|
|
50
80
|
transition: transitionStyle,
|
|
51
81
|
...style
|
|
@@ -54,37 +84,86 @@ const OrbitRings = forwardRef(
|
|
|
54
84
|
"aria-label": ariaLabel,
|
|
55
85
|
"aria-busy": "true",
|
|
56
86
|
...rest,
|
|
57
|
-
children:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
87
|
+
children: [
|
|
88
|
+
showIcon && iconPosition === "left" && /* @__PURE__ */ jsx(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: "relative overflow-hidden rounded-full flex-shrink-0",
|
|
92
|
+
style: {
|
|
93
|
+
width: iconSize,
|
|
94
|
+
height: iconSize,
|
|
95
|
+
backgroundColor: variant === "solid" ? highlightColor : baseColor
|
|
96
|
+
},
|
|
97
|
+
children: /* @__PURE__ */ jsx(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: "absolute inset-0",
|
|
101
|
+
style: {
|
|
102
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, ${variant === "solid" ? baseColor : highlightColor} 50%, transparent 100%)`,
|
|
103
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ jsx(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: "relative overflow-hidden flex-1",
|
|
113
|
+
style: {
|
|
114
|
+
height: Math.floor(normalizedHeight * 0.35),
|
|
115
|
+
borderRadius: 4,
|
|
116
|
+
backgroundColor: variant === "solid" ? highlightColor : baseColor
|
|
117
|
+
},
|
|
118
|
+
children: /* @__PURE__ */ jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: "absolute inset-0",
|
|
122
|
+
style: {
|
|
123
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, ${variant === "solid" ? baseColor : highlightColor} 50%, transparent 100%)`,
|
|
124
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
showIcon && iconPosition === "right" && /* @__PURE__ */ jsx(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
className: "relative overflow-hidden rounded-full flex-shrink-0",
|
|
134
|
+
style: {
|
|
135
|
+
width: iconSize,
|
|
136
|
+
height: iconSize,
|
|
137
|
+
backgroundColor: variant === "solid" ? highlightColor : baseColor
|
|
138
|
+
},
|
|
139
|
+
children: /* @__PURE__ */ jsx(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
className: "absolute inset-0",
|
|
143
|
+
style: {
|
|
144
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, ${variant === "solid" ? baseColor : highlightColor} 50%, transparent 100%)`,
|
|
145
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
variant === "solid" && /* @__PURE__ */ jsx(
|
|
64
152
|
"div",
|
|
65
153
|
{
|
|
66
|
-
className: "absolute
|
|
154
|
+
className: "absolute inset-0 pointer-events-none",
|
|
67
155
|
style: {
|
|
68
|
-
|
|
69
|
-
|
|
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"
|
|
156
|
+
background: `linear-gradient(${getGradientDirection()}, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%)`,
|
|
157
|
+
animation: `${getAnimationName()} ${effectiveDuration} infinite`
|
|
78
158
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}) })
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
]
|
|
83
162
|
}
|
|
84
163
|
);
|
|
85
164
|
}
|
|
86
165
|
);
|
|
87
|
-
|
|
166
|
+
ShimmerButton.displayName = "ShimmerButton";
|
|
88
167
|
export {
|
|
89
|
-
|
|
168
|
+
ShimmerButton
|
|
90
169
|
};
|
package/dist/index43.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("./index71.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;
|