@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,86 @@
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
+ animate: {
8
+ x: 0,
9
+ y: 0,
10
+ translateX: [0, 2, 0],
11
+ translateY: [0, 2, 0],
12
+ transition: {
13
+ duration: 0.5,
14
+ },
15
+ },
16
+ };
17
+ const PATH_VARIANTS = {
18
+ normal: {
19
+ opacity: 1,
20
+ pathLength: 1,
21
+ transition: {
22
+ duration: 0.4,
23
+ opacity: { duration: 0.1 },
24
+ },
25
+ },
26
+ animate: {
27
+ opacity: [0, 1],
28
+ pathLength: [0, 1],
29
+ pathOffset: [1, 0],
30
+ transition: {
31
+ duration: 0.4,
32
+ opacity: { duration: 0.1 },
33
+ },
34
+ },
35
+ };
36
+ const ARROW_VARIANTS = {
37
+ normal: {
38
+ opacity: 1,
39
+ pathLength: 1,
40
+ transition: {
41
+ delay: 0.3,
42
+ duration: 0.3,
43
+ opacity: { duration: 0.1, delay: 0.3 },
44
+ },
45
+ },
46
+ animate: {
47
+ opacity: [0, 1],
48
+ pathLength: [0, 1],
49
+ pathOffset: [0.5, 0],
50
+ transition: {
51
+ delay: 0.3,
52
+ duration: 0.3,
53
+ opacity: { duration: 0.1, delay: 0.3 },
54
+ },
55
+ },
56
+ };
57
+ const TrendingDownIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
58
+ const controls = useAnimation();
59
+ const isControlledRef = useRef(false);
60
+ useImperativeHandle(ref, () => {
61
+ isControlledRef.current = true;
62
+ return {
63
+ startAnimation: () => controls.start("animate"),
64
+ stopAnimation: () => controls.start("normal"),
65
+ };
66
+ });
67
+ const handleMouseEnter = useCallback((e) => {
68
+ if (isControlledRef.current) {
69
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
70
+ }
71
+ else {
72
+ controls.start("animate");
73
+ }
74
+ }, [controls, onMouseEnter]);
75
+ const handleMouseLeave = useCallback((e) => {
76
+ if (isControlledRef.current) {
77
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
78
+ }
79
+ else {
80
+ controls.start("normal");
81
+ }
82
+ }, [controls, onMouseLeave]);
83
+ 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: SVG_VARIANTS, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx(motion.polyline, { animate: controls, initial: "normal", points: "22 17 13.5 8.5 8.5 13.5 2 7", variants: PATH_VARIANTS }), _jsx(motion.polyline, { animate: controls, initial: "normal", points: "16 17 22 17 22 11", variants: ARROW_VARIANTS })] }) }));
84
+ });
85
+ TrendingDownIcon.displayName = "TrendingDownIcon";
86
+ export { TrendingDownIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface TrendingUpIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface TrendingUpIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const TrendingUpIcon: import("react").ForwardRefExoticComponent<TrendingUpIconProps & import("react").RefAttributes<TrendingUpIconHandle>>;
10
+ export { TrendingUpIcon };
@@ -0,0 +1,86 @@
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
+ animate: {
8
+ x: 0,
9
+ y: 0,
10
+ translateX: [0, 2, 0],
11
+ translateY: [0, -2, 0],
12
+ transition: {
13
+ duration: 0.5,
14
+ },
15
+ },
16
+ };
17
+ const PATH_VARIANTS = {
18
+ normal: {
19
+ opacity: 1,
20
+ pathLength: 1,
21
+ transition: {
22
+ duration: 0.4,
23
+ opacity: { duration: 0.1 },
24
+ },
25
+ },
26
+ animate: {
27
+ opacity: [0, 1],
28
+ pathLength: [0, 1],
29
+ pathOffset: [1, 0],
30
+ transition: {
31
+ duration: 0.4,
32
+ opacity: { duration: 0.1 },
33
+ },
34
+ },
35
+ };
36
+ const ARROW_VARIANTS = {
37
+ normal: {
38
+ opacity: 1,
39
+ pathLength: 1,
40
+ transition: {
41
+ delay: 0.3,
42
+ duration: 0.3,
43
+ opacity: { duration: 0.1, delay: 0.3 },
44
+ },
45
+ },
46
+ animate: {
47
+ opacity: [0, 1],
48
+ pathLength: [0, 1],
49
+ pathOffset: [0.5, 0],
50
+ transition: {
51
+ delay: 0.3,
52
+ duration: 0.3,
53
+ opacity: { duration: 0.1, delay: 0.3 },
54
+ },
55
+ },
56
+ };
57
+ const TrendingUpIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
58
+ const controls = useAnimation();
59
+ const isControlledRef = useRef(false);
60
+ useImperativeHandle(ref, () => {
61
+ isControlledRef.current = true;
62
+ return {
63
+ startAnimation: () => controls.start("animate"),
64
+ stopAnimation: () => controls.start("normal"),
65
+ };
66
+ });
67
+ const handleMouseEnter = useCallback((e) => {
68
+ if (isControlledRef.current) {
69
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
70
+ }
71
+ else {
72
+ controls.start("animate");
73
+ }
74
+ }, [controls, onMouseEnter]);
75
+ const handleMouseLeave = useCallback((e) => {
76
+ if (isControlledRef.current) {
77
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
78
+ }
79
+ else {
80
+ controls.start("normal");
81
+ }
82
+ }, [controls, onMouseLeave]);
83
+ 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: SVG_VARIANTS, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx(motion.polyline, { animate: controls, initial: "normal", points: "22 7 13.5 15.5 8.5 10.5 2 17", variants: PATH_VARIANTS }), _jsx(motion.polyline, { animate: controls, initial: "normal", points: "16 7 22 7 22 13", variants: ARROW_VARIANTS })] }) }));
84
+ });
85
+ TrendingUpIcon.displayName = "TrendingUpIcon";
86
+ export { TrendingUpIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface UnderlineIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface UnderlineIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const UnderlineIcon: import("react").ForwardRefExoticComponent<UnderlineIconProps & import("react").RefAttributes<UnderlineIconHandle>>;
10
+ export { UnderlineIcon };
@@ -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 UnderlineIcon = 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: "M6 4v6a6 6 0 0 0 12 0V4" }), _jsx(motion.line, { animate: controls, style: { originX: 0 }, variants: LINE_VARIANTS, x1: "4", x2: "20", y1: "20", y2: "20" })] }) }));
43
+ });
44
+ UnderlineIcon.displayName = "UnderlineIcon";
45
+ export { UnderlineIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface UploadIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface UploadIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const UploadIcon: import("react").ForwardRefExoticComponent<UploadIconProps & import("react").RefAttributes<UploadIconHandle>>;
10
+ export { UploadIcon };
@@ -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 UploadIcon = 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: "17 8 12 3 7 8" }), _jsx("line", { x1: "12", x2: "12", y1: "3", y2: "15" })] })] }) }));
45
+ });
46
+ UploadIcon.displayName = "UploadIcon";
47
+ export { UploadIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface UsersIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface UsersIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const UsersIcon: import("react").ForwardRefExoticComponent<UsersIconProps & import("react").RefAttributes<UsersIconHandle>>;
10
+ export { UsersIcon };
@@ -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 USER_VARIANTS = {
7
+ normal: { x: 0 },
8
+ animate: {
9
+ x: [0, -2, 2, 0],
10
+ transition: {
11
+ duration: 0.4,
12
+ ease: "easeInOut",
13
+ },
14
+ },
15
+ };
16
+ const UsersIcon = 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: [_jsxs(motion.g, { animate: controls, variants: USER_VARIANTS, children: [_jsx("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }), _jsx("circle", { cx: "9", cy: "7", r: "4" })] }), _jsxs(motion.g, { animate: controls, variants: USER_VARIANTS, children: [_jsx("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }), _jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })] })] }) }));
43
+ });
44
+ UsersIcon.displayName = "UsersIcon";
45
+ export { UsersIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface XIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface XIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const XIcon: import("react").ForwardRefExoticComponent<XIconProps & import("react").RefAttributes<XIconHandle>>;
10
+ export { XIcon };
@@ -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 PATH_VARIANTS = {
7
+ normal: {
8
+ opacity: 1,
9
+ pathLength: 1,
10
+ },
11
+ animate: {
12
+ opacity: [0, 1],
13
+ pathLength: [0, 1],
14
+ },
15
+ };
16
+ const XIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...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(motion.path, { animate: controls, d: "M18 6 6 18", variants: PATH_VARIANTS }), _jsx(motion.path, { animate: controls, d: "m6 6 12 12", transition: { delay: 0.2 }, variants: PATH_VARIANTS })] }) }));
43
+ });
44
+ XIcon.displayName = "XIcon";
45
+ export { XIcon };
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare const AvatarRoot: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ interface AvatarProps extends Omit<React.ComponentPropsWithoutRef<typeof AvatarRoot>, "children"> {
7
+ src?: string | null;
8
+ alt?: string;
9
+ fallback: React.ReactNode;
10
+ imageClassName?: string;
11
+ fallbackClassName?: string;
12
+ }
13
+ interface AvatarProfileProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "role"> {
14
+ src?: string | null;
15
+ alt?: string;
16
+ fallback: React.ReactNode;
17
+ name?: React.ReactNode;
18
+ role?: React.ReactNode;
19
+ rolePlacement?: "above" | "below";
20
+ avatarClassName?: string;
21
+ imageClassName?: string;
22
+ fallbackClassName?: string;
23
+ contentClassName?: string;
24
+ nameClassName?: string;
25
+ roleClassName?: string;
26
+ avatarOverlay?: React.ReactNode;
27
+ }
28
+ declare function Avatar({ src, alt, fallback, className, imageClassName, fallbackClassName, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
29
+ declare function AvatarProfile({ src, alt, fallback, name, role, rolePlacement, className, avatarClassName, imageClassName, fallbackClassName, contentClassName, nameClassName, roleClassName, avatarOverlay, ...props }: AvatarProfileProps): import("react/jsx-runtime").JSX.Element;
30
+ export { Avatar, AvatarProfile, AvatarRoot, AvatarImage, AvatarFallback };
31
+ export type AvatarRootProps = React.ComponentPropsWithoutRef<typeof AvatarRoot>;
32
+ export type { AvatarProps, AvatarProfileProps };
package/dist/avatar.js ADDED
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
+ import { cn } from "./lib/utils";
6
+ const AvatarRoot = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn("relative flex shrink-0 overflow-hidden rounded-full", className), ...props })));
7
+ AvatarRoot.displayName = "AvatarRoot";
8
+ const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Image, { ref: ref, className: cn("aspect-square size-full", className), ...props })));
9
+ AvatarImage.displayName = "AvatarImage";
10
+ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Fallback, { ref: ref, className: cn("flex size-full items-center justify-center rounded-full bg-muted", className), ...props })));
11
+ AvatarFallback.displayName = "AvatarFallback";
12
+ function Avatar({ src, alt = "", fallback, className, imageClassName, fallbackClassName, ...props }) {
13
+ return (_jsxs(AvatarRoot, { className: cn("h-8 w-8", className), ...props, children: [src ? (_jsx(AvatarImage, { src: src, alt: alt, className: imageClassName })) : null, _jsx(AvatarFallback, { className: cn("bg-green-100 text-xs font-medium text-green-800", fallbackClassName), children: fallback })] }));
14
+ }
15
+ function AvatarProfile({ src, alt = "", fallback, name, role, rolePlacement = "above", className, avatarClassName, imageClassName, fallbackClassName, contentClassName, nameClassName, roleClassName, avatarOverlay, ...props }) {
16
+ const hasMeta = name !== undefined || role !== undefined;
17
+ const roleNode = role ? (_jsx("span", { className: cn("text-[10px] font-medium uppercase tracking-wide text-muted-foreground", roleClassName), children: role })) : null;
18
+ const nameNode = name ? (_jsx("span", { className: cn("truncate text-sm font-medium text-foreground", nameClassName), children: name })) : null;
19
+ return (_jsxs("div", { className: cn("flex items-center gap-2", className), ...props, children: [_jsxs("div", { className: "relative shrink-0", children: [_jsx(Avatar, { src: src, alt: alt, fallback: fallback, className: cn("h-8 w-8", avatarClassName), imageClassName: imageClassName, fallbackClassName: fallbackClassName }), avatarOverlay] }), hasMeta ? (_jsxs("div", { className: cn("flex min-w-0 flex-1 flex-col", contentClassName), children: [rolePlacement === "above" ? roleNode : null, nameNode, rolePlacement === "below" ? roleNode : null] })) : null] }));
20
+ }
21
+ export { Avatar, AvatarProfile, AvatarRoot, AvatarImage, AvatarFallback };
package/dist/badge.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "secondary" | "muted" | "destructive" | "outline" | "success" | "warning" | "info" | "actionRead" | "actionCreate" | "actionUpdate" | "actionDelete" | "actionExport" | null | undefined;
4
+ variant?: "muted" | "outline" | "secondary" | "destructive" | "success" | "warning" | "info" | "accent" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  /**
7
- * Visual status label used for short categorical values like case state, action type,
8
- * or approval result. Badges truncate long text and surface the full label via `title`.
7
+ * Visual status label used for short categorical values like case state,
8
+ * approval result, or subdued UI metadata. Badges truncate long text and
9
+ * surface the full label via `title`.
9
10
  */
