@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
package/README.md CHANGED
@@ -15,29 +15,101 @@ npm run storybook
15
15
 
16
16
  ```ts
17
17
  import "@neasg/design-system/styles.css";
18
- import { Button, Badge } from "@neasg/design-system";
18
+ import { Badge, Button, Typography } from "@neasg/design-system";
19
19
  ```
20
20
 
21
- For Tailwind-based apps, include the package build output in your content globs so the component utility classes are not purged:
21
+ For Tailwind-based apps, prefer the exported preset so you inherit the shared colors, font tokens, radius tokens, container sizing, and motion defaults:
22
22
 
23
23
  ```ts
24
24
  // tailwind.config.ts
25
- content: [
26
- "./app/**/*.{ts,tsx}",
27
- "./components/**/*.{ts,tsx}",
28
- "./node_modules/@neasg/design-system/dist/**/*.js"
29
- ]
25
+ import type { Config } from "tailwindcss";
26
+ import neaTailwindPreset, {
27
+ neaDesignSystemContent,
28
+ } from "@neasg/design-system/tailwind-preset";
29
+
30
+ const config: Config = {
31
+ presets: [neaTailwindPreset],
32
+ content: [
33
+ "./app/**/*.{ts,tsx}",
34
+ "./components/**/*.{ts,tsx}",
35
+ ...neaDesignSystemContent,
36
+ ],
37
+ };
30
38
  ```
31
39
 
32
40
  Theme tokens are provided through the exported stylesheet. Import `@neasg/design-system/styles.css` once at your app root before rendering package components.
33
41
 
34
- ## Available Exports
42
+ If you want to change the package base font size, override `--font-size-root` after importing the stylesheet:
43
+
44
+ ```css
45
+ :root {
46
+ --font-size-root: 15px;
47
+ }
48
+ ```
49
+
50
+ If you want the package font token to resolve to the actual Inter font in Next.js, load it into `--font-sans`:
51
+
52
+ ```ts
53
+ import { Inter } from "next/font/google";
54
+
55
+ const inter = Inter({
56
+ subsets: ["latin"],
57
+ variable: "--font-sans",
58
+ });
59
+ ```
60
+
61
+ The package currently includes:
62
+
63
+ - theme tokens for colors, typography, font weights, border radius, shared spacing, and dashboard layout sizing/padding
64
+ - typography primitives for titles, headings, body copy, labels, and captions
65
+ - dashboard layout primitives for sidebar + content
66
+ - page header with title, subtitle, and breadcrumbs
67
+ - draggable tabs for overview/case tab strips
68
+ - prescriptive table and pagination components with built-in sorting, loading skeletons, and table-level pagination wiring
69
+
70
+ ## Package Rules
71
+
72
+ - Use `@neasg/design-system` as the source of truth for shared UI.
73
+ - Prefer package components before creating app-local duplicates.
74
+ - If a reusable pattern is missing, extract it into the design system instead of leaving it app-local.
75
+ - This design system is light-theme only. Do not add dark theme tokens, dark variants, or a theme toggle unless product direction changes.
76
+
77
+ ## AI Usage
78
+
79
+ If you are using an AI coding assistant, give it these instructions explicitly:
80
+
81
+ ```text
82
+ Use @neasg/design-system as the source of truth for shared UI.
83
+
84
+ - Prefer components from @neasg/design-system before creating app-local UI.
85
+ - Import package components directly when they already exist instead of building app-local copies.
86
+ - Prefer this import pattern:
87
+ import { Button, Input, PageHeader, Table, Typography } from "@neasg/design-system";
88
+ - Use the package theme tokens and Tailwind preset instead of inventing ad hoc colors, spacing, or radius values.
89
+ - Do not introduce dark theme support. This design system is light-theme only.
90
+ - If a needed shared pattern is missing, extract it into @neasg/design-system rather than building a duplicate local component.
91
+ ```
92
+
93
+ ## Common Exports
35
94
 
36
95
  - `@neasg/design-system`
37
96
  - `@neasg/design-system/button`
38
97
  - `@neasg/design-system/badge`
