@mbao01/common 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/types/components/ActivityFeed/ActivityFeed.d.ts +6 -0
  2. package/dist/types/components/ActivityFeed/constants.d.ts +6 -0
  3. package/dist/types/components/ActivityFeed/index.d.ts +2 -0
  4. package/dist/types/components/ActivityFeed/types.d.ts +21 -0
  5. package/dist/types/components/Amount/Amount.d.ts +6 -0
  6. package/dist/types/components/Amount/index.d.ts +2 -0
  7. package/dist/types/components/Amount/types.d.ts +19 -0
  8. package/dist/types/components/AnimatedCounter/AnimatedCounter.d.ts +6 -0
  9. package/dist/types/components/AnimatedCounter/index.d.ts +2 -0
  10. package/dist/types/components/AnimatedCounter/types.d.ts +13 -0
  11. package/dist/types/components/AnimatedGroup/AnimatedGroup.d.ts +6 -0
  12. package/dist/types/components/AnimatedGroup/index.d.ts +2 -0
  13. package/dist/types/components/AnimatedGroup/types.d.ts +22 -0
  14. package/dist/types/components/AnimatedList/AnimatedList.d.ts +6 -0
  15. package/dist/types/components/AnimatedList/index.d.ts +2 -0
  16. package/dist/types/components/AnimatedList/types.d.ts +13 -0
  17. package/dist/types/components/BorderBeam/BorderBeam.d.ts +6 -0
  18. package/dist/types/components/BorderBeam/index.d.ts +2 -0
  19. package/dist/types/components/BorderBeam/types.d.ts +13 -0
  20. package/dist/types/components/Box/Box.d.ts +4 -0
  21. package/dist/types/components/Box/constants.d.ts +4 -0
  22. package/dist/types/components/CalendarHeatmap/CalendarHeatmap.d.ts +6 -0
  23. package/dist/types/components/CalendarHeatmap/index.d.ts +2 -0
  24. package/dist/types/components/CalendarHeatmap/types.d.ts +25 -0
  25. package/dist/types/components/Chart/stories/examples/AreaChart.d.ts +6 -0
  26. package/dist/types/components/Chart/stories/examples/BarChart.d.ts +11 -0
  27. package/dist/types/components/Chart/stories/examples/LineChart.d.ts +10 -0
  28. package/dist/types/components/Chart/stories/examples/PieChart.d.ts +5 -0
  29. package/dist/types/components/Chart/stories/examples/RadialChart.d.ts +5 -0
  30. package/dist/types/components/CircularProgress/CircularProgress.d.ts +6 -0
  31. package/dist/types/components/CircularProgress/constants.d.ts +5 -0
  32. package/dist/types/components/CircularProgress/index.d.ts +2 -0
  33. package/dist/types/components/CircularProgress/types.d.ts +17 -0
  34. package/dist/types/components/ComparisonBar/ComparisonBar.d.ts +6 -0
  35. package/dist/types/components/ComparisonBar/constants.d.ts +4 -0
  36. package/dist/types/components/ComparisonBar/index.d.ts +2 -0
  37. package/dist/types/components/ComparisonBar/types.d.ts +21 -0
  38. package/dist/types/components/Confetti/Confetti.d.ts +6 -0
  39. package/dist/types/components/Confetti/index.d.ts +2 -0
  40. package/dist/types/components/Confetti/types.d.ts +19 -0
  41. package/dist/types/components/CountdownTimer/CountdownTimer.d.ts +6 -0
  42. package/dist/types/components/CountdownTimer/index.d.ts +2 -0
  43. package/dist/types/components/CountdownTimer/types.d.ts +13 -0
  44. package/dist/types/components/DataList/DataList.d.ts +6 -0
  45. package/dist/types/components/DataList/constants.d.ts +12 -0
  46. package/dist/types/components/DataList/index.d.ts +2 -0
  47. package/dist/types/components/DataList/types.d.ts +15 -0
  48. package/dist/types/components/DatePicker/DateRangePresetPicker.d.ts +2 -0
  49. package/dist/types/components/DatePicker/index.d.ts +1 -0
  50. package/dist/types/components/DatePicker/types.d.ts +19 -0
  51. package/dist/types/components/Description/Description.d.ts +2 -1
  52. package/dist/types/components/Description/DescriptionGroup.d.ts +6 -0
  53. package/dist/types/components/Description/constants.d.ts +23 -0
  54. package/dist/types/components/Description/index.d.ts +2 -0
  55. package/dist/types/components/Description/types.d.ts +28 -3
  56. package/dist/types/components/Form/DatetimeInput/DatetimeInput.d.ts +1 -1
  57. package/dist/types/components/GlowCard/GlowCard.d.ts +6 -0
  58. package/dist/types/components/GlowCard/index.d.ts +2 -0
  59. package/dist/types/components/GlowCard/types.d.ts +8 -0
  60. package/dist/types/components/GradientText/GradientText.d.ts +6 -0
  61. package/dist/types/components/GradientText/index.d.ts +2 -0
  62. package/dist/types/components/GradientText/types.d.ts +14 -0
  63. package/dist/types/components/Greeting/Greeting.d.ts +6 -0
  64. package/dist/types/components/Greeting/index.d.ts +2 -0
  65. package/dist/types/components/Greeting/types.d.ts +9 -0
  66. package/dist/types/components/KPICard/KPICard.d.ts +6 -0
  67. package/dist/types/components/KPICard/index.d.ts +2 -0
  68. package/dist/types/components/KPICard/types.d.ts +21 -0
  69. package/dist/types/components/Marquee/Marquee.d.ts +6 -0
  70. package/dist/types/components/Marquee/index.d.ts +2 -0
  71. package/dist/types/components/Marquee/types.d.ts +12 -0
  72. package/dist/types/components/Meteors/Meteors.d.ts +6 -0
  73. package/dist/types/components/Meteors/index.d.ts +2 -0
  74. package/dist/types/components/Meteors/types.d.ts +5 -0
  75. package/dist/types/components/MiniAreaChart/MiniAreaChart.d.ts +6 -0
  76. package/dist/types/components/MiniAreaChart/index.d.ts +2 -0
  77. package/dist/types/components/MiniAreaChart/types.d.ts +10 -0
  78. package/dist/types/components/MiniBarChart/MiniBarChart.d.ts +6 -0
  79. package/dist/types/components/MiniBarChart/index.d.ts +2 -0
  80. package/dist/types/components/MiniBarChart/types.d.ts +15 -0
  81. package/dist/types/components/MiniDonutChart/MiniDonutChart.d.ts +6 -0
  82. package/dist/types/components/MiniDonutChart/index.d.ts +2 -0
  83. package/dist/types/components/MiniDonutChart/types.d.ts +15 -0
  84. package/dist/types/components/MiniStackedBar/MiniStackedBar.d.ts +6 -0
  85. package/dist/types/components/MiniStackedBar/index.d.ts +2 -0
  86. package/dist/types/components/MiniStackedBar/types.d.ts +13 -0
  87. package/dist/types/components/NumberTicker/NumberTicker.d.ts +6 -0
  88. package/dist/types/components/NumberTicker/index.d.ts +2 -0
  89. package/dist/types/components/NumberTicker/types.d.ts +11 -0
  90. package/dist/types/components/Pulse/Pulse.d.ts +6 -0
  91. package/dist/types/components/Pulse/constants.d.ts +10 -0
  92. package/dist/types/components/Pulse/index.d.ts +2 -0
  93. package/dist/types/components/Pulse/types.d.ts +11 -0
  94. package/dist/types/components/ShinyButton/ShinyButton.d.ts +6 -0
  95. package/dist/types/components/ShinyButton/index.d.ts +2 -0
  96. package/dist/types/components/ShinyButton/types.d.ts +4 -0
  97. package/dist/types/components/Sparkline/Sparkline.d.ts +6 -0
  98. package/dist/types/components/Sparkline/index.d.ts +2 -0
  99. package/dist/types/components/Sparkline/types.d.ts +17 -0
  100. package/dist/types/components/SpotlightCard/SpotlightCard.d.ts +6 -0
  101. package/dist/types/components/SpotlightCard/index.d.ts +2 -0
  102. package/dist/types/components/SpotlightCard/types.d.ts +7 -0
  103. package/dist/types/components/StatCard/StatCard.d.ts +6 -0
  104. package/dist/types/components/StatCard/index.d.ts +2 -0
  105. package/dist/types/components/StatCard/types.d.ts +15 -0
  106. package/dist/types/components/TextShimmer/TextShimmer.d.ts +6 -0
  107. package/dist/types/components/TextShimmer/index.d.ts +2 -0
  108. package/dist/types/components/TextShimmer/types.d.ts +7 -0
  109. package/dist/types/components/TrendBadge/TrendBadge.d.ts +6 -0
  110. package/dist/types/components/TrendBadge/constants.d.ts +7 -0
  111. package/dist/types/components/TrendBadge/index.d.ts +2 -0
  112. package/dist/types/components/TrendBadge/types.d.ts +15 -0
  113. package/dist/types/components/WidgetShell/WidgetShell.d.ts +6 -0
  114. package/dist/types/components/WidgetShell/index.d.ts +2 -0
  115. package/dist/types/components/WidgetShell/types.d.ts +20 -0
  116. package/dist/types/index.d.ts +33 -0
  117. package/package.json +2 -1
  118. package/src/components/Accordion/constants.ts +1 -1
  119. package/src/components/ActivityFeed/ActivityFeed.tsx +51 -0
  120. package/src/components/ActivityFeed/constants.ts +19 -0
  121. package/src/components/ActivityFeed/index.ts +2 -0
  122. package/src/components/ActivityFeed/types.ts +23 -0
  123. package/src/components/Alert/constants.ts +1 -1
  124. package/src/components/AlertDialog/constants.ts +1 -1
  125. package/src/components/Amount/Amount.tsx +50 -0
  126. package/src/components/Amount/index.ts +2 -0
  127. package/src/components/Amount/types.ts +20 -0
  128. package/src/components/AnimatedCounter/AnimatedCounter.tsx +68 -0
  129. package/src/components/AnimatedCounter/index.ts +2 -0
  130. package/src/components/AnimatedCounter/types.ts +14 -0
  131. package/src/components/AnimatedGroup/AnimatedGroup.tsx +97 -0
  132. package/src/components/AnimatedGroup/index.ts +2 -0
  133. package/src/components/AnimatedGroup/types.ts +21 -0
  134. package/src/components/AnimatedList/AnimatedList.tsx +42 -0
  135. package/src/components/AnimatedList/index.ts +2 -0
  136. package/src/components/AnimatedList/types.ts +15 -0
  137. package/src/components/Badge/constants.ts +1 -1
  138. package/src/components/Banner/constants.ts +1 -1
  139. package/src/components/BorderBeam/BorderBeam.tsx +41 -0
  140. package/src/components/BorderBeam/index.ts +2 -0
  141. package/src/components/BorderBeam/types.ts +14 -0
  142. package/src/components/Box/Box.tsx +8 -2
  143. package/src/components/Box/constants.ts +35 -0
  144. package/src/components/Button/constants.ts +66 -63
  145. package/src/components/CalendarHeatmap/CalendarHeatmap.tsx +141 -0
  146. package/src/components/CalendarHeatmap/index.ts +2 -0
  147. package/src/components/CalendarHeatmap/types.ts +27 -0
  148. package/src/components/Card/constants.ts +24 -21
  149. package/src/components/Carousel/constants.ts +2 -2
  150. package/src/components/Chart/stories/examples/AreaChart.tsx +55 -0
  151. package/src/components/Chart/stories/examples/BarChart.tsx +95 -0
  152. package/src/components/Chart/stories/examples/LineChart.tsx +111 -0
  153. package/src/components/Chart/stories/examples/PieChart.tsx +55 -0
  154. package/src/components/Chart/stories/examples/RadialChart.tsx +65 -0
  155. package/src/components/CircularProgress/CircularProgress.tsx +46 -0
  156. package/src/components/CircularProgress/constants.ts +32 -0
  157. package/src/components/CircularProgress/index.ts +2 -0
  158. package/src/components/CircularProgress/types.ts +18 -0
  159. package/src/components/Command/constants.ts +1 -1
  160. package/src/components/ComparisonBar/ComparisonBar.tsx +65 -0
  161. package/src/components/ComparisonBar/constants.ts +23 -0
  162. package/src/components/ComparisonBar/index.ts +2 -0
  163. package/src/components/ComparisonBar/types.ts +23 -0
  164. package/src/components/Confetti/Confetti.tsx +82 -0
  165. package/src/components/Confetti/index.ts +2 -0
  166. package/src/components/Confetti/types.ts +20 -0
  167. package/src/components/CountdownTimer/CountdownTimer.tsx +91 -0
  168. package/src/components/CountdownTimer/index.ts +2 -0
  169. package/src/components/CountdownTimer/types.ts +14 -0
  170. package/src/components/DataList/DataList.tsx +32 -0
  171. package/src/components/DataList/constants.ts +47 -0
  172. package/src/components/DataList/index.ts +2 -0
  173. package/src/components/DataList/types.ts +17 -0
  174. package/src/components/DatePicker/DateRangePresetPicker.tsx +122 -0
  175. package/src/components/DatePicker/index.ts +1 -0
  176. package/src/components/DatePicker/types.ts +22 -0
  177. package/src/components/Description/Description.tsx +67 -5
  178. package/src/components/Description/DescriptionGroup.tsx +39 -0
  179. package/src/components/Description/constants.ts +128 -0
  180. package/src/components/Description/index.ts +10 -0
  181. package/src/components/Description/types.ts +31 -3
  182. package/src/components/Dialog/constants.ts +2 -2
  183. package/src/components/Dock/constants.ts +2 -2
  184. package/src/components/Drawer/constants.ts +2 -2
  185. package/src/components/Form/Checkbox/constants.ts +1 -1
  186. package/src/components/Form/DatetimeInput/constants.ts +1 -1
  187. package/src/components/Form/Input/constants.ts +1 -1
  188. package/src/components/Form/MultiSelect/constants.ts +1 -1
  189. package/src/components/Form/NativeSelect/constants.ts +1 -1
  190. package/src/components/Form/Radio/constants.ts +1 -1
  191. package/src/components/Form/Select/constants.ts +1 -1
  192. package/src/components/Form/Slider/constants.ts +1 -1
  193. package/src/components/Form/Switch/constants.ts +1 -1
  194. package/src/components/Form/Textarea/constants.ts +1 -1
  195. package/src/components/GlowCard/GlowCard.tsx +46 -0
  196. package/src/components/GlowCard/index.ts +2 -0
  197. package/src/components/GlowCard/types.ts +9 -0
  198. package/src/components/GradientText/GradientText.tsx +36 -0
  199. package/src/components/GradientText/index.ts +2 -0
  200. package/src/components/GradientText/types.ts +15 -0
  201. package/src/components/Greeting/Greeting.tsx +46 -0
  202. package/src/components/Greeting/index.ts +2 -0
  203. package/src/components/Greeting/types.ts +10 -0
  204. package/src/components/KPICard/KPICard.tsx +85 -0
  205. package/src/components/KPICard/index.ts +2 -0
  206. package/src/components/KPICard/types.ts +22 -0
  207. package/src/components/Marquee/Marquee.tsx +45 -0
  208. package/src/components/Marquee/index.ts +2 -0
  209. package/src/components/Marquee/types.ts +13 -0
  210. package/src/components/Menu/Menubar/constants.ts +2 -2
  211. package/src/components/Menu/NavigationMenu/constants.ts +2 -2
  212. package/src/components/Meteors/Meteors.tsx +38 -0
  213. package/src/components/Meteors/index.ts +2 -0
  214. package/src/components/Meteors/types.ts +6 -0
  215. package/src/components/MiniAreaChart/MiniAreaChart.tsx +68 -0
  216. package/src/components/MiniAreaChart/index.ts +2 -0
  217. package/src/components/MiniAreaChart/types.ts +11 -0
  218. package/src/components/MiniBarChart/MiniBarChart.tsx +49 -0
  219. package/src/components/MiniBarChart/index.ts +2 -0
  220. package/src/components/MiniBarChart/types.ts +16 -0
  221. package/src/components/MiniDonutChart/MiniDonutChart.tsx +87 -0
  222. package/src/components/MiniDonutChart/index.ts +2 -0
  223. package/src/components/MiniDonutChart/types.ts +17 -0
  224. package/src/components/MiniStackedBar/MiniStackedBar.tsx +61 -0
  225. package/src/components/MiniStackedBar/index.ts +2 -0
  226. package/src/components/MiniStackedBar/types.ts +15 -0
  227. package/src/components/NumberTicker/NumberTicker.tsx +58 -0
  228. package/src/components/NumberTicker/index.ts +2 -0
  229. package/src/components/NumberTicker/types.ts +12 -0
  230. package/src/components/Pagination/constants.ts +2 -2
  231. package/src/components/Progress/constants.ts +1 -1
  232. package/src/components/Pulse/Pulse.tsx +26 -0
  233. package/src/components/Pulse/constants.ts +55 -0
  234. package/src/components/Pulse/index.ts +2 -0
  235. package/src/components/Pulse/types.ts +12 -0
  236. package/src/components/Resizable/constants.ts +1 -1
  237. package/src/components/Sheet/constants.ts +1 -1
  238. package/src/components/ShinyButton/ShinyButton.tsx +57 -0
  239. package/src/components/ShinyButton/index.ts +2 -0
  240. package/src/components/ShinyButton/types.ts +8 -0
  241. package/src/components/Skeleton/constants.ts +1 -1
  242. package/src/components/Sonner/constants.ts +1 -1
  243. package/src/components/Sparkline/Sparkline.tsx +108 -0
  244. package/src/components/Sparkline/index.ts +2 -0
  245. package/src/components/Sparkline/types.ts +18 -0
  246. package/src/components/SpotlightCard/SpotlightCard.tsx +56 -0
  247. package/src/components/SpotlightCard/index.ts +2 -0
  248. package/src/components/SpotlightCard/types.ts +8 -0
  249. package/src/components/Stat/constants.ts +1 -1
  250. package/src/components/StatCard/StatCard.tsx +59 -0
  251. package/src/components/StatCard/index.ts +2 -0
  252. package/src/components/StatCard/types.ts +16 -0
  253. package/src/components/Tabs/constants.ts +1 -1
  254. package/src/components/TextShimmer/TextShimmer.tsx +34 -0
  255. package/src/components/TextShimmer/index.ts +2 -0
  256. package/src/components/TextShimmer/types.ts +8 -0
  257. package/src/components/Timeline/constants.ts +1 -1
  258. package/src/components/Toggle/constants.ts +1 -1
  259. package/src/components/Tooltip/constants.ts +1 -1
  260. package/src/components/TrendBadge/TrendBadge.tsx +40 -0
  261. package/src/components/TrendBadge/constants.ts +38 -0
  262. package/src/components/TrendBadge/index.ts +2 -0
  263. package/src/components/TrendBadge/types.ts +16 -0
  264. package/src/components/WidgetShell/WidgetShell.tsx +101 -0
  265. package/src/components/WidgetShell/index.ts +2 -0
  266. package/src/components/WidgetShell/types.ts +22 -0
  267. package/src/index.ts +35 -0
  268. package/src/stylesheets/tailwind.css +208 -0
  269. package/src/utilities/getSubpaths/getSubpaths.ts +1 -2
