@@ -131,6 +159,10 @@ function KpiStatGridSkeleton({ count }: { count: number }) {
)
}
+/**
+ * Hybrid KPI grid — compact stats-12 Frame strip.
+ * Preview: https://reui.io/preview/base/stats-12
+ */
export function KpiStatGrid({
cards,
isLoading = false,
@@ -158,7 +190,7 @@ export function KpiStatGrid({
return (
+
{cards.map((card) => (
))}
diff --git a/apps/web/src/components/service-kpi-cards.tsx b/apps/web/src/components/service-kpi-cards.tsx
index 1967fda..c024d25 100644
--- a/apps/web/src/components/service-kpi-cards.tsx
+++ b/apps/web/src/components/service-kpi-cards.tsx
@@ -66,6 +66,7 @@ export function ServiceKpiCards({
hint: down > 0 ? `Down: ${down}` : 'Не в группе',
icon: ,
iconClassName: 'text-warning',
+ variant: ungrouped > 0 || down > 0 ? 'warning' : 'default',
onSelect: () => onSelectTab('ungrouped'),
selected: activeTab === 'ungrouped',
},
diff --git a/apps/web/src/routes/_auth/index.tsx b/apps/web/src/routes/_auth/index.tsx
index 10a733f..3db8d31 100644
--- a/apps/web/src/routes/_auth/index.tsx
+++ b/apps/web/src/routes/_auth/index.tsx
@@ -178,6 +178,7 @@ function DashboardPage() {
: 'Все в группах',
icon: ,
iconClassName: 'text-info',
+ variant: ungroupedCount > 0 ? 'warning' : 'default',
to: '/domains',
},
{
@@ -200,6 +201,7 @@ function DashboardPage() {
: undefined,
icon: ,
iconClassName: 'text-success',
+ variant: attentionCount > 0 ? 'destructive' : ungroupedServiceCount > 0 ? 'warning' : 'default',
to: '/services',
search: { domainId: undefined },
},
@@ -213,6 +215,7 @@ function DashboardPage() {
: `${certOk} в норме`,
icon: ,
iconClassName: 'text-warning',
+ variant: certWarnings > 0 ? 'warning' : 'default',
to: '/certificates',
},
]
diff --git a/docs/ui-design-contract.md b/docs/ui-design-contract.md
index 7cfbc44..771b329 100644
--- a/docs/ui-design-contract.md
+++ b/docs/ui-design-contract.md
@@ -18,7 +18,7 @@ Ops / list / dashboard / detail / settings — только **Frame**, не shad
| Зона | Block | Preview |
|------|-------|---------|
| Shell | `app-shell-12` (+ cmdk/monitor где нужно) | https://reui.io/preview/base/app-shell-12 |
-| KPI | `stats-12` (primary); `card-35` compact strip | https://reui.io/preview/base/stats-12 · https://reui.io/preview/base/card-35 |
+| KPI | hybrid `stats-12` (compact Frame strip: colored icon → value ± variant → label → Badge footer) | https://reui.io/preview/base/stats-12 |
| Dashboard | `dashboard-1` | https://reui.io/preview/base/dashboard-1 |
| Lists | `data-grid-filtering-2` | https://reui.io/preview/base/data-grid-filtering-2 |
| Settings | `settings-16` + SettingRow | https://reui.io/preview/base/settings-16 |
@@ -31,7 +31,7 @@ Ops / list / dashboard / detail / settings — только **Frame**, не shad
| Component | Role |
|-----------|------|
| `ResourcePage` | Frame + line tabs + Filters + DataGrid |
-| `KpiStatGrid` | stats-12 KPI tiles |
+| `KpiStatGrid` | hybrid compact stats-12 KPI tiles (`variant`, Badge footer) |
| `OpsDashboard` | KPI + charts + attention queue |
| `SettingsShell` | settings nav + Outlet |
| `DetailPanel` | detail Frame sections |