@ghostvue/mcp 0.1.0 → 0.2.0

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.
Files changed (152) hide show
  1. package/dist/assets/bundle.json +2 -2
  2. package/dist/assets/component-exports.json +1 -0
  3. package/dist/assets/docs/pages.json +1 -1
  4. package/dist/assets/examples/catalog.json +1 -1
  5. package/dist/assets/examples/sources/accordion/billing-faq.vue +123 -0
  6. package/dist/assets/examples/sources/avatar/team-roster.vue +69 -5
  7. package/dist/assets/examples/sources/badge/release-channels.vue +1 -1
  8. package/dist/assets/examples/sources/breadcrumb/basic.vue +60 -15
  9. package/dist/assets/examples/sources/button/refresh-status.vue +95 -0
  10. package/dist/assets/examples/sources/calendar/availability.vue +235 -0
  11. package/dist/assets/examples/sources/calendar/office-locale.vue +197 -0
  12. package/dist/assets/examples/sources/card/project-summary.vue +38 -3
  13. package/dist/assets/examples/sources/checkbox-group/basic.vue +56 -0
  14. package/dist/assets/examples/sources/checkbox-group/field.vue +73 -0
  15. package/dist/assets/examples/sources/checkbox-group/form.vue +100 -0
  16. package/dist/assets/examples/sources/checkbox-group/headless.vue +68 -0
  17. package/dist/assets/examples/sources/checkbox-group/notification-preferences.vue +380 -0
  18. package/dist/assets/examples/sources/collapsible/shipment-history.vue +135 -0
  19. package/dist/assets/examples/sources/combobox/review-request-form.vue +415 -0
  20. package/dist/assets/examples/sources/command-palette/async.vue +60 -12
  21. package/dist/assets/examples/sources/command-palette/basic.vue +123 -2
  22. package/dist/assets/examples/sources/command-palette/shortcut.vue +132 -5
  23. package/dist/assets/examples/sources/command-palette/themed.vue +44 -4
  24. package/dist/assets/examples/sources/command-palette/virtualized.vue +124 -3
  25. package/dist/assets/examples/sources/context-menu/themed.vue +81 -26
  26. package/dist/assets/examples/sources/data-table/themed-invoices.vue +219 -44
  27. package/dist/assets/examples/sources/date-picker/controlled.vue +8 -293
  28. package/dist/assets/examples/sources/date-picker/custom-format.vue +6 -295
  29. package/dist/assets/examples/sources/date-picker/nested-dialog.vue +28 -350
  30. package/dist/assets/examples/sources/date-picker/rtl.vue +5 -294
  31. package/dist/assets/examples/sources/date-picker/themed.vue +2 -2
  32. package/dist/assets/examples/sources/date-picker/validation.vue +8 -294
  33. package/dist/assets/examples/sources/dropdown-menu/nested-export.vue +56 -0
  34. package/dist/assets/examples/sources/empty-state/search-results.vue +26 -1
  35. package/dist/assets/examples/sources/field/billing-address-headless.vue +93 -0
  36. package/dist/assets/examples/sources/field/billing-address.vue +192 -0
  37. package/dist/assets/examples/sources/field/checkbox.vue +10 -2
  38. package/dist/assets/examples/sources/field/themed.vue +12 -11
  39. package/dist/assets/examples/sources/file-upload/asset-submission.vue +96 -36
  40. package/dist/assets/examples/sources/form/async-validation.vue +180 -0
  41. package/dist/assets/examples/sources/form/composable.vue +146 -0
  42. package/dist/assets/examples/sources/form/nested-webhooks.vue +233 -0
  43. package/dist/assets/examples/sources/form/profile-schema.vue +376 -0
  44. package/dist/assets/examples/sources/inline-alert/billing-notices.vue +26 -5
  45. package/dist/assets/examples/sources/inline-alert/feed-status.vue +229 -0
  46. package/dist/assets/examples/sources/input/clearable-search-headless.vue +162 -0
  47. package/dist/assets/examples/sources/input/clearable-search.vue +225 -0
  48. package/dist/assets/examples/sources/input/unit-suffix.vue +109 -0
  49. package/dist/assets/examples/sources/interactive-surface/basic.vue +20 -8
  50. package/dist/assets/examples/sources/interactive-surface/feature-tiles.vue +42 -8
  51. package/dist/assets/examples/sources/kbd/command-shortcuts.vue +0 -1
  52. package/dist/assets/examples/sources/link/documentation-footer.vue +11 -4
  53. package/dist/assets/examples/sources/link/router.vue +9 -5
  54. package/dist/assets/examples/sources/menubar/themed.vue +46 -10
  55. package/dist/assets/examples/sources/number-input/order-limits.vue +5 -0
  56. package/dist/assets/examples/sources/number-input/themed.vue +12 -6
  57. package/dist/assets/examples/sources/number-input/workshop-booking.vue +207 -0
  58. package/dist/assets/examples/sources/pagination/controlled.vue +83 -18
  59. package/dist/assets/examples/sources/pagination/ellipsis.vue +44 -14
  60. package/dist/assets/examples/sources/pagination/themed.vue +161 -21
  61. package/dist/assets/examples/sources/presence/basic.vue +81 -0
  62. package/dist/assets/examples/sources/presence/portal.vue +92 -0
  63. package/dist/assets/examples/sources/progress/report-export.vue +160 -0
  64. package/dist/assets/examples/sources/scroll-area/activity-feed.vue +0 -1
  65. package/dist/assets/examples/sources/scroll-area/horizontal.vue +169 -14
  66. package/dist/assets/examples/sources/scroll-area/themed.vue +42 -3
  67. package/dist/assets/examples/sources/scroll-spy/themed.vue +180 -31
  68. package/dist/assets/examples/sources/select/alert-routing-form.vue +356 -0
  69. package/dist/assets/examples/sources/select/multiple-form.vue +201 -0
  70. package/dist/assets/examples/sources/select/multiple-labels.vue +142 -0
  71. package/dist/assets/examples/sources/skeleton/profile-loading.vue +28 -4
  72. package/dist/assets/examples/sources/slider/audio-mixer.vue +8 -2
  73. package/dist/assets/examples/sources/slider/price-filter.vue +162 -0
  74. package/dist/assets/examples/sources/slider/vertical.vue +3 -2
  75. package/dist/assets/examples/sources/spinner/sync-status.vue +13 -10
  76. package/dist/assets/examples/sources/switch/form.vue +43 -11
  77. package/dist/assets/examples/sources/table/contain-horizontal.vue +24 -12
  78. package/dist/assets/examples/sources/table/row-headers.vue +118 -19
  79. package/dist/assets/examples/sources/tabs/review-sections.vue +43 -0
  80. package/dist/assets/examples/sources/tags-input/headless-field.vue +31 -0
  81. package/dist/assets/examples/sources/tags-input/project-labels.vue +64 -0
  82. package/dist/assets/examples/sources/tags-input/read-only.vue +12 -0
  83. package/dist/assets/examples/sources/toast/themed.vue +42 -19
  84. package/dist/assets/examples/sources/toolbar/themed.vue +22 -4
  85. package/dist/assets/examples/sources/tooltip/themed.vue +12 -1
  86. package/dist/assets/examples/sources/tree/themed.vue +70 -17
  87. package/dist/assets/manifests/themes/ghost-accordion.manifest.json +1 -0
  88. package/dist/assets/manifests/themes/ghost-button.manifest.json +1 -0
  89. package/dist/assets/manifests/themes/ghost-calendar.manifest.json +3 -1
  90. package/dist/assets/manifests/themes/ghost-checkbox-group.manifest.json +90 -0
  91. package/dist/assets/manifests/themes/ghost-collapsible.manifest.json +1 -0
  92. package/dist/assets/manifests/themes/ghost-combobox.manifest.json +1 -0
  93. package/dist/assets/manifests/themes/ghost-command-palette.manifest.json +2 -1
  94. package/dist/assets/manifests/themes/ghost-date-picker.manifest.json +5 -0
  95. package/dist/assets/manifests/themes/ghost-dropdown-menu.manifest.json +9 -0
  96. package/dist/assets/manifests/themes/ghost-field.manifest.json +10 -2
  97. package/dist/assets/manifests/themes/ghost-inline-alert.manifest.json +1 -0
  98. package/dist/assets/manifests/themes/ghost-input.manifest.json +3 -1
  99. package/dist/assets/manifests/themes/ghost-link.manifest.json +2 -1
  100. package/dist/assets/manifests/themes/ghost-number-input.manifest.json +1 -0
  101. package/dist/assets/manifests/themes/ghost-pagination.manifest.json +6 -2
  102. package/dist/assets/manifests/themes/ghost-progress.manifest.json +1 -0
  103. package/dist/assets/manifests/themes/ghost-radio-group-item.manifest.json +63 -0
  104. package/dist/assets/manifests/themes/ghost-scroll-area.manifest.json +12 -2
  105. package/dist/assets/manifests/themes/ghost-select.manifest.json +3 -0
  106. package/dist/assets/manifests/themes/ghost-slider.manifest.json +1 -0
  107. package/dist/assets/manifests/themes/ghost-table.manifest.json +2 -1
  108. package/dist/assets/manifests/themes/ghost-tags-input.manifest.json +255 -0
  109. package/dist/assets/manifests/vue/ghost-checkbox-group.manifest.json +173 -0
  110. package/dist/assets/manifests/vue/ghost-command-palette-content.manifest.json +6 -2
  111. package/dist/assets/manifests/vue/ghost-command-palette-overlay.manifest.json +6 -2
  112. package/dist/assets/manifests/vue/ghost-command-palette.manifest.json +0 -1
  113. package/dist/assets/manifests/vue/ghost-context-menu-content.manifest.json +3 -3
  114. package/dist/assets/manifests/vue/ghost-context-menu.manifest.json +1 -1
  115. package/dist/assets/manifests/vue/ghost-data-table-preset.manifest.json +1 -1
  116. package/dist/assets/manifests/vue/ghost-data-table-table.manifest.json +1 -1
  117. package/dist/assets/manifests/vue/ghost-data-table.manifest.json +99 -2
  118. package/dist/assets/manifests/vue/ghost-date-picker-content.manifest.json +12 -3
  119. package/dist/assets/manifests/vue/ghost-date-picker.manifest.json +1 -6
  120. package/dist/assets/manifests/vue/ghost-dialog-content.manifest.json +6 -2
  121. package/dist/assets/manifests/vue/ghost-dialog-overlay.manifest.json +6 -2
  122. package/dist/assets/manifests/vue/ghost-drawer-content.manifest.json +6 -2
  123. package/dist/assets/manifests/vue/ghost-drawer-overlay.manifest.json +6 -2
  124. package/dist/assets/manifests/vue/ghost-field-error.manifest.json +12 -1
  125. package/dist/assets/manifests/vue/ghost-field.manifest.json +35 -3
  126. package/dist/assets/manifests/vue/ghost-form.manifest.json +221 -0
  127. package/dist/assets/manifests/vue/ghost-hover-card-content.manifest.json +12 -3
  128. package/dist/assets/manifests/vue/ghost-input.manifest.json +2 -1
  129. package/dist/assets/manifests/vue/ghost-link.manifest.json +1 -2
  130. package/dist/assets/manifests/vue/ghost-menubar-content.manifest.json +3 -3
  131. package/dist/assets/manifests/vue/ghost-menubar.manifest.json +4 -4
  132. package/dist/assets/manifests/vue/ghost-pagination.manifest.json +0 -2
  133. package/dist/assets/manifests/vue/ghost-popover-content.manifest.json +6 -2
  134. package/dist/assets/manifests/vue/ghost-presence.manifest.json +96 -0
  135. package/dist/assets/manifests/vue/ghost-scroll-area.manifest.json +0 -1
  136. package/dist/assets/manifests/vue/ghost-select-content.manifest.json +6 -1
  137. package/dist/assets/manifests/vue/ghost-select-group.manifest.json +6 -1
  138. package/dist/assets/manifests/vue/ghost-select-label.manifest.json +6 -1
  139. package/dist/assets/manifests/vue/ghost-select-option.manifest.json +6 -1
  140. package/dist/assets/manifests/vue/ghost-select-trigger.manifest.json +6 -1
  141. package/dist/assets/manifests/vue/ghost-select-value.manifest.json +18 -2
  142. package/dist/assets/manifests/vue/ghost-select.manifest.json +18 -6
  143. package/dist/assets/manifests/vue/ghost-submenu-content.manifest.json +168 -0
  144. package/dist/assets/manifests/vue/ghost-submenu-trigger.manifest.json +102 -0
  145. package/dist/assets/manifests/vue/ghost-submenu.manifest.json +59 -0
  146. package/dist/assets/manifests/vue/ghost-table.manifest.json +0 -2
  147. package/dist/assets/manifests/vue/ghost-tabs.manifest.json +2 -1
  148. package/dist/assets/manifests/vue/ghost-tags-input.manifest.json +260 -0
  149. package/dist/assets/tokens.json +15 -0
  150. package/dist/components.d.ts +5 -0
  151. package/dist/components.js +80 -11
  152. package/package.json +1 -1
