@brightlocal/ui-components 1.3.0 → 1.4.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/component-meta.json +1 -1
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +16 -1
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +106 -92
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +259 -185
- package/package.json +1 -1
- package/src/blocks/input-list.tsx +37 -5
- package/src/components/text-reveal-motion.tsx +246 -82
|
@@ -1,245 +1,319 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { animate as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as y, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import * as gt from "react";
|
|
3
|
+
import { useId as It, useMemo as yt, useRef as S, useState as Et, useCallback as Ft, useEffect as st } from "react";
|
|
4
|
+
import { animate as j } from "framer-motion";
|
|
5
|
+
import { cn as Xt } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
import { usePrefersReducedMotion as $t } from "./hooks/use-prefers-reduced-motion.js";
|
|
7
|
+
const Ct = "M250 500C388.071 500 500 388.071 500 250C500 111.929 388.071 0 250 0C111.929 0 0 111.929 0 250C0 388.071 111.929 500 250 500Z", wt = "M492.425 259.355C332.265 293.145 293.145 332.265 259.355 492.425C257.225 502.525 242.775 502.525 240.645 492.425C206.855 332.265 167.735 293.145 7.575 259.355C-2.525 257.225 -2.525 242.775 7.575 240.645C167.735 206.855 206.855 167.735 240.645 7.575C242.775 -2.525 257.225 -2.525 259.355 7.575C293.145 167.735 332.265 206.855 492.425 240.645C502.525 242.775 502.525 257.225 492.425 259.355Z", bt = "M258.366 5.58795L296.379 97.3854C298.509 102.526 304.729 104.546 309.47 101.636L394.177 49.7215C401.057 45.5112 409.598 51.7117 407.708 59.5523L384.506 156.16C383.206 161.571 387.046 166.861 392.596 167.301L491.645 175.092C499.685 175.722 502.945 185.763 496.815 191.003L421.259 255.528C417.029 259.138 417.029 265.679 421.259 269.299L496.815 333.824C502.945 339.065 499.685 349.106 491.645 349.736L392.596 357.526C387.046 357.966 383.206 363.257 384.506 368.667L407.708 465.275C409.588 473.116 401.047 479.326 394.177 475.106L309.47 423.192C304.729 420.282 298.509 422.302 296.379 427.442L258.366 519.24C255.275 526.69 244.725 526.69 241.634 519.24L203.621 427.442C201.491 422.302 195.271 420.282 190.53 423.192L105.823 475.106C98.9428 479.316 90.4021 473.116 92.2922 465.275L115.494 368.667C116.794 363.257 112.954 357.966 107.403 357.526L8.35543 349.736C0.314784 349.106 -2.94548 339.065 3.18502 333.824L78.7411 269.299C82.9715 265.689 82.9715 259.148 78.7411 255.528L3.18502 191.003C-2.94548 185.763 0.314784 175.722 8.35543 175.092L107.403 167.301C112.954 166.861 116.794 161.571 115.494 156.16L92.2922 59.5523C90.4121 51.7117 98.9528 45.5012 105.823 49.7215L190.53 101.636C195.271 104.546 201.491 102.526 203.621 97.3854L241.634 5.58795C244.725 -1.86265 255.275 -1.86265 258.366 5.58795Z", z = (f) => f < 0 ? 0 : f > 1 ? 1 : f, Dt = [
|
|
8
|
+
Ct,
|
|
9
|
+
wt,
|
|
10
|
+
bt,
|
|
11
|
+
Ct,
|
|
12
|
+
bt,
|
|
13
|
+
wt
|
|
14
|
+
], Ht = 30, Tt = 15, _t = typeof navigator < "u" && typeof navigator.hardwareConcurrency == "number" && navigator.hardwareConcurrency <= 4;
|
|
15
|
+
function qt(f, H, C) {
|
|
16
|
+
let w = !1, b = null;
|
|
17
|
+
const i = { ballX: 0, clipRight: 100, rotate: 0, pathD: "" };
|
|
18
|
+
function Z() {
|
|
19
|
+
w = !1, f.style.transform = `translateX(${i.ballX}px)`, b && (b.style.clipPath = `inset(0 ${i.clipRight}% 0 0)`), H.style.transform = `rotate(${i.rotate}deg)`, C.setAttribute("d", i.pathD);
|
|
20
|
+
}
|
|
21
|
+
function N(T, G, J, r) {
|
|
22
|
+
i.ballX = T, i.clipRight = G, i.rotate = J, i.pathD = r, w || (w = !0, requestAnimationFrame(Z));
|
|
23
|
+
}
|
|
24
|
+
return N.setItem = (T) => {
|
|
25
|
+
b = T;
|
|
26
|
+
}, N;
|
|
27
|
+
}
|
|
28
|
+
function Rt(f, H) {
|
|
29
|
+
return new Promise((C) => {
|
|
30
|
+
const w = performance.now();
|
|
31
|
+
function b() {
|
|
32
|
+
H.cancelled || performance.now() - w >= f ? C() : requestAnimationFrame(b);
|
|
33
|
+
}
|
|
34
|
+
requestAnimationFrame(b);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const zt = gt.forwardRef(
|
|
16
38
|
({
|
|
17
|
-
className:
|
|
18
|
-
dataHook:
|
|
19
|
-
holdTime:
|
|
20
|
-
shimmer:
|
|
21
|
-
gradientFrom:
|
|
22
|
-
gradientTo:
|
|
23
|
-
trackingEl:
|
|
24
|
-
trackingLabel:
|
|
25
|
-
children:
|
|
26
|
-
...
|
|
27
|
-
},
|
|
28
|
-
const
|
|
29
|
-
(
|
|
30
|
-
|
|
39
|
+
className: f,
|
|
40
|
+
dataHook: H,
|
|
41
|
+
holdTime: C = 1300,
|
|
42
|
+
shimmer: w = !0,
|
|
43
|
+
gradientFrom: b = "var(--loading-gradient-from)",
|
|
44
|
+
gradientTo: i = "var(--loading-gradient-to)",
|
|
45
|
+
trackingEl: Z,
|
|
46
|
+
trackingLabel: N,
|
|
47
|
+
children: T,
|
|
48
|
+
...G
|
|
49
|
+
}, J) => {
|
|
50
|
+
const r = Dt, K = 0.8, Q = 180, V = 24, Y = 1, U = $t(), lt = It(), it = yt(
|
|
51
|
+
() => `text-reveal-gradient-${lt.replace(/:/g, "")}`,
|
|
52
|
+
[lt]
|
|
53
|
+
), tt = S(null), et = S(null), nt = S(null), rt = S(null), ct = S(null), at = S(null), ot = S(null), P = S([]), F = gt.Children.toArray(T), [xt, Mt] = Et({ widths: [], ballSize: 0 }), { widths: d, ballSize: o } = xt, Lt = Ft(
|
|
54
|
+
(n) => (t) => {
|
|
55
|
+
P.current[n] = t;
|
|
31
56
|
},
|
|
32
57
|
[]
|
|
33
58
|
);
|
|
34
|
-
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
59
|
+
st(() => {
|
|
60
|
+
if (P.current.length === 0 || !P.current[0]) return;
|
|
61
|
+
let n = !1;
|
|
62
|
+
function t() {
|
|
63
|
+
if (n) return;
|
|
64
|
+
const u = [];
|
|
65
|
+
let R = 32;
|
|
66
|
+
for (let p = 0; p < F.length; p++) {
|
|
67
|
+
const x = P.current[p];
|
|
68
|
+
if (x && (u[p] = x.scrollWidth, p === 0)) {
|
|
69
|
+
const X = x.firstElementChild ?? x, e = parseFloat(getComputedStyle(X).fontSize) || 16;
|
|
70
|
+
R = Math.round(e * 1.5);
|
|
43
71
|
}
|
|
44
|
-
}), pt({ widths: t, ballSize: c });
|
|
45
|
-
});
|
|
46
|
-
return () => cancelAnimationFrame(e);
|
|
47
|
-
}, [P.length]), Z(() => {
|
|
48
|
-
if (k) return;
|
|
49
|
-
const e = G.current;
|
|
50
|
-
if (!e) return;
|
|
51
|
-
const t = e;
|
|
52
|
-
let c, p = null;
|
|
53
|
-
const n = 0.12 + Math.random() * 0.06, w = 0.08 + Math.random() * 0.04, h = Math.random() * Math.PI * 2, q = Math.random() * Math.PI * 2;
|
|
54
|
-
let s = -1 / 0;
|
|
55
|
-
function a(l) {
|
|
56
|
-
p || (p = l);
|
|
57
|
-
const v = (l - p) / 1e3, f = Math.sin(v * n + h) * Math.PI + Math.sin(v * w + q) * 0.5;
|
|
58
|
-
if (Math.abs(f - s) > 0.01) {
|
|
59
|
-
s = f;
|
|
60
|
-
const u = Math.cos(f), x = Math.sin(f);
|
|
61
|
-
t.setAttribute("x1", `${50 + 45 * u}%`), t.setAttribute("y1", `${50 + 45 * x}%`), t.setAttribute("x2", `${50 - 45 * u}%`), t.setAttribute("y2", `${50 - 45 * x}%`);
|
|
62
72
|
}
|
|
63
|
-
|
|
73
|
+
Mt({ widths: u, ballSize: R });
|
|
74
|
+
}
|
|
75
|
+
return document.fonts.ready.then(() => {
|
|
76
|
+
n || requestAnimationFrame(t);
|
|
77
|
+
}), () => {
|
|
78
|
+
n = !0;
|
|
79
|
+
};
|
|
80
|
+
}, [F.length]), st(() => {
|
|
81
|
+
if (U) return;
|
|
82
|
+
const n = ct.current;
|
|
83
|
+
if (!n) return;
|
|
84
|
+
const t = n;
|
|
85
|
+
let u, R = null;
|
|
86
|
+
const p = 0.12 + Math.random() * 0.06, x = 0.08 + Math.random() * 0.04, X = Math.random() * Math.PI * 2, e = Math.random() * Math.PI * 2;
|
|
87
|
+
let _ = -1 / 0;
|
|
88
|
+
function W(c) {
|
|
89
|
+
R || (R = c);
|
|
90
|
+
const s = (c - R) / 1e3, l = Math.sin(s * p + X) * Math.PI + Math.sin(s * x + e) * 0.5;
|
|
91
|
+
if (Math.abs(l - _) > 0.01) {
|
|
92
|
+
_ = l;
|
|
93
|
+
const k = Math.cos(l), q = Math.sin(l);
|
|
94
|
+
t.setAttribute("x1", `${50 + 45 * k}%`), t.setAttribute("y1", `${50 + 45 * q}%`), t.setAttribute("x2", `${50 - 45 * k}%`), t.setAttribute("y2", `${50 - 45 * q}%`);
|
|
95
|
+
}
|
|
96
|
+
u = requestAnimationFrame(W);
|
|
64
97
|
}
|
|
65
|
-
return
|
|
66
|
-
}, [
|
|
67
|
-
function
|
|
68
|
-
|
|
98
|
+
return u = requestAnimationFrame(W), () => cancelAnimationFrame(u);
|
|
99
|
+
}, [U]);
|
|
100
|
+
function vt(n) {
|
|
101
|
+
n.style.opacity = "1", j(0, 1, {
|
|
69
102
|
duration: 1.2,
|
|
70
103
|
ease: [0.25, 1, 0.5, 1],
|
|
71
104
|
onUpdate: (t) => {
|
|
72
|
-
|
|
105
|
+
n.style.transform = `translateX(${-100 + t * 200}%)`;
|
|
73
106
|
},
|
|
74
107
|
onComplete: () => {
|
|
75
|
-
|
|
108
|
+
n.style.opacity = "0";
|
|
76
109
|
}
|
|
77
110
|
});
|
|
78
111
|
}
|
|
79
|
-
|
|
80
|
-
if (!
|
|
112
|
+
st(() => {
|
|
113
|
+
if (!nt.current || !rt.current || !tt.current || !et.current || !at.current || !ot.current || d.length === 0 || o === 0)
|
|
81
114
|
return;
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
const n = nt.current, t = rt.current, u = tt.current, R = et.current, p = at.current, x = ot.current;
|
|
116
|
+
function X(c) {
|
|
117
|
+
const s = `${c}px`;
|
|
118
|
+
p.style.width = s, x.style.width = s;
|
|
119
|
+
}
|
|
120
|
+
if (U) {
|
|
121
|
+
n.setAttribute("d", r[0]), t.style.opacity = "1";
|
|
122
|
+
const c = P.current[0];
|
|
123
|
+
c && (c.style.opacity = "1", c.style.clipPath = "none"), X(d[0] ?? 0);
|
|
124
|
+
const s = o * 0.25, l = (d[0] ?? 0) + s + o / 2;
|
|
125
|
+
u.style.transform = `translateX(${l}px)`;
|
|
89
126
|
return;
|
|
90
127
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
97
|
-
|
|
128
|
+
const e = { cancelled: !1 }, _ = o * 0.25;
|
|
129
|
+
async function W() {
|
|
130
|
+
const { interpolate: c } = await import("flubber");
|
|
131
|
+
if (e.cancelled) return;
|
|
132
|
+
const s = _t ? Tt : Ht, l = [];
|
|
133
|
+
for (let M = 0; M < r.length; M++) {
|
|
134
|
+
const L = c(
|
|
135
|
+
r[M],
|
|
136
|
+
r[(M + 1) % r.length]
|
|
137
|
+
), v = [];
|
|
138
|
+
for (let A = 0; A <= s; A++)
|
|
139
|
+
v.push(L(A / s));
|
|
140
|
+
l.push(v);
|
|
141
|
+
}
|
|
142
|
+
const k = qt(u, t, n);
|
|
98
143
|
t.style.opacity = "1";
|
|
99
|
-
let
|
|
100
|
-
for (; !
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
144
|
+
let q = 0, m = 0, I = 0;
|
|
145
|
+
for (; !e.cancelled; ) {
|
|
146
|
+
const M = q % F.length, L = d[M] ?? 0;
|
|
147
|
+
X(L);
|
|
148
|
+
const v = -(_ + o / 2), A = L + _ + o / 2, dt = A - v, ut = P.current[M];
|
|
149
|
+
if (!ut) break;
|
|
150
|
+
k.setItem(ut);
|
|
151
|
+
for (let a = 0; a < F.length; a++) {
|
|
152
|
+
const h = P.current[a];
|
|
153
|
+
h && (h.style.opacity = a === M ? "1" : "0", h.style.clipPath = "inset(0 100% 0 0)");
|
|
154
|
+
}
|
|
155
|
+
const St = l[m % r.length], B = 360, pt = I;
|
|
156
|
+
if (await new Promise((a) => {
|
|
157
|
+
if (e.cancelled) {
|
|
158
|
+
a();
|
|
110
159
|
return;
|
|
111
160
|
}
|
|
112
|
-
const
|
|
161
|
+
const h = j(v, A, {
|
|
113
162
|
type: "spring",
|
|
114
|
-
stiffness:
|
|
115
|
-
damping:
|
|
116
|
-
mass:
|
|
117
|
-
onUpdate: (
|
|
118
|
-
if (
|
|
119
|
-
|
|
163
|
+
stiffness: Q * K,
|
|
164
|
+
damping: V,
|
|
165
|
+
mass: Y,
|
|
166
|
+
onUpdate: (g) => {
|
|
167
|
+
if (e.cancelled) {
|
|
168
|
+
h.stop(), a();
|
|
120
169
|
return;
|
|
121
170
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
171
|
+
const E = z((g - v) / dt), $ = L > 0 ? 100 - z(g / L) * 100 : 100, D = Math.round(E * s);
|
|
172
|
+
k(
|
|
173
|
+
g,
|
|
174
|
+
$,
|
|
175
|
+
pt + E * B,
|
|
176
|
+
St[D]
|
|
177
|
+
);
|
|
127
178
|
},
|
|
128
179
|
onComplete: () => {
|
|
129
|
-
|
|
180
|
+
I = pt + B, m = (m + 1) % r.length, a();
|
|
130
181
|
}
|
|
131
182
|
});
|
|
132
|
-
}),
|
|
133
|
-
if (
|
|
134
|
-
const
|
|
135
|
-
for (; !
|
|
136
|
-
const
|
|
137
|
-
await
|
|
183
|
+
}), e.cancelled) break;
|
|
184
|
+
if (w && vt(R), C > 0) {
|
|
185
|
+
const a = performance.now(), h = A;
|
|
186
|
+
for (; !e.cancelled && performance.now() - a < C && (await Rt(300, e), !(e.cancelled || performance.now() - a >= C)); ) {
|
|
187
|
+
const g = (m + 1) % r.length, E = l[m % r.length], $ = I, D = I + 360;
|
|
188
|
+
await j(0, 1, {
|
|
138
189
|
type: "spring",
|
|
139
190
|
stiffness: 30,
|
|
140
191
|
damping: 9,
|
|
141
192
|
mass: 0.5,
|
|
142
|
-
onUpdate: (
|
|
143
|
-
|
|
193
|
+
onUpdate: (ht) => {
|
|
194
|
+
const kt = Math.round(z(ht) * s);
|
|
195
|
+
k(
|
|
196
|
+
h,
|
|
197
|
+
0,
|
|
198
|
+
$ + ht * (D - $),
|
|
199
|
+
E[kt]
|
|
200
|
+
);
|
|
144
201
|
}
|
|
145
|
-
}),
|
|
202
|
+
}), I = D, m = g;
|
|
146
203
|
}
|
|
147
204
|
}
|
|
148
|
-
if (
|
|
149
|
-
const
|
|
150
|
-
if (await new Promise((
|
|
151
|
-
if (
|
|
152
|
-
|
|
205
|
+
if (e.cancelled) break;
|
|
206
|
+
const Pt = l[m % r.length], mt = I;
|
|
207
|
+
if (await new Promise((a) => {
|
|
208
|
+
if (e.cancelled) {
|
|
209
|
+
a();
|
|
153
210
|
return;
|
|
154
211
|
}
|
|
155
|
-
const
|
|
212
|
+
const h = j(A, v, {
|
|
156
213
|
type: "spring",
|
|
157
|
-
stiffness:
|
|
158
|
-
damping:
|
|
159
|
-
mass:
|
|
160
|
-
onUpdate: (
|
|
161
|
-
if (
|
|
162
|
-
|
|
214
|
+
stiffness: Q * K,
|
|
215
|
+
damping: V,
|
|
216
|
+
mass: Y,
|
|
217
|
+
onUpdate: (g) => {
|
|
218
|
+
if (e.cancelled) {
|
|
219
|
+
h.stop(), a();
|
|
163
220
|
return;
|
|
164
221
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
222
|
+
const E = z(1 - (g - v) / dt), $ = L > 0 ? 100 - z(g / L) * 100 : 100, D = Math.round(E * s);
|
|
223
|
+
k(
|
|
224
|
+
g,
|
|
225
|
+
$,
|
|
226
|
+
mt - E * B,
|
|
227
|
+
Pt[D]
|
|
228
|
+
);
|
|
170
229
|
},
|
|
171
230
|
onComplete: () => {
|
|
172
|
-
|
|
231
|
+
I = mt - B, m = (m + 1) % r.length, a();
|
|
173
232
|
}
|
|
174
233
|
});
|
|
175
|
-
}),
|
|
176
|
-
await
|
|
234
|
+
}), e.cancelled) break;
|
|
235
|
+
await Rt(300, e), q++;
|
|
177
236
|
}
|
|
178
237
|
}
|
|
179
|
-
return
|
|
180
|
-
|
|
238
|
+
return W(), () => {
|
|
239
|
+
e.cancelled = !0;
|
|
181
240
|
};
|
|
182
241
|
}, [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
242
|
+
d,
|
|
243
|
+
o,
|
|
244
|
+
F.length,
|
|
245
|
+
U,
|
|
246
|
+
K,
|
|
247
|
+
C,
|
|
248
|
+
w,
|
|
249
|
+
Q,
|
|
250
|
+
V,
|
|
251
|
+
Y,
|
|
252
|
+
r
|
|
194
253
|
]);
|
|
195
|
-
const
|
|
196
|
-
|
|
254
|
+
const ft = yt(
|
|
255
|
+
() => d.length > 0 ? Math.max(...d) : 0,
|
|
256
|
+
[d]
|
|
257
|
+
), At = d.length > 0 && o > 0;
|
|
258
|
+
return /* @__PURE__ */ y(
|
|
197
259
|
"div",
|
|
198
260
|
{
|
|
199
|
-
ref:
|
|
200
|
-
className:
|
|
201
|
-
"data-hook":
|
|
261
|
+
ref: J,
|
|
262
|
+
className: Xt("relative inline-flex items-center", f),
|
|
263
|
+
"data-hook": H,
|
|
202
264
|
"data-slot": "text-reveal",
|
|
203
|
-
"data-tracking-el":
|
|
204
|
-
"data-tracking-label":
|
|
205
|
-
|
|
206
|
-
|
|
265
|
+
"data-tracking-el": Z,
|
|
266
|
+
"data-tracking-label": N,
|
|
267
|
+
style: {
|
|
268
|
+
opacity: At ? 1 : 0,
|
|
269
|
+
transition: "opacity 0.4s ease-out"
|
|
270
|
+
},
|
|
271
|
+
...G,
|
|
272
|
+
children: /* @__PURE__ */ O(
|
|
207
273
|
"div",
|
|
208
274
|
{
|
|
275
|
+
ref: at,
|
|
209
276
|
className: "relative flex items-center",
|
|
210
|
-
style: {
|
|
277
|
+
style: {
|
|
278
|
+
width: ft || void 0,
|
|
279
|
+
transition: "width 0.3s ease-out"
|
|
280
|
+
},
|
|
211
281
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ O(
|
|
213
283
|
"span",
|
|
214
284
|
{
|
|
285
|
+
ref: ot,
|
|
215
286
|
className: "relative inline-block overflow-hidden",
|
|
216
|
-
style: {
|
|
287
|
+
style: {
|
|
288
|
+
width: ft || void 0,
|
|
289
|
+
transition: "width 0.3s ease-out"
|
|
290
|
+
},
|
|
217
291
|
children: [
|
|
218
|
-
|
|
292
|
+
F.map((n, t) => /* @__PURE__ */ y(
|
|
219
293
|
"span",
|
|
220
294
|
{
|
|
221
|
-
ref:
|
|
295
|
+
ref: Lt(t),
|
|
222
296
|
style: {
|
|
223
297
|
display: "block",
|
|
224
298
|
whiteSpace: "nowrap",
|
|
225
|
-
|
|
299
|
+
opacity: 0,
|
|
226
300
|
clipPath: "inset(0 100% 0 0)",
|
|
227
|
-
willChange: "clip-path
|
|
301
|
+
willChange: "clip-path",
|
|
228
302
|
...t > 0 ? { position: "absolute", top: 0, left: 0 } : {}
|
|
229
303
|
},
|
|
230
|
-
children:
|
|
304
|
+
children: n
|
|
231
305
|
},
|
|
232
306
|
t
|
|
233
307
|
)),
|
|
234
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ y(
|
|
235
309
|
"div",
|
|
236
310
|
{
|
|
237
|
-
ref:
|
|
311
|
+
ref: et,
|
|
238
312
|
className: "pointer-events-none absolute inset-0",
|
|
239
313
|
style: {
|
|
240
314
|
opacity: 0,
|
|
241
315
|
transform: "translateX(-100%)",
|
|
242
|
-
willChange: "transform
|
|
316
|
+
willChange: "transform",
|
|
243
317
|
background: "linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--background) 40%, transparent) 40%, color-mix(in srgb, var(--background) 70%, transparent) 50%, color-mix(in srgb, var(--background) 40%, transparent) 60%, transparent 100%)"
|
|
244
318
|
}
|
|
245
319
|
}
|
|
@@ -247,52 +321,52 @@ const Y = "M250 500C388.071 500 500 388.071 500 250C500 111.929 388.071 0 250 0C
|
|
|
247
321
|
]
|
|
248
322
|
}
|
|
249
323
|
),
|
|
250
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ y(
|
|
251
325
|
"div",
|
|
252
326
|
{
|
|
253
|
-
ref:
|
|
327
|
+
ref: tt,
|
|
254
328
|
className: "absolute",
|
|
255
329
|
style: {
|
|
256
|
-
left: -
|
|
330
|
+
left: -o / 2,
|
|
257
331
|
top: "50%",
|
|
258
|
-
marginTop: -
|
|
259
|
-
width:
|
|
260
|
-
height:
|
|
332
|
+
marginTop: -o / 2,
|
|
333
|
+
width: o,
|
|
334
|
+
height: o,
|
|
261
335
|
transform: "translateX(0px)",
|
|
262
336
|
willChange: "transform"
|
|
263
337
|
},
|
|
264
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ O(
|
|
265
339
|
"svg",
|
|
266
340
|
{
|
|
267
341
|
"aria-label": "Loading",
|
|
268
342
|
"data-slot": "text-reveal-ball",
|
|
269
343
|
fill: "none",
|
|
270
|
-
height:
|
|
344
|
+
height: o,
|
|
271
345
|
role: "img",
|
|
272
346
|
style: { overflow: "visible" },
|
|
273
347
|
viewBox: "-30 -30 560 560",
|
|
274
|
-
width:
|
|
348
|
+
width: o,
|
|
275
349
|
xmlns: "http://www.w3.org/2000/svg",
|
|
276
350
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ y("defs", { children: /* @__PURE__ */ O("linearGradient", { ref: ct, id: it, children: [
|
|
352
|
+
/* @__PURE__ */ y("stop", { offset: "-20%", stopColor: b }),
|
|
353
|
+
/* @__PURE__ */ y("stop", { offset: "120%", stopColor: i })
|
|
280
354
|
] }) }),
|
|
281
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ y(
|
|
282
356
|
"g",
|
|
283
357
|
{
|
|
284
|
-
ref:
|
|
358
|
+
ref: rt,
|
|
285
359
|
style: {
|
|
286
360
|
opacity: 0,
|
|
287
361
|
transformOrigin: "250px 250px",
|
|
288
362
|
willChange: "transform"
|
|
289
363
|
},
|
|
290
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ y(
|
|
291
365
|
"path",
|
|
292
366
|
{
|
|
293
|
-
ref:
|
|
294
|
-
d:
|
|
295
|
-
fill: `url(#${
|
|
367
|
+
ref: nt,
|
|
368
|
+
d: r[0],
|
|
369
|
+
fill: `url(#${it})`
|
|
296
370
|
}
|
|
297
371
|
)
|
|
298
372
|
}
|
|
@@ -309,7 +383,7 @@ const Y = "M250 500C388.071 500 500 388.071 500 250C500 111.929 388.071 0 250 0C
|
|
|
309
383
|
);
|
|
310
384
|
}
|
|
311
385
|
);
|
|
312
|
-
|
|
386
|
+
zt.displayName = "TextRevealMotion";
|
|
313
387
|
export {
|
|
314
|
-
|
|
388
|
+
zt as TextRevealMotion
|
|
315
389
|
};
|