@@ -25,12 +25,17 @@ export * from './components/Image';
25
25
  export * from './components/Spinner';
26
26
  /** data display */
27
27
  export * from './components/Accordion';
28
+ export * from './components/ActivityFeed';
28
29
  export * from './components/Alert';
30
+ export * from './components/Amount';
29
31
  export * from './components/Avatar';
30
32
  export * from './components/Badge';
31
33
  export * from './components/Card';
32
34
  export * from './components/Calendar';
35
+ export * from './components/CircularProgress';
33
36
  export * from './components/Collapsible';
37
+ export * from './components/CountdownTimer';
38
+ export * from './components/DataList';
34
39
  export * from './components/Description';
35
40
  export * from './components/Dock';
36
41
  export * from './components/Indicator';
@@ -40,15 +45,21 @@ export * from './components/List';
40
45
  export * from './components/Progress';
41
46
  export * from './components/Resizable';
42
47
  export * from './components/ScrollArea';
48
+ export * from './components/ComparisonBar';
43
49
  export * from './components/Separator';
44
50
  export * from './components/Sonner';
51
+ export * from './components/Sparkline';
45
52
  export * from './components/Stack';
46
53
  export * from './components/Stat';
54
+ export * from './components/StatCard';
47
55
  export * from './components/Status';