@@ -11,7 +11,9 @@ import {
11
11
 
12
12
  const loading = ref(true)
13
13
 
14
- function toggleState(): void {
14
+ // Stand-in for the profile request settling, or starting again, so each phase
15
+ // can be inspected.
16
+ function nextStep(): void {
15
17
  loading.value = !loading.value
16
18
  }
17
19
  </script>
@@ -21,14 +23,24 @@ function toggleState(): void {
21
23
  <GhostCard>
22
24
  <template #header>
23
25
  <div class="skeleton-showcase__header">
24
- <span class="skeleton-showcase__title">Maintainer profile</span>
26
+ <div class="skeleton-showcase__heading">
27
+ <span class="skeleton-showcase__title">Maintainer profile</span>
28
+ <!--
29
+ Skeletons are silent. This one mounted status line tells
30
+ assistive technology that the profile is loading, then that it
31
+ arrived.
32
+ -->
33
+ <span class="skeleton-showcase__status" role="status">
34
+ {{ loading ? 'Loading profile…' : 'Profile loaded' }}
35
+ </span>
36
+ </div>
25
37
  <GhostButton
26
38
  size="sm"
27
39
  variant="outline"
28
40
  tone="neutral"
29
- @click="toggleState"
41
+ @click="nextStep"
30
42
  >
31
- {{ loading ? 'Show loaded' : 'Show loading' }}
43
+ {{ loading ? 'Finish loading' : 'Reload profile' }}
32
44
  </GhostButton>
33
45
  </div>
34
46
  </template>
@@ -86,6 +98,18 @@ function toggleState(): void {
86
98
  justify-content: space-between;
87
99
  }
88
100
 
101
+ .skeleton-showcase__heading {
102
+ display: grid;
103
+ gap: var(--ghost-space-gap-2xs);
104
+ min-inline-size: 0;
105
+ }
106
+
107
+ .skeleton-showcase__status {
108
+ color: var(--ghost-text-muted);
109
+ font-size: var(--ghost-type-size-xs);
110
+ line-height: var(--ghost-type-line-normal);
111
+ }
112
+
89
113
  .skeleton-showcase__title {
90
114
  color: var(--ghost-text-default);
91
115
  font-size: var(--ghost-type-size-md);
@@ -45,6 +45,7 @@ function resetMixer(): void {
45
45
  :max="100"
46
46
  :step="1"
47
47
  aria-labelledby="mixer-gain-label"
48
+ :style="{ inlineSize: '100%' }"
48
49
  :value-text="`${masterGain} percent`"
49
50
  @update:model-value="status = ''"
50
51
  />
@@ -52,8 +53,12 @@ function resetMixer(): void {
52
53
 
53
54
  <div class="mixer__row">
54
55
  <div class="mixer__row-head">
56
+ <!--
57
+ aria-valuetext applies to single-thumb sliders only, so the
58
+ label carries the unit for both range thumbs.
59
+ -->
55
60
  <span id="mixer-band-label" class="mixer__label">
56
- Passband frequency
61
+ Passband frequency (Hz)
57
62
  </span>
58
63
  <span class="mixer__value">{{ rangeLabel }}</span>
59
64
  </div>
@@ -64,7 +69,7 @@ function resetMixer(): void {
64
69
  :max="2000"
65
70
  :step="50"
66
71
  aria-labelledby="mixer-band-label"
67
- :value-text="rangeLabel"
72
+ :style="{ inlineSize: '100%' }"
68
73
  @update:model-value="status = ''"
69
74
  />
70
75
  </div>
@@ -83,6 +88,7 @@ function resetMixer(): void {
83
88
  :max="100"
84
89
  tone="neutral"
85
90
  aria-labelledby="mixer-limiter-label"
91
+ :style="{ inlineSize: '100%' }"
86
92
  :value-text="`${limiter} percent`"
87
93
  />
88
94
  </div>
@@ -0,0 +1,162 @@
1
+ <script setup lang="ts">
2
+ import { computed, ref } from 'vue'
3
+
4
+ import { GhostButton, GhostCard, GhostSlider } from '@ghostvue/themes'
5
+
6
+ const MIN_PRICE = 40
7
+ const MAX_PRICE = 400
8
+
9
+ const stays = [
10
+ { name: 'Harbor loft', price: 65 },
11
+ { name: 'Garden studio', price: 90 },
12
+ { name: 'Old town flat', price: 120 },
13
+ { name: 'Canal house', price: 155 },
14
+ { name: 'Hillside cabin', price: 180 },
15
+ { name: 'Rooftop suite', price: 240 },
16
+ { name: 'Lakeside villa', price: 320 },
17
+ { name: 'Vineyard estate', price: 395 },
18
+ ] as const
19
+
20
+ const price = ref<[number, number]>([80, 240])
21
+
22
+ const usd = new Intl.NumberFormat('en-US', {
23
+ style: 'currency',
24
+ currency: 'USD',
25
+ maximumFractionDigits: 0,
26
+ })
27
+
28
+ const priceLabel = computed(
29
+ () =>
30
+ `${usd.format(price.value[0])} – ${usd.format(price.value[1])} per night`,
31
+ )
32
+ const matches = computed(() =>
33
+ stays.filter(
34
+ (stay) => stay.price >= price.value[0] && stay.price <= price.value[1],
35
+ ),
36
+ )
37
+ const isFullRange = computed(
38
+ () => price.value[0] === MIN_PRICE && price.value[1] === MAX_PRICE,
39
+ )
40
+
41
+ function showAnyPrice(): void {
42
+ price.value = [MIN_PRICE, MAX_PRICE]
43
+ }
44
+ </script>
45
+
46
+ <template>
47
+ <section class="price-filter" aria-labelledby="price-filter-title">
48
+ <GhostCard>
49
+ <template #header>
50
+ <h2 id="price-filter-title" class="price-filter__title">
51
+ Filter stays
52
+ </h2>
53
+ </template>
54
+
55
+ <div class="price-filter__row">
56
+ <div class="price-filter__row-head">
57
+ <!--
58
+ Range thumbs take their names from this label plus "minimum" and
59
+ "maximum". aria-valuetext is single-thumb only, so the label
60
+ carries the unit and the visible readout spells out the range.
61
+ -->
62
+ <span id="price-filter-label" class="price-filter__label">
63
+ Nightly price (USD)
64
+ </span>
65
+ <span class="price-filter__value">{{ priceLabel }}</span>
66
+ </div>
67
+ <!-- The root defaults to 12rem; an inline style object widens it to the card. -->
68
+ <GhostSlider
69
+ v-model="price"
70
+ range
71
+ :min="MIN_PRICE"
72
+ :max="MAX_PRICE"
73
+ :step="10"
74
+ name="price-min"
75
+ name-max="price-max"
76
+ aria-labelledby="price-filter-label"
77
+ :style="{ inlineSize: '100%' }"
78
+ />
79
+ <div class="price-filter__scale" aria-hidden="true">
80
+ <span>{{ usd.format(MIN_PRICE) }}</span>
81
+ <span>{{ usd.format(MAX_PRICE) }}</span>
82
+ </div>
83
+ </div>
84
+
85
+ <template #footer>
86
+ <div class="price-filter__footer">
87
+ <p class="price-filter__count" role="status">
88
+ {{ matches.length }} of {{ stays.length }} stays match
89
+ </p>
90
+ <GhostButton
91
+ type="button"
92
+ variant="ghost"
93
+ tone="neutral"
94
+ size="sm"
95
+ :disabled="isFullRange"
96
+ @click="showAnyPrice"
97
+ >
98
+ Any price
99
+ </GhostButton>
100
+ </div>
101
+ </template>
102
+ </GhostCard>
103
+ </section>
104
+ </template>
105
+
106
+ <style scoped>
107
+ .price-filter {
108
+ max-inline-size: 30rem;
109
+ }
110
+
111
+ .price-filter__title {
112
+ color: var(--ghost-text-default);
113
+ font-size: var(--ghost-type-size-lg);
114
+ font-weight: var(--ghost-type-weight-semibold);
115
+ line-height: var(--ghost-type-line-tight);
116
+ margin: 0;
117
+ }
118
+
119
+ .price-filter__row {
120
+ display: grid;
121
+ gap: var(--ghost-space-gap-sm);
122
+ }
123
+
124
+ .price-filter__row-head,
125
+ .price-filter__footer {
126
+ align-items: center;
127
+ display: flex;
128
+ flex-wrap: wrap;
129
+ gap: var(--ghost-space-gap-sm);
130
+ justify-content: space-between;
131
+ }
132
+
133
+ .price-filter__label {
134
+ color: var(--ghost-text-default);
135
+ font-size: var(--ghost-type-size-sm);
136
+ font-weight: var(--ghost-type-weight-medium);
137
+ line-height: var(--ghost-type-line-snug);
138
+ }
139
+
140
+ .price-filter__value {
141
+ color: var(--ghost-text-default);
142
+ font-size: var(--ghost-type-size-sm);
143
+ font-variant-numeric: tabular-nums;
144
+ line-height: var(--ghost-type-line-snug);
145
+ }
146
+
147
+ .price-filter__scale {
148
+ color: var(--ghost-text-muted);
149
+ display: flex;
150
+ font-size: var(--ghost-type-size-xs);
151
+ font-variant-numeric: tabular-nums;
152
+ justify-content: space-between;
153
+ line-height: var(--ghost-type-line-snug);
154
+ }
155
+
156
+ .price-filter__count {
157
+ color: var(--ghost-text-muted);
158
+ font-size: var(--ghost-type-size-sm);
159
+ line-height: var(--ghost-type-line-snug);
160
+ margin: 0;
161
+ }
162
+ </style>
@@ -10,12 +10,13 @@ const level = ref(60)
10
10
  <GhostSlider
11
11
  v-model="level"
12
12
  orientation="vertical"
13
- aria-label="Gain"
13
+ aria-label="Channel gain"
14
14
  :min="0"
15
15
  :max="100"
16
+ :value-text="`${level} percent`"
16
17
  />
17
18
  <!-- Fixed line-height avoids subpixel line-box drift in visual snapshots. -->
18
19
  <p style="margin: 0; line-height: var(--ghost-font-line-body, 1.25rem)">
19
- Level {{ level }}
20
+ Gain {{ level }}%
20
21
  </p>
21
22
  </template>
@@ -10,7 +10,8 @@ import {
10
10
 
11
11
  const syncing = ref(true)
12
12
 
13
- function toggleSync(): void {
13
+ // Stand-in for the sync job reporting back, so each phase can be inspected.
14
+ function nextStep(): void {
14
15
  syncing.value = !syncing.value
15
16
  }
16
17
  </script>
@@ -20,16 +21,18 @@ function toggleSync(): void {
20
21
  <GhostCard>
21
22
  <div class="spinner-showcase__row">
22
23
  <div class="spinner-showcase__status">
23
- <GhostSpinner
24
- v-if="syncing"
25
- size="sm"
26
- label="Syncing registry manifests"
27
- />
24
+ <!--
25
+ The status line below announces both phases, so the spinner is
26
+ decorative here. Without a status line of your own, drop
27
+ aria-hidden and pass a label instead.
28
+ -->
29
+ <GhostSpinner v-if="syncing" size="sm" aria-hidden="true" />
28
30
  <GhostBadge v-else tone="accent" variant="soft" size="sm">
29
31
  Up to date
30
32
  </GhostBadge>
31
33
  <div class="spinner-showcase__copy">
32
- <span class="spinner-showcase__title">
34
+ <!-- One mounted status region: its text changes in place. -->
35
+ <span class="spinner-showcase__title" role="status">
33
36
  {{
34
37
  syncing
35
38
  ? 'Syncing registry manifests…'
@@ -40,7 +43,7 @@ function toggleSync(): void {
40
43
  {{
41
44
  syncing
42
45
  ? 'Checking 48 component contracts against dist exports'
43
- : 'Last verified at 10:42 · 0 drift detected'
46
+ : 'Verified 48 contracts at 10:42 · no drift detected'
44
47
  }}
45
48
  </span>
46
49
  </div>
@@ -50,9 +53,9 @@ function toggleSync(): void {
50
53
  size="sm"
51
54
  variant="outline"
52
55
  tone="neutral"
53
- @click="toggleSync"
56
+ @click="nextStep"
54
57
  >
55
- {{ syncing ? 'Mark complete' : 'Re-run sync' }}
58
+ {{ syncing ? 'Finish sync' : 'Sync again' }}
56
59
  </GhostButton>
57
60
  </div>
58
61
  </GhostCard>
@@ -1,24 +1,56 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue'
2
+ import { onMounted, ref, useId } from 'vue'
3
3
 
4
4
  import { GhostButton, GhostSwitch } from '@ghostvue/themes'
5
5
 
6
- const submitted = ref('')
6
+ const digestId = useId()
7
+ const storageKey = 'ghostvue-example:daily-digest'
8
+ const enabled = ref(true)
9
+ const status = ref('')
7
10
 
8
- function onSubmit(event: Event): void {
9
- event.preventDefault()
10
- const data = new FormData(event.target as HTMLFormElement)
11
- const digest = data.get('digest')
12
- submitted.value = typeof digest === 'string' ? digest : 'off'
11
+ function describeSaved(value: boolean): string {
12
+ return value ? 'Daily digest saved: On.' : 'Daily digest saved: Off.'
13
+ }
14
+
15
+ onMounted(() => {
16
+ try {
17
+ const saved = localStorage.getItem(storageKey)
18
+ if (saved === 'on' || saved === 'off') {
19
+ enabled.value = saved === 'on'
20
+ status.value = describeSaved(enabled.value)
21
+ }
22
+ } catch {
23
+ status.value = 'Browser storage is unavailable.'
24
+ }
25
+ })
26
+
27
+ function save(event: SubmitEvent): void {
28
+ const form = event.currentTarget
29
+ if (!(form instanceof HTMLFormElement)) return
30
+
31
+ // An unchecked switch contributes no entry to the native form.
32
+ const next = new FormData(form).get('digest') === 'daily'
33
+ try {
34
+ localStorage.setItem(storageKey, next ? 'on' : 'off')
35
+ status.value = describeSaved(next)
36
+ } catch {
37
+ status.value = 'Browser storage is unavailable.'
38
+ }
13
39
  }
14
40
  </script>
15
41
 
16
42
  <template>
17
- <form @submit="onSubmit">
18
- <label for="digest">Daily digest</label>
19
- <GhostSwitch id="digest" name="digest" value="daily" default-value />
43
+ <form @submit.prevent="save">
44
+ <label :for="digestId">Daily digest</label>
45
+ <GhostSwitch
46
+ :id="digestId"
47
+ v-model="enabled"
48
+ name="digest"
49
+ value="daily"
50
+ default-value
51
+ />
20
52
  <GhostButton type="submit">Save</GhostButton>
21
53
  <GhostButton type="reset" variant="ghost" tone="neutral">Reset</GhostButton>
22
- <p v-if="submitted">Submitted: {{ submitted }}</p>
54
+ <output :for="digestId">{{ status }}</output>
23
55
  </form>
24
56
  </template>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { GhostTable } from '@ghostvue/themes'
2
3
  import {
3
- GhostTable,
4
4
  GhostTableBody,
5
5
  GhostTableCaption,
6
6
  GhostTableCell,
@@ -9,7 +9,7 @@ import {
9
9
  GhostTableRow,
10
10
  } from '@ghostvue/vue'
11
11
 
12
- // Deterministic local data with long values, so the table is wider than its frame.
12
+ // Deterministic local data with long values, so the table is wider than a phone.
13
13
  const deployments = [
14
14
  {
15
15
  service: 'billing-api',
@@ -25,16 +25,26 @@ const deployments = [
25
25
  region: 'us-east-2',
26
26
  updated: '2026-11-17',
27
27
  },
28
+ {
29
+ service: 'webhook-relay',
30
+ route: 'POST /v1/endpoints/{endpointId}/deliveries/retry',
31
+ owner: 'Integrations',
32
+ region: 'ap-southeast-1',
33
+ updated: '2026-11-16',
34
+ },
28
35
  ] as const
29
36
  </script>
30
37
 
31
38
  <template>
32
39
  <!--
33
- The frame is narrower than the table on purpose, so the scroll region
34
- always overflows. The caption names the region (aria-labelledby).
40
+ Routes and regions read badly when they wrap, so the cells keep one line
41
+ and the table grows wider than the frame. contain-horizontal moves that
42
+ overflow into a keyboard-focusable scroll region; the page never scrolls
43
+ sideways. With no scroll-label, the visible caption names the region
44
+ (aria-labelledby), so both read "Recent deployments".
35
45
  -->
36
46
  <div class="deployments">
37
- <GhostTable contain-horizontal data-testid="table-wide">
47
+ <GhostTable contain-horizontal>
38
48
  <GhostTableCaption>Recent deployments</GhostTableCaption>
39
49
  <GhostTableHead>
40
50
  <GhostTableRow>
@@ -47,11 +57,15 @@ const deployments = [
47
57
  </GhostTableHead>
48
58
  <GhostTableBody>
49
59
  <GhostTableRow v-for="row in deployments" :key="row.service">
50
- <GhostTableCell>{{ row.service }}</GhostTableCell>
60
+ <GhostTableHeaderCell scope="row">{{
61
+ row.service
62
+ }}</GhostTableHeaderCell>
51
63
  <GhostTableCell>{{ row.route }}</GhostTableCell>
52
64
  <GhostTableCell>{{ row.owner }}</GhostTableCell>
53
65
  <GhostTableCell>{{ row.region }}</GhostTableCell>
54
- <GhostTableCell>{{ row.updated }}</GhostTableCell>
66
+ <GhostTableCell class="deployments__date">{{
67
+ row.updated
68
+ }}</GhostTableCell>
55
69
  </GhostTableRow>
56
70
  </GhostTableBody>
57
71
  </GhostTable>
@@ -61,13 +75,11 @@ const deployments = [
61
75
  <style scoped>
62
76
  /* Values stay on one line (inherited by the cells); the region scrolls. */
63
77
  .deployments {
64
- inline-size: 20rem;
65
- max-inline-size: 100%;
78
+ max-inline-size: 40rem;
66
79
  white-space: nowrap;
67
80
  }
68
81
 
69
- /* Native captions center across the full table width; keep it in view. */
70
- .deployments :deep(caption) {
71
- text-align: start;
82
+ .deployments__date {
83
+ font-variant-numeric: var(--ghost-type-numeric-tabular);
72
84
  }
73
85
  </style>
@@ -1,31 +1,130 @@
1
1
  <script setup lang="ts">
2
+ import { GhostBadge, GhostTable } from '@ghostvue/themes'
2
3
  import {
3
- GhostTable,
4
4
  GhostTableBody,
5
+ GhostTableCaption,
5
6
  GhostTableCell,
6
7
  GhostTableHead,
7
8
  GhostTableHeaderCell,
8
9
  GhostTableRow,
9
10
  } from '@ghostvue/vue'
11
+
12
+ type Health = 'healthy' | 'degraded' | 'down'
13
+
14
+ interface Service {
15
+ name: string
16
+ health: Health
17
+ uptime: string
18
+ note: string
19
+ }
20
+
21
+ // Deterministic local data: no clock or network.
22
+ const services: readonly Service[] = [
23
+ {
24
+ name: 'Checkout API',
25
+ health: 'healthy',
26
+ uptime: '99.98%',
27
+ note: 'No incidents in the last 30 days.',
28
+ },
29
+ {
30
+ name: 'Search',
31
+ health: 'degraded',
32
+ uptime: '99.71%',
33
+ note: 'Index rebuild in eu-west-1 is slowing queries until 18:00 UTC.',
34
+ },
35
+ {
36
+ name: 'Webhooks',
37
+ health: 'down',
38
+ uptime: '98.42%',
39
+ note: 'Deliveries are queued. Retries resume when the broker recovers.',
40
+ },
41
+ ]
42
+
43
+ const healthLabel: Record<Health, string> = {
44
+ healthy: 'Healthy',
45
+ degraded: 'Degraded',
46
+ down: 'Down',
47
+ }
48
+
49
+ // Badge tone is a color intent, not a status vocabulary: map it here.
50
+ const healthTone: Record<Health, 'accent' | 'neutral' | 'danger'> = {
51
+ healthy: 'accent',
52
+ degraded: 'neutral',
53
+ down: 'danger',
54
+ }
10
55
  </script>
11
56
 
12
57
  <template>
13
- <GhostTable>
14
- <GhostTableHead>
15
- <GhostTableRow>
16
- <GhostTableHeaderCell scope="col">Metric</GhostTableHeaderCell>
17
- <GhostTableHeaderCell scope="col">Value</GhostTableHeaderCell>
18
- </GhostTableRow>
19
- </GhostTableHead>
20
- <GhostTableBody>
21
- <GhostTableRow>
22
- <GhostTableHeaderCell scope="row">Uptime</GhostTableHeaderCell>
23
- <GhostTableCell>99.97%</GhostTableCell>
24
- </GhostTableRow>
25
- <GhostTableRow>
26
- <GhostTableHeaderCell scope="row">Latency p95</GhostTableHeaderCell>
27
- <GhostTableCell>42 ms</GhostTableCell>
28
- </GhostTableRow>
29
- </GhostTableBody>
30
- </GhostTable>
58
+ <!--
59
+ Each service name is a row header (scope="row"), so a screen reader
60
+ announces "Search" with that row's status and uptime instead of reading
61
+ bare values. Three columns fit a 320px phone without a scroll region.
62
+ -->
63
+ <div class="service-health">
64
+ <GhostTable>
65
+ <GhostTableCaption>Service health, last 30 days</GhostTableCaption>
66
+ <GhostTableHead>
67
+ <GhostTableRow>
68
+ <GhostTableHeaderCell scope="col">Service</GhostTableHeaderCell>
69
+ <GhostTableHeaderCell scope="col">Status</GhostTableHeaderCell>
70
+ <GhostTableHeaderCell scope="col" class="service-health__number">
71
+ Uptime
72
+ </GhostTableHeaderCell>
73
+ </GhostTableRow>
74
+ </GhostTableHead>
75
+ <GhostTableBody>
76
+ <GhostTableRow v-for="service in services" :key="service.name">
77
+ <GhostTableHeaderCell scope="row">
78
+ {{ service.name }}
79
+ </GhostTableHeaderCell>
80
+ <GhostTableCell>
81
+ <span class="service-health__status">
82
+ <GhostBadge :tone="healthTone[service.health]">
83
+ {{ healthLabel[service.health] }}
84
+ </GhostBadge>
85
+ <span class="service-health__note">{{ service.note }}</span>
86
+ </span>
87
+ </GhostTableCell>
88
+ <GhostTableCell class="service-health__number">
89
+ {{ service.uptime }}
90
+ </GhostTableCell>
91
+ </GhostTableRow>
92
+ </GhostTableBody>
93
+ </GhostTable>
94
+ </div>
31
95
  </template>
96
+
97
+ <style scoped>
98
+ /* A summary table; the recipe fills whatever width it is given. */
99
+ .service-health {
100
+ max-inline-size: 36rem;
101
+ }
102
+
103
+ /*
104
+ * Notes wrap, so rows grow to several lines on a phone. One step down the
105
+ * spacing scale (--ghost-space-inset-xs) keeps those rows short and lets
106
+ * three columns fit a 320px screen; every other recipe value stays as
107
+ * shipped. `:deep()` because the cells render inside GhostTable.
108
+ */
109
+ .service-health :deep(:is(.ghost-table-cell, .ghost-table-header-cell)) {
110
+ padding: var(--ghost-space-inset-xs);
111
+ }
112
+
113
+ /* Numbers align on the end edge and use tabular figures so digits line up. */
114
+ .service-health__number {
115
+ font-variant-numeric: var(--ghost-type-numeric-tabular);
116
+ text-align: end;
117
+ white-space: nowrap;
118
+ }
119
+
120
+ /* The badge sits above its note; the note wraps inside the cell. */
121
+ .service-health__status {
122
+ display: grid;
123
+ gap: var(--ghost-space-gap-xs);
124
+ justify-items: start;
125
+ }
126
+
127
+ .service-health__note {
128
+ color: var(--ghost-text-muted);
129
+ }
130
+ </style>
@@ -0,0 +1,43 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ GhostTabs,
4
+ GhostTabsContent,
5
+ GhostTabsList,
6
+ GhostTabsTrigger,
7
+ } from '@ghostvue/themes'
8
+ </script>
9
+
10
+ <template>
11
+ <GhostTabs
12
+ orientation="vertical"
13
+ activation-mode="manual"
14
+ default-value="overview"
15
+ >
16
+ <div class="review-sections">
17
+ <GhostTabsList aria-label="Release review">
18
+ <GhostTabsTrigger value="overview">Overview</GhostTabsTrigger>
19
+ <GhostTabsTrigger value="checks">Release checks</GhostTabsTrigger>
20
+ <GhostTabsTrigger value="changes">Recent changes</GhostTabsTrigger>
21
+ </GhostTabsList>
22
+ <GhostTabsContent value="overview">
23
+ Review the release candidate before publishing.
24
+ </GhostTabsContent>
25
+ <GhostTabsContent value="checks">
26
+ Two checks remain before this release can be approved.
27
+ </GhostTabsContent>
28
+ <GhostTabsContent value="changes">
29
+ The candidate includes updated onboarding translations.
30
+ </GhostTabsContent>
31
+ </div>
32
+ </GhostTabs>
33
+ </template>
34
+
35
+ <style scoped>
36
+ .review-sections {
37
+ display: grid;
38
+ gap: var(--ghost-space-gap-md);
39
+ /* The renderless root leaves the relationship of list and panel to the app. */
40
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
41
+ align-items: start;
42
+ }
43
+ </style>