98
+ - `@neasg/design-system/breadcrumb`
99
+ - `@neasg/design-system/email-input`
100
+ - `@neasg/design-system/input`
101
+ - `@neasg/design-system/otp-input`
102
+ - `@neasg/design-system/phone-input`
103
+ - `@neasg/design-system/textarea`
104
+ - `@neasg/design-system/select`
105
+ - `@neasg/design-system/draggable-tabs`
106
+ - `@neasg/design-system/layout`
107
+ - `@neasg/design-system/page-header`
108
+ - `@neasg/design-system/pagination`
39
109
  - `@neasg/design-system/table`
110
+ - `@neasg/design-system/tailwind-preset`
40
111
  - `@neasg/design-system/tabs`
112
+ - `@neasg/design-system/typography`
41
113
  - `@neasg/design-system/tooltip`
42
114
  - `@neasg/design-system/theme`
43
115
  - `@neasg/design-system/styles.css`
@@ -53,12 +125,28 @@ One-time setup:
53
125
 
54
126
  Release flow:
55
127
 
56
- ```bash
57
- npm version patch
58
- git push origin main --follow-tags
59
- ```
60
-
61
- Pushing a `v*` tag triggers `.github/workflows/publish.yml`, which runs tests, builds the package, and publishes it to npm.
128
+ 1. Make sure all your changes are committed and pushed to `main`.
129
+ 2. Bump the version — this updates `package.json` and creates a git tag automatically:
130
+ ```bash
131
+ npm version patch # 0.2.0 → 0.2.1
132
+ npm version minor # 0.2.0 → 0.3.0
133
+ npm version major # 0.2.0 1.0.0
134
+ npm version 0.5.0 # set an exact version
135
+ ```
136
+ 3. Push the commit and tag together:
137
+ ```bash
138
+ git push origin main --follow-tags
139
+ ```
140
+ 4. The `v*` tag triggers `.github/workflows/publish.yml`, which runs tests, builds, and publishes to npm.
141
+
142
+ > **Note:** If GPG signing fails on step 2, you can do it manually:
143
+ > ```bash
144
+ > npm version 0.2.0 --no-git-tag-version
145
+ > git add package.json package-lock.json
146
+ > git commit -m "0.2.0"
147
+ > git tag v0.2.0
148
+ > git push origin main --follow-tags
149
+ > ```
62
150
 
63
151
  ## Storybook Deployment
