@solostylist/ui-kit 1.0.103 → 1.0.105
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/dist/hooks/use-scroll-animation.d.ts +52 -0
- package/dist/hooks/use-scroll-animation.js +57 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.js +142 -134
- package/dist/s-action-overlay/index.d.ts +2 -0
- package/dist/s-action-overlay/index.js +4 -0
- package/dist/s-action-overlay/package.json +5 -0
- package/dist/s-action-overlay/s-action-overlay.d.ts +29 -0
- package/dist/s-action-overlay/s-action-overlay.js +112 -0
- package/dist/s-blur-text/index.d.ts +2 -0
- package/dist/s-blur-text/index.js +4 -0
- package/dist/s-blur-text/package.json +5 -0
- package/dist/s-blur-text/s-blur-text.d.ts +43 -0
- package/dist/s-blur-text/s-blur-text.js +80 -0
- package/dist/s-chat-message/s-chat-message.js +18 -18
- package/dist/s-flex-box/index.d.ts +2 -0
- package/dist/s-flex-box/index.js +4 -0
- package/dist/s-flex-box/package.json +5 -0
- package/dist/s-flex-box/s-flex-box.d.ts +5 -0
- package/dist/s-flex-box/s-flex-box.js +6 -0
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +11 -11
- package/dist/s-scroll-reveal/index.d.ts +2 -0
- package/dist/s-scroll-reveal/index.js +4 -0
- package/dist/s-scroll-reveal/package.json +6 -0
- package/dist/s-scroll-reveal/s-scroll-reveal.d.ts +56 -0
- package/dist/s-scroll-reveal/s-scroll-reveal.js +63 -0
- package/dist/s-typewriter-text/index.d.ts +2 -0
- package/dist/s-typewriter-text/index.js +4 -0
- package/dist/s-typewriter-text/package.json +6 -0
- package/dist/s-typewriter-text/s-typewriter-text.d.ts +12 -0
- package/dist/s-typewriter-text/s-typewriter-text.js +44 -0
- package/dist/theme/customizations/inputs.js +0 -1
- package/dist/theme/theme-primitives.d.ts +54 -0
- package/dist/theme/theme-primitives.js +105 -55
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TypographyProps } from '@mui/material';
|
|
3
|
+
export interface SBlurTextProps extends Omit<TypographyProps, 'children'> {
|
|
4
|
+
/** The text content to animate */
|
|
5
|
+
text: string;
|
|
6
|
+
/** Delay between animating each segment in milliseconds */
|
|
7
|
+
delay?: number;
|
|
8
|
+
/** Animation granularity - animate by words or individual letters */
|
|
9
|
+
animateBy?: 'words' | 'letters';
|
|
10
|
+
/** Direction of the blur animation */
|
|
11
|
+
direction?: 'top' | 'bottom';
|
|
12
|
+
/** Intersection observer threshold for triggering animation */
|
|
13
|
+
threshold?: number;
|
|
14
|
+
/** Intersection observer root margin */
|
|
15
|
+
rootMargin?: string;
|
|
16
|
+
/** Custom starting animation state */
|
|
17
|
+
animationFrom?: Record<string, string | number>;
|
|
18
|
+
/** Custom ending animation states (array for multi-step animations) */
|
|
19
|
+
animationTo?: Array<Record<string, string | number>>;
|
|
20
|
+
/** Custom easing function for animation timing */
|
|
21
|
+
easing?: (t: number) => number;
|
|
22
|
+
/** Callback fired when animation completes */
|
|
23
|
+
onAnimationComplete?: () => void;
|
|
24
|
+
/** Duration of each animation step in seconds */
|
|
25
|
+
stepDuration?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A Typography component that animates text with a blur effect when it comes into view.
|
|
29
|
+
* Supports word-by-word or letter-by-letter animation with customizable timing and effects.
|
|
30
|
+
* Built on MUI Typography with full styling support.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <SBlurText
|
|
35
|
+
* text="Hello world, this text will blur in"
|
|
36
|
+
* variant="h1"
|
|
37
|
+
* animateBy="words"
|
|
38
|
+
* delay={150}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare const SBlurText: React.FC<SBlurTextProps>;
|
|
43
|
+
export default SBlurText;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { j as y } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useState as R, useRef as V, useEffect as D, useMemo as b } from "react";
|
|
3
|
+
import { Typography as F } from "@mui/material";
|
|
4
|
+
import { motion as M } from "framer-motion";
|
|
5
|
+
const _ = (s, a) => {
|
|
6
|
+
const i = /* @__PURE__ */ new Set([...Object.keys(s), ...a.flatMap((t) => Object.keys(t))]), o = {};
|
|
7
|
+
return i.forEach((t) => {
|
|
8
|
+
o[t] = [s[t], ...a.map((l) => l[t])];
|
|
9
|
+
}), o;
|
|
10
|
+
}, H = ({
|
|
11
|
+
text: s,
|
|
12
|
+
delay: a = 100,
|
|
13
|
+
animateBy: i = "words",
|
|
14
|
+
direction: o = "top",
|
|
15
|
+
threshold: t = 0.1,
|
|
16
|
+
rootMargin: l = "0px",
|
|
17
|
+
animationFrom: h,
|
|
18
|
+
animationTo: d,
|
|
19
|
+
easing: w = (n) => n,
|
|
20
|
+
onAnimationComplete: x,
|
|
21
|
+
stepDuration: j = 0.35,
|
|
22
|
+
variant: g = "body1",
|
|
23
|
+
component: v = "p",
|
|
24
|
+
sx: S,
|
|
25
|
+
...T
|
|
26
|
+
}) => {
|
|
27
|
+
const n = i === "words" ? s.split(" ") : s.split(""), [k, C] = R(!1), c = V(null);
|
|
28
|
+
D(() => {
|
|
29
|
+
if (!c.current) return;
|
|
30
|
+
const r = new IntersectionObserver(
|
|
31
|
+
([e]) => {
|
|
32
|
+
e.isIntersecting && (C(!0), r.unobserve(c.current));
|
|
33
|
+
},
|
|
34
|
+
{ threshold: t, rootMargin: l }
|
|
35
|
+
);
|
|
36
|
+
return r.observe(c.current), () => r.disconnect();
|
|
37
|
+
}, [t, l]);
|
|
38
|
+
const E = b(
|
|
39
|
+
() => o === "top" ? { filter: "blur(10px)", opacity: 0, y: -50 } : { filter: "blur(10px)", opacity: 0, y: 50 },
|
|
40
|
+
[o]
|
|
41
|
+
), I = b(
|
|
42
|
+
() => [
|
|
43
|
+
{
|
|
44
|
+
filter: "blur(5px)",
|
|
45
|
+
opacity: 0.5,
|
|
46
|
+
y: o === "top" ? 5 : -5
|
|
47
|
+
},
|
|
48
|
+
{ filter: "blur(0px)", opacity: 1, y: 0 }
|
|
49
|
+
],
|
|
50
|
+
[o]
|
|
51
|
+
), u = h ?? E, f = d ?? I, p = f.length + 1, O = j * (p - 1), A = Array.from({ length: p }, (r, e) => p === 1 ? 0 : e / (p - 1));
|
|
52
|
+
return /* @__PURE__ */ y.jsx(F, { ref: c, variant: g, component: v, sx: S, ...T, children: n.map((r, e) => {
|
|
53
|
+
const K = _(u, f), m = {
|
|
54
|
+
duration: O,
|
|
55
|
+
times: A,
|
|
56
|
+
delay: e * a / 1e3
|
|
57
|
+
};
|
|
58
|
+
return m.ease = w, /* @__PURE__ */ y.jsxs(
|
|
59
|
+
M.span,
|
|
60
|
+
{
|
|
61
|
+
initial: u,
|
|
62
|
+
animate: k ? K : u,
|
|
63
|
+
transition: m,
|
|
64
|
+
onAnimationComplete: e === n.length - 1 ? x : void 0,
|
|
65
|
+
style: {
|
|
66
|
+
display: "inline-block",
|
|
67
|
+
willChange: "transform, filter, opacity"
|
|
68
|
+
},
|
|
69
|
+
children: [
|
|
70
|
+
r === " " ? " " : r,
|
|
71
|
+
i === "words" && e < n.length - 1 && " "
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
e
|
|
75
|
+
);
|
|
76
|
+
}) });
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
H as default
|
|
80
|
+
};
|
|
@@ -4,27 +4,27 @@ import { Box as o, Typography as l, Paper as H, IconButton as D } from "@mui/mat
|
|
|
4
4
|
import S from "../s-avatar/s-avatar.js";
|
|
5
5
|
import L from "../s-image-modal/s-image-modal.js";
|
|
6
6
|
import O from "../s-lazy-image/s-lazy-image.js";
|
|
7
|
-
import { c as
|
|
8
|
-
const R =
|
|
7
|
+
import { c as z } from "../createSvgIcon-DCQI9UV5.js";
|
|
8
|
+
const R = z(/* @__PURE__ */ r.jsx("path", {
|
|
9
9
|
d: "M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"
|
|
10
|
-
}), "Download"), U =
|
|
10
|
+
}), "Download"), U = z(/* @__PURE__ */ r.jsx("path", {
|
|
11
11
|
d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"
|
|
12
|
-
}), "InsertDriveFile"),
|
|
12
|
+
}), "InsertDriveFile"), J = ({
|
|
13
13
|
message: m,
|
|
14
|
-
variant:
|
|
14
|
+
variant: b = "received",
|
|
15
15
|
timestamp: f,
|
|
16
|
-
avatar:
|
|
16
|
+
avatar: h,
|
|
17
17
|
senderName: t,
|
|
18
|
-
showAvatar:
|
|
18
|
+
showAvatar: g = !0,
|
|
19
19
|
showTimestamp: I = !1,
|
|
20
20
|
maxWidth: w = "70%",
|
|
21
21
|
attachments: x = [],
|
|
22
22
|
onAttachmentClick: s,
|
|
23
23
|
onDownload: n,
|
|
24
|
-
sx:
|
|
25
|
-
...
|
|
24
|
+
sx: k,
|
|
25
|
+
...M
|
|
26
26
|
}) => {
|
|
27
|
-
const [a, u] = v(null), [C, j] = v(!1), i =
|
|
27
|
+
const [a, u] = v(null), [C, j] = v(!1), i = b === "sent", T = (e) => (typeof e == "string" ? new Date(e) : e).toLocaleTimeString("en-US", {
|
|
28
28
|
hour: "2-digit",
|
|
29
29
|
minute: "2-digit",
|
|
30
30
|
hour12: !0
|
|
@@ -48,11 +48,11 @@ const R = b(/* @__PURE__ */ r.jsx("path", {
|
|
|
48
48
|
sx: {
|
|
49
49
|
maxWidth: w,
|
|
50
50
|
alignSelf: i ? "flex-end" : "flex-start",
|
|
51
|
-
...
|
|
51
|
+
...k
|
|
52
52
|
},
|
|
53
|
-
...
|
|
53
|
+
...M,
|
|
54
54
|
children: [
|
|
55
|
-
|
|
55
|
+
g && !i && /* @__PURE__ */ r.jsx(S, { avatar: h, name: t, size: 36 }),
|
|
56
56
|
/* @__PURE__ */ r.jsxs(
|
|
57
57
|
o,
|
|
58
58
|
{
|
|
@@ -148,9 +148,9 @@ const R = b(/* @__PURE__ */ r.jsx("path", {
|
|
|
148
148
|
p: 1,
|
|
149
149
|
mt: c > 0 ? 1 : 0,
|
|
150
150
|
cursor: "pointer",
|
|
151
|
-
backgroundColor: i ? "
|
|
151
|
+
backgroundColor: i ? "blackAlpha.zero" : "background.paper",
|
|
152
152
|
"&:hover": {
|
|
153
|
-
backgroundColor: i ? "
|
|
153
|
+
backgroundColor: i ? "blackAlpha.light" : "action.hover"
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
onClick: () => W(e),
|
|
@@ -186,7 +186,7 @@ const R = b(/* @__PURE__ */ r.jsx("path", {
|
|
|
186
186
|
variant: "caption",
|
|
187
187
|
sx: {
|
|
188
188
|
fontSize: "0.75rem",
|
|
189
|
-
color: i ? "
|
|
189
|
+
color: i ? "whiteAlpha.dark" : "text.secondary"
|
|
190
190
|
},
|
|
191
191
|
children: B(e.size)
|
|
192
192
|
}
|
|
@@ -240,7 +240,7 @@ const R = b(/* @__PURE__ */ r.jsx("path", {
|
|
|
240
240
|
]
|
|
241
241
|
}
|
|
242
242
|
),
|
|
243
|
-
|
|
243
|
+
g && i && /* @__PURE__ */ r.jsx(S, { avatar: h, name: t, size: 36 }),
|
|
244
244
|
a && /* @__PURE__ */ r.jsx(
|
|
245
245
|
L,
|
|
246
246
|
{
|
|
@@ -263,5 +263,5 @@ const R = b(/* @__PURE__ */ r.jsx("path", {
|
|
|
263
263
|
);
|
|
264
264
|
};
|
|
265
265
|
export {
|
|
266
|
-
|
|
266
|
+
J as default
|
|
267
267
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as n } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
-
import { useRef as x, useEffect as
|
|
3
|
-
import { keyframes as
|
|
2
|
+
import { useRef as x, useEffect as h } from "react";
|
|
3
|
+
import { keyframes as y, styled as l, Box as d } from "@mui/material";
|
|
4
4
|
import b from "../s-text-shimmer/s-text-shimmer.js";
|
|
5
|
-
const j =
|
|
5
|
+
const j = y`
|
|
6
6
|
0% {
|
|
7
7
|
width: 20%;
|
|
8
8
|
height: 20%;
|
|
@@ -13,7 +13,7 @@ const j = h`
|
|
|
13
13
|
height: 100%;
|
|
14
14
|
opacity: 0;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`, v = l(d)(({ theme: e }) => ({
|
|
17
17
|
position: "relative",
|
|
18
18
|
display: "flex",
|
|
19
19
|
justifyContent: "center",
|
|
@@ -21,7 +21,7 @@ const j = h`
|
|
|
21
21
|
borderRadius: e.shape.borderRadius,
|
|
22
22
|
border: "1px solid",
|
|
23
23
|
borderColor: e.palette.divider
|
|
24
|
-
})),
|
|
24
|
+
})), C = l(d)(() => ({
|
|
25
25
|
position: "absolute",
|
|
26
26
|
pointerEvents: "none"
|
|
27
27
|
})), s = l(d)(({ theme: e }) => ({
|
|
@@ -43,14 +43,14 @@ const j = h`
|
|
|
43
43
|
"@media (prefers-reduced-motion: reduce)": {
|
|
44
44
|
animation: "none !important"
|
|
45
45
|
}
|
|
46
|
-
})),
|
|
46
|
+
})), R = () => {
|
|
47
47
|
const e = "s-radial-pulse-particles";
|
|
48
48
|
if (document.getElementById(e)) return;
|
|
49
49
|
const a = document.createElement("style");
|
|
50
50
|
a.id = e, a.textContent = `
|
|
51
51
|
.s-radial-pulse-particle {
|
|
52
52
|
position: absolute;
|
|
53
|
-
background:
|
|
53
|
+
background: var(--s-palette-whiteAlpha-dark);
|
|
54
54
|
border-radius: 50%;
|
|
55
55
|
animation: s-radial-pulse-float 4s ease-in-out infinite;
|
|
56
56
|
}
|
|
@@ -84,8 +84,8 @@ const j = h`
|
|
|
84
84
|
particleSize: r = { min: 2, max: 6 }
|
|
85
85
|
}) => {
|
|
86
86
|
const o = x(null);
|
|
87
|
-
return
|
|
88
|
-
|
|
87
|
+
return h(() => {
|
|
88
|
+
R();
|
|
89
89
|
const p = () => {
|
|
90
90
|
if (!o.current) return;
|
|
91
91
|
const i = o.current, t = document.createElement("div");
|
|
@@ -98,7 +98,7 @@ const j = h`
|
|
|
98
98
|
for (let i = 0; i < 4; i++) setTimeout(p, i * 100);
|
|
99
99
|
return () => clearInterval(f);
|
|
100
100
|
}, [e, a, r]), /* @__PURE__ */ n.jsxs(
|
|
101
|
-
|
|
101
|
+
v,
|
|
102
102
|
{
|
|
103
103
|
ref: o,
|
|
104
104
|
className: c,
|
|
@@ -108,7 +108,7 @@ const j = h`
|
|
|
108
108
|
},
|
|
109
109
|
children: [
|
|
110
110
|
/* @__PURE__ */ n.jsxs(
|
|
111
|
-
|
|
111
|
+
C,
|
|
112
112
|
{
|
|
113
113
|
sx: {
|
|
114
114
|
width: Math.min(e, a),
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
import { Easing } from 'framer-motion';
|
|
4
|
+
export interface SScrollRevealProps extends Omit<BoxProps, 'children'> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
duration?: number;
|
|
7
|
+
ease?: Easing;
|
|
8
|
+
threshold?: number;
|
|
9
|
+
rootMargin?: string;
|
|
10
|
+
delay?: number;
|
|
11
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
12
|
+
distance?: number;
|
|
13
|
+
scale?: boolean;
|
|
14
|
+
rotate?: boolean;
|
|
15
|
+
stagger?: boolean;
|
|
16
|
+
staggerDelay?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const SScrollReveal: React.FC<SScrollRevealProps>;
|
|
19
|
+
/**
|
|
20
|
+
* SScrollReveal - A container component that reveals its children with smooth animations when they enter the viewport
|
|
21
|
+
*
|
|
22
|
+
* This component uses the Intersection Observer API to detect when elements come into view and applies
|
|
23
|
+
* customizable animation effects including directional movement, scaling, rotation, and staggered animations.
|
|
24
|
+
* Built on MUI Box with full styling support and optimized for performance.
|
|
25
|
+
*
|
|
26
|
+
* Key features:
|
|
27
|
+
* - Scroll-triggered animations with customizable timing
|
|
28
|
+
* - Support for multiple animation directions (up, down, left, right)
|
|
29
|
+
* - Optional scaling and rotation effects
|
|
30
|
+
* - Staggered animations for multiple children
|
|
31
|
+
* - Full MUI Box props support for styling
|
|
32
|
+
* - Performance-optimized with Intersection Observer
|
|
33
|
+
* - Responsive and accessible
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <SScrollReveal direction="up" duration={0.8} stagger={true}>
|
|
38
|
+
* <Typography>This text will slide up</Typography>
|
|
39
|
+
* <Button>This button will follow</Button>
|
|
40
|
+
* </SScrollReveal>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <SScrollReveal
|
|
46
|
+
* direction="left"
|
|
47
|
+
* distance={100}
|
|
48
|
+
* scale={false}
|
|
49
|
+
* delay={200}
|
|
50
|
+
* sx={{ padding: 2 }}
|
|
51
|
+
* >
|
|
52
|
+
* <Card>Slides in from the left</Card>
|
|
53
|
+
* </SScrollReveal>
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export default SScrollReveal;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { j as o } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import B from "react";
|
|
3
|
+
import { Box as e } from "@mui/material";
|
|
4
|
+
import { motion as p } from "framer-motion";
|
|
5
|
+
import { useScrollAnimation as E } from "../hooks/use-scroll-animation.js";
|
|
6
|
+
const F = ({
|
|
7
|
+
children: a,
|
|
8
|
+
duration: h = 0.6,
|
|
9
|
+
ease: v = "easeOut",
|
|
10
|
+
threshold: u,
|
|
11
|
+
rootMargin: x,
|
|
12
|
+
delay: t,
|
|
13
|
+
direction: j,
|
|
14
|
+
distance: R,
|
|
15
|
+
scale: s = !0,
|
|
16
|
+
rotate: r = !1,
|
|
17
|
+
stagger: i = !0,
|
|
18
|
+
staggerDelay: S = 0.1,
|
|
19
|
+
sx: b,
|
|
20
|
+
...y
|
|
21
|
+
}) => {
|
|
22
|
+
const { ref: C, animate: A, initialPosition: l, finalPosition: c } = E({
|
|
23
|
+
threshold: u,
|
|
24
|
+
rootMargin: x,
|
|
25
|
+
delay: t,
|
|
26
|
+
direction: j,
|
|
27
|
+
distance: R
|
|
28
|
+
}), m = s ? { ...l, scale: 0.85 } : l, d = s ? { ...c, scale: 1 } : c, n = r ? { ...m, rotate: -2 } : m, f = r ? { ...d, rotate: 0 } : d, P = {
|
|
29
|
+
hidden: { opacity: 0 },
|
|
30
|
+
visible: {
|
|
31
|
+
opacity: 1,
|
|
32
|
+
transition: {
|
|
33
|
+
staggerChildren: i ? S : 0,
|
|
34
|
+
delayChildren: t ? t / 1e3 : 0
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, V = {
|
|
38
|
+
hidden: n,
|
|
39
|
+
visible: f
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ o.jsx(e, { sx: { overflow: "hidden", ...b }, ...y, children: /* @__PURE__ */ o.jsx(
|
|
42
|
+
e,
|
|
43
|
+
{
|
|
44
|
+
component: p.div,
|
|
45
|
+
ref: C,
|
|
46
|
+
variants: i ? P : void 0,
|
|
47
|
+
initial: i ? "hidden" : n,
|
|
48
|
+
animate: A ? i ? "visible" : f : i ? "hidden" : n,
|
|
49
|
+
transition: {
|
|
50
|
+
duration: h,
|
|
51
|
+
ease: v,
|
|
52
|
+
type: "spring",
|
|
53
|
+
stiffness: 80,
|
|
54
|
+
damping: 20,
|
|
55
|
+
mass: 0.8
|
|
56
|
+
},
|
|
57
|
+
children: i ? B.Children.toArray(a).map((_, w) => /* @__PURE__ */ o.jsx(e, { component: p.div, variants: V, children: _ }, w)) : a
|
|
58
|
+
}
|
|
59
|
+
) });
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
F as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TypographyProps } from '@mui/material';
|
|
2
|
+
export interface STypewriterTextProps extends Omit<TypographyProps, 'children'> {
|
|
3
|
+
text: string | string[];
|
|
4
|
+
speed?: number;
|
|
5
|
+
cursor?: string;
|
|
6
|
+
cursorBlinking?: boolean;
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
deleteSpeed?: number;
|
|
9
|
+
delay?: number;
|
|
10
|
+
}
|
|
11
|
+
declare function STypewriterText({ text, speed, cursor, cursorBlinking, loop, deleteSpeed, delay, ...typographyProps }: STypewriterTextProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default STypewriterText;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { j as y } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { useState as n, useEffect as j } from "react";
|
|
3
|
+
import { Typography as k, Box as D } from "@mui/material";
|
|
4
|
+
function B({
|
|
5
|
+
text: r,
|
|
6
|
+
speed: c = 100,
|
|
7
|
+
cursor: T = "|",
|
|
8
|
+
cursorBlinking: g = !0,
|
|
9
|
+
loop: l = !1,
|
|
10
|
+
deleteSpeed: f = 50,
|
|
11
|
+
delay: u = 1500,
|
|
12
|
+
...h
|
|
13
|
+
}) {
|
|
14
|
+
const [s, x] = n(""), [i, m] = n(0), [o, p] = n(!1), [A, I] = n(0), a = Array.isArray(r) ? r : [r], t = a[A] || "";
|
|
15
|
+
return j(() => {
|
|
16
|
+
if (!t) return;
|
|
17
|
+
const d = setTimeout(
|
|
18
|
+
() => {
|
|
19
|
+
o ? s.length > 0 ? x((e) => e.slice(0, -1)) : (p(!1), m(0), I((e) => (e + 1) % a.length)) : i < t.length ? (x((e) => e + t[i]), m((e) => e + 1)) : l && setTimeout(() => p(!0), u);
|
|
20
|
+
},
|
|
21
|
+
o ? f : c
|
|
22
|
+
);
|
|
23
|
+
return () => clearTimeout(d);
|
|
24
|
+
}, [i, o, t, l, c, f, u, s, a.length]), /* @__PURE__ */ y.jsxs(k, { component: "span", ...h, children: [
|
|
25
|
+
s,
|
|
26
|
+
/* @__PURE__ */ y.jsx(
|
|
27
|
+
D,
|
|
28
|
+
{
|
|
29
|
+
component: "span",
|
|
30
|
+
sx: {
|
|
31
|
+
animation: g ? "blink 1s infinite" : "none",
|
|
32
|
+
"@keyframes blink": {
|
|
33
|
+
"0%, 50%": { opacity: 1 },
|
|
34
|
+
"51%, 100%": { opacity: 0 }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
children: T
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
B as default
|
|
44
|
+
};
|
|
@@ -118,6 +118,32 @@ export declare const purple: {
|
|
|
118
118
|
800: string;
|
|
119
119
|
900: string;
|
|
120
120
|
};
|
|
121
|
+
export declare const blackAlpha: {
|
|
122
|
+
0: string;
|
|
123
|
+
10: string;
|
|
124
|
+
20: string;
|
|
125
|
+
30: string;
|
|
126
|
+
40: string;
|
|
127
|
+
50: string;
|
|
128
|
+
60: string;
|
|
129
|
+
70: string;
|
|
130
|
+
80: string;
|
|
131
|
+
90: string;
|
|
132
|
+
100: string;
|
|
133
|
+
};
|
|
134
|
+
export declare const whiteAlpha: {
|
|
135
|
+
0: string;
|
|
136
|
+
10: string;
|
|
137
|
+
20: string;
|
|
138
|
+
30: string;
|
|
139
|
+
40: string;
|
|
140
|
+
50: string;
|
|
141
|
+
60: string;
|
|
142
|
+
70: string;
|
|
143
|
+
80: string;
|
|
144
|
+
90: string;
|
|
145
|
+
100: string;
|
|
146
|
+
};
|
|
121
147
|
export declare const colorSchemes: {
|
|
122
148
|
light: {
|
|
123
149
|
palette: {
|
|
@@ -127,6 +153,20 @@ export declare const colorSchemes: {
|
|
|
127
153
|
indigo: string;
|
|
128
154
|
sky: string;
|
|
129
155
|
};
|
|
156
|
+
blackAlpha: {
|
|
157
|
+
zero: string;
|
|
158
|
+
light: string;
|
|
159
|
+
medium: string;
|
|
160
|
+
dark: string;
|
|
161
|
+
full: string;
|
|
162
|
+
};
|
|
163
|
+
whiteAlpha: {
|
|
164
|
+
zero: string;
|
|
165
|
+
light: string;
|
|
166
|
+
medium: string;
|
|
167
|
+
dark: string;
|
|
168
|
+
full: string;
|
|
169
|
+
};
|
|
130
170
|
ui: {
|
|
131
171
|
pulse: {
|
|
132
172
|
shadowLight: string;
|
|
@@ -201,6 +241,20 @@ export declare const colorSchemes: {
|
|
|
201
241
|
indigo: string;
|
|
202
242
|
sky: string;
|
|
203
243
|
};
|
|
244
|
+
blackAlpha: {
|
|
245
|
+
zero: string;
|
|
246
|
+
light: string;
|
|
247
|
+
medium: string;
|
|
248
|
+
dark: string;
|
|
249
|
+
full: string;
|
|
250
|
+
};
|
|
251
|
+
whiteAlpha: {
|
|
252
|
+
zero: string;
|
|
253
|
+
light: string;
|
|
254
|
+
medium: string;
|
|
255
|
+
dark: string;
|
|
256
|
+
full: string;
|
|
257
|
+
};
|
|
204
258
|
ui: {
|
|
205
259
|
pulse: {
|
|
206
260
|
shadowLight: string;
|