10
11
  export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
11
12
  }
package/dist/badge.js CHANGED
@@ -2,26 +2,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "./lib/utils";
5
- const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-1.5 py-1 text-[11px] font-semibold leading-none uppercase transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 max-w-[200px] truncate", {
5
+ const badgeVariants = cva("inline-flex max-w-[200px] items-center justify-center text-center rounded-md border px-2 py-0.5 text-xs font-semibold uppercase transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 truncate", {
6
6
  variants: {
7
7
  variant: {
8
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
9
8
  secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
10
9
  muted: "border-transparent bg-muted text-muted-foreground",
11
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
10
+ destructive: "border-transparent bg-[hsl(var(--status-destructive))] text-[hsl(var(--status-destructive-foreground))]",
12
11
  outline: "text-foreground",
13
- success: "border-transparent bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300",
14
- warning: "border-transparent bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300",
15
- info: "border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300",
16
- actionRead: "border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300",
17
- actionCreate: "border-transparent bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300",
18
- actionUpdate: "border-transparent bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-300",
19
- actionDelete: "border-transparent bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300",
20
- actionExport: "border-transparent bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300",
12
+ success: "border-transparent bg-[hsl(var(--status-success))] text-[hsl(var(--status-success-foreground))]",
13
+ warning: "border-transparent bg-[hsl(var(--status-warning))] text-[hsl(var(--status-warning-foreground))]",
14
+ info: "border-transparent bg-[hsl(var(--status-info))] text-[hsl(var(--status-info-foreground))]",
15
+ accent: "border-transparent bg-[hsl(var(--status-accent))] text-[hsl(var(--status-accent-foreground))]",
21
16
  },
22
17
  },
23
18
  defaultVariants: {
24
- variant: "default",
19
+ variant: "secondary",
25
20
  },
26
21
  });
