@neasg/design-system 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -9
- 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 +86 -8
- 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/index.d.ts +53 -4
- package/dist/index.js +31 -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 +55 -0
- package/dist/layout.js +140 -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 +124 -3
|
@@ -0,0 +1,45 @@
|
|
|
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: { rotate: 0 },
|
|
8
|
+
animate: {
|
|
9
|
+
rotate: [0, -10, 10, 0],
|
|
10
|
+
transition: {
|
|
11
|
+
duration: 0.4,
|
|
12
|
+
ease: "easeInOut",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const PaperclipIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 24, ...props }, ref) => {
|
|
17
|
+
const controls = useAnimation();
|
|
18
|
+
const isControlledRef = useRef(false);
|
|
19
|
+
useImperativeHandle(ref, () => {
|
|
20
|
+
isControlledRef.current = true;
|
|
21
|
+
return {
|
|
22
|
+
startAnimation: () => controls.start("animate"),
|
|
23
|
+
stopAnimation: () => controls.start("normal"),
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const handleMouseEnter = useCallback((e) => {
|
|
27
|
+
if (isControlledRef.current) {
|
|
28
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
controls.start("animate");
|
|
32
|
+
}
|
|
33
|
+
}, [controls, onMouseEnter]);
|
|
34
|
+
const handleMouseLeave = useCallback((e) => {
|
|
35
|
+
if (isControlledRef.current) {
|
|
36
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
controls.start("normal");
|
|
40
|
+
}
|
|
41
|
+
}, [controls, onMouseLeave]);
|
|
42
|
+
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: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" }) }) }));
|
|
43
|
+
});
|
|
44
|
+
PaperclipIcon.displayName = "PaperclipIcon";
|
|
45
|
+
export { PaperclipIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface PencilIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface PencilIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const PencilIcon: import("react").ForwardRefExoticComponent<PencilIconProps & import("react").RefAttributes<PencilIconHandle>>;
|
|
10
|
+
export { PencilIcon };
|
|
@@ -0,0 +1,46 @@
|
|
|
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 SVG_VARIANTS = {
|
|
7
|
+
normal: { rotate: 0, scale: 1 },
|
|
8
|
+
animate: {
|
|
9
|
+
rotate: [-5, 5, -5, 0],
|
|
10
|
+
scale: [1, 1.1, 1.1, 1],
|
|
11
|
+
transition: {
|
|
12
|
+
duration: 0.4,
|
|
13
|
+
ease: "easeInOut",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const PencilIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 16, ...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: _jsxs(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: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }), _jsx("path", { d: "m15 5 4 4" })] }) }));
|
|
44
|
+
});
|
|
45
|
+
PencilIcon.displayName = "PencilIcon";
|
|
46
|
+
export { PencilIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface PlusIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface PlusIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const PlusIcon: import("react").ForwardRefExoticComponent<PlusIconProps & import("react").RefAttributes<PlusIconHandle>>;
|
|
10
|
+
export { PlusIcon };
|
|
@@ -0,0 +1,42 @@
|
|
|
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 PlusIcon = 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, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", transition: { type: "spring", stiffness: 100, damping: 15 }, variants: {
|
|
33
|
+
normal: {
|
|
34
|
+
rotate: 0,
|
|
35
|
+
},
|
|
36
|
+
animate: {
|
|
37
|
+
rotate: 180,
|
|
38
|
+
},
|
|
39
|
+
}, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M5 12h14" }), _jsx("path", { d: "M12 5v14" })] }) }));
|
|
40
|
+
});
|
|
41
|
+
PlusIcon.displayName = "PlusIcon";
|
|
42
|
+
export { PlusIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface SearchIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface SearchIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const SearchIcon: import("react").ForwardRefExoticComponent<SearchIconProps & import("react").RefAttributes<SearchIconHandle>>;
|
|
10
|
+
export { SearchIcon };
|
|
@@ -0,0 +1,44 @@
|
|
|
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 SearchIcon = 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, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", transition: {
|
|
33
|
+
duration: 1,
|
|
34
|
+
bounce: 0.3,
|
|
35
|
+
}, variants: {
|
|
36
|
+
normal: { x: 0, y: 0 },
|
|
37
|
+
animate: {
|
|
38
|
+
x: [0, 0, -3, 0],
|
|
39
|
+
y: [0, -4, 0, 0],
|
|
40
|
+
},
|
|
41
|
+
}, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "11", cy: "11", r: "8" }), _jsx("path", { d: "m21 21-4.3-4.3" })] }) }));
|
|
42
|
+
});
|
|
43
|
+
SearchIcon.displayName = "SearchIcon";
|
|
44
|
+
export { SearchIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface SendIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface SendIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const SendIcon: import("react").ForwardRefExoticComponent<SendIconProps & import("react").RefAttributes<SendIconHandle>>;
|
|
10
|
+
export { SendIcon };
|
|
@@ -0,0 +1,46 @@
|
|
|
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 SVG_VARIANTS = {
|
|
7
|
+
normal: { x: 0, y: 0 },
|
|
8
|
+
animate: {
|
|
9
|
+
x: [0, 3, 0],
|
|
10
|
+
y: [0, -3, 0],
|
|
11
|
+
transition: {
|
|
12
|
+
duration: 0.4,
|
|
13
|
+
ease: "easeInOut",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const SendIcon = 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: _jsxs(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: "m22 2-7 20-4-9-9-4Z" }), _jsx("path", { d: "M22 2 11 13" })] }) }));
|
|
44
|
+
});
|
|
45
|
+
SendIcon.displayName = "SendIcon";
|
|
46
|
+
export { SendIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface SettingsIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface SettingsIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const SettingsIcon: import("react").ForwardRefExoticComponent<SettingsIconProps & import("react").RefAttributes<SettingsIconHandle>>;
|
|
10
|
+
export { SettingsIcon };
|
|
@@ -0,0 +1,42 @@
|
|
|
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 SettingsIcon = 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, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", transition: { type: "spring", stiffness: 50, damping: 10 }, variants: {
|
|
33
|
+
normal: {
|
|
34
|
+
rotate: 0,
|
|
35
|
+
},
|
|
36
|
+
animate: {
|
|
37
|
+
rotate: 180,
|
|
38
|
+
},
|
|
39
|
+
}, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }), _jsx("circle", { cx: "12", cy: "12", r: "3" })] }) }));
|
|
40
|
+
});
|
|
41
|
+
SettingsIcon.displayName = "SettingsIcon";
|
|
42
|
+
export { SettingsIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface ShieldIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface ShieldIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ShieldIcon: import("react").ForwardRefExoticComponent<ShieldIconProps & import("react").RefAttributes<ShieldIconHandle>>;
|
|
10
|
+
export { ShieldIcon };
|
|
@@ -0,0 +1,45 @@
|
|
|
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 },
|
|
8
|
+
animate: {
|
|
9
|
+
scale: [1, 1.1, 1],
|
|
10
|
+
transition: {
|
|
11
|
+
duration: 0.4,
|
|
12
|
+
ease: "easeInOut",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const ShieldIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 24, ...props }, ref) => {
|
|
17
|
+
const controls = useAnimation();
|
|
18
|
+
const isControlledRef = useRef(false);
|
|
19
|
+
useImperativeHandle(ref, () => {
|
|
20
|
+
isControlledRef.current = true;
|
|
21
|
+
return {
|
|
22
|
+
startAnimation: () => controls.start("animate"),
|
|
23
|
+
stopAnimation: () => controls.start("normal"),
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const handleMouseEnter = useCallback((e) => {
|
|
27
|
+
if (isControlledRef.current) {
|
|
28
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
controls.start("animate");
|
|
32
|
+
}
|
|
33
|
+
}, [controls, onMouseEnter]);
|
|
34
|
+
const handleMouseLeave = useCallback((e) => {
|
|
35
|
+
if (isControlledRef.current) {
|
|
36
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
controls.start("normal");
|
|
40
|
+
}
|
|
41
|
+
}, [controls, onMouseLeave]);
|
|
42
|
+
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: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }) }) }));
|
|
43
|
+
});
|
|
44
|
+
ShieldIcon.displayName = "ShieldIcon";
|
|
45
|
+
export { ShieldIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface StrikethroughIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface StrikethroughIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const StrikethroughIcon: import("react").ForwardRefExoticComponent<StrikethroughIconProps & import("react").RefAttributes<StrikethroughIconHandle>>;
|
|
10
|
+
export { StrikethroughIcon };
|
|
@@ -0,0 +1,45 @@
|
|
|
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 LINE_VARIANTS = {
|
|
7
|
+
normal: { scaleX: 1 },
|
|
8
|
+
animate: {
|
|
9
|
+
scaleX: [0, 1],
|
|
10
|
+
transition: {
|
|
11
|
+
duration: 0.3,
|
|
12
|
+
ease: "easeInOut",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const StrikethroughIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 24, ...props }, ref) => {
|
|
17
|
+
const controls = useAnimation();
|
|
18
|
+
const isControlledRef = useRef(false);
|
|
19
|
+
useImperativeHandle(ref, () => {
|
|
20
|
+
isControlledRef.current = true;
|
|
21
|
+
return {
|
|
22
|
+
startAnimation: () => controls.start("animate"),
|
|
23
|
+
stopAnimation: () => controls.start("normal"),
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const handleMouseEnter = useCallback((e) => {
|
|
27
|
+
if (isControlledRef.current) {
|
|
28
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
controls.start("animate");
|
|
32
|
+
}
|
|
33
|
+
}, [controls, onMouseEnter]);
|
|
34
|
+
const handleMouseLeave = useCallback((e) => {
|
|
35
|
+
if (isControlledRef.current) {
|
|
36
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
controls.start("normal");
|
|
40
|
+
}
|
|
41
|
+
}, [controls, onMouseLeave]);
|
|
42
|
+
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: "M16 4H9a3 3 0 0 0-2.83 4" }), _jsx("path", { d: "M14 12a4 4 0 0 1 0 8H6" }), _jsx(motion.line, { animate: controls, style: { originX: 0 }, variants: LINE_VARIANTS, x1: "4", x2: "20", y1: "12", y2: "12" })] }) }));
|
|
43
|
+
});
|
|
44
|
+
StrikethroughIcon.displayName = "StrikethroughIcon";
|
|
45
|
+
export { StrikethroughIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface TimerIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface TimerIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const TimerIcon: import("react").ForwardRefExoticComponent<TimerIconProps & import("react").RefAttributes<TimerIconHandle>>;
|
|
10
|
+
export { TimerIcon };
|
|
@@ -0,0 +1,70 @@
|
|
|
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 HAND_VARIANTS = {
|
|
7
|
+
normal: {
|
|
8
|
+
rotate: 0,
|
|
9
|
+
originX: "0%",
|
|
10
|
+
originY: "100%",
|
|
11
|
+
transition: {
|
|
12
|
+
duration: 0.6,
|
|
13
|
+
ease: [0.4, 0, 0.2, 1],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
animate: {
|
|
17
|
+
rotate: 300,
|
|
18
|
+
originX: "0%",
|
|
19
|
+
originY: "100%",
|
|
20
|
+
transition: {
|
|
21
|
+
delay: 0.1,
|
|
22
|
+
duration: 0.6,
|
|
23
|
+
ease: [0.4, 0, 0.2, 1],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const BUTTON_VARIANTS = {
|
|
28
|
+
normal: {
|
|
29
|
+
scale: 1,
|
|
30
|
+
y: 0,
|
|
31
|
+
},
|
|
32
|
+
animate: {
|
|
33
|
+
scale: [0.9, 1],
|
|
34
|
+
y: [0, 1, 0],
|
|
35
|
+
transition: {
|
|
36
|
+
duration: 0.3,
|
|
37
|
+
ease: [0.4, 0, 0.2, 1],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const TimerIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
|
|
42
|
+
const controls = useAnimation();
|
|
43
|
+
const isControlledRef = useRef(false);
|
|
44
|
+
useImperativeHandle(ref, () => {
|
|
45
|
+
isControlledRef.current = true;
|
|
46
|
+
return {
|
|
47
|
+
startAnimation: () => controls.start("animate"),
|
|
48
|
+
stopAnimation: () => controls.start("normal"),
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
const handleMouseEnter = useCallback((e) => {
|
|
52
|
+
if (isControlledRef.current) {
|
|
53
|
+
onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
controls.start("animate");
|
|
57
|
+
}
|
|
58
|
+
}, [controls, onMouseEnter]);
|
|
59
|
+
const handleMouseLeave = useCallback((e) => {
|
|
60
|
+
if (isControlledRef.current) {
|
|
61
|
+
onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
controls.start("normal");
|
|
65
|
+
}
|
|
66
|
+
}, [controls, onMouseLeave]);
|
|
67
|
+
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.line, { animate: controls, variants: BUTTON_VARIANTS, x1: "10", x2: "14", y1: "2", y2: "2" }), _jsx(motion.line, { animate: controls, initial: "normal", variants: HAND_VARIANTS, x1: "12", x2: "15", y1: "14", y2: "11" }), _jsx("circle", { cx: "12", cy: "14", r: "8" })] }) }));
|
|
68
|
+
});
|
|
69
|
+
TimerIcon.displayName = "TimerIcon";
|
|
70
|
+
export { TimerIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface TrashIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface TrashIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const TrashIcon: import("react").ForwardRefExoticComponent<TrashIconProps & import("react").RefAttributes<TrashIconHandle>>;
|
|
10
|
+
export { TrashIcon };
|
|
@@ -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 LID_VARIANTS = {
|
|
7
|
+
normal: { y: 0, rotate: 0 },
|
|
8
|
+
animate: {
|
|
9
|
+
y: [-1, -2, -1, 0],
|
|
10
|
+
rotate: [0, -3, 3, 0],
|
|
11
|
+
transition: {
|
|
12
|
+
duration: 0.4,
|
|
13
|
+
ease: "easeInOut",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const BIN_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 TrashIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 16, ...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.path, { animate: controls, d: "M3 6h18", variants: LID_VARIANTS }), _jsxs(motion.g, { animate: controls, variants: BIN_VARIANTS, children: [_jsx("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }), _jsx("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }), _jsx("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), _jsx("line", { x1: "14", x2: "14", y1: "11", y2: "17" })] })] }) }));
|
|
54
|
+
});
|
|
55
|
+
TrashIcon.displayName = "TrashIcon";
|
|
56
|
+
export { TrashIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export interface TrendingDownIconHandle {
|
|
3
|
+
startAnimation: () => void;
|
|
4
|
+
stopAnimation: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface TrendingDownIconProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const TrendingDownIcon: import("react").ForwardRefExoticComponent<TrendingDownIconProps & import("react").RefAttributes<TrendingDownIconHandle>>;
|
|
10
|
+
export { TrendingDownIcon };
|