@stacksjs/defaults 0.75.672 → 0.75.674

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-dashboard
3
- description: Use when building or customizing the Stacks admin dashboard, including dashboard pages, model management views, analytics widgets, commerce dashboards, content management, settings panels, deployment monitoring, job/queue management, or the 446 built-in dashboard components. Covers the dashboard system at storage/framework/defaults/.
3
+ description: Use when building or customizing the Stacks admin dashboard, including dashboard pages, model management views, analytics widgets, commerce dashboards, content management, settings panels, deployment monitoring, job/queue management, or the 447 built-in dashboard components. Covers the dashboard system at storage/framework/defaults/.
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -8,7 +8,7 @@ allowed-tools: Read Edit Write Bash Grep Glob
8
8
 
9
9
  # Stacks Dashboard
10
10
 
11
- The Stacks admin dashboard provides a full-featured admin panel with 100+ route views, 446 components, and a multi-section layout.
11
+ The Stacks admin dashboard provides a full-featured admin panel with 100+ route views, 447 components, and a multi-section layout.
12
12
 
13
13
  ## Key Paths
14
14
  - Dashboard components: `storage/framework/defaults/resources/components/Dashboard/`
@@ -541,6 +541,20 @@ Persisted shell appearance is applied with STX's
541
541
  storage key and defaults aligned with `composables/useAppearance.ts`. Never
542
542
  replace it with raw `window`, `document`, or `localStorage` code in the layout.
543
543
 
544
+ Dashboard themes are selected in Settings → Appearance. The Original
545
+ retains both existing sidebar styles. System Cleaner and imported version 1
546
+ JSON themes apply validated light and dark palettes to the shared shell and
547
+ components. Keep theme definitions in `views/dashboard/composables/dashboard-themes.ts`
548
+ and reusable styling in `styles/dashboard-theme.css`. Extend shared components
549
+ with semantic styling hooks or dashboard theme CSS variables so every theme
550
+ can use the same STX navigation, controls and page markup. Use fallbacks that
551
+ match The Original when referencing optional theme variables.
552
+
553
+ Both dashboard servers expose the same theme stylesheet and synchronous
554
+ bootstrap. The bootstrap and the appearance picker share the same manifest
555
+ validator and read browser-local state. Keep both assets in the head when
556
+ publishing a custom dashboard layout that supports themes.
557
+
544
558
  At widths below 1024px:
545
559
 
546
560
  - Hide the fixed desktop sidebar and reset `[data-stx-content]` to
@@ -553,9 +567,9 @@ At widths below 1024px:
553
567
  - Verify `document.documentElement.scrollWidth <= innerWidth` at phone and
554
568
  tablet sizes.
555
569
 
556
- At 1024px and wider, the desktop sidebar must retain its existing theme,
557
- 250px width, fixed placement, persisted collapse state, and
558
- `--stx-sidebar-width` content-shell contract.
570
+ At 1024px and wider, the desktop sidebar keeps its 250px width, fixed
571
+ placement, persisted collapse state, and `--stx-sidebar-width` content-shell
572
+ contract across themes.
559
573
 
560
574
  ### Reactive page components
561
575
 
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.672",
5
+ "version": "0.75.674",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.672",
5
+ "version": "0.75.674",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,14 +45,14 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.672",
49
- "@stacksjs/sanitizer": "^0.2.930",
50
- "@stacksjs/stx": "^0.2.930",
51
- "@stacksjs/strings": "0.75.672",
48
+ "@stacksjs/mobile": "0.75.674",
49
+ "@stacksjs/sanitizer": "^0.2.931",
50
+ "@stacksjs/stx": "^0.2.931",
51
+ "@stacksjs/strings": "0.75.674",
52
52
  "@xterm/addon-fit": "^0.11.0",
53
53
  "@xterm/xterm": "^6.0.0",
54
54
  "ts-qr-codes": "^0.1.8",
55
- "@stacksjs/support": "0.75.672",
56
- "@stacksjs/browser": "0.75.672"
55
+ "@stacksjs/support": "0.75.674",
56
+ "@stacksjs/browser": "0.75.674"
57
57
  }
58
58
  }
