@ghostvue/vue 0.0.0-stage → 0.1.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/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 +28 -0
- package/dist/GhostFieldControl.vue.d.ts +13 -0
- package/dist/GhostFieldDescription.vue.d.ts +21 -0
- package/dist/GhostFieldError.vue.d.ts +21 -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/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/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 +51 -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 +17 -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/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/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 +143 -0
- package/dist/dialog-shared.d.ts +169 -0
- package/dist/dismissable-layer-stack.d.ts +27 -0
- package/dist/form-reset.d.ts +21 -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.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 +254 -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 +151 -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-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-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 +131 -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-switch.d.ts +77 -0
- package/dist/ghost-table.d.ts +62 -0
- package/dist/ghost-tabs.d.ts +154 -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 +37 -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 +17534 -0
- package/dist/has-tabbable-descendants.d.ts +2 -0
- package/dist/index.d.ts +307 -0
- package/dist/invoke-attr-handler.d.ts +15 -0
- package/dist/is-ime-composing.d.ts +28 -0
- package/dist/manifest.json +17098 -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/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 +40 -0
- package/dist/use-floating.d.ts +38 -0
- package/dist/use-focus-scope.d.ts +34 -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.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-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-collection.d.ts +19 -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-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 +52 -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 +20 -0
- package/dist/use-scroll-lock.d.ts +13 -0
- package/package.json +59 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Unstyled {@link GhostBadge} props. Native span attributes fall through; there
|
|
4
|
+
* are no behavioral props because a badge is presentational.
|
|
5
|
+
*/
|
|
6
|
+
export type GhostBadgeProps = HTMLAttributes;
|
|
7
|
+
/** Methods and state available from a template ref to {@link GhostBadge}. */
|
|
8
|
+
export interface GhostBadgeExposed {
|
|
9
|
+
/** The native span after mount, or `null` before mount and after unmount. */
|
|
10
|
+
readonly element: HTMLSpanElement | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { Component, InjectionKey } from 'vue';
|
|
2
|
+
/** Valid `as` targets for {@link GhostBreadcrumb}. */
|
|
3
|
+
export type GhostBreadcrumbElement = string | Component;
|
|
4
|
+
/** Valid `as` targets for {@link GhostBreadcrumbList}. */
|
|
5
|
+
export type GhostBreadcrumbListElement = string | Component;
|
|
6
|
+
/** Valid `as` targets for {@link GhostBreadcrumbItem}. */
|
|
7
|
+
export type GhostBreadcrumbItemElement = string | Component;
|
|
8
|
+
/** Valid `as` targets for {@link GhostBreadcrumbLink}. */
|
|
9
|
+
export type GhostBreadcrumbLinkElement = string | Component;
|
|
10
|
+
/** Valid `as` targets for {@link GhostBreadcrumbPage}. */
|
|
11
|
+
export type GhostBreadcrumbPageElement = string | Component;
|
|
12
|
+
/** Valid `as` targets for {@link GhostBreadcrumbSeparator}. */
|
|
13
|
+
export type GhostBreadcrumbSeparatorElement = string | Component;
|
|
14
|
+
/** Props for {@link GhostBreadcrumb}. */
|
|
15
|
+
export interface GhostBreadcrumbProps {
|
|
16
|
+
/**
|
|
17
|
+
* Tag name or component rendered for the navigation landmark.
|
|
18
|
+
* @default 'nav'
|
|
19
|
+
*/
|
|
20
|
+
as?: GhostBreadcrumbElement;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name for the breadcrumb navigation.
|
|
23
|
+
* @default 'Breadcrumb'
|
|
24
|
+
*/
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Props for {@link GhostBreadcrumbList}. */
|
|
28
|
+
export interface GhostBreadcrumbListProps {
|
|
29
|
+
/**
|
|
30
|
+
* Tag name or component rendered for the ordered list.
|
|
31
|
+
* @default 'ol'
|
|
32
|
+
*/
|
|
33
|
+
as?: GhostBreadcrumbListElement;
|
|
34
|
+
}
|
|
35
|
+
/** Props for {@link GhostBreadcrumbItem}. */
|
|
36
|
+
export interface GhostBreadcrumbItemProps {
|
|
37
|
+
/**
|
|
38
|
+
* Tag name or component rendered for the list item.
|
|
39
|
+
* @default 'li'
|
|
40
|
+
*/
|
|
41
|
+
as?: GhostBreadcrumbItemElement;
|
|
42
|
+
}
|
|
43
|
+
/** Props for {@link GhostBreadcrumbLink}. */
|
|
44
|
+
export interface GhostBreadcrumbLinkProps {
|
|
45
|
+
/**
|
|
46
|
+
* Tag name or component rendered for the ancestor segment.
|
|
47
|
+
* @default 'a'
|
|
48
|
+
*/
|
|
49
|
+
as?: GhostBreadcrumbLinkElement;
|
|
50
|
+
}
|
|
51
|
+
/** Props for {@link GhostBreadcrumbPage}. */
|
|
52
|
+
export interface GhostBreadcrumbPageProps {
|
|
53
|
+
/**
|
|
54
|
+
* Tag name or component rendered for the current page segment.
|
|
55
|
+
* @default 'span'
|
|
56
|
+
*/
|
|
57
|
+
as?: GhostBreadcrumbPageElement;
|
|
58
|
+
}
|
|
59
|
+
/** Props for {@link GhostBreadcrumbSeparator}. */
|
|
60
|
+
export interface GhostBreadcrumbSeparatorProps {
|
|
61
|
+
/**
|
|
62
|
+
* Tag name or component rendered for the decorative separator.
|
|
63
|
+
* @default 'span'
|
|
64
|
+
*/
|
|
65
|
+
as?: GhostBreadcrumbSeparatorElement;
|
|
66
|
+
}
|
|
67
|
+
/** Props for {@link GhostBreadcrumbEllipsis}. */
|
|
68
|
+
export interface GhostBreadcrumbEllipsisProps {
|
|
69
|
+
/**
|
|
70
|
+
* Accessible name for the ellipsis disclosure trigger.
|
|
71
|
+
* @default 'Show more breadcrumb segments'
|
|
72
|
+
*/
|
|
73
|
+
label?: string;
|
|
74
|
+
}
|
|
75
|
+
/** Methods and state exposed by breadcrumb parts with a focusable host. */
|
|
76
|
+
export interface GhostBreadcrumbExposed {
|
|
77
|
+
readonly element: HTMLElement | null;
|
|
78
|
+
focus?(options?: FocusOptions): void;
|
|
79
|
+
blur?(): void;
|
|
80
|
+
}
|
|
81
|
+
export interface GhostBreadcrumbListExposed {
|
|
82
|
+
readonly element: HTMLElement | null;
|
|
83
|
+
focus(options?: FocusOptions): void;
|
|
84
|
+
blur(): void;
|
|
85
|
+
}
|
|
86
|
+
export interface GhostBreadcrumbItemExposed {
|
|
87
|
+
readonly element: HTMLElement | null;
|
|
88
|
+
}
|
|
89
|
+
export interface GhostBreadcrumbLinkExposed {
|
|
90
|
+
readonly element: HTMLElement | null;
|
|
91
|
+
focus(options?: FocusOptions): void;
|
|
92
|
+
blur(): void;
|
|
93
|
+
}
|
|
94
|
+
export interface GhostBreadcrumbPageExposed {
|
|
95
|
+
readonly element: HTMLElement | null;
|
|
96
|
+
}
|
|
97
|
+
export interface GhostBreadcrumbSeparatorExposed {
|
|
98
|
+
readonly element: HTMLElement | null;
|
|
99
|
+
}
|
|
100
|
+
export interface GhostBreadcrumbEllipsisExposed {
|
|
101
|
+
readonly element: HTMLElement | null;
|
|
102
|
+
focus(options?: FocusOptions): void;
|
|
103
|
+
blur(): void;
|
|
104
|
+
}
|
|
105
|
+
/** Internal marker that parts are composed under {@link GhostBreadcrumb}. */
|
|
106
|
+
export interface GhostBreadcrumbContext {
|
|
107
|
+
readonly present: true;
|
|
108
|
+
}
|
|
109
|
+
export declare const ghostBreadcrumbContextKey: InjectionKey<GhostBreadcrumbContext>;
|
|
110
|
+
/**
|
|
111
|
+
* Resolves a DOM element from either a raw element or a component ref
|
|
112
|
+
* (preferring exposed `.element` over `.$el`).
|
|
113
|
+
*/
|
|
114
|
+
export declare function resolveBreadcrumbHtmlElement(target: unknown): HTMLElement | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Native button `type` values. */
|
|
3
|
+
export type GhostButtonType = 'button' | 'submit' | 'reset';
|
|
4
|
+
/**
|
|
5
|
+
* Unstyled {@link GhostButton} props. `@vue-ignore` keeps native attributes as
|
|
6
|
+
* fallthrough at runtime while typing the full button contract for consumers.
|
|
7
|
+
*/
|
|
8
|
+
export interface GhostButtonProps extends /* @vue-ignore */ ButtonHTMLAttributes {
|
|
9
|
+
/**
|
|
10
|
+
* Prevents activation and removes the button from sequential focus order.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Pending action; content stays so the accessible name does not change.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Native behavior. Defaults to `button` so forms are not submitted by accident.
|
|
21
|
+
* @default 'button'
|
|
22
|
+
*/
|
|
23
|
+
type?: GhostButtonType;
|
|
24
|
+
}
|
|
25
|
+
/** Options for {@link useGhostButton}. */
|
|
26
|
+
export interface UseGhostButtonOptions {
|
|
27
|
+
disabled?: MaybeRefOrGetter<boolean | undefined>;
|
|
28
|
+
loading?: MaybeRefOrGetter<boolean | undefined>;
|
|
29
|
+
type?: MaybeRefOrGetter<GhostButtonType | undefined>;
|
|
30
|
+
}
|
|
31
|
+
/** Methods and state available from a template ref to {@link GhostButton}. */
|
|
32
|
+
export interface GhostButtonExposed {
|
|
33
|
+
/** The native button element after mount, or `null` before mount. */
|
|
34
|
+
readonly element: HTMLButtonElement | null;
|
|
35
|
+
/** Moves focus to the native button when it is mounted and enabled. */
|
|
36
|
+
focus(options?: FocusOptions): void;
|
|
37
|
+
/** Removes focus from the native button when it is mounted. */
|
|
38
|
+
blur(): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { CalendarDate, DateDuration, DateValue } from '@internationalized/date';
|
|
2
|
+
import type { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref, WritableComputedRef } from 'vue';
|
|
3
|
+
/** Inclusive range selection value. */
|
|
4
|
+
export interface GhostCalendarRangeValue {
|
|
5
|
+
start: DateValue;
|
|
6
|
+
end: DateValue;
|
|
7
|
+
}
|
|
8
|
+
export type GhostCalendarValue = DateValue | GhostCalendarRangeValue | undefined;
|
|
9
|
+
export type GhostCalendarSelectionMode = 'single' | 'range';
|
|
10
|
+
export type GhostCalendarHeaderElement = string | Component;
|
|
11
|
+
export type GhostCalendarHeadingElement = string | Component;
|
|
12
|
+
export type GhostCalendarNavButtonElement = string | Component;
|
|
13
|
+
export type GhostCalendarGridElement = string | Component;
|
|
14
|
+
export type GhostCalendarCellElement = string | Component;
|
|
15
|
+
export type GhostCalendarCellState = 'selected' | 'range-start' | 'range-end' | 'range-middle' | 'none';
|
|
16
|
+
export interface GhostCalendarProps {
|
|
17
|
+
/**
|
|
18
|
+
* Controlled selection. Omit (or pass `undefined`) for uncontrolled state.
|
|
19
|
+
* `null` is an explicitly controlled empty selection: the calendar renders
|
|
20
|
+
* nothing selected, ignores `defaultValue`, and only changes when the parent
|
|
21
|
+
* applies an `update:modelValue` proposal. Slots and emitted payloads still
|
|
22
|
+
* report empty as `undefined`.
|
|
23
|
+
*/
|
|
24
|
+
modelValue?: GhostCalendarValue | null;
|
|
25
|
+
defaultValue?: GhostCalendarValue;
|
|
26
|
+
selectionMode?: GhostCalendarSelectionMode;
|
|
27
|
+
minValue?: CalendarDate;
|
|
28
|
+
maxValue?: CalendarDate;
|
|
29
|
+
isDateDisabled?: (date: CalendarDate) => boolean;
|
|
30
|
+
locale?: string;
|
|
31
|
+
weekStartsOn?: number;
|
|
32
|
+
visibleMonth?: CalendarDate | undefined;
|
|
33
|
+
defaultVisibleMonth?: CalendarDate | undefined;
|
|
34
|
+
today?: CalendarDate | undefined;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface GhostCalendarSlotProps {
|
|
38
|
+
modelValue: GhostCalendarValue;
|
|
39
|
+
visibleMonth: CalendarDate;
|
|
40
|
+
selectionMode: GhostCalendarSelectionMode;
|
|
41
|
+
}
|
|
42
|
+
export interface GhostCalendarHeadingSlotProps {
|
|
43
|
+
label: string;
|
|
44
|
+
visibleMonth: CalendarDate;
|
|
45
|
+
}
|
|
46
|
+
export interface GhostCalendarGridCellSlotProps {
|
|
47
|
+
date: CalendarDate;
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
selected: boolean;
|
|
50
|
+
focused: boolean;
|
|
51
|
+
today: boolean;
|
|
52
|
+
outsideMonth: boolean;
|
|
53
|
+
state: GhostCalendarCellState;
|
|
54
|
+
formattedDate: string;
|
|
55
|
+
}
|
|
56
|
+
export interface GhostCalendarExposed {
|
|
57
|
+
readonly element: HTMLElement | null;
|
|
58
|
+
}
|
|
59
|
+
export interface GhostCalendarPartExposed {
|
|
60
|
+
readonly element: HTMLElement | null;
|
|
61
|
+
focus(options?: FocusOptions): void;
|
|
62
|
+
blur(): void;
|
|
63
|
+
}
|
|
64
|
+
export interface UseGhostCalendarOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Controlled selection. `undefined` is uncontrolled; `null` is a controlled
|
|
67
|
+
* empty selection. The returned `modelValue` and `onValueChange` payloads
|
|
68
|
+
* normalize empty to `undefined`.
|
|
69
|
+
*/
|
|
70
|
+
modelValue?: MaybeRefOrGetter<GhostCalendarValue | null>;
|
|
71
|
+
defaultValue?: MaybeRefOrGetter<GhostCalendarValue>;
|
|
72
|
+
selectionMode?: MaybeRefOrGetter<GhostCalendarSelectionMode>;
|
|
73
|
+
minValue?: MaybeRefOrGetter<CalendarDate | undefined>;
|
|
74
|
+
maxValue?: MaybeRefOrGetter<CalendarDate | undefined>;
|
|
75
|
+
isDateDisabled?: MaybeRefOrGetter<((date: CalendarDate) => boolean) | undefined>;
|
|
76
|
+
locale?: MaybeRefOrGetter<string>;
|
|
77
|
+
weekStartsOn?: MaybeRefOrGetter<number | undefined>;
|
|
78
|
+
visibleMonth?: MaybeRefOrGetter<CalendarDate | undefined>;
|
|
79
|
+
defaultVisibleMonth?: MaybeRefOrGetter<CalendarDate | undefined>;
|
|
80
|
+
today?: MaybeRefOrGetter<CalendarDate | undefined>;
|
|
81
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
82
|
+
onValueChange?: (value: GhostCalendarValue) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Called once for every accepted date activation, after the selection
|
|
85
|
+
* proposal (`onValueChange`) and focus update. It fires even when the
|
|
86
|
+
* activated date is already selected or a controlled parent ignores the
|
|
87
|
+
* proposal, so wrappers such as `GhostDatePicker` can track their own range
|
|
88
|
+
* anchor. Activations of disabled, unavailable, or outside-month dates are
|
|
89
|
+
* rejected and do not call it.
|
|
90
|
+
*/
|
|
91
|
+
onSelect?: (date: CalendarDate) => void;
|
|
92
|
+
onVisibleMonthChange?: (month: CalendarDate) => void;
|
|
93
|
+
}
|
|
94
|
+
export interface UseGhostCalendarReturn {
|
|
95
|
+
modelValue: WritableComputedRef<GhostCalendarValue>;
|
|
96
|
+
visibleMonth: WritableComputedRef<CalendarDate>;
|
|
97
|
+
selectionMode: ComputedRef<GhostCalendarSelectionMode>;
|
|
98
|
+
locale: ComputedRef<string>;
|
|
99
|
+
weekStartsOn: ComputedRef<number | undefined>;
|
|
100
|
+
today: ComputedRef<CalendarDate | undefined>;
|
|
101
|
+
disabled: ComputedRef<boolean>;
|
|
102
|
+
focusedDate: Ref<CalendarDate>;
|
|
103
|
+
gridDates: ComputedRef<CalendarDate[]>;
|
|
104
|
+
weekRows: ComputedRef<CalendarDate[][]>;
|
|
105
|
+
weekdayLabels: ComputedRef<string[]>;
|
|
106
|
+
monthYearLabel: ComputedRef<string>;
|
|
107
|
+
selectDate: (date: CalendarDate) => void;
|
|
108
|
+
isDateFocusDisabled: (date: CalendarDate) => boolean;
|
|
109
|
+
isDateUnavailable: (date: CalendarDate) => boolean;
|
|
110
|
+
isDateDisabledForInteraction: (date: CalendarDate) => boolean;
|
|
111
|
+
isDateSelectionDisabled: (date: CalendarDate) => boolean;
|
|
112
|
+
getCellState: (date: CalendarDate) => GhostCalendarCellState;
|
|
113
|
+
isDateFocused: (date: CalendarDate) => boolean;
|
|
114
|
+
setFocusedDate: (date: CalendarDate, options?: {
|
|
115
|
+
announce?: boolean;
|
|
116
|
+
}) => void;
|
|
117
|
+
focusNextDay: (reverse?: boolean) => void;
|
|
118
|
+
focusNextWeek: (reverse?: boolean) => void;
|
|
119
|
+
focusWeekBoundary: (end?: boolean) => void;
|
|
120
|
+
focusNextMonth: (reverse?: boolean) => void;
|
|
121
|
+
focusNextYear: (reverse?: boolean) => void;
|
|
122
|
+
goToPreviousMonth: () => void;
|
|
123
|
+
goToNextMonth: () => void;
|
|
124
|
+
registerHeadingId: (id: string) => void;
|
|
125
|
+
unregisterHeadingId: () => void;
|
|
126
|
+
headingId: Ref<string | undefined>;
|
|
127
|
+
announceMonth: Ref<string>;
|
|
128
|
+
}
|
|
129
|
+
export interface GhostCalendarContext extends UseGhostCalendarReturn {
|
|
130
|
+
setGridElement: (element: HTMLElement | null) => void;
|
|
131
|
+
syncFocusedTabStops: (gridRoot: HTMLElement) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Internal focus-target accessor for wrappers that move focus into the grid
|
|
134
|
+
* (GhostDatePicker's modal initial focus). `ready` turns true once a
|
|
135
|
+
* `GhostCalendarGrid` has mounted; `resolve()` returns the control for the
|
|
136
|
+
* current roving focus date, or `null` when no grid or cell is rendered.
|
|
137
|
+
* Not part of the public barrel: consumers use `GhostCalendarGrid.focus()`.
|
|
138
|
+
*/
|
|
139
|
+
focusTarget: {
|
|
140
|
+
ready: ComputedRef<boolean>;
|
|
141
|
+
resolve: () => HTMLElement | null;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export declare const ghostCalendarContextKey: InjectionKey<GhostCalendarContext>;
|
|
145
|
+
export declare function resolveCalendarHtmlElement(host: unknown): HTMLElement | null;
|
|
146
|
+
export declare function isCalendarRangeValue(value: GhostCalendarValue): value is GhostCalendarRangeValue;
|
|
147
|
+
export declare function calendarDurationMonths(count: number): DateDuration;
|
|
148
|
+
export declare function calendarDurationYears(count: number): DateDuration;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { InteractiveEffect } from './ghost-interactive-surface.js';
|
|
3
|
+
/**
|
|
4
|
+
* Closed union: widening later is additive; narrowing is breaking. Interactive
|
|
5
|
+
* hosts must not nest other interactive descendants in header, content, or footer.
|
|
6
|
+
*/
|
|
7
|
+
export type GhostCardElement = 'div' | 'article' | 'section' | 'aside' | 'a' | 'button';
|
|
8
|
+
/** Declared props on the unstyled GhostCard SFC. */
|
|
9
|
+
export interface GhostCardProps {
|
|
10
|
+
/**
|
|
11
|
+
* Root element. Default `article` for self-contained summaries.
|
|
12
|
+
* @default 'article'
|
|
13
|
+
*/
|
|
14
|
+
as?: GhostCardElement;
|
|
15
|
+
/**
|
|
16
|
+
* Ambient spotlight recipes. Empty list keeps the card inert.
|
|
17
|
+
* @default []
|
|
18
|
+
*/
|
|
19
|
+
effects?: InteractiveEffect[];
|
|
20
|
+
}
|
|
21
|
+
/** Options for {@link useGhostCard}. */
|
|
22
|
+
export interface UseGhostCardOptions {
|
|
23
|
+
as?: MaybeRefOrGetter<GhostCardElement | undefined>;
|
|
24
|
+
}
|
|
25
|
+
/** Template ref contract for GhostCard. */
|
|
26
|
+
export interface GhostCardExposed {
|
|
27
|
+
/** Root element after mount; null before mount. */
|
|
28
|
+
readonly element: HTMLElement | null;
|
|
29
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Unstyled {@link GhostCheckbox} props. `@vue-ignore` keeps native attributes as
|
|
4
|
+
* fallthrough at runtime while typing the input contract for consumers.
|
|
5
|
+
* `checked` and `type` are omitted so they cannot fight the model or native checkbox type.
|
|
6
|
+
*/
|
|
7
|
+
export interface GhostCheckboxProps extends /* @vue-ignore */ Omit<InputHTMLAttributes, 'checked' | 'type'> {
|
|
8
|
+
/**
|
|
9
|
+
* Controlled checked state. `undefined` is uncontrolled; `false` is unchecked.
|
|
10
|
+
* Mixed is {@link GhostCheckboxProps.indeterminate}, not a third model value.
|
|
11
|
+
*/
|
|
12
|
+
modelValue?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Initial checked state when `modelValue` is omitted. Later changes are ignored.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
defaultValue?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Mixed state for select-all and similar. Applied via the DOM `indeterminate`
|
|
20
|
+
* property. Consumer-owned; not part of the v-model.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
indeterminate?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Native disabled semantics: no activation, no sequential focus, excluded from submit.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Options for {@link useGhostCheckbox}. */
|
|
31
|
+
export interface UseGhostCheckboxOptions {
|
|
32
|
+
modelValue?: MaybeRefOrGetter<boolean | undefined>;
|
|
33
|
+
defaultValue?: MaybeRefOrGetter<boolean | undefined>;
|
|
34
|
+
indeterminate?: MaybeRefOrGetter<boolean | undefined>;
|
|
35
|
+
disabled?: MaybeRefOrGetter<boolean | undefined>;
|
|
36
|
+
/** Native input for post-reset DOM reconciliation. */
|
|
37
|
+
element?: MaybeRefOrGetter<HTMLInputElement | null | undefined>;
|
|
38
|
+
/** Synchronous write. Emit `update:modelValue` here. */
|
|
39
|
+
onChange?: (value: boolean) => void;
|
|
40
|
+
}
|
|
41
|
+
/** Check triad exposed as `data-state`. Unchecked omits the attribute. */
|
|
42
|
+
export type GhostCheckboxDataState = 'checked' | 'indeterminate';
|
|
43
|
+
/** Methods and state available from a template ref to {@link GhostCheckbox}. */
|
|
44
|
+
export interface GhostCheckboxExposed {
|
|
45
|
+
/** The native checkbox after mount, or `null` before mount. */
|
|
46
|
+
readonly element: HTMLInputElement | null;
|
|
47
|
+
/** Moves focus to the native checkbox when it is mounted and enabled. */
|
|
48
|
+
focus(options?: FocusOptions): void;
|
|
49
|
+
/** Removes focus from the native checkbox when it is mounted. */
|
|
50
|
+
blur(): void;
|
|
51
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
+
/** Valid `as` targets for {@link GhostCollapsibleTrigger}. */
|
|
3
|
+
export type GhostCollapsibleTriggerElement = string | Component;
|
|
4
|
+
/** Valid `as` targets for {@link GhostCollapsibleContent}. */
|
|
5
|
+
export type GhostCollapsibleContentElement = string | Component;
|
|
6
|
+
/** Props for the {@link GhostCollapsible} root provider component. */
|
|
7
|
+
export interface GhostCollapsibleProps {
|
|
8
|
+
/**
|
|
9
|
+
* Controlled open state. Omit to run uncontrolled from `defaultOpen`.
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
12
|
+
open?: boolean | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Initial open state when `open` is omitted.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Disables toggling on the trigger when `true`.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Props passed to the {@link GhostCollapsible} default slot. */
|
|
25
|
+
export interface GhostCollapsibleSlotProps {
|
|
26
|
+
open: boolean;
|
|
27
|
+
toggle: () => void;
|
|
28
|
+
}
|
|
29
|
+
/** Props for {@link GhostCollapsibleTrigger}. */
|
|
30
|
+
export interface GhostCollapsibleTriggerProps {
|
|
31
|
+
/**
|
|
32
|
+
* Tag name or component rendered for the trigger control.
|
|
33
|
+
* @default 'button'
|
|
34
|
+
*/
|
|
35
|
+
as?: GhostCollapsibleTriggerElement;
|
|
36
|
+
/**
|
|
37
|
+
* Disables toggling on click or keyboard activation.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** Props for {@link GhostCollapsibleContent}. */
|
|
43
|
+
export interface GhostCollapsibleContentProps {
|
|
44
|
+
/**
|
|
45
|
+
* Tag name or component rendered for the disclosure panel.
|
|
46
|
+
* @default 'div'
|
|
47
|
+
*/
|
|
48
|
+
as?: GhostCollapsibleContentElement;
|
|
49
|
+
/**
|
|
50
|
+
* Skips theme height animations even when motion is allowed.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
disableAnimation?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** Methods and state exposed by a template ref to {@link GhostCollapsibleTrigger}. */
|
|
56
|
+
export interface GhostCollapsibleTriggerExposed {
|
|
57
|
+
readonly element: HTMLElement | null;
|
|
58
|
+
focus(options?: FocusOptions): void;
|
|
59
|
+
blur(): void;
|
|
60
|
+
}
|
|
61
|
+
/** Methods and state exposed by a template ref to {@link GhostCollapsibleContent}. */
|
|
62
|
+
export interface GhostCollapsibleContentExposed {
|
|
63
|
+
readonly element: HTMLElement | null;
|
|
64
|
+
focus(options?: FocusOptions): void;
|
|
65
|
+
blur(): void;
|
|
66
|
+
}
|
|
67
|
+
/** Options for {@link useGhostCollapsible}. */
|
|
68
|
+
export interface UseGhostCollapsibleOptions {
|
|
69
|
+
open?: MaybeRefOrGetter<boolean | undefined>;
|
|
70
|
+
defaultOpen?: MaybeRefOrGetter<boolean | undefined>;
|
|
71
|
+
onOpenChange?: (open: boolean) => void;
|
|
72
|
+
}
|
|
73
|
+
/** Reactive state and helpers returned by {@link useGhostCollapsible}. */
|
|
74
|
+
export interface UseGhostCollapsibleReturn {
|
|
75
|
+
isOpen: Ref<boolean>;
|
|
76
|
+
open: () => void;
|
|
77
|
+
close: () => void;
|
|
78
|
+
toggle: () => void;
|
|
79
|
+
triggerId: ComputedRef<string>;
|
|
80
|
+
contentId: ComputedRef<string>;
|
|
81
|
+
}
|
|
82
|
+
/** Internal context shared between `GhostCollapsible` parts. */
|
|
83
|
+
export interface GhostCollapsibleContext {
|
|
84
|
+
isOpen: Ref<boolean>;
|
|
85
|
+
disabled: Ref<boolean>;
|
|
86
|
+
open: () => void;
|
|
87
|
+
close: () => void;
|
|
88
|
+
toggle: () => void;
|
|
89
|
+
defaultTriggerId: ComputedRef<string>;
|
|
90
|
+
defaultContentId: ComputedRef<string>;
|
|
91
|
+
triggerId: ComputedRef<string>;
|
|
92
|
+
contentId: ComputedRef<string>;
|
|
93
|
+
triggerRegistered: Ref<boolean>;
|
|
94
|
+
setTriggerId: (id: string | null) => void;
|
|
95
|
+
setTriggerRegistered: (registered: boolean) => void;
|
|
96
|
+
setContentId: (id: string | null) => void;
|
|
97
|
+
}
|
|
98
|
+
export declare const ghostCollapsibleContextKey: InjectionKey<GhostCollapsibleContext>;
|
|
99
|
+
/**
|
|
100
|
+
* Themed height animation uses an inner grid row only on block hosts. List and
|
|
101
|
+
* definition hosts keep a direct slot so `as="ul"` / `"ol"` / `"dl"` stay valid.
|
|
102
|
+
*/
|
|
103
|
+
export declare function collapsibleHostAllowsAnimationShell(as: GhostCollapsibleContentElement | undefined): boolean;
|
|
104
|
+
export declare function resolveCollapsibleHtmlElement(target: unknown): HTMLElement | null;
|