@neasg/design-system 0.1.3 → 0.2.1
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 +102 -14
- package/dist/animated-icons/arrow-down.d.ts +10 -0
- package/dist/animated-icons/arrow-down.js +54 -0
- package/dist/animated-icons/arrow-up.d.ts +10 -0
- package/dist/animated-icons/arrow-up.js +54 -0
- package/dist/animated-icons/bell.d.ts +10 -0
- package/dist/animated-icons/bell.js +42 -0
- package/dist/animated-icons/bold.d.ts +10 -0
- package/dist/animated-icons/bold.js +45 -0
- package/dist/animated-icons/book-open.d.ts +10 -0
- package/dist/animated-icons/book-open.js +55 -0
- package/dist/animated-icons/building.d.ts +10 -0
- package/dist/animated-icons/building.js +46 -0
- package/dist/animated-icons/check.d.ts +10 -0
- package/dist/animated-icons/check.js +55 -0
- package/dist/animated-icons/chevron-down.d.ts +10 -0
- package/dist/animated-icons/chevron-down.js +42 -0
- package/dist/animated-icons/chevron-left.d.ts +10 -0
- package/dist/animated-icons/chevron-left.js +42 -0
- package/dist/animated-icons/chevron-right.d.ts +10 -0
- package/dist/animated-icons/chevron-right.js +42 -0
- package/dist/animated-icons/chevron-up.d.ts +10 -0
- package/dist/animated-icons/chevron-up.js +42 -0
- package/dist/animated-icons/clipboard-check.d.ts +10 -0
- package/dist/animated-icons/clipboard-check.js +56 -0
- package/dist/animated-icons/download.d.ts +10 -0
- package/dist/animated-icons/download.js +47 -0
- package/dist/animated-icons/external-link.d.ts +10 -0
- package/dist/animated-icons/external-link.js +59 -0
- package/dist/animated-icons/eye.d.ts +10 -0
- package/dist/animated-icons/eye.js +41 -0
- package/dist/animated-icons/file-text.d.ts +11 -0
- package/dist/animated-icons/file-text.js +89 -0
- package/dist/animated-icons/filter.d.ts +10 -0
- package/dist/animated-icons/filter.js +78 -0
- package/dist/animated-icons/folder-open.d.ts +10 -0
- package/dist/animated-icons/folder-open.js +46 -0
- package/dist/animated-icons/form.d.ts +10 -0
- package/dist/animated-icons/form.js +56 -0
- package/dist/animated-icons/git-branch.d.ts +10 -0
- package/dist/animated-icons/git-branch.js +56 -0
- package/dist/animated-icons/grip-horizontal.d.ts +10 -0
- package/dist/animated-icons/grip-horizontal.js +70 -0
- package/dist/animated-icons/grip-vertical.d.ts +10 -0
- package/dist/animated-icons/grip-vertical.js +67 -0
- package/dist/animated-icons/grip.d.ts +10 -0
- package/dist/animated-icons/grip.js +72 -0
- package/dist/animated-icons/highlighter.d.ts +10 -0
- package/dist/animated-icons/highlighter.js +46 -0
- package/dist/animated-icons/history.d.ts +10 -0
- package/dist/animated-icons/history.js +80 -0
- package/dist/animated-icons/index.d.ts +100 -0
- package/dist/animated-icons/index.js +50 -0
- package/dist/animated-icons/italic.d.ts +10 -0
- package/dist/animated-icons/italic.js +45 -0
- package/dist/animated-icons/link.d.ts +10 -0
- package/dist/animated-icons/link.js +51 -0
- package/dist/animated-icons/list-ordered.d.ts +10 -0
- package/dist/animated-icons/list-ordered.js +46 -0
- package/dist/animated-icons/list.d.ts +10 -0
- package/dist/animated-icons/list.js +56 -0
- package/dist/animated-icons/loader-pinwheel.d.ts +10 -0
- package/dist/animated-icons/loader-pinwheel.js +51 -0
- package/dist/animated-icons/logout.d.ts +10 -0
- package/dist/animated-icons/logout.js +44 -0
- package/dist/animated-icons/maximize.d.ts +10 -0
- package/dist/animated-icons/maximize.js +45 -0
- package/dist/animated-icons/message-square.d.ts +10 -0
- package/dist/animated-icons/message-square.js +56 -0
- package/dist/animated-icons/palette.d.ts +10 -0
- package/dist/animated-icons/palette.js +45 -0
- package/dist/animated-icons/paperclip.d.ts +10 -0
- package/dist/animated-icons/paperclip.js +45 -0
- package/dist/animated-icons/pencil.d.ts +10 -0
- package/dist/animated-icons/pencil.js +46 -0
- package/dist/animated-icons/plus.d.ts +10 -0
- package/dist/animated-icons/plus.js +42 -0
- package/dist/animated-icons/search.d.ts +10 -0
- package/dist/animated-icons/search.js +44 -0
- package/dist/animated-icons/send.d.ts +10 -0
- package/dist/animated-icons/send.js +46 -0
- package/dist/animated-icons/settings.d.ts +10 -0
- package/dist/animated-icons/settings.js +42 -0
- package/dist/animated-icons/shield.d.ts +10 -0
- package/dist/animated-icons/shield.js +45 -0
- package/dist/animated-icons/strikethrough.d.ts +10 -0
- package/dist/animated-icons/strikethrough.js +45 -0
- package/dist/animated-icons/timer.d.ts +10 -0
- package/dist/animated-icons/timer.js +70 -0
- package/dist/animated-icons/trash.d.ts +10 -0
- package/dist/animated-icons/trash.js +56 -0
- package/dist/animated-icons/trending-down.d.ts +10 -0
- package/dist/animated-icons/trending-down.js +86 -0
- package/dist/animated-icons/trending-up.d.ts +10 -0
- package/dist/animated-icons/trending-up.js +86 -0
- package/dist/animated-icons/underline.d.ts +10 -0
- package/dist/animated-icons/underline.js +45 -0
- package/dist/animated-icons/upload.d.ts +10 -0
- package/dist/animated-icons/upload.js +47 -0
- package/dist/animated-icons/users.d.ts +10 -0
- package/dist/animated-icons/users.js +45 -0
- package/dist/animated-icons/x.d.ts +10 -0
- package/dist/animated-icons/x.js +45 -0
- package/dist/avatar.d.ts +32 -0
- package/dist/avatar.js +21 -0
- package/dist/badge.d.ts +4 -3
- package/dist/badge.js +7 -12
- package/dist/breadcrumb.d.ts +30 -0
- package/dist/breadcrumb.js +32 -0
- package/dist/button.d.ts +2 -2
- package/dist/button.js +84 -6
- package/dist/command-search.d.ts +44 -0
- package/dist/command-search.js +73 -0
- package/dist/command.d.ts +77 -0
- package/dist/command.js +24 -0
- package/dist/count-badge.d.ts +10 -0
- package/dist/count-badge.js +34 -0
- package/dist/dialog-primitive.d.ts +22 -0
- package/dist/dialog-primitive.js +23 -0
- package/dist/dialog.d.ts +28 -0
- package/dist/dialog.js +60 -0
- package/dist/draggable-tabs.d.ts +27 -0
- package/dist/draggable-tabs.js +61 -0
- package/dist/drawer.d.ts +30 -0
- package/dist/drawer.js +77 -0
- package/dist/editable-table.d.ts +31 -0
- package/dist/editable-table.js +122 -0
- package/dist/email-input.d.ts +16 -0
- package/dist/email-input.js +55 -0
- package/dist/empty-state.d.ts +11 -0
- package/dist/empty-state.js +7 -0
- package/dist/field.d.ts +6 -0
- package/dist/field.js +18 -0
- package/dist/filter-toggle.d.ts +12 -0
- package/dist/filter-toggle.js +23 -0
- package/dist/govt-masthead.d.ts +9 -0
- package/dist/govt-masthead.js +8 -0
- package/dist/index.d.ts +55 -4
- package/dist/index.js +32 -4
- package/dist/input-control.d.ts +4 -0
- package/dist/input-control.js +7 -0
- package/dist/input-validation.d.ts +9 -0
- package/dist/input-validation.js +75 -0
- package/dist/input.d.ts +16 -0
- package/dist/input.js +22 -0
- package/dist/label-value-grid.d.ts +13 -0
- package/dist/label-value-grid.js +61 -0
- package/dist/label-value.d.ts +11 -0
- package/dist/label-value.js +19 -0
- package/dist/layout.d.ts +57 -0
- package/dist/layout.js +166 -0
- package/dist/otp-input.d.ts +21 -0
- package/dist/otp-input.js +60 -0
- package/dist/page-header.d.ts +9 -0
- package/dist/page-header.js +6 -0
- package/dist/pagination.d.ts +12 -0
- package/dist/pagination.js +24 -0
- package/dist/phone-input.d.ts +36 -0
- package/dist/phone-input.js +135 -0
- package/dist/right-drawer.d.ts +2 -0
- package/dist/right-drawer.js +1 -0
- package/dist/search-input-shell.d.ts +8 -0
- package/dist/search-input-shell.js +9 -0
- package/dist/search-input.d.ts +20 -0
- package/dist/search-input.js +73 -0
- package/dist/select-primitive.d.ts +17 -0
- package/dist/select-primitive.js +33 -0
- package/dist/select.d.ts +31 -0
- package/dist/select.js +97 -0
- package/dist/styles.css +111 -1
- package/dist/table-toolbar.d.ts +7 -0
- package/dist/table-toolbar.js +7 -0
- package/dist/table.d.ts +87 -3
- package/dist/table.js +102 -5
- package/dist/tabs.d.ts +24 -7
- package/dist/tabs.js +22 -26
- package/dist/tailwind-preset.d.ts +4 -0
- package/dist/tailwind-preset.js +97 -0
- package/dist/textarea.d.ts +16 -0
- package/dist/textarea.js +23 -0
- package/dist/theme.d.ts +259 -0
- package/dist/theme.js +118 -0
- package/dist/tooltip.d.ts +15 -3
- package/dist/tooltip.js +9 -4
- package/dist/typography.d.ts +11 -0
- package/dist/typography.js +41 -0
- package/dist/use-search-highlight.d.ts +13 -0
- package/dist/use-search-highlight.js +46 -0
- package/package.json +126 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const DEFAULT_TRANSITION = {
|
|
7
|
+
times: [0, 0.4, 1],
|
|
8
|
+
duration: 0.5,
|
|
9
|
+
};
|
|
10
|
+
const ChevronLeftIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
11
|
+
const controls = useAnimation();
|
|
12
|
+
const isControlledRef = useRef(false);
|
|
13
|
+
useImperativeHandle(ref, () => {
|
|
14
|
+
isControlledRef.current = true;
|
|
15
|
+
return {
|
|
16
|
+
startAnimation: () => controls.start("animate"),
|
|
17
|
+
stopAnimation: () => controls.start("normal"),
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
const handleMouseEnter = useCallback((e) => {
|
|
21
|
+
if (isControlledRef.current) {
|
|
22
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
controls.start("animate");
|
|
26
|
+
}
|
|
27
|
+
}, [controls, onMouseEnter]);
|
|
28
|
+
const handleMouseLeave = useCallback((e) => {
|
|
29
|
+
if (isControlledRef.current) {
|
|
30
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
controls.start("normal");
|
|
34
|
+
}
|
|
35
|
+
}, [controls, onMouseLeave]);
|
|
36
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx(motion.path, { animate: controls, d: "m15 18-6-6 6-6", transition: DEFAULT_TRANSITION, variants: {
|
|
37
|
+
normal: { x: 0 },
|
|
38
|
+
animate: { x: [0, -2, 0] },
|
|
39
|
+
} }) }) }));
|
|
40
|
+
});
|
|
41
|
+
ChevronLeftIcon.displayName = "ChevronLeftIcon";
|
|
42
|
+
export { ChevronLeftIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface ChevronRightIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface ChevronRightIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<ChevronRightIconProps & import("react").RefAttributes<ChevronRightIconHandle>>;
|
|
10
|
+
export { ChevronRightIcon };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const DEFAULT_TRANSITION = {
|
|
7
|
+
times: [0, 0.4, 1],
|
|
8
|
+
duration: 0.5,
|
|
9
|
+
};
|
|
10
|
+
const ChevronRightIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
11
|
+
const controls = useAnimation();
|
|
12
|
+
const isControlledRef = useRef(false);
|
|
13
|
+
useImperativeHandle(ref, () => {
|
|
14
|
+
isControlledRef.current = true;
|
|
15
|
+
return {
|
|
16
|
+
startAnimation: () => controls.start("animate"),
|
|
17
|
+
stopAnimation: () => controls.start("normal"),
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
const handleMouseEnter = useCallback((e) => {
|
|
21
|
+
if (isControlledRef.current) {
|
|
22
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
controls.start("animate");
|
|
26
|
+
}
|
|
27
|
+
}, [controls, onMouseEnter]);
|
|
28
|
+
const handleMouseLeave = useCallback((e) => {
|
|
29
|
+
if (isControlledRef.current) {
|
|
30
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
controls.start("normal");
|
|
34
|
+
}
|
|
35
|
+
}, [controls, onMouseLeave]);
|
|
36
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx(motion.path, { animate: controls, d: "m9 18 6-6-6-6", transition: DEFAULT_TRANSITION, variants: {
|
|
37
|
+
normal: { x: 0 },
|
|
38
|
+
animate: { x: [0, 2, 0] },
|
|
39
|
+
} }) }) }));
|
|
40
|
+
});
|
|
41
|
+
ChevronRightIcon.displayName = "ChevronRightIcon";
|
|
42
|
+
export { ChevronRightIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface ChevronUpIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface ChevronUpIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ChevronUpIcon: import("react").ForwardRefExoticComponent<ChevronUpIconProps & import("react").RefAttributes<ChevronUpIconHandle>>;
|
|
10
|
+
export { ChevronUpIcon };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const DEFAULT_TRANSITION = {
|
|
7
|
+
times: [0, 0.4, 1],
|
|
8
|
+
duration: 0.5,
|
|
9
|
+
};
|
|
10
|
+
const ChevronUpIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
11
|
+
const controls = useAnimation();
|
|
12
|
+
const isControlledRef = useRef(false);
|
|
13
|
+
useImperativeHandle(ref, () => {
|
|
14
|
+
isControlledRef.current = true;
|
|
15
|
+
return {
|
|
16
|
+
startAnimation: () => controls.start("animate"),
|
|
17
|
+
stopAnimation: () => controls.start("normal"),
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
const handleMouseEnter = useCallback((e) => {
|
|
21
|
+
if (isControlledRef.current) {
|
|
22
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
controls.start("animate");
|
|
26
|
+
}
|
|
27
|
+
}, [controls, onMouseEnter]);
|
|
28
|
+
const handleMouseLeave = useCallback((e) => {
|
|
29
|
+
if (isControlledRef.current) {
|
|
30
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
controls.start("normal");
|
|
34
|
+
}
|
|
35
|
+
}, [controls, onMouseLeave]);
|
|
36
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx(motion.path, { animate: controls, d: "m18 15-6-6-6 6", transition: DEFAULT_TRANSITION, variants: {
|
|
37
|
+
normal: { y: 0 },
|
|
38
|
+
animate: { y: [0, -2, 0] },
|
|
39
|
+
} }) }) }));
|
|
40
|
+
});
|
|
41
|
+
ChevronUpIcon.displayName = "ChevronUpIcon";
|
|
42
|
+
export { ChevronUpIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface ClipboardCheckIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface ClipboardCheckIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ClipboardCheckIcon: import("react").ForwardRefExoticComponent<ClipboardCheckIconProps & import("react").RefAttributes<ClipboardCheckIconHandle>>;
|
|
10
|
+
export { ClipboardCheckIcon };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const CHECK_VARIANTS = {
|
|
7
|
+
normal: { pathLength: 1, opacity: 1 },
|
|
8
|
+
animate: {
|
|
9
|
+
pathLength: [0, 1],
|
|
10
|
+
opacity: [0, 1],
|
|
11
|
+
transition: {
|
|
12
|
+
duration: 0.4,
|
|
13
|
+
ease: "easeInOut",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const BOARD_VARIANTS = {
|
|
18
|
+
normal: { scale: 1 },
|
|
19
|
+
animate: {
|
|
20
|
+
scale: [1, 1.05, 1],
|
|
21
|
+
transition: {
|
|
22
|
+
duration: 0.4,
|
|
23
|
+
ease: "easeInOut",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const ClipboardCheckIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 24, ...props }, ref) => {
|
|
28
|
+
const controls = useAnimation();
|
|
29
|
+
const isControlledRef = useRef(false);
|
|
30
|
+
useImperativeHandle(ref, () => {
|
|
31
|
+
isControlledRef.current = true;
|
|
32
|
+
return {
|
|
33
|
+
startAnimation: () => controls.start("animate"),
|
|
34
|
+
stopAnimation: () => controls.start("normal"),
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const handleMouseEnter = useCallback((e) => {
|
|
38
|
+
if (isControlledRef.current) {
|
|
39
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
controls.start("animate");
|
|
43
|
+
}
|
|
44
|
+
}, [controls, onMouseEnter]);
|
|
45
|
+
const handleMouseLeave = useCallback((e) => {
|
|
46
|
+
if (isControlledRef.current) {
|
|
47
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
controls.start("normal");
|
|
51
|
+
}
|
|
52
|
+
}, [controls, onMouseLeave]);
|
|
53
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx(motion.rect, { animate: controls, height: "13", rx: "2", ry: "2", variants: BOARD_VARIANTS, width: "14", x: "8", y: "8" }), _jsx(motion.path, { animate: controls, d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", variants: BOARD_VARIANTS }), _jsx(motion.path, { animate: controls, d: "m9 15 2 2 4-4", variants: CHECK_VARIANTS })] }) }));
|
|
54
|
+
});
|
|
55
|
+
ClipboardCheckIcon.displayName = "ClipboardCheckIcon";
|
|
56
|
+
export { ClipboardCheckIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface DownloadIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface DownloadIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const DownloadIcon: import("react").ForwardRefExoticComponent<DownloadIconProps & import("react").RefAttributes<DownloadIconHandle>>;
|
|
10
|
+
export { DownloadIcon };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const ARROW_VARIANTS = {
|
|
7
|
+
normal: { y: 0 },
|
|
8
|
+
animate: {
|
|
9
|
+
y: 2,
|
|
10
|
+
transition: {
|
|
11
|
+
type: "spring",
|
|
12
|
+
stiffness: 200,
|
|
13
|
+
damping: 10,
|
|
14
|
+
mass: 1,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
const DownloadIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
19
|
+
const controls = useAnimation();
|
|
20
|
+
const isControlledRef = useRef(false);
|
|
21
|
+
useImperativeHandle(ref, () => {
|
|
22
|
+
isControlledRef.current = true;
|
|
23
|
+
return {
|
|
24
|
+
startAnimation: () => controls.start("animate"),
|
|
25
|
+
stopAnimation: () => controls.start("normal"),
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
const handleMouseEnter = useCallback((e) => {
|
|
29
|
+
if (isControlledRef.current) {
|
|
30
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
controls.start("animate");
|
|
34
|
+
}
|
|
35
|
+
}, [controls, onMouseEnter]);
|
|
36
|
+
const handleMouseLeave = useCallback((e) => {
|
|
37
|
+
if (isControlledRef.current) {
|
|
38
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
controls.start("normal");
|
|
42
|
+
}
|
|
43
|
+
}, [controls, onMouseLeave]);
|
|
44
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), _jsxs(motion.g, { animate: controls, variants: ARROW_VARIANTS, children: [_jsx("polyline", { points: "7 10 12 15 17 10" }), _jsx("line", { x1: "12", x2: "12", y1: "15", y2: "3" })] })] }) }));
|
|
45
|
+
});
|
|
46
|
+
DownloadIcon.displayName = "DownloadIcon";
|
|
47
|
+
export { DownloadIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface ExternalLinkIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface ExternalLinkIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ExternalLinkIcon: import("react").ForwardRefExoticComponent<ExternalLinkIconProps & import("react").RefAttributes<ExternalLinkIconHandle>>;
|
|
10
|
+
export { ExternalLinkIcon };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
// Arrow line animation - moves diagonally up-right
|
|
7
|
+
const ARROW_LINE_VARIANTS = {
|
|
8
|
+
normal: { x: 0, y: 0 },
|
|
9
|
+
animate: {
|
|
10
|
+
x: [0, 2, 0],
|
|
11
|
+
y: [0, -2, 0],
|
|
12
|
+
transition: {
|
|
13
|
+
duration: 0.4,
|
|
14
|
+
ease: "easeInOut",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
// Arrow head animation - moves with the line
|
|
19
|
+
const ARROW_HEAD_VARIANTS = {
|
|
20
|
+
normal: { x: 0, y: 0 },
|
|
21
|
+
animate: {
|
|
22
|
+
x: [0, 2, 0],
|
|
23
|
+
y: [0, -2, 0],
|
|
24
|
+
transition: {
|
|
25
|
+
duration: 0.4,
|
|
26
|
+
ease: "easeInOut",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const ExternalLinkIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
31
|
+
const controls = useAnimation();
|
|
32
|
+
const isControlledRef = useRef(false);
|
|
33
|
+
useImperativeHandle(ref, () => {
|
|
34
|
+
isControlledRef.current = true;
|
|
35
|
+
return {
|
|
36
|
+
startAnimation: () => controls.start("animate"),
|
|
37
|
+
stopAnimation: () => controls.start("normal"),
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const handleMouseEnter = useCallback((e) => {
|
|
41
|
+
if (isControlledRef.current) {
|
|
42
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
controls.start("animate");
|
|
46
|
+
}
|
|
47
|
+
}, [controls, onMouseEnter]);
|
|
48
|
+
const handleMouseLeave = useCallback((e) => {
|
|
49
|
+
if (isControlledRef.current) {
|
|
50
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
controls.start("normal");
|
|
54
|
+
}
|
|
55
|
+
}, [controls, onMouseLeave]);
|
|
56
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }), _jsx(motion.path, { d: "M15 3h6v6", animate: controls, variants: ARROW_HEAD_VARIANTS }), _jsx(motion.path, { d: "M10 14 21 3", animate: controls, variants: ARROW_LINE_VARIANTS })] }) }));
|
|
57
|
+
});
|
|
58
|
+
ExternalLinkIcon.displayName = "ExternalLinkIcon";
|
|
59
|
+
export { ExternalLinkIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface EyeIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface EyeIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const EyeIcon: import("react").ForwardRefExoticComponent<EyeIconProps & import("react").RefAttributes<EyeIconHandle>>;
|
|
10
|
+
export { EyeIcon };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const EyeIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
7
|
+
const controls = useAnimation();
|
|
8
|
+
const isControlledRef = useRef(false);
|
|
9
|
+
useImperativeHandle(ref, () => {
|
|
10
|
+
isControlledRef.current = true;
|
|
11
|
+
return {
|
|
12
|
+
startAnimation: () => controls.start("animate"),
|
|
13
|
+
stopAnimation: () => controls.start("normal"),
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
const handleMouseEnter = useCallback((e) => {
|
|
17
|
+
if (isControlledRef.current) {
|
|
18
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
controls.start("animate");
|
|
22
|
+
}
|
|
23
|
+
}, [controls, onMouseEnter]);
|
|
24
|
+
const handleMouseLeave = useCallback((e) => {
|
|
25
|
+
if (isControlledRef.current) {
|
|
26
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
controls.start("normal");
|
|
30
|
+
}
|
|
31
|
+
}, [controls, onMouseLeave]);
|
|
32
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx(motion.path, { animate: controls, d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0", style: { originY: "50%" }, transition: { duration: 0.4, ease: "easeInOut" }, variants: {
|
|
33
|
+
normal: { scaleY: 1, opacity: 1 },
|
|
34
|
+
animate: { scaleY: [1, 0.1, 1], opacity: [1, 0.3, 1] },
|
|
35
|
+
} }), _jsx(motion.circle, { animate: controls, cx: "12", cy: "12", r: "3", transition: { duration: 0.4, ease: "easeInOut" }, variants: {
|
|
36
|
+
normal: { scale: 1, opacity: 1 },
|
|
37
|
+
animate: { scale: [1, 0.3, 1], opacity: [1, 0.3, 1] },
|
|
38
|
+
} })] }) }));
|
|
39
|
+
});
|
|
40
|
+
EyeIcon.displayName = "EyeIcon";
|
|
41
|
+
export { EyeIcon };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
export interface FileTextIconHandle {
|
|
4
|
+
startAnimation: () => void;
|
|
5
|
+
stopAnimation: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface FileTextIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
size?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const FILE_TEXT: React.ForwardRefExoticComponent<FileTextIconProps & React.RefAttributes<FileTextIconHandle>>;
|
|
11
|
+
export { FILE_TEXT as FileTextIcon };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const FILE_TEXT = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
7
|
+
const controls = useAnimation();
|
|
8
|
+
const isControlledRef = useRef(false);
|
|
9
|
+
useImperativeHandle(ref, () => {
|
|
10
|
+
isControlledRef.current = true;
|
|
11
|
+
return {
|
|
12
|
+
startAnimation: () => controls.start("animate"),
|
|
13
|
+
stopAnimation: () => controls.start("normal"),
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
const handleMouseEnter = useCallback((e) => {
|
|
17
|
+
if (isControlledRef.current) {
|
|
18
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
controls.start("animate");
|
|
22
|
+
}
|
|
23
|
+
}, [controls, onMouseEnter]);
|
|
24
|
+
const handleMouseLeave = useCallback((e) => {
|
|
25
|
+
if (isControlledRef.current) {
|
|
26
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
controls.start("normal");
|
|
30
|
+
}
|
|
31
|
+
}, [controls, onMouseLeave]);
|
|
32
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs(motion.svg, { animate: controls, fill: "none", height: size, initial: "normal", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", variants: {
|
|
33
|
+
normal: { scale: 1 },
|
|
34
|
+
animate: {
|
|
35
|
+
scale: 1.05,
|
|
36
|
+
transition: {
|
|
37
|
+
duration: 0.3,
|
|
38
|
+
ease: "easeOut",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
}, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }), _jsx("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }), _jsx(motion.path, { d: "M10 9H8", stroke: "currentColor", strokeWidth: "2", variants: {
|
|
42
|
+
normal: {
|
|
43
|
+
pathLength: 1,
|
|
44
|
+
x1: 8,
|
|
45
|
+
x2: 10,
|
|
46
|
+
},
|
|
47
|
+
animate: {
|
|
48
|
+
pathLength: [1, 0, 1],
|
|
49
|
+
x1: [8, 10, 8],
|
|
50
|
+
x2: [10, 10, 10],
|
|
51
|
+
transition: {
|
|
52
|
+
duration: 0.7,
|
|
53
|
+
delay: 0.3,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
} }), _jsx(motion.path, { d: "M16 13H8", stroke: "currentColor", strokeWidth: "2", variants: {
|
|
57
|
+
normal: {
|
|
58
|
+
pathLength: 1,
|
|
59
|
+
x1: 8,
|
|
60
|
+
x2: 16,
|
|
61
|
+
},
|
|
62
|
+
animate: {
|
|
63
|
+
pathLength: [1, 0, 1],
|
|
64
|
+
x1: [8, 16, 8],
|
|
65
|
+
x2: [16, 16, 16],
|
|
66
|
+
transition: {
|
|
67
|
+
duration: 0.7,
|
|
68
|
+
delay: 0.5,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
} }), _jsx(motion.path, { d: "M16 17H8", stroke: "currentColor", strokeWidth: "2", variants: {
|
|
72
|
+
normal: {
|
|
73
|
+
pathLength: 1,
|
|
74
|
+
x1: 8,
|
|
75
|
+
x2: 16,
|
|
76
|
+
},
|
|
77
|
+
animate: {
|
|
78
|
+
pathLength: [1, 0, 1],
|
|
79
|
+
x1: [8, 16, 8],
|
|
80
|
+
x2: [16, 16, 16],
|
|
81
|
+
transition: {
|
|
82
|
+
duration: 0.7,
|
|
83
|
+
delay: 0.7,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
} })] }) }));
|
|
87
|
+
});
|
|
88
|
+
FILE_TEXT.displayName = "FileTextIcon";
|
|
89
|
+
export { FILE_TEXT as FileTextIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface FilterIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface FilterIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const FilterIcon: import("react").ForwardRefExoticComponent<FilterIconProps & import("react").RefAttributes<FilterIconHandle>>;
|
|
10
|
+
export { FilterIcon };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const DEFAULT_TRANSITION = {
|
|
7
|
+
times: [0, 0.3, 0.7, 1],
|
|
8
|
+
duration: 0.4,
|
|
9
|
+
};
|
|
10
|
+
const SVG_VARIANTS = {
|
|
11
|
+
normal: {
|
|
12
|
+
scale: 1,
|
|
13
|
+
y: 0,
|
|
14
|
+
},
|
|
15
|
+
animate: {
|
|
16
|
+
scale: [1, 0.95, 1.05, 1],
|
|
17
|
+
y: [0, 2, -2, 0],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const FilterIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
21
|
+
const controls = useAnimation();
|
|
22
|
+
const isControlledRef = useRef(false);
|
|
23
|
+
const divRef = useRef(null);
|
|
24
|
+
const [isParentHovered, setIsParentHovered] = useState(false);
|
|
25
|
+
useImperativeHandle(ref, () => {
|
|
26
|
+
isControlledRef.current = true;
|
|
27
|
+
return {
|
|
28
|
+
startAnimation: () => controls.start("animate"),
|
|
29
|
+
stopAnimation: () => controls.start("normal"),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
// Listen for hover on parent button
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const div = divRef.current;
|
|
35
|
+
if (!div)
|
|
36
|
+
return;
|
|
37
|
+
const button = div.closest("button");
|
|
38
|
+
if (!button)
|
|
39
|
+
return;
|
|
40
|
+
const handleParentEnter = () => {
|
|
41
|
+
if (!isControlledRef.current) {
|
|
42
|
+
setIsParentHovered(true);
|
|
43
|
+
controls.start("animate");
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const handleParentLeave = () => {
|
|
47
|
+
if (!isControlledRef.current) {
|
|
48
|
+
setIsParentHovered(false);
|
|
49
|
+
controls.start("normal");
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
button.addEventListener("mouseenter", handleParentEnter);
|
|
53
|
+
button.addEventListener("mouseleave", handleParentLeave);
|
|
54
|
+
return () => {
|
|
55
|
+
button.removeEventListener("mouseenter", handleParentEnter);
|
|
56
|
+
button.removeEventListener("mouseleave", handleParentLeave);
|
|
57
|
+
};
|
|
58
|
+
}, [controls]);
|
|
59
|
+
const handleMouseEnter = useCallback((e) => {
|
|
60
|
+
if (isControlledRef.current) {
|
|
61
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
controls.start("animate");
|
|
65
|
+
}
|
|
66
|
+
}, [controls, onMouseEnter]);
|
|
67
|
+
const handleMouseLeave = useCallback((e) => {
|
|
68
|
+
if (isControlledRef.current) {
|
|
69
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
70
|
+
}
|
|
71
|
+
else if (!isParentHovered) {
|
|
72
|
+
controls.start("normal");
|
|
73
|
+
}
|
|
74
|
+
}, [controls, onMouseLeave, isParentHovered]);
|
|
75
|
+
return (_jsx("div", { ref: divRef, className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx(motion.svg, { animate: controls, initial: "normal", fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", transition: DEFAULT_TRANSITION, variants: SVG_VARIANTS, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }) }) }));
|
|
76
|
+
});
|
|
77
|
+
FilterIcon.displayName = "FilterIcon";
|
|
78
|
+
export { FilterIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface FolderOpenIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface FolderOpenIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const FolderOpenIcon: import("react").ForwardRefExoticComponent<FolderOpenIconProps & import("react").RefAttributes<FolderOpenIconHandle>>;
|
|
10
|
+
export { FolderOpenIcon };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { motion, useAnimation } from "motion/react";
|
|
4
|
+
import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const SVG_VARIANTS = {
|
|
7
|
+
normal: { scale: 1, y: 0 },
|
|
8
|
+
animate: {
|
|
9
|
+
scale: [1, 1.1, 1],
|
|
10
|
+
y: [0, -2, 0],
|
|
11
|
+
transition: {
|
|
12
|
+
duration: 0.4,
|
|
13
|
+
ease: "easeInOut",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const FolderOpenIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 24, ...props }, ref) => {
|
|
18
|
+
const controls = useAnimation();
|
|
19
|
+
const isControlledRef = useRef(false);
|
|
20
|
+
useImperativeHandle(ref, () => {
|
|
21
|
+
isControlledRef.current = true;
|
|
22
|
+
return {
|
|
23
|
+
startAnimation: () => controls.start("animate"),
|
|
24
|
+
stopAnimation: () => controls.start("normal"),
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
const handleMouseEnter = useCallback((e) => {
|
|
28
|
+
if (isControlledRef.current) {
|
|
29
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
controls.start("animate");
|
|
33
|
+
}
|
|
34
|
+
}, [controls, onMouseEnter]);
|
|
35
|
+
const handleMouseLeave = useCallback((e) => {
|
|
36
|
+
if (isControlledRef.current) {
|
|
37
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
controls.start("normal");
|
|
41
|
+
}
|
|
42
|
+
}, [controls, onMouseLeave]);
|
|
43
|
+
return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx(motion.svg, { animate: controls, fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", variants: SVG_VARIANTS, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" }) }) }));
|
|
44
|
+
});
|
|
45
|
+
FolderOpenIcon.displayName = "FolderOpenIcon";
|
|
46
|
+
export { FolderOpenIcon };
|