@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.
Files changed (189) hide show
  1. package/README.md +102 -14
  2. package/dist/animated-icons/arrow-down.d.ts +10 -0
  3. package/dist/animated-icons/arrow-down.js +54 -0
  4. package/dist/animated-icons/arrow-up.d.ts +10 -0
  5. package/dist/animated-icons/arrow-up.js +54 -0
  6. package/dist/animated-icons/bell.d.ts +10 -0
  7. package/dist/animated-icons/bell.js +42 -0
  8. package/dist/animated-icons/bold.d.ts +10 -0
  9. package/dist/animated-icons/bold.js +45 -0
  10. package/dist/animated-icons/book-open.d.ts +10 -0
  11. package/dist/animated-icons/book-open.js +55 -0
  12. package/dist/animated-icons/building.d.ts +10 -0
  13. package/dist/animated-icons/building.js +46 -0
  14. package/dist/animated-icons/check.d.ts +10 -0
  15. package/dist/animated-icons/check.js +55 -0
  16. package/dist/animated-icons/chevron-down.d.ts +10 -0
  17. package/dist/animated-icons/chevron-down.js +42 -0
  18. package/dist/animated-icons/chevron-left.d.ts +10 -0
  19. package/dist/animated-icons/chevron-left.js +42 -0
  20. package/dist/animated-icons/chevron-right.d.ts +10 -0
  21. package/dist/animated-icons/chevron-right.js +42 -0
  22. package/dist/animated-icons/chevron-up.d.ts +10 -0
  23. package/dist/animated-icons/chevron-up.js +42 -0
  24. package/dist/animated-icons/clipboard-check.d.ts +10 -0
  25. package/dist/animated-icons/clipboard-check.js +56 -0
  26. package/dist/animated-icons/download.d.ts +10 -0
  27. package/dist/animated-icons/download.js +47 -0
  28. package/dist/animated-icons/external-link.d.ts +10 -0
  29. package/dist/animated-icons/external-link.js +59 -0
  30. package/dist/animated-icons/eye.d.ts +10 -0
  31. package/dist/animated-icons/eye.js +41 -0
  32. package/dist/animated-icons/file-text.d.ts +11 -0
  33. package/dist/animated-icons/file-text.js +89 -0
  34. package/dist/animated-icons/filter.d.ts +10 -0
  35. package/dist/animated-icons/filter.js +78 -0
  36. package/dist/animated-icons/folder-open.d.ts +10 -0
  37. package/dist/animated-icons/folder-open.js +46 -0
  38. package/dist/animated-icons/form.d.ts +10 -0
  39. package/dist/animated-icons/form.js +56 -0
  40. package/dist/animated-icons/git-branch.d.ts +10 -0
  41. package/dist/animated-icons/git-branch.js +56 -0
  42. package/dist/animated-icons/grip-horizontal.d.ts +10 -0
  43. package/dist/animated-icons/grip-horizontal.js +70 -0
  44. package/dist/animated-icons/grip-vertical.d.ts +10 -0
  45. package/dist/animated-icons/grip-vertical.js +67 -0
  46. package/dist/animated-icons/grip.d.ts +10 -0
  47. package/dist/animated-icons/grip.js +72 -0
  48. package/dist/animated-icons/highlighter.d.ts +10 -0
  49. package/dist/animated-icons/highlighter.js +46 -0
  50. package/dist/animated-icons/history.d.ts +10 -0
  51. package/dist/animated-icons/history.js +80 -0
  52. package/dist/animated-icons/index.d.ts +100 -0
  53. package/dist/animated-icons/index.js +50 -0
  54. package/dist/animated-icons/italic.d.ts +10 -0
  55. package/dist/animated-icons/italic.js +45 -0
  56. package/dist/animated-icons/link.d.ts +10 -0
  57. package/dist/animated-icons/link.js +51 -0
  58. package/dist/animated-icons/list-ordered.d.ts +10 -0
  59. package/dist/animated-icons/list-ordered.js +46 -0
  60. package/dist/animated-icons/list.d.ts +10 -0
  61. package/dist/animated-icons/list.js +56 -0
  62. package/dist/animated-icons/loader-pinwheel.d.ts +10 -0
  63. package/dist/animated-icons/loader-pinwheel.js +51 -0
  64. package/dist/animated-icons/logout.d.ts +10 -0
  65. package/dist/animated-icons/logout.js +44 -0
  66. package/dist/animated-icons/maximize.d.ts +10 -0
  67. package/dist/animated-icons/maximize.js +45 -0
  68. package/dist/animated-icons/message-square.d.ts +10 -0
  69. package/dist/animated-icons/message-square.js +56 -0
  70. package/dist/animated-icons/palette.d.ts +10 -0
  71. package/dist/animated-icons/palette.js +45 -0
  72. package/dist/animated-icons/paperclip.d.ts +10 -0
  73. package/dist/animated-icons/paperclip.js +45 -0
  74. package/dist/animated-icons/pencil.d.ts +10 -0
  75. package/dist/animated-icons/pencil.js +46 -0
  76. package/dist/animated-icons/plus.d.ts +10 -0
  77. package/dist/animated-icons/plus.js +42 -0
  78. package/dist/animated-icons/search.d.ts +10 -0
  79. package/dist/animated-icons/search.js +44 -0
  80. package/dist/animated-icons/send.d.ts +10 -0
  81. package/dist/animated-icons/send.js +46 -0
  82. package/dist/animated-icons/settings.d.ts +10 -0
  83. package/dist/animated-icons/settings.js +42 -0
  84. package/dist/animated-icons/shield.d.ts +10 -0
  85. package/dist/animated-icons/shield.js +45 -0
  86. package/dist/animated-icons/strikethrough.d.ts +10 -0
  87. package/dist/animated-icons/strikethrough.js +45 -0
  88. package/dist/animated-icons/timer.d.ts +10 -0
  89. package/dist/animated-icons/timer.js +70 -0
  90. package/dist/animated-icons/trash.d.ts +10 -0
  91. package/dist/animated-icons/trash.js +56 -0
  92. package/dist/animated-icons/trending-down.d.ts +10 -0
  93. package/dist/animated-icons/trending-down.js +86 -0
  94. package/dist/animated-icons/trending-up.d.ts +10 -0
  95. package/dist/animated-icons/trending-up.js +86 -0
  96. package/dist/animated-icons/underline.d.ts +10 -0
  97. package/dist/animated-icons/underline.js +45 -0
  98. package/dist/animated-icons/upload.d.ts +10 -0
  99. package/dist/animated-icons/upload.js +47 -0
  100. package/dist/animated-icons/users.d.ts +10 -0
  101. package/dist/animated-icons/users.js +45 -0
  102. package/dist/animated-icons/x.d.ts +10 -0
  103. package/dist/animated-icons/x.js +45 -0
  104. package/dist/avatar.d.ts +32 -0
  105. package/dist/avatar.js +21 -0
  106. package/dist/badge.d.ts +4 -3
  107. package/dist/badge.js +7 -12
  108. package/dist/breadcrumb.d.ts +30 -0
  109. package/dist/breadcrumb.js +32 -0
  110. package/dist/button.d.ts +2 -2
  111. package/dist/button.js +84 -6
  112. package/dist/command-search.d.ts +44 -0
  113. package/dist/command-search.js +73 -0
  114. package/dist/command.d.ts +77 -0
  115. package/dist/command.js +24 -0
  116. package/dist/count-badge.d.ts +10 -0
  117. package/dist/count-badge.js +34 -0
  118. package/dist/dialog-primitive.d.ts +22 -0
  119. package/dist/dialog-primitive.js +23 -0
  120. package/dist/dialog.d.ts +28 -0
  121. package/dist/dialog.js +60 -0
  122. package/dist/draggable-tabs.d.ts +27 -0
  123. package/dist/draggable-tabs.js +61 -0
  124. package/dist/drawer.d.ts +30 -0
  125. package/dist/drawer.js +77 -0
  126. package/dist/editable-table.d.ts +31 -0
  127. package/dist/editable-table.js +122 -0
  128. package/dist/email-input.d.ts +16 -0
  129. package/dist/email-input.js +55 -0
  130. package/dist/empty-state.d.ts +11 -0
  131. package/dist/empty-state.js +7 -0
  132. package/dist/field.d.ts +6 -0
  133. package/dist/field.js +18 -0
  134. package/dist/filter-toggle.d.ts +12 -0
  135. package/dist/filter-toggle.js +23 -0
  136. package/dist/govt-masthead.d.ts +9 -0
  137. package/dist/govt-masthead.js +8 -0
  138. package/dist/index.d.ts +55 -4
  139. package/dist/index.js +32 -4
  140. package/dist/input-control.d.ts +4 -0
  141. package/dist/input-control.js +7 -0
  142. package/dist/input-validation.d.ts +9 -0
  143. package/dist/input-validation.js +75 -0
  144. package/dist/input.d.ts +16 -0
  145. package/dist/input.js +22 -0
  146. package/dist/label-value-grid.d.ts +13 -0
  147. package/dist/label-value-grid.js +61 -0
  148. package/dist/label-value.d.ts +11 -0
  149. package/dist/label-value.js +19 -0
  150. package/dist/layout.d.ts +57 -0
  151. package/dist/layout.js +166 -0
  152. package/dist/otp-input.d.ts +21 -0
  153. package/dist/otp-input.js +60 -0
  154. package/dist/page-header.d.ts +9 -0
  155. package/dist/page-header.js +6 -0
  156. package/dist/pagination.d.ts +12 -0
  157. package/dist/pagination.js +24 -0
  158. package/dist/phone-input.d.ts +36 -0
  159. package/dist/phone-input.js +135 -0
  160. package/dist/right-drawer.d.ts +2 -0
  161. package/dist/right-drawer.js +1 -0
  162. package/dist/search-input-shell.d.ts +8 -0
  163. package/dist/search-input-shell.js +9 -0
  164. package/dist/search-input.d.ts +20 -0
  165. package/dist/search-input.js +73 -0
  166. package/dist/select-primitive.d.ts +17 -0
  167. package/dist/select-primitive.js +33 -0
  168. package/dist/select.d.ts +31 -0
  169. package/dist/select.js +97 -0
  170. package/dist/styles.css +111 -1
  171. package/dist/table-toolbar.d.ts +7 -0
  172. package/dist/table-toolbar.js +7 -0
  173. package/dist/table.d.ts +87 -3
  174. package/dist/table.js +102 -5
  175. package/dist/tabs.d.ts +24 -7
  176. package/dist/tabs.js +22 -26
  177. package/dist/tailwind-preset.d.ts +4 -0
  178. package/dist/tailwind-preset.js +97 -0
  179. package/dist/textarea.d.ts +16 -0
  180. package/dist/textarea.js +23 -0
  181. package/dist/theme.d.ts +259 -0
  182. package/dist/theme.js +118 -0
  183. package/dist/tooltip.d.ts +15 -3
  184. package/dist/tooltip.js +9 -4
  185. package/dist/typography.d.ts +11 -0
  186. package/dist/typography.js +41 -0
  187. package/dist/use-search-highlight.d.ts +13 -0
  188. package/dist/use-search-highlight.js +46 -0
  189. package/package.json +126 -4
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface FormIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface FormIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const FormIcon: import("react").ForwardRefExoticComponent<FormIconProps & import("react").RefAttributes<FormIconHandle>>;
10
+ export { FormIcon };
@@ -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 LINE_VARIANTS = {
7
+ normal: { scaleX: 1, opacity: 1 },
8
+ animate: {
9
+ scaleX: [0, 1],
10
+ opacity: [0.5, 1],
11
+ transition: {
12
+ duration: 0.4,
13
+ ease: "easeInOut",
14
+ },
15
+ },
16
+ };
17
+ const RECT_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 FormIcon = 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: "18", rx: "2", variants: RECT_VARIANTS, width: "18", x: "3", y: "3" }), _jsx(motion.path, { animate: controls, d: "M7 7h10", style: { originX: 0 }, variants: LINE_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M7 12h10", style: { originX: 0 }, variants: LINE_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M7 17h6", style: { originX: 0 }, variants: LINE_VARIANTS })] }) }));
54
+ });
55
+ FormIcon.displayName = "FormIcon";
56
+ export { FormIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface GitBranchIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface GitBranchIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const GitBranchIcon: import("react").ForwardRefExoticComponent<GitBranchIconProps & import("react").RefAttributes<GitBranchIconHandle>>;
10
+ export { GitBranchIcon };
@@ -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 CIRCLE_VARIANTS = {
7
+ normal: { scale: 1 },
8
+ animate: {
9
+ scale: [1, 1.2, 1],
10
+ transition: {
11
+ duration: 0.4,
12
+ ease: "easeInOut",
13
+ },
14
+ },
15
+ };
16
+ const LINE_VARIANTS = {
17
+ normal: { pathLength: 1, opacity: 1 },
18
+ animate: {
19
+ pathLength: [0, 1],
20
+ opacity: [0.5, 1],
21
+ transition: {
22
+ duration: 0.4,
23
+ ease: "easeInOut",
24
+ },
25
+ },
26
+ };
27
+ const GitBranchIcon = 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.path, { animate: controls, d: "M6 3v12", variants: LINE_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", variants: CIRCLE_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", variants: CIRCLE_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M15 6a9 9 0 0 0-9 9", variants: LINE_VARIANTS })] }) }));
54
+ });
55
+ GitBranchIcon.displayName = "GitBranchIcon";
56
+ export { GitBranchIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface GripHorizontalIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface GripHorizontalIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const GripHorizontalIcon: import("react").ForwardRefExoticComponent<GripHorizontalIconProps & import("react").RefAttributes<GripHorizontalIconHandle>>;
10
+ export { GripHorizontalIcon };
@@ -0,0 +1,70 @@
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 CIRCLES = [
7
+ { cx: 5, cy: 9 },
8
+ { cx: 12, cy: 9 },
9
+ { cx: 19, cy: 9 },
10
+ { cx: 5, cy: 15 },
11
+ { cx: 12, cy: 15 },
12
+ { cx: 19, cy: 15 },
13
+ ];
14
+ const VARIANTS = {
15
+ normal: {
16
+ opacity: 1,
17
+ scale: 1,
18
+ transition: { duration: 0.25, ease: "easeOut" },
19
+ },
20
+ animate: (index) => {
21
+ const row = Math.floor(index / 3);
22
+ const col = index % 3;
23
+ const delay = col * 0.15 + row * 0.25;
24
+ return {
25
+ opacity: [1, 0.4, 1],
26
+ scale: [1, 0.85, 1],
27
+ transition: {
28
+ delay,
29
+ duration: 1,
30
+ ease: "easeInOut",
31
+ },
32
+ };
33
+ },
34
+ };
35
+ const GripHorizontalIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
36
+ const controls = useAnimation();
37
+ const isControlledRef = useRef(false);
38
+ const isAnimatingRef = useRef(false);
39
+ const startAnimation = useCallback(async () => {
40
+ if (isAnimatingRef.current)
41
+ return;
42
+ isAnimatingRef.current = true;
43
+ await controls.start("animate");
44
+ await controls.start("normal");
45
+ isAnimatingRef.current = false;
46
+ }, [controls]);
47
+ const stopAnimation = useCallback(async () => {
48
+ if (!isAnimatingRef.current)
49
+ return;
50
+ await controls.start("normal");
51
+ isAnimatingRef.current = false;
52
+ }, [controls]);
53
+ useImperativeHandle(ref, () => {
54
+ isControlledRef.current = true;
55
+ return { startAnimation, stopAnimation };
56
+ });
57
+ const handleMouseEnter = useCallback((e) => {
58
+ if (!isControlledRef.current)
59
+ startAnimation();
60
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
61
+ }, [startAnimation, onMouseEnter]);
62
+ const handleMouseLeave = useCallback((e) => {
63
+ if (!isControlledRef.current)
64
+ stopAnimation();
65
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
66
+ }, [stopAnimation, onMouseLeave]);
67
+ return (_jsx("div", { className: cn("inline-flex items-center justify-center", 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: CIRCLES.map((circle, index) => (_jsx(motion.circle, { animate: controls, custom: index, cx: circle.cx, cy: circle.cy, initial: "normal", r: "1", variants: VARIANTS }, `${circle.cx}-${circle.cy}`))) }) }));
68
+ });
69
+ GripHorizontalIcon.displayName = "GripHorizontalIcon";
70
+ export { GripHorizontalIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface GripVerticalIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface GripVerticalIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const GripVerticalIcon: import("react").ForwardRefExoticComponent<GripVerticalIconProps & import("react").RefAttributes<GripVerticalIconHandle>>;
10
+ export { GripVerticalIcon };
@@ -0,0 +1,67 @@
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 CIRCLES = [
7
+ { cx: 9, cy: 5 },
8
+ { cx: 9, cy: 12 },
9
+ { cx: 9, cy: 19 },
10
+ { cx: 15, cy: 5 },
11
+ { cx: 15, cy: 12 },
12
+ { cx: 15, cy: 19 },
13
+ ];
14
+ const ROWS = 3;
15
+ const VARIANTS = {
16
+ normal: {
17
+ opacity: 1,
18
+ scale: 1,
19
+ transition: { duration: 0.25, ease: "easeOut" },
20
+ },
21
+ animate: (data) => {
22
+ const row = data.index % ROWS;
23
+ const col = Math.floor(data.index / ROWS);
24
+ const delay = row * 0.15 + col * (ROWS * 0.15 - 0.2);
25
+ return {
26
+ opacity: [1, 0.4, 1],
27
+ scale: [1, 0.85, 1],
28
+ transition: { delay, duration: 1, ease: "easeInOut" },
29
+ };
30
+ },
31
+ };
32
+ const GripVerticalIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
33
+ const controls = useAnimation();
34
+ const isControlledRef = useRef(false);
35
+ const isAnimatingRef = useRef(false);
36
+ const startAnimation = useCallback(async () => {
37
+ if (isAnimatingRef.current)
38
+ return;
39
+ isAnimatingRef.current = true;
40
+ await controls.start("animate");
41
+ await controls.start("normal");
42
+ isAnimatingRef.current = false;
43
+ }, [controls]);
44
+ const stopAnimation = useCallback(async () => {
45
+ if (!isAnimatingRef.current)
46
+ return;
47
+ await controls.start("normal");
48
+ isAnimatingRef.current = false;
49
+ }, [controls]);
50
+ useImperativeHandle(ref, () => {
51
+ isControlledRef.current = true;
52
+ return { startAnimation, stopAnimation };
53
+ });
54
+ const handleMouseEnter = useCallback((e) => {
55
+ if (!isControlledRef.current)
56
+ startAnimation();
57
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
58
+ }, [startAnimation, onMouseEnter]);
59
+ const handleMouseLeave = useCallback((e) => {
60
+ if (!isControlledRef.current)
61
+ stopAnimation();
62
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
63
+ }, [stopAnimation, onMouseLeave]);
64
+ return (_jsx("div", { className: cn("inline-flex items-center justify-center", 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: CIRCLES.map((circle, index) => (_jsx(motion.circle, { animate: controls, custom: { index }, cx: circle.cx, cy: circle.cy, initial: "normal", r: "1", variants: VARIANTS }, `${circle.cx}-${circle.cy}`))) }) }));
65
+ });
66
+ GripVerticalIcon.displayName = "GripVerticalIcon";
67
+ export { GripVerticalIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface GripIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface GripProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const GripIcon: import("react").ForwardRefExoticComponent<GripProps & import("react").RefAttributes<GripIconHandle>>;
10
+ export { GripIcon };
@@ -0,0 +1,72 @@
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 CIRCLES = [
7
+ { cx: 19, cy: 5 },
8
+ { cx: 19, cy: 12 },
9
+ { cx: 12, cy: 5 },
10
+ { cx: 19, cy: 19 },
11
+ { cx: 12, cy: 12 },
12
+ { cx: 5, cy: 5 },
13
+ { cx: 12, cy: 19 },
14
+ { cx: 5, cy: 12 },
15
+ { cx: 5, cy: 19 },
16
+ ];
17
+ const VARIANTS = {
18
+ normal: {
19
+ opacity: 1,
20
+ transition: { duration: 0.25 },
21
+ },
22
+ animate: (index) => ({
23
+ opacity: [1, 0.3, 0.3, 1],
24
+ transition: {
25
+ delay: index * 0.07,
26
+ duration: 1.1,
27
+ times: [0, 0.2, 0.8, 1],
28
+ },
29
+ }),
30
+ };
31
+ const GripIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
32
+ const controls = useAnimation();
33
+ const isControlledRef = useRef(false);
34
+ const isAnimatingRef = useRef(false);
35
+ const startAnimation = useCallback(async () => {
36
+ if (isAnimatingRef.current)
37
+ return;
38
+ isAnimatingRef.current = true;
39
+ await controls.start("animate");
40
+ await controls.start("normal");
41
+ isAnimatingRef.current = false;
42
+ }, [controls]);
43
+ const stopAnimation = useCallback(async () => {
44
+ if (!isAnimatingRef.current)
45
+ return;
46
+ await controls.start("normal");
47
+ isAnimatingRef.current = false;
48
+ }, [controls]);
49
+ useImperativeHandle(ref, () => {
50
+ isControlledRef.current = true;
51
+ return { startAnimation, stopAnimation };
52
+ });
53
+ const handleMouseEnter = useCallback((e) => {
54
+ if (isControlledRef.current) {
55
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
56
+ }
57
+ else {
58
+ startAnimation();
59
+ }
60
+ }, [startAnimation, onMouseEnter]);
61
+ const handleMouseLeave = useCallback((e) => {
62
+ if (isControlledRef.current) {
63
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
64
+ }
65
+ else {
66
+ stopAnimation();
67
+ }
68
+ }, [stopAnimation, onMouseLeave]);
69
+ return (_jsx("div", { className: cn("inline-flex items-center justify-center", 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: CIRCLES.map((circle, index) => (_jsx(motion.circle, { animate: controls, custom: index, cx: circle.cx, cy: circle.cy, initial: "normal", r: "1", variants: VARIANTS }, `${circle.cx}-${circle.cy}`))) }) }));
70
+ });
71
+ GripIcon.displayName = "GripIcon";
72
+ export { GripIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface HighlighterIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface HighlighterIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const HighlighterIcon: import("react").ForwardRefExoticComponent<HighlighterIconProps & import("react").RefAttributes<HighlighterIconHandle>>;
10
+ export { HighlighterIcon };
@@ -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 PEN_VARIANTS = {
7
+ normal: { rotate: 0, y: 0 },
8
+ animate: {
9
+ rotate: [-5, 5, -5, 0],
10
+ y: [0, -2, 0],
11
+ transition: {
12
+ duration: 0.4,
13
+ ease: "easeInOut",
14
+ },
15
+ },
16
+ };
17
+ const HighlighterIcon = 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("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 11-6 6v3h9l3-3", variants: PEN_VARIANTS }), _jsx(motion.path, { animate: controls, d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4", variants: PEN_VARIANTS })] }) }));
44
+ });
45
+ HighlighterIcon.displayName = "HighlighterIcon";
46
+ export { HighlighterIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface HistoryIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface HistoryIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const HistoryIcon: import("react").ForwardRefExoticComponent<HistoryIconProps & import("react").RefAttributes<HistoryIconHandle>>;
10
+ export { HistoryIcon };
@@ -0,0 +1,80 @@
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_TRANSITION = {
7
+ type: "spring",
8
+ stiffness: 250,
9
+ damping: 25,
10
+ };
11
+ const ARROW_VARIANTS = {
12
+ normal: {
13
+ rotate: "0deg",
14
+ },
15
+ animate: {
16
+ rotate: "-50deg",
17
+ },
18
+ };
19
+ const HAND_TRANSITION = {
20
+ duration: 0.6,
21
+ ease: [0.4, 0, 0.2, 1],
22
+ };
23
+ const HAND_VARIANTS = {
24
+ normal: {
25
+ rotate: 0,
26
+ originX: "0%",
27
+ originY: "100%",
28
+ },
29
+ animate: {
30
+ rotate: -360,
31
+ originX: "0%",
32
+ originY: "100%",
33
+ },
34
+ };
35
+ const MINUTE_HAND_TRANSITION = {
36
+ duration: 0.5,
37
+ ease: "easeInOut",
38
+ };
39
+ const MINUTE_HAND_VARIANTS = {
40
+ normal: {
41
+ rotate: 0,
42
+ originX: "0%",
43
+ originY: "0%",
44
+ },
45
+ animate: {
46
+ rotate: -45,
47
+ originX: "0%",
48
+ originY: "0%",
49
+ },
50
+ };
51
+ const HistoryIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
52
+ const controls = useAnimation();
53
+ const isControlledRef = useRef(false);
54
+ useImperativeHandle(ref, () => {
55
+ isControlledRef.current = true;
56
+ return {
57
+ startAnimation: () => controls.start("animate"),
58
+ stopAnimation: () => controls.start("normal"),
59
+ };
60
+ });
61
+ const handleMouseEnter = useCallback((e) => {
62
+ if (isControlledRef.current) {
63
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
64
+ }
65
+ else {
66
+ controls.start("animate");
67
+ }
68
+ }, [controls, onMouseEnter]);
69
+ const handleMouseLeave = useCallback((e) => {
70
+ if (isControlledRef.current) {
71
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
72
+ }
73
+ else {
74
+ controls.start("normal");
75
+ }
76
+ }, [controls, onMouseLeave]);
77
+ 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: [_jsxs(motion.g, { animate: controls, transition: ARROW_TRANSITION, variants: ARROW_VARIANTS, children: [_jsx("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), _jsx("path", { d: "M3 3v5h5" })] }), _jsx(motion.line, { animate: controls, initial: "normal", transition: HAND_TRANSITION, variants: HAND_VARIANTS, x1: "12", x2: "12", y1: "12", y2: "7" }), _jsx(motion.line, { animate: controls, initial: "normal", transition: MINUTE_HAND_TRANSITION, variants: MINUTE_HAND_VARIANTS, x1: "12", x2: "16", y1: "12", y2: "14" })] }) }));
78
+ });
79
+ HistoryIcon.displayName = "HistoryIcon";
80
+ export { HistoryIcon };
@@ -0,0 +1,100 @@
1
+ export { ArrowDownIcon } from "./arrow-down";
2
+ export type { ArrowDownIconHandle } from "./arrow-down";
3
+ export { ArrowUpIcon } from "./arrow-up";
4
+ export type { ArrowUpIconHandle } from "./arrow-up";
5
+ export { BellIcon } from "./bell";
6
+ export type { BellIconHandle } from "./bell";
7
+ export { BoldIcon } from "./bold";
8
+ export type { BoldIconHandle } from "./bold";
9
+ export { BookOpenIcon } from "./book-open";
10
+ export type { BookOpenIconHandle } from "./book-open";
11
+ export { BuildingIcon } from "./building";
12
+ export type { BuildingIconHandle } from "./building";
13
+ export { CheckIcon } from "./check";
14
+ export type { CheckIconHandle } from "./check";
15
+ export { ChevronDownIcon } from "./chevron-down";
16
+ export type { ChevronDownIconHandle } from "./chevron-down";
17
+ export { ChevronLeftIcon } from "./chevron-left";
18
+ export type { ChevronLeftIconHandle } from "./chevron-left";
19
+ export { ChevronRightIcon } from "./chevron-right";
20
+ export type { ChevronRightIconHandle } from "./chevron-right";
21
+ export { ChevronUpIcon } from "./chevron-up";
22
+ export type { ChevronUpIconHandle } from "./chevron-up";
23
+ export { ClipboardCheckIcon } from "./clipboard-check";
24
+ export type { ClipboardCheckIconHandle } from "./clipboard-check";
25
+ export { DownloadIcon } from "./download";
26
+ export type { DownloadIconHandle } from "./download";
27
+ export { ExternalLinkIcon } from "./external-link";
28
+ export type { ExternalLinkIconHandle } from "./external-link";
29
+ export { EyeIcon } from "./eye";
30
+ export type { EyeIconHandle } from "./eye";
31
+ export { FileTextIcon } from "./file-text";
32
+ export type { FileTextIconHandle } from "./file-text";
33
+ export { FilterIcon } from "./filter";
34
+ export type { FilterIconHandle } from "./filter";
35
+ export { FolderOpenIcon } from "./folder-open";
36
+ export type { FolderOpenIconHandle } from "./folder-open";
37
+ export { FormIcon } from "./form";
38
+ export type { FormIconHandle } from "./form";
39
+ export { GitBranchIcon } from "./git-branch";
40
+ export type { GitBranchIconHandle } from "./git-branch";
41
+ export { GripHorizontalIcon } from "./grip-horizontal";
42
+ export type { GripHorizontalIconHandle } from "./grip-horizontal";
43
+ export { GripVerticalIcon } from "./grip-vertical";
44
+ export type { GripVerticalIconHandle } from "./grip-vertical";
45
+ export { GripIcon } from "./grip";
46
+ export type { GripIconHandle } from "./grip";
47
+ export { HighlighterIcon } from "./highlighter";
48
+ export type { HighlighterIconHandle } from "./highlighter";
49
+ export { HistoryIcon } from "./history";
50
+ export type { HistoryIconHandle } from "./history";
51
+ export { ItalicIcon } from "./italic";
52
+ export type { ItalicIconHandle } from "./italic";
53
+ export { LinkIcon } from "./link";
54
+ export type { LinkIconHandle } from "./link";
55
+ export { ListOrderedIcon } from "./list-ordered";
56
+ export type { ListOrderedIconHandle } from "./list-ordered";
57
+ export { ListIcon } from "./list";
58
+ export type { ListIconHandle } from "./list";
59
+ export { LoaderPinwheelIcon } from "./loader-pinwheel";
60
+ export type { LoaderPinwheelIconHandle } from "./loader-pinwheel";
61
+ export { LogoutIcon } from "./logout";
62
+ export type { LogoutIconHandle } from "./logout";
63
+ export { MaximizeIcon } from "./maximize";
64
+ export type { MaximizeIconHandle } from "./maximize";
65
+ export { MessageSquareIcon } from "./message-square";
66
+ export type { MessageSquareIconHandle } from "./message-square";
67
+ export { PaletteIcon } from "./palette";
68
+ export type { PaletteIconHandle } from "./palette";
69
+ export { PaperclipIcon } from "./paperclip";
70
+ export type { PaperclipIconHandle } from "./paperclip";
71
+ export { PencilIcon } from "./pencil";
72
+ export type { PencilIconHandle } from "./pencil";
73
+ export { PlusIcon } from "./plus";
74
+ export type { PlusIconHandle } from "./plus";
75
+ export { SearchIcon } from "./search";
76
+ export type { SearchIconHandle } from "./search";
77
+ export { SendIcon } from "./send";
78
+ export type { SendIconHandle } from "./send";
79
+ export { SettingsIcon } from "./settings";
80
+ export type { SettingsIconHandle } from "./settings";
81
+ export { ShieldIcon } from "./shield";
82
+ export type { ShieldIconHandle } from "./shield";
83
+ export { StrikethroughIcon } from "./strikethrough";
84
+ export type { StrikethroughIconHandle } from "./strikethrough";
85
+ export { TimerIcon } from "./timer";
86
+ export type { TimerIconHandle } from "./timer";
87
+ export { TrashIcon } from "./trash";
88
+ export type { TrashIconHandle } from "./trash";
89
+ export { TrendingDownIcon } from "./trending-down";
90
+ export type { TrendingDownIconHandle } from "./trending-down";
91
+ export { TrendingUpIcon } from "./trending-up";
92
+ export type { TrendingUpIconHandle } from "./trending-up";
93
+ export { UnderlineIcon } from "./underline";
94
+ export type { UnderlineIconHandle } from "./underline";
95
+ export { UploadIcon } from "./upload";
96
+ export type { UploadIconHandle } from "./upload";
97
+ export { UsersIcon } from "./users";
98
+ export type { UsersIconHandle } from "./users";
99
+ export { XIcon } from "./x";
100
+ export type { XIconHandle } from "./x";