@@ -128,8 +128,8 @@ onMount(() => {
128
128
 
129
129
  <style>
130
130
  .dashboard-overview {
131
- --overview-border: light-dark(#dedee5, #ffffff1a);
132
- --overview-surface: light-dark(#ffffff, #18191f);
131
+ --overview-border: var(--dashboard-border, light-dark(#dedee5, #ffffff1a));
132
+ --overview-surface: var(--dashboard-surface, light-dark(#ffffff, #18191f));
133
133
  }
134
134
  .overview-metrics {
135
135
  display: grid;
@@ -145,12 +145,12 @@ onMount(() => {
145
145
  .overview-panel {
146
146
  background: var(--overview-surface);
147
147
  border: 1px solid var(--overview-border);
148
- border-radius: 1rem;
148
+ border-radius: var(--dashboard-radius, 1rem);
149
149
  }
150
150
  </style>
151
151
 
152
- <div class="mx-auto px-4 py-6 sm:px-8 sm:py-8 max-w-6xl dashboard-overview">
153
- <div class="flex flex-wrap gap-3 items-start justify-between mb-6">
152
+ <div class="mx-auto px-4 py-6 sm:px-8 sm:py-8 max-w-6xl dashboard-overview" data-dashboard-overview-page>
153
+ <div data-dashboard-hero class="flex flex-wrap gap-3 items-start justify-between mb-6">
154
154
  <PageHeader title="Dashboard" description="Application activity and service health" />
155
155
  <Button variant="secondary" size="sm" :loading="dashboard.isLoading.value" @click="loadDashboard">
156
156
  Refresh
@@ -166,8 +166,8 @@ onMount(() => {
166
166
 
167
167
  <section aria-labelledby="application-overview" class="mb-5 p-3 sm:p-4 overview-panel">
168
168
  <div class="flex flex-wrap gap-2 items-center justify-between mb-3">
169
- <h2 id="application-overview" class="font-semibold text-base text-neutral-900 dark:text-white">Overview</h2>
170
- <StxLink to="/requests" class="text-neutral-500 text-sm hover:text-neutral-700 dark:hover:text-neutral-300">Request history</StxLink>
169
+ <h2 data-dashboard-ink id="application-overview" class="font-semibold text-base text-neutral-900 dark:text-white">Overview</h2>
170
+ <StxLink data-dashboard-muted to="/requests" class="text-neutral-500 text-sm hover:text-neutral-700 dark:hover:text-neutral-300">Request history</StxLink>
171
171
  </div>
172
172
  <div class="overview-metrics">
173
173
  <StatsCard :for="item in loadingCards" :if="dashboard.isLoading.value && stats().length === 0" loading />
@@ -195,7 +195,7 @@ onMount(() => {
195
195
  <ServiceHealth :services="services()" :loading="dashboard.isLoading.value" />
196
196
  <ActivityTable :activities="activities()" :description="activityDescription()" :loading="dashboard.isLoading.value">
197
197
  <template #actions>
198
- <StxLink to="/data/activity" class="text-neutral-500 text-sm hover:text-neutral-700 dark:hover:text-neutral-300">View all</StxLink>
198
+ <StxLink data-dashboard-muted to="/data/activity" class="text-neutral-500 text-sm hover:text-neutral-700 dark:hover:text-neutral-300">View all</StxLink>
199
199
  </template>
200
200
  </ActivityTable>
201
201
  </div>
@@ -69,7 +69,7 @@ useEventListener('keydown', handleKeydown)
69
69
  useEventListener('stx:navigate', closeSidebar)
70
70
  </script>
71
71
 
72
- <div class="flex lg:hidden sticky top-0 z-40 gap-3 items-center px-4 h-14 bg-white/95 dark:bg-neutral-950/95 border-b border-neutral-200 dark:border-neutral-800 backdrop-blur-xl">
72
+ <div data-dashboard-mobile-bar class="flex lg:hidden sticky top-0 z-40 gap-3 items-center px-4 h-14 bg-white/95 dark:bg-neutral-950/95 border-b border-neutral-200 dark:border-neutral-800 backdrop-blur-xl">
73
73
  <button
74
74
  ref="dashboardMobileMenuButton"
75
75
  type="button"
@@ -20,13 +20,18 @@ defineClientPayload({ navSections })
20
20
 
21
21
  <script client>
22
22
  import type { ColorMode, SidebarStyle } from '@stacksjs/defaults/views/dashboard/composables/useAppearance'
23
+ import { ORIGINAL_DASHBOARD_THEME } from '@stacksjs/defaults/views/dashboard/composables/dashboard-themes'
23
24
  import {
24
25
  COLOR_MODE_OPTIONS,
25
26
  SIDEBAR_STYLE_OPTIONS,
26
27
  useAppearance,
27
28
  } from '@stacksjs/defaults/views/dashboard/composables/useAppearance'
29
+ import { useDashboardThemes } from '@stacksjs/defaults/views/dashboard/composables/useDashboardThemes'
28
30
 
29
31
  const appearance = useAppearance()
32
+ const themes = useDashboardThemes()
33
+ const usesOriginalTheme = derived(() => themes.active() === ORIGINAL_DASHBOARD_THEME)
34
+ const resetError = state('')
30
35
 
31
36
  // Every control writes straight through to the preference. There is no Save
32
37
  // button and no draft state: the shell restyles under the cursor, which is both
@@ -59,7 +64,15 @@ function toggleSection(id: string, visible: boolean) {
59
64
  }
60
65
 
61
66
  function resetAll() {
62
- appearance.reset()
67
+ resetError.set('')
68
+ try {
69
+ if (!usesOriginalTheme())
70
+ themes.select(ORIGINAL_DASHBOARD_THEME)
71
+ appearance.reset()
72
+ }
73
+ catch (error) {
74
+ resetError.set((error as Error).message)
75
+ }
63
76
  }
64
77
 
65
78
  // Selected state travels as a data attribute rather than as a swapped class
@@ -224,8 +237,10 @@ const selected = (a: unknown, b: unknown) => String(a === b)
224
237
  backLabel="Settings"
225
238
  />
226
239
 
240
+ <DashboardThemePicker />
241
+
227
242
  <!-- ===================== Sidebar style ===================== -->
228
- <Card variant="default" padding="none">
243
+ <Card :if="usesOriginalTheme()" variant="default" padding="none">
229
244
  <div class="px-6 py-5 border-b border-neutral-200/60 dark:border-white/5">
230
245
  <h2 class="font-semibold text-lg text-neutral-900 dark:text-white">Sidebar style</h2>
231
246
  <p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">
@@ -318,11 +333,12 @@ const selected = (a: unknown, b: unknown) => String(a === b)
318
333
  <!-- ===================== Reset ===================== -->
319
334
  <div class="flex items-center justify-between px-1">
320
335
  <p class="text-neutral-500 text-xs dark:text-neutral-400">
321
- Preferences are stored in this browser only, and sync across its tabs.
336
+ Themes and appearance preferences are stored in this browser.
322
337
  </p>
323
338
  <Button variant="secondary" size="sm" @click="resetAll()">
324
339
  Reset to defaults
325
340
  </Button>
326
341
  </div>
342
+ <p :if="resetError()" class="text-red-700 text-sm dark:text-red-300" role="alert" :text="resetError()"></p>
327
343
  </div>
328
344
  </template>
@@ -0,0 +1,218 @@
1
+ <script client>
2
+ import type { DashboardTheme } from '@stacksjs/defaults/views/dashboard/composables/dashboard-themes'
3
+ import {
4
+ BUNDLED_DASHBOARD_THEMES,
5
+ dashboardThemeColor,
6
+ MAX_THEME_FILE_SIZE,
7
+ ORIGINAL_DASHBOARD_THEME,
8
+ SYSTEM_CLEANER_THEME,
9
+ } from '@stacksjs/defaults/views/dashboard/composables/dashboard-themes'
10
+ import { useDashboardThemes } from '@stacksjs/defaults/views/dashboard/composables/useDashboardThemes'
11
+
12
+ const themes = useDashboardThemes()
13
+ const active = themes.active
14
+ const installed = themes.installed
15
+ const themeFile = useRef('dashboardThemeFile')
16
+ const feedback = state('')
17
+ const failure = state('')
18
+
19
+ const themesToShow = derived(() => [
20
+ {
21
+ id: ORIGINAL_DASHBOARD_THEME,
22
+ name: 'The Original',
23
+ description: 'The classic Stacks dashboard with your choice of sidebar style.',
24
+ preview: '',
25
+ overview: 'panel',
26
+ },
27
+ ...[...BUNDLED_DASHBOARD_THEMES, ...installed()].map(theme => ({
28
+ id: theme.id,
29
+ name: theme.name,
30
+ description: theme.description ?? '',
31
+ preview: previewStyle(theme),
32
+ overview: theme.overview,
33
+ })),
34
+ ])
35
+
36
+ const selectedInstallation = derived(() => installed().find(theme => theme.id === active()))
37
+ const downloadable = derived(() => selectedInstallation() || {
38
+ ...SYSTEM_CLEANER_THEME,
39
+ id: 'my-dashboard',
40
+ name: 'My Dashboard',
41
+ })
42
+
43
+ function previewStyle(theme: DashboardTheme): string {
44
+ return [
45
+ `--preview-window:${dashboardThemeColor(theme, 'window')}`,
46
+ `--preview-canvas:${dashboardThemeColor(theme, 'canvas')}`,
47
+ `--preview-surface:${dashboardThemeColor(theme, 'surface')}`,
48
+ `--preview-accent:${dashboardThemeColor(theme, 'accentFill')}`,
49
+ `--preview-hero-start:${dashboardThemeColor(theme, 'heroStart')}`,
50
+ `--preview-hero-end:${dashboardThemeColor(theme, 'heroEnd')}`,
51
+ `--preview-gap:${theme.layout === 'inset' ? '4px' : '0'}`,
52
+ ].join(';')
53
+ }
54
+
55
+ function downloadHref(): string {
56
+ return `data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(downloadable(), null, 2))}`
57
+ }
58
+
59
+ function selectTheme(id: string): void {
60
+ feedback.set('')
61
+ failure.set('')
62
+ try {
63
+ themes.select(id)
64
+ }
65
+ catch (error) {
66
+ failure.set((error as Error).message)
67
+ }
68
+ }
69
+
70
+ async function importTheme(event: Event): Promise<void> {
71
+ const input = event.currentTarget as HTMLInputElement
72
+ const file = input.files?.[0]
73
+ if (!file)
74
+ return
75
+ input.value = ''
76
+ feedback.set('')
77
+ failure.set('')
78
+ try {
79
+ if (file.size > MAX_THEME_FILE_SIZE)
80
+ throw new Error('Choose a theme JSON file smaller than 16 KB.')
81
+ let manifest: unknown
82
+ try {
83
+ manifest = JSON.parse(await file.text())
84
+ }
85
+ catch {
86
+ throw new Error('Choose a valid theme JSON file.')
87
+ }
88
+ const name = themes.install(manifest)
89
+ feedback.set(`${name} is installed and active.`)
90
+ }
91
+ catch (error) {
92
+ failure.set((error as Error).message)
93
+ }
94
+ }
95
+
96
+ function removeTheme(): void {
97
+ const theme = selectedInstallation()
98
+ if (!theme)
99
+ return
100
+ feedback.set('')
101
+ failure.set('')
102
+ try {
103
+ themes.remove(theme.id)
104
+ feedback.set(`${theme.name} was removed. The Original is active.`)
105
+ }
106
+ catch (error) {
107
+ failure.set((error as Error).message)
108
+ }
109
+ }
110
+ </script>
111
+
112
+ <style>
113
+ .dashboard-theme-choice {
114
+ border-color: var(--dashboard-border, light-dark(#e7e5e4, #ffffff24));
115
+ background: var(--dashboard-surface, light-dark(#fff, #262626));
116
+ }
117
+ .dashboard-theme-choice:hover {
118
+ background: var(--dashboard-surface-muted, light-dark(#fafaf9, #333));
119
+ }
120
+ .dashboard-theme-choice[aria-pressed="true"] {
121
+ border-color: var(--dashboard-accent, light-dark(#2563eb, #60a5fa));
122
+ box-shadow: 0 0 0 1px var(--dashboard-accent, light-dark(#2563eb, #60a5fa));
123
+ }
124
+ .dashboard-theme-choice:focus-visible {
125
+ outline: 2px solid var(--dashboard-accent, light-dark(#2563eb, #60a5fa));
126
+ outline-offset: 3px;
127
+ }
128
+ .dashboard-theme-preview {
129
+ color-scheme: light;
130
+ height: 5.25rem;
131
+ background: var(--preview-window, light-dark(#e7e7ec, #1c1c1e));
132
+ box-shadow: inset 0 0 0 1px rgb(127 127 127 / .18);
133
+ }
134
+ .dark .dashboard-theme-preview {
135
+ color-scheme: dark;
136
+ }
137
+ .dashboard-theme-preview[data-overview="immersive"] {
138
+ background: linear-gradient(155deg, var(--preview-hero-start), var(--preview-hero-end));
139
+ }
140
+ .dashboard-theme-preview[data-overview="immersive"] .dashboard-theme-preview-page {
141
+ background: transparent;
142
+ }
143
+ .dashboard-theme-preview[data-overview="immersive"] .dashboard-theme-preview-page > span {
144
+ background: rgb(255 255 255 / .15);
145
+ }
146
+ .dashboard-theme-preview-nav {
147
+ width: 30%;
148
+ display: grid;
149
+ align-content: start;
150
+ gap: 4px;
151
+ padding: 9px 5px;
152
+ }
153
+ .dashboard-theme-preview-nav > span {
154
+ height: 5px;
155
+ border-radius: 2px;
156
+ background: rgb(127 127 127 / .25);
157
+ }
158
+ .dashboard-theme-preview-nav > span:first-child {
159
+ background: var(--preview-accent, #007aff);
160
+ }
161
+ .dashboard-theme-preview-page {
162
+ display: grid;
163
+ flex: 1;
164
+ grid-template: 2fr 1fr / repeat(3, 1fr);
165
+ gap: 4px;
166
+ padding: 7px;
167
+ margin: var(--preview-gap, 0) var(--preview-gap, 0) var(--preview-gap, 0) 0;
168
+ border-radius: var(--preview-gap, 0);
169
+ background: var(--preview-canvas, light-dark(#f6f6f9, #121318));
170
+ }
171
+ .dashboard-theme-preview-page > span {
172
+ border-radius: 3px;
173
+ background: var(--preview-surface, light-dark(#fff, #27272a));
174
+ }
175
+ .dashboard-theme-preview-page > span:first-child {
176
+ grid-column: 1 / -1;
177
+ background: linear-gradient(155deg, var(--preview-hero-start, light-dark(#e4e4eb, #2d2e36)), var(--preview-hero-end, light-dark(#ececf1, #23242b)));
178
+ }
179
+ </style>
180
+
181
+ <template>
182
+ <Card variant="default" padding="none">
183
+ <div class="px-6 py-5 border-b border-neutral-200/60 dark:border-white/5">
184
+ <h2 class="font-semibold text-lg text-neutral-900 dark:text-white">Dashboard theme</h2>
185
+ <p class="mt-1 text-neutral-500 text-sm dark:text-neutral-400">Choose a theme or install one from a JSON file.</p>
186
+ </div>
187
+ <div class="grid gap-4 sm:grid-cols-2 p-6" role="group" aria-label="Dashboard theme">
188
+ <button
189
+ :for="theme in themesToShow()"
190
+ type="button"
191
+ class="flex flex-col gap-2 p-3 text-left border rounded-xl dashboard-theme-choice"
192
+ :data-theme-id="theme.id"
193
+ :aria-pressed="String(active() === theme.id)"
194
+ @click="selectTheme(theme.id)"
195
+ >
196
+ <span class="flex overflow-hidden w-full rounded-lg dashboard-theme-preview" :style="theme.preview" :data-overview="theme.overview" aria-hidden="true">
197
+ <span class="dashboard-theme-preview-nav"><span></span><span></span><span></span></span>
198
+ <span class="dashboard-theme-preview-page"><span></span><span></span><span></span><span></span></span>
199
+ </span>
200
+ <span class="font-medium text-neutral-900 text-sm dark:text-white" :text="theme.name"></span>
201
+ <span :if="theme.description" class="text-neutral-500 text-xs dark:text-neutral-400" :text="theme.description"></span>
202
+ </button>
203
+ </div>
204
+ <div class="pb-6 px-6">
205
+ <div class="flex flex-wrap gap-2">
206
+ <input ref="dashboardThemeFile" hidden type="file" accept=".json,application/json" @change="importTheme($event)" />
207
+ <Button variant="secondary" size="sm" @click="themeFile.current?.click()">Install theme</Button>
208
+ <Button tag="a" variant="outline" size="sm" :href="downloadHref()" :download="downloadable().id + '.json'">
209
+ {{ selectedInstallation() ? 'Export theme' : 'Download starter theme' }}
210
+ </Button>
211
+ <Button :if="selectedInstallation()" variant="outline" size="sm" @click="removeTheme()">Remove theme</Button>
212
+ </div>
213
+ <p class="mt-3 text-neutral-500 text-xs dark:text-neutral-400">To build a theme, download the starter, edit its JSON, and install the file.</p>
214
+ <p :if="feedback()" class="mt-2 text-neutral-700 text-sm dark:text-neutral-200" role="status" :text="feedback()"></p>
215
+ <p :if="failure()" class="mt-2 text-red-700 text-sm dark:text-red-300" role="alert" :text="failure()"></p>
216
+ </div>
217
+ </Card>
218
+ </template>
@@ -34,11 +34,11 @@ function statusIcon(status: string): string {
34
34
  }
35
35
  </script>
36
36
 
37
- <section class="bg-white dark:bg-neutral-800/90 border border-black/5 rounded-xl dark:border-white/5">
37
+ <section data-dashboard-card="default" class="bg-white dark:bg-neutral-800/90 border border-black/5 rounded-xl dark:border-white/5">
38
38
  <header class="flex items-center justify-between p-5 border-b border-neutral-200/60 dark:border-white/5">
39
39
  <div>
40
- <h2 class="font-semibold text-[14px] text-neutral-900 tracking-tight dark:text-white">{{ title() }}</h2>
41
- <p class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">{{ description() }}</p>
40
+ <h2 data-dashboard-ink class="font-semibold text-[14px] text-neutral-900 tracking-tight dark:text-white">{{ title() }}</h2>
41
+ <p data-dashboard-muted class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">{{ description() }}</p>
42
42
  </div>
43
43
  <slot name="actions" />
44
44
  </header>
@@ -59,8 +59,8 @@ function statusIcon(status: string): string {
59
59
  <span :class="'h-4 w-4 ' + statusIcon(activity.status)" aria-hidden="true"></span>
60
60
  </div>
61
61
  <div class="flex-1 min-w-0">
62
- <p class="font-medium text-neutral-900 text-sm truncate dark:text-white">{{ activity.title }}</p>
63
- <p class="text-neutral-500 text-xs dark:text-neutral-400">
62
+ <p data-dashboard-ink class="font-medium text-neutral-900 text-sm truncate dark:text-white">{{ activity.title }}</p>
63
+ <p data-dashboard-muted class="text-neutral-500 text-xs dark:text-neutral-400">
64
64
  <span :if="activity.source">{{ activity.source }} · </span>{{ activity.time }}
65
65
  </p>
66
66
  </div>
@@ -70,7 +70,7 @@ function statusIcon(status: string): string {
70
70
 
71
71
  <div :if="!loading() && activities().length === 0" class="py-12 text-center">
72
72
  <span aria-hidden="true" class="inline-block h-7 w-7 text-neutral-300 dark:text-neutral-600 i-hugeicons-activity-01"></span>
73
- <p class="mt-2 font-medium text-neutral-900 text-sm dark:text-white">No recent activity</p>
74
- <p class="mt-1 text-[12px] text-neutral-500 dark:text-neutral-400">Persisted activity will appear here.</p>
73
+ <p data-dashboard-ink class="mt-2 font-medium text-neutral-900 text-sm dark:text-white">No recent activity</p>
74
+ <p data-dashboard-muted class="mt-1 text-[12px] text-neutral-500 dark:text-neutral-400">Persisted activity will appear here.</p>
75
75
  </div>
76
76
  </section>
@@ -116,7 +116,8 @@ const liveAriaExpanded = useReactiveProp('ariaExpanded', '')
116
116
  :aria-label="liveAriaLabel() || undefined"
117
117
  :title="hoverTitle()"
118
118
  class="{{ buttonClass }}"
119
- :class="variantToggles()"
119
+ :class="variantToggles()"
120
+ :data-dashboard-button="liveVariant()"
120
121
  :target="liveTarget() || undefined"
121
122
  :rel="liveRel() || undefined"
122
123
  :aria-busy="liveLoading() ? 'true' : 'false'"
@@ -134,7 +135,8 @@ const liveAriaExpanded = useReactiveProp('ariaExpanded', '')
134
135
  :type="liveType()"
135
136
  :form="liveForm() || undefined"
136
137
  class="{{ buttonClass }}"
137
- :class="variantToggles()"
138
+ :class="variantToggles()"
139
+ :data-dashboard-button="liveVariant()"
138
140
  :aria-label="liveAriaLabel() || undefined"
139
141
  :title="hoverTitle()"
140
142
  :aria-busy="liveLoading() ? 'true' : 'false'"
@@ -151,7 +153,8 @@ const liveAriaExpanded = useReactiveProp('ariaExpanded', '')
151
153
  :type="liveType()"
152
154
  :form="liveForm() || undefined"
153
155
  class="{{ buttonClass }}"
154
- :class="variantToggles()"
156
+ :class="variantToggles()"
157
+ :data-dashboard-button="liveVariant()"
155
158
  :aria-label="liveAriaLabel() || undefined"
156
159
  :title="hoverTitle()"
157
160
  :aria-haspopup="liveAriaHasPopup() || undefined"
@@ -63,7 +63,7 @@ const cardClass = [
63
63
  const liveSubtitle = useReactiveProp('subtitle', '')
64
64
  </script>
65
65
 
66
- <article class="{{ cardClass }}" @if(clickable) role="button" tabindex="0" @endif>
66
+ <article data-dashboard-card="{{ variant }}" class="{{ cardClass }}" @if(clickable) role="button" tabindex="0" @endif>
67
67
  @if($slots.header)
68
68
  <header class="px-5 py-4 border-b border-stone-200/80 dark:border-white/5">
69
69
  <slot name="header" />
@@ -81,7 +81,7 @@ effect(() => {
81
81
  @cancel="handleCancel"
82
82
  >
83
83
  <div class="flex justify-end min-h-full" @click="handleBackdropClick">
84
- <section class="flex relative flex-col h-dvh w-full bg-white dark:bg-neutral-950 border-neutral-200 border-l dark:border-neutral-800 shadow-2xl {{ sizeClasses[size] }}" @click.stop>
84
+ <section data-dashboard-overlay="drawer" class="flex relative flex-col h-dvh w-full bg-white dark:bg-neutral-950 border-neutral-200 border-l dark:border-neutral-800 shadow-2xl {{ sizeClasses[size] }}" @click.stop>
85
85
  <header class="flex gap-4 items-start px-5 py-4 border-b border-neutral-200 dark:border-neutral-800">
86
86
  <slot name="header-leading" />
87
87
  <div class="flex-1 min-w-0">
@@ -117,6 +117,7 @@ effect(() => {
117
117
  <!-- Modal container -->
118
118
  <div class="flex min-h-full {{ positionClasses[position] }}" @click="handleBackdropClick">
119
119
  <div
120
+ data-dashboard-overlay="modal"
120
121
  class="relative w-full rounded-xl bg-white dark:bg-neutral-900 shadow-2xl {{ sizeClasses[size] }} {{ panelClassName }}"
121
122
  >
122
123
  <!-- Header -->
@@ -19,7 +19,7 @@ const title = useReactiveProp('title', '')
19
19
  const description = useReactiveProp('description', '')
20
20
  </script>
21
21
 
22
- <header class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
22
+ <header data-dashboard-page-heading class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
23
23
  <div>
24
24
  <h1 class="font-bold text-2xl text-gray-900 dark:text-white">{{ title() }}</h1>
25
25
  <p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">{{ description() }}</p>
@@ -33,10 +33,11 @@ function toneClass(link: QuickLink): string {
33
33
  </script>
34
34
 
35
35
  <section :class="customClass()">
36
- <h2 class="mb-4 font-semibold text-base text-neutral-900 dark:text-white">{{ title() }}</h2>
36
+ <h2 data-dashboard-ink class="mb-4 font-semibold text-base text-neutral-900 dark:text-white">{{ title() }}</h2>
37
37
  <div class="grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">
38
38
  <div :for="link in validLinks()" class="contents">
39
39
  <a
40
+ data-dashboard-card="default"
40
41
  :if="isExternal(link.href)"
41
42
  :href="link.href"
42
43
  target="_blank"
@@ -48,12 +49,13 @@ function toneClass(link: QuickLink): string {
48
49
  <span :class="iconClass(link)" aria-hidden="true"></span>
49
50
  </div>
50
51
  <div class="flex-1 min-w-0">
51
- <p class="font-medium text-neutral-900 text-sm dark:text-white">{{ link.title }}</p>
52
- <p :if="link.description" class="mt-0.5 text-neutral-500 text-xs truncate dark:text-neutral-400">{{ link.description }}</p>
52
+ <p data-dashboard-ink class="font-medium text-neutral-900 text-sm dark:text-white">{{ link.title }}</p>
53
+ <p data-dashboard-muted :if="link.description" class="mt-0.5 text-neutral-500 text-xs truncate dark:text-neutral-400">{{ link.description }}</p>
53
54
  </div>
54
55
  </div>
55
56
  </a>
56
57
  <StxLink
58
+ data-dashboard-card="default"
57
59
  :else
58
60
  :to="link.href"
59
61
  class="block p-5 no-underline bg-white dark:bg-neutral-800 border border-neutral-200 rounded-xl dark:border-neutral-700 hover:shadow-md transition-shadow"
@@ -63,8 +65,8 @@ function toneClass(link: QuickLink): string {
63
65
  <span :class="iconClass(link)" aria-hidden="true"></span>
64
66
  </div>
65
67
  <div class="flex-1 min-w-0">
66
- <p class="font-medium text-neutral-900 text-sm dark:text-white">{{ link.title }}</p>
67
- <p :if="link.description" class="mt-0.5 text-neutral-500 text-xs truncate dark:text-neutral-400">{{ link.description }}</p>
68
+ <p data-dashboard-ink class="font-medium text-neutral-900 text-sm dark:text-white">{{ link.title }}</p>
69
+ <p data-dashboard-muted :if="link.description" class="mt-0.5 text-neutral-500 text-xs truncate dark:text-neutral-400">{{ link.description }}</p>
68
70
  </div>
69
71
  </div>
70
72
  </StxLink>
@@ -21,11 +21,11 @@ function statusClass(status: string): string {
21
21
  }
22
22
  </script>
23
23
 
24
- <section class="bg-white dark:bg-neutral-800/90 border border-black/5 rounded-xl dark:border-white/5">
24
+ <section data-dashboard-card="default" class="bg-white dark:bg-neutral-800/90 border border-black/5 rounded-xl dark:border-white/5">
25
25
  <header class="flex items-center justify-between p-5 border-b border-neutral-200/60 dark:border-white/5">
26
26
  <div>
27
- <h2 class="font-semibold text-[14px] text-neutral-900 tracking-tight dark:text-white">System health</h2>
28
- <p class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">Native application health probes.</p>
27
+ <h2 data-dashboard-ink class="font-semibold text-[14px] text-neutral-900 tracking-tight dark:text-white">System health</h2>
28
+ <p data-dashboard-muted class="mt-1 text-neutral-500 text-xs dark:text-neutral-400">Native application health probes.</p>
29
29
  </div>
30
30
  <Badge :if="allHealthy()" variant="success" size="xs" dot>All systems operational</Badge>
31
31
  <Badge :if="!loading() && services().length > 0 && !allHealthy()" variant="warning" size="xs" dot>Attention required</Badge>
@@ -42,8 +42,8 @@ function statusClass(status: string): string {
42
42
  <article :for="service in services()" class="px-5 py-3.5">
43
43
  <div class="flex gap-4 items-center justify-between">
44
44
  <div>
45
- <p class="font-medium text-[13px] text-neutral-900 dark:text-white">{{ service.name }}</p>
46
- <p class="mt-0.5 text-[12px] text-neutral-500 dark:text-neutral-400">{{ service.latency }}</p>
45
+ <p data-dashboard-ink class="font-medium text-[13px] text-neutral-900 dark:text-white">{{ service.name }}</p>
46
+ <p data-dashboard-muted class="mt-0.5 text-[12px] text-neutral-500 dark:text-neutral-400">{{ service.latency }}</p>
47
47
  </div>
48
48
  <span :class="'px-2 py-0.5 font-medium text-[11px] rounded-full capitalize ' + statusClass(service.status)">
49
49
  {{ service.status }}
@@ -55,6 +55,6 @@ function statusClass(status: string): string {
55
55
 
56
56
  <div :if="!loading() && services().length === 0" class="px-5 py-12 text-center">
57
57
  <span aria-hidden="true" class="inline-block h-7 w-7 text-neutral-300 dark:text-neutral-600 i-hugeicons-health"></span>
58
- <p class="mt-2 text-neutral-500 text-sm dark:text-neutral-400">No health checks were returned.</p>
58
+ <p data-dashboard-muted class="mt-2 text-neutral-500 text-sm dark:text-neutral-400">No health checks were returned.</p>
59
59
  </div>
60
60
  </section>
@@ -39,17 +39,17 @@ const iconBackgroundClass = derived(() => iconBgClasses[liveIconBg() || 'primary
39
39
  const trendDirection = derived(() => liveTrend() === null || liveTrend() === 0 ? 'neutral' : (Number(liveTrend()) > 0 ? 'up' : 'down'))
40
40
  const trendClass = derived(() => trendClasses[trendDirection()])
41
41
  </script>
42
- <div class="p-3 sm:p-5 bg-white dark:bg-neutral-800/90 border border-black/5 rounded-xl dark:border-white/5 hover:shadow-black/5 hover:shadow-md dark:hover:shadow-black/20 duration-150 transition-all">
42
+ <div data-dashboard-card="default" class="p-3 sm:p-5 bg-white dark:bg-neutral-800/90 border border-black/5 rounded-xl dark:border-white/5 hover:shadow-black/5 hover:shadow-md dark:hover:shadow-black/20 duration-150 transition-all">
43
43
  <div class="flex gap-2 items-start justify-between">
44
44
  <div class="flex-1 min-w-0">
45
- <p class="font-medium leading-snug text-[13px] text-neutral-500 tracking-tight dark:text-neutral-400">
45
+ <p data-dashboard-muted class="font-medium leading-snug text-[13px] text-neutral-500 tracking-tight dark:text-neutral-400">
46
46
  {{ liveTitle() }}
47
47
  </p>
48
48
 
49
49
  <div class="flex gap-2 items-baseline mt-1.5">
50
50
  <div :if="liveLoading()" class="h-7 w-20 bg-black/5 dark:bg-white/10 rounded-md animate-pulse"></div>
51
51
  <div :else class="flex gap-2 items-baseline">
52
- <p class="font-semibold text-[22px] text-neutral-900 tracking-tight dark:text-white">
52
+ <p data-dashboard-ink class="font-semibold text-[22px] text-neutral-900 tracking-tight dark:text-white">
53
53
  @if($slots.value)
54
54
  <slot name="value" />
55
55
  @else
@@ -70,11 +70,11 @@ const trendClass = derived(() => trendClasses[trendDirection()])
70
70
  </div>
71
71
 
72
72
  @if($slots.subtitle)
73
- <p class="mt-1 text-[12px] text-neutral-500 dark:text-neutral-400">
73
+ <p data-dashboard-muted class="mt-1 text-[12px] text-neutral-500 dark:text-neutral-400">
74
74
  <slot name="subtitle" />
75
75
  </p>
76
76
  @else
77
- <p :if="supportText()" class="mt-1 text-[12px] text-neutral-500 dark:text-neutral-400">
77
+ <p data-dashboard-muted :if="supportText()" class="mt-1 text-[12px] text-neutral-500 dark:text-neutral-400">
78
78
  {{ supportText() }}
79
79
  </p>
80
80
  @endif