48
56
  export * from './components/Table';
49
57
  export * from './components/Tabs';
50
58
  export * from './components/Text';
51
59
  export * from './components/Timeline';
60
+ export * from './components/TrendBadge';
61
+ export * from './components/CalendarHeatmap';
62
+ export * from './components/Greeting';
52
63
  /** data input */
53
64
  export * from './components/DatetimePicker';
54
65
  export * from './components/FileUploader';
@@ -65,9 +76,11 @@ export * from './components/Chart';
65
76
  export * from './components/Command';
66
77
  export * from './components/Dialog';
67
78
  export * from './components/HoverCard';
79
+ export * from './components/KPICard';
68
80
  export * from './components/Popover';
69
81
  export * from './components/Slot';
70
82
  export * from './components/Widget';
83
+ export * from './components/WidgetShell';
71
84
  /** molecules */
72
85
  export * from './components/Banner';
73
86
  export * from './components/Empty';
@@ -78,3 +91,23 @@ export * from './components/Footer';
78
91
  export * from './components/Header';
79
92
  export * from './components/Panel';
80
93
  export * from './components/Sheet';
94
+ /** inline charts */
95
+ export * from './components/MiniAreaChart';
96
+ export * from './components/MiniBarChart';
97
+ export * from './components/MiniDonutChart';
98
+ export * from './components/MiniStackedBar';
99
+ /** effects */
100
+ export * from './components/AnimatedCounter';
101
+ export * from './components/AnimatedGroup';
102
+ export * from './components/AnimatedList';
103
+ export * from './components/BorderBeam';
104
+ export * from './components/Confetti';
105
+ export * from './components/GlowCard';
106
+ export * from './components/GradientText';
107
+ export * from './components/Marquee';
108
+ export * from './components/Meteors';
109
+ export * from './components/NumberTicker';
110
+ export * from './components/Pulse';
111
+ export * from './components/ShinyButton';
112
+ export * from './components/SpotlightCard';
113
+ export * from './components/TextShimmer';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mbao01/common",
3
3
  "private": false,
