diff --git a/ts_web/elements/00group-appui/dees-appui/dees-appui.demo.ts b/ts_web/elements/00group-appui/dees-appui/dees-appui.demo.ts index a4805de..1e547fa 100644 --- a/ts_web/elements/00group-appui/dees-appui/dees-appui.demo.ts +++ b/ts_web/elements/00group-appui/dees-appui/dees-appui.demo.ts @@ -3,6 +3,8 @@ import type { DeesAppui } from './dees-appui.js'; import type { IAppConfig, IViewActivationContext } from '../../interfaces/appconfig.js'; import type * as interfaces from '../../interfaces/index.js'; import '@design.estate/dees-wcctools/demotools'; +import '../../dees-statsgrid/dees-statsgrid.js'; +import type { IStatsTile } from '../../dees-statsgrid/dees-statsgrid.js'; // Demo view component with lifecycle hooks @customElement('demo-dashboard-view') @@ -12,6 +14,77 @@ class DemoDashboardView extends DeesElement { private ctx: IViewActivationContext; + private statsTiles: IStatsTile[] = [ + { + id: 'users', + title: 'Active Users', + value: 1234, + type: 'number', + icon: 'lucide:users', + description: 'Online now', + color: '#22c55e' + }, + { + id: 'api-calls', + title: 'API Calls', + value: 45200, + type: 'trend', + icon: 'lucide:activity', + description: '+12% from last hour', + color: '#3b82f6', + trendData: [32000, 35000, 38000, 41000, 39000, 42000, 45200] + }, + { + id: 'health', + title: 'System Health', + value: 99.9, + unit: '%', + type: 'gauge', + icon: 'lucide:heart-pulse', + description: 'All systems operational', + color: '#10b981', + gaugeOptions: { + min: 0, + max: 100, + thresholds: [ + { value: 80, color: '#ef4444' }, + { value: 95, color: '#f59e0b' }, + { value: 100, color: '#10b981' } + ] + } + }, + { + id: 'response', + title: 'Avg Response', + value: 127, + unit: 'ms', + type: 'number', + icon: 'lucide:timer', + description: '-15ms from yesterday', + color: '#8b5cf6' + }, + { + id: 'errors', + title: 'Error Rate', + value: 0.12, + unit: '%', + type: 'number', + icon: 'lucide:alertTriangle', + description: 'Last 24 hours', + color: '#f59e0b' + }, + { + id: 'requests', + title: 'Requests/sec', + value: 1850, + type: 'trend', + icon: 'lucide:zap', + description: 'Current throughput', + color: '#06b6d4', + trendData: [1200, 1400, 1350, 1600, 1750, 1680, 1850] + } + ]; + onActivate(context: IViewActivationContext) { this.ctx = context; this.activated = true; @@ -83,21 +156,9 @@ class DemoDashboardView extends DeesElement { } h1 { color: #fafafa; font-weight: 600; font-size: 24px; margin-bottom: 8px; } p { color: #737373; margin-bottom: 32px; } - .grid { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: 16px; + dees-statsgrid { + margin-bottom: 32px; } - .card { - background: rgba(255,255,255,0.03); - border: 1px solid rgba(255,255,255,0.08); - border-radius: 8px; - padding: 20px; - } - .card h3 { color: #fafafa; font-size: 14px; font-weight: 600; margin-bottom: 8px; } - .metric { font-size: 32px; font-weight: 700; color: #fafafa; } - .status { display: inline-block; padding: 2px 8px; border-radius: 9px; font-size: 12px; } - .status.active { background: #14532d; color: #4ade80; } .ctx-actions { margin-top: 32px; @@ -147,23 +208,10 @@ class DemoDashboardView extends DeesElement {
Welcome back! Here's an overview of your system.
-+12% from last hour
-All systems operational
-