@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
@@ -1,7 +1,7 @@
1
1
  import { cva } from "../../../libs";
2
2
  import { createVariants } from "../../../utilities";
3
3
 
4
- export const getNativeSelectClasses = cva("select", {
4
+ export const getNativeSelectClasses = cva("select transition-all duration-200", {
5
5
  variants: createVariants({
6
6
  nativeOptions: {
7
7
  true: "appearance-none",
@@ -1,7 +1,7 @@
1
1
  import { cva } from "../../../libs";
2
2
  import { createVariants } from "../../../utilities";
3
3
 
4
- export const getRadioClasses = cva("radio", {
4
+ export const getRadioClasses = cva("radio transition-all duration-200", {
5
5
  variants: createVariants({
6
6
  variant: {
7
7
  primary: "radio-primary",
@@ -2,7 +2,7 @@ import { cva } from "../../../libs";
2
2
  import { createVariants } from "../../../utilities";
3
3
 
4
4
  export const getSelectTriggerClasses = cva(
5
- "select flex items-center justify-between rounded-md text-sm text-left disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-100",
5
+ "select flex items-center justify-between rounded-md text-sm text-left disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",
6
6
  {
7
7
  variants: createVariants({
8
8
  variant: {
@@ -58,7 +58,7 @@ export const getSliderClasses = cva("absolute h-full", {
58
58
  });
59
59
 
60
60
  export const getSliderThumbClasses = cva(
61
- "block h-5 w-5 rounded-full border-2 ring-offset-neutral transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
61
+ "block h-5 w-5 rounded-full border-2 ring-offset-neutral transition-all duration-200 hover:scale-110 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
62
62
  {
63
63
  variants: createVariants({
64
64
  variant: {
@@ -1,7 +1,7 @@
1
1
  import { cva } from "../../../libs";
2
2
  import { createVariants } from "../../../utilities";
3
3
 
4
- export const getSwitchClasses = cva("toggle", {
4
+ export const getSwitchClasses = cva("toggle transition-all duration-200", {
5
5
  variants: createVariants({
6
6
  variant: {
7
7
  primary: "toggle-primary",
@@ -1,7 +1,7 @@
1
1
  import { cva } from "../../../libs";
2
2
  import { createVariants } from "../../../utilities";
3
3
 
4
- export const getTextareaClasses = cva("textarea rounded-md transition-all duration-100", {
4
+ export const getTextareaClasses = cva("textarea rounded-md transition-all duration-200", {
5
5
  variants: createVariants({
6
6
  variant: {
7
7
  default: "bg-transparent",
@@ -0,0 +1,46 @@
1
+ import type { CSSProperties } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { GlowCardProps } from "./types";
4
+
5
+ const GlowCard = ({
6
+ children,
7
+ className,
8
+ gradientFrom = "oklch(0.7 0.25 250)",
9
+ gradientVia = "oklch(0.7 0.2 330)",
10
+ gradientTo = "oklch(0.7 0.25 150)",
11
+ ...props
12
+ }: GlowCardProps) => {
13
+ return (
14
+ <div
15
+ className={cn(
16
+ "group relative rounded-xl p-px transition-shadow duration-500",
17
+ className
18
+ )}
19
+ {...props}
20
+ >
21
+ <div
22
+ className="absolute -inset-px rounded-xl opacity-50 blur-sm transition-opacity duration-500 group-hover:opacity-100"
23
+ style={
24
+ {
25
+ background: `linear-gradient(135deg, ${gradientFrom}, ${gradientVia}, ${gradientTo})`,
26
+ } as CSSProperties
27
+ }
28
+ aria-hidden="true"
29
+ />
30
+ <div
31
+ className="absolute -inset-px rounded-xl opacity-0 transition-opacity duration-500 group-hover:opacity-100"
32
+ style={
33
+ {
34
+ background: `linear-gradient(135deg, ${gradientFrom}, ${gradientVia}, ${gradientTo})`,
35
+ } as CSSProperties
36
+ }
37
+ aria-hidden="true"
38
+ />
39
+ <div className="relative rounded-xl bg-base-100 p-6">{children}</div>
40
+ </div>
41
+ );
42
+ };
43
+
44
+ GlowCard.displayName = "GlowCard";
45
+
46
+ export { GlowCard };
@@ -0,0 +1,2 @@
1
+ export { GlowCard } from "./GlowCard";
2
+ export type { GlowCardProps } from "./types";
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+
3
+ export type GlowCardProps = HTMLAttributes<HTMLDivElement> & {
4
+ children: ReactNode;
5
+ /** Gradient colors for the glow border */
6
+ gradientFrom?: string;
7
+ gradientVia?: string;
8
+ gradientTo?: string;
9
+ };
@@ -0,0 +1,36 @@
1
+ import type { CSSProperties } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { GradientTextProps } from "./types";
4
+
5
+ const GradientText = ({
6
+ children,
7
+ className,
8
+ from = "oklch(0.7 0.25 250)",
9
+ via,
10
+ to = "oklch(0.7 0.2 330)",
11
+ angle = 135,
12
+ animated = false,
13
+ ...props
14
+ }: GradientTextProps) => {
15
+ const gradient = via
16
+ ? `linear-gradient(${angle}deg, ${from}, ${via}, ${to})`
17
+ : `linear-gradient(${angle}deg, ${from}, ${to})`;
18
+
19
+ return (
20
+ <span
21
+ className={cn(
22
+ "bg-clip-text text-transparent",
23
+ animated && "animate-gradient bg-[length:300%_100%]",
24
+ className
25
+ )}
26
+ style={{ backgroundImage: gradient } as CSSProperties}
27
+ {...props}
28
+ >
29
+ {children}
30
+ </span>
31
+ );
32
+ };
33
+
34
+ GradientText.displayName = "GradientText";
35
+
36
+ export { GradientText };
@@ -0,0 +1,2 @@
1
+ export { GradientText } from "./GradientText";
2
+ export type { GradientTextProps } from "./types";
@@ -0,0 +1,15 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+
3
+ export type GradientTextProps = HTMLAttributes<HTMLSpanElement> & {
4
+ children: ReactNode;
5
+ /** Gradient start color */
6
+ from?: string;
7
+ /** Gradient middle color */
8
+ via?: string;
9
+ /** Gradient end color */
10
+ to?: string;
11
+ /** Gradient direction in degrees */
12
+ angle?: number;
13
+ /** Whether to animate the gradient */
14
+ animated?: boolean;
15
+ };
@@ -0,0 +1,46 @@
1
+ import { useMemo } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { GreetingProps } from "./types";
4
+
5
+ const getTimeGreeting = () => {
6
+ const hour = new Date().getHours();
7
+ if (hour < 12) return "Good morning";
8
+ if (hour < 17) return "Good afternoon";
9
+ return "Good evening";
10
+ };
11
+
12
+ const Greeting = ({
13
+ name,
14
+ className,
15
+ subtitle,
16
+ greeting: customGreeting,
17
+ ...props
18
+ }: GreetingProps) => {
19
+ const greeting = useMemo(() => customGreeting ?? getTimeGreeting(), [customGreeting]);
20
+
21
+ const dateStr = useMemo(
22
+ () =>
23
+ new Date().toLocaleDateString("en-US", {
24
+ weekday: "long",
25
+ year: "numeric",
26
+ month: "long",
27
+ day: "numeric",
28
+ }),
29
+ []
30
+ );
31
+
32
+ return (
33
+ <div className={cn("flex flex-col gap-1", className)} {...props}>
34
+ <h1 className="text-2xl font-bold tracking-tight">
35
+ {greeting}, {name}
36
+ </h1>
37
+ <p className="text-sm text-base-content/60">
38
+ {subtitle ?? dateStr}
39
+ </p>
40
+ </div>
41
+ );
42
+ };
43
+
44
+ Greeting.displayName = "Greeting";
45
+
46
+ export { Greeting };
@@ -0,0 +1,2 @@
1
+ export { Greeting } from "./Greeting";
2
+ export type { GreetingProps } from "./types";
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type GreetingProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
4
+ /** User's name */
5
+ name: string;
6
+ /** Optional subtitle/context line */
7
+ subtitle?: string;
8
+ /** Custom greeting override (bypasses time-based greeting) */
9
+ greeting?: string;
10
+ };
@@ -0,0 +1,85 @@
1
+ import { cn } from "../../utilities";
2
+ import { Sparkline } from "../Sparkline";
3
+ import { TrendBadge } from "../TrendBadge";
4
+ import type { KPICardProps } from "./types";
5
+
6
+ const KPICard = ({
7
+ title,
8
+ value,
9
+ change,
10
+ description,
11
+ sparklineData,
12
+ sparklineColor,
13
+ sparklineFilled = true,
14
+ icon,
15
+ loading = false,
16
+ className,
17
+ ...props
18
+ }: KPICardProps) => {
19
+ if (loading) {
20
+ return (
21
+ <div
22
+ className={cn(
23
+ "rounded-lg border bg-base-100 p-4 shadow-sm transition-shadow duration-300 hover:shadow-md",
24
+ className
25
+ )}
26
+ {...props}
27
+ >
28
+ <div className="flex items-center justify-between">
29
+ <span className="skeleton h-4 w-24 rounded" />
30
+ {icon && <span className="skeleton size-8 rounded-md" />}
31
+ </div>
32
+ <div className="mt-3 flex items-end justify-between gap-4">
33
+ <div className="flex flex-col gap-1.5">
34
+ <span className="skeleton h-7 w-28 rounded" />
35
+ <span className="skeleton h-3.5 w-20 rounded" />
36
+ </div>
37
+ <span className="skeleton h-8 w-20 rounded" />
38
+ </div>
39
+ </div>
40
+ );
41
+ }
42
+
43
+ return (
44
+ <div
45
+ className={cn(
46
+ "rounded-lg border bg-base-100 p-4 shadow-sm transition-shadow duration-300 hover:shadow-md",
47
+ className
48
+ )}
49
+ {...props}
50
+ >
51
+ <div className="flex items-center justify-between">
52
+ <span className="text-sm font-medium text-base-content/60">{title}</span>
53
+ {icon && (
54
+ <div className="flex size-8 items-center justify-center rounded-md bg-base-200/50 text-base-content/60">
55
+ {icon}
56
+ </div>
57
+ )}
58
+ </div>
59
+ <div className="mt-3 flex items-end justify-between gap-4">
60
+ <div className="flex flex-col gap-1">
61
+ <span className="text-2xl font-bold tracking-tight">{value}</span>
62
+ <div className="flex items-center gap-2">
63
+ {change !== undefined && <TrendBadge value={change} size="xs" />}
64
+ {description && (
65
+ <span className="text-xs text-base-content/50">{description}</span>
66
+ )}
67
+ </div>
68
+ </div>
69
+ {sparklineData && sparklineData.length >= 2 && (
70
+ <Sparkline
71
+ data={sparklineData}
72
+ color={sparklineColor ?? (change !== undefined && change >= 0 ? "oklch(0.7 0.2 150)" : "oklch(0.65 0.25 25)")}
73
+ filled={sparklineFilled}
74
+ width={80}
75
+ height={32}
76
+ />
77
+ )}
78
+ </div>
79
+ </div>
80
+ );
81
+ };
82
+
83
+ KPICard.displayName = "KPICard";
84
+
85
+ export { KPICard };
@@ -0,0 +1,2 @@
1
+ export { KPICard } from "./KPICard";
2
+ export type { KPICardProps } from "./types";
@@ -0,0 +1,22 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+
3
+ export type KPICardProps = HTMLAttributes<HTMLDivElement> & {
4
+ /** Card title/label */
5
+ title: string;
6
+ /** Primary value to display */
7
+ value: ReactNode;
8
+ /** Trend change percentage */
9
+ change?: number;
10
+ /** Description text below value */
11
+ description?: string;
12
+ /** Sparkline data points */
13
+ sparklineData?: number[];
14
+ /** Sparkline color */
15
+ sparklineColor?: string;
16
+ /** Whether sparkline is filled */
17
+ sparklineFilled?: boolean;
18
+ /** Icon to show in the card */
19
+ icon?: ReactNode;
20
+ /** Loading state */
21
+ loading?: boolean;
22
+ };
@@ -0,0 +1,45 @@
1
+ import type { CSSProperties } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { MarqueeProps } from "./types";
4
+
5
+ const Marquee = ({
6
+ children,
7
+ className,
8
+ speed = 40,
9
+ direction = "left",
10
+ pauseOnHover = true,
11
+ gap = 16,
12
+ ...props
13
+ }: MarqueeProps) => {
14
+ const animationDirection = direction === "left" ? "normal" : "reverse";
15
+
16
+ return (
17
+ <div
18
+ className={cn(
19
+ "group flex overflow-hidden [--gap:16px]",
20
+ pauseOnHover && "[&:hover_>_.marquee-track]:paused",
21
+ className
22
+ )}
23
+ style={{ "--gap": `${gap}px` } as CSSProperties}
24
+ {...props}
25
+ >
26
+ {[0, 1].map((i) => (
27
+ <div
28
+ key={i}
29
+ className="marquee-track flex shrink-0 animate-marquee items-center justify-around gap-[var(--gap)]"
30
+ style={{
31
+ animationDirection,
32
+ animationDuration: `${speed}s`,
33
+ }}
34
+ aria-hidden={i === 1 ? "true" : undefined}
35
+ >
36
+ {children}
37
+ </div>
38
+ ))}
39
+ </div>
40
+ );
41
+ };
42
+
43
+ Marquee.displayName = "Marquee";
44
+
45
+ export { Marquee };
@@ -0,0 +1,2 @@
1
+ export { Marquee } from "./Marquee";
2
+ export type { MarqueeProps } from "./types";
@@ -0,0 +1,13 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+
3
+ export type MarqueeProps = HTMLAttributes<HTMLDivElement> & {
4
+ children: ReactNode;
5
+ /** Speed in pixels per second */
6
+ speed?: number;
7
+ /** Direction of scroll */
8
+ direction?: "left" | "right";
9
+ /** Pause on hover */
10
+ pauseOnHover?: boolean;
11
+ /** Gap between repeated items */
12
+ gap?: number;
13
+ };
@@ -38,7 +38,7 @@ export const getMenubarClasses = cva(
38
38
  );
39
39
 
40
40
  export const getMenubarTriggerClasses = cva(
41
- "flex cursor-default select-none items-center rounded-xs px-3 py-1 text-sm font-medium outline-hidden",
41
+ "flex cursor-default select-none items-center rounded-xs px-3 py-1 text-sm font-medium outline-hidden transition-colors duration-200",
42
42
  {
43
43
  variants: createVariants({
44
44
  variant: triggerVariant,
@@ -67,7 +67,7 @@ export const getMenubarSubContentClasses = cva(
67
67
  );
68
68
 
69
69
  export const getMenubarItemClasses = cva(
70
- "relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
70
+ "relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors duration-150 data-disabled:pointer-events-none data-disabled:opacity-50",
71
71
  {
72
72
  variants: createVariants({
73
73
  variant: itemVariant,
@@ -10,7 +10,7 @@ export const getNavigationMenuListClasses = cva(
10
10
  );
11
11
 
12
12
  export const getNavigationMenuTriggerClasses = cva(
13
- "group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors focus:outline-hidden disabled:pointer-events-none disabled:opacity-50",
13
+ "group inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200 focus:outline-hidden disabled:pointer-events-none disabled:opacity-50",
14
14
  {
15
15
  variants: createVariants({
16
16
  variant: {
@@ -41,7 +41,7 @@ export const getNavigationMenuContentClasses = cva(
41
41
  );
42
42
 
43
43
  export const getNavigationMenuViewportClasses = cva(
44
- "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-base-100 shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]"
44
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-base-100 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]"
45
45
  );
46
46
 
47
47
  export const getNavigationMenuIndicatorClasses = cva(
@@ -0,0 +1,38 @@
1
+ import { useMemo } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { MeteorsProps } from "./types";
4
+
5
+ const Meteors = ({ className, count = 20, ...props }: MeteorsProps) => {
6
+ const meteors = useMemo(
7
+ () =>
8
+ Array.from({ length: count }, (_, i) => ({
9
+ id: i,
10
+ left: `${Math.floor(Math.random() * 100)}%`,
11
+ delay: `${Math.random() * 5}s`,
12
+ duration: `${Math.floor(Math.random() * 3 + 2)}s`,
13
+ })),
14
+ [count]
15
+ );
16
+
17
+ return (
18
+ <div className={cn("pointer-events-none absolute inset-0 overflow-hidden", className)} {...props}>
19
+ {meteors.map((meteor) => (
20
+ <span
21
+ key={meteor.id}
22
+ className="absolute top-0 h-0.5 w-0.5 rotate-[215deg] animate-meteor rounded-full bg-base-content shadow-[0_0_0_1px_oklch(1_0_0/0.1),0_0_10px_oklch(1_0_0/0.2)]"
23
+ style={{
24
+ left: meteor.left,
25
+ animationDelay: meteor.delay,
26
+ animationDuration: meteor.duration,
27
+ }}
28
+ >
29
+ <span className="pointer-events-none absolute top-1/2 -z-10 h-px w-12 -translate-y-1/2 bg-gradient-to-r from-base-content/80 to-transparent" />
30
+ </span>
31
+ ))}
32
+ </div>
33
+ );
34
+ };
35
+
36
+ Meteors.displayName = "Meteors";
37
+
38
+ export { Meteors };
@@ -0,0 +1,2 @@
1
+ export { Meteors } from "./Meteors";
2
+ export type { MeteorsProps } from "./types";
@@ -0,0 +1,6 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type MeteorsProps = HTMLAttributes<HTMLDivElement> & {
4
+ /** Number of meteors to render */
5
+ count?: number;
6
+ };
@@ -0,0 +1,68 @@
1
+ import { useMemo } from "react";
2
+ import type { MiniAreaChartProps } from "./types";
3
+ import { cn } from "../../utilities";
4
+
5
+ const MiniAreaChart = ({
6
+ data,
7
+ className,
8
+ width = 100,
9
+ height = 32,
10
+ color = "currentColor",
11
+ gradientOpacity = 0.15,
12
+ strokeWidth = 1.5,
13
+ ...props
14
+ }: MiniAreaChartProps) => {
15
+ const { linePath, areaPath } = useMemo(() => {
16
+ if (data.length < 2) return { linePath: "", areaPath: "" };
17
+ const min = Math.min(...data);
18
+ const max = Math.max(...data);
19
+ const range = max - min || 1;
20
+ const pad = strokeWidth;
21
+
22
+ const points = data.map((v, i) => ({
23
+ x: pad + (i / (data.length - 1)) * (width - pad * 2),
24
+ y: pad + (height - pad * 2) - ((v - min) / range) * (height - pad * 2),
25
+ }));
26
+
27
+ const line = points.map((p, i) => `${i === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ");
28
+ const area = `${line} L ${points[points.length - 1].x} ${height} L ${points[0].x} ${height} Z`;
29
+
30
+ return { linePath: line, areaPath: area };
31
+ }, [data, width, height, strokeWidth]);
32
+ const randomId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
33
+
34
+ if (data.length < 2) return null;
35
+
36
+ const gradientId = `mini-area-${randomId}`;
37
+
38
+ return (
39
+ <div className={cn("inline-flex items-center", className)} {...props}>
40
+ <svg
41
+ width={width}
42
+ height={height}
43
+ viewBox={`0 0 ${width} ${height}`}
44
+ fill="none"
45
+ aria-hidden="true"
46
+ >
47
+ <defs>
48
+ <linearGradient id={gradientId} x1="0" y1="0" x2="0" y2="1">
49
+ <stop offset="0%" stopColor={color} stopOpacity={gradientOpacity} />
50
+ <stop offset="100%" stopColor={color} stopOpacity={0} />
51
+ </linearGradient>
52
+ </defs>
53
+ <path d={areaPath} fill={`url(#${gradientId})`} />
54
+ <path
55
+ d={linePath}
56
+ stroke={color}
57
+ strokeWidth={strokeWidth}
58
+ strokeLinecap="round"
59
+ strokeLinejoin="round"
60
+ />
61
+ </svg>
62
+ </div>
63
+ );
64
+ };
65
+
66
+ MiniAreaChart.displayName = "MiniAreaChart";
67
+
68
+ export { MiniAreaChart };
@@ -0,0 +1,2 @@
1
+ export { MiniAreaChart } from "./MiniAreaChart";
2
+ export type { MiniAreaChartProps } from "./types";
@@ -0,0 +1,11 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type MiniAreaChartProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
4
+ data: number[];
5
+ width?: number;
6
+ height?: number;
7
+ color?: string;
8
+ /** Gradient opacity at the bottom */
9
+ gradientOpacity?: number;
10
+ strokeWidth?: number;
11
+ };
@@ -0,0 +1,49 @@
1
+ import { useMemo } from "react";
2
+ import { cn } from "../../utilities";
3
+ import type { MiniBarChartProps } from "./types";
4
+
5
+ const MiniBarChart = ({
6
+ data,
7
+ className,
8
+ width = 80,
9
+ height = 32,
10
+ color = "currentColor",
11
+ highlightLast = false,
12
+ gap = 1,
13
+ ...props
14
+ }: MiniBarChartProps) => {
15
+ const max = useMemo(() => Math.max(1, ...data), [data]);
16
+
17
+ if (data.length === 0) return null;
18
+
19
+ const barWidth = (width - (data.length - 1) * gap) / data.length;
20
+
21
+ return (
22
+ <div className={cn("inline-flex items-end", className)} {...props}>
23
+ <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`} aria-hidden="true">
24
+ {data.map((value, i) => {
25
+ const barHeight = (value / max) * (height - 2);
26
+ const x = i * (barWidth + gap);
27
+ const y = height - barHeight;
28
+ const isLast = i === data.length - 1;
29
+ return (
30
+ <rect
31
+ key={i}
32
+ x={x}
33
+ y={y}
34
+ width={Math.max(barWidth, 1)}
35
+ height={barHeight}
36
+ rx={1}
37
+ fill={color}
38
+ opacity={highlightLast && !isLast ? 0.4 : 1}
39
+ />
40
+ );
41
+ })}
42
+ </svg>
43
+ </div>
44
+ );
45
+ };
46
+
47
+ MiniBarChart.displayName = "MiniBarChart";
48
+
49
+ export { MiniBarChart };
@@ -0,0 +1,2 @@
1
+ export { MiniBarChart } from "./MiniBarChart";
2
+ export type { MiniBarChartProps } from "./types";
@@ -0,0 +1,16 @@
1
+ import type { HTMLAttributes } from "react";
2
+
3
+ export type MiniBarChartProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
4
+ /** Array of numeric values */
5
+ data: number[];
6
+ /** Width in pixels */
7
+ width?: number;
8
+ /** Height in pixels */
9
+ height?: number;
10
+ /** Bar color */
11
+ color?: string;
12
+ /** Whether to highlight the last bar */
13
+ highlightLast?: boolean;
14
+ /** Gap between bars in pixels */
15
+ gap?: number;
16
+ };