@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,41 @@
|
|
|
1
|
+
/** Localized text for the remove controls, status messages, and native validation. */
|
|
2
|
+
export interface GhostTagsInputMessages {
|
|
3
|
+
/** Accessible name of the native remove button for this tag. */
|
|
4
|
+
removeLabel(value: string): string;
|
|
5
|
+
/** Announcement for the tags accepted together in proposal order. */
|
|
6
|
+
added(values: readonly string[]): string;
|
|
7
|
+
/** Announcement after the tag is removed. */
|
|
8
|
+
removed(value: string): string;
|
|
9
|
+
/** Announcement when a user entry already exists. */
|
|
10
|
+
duplicate(value: string): string;
|
|
11
|
+
/** Message for the native required constraint on committed tags. */
|
|
12
|
+
required: string;
|
|
13
|
+
}
|
|
14
|
+
/** Public props for the native text entry and its committed tag list. */
|
|
15
|
+
export interface GhostTagsInputProps {
|
|
16
|
+
/** Controlled committed tags. Omit to use local state. */
|
|
17
|
+
modelValue?: readonly string[] | undefined;
|
|
18
|
+
/** Initial uncontrolled tags and the reset baseline for either mode. */
|
|
19
|
+
defaultValue?: readonly string[];
|
|
20
|
+
/** Opt-in key and paste separators. Enter always commits. */
|
|
21
|
+
delimiters?: readonly (',' | ';')[];
|
|
22
|
+
/** Name of repeated form entries for the committed tags. */
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
/** Suppresses editing, focus, and form submission. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Suppresses editing and removal while preserving focus and submission. */
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/** Requires a committed tag in an editable field. */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
/** Consumer-owned invalid state. */
|
|
31
|
+
invalid?: boolean;
|
|
32
|
+
/** Reactive overrides. Omitted entries use the English defaults. */
|
|
33
|
+
messages?: Partial<GhostTagsInputMessages> | undefined;
|
|
34
|
+
}
|
|
35
|
+
/** Handle returned by a TagsInput template ref. */
|
|
36
|
+
export interface GhostTagsInputExposed {
|
|
37
|
+
/** Native text entry, or null while unmounted. */
|
|
38
|
+
readonly element: HTMLInputElement | null;
|
|
39
|
+
/** Focuses the native text entry. */
|
|
40
|
+
focus(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, TextareaHTMLAttributes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Unstyled {@link GhostTextarea} props. `@vue-ignore` keeps native attributes as
|
|
4
|
+
* fallthrough at runtime while typing the full textarea contract for consumers.
|
|
5
|
+
*/
|
|
6
|
+
export interface GhostTextareaProps extends /* @vue-ignore */ TextareaHTMLAttributes {
|
|
7
|
+
/**
|
|
8
|
+
* Controlled value. Omit for uncontrolled mode; `''` is a defined empty string.
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Initial uncontrolled value. Later changes are ignored.
|
|
13
|
+
* @default ''
|
|
14
|
+
*/
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Native disabled semantics: not focusable, not editable, omitted from submit.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Native readonly semantics: focusable and submitted, but the UA rejects edits.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
readonly?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Consumer-owned invalid state. Sets `aria-invalid="true"`; error copy belongs
|
|
28
|
+
* to Field or the surrounding form.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
invalid?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Native required constraint. Validation messaging stays with the form.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
required?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Native `rows`. Matches the HTML default so SSR and the UA agree. Auto-resize
|
|
39
|
+
* uses this as the minimum height.
|
|
40
|
+
* @default 2
|
|
41
|
+
*/
|
|
42
|
+
rows?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Auto-resize ceiling in rows. Ignored unless `autoResize` is true. When set
|
|
45
|
+
* below `rows`, `rows` wins as both min and max.
|
|
46
|
+
*/
|
|
47
|
+
maxRows?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Grow the field with its content after mount. Off so native resize and a
|
|
50
|
+
* fixed `rows` height stay the ordinary path.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
autoResize?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** Options for {@link useGhostTextarea}. */
|
|
56
|
+
export interface UseGhostTextareaOptions {
|
|
57
|
+
modelValue?: MaybeRefOrGetter<string | undefined>;
|
|
58
|
+
defaultValue?: MaybeRefOrGetter<string | undefined>;
|
|
59
|
+
disabled?: MaybeRefOrGetter<boolean | undefined>;
|
|
60
|
+
readonly?: MaybeRefOrGetter<boolean | undefined>;
|
|
61
|
+
invalid?: MaybeRefOrGetter<boolean | undefined>;
|
|
62
|
+
required?: MaybeRefOrGetter<boolean | undefined>;
|
|
63
|
+
rows?: MaybeRefOrGetter<number | undefined>;
|
|
64
|
+
maxRows?: MaybeRefOrGetter<number | undefined>;
|
|
65
|
+
autoResize?: MaybeRefOrGetter<boolean | undefined>;
|
|
66
|
+
/** Host used for auto-resize measurement. Omit when calling `resize()` yourself. */
|
|
67
|
+
element?: MaybeRefOrGetter<HTMLTextAreaElement | null | undefined>;
|
|
68
|
+
onValueChange?: (value: string) => void;
|
|
69
|
+
}
|
|
70
|
+
/** Methods and state available from a template ref to {@link GhostTextarea}. */
|
|
71
|
+
export interface GhostTextareaExposed {
|
|
72
|
+
/** The native textarea after mount, or `null` before mount. */
|
|
73
|
+
readonly element: HTMLTextAreaElement | null;
|
|
74
|
+
/** Moves focus to the native textarea when it is mounted and enabled. */
|
|
75
|
+
focus(options?: FocusOptions): void;
|
|
76
|
+
/** Removes focus from the native textarea when it is mounted. */
|
|
77
|
+
blur(): void;
|
|
78
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey, Ref, ShallowRef } from 'vue';
|
|
2
|
+
/** Store id of one toast. Generated ids look like `${storeKey}:auto:${n}`. */
|
|
3
|
+
export type GhostToastId = string;
|
|
4
|
+
/**
|
|
5
|
+
* Visual tone hook. `'error'` toasts always persist until dismissed. It is not
|
|
6
|
+
* an ARIA role: urgency of the announcement is set by {@link GhostToastUrgency}.
|
|
7
|
+
*/
|
|
8
|
+
export type GhostToastType = 'default' | 'error';
|
|
9
|
+
/**
|
|
10
|
+
* Which live region announces the toast when it becomes visible. Only
|
|
11
|
+
* `'urgent'` uses the assertive (`role="alert"`) region.
|
|
12
|
+
*/
|
|
13
|
+
export type GhostToastUrgency = 'default' | 'urgent';
|
|
14
|
+
/** Why an auto-dismiss timer is paused. Reasons compose; all must clear to resume. */
|
|
15
|
+
export type GhostToastPauseReason = 'hover' | 'focus' | 'hidden';
|
|
16
|
+
/** Lifecycle state of a record that is still in the store. */
|
|
17
|
+
export type GhostToastState = 'queued' | 'visible';
|
|
18
|
+
/** Optional action rendered by {@link GhostToastAction}. */
|
|
19
|
+
export interface GhostToastActionOptions {
|
|
20
|
+
/** Visible text of the action button. */
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* Runs in the click's user activation. The store does not await it and does
|
|
24
|
+
* not dismiss the toast afterwards; call `dismiss(id)` when that is wanted.
|
|
25
|
+
*/
|
|
26
|
+
onClick: () => void;
|
|
27
|
+
}
|
|
28
|
+
/** Options accepted by `toast()`. */
|
|
29
|
+
export interface GhostToastOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Stable id for `update` and `dismiss`. Omit it to get a generated id. Reusing
|
|
32
|
+
* the id of a toast that is still in the store updates it in place.
|
|
33
|
+
*/
|
|
34
|
+
id?: GhostToastId;
|
|
35
|
+
/** @default 'default' */
|
|
36
|
+
type?: GhostToastType;
|
|
37
|
+
/** @default 'default' */
|
|
38
|
+
urgency?: GhostToastUrgency;
|
|
39
|
+
/**
|
|
40
|
+
* Auto-dismiss override for informational toasts (no `action`, not
|
|
41
|
+
* `type: 'error'`). `null` or `0` persists; a positive number is
|
|
42
|
+
* milliseconds. Ignored, with a development warning, on persisting toasts.
|
|
43
|
+
*/
|
|
44
|
+
duration?: number | null;
|
|
45
|
+
/** Primary message. Required and non-empty after trimming. */
|
|
46
|
+
title: string;
|
|
47
|
+
/** Optional supporting text, shown and announced after the title. */
|
|
48
|
+
description?: string;
|
|
49
|
+
/** Optional action. A toast with an action persists until dismissed. */
|
|
50
|
+
action?: GhostToastActionOptions;
|
|
51
|
+
/** Called once when the toast leaves the store, for any reason. */
|
|
52
|
+
onDismiss?: () => void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Patch accepted by `update()`. Omitted fields keep their current value; pass
|
|
56
|
+
* `undefined` explicitly to clear `description`, `action`, `duration`, or
|
|
57
|
+
* `onDismiss`.
|
|
58
|
+
*/
|
|
59
|
+
export interface GhostToastUpdateOptions extends Partial<Omit<GhostToastOptions, 'id'>> {
|
|
60
|
+
/**
|
|
61
|
+
* When `true` and the toast is visible, announce the merged title and
|
|
62
|
+
* description again through the region its urgency selects.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
announceUpdate?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** Read model of one toast. Snapshots are replaced, never mutated. */
|
|
68
|
+
export interface GhostToastRecord {
|
|
69
|
+
readonly id: GhostToastId;
|
|
70
|
+
readonly type: GhostToastType;
|
|
71
|
+
readonly urgency: GhostToastUrgency;
|
|
72
|
+
readonly title: string;
|
|
73
|
+
readonly description: string | undefined;
|
|
74
|
+
readonly action: GhostToastActionOptions | undefined;
|
|
75
|
+
/** Resolved auto-dismiss interval in milliseconds, or `null` when it persists. */
|
|
76
|
+
readonly duration: number | null;
|
|
77
|
+
/**
|
|
78
|
+
* Milliseconds left when the countdown last started, resumed, or paused;
|
|
79
|
+
* `null` when the toast persists.
|
|
80
|
+
*/
|
|
81
|
+
readonly remainingMs: number | null;
|
|
82
|
+
/** Active pause reasons, for debugging and advanced rendering. */
|
|
83
|
+
readonly pauseReasons: readonly GhostToastPauseReason[];
|
|
84
|
+
readonly state: GhostToastState;
|
|
85
|
+
}
|
|
86
|
+
/** Defaults merged into every `toast()` call from one `useGhostToast` instance. */
|
|
87
|
+
export type UseGhostToastOptions = Partial<Omit<GhostToastOptions, 'id'>>;
|
|
88
|
+
/** Return value of `useGhostToast()`. */
|
|
89
|
+
export interface UseGhostToastReturn {
|
|
90
|
+
/** Visible toasts only, oldest first (index `0` is the front of the stack). */
|
|
91
|
+
toasts: Readonly<Ref<readonly GhostToastRecord[]>>;
|
|
92
|
+
/** Creates a toast, or updates the record with the same `id`. Returns the id. */
|
|
93
|
+
toast: (options: GhostToastOptions) => GhostToastId;
|
|
94
|
+
/** Merges a patch into a queued or visible toast. No-op for an unknown id. */
|
|
95
|
+
update: (id: GhostToastId, patch: GhostToastUpdateOptions) => void;
|
|
96
|
+
/** Removes a toast; a freed visible slot promotes the oldest waiting one. */
|
|
97
|
+
dismiss: (id: GhostToastId) => void;
|
|
98
|
+
/** Removes every visible and waiting toast and cancels their timers. */
|
|
99
|
+
dismissAll: () => void;
|
|
100
|
+
}
|
|
101
|
+
/** Props for {@link GhostToastProvider}. */
|
|
102
|
+
export interface GhostToastProviderProps {
|
|
103
|
+
/**
|
|
104
|
+
* Default auto-dismiss interval for informational toasts. `0` persists.
|
|
105
|
+
* Non-finite or negative values warn in development and use `8000`.
|
|
106
|
+
* @default 8000
|
|
107
|
+
*/
|
|
108
|
+
duration?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Maximum number of visible toasts; later toasts wait in FIFO order.
|
|
111
|
+
* Values that are not a finite integer `>= 1` warn and use `3`.
|
|
112
|
+
* @default 3
|
|
113
|
+
*/
|
|
114
|
+
limit?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Accessible name of the viewport region.
|
|
117
|
+
* @default 'Notifications'
|
|
118
|
+
*/
|
|
119
|
+
label?: string;
|
|
120
|
+
}
|
|
121
|
+
/** Host element of {@link GhostToastViewport}. */
|
|
122
|
+
export type GhostToastViewportElement = 'div' | 'section';
|
|
123
|
+
/** Props for {@link GhostToastViewport}. */
|
|
124
|
+
export interface GhostToastViewportProps {
|
|
125
|
+
/**
|
|
126
|
+
* Host element. Use `section` when the region should be a landmark.
|
|
127
|
+
* @default 'div'
|
|
128
|
+
*/
|
|
129
|
+
as?: GhostToastViewportElement;
|
|
130
|
+
/**
|
|
131
|
+
* Teleport the region and both announcers to `document.body` after mount.
|
|
132
|
+
* @default true
|
|
133
|
+
*/
|
|
134
|
+
portal?: boolean;
|
|
135
|
+
}
|
|
136
|
+
/** Slot props of the {@link GhostToastViewport} `default` slot. */
|
|
137
|
+
export interface GhostToastViewportSlotProps {
|
|
138
|
+
/** Visible toasts, oldest first. */
|
|
139
|
+
toasts: readonly GhostToastRecord[];
|
|
140
|
+
dismiss: (id: GhostToastId) => void;
|
|
141
|
+
}
|
|
142
|
+
/** Slot props of the {@link GhostToastViewport} `toast` slot. */
|
|
143
|
+
export interface GhostToastViewportItemSlotProps {
|
|
144
|
+
toast: GhostToastRecord;
|
|
145
|
+
dismiss: (id: GhostToastId) => void;
|
|
146
|
+
}
|
|
147
|
+
/** Props for {@link GhostToast}. */
|
|
148
|
+
export interface GhostToastProps {
|
|
149
|
+
/** Record to render, usually one item of the viewport's `toasts`. */
|
|
150
|
+
toast: GhostToastRecord;
|
|
151
|
+
}
|
|
152
|
+
/** Slot props of the {@link GhostToast} `default` slot. */
|
|
153
|
+
export interface GhostToastSlotProps {
|
|
154
|
+
toast: GhostToastRecord;
|
|
155
|
+
/** Dismisses this toast. */
|
|
156
|
+
dismiss: () => void;
|
|
157
|
+
}
|
|
158
|
+
/** Template ref of {@link GhostToastViewport}. */
|
|
159
|
+
export interface GhostToastViewportExposed {
|
|
160
|
+
/** Region host after mount. */
|
|
161
|
+
readonly element: HTMLElement | null;
|
|
162
|
+
}
|
|
163
|
+
/** Template ref of {@link GhostToast}, {@link GhostToastTitle}, and {@link GhostToastDescription}. */
|
|
164
|
+
export interface GhostToastExposed {
|
|
165
|
+
readonly element: HTMLElement | null;
|
|
166
|
+
}
|
|
167
|
+
/** Template ref of {@link GhostToastTitle}. */
|
|
168
|
+
export type GhostToastTitleExposed = GhostToastExposed;
|
|
169
|
+
/** Template ref of {@link GhostToastDescription}. */
|
|
170
|
+
export type GhostToastDescriptionExposed = GhostToastExposed;
|
|
171
|
+
/** Template ref of {@link GhostToastAction} and {@link GhostToastClose}. */
|
|
172
|
+
export interface GhostToastActionExposed {
|
|
173
|
+
readonly element: HTMLButtonElement | null;
|
|
174
|
+
focus: (options?: FocusOptions) => void;
|
|
175
|
+
blur: () => void;
|
|
176
|
+
}
|
|
177
|
+
/** Template ref of {@link GhostToastClose}. */
|
|
178
|
+
export type GhostToastCloseExposed = GhostToastActionExposed;
|
|
179
|
+
/** One announcement. The key changes on every write so identical text is re-announced. */
|
|
180
|
+
export interface GhostToastAnnouncement {
|
|
181
|
+
readonly key: number;
|
|
182
|
+
readonly text: string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Injection context of {@link GhostToastProvider}. Exported for advanced
|
|
186
|
+
* composition and tests; `useGhostToast()` is the supported entry point.
|
|
187
|
+
*/
|
|
188
|
+
export interface GhostToastProviderContext {
|
|
189
|
+
/** Same API as `useGhostToast()` without per-instance defaults. */
|
|
190
|
+
api: UseGhostToastReturn;
|
|
191
|
+
/** Viewport region name from the provider `label`. */
|
|
192
|
+
label: ComputedRef<string>;
|
|
193
|
+
/** Polite (`role="status"`) announcement. */
|
|
194
|
+
politeAnnouncement: Readonly<ShallowRef<GhostToastAnnouncement>>;
|
|
195
|
+
/** Assertive (`role="alert"`) announcement. */
|
|
196
|
+
assertiveAnnouncement: Readonly<ShallowRef<GhostToastAnnouncement>>;
|
|
197
|
+
/**
|
|
198
|
+
* Registers a mounted viewport. Waiting toasts are promoted and timers run
|
|
199
|
+
* only while at least one viewport is attached. Returns the detach function.
|
|
200
|
+
*/
|
|
201
|
+
attachViewport: () => () => void;
|
|
202
|
+
/** Adds or removes a hover or focus pause reason for one toast. */
|
|
203
|
+
setPaused: (id: GhostToastId, reason: Exclude<GhostToastPauseReason, 'hidden'>, paused: boolean) => void;
|
|
204
|
+
}
|
|
205
|
+
export declare const ghostToastProviderContextKey: InjectionKey<GhostToastProviderContext>;
|
|
206
|
+
/** @internal Viewport context used by `GhostToast` for focus return. */
|
|
207
|
+
export interface GhostToastViewportContext {
|
|
208
|
+
/** Returns focus to where it was before it entered the region, if possible. */
|
|
209
|
+
restoreFocus: () => void;
|
|
210
|
+
}
|
|
211
|
+
/** @internal */
|
|
212
|
+
export declare const ghostToastViewportContextKey: InjectionKey<GhostToastViewportContext>;
|
|
213
|
+
/** @internal Per-toast context used by the toast parts. */
|
|
214
|
+
export interface GhostToastItemContext {
|
|
215
|
+
toast: ComputedRef<GhostToastRecord>;
|
|
216
|
+
dismiss: () => void;
|
|
217
|
+
}
|
|
218
|
+
/** @internal */
|
|
219
|
+
export declare const ghostToastItemContextKey: InjectionKey<GhostToastItemContext>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
import type { TextDirection } from './use-roving-focus.js';
|
|
3
|
+
/** Selection mode for {@link GhostToggleGroup}. */
|
|
4
|
+
export type GhostToggleGroupType = 'single' | 'multiple';
|
|
5
|
+
export type GhostToggleGroupOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
/** Controlled values emitted by {@link GhostToggleGroup}. */
|
|
7
|
+
export type GhostToggleGroupValue = string | string[] | undefined;
|
|
8
|
+
/** Valid `as` targets for {@link GhostToggleGroup}. */
|
|
9
|
+
export type GhostToggleGroupElement = string | Component;
|
|
10
|
+
/** Valid `as` targets for {@link GhostToggleGroupItem}. */
|
|
11
|
+
export type GhostToggleGroupItemElement = string | Component;
|
|
12
|
+
/** Props for the {@link GhostToggleGroup} root. */
|
|
13
|
+
export interface GhostToggleGroupProps {
|
|
14
|
+
/**
|
|
15
|
+
* Single allows at most one pressed item (deselectable); multiple allows any
|
|
16
|
+
* subset.
|
|
17
|
+
* @default 'single'
|
|
18
|
+
*/
|
|
19
|
+
type?: GhostToggleGroupType;
|
|
20
|
+
/**
|
|
21
|
+
* Controlled selection. Omit for uncontrolled mode. Shape must match `type`.
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
24
|
+
modelValue?: GhostToggleGroupValue;
|
|
25
|
+
/**
|
|
26
|
+
* Initial selection when `modelValue` is omitted. Multiple defaults to `[]`.
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
defaultValue?: GhostToggleGroupValue;
|
|
30
|
+
/**
|
|
31
|
+
* Layout for roving arrow keys and optional `aria-orientation`.
|
|
32
|
+
* @default 'horizontal'
|
|
33
|
+
*/
|
|
34
|
+
orientation?: GhostToggleGroupOrientation;
|
|
35
|
+
/**
|
|
36
|
+
* Explicit text direction for horizontal roving focus.
|
|
37
|
+
*/
|
|
38
|
+
dir?: TextDirection;
|
|
39
|
+
/**
|
|
40
|
+
* Root host element. Must not be interactive itself.
|
|
41
|
+
* @default 'div'
|
|
42
|
+
*/
|
|
43
|
+
as?: GhostToggleGroupElement;
|
|
44
|
+
/**
|
|
45
|
+
* Disables toggling for every item.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** Props for {@link GhostToggleGroupItem}. */
|
|
51
|
+
export interface GhostToggleGroupItemProps {
|
|
52
|
+
/**
|
|
53
|
+
* Tag name or component for the toggle control.
|
|
54
|
+
* @default 'button'
|
|
55
|
+
*/
|
|
56
|
+
as?: GhostToggleGroupItemElement;
|
|
57
|
+
/** Stable value identifying this item in the group model. */
|
|
58
|
+
value: string;
|
|
59
|
+
/**
|
|
60
|
+
* Disables this item and removes it from roving focus.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
}
|
|
65
|
+
/** Methods and state exposed by a template ref to {@link GhostToggleGroup}. */
|
|
66
|
+
export interface GhostToggleGroupExposed {
|
|
67
|
+
readonly element: HTMLElement | null;
|
|
68
|
+
focus(options?: FocusOptions): void;
|
|
69
|
+
blur(): void;
|
|
70
|
+
}
|
|
71
|
+
/** Methods and state exposed by a template ref to {@link GhostToggleGroupItem}. */
|
|
72
|
+
export interface GhostToggleGroupItemExposed {
|
|
73
|
+
readonly element: HTMLElement | null;
|
|
74
|
+
focus(options?: FocusOptions): void;
|
|
75
|
+
blur(): void;
|
|
76
|
+
}
|
|
77
|
+
/** Options for {@link useGhostToggleGroup}. */
|
|
78
|
+
export interface UseGhostToggleGroupOptions {
|
|
79
|
+
type?: MaybeRefOrGetter<GhostToggleGroupType>;
|
|
80
|
+
modelValue?: MaybeRefOrGetter<GhostToggleGroupValue>;
|
|
81
|
+
defaultValue?: MaybeRefOrGetter<GhostToggleGroupValue>;
|
|
82
|
+
orientation?: MaybeRefOrGetter<GhostToggleGroupOrientation>;
|
|
83
|
+
dir?: MaybeRefOrGetter<TextDirection | undefined>;
|
|
84
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
85
|
+
onValueChange?: (value: GhostToggleGroupValue) => void;
|
|
86
|
+
}
|
|
87
|
+
/** Reactive state and helpers returned by {@link useGhostToggleGroup}. */
|
|
88
|
+
export interface UseGhostToggleGroupReturn {
|
|
89
|
+
type: ComputedRef<GhostToggleGroupType>;
|
|
90
|
+
modelValue: Ref<GhostToggleGroupValue>;
|
|
91
|
+
orientation: ComputedRef<GhostToggleGroupOrientation>;
|
|
92
|
+
dir: ComputedRef<TextDirection | undefined>;
|
|
93
|
+
groupDisabled: ComputedRef<boolean>;
|
|
94
|
+
isPressed: (value: string) => boolean;
|
|
95
|
+
toggle: (value: string) => void;
|
|
96
|
+
registerItem: (value: string, disabled: boolean) => void;
|
|
97
|
+
setItemDisabled: (value: string, disabled: boolean) => void;
|
|
98
|
+
unregisterItem: (value: string) => void;
|
|
99
|
+
tabStopValue: ComputedRef<string | undefined>;
|
|
100
|
+
registryVersion: Ref<number>;
|
|
101
|
+
}
|
|
102
|
+
/** Internal context shared between `GhostToggleGroup` parts. */
|
|
103
|
+
export interface GhostToggleGroupContext {
|
|
104
|
+
type: ComputedRef<GhostToggleGroupType>;
|
|
105
|
+
modelValue: Ref<GhostToggleGroupValue>;
|
|
106
|
+
orientation: ComputedRef<GhostToggleGroupOrientation>;
|
|
107
|
+
dir: ComputedRef<TextDirection | undefined>;
|
|
108
|
+
groupDisabled: ComputedRef<boolean>;
|
|
109
|
+
isPressed: (value: string) => boolean;
|
|
110
|
+
toggle: (value: string) => void;
|
|
111
|
+
registerItem: (value: string, disabled: boolean) => void;
|
|
112
|
+
setItemDisabled: (value: string, disabled: boolean) => void;
|
|
113
|
+
unregisterItem: (value: string) => void;
|
|
114
|
+
tabStopValue: ComputedRef<string | undefined>;
|
|
115
|
+
registryVersion: Ref<number>;
|
|
116
|
+
syncSelectionTabStops: (groupRoot: HTMLElement) => void;
|
|
117
|
+
}
|
|
118
|
+
export declare const ghostToggleGroupContextKey: InjectionKey<GhostToggleGroupContext>;
|
|
119
|
+
/**
|
|
120
|
+
* Resolves a DOM element from either a raw element or a component ref
|
|
121
|
+
* (preferring exposed `.element` over `.$el`).
|
|
122
|
+
*/
|
|
123
|
+
export declare function resolveToggleGroupHtmlElement(target: unknown): HTMLElement | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Valid roots for a toolbar container in typical layouts. */
|
|
3
|
+
export type GhostToolbarElement = 'div' | 'section' | 'footer' | 'header';
|
|
4
|
+
/** Toolbar layout and roving arrow axis. */
|
|
5
|
+
export type GhostToolbarOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
/** Explicit text direction for horizontal arrow reversal. */
|
|
7
|
+
export type GhostToolbarDirection = 'ltr' | 'rtl';
|
|
8
|
+
/** Options for {@link useGhostToolbar}. */
|
|
9
|
+
export interface UseGhostToolbarOptions {
|
|
10
|
+
/** Toolbar root; roving focus attaches after mount when this element exists. */
|
|
11
|
+
element: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
12
|
+
orientation?: MaybeRefOrGetter<GhostToolbarOrientation | undefined>;
|
|
13
|
+
label?: MaybeRefOrGetter<string | undefined>;
|
|
14
|
+
loop?: MaybeRefOrGetter<boolean | undefined>;
|
|
15
|
+
dir?: MaybeRefOrGetter<GhostToolbarDirection | undefined>;
|
|
16
|
+
}
|
|
17
|
+
/** Public ref contract for {@link GhostToolbar}. */
|
|
18
|
+
export interface GhostToolbarExposed {
|
|
19
|
+
/** Root element after mount; null before mount. */
|
|
20
|
+
readonly element: HTMLElement | null;
|
|
21
|
+
focus(options?: FocusOptions): void;
|
|
22
|
+
blur(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
/** Props for {@link GhostTooltipProvider}. */
|
|
3
|
+
export interface GhostTooltipProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* Default open delay for descendant {@link GhostTooltip} roots that omit
|
|
6
|
+
* their own `delayDuration`.
|
|
7
|
+
* @default 700
|
|
8
|
+
*/
|
|
9
|
+
delayDuration?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Milliseconds after a descendant tooltip closes during which the next
|
|
12
|
+
* pointer-driven show may skip the open delay.
|
|
13
|
+
* @default 300
|
|
14
|
+
*/
|
|
15
|
+
skipDelayDuration?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Injection context shared by {@link GhostTooltipProvider} descendants. */
|
|
18
|
+
export interface GhostTooltipProviderContext {
|
|
19
|
+
/** Provider default `delayDuration`. */
|
|
20
|
+
delayDuration: ComputedRef<number>;
|
|
21
|
+
/** Provider `skipDelayDuration` window. */
|
|
22
|
+
skipDelayDuration: ComputedRef<number>;
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the open delay for one tooltip instance.
|
|
25
|
+
*
|
|
26
|
+
* @param tooltipDelay - Per-root `delayDuration`, or `undefined` to inherit
|
|
27
|
+
* the provider default.
|
|
28
|
+
* @param viaPointer - When `false`, skip-delay is never applied so keyboard
|
|
29
|
+
* focus timing stays per-root.
|
|
30
|
+
*/
|
|
31
|
+
resolveOpenDelay: (tooltipDelay: number | undefined, viaPointer: boolean) => number;
|
|
32
|
+
/**
|
|
33
|
+
* Called when a descendant tooltip transitions to open.
|
|
34
|
+
*
|
|
35
|
+
* @param dismiss - Hides that tooltip immediately. The provider calls it
|
|
36
|
+
* when a different descendant opens, so only one tooltip in the group is
|
|
37
|
+
* visible at a time.
|
|
38
|
+
*/
|
|
39
|
+
onTooltipDidOpen: (dismiss?: () => void) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Called when a descendant tooltip transitions to closed.
|
|
42
|
+
*
|
|
43
|
+
* @param dismiss - The same callback passed to `onTooltipDidOpen`, so the
|
|
44
|
+
* provider stops tracking that tooltip.
|
|
45
|
+
*/
|
|
46
|
+
onTooltipDidClose: (dismiss?: () => void) => void;
|
|
47
|
+
}
|
|
48
|
+
export declare const ghostTooltipProviderContextKey: InjectionKey<GhostTooltipProviderContext>;
|