27
22
  function Badge({ className, variant, children, ...props }) {
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ declare const BreadcrumbNav: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
3
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
4
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
5
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
6
+ asChild?: boolean;
7
+ } & React.RefAttributes<HTMLAnchorElement>>;
8
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
+ declare const BreadcrumbSeparator: {
10
+ ({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const BreadcrumbEllipsis: {
14
+ ({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export interface BreadcrumbEntry {
18
+ label: React.ReactNode;
19
+ href?: string;
20
+ }
21
+ export interface BreadcrumbProps extends Omit<React.ComponentPropsWithoutRef<"nav">, "children"> {
22
+ items: BreadcrumbEntry[];
23
+ separator?: React.ReactNode;
24
+ listClassName?: string;
25
+ itemClassName?: string;
26
+ linkClassName?: string;
27
+ currentClassName?: string;
28
+ }
29
+ declare function Breadcrumb({ items, separator, className, listClassName, itemClassName, linkClassName, currentClassName, ...props }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
30
+ export { Breadcrumb, BreadcrumbNav, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ import { cn } from "./lib/utils";
6
+ const BreadcrumbNav = React.forwardRef(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
7
+ BreadcrumbNav.displayName = "BreadcrumbNav";
8
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
9
+ BreadcrumbList.displayName = "BreadcrumbList";
10
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: cn("inline-flex items-center gap-1.5", className), ...props })));
11
+ BreadcrumbItem.displayName = "BreadcrumbItem";
12
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
13
+ const Comp = asChild ? Slot : "a";
14
+ return (_jsx(Comp, { ref: ref, className: cn("transition-colors hover:text-foreground", className), ...props }));
15
+ });
16
+ BreadcrumbLink.displayName = "BreadcrumbLink";
17
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className), ...props })));
18
+ BreadcrumbPage.displayName = "BreadcrumbPage";
19
+ const BreadcrumbSeparator = ({ children, className, ...props }) => (_jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className), ...props, children: children !== null && children !== void 0 ? children : (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.75", children: _jsx("path", { d: "M6 3.5 10.5 8 6 12.5" }) })) }));
20
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
21
+ const BreadcrumbEllipsis = ({ className, ...props }) => (_jsxs("span", { role: "presentation", "aria-hidden": "true", className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [_jsx("span", { className: "text-lg leading-none", children: "\u2026" }), _jsx("span", { className: "sr-only", children: "More" })] }));
22
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
23
+ function Breadcrumb({ items, separator, className, listClassName, itemClassName, linkClassName, currentClassName, ...props }) {
24
+ if (!items.length) {
25
+ return null;
26
+ }
27
+ return (_jsx(BreadcrumbNav, { className: className, ...props, children: _jsx(BreadcrumbList, { className: listClassName, children: items.map((item, index) => {
28
+ const isCurrent = index === items.length - 1 || !item.href;
29
+ return (_jsxs(React.Fragment, { children: [_jsx(BreadcrumbItem, { className: itemClassName, children: isCurrent ? (_jsx(BreadcrumbPage, { className: currentClassName, children: item.label })) : (_jsx(BreadcrumbLink, { href: item.href, className: linkClassName, children: item.label })) }), index < items.length - 1 ? (_jsx(BreadcrumbSeparator, { children: separator })) : null] }, index));
30
+ }) }) }));
31
+ }
32
+ export { Breadcrumb, BreadcrumbNav, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
package/dist/button.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
4
+ variant?: "link" | "default" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "icon" | "lg" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  /**