@hilum/ui 3.5.2 → 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 +3 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/card.tsx +2 -0
- package/src/components/stat-card.tsx +7 -1
package/dist/index.d.ts
CHANGED
|
@@ -398,7 +398,7 @@ interface CardHeadingProps {
|
|
|
398
398
|
declare function CardHeading({ title, description, actions, children, className }: CardHeadingProps): react_jsx_runtime.JSX.Element;
|
|
399
399
|
|
|
400
400
|
declare const cardVariants: (props?: ({
|
|
401
|
-
variant?: "default" | "ghost" | "muted" | null | undefined;
|
|
401
|
+
variant?: "default" | "ghost" | "muted" | "responsive" | null | undefined;
|
|
402
402
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
403
403
|
interface CardProps extends React.ComponentProps<"div">, VariantProps<typeof cardVariants> {
|
|
404
404
|
}
|
|
@@ -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
|
@@ -3532,7 +3532,8 @@ var cardVariants = cva(["rounded-xl", motionClasses], {
|
|
|
3532
3532
|
variant: {
|
|
3533
3533
|
default: "bg-card shadow-natural",
|
|
3534
3534
|
muted: "bg-muted shadow-natural",
|
|
3535
|
-
ghost: "bg-transparent"
|
|
3535
|
+
ghost: "bg-transparent",
|
|
3536
|
+
responsive: "border border-border bg-card p-5 shadow-natural sm:rounded-xl max-sm:rounded-none max-sm:border-x-0 max-sm:border-y max-sm:bg-transparent max-sm:px-0 max-sm:py-5 max-sm:shadow-none"
|
|
3536
3537
|
}
|
|
3537
3538
|
},
|
|
3538
3539
|
defaultVariants: {
|
|
@@ -14180,6 +14181,7 @@ function StatCard({
|
|
|
14180
14181
|
label,
|
|
14181
14182
|
title,
|
|
14182
14183
|
value,
|
|
14184
|
+
variant = "default",
|
|
14183
14185
|
trend,
|
|
14184
14186
|
icon,
|
|
14185
14187
|
children,
|
|
@@ -14200,11 +14202,12 @@ function StatCard({
|
|
|
14200
14202
|
down: TrendingDown,
|
|
14201
14203
|
neutral: Minus
|
|
14202
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";
|
|
14203
14206
|
return /* @__PURE__ */ jsxs(
|
|
14204
14207
|
"div",
|
|
14205
14208
|
{
|
|
14206
14209
|
className: cn(
|
|
14207
|
-
|
|
14210
|
+
surfaceClass,
|
|
14208
14211
|
containerClassName,
|
|
14209
14212
|
className
|
|
14210
14213
|
),
|