@hilum/ui 3.5.3 → 3.5.4
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/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/stat-card.tsx +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -1770,6 +1770,7 @@ interface StatCardProps {
|
|
|
1770
1770
|
label?: string;
|
|
1771
1771
|
title?: string;
|
|
1772
1772
|
value?: string | number;
|
|
1773
|
+
variant?: "default" | "responsive";
|
|
1773
1774
|
trend?: {
|
|
1774
1775
|
value: string;
|
|
1775
1776
|
direction: "up" | "down" | "neutral";
|
|
@@ -1794,7 +1795,7 @@ interface StatCardSlotProps {
|
|
|
1794
1795
|
className?: string;
|
|
1795
1796
|
label?: string;
|
|
1796
1797
|
}
|
|
1797
|
-
declare function StatCard({ label, title, value, trend, icon, children, actionButtons, className, containerClassName, titleClassName, valueClassName, }: StatCardProps): react_jsx_runtime.JSX.Element;
|
|
1798
|
+
declare function StatCard({ label, title, value, variant, trend, icon, children, actionButtons, className, containerClassName, titleClassName, valueClassName, }: StatCardProps): react_jsx_runtime.JSX.Element;
|
|
1798
1799
|
declare namespace StatCard {
|
|
1799
1800
|
var displayName: string;
|
|
1800
1801
|
}
|
package/dist/index.js
CHANGED
|
@@ -14181,6 +14181,7 @@ function StatCard({
|
|
|
14181
14181
|
label,
|
|
14182
14182
|
title,
|
|
14183
14183
|
value,
|
|
14184
|
+
variant = "default",
|
|
14184
14185
|
trend,
|
|
14185
14186
|
icon,
|
|
14186
14187
|
children,
|
|
@@ -14201,11 +14202,12 @@ function StatCard({
|
|
|
14201
14202
|
down: TrendingDown,
|
|
14202
14203
|
neutral: Minus
|
|
14203
14204
|
};
|
|
14205
|
+
const surfaceClass = variant === "responsive" ? "min-w-0 border-border bg-transparent p-4 sm:rounded-xl sm:border sm:bg-card sm:p-5 sm:shadow-natural" : "min-w-0 rounded-xl border border-border bg-card p-4 shadow-natural sm:p-5";
|
|
14204
14206
|
return /* @__PURE__ */ jsxs(
|
|
14205
14207
|
"div",
|
|
14206
14208
|
{
|
|
14207
14209
|
className: cn(
|
|
14208
|
-
|
|
14210
|
+
surfaceClass,
|
|
14209
14211
|
containerClassName,
|
|
14210
14212
|
className
|
|
14211
14213
|
),
|