4
- "version": "0.8.1",
4
+ "version": "0.9.0",
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
7
7
  "license": "MIT",
@@ -80,6 +80,7 @@
80
80
  "cmdk": "^1.1.1",
81
81
  "date-fns": "^4.1.0",
82
82
  "embla-carousel-react": "^8.6.0",
83
+ "framer-motion": "^12.38.0",
83
84
  "lucide-react": "^0.577.0",
84
85
  "react-day-picker": "^9.14.0",
85
86
  "react-dropzone": "^14.4.1",
@@ -3,7 +3,7 @@ import { cva } from "../../libs";
3
3
  export const getAccordionItemClasses = cva("border-b");
4
4
 
5
5
  export const getAccordionTriggerClasses = cva(
6
- "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all [&:hover:not(:disabled)]:underline disabled:opacity-50 [&[data-state=open]>svg]:rotate-180"
6
+ "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all duration-200 [&:hover:not(:disabled)]:underline disabled:opacity-50 [&[data-state=open]>svg]:rotate-180"
7
7
  );
8
8
 
9
9
  export const getAccordionContentClasses = cva(
@@ -0,0 +1,51 @@
1
+ import { CircleIcon } from "lucide-react";
2
+ import { cn } from "../../utilities";
3
+ import {
4
+ getActivityFeedClasses,
5
+ getActivityItemClasses,
6
+ getActivityIconClasses,
7
+ getActivityLineClasses,
8
+ getActivityContentClasses,
9
+ getActivityTimestampClasses,
10
+ } from "./constants";
11
+ import type { ActivityFeedProps } from "./types";
12
+
13
+ const ActivityFeed = ({
14
+ items,
15
+ className,
16
+ maxItems,
17
+ showLine = true,
18
+ ...props
19
+ }: ActivityFeedProps) => {
20
+ const displayItems = maxItems ? items.slice(0, maxItems) : items;
21
+
22
+ return (
23
+ <div className={cn(getActivityFeedClasses(), className)} {...props}>
24
+ {displayItems.map((item, index) => {
25
+ const isLast = index === displayItems.length - 1;
26
+
27
+ return (
28
+ <div key={item.id} className={getActivityItemClasses()}>
29
+ <div className={getActivityIconClasses()}>
30
+ {item.icon ?? <CircleIcon className="size-3" />}
31
+ </div>
32
+ {showLine && !isLast && <div className={getActivityLineClasses()} />}
33
+ <div className={getActivityContentClasses()}>
34
+ <div className="flex items-start justify-between gap-2">
35
+ <div className="text-sm">{item.content}</div>
36
+ {item.meta && <div className="shrink-0">{item.meta}</div>}
37
+ </div>
38
+ {item.timestamp && (
39
+ <span className={getActivityTimestampClasses()}>{item.timestamp}</span>
40
+ )}
41
+ </div>
42
+ </div>
43
+ );
44
+ })}
45
+ </div>
46
+ );
47
+ };
48
+
49
+ ActivityFeed.displayName = "ActivityFeed";
50
+
51
+ export { ActivityFeed };
@@ -0,0 +1,19 @@
1
+ import { cva } from "../../libs";
2
+
3
+ export const getActivityFeedClasses = cva("flex flex-col");
4
+
5
+ export const getActivityItemClasses = cva(
6
+ "group relative flex gap-3 pb-4 last:pb-0 transition-colors duration-150"
7
+ );
8
+
9
+ export const getActivityIconClasses = cva(
10
+ "relative z-10 flex size-8 shrink-0 items-center justify-center rounded-full border bg-base-100 text-base-content/60 transition-colors duration-200 group-hover:border-primary/30 group-hover:text-primary"
11
+ );
12
+
13
+ export const getActivityLineClasses = cva(
14
+ "absolute left-4 top-8 -bottom-0 w-px -translate-x-1/2 bg-base-300"
15
+ );
16
+
17
+ export const getActivityContentClasses = cva("flex min-w-0 flex-1 flex-col gap-0.5 pt-1");
18
+
19
+ export const getActivityTimestampClasses = cva("text-xs text-base-content/50 tabular-nums");
@@ -0,0 +1,2 @@
1
+ export { ActivityFeed } from "./ActivityFeed";
2
+ export type { ActivityFeedProps, ActivityItem } from "./types";
@@ -0,0 +1,23 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+
3
+ export type ActivityItem = {
4
+ /** Unique identifier */
5
+ id: string;
6
+ /** Icon or avatar to show */
7
+ icon?: ReactNode;
8
+ /** Main content/description */
9
+ content: ReactNode;
10
+ /** Timestamp or relative time label */
11
+ timestamp?: string;
12
+ /** Optional metadata (e.g. amount, status) */
13
+ meta?: ReactNode;
14
+ };
15
+
16
+ export type ActivityFeedProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
17
+ /** List of activity items to display */
18
+ items: ActivityItem[];
19
+ /** Maximum number of items to show */
20
+ maxItems?: number;
21
+ /** Whether to show the connecting line between items */
22
+ showLine?: boolean;
23
+ };
@@ -2,7 +2,7 @@ import { cva } from "../../libs";
2
2
  import { createVariants } from "../../utilities";
