@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,65 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import type { GhostComboboxFormInputProps, GhostComboboxLiveRegionProps, GhostComboboxValue, UseGhostComboboxOptions } from './ghost-combobox.js';
|
|
3
|
+
/** Neutral root class hook (themed recipes may target). */
|
|
4
|
+
export interface GhostComboboxRootProps {
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Selected value, search query, option registry, listbox open state, highlight,
|
|
9
|
+
* and form hidden-input props for {@link GhostCombobox}.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useGhostCombobox(options?: UseGhostComboboxOptions): {
|
|
12
|
+
multiple: ComputedRef<boolean>;
|
|
13
|
+
virtualized: ComputedRef<boolean>;
|
|
14
|
+
selectedValue: Ref<GhostComboboxValue>;
|
|
15
|
+
searchValue: Ref<string>;
|
|
16
|
+
isOpen: Ref<boolean>;
|
|
17
|
+
loading: ComputedRef<boolean>;
|
|
18
|
+
open: () => void;
|
|
19
|
+
close: () => void;
|
|
20
|
+
toggleOpen: () => void;
|
|
21
|
+
dismissOnFocusLeave: () => void;
|
|
22
|
+
disabled: ComputedRef<boolean>;
|
|
23
|
+
required: ComputedRef<boolean>;
|
|
24
|
+
invalid: ComputedRef<boolean>;
|
|
25
|
+
allowDeselect: ComputedRef<boolean>;
|
|
26
|
+
placeholder: ComputedRef<string | undefined>;
|
|
27
|
+
defaultInputId: ComputedRef<string>;
|
|
28
|
+
defaultContentId: ComputedRef<string>;
|
|
29
|
+
optionOrder: ComputedRef<string[]>;
|
|
30
|
+
optionCount: ComputedRef<number>;
|
|
31
|
+
registerOption: GhostComboboxRegisterOption;
|
|
32
|
+
unregisterOption: (value: string) => void;
|
|
33
|
+
setOptionDisabled: (value: string, disabled: boolean) => void;
|
|
34
|
+
setOptionTextValue: (value: string, textValue: string) => void;
|
|
35
|
+
select: (value: string) => void;
|
|
36
|
+
isSelected: (value: string) => boolean;
|
|
37
|
+
isOptionDisabled: (value: string) => boolean;
|
|
38
|
+
getOptionText: (value: string) => string | undefined;
|
|
39
|
+
getOptionId: (value: string) => string | undefined;
|
|
40
|
+
activeOptionValue: Ref<string | undefined>;
|
|
41
|
+
activeDescendantId: ComputedRef<string | undefined>;
|
|
42
|
+
moveActive: (direction: 1 | -1) => void;
|
|
43
|
+
setActiveOptionByValue: (value: string | undefined) => void;
|
|
44
|
+
moveActiveFirst: () => void;
|
|
45
|
+
moveActiveLast: () => void;
|
|
46
|
+
onInputSearch: (query: string) => void;
|
|
47
|
+
formMirrorInputs: ComputedRef<GhostComboboxFormInputProps[]>;
|
|
48
|
+
applyFormReset: () => void;
|
|
49
|
+
syncFormValidity: () => void;
|
|
50
|
+
handleFormInputInvalid: () => void;
|
|
51
|
+
labelVersion: Ref<number>;
|
|
52
|
+
announceMessage: Ref<string>;
|
|
53
|
+
liveRegionId: ComputedRef<string>;
|
|
54
|
+
liveRegionProps: ComputedRef<GhostComboboxLiveRegionProps>;
|
|
55
|
+
};
|
|
56
|
+
type GhostComboboxRegisterOption = (value: string, textValue: string, disabled: boolean, optionId: string, getElement: () => HTMLElement | null) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Tracks the latest `search` event `requestId` from {@link GhostCombobox} so
|
|
59
|
+
* async handlers can ignore stale responses without a second id source.
|
|
60
|
+
*/
|
|
61
|
+
export declare function useGhostComboboxAsyncSearch(): {
|
|
62
|
+
begin: (requestId: number) => void;
|
|
63
|
+
isLatest: (requestId: number) => boolean;
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { UseGhostCommandPaletteAsyncSearchReturn, UseGhostCommandPaletteOptions, UseGhostCommandPaletteReturn } from './ghost-command-palette.js';
|
|
2
|
+
/**
|
|
3
|
+
* Command palette state: a dialog shell (open, modal, part ids) composed with
|
|
4
|
+
* `useGhostCombobox` for the item registry, highlight, loading, and polite
|
|
5
|
+
* announcements. Must run during a component `setup`.
|
|
6
|
+
*
|
|
7
|
+
* The palette deliberately never calls the combobox `select()`: that commits
|
|
8
|
+
* `modelValue`, copies the option label into the query, and closes the list,
|
|
9
|
+
* which is right for a form field but would emit spurious `search` events and
|
|
10
|
+
* leave a stale selection on the next open. Activation goes through
|
|
11
|
+
* {@link UseGhostCommandPaletteReturn.activateCommand} instead.
|
|
12
|
+
*
|
|
13
|
+
* The query is owned here rather than by the combobox so that typing and the
|
|
14
|
+
* reset on close share one monotonic `requestId` sequence; the combobox only
|
|
15
|
+
* sees `open`, `loading`, `disabled`, and `messages`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useGhostCommandPalette(options?: UseGhostCommandPaletteOptions): UseGhostCommandPaletteReturn;
|
|
18
|
+
/**
|
|
19
|
+
* Stale-response guard for async command lists. Call `begin(requestId)` from
|
|
20
|
+
* the palette `search` handler, then apply results only while
|
|
21
|
+
* `isLatest(requestId)` is true. Same contract as
|
|
22
|
+
* `useGhostComboboxAsyncSearch`, tied to the palette's own `requestId`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useGhostCommandPaletteAsyncSearch(): UseGhostCommandPaletteAsyncSearchReturn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type GhostContextMenuPointerPosition, type UseGhostContextMenuOptions } from './ghost-context-menu.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless context menu open state, deterministic SSR-safe IDs, and pointer anchor.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useGhostContextMenu(options?: UseGhostContextMenuOptions): {
|
|
6
|
+
isOpen: import("vue").WritableComputedRef<boolean, boolean>;
|
|
7
|
+
open: () => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
triggerId: import("vue").ComputedRef<string>;
|
|
10
|
+
contentId: import("vue").ComputedRef<string>;
|
|
11
|
+
pointerPosition: import("vue").ShallowRef<GhostContextMenuPointerPosition, GhostContextMenuPointerPosition>;
|
|
12
|
+
virtualReference: import("vue").ComputedRef<import("@floating-ui/dom").ReferenceElement>;
|
|
13
|
+
openAtPointer: (x: number, y: number) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { UseGhostDataTableOptions, UseGhostDataTableReturn, UseGhostDataTableServerRequestReturn } from './ghost-data-table.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless DataTable state and local processing pipeline (ADR 0014).
|
|
4
|
+
*
|
|
5
|
+
* Processing follows the spec's manual-processing matrix: local sort, then
|
|
6
|
+
* local filter, then the page slice, each stage skipped when its `manual*`
|
|
7
|
+
* flag is `true`. With `manualPagination`, sorting and filtering are
|
|
8
|
+
* page-local (they only reorder or narrow the rows in `data`). Each stage is
|
|
9
|
+
* memoized separately, so paging never re-sorts and selection or expansion
|
|
10
|
+
* never re-runs sort or filter callbacks.
|
|
11
|
+
*
|
|
12
|
+
* Every v-model dimension uses {@link useControllableState}. `onStateChange`
|
|
13
|
+
* fires at most once per action, only when the action changes a dimension
|
|
14
|
+
* owned by the server (its `manual*` flag is `true`), and carries the full
|
|
15
|
+
* query after reset rules.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useGhostDataTable<TData>(options: UseGhostDataTableOptions<TData>): UseGhostDataTableReturn<TData>;
|
|
18
|
+
/**
|
|
19
|
+
* Stale-response guard for server-mode DataTable fetches. Pair it with the
|
|
20
|
+
* `requestId` that `stateChange` (and `retry()`) mints:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* const request = useGhostDataTableServerRequest()
|
|
24
|
+
* async function onStateChange({ requestId, query }: DataTableStateChangePayload) {
|
|
25
|
+
* request.begin(requestId)
|
|
26
|
+
* loading.value = true
|
|
27
|
+
* try {
|
|
28
|
+
* const page = await fetchInvoices(query)
|
|
29
|
+
* if (!request.isLatest(requestId)) return
|
|
30
|
+
* data.value = page.rows
|
|
31
|
+
* rowCount.value = page.total
|
|
32
|
+
* error.value = undefined
|
|
33
|
+
* } catch (cause) {
|
|
34
|
+
* if (request.isLatest(requestId)) error.value = cause
|
|
35
|
+
* } finally {
|
|
36
|
+
* if (request.isLatest(requestId)) loading.value = false
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* Ordering is decided by `requestId`, never by which response resolves first,
|
|
42
|
+
* so out-of-order responses and a stale `finally` cannot overwrite rows,
|
|
43
|
+
* totals, error, or `loading` that belong to a newer request.
|
|
44
|
+
*
|
|
45
|
+
* Use one guard per table instance, created next to it. Ids are only
|
|
46
|
+
* monotonic within one `useGhostDataTable` call: a remounted table restarts at
|
|
47
|
+
* 1, so `begin` records the id as given (a running max would reject every
|
|
48
|
+
* request from the new instance). The guard holds a plain number (no
|
|
49
|
+
* reactivity, no lifecycle), so it works outside `setup` and needs no cleanup.
|
|
50
|
+
*
|
|
51
|
+
* Same shape as `useGhostComboboxAsyncSearch` (ADR 0014). It is a separate
|
|
52
|
+
* function rather than a re-export so the DataTable entry does not import the
|
|
53
|
+
* combobox module and each contract can evolve with its own component.
|
|
54
|
+
*/
|
|
55
|
+
export declare function useGhostDataTableServerRequest(): UseGhostDataTableServerRequestReturn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UseGhostDatePickerOptions, UseGhostDatePickerReturn } from './ghost-date-picker.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless DatePicker state: committed model, raw text drafts per input, the
|
|
4
|
+
* pending calendar range anchor, validation, and open state.
|
|
5
|
+
*
|
|
6
|
+
* The three concepts stay separate on purpose (spec "State model"): text is
|
|
7
|
+
* never reformatted while it is a draft, invalid drafts never replace the
|
|
8
|
+
* committed value, and calendar range progress never touches either until the
|
|
9
|
+
* second activation commits atomically.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useGhostDatePicker(options?: UseGhostDatePickerOptions): UseGhostDatePickerReturn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UseGhostDialogOptions, UseGhostDialogReturn } from './ghost-dialog.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless dialog open state, modal mode flag, and deterministic SSR-safe IDs.
|
|
4
|
+
*
|
|
5
|
+
* Uses `useControllableState` so `open` can be either controlled or
|
|
6
|
+
* uncontrolled while calling `onOpenChange` on every user-initiated transition.
|
|
7
|
+
* The implementation is shared with `useGhostDrawer` through the internal
|
|
8
|
+
* `dialog-shared` module.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useGhostDialog(options?: UseGhostDialogOptions): UseGhostDialogReturn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UseGhostDrawerOptions, UseGhostDrawerReturn } from './ghost-drawer.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless drawer open state, modal flag, placement, and deterministic
|
|
4
|
+
* SSR-safe IDs (`ghost-drawer-*`).
|
|
5
|
+
*
|
|
6
|
+
* Open state uses the same controllable-state implementation as
|
|
7
|
+
* `useGhostDialog`; `side` defaults to `'end'` and `dir` stays `undefined`
|
|
8
|
+
* unless set explicitly, so DOM-based direction resolution can run later in
|
|
9
|
+
* `GhostDrawerContent` on the client.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useGhostDrawer(options?: UseGhostDrawerOptions): UseGhostDrawerReturn;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UseGhostDropdownMenuOptions, UseGhostDropdownMenuReturn } from './ghost-dropdown-menu.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless dropdown menu open state and deterministic SSR-safe IDs.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useGhostDropdownMenu(options?: UseGhostDropdownMenuOptions): UseGhostDropdownMenuReturn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { GhostEmptyStateElement, GhostEmptyStateHeadingLevel, UseGhostEmptyStateOptions } from './ghost-empty-state.js';
|
|
3
|
+
export interface GhostEmptyStateRootProps {
|
|
4
|
+
class: 'ghost-empty-state';
|
|
5
|
+
'data-part': 'root';
|
|
6
|
+
'data-ghost-empty-state': '';
|
|
7
|
+
'aria-labelledby'?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Root bindings for an empty-state region. When a title is present, links the
|
|
11
|
+
* root to the generated heading id.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useGhostEmptyState(options?: UseGhostEmptyStateOptions): {
|
|
14
|
+
as: ComputedRef<GhostEmptyStateElement>;
|
|
15
|
+
headingTag: ComputedRef<`h${GhostEmptyStateHeadingLevel}`>;
|
|
16
|
+
titleId: ComputedRef<string>;
|
|
17
|
+
rootProps: ComputedRef<GhostEmptyStateRootProps>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type VNodeArrayChildren } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Whether default-slot vnodes include renderable content (not comments or empty text).
|
|
4
|
+
* Invoked during component render so SSR markup can expose errors before mount.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fieldPartSlotHasRenderableContent(vnodes: VNodeArrayChildren): boolean;
|
|
7
|
+
/** Whether a field hint/error host exposes non-empty visible content. */
|
|
8
|
+
export declare function fieldPartHostHasContent(element: unknown): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Tracks part visibility from mounted DOM after each render. Never invokes slots
|
|
11
|
+
* outside the render phase; parent reactive slot content updates land in onUpdated.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useGhostFieldPartContent(hostRef: {
|
|
14
|
+
readonly value: unknown;
|
|
15
|
+
}, onVisibleChange: (visible: boolean) => void): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UseGhostFieldOptions, UseGhostFieldReturn } from './ghost-field.js';
|
|
2
|
+
/**
|
|
3
|
+
* SSR-stable ids and field state for {@link GhostField} parts.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useGhostField(options?: UseGhostFieldOptions): UseGhostFieldReturn;
|
|
6
|
+
export interface GhostFieldRootProps {
|
|
7
|
+
'data-part': 'root';
|
|
8
|
+
'data-ghost-field': '';
|
|
9
|
+
'data-state'?: 'invalid' | 'disabled';
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UseGhostFileUploadOptions, UseGhostFileUploadReturn } from './ghost-file-upload.js';
|
|
2
|
+
/** Drag events are handled only for file drags; text and link drags pass through. */
|
|
3
|
+
export declare function isGhostFileUploadFileDrag(event: DragEvent): boolean;
|
|
4
|
+
/** Active guard holders across all roots (internal; for tests). */
|
|
5
|
+
export declare function ghostFileUploadDocumentDropGuardCount(): number;
|
|
6
|
+
/**
|
|
7
|
+
* Headless state and behavior for {@link GhostFileUpload}: one intake path for
|
|
8
|
+
* the picker, drops, and consumer surfaces; `accept` / size / `validate` /
|
|
9
|
+
* capacity validation computed purely and committed once; controlled or
|
|
10
|
+
* uncontrolled `File[]`; the `DataTransfer` form mirror; the polite live region;
|
|
11
|
+
* focus after removal; and the shared document drop guard.
|
|
12
|
+
*
|
|
13
|
+
* Files are never cloned, wrapped, made reactive, or mutated, and the
|
|
14
|
+
* consumer's array is never mutated: every change writes a new array.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useGhostFileUpload(options?: UseGhostFileUploadOptions): UseGhostFileUploadReturn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type StandardSchemaV1, type UseGhostFormOptions, type UseGhostFormReturn } from './ghost-form.js';
|
|
2
|
+
/**
|
|
3
|
+
* Schema-backed form orchestration built on Standard Schema v1 (`~standard`),
|
|
4
|
+
* progressive error visibility, monotonic async epochs, and native reset
|
|
5
|
+
* suppression.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useGhostForm<TSchema extends StandardSchemaV1 = StandardSchemaV1, TValues = StandardSchemaV1.InferInput<TSchema>>(options: UseGhostFormOptions<TSchema, TValues>): UseGhostFormReturn<TSchema, TValues>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UseGhostHoverCardOptions, UseGhostHoverCardReturn } from './ghost-hover-card.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless hover-card open state and deterministic SSR-safe IDs.
|
|
4
|
+
*
|
|
5
|
+
* Uses {@link useControllableState} so `open` can be either controlled or
|
|
6
|
+
* uncontrolled while calling `onOpenChange` on every user-initiated transition.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useGhostHoverCard(options?: UseGhostHoverCardOptions): UseGhostHoverCardReturn;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* SSR-stable DOM id from Vue 3.5 `useId()`. A non-empty `id` wins; default prefix is `ghost`.
|
|
4
|
+
* `useId()` always runs so Vue's per-instance counter cannot drift under SSR.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useGhostId(prefix?: MaybeRefOrGetter<string | undefined>, id?: MaybeRefOrGetter<string | undefined>): ComputedRef<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { GhostInlineAlertElement, GhostInlineAlertHeadingLevel, UseGhostInlineAlertOptions } from './ghost-inline-alert.js';
|
|
3
|
+
export interface GhostInlineAlertRootProps {
|
|
4
|
+
class: 'ghost-inline-alert';
|
|
5
|
+
'data-part': 'root';
|
|
6
|
+
'data-ghost-inline-alert': '';
|
|
7
|
+
role?: 'status' | 'alert';
|
|
8
|
+
'aria-labelledby'?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Root bindings for inline contextual feedback. Live-region `role` values apply
|
|
12
|
+
* only when `announce` is `status` or `alert`; static alerts use section
|
|
13
|
+
* labelling when a title is present.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useGhostInlineAlert(options?: UseGhostInlineAlertOptions): {
|
|
16
|
+
as: ComputedRef<GhostInlineAlertElement>;
|
|
17
|
+
headingTag: ComputedRef<`h${GhostInlineAlertHeadingLevel}`>;
|
|
18
|
+
titleId: ComputedRef<string>;
|
|
19
|
+
rootProps: ComputedRef<GhostInlineAlertRootProps>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ComputedRef, type WritableComputedRef } from 'vue';
|
|
2
|
+
import type { GhostInputType, UseGhostInputOptions } from './ghost-input.js';
|
|
3
|
+
export interface GhostInputRootProps {
|
|
4
|
+
class: 'ghost-input';
|
|
5
|
+
type: GhostInputType;
|
|
6
|
+
value: string;
|
|
7
|
+
defaultValue: string;
|
|
8
|
+
disabled: boolean | undefined;
|
|
9
|
+
readonly: boolean | undefined;
|
|
10
|
+
required: boolean | undefined;
|
|
11
|
+
'aria-invalid': 'true' | undefined;
|
|
12
|
+
'data-part': 'root';
|
|
13
|
+
'data-state': 'invalid' | 'disabled' | 'readonly' | undefined;
|
|
14
|
+
onInput: (event: Event) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Native text-like input bindings: string model, disabled/readonly/invalid/
|
|
18
|
+
* required, and `data-part` / `data-state`. `defaultValue` on the root is the
|
|
19
|
+
* form-reset seed, not a live prop.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useGhostInput(options?: UseGhostInputOptions): {
|
|
22
|
+
value: WritableComputedRef<string>;
|
|
23
|
+
isDisabled: ComputedRef<boolean>;
|
|
24
|
+
isReadonly: ComputedRef<boolean>;
|
|
25
|
+
isInvalid: ComputedRef<boolean>;
|
|
26
|
+
isRequired: ComputedRef<boolean>;
|
|
27
|
+
applyFormReset: () => void;
|
|
28
|
+
rootProps: ComputedRef<GhostInputRootProps>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { InteractiveSurfaceState, UseGhostInteractiveSurfaceOptions } from './ghost-interactive-surface.js';
|
|
3
|
+
export interface GhostInteractiveSurfaceRootProps {
|
|
4
|
+
'data-part': 'root';
|
|
5
|
+
'data-interactive': string;
|
|
6
|
+
'data-state'?: InteractiveSurfaceState;
|
|
7
|
+
'data-interactive-state'?: InteractiveSurfaceState;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Pointer tracking for ambient surfaces (ADR 0009).
|
|
11
|
+
*
|
|
12
|
+
* Samples are rAF-batched and written as CSS variables so Vue does not
|
|
13
|
+
* re-render every move. Layout is cached on enter / resize / scroll-dirty,
|
|
14
|
+
* never per `pointermove`. Reduced motion and coarse pointers leave the
|
|
15
|
+
* host `off` with no pointer listeners. Offscreen and hidden-tab paths
|
|
16
|
+
* cancel the frame loop. One tracking surface is a documented budget, not
|
|
17
|
+
* a singleton.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useGhostInteractiveSurface(target: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: UseGhostInteractiveSurfaceOptions): {
|
|
20
|
+
rootProps: ComputedRef<GhostInteractiveSurfaceRootProps>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { GhostKbdKeyItem, GhostKbdResolvedPlatform, UseGhostKbdOptions } from './ghost-kbd.js';
|
|
3
|
+
export interface GhostKbdRootProps {
|
|
4
|
+
class: 'ghost-kbd';
|
|
5
|
+
'data-part': 'root';
|
|
6
|
+
'data-platform': GhostKbdResolvedPlatform;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `'auto'` must paint PC labels until after mount. Reading `navigator` in
|
|
10
|
+
* `setup` would disagree with SSR HTML and break hydration.
|
|
11
|
+
*/
|
|
12
|
+
export declare const GHOST_KBD_SSR_PLATFORM: GhostKbdResolvedPlatform;
|
|
13
|
+
/**
|
|
14
|
+
* `mod` is the platform primary modifier (Command / Control). `meta` is
|
|
15
|
+
* specifically Meta / Command / Windows and stays Win on PC.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveGhostKbdKey(token: string, platform: GhostKbdResolvedPlatform): GhostKbdKeyItem;
|
|
18
|
+
/**
|
|
19
|
+
* Apple desktop and iOS report as Mac / iPhone / iPad / iPod. Call only after
|
|
20
|
+
* mount; this is the only `navigator` read in the kbd path.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isAppleNavigator(navigatorLike: Pick<Navigator, 'platform' | 'userAgent'> | undefined): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* jsdom's `navigator` is unforgeable, so tests spy this reader instead of
|
|
25
|
+
* replacing the browser global. Production always reads `globalThis.navigator`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ghostKbdNavigator: {
|
|
28
|
+
read(): Pick<Navigator, "platform" | "userAgent"> | undefined;
|
|
29
|
+
};
|
|
30
|
+
/** Key-token labels, SSR-safe platform, `data-part` / `data-platform`. */
|
|
31
|
+
export declare function useGhostKbd(options?: UseGhostKbdOptions): {
|
|
32
|
+
resolvedPlatform: ComputedRef<GhostKbdResolvedPlatform>;
|
|
33
|
+
keyItems: ComputedRef<GhostKbdKeyItem[]>;
|
|
34
|
+
rootProps: ComputedRef<GhostKbdRootProps>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import { type UseGhostLinkOptions } from './ghost-link.js';
|
|
3
|
+
export interface GhostLinkRootProps {
|
|
4
|
+
class: 'ghost-link';
|
|
5
|
+
'data-part': 'root';
|
|
6
|
+
'data-state': 'disabled' | undefined;
|
|
7
|
+
'aria-disabled'?: 'true';
|
|
8
|
+
tabindex?: -1;
|
|
9
|
+
href?: string;
|
|
10
|
+
rel?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Styling hooks, disabled navigation, and safe `rel` for `target="_blank"`. */
|
|
13
|
+
export declare function useGhostLink(options?: UseGhostLinkOptions): {
|
|
14
|
+
isDisabled: ComputedRef<boolean>;
|
|
15
|
+
isNativeAnchor: ComputedRef<boolean>;
|
|
16
|
+
isComponentHost: ComputedRef<boolean>;
|
|
17
|
+
showExternalIndicator: ComputedRef<boolean>;
|
|
18
|
+
showNewTabHint: ComputedRef<boolean>;
|
|
19
|
+
rootProps: ComputedRef<GhostLinkRootProps>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { shallowRef, type InjectionKey } from 'vue';
|
|
2
|
+
interface SubmenuBranch {
|
|
3
|
+
readonly id: symbol;
|
|
4
|
+
readonly level: MenuLevel;
|
|
5
|
+
readonly trigger: () => HTMLElement | null;
|
|
6
|
+
readonly requested: () => boolean;
|
|
7
|
+
readonly disabled: () => boolean;
|
|
8
|
+
requestOpen: (focus: boolean) => void;
|
|
9
|
+
requestClose: (restore?: boolean) => void;
|
|
10
|
+
cancelHover: () => void;
|
|
11
|
+
cancelPending: () => void;
|
|
12
|
+
}
|
|
13
|
+
interface MenuRoot {
|
|
14
|
+
readonly active: ReturnType<typeof shallowRef<MenuLevel | null>>;
|
|
15
|
+
readonly tab: (event: KeyboardEvent) => void;
|
|
16
|
+
readonly select: () => void;
|
|
17
|
+
readonly direction: () => 'ltr' | 'rtl';
|
|
18
|
+
/** Only a Menubar can advance from a leaf to another top-level menu. */
|
|
19
|
+
readonly adjacent?: ((key: 'ArrowLeft' | 'ArrowRight') => void) | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface MenuLevel {
|
|
22
|
+
readonly parent: MenuLevel | null;
|
|
23
|
+
readonly root: MenuRoot;
|
|
24
|
+
readonly surface: () => HTMLElement | null;
|
|
25
|
+
readonly visible: () => boolean;
|
|
26
|
+
readonly activeChild: () => SubmenuBranch | undefined;
|
|
27
|
+
readonly hasChildren: () => boolean;
|
|
28
|
+
register: (child: SubmenuBranch) => () => void;
|
|
29
|
+
open: (child: SubmenuBranch, focus: boolean) => void;
|
|
30
|
+
openFromModel: (child: SubmenuBranch) => void;
|
|
31
|
+
cancelChildRequests: () => void;
|
|
32
|
+
dismissOutsideChild: (event: PointerEvent) => void;
|
|
33
|
+
dismissOnNavigate: (target: HTMLElement) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare const menuLevelKey: InjectionKey<MenuLevel>;
|
|
36
|
+
export declare const submenuKey: InjectionKey<{
|
|
37
|
+
readonly branch: SubmenuBranch;
|
|
38
|
+
readonly triggerId: () => string;
|
|
39
|
+
readonly contentId: () => string;
|
|
40
|
+
readonly setTrigger: (element: HTMLElement | null) => void;
|
|
41
|
+
readonly setSurface: (element: HTMLElement | null) => void;
|
|
42
|
+
readonly setDisabled: (disabled: boolean) => void;
|
|
43
|
+
readonly focusOnEntry: (surface: HTMLElement, focus: (surface: HTMLElement) => void) => void;
|
|
44
|
+
readonly close: (restore: boolean) => void;
|
|
45
|
+
readonly hoverIn: (event: PointerEvent) => void;
|
|
46
|
+
readonly hoverOut: (event: PointerEvent) => void;
|
|
47
|
+
readonly keepHoveredBranch: () => void;
|
|
48
|
+
}>;
|
|
49
|
+
export declare function useGhostMenuLevel(parent: MenuLevel | null, root: MenuRoot, surface: MenuLevel['surface'], visible: MenuLevel['visible']): MenuLevel;
|
|
50
|
+
export declare function branchHasFocus(level: MenuLevel): boolean;
|
|
51
|
+
export declare function branchSurfaces(level: MenuLevel): HTMLElement[];
|
|
52
|
+
export declare function eventMenuLevel(level: MenuLevel, event: Event): MenuLevel | null;
|
|
53
|
+
export declare function readMenuDirection(element: HTMLElement | null): 'ltr' | 'rtl';
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export declare const MENU_ITEM_SELECTOR = "[role=\"menuitem\"],[role=\"menuitemcheckbox\"],[role=\"menuitemradio\"]";
|
|
3
|
+
export type GhostMenuCollectionCloseReason = 'tab';
|
|
4
|
+
export interface UseGhostMenuCollectionOptions {
|
|
5
|
+
onItemSelect?: (element: HTMLElement) => void;
|
|
6
|
+
/** APG: Tab closes the menu without restoring focus to the trigger. */
|
|
7
|
+
onClose?: (reason?: GhostMenuCollectionCloseReason) => void;
|
|
8
|
+
}
|
|
9
|
+
interface MenuLevelCollectionOptions extends UseGhostMenuCollectionOptions {
|
|
10
|
+
onTab?: (event: KeyboardEvent) => void;
|
|
11
|
+
active?: () => boolean;
|
|
12
|
+
onFocusIn?: () => void;
|
|
13
|
+
onNavigate?: (target: HTMLElement) => void;
|
|
14
|
+
}
|
|
15
|
+
/** Enabled menu items inside `root`, in DOM order. */
|
|
16
|
+
export declare function getMenuItems(root: ParentNode): HTMLElement[];
|
|
17
|
+
/** Roving tabindex: focus the first enabled item. */
|
|
18
|
+
export declare function focusFirstMenuItem(root: ParentNode): boolean;
|
|
19
|
+
/** Roving tabindex: focus the last enabled item. */
|
|
20
|
+
export declare function focusLastMenuItem(root: ParentNode): boolean;
|
|
21
|
+
/** An inline submenu owns its own items even though the ancestor contains them. */
|
|
22
|
+
export declare function belongsToMenu(root: ParentNode, element: HTMLElement): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* APG menu keyboard behavior: vertical roving, typeahead, and item activation.
|
|
25
|
+
* Listeners attach in `onMounted` so SSR setup does not touch the document.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useGhostMenuCollection(container: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: UseGhostMenuCollectionOptions): void;
|
|
28
|
+
/** Connects one registered level of a nested menu to the shared collection. */
|
|
29
|
+
export declare function useGhostMenuLevelCollection(container: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: MenuLevelCollectionOptions): void;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { type MenuLevel } from './use-ghost-menu-branch.js';
|
|
3
|
+
interface MenuHost {
|
|
4
|
+
isOpen: Readonly<Ref<boolean>>;
|
|
5
|
+
triggerElement: Readonly<Ref<HTMLElement | null>>;
|
|
6
|
+
close: () => void;
|
|
7
|
+
}
|
|
8
|
+
/** One dismissal layer owns the root and all its inline or portaled children. */
|
|
9
|
+
export declare function useGhostMenuRoot(host: MenuHost, surface: Readonly<Ref<HTMLElement | null>>, openAdjacent?: (trigger: HTMLElement, key: 'ArrowLeft' | 'ArrowRight') => void): {
|
|
10
|
+
level: MenuLevel;
|
|
11
|
+
shouldRestoreFocus: import("vue").ShallowRef<boolean, boolean>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { UseGhostMenubarMenuOptions, UseGhostMenubarMenuReturn } from './ghost-menubar.js';
|
|
2
|
+
/** Headless menubar menu open state; IDs use the `ghost-menubar-menu` namespace. */
|
|
3
|
+
export declare function useGhostMenubarMenu(options?: UseGhostMenubarMenuOptions): UseGhostMenubarMenuReturn;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { type GhostMenubarContext } from './ghost-menubar.js';
|
|
3
|
+
import { type TextDirection } from './use-roving-focus.js';
|
|
4
|
+
export interface UseGhostMenubarOptions {
|
|
5
|
+
dir?: MaybeRefOrGetter<TextDirection>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Menubar root: horizontal roving focus among triggers and at-most-one open menu.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useGhostMenubar(hostRef: MaybeRefOrGetter<HTMLElement | null | undefined>, options?: UseGhostMenubarOptions): GhostMenubarContext;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ComputedRef, type WritableComputedRef } from 'vue';
|
|
2
|
+
import type { UseGhostNumberInputOptions } from './ghost-number-input.js';
|
|
3
|
+
export interface GhostNumberInputRootProps {
|
|
4
|
+
class: 'ghost-number-input';
|
|
5
|
+
'data-part': 'root';
|
|
6
|
+
'data-state'?: 'invalid' | 'disabled' | 'readonly';
|
|
7
|
+
}
|
|
8
|
+
export interface GhostNumberInputInputProps {
|
|
9
|
+
class: 'ghost-number-input__input';
|
|
10
|
+
type: 'text';
|
|
11
|
+
role: 'spinbutton';
|
|
12
|
+
inputMode: 'decimal';
|
|
13
|
+
value: string;
|
|
14
|
+
defaultValue: string | undefined;
|
|
15
|
+
disabled: boolean | undefined;
|
|
16
|
+
readonly: boolean | undefined;
|
|
17
|
+
required: boolean | undefined;
|
|
18
|
+
'aria-invalid': 'true' | undefined;
|
|
19
|
+
'aria-valuemin'?: number;
|
|
20
|
+
'aria-valuemax'?: number;
|
|
21
|
+
'aria-valuenow'?: number;
|
|
22
|
+
'aria-valuetext'?: string;
|
|
23
|
+
'data-part': 'input';
|
|
24
|
+
onInput: (event: Event) => void;
|
|
25
|
+
onBlur: (event: FocusEvent) => void;
|
|
26
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
27
|
+
onFocus: (event: FocusEvent) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface GhostNumberInputHiddenInputProps {
|
|
30
|
+
type: 'hidden';
|
|
31
|
+
name: string | undefined;
|
|
32
|
+
value: string;
|
|
33
|
+
form: string | undefined;
|
|
34
|
+
disabled: boolean | undefined;
|
|
35
|
+
}
|
|
36
|
+
export interface GhostNumberInputButtonProps {
|
|
37
|
+
type: 'button';
|
|
38
|
+
class: 'ghost-number-input__button';
|
|
39
|
+
tabindex: -1;
|
|
40
|
+
disabled: boolean | undefined;
|
|
41
|
+
'aria-label': string;
|
|
42
|
+
'data-part': 'decrement' | 'increment';
|
|
43
|
+
onClick: (event: MouseEvent) => void;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Locale-aware spinbutton bindings: numeric model, bounds, stepping, and APG
|
|
47
|
+
* keyboard support on a text field with `role="spinbutton"`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useGhostNumberInput(options?: UseGhostNumberInputOptions): {
|
|
50
|
+
value: WritableComputedRef<number | null>;
|
|
51
|
+
isDisabled: ComputedRef<boolean>;
|
|
52
|
+
isReadonly: ComputedRef<boolean>;
|
|
53
|
+
isInvalid: ComputedRef<boolean>;
|
|
54
|
+
isRequired: ComputedRef<boolean>;
|
|
55
|
+
rootProps: ComputedRef<GhostNumberInputRootProps>;
|
|
56
|
+
inputProps: ComputedRef<GhostNumberInputInputProps>;
|
|
57
|
+
hiddenInputProps: ComputedRef<GhostNumberInputHiddenInputProps>;
|
|
58
|
+
decrementProps: ComputedRef<GhostNumberInputButtonProps>;
|
|
59
|
+
incrementProps: ComputedRef<GhostNumberInputButtonProps>;
|
|
60
|
+
increment: () => void;
|
|
61
|
+
decrement: () => void;
|
|
62
|
+
applyFormReset: () => void;
|
|
63
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import { getPaginationRange } from './get-pagination-range.js';
|
|
3
|
+
import type { GhostPaginationControlProps, GhostPaginationEllipsisMarkerProps, GhostPaginationListProps, GhostPaginationRootProps, UseGhostPaginationOptions } from './ghost-pagination.js';
|
|
4
|
+
/**
|
|
5
|
+
* Controlled page index, ellipsis range, and navigation control metadata for
|
|
6
|
+
* {@link GhostPagination}.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useGhostPagination(options: UseGhostPaginationOptions): {
|
|
9
|
+
page: ComputedRef<number>;
|
|
10
|
+
pageCount: ComputedRef<number>;
|
|
11
|
+
range: ComputedRef<ReturnType<typeof getPaginationRange>>;
|
|
12
|
+
isDisabled: ComputedRef<boolean>;
|
|
13
|
+
rootProps: ComputedRef<GhostPaginationRootProps>;
|
|
14
|
+
listProps: ComputedRef<GhostPaginationListProps>;
|
|
15
|
+
firstProps: ComputedRef<GhostPaginationControlProps>;
|
|
16
|
+
previousProps: ComputedRef<GhostPaginationControlProps>;
|
|
17
|
+
nextProps: ComputedRef<GhostPaginationControlProps>;
|
|
18
|
+
lastProps: ComputedRef<GhostPaginationControlProps>;
|
|
19
|
+
pageButtonProps: (page: number) => GhostPaginationControlProps;
|
|
20
|
+
ellipsisMarkerProps: ComputedRef<GhostPaginationEllipsisMarkerProps>;
|
|
21
|
+
goToPage: (target: number) => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UseGhostPopoverOptions, UseGhostPopoverReturn } from './ghost-popover.js';
|
|
2
|
+
/**
|
|
3
|
+
* Headless popover open state and deterministic SSR-safe IDs.
|
|
4
|
+
*
|
|
5
|
+
* Uses {@link useControllableState} so `open` can be either controlled or
|
|
6
|
+
* uncontrolled while calling `onOpenChange` on every user-initiated transition.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useGhostPopover(options?: UseGhostPopoverOptions): UseGhostPopoverReturn;
|