@ghostvue/mcp 0.0.0-stage → 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/LICENSE +22 -0
- package/README.md +97 -2
- package/dist/assets/bundle.json +6 -0
- package/dist/assets/component-exports.json +1 -0
- package/dist/assets/docs/pages.json +1 -0
- package/dist/assets/examples/catalog.json +1 -0
- package/dist/assets/examples/sources/accordion/basic.vue +42 -0
- package/dist/assets/examples/sources/accordion/billing-faq.vue +123 -0
- package/dist/assets/examples/sources/accordion/deployment-faq.vue +169 -0
- package/dist/assets/examples/sources/accordion/navigation.vue +55 -0
- package/dist/assets/examples/sources/accordion/themed.vue +47 -0
- package/dist/assets/examples/sources/avatar/basic.vue +7 -0
- package/dist/assets/examples/sources/avatar/composable.vue +11 -0
- package/dist/assets/examples/sources/avatar/fallback.vue +11 -0
- package/dist/assets/examples/sources/avatar/image.vue +13 -0
- package/dist/assets/examples/sources/avatar/team-roster.vue +190 -0
- package/dist/assets/examples/sources/avatar/themed.vue +20 -0
- package/dist/assets/examples/sources/badge/basic.vue +7 -0
- package/dist/assets/examples/sources/badge/composable.vue +9 -0
- package/dist/assets/examples/sources/badge/icon.vue +18 -0
- package/dist/assets/examples/sources/badge/release-channels.vue +120 -0
- package/dist/assets/examples/sources/badge/table.vue +36 -0
- package/dist/assets/examples/sources/badge/themed.vue +7 -0
- package/dist/assets/examples/sources/breadcrumb/basic.vue +73 -0
- package/dist/assets/examples/sources/breadcrumb/collapsed.vue +37 -0
- package/dist/assets/examples/sources/breadcrumb/workspace-trail.vue +90 -0
- package/dist/assets/examples/sources/button/action-bar.vue +124 -0
- package/dist/assets/examples/sources/button/basic.vue +15 -0
- package/dist/assets/examples/sources/button/composable.vue +24 -0
- package/dist/assets/examples/sources/button/configured.vue +36 -0
- package/dist/assets/examples/sources/button/icon-only.vue +22 -0
- package/dist/assets/examples/sources/button/loading.vue +26 -0
- package/dist/assets/examples/sources/button/marked-parts.vue +56 -0
- package/dist/assets/examples/sources/button/ref.vue +16 -0
- package/dist/assets/examples/sources/button/refresh-status.vue +95 -0
- package/dist/assets/examples/sources/button/themed.vue +30 -0
- package/dist/assets/examples/sources/calendar/availability.vue +235 -0
- package/dist/assets/examples/sources/calendar/basic.vue +238 -0
- package/dist/assets/examples/sources/calendar/controlled.vue +246 -0
- package/dist/assets/examples/sources/calendar/locale.vue +239 -0
- package/dist/assets/examples/sources/calendar/office-locale.vue +197 -0
- package/dist/assets/examples/sources/calendar/range.vue +241 -0
- package/dist/assets/examples/sources/calendar/themed.vue +88 -0
- package/dist/assets/examples/sources/calendar/unselected.vue +229 -0
- package/dist/assets/examples/sources/card/actions.vue +15 -0
- package/dist/assets/examples/sources/card/basic.vue +17 -0
- package/dist/assets/examples/sources/card/composable.vue +12 -0
- package/dist/assets/examples/sources/card/interactive.vue +23 -0
- package/dist/assets/examples/sources/card/link.vue +19 -0
- package/dist/assets/examples/sources/card/project-summary.vue +168 -0
- package/dist/assets/examples/sources/card/themed.vue +48 -0
- package/dist/assets/examples/sources/checkbox/basic.vue +22 -0
- package/dist/assets/examples/sources/checkbox/composable.vue +28 -0
- package/dist/assets/examples/sources/checkbox/indeterminate.vue +52 -0
- package/dist/assets/examples/sources/checkbox/notification-preferences.vue +360 -0
- package/dist/assets/examples/sources/checkbox/ref.vue +35 -0
- package/dist/assets/examples/sources/checkbox/themed.vue +111 -0
- 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/basic.vue +18 -0
- package/dist/assets/examples/sources/collapsible/release-notes.vue +136 -0
- package/dist/assets/examples/sources/collapsible/shipment-history.vue +135 -0
- package/dist/assets/examples/sources/collapsible/themed.vue +34 -0
- package/dist/assets/examples/sources/combobox/assignee-search.vue +544 -0
- package/dist/assets/examples/sources/combobox/async.vue +161 -0
- package/dist/assets/examples/sources/combobox/basic.vue +130 -0
- package/dist/assets/examples/sources/combobox/field.vue +137 -0
- package/dist/assets/examples/sources/combobox/form.vue +127 -0
- package/dist/assets/examples/sources/combobox/multi.vue +130 -0
- package/dist/assets/examples/sources/combobox/review-request-form.vue +415 -0
- package/dist/assets/examples/sources/combobox/themed.vue +34 -0
- package/dist/assets/examples/sources/command-palette/async.vue +152 -0
- package/dist/assets/examples/sources/command-palette/basic.vue +229 -0
- package/dist/assets/examples/sources/command-palette/shortcut.vue +214 -0
- package/dist/assets/examples/sources/command-palette/themed.vue +192 -0
- package/dist/assets/examples/sources/command-palette/virtualized.vue +196 -0
- package/dist/assets/examples/sources/context-menu/basic.vue +231 -0
- package/dist/assets/examples/sources/context-menu/themed.vue +299 -0
- package/dist/assets/examples/sources/data-table/basic-invoices.vue +52 -0
- package/dist/assets/examples/sources/data-table/full-invoices.vue +178 -0
- package/dist/assets/examples/sources/data-table/paginated-invoices.vue +172 -0
- package/dist/assets/examples/sources/data-table/preset-invoices.vue +90 -0
- package/dist/assets/examples/sources/data-table/server-invoices-router.vue +504 -0
- package/dist/assets/examples/sources/data-table/themed-invoices.vue +298 -0
- package/dist/assets/examples/sources/date-picker/basic.vue +330 -0
- package/dist/assets/examples/sources/date-picker/controlled.vue +61 -0
- package/dist/assets/examples/sources/date-picker/custom-format.vue +78 -0
- package/dist/assets/examples/sources/date-picker/nested-dialog.vue +63 -0
- package/dist/assets/examples/sources/date-picker/range.vue +345 -0
- package/dist/assets/examples/sources/date-picker/rtl.vue +46 -0
- package/dist/assets/examples/sources/date-picker/themed.vue +70 -0
- package/dist/assets/examples/sources/date-picker/validation.vue +118 -0
- package/dist/assets/examples/sources/dialog/alert.vue +74 -0
- package/dist/assets/examples/sources/dialog/basic.vue +25 -0
- package/dist/assets/examples/sources/dialog/edit-profile.vue +347 -0
- package/dist/assets/examples/sources/dialog/nested.vue +98 -0
- package/dist/assets/examples/sources/dialog/themed.vue +98 -0
- package/dist/assets/examples/sources/drawer/basic.vue +25 -0
- package/dist/assets/examples/sources/drawer/nested.vue +71 -0
- package/dist/assets/examples/sources/drawer/non-modal.vue +44 -0
- package/dist/assets/examples/sources/drawer/sides.vue +61 -0
- package/dist/assets/examples/sources/drawer/themed.vue +162 -0
- package/dist/assets/examples/sources/dropdown-menu/basic.vue +205 -0
- package/dist/assets/examples/sources/dropdown-menu/nested-export.vue +56 -0
- package/dist/assets/examples/sources/dropdown-menu/record-actions.vue +506 -0
- package/dist/assets/examples/sources/dropdown-menu/themed.vue +161 -0
- package/dist/assets/examples/sources/empty-state/basic.vue +12 -0
- package/dist/assets/examples/sources/empty-state/composable.vue +18 -0
- package/dist/assets/examples/sources/empty-state/filtered.vue +16 -0
- package/dist/assets/examples/sources/empty-state/search-results.vue +149 -0
- package/dist/assets/examples/sources/empty-state/table-cell.vue +29 -0
- package/dist/assets/examples/sources/empty-state/themed.vue +33 -0
- package/dist/assets/examples/sources/field/basic.vue +25 -0
- 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 +31 -0
- package/dist/assets/examples/sources/field/invalid.vue +27 -0
- package/dist/assets/examples/sources/field/profile-settings.vue +227 -0
- package/dist/assets/examples/sources/field/textarea.vue +25 -0
- package/dist/assets/examples/sources/field/themed.vue +28 -0
- package/dist/assets/examples/sources/file-upload/asset-submission.vue +261 -0
- package/dist/assets/examples/sources/file-upload/basic.vue +30 -0
- package/dist/assets/examples/sources/file-upload/button-only.vue +33 -0
- package/dist/assets/examples/sources/file-upload/controlled.vue +49 -0
- package/dist/assets/examples/sources/file-upload/duplicates.vue +46 -0
- package/dist/assets/examples/sources/file-upload/field.vue +67 -0
- package/dist/assets/examples/sources/file-upload/form.vue +60 -0
- package/dist/assets/examples/sources/file-upload/themed.vue +50 -0
- package/dist/assets/examples/sources/file-upload/validation.vue +47 -0
- 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/hover-card/basic.vue +121 -0
- package/dist/assets/examples/sources/hover-card/themed.vue +152 -0
- package/dist/assets/examples/sources/inline-alert/basic.vue +10 -0
- package/dist/assets/examples/sources/inline-alert/billing-notices.vue +162 -0
- package/dist/assets/examples/sources/inline-alert/composable.vue +19 -0
- package/dist/assets/examples/sources/inline-alert/feed-status.vue +229 -0
- package/dist/assets/examples/sources/inline-alert/live.vue +25 -0
- package/dist/assets/examples/sources/inline-alert/table-error.vue +21 -0
- package/dist/assets/examples/sources/inline-alert/themed.vue +13 -0
- package/dist/assets/examples/sources/input/account-details.vue +229 -0
- package/dist/assets/examples/sources/input/basic.vue +10 -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/composable.vue +12 -0
- package/dist/assets/examples/sources/input/ref.vue +34 -0
- package/dist/assets/examples/sources/input/search.vue +101 -0
- package/dist/assets/examples/sources/input/states.vue +96 -0
- package/dist/assets/examples/sources/input/themed.vue +55 -0
- package/dist/assets/examples/sources/input/unit-suffix.vue +109 -0
- package/dist/assets/examples/sources/interactive-surface/basic.vue +52 -0
- package/dist/assets/examples/sources/interactive-surface/button.vue +7 -0
- package/dist/assets/examples/sources/interactive-surface/composable.vue +34 -0
- package/dist/assets/examples/sources/interactive-surface/feature-tiles.vue +111 -0
- package/dist/assets/examples/sources/kbd/basic.vue +5 -0
- package/dist/assets/examples/sources/kbd/combination.vue +8 -0
- package/dist/assets/examples/sources/kbd/command-shortcuts.vue +97 -0
- package/dist/assets/examples/sources/kbd/composable.vue +17 -0
- package/dist/assets/examples/sources/kbd/platform.vue +14 -0
- package/dist/assets/examples/sources/kbd/themed.vue +25 -0
- package/dist/assets/examples/sources/link/basic.vue +7 -0
- package/dist/assets/examples/sources/link/button.vue +62 -0
- package/dist/assets/examples/sources/link/composable.vue +15 -0
- package/dist/assets/examples/sources/link/disabled.vue +9 -0
- package/dist/assets/examples/sources/link/documentation-footer.vue +103 -0
- package/dist/assets/examples/sources/link/external.vue +12 -0
- package/dist/assets/examples/sources/link/router.vue +26 -0
- package/dist/assets/examples/sources/link/themed.vue +21 -0
- package/dist/assets/examples/sources/menubar/basic.vue +208 -0
- package/dist/assets/examples/sources/menubar/themed.vue +231 -0
- package/dist/assets/examples/sources/number-input/basic.vue +20 -0
- package/dist/assets/examples/sources/number-input/bounds.vue +18 -0
- package/dist/assets/examples/sources/number-input/field.vue +34 -0
- package/dist/assets/examples/sources/number-input/form-locale.vue +29 -0
- package/dist/assets/examples/sources/number-input/order-limits.vue +226 -0
- package/dist/assets/examples/sources/number-input/ref.vue +26 -0
- package/dist/assets/examples/sources/number-input/themed.vue +26 -0
- package/dist/assets/examples/sources/number-input/workshop-booking.vue +207 -0
- package/dist/assets/examples/sources/pagination/basic.vue +54 -0
- package/dist/assets/examples/sources/pagination/controlled.vue +96 -0
- package/dist/assets/examples/sources/pagination/ellipsis.vue +59 -0
- package/dist/assets/examples/sources/pagination/themed.vue +192 -0
- package/dist/assets/examples/sources/popover/basic.vue +54 -0
- package/dist/assets/examples/sources/popover/controlled.vue +79 -0
- package/dist/assets/examples/sources/popover/share-settings.vue +457 -0
- package/dist/assets/examples/sources/popover/themed.vue +50 -0
- 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/basic.vue +25 -0
- package/dist/assets/examples/sources/progress/composable.vue +30 -0
- package/dist/assets/examples/sources/progress/indeterminate.vue +26 -0
- package/dist/assets/examples/sources/progress/report-export.vue +160 -0
- package/dist/assets/examples/sources/progress/themed.vue +30 -0
- package/dist/assets/examples/sources/progress/upload-queue.vue +173 -0
- package/dist/assets/examples/sources/progress/value-text.vue +29 -0
- package/dist/assets/examples/sources/radio-group/basic.vue +33 -0
- package/dist/assets/examples/sources/radio-group/deployment-tier.vue +258 -0
- package/dist/assets/examples/sources/radio-group/field.vue +49 -0
- package/dist/assets/examples/sources/radio-group/form.vue +45 -0
- package/dist/assets/examples/sources/radio-group/themed.vue +35 -0
- package/dist/assets/examples/sources/scroll-area/activity-feed.vue +182 -0
- package/dist/assets/examples/sources/scroll-area/basic.vue +24 -0
- package/dist/assets/examples/sources/scroll-area/composable.vue +24 -0
- package/dist/assets/examples/sources/scroll-area/horizontal.vue +180 -0
- package/dist/assets/examples/sources/scroll-area/themed.vue +77 -0
- package/dist/assets/examples/sources/scroll-spy/basic.vue +101 -0
- package/dist/assets/examples/sources/scroll-spy/composable.vue +63 -0
- package/dist/assets/examples/sources/scroll-spy/themed.vue +208 -0
- package/dist/assets/examples/sources/segmented-control/analytics-period.vue +187 -0
- package/dist/assets/examples/sources/segmented-control/basic.vue +50 -0
- package/dist/assets/examples/sources/segmented-control/themed.vue +14 -0
- package/dist/assets/examples/sources/select/alert-routing-form.vue +356 -0
- package/dist/assets/examples/sources/select/basic.vue +173 -0
- package/dist/assets/examples/sources/select/billing-preferences.vue +386 -0
- package/dist/assets/examples/sources/select/field.vue +173 -0
- package/dist/assets/examples/sources/select/form.vue +166 -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/select/themed.vue +74 -0
- package/dist/assets/examples/sources/separator/basic.vue +11 -0
- package/dist/assets/examples/sources/separator/composable.vue +13 -0
- package/dist/assets/examples/sources/separator/decorative.vue +11 -0
- package/dist/assets/examples/sources/separator/list.vue +12 -0
- package/dist/assets/examples/sources/separator/release-header.vue +116 -0
- package/dist/assets/examples/sources/separator/themed.vue +21 -0
- package/dist/assets/examples/sources/separator/vertical.vue +25 -0
- package/dist/assets/examples/sources/skeleton/basic.vue +9 -0
- package/dist/assets/examples/sources/skeleton/composable.vue +12 -0
- package/dist/assets/examples/sources/skeleton/profile-loading.vue +185 -0
- package/dist/assets/examples/sources/skeleton/table.vue +27 -0
- package/dist/assets/examples/sources/skeleton/themed.vue +25 -0
- package/dist/assets/examples/sources/slider/audio-mixer.vue +199 -0
- package/dist/assets/examples/sources/slider/basic.vue +51 -0
- package/dist/assets/examples/sources/slider/price-filter.vue +162 -0
- package/dist/assets/examples/sources/slider/range.vue +52 -0
- package/dist/assets/examples/sources/slider/value-text.vue +50 -0
- package/dist/assets/examples/sources/slider/vertical.vue +22 -0
- package/dist/assets/examples/sources/spinner/basic.vue +37 -0
- package/dist/assets/examples/sources/spinner/composable.vue +41 -0
- package/dist/assets/examples/sources/spinner/sync-status.vue +108 -0
- package/dist/assets/examples/sources/spinner/table-refresh.vue +24 -0
- package/dist/assets/examples/sources/spinner/themed.vue +21 -0
- package/dist/assets/examples/sources/switch/basic.vue +55 -0
- package/dist/assets/examples/sources/switch/composable.vue +61 -0
- package/dist/assets/examples/sources/switch/form.vue +56 -0
- package/dist/assets/examples/sources/switch/ref.vue +64 -0
- package/dist/assets/examples/sources/switch/states.vue +23 -0
- package/dist/assets/examples/sources/switch/themed.vue +21 -0
- package/dist/assets/examples/sources/switch/workspace-security.vue +221 -0
- package/dist/assets/examples/sources/table/basic.vue +36 -0
- package/dist/assets/examples/sources/table/composable.vue +39 -0
- package/dist/assets/examples/sources/table/contain-horizontal.vue +85 -0
- package/dist/assets/examples/sources/table/row-headers.vue +130 -0
- package/dist/assets/examples/sources/table/team-directory.vue +445 -0
- package/dist/assets/examples/sources/table/themed.vue +70 -0
- package/dist/assets/examples/sources/tabs/basic.vue +41 -0
- package/dist/assets/examples/sources/tabs/manual.vue +37 -0
- package/dist/assets/examples/sources/tabs/review-sections.vue +43 -0
- package/dist/assets/examples/sources/tabs/themed.vue +45 -0
- package/dist/assets/examples/sources/tabs/vertical.vue +51 -0
- package/dist/assets/examples/sources/tabs/workspace.vue +517 -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/textarea/auto-resize.vue +20 -0
- package/dist/assets/examples/sources/textarea/basic.vue +14 -0
- package/dist/assets/examples/sources/textarea/composable.vue +12 -0
- package/dist/assets/examples/sources/textarea/form.vue +23 -0
- package/dist/assets/examples/sources/textarea/ref.vue +25 -0
- package/dist/assets/examples/sources/textarea/release-notes.vue +191 -0
- package/dist/assets/examples/sources/textarea/states.vue +32 -0
- package/dist/assets/examples/sources/textarea/themed.vue +19 -0
- package/dist/assets/examples/sources/toast/basic.vue +54 -0
- package/dist/assets/examples/sources/toast/persist-error.vue +94 -0
- package/dist/assets/examples/sources/toast/queue-overflow.vue +90 -0
- package/dist/assets/examples/sources/toast/themed.vue +101 -0
- package/dist/assets/examples/sources/toggle-group/basic.vue +15 -0
- package/dist/assets/examples/sources/toggle-group/editor-toolbar.vue +126 -0
- package/dist/assets/examples/sources/toggle-group/multiple.vue +19 -0
- package/dist/assets/examples/sources/toggle-group/themed.vue +11 -0
- package/dist/assets/examples/sources/toolbar/basic.vue +11 -0
- package/dist/assets/examples/sources/toolbar/composable.vue +21 -0
- package/dist/assets/examples/sources/toolbar/editor-actions.vue +115 -0
- package/dist/assets/examples/sources/toolbar/separators.vue +32 -0
- package/dist/assets/examples/sources/toolbar/themed.vue +37 -0
- package/dist/assets/examples/sources/toolbar/vertical.vue +11 -0
- package/dist/assets/examples/sources/tooltip/basic.vue +47 -0
- package/dist/assets/examples/sources/tooltip/themed.vue +167 -0
- package/dist/assets/examples/sources/tooltip-provider/skip-delay.vue +69 -0
- package/dist/assets/examples/sources/tree/basic.vue +77 -0
- package/dist/assets/examples/sources/tree/multi-select.vue +88 -0
- package/dist/assets/examples/sources/tree/rtl.vue +34 -0
- package/dist/assets/examples/sources/tree/split-trigger.vue +47 -0
- package/dist/assets/examples/sources/tree/themed.vue +183 -0
- package/dist/assets/examples/sources/visually-hidden/action-bar.vue +100 -0
- package/dist/assets/examples/sources/visually-hidden/basic.vue +17 -0
- package/dist/assets/examples/sources/visually-hidden/composable.vue +19 -0
- package/dist/assets/examples/sources/visually-hidden/icon-name.vue +28 -0
- package/dist/assets/examples/sources/visually-hidden/live-region.vue +18 -0
- package/dist/assets/examples/sources/visually-hidden/skip-link.vue +12 -0
- package/dist/assets/examples/sources/visually-hidden/table-header.vue +27 -0
- package/dist/assets/manifest.schema.json +742 -0
- package/dist/assets/manifests/themes/ghost-accordion.manifest.json +53 -0
- package/dist/assets/manifests/themes/ghost-avatar.manifest.json +131 -0
- package/dist/assets/manifests/themes/ghost-badge.manifest.json +180 -0
- package/dist/assets/manifests/themes/ghost-breadcrumb.manifest.json +53 -0
- package/dist/assets/manifests/themes/ghost-button.manifest.json +397 -0
- package/dist/assets/manifests/themes/ghost-calendar.manifest.json +52 -0
- package/dist/assets/manifests/themes/ghost-card.manifest.json +104 -0
- package/dist/assets/manifests/themes/ghost-checkbox-group.manifest.json +90 -0
- package/dist/assets/manifests/themes/ghost-checkbox.manifest.json +241 -0
- package/dist/assets/manifests/themes/ghost-collapsible.manifest.json +114 -0
- package/dist/assets/manifests/themes/ghost-combobox.manifest.json +81 -0
- package/dist/assets/manifests/themes/ghost-command-palette.manifest.json +81 -0
- package/dist/assets/manifests/themes/ghost-context-menu.manifest.json +50 -0
- package/dist/assets/manifests/themes/ghost-data-table-preset.manifest.json +58 -0
- package/dist/assets/manifests/themes/ghost-data-table-table.manifest.json +30 -0
- package/dist/assets/manifests/themes/ghost-data-table.manifest.json +64 -0
- package/dist/assets/manifests/themes/ghost-date-picker.manifest.json +69 -0
- package/dist/assets/manifests/themes/ghost-dialog.manifest.json +184 -0
- package/dist/assets/manifests/themes/ghost-drawer.manifest.json +224 -0
- package/dist/assets/manifests/themes/ghost-dropdown-menu.manifest.json +140 -0
- package/dist/assets/manifests/themes/ghost-empty-state.manifest.json +96 -0
- package/dist/assets/manifests/themes/ghost-field.manifest.json +107 -0
- package/dist/assets/manifests/themes/ghost-file-upload.manifest.json +289 -0
- package/dist/assets/manifests/themes/ghost-hover-card.manifest.json +33 -0
- package/dist/assets/manifests/themes/ghost-inline-alert.manifest.json +71 -0
- package/dist/assets/manifests/themes/ghost-input.manifest.json +240 -0
- package/dist/assets/manifests/themes/ghost-interactive-surface.manifest.json +110 -0
- package/dist/assets/manifests/themes/ghost-kbd.manifest.json +148 -0
- package/dist/assets/manifests/themes/ghost-link.manifest.json +197 -0
- package/dist/assets/manifests/themes/ghost-menubar.manifest.json +51 -0
- package/dist/assets/manifests/themes/ghost-number-input.manifest.json +208 -0
- package/dist/assets/manifests/themes/ghost-pagination.manifest.json +80 -0
- package/dist/assets/manifests/themes/ghost-popover.manifest.json +147 -0
- package/dist/assets/manifests/themes/ghost-progress.manifest.json +141 -0
- package/dist/assets/manifests/themes/ghost-radio-group-item.manifest.json +63 -0
- package/dist/assets/manifests/themes/ghost-radio-group.manifest.json +60 -0
- package/dist/assets/manifests/themes/ghost-scroll-area.manifest.json +76 -0
- package/dist/assets/manifests/themes/ghost-scroll-spy.manifest.json +44 -0
- package/dist/assets/manifests/themes/ghost-segmented-control-item.manifest.json +64 -0
- package/dist/assets/manifests/themes/ghost-segmented-control.manifest.json +71 -0
- package/dist/assets/manifests/themes/ghost-select.manifest.json +69 -0
- package/dist/assets/manifests/themes/ghost-separator.manifest.json +66 -0
- package/dist/assets/manifests/themes/ghost-skeleton.manifest.json +98 -0
- package/dist/assets/manifests/themes/ghost-slider.manifest.json +120 -0
- package/dist/assets/manifests/themes/ghost-spinner.manifest.json +104 -0
- package/dist/assets/manifests/themes/ghost-switch.manifest.json +288 -0
- package/dist/assets/manifests/themes/ghost-table.manifest.json +61 -0
- package/dist/assets/manifests/themes/ghost-tabs.manifest.json +51 -0
- package/dist/assets/manifests/themes/ghost-tags-input.manifest.json +255 -0
- package/dist/assets/manifests/themes/ghost-textarea.manifest.json +238 -0
- package/dist/assets/manifests/themes/ghost-toast.manifest.json +121 -0
- package/dist/assets/manifests/themes/ghost-toggle-group-item.manifest.json +65 -0
- package/dist/assets/manifests/themes/ghost-toggle-group.manifest.json +67 -0
- package/dist/assets/manifests/themes/ghost-toolbar.manifest.json +111 -0
- package/dist/assets/manifests/themes/ghost-tooltip.manifest.json +113 -0
- package/dist/assets/manifests/themes/ghost-tree.manifest.json +295 -0
- package/dist/assets/manifests/vue/ghost-accordion-content.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-accordion-item.manifest.json +47 -0
- package/dist/assets/manifests/vue/ghost-accordion-trigger.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-accordion.manifest.json +171 -0
- package/dist/assets/manifests/vue/ghost-avatar.manifest.json +102 -0
- package/dist/assets/manifests/vue/ghost-badge.manifest.json +53 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb-ellipsis.manifest.json +80 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb-item.manifest.json +57 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb-link.manifest.json +71 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb-list.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb-page.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb-separator.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-breadcrumb.manifest.json +82 -0
- package/dist/assets/manifests/vue/ghost-button.manifest.json +109 -0
- package/dist/assets/manifests/vue/ghost-calendar-cell.manifest.json +107 -0
- package/dist/assets/manifests/vue/ghost-calendar-grid.manifest.json +105 -0
- package/dist/assets/manifests/vue/ghost-calendar-header.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-calendar-heading.manifest.json +70 -0
- package/dist/assets/manifests/vue/ghost-calendar-next-button.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-calendar-prev-button.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-calendar.manifest.json +173 -0
- package/dist/assets/manifests/vue/ghost-card.manifest.json +107 -0
- package/dist/assets/manifests/vue/ghost-checkbox-group.manifest.json +173 -0
- package/dist/assets/manifests/vue/ghost-checkbox.manifest.json +134 -0
- package/dist/assets/manifests/vue/ghost-collapsible-content.manifest.json +81 -0
- package/dist/assets/manifests/vue/ghost-collapsible-trigger.manifest.json +81 -0
- package/dist/assets/manifests/vue/ghost-collapsible.manifest.json +99 -0
- package/dist/assets/manifests/vue/ghost-combobox-content.manifest.json +114 -0
- package/dist/assets/manifests/vue/ghost-combobox-empty.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-combobox-group.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-combobox-input.manifest.json +61 -0
- package/dist/assets/manifests/vue/ghost-combobox-label.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-combobox-option.manifest.json +80 -0
- package/dist/assets/manifests/vue/ghost-combobox-trigger.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-combobox.manifest.json +323 -0
- package/dist/assets/manifests/vue/ghost-command-palette-content.manifest.json +142 -0
- package/dist/assets/manifests/vue/ghost-command-palette-empty.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-command-palette-group.manifest.json +71 -0
- package/dist/assets/manifests/vue/ghost-command-palette-input.manifest.json +88 -0
- package/dist/assets/manifests/vue/ghost-command-palette-item.manifest.json +102 -0
- package/dist/assets/manifests/vue/ghost-command-palette-label.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-command-palette-list.manifest.json +72 -0
- package/dist/assets/manifests/vue/ghost-command-palette-overlay.manifest.json +96 -0
- package/dist/assets/manifests/vue/ghost-command-palette-separator.manifest.json +63 -0
- package/dist/assets/manifests/vue/ghost-command-palette-title.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-command-palette-trigger.manifest.json +89 -0
- package/dist/assets/manifests/vue/ghost-command-palette.manifest.json +358 -0
- package/dist/assets/manifests/vue/ghost-context-menu-checkbox-item.manifest.json +110 -0
- package/dist/assets/manifests/vue/ghost-context-menu-content.manifest.json +114 -0
- package/dist/assets/manifests/vue/ghost-context-menu-group.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-context-menu-item.manifest.json +85 -0
- package/dist/assets/manifests/vue/ghost-context-menu-label.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-context-menu-radio-group.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-context-menu-radio-item.manifest.json +97 -0
- package/dist/assets/manifests/vue/ghost-context-menu-separator.manifest.json +42 -0
- package/dist/assets/manifests/vue/ghost-context-menu-trigger.manifest.json +75 -0
- package/dist/assets/manifests/vue/ghost-context-menu.manifest.json +73 -0
- package/dist/assets/manifests/vue/ghost-data-table-preset.manifest.json +171 -0
- package/dist/assets/manifests/vue/ghost-data-table-table.manifest.json +56 -0
- package/dist/assets/manifests/vue/ghost-data-table.manifest.json +384 -0
- package/dist/assets/manifests/vue/ghost-date-picker-calendar.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-date-picker-content.manifest.json +140 -0
- package/dist/assets/manifests/vue/ghost-date-picker-input.manifest.json +85 -0
- package/dist/assets/manifests/vue/ghost-date-picker-trigger.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-date-picker.manifest.json +347 -0
- package/dist/assets/manifests/vue/ghost-dialog-close.manifest.json +80 -0
- package/dist/assets/manifests/vue/ghost-dialog-content.manifest.json +145 -0
- package/dist/assets/manifests/vue/ghost-dialog-description.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-dialog-overlay.manifest.json +94 -0
- package/dist/assets/manifests/vue/ghost-dialog-title.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-dialog-trigger.manifest.json +93 -0
- package/dist/assets/manifests/vue/ghost-dialog.manifest.json +125 -0
- package/dist/assets/manifests/vue/ghost-drawer-close.manifest.json +80 -0
- package/dist/assets/manifests/vue/ghost-drawer-content.manifest.json +141 -0
- package/dist/assets/manifests/vue/ghost-drawer-description.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-drawer-overlay.manifest.json +94 -0
- package/dist/assets/manifests/vue/ghost-drawer-title.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-drawer-trigger.manifest.json +93 -0
- package/dist/assets/manifests/vue/ghost-drawer.manifest.json +149 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-checkbox-item.manifest.json +110 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-content.manifest.json +114 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-group.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-item.manifest.json +85 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-label.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-radio-group.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-radio-item.manifest.json +97 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-separator.manifest.json +42 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu-trigger.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-dropdown-menu.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-empty-state.manifest.json +98 -0
- package/dist/assets/manifests/vue/ghost-field-control.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-field-description.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-field-error.manifest.json +70 -0
- package/dist/assets/manifests/vue/ghost-field-label.manifest.json +83 -0
- package/dist/assets/manifests/vue/ghost-field.manifest.json +141 -0
- package/dist/assets/manifests/vue/ghost-file-upload-dropzone.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-file-upload-item-remove.manifest.json +65 -0
- package/dist/assets/manifests/vue/ghost-file-upload-item.manifest.json +56 -0
- package/dist/assets/manifests/vue/ghost-file-upload-list.manifest.json +50 -0
- package/dist/assets/manifests/vue/ghost-file-upload-trigger.manifest.json +82 -0
- package/dist/assets/manifests/vue/ghost-file-upload.manifest.json +247 -0
- package/dist/assets/manifests/vue/ghost-form.manifest.json +221 -0
- package/dist/assets/manifests/vue/ghost-hover-card-content.manifest.json +130 -0
- package/dist/assets/manifests/vue/ghost-hover-card-trigger.manifest.json +76 -0
- package/dist/assets/manifests/vue/ghost-hover-card.manifest.json +99 -0
- package/dist/assets/manifests/vue/ghost-inline-alert.manifest.json +98 -0
- package/dist/assets/manifests/vue/ghost-input.manifest.json +133 -0
- package/dist/assets/manifests/vue/ghost-interactive-surface.manifest.json +101 -0
- package/dist/assets/manifests/vue/ghost-kbd.manifest.json +66 -0
- package/dist/assets/manifests/vue/ghost-link.manifest.json +111 -0
- package/dist/assets/manifests/vue/ghost-menubar-checkbox-item.manifest.json +110 -0
- package/dist/assets/manifests/vue/ghost-menubar-content.manifest.json +114 -0
- package/dist/assets/manifests/vue/ghost-menubar-group.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-menubar-item.manifest.json +85 -0
- package/dist/assets/manifests/vue/ghost-menubar-label.manifest.json +40 -0
- package/dist/assets/manifests/vue/ghost-menubar-menu.manifest.json +65 -0
- package/dist/assets/manifests/vue/ghost-menubar-radio-group.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-menubar-radio-item.manifest.json +97 -0
- package/dist/assets/manifests/vue/ghost-menubar-separator.manifest.json +42 -0
- package/dist/assets/manifests/vue/ghost-menubar-trigger.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-menubar.manifest.json +62 -0
- package/dist/assets/manifests/vue/ghost-number-input.manifest.json +205 -0
- package/dist/assets/manifests/vue/ghost-pagination.manifest.json +247 -0
- package/dist/assets/manifests/vue/ghost-popover-close.manifest.json +80 -0
- package/dist/assets/manifests/vue/ghost-popover-content.manifest.json +138 -0
- package/dist/assets/manifests/vue/ghost-popover-trigger.manifest.json +93 -0
- package/dist/assets/manifests/vue/ghost-popover.manifest.json +103 -0
- package/dist/assets/manifests/vue/ghost-portal.manifest.json +56 -0
- package/dist/assets/manifests/vue/ghost-presence.manifest.json +96 -0
- package/dist/assets/manifests/vue/ghost-progress.manifest.json +77 -0
- package/dist/assets/manifests/vue/ghost-radio-group-item.manifest.json +73 -0
- package/dist/assets/manifests/vue/ghost-radio-group.manifest.json +148 -0
- package/dist/assets/manifests/vue/ghost-scroll-area.manifest.json +92 -0
- package/dist/assets/manifests/vue/ghost-scroll-spy-item.manifest.json +60 -0
- package/dist/assets/manifests/vue/ghost-scroll-spy-link.manifest.json +98 -0
- package/dist/assets/manifests/vue/ghost-scroll-spy-list.manifest.json +52 -0
- package/dist/assets/manifests/vue/ghost-scroll-spy.manifest.json +244 -0
- package/dist/assets/manifests/vue/ghost-segmented-control-indicator.manifest.json +25 -0
- package/dist/assets/manifests/vue/ghost-segmented-control-item.manifest.json +91 -0
- package/dist/assets/manifests/vue/ghost-segmented-control.manifest.json +147 -0
- package/dist/assets/manifests/vue/ghost-select-content.manifest.json +119 -0
- package/dist/assets/manifests/vue/ghost-select-group.manifest.json +45 -0
- package/dist/assets/manifests/vue/ghost-select-label.manifest.json +45 -0
- package/dist/assets/manifests/vue/ghost-select-option.manifest.json +85 -0
- package/dist/assets/manifests/vue/ghost-select-trigger.manifest.json +72 -0
- package/dist/assets/manifests/vue/ghost-select-value.manifest.json +52 -0
- package/dist/assets/manifests/vue/ghost-select.manifest.json +200 -0
- package/dist/assets/manifests/vue/ghost-separator.manifest.json +70 -0
- package/dist/assets/manifests/vue/ghost-skeleton.manifest.json +52 -0
- package/dist/assets/manifests/vue/ghost-slider.manifest.json +297 -0
- package/dist/assets/manifests/vue/ghost-spinner.manifest.json +42 -0
- 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-switch.manifest.json +183 -0
- package/dist/assets/manifests/vue/ghost-table-body.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-table-caption.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-table-cell.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-table-foot.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-table-head.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-table-header-cell.manifest.json +51 -0
- package/dist/assets/manifests/vue/ghost-table-row.manifest.json +38 -0
- package/dist/assets/manifests/vue/ghost-table.manifest.json +67 -0
- package/dist/assets/manifests/vue/ghost-tabs-content.manifest.json +66 -0
- package/dist/assets/manifests/vue/ghost-tabs-list.manifest.json +59 -0
- package/dist/assets/manifests/vue/ghost-tabs-trigger.manifest.json +74 -0
- package/dist/assets/manifests/vue/ghost-tabs.manifest.json +100 -0
- package/dist/assets/manifests/vue/ghost-tags-input.manifest.json +260 -0
- package/dist/assets/manifests/vue/ghost-textarea.manifest.json +147 -0
- package/dist/assets/manifests/vue/ghost-toast-action.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-toast-close.manifest.json +69 -0
- package/dist/assets/manifests/vue/ghost-toast-description.manifest.json +48 -0
- package/dist/assets/manifests/vue/ghost-toast-provider.manifest.json +61 -0
- package/dist/assets/manifests/vue/ghost-toast-title.manifest.json +48 -0
- package/dist/assets/manifests/vue/ghost-toast-viewport.manifest.json +102 -0
- package/dist/assets/manifests/vue/ghost-toast.manifest.json +73 -0
- package/dist/assets/manifests/vue/ghost-toggle-group-item.manifest.json +93 -0
- package/dist/assets/manifests/vue/ghost-toggle-group.manifest.json +135 -0
- package/dist/assets/manifests/vue/ghost-toolbar.manifest.json +118 -0
- package/dist/assets/manifests/vue/ghost-tooltip-content.manifest.json +131 -0
- package/dist/assets/manifests/vue/ghost-tooltip-provider.manifest.json +55 -0
- package/dist/assets/manifests/vue/ghost-tooltip-trigger.manifest.json +90 -0
- package/dist/assets/manifests/vue/ghost-tooltip.manifest.json +93 -0
- package/dist/assets/manifests/vue/ghost-tree-group.manifest.json +119 -0
- package/dist/assets/manifests/vue/ghost-tree-item.manifest.json +286 -0
- package/dist/assets/manifests/vue/ghost-tree-trigger.manifest.json +148 -0
- package/dist/assets/manifests/vue/ghost-tree.manifest.json +341 -0
- package/dist/assets/manifests/vue/ghost-visually-hidden.manifest.json +73 -0
- package/dist/assets/tokens.json +6152 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +11 -0
- package/dist/cli.d.ts +30 -0
- package/dist/cli.js +54 -0
- package/dist/components.d.ts +20 -0
- package/dist/components.js +471 -0
- package/dist/contract.d.ts +28 -0
- package/dist/contract.js +15 -0
- package/dist/docs-index.d.ts +84 -0
- package/dist/docs-index.js +230 -0
- package/dist/errors.d.ts +54 -0
- package/dist/errors.js +66 -0
- package/dist/get-examples.d.ts +30 -0
- package/dist/get-examples.js +269 -0
- package/dist/get-tokens.d.ts +27 -0
- package/dist/get-tokens.js +217 -0
- package/dist/identity.d.ts +42 -0
- package/dist/identity.js +99 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16 -0
- package/dist/search-docs.d.ts +24 -0
- package/dist/search-docs.js +132 -0
- package/dist/server.d.ts +81 -0
- package/dist/server.js +75 -0
- package/dist/tool.d.ts +66 -0
- package/dist/tool.js +130 -0
- package/package.json +50 -4
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeUnmount, ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { GhostButton, type GhostButtonSize } from '@ghostvue/themes'
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Optional so the sample runs as-is; the docs props playground passes them.
|
|
8
|
+
* `size` applies to every action so the row keeps one rhythm. `loading`
|
|
9
|
+
* shows the publish action as pending, the same state a click produces.
|
|
10
|
+
*/
|
|
11
|
+
const { size = 'md', loading } = defineProps<{
|
|
12
|
+
size?: GhostButtonSize
|
|
13
|
+
loading?: boolean
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const publishing = ref(false)
|
|
17
|
+
const status = ref('Draft saved at 10:42')
|
|
18
|
+
let publishTimer: ReturnType<typeof setTimeout> | undefined
|
|
19
|
+
|
|
20
|
+
function saveDraft(): void {
|
|
21
|
+
status.value = 'Draft saved at 10:43'
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function discardDraft(): void {
|
|
25
|
+
status.value = 'Changes discarded'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Stands in for a request. The app owns the pending state and the result.
|
|
29
|
+
function publish(): void {
|
|
30
|
+
publishing.value = true
|
|
31
|
+
status.value = 'Publishing to 3 channels…'
|
|
32
|
+
publishTimer = setTimeout(() => {
|
|
33
|
+
publishing.value = false
|
|
34
|
+
status.value = 'Published to 3 channels'
|
|
35
|
+
}, 1500)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
onBeforeUnmount(() => {
|
|
39
|
+
clearTimeout(publishTimer)
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<div class="publish-bar">
|
|
45
|
+
<div class="publish-bar__summary">
|
|
46
|
+
<span class="publish-bar__title">Quarterly product update</span>
|
|
47
|
+
<!-- Announces save, discard, and publish results politely. -->
|
|
48
|
+
<span class="publish-bar__status" role="status">{{ status }}</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="publish-bar__actions">
|
|
51
|
+
<div class="publish-bar__discard">
|
|
52
|
+
<GhostButton variant="ghost" tone="danger" :size @click="discardDraft">
|
|
53
|
+
Discard changes
|
|
54
|
+
</GhostButton>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="publish-bar__commit">
|
|
57
|
+
<GhostButton variant="outline" tone="neutral" :size @click="saveDraft">
|
|
58
|
+
Save draft
|
|
59
|
+
</GhostButton>
|
|
60
|
+
<GhostButton :size :loading="loading || publishing" @click="publish">
|
|
61
|
+
Publish
|
|
62
|
+
</GhostButton>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<style scoped>
|
|
69
|
+
/*
|
|
70
|
+
* The summary sits above the actions. The destructive action lives in its
|
|
71
|
+
* own group at the start so it is never the button next to the primary.
|
|
72
|
+
* Narrow previews stack the groups and give Save and Publish equal halves;
|
|
73
|
+
* wider ones put the groups on one row at opposite ends.
|
|
74
|
+
*/
|
|
75
|
+
.publish-bar {
|
|
76
|
+
display: grid;
|
|
77
|
+
gap: var(--ghost-space-stack-md);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.publish-bar__summary {
|
|
81
|
+
display: grid;
|
|
82
|
+
gap: var(--ghost-space-gap-xs);
|
|
83
|
+
min-inline-size: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.publish-bar__title {
|
|
87
|
+
color: var(--ghost-text-default);
|
|
88
|
+
font-size: var(--ghost-type-size-md);
|
|
89
|
+
font-weight: var(--ghost-type-weight-semibold);
|
|
90
|
+
line-height: var(--ghost-type-line-snug);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.publish-bar__status {
|
|
94
|
+
color: var(--ghost-text-muted);
|
|
95
|
+
font-size: var(--ghost-type-size-sm);
|
|
96
|
+
line-height: var(--ghost-type-line-normal);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.publish-bar__actions {
|
|
100
|
+
display: grid;
|
|
101
|
+
gap: var(--ghost-space-gap-sm);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Save and Publish split the row evenly on narrow previews. */
|
|
105
|
+
.publish-bar__commit {
|
|
106
|
+
display: grid;
|
|
107
|
+
gap: var(--ghost-space-gap-sm);
|
|
108
|
+
grid-template-columns: 1fr 1fr;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@container ghost-demo (min-width: 26rem) {
|
|
112
|
+
.publish-bar__actions {
|
|
113
|
+
align-items: center;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-wrap: wrap;
|
|
116
|
+
justify-content: space-between;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.publish-bar__commit {
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-wrap: wrap;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { GhostButton } from '@ghostvue/vue'
|
|
5
|
+
|
|
6
|
+
const saved = ref(false)
|
|
7
|
+
|
|
8
|
+
function save(): void {
|
|
9
|
+
saved.value = true
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<GhostButton @click="save">Save changes</GhostButton>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeUnmount, ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { useGhostButton } from '@ghostvue/vue'
|
|
5
|
+
|
|
6
|
+
const saving = ref(false)
|
|
7
|
+
const { rootProps } = useGhostButton({ loading: saving })
|
|
8
|
+
let resetTimer: ReturnType<typeof setTimeout> | undefined
|
|
9
|
+
|
|
10
|
+
function save(): void {
|
|
11
|
+
saving.value = true
|
|
12
|
+
resetTimer = setTimeout(() => {
|
|
13
|
+
saving.value = false
|
|
14
|
+
}, 1200)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
onBeforeUnmount(() => {
|
|
18
|
+
clearTimeout(resetTimer)
|
|
19
|
+
})
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<button v-bind="rootProps" @click="save">Save</button>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeUnmount, ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { GhostButton } from '@ghostvue/themes'
|
|
5
|
+
|
|
6
|
+
const saving = ref(false)
|
|
7
|
+
let resetTimer: ReturnType<typeof setTimeout> | undefined
|
|
8
|
+
|
|
9
|
+
function save(): void {
|
|
10
|
+
saving.value = true
|
|
11
|
+
resetTimer = setTimeout(() => {
|
|
12
|
+
saving.value = false
|
|
13
|
+
}, 1200)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
onBeforeUnmount(() => {
|
|
17
|
+
clearTimeout(resetTimer)
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<!--
|
|
23
|
+
Visual props describe intent. `type` defaults to button so this control
|
|
24
|
+
does not submit a surrounding form. Loading keeps the control focusable
|
|
25
|
+
while the pending request runs.
|
|
26
|
+
-->
|
|
27
|
+
<GhostButton
|
|
28
|
+
variant="solid"
|
|
29
|
+
tone="accent"
|
|
30
|
+
size="md"
|
|
31
|
+
:loading="saving"
|
|
32
|
+
@click="save"
|
|
33
|
+
>
|
|
34
|
+
Save changes
|
|
35
|
+
</GhostButton>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { GhostButton } from '@ghostvue/themes'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<GhostButton icon-only aria-label="Close dialog">
|
|
7
|
+
<svg
|
|
8
|
+
data-part="icon"
|
|
9
|
+
aria-hidden="true"
|
|
10
|
+
viewBox="0 0 16 16"
|
|
11
|
+
width="16"
|
|
12
|
+
height="16"
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d="M3 3l10 10M13 3L3 13"
|
|
16
|
+
fill="none"
|
|
17
|
+
stroke="currentColor"
|
|
18
|
+
stroke-width="1.5"
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
</GhostButton>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { GhostButton } from '@ghostvue/themes'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<!--
|
|
7
|
+
Loading keeps the label in the layout (only hidden), so the button keeps
|
|
8
|
+
its width and the row does not shift when an action becomes pending.
|
|
9
|
+
-->
|
|
10
|
+
<div class="button-states">
|
|
11
|
+
<GhostButton loading>Save changes</GhostButton>
|
|
12
|
+
<GhostButton variant="outline" tone="neutral" loading>
|
|
13
|
+
Export report
|
|
14
|
+
</GhostButton>
|
|
15
|
+
<GhostButton disabled>Unavailable action</GhostButton>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<style scoped>
|
|
20
|
+
.button-states {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--ghost-space-gap-sm);
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeUnmount, ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { GhostButton } from '@ghostvue/themes'
|
|
5
|
+
|
|
6
|
+
const saving = ref(false)
|
|
7
|
+
let resetTimer: ReturnType<typeof setTimeout> | undefined
|
|
8
|
+
|
|
9
|
+
function save(): void {
|
|
10
|
+
saving.value = true
|
|
11
|
+
resetTimer = setTimeout(() => {
|
|
12
|
+
saving.value = false
|
|
13
|
+
}, 1200)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
onBeforeUnmount(() => {
|
|
17
|
+
clearTimeout(resetTimer)
|
|
18
|
+
})
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<GhostButton class="marked-save" :loading="saving" @click="save">
|
|
23
|
+
<svg
|
|
24
|
+
data-part="icon"
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
viewBox="0 0 16 16"
|
|
27
|
+
width="16"
|
|
28
|
+
height="16"
|
|
29
|
+
>
|
|
30
|
+
<path
|
|
31
|
+
d="M3 13.5V6.2L8 2.5l5 3.7v7.3H3zm2-1h6V7.1L8 4.2 5 7.1v5.4z"
|
|
32
|
+
fill="currentColor"
|
|
33
|
+
/>
|
|
34
|
+
</svg>
|
|
35
|
+
<span>Save changes</span>
|
|
36
|
+
<span v-if="saving" data-part="loading-indicator" aria-hidden="true">
|
|
37
|
+
…
|
|
38
|
+
</span>
|
|
39
|
+
</GhostButton>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
/*
|
|
44
|
+
* data-part marks slot structure the themed wrapper understands.
|
|
45
|
+
* Consumer CSS targets parts without coupling to the library DOM.
|
|
46
|
+
*/
|
|
47
|
+
.marked-save :deep([data-part='icon']) {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.marked-save :deep([data-part='loading-indicator']) {
|
|
52
|
+
font-size: 0.875em;
|
|
53
|
+
letter-spacing: 0.12em;
|
|
54
|
+
opacity: 0.85;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useTemplateRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { GhostButton, type GhostButtonExposed } from '@ghostvue/vue'
|
|
5
|
+
|
|
6
|
+
const saveButton = useTemplateRef<GhostButtonExposed>('saveButton')
|
|
7
|
+
|
|
8
|
+
function returnFocus(): void {
|
|
9
|
+
saveButton.value?.focus()
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<GhostButton ref="saveButton">Save changes</GhostButton>
|
|
15
|
+
<button type="button" @click="returnFocus">Move focus to save</button>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onBeforeUnmount, ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import { GhostButton } from '@ghostvue/themes'
|
|
5
|
+
|
|
6
|
+
type RefreshResult = 'idle' | 'pending' | 'failed' | 'updated'
|
|
7
|
+
|
|
8
|
+
const result = ref<RefreshResult>('idle')
|
|
9
|
+
const attempts = ref(0)
|
|
10
|
+
let requestTimer: ReturnType<typeof setTimeout> | undefined
|
|
11
|
+
|
|
12
|
+
const messages: Record<RefreshResult, string> = {
|
|
13
|
+
idle: 'Last checked 5 minutes ago.',
|
|
14
|
+
pending: 'Checking 3 deployments…',
|
|
15
|
+
failed: 'Could not reach the build server. Try again.',
|
|
16
|
+
updated: 'All 3 deployments are healthy.',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* The application owns the request. `loading` only blocks activation while
|
|
21
|
+
* it runs: the button stays focused and keeps its name, so a keyboard user
|
|
22
|
+
* can retry from where they are once the failure clears the pending state.
|
|
23
|
+
* The first attempt fails so the example shows that recovery path.
|
|
24
|
+
*/
|
|
25
|
+
function refresh(): void {
|
|
26
|
+
attempts.value += 1
|
|
27
|
+
const fails = attempts.value === 1
|
|
28
|
+
result.value = 'pending'
|
|
29
|
+
requestTimer = setTimeout(() => {
|
|
30
|
+
result.value = fails ? 'failed' : 'updated'
|
|
31
|
+
}, 900)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
onBeforeUnmount(() => {
|
|
35
|
+
clearTimeout(requestTimer)
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div class="refresh-status">
|
|
41
|
+
<div class="refresh-status__summary">
|
|
42
|
+
<span class="refresh-status__title">Production deployments</span>
|
|
43
|
+
<!-- A polite region announces each outcome without moving focus. -->
|
|
44
|
+
<span class="refresh-status__message" :data-result="result" role="status">
|
|
45
|
+
{{ messages[result] }}
|
|
46
|
+
</span>
|
|
47
|
+
</div>
|
|
48
|
+
<GhostButton
|
|
49
|
+
variant="outline"
|
|
50
|
+
tone="neutral"
|
|
51
|
+
:loading="result === 'pending'"
|
|
52
|
+
@click="refresh"
|
|
53
|
+
>
|
|
54
|
+
Refresh status
|
|
55
|
+
</GhostButton>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<style scoped>
|
|
60
|
+
.refresh-status {
|
|
61
|
+
display: grid;
|
|
62
|
+
gap: var(--ghost-space-gap-sm);
|
|
63
|
+
justify-items: start;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.refresh-status__summary {
|
|
67
|
+
display: grid;
|
|
68
|
+
gap: var(--ghost-space-gap-xs);
|
|
69
|
+
min-inline-size: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.refresh-status__title {
|
|
73
|
+
color: var(--ghost-text-default);
|
|
74
|
+
font-size: var(--ghost-type-size-md);
|
|
75
|
+
font-weight: var(--ghost-type-weight-semibold);
|
|
76
|
+
line-height: var(--ghost-type-line-snug);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.refresh-status__message {
|
|
80
|
+
color: var(--ghost-text-muted);
|
|
81
|
+
font-size: var(--ghost-type-size-sm);
|
|
82
|
+
line-height: var(--ghost-type-line-normal);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.refresh-status__message[data-result='failed'] {
|
|
86
|
+
color: var(--ghost-text-danger);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@container ghost-demo (min-width: 30rem) {
|
|
90
|
+
.refresh-status {
|
|
91
|
+
align-items: center;
|
|
92
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
GhostButton,
|
|
6
|
+
type GhostButtonSize,
|
|
7
|
+
type GhostButtonTone,
|
|
8
|
+
type GhostButtonVariant,
|
|
9
|
+
} from '@ghostvue/themes'
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Optional so the sample runs as-is; the docs props playground passes them
|
|
13
|
+
* to try other treatments. The defaults are what this sample renders.
|
|
14
|
+
*/
|
|
15
|
+
const {
|
|
16
|
+
size = 'md',
|
|
17
|
+
tone = 'danger',
|
|
18
|
+
variant = 'outline',
|
|
19
|
+
} = defineProps<{
|
|
20
|
+
size?: GhostButtonSize
|
|
21
|
+
tone?: GhostButtonTone
|
|
22
|
+
variant?: GhostButtonVariant
|
|
23
|
+
}>()
|
|
24
|
+
|
|
25
|
+
const saving = ref(false)
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<GhostButton :variant :tone :size :loading="saving">Delete</GhostButton>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CalendarDate,
|
|
6
|
+
GhostButton,
|
|
7
|
+
GhostCalendar,
|
|
8
|
+
GhostCalendarGrid,
|
|
9
|
+
GhostCalendarHeader,
|
|
10
|
+
GhostCalendarHeading,
|
|
11
|
+
GhostCalendarNextButton,
|
|
12
|
+
GhostCalendarPrevButton,
|
|
13
|
+
GhostCard,
|
|
14
|
+
} from '@ghostvue/themes'
|
|
15
|
+
|
|
16
|
+
/** Range mode proposes inclusive `{ start, end }` values. */
|
|
17
|
+
interface BookingRange {
|
|
18
|
+
start: CalendarDate
|
|
19
|
+
end: CalendarDate
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// A fixed "today" keeps the demo, its tests, and its screenshots stable.
|
|
23
|
+
const today = new CalendarDate(2024, 6, 3)
|
|
24
|
+
const visibleMonth = new CalendarDate(2024, 6, 1)
|
|
25
|
+
|
|
26
|
+
// Days another team already holds. They render struck through and cannot be
|
|
27
|
+
// picked, but a range may still be dragged across them, so the summary
|
|
28
|
+
// checks for overlap before the request can be sent.
|
|
29
|
+
const booked = [
|
|
30
|
+
new CalendarDate(2024, 6, 12),
|
|
31
|
+
new CalendarDate(2024, 6, 13),
|
|
32
|
+
new CalendarDate(2024, 6, 24),
|
|
33
|
+
new CalendarDate(2024, 6, 25),
|
|
34
|
+
new CalendarDate(2024, 6, 26),
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
function isBooked(date: CalendarDate): boolean {
|
|
38
|
+
return booked.some((day) => day.compare(date) === 0)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const range = shallowRef<BookingRange | null>({
|
|
42
|
+
start: new CalendarDate(2024, 6, 17),
|
|
43
|
+
end: new CalendarDate(2024, 6, 20),
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
/*
|
|
47
|
+
* The calendar treats any one-day value as an open start, so after a
|
|
48
|
+
* finished one-day booking its next proposal would extend that day instead
|
|
49
|
+
* of starting a new booking. The example tracks the open start itself:
|
|
50
|
+
* `select` fires after `update:modelValue` for every accepted click, so a
|
|
51
|
+
* click with no open start replaces the proposal with a fresh one-day start,
|
|
52
|
+
* and the next click completes it (the same day twice is a one-day booking).
|
|
53
|
+
*/
|
|
54
|
+
const awaitingEnd = shallowRef(false)
|
|
55
|
+
|
|
56
|
+
function onSelect(date: CalendarDate): void {
|
|
57
|
+
if (awaitingEnd.value) {
|
|
58
|
+
awaitingEnd.value = false
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
range.value = { start: date, end: date }
|
|
62
|
+
awaitingEnd.value = true
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function clear(): void {
|
|
66
|
+
// `null` keeps the calendar controlled while empty and drops a pending start.
|
|
67
|
+
range.value = null
|
|
68
|
+
awaitingEnd.value = false
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const dayFormat = new Intl.DateTimeFormat('en-US', {
|
|
72
|
+
weekday: 'short',
|
|
73
|
+
month: 'short',
|
|
74
|
+
day: 'numeric',
|
|
75
|
+
timeZone: 'UTC',
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
function formatDay(date: CalendarDate): string {
|
|
79
|
+
return dayFormat.format(date.toDate('UTC'))
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const conflict = computed(() => {
|
|
83
|
+
const value = range.value
|
|
84
|
+
if (!value || awaitingEnd.value) return false
|
|
85
|
+
return booked.some(
|
|
86
|
+
(day) => day.compare(value.start) >= 0 && day.compare(value.end) <= 0,
|
|
87
|
+
)
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const summary = computed(() => {
|
|
91
|
+
const value = range.value
|
|
92
|
+
if (!value) return 'Choose the first day of your booking.'
|
|
93
|
+
if (awaitingEnd.value) {
|
|
94
|
+
return `Starts ${formatDay(value.start)}. Choose the last day.`
|
|
95
|
+
}
|
|
96
|
+
if (conflict.value) {
|
|
97
|
+
return 'This range includes booked days. Choose dates without a strikethrough.'
|
|
98
|
+
}
|
|
99
|
+
// `end` is inclusive, so a one-day booking still counts as one day.
|
|
100
|
+
const days = value.end.compare(value.start) + 1
|
|
101
|
+
const dates =
|
|
102
|
+
days === 1
|
|
103
|
+
? formatDay(value.start)
|
|
104
|
+
: `${formatDay(value.start)} – ${formatDay(value.end)}`
|
|
105
|
+
return `${dates} · ${String(days)} ${days === 1 ? 'day' : 'days'}`
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
const canRequest = computed(
|
|
109
|
+
() => range.value !== null && !awaitingEnd.value && !conflict.value,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
const requested = shallowRef<string | null>(null)
|
|
113
|
+
|
|
114
|
+
function request(): void {
|
|
115
|
+
requested.value = summary.value
|
|
116
|
+
}
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<template>
|
|
120
|
+
<GhostCard class="studio-booking">
|
|
121
|
+
<template #header>
|
|
122
|
+
<div class="studio-booking__header">
|
|
123
|
+
<h2 class="studio-booking__title">Book Studio B</h2>
|
|
124
|
+
<p class="studio-booking__meta">
|
|
125
|
+
Struck-through days are booked or already past.
|
|
126
|
+
</p>
|
|
127
|
+
</div>
|
|
128
|
+
</template>
|
|
129
|
+
|
|
130
|
+
<GhostCalendar
|
|
131
|
+
v-model="range"
|
|
132
|
+
selection-mode="range"
|
|
133
|
+
:default-visible-month="visibleMonth"
|
|
134
|
+
:today="today"
|
|
135
|
+
:min-value="today"
|
|
136
|
+
:is-date-disabled="isBooked"
|
|
137
|
+
@select="onSelect"
|
|
138
|
+
>
|
|
139
|
+
<GhostCalendarHeader class="studio-booking__nav">
|
|
140
|
+
<GhostCalendarHeading />
|
|
141
|
+
<GhostCalendarPrevButton />
|
|
142
|
+
<GhostCalendarNextButton />
|
|
143
|
+
</GhostCalendarHeader>
|
|
144
|
+
<GhostCalendarGrid />
|
|
145
|
+
</GhostCalendar>
|
|
146
|
+
|
|
147
|
+
<template #footer>
|
|
148
|
+
<div class="studio-booking__footer">
|
|
149
|
+
<p
|
|
150
|
+
class="studio-booking__summary"
|
|
151
|
+
:data-conflict="conflict || undefined"
|
|
152
|
+
role="status"
|
|
153
|
+
aria-live="polite"
|
|
154
|
+
>
|
|
155
|
+
{{ summary }}
|
|
156
|
+
</p>
|
|
157
|
+
<div class="studio-booking__actions">
|
|
158
|
+
<GhostButton
|
|
159
|
+
variant="outline"
|
|
160
|
+
tone="neutral"
|
|
161
|
+
size="sm"
|
|
162
|
+
:disabled="range === null"
|
|
163
|
+
@click="clear"
|
|
164
|
+
>
|
|
165
|
+
Clear dates
|
|
166
|
+
</GhostButton>
|
|
167
|
+
<GhostButton size="sm" :disabled="!canRequest" @click="request">
|
|
168
|
+
Request booking
|
|
169
|
+
</GhostButton>
|
|
170
|
+
</div>
|
|
171
|
+
<p v-if="requested" class="studio-booking__requested">
|
|
172
|
+
Requested: {{ requested }}
|
|
173
|
+
</p>
|
|
174
|
+
</div>
|
|
175
|
+
</template>
|
|
176
|
+
</GhostCard>
|
|
177
|
+
</template>
|
|
178
|
+
|
|
179
|
+
<style scoped>
|
|
180
|
+
.studio-booking {
|
|
181
|
+
inline-size: 100%;
|
|
182
|
+
max-inline-size: 22rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.studio-booking__header {
|
|
186
|
+
display: grid;
|
|
187
|
+
gap: var(--ghost-space-gap-xs);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Reset the docs prose heading so the card title keeps the card's type scale. */
|
|
191
|
+
.studio-booking__title {
|
|
192
|
+
border: 0;
|
|
193
|
+
color: var(--ghost-surface-fg);
|
|
194
|
+
font-size: var(--ghost-type-size-md);
|
|
195
|
+
font-weight: var(--ghost-type-weight-semibold);
|
|
196
|
+
line-height: var(--ghost-type-line-tight);
|
|
197
|
+
margin: 0;
|
|
198
|
+
padding: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.studio-booking__meta,
|
|
202
|
+
.studio-booking__requested {
|
|
203
|
+
color: var(--ghost-text-muted);
|
|
204
|
+
font-size: var(--ghost-type-size-xs);
|
|
205
|
+
margin: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.studio-booking__nav :deep(.ghost-calendar-heading) {
|
|
209
|
+
text-align: start;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.studio-booking__footer {
|
|
213
|
+
display: grid;
|
|
214
|
+
gap: var(--ghost-space-gap-sm);
|
|
215
|
+
inline-size: 100%;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.studio-booking__summary {
|
|
219
|
+
color: var(--ghost-surface-fg);
|
|
220
|
+
font-size: var(--ghost-type-size-sm);
|
|
221
|
+
font-variant-numeric: tabular-nums;
|
|
222
|
+
margin: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.studio-booking__summary[data-conflict] {
|
|
226
|
+
color: var(--ghost-text-danger);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.studio-booking__actions {
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-wrap: wrap;
|
|
232
|
+
gap: var(--ghost-space-gap-xs);
|
|
233
|
+
justify-content: flex-end;
|
|
234
|
+
}
|
|
235
|
+
</style>
|