@mbao01/common 0.8.0 → 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.
- package/dist/types/components/ActivityFeed/ActivityFeed.d.ts +6 -0
- package/dist/types/components/ActivityFeed/constants.d.ts +6 -0
- package/dist/types/components/ActivityFeed/index.d.ts +2 -0
- package/dist/types/components/ActivityFeed/types.d.ts +21 -0
- package/dist/types/components/Amount/Amount.d.ts +6 -0
- package/dist/types/components/Amount/index.d.ts +2 -0
- package/dist/types/components/Amount/types.d.ts +19 -0
- package/dist/types/components/AnimatedCounter/AnimatedCounter.d.ts +6 -0
- package/dist/types/components/AnimatedCounter/index.d.ts +2 -0
- package/dist/types/components/AnimatedCounter/types.d.ts +13 -0
- package/dist/types/components/AnimatedGroup/AnimatedGroup.d.ts +6 -0
- package/dist/types/components/AnimatedGroup/index.d.ts +2 -0
- package/dist/types/components/AnimatedGroup/types.d.ts +22 -0
- package/dist/types/components/AnimatedList/AnimatedList.d.ts +6 -0
- package/dist/types/components/AnimatedList/index.d.ts +2 -0
- package/dist/types/components/AnimatedList/types.d.ts +13 -0
- package/dist/types/components/BorderBeam/BorderBeam.d.ts +6 -0
- package/dist/types/components/BorderBeam/index.d.ts +2 -0
- package/dist/types/components/BorderBeam/types.d.ts +13 -0
- package/dist/types/components/Box/Box.d.ts +4 -0
- package/dist/types/components/Box/constants.d.ts +4 -0
- package/dist/types/components/CalendarHeatmap/CalendarHeatmap.d.ts +6 -0
- package/dist/types/components/CalendarHeatmap/index.d.ts +2 -0
- package/dist/types/components/CalendarHeatmap/types.d.ts +25 -0
- package/dist/types/components/Chart/components/ChartLegend.d.ts +1 -2
- package/dist/types/components/Chart/stories/args/index.d.ts +1 -1
- package/dist/types/components/Chart/stories/examples/AreaChart.d.ts +6 -0
- package/dist/types/components/Chart/stories/examples/BarChart.d.ts +11 -0
- package/dist/types/components/Chart/stories/examples/LineChart.d.ts +10 -0
- package/dist/types/components/Chart/stories/examples/PieChart.d.ts +5 -0
- package/dist/types/components/Chart/stories/examples/RadialChart.d.ts +5 -0
- package/dist/types/components/Chart/types.d.ts +1 -1
- package/dist/types/components/CircularProgress/CircularProgress.d.ts +6 -0
- package/dist/types/components/CircularProgress/constants.d.ts +5 -0
- package/dist/types/components/CircularProgress/index.d.ts +2 -0
- package/dist/types/components/CircularProgress/types.d.ts +17 -0
- package/dist/types/components/ComparisonBar/ComparisonBar.d.ts +6 -0
- package/dist/types/components/ComparisonBar/constants.d.ts +4 -0
- package/dist/types/components/ComparisonBar/index.d.ts +2 -0
- package/dist/types/components/ComparisonBar/types.d.ts +21 -0
- package/dist/types/components/Confetti/Confetti.d.ts +6 -0
- package/dist/types/components/Confetti/index.d.ts +2 -0
- package/dist/types/components/Confetti/types.d.ts +19 -0
- package/dist/types/components/CountdownTimer/CountdownTimer.d.ts +6 -0
- package/dist/types/components/CountdownTimer/index.d.ts +2 -0
- package/dist/types/components/CountdownTimer/types.d.ts +13 -0
- package/dist/types/components/DataList/DataList.d.ts +6 -0
- package/dist/types/components/DataList/constants.d.ts +12 -0
- package/dist/types/components/DataList/index.d.ts +2 -0
- package/dist/types/components/DataList/types.d.ts +15 -0
- package/dist/types/components/DatePicker/DateRangePresetPicker.d.ts +2 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -0
- package/dist/types/components/DatePicker/types.d.ts +19 -0
- package/dist/types/components/Description/Description.d.ts +2 -1
- package/dist/types/components/Description/DescriptionGroup.d.ts +6 -0
- package/dist/types/components/Description/constants.d.ts +23 -0
- package/dist/types/components/Description/index.d.ts +2 -0
- package/dist/types/components/Description/types.d.ts +28 -3
- package/dist/types/components/Form/DatetimeInput/DatetimeInput.d.ts +1 -1
- package/dist/types/components/GlowCard/GlowCard.d.ts +6 -0
- package/dist/types/components/GlowCard/index.d.ts +2 -0
- package/dist/types/components/GlowCard/types.d.ts +8 -0
- package/dist/types/components/GradientText/GradientText.d.ts +6 -0
- package/dist/types/components/GradientText/index.d.ts +2 -0
- package/dist/types/components/GradientText/types.d.ts +14 -0
- package/dist/types/components/Greeting/Greeting.d.ts +6 -0
- package/dist/types/components/Greeting/index.d.ts +2 -0
- package/dist/types/components/Greeting/types.d.ts +9 -0
- package/dist/types/components/KPICard/KPICard.d.ts +6 -0
- package/dist/types/components/KPICard/index.d.ts +2 -0
- package/dist/types/components/KPICard/types.d.ts +21 -0
- package/dist/types/components/Marquee/Marquee.d.ts +6 -0
- package/dist/types/components/Marquee/index.d.ts +2 -0
- package/dist/types/components/Marquee/types.d.ts +12 -0
- package/dist/types/components/Meteors/Meteors.d.ts +6 -0
- package/dist/types/components/Meteors/index.d.ts +2 -0
- package/dist/types/components/Meteors/types.d.ts +5 -0
- package/dist/types/components/MiniAreaChart/MiniAreaChart.d.ts +6 -0
- package/dist/types/components/MiniAreaChart/index.d.ts +2 -0
- package/dist/types/components/MiniAreaChart/types.d.ts +10 -0
- package/dist/types/components/MiniBarChart/MiniBarChart.d.ts +6 -0
- package/dist/types/components/MiniBarChart/index.d.ts +2 -0
- package/dist/types/components/MiniBarChart/types.d.ts +15 -0
- package/dist/types/components/MiniDonutChart/MiniDonutChart.d.ts +6 -0
- package/dist/types/components/MiniDonutChart/index.d.ts +2 -0
- package/dist/types/components/MiniDonutChart/types.d.ts +15 -0
- package/dist/types/components/MiniStackedBar/MiniStackedBar.d.ts +6 -0
- package/dist/types/components/MiniStackedBar/index.d.ts +2 -0
- package/dist/types/components/MiniStackedBar/types.d.ts +13 -0
- package/dist/types/components/NumberTicker/NumberTicker.d.ts +6 -0
- package/dist/types/components/NumberTicker/index.d.ts +2 -0
- package/dist/types/components/NumberTicker/types.d.ts +11 -0
- package/dist/types/components/Pulse/Pulse.d.ts +6 -0
- package/dist/types/components/Pulse/constants.d.ts +10 -0
- package/dist/types/components/Pulse/index.d.ts +2 -0
- package/dist/types/components/Pulse/types.d.ts +11 -0
- package/dist/types/components/Resizable/Resizable.d.ts +1 -1
- package/dist/types/components/ShinyButton/ShinyButton.d.ts +6 -0
- package/dist/types/components/ShinyButton/index.d.ts +2 -0
- package/dist/types/components/ShinyButton/types.d.ts +4 -0
- package/dist/types/components/Sparkline/Sparkline.d.ts +6 -0
- package/dist/types/components/Sparkline/index.d.ts +2 -0
- package/dist/types/components/Sparkline/types.d.ts +17 -0
- package/dist/types/components/SpotlightCard/SpotlightCard.d.ts +6 -0
- package/dist/types/components/SpotlightCard/index.d.ts +2 -0
- package/dist/types/components/SpotlightCard/types.d.ts +7 -0
- package/dist/types/components/StatCard/StatCard.d.ts +6 -0
- package/dist/types/components/StatCard/index.d.ts +2 -0
- package/dist/types/components/StatCard/types.d.ts +15 -0
- package/dist/types/components/TextShimmer/TextShimmer.d.ts +6 -0
- package/dist/types/components/TextShimmer/index.d.ts +2 -0
- package/dist/types/components/TextShimmer/types.d.ts +7 -0
- package/dist/types/components/TrendBadge/TrendBadge.d.ts +6 -0
- package/dist/types/components/TrendBadge/constants.d.ts +7 -0
- package/dist/types/components/TrendBadge/index.d.ts +2 -0
- package/dist/types/components/TrendBadge/types.d.ts +15 -0
- package/dist/types/components/WidgetShell/WidgetShell.d.ts +6 -0
- package/dist/types/components/WidgetShell/index.d.ts +2 -0
- package/dist/types/components/WidgetShell/types.d.ts +20 -0
- package/dist/types/index.d.ts +33 -0
- package/package.json +58 -58
- package/src/components/Accordion/constants.ts +1 -1
- package/src/components/ActivityFeed/ActivityFeed.tsx +51 -0
- package/src/components/ActivityFeed/constants.ts +19 -0
- package/src/components/ActivityFeed/index.ts +2 -0
- package/src/components/ActivityFeed/types.ts +23 -0
- package/src/components/Alert/constants.ts +1 -1
- package/src/components/AlertDialog/constants.ts +1 -1
- package/src/components/Amount/Amount.tsx +50 -0
- package/src/components/Amount/index.ts +2 -0
- package/src/components/Amount/types.ts +20 -0
- package/src/components/AnimatedCounter/AnimatedCounter.tsx +68 -0
- package/src/components/AnimatedCounter/index.ts +2 -0
- package/src/components/AnimatedCounter/types.ts +14 -0
- package/src/components/AnimatedGroup/AnimatedGroup.tsx +97 -0
- package/src/components/AnimatedGroup/index.ts +2 -0
- package/src/components/AnimatedGroup/types.ts +21 -0
- package/src/components/AnimatedList/AnimatedList.tsx +42 -0
- package/src/components/AnimatedList/index.ts +2 -0
- package/src/components/AnimatedList/types.ts +15 -0
- package/src/components/Badge/constants.ts +1 -1
- package/src/components/Banner/constants.ts +1 -1
- package/src/components/BorderBeam/BorderBeam.tsx +41 -0
- package/src/components/BorderBeam/index.ts +2 -0
- package/src/components/BorderBeam/types.ts +14 -0
- package/src/components/Box/Box.tsx +8 -2
- package/src/components/Box/constants.ts +35 -0
- package/src/components/Button/constants.ts +66 -63
- package/src/components/CalendarHeatmap/CalendarHeatmap.tsx +141 -0
- package/src/components/CalendarHeatmap/index.ts +2 -0
- package/src/components/CalendarHeatmap/types.ts +27 -0
- package/src/components/Card/constants.ts +24 -21
- package/src/components/Carousel/constants.ts +2 -2
- package/src/components/Chart/components/ChartTooltip.tsx +1 -1
- package/src/components/Chart/stories/args/index.ts +2 -1
- package/src/components/Chart/stories/examples/AreaChart.tsx +55 -0
- package/src/components/Chart/stories/examples/BarChart.tsx +104 -6
- package/src/components/Chart/stories/examples/LineChart.tsx +111 -0
- package/src/components/Chart/stories/examples/PieChart.tsx +55 -0
- package/src/components/Chart/stories/examples/RadialChart.tsx +65 -0
- package/src/components/Chart/types.ts +1 -1
- package/src/components/CircularProgress/CircularProgress.tsx +46 -0
- package/src/components/CircularProgress/constants.ts +32 -0
- package/src/components/CircularProgress/index.ts +2 -0
- package/src/components/CircularProgress/types.ts +18 -0
- package/src/components/Command/constants.ts +1 -1
- package/src/components/ComparisonBar/ComparisonBar.tsx +65 -0
- package/src/components/ComparisonBar/constants.ts +23 -0
- package/src/components/ComparisonBar/index.ts +2 -0
- package/src/components/ComparisonBar/types.ts +23 -0
- package/src/components/Confetti/Confetti.tsx +82 -0
- package/src/components/Confetti/index.ts +2 -0
- package/src/components/Confetti/types.ts +20 -0
- package/src/components/CountdownTimer/CountdownTimer.tsx +91 -0
- package/src/components/CountdownTimer/index.ts +2 -0
- package/src/components/CountdownTimer/types.ts +14 -0
- package/src/components/DataList/DataList.tsx +32 -0
- package/src/components/DataList/constants.ts +47 -0
- package/src/components/DataList/index.ts +2 -0
- package/src/components/DataList/types.ts +17 -0
- package/src/components/DatePicker/DateRangePresetPicker.tsx +122 -0
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/DatePicker/types.ts +22 -0
- package/src/components/Description/Description.tsx +67 -5
- package/src/components/Description/DescriptionGroup.tsx +39 -0
- package/src/components/Description/constants.ts +128 -0
- package/src/components/Description/index.ts +10 -0
- package/src/components/Description/types.ts +31 -3
- package/src/components/Dialog/constants.ts +2 -2
- package/src/components/Dock/constants.ts +2 -2
- package/src/components/Drawer/constants.ts +2 -2
- package/src/components/Form/Checkbox/constants.ts +1 -1
- package/src/components/Form/DatetimeInput/constants.ts +1 -1
- package/src/components/Form/Input/constants.ts +1 -1
- package/src/components/Form/MultiSelect/constants.ts +1 -1
- package/src/components/Form/NativeSelect/constants.ts +1 -1
- package/src/components/Form/Radio/constants.ts +1 -1
- package/src/components/Form/Select/constants.ts +1 -1
- package/src/components/Form/Slider/constants.ts +1 -1
- package/src/components/Form/Switch/constants.ts +1 -1
- package/src/components/Form/Textarea/constants.ts +1 -1
- package/src/components/GlowCard/GlowCard.tsx +46 -0
- package/src/components/GlowCard/index.ts +2 -0
- package/src/components/GlowCard/types.ts +9 -0
- package/src/components/GradientText/GradientText.tsx +36 -0
- package/src/components/GradientText/index.ts +2 -0
- package/src/components/GradientText/types.ts +15 -0
- package/src/components/Greeting/Greeting.tsx +46 -0
- package/src/components/Greeting/index.ts +2 -0
- package/src/components/Greeting/types.ts +10 -0
- package/src/components/KPICard/KPICard.tsx +85 -0
- package/src/components/KPICard/index.ts +2 -0
- package/src/components/KPICard/types.ts +22 -0
- package/src/components/Marquee/Marquee.tsx +45 -0
- package/src/components/Marquee/index.ts +2 -0
- package/src/components/Marquee/types.ts +13 -0
- package/src/components/Menu/Menubar/constants.ts +2 -2
- package/src/components/Menu/NavigationMenu/constants.ts +2 -2
- package/src/components/Meteors/Meteors.tsx +38 -0
- package/src/components/Meteors/index.ts +2 -0
- package/src/components/Meteors/types.ts +6 -0
- package/src/components/MiniAreaChart/MiniAreaChart.tsx +68 -0
- package/src/components/MiniAreaChart/index.ts +2 -0
- package/src/components/MiniAreaChart/types.ts +11 -0
- package/src/components/MiniBarChart/MiniBarChart.tsx +49 -0
- package/src/components/MiniBarChart/index.ts +2 -0
- package/src/components/MiniBarChart/types.ts +16 -0
- package/src/components/MiniDonutChart/MiniDonutChart.tsx +87 -0
- package/src/components/MiniDonutChart/index.ts +2 -0
- package/src/components/MiniDonutChart/types.ts +17 -0
- package/src/components/MiniStackedBar/MiniStackedBar.tsx +61 -0
- package/src/components/MiniStackedBar/index.ts +2 -0
- package/src/components/MiniStackedBar/types.ts +15 -0
- package/src/components/NumberTicker/NumberTicker.tsx +58 -0
- package/src/components/NumberTicker/index.ts +2 -0
- package/src/components/NumberTicker/types.ts +12 -0
- package/src/components/Pagination/constants.ts +2 -2
- package/src/components/Progress/constants.ts +1 -1
- package/src/components/Pulse/Pulse.tsx +26 -0
- package/src/components/Pulse/constants.ts +55 -0
- package/src/components/Pulse/index.ts +2 -0
- package/src/components/Pulse/types.ts +12 -0
- package/src/components/Resizable/constants.ts +1 -1
- package/src/components/Sheet/constants.ts +1 -1
- package/src/components/ShinyButton/ShinyButton.tsx +57 -0
- package/src/components/ShinyButton/index.ts +2 -0
- package/src/components/ShinyButton/types.ts +8 -0
- package/src/components/Skeleton/constants.ts +1 -1
- package/src/components/Sonner/constants.ts +1 -1
- package/src/components/Sparkline/Sparkline.tsx +108 -0
- package/src/components/Sparkline/index.ts +2 -0
- package/src/components/Sparkline/types.ts +18 -0
- package/src/components/SpotlightCard/SpotlightCard.tsx +56 -0
- package/src/components/SpotlightCard/index.ts +2 -0
- package/src/components/SpotlightCard/types.ts +8 -0
- package/src/components/Stat/constants.ts +1 -1
- package/src/components/StatCard/StatCard.tsx +59 -0
- package/src/components/StatCard/index.ts +2 -0
- package/src/components/StatCard/types.ts +16 -0
- package/src/components/Tabs/constants.ts +1 -1
- package/src/components/TextShimmer/TextShimmer.tsx +34 -0
- package/src/components/TextShimmer/index.ts +2 -0
- package/src/components/TextShimmer/types.ts +8 -0
- package/src/components/Timeline/constants.ts +1 -1
- package/src/components/Toggle/constants.ts +1 -1
- package/src/components/Tooltip/constants.ts +1 -1
- package/src/components/TrendBadge/TrendBadge.tsx +40 -0
- package/src/components/TrendBadge/constants.ts +38 -0
- package/src/components/TrendBadge/index.ts +2 -0
- package/src/components/TrendBadge/types.ts +16 -0
- package/src/components/WidgetShell/WidgetShell.tsx +101 -0
- package/src/components/WidgetShell/index.ts +2 -0
- package/src/components/WidgetShell/types.ts +22 -0
- package/src/index.ts +35 -0
- package/src/stylesheets/tailwind.css +210 -0
- package/src/utilities/getSubpaths/getSubpaths.ts +1 -2
|
@@ -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,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-
|
|
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-
|
|
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,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,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,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
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import type { MiniDonutChartProps } from "./types";
|
|
4
|
+
|
|
5
|
+
const DEFAULT_COLORS = [
|
|
6
|
+
"oklch(0.7 0.15 250)",
|
|
7
|
+
"oklch(0.7 0.15 150)",
|
|
8
|
+
"oklch(0.7 0.15 50)",
|
|
9
|
+
"oklch(0.7 0.15 330)",
|
|
10
|
+
"oklch(0.6 0.15 200)",
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const MiniDonutChart = ({
|
|
14
|
+
segments,
|
|
15
|
+
className,
|
|
16
|
+
size = 48,
|
|
17
|
+
thickness = 0.3,
|
|
18
|
+
label,
|
|
19
|
+
...props
|
|
20
|
+
}: MiniDonutChartProps) => {
|
|
21
|
+
const paths = useMemo(() => {
|
|
22
|
+
const total = segments.reduce((sum, s) => sum + s.value, 0);
|
|
23
|
+
if (total === 0) return [];
|
|
24
|
+
|
|
25
|
+
const cx = size / 2;
|
|
26
|
+
const cy = size / 2;
|
|
27
|
+
const outerR = size / 2 - 1;
|
|
28
|
+
const innerR = outerR * (1 - thickness);
|
|
29
|
+
|
|
30
|
+
let startAngle = -90;
|
|
31
|
+
return segments.map((seg, i) => {
|
|
32
|
+
const sweepAngle = (seg.value / total) * 360;
|
|
33
|
+
const endAngle = startAngle + sweepAngle;
|
|
34
|
+
|
|
35
|
+
const startRad = (startAngle * Math.PI) / 180;
|
|
36
|
+
const endRad = (endAngle * Math.PI) / 180;
|
|
37
|
+
|
|
38
|
+
const x1 = cx + outerR * Math.cos(startRad);
|
|
39
|
+
const y1 = cy + outerR * Math.sin(startRad);
|
|
40
|
+
const x2 = cx + outerR * Math.cos(endRad);
|
|
41
|
+
const y2 = cy + outerR * Math.sin(endRad);
|
|
42
|
+
const x3 = cx + innerR * Math.cos(endRad);
|
|
43
|
+
const y3 = cy + innerR * Math.sin(endRad);
|
|
44
|
+
const x4 = cx + innerR * Math.cos(startRad);
|
|
45
|
+
const y4 = cy + innerR * Math.sin(startRad);
|
|
46
|
+
|
|
47
|
+
const largeArc = sweepAngle > 180 ? 1 : 0;
|
|
48
|
+
|
|
49
|
+
const d = [
|
|
50
|
+
`M ${x1} ${y1}`,
|
|
51
|
+
`A ${outerR} ${outerR} 0 ${largeArc} 1 ${x2} ${y2}`,
|
|
52
|
+
`L ${x3} ${y3}`,
|
|
53
|
+
`A ${innerR} ${innerR} 0 ${largeArc} 0 ${x4} ${y4}`,
|
|
54
|
+
"Z",
|
|
55
|
+
].join(" ");
|
|
56
|
+
|
|
57
|
+
startAngle = endAngle;
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
d,
|
|
61
|
+
color: seg.color ?? DEFAULT_COLORS[i % DEFAULT_COLORS.length],
|
|
62
|
+
title: seg.label ? `${seg.label}: ${seg.value}` : undefined,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}, [segments, size, thickness]);
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className={cn("relative inline-flex items-center justify-center", className)} {...props}>
|
|
69
|
+
<svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} aria-hidden="true">
|
|
70
|
+
{paths.map((p, i) => (
|
|
71
|
+
<path key={i} d={p.d} fill={p.color}>
|
|
72
|
+
{p.title && <title>{p.title}</title>}
|
|
73
|
+
</path>
|
|
74
|
+
))}
|
|
75
|
+
</svg>
|
|
76
|
+
{label && (
|
|
77
|
+
<span className="absolute inset-0 flex items-center justify-center text-[10px] font-semibold tabular-nums">
|
|
78
|
+
{label}
|
|
79
|
+
</span>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
MiniDonutChart.displayName = "MiniDonutChart";
|
|
86
|
+
|
|
87
|
+
export { MiniDonutChart };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export type DonutSegment = {
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type MiniDonutChartProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
10
|
+
segments: DonutSegment[];
|
|
11
|
+
/** Size in pixels */
|
|
12
|
+
size?: number;
|
|
13
|
+
/** Ring thickness as percentage of radius (0-1) */
|
|
14
|
+
thickness?: number;
|
|
15
|
+
/** Center label */
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { cn } from "../../utilities";
|
|
3
|
+
import type { MiniStackedBarProps } from "./types";
|
|
4
|
+
|
|
5
|
+
const DEFAULT_COLORS = [
|
|
6
|
+
"oklch(0.7 0.15 250)",
|
|
7
|
+
"oklch(0.7 0.15 150)",
|
|
8
|
+
"oklch(0.7 0.15 50)",
|
|
9
|
+
"oklch(0.7 0.15 330)",
|
|
10
|
+
"oklch(0.6 0.15 200)",
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const MiniStackedBar = ({
|
|
14
|
+
segments,
|
|
15
|
+
className,
|
|
16
|
+
height = 8,
|
|
17
|
+
showLabels = false,
|
|
18
|
+
...props
|
|
19
|
+
}: MiniStackedBarProps) => {
|
|
20
|
+
const total = useMemo(() => segments.reduce((sum, s) => sum + s.value, 0), [segments]);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className={cn("flex flex-col gap-1.5", className)} {...props}>
|
|
24
|
+
<div className="flex w-full overflow-hidden rounded-full" style={{ height }}>
|
|
25
|
+
{segments.map((seg, i) => {
|
|
26
|
+
const pct = total > 0 ? (seg.value / total) * 100 : 0;
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
key={i}
|
|
30
|
+
className="transition-all duration-500"
|
|
31
|
+
style={{
|
|
32
|
+
width: `${pct}%`,
|
|
33
|
+
backgroundColor: seg.color ?? DEFAULT_COLORS[i % DEFAULT_COLORS.length],
|
|
34
|
+
}}
|
|
35
|
+
title={seg.label ? `${seg.label}: ${pct.toFixed(1)}%` : `${pct.toFixed(1)}%`}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
})}
|
|
39
|
+
</div>
|
|
40
|
+
{showLabels && (
|
|
41
|
+
<div className="flex gap-3">
|
|
42
|
+
{segments.map((seg, i) => (
|
|
43
|
+
<div key={i} className="flex items-center gap-1">
|
|
44
|
+
<span
|
|
45
|
+
className="size-2 rounded-full"
|
|
46
|
+
style={{ backgroundColor: seg.color ?? DEFAULT_COLORS[i % DEFAULT_COLORS.length] }}
|
|
47
|
+
/>
|
|
48
|
+
<span className="text-[10px] text-base-content/60">
|
|
49
|
+
{seg.label ?? `${((seg.value / total) * 100).toFixed(0)}%`}
|
|
50
|
+
</span>
|
|
51
|
+
</div>
|
|
52
|
+
))}
|
|
53
|
+
</div>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
MiniStackedBar.displayName = "MiniStackedBar";
|
|
60
|
+
|
|
61
|
+
export { MiniStackedBar };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type StackedSegment = {
|
|
4
|
+
value: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type MiniStackedBarProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
10
|
+
segments: StackedSegment[];
|
|
11
|
+
/** Height in pixels */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Whether to show percentage labels below */
|
|
14
|
+
showLabels?: boolean;
|
|
15
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { cn } from "../../utilities";
|
|
5
|
+
import type { NumberTickerProps } from "./types";
|
|
6
|
+
|
|
7
|
+
const NumberTicker = ({
|
|
8
|
+
value,
|
|
9
|
+
className,
|
|
10
|
+
duration = 2,
|
|
11
|
+
decimalPlaces = 0,
|
|
12
|
+
delay = 0,
|
|
13
|
+
...props
|
|
14
|
+
}: NumberTickerProps) => {
|
|
15
|
+
const [displayValue, setDisplayValue] = useState(0);
|
|
16
|
+
const [hasStarted, setHasStarted] = useState(false);
|
|
17
|
+
const ref = useRef<HTMLSpanElement>(null);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const timeout = setTimeout(() => setHasStarted(true), delay * 1000);
|
|
21
|
+
return () => clearTimeout(timeout);
|
|
22
|
+
}, [delay]);
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!hasStarted) return;
|
|
26
|
+
|
|
27
|
+
const startTime = performance.now();
|
|
28
|
+
const durationMs = duration * 1000;
|
|
29
|
+
|
|
30
|
+
const tick = (now: number) => {
|
|
31
|
+
const elapsed = now - startTime;
|
|
32
|
+
const progress = Math.min(elapsed / durationMs, 1);
|
|
33
|
+
// Ease out cubic
|
|
34
|
+
const eased = 1 - Math.pow(1 - progress, 3);
|
|
35
|
+
setDisplayValue(eased * value);
|
|
36
|
+
|
|
37
|
+
if (progress < 1) {
|
|
38
|
+
requestAnimationFrame(tick);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
requestAnimationFrame(tick);
|
|
43
|
+
}, [value, duration, hasStarted]);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<span
|
|
47
|
+
ref={ref}
|
|
48
|
+
className={cn("tabular-nums", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
>
|
|
51
|
+
{displayValue.toFixed(decimalPlaces)}
|
|
52
|
+
</span>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
NumberTicker.displayName = "NumberTicker";
|
|
57
|
+
|
|
58
|
+
export { NumberTicker };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type NumberTickerProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
4
|
+
/** The target number to count to */
|
|
5
|
+
value: number;
|
|
6
|
+
/** Duration of the animation in seconds */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** Decimal places to show */
|
|
9
|
+
decimalPlaces?: number;
|
|
10
|
+
/** Delay before animation starts in seconds */
|
|
11
|
+
delay?: number;
|
|
12
|
+
};
|
|
@@ -6,6 +6,6 @@ export const getPaginationContentClasses = cva("flex flex-row items-center gap-1
|
|
|
6
6
|
|
|
7
7
|
export const getPaginationEllipsisClasses = cva("flex h-9 w-9 items-center justify-center");
|
|
8
8
|
|
|
9
|
-
export const getPaginationNextClasses = cva("gap-1 px-3");
|
|
9
|
+
export const getPaginationNextClasses = cva("gap-1 px-3 transition-colors duration-200");
|
|
10
10
|
|
|
11
|
-
export const getPaginationPreviousClasses = cva("gap-1 px-3");
|
|
11
|
+
export const getPaginationPreviousClasses = cva("gap-1 px-3 transition-colors duration-200");
|
|
@@ -21,7 +21,7 @@ export const getProgressClasses = cva("relative h-2 w-full overflow-hidden round
|
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
export const getProgressIndicatorClasses = cva("h-full w-full flex-1 transition-all", {
|
|
24
|
+
export const getProgressIndicatorClasses = cva("h-full w-full flex-1 rounded-full transition-all duration-500 ease-out", {
|
|
25
25
|
variants: createVariants({
|
|
26
26
|
variant: {
|
|
27
27
|
accent: "bg-accent",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from "../../utilities";
|
|
2
|
+
import { getPulseClasses, getPulseDotClasses, getPulseRingClasses } from "./constants";
|
|
3
|
+
import type { PulseProps } from "./types";
|
|
4
|
+
|
|
5
|
+
const Pulse = ({
|
|
6
|
+
variant = "success",
|
|
7
|
+
size = "sm",
|
|
8
|
+
animated = true,
|
|
9
|
+
label,
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: PulseProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<span className={cn(getPulseClasses({ size }), className)} {...props}>
|
|
15
|
+
<span className="relative inline-flex">
|
|
16
|
+
{animated && <span className={getPulseRingClasses({ variant })} />}
|
|
17
|
+
<span className={getPulseDotClasses({ variant, size })} />
|
|
18
|
+
</span>
|
|
19
|
+
{label && <span className="text-base-content/70">{label}</span>}
|
|
20
|
+
</span>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
Pulse.displayName = "Pulse";
|
|
25
|
+
|
|
26
|
+
export { Pulse };
|