@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.
- package/dist/assets/bundle.json +2 -2
- package/dist/assets/component-exports.json +1 -0
- package/dist/assets/docs/pages.json +1 -1
- package/dist/assets/examples/catalog.json +1 -1
- package/dist/assets/examples/sources/accordion/billing-faq.vue +123 -0
- package/dist/assets/examples/sources/avatar/team-roster.vue +69 -5
- package/dist/assets/examples/sources/badge/release-channels.vue +1 -1
- package/dist/assets/examples/sources/breadcrumb/basic.vue +60 -15
- package/dist/assets/examples/sources/button/refresh-status.vue +95 -0
- package/dist/assets/examples/sources/calendar/availability.vue +235 -0
- package/dist/assets/examples/sources/calendar/office-locale.vue +197 -0
- package/dist/assets/examples/sources/card/project-summary.vue +38 -3
- package/dist/assets/examples/sources/checkbox-group/basic.vue +56 -0
- package/dist/assets/examples/sources/checkbox-group/field.vue +73 -0
- package/dist/assets/examples/sources/checkbox-group/form.vue +100 -0
- package/dist/assets/examples/sources/checkbox-group/headless.vue +68 -0
- package/dist/assets/examples/sources/checkbox-group/notification-preferences.vue +380 -0
- package/dist/assets/examples/sources/collapsible/shipment-history.vue +135 -0
- package/dist/assets/examples/sources/combobox/review-request-form.vue +415 -0
- package/dist/assets/examples/sources/command-palette/async.vue +60 -12
- package/dist/assets/examples/sources/command-palette/basic.vue +123 -2
- package/dist/assets/examples/sources/command-palette/shortcut.vue +132 -5
- package/dist/assets/examples/sources/command-palette/themed.vue +44 -4
- package/dist/assets/examples/sources/command-palette/virtualized.vue +124 -3
- package/dist/assets/examples/sources/context-menu/themed.vue +81 -26
- package/dist/assets/examples/sources/data-table/themed-invoices.vue +219 -44
- package/dist/assets/examples/sources/date-picker/controlled.vue +8 -293
- package/dist/assets/examples/sources/date-picker/custom-format.vue +6 -295
- package/dist/assets/examples/sources/date-picker/nested-dialog.vue +28 -350
- package/dist/assets/examples/sources/date-picker/rtl.vue +5 -294
- package/dist/assets/examples/sources/date-picker/themed.vue +2 -2
- package/dist/assets/examples/sources/date-picker/validation.vue +8 -294
- package/dist/assets/examples/sources/dropdown-menu/nested-export.vue +56 -0
- package/dist/assets/examples/sources/empty-state/search-results.vue +26 -1
- package/dist/assets/examples/sources/field/billing-address-headless.vue +93 -0
- package/dist/assets/examples/sources/field/billing-address.vue +192 -0
- package/dist/assets/examples/sources/field/checkbox.vue +10 -2
- package/dist/assets/examples/sources/field/themed.vue +12 -11
- package/dist/assets/examples/sources/file-upload/asset-submission.vue +96 -36
- package/dist/assets/examples/sources/form/async-validation.vue +180 -0
- package/dist/assets/examples/sources/form/composable.vue +146 -0
- package/dist/assets/examples/sources/form/nested-webhooks.vue +233 -0
- package/dist/assets/examples/sources/form/profile-schema.vue +376 -0
- package/dist/assets/examples/sources/inline-alert/billing-notices.vue +26 -5
- package/dist/assets/examples/sources/inline-alert/feed-status.vue +229 -0
- package/dist/assets/examples/sources/input/clearable-search-headless.vue +162 -0
- package/dist/assets/examples/sources/input/clearable-search.vue +225 -0
- package/dist/assets/examples/sources/input/unit-suffix.vue +109 -0
- package/dist/assets/examples/sources/interactive-surface/basic.vue +20 -8
- package/dist/assets/examples/sources/interactive-surface/feature-tiles.vue +42 -8
- package/dist/assets/examples/sources/kbd/command-shortcuts.vue +0 -1
- package/dist/assets/examples/sources/link/documentation-footer.vue +11 -4
- package/dist/assets/examples/sources/link/router.vue +9 -5
- package/dist/assets/examples/sources/menubar/themed.vue +46 -10
- package/dist/assets/examples/sources/number-input/order-limits.vue +5 -0
- package/dist/assets/examples/sources/number-input/themed.vue +12 -6
- package/dist/assets/examples/sources/number-input/workshop-booking.vue +207 -0
- package/dist/assets/examples/sources/pagination/controlled.vue +83 -18
- package/dist/assets/examples/sources/pagination/ellipsis.vue +44 -14
- package/dist/assets/examples/sources/pagination/themed.vue +161 -21
- package/dist/assets/examples/sources/presence/basic.vue +81 -0
- package/dist/assets/examples/sources/presence/portal.vue +92 -0
- package/dist/assets/examples/sources/progress/report-export.vue +160 -0
- package/dist/assets/examples/sources/scroll-area/activity-feed.vue +0 -1
- package/dist/assets/examples/sources/scroll-area/horizontal.vue +169 -14
- package/dist/assets/examples/sources/scroll-area/themed.vue +42 -3
- package/dist/assets/examples/sources/scroll-spy/themed.vue +180 -31
- package/dist/assets/examples/sources/select/alert-routing-form.vue +356 -0
- package/dist/assets/examples/sources/select/multiple-form.vue +201 -0
- package/dist/assets/examples/sources/select/multiple-labels.vue +142 -0
- package/dist/assets/examples/sources/skeleton/profile-loading.vue +28 -4
- package/dist/assets/examples/sources/slider/audio-mixer.vue +8 -2
- package/dist/assets/examples/sources/slider/price-filter.vue +162 -0
- package/dist/assets/examples/sources/slider/vertical.vue +3 -2
- package/dist/assets/examples/sources/spinner/sync-status.vue +13 -10
- package/dist/assets/examples/sources/switch/form.vue +43 -11
- package/dist/assets/examples/sources/table/contain-horizontal.vue +24 -12
- package/dist/assets/examples/sources/table/row-headers.vue +118 -19
- package/dist/assets/examples/sources/tabs/review-sections.vue +43 -0
- package/dist/assets/examples/sources/tags-input/headless-field.vue +31 -0
- package/dist/assets/examples/sources/tags-input/project-labels.vue +64 -0
- package/dist/assets/examples/sources/tags-input/read-only.vue +12 -0
- package/dist/assets/examples/sources/toast/themed.vue +42 -19
- package/dist/assets/examples/sources/toolbar/themed.vue +22 -4
- package/dist/assets/examples/sources/tooltip/themed.vue +12 -1
- package/dist/assets/examples/sources/tree/themed.vue +70 -17
- package/dist/assets/manifests/themes/ghost-accordion.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-button.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-calendar.manifest.json +3 -1
- package/dist/assets/manifests/themes/ghost-checkbox-group.manifest.json +90 -0
- package/dist/assets/manifests/themes/ghost-collapsible.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-combobox.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-command-palette.manifest.json +2 -1
- package/dist/assets/manifests/themes/ghost-date-picker.manifest.json +5 -0
- package/dist/assets/manifests/themes/ghost-dropdown-menu.manifest.json +9 -0
- package/dist/assets/manifests/themes/ghost-field.manifest.json +10 -2
- package/dist/assets/manifests/themes/ghost-inline-alert.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-input.manifest.json +3 -1
- package/dist/assets/manifests/themes/ghost-link.manifest.json +2 -1
- package/dist/assets/manifests/themes/ghost-number-input.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-pagination.manifest.json +6 -2
- package/dist/assets/manifests/themes/ghost-progress.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-radio-group-item.manifest.json +63 -0
- package/dist/assets/manifests/themes/ghost-scroll-area.manifest.json +12 -2
- package/dist/assets/manifests/themes/ghost-select.manifest.json +3 -0
- package/dist/assets/manifests/themes/ghost-slider.manifest.json +1 -0
- package/dist/assets/manifests/themes/ghost-table.manifest.json +2 -1
- package/dist/assets/manifests/themes/ghost-tags-input.manifest.json +255 -0
- package/dist/assets/manifests/vue/ghost-checkbox-group.manifest.json +173 -0
- package/dist/assets/manifests/vue/ghost-command-palette-content.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-command-palette-overlay.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-command-palette.manifest.json +0 -1
- package/dist/assets/manifests/vue/ghost-context-menu-content.manifest.json +3 -3
- package/dist/assets/manifests/vue/ghost-context-menu.manifest.json +1 -1
- package/dist/assets/manifests/vue/ghost-data-table-preset.manifest.json +1 -1
- package/dist/assets/manifests/vue/ghost-data-table-table.manifest.json +1 -1
- package/dist/assets/manifests/vue/ghost-data-table.manifest.json +99 -2
- package/dist/assets/manifests/vue/ghost-date-picker-content.manifest.json +12 -3
- package/dist/assets/manifests/vue/ghost-date-picker.manifest.json +1 -6
- package/dist/assets/manifests/vue/ghost-dialog-content.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-dialog-overlay.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-drawer-content.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-drawer-overlay.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-field-error.manifest.json +12 -1
- package/dist/assets/manifests/vue/ghost-field.manifest.json +35 -3
- package/dist/assets/manifests/vue/ghost-form.manifest.json +221 -0
- package/dist/assets/manifests/vue/ghost-hover-card-content.manifest.json +12 -3
- package/dist/assets/manifests/vue/ghost-input.manifest.json +2 -1
- package/dist/assets/manifests/vue/ghost-link.manifest.json +1 -2
- package/dist/assets/manifests/vue/ghost-menubar-content.manifest.json +3 -3
- package/dist/assets/manifests/vue/ghost-menubar.manifest.json +4 -4
- package/dist/assets/manifests/vue/ghost-pagination.manifest.json +0 -2
- package/dist/assets/manifests/vue/ghost-popover-content.manifest.json +6 -2
- package/dist/assets/manifests/vue/ghost-presence.manifest.json +96 -0
- package/dist/assets/manifests/vue/ghost-scroll-area.manifest.json +0 -1
- package/dist/assets/manifests/vue/ghost-select-content.manifest.json +6 -1
- package/dist/assets/manifests/vue/ghost-select-group.manifest.json +6 -1
- package/dist/assets/manifests/vue/ghost-select-label.manifest.json +6 -1
- package/dist/assets/manifests/vue/ghost-select-option.manifest.json +6 -1
- package/dist/assets/manifests/vue/ghost-select-trigger.manifest.json +6 -1
- package/dist/assets/manifests/vue/ghost-select-value.manifest.json +18 -2
- package/dist/assets/manifests/vue/ghost-select.manifest.json +18 -6
- package/dist/assets/manifests/vue/ghost-submenu-content.manifest.json +168 -0
- package/dist/assets/manifests/vue/ghost-submenu-trigger.manifest.json +102 -0
- package/dist/assets/manifests/vue/ghost-submenu.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-table.manifest.json +0 -2
- package/dist/assets/manifests/vue/ghost-tabs.manifest.json +2 -1
- package/dist/assets/manifests/vue/ghost-tags-input.manifest.json +260 -0
- package/dist/assets/tokens.json +15 -0
- package/dist/components.d.ts +5 -0
- package/dist/components.js +80 -11
- package/package.json +1 -1
|
@@ -11,7 +11,9 @@ import {
|
|
|
11
11
|
|
|
12
12
|
const loading = ref(true)
|
|
13
13
|
|
|
14
|
-
|
|
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
|
-
<
|
|
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="
|
|
41
|
+
@click="nextStep"
|
|
30
42
|
>
|
|
31
|
-
{{ 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
|
-
:
|
|
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="
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label
|
|
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
|
-
|
|
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
|
-
: '
|
|
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="
|
|
56
|
+
@click="nextStep"
|
|
54
57
|
>
|
|
55
|
-
{{ syncing ? '
|
|
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
|
|
6
|
+
const digestId = useId()
|
|
7
|
+
const storageKey = 'ghostvue-example:daily-digest'
|
|
8
|
+
const enabled = ref(true)
|
|
9
|
+
const status = ref('')
|
|
7
10
|
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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="
|
|
18
|
-
<label for="
|
|
19
|
-
<GhostSwitch
|
|
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
|
-
<
|
|
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
|
|
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
|
-
|
|
34
|
-
|
|
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
|
|
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
|
-
<
|
|
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>{{
|
|
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:
|
|
65
|
-
max-inline-size: 100%;
|
|
78
|
+
max-inline-size: 40rem;
|
|
66
79
|
white-space: nowrap;
|
|
67
80
|
}
|
|
68
81
|
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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>
|