@ghostvue/vue 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 +40 -2
- package/dist/.registries/component-names.generated.d.ts +3 -0
- package/dist/GhostAccordion.vue.d.ts +38 -0
- package/dist/GhostAccordionContent.vue.d.ts +26 -0
- package/dist/GhostAccordionItem.vue.d.ts +20 -0
- package/dist/GhostAccordionTrigger.vue.d.ts +23 -0
- package/dist/GhostAvatar.vue.d.ts +27 -0
- package/dist/GhostBadge.vue.d.ts +16 -0
- package/dist/GhostBreadcrumb.vue.d.ts +28 -0
- package/dist/GhostBreadcrumbEllipsis.vue.d.ts +20 -0
- package/dist/GhostBreadcrumbItem.vue.d.ts +25 -0
- package/dist/GhostBreadcrumbLink.vue.d.ts +25 -0
- package/dist/GhostBreadcrumbList.vue.d.ts +25 -0
- package/dist/GhostBreadcrumbPage.vue.d.ts +25 -0
- package/dist/GhostBreadcrumbSeparator.vue.d.ts +25 -0
- package/dist/GhostButton.vue.d.ts +25 -0
- package/dist/GhostCalendar.vue.d.ts +57 -0
- package/dist/GhostCalendarCell.vue.d.ts +35 -0
- package/dist/GhostCalendarGrid.vue.d.ts +19 -0
- package/dist/GhostCalendarHeader.vue.d.ts +24 -0
- package/dist/GhostCalendarHeading.vue.d.ts +22 -0
- package/dist/GhostCalendarNextButton.vue.d.ts +24 -0
- package/dist/GhostCalendarPrevButton.vue.d.ts +24 -0
- package/dist/GhostCard.vue.d.ts +18 -0
- package/dist/GhostCheckbox.vue.d.ts +48 -0
- package/dist/GhostCheckboxGroup.vue.d.ts +24 -0
- package/dist/GhostCollapsible.vue.d.ts +31 -0
- package/dist/GhostCollapsibleContent.vue.d.ts +30 -0
- package/dist/GhostCollapsibleTrigger.vue.d.ts +28 -0
- package/dist/GhostCombobox.vue.d.ts +69 -0
- package/dist/GhostComboboxContent.vue.d.ts +41 -0
- package/dist/GhostComboboxEmpty.vue.d.ts +21 -0
- package/dist/GhostComboboxGroup.vue.d.ts +21 -0
- package/dist/GhostComboboxInput.vue.d.ts +11 -0
- package/dist/GhostComboboxLabel.vue.d.ts +21 -0
- package/dist/GhostComboboxOption.vue.d.ts +29 -0
- package/dist/GhostComboboxTrigger.vue.d.ts +26 -0
- package/dist/GhostCommandPalette.vue.d.ts +57 -0
- package/dist/GhostCommandPaletteContent.vue.d.ts +47 -0
- package/dist/GhostCommandPaletteEmpty.vue.d.ts +25 -0
- package/dist/GhostCommandPaletteGroup.vue.d.ts +25 -0
- package/dist/GhostCommandPaletteInput.vue.d.ts +13 -0
- package/dist/GhostCommandPaletteItem.vue.d.ts +33 -0
- package/dist/GhostCommandPaletteLabel.vue.d.ts +25 -0
- package/dist/GhostCommandPaletteList.vue.d.ts +25 -0
- package/dist/GhostCommandPaletteOverlay.vue.d.ts +32 -0
- package/dist/GhostCommandPaletteSeparator.vue.d.ts +10 -0
- package/dist/GhostCommandPaletteTitle.vue.d.ts +25 -0
- package/dist/GhostCommandPaletteTrigger.vue.d.ts +28 -0
- package/dist/GhostContextMenu.vue.d.ts +26 -0
- package/dist/GhostContextMenuCheckboxItem.vue.d.ts +63 -0
- package/dist/GhostContextMenuContent.vue.d.ts +39 -0
- package/dist/GhostContextMenuGroup.vue.d.ts +21 -0
- package/dist/GhostContextMenuItem.vue.d.ts +30 -0
- package/dist/GhostContextMenuLabel.vue.d.ts +21 -0
- package/dist/GhostContextMenuRadioGroup.vue.d.ts +31 -0
- package/dist/GhostContextMenuRadioItem.vue.d.ts +31 -0
- package/dist/GhostContextMenuSeparator.vue.d.ts +11 -0
- package/dist/GhostContextMenuTrigger.vue.d.ts +28 -0
- package/dist/GhostDataTable.vue.d.ts +29 -0
- package/dist/GhostDataTablePreset.vue.d.ts +21 -0
- package/dist/GhostDataTableTable.vue.d.ts +20 -0
- package/dist/GhostDatePicker.vue.d.ts +106 -0
- package/dist/GhostDatePickerCalendar.vue.d.ts +16 -0
- package/dist/GhostDatePickerContent.vue.d.ts +46 -0
- package/dist/GhostDatePickerInput.vue.d.ts +19 -0
- package/dist/GhostDatePickerTrigger.vue.d.ts +14 -0
- package/dist/GhostDialog.vue.d.ts +31 -0
- package/dist/GhostDialogClose.vue.d.ts +28 -0
- package/dist/GhostDialogContent.vue.d.ts +50 -0
- package/dist/GhostDialogDescription.vue.d.ts +25 -0
- package/dist/GhostDialogOverlay.vue.d.ts +32 -0
- package/dist/GhostDialogTitle.vue.d.ts +25 -0
- package/dist/GhostDialogTrigger.vue.d.ts +28 -0
- package/dist/GhostDrawer.vue.d.ts +39 -0
- package/dist/GhostDrawerClose.vue.d.ts +28 -0
- package/dist/GhostDrawerContent.vue.d.ts +47 -0
- package/dist/GhostDrawerDescription.vue.d.ts +25 -0
- package/dist/GhostDrawerOverlay.vue.d.ts +32 -0
- package/dist/GhostDrawerTitle.vue.d.ts +25 -0
- package/dist/GhostDrawerTrigger.vue.d.ts +28 -0
- package/dist/GhostDropdownMenu.vue.d.ts +26 -0
- package/dist/GhostDropdownMenuCheckboxItem.vue.d.ts +63 -0
- package/dist/GhostDropdownMenuContent.vue.d.ts +39 -0
- package/dist/GhostDropdownMenuGroup.vue.d.ts +21 -0
- package/dist/GhostDropdownMenuItem.vue.d.ts +30 -0
- package/dist/GhostDropdownMenuLabel.vue.d.ts +21 -0
- package/dist/GhostDropdownMenuRadioGroup.vue.d.ts +31 -0
- package/dist/GhostDropdownMenuRadioItem.vue.d.ts +31 -0
- package/dist/GhostDropdownMenuSeparator.vue.d.ts +11 -0
- package/dist/GhostDropdownMenuTrigger.vue.d.ts +26 -0
- package/dist/GhostEmptyState.vue.d.ts +19 -0
- package/dist/GhostField.vue.d.ts +31 -0
- package/dist/GhostFieldControl.vue.d.ts +13 -0
- package/dist/GhostFieldDescription.vue.d.ts +21 -0
- package/dist/GhostFieldError.vue.d.ts +18 -0
- package/dist/GhostFieldLabel.vue.d.ts +30 -0
- package/dist/GhostFileUpload.vue.d.ts +64 -0
- package/dist/GhostFileUploadDropzone.vue.d.ts +13 -0
- package/dist/GhostFileUploadItem.vue.d.ts +17 -0
- package/dist/GhostFileUploadItemRemove.vue.d.ts +13 -0
- package/dist/GhostFileUploadList.vue.d.ts +13 -0
- package/dist/GhostFileUploadTrigger.vue.d.ts +19 -0
- package/dist/GhostForm.vue.d.ts +25 -0
- package/dist/GhostHoverCard.vue.d.ts +37 -0
- package/dist/GhostHoverCardContent.vue.d.ts +47 -0
- package/dist/GhostHoverCardTrigger.vue.d.ts +28 -0
- package/dist/GhostInlineAlert.vue.d.ts +19 -0
- package/dist/GhostInput.vue.d.ts +26 -0
- package/dist/GhostInteractiveSurface.vue.d.ts +25 -0
- package/dist/GhostKbd.vue.d.ts +25 -0
- package/dist/GhostLink.vue.d.ts +25 -0
- package/dist/GhostMenubar.vue.d.ts +27 -0
- package/dist/GhostMenubarCheckboxItem.vue.d.ts +63 -0
- package/dist/GhostMenubarContent.vue.d.ts +39 -0
- package/dist/GhostMenubarGroup.vue.d.ts +21 -0
- package/dist/GhostMenubarItem.vue.d.ts +30 -0
- package/dist/GhostMenubarLabel.vue.d.ts +21 -0
- package/dist/GhostMenubarMenu.vue.d.ts +26 -0
- package/dist/GhostMenubarRadioGroup.vue.d.ts +31 -0
- package/dist/GhostMenubarRadioItem.vue.d.ts +31 -0
- package/dist/GhostMenubarSeparator.vue.d.ts +11 -0
- package/dist/GhostMenubarTrigger.vue.d.ts +26 -0
- package/dist/GhostNumberInput.vue.d.ts +37 -0
- package/dist/GhostPagination.vue.d.ts +53 -0
- package/dist/GhostPopover.vue.d.ts +28 -0
- package/dist/GhostPopoverClose.vue.d.ts +28 -0
- package/dist/GhostPopoverContent.vue.d.ts +47 -0
- package/dist/GhostPopoverTrigger.vue.d.ts +28 -0
- package/dist/GhostPortal.vue.d.ts +28 -0
- package/dist/GhostPresence.vue.d.ts +27 -0
- package/dist/GhostProgress.vue.d.ts +14 -0
- package/dist/GhostRadioGroup.vue.d.ts +36 -0
- package/dist/GhostRadioGroupItem.vue.d.ts +10 -0
- package/dist/GhostScrollArea.vue.d.ts +17 -0
- package/dist/GhostScrollSpy.vue.d.ts +57 -0
- package/dist/GhostScrollSpyItem.vue.d.ts +26 -0
- package/dist/GhostScrollSpyLink.vue.d.ts +27 -0
- package/dist/GhostScrollSpyList.vue.d.ts +24 -0
- package/dist/GhostSegmentedControl.vue.d.ts +44 -0
- package/dist/GhostSegmentedControlIndicator.vue.d.ts +3 -0
- package/dist/GhostSegmentedControlItem.vue.d.ts +30 -0
- package/dist/GhostSelect.vue.d.ts +24 -0
- package/dist/GhostSelectContent.vue.d.ts +41 -0
- package/dist/GhostSelectGroup.vue.d.ts +21 -0
- package/dist/GhostSelectLabel.vue.d.ts +21 -0
- package/dist/GhostSelectOption.vue.d.ts +29 -0
- package/dist/GhostSelectTrigger.vue.d.ts +26 -0
- package/dist/GhostSelectValue.vue.d.ts +14 -0
- package/dist/GhostSeparator.vue.d.ts +7 -0
- package/dist/GhostSkeleton.vue.d.ts +18 -0
- package/dist/GhostSlider.vue.d.ts +141 -0
- package/dist/GhostSpinner.vue.d.ts +8 -0
- package/dist/GhostSubmenu.vue.d.ts +23 -0
- package/dist/GhostSubmenuContent.vue.d.ts +20 -0
- package/dist/GhostSubmenuTrigger.vue.d.ts +17 -0
- package/dist/GhostSwitch.vue.d.ts +37 -0
- package/dist/GhostTable.vue.d.ts +15 -0
- package/dist/GhostTableBody.vue.d.ts +13 -0
- package/dist/GhostTableCaption.vue.d.ts +13 -0
- package/dist/GhostTableCell.vue.d.ts +13 -0
- package/dist/GhostTableFoot.vue.d.ts +13 -0
- package/dist/GhostTableHead.vue.d.ts +13 -0
- package/dist/GhostTableHeaderCell.vue.d.ts +13 -0
- package/dist/GhostTableRow.vue.d.ts +13 -0
- package/dist/GhostTabs.vue.d.ts +37 -0
- package/dist/GhostTabsContent.vue.d.ts +27 -0
- package/dist/GhostTabsList.vue.d.ts +25 -0
- package/dist/GhostTabsTrigger.vue.d.ts +30 -0
- package/dist/GhostTagsInput.vue.d.ts +26 -0
- package/dist/GhostTextarea.vue.d.ts +29 -0
- package/dist/GhostToast.vue.d.ts +17 -0
- package/dist/GhostToastAction.vue.d.ts +17 -0
- package/dist/GhostToastClose.vue.d.ts +16 -0
- package/dist/GhostToastDescription.vue.d.ts +12 -0
- package/dist/GhostToastProvider.vue.d.ts +24 -0
- package/dist/GhostToastTitle.vue.d.ts +12 -0
- package/dist/GhostToastViewport.vue.d.ts +25 -0
- package/dist/GhostToggleGroup.vue.d.ts +41 -0
- package/dist/GhostToggleGroupItem.vue.d.ts +30 -0
- package/dist/GhostToolbar.vue.d.ts +29 -0
- package/dist/GhostTooltip.vue.d.ts +36 -0
- package/dist/GhostTooltipContent.vue.d.ts +47 -0
- package/dist/GhostTooltipProvider.vue.d.ts +16 -0
- package/dist/GhostTooltipTrigger.vue.d.ts +28 -0
- package/dist/GhostTree.vue.d.ts +59 -0
- package/dist/GhostTreeGroup.vue.d.ts +22 -0
- package/dist/GhostTreeItem.vue.d.ts +27 -0
- package/dist/GhostTreeTrigger.vue.d.ts +25 -0
- package/dist/GhostVisuallyHidden.vue.d.ts +19 -0
- package/dist/accordion-header-keyboard.d.ts +11 -0
- package/dist/calendar-date-math.d.ts +16 -0
- package/dist/calendar-intl.d.ts +7 -0
- package/dist/calendar-public-date.d.ts +1 -0
- package/dist/command-palette-context.d.ts +6 -0
- package/dist/data-table-interaction.d.ts +57 -0
- package/dist/data-table-processing.d.ts +32 -0
- package/dist/data-table-render.d.ts +40 -0
- package/dist/data-table-slot-bindings.d.ts +21 -0
- package/dist/date-picker-calendar-bridge.d.ts +25 -0
- package/dist/date-picker-value.d.ts +33 -0
- package/dist/define-data-table-columns.d.ts +89 -0
- package/dist/dev-codes.d.ts +179 -0
- package/dist/dialog-shared.d.ts +178 -0
- package/dist/dismissable-layer-stack.d.ts +28 -0
- package/dist/form-reset.d.ts +29 -0
- package/dist/get-pagination-range.d.ts +24 -0
- package/dist/get-tabbable-elements.d.ts +22 -0
- package/dist/ghost-accordion.d.ts +120 -0
- package/dist/ghost-avatar.d.ts +41 -0
- package/dist/ghost-badge.d.ts +11 -0
- package/dist/ghost-breadcrumb.d.ts +114 -0
- package/dist/ghost-button.d.ts +39 -0
- package/dist/ghost-calendar.d.ts +148 -0
- package/dist/ghost-card.d.ts +29 -0
- package/dist/ghost-checkbox-group.d.ts +88 -0
- package/dist/ghost-checkbox.d.ts +51 -0
- package/dist/ghost-collapsible.d.ts +104 -0
- package/dist/ghost-combobox.d.ts +217 -0
- package/dist/ghost-command-palette.d.ts +377 -0
- package/dist/ghost-context-menu.d.ts +226 -0
- package/dist/ghost-data-table-preset.d.ts +107 -0
- package/dist/ghost-data-table-table.d.ts +76 -0
- package/dist/ghost-data-table.d.ts +508 -0
- package/dist/ghost-date-picker.d.ts +301 -0
- package/dist/ghost-dialog.d.ts +256 -0
- package/dist/ghost-drawer.d.ts +268 -0
- package/dist/ghost-dropdown-menu.d.ts +226 -0
- package/dist/ghost-empty-state.d.ts +26 -0
- package/dist/ghost-field.d.ts +172 -0
- package/dist/ghost-file-upload-accept.d.ts +32 -0
- package/dist/ghost-file-upload-messages.d.ts +14 -0
- package/dist/ghost-file-upload.d.ts +325 -0
- package/dist/ghost-form.d.ts +273 -0
- package/dist/ghost-hover-card.d.ts +192 -0
- package/dist/ghost-inline-alert.d.ts +34 -0
- package/dist/ghost-input.d.ts +71 -0
- package/dist/ghost-interactive-surface.d.ts +41 -0
- package/dist/ghost-kbd.d.ts +39 -0
- package/dist/ghost-link.d.ts +58 -0
- package/dist/ghost-menubar.d.ts +260 -0
- package/dist/ghost-number-input.d.ts +88 -0
- package/dist/ghost-pagination.d.ts +92 -0
- package/dist/ghost-popover.d.ts +188 -0
- package/dist/ghost-portal.d.ts +21 -0
- package/dist/ghost-presence.d.ts +78 -0
- package/dist/ghost-progress.d.ts +40 -0
- package/dist/ghost-radio-group.d.ts +100 -0
- package/dist/ghost-scroll-area.d.ts +46 -0
- package/dist/ghost-scroll-spy.d.ts +150 -0
- package/dist/ghost-segmented-control.d.ts +124 -0
- package/dist/ghost-select.d.ts +188 -0
- package/dist/ghost-separator.d.ts +33 -0
- package/dist/ghost-skeleton.d.ts +14 -0
- package/dist/ghost-slider.d.ts +99 -0
- package/dist/ghost-spinner.d.ts +22 -0
- package/dist/ghost-submenu.d.ts +20 -0
- package/dist/ghost-switch.d.ts +77 -0
- package/dist/ghost-table.d.ts +62 -0
- package/dist/ghost-tabs.d.ts +154 -0
- package/dist/ghost-tags-input.d.ts +41 -0
- package/dist/ghost-textarea.d.ts +78 -0
- package/dist/ghost-toast.d.ts +219 -0
- package/dist/ghost-toggle-group.d.ts +123 -0
- package/dist/ghost-toolbar.d.ts +23 -0
- package/dist/ghost-tooltip-provider.d.ts +48 -0
- package/dist/ghost-tooltip.d.ts +190 -0
- package/dist/ghost-tree.d.ts +355 -0
- package/dist/ghost-visually-hidden.d.ts +27 -0
- package/dist/ghostvue.js +19653 -0
- package/dist/has-tabbable-descendants.d.ts +2 -0
- package/dist/index.d.ts +322 -0
- package/dist/invoke-attr-handler.d.ts +15 -0
- package/dist/is-ime-composing.d.ts +28 -0
- package/dist/manifest.json +18406 -0
- package/dist/measure-scroll-overflow.d.ts +6 -0
- package/dist/menu-item-activation.d.ts +39 -0
- package/dist/resolver.d.ts +49 -0
- package/dist/resolver.js +14 -0
- package/dist/scroll-spy-motion.d.ts +26 -0
- package/dist/sort-by-document-order.d.ts +23 -0
- package/dist/sync-calendar-focus-tab-stops.d.ts +2 -0
- package/dist/sync-segmented-control-item-order.d.ts +5 -0
- package/dist/sync-tabs-selection-tab-stops.d.ts +7 -0
- package/dist/sync-toggle-group-selection-tab-stops.d.ts +14 -0
- package/dist/track-reactive-reads.d.ts +13 -0
- package/dist/typeahead-match.d.ts +15 -0
- package/dist/use-collapsible-content-hidden.d.ts +28 -0
- package/dist/use-controllable-state.d.ts +20 -0
- package/dist/use-dismissable-layer.d.ts +48 -0
- package/dist/use-floating.d.ts +38 -0
- package/dist/use-focus-scope.d.ts +41 -0
- package/dist/use-ghost-accordion.d.ts +5 -0
- package/dist/use-ghost-avatar.d.ts +28 -0
- package/dist/use-ghost-badge.d.ts +13 -0
- package/dist/use-ghost-breadcrumb.d.ts +19 -0
- package/dist/use-ghost-button.d.ts +18 -0
- package/dist/use-ghost-calendar.d.ts +3 -0
- package/dist/use-ghost-card.d.ts +15 -0
- package/dist/use-ghost-checkbox-group.d.ts +13 -0
- package/dist/use-ghost-checkbox.d.ts +24 -0
- package/dist/use-ghost-collapsible.d.ts +8 -0
- package/dist/use-ghost-combobox.d.ts +65 -0
- package/dist/use-ghost-command-palette.d.ts +24 -0
- package/dist/use-ghost-context-menu.d.ts +14 -0
- package/dist/use-ghost-data-table.d.ts +55 -0
- package/dist/use-ghost-date-picker.d.ts +11 -0
- package/dist/use-ghost-dialog.d.ts +10 -0
- package/dist/use-ghost-drawer.d.ts +11 -0
- package/dist/use-ghost-dropdown-menu.d.ts +5 -0
- package/dist/use-ghost-empty-state.d.ts +18 -0
- package/dist/use-ghost-field-part-content.d.ts +15 -0
- package/dist/use-ghost-field.d.ts +10 -0
- package/dist/use-ghost-file-upload.d.ts +16 -0
- package/dist/use-ghost-form.d.ts +7 -0
- package/dist/use-ghost-hover-card.d.ts +8 -0
- package/dist/use-ghost-id.d.ts +6 -0
- package/dist/use-ghost-inline-alert.d.ts +20 -0
- package/dist/use-ghost-input.d.ts +29 -0
- package/dist/use-ghost-interactive-surface.d.ts +21 -0
- package/dist/use-ghost-kbd.d.ts +35 -0
- package/dist/use-ghost-link.d.ts +20 -0
- package/dist/use-ghost-menu-branch.d.ts +54 -0
- package/dist/use-ghost-menu-collection.d.ts +30 -0
- package/dist/use-ghost-menu-root.d.ts +13 -0
- package/dist/use-ghost-menubar-menu.d.ts +3 -0
- package/dist/use-ghost-menubar.d.ts +10 -0
- package/dist/use-ghost-number-input.d.ts +63 -0
- package/dist/use-ghost-pagination.d.ts +22 -0
- package/dist/use-ghost-popover.d.ts +8 -0
- package/dist/use-ghost-presence.d.ts +48 -0
- package/dist/use-ghost-progress.d.ts +33 -0
- package/dist/use-ghost-radio-group.d.ts +5 -0
- package/dist/use-ghost-scroll-area.d.ts +23 -0
- package/dist/use-ghost-scroll-spy.d.ts +25 -0
- package/dist/use-ghost-segmented-control.d.ts +6 -0
- package/dist/use-ghost-select.d.ts +62 -0
- package/dist/use-ghost-separator.d.ts +19 -0
- package/dist/use-ghost-skeleton.d.ts +19 -0
- package/dist/use-ghost-slider.d.ts +65 -0
- package/dist/use-ghost-spinner.d.ts +18 -0
- package/dist/use-ghost-switch.d.ts +39 -0
- package/dist/use-ghost-table.d.ts +70 -0
- package/dist/use-ghost-tabs.d.ts +5 -0
- package/dist/use-ghost-textarea.d.ts +44 -0
- package/dist/use-ghost-toast.d.ts +56 -0
- package/dist/use-ghost-toggle-group.d.ts +6 -0
- package/dist/use-ghost-toolbar.d.ts +23 -0
- package/dist/use-ghost-tooltip.d.ts +8 -0
- package/dist/use-ghost-tree.d.ts +14 -0
- package/dist/use-ghost-visually-hidden.d.ts +35 -0
- package/dist/use-inert-others.d.ts +20 -0
- package/dist/use-roving-focus.d.ts +22 -0
- package/dist/use-scroll-lock.d.ts +13 -0
- package/package.json +60 -4
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { Placement, Strategy } from '@floating-ui/dom';
|
|
2
|
+
import type { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
import type { GhostPortalTarget } from './ghost-portal.js';
|
|
4
|
+
/** Valid `as` targets for {@link GhostHoverCardTrigger}. */
|
|
5
|
+
export type GhostHoverCardTriggerElement = string | Component;
|
|
6
|
+
/** Valid `as` targets for {@link GhostHoverCardContent}. */
|
|
7
|
+
export type GhostHoverCardContentElement = string | Component;
|
|
8
|
+
/** Supported floating placements relative to the trigger anchor. */
|
|
9
|
+
export type GhostHoverCardPlacement = Placement;
|
|
10
|
+
/** Supported CSS positioning strategies for floating content. */
|
|
11
|
+
export type GhostHoverCardStrategy = Strategy;
|
|
12
|
+
/** Viewport/boundary padding accepted by hover-card flip and shift options. */
|
|
13
|
+
export type GhostHoverCardPadding = number | {
|
|
14
|
+
top?: number;
|
|
15
|
+
right?: number;
|
|
16
|
+
bottom?: number;
|
|
17
|
+
left?: number;
|
|
18
|
+
};
|
|
19
|
+
/** Distance or axis offsets between trigger and hover-card content. */
|
|
20
|
+
export type GhostHoverCardOffsetOptions = number | {
|
|
21
|
+
mainAxis?: number;
|
|
22
|
+
crossAxis?: number;
|
|
23
|
+
alignmentAxis?: number | null;
|
|
24
|
+
};
|
|
25
|
+
/** Collision flip options for {@link GhostHoverCardContent}. */
|
|
26
|
+
export interface GhostHoverCardFlipOptions {
|
|
27
|
+
mainAxis?: boolean;
|
|
28
|
+
crossAxis?: boolean;
|
|
29
|
+
fallbackPlacements?: GhostHoverCardPlacement[];
|
|
30
|
+
padding?: GhostHoverCardPadding;
|
|
31
|
+
boundary?: Element | Element[];
|
|
32
|
+
}
|
|
33
|
+
/** Collision shift options for {@link GhostHoverCardContent}. */
|
|
34
|
+
export interface GhostHoverCardShiftOptions {
|
|
35
|
+
mainAxis?: boolean;
|
|
36
|
+
crossAxis?: boolean;
|
|
37
|
+
padding?: GhostHoverCardPadding;
|
|
38
|
+
boundary?: Element | Element[];
|
|
39
|
+
}
|
|
40
|
+
/** Props for the {@link GhostHoverCard} root provider component. */
|
|
41
|
+
export interface GhostHoverCardProps {
|
|
42
|
+
/**
|
|
43
|
+
* Controlled open state. Omit to run uncontrolled from `defaultOpen`.
|
|
44
|
+
* @default undefined
|
|
45
|
+
*/
|
|
46
|
+
open?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Initial open state when `open` is omitted.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
defaultOpen?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Milliseconds before showing after hover or focus begins.
|
|
54
|
+
* @default 700
|
|
55
|
+
*/
|
|
56
|
+
openDelay?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Milliseconds before hiding after hover/focus leaves the trigger and content.
|
|
59
|
+
* @default 300
|
|
60
|
+
*/
|
|
61
|
+
closeDelay?: number;
|
|
62
|
+
/**
|
|
63
|
+
* When `true`, `Escape` dismisses the open card via `useDismissableLayer`.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
closeOnEscape?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/** Props passed to the {@link GhostHoverCard} default slot. */
|
|
69
|
+
export interface GhostHoverCardSlotProps {
|
|
70
|
+
open: boolean;
|
|
71
|
+
close: () => void;
|
|
72
|
+
}
|
|
73
|
+
/** Props for {@link GhostHoverCardTrigger}. */
|
|
74
|
+
export interface GhostHoverCardTriggerProps {
|
|
75
|
+
/**
|
|
76
|
+
* Tag name or component rendered for the trigger control.
|
|
77
|
+
* @default 'button'
|
|
78
|
+
*/
|
|
79
|
+
as?: GhostHoverCardTriggerElement;
|
|
80
|
+
/**
|
|
81
|
+
* Prevents scheduling show on hover or focus when `true`.
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** Props for {@link GhostHoverCardContent}. */
|
|
87
|
+
export interface GhostHoverCardContentProps {
|
|
88
|
+
/**
|
|
89
|
+
* Tag name or component rendered for the card surface.
|
|
90
|
+
* @default 'div'
|
|
91
|
+
*/
|
|
92
|
+
as?: GhostHoverCardContentElement;
|
|
93
|
+
/**
|
|
94
|
+
* Preferred placement relative to the trigger.
|
|
95
|
+
* @default 'bottom'
|
|
96
|
+
*/
|
|
97
|
+
placement?: GhostHoverCardPlacement;
|
|
98
|
+
/**
|
|
99
|
+
* Distance or axis offsets passed to `useFloating`.
|
|
100
|
+
* @default undefined
|
|
101
|
+
*/
|
|
102
|
+
offset?: GhostHoverCardOffsetOptions | boolean | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Flip to an opposite side when overflowing the viewport or boundary.
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
flip?: boolean | GhostHoverCardFlipOptions;
|
|
108
|
+
/**
|
|
109
|
+
* Shift along the cross axis to keep the card in view.
|
|
110
|
+
* @default true
|
|
111
|
+
*/
|
|
112
|
+
shift?: boolean | GhostHoverCardShiftOptions;
|
|
113
|
+
/**
|
|
114
|
+
* CSS positioning strategy passed to `useFloating`.
|
|
115
|
+
* @default 'absolute'
|
|
116
|
+
*/
|
|
117
|
+
strategy?: GhostHoverCardStrategy;
|
|
118
|
+
/**
|
|
119
|
+
* Teleport content through {@link GhostPortal} when `true`, or render inline when `false`.
|
|
120
|
+
* @default true
|
|
121
|
+
*/
|
|
122
|
+
portal?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Teleport target passed to {@link GhostPortal} when `portal` is `true`.
|
|
125
|
+
* @default 'body'
|
|
126
|
+
*/
|
|
127
|
+
portalTo?: GhostPortalTarget;
|
|
128
|
+
}
|
|
129
|
+
/** Methods and state exposed by a template ref to {@link GhostHoverCardTrigger}. */
|
|
130
|
+
export interface GhostHoverCardTriggerExposed {
|
|
131
|
+
readonly element: HTMLElement | null;
|
|
132
|
+
focus(options?: FocusOptions): void;
|
|
133
|
+
blur(): void;
|
|
134
|
+
}
|
|
135
|
+
/** Methods and state exposed by a template ref to {@link GhostHoverCardContent}. */
|
|
136
|
+
export interface GhostHoverCardContentExposed {
|
|
137
|
+
readonly element: HTMLElement | null;
|
|
138
|
+
focus(options?: FocusOptions): void;
|
|
139
|
+
blur(): void;
|
|
140
|
+
}
|
|
141
|
+
/** Options for {@link useGhostHoverCard}. */
|
|
142
|
+
export interface UseGhostHoverCardOptions {
|
|
143
|
+
open?: MaybeRefOrGetter<boolean | undefined>;
|
|
144
|
+
defaultOpen?: MaybeRefOrGetter<boolean | undefined>;
|
|
145
|
+
onOpenChange?: (open: boolean) => void;
|
|
146
|
+
}
|
|
147
|
+
/** Reactive state and helpers returned by {@link useGhostHoverCard}. */
|
|
148
|
+
export interface UseGhostHoverCardReturn {
|
|
149
|
+
isOpen: Ref<boolean>;
|
|
150
|
+
open: () => void;
|
|
151
|
+
close: () => void;
|
|
152
|
+
triggerId: ComputedRef<string>;
|
|
153
|
+
contentId: ComputedRef<string>;
|
|
154
|
+
}
|
|
155
|
+
/** Internal context shared between `GhostHoverCard` parts. */
|
|
156
|
+
export interface GhostHoverCardContext {
|
|
157
|
+
isOpen: Ref<boolean>;
|
|
158
|
+
closeDelay: ComputedRef<number>;
|
|
159
|
+
closeOnEscape: ComputedRef<boolean>;
|
|
160
|
+
cancelClose: () => void;
|
|
161
|
+
hideImmediate: () => void;
|
|
162
|
+
notifyTriggerPointerEnter: () => void;
|
|
163
|
+
notifyTriggerPointerLeave: () => void;
|
|
164
|
+
notifyTriggerFocusIn: () => void;
|
|
165
|
+
notifyTriggerFocusOut: (relatedTarget: EventTarget | null) => void;
|
|
166
|
+
notifyContentPointerEnter: () => void;
|
|
167
|
+
notifyContentPointerLeave: () => void;
|
|
168
|
+
notifyContentFocusIn: () => void;
|
|
169
|
+
notifyContentFocusOut: (relatedTarget: EventTarget | null) => void;
|
|
170
|
+
defaultTriggerId: ComputedRef<string>;
|
|
171
|
+
defaultContentId: ComputedRef<string>;
|
|
172
|
+
triggerId: ComputedRef<string>;
|
|
173
|
+
contentId: ComputedRef<string>;
|
|
174
|
+
triggerRegistered: Ref<boolean>;
|
|
175
|
+
triggerElement: Ref<HTMLElement | null>;
|
|
176
|
+
contentElement: Ref<HTMLElement | null>;
|
|
177
|
+
setTriggerElement: (element: HTMLElement | null) => void;
|
|
178
|
+
setContentElement: (element: HTMLElement | null) => void;
|
|
179
|
+
setTriggerId: (id: string | null) => void;
|
|
180
|
+
setTriggerRegistered: (registered: boolean) => void;
|
|
181
|
+
setContentId: (id: string | null) => void;
|
|
182
|
+
}
|
|
183
|
+
export declare const ghostHoverCardContextKey: InjectionKey<GhostHoverCardContext>;
|
|
184
|
+
/**
|
|
185
|
+
* Resolves a DOM element from either a raw element or a component ref
|
|
186
|
+
* (preferring exposed `.element` over `.$el`).
|
|
187
|
+
*/
|
|
188
|
+
export declare function resolveHoverCardHtmlElement(target: unknown): HTMLElement | null;
|
|
189
|
+
/**
|
|
190
|
+
* Returns whether `relatedTarget` is contained by the trigger or card content.
|
|
191
|
+
*/
|
|
192
|
+
export declare function hoverCardFocusStaysInside(relatedTarget: EventTarget | null, trigger: HTMLElement | null, content: HTMLElement | null): boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Root element for GhostInlineAlert. */
|
|
3
|
+
export type GhostInlineAlertElement = 'div' | 'section';
|
|
4
|
+
/** Native heading level for the title slot. */
|
|
5
|
+
export type GhostInlineAlertHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
/** Live-region semantics for copy that appears or updates after mount. */
|
|
7
|
+
export type GhostInlineAlertAnnounce = 'off' | 'status' | 'alert';
|
|
8
|
+
/** Declared props on the unstyled GhostInlineAlert SFC. */
|
|
9
|
+
export interface GhostInlineAlertProps {
|
|
10
|
+
/** Root element. Prefer `div` inside table cells. */
|
|
11
|
+
as?: GhostInlineAlertElement;
|
|
12
|
+
/** Heading level wrapping the `title` slot. */
|
|
13
|
+
headingLevel?: GhostInlineAlertHeadingLevel;
|
|
14
|
+
/**
|
|
15
|
+
* Live-region behavior. Default `off` for static inline feedback.
|
|
16
|
+
* Use `status` or `alert` only when copy appears or changes after mount.
|
|
17
|
+
*/
|
|
18
|
+
announce?: GhostInlineAlertAnnounce;
|
|
19
|
+
}
|
|
20
|
+
/** Options for {@link useGhostInlineAlert}. */
|
|
21
|
+
export interface UseGhostInlineAlertOptions {
|
|
22
|
+
as?: MaybeRefOrGetter<GhostInlineAlertElement | undefined>;
|
|
23
|
+
headingLevel?: MaybeRefOrGetter<GhostInlineAlertHeadingLevel | undefined>;
|
|
24
|
+
announce?: MaybeRefOrGetter<GhostInlineAlertAnnounce | undefined>;
|
|
25
|
+
/** Whether the title slot is rendered. */
|
|
26
|
+
hasTitle?: MaybeRefOrGetter<boolean>;
|
|
27
|
+
/** Generated or overridden title id for aria-labelledby. */
|
|
28
|
+
titleId?: MaybeRefOrGetter<string>;
|
|
29
|
+
}
|
|
30
|
+
/** Template ref contract for GhostInlineAlert. */
|
|
31
|
+
export interface GhostInlineAlertExposed {
|
|
32
|
+
/** Root element after mount; null before mount. */
|
|
33
|
+
readonly element: HTMLElement | null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* HTML text-like types only. `number` belongs to GhostNumberInput; checkbox,
|
|
4
|
+
* radio, file, and temporal widgets are separate primitives.
|
|
5
|
+
*/
|
|
6
|
+
export type GhostInputType = 'text' | 'search' | 'email' | 'password' | 'tel' | 'url';
|
|
7
|
+
/**
|
|
8
|
+
* Unstyled {@link GhostInput} props. `@vue-ignore` keeps native attributes as
|
|
9
|
+
* fallthrough at runtime while typing the input contract for consumers.
|
|
10
|
+
* `value` is omitted so the current text is `modelValue` / `defaultValue`.
|
|
11
|
+
*/
|
|
12
|
+
export interface GhostInputProps extends /* @vue-ignore */ Omit<InputHTMLAttributes, 'value'> {
|
|
13
|
+
/**
|
|
14
|
+
* Controlled value. Omit for uncontrolled mode. An empty string is a real
|
|
15
|
+
* controlled value, not "unset".
|
|
16
|
+
*/
|
|
17
|
+
modelValue?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Initial uncontrolled value. Later changes are ignored.
|
|
20
|
+
* @default ''
|
|
21
|
+
*/
|
|
22
|
+
defaultValue?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Prevents editing and sequential focus, and omits the field from submit.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Prevents editing while remaining focusable and submitted.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
readonly?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Consumer-owned validity. Sets `aria-invalid`, not native ValidityState.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
invalid?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Native required constraint.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
required?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Native text-like type.
|
|
45
|
+
* @default 'text'
|
|
46
|
+
*/
|
|
47
|
+
type?: GhostInputType;
|
|
48
|
+
}
|
|
49
|
+
/** Options for {@link useGhostInput}. */
|
|
50
|
+
export interface UseGhostInputOptions {
|
|
51
|
+
modelValue?: MaybeRefOrGetter<string | undefined>;
|
|
52
|
+
defaultValue?: MaybeRefOrGetter<string | undefined>;
|
|
53
|
+
disabled?: MaybeRefOrGetter<boolean | undefined>;
|
|
54
|
+
readonly?: MaybeRefOrGetter<boolean | undefined>;
|
|
55
|
+
invalid?: MaybeRefOrGetter<boolean | undefined>;
|
|
56
|
+
required?: MaybeRefOrGetter<boolean | undefined>;
|
|
57
|
+
type?: MaybeRefOrGetter<GhostInputType | undefined>;
|
|
58
|
+
/** Native input for post-reset DOM reconciliation. */
|
|
59
|
+
element?: MaybeRefOrGetter<HTMLInputElement | null | undefined>;
|
|
60
|
+
/** Synchronous write. Emit `update:modelValue` here. */
|
|
61
|
+
onChange?: (value: string) => void;
|
|
62
|
+
}
|
|
63
|
+
/** Methods and state available from a template ref to {@link GhostInput}. */
|
|
64
|
+
export interface GhostInputExposed {
|
|
65
|
+
/** The native input after mount, or `null` before mount. */
|
|
66
|
+
readonly element: HTMLInputElement | null;
|
|
67
|
+
/** Moves focus to the native input when it is mounted and not disabled. */
|
|
68
|
+
focus(options?: FocusOptions): void;
|
|
69
|
+
/** Removes focus from the native input when it is mounted. */
|
|
70
|
+
blur(): void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* v1 ships spotlight only. Tilt and magnetic are ADR 0009 follow-ups.
|
|
4
|
+
*/
|
|
5
|
+
export type InteractiveEffect = 'spotlight';
|
|
6
|
+
export type InteractiveSurfaceState = 'off' | 'idle' | 'tracking';
|
|
7
|
+
export type InteractiveSurfaceElement = 'div' | 'article' | 'section' | 'aside';
|
|
8
|
+
/**
|
|
9
|
+
* Attribute that carries off/idle/tracking. Dedicated surfaces use
|
|
10
|
+
* `data-state`. Hosts that already own `data-state` (themed GhostButton) use
|
|
11
|
+
* `data-interactive-state` so loading/disabled are not overwritten.
|
|
12
|
+
*/
|
|
13
|
+
export type InteractiveStateAttribute = 'data-state' | 'data-interactive-state';
|
|
14
|
+
/** Props for the unstyled {@link GhostInteractiveSurface} component. */
|
|
15
|
+
export interface GhostInteractiveSurfaceProps {
|
|
16
|
+
/**
|
|
17
|
+
* Root tag. Default `div`.
|
|
18
|
+
* @default 'div'
|
|
19
|
+
*/
|
|
20
|
+
as?: InteractiveSurfaceElement;
|
|
21
|
+
/**
|
|
22
|
+
* Recipes advertised on `data-interactive`. v1 supports `spotlight` only.
|
|
23
|
+
* @default ['spotlight']
|
|
24
|
+
*/
|
|
25
|
+
effects?: InteractiveEffect[];
|
|
26
|
+
}
|
|
27
|
+
/** Options for {@link useGhostInteractiveSurface}. `as` is a render concern. */
|
|
28
|
+
export interface UseGhostInteractiveSurfaceOptions {
|
|
29
|
+
/** Recipes advertised on `data-interactive`. Default `['spotlight']`. */
|
|
30
|
+
effects?: MaybeRefOrGetter<readonly InteractiveEffect[] | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Where to write off/idle/tracking. Default `data-state`.
|
|
33
|
+
* @default 'data-state'
|
|
34
|
+
*/
|
|
35
|
+
stateAttribute?: MaybeRefOrGetter<InteractiveStateAttribute | undefined>;
|
|
36
|
+
}
|
|
37
|
+
/** Methods available from a template ref to {@link GhostInteractiveSurface}. */
|
|
38
|
+
export interface GhostInteractiveSurfaceExposed {
|
|
39
|
+
/** The root element after mount, or `null` before mount. */
|
|
40
|
+
readonly element: HTMLElement | null;
|
|
41
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Label set for platform-aware modifier keys. */
|
|
3
|
+
export type GhostKbdPlatform = 'auto' | 'apple' | 'pc';
|
|
4
|
+
/** Resolved platform after `'auto'` is replaced. Always one of these on the DOM. */
|
|
5
|
+
export type GhostKbdResolvedPlatform = 'apple' | 'pc';
|
|
6
|
+
/**
|
|
7
|
+
* Unstyled {@link GhostKbd} props. `@vue-ignore` keeps native phrasing
|
|
8
|
+
* attributes as fallthrough at runtime while typing them for consumers.
|
|
9
|
+
*/
|
|
10
|
+
export interface GhostKbdProps extends /* @vue-ignore */ HTMLAttributes {
|
|
11
|
+
/**
|
|
12
|
+
* Key tokens rendered as nested `<kbd>` elements. A string is one key;
|
|
13
|
+
* an array is a combination joined with `+`. Not split on `+` because
|
|
14
|
+
* that character is a valid key.
|
|
15
|
+
*/
|
|
16
|
+
keys?: string | readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* Modifier label set. `'auto'` uses PC labels until after mount.
|
|
19
|
+
* @default 'auto'
|
|
20
|
+
*/
|
|
21
|
+
platform?: GhostKbdPlatform;
|
|
22
|
+
}
|
|
23
|
+
/** Options for {@link useGhostKbd}. */
|
|
24
|
+
export interface UseGhostKbdOptions {
|
|
25
|
+
keys?: MaybeRefOrGetter<string | readonly string[] | undefined>;
|
|
26
|
+
platform?: MaybeRefOrGetter<GhostKbdPlatform | undefined>;
|
|
27
|
+
}
|
|
28
|
+
/** One resolved key for nested `<kbd data-part="key">` rendering. */
|
|
29
|
+
export interface GhostKbdKeyItem {
|
|
30
|
+
/** Canonical token after alias folding (`command` → `meta`). */
|
|
31
|
+
token: string;
|
|
32
|
+
/** Visible label for the current resolved platform. */
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible expansion for symbol labels (`⌘` → Command). Omitted when the
|
|
36
|
+
* visible label is already a word.
|
|
37
|
+
*/
|
|
38
|
+
abbrTitle?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, Component, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Valid `as` targets for {@link GhostLink}. */
|
|
3
|
+
export type GhostLinkElement = 'a' | Component;
|
|
4
|
+
/**
|
|
5
|
+
* Unstyled {@link GhostLink} props. `@vue-ignore` keeps native attributes as
|
|
6
|
+
* fallthrough at runtime while typing the anchor contract for consumers.
|
|
7
|
+
*/
|
|
8
|
+
export interface GhostLinkProps extends /* @vue-ignore */ AnchorHTMLAttributes {
|
|
9
|
+
/**
|
|
10
|
+
* Root tag or component (for example `RouterLink` / `NuxtLink`).
|
|
11
|
+
* @default 'a'
|
|
12
|
+
*/
|
|
13
|
+
as?: GhostLinkElement;
|
|
14
|
+
/**
|
|
15
|
+
* Prevents navigation and removes the link from sequential focus order.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Shows the external indicator for same-tab outbound navigation.
|
|
21
|
+
* `target="_blank"` implies the indicator even when this is false.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
external?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Visually hidden text when `target` is `_blank`.
|
|
27
|
+
* @default 'Opens in new tab'
|
|
28
|
+
*/
|
|
29
|
+
newTabLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Options for {@link useGhostLink}. `as` and `newTabLabel` are render concerns of the SFC. */
|
|
32
|
+
export interface UseGhostLinkOptions {
|
|
33
|
+
disabled?: MaybeRefOrGetter<boolean | undefined>;
|
|
34
|
+
external?: MaybeRefOrGetter<boolean | undefined>;
|
|
35
|
+
href?: MaybeRefOrGetter<string | undefined>;
|
|
36
|
+
target?: MaybeRefOrGetter<string | undefined>;
|
|
37
|
+
rel?: MaybeRefOrGetter<string | undefined>;
|
|
38
|
+
as?: MaybeRefOrGetter<GhostLinkElement | undefined>;
|
|
39
|
+
}
|
|
40
|
+
/** Methods and state available from a template ref to {@link GhostLink}. */
|
|
41
|
+
export interface GhostLinkExposed {
|
|
42
|
+
/** The navigable host element after mount, or `null` before mount. */
|
|
43
|
+
readonly element: HTMLElement | null;
|
|
44
|
+
/** Moves focus to the host when mounted and not disabled. */
|
|
45
|
+
focus(options?: FocusOptions): void;
|
|
46
|
+
/** Removes focus from the host when mounted. */
|
|
47
|
+
blur(): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolves a DOM element from either a raw element or a component ref
|
|
51
|
+
* (preferring exposed `.element` over `.$el`).
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveGhostLinkHtmlElement(target: unknown): HTMLElement | null;
|
|
54
|
+
/**
|
|
55
|
+
* Adds `noopener` and `noreferrer` when opening a new browsing context.
|
|
56
|
+
* Preserves any other rel tokens the consumer already set.
|
|
57
|
+
*/
|
|
58
|
+
export declare function mergeLinkRel(target: string | undefined, rel: string | undefined): string | undefined;
|