@szum-tech/design-system 3.8.1 → 3.10.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/dist/chunk-2WQJ36RD.cjs +78 -0
- package/dist/{chunk-O3DHBQA5.cjs → chunk-3GNVQFCK.cjs} +1 -1
- package/dist/{chunk-SYKUS2RV.js → chunk-3MH6P44N.js} +2 -2
- package/dist/{chunk-3BLXG7ET.js → chunk-3RK5PCIC.js} +1 -1
- package/dist/{chunk-2Q2BIWBE.js → chunk-5MV54MWS.js} +1 -1
- package/dist/{chunk-YWG7TML6.cjs → chunk-6X26XC6P.cjs} +1 -1
- package/dist/chunk-A7SBXO2Y.cjs +40 -0
- package/dist/{chunk-ACJ3ES2B.js → chunk-BTSHACKG.js} +1 -1
- package/dist/{chunk-3DUJHGXE.cjs → chunk-CFJ44JVK.cjs} +1 -1
- package/dist/chunk-D4QID7AI.cjs +607 -0
- package/dist/chunk-DGWBE2Y3.cjs +205 -0
- package/dist/{chunk-Q5ONG5HB.cjs → chunk-DTYX7CYN.cjs} +2 -2
- package/dist/{chunk-3Z3GVXXN.cjs → chunk-EG374TED.cjs} +57 -89
- package/dist/chunk-EUH466AL.cjs +179 -0
- package/dist/chunk-F7N6WQV6.cjs +53 -0
- package/dist/chunk-GYXQUTWZ.cjs +59 -0
- package/dist/chunk-IWF52DDE.js +55 -0
- package/dist/{chunk-SZ3LC2VO.js → chunk-JLKQ6WKK.js} +53 -85
- package/dist/chunk-K5AURCK5.js +183 -0
- package/dist/{chunk-XV3AQ6NS.js → chunk-KGGCA634.js} +1 -1
- package/dist/chunk-OCOCENE6.js +42 -0
- package/dist/chunk-R65CJGEQ.js +48 -0
- package/dist/chunk-TKZOB6C3.cjs +70 -0
- package/dist/{chunk-FKCWRNWB.js → chunk-U3QKV7I4.js} +1 -1
- package/dist/chunk-U7XZJQ4O.js +36 -0
- package/dist/{chunk-X55H6LRX.cjs → chunk-ULEEQ723.cjs} +1 -1
- package/dist/{chunk-BAWVLSRF.cjs → chunk-VK5EX3OG.cjs} +1 -1
- package/dist/{chunk-UW6GOD7J.js → chunk-VT5GDGZJ.js} +1 -1
- package/dist/chunk-WMGJCB7O.js +157 -0
- package/dist/chunk-YEFLGE3L.cjs +47 -0
- package/dist/chunk-YQ6J6VOI.js +48 -0
- package/dist/chunk-YSYZKK24.js +575 -0
- package/dist/chunk-YUMKV5TH.js +56 -0
- package/dist/{chunk-Z6CZAPVG.cjs → chunk-ZVF7J4EI.cjs} +1 -1
- package/dist/components/accordion/index.cjs +23 -0
- package/dist/components/accordion/index.d.cts +17 -0
- package/dist/components/accordion/index.d.ts +17 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/alert/index.cjs +4 -4
- package/dist/components/alert/index.js +1 -1
- package/dist/components/badge/index.cjs +4 -4
- package/dist/components/badge/index.js +1 -1
- package/dist/components/button/index.cjs +23 -16
- package/dist/components/button/index.js +22 -15
- package/dist/components/color-swatch/index.cjs +2 -2
- package/dist/components/color-swatch/index.js +1 -1
- package/dist/components/counting-number/index.cjs +11 -0
- package/dist/components/counting-number/index.d.cts +18 -0
- package/dist/components/counting-number/index.d.ts +18 -0
- package/dist/components/counting-number/index.js +2 -0
- package/dist/components/dialog/index.cjs +9 -9
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/field/index.cjs +11 -11
- package/dist/components/field/index.js +1 -1
- package/dist/components/header/index.cjs +2 -2
- package/dist/components/header/index.js +1 -1
- package/dist/components/index.cjs +251 -144
- package/dist/components/index.d.cts +12 -3
- package/dist/components/index.d.ts +12 -3
- package/dist/components/index.js +22 -15
- package/dist/components/item/index.cjs +11 -11
- package/dist/components/item/index.js +1 -1
- package/dist/components/marquee/index.cjs +11 -0
- package/dist/components/marquee/index.d.cts +48 -0
- package/dist/components/marquee/index.d.ts +48 -0
- package/dist/components/marquee/index.js +2 -0
- package/dist/components/status/index.cjs +19 -0
- package/dist/components/status/index.d.cts +25 -0
- package/dist/components/status/index.d.ts +25 -0
- package/dist/components/status/index.js +2 -0
- package/dist/components/stepper/index.cjs +41 -34
- package/dist/components/stepper/index.d.cts +5 -4
- package/dist/components/stepper/index.d.ts +5 -4
- package/dist/components/stepper/index.js +22 -15
- package/dist/components/tabs/index.cjs +23 -0
- package/dist/components/tabs/index.d.cts +17 -0
- package/dist/components/tabs/index.d.ts +17 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/timeline/index.cjs +44 -0
- package/dist/components/timeline/index.d.cts +62 -0
- package/dist/components/timeline/index.d.ts +62 -0
- package/dist/components/timeline/index.js +3 -0
- package/dist/components/toaster/index.cjs +24 -17
- package/dist/components/toaster/index.js +22 -15
- package/dist/components/tooltip/index.cjs +9 -4
- package/dist/components/tooltip/index.d.cts +8 -12
- package/dist/components/tooltip/index.d.ts +8 -12
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/typing-text/index.cjs +11 -0
- package/dist/components/typing-text/index.d.cts +40 -0
- package/dist/components/typing-text/index.d.ts +40 -0
- package/dist/components/typing-text/index.js +2 -0
- package/dist/components/word-rotate/index.cjs +11 -0
- package/dist/components/word-rotate/index.d.cts +29 -0
- package/dist/components/word-rotate/index.d.ts +29 -0
- package/dist/components/word-rotate/index.js +2 -0
- package/dist/direction-CUOPDLCj.d.cts +7 -0
- package/dist/direction-CUOPDLCj.d.ts +7 -0
- package/package.json +37 -49
- package/tailwind/animation.css +23 -1
- package/tailwind/global.css +5 -0
- package/tailwind/palette.css +2 -2
- package/dist/chunk-EW6TE3N5.cjs +0 -38
- package/dist/chunk-GR37JJQK.cjs +0 -43
- package/dist/chunk-H5O5L6XT.js +0 -14
- package/dist/chunk-HJJPEVIH.js +0 -40
- package/dist/contexts/index.cjs +0 -18
- package/dist/contexts/index.d.cts +0 -11
- package/dist/contexts/index.d.ts +0 -11
- package/dist/contexts/index.js +0 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var react = require('motion/react');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
function CountingNumber({
|
|
29
|
+
from = 0,
|
|
30
|
+
to = 100,
|
|
31
|
+
duration = 2,
|
|
32
|
+
delay = 0,
|
|
33
|
+
className,
|
|
34
|
+
startOnView = true,
|
|
35
|
+
once = false,
|
|
36
|
+
inViewMargin,
|
|
37
|
+
onComplete,
|
|
38
|
+
format,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
const ref = React__namespace.useRef(null);
|
|
42
|
+
const isInView = react.useInView(ref, { once, margin: inViewMargin });
|
|
43
|
+
const [hasAnimated, setHasAnimated] = React__namespace.useState(false);
|
|
44
|
+
const [display, setDisplay] = React__namespace.useState(from);
|
|
45
|
+
const motionValue = react.useMotionValue(from);
|
|
46
|
+
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
47
|
+
React__namespace.useEffect(() => {
|
|
48
|
+
if (!shouldStart) return;
|
|
49
|
+
setHasAnimated(true);
|
|
50
|
+
motionValue.set(from);
|
|
51
|
+
setDisplay(from);
|
|
52
|
+
let controls;
|
|
53
|
+
const timeout = setTimeout(() => {
|
|
54
|
+
controls = react.animate(motionValue, to, {
|
|
55
|
+
duration,
|
|
56
|
+
onUpdate: (v) => setDisplay(v),
|
|
57
|
+
onComplete
|
|
58
|
+
});
|
|
59
|
+
}, delay);
|
|
60
|
+
return () => {
|
|
61
|
+
clearTimeout(timeout);
|
|
62
|
+
if (controls) {
|
|
63
|
+
controls.stop();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}, [shouldStart, from, to, duration, delay]);
|
|
67
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.motion.span, { ref, "data-slot": "counting-number", className: chunkH2BWO3SI_cjs.cn("inline-block", className), ...props, children: format ? format(display) : Math.round(display) });
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
exports.CountingNumber = CountingNumber;
|
|
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var badgeVariants = cva(
|
|
7
|
-
"border-border focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden
|
|
7
|
+
"border-border focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring [&>svg]:pointer-events-none [&>svg]:size-3",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { Tooltip as Tooltip$1 } from 'radix-ui';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function TooltipProvider({
|
|
6
|
+
delayDuration = 0,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
|
|
10
|
+
}
|
|
11
|
+
function Tooltip(props) {
|
|
12
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props }) });
|
|
13
|
+
}
|
|
14
|
+
function TooltipTrigger(props) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
16
|
+
}
|
|
17
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsxs(
|
|
19
|
+
Tooltip$1.Content,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "tooltip-content",
|
|
22
|
+
sideOffset,
|
|
23
|
+
className: cn(
|
|
24
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
...props,
|
|
28
|
+
children: [
|
|
29
|
+
children,
|
|
30
|
+
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
) });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Tooltip, TooltipContent, TooltipTrigger };
|
|
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
28
|
|
|
29
29
|
var colorSwatchVariants = classVarianceAuthority.cva(
|
|
30
|
-
"border-border box-border rounded border
|
|
30
|
+
"border-border box-border rounded border [background-clip:padding-box] shadow-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
31
31
|
{
|
|
32
32
|
variants: {
|
|
33
33
|
size: {
|
|
@@ -15,7 +15,7 @@ function DialogClose(props) {
|
|
|
15
15
|
}
|
|
16
16
|
var dialogContentVariants = classVarianceAuthority.cva(
|
|
17
17
|
[
|
|
18
|
-
"bg-background border-border fixed
|
|
18
|
+
"bg-background border-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded border p-6 shadow-lg duration-200",
|
|
19
19
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 "
|
|
20
20
|
],
|
|
21
21
|
{
|
|
@@ -5,7 +5,7 @@ function Header({ children, ...props }) {
|
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
"header",
|
|
7
7
|
{
|
|
8
|
-
className: "bg-
|
|
8
|
+
className: "border-border/40 bg-background/95 supports-backdrop-filter:bg-background/60 sticky top-0 z-50 w-full border-b backdrop-blur",
|
|
9
9
|
...props,
|
|
10
10
|
children: /* @__PURE__ */ jsx("div", { className: "container flex h-16 items-center", children })
|
|
11
11
|
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useInView, motion } from 'motion/react';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var cursorVariants = {
|
|
7
|
+
blinking: {
|
|
8
|
+
opacity: [0, 0, 1, 1],
|
|
9
|
+
transition: {
|
|
10
|
+
duration: 1,
|
|
11
|
+
repeat: Infinity,
|
|
12
|
+
repeatDelay: 0,
|
|
13
|
+
ease: "linear",
|
|
14
|
+
times: [0, 0.5, 0.5, 1]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var animationVariants = {
|
|
19
|
+
fadeIn: {
|
|
20
|
+
hidden: { opacity: 0, y: 10 },
|
|
21
|
+
show: { opacity: 1, y: 0 },
|
|
22
|
+
exit: { opacity: 0 }
|
|
23
|
+
},
|
|
24
|
+
blurIn: {
|
|
25
|
+
hidden: { opacity: 0, filter: "blur(4px)" },
|
|
26
|
+
show: { opacity: 1, filter: "blur(0px)" },
|
|
27
|
+
exit: { opacity: 0, filter: "blur(4px)" }
|
|
28
|
+
},
|
|
29
|
+
blurInUp: {
|
|
30
|
+
hidden: { opacity: 0, y: 20, filter: "blur(4px)" },
|
|
31
|
+
show: { opacity: 1, y: 0, filter: "blur(0px)" },
|
|
32
|
+
exit: { opacity: 0, y: -20, filter: "blur(4px)" }
|
|
33
|
+
},
|
|
34
|
+
blurInDown: {
|
|
35
|
+
hidden: { opacity: 0, y: -20, filter: "blur(4px)" },
|
|
36
|
+
show: { opacity: 1, y: 0, filter: "blur(0px)" },
|
|
37
|
+
exit: { opacity: 0, y: 20, filter: "blur(4px)" }
|
|
38
|
+
},
|
|
39
|
+
slideUp: {
|
|
40
|
+
hidden: { opacity: 0, y: 20 },
|
|
41
|
+
show: { opacity: 1, y: 0 },
|
|
42
|
+
exit: { opacity: 0, y: -20 }
|
|
43
|
+
},
|
|
44
|
+
slideDown: {
|
|
45
|
+
hidden: { opacity: 0, y: -20 },
|
|
46
|
+
show: { opacity: 1, y: 0 },
|
|
47
|
+
exit: { opacity: 0, y: 20 }
|
|
48
|
+
},
|
|
49
|
+
slideLeft: {
|
|
50
|
+
hidden: { opacity: 0, x: 20 },
|
|
51
|
+
show: { opacity: 1, x: 0 },
|
|
52
|
+
exit: { opacity: 0, x: -20 }
|
|
53
|
+
},
|
|
54
|
+
slideRight: {
|
|
55
|
+
hidden: { opacity: 0, x: -20 },
|
|
56
|
+
show: { opacity: 1, x: 0 },
|
|
57
|
+
exit: { opacity: 0, x: 20 }
|
|
58
|
+
},
|
|
59
|
+
scaleUp: {
|
|
60
|
+
hidden: { opacity: 0, scale: 0.8 },
|
|
61
|
+
show: { opacity: 1, scale: 1 },
|
|
62
|
+
exit: { opacity: 0, scale: 1.2 }
|
|
63
|
+
},
|
|
64
|
+
scaleDown: {
|
|
65
|
+
hidden: { opacity: 0, scale: 1.2 },
|
|
66
|
+
show: { opacity: 1, scale: 1 },
|
|
67
|
+
exit: { opacity: 0, scale: 0.8 }
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
function TypingText({
|
|
71
|
+
text,
|
|
72
|
+
texts,
|
|
73
|
+
speed = 100,
|
|
74
|
+
delay = 0,
|
|
75
|
+
showCursor = true,
|
|
76
|
+
cursorClassName = "",
|
|
77
|
+
cursor = "|",
|
|
78
|
+
loop = false,
|
|
79
|
+
pauseDuration = 2e3,
|
|
80
|
+
className,
|
|
81
|
+
onComplete,
|
|
82
|
+
startOnView = true,
|
|
83
|
+
once = false,
|
|
84
|
+
animation = "fadeIn",
|
|
85
|
+
inViewMargin,
|
|
86
|
+
...props
|
|
87
|
+
}) {
|
|
88
|
+
const ref = React.useRef(null);
|
|
89
|
+
const isInView = useInView(ref, { once, margin: inViewMargin });
|
|
90
|
+
const [hasAnimated, setHasAnimated] = React.useState(false);
|
|
91
|
+
const [displayText, setDisplayText] = React.useState("");
|
|
92
|
+
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
93
|
+
const [isTyping, setIsTyping] = React.useState(false);
|
|
94
|
+
const [currentTextIndex, setCurrentTextIndex] = React.useState(0);
|
|
95
|
+
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
96
|
+
const textArray = texts && texts.length > 0 ? texts : [text];
|
|
97
|
+
const currentText = textArray[currentTextIndex] ?? "";
|
|
98
|
+
React.useEffect(() => {
|
|
99
|
+
if (!shouldStart) return;
|
|
100
|
+
const timeout = setTimeout(() => {
|
|
101
|
+
setIsTyping(true);
|
|
102
|
+
setHasAnimated(true);
|
|
103
|
+
}, delay);
|
|
104
|
+
return () => clearTimeout(timeout);
|
|
105
|
+
}, [delay, shouldStart]);
|
|
106
|
+
React.useEffect(() => {
|
|
107
|
+
if (!isTyping) return;
|
|
108
|
+
if (currentIndex < currentText.length) {
|
|
109
|
+
const timeout = setTimeout(() => {
|
|
110
|
+
setDisplayText(currentText.slice(0, currentIndex + 1));
|
|
111
|
+
setCurrentIndex(currentIndex + 1);
|
|
112
|
+
}, speed);
|
|
113
|
+
return () => clearTimeout(timeout);
|
|
114
|
+
} else {
|
|
115
|
+
onComplete?.();
|
|
116
|
+
if (loop && texts && texts.length > 1) {
|
|
117
|
+
const timeout = setTimeout(() => {
|
|
118
|
+
setDisplayText("");
|
|
119
|
+
setCurrentIndex(0);
|
|
120
|
+
setCurrentTextIndex((prev) => (prev + 1) % texts.length);
|
|
121
|
+
}, pauseDuration);
|
|
122
|
+
return () => clearTimeout(timeout);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, [currentIndex, currentText, isTyping, speed, loop, texts, pauseDuration, onComplete]);
|
|
126
|
+
const selectedVariants = animationVariants[animation];
|
|
127
|
+
const MotionComponent = motion.span;
|
|
128
|
+
return /* @__PURE__ */ jsx(
|
|
129
|
+
MotionComponent,
|
|
130
|
+
{
|
|
131
|
+
ref,
|
|
132
|
+
variants: selectedVariants,
|
|
133
|
+
initial: "hidden",
|
|
134
|
+
whileInView: startOnView ? "show" : void 0,
|
|
135
|
+
animate: startOnView ? void 0 : "show",
|
|
136
|
+
exit: "exit",
|
|
137
|
+
className: cn("whitespace-pre-wrap", className),
|
|
138
|
+
viewport: { once },
|
|
139
|
+
"data-slot": "typing-text",
|
|
140
|
+
...props,
|
|
141
|
+
children: /* @__PURE__ */ jsxs("span", { style: { display: "inline-flex", alignItems: "center" }, children: [
|
|
142
|
+
displayText,
|
|
143
|
+
showCursor && /* @__PURE__ */ jsx(
|
|
144
|
+
motion.span,
|
|
145
|
+
{
|
|
146
|
+
variants: cursorVariants,
|
|
147
|
+
animate: "blinking",
|
|
148
|
+
className: cn("text-foreground ms-1 inline-block w-px font-normal select-none", cursorClassName),
|
|
149
|
+
children: cursor
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] })
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export { TypingText };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var radixUi = require('radix-ui');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function Tabs({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tabs.Root, { "data-slot": "tabs", className: chunkH2BWO3SI_cjs.cn("flex flex-col gap-2", className), ...props });
|
|
9
|
+
}
|
|
10
|
+
function TabsList({ className, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12
|
+
radixUi.Tabs.List,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "tabs-list",
|
|
15
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
16
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded p-0.75",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function TabsTrigger({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
radixUi.Tabs.Trigger,
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "tabs-trigger",
|
|
28
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
29
|
+
"text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow]",
|
|
30
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:shadow-sm",
|
|
31
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring focus-visible:ring-[3px] focus-visible:outline-1",
|
|
32
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
33
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function TabsContent({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tabs.Content, { "data-slot": "tabs-content", className: chunkH2BWO3SI_cjs.cn("flex-1 outline-none", className), ...props });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.Tabs = Tabs;
|
|
45
|
+
exports.TabsContent = TabsContent;
|
|
46
|
+
exports.TabsList = TabsList;
|
|
47
|
+
exports.TabsTrigger = TabsTrigger;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useInView, useMotionValue, animate, motion } from 'motion/react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function CountingNumber({
|
|
7
|
+
from = 0,
|
|
8
|
+
to = 100,
|
|
9
|
+
duration = 2,
|
|
10
|
+
delay = 0,
|
|
11
|
+
className,
|
|
12
|
+
startOnView = true,
|
|
13
|
+
once = false,
|
|
14
|
+
inViewMargin,
|
|
15
|
+
onComplete,
|
|
16
|
+
format,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
const ref = React.useRef(null);
|
|
20
|
+
const isInView = useInView(ref, { once, margin: inViewMargin });
|
|
21
|
+
const [hasAnimated, setHasAnimated] = React.useState(false);
|
|
22
|
+
const [display, setDisplay] = React.useState(from);
|
|
23
|
+
const motionValue = useMotionValue(from);
|
|
24
|
+
const shouldStart = !startOnView || isInView && (!once || !hasAnimated);
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
if (!shouldStart) return;
|
|
27
|
+
setHasAnimated(true);
|
|
28
|
+
motionValue.set(from);
|
|
29
|
+
setDisplay(from);
|
|
30
|
+
let controls;
|
|
31
|
+
const timeout = setTimeout(() => {
|
|
32
|
+
controls = animate(motionValue, to, {
|
|
33
|
+
duration,
|
|
34
|
+
onUpdate: (v) => setDisplay(v),
|
|
35
|
+
onComplete
|
|
36
|
+
});
|
|
37
|
+
}, delay);
|
|
38
|
+
return () => {
|
|
39
|
+
clearTimeout(timeout);
|
|
40
|
+
if (controls) {
|
|
41
|
+
controls.stop();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}, [shouldStart, from, to, duration, delay]);
|
|
45
|
+
return /* @__PURE__ */ jsx(motion.span, { ref, "data-slot": "counting-number", className: cn("inline-block", className), ...props, children: format ? format(display) : Math.round(display) });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { CountingNumber };
|