3
3
 
4
4
  export const getAlertClasses = cva(
5
- "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg]:absolute [&>svg]:left-4 [&>svg]:text-inherit",
5
+ "relative w-full rounded-lg border p-4 shadow-sm [&>svg~*]:pl-7 [&>svg]:absolute [&>svg]:left-4 [&>svg]:text-inherit",
6
6
  {
7
7
  variants: createVariants({
8
8
  variant: {
@@ -1,5 +1,5 @@
1
1
  import { cva } from "../../libs";
2
2
 
3
3
  export const getDialogCloseClasses = cva(
4
- "absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
4
+ "absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-all duration-200 hover:opacity-100 hover:rotate-90 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
5
5
  );
@@ -0,0 +1,50 @@
1
+ import { useMemo } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { AmountProps } from "./types";
4
+
5
+ const Amount = ({
6
+ value,
7
+ className,
8
+ currency,
9
+ locale = "en-US",
10
+ notation = "standard",
11
+ minimumFractionDigits,
12
+ maximumFractionDigits,
13
+ signDisplay = "auto",
14
+ colored = false,
15
+ ...props
16
+ }: AmountProps) => {
17
+ const formatted = useMemo(() => {
18
+ const options: Intl.NumberFormatOptions = {
19
+ notation,
20
+ signDisplay,
21
+ minimumFractionDigits,
22
+ maximumFractionDigits,
23
+ };
24
+
25
+ if (currency) {
26
+ options.style = "currency";
27
+ options.currency = currency;
28
+ }
29
+
30
+ return new Intl.NumberFormat(locale, options).format(value);
31
+ }, [value, currency, locale, notation, minimumFractionDigits, maximumFractionDigits, signDisplay]);
32
+
33
+ return (
34
+ <span
35
+ className={cn(
36
+ "tabular-nums",
37
+ colored && value > 0 && "text-success",
38
+ colored && value < 0 && "text-error",
39
+ className
40
+ )}
41
+ {...props}
42
+ >
43
+ {formatted}
44
+ </span>
45
+ );
46
+ };
47
+
48
+ Amount.displayName = "Amount";
49
+
50
+ export { Amount };
@@ -0,0 +1,2 @@
1
+ export { Amount } from "./Amount";
2
+ export type { AmountProps } from "./types";
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type AmountProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
4
+ /** The numeric value to format */
5
+ value: number;
6
+ /** Currency code (e.g. "USD", "EUR", "GBP"). If provided, formats as currency */
7
+ currency?: string;
8
+ /** Locale for formatting (default: "en-US") */
9
+ locale?: string;
10
+ /** Notation style */
11
+ notation?: "standard" | "compact" | "scientific" | "engineering";
12
+ /** Minimum fraction digits */
13
+ minimumFractionDigits?: number;
14
+ /** Maximum fraction digits */
15
+ maximumFractionDigits?: number;
16
+ /** Whether to show sign for positive values */
17
+ signDisplay?: "auto" | "never" | "always" | "exceptZero";
18
+ /** Whether to apply trend coloring (green for positive, red for negative) */
19
+ colored?: boolean;
20
+ };
@@ -0,0 +1,68 @@
1
+ "use client";
2
+
3
+ import { useEffect, useRef, useState } from "react";
4
+ import type { AnimatedCounterProps } from "./types";
5
+ import { cn } from "../../utilities";
6
+
7
+ const DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
8
+
9
+ const Digit = ({ digit, className }: { digit: string; className?: string }) => {
10
+ const numericDigit = parseInt(digit, 10);
11
+ const isNumber = !isNaN(numericDigit);
12
+
13
+ if (!isNumber) {
14
+ return <span className={className}>{digit}</span>;
15
+ }
16
+
17
+ return (
18
+ <span className={cn("relative inline-block h-[1em] w-[0.6em] overflow-hidden", className)}>
19
+ <span
20
+ className="absolute left-0 flex flex-col transition-transform duration-500 ease-out"
21
+ style={{ transform: `translateY(-${numericDigit * 10}%)` }}
22
+ >
23
+ {DIGITS.map((d) => (
24
+ <span key={d} className="flex h-[1em] items-center justify-center">
25
+ {d}
26
+ </span>
27
+ ))}
28
+ </span>
29
+ </span>
30
+ );
31
+ };
32
+
33
+ const AnimatedCounter = ({
34
+ value,
35
+ className,
36
+ prefix = "",
37
+ suffix = "",
38
+ decimalPlaces = 0,
39
+ separator = true,
40
+ ...props
41
+ }: AnimatedCounterProps) => {
42
+ const [displayValue, setDisplayValue] = useState(value);
43
+ const prevValue = useRef(value);
44
+
45
+ useEffect(() => {
46
+ prevValue.current = displayValue;
47
+ setDisplayValue(value);
48
+ // eslint-disable-next-line react-hooks/exhaustive-deps
49
+ }, [value]);
50
+
51
+ const formatted = separator
52
+ ? displayValue.toFixed(decimalPlaces).replace(/\B(?=(\d{3})+(?!\d))/g, ",")
53
+ : displayValue.toFixed(decimalPlaces);
54
+
55
+ const chars = `${prefix}${formatted}${suffix}`.split("");
56
+
57
+ return (
58
+ <span className={cn("inline-flex tabular-nums", className)} {...props}>
59
+ {chars.map((char, i) => (
60
+ <Digit key={`${i}-${char}`} digit={char} />
61
+ ))}
62
+ </span>
63
+ );
64
+ };
65
+
66
+ AnimatedCounter.displayName = "AnimatedCounter";
67
+
68
+ export { AnimatedCounter };
@@ -0,0 +1,2 @@
1
+ export { AnimatedCounter } from "./AnimatedCounter";
2
+ export type { AnimatedCounterProps } from "./types";
@@ -0,0 +1,14 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type AnimatedCounterProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
4
+ /** Target value to display */
5
+ value: number;
6
+ /** Prefix (e.g. "$") */
7
+ prefix?: string;
8
+ /** Suffix (e.g. "%") */
9
+ suffix?: string;
10
+ /** Number of decimal places */
11
+ decimalPlaces?: number;
12
+ /** Whether to include thousand separators */
13
+ separator?: boolean;
14
+ };
@@ -0,0 +1,97 @@
1
+ "use client";
2
+
3
+ import type { Variant, Variants } from "framer-motion";
4
+ import { Children } from "react";
5
+ import { motion } from "framer-motion";
6
+ import type { AnimatedGroupPreset, AnimatedGroupProps } from "./types";
7
+ import { cn } from "../../utilities";
8
+
9
+ const presetVariants: Record<
10
+ AnimatedGroupPreset,
11
+ { container: { hidden: Variant; visible: Variant }; item: { hidden: Variant; visible: Variant } }
12
+ > = {
13
+ fade: {
14
+ container: { hidden: { opacity: 0 }, visible: { opacity: 1 } },
15
+ item: { hidden: { opacity: 0 }, visible: { opacity: 1 } },
16
+ },
17
+ slide: {
18
+ container: { hidden: {}, visible: {} },
19
+ item: {
20
+ hidden: { opacity: 0, y: 20 },
21
+ visible: { opacity: 1, y: 0 },
22
+ },
23
+ },
24
+ scale: {
25
+ container: { hidden: {}, visible: {} },
26
+ item: {
27
+ hidden: { opacity: 0, scale: 0.8 },
28
+ visible: { opacity: 1, scale: 1 },
29
+ },
30
+ },
31
+ blur: {
32
+ container: { hidden: {}, visible: {} },
33
+ item: {
34
+ hidden: { opacity: 0, filter: "blur(4px)" },
35
+ visible: { opacity: 1, filter: "blur(0px)" },
36
+ },
37
+ },
38
+ "blur-slide": {
39
+ container: { hidden: {}, visible: {} },
40
+ item: {
41
+ hidden: { opacity: 0, filter: "blur(4px)", y: 12 },
42
+ visible: { opacity: 1, filter: "blur(0px)", y: 0 },
43
+ },
44
+ },
45
+ };
46
+
47
+ const AnimatedGroup = ({
48
+ children,
49
+ className,
50
+ preset = "fade",
51
+ variants: customVariants,
52
+ staggerDelay = 0.1,
53
+ transition,
54
+ ...props
55
+ }: AnimatedGroupProps) => {
56
+ const variants = customVariants ?? presetVariants[preset];
57
+ const containerVariants = {
58
+ hidden: variants.container?.hidden ?? {},
59
+ visible: {
60
+ ...(variants.container?.visible as Record<string, unknown>),
61
+ transition: {
62
+ staggerChildren: staggerDelay,
63
+ ...transition,
64
+ },
65
+ },
66
+ } as Variants;
67
+
68
+ const itemVariants = {
69
+ hidden: variants.item?.hidden ?? { opacity: 0 },
70
+ visible: {
71
+ ...((variants.item?.visible as Record<string, unknown>) ?? { opacity: 1 }),
72
+ transition: {
73
+ duration: 0.4,
74
+ ease: [0.25, 0.4, 0.25, 1],
75
+ ...transition,
76
+ },
77
+ },
78
+ } as Variants;
79
+
80
+ return (
81
+ <motion.div
82
+ className={cn(className)}
83
+ variants={containerVariants}
84
+ initial="hidden"
85
+ animate="visible"
86
+ {...props}
87
+ >
88
+ {Children.map(children, (child) => (
89
+ <motion.div variants={itemVariants}>{child}</motion.div>
90
+ ))}
91
+ </motion.div>
92
+ );
93
+ };
94
+
95
+ AnimatedGroup.displayName = "AnimatedGroup";
96
+
97
+ export { AnimatedGroup };
@@ -0,0 +1,2 @@
1
+ export { AnimatedGroup } from "./AnimatedGroup";
2
+ export type { AnimatedGroupPreset, AnimatedGroupProps } from "./types";
@@ -0,0 +1,21 @@
1
+ import type { Transition, Variant } from "framer-motion";
2
+ import type { HTMLAttributes } from "react";
3
+
4
+ export type AnimatedGroupPreset = "fade" | "slide" | "scale" | "blur" | "blur-slide";
5
+
6
+ export type AnimatedGroupProps = Omit<
7
+ HTMLAttributes<HTMLDivElement>,
8
+ "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart"
9
+ > & {
10
+ /** Animation preset */
11
+ preset?: AnimatedGroupPreset;
12
+ /** Custom framer-motion variants */
13
+ variants?: {
14
+ container?: { hidden?: Variant; visible?: Variant };
15
+ item?: { hidden?: Variant; visible?: Variant };
16
+ };
17
+ /** Stagger delay between children in seconds */
18
+ staggerDelay?: number;
19
+ /** Animation transition config */
20
+ transition?: Transition;
21
+ };
@@ -0,0 +1,42 @@
1
+ "use client";
2
+
3
+ import { AnimatePresence, motion } from "framer-motion";
4
+ import { cn } from "../../utilities";
5
+ import type { AnimatedListProps } from "./types";
6
+
7
+ const AnimatedList = ({
8
+ items,
9
+ className,
10
+ maxItems,
11
+ staggerDelay = 100,
12
+ ...props
13
+ }: AnimatedListProps) => {
14
+ const visibleItems = maxItems ? items.slice(-maxItems) : items;
15
+
16
+ return (
17
+ <div className={cn("flex flex-col gap-2 overflow-hidden", className)} {...props}>
18
+ <AnimatePresence initial={false}>
19
+ {visibleItems.map((item, index) => (
20
+ <motion.div
21
+ key={item.id}
22
+ layout
23
+ initial={{ opacity: 0, y: 20, scale: 0.95 }}
24
+ animate={{ opacity: 1, y: 0, scale: 1 }}
25
+ exit={{ opacity: 0, y: -20, scale: 0.95 }}
26
+ transition={{
27
+ duration: 0.3,
28
+ delay: index * (staggerDelay / 1000),
29
+ ease: [0.16, 1, 0.3, 1],
30
+ }}
31
+ >
32
+ {item.content}
33
+ </motion.div>
34
+ ))}
35
+ </AnimatePresence>
36
+ </div>
37
+ );
38
+ };
39
+
40
+ AnimatedList.displayName = "AnimatedList";
41
+
42
+ export { AnimatedList };
@@ -0,0 +1,2 @@
1
+ export { AnimatedList } from "./AnimatedList";
2
+ export type { AnimatedListProps, AnimatedListItem } from "./types";
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+
3
+ export type AnimatedListItem = {
4
+ id: string;
5
+ content: ReactNode;
6
+ };
7
+
8
+ export type AnimatedListProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
9
+ /** Items to display */
10
+ items: AnimatedListItem[];
11
+ /** Maximum visible items */
12
+ maxItems?: number;
13
+ /** Delay between each item appearing (ms) */
14
+ staggerDelay?: number;
15
+ };
@@ -1,7 +1,7 @@
1
1
  import { cva } from "../../libs";
2
2
  import { createVariants } from "../../utilities";
3
3
 
4
- export const getBadgeClasses = cva("badge", {
4
+ export const getBadgeClasses = cva("badge transition-colors duration-200", {
5
5
  variants: createVariants({
6
6
  variant: {
7
7
  accent: "badge-accent",
@@ -1,7 +1,7 @@
1
1
  import { cva } from "../../libs";
2
2
  import { createVariants } from "../../utilities";
3
3
 
4
- export const getBannerClasses = cva("alert alert-vertical sm:alert-horizontal", {
4
+ export const getBannerClasses = cva("alert alert-vertical sm:alert-horizontal shadow-sm", {
5
5
  variants: createVariants({
6
6
  variant: {
7
7
  info: "alert-info",
@@ -0,0 +1,41 @@
1
+ import type { CSSProperties } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { BorderBeamProps } from "./types";
4
+
5
+ const BorderBeam = ({
6
+ className,
7
+ size = 200,
8
+ duration = 4,
9
+ delay = 0,
10
+ colorFrom = "oklch(0.7 0.25 250)",
11
+ colorTo = "oklch(0.7 0.2 330)",
12
+ ...props
13
+ }: BorderBeamProps) => {
14
+ return (
15
+ <div
16
+ className={cn(
17
+ "pointer-events-none absolute inset-0 rounded-[inherit] border border-transparent",
18
+ "[mask-clip:padding-box,border-box] [mask-composite:intersect]",
19
+ "[mask-image:linear-gradient(transparent,transparent),linear-gradient(#fff,#fff)]",
20
+ "after:absolute after:aspect-square after:animate-border-beam",
21
+ "after:bg-[linear-gradient(var(--beam-color-from),var(--beam-color-to),transparent)]",
22
+ "after:[offset-path:rect(0_auto_auto_0_round_var(--beam-size))]",
23
+ className
24
+ )}
25
+ style={
26
+ {
27
+ "--beam-size": `${size}px`,
28
+ "--beam-color-from": colorFrom,
29
+ "--beam-color-to": colorTo,
30
+ "--tw-duration": `${duration}s`,
31
+ animationDelay: `${delay}s`,
32
+ } as CSSProperties
33
+ }
34
+ {...props}
35
+ />
36
+ );
37
+ };
38
+
39
+ BorderBeam.displayName = "BorderBeam";
40
+
41
+ export { BorderBeam };
@@ -0,0 +1,2 @@
1
+ export { BorderBeam } from "./BorderBeam";
2
+ export type { BorderBeamProps } from "./types";
@@ -0,0 +1,14 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type BorderBeamProps = HTMLAttributes<HTMLDivElement> & {
4
+ /** Size of the beam in pixels */
5
+ size?: number;
6
+ /** Duration of the animation in seconds */
7
+ duration?: number;
8
+ /** Delay before animation starts in seconds */
9
+ delay?: number;
10
+ /** Start color of the beam gradient */
11
+ colorFrom?: string;
12
+ /** End color of the beam gradient */
13
+ colorTo?: string;
14
+ };