64
152
 
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface ArrowDownIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface ArrowDownIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const ArrowDownIcon: import("react").ForwardRefExoticComponent<ArrowDownIconProps & import("react").RefAttributes<ArrowDownIconHandle>>;
10
+ export { ArrowDownIcon };
@@ -0,0 +1,54 @@
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: { d: "m19 12-7 7-7-7", translateY: 0 },
8
+ animate: {
9
+ d: "m19 12-7 7-7-7",
10
+ translateY: [0, -3, 0],
11
+ transition: {
12
+ duration: 0.4,
13
+ },
14
+ },
15
+ };
16
+ const SECOND_PATH_VARIANTS = {
17
+ normal: { d: "M12 5v14" },
18
+ animate: {
19
+ d: ["M12 5v14", "M12 5v9", "M12 5v14"],
20
+ transition: {
21
+ duration: 0.4,
22
+ },
23
+ },
24
+ };
25
+ const ArrowDownIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
26
+ const controls = useAnimation();
27
+ const isControlledRef = useRef(false);
28
+ useImperativeHandle(ref, () => {
29
+ isControlledRef.current = true;
30
+ return {
31
+ startAnimation: () => controls.start("animate"),
32
+ stopAnimation: () => controls.start("normal"),
33
+ };
34
+ });
35
+ const handleMouseEnter = useCallback((e) => {
36
+ if (isControlledRef.current) {
37
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
38
+ }
39
+ else {
40
+ controls.start("animate");
41
+ }
42
+ }, [controls, onMouseEnter]);
43
+ const handleMouseLeave = useCallback((e) => {
44
+ if (isControlledRef.current) {
45
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
46
+ }
47
+ else {
48
+ controls.start("normal");
49
+ }
50
+ }, [controls, onMouseLeave]);
51
+ 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: "m19 12-7 7-7-7", variants: PATH_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M12 5v14", variants: SECOND_PATH_VARIANTS })] }) }));
52
+ });
53
+ ArrowDownIcon.displayName = "ArrowDownIcon";
54
+ export { ArrowDownIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface ArrowUpIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface ArrowUpIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const ArrowUpIcon: import("react").ForwardRefExoticComponent<ArrowUpIconProps & import("react").RefAttributes<ArrowUpIconHandle>>;
10
+ export { ArrowUpIcon };
@@ -0,0 +1,54 @@
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: { d: "m5 12 7-7 7 7", translateY: 0 },
8
+ animate: {
9
+ d: "m5 12 7-7 7 7",
10
+ translateY: [0, 3, 0],
11
+ transition: {
12
+ duration: 0.4,
13
+ },
14
+ },
15
+ };
16
+ const SECOND_PATH_VARIANTS = {
17
+ normal: { d: "M12 19V5" },
18
+ animate: {
19
+ d: ["M12 19V5", "M12 19V10", "M12 19V5"],
20
+ transition: {
21
+ duration: 0.4,
22
+ },
23
+ },
24
+ };
25
+ const ArrowUpIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
26
+ const controls = useAnimation();
27
+ const isControlledRef = useRef(false);
28
+ useImperativeHandle(ref, () => {
29
+ isControlledRef.current = true;
30
+ return {
31
+ startAnimation: () => controls.start("animate"),
32
+ stopAnimation: () => controls.start("normal"),
33
+ };
34
+ });
35
+ const handleMouseEnter = useCallback((e) => {
36
+ if (isControlledRef.current) {
37
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
38
+ }
39
+ else {
40
+ controls.start("animate");
41
+ }
42
+ }, [controls, onMouseEnter]);
43
+ const handleMouseLeave = useCallback((e) => {
44
+ if (isControlledRef.current) {
45
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
46
+ }
47
+ else {
48
+ controls.start("normal");
49
+ }
50
+ }, [controls, onMouseLeave]);
51
+ 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: "m5 12 7-7 7 7", variants: PATH_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M12 19V5", variants: SECOND_PATH_VARIANTS })] }) }));
52
+ });
53
+ ArrowUpIcon.displayName = "ArrowUpIcon";
54
+ export { ArrowUpIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface BellIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface BellIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const BellIcon: import("react").ForwardRefExoticComponent<BellIconProps & import("react").RefAttributes<BellIconHandle>>;
10
+ export { BellIcon };
@@ -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 SVG_VARIANTS = {
7
+ normal: { rotate: 0 },
8
+ animate: { rotate: [0, -10, 10, -10, 0] },
9
+ };
10
+ const BellIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
11
+ const controls = useAnimation();
12
+ const isControlledRef = useRef(false);
13
+ useImperativeHandle(ref, () => {
14
+ isControlledRef.current = true;
15
+ return {
16
+ startAnimation: () => controls.start("animate"),
17
+ stopAnimation: () => controls.start("normal"),
18
+ };
19
+ });
20
+ const handleMouseEnter = useCallback((e) => {
21
+ if (isControlledRef.current) {
22
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
23
+ }
24
+ else {
25
+ controls.start("animate");
26
+ }
27
+ }, [controls, onMouseEnter]);
28
+ const handleMouseLeave = useCallback((e) => {
29
+ if (isControlledRef.current) {
30
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
31
+ }
32
+ else {
33
+ controls.start("normal");
34
+ }
35
+ }, [controls, onMouseLeave]);
36
+ return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs(motion.svg, { animate: controls, fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", transition: {
37
+ duration: 0.5,
38
+ ease: "easeInOut",
39
+ }, variants: SVG_VARIANTS, viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9" }), _jsx("path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0" })] }) }));
40
+ });
41
+ BellIcon.displayName = "BellIcon";
42
+ export { BellIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface BoldIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface BoldIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const BoldIcon: import("react").ForwardRefExoticComponent<BoldIconProps & import("react").RefAttributes<BoldIconHandle>>;
10
+ export { BoldIcon };
@@ -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, fontWeight: 700 },
8
+ animate: {
9
+ scale: [1, 1.2, 1],
10
+ transition: {
11
+ duration: 0.3,
12
+ ease: "easeInOut",
13
+ },
14
+ },
15
+ };
16
+ const BoldIcon = 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: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }) }) }));
43
+ });
44
+ BoldIcon.displayName = "BoldIcon";
45
+ export { BoldIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface BookOpenIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface BookOpenIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const BookOpenIcon: import("react").ForwardRefExoticComponent<BookOpenIconProps & import("react").RefAttributes<BookOpenIconHandle>>;
10
+ export { BookOpenIcon };
@@ -0,0 +1,55 @@
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 LEFT_PAGE_VARIANTS = {
7
+ normal: { rotateY: 0 },
8
+ animate: {
9
+ rotateY: [0, -10, 0],
10
+ transition: {
11
+ duration: 0.4,
12
+ ease: "easeInOut",
13
+ },
14
+ },
15
+ };
16
+ const RIGHT_PAGE_VARIANTS = {
17
+ normal: { rotateY: 0 },
18
+ animate: {
19
+ rotateY: [0, 10, 0],
20
+ transition: {
21
+ duration: 0.4,
22
+ ease: "easeInOut",
23
+ },
24
+ },
25
+ };
26
+ const BookOpenIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 24, ...props }, ref) => {
27
+ const controls = useAnimation();
28
+ const isControlledRef = useRef(false);
29
+ useImperativeHandle(ref, () => {
30
+ isControlledRef.current = true;
31
+ return {
32
+ startAnimation: () => controls.start("animate"),
33
+ stopAnimation: () => controls.start("normal"),
34
+ };
35
+ });
36
+ const handleMouseEnter = useCallback((e) => {
37
+ if (isControlledRef.current) {
38
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
39
+ }
40
+ else {
41
+ controls.start("animate");
42
+ }
43
+ }, [controls, onMouseEnter]);
44
+ const handleMouseLeave = useCallback((e) => {
45
+ if (isControlledRef.current) {
46
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
47
+ }
48
+ else {
49
+ controls.start("normal");
50
+ }
51
+ }, [controls, onMouseLeave]);
52
+ return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsxs("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: [_jsx(motion.path, { animate: controls, d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z", variants: LEFT_PAGE_VARIANTS }), _jsx(motion.path, { animate: controls, d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z", variants: RIGHT_PAGE_VARIANTS })] }) }));
53
+ });
54
+ BookOpenIcon.displayName = "BookOpenIcon";
55
+ export { BookOpenIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface BuildingIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface BuildingIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const BuildingIcon: import("react").ForwardRefExoticComponent<BuildingIconProps & import("react").RefAttributes<BuildingIconHandle>>;
10
+ export { BuildingIcon };
@@ -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: { scale: 1, y: 0 },
8
+ animate: {
9
+ scale: [1, 1.05, 1],
10
+ y: [0, -1, 0],
11
+ transition: {
12
+ duration: 0.4,
13
+ ease: "easeInOut",
14
+ },
15
+ },
16
+ };
17
+ const BuildingIcon = 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: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }), _jsx("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }), _jsx("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }), _jsx("path", { d: "M10 6h4" }), _jsx("path", { d: "M10 10h4" }), _jsx("path", { d: "M10 14h4" }), _jsx("path", { d: "M10 18h4" })] }) }));
44
+ });
45
+ BuildingIcon.displayName = "BuildingIcon";
46
+ export { BuildingIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface CheckIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface CheckIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const CheckIcon: import("react").ForwardRefExoticComponent<CheckIconProps & import("react").RefAttributes<CheckIconHandle>>;
10
+ export { CheckIcon };
@@ -0,0 +1,55 @@
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 PATH_VARIANTS = {
7
+ normal: {
8
+ opacity: 1,
9
+ pathLength: 1,
10
+ scale: 1,
11
+ transition: {
12
+ duration: 0.3,
13
+ opacity: { duration: 0.1 },
14
+ },
15
+ },
16
+ animate: {
17
+ opacity: [0, 1],
18
+ pathLength: [0, 1],
19
+ scale: [0.5, 1],
20
+ transition: {
21
+ duration: 0.4,
22
+ opacity: { duration: 0.1 },
23
+ },
24
+ },
25
+ };
26
+ const CheckIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
27
+ const controls = useAnimation();
28
+ const isControlledRef = useRef(false);
29
+ useImperativeHandle(ref, () => {
30
+ isControlledRef.current = true;
31
+ return {
32
+ startAnimation: () => controls.start("animate"),
33
+ stopAnimation: () => controls.start("normal"),
34
+ };
35
+ });
36
+ const handleMouseEnter = useCallback((e) => {
37
+ if (isControlledRef.current) {
38
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
39
+ }
40
+ else {
41
+ controls.start("animate");
42
+ }
43
+ }, [controls, onMouseEnter]);
44
+ const handleMouseLeave = useCallback((e) => {
45
+ if (isControlledRef.current) {
46
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
47
+ }
48
+ else {
49
+ controls.start("normal");
50
+ }
51
+ }, [controls, onMouseLeave]);
52
+ return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx(motion.path, { animate: controls, d: "M4 12 9 17L20 6", initial: "normal", variants: PATH_VARIANTS }) }) }));
53
+ });
54
+ CheckIcon.displayName = "CheckIcon";
55
+ export { CheckIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface ChevronDownIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface ChevronDownIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const ChevronDownIcon: import("react").ForwardRefExoticComponent<ChevronDownIconProps & import("react").RefAttributes<ChevronDownIconHandle>>;
10
+ export { ChevronDownIcon };
@@ -0,0 +1,42 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { motion, useAnimation } from "motion/react";
4
+ import { forwardRef, useCallback, useImperativeHandle, useRef } from "react";
5
+ import { cn } from "../lib/utils";
6
+ const DEFAULT_TRANSITION = {
7
+ times: [0, 0.4, 1],
8
+ duration: 0.5,
9
+ };
10
+ const ChevronDownIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {
11
+ const controls = useAnimation();
12
+ const isControlledRef = useRef(false);
13
+ useImperativeHandle(ref, () => {
14
+ isControlledRef.current = true;
15
+ return {
16
+ startAnimation: () => controls.start("animate"),
17
+ stopAnimation: () => controls.start("normal"),
18
+ };
19
+ });
20
+ const handleMouseEnter = useCallback((e) => {
21
+ if (isControlledRef.current) {
22
+ onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
23
+ }
24
+ else {
25
+ controls.start("animate");
26
+ }
27
+ }, [controls, onMouseEnter]);
28
+ const handleMouseLeave = useCallback((e) => {
29
+ if (isControlledRef.current) {
30
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e);
31
+ }
32
+ else {
33
+ controls.start("normal");
34
+ }
35
+ }, [controls, onMouseLeave]);
36
+ return (_jsx("div", { className: cn(className), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...props, children: _jsx("svg", { fill: "none", height: size, stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", width: size, xmlns: "http://www.w3.org/2000/svg", children: _jsx(motion.path, { animate: controls, d: "m6 9 6 6 6-6", transition: DEFAULT_TRANSITION, variants: {
37
+ normal: { y: 0 },
38
+ animate: { y: [0, 2, 0] },
39
+ } }) }) }));
40
+ });
41
+ ChevronDownIcon.displayName = "ChevronDownIcon";
42
+ export { ChevronDownIcon };
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+ export interface ChevronLeftIconHandle {
3
+ startAnimation: () => void;
4
+ stopAnimation: () => void;
5
+ }
6
+ interface ChevronLeftIconProps extends HTMLAttributes<HTMLDivElement> {
7
+ size?: number;
8
+ }
9
+ declare const ChevronLeftIcon: import("react").ForwardRefExoticComponent<ChevronLeftIconProps & import("react").RefAttributes<ChevronLeftIconHandle>>;
10
+ export { ChevronLeftIcon };