@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,239 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CalendarDate,
|
|
6
|
+
type DateValue,
|
|
7
|
+
GhostCalendar,
|
|
8
|
+
GhostCalendarGrid,
|
|
9
|
+
GhostCalendarHeader,
|
|
10
|
+
GhostCalendarHeading,
|
|
11
|
+
GhostCalendarNextButton,
|
|
12
|
+
GhostCalendarPrevButton,
|
|
13
|
+
} from '@ghostvue/vue'
|
|
14
|
+
|
|
15
|
+
const selected = shallowRef<DateValue>(new CalendarDate(2024, 6, 3))
|
|
16
|
+
const visibleMonth = new CalendarDate(2024, 6, 1)
|
|
17
|
+
const today = new CalendarDate(2024, 6, 3)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="calendar-demo">
|
|
22
|
+
<GhostCalendar
|
|
23
|
+
v-model="selected"
|
|
24
|
+
locale="de-DE"
|
|
25
|
+
:week-starts-on="1"
|
|
26
|
+
:default-visible-month="visibleMonth"
|
|
27
|
+
:today="today"
|
|
28
|
+
>
|
|
29
|
+
<GhostCalendarHeader>
|
|
30
|
+
<GhostCalendarPrevButton />
|
|
31
|
+
<GhostCalendarHeading />
|
|
32
|
+
<GhostCalendarNextButton />
|
|
33
|
+
</GhostCalendarHeader>
|
|
34
|
+
<GhostCalendarGrid />
|
|
35
|
+
</GhostCalendar>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style>
|
|
40
|
+
/*
|
|
41
|
+
* Headless GhostCalendar ships behavior only, so this sample brings its own
|
|
42
|
+
* consumer CSS. It is unscoped on purpose: the weekday header, weeks and day
|
|
43
|
+
* cells are rendered inside GhostCalendarGrid, where this component's scoped
|
|
44
|
+
* attribute does not reach, and the `calendar-demo` prefix keeps the rules
|
|
45
|
+
* from colliding with page styles. GhostCalendar renders no element of its
|
|
46
|
+
* own, so the sample wraps it in the `.calendar-demo` element. Every headless
|
|
47
|
+
* calendar example carries this same block (a test keeps them identical), so
|
|
48
|
+
* copy it once per app.
|
|
49
|
+
*
|
|
50
|
+
* Colors read GhostVue semantic tokens when a theme is loaded and fall back
|
|
51
|
+
* to CSS system colors, which follow light and dark on their own. The month
|
|
52
|
+
* grid mirrors the themed calendar recipe: one 7-column template shared by
|
|
53
|
+
* the weekday header and every week, and distinct today, selected, range,
|
|
54
|
+
* outside-month and unavailable states that only change color, border or
|
|
55
|
+
* decoration, so the grid never shifts. Nothing animates, so reduced motion
|
|
56
|
+
* needs no override.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/* Fluid up to a comfortable month width, so narrow previews never overflow. */
|
|
60
|
+
.calendar-demo {
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
color: var(--ghost-surface-fg, CanvasText);
|
|
63
|
+
display: grid;
|
|
64
|
+
gap: 0.5rem;
|
|
65
|
+
inline-size: 100%;
|
|
66
|
+
max-inline-size: 19rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.calendar-demo [data-part='header'] {
|
|
70
|
+
align-items: center;
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 0.25rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* The heading is a real `<h2>`. Every box and type property is set here so a
|
|
77
|
+
* host page's prose heading styles (margins, rules, large type) cannot leak
|
|
78
|
+
* into the calendar.
|
|
79
|
+
*/
|
|
80
|
+
.calendar-demo [data-part='heading'] {
|
|
81
|
+
border: 0;
|
|
82
|
+
flex: 1;
|
|
83
|
+
font-size: 0.9375rem;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
letter-spacing: normal;
|
|
86
|
+
line-height: 1.3;
|
|
87
|
+
margin: 0;
|
|
88
|
+
padding: 0;
|
|
89
|
+
text-align: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.calendar-demo :is([data-part='prev'], [data-part='next']) {
|
|
93
|
+
background-color: var(--ghost-elevation-1-bg, ButtonFace);
|
|
94
|
+
border: 1px solid var(--ghost-border-strong, ButtonBorder);
|
|
95
|
+
border-radius: var(--ghost-radius-md, 0.375rem);
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
color: var(--ghost-surface-fg, ButtonText);
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
font: inherit;
|
|
100
|
+
font-size: 0.8125rem;
|
|
101
|
+
min-block-size: 2.25rem;
|
|
102
|
+
padding: 0 0.5rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.calendar-demo
|
|
106
|
+
:is([data-part='prev'], [data-part='next']):hover:not(:disabled) {
|
|
107
|
+
background-color: var(--ghost-surface-muted-bg, ButtonFace);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.calendar-demo :is([data-part='prev'], [data-part='next']):disabled {
|
|
111
|
+
color: var(--ghost-text-subtle, GrayText);
|
|
112
|
+
cursor: not-allowed;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.calendar-demo :is([data-part='prev'], [data-part='next']):focus-visible {
|
|
116
|
+
outline: 2px solid var(--ghost-focus-ring-color, Highlight);
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Weekday header and weeks share one 7-column template, so columns align. */
|
|
121
|
+
.calendar-demo [data-part='grid'] {
|
|
122
|
+
display: grid;
|
|
123
|
+
gap: 0.125rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.calendar-demo [data-part='grid'] > [role='row'] {
|
|
127
|
+
display: grid;
|
|
128
|
+
gap: 0.125rem;
|
|
129
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.calendar-demo [role='columnheader'] {
|
|
133
|
+
color: var(--ghost-text-muted, GrayText);
|
|
134
|
+
font-size: 0.75rem;
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
padding-block: 0.25rem;
|
|
137
|
+
text-align: center;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.calendar-demo [data-part='cell'] {
|
|
141
|
+
aspect-ratio: 1;
|
|
142
|
+
background: transparent;
|
|
143
|
+
border: 1px solid transparent;
|
|
144
|
+
border-radius: var(--ghost-radius-md, 0.375rem);
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
color: inherit;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
font: inherit;
|
|
149
|
+
font-variant-numeric: tabular-nums;
|
|
150
|
+
padding: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Zero-specificity hover, so the state fills below always win. */
|
|
154
|
+
.calendar-demo
|
|
155
|
+
[data-part='cell']:where(:hover:not(:disabled, [aria-disabled])) {
|
|
156
|
+
background-color: var(--ghost-surface-muted-bg, ButtonFace);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Adjacent-month days fill the first and last weeks but are not selectable. */
|
|
160
|
+
.calendar-demo [data-part='cell'][data-outside-month] {
|
|
161
|
+
color: var(--ghost-text-subtle, GrayText);
|
|
162
|
+
cursor: default;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.calendar-demo [data-part='cell'][data-today] {
|
|
166
|
+
border-color: var(--ghost-border-primary, CanvasText);
|
|
167
|
+
color: var(--ghost-text-primary, CanvasText);
|
|
168
|
+
font-weight: 600;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Unavailable days are struck through: distinct from adjacent-month days. */
|
|
172
|
+
.calendar-demo
|
|
173
|
+
[data-part='cell']:is(:disabled, [aria-disabled='true']):not(
|
|
174
|
+
[data-outside-month]
|
|
175
|
+
) {
|
|
176
|
+
color: var(--ghost-text-subtle, GrayText);
|
|
177
|
+
cursor: not-allowed;
|
|
178
|
+
text-decoration: line-through;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.calendar-demo [data-part='cell'][data-state='range-middle'] {
|
|
182
|
+
background-color: var(--ghost-surface-muted-bg, ButtonFace);
|
|
183
|
+
color: var(--ghost-surface-fg, CanvasText);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.calendar-demo
|
|
187
|
+
[data-part='cell']:is(
|
|
188
|
+
[data-state='selected'],
|
|
189
|
+
[data-state='range-start'],
|
|
190
|
+
[data-state='range-end']
|
|
191
|
+
) {
|
|
192
|
+
background-color: var(--ghost-action-primary-bg, Highlight);
|
|
193
|
+
border-color: var(--ghost-action-primary-border, Highlight);
|
|
194
|
+
color: var(--ghost-action-primary-fg, HighlightText);
|
|
195
|
+
font-weight: 600;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.calendar-demo [data-part='cell']:focus-visible {
|
|
199
|
+
outline: 2px solid var(--ghost-focus-ring-color, Highlight);
|
|
200
|
+
outline-offset: 2px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/*
|
|
204
|
+
* Forced colors: only today keeps a CanvasText border; inactive days use
|
|
205
|
+
* GrayText. Selected days and range ends become Highlight cells (opted out
|
|
206
|
+
* so HighlightText stays on Highlight); range middles keep a Highlight
|
|
207
|
+
* border so the span still reads.
|
|
208
|
+
*/
|
|
209
|
+
@media (forced-colors: active) {
|
|
210
|
+
.calendar-demo [data-part='cell'] {
|
|
211
|
+
border-color: Canvas;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.calendar-demo [data-part='cell']:is(:disabled, [aria-disabled='true']) {
|
|
215
|
+
color: GrayText;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.calendar-demo [data-part='cell'][data-state='range-middle'] {
|
|
219
|
+
border-color: Highlight;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* After the range rule, so today stays marked inside a selected span. */
|
|
223
|
+
.calendar-demo [data-part='cell'][data-today] {
|
|
224
|
+
border-color: CanvasText;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.calendar-demo
|
|
228
|
+
[data-part='cell']:is(
|
|
229
|
+
[data-state='selected'],
|
|
230
|
+
[data-state='range-start'],
|
|
231
|
+
[data-state='range-end']
|
|
232
|
+
) {
|
|
233
|
+
background-color: Highlight;
|
|
234
|
+
border-color: Highlight;
|
|
235
|
+
color: HighlightText;
|
|
236
|
+
forced-color-adjust: none;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
</style>
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CalendarDate,
|
|
6
|
+
type DateValue,
|
|
7
|
+
GhostCalendar,
|
|
8
|
+
GhostCalendarGrid,
|
|
9
|
+
GhostCalendarHeader,
|
|
10
|
+
GhostCalendarHeading,
|
|
11
|
+
GhostCalendarNextButton,
|
|
12
|
+
GhostCalendarPrevButton,
|
|
13
|
+
GhostCard,
|
|
14
|
+
GhostSegmentedControl,
|
|
15
|
+
GhostSegmentedControlItem,
|
|
16
|
+
} from '@ghostvue/themes'
|
|
17
|
+
|
|
18
|
+
type OfficeId = 'austin' | 'berlin' | 'tokyo'
|
|
19
|
+
|
|
20
|
+
interface Office {
|
|
21
|
+
label: string
|
|
22
|
+
locale: string
|
|
23
|
+
/** 0 = Sunday. Set explicitly: not every browser reports a locale's week start. */
|
|
24
|
+
weekStartsOn: number
|
|
25
|
+
/** The calendar names its grid with `Intl`; the month buttons need your copy. */
|
|
26
|
+
previous: string
|
|
27
|
+
next: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const offices: Record<OfficeId, Office> = {
|
|
31
|
+
austin: {
|
|
32
|
+
label: 'Austin',
|
|
33
|
+
locale: 'en-US',
|
|
34
|
+
weekStartsOn: 0,
|
|
35
|
+
previous: 'Previous month',
|
|
36
|
+
next: 'Next month',
|
|
37
|
+
},
|
|
38
|
+
berlin: {
|
|
39
|
+
label: 'Berlin',
|
|
40
|
+
locale: 'de-DE',
|
|
41
|
+
weekStartsOn: 1,
|
|
42
|
+
previous: 'Vorheriger Monat',
|
|
43
|
+
next: 'Nächster Monat',
|
|
44
|
+
},
|
|
45
|
+
tokyo: {
|
|
46
|
+
label: 'Tokyo',
|
|
47
|
+
locale: 'ja-JP',
|
|
48
|
+
weekStartsOn: 0,
|
|
49
|
+
previous: '前の月',
|
|
50
|
+
next: '次の月',
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const officeId = shallowRef<OfficeId>('berlin')
|
|
55
|
+
const office = computed(() => offices[officeId.value])
|
|
56
|
+
|
|
57
|
+
const today = new CalendarDate(2024, 6, 3)
|
|
58
|
+
const visibleMonth = new CalendarDate(2024, 6, 1)
|
|
59
|
+
// A `CalendarDate` carries no locale: switching offices relabels the grid,
|
|
60
|
+
// but the selected day and the value sent to your API stay the same.
|
|
61
|
+
const reviewDay = shallowRef<DateValue>(new CalendarDate(2024, 6, 14))
|
|
62
|
+
|
|
63
|
+
const localDate = computed(() =>
|
|
64
|
+
new Intl.DateTimeFormat(office.value.locale, {
|
|
65
|
+
dateStyle: 'full',
|
|
66
|
+
timeZone: 'UTC',
|
|
67
|
+
}).format(reviewDay.value.toDate('UTC')),
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
function isOfficeId(value: string | undefined): value is OfficeId {
|
|
71
|
+
return value !== undefined && Object.hasOwn(offices, value)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function selectOffice(value: string | undefined): void {
|
|
75
|
+
// The segmented control reports `undefined` when its value is cleared;
|
|
76
|
+
// keep the current office so the calendar always has a locale.
|
|
77
|
+
if (isOfficeId(value)) officeId.value = value
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<GhostCard class="office-review">
|
|
83
|
+
<template #header>
|
|
84
|
+
<div class="office-review__header">
|
|
85
|
+
<h2 class="office-review__title">Quarterly review</h2>
|
|
86
|
+
<GhostSegmentedControl
|
|
87
|
+
:model-value="officeId"
|
|
88
|
+
aria-label="Office calendar"
|
|
89
|
+
@update:model-value="selectOffice"
|
|
90
|
+
>
|
|
91
|
+
<GhostSegmentedControlItem
|
|
92
|
+
v-for="(entry, id) in offices"
|
|
93
|
+
:key="id"
|
|
94
|
+
:value="id"
|
|
95
|
+
>
|
|
96
|
+
{{ entry.label }}
|
|
97
|
+
</GhostSegmentedControlItem>
|
|
98
|
+
</GhostSegmentedControl>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<!--
|
|
103
|
+
`lang` lets screen readers pronounce the localized month, weekday, and
|
|
104
|
+
button names. The themed root forwards other attributes to the headless
|
|
105
|
+
calendar, so the wrapper element carries it.
|
|
106
|
+
-->
|
|
107
|
+
<div :lang="office.locale">
|
|
108
|
+
<GhostCalendar
|
|
109
|
+
v-model="reviewDay"
|
|
110
|
+
:locale="office.locale"
|
|
111
|
+
:week-starts-on="office.weekStartsOn"
|
|
112
|
+
:default-visible-month="visibleMonth"
|
|
113
|
+
:today="today"
|
|
114
|
+
>
|
|
115
|
+
<GhostCalendarHeader class="office-review__nav">
|
|
116
|
+
<GhostCalendarHeading />
|
|
117
|
+
<GhostCalendarPrevButton :aria-label="office.previous" />
|
|
118
|
+
<GhostCalendarNextButton :aria-label="office.next" />
|
|
119
|
+
</GhostCalendarHeader>
|
|
120
|
+
<GhostCalendarGrid />
|
|
121
|
+
</GhostCalendar>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<template #footer>
|
|
125
|
+
<div class="office-review__status" role="status" aria-live="polite">
|
|
126
|
+
<dl class="office-review__summary">
|
|
127
|
+
<div>
|
|
128
|
+
<dt>{{ office.label }}</dt>
|
|
129
|
+
<dd :lang="office.locale">{{ localDate }}</dd>
|
|
130
|
+
</div>
|
|
131
|
+
<div>
|
|
132
|
+
<dt>Saved as</dt>
|
|
133
|
+
<dd>
|
|
134
|
+
<code>{{ reviewDay.toString() }}</code>
|
|
135
|
+
</dd>
|
|
136
|
+
</div>
|
|
137
|
+
</dl>
|
|
138
|
+
</div>
|
|
139
|
+
</template>
|
|
140
|
+
</GhostCard>
|
|
141
|
+
</template>
|
|
142
|
+
|
|
143
|
+
<style scoped>
|
|
144
|
+
.office-review {
|
|
145
|
+
inline-size: 100%;
|
|
146
|
+
max-inline-size: 22rem;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.office-review__header {
|
|
150
|
+
display: grid;
|
|
151
|
+
gap: var(--ghost-space-gap-sm);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Reset the docs prose heading so the card title keeps the card's type scale. */
|
|
155
|
+
.office-review__title {
|
|
156
|
+
border: 0;
|
|
157
|
+
color: var(--ghost-surface-fg);
|
|
158
|
+
font-size: var(--ghost-type-size-md);
|
|
159
|
+
font-weight: var(--ghost-type-weight-semibold);
|
|
160
|
+
line-height: var(--ghost-type-line-tight);
|
|
161
|
+
margin: 0;
|
|
162
|
+
padding: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.office-review__nav :deep(.ghost-calendar-heading) {
|
|
166
|
+
text-align: start;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.office-review__status {
|
|
170
|
+
inline-size: 100%;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.office-review__summary {
|
|
174
|
+
display: grid;
|
|
175
|
+
gap: var(--ghost-space-gap-xs);
|
|
176
|
+
font-size: var(--ghost-type-size-xs);
|
|
177
|
+
inline-size: 100%;
|
|
178
|
+
margin: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.office-review__summary div {
|
|
182
|
+
display: flex;
|
|
183
|
+
flex-wrap: wrap;
|
|
184
|
+
gap: var(--ghost-space-gap-xs);
|
|
185
|
+
justify-content: space-between;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.office-review__summary dt {
|
|
189
|
+
color: var(--ghost-text-muted);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.office-review__summary dd {
|
|
193
|
+
color: var(--ghost-surface-fg);
|
|
194
|
+
font-variant-numeric: tabular-nums;
|
|
195
|
+
margin: 0;
|
|
196
|
+
}
|
|
197
|
+
</style>
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
CalendarDate,
|
|
6
|
+
GhostCalendar,
|
|
7
|
+
GhostCalendarGrid,
|
|
8
|
+
GhostCalendarHeader,
|
|
9
|
+
GhostCalendarHeading,
|
|
10
|
+
GhostCalendarNextButton,
|
|
11
|
+
GhostCalendarPrevButton,
|
|
12
|
+
type GhostCalendarValue,
|
|
13
|
+
} from '@ghostvue/vue'
|
|
14
|
+
|
|
15
|
+
const range = shallowRef<GhostCalendarValue>({
|
|
16
|
+
start: new CalendarDate(2024, 6, 10),
|
|
17
|
+
end: new CalendarDate(2024, 6, 14),
|
|
18
|
+
})
|
|
19
|
+
const visibleMonth = new CalendarDate(2024, 6, 1)
|
|
20
|
+
const today = new CalendarDate(2024, 6, 12)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div class="calendar-demo">
|
|
25
|
+
<GhostCalendar
|
|
26
|
+
v-model="range"
|
|
27
|
+
selection-mode="range"
|
|
28
|
+
:default-visible-month="visibleMonth"
|
|
29
|
+
:today="today"
|
|
30
|
+
>
|
|
31
|
+
<GhostCalendarHeader>
|
|
32
|
+
<GhostCalendarPrevButton />
|
|
33
|
+
<GhostCalendarHeading />
|
|
34
|
+
<GhostCalendarNextButton />
|
|
35
|
+
</GhostCalendarHeader>
|
|
36
|
+
<GhostCalendarGrid />
|
|
37
|
+
</GhostCalendar>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
/*
|
|
43
|
+
* Headless GhostCalendar ships behavior only, so this sample brings its own
|
|
44
|
+
* consumer CSS. It is unscoped on purpose: the weekday header, weeks and day
|
|
45
|
+
* cells are rendered inside GhostCalendarGrid, where this component's scoped
|
|
46
|
+
* attribute does not reach, and the `calendar-demo` prefix keeps the rules
|
|
47
|
+
* from colliding with page styles. GhostCalendar renders no element of its
|
|
48
|
+
* own, so the sample wraps it in the `.calendar-demo` element. Every headless
|
|
49
|
+
* calendar example carries this same block (a test keeps them identical), so
|
|
50
|
+
* copy it once per app.
|
|
51
|
+
*
|
|
52
|
+
* Colors read GhostVue semantic tokens when a theme is loaded and fall back
|
|
53
|
+
* to CSS system colors, which follow light and dark on their own. The month
|
|
54
|
+
* grid mirrors the themed calendar recipe: one 7-column template shared by
|
|
55
|
+
* the weekday header and every week, and distinct today, selected, range,
|
|
56
|
+
* outside-month and unavailable states that only change color, border or
|
|
57
|
+
* decoration, so the grid never shifts. Nothing animates, so reduced motion
|
|
58
|
+
* needs no override.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/* Fluid up to a comfortable month width, so narrow previews never overflow. */
|
|
62
|
+
.calendar-demo {
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
color: var(--ghost-surface-fg, CanvasText);
|
|
65
|
+
display: grid;
|
|
66
|
+
gap: 0.5rem;
|
|
67
|
+
inline-size: 100%;
|
|
68
|
+
max-inline-size: 19rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.calendar-demo [data-part='header'] {
|
|
72
|
+
align-items: center;
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: 0.25rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
* The heading is a real `<h2>`. Every box and type property is set here so a
|
|
79
|
+
* host page's prose heading styles (margins, rules, large type) cannot leak
|
|
80
|
+
* into the calendar.
|
|
81
|
+
*/
|
|
82
|
+
.calendar-demo [data-part='heading'] {
|
|
83
|
+
border: 0;
|
|
84
|
+
flex: 1;
|
|
85
|
+
font-size: 0.9375rem;
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
letter-spacing: normal;
|
|
88
|
+
line-height: 1.3;
|
|
89
|
+
margin: 0;
|
|
90
|
+
padding: 0;
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.calendar-demo :is([data-part='prev'], [data-part='next']) {
|
|
95
|
+
background-color: var(--ghost-elevation-1-bg, ButtonFace);
|
|
96
|
+
border: 1px solid var(--ghost-border-strong, ButtonBorder);
|
|
97
|
+
border-radius: var(--ghost-radius-md, 0.375rem);
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
color: var(--ghost-surface-fg, ButtonText);
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
font: inherit;
|
|
102
|
+
font-size: 0.8125rem;
|
|
103
|
+
min-block-size: 2.25rem;
|
|
104
|
+
padding: 0 0.5rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.calendar-demo
|
|
108
|
+
:is([data-part='prev'], [data-part='next']):hover:not(:disabled) {
|
|
109
|
+
background-color: var(--ghost-surface-muted-bg, ButtonFace);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.calendar-demo :is([data-part='prev'], [data-part='next']):disabled {
|
|
113
|
+
color: var(--ghost-text-subtle, GrayText);
|
|
114
|
+
cursor: not-allowed;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.calendar-demo :is([data-part='prev'], [data-part='next']):focus-visible {
|
|
118
|
+
outline: 2px solid var(--ghost-focus-ring-color, Highlight);
|
|
119
|
+
outline-offset: 2px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Weekday header and weeks share one 7-column template, so columns align. */
|
|
123
|
+
.calendar-demo [data-part='grid'] {
|
|
124
|
+
display: grid;
|
|
125
|
+
gap: 0.125rem;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.calendar-demo [data-part='grid'] > [role='row'] {
|
|
129
|
+
display: grid;
|
|
130
|
+
gap: 0.125rem;
|
|
131
|
+
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.calendar-demo [role='columnheader'] {
|
|
135
|
+
color: var(--ghost-text-muted, GrayText);
|
|
136
|
+
font-size: 0.75rem;
|
|
137
|
+
font-weight: 500;
|
|
138
|
+
padding-block: 0.25rem;
|
|
139
|
+
text-align: center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.calendar-demo [data-part='cell'] {
|
|
143
|
+
aspect-ratio: 1;
|
|
144
|
+
background: transparent;
|
|
145
|
+
border: 1px solid transparent;
|
|
146
|
+
border-radius: var(--ghost-radius-md, 0.375rem);
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
color: inherit;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
font: inherit;
|
|
151
|
+
font-variant-numeric: tabular-nums;
|
|
152
|
+
padding: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Zero-specificity hover, so the state fills below always win. */
|
|
156
|
+
.calendar-demo
|
|
157
|
+
[data-part='cell']:where(:hover:not(:disabled, [aria-disabled])) {
|
|
158
|
+
background-color: var(--ghost-surface-muted-bg, ButtonFace);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Adjacent-month days fill the first and last weeks but are not selectable. */
|
|
162
|
+
.calendar-demo [data-part='cell'][data-outside-month] {
|
|
163
|
+
color: var(--ghost-text-subtle, GrayText);
|
|
164
|
+
cursor: default;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.calendar-demo [data-part='cell'][data-today] {
|
|
168
|
+
border-color: var(--ghost-border-primary, CanvasText);
|
|
169
|
+
color: var(--ghost-text-primary, CanvasText);
|
|
170
|
+
font-weight: 600;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Unavailable days are struck through: distinct from adjacent-month days. */
|
|
174
|
+
.calendar-demo
|
|
175
|
+
[data-part='cell']:is(:disabled, [aria-disabled='true']):not(
|
|
176
|
+
[data-outside-month]
|
|
177
|
+
) {
|
|
178
|
+
color: var(--ghost-text-subtle, GrayText);
|
|
179
|
+
cursor: not-allowed;
|
|
180
|
+
text-decoration: line-through;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.calendar-demo [data-part='cell'][data-state='range-middle'] {
|
|
184
|
+
background-color: var(--ghost-surface-muted-bg, ButtonFace);
|
|
185
|
+
color: var(--ghost-surface-fg, CanvasText);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.calendar-demo
|
|
189
|
+
[data-part='cell']:is(
|
|
190
|
+
[data-state='selected'],
|
|
191
|
+
[data-state='range-start'],
|
|
192
|
+
[data-state='range-end']
|
|
193
|
+
) {
|
|
194
|
+
background-color: var(--ghost-action-primary-bg, Highlight);
|
|
195
|
+
border-color: var(--ghost-action-primary-border, Highlight);
|
|
196
|
+
color: var(--ghost-action-primary-fg, HighlightText);
|
|
197
|
+
font-weight: 600;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.calendar-demo [data-part='cell']:focus-visible {
|
|
201
|
+
outline: 2px solid var(--ghost-focus-ring-color, Highlight);
|
|
202
|
+
outline-offset: 2px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* Forced colors: only today keeps a CanvasText border; inactive days use
|
|
207
|
+
* GrayText. Selected days and range ends become Highlight cells (opted out
|
|
208
|
+
* so HighlightText stays on Highlight); range middles keep a Highlight
|
|
209
|
+
* border so the span still reads.
|
|
210
|
+
*/
|
|
211
|
+
@media (forced-colors: active) {
|
|
212
|
+
.calendar-demo [data-part='cell'] {
|
|
213
|
+
border-color: Canvas;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.calendar-demo [data-part='cell']:is(:disabled, [aria-disabled='true']) {
|
|
217
|
+
color: GrayText;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.calendar-demo [data-part='cell'][data-state='range-middle'] {
|
|
221
|
+
border-color: Highlight;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* After the range rule, so today stays marked inside a selected span. */
|
|
225
|
+
.calendar-demo [data-part='cell'][data-today] {
|
|
226
|
+
border-color: CanvasText;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.calendar-demo
|
|
230
|
+
[data-part='cell']:is(
|
|
231
|
+
[data-state='selected'],
|
|
232
|
+
[data-state='range-start'],
|
|
233
|
+
[data-state='range-end']
|
|
234
|
+
) {
|
|
235
|
+
background-color: Highlight;
|
|
236
|
+
border-color: Highlight;
|
|
237
|
+
color: HighlightText;
|
|
238
|
+
forced-color-adjust: none;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
</style>
|