@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hilum/ui",
3
- "version": "3.5.3",
3
+ "version": "3.5.4",
4
4
  "private": false,
5
5
  "description": "Hilum UI — design system primitives (Button, Input, Dialog, Combobox, …) + tokens + fonts + icons",
6
6
  "license": "MIT",
@@ -6,6 +6,7 @@ interface StatCardProps {
6
6
  label?: string;
7
7
  title?: string;
8
8
  value?: string | number;
9
+ variant?: "default" | "responsive";
9
10
  trend?: {
10
11
  value: string;
11
12
  direction: "up" | "down" | "neutral";
@@ -37,6 +38,7 @@ function StatCard({
37
38
  label,
38
39
  title,
39
40
  value,
41
+ variant = "default",
40
42
  trend,
41
43
  icon,
42
44
  children,
@@ -58,11 +60,15 @@ function StatCard({
58
60
  down: TrendingDown,
59
61
  neutral: Minus,
60
62
  };
63
+ const surfaceClass =
64
+ variant === "responsive"
65
+ ? "min-w-0 border-border bg-transparent p-4 sm:rounded-xl sm:border sm:bg-card sm:p-5 sm:shadow-natural"
66
+ : "min-w-0 rounded-xl border border-border bg-card p-4 shadow-natural sm:p-5";
61
67
 
62
68
  return (
63
69
  <div
64
70
  className={cn(
65
- "min-w-0 rounded-xl border border-border bg-card p-4 shadow-natural sm:p-5",
71
+ surfaceClass,
66
72
  containerClassName,
67
73
  className,
68
74
  )}