@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,226 @@
|
|
|
1
|
+
import type { Placement, ReferenceElement, Strategy } from '@floating-ui/dom';
|
|
2
|
+
import type { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
import type { GhostPortalTarget } from './ghost-portal.js';
|
|
4
|
+
/** Valid `as` targets for {@link GhostContextMenuTrigger}. */
|
|
5
|
+
export type GhostContextMenuTriggerElement = string | Component;
|
|
6
|
+
/** Valid `as` targets for {@link GhostContextMenuContent}. */
|
|
7
|
+
export type GhostContextMenuContentElement = string | Component;
|
|
8
|
+
/** Valid `as` targets for {@link GhostContextMenuItem}. */
|
|
9
|
+
export type GhostContextMenuItemElement = string | Component;
|
|
10
|
+
/** Valid `as` targets for {@link GhostContextMenuGroup}. */
|
|
11
|
+
export type GhostContextMenuGroupElement = string | Component;
|
|
12
|
+
/** Valid `as` targets for {@link GhostContextMenuLabel}. */
|
|
13
|
+
export type GhostContextMenuLabelElement = string | Component;
|
|
14
|
+
/** Valid `as` targets for {@link GhostContextMenuSeparator}. */
|
|
15
|
+
export type GhostContextMenuSeparatorElement = string | Component;
|
|
16
|
+
/** Valid `as` targets for {@link GhostContextMenuCheckboxItem}. */
|
|
17
|
+
export type GhostContextMenuCheckboxItemElement = string | Component;
|
|
18
|
+
/** Valid `as` targets for {@link GhostContextMenuRadioGroup}. */
|
|
19
|
+
export type GhostContextMenuRadioGroupElement = string | Component;
|
|
20
|
+
/** Valid `as` targets for {@link GhostContextMenuRadioItem}. */
|
|
21
|
+
export type GhostContextMenuRadioItemElement = string | Component;
|
|
22
|
+
/** Supported floating placements relative to the pointer anchor. */
|
|
23
|
+
export type GhostContextMenuPlacement = Placement;
|
|
24
|
+
/** Supported CSS positioning strategies for floating content. */
|
|
25
|
+
export type GhostContextMenuStrategy = Strategy;
|
|
26
|
+
/** Viewport/boundary padding accepted by flip and shift options. */
|
|
27
|
+
export type GhostContextMenuPadding = number | {
|
|
28
|
+
top?: number;
|
|
29
|
+
right?: number;
|
|
30
|
+
bottom?: number;
|
|
31
|
+
left?: number;
|
|
32
|
+
};
|
|
33
|
+
/** Distance or axis offsets between anchor and menu content. */
|
|
34
|
+
export type GhostContextMenuOffsetOptions = number | {
|
|
35
|
+
mainAxis?: number;
|
|
36
|
+
crossAxis?: number;
|
|
37
|
+
alignmentAxis?: number | null;
|
|
38
|
+
};
|
|
39
|
+
/** Collision flip options for {@link GhostContextMenuContent}. */
|
|
40
|
+
export interface GhostContextMenuFlipOptions {
|
|
41
|
+
mainAxis?: boolean;
|
|
42
|
+
crossAxis?: boolean;
|
|
43
|
+
fallbackPlacements?: GhostContextMenuPlacement[];
|
|
44
|
+
padding?: GhostContextMenuPadding;
|
|
45
|
+
boundary?: Element | Element[];
|
|
46
|
+
}
|
|
47
|
+
/** Collision shift options for {@link GhostContextMenuContent}. */
|
|
48
|
+
export interface GhostContextMenuShiftOptions {
|
|
49
|
+
mainAxis?: boolean;
|
|
50
|
+
crossAxis?: boolean;
|
|
51
|
+
padding?: GhostContextMenuPadding;
|
|
52
|
+
boundary?: Element | Element[];
|
|
53
|
+
}
|
|
54
|
+
/** Props for the {@link GhostContextMenu} root provider component. */
|
|
55
|
+
export interface GhostContextMenuProps {
|
|
56
|
+
/**
|
|
57
|
+
* Controlled open state. Omit to run uncontrolled from `defaultOpen`.
|
|
58
|
+
* @default undefined
|
|
59
|
+
*/
|
|
60
|
+
open?: boolean | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Initial open state when `open` is omitted.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
defaultOpen?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** Props passed to the {@link GhostContextMenu} default slot. */
|
|
68
|
+
export interface GhostContextMenuSlotProps {
|
|
69
|
+
open: boolean;
|
|
70
|
+
close: () => void;
|
|
71
|
+
}
|
|
72
|
+
/** Props for {@link GhostContextMenuTrigger}. */
|
|
73
|
+
export interface GhostContextMenuTriggerProps {
|
|
74
|
+
/**
|
|
75
|
+
* Tag name or component wrapping the context target.
|
|
76
|
+
* @default 'span'
|
|
77
|
+
*/
|
|
78
|
+
as?: GhostContextMenuTriggerElement;
|
|
79
|
+
/**
|
|
80
|
+
* Suppresses open gestures and keyboard shortcuts.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
disabled?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Milliseconds before touch/pen long-press opens the menu.
|
|
86
|
+
* @default 500
|
|
87
|
+
*/
|
|
88
|
+
longPressDelay?: number;
|
|
89
|
+
}
|
|
90
|
+
/** Props for {@link GhostContextMenuContent}. */
|
|
91
|
+
export interface GhostContextMenuContentProps {
|
|
92
|
+
/**
|
|
93
|
+
* Tag name or component rendered for the menu surface.
|
|
94
|
+
* @default 'div'
|
|
95
|
+
*/
|
|
96
|
+
as?: GhostContextMenuContentElement;
|
|
97
|
+
/** Preferred placement relative to the pointer anchor. */
|
|
98
|
+
placement?: GhostContextMenuPlacement;
|
|
99
|
+
offset?: GhostContextMenuOffsetOptions | boolean | undefined;
|
|
100
|
+
flip?: boolean | GhostContextMenuFlipOptions;
|
|
101
|
+
shift?: boolean | GhostContextMenuShiftOptions;
|
|
102
|
+
strategy?: GhostContextMenuStrategy;
|
|
103
|
+
portal?: boolean;
|
|
104
|
+
portalTo?: GhostPortalTarget;
|
|
105
|
+
}
|
|
106
|
+
/** Props for {@link GhostContextMenuItem}. */
|
|
107
|
+
export interface GhostContextMenuItemProps {
|
|
108
|
+
as?: GhostContextMenuItemElement;
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/** Props for {@link GhostContextMenuGroup}. */
|
|
112
|
+
export interface GhostContextMenuGroupProps {
|
|
113
|
+
as?: GhostContextMenuGroupElement;
|
|
114
|
+
}
|
|
115
|
+
/** Props for {@link GhostContextMenuLabel}. */
|
|
116
|
+
export interface GhostContextMenuLabelProps {
|
|
117
|
+
as?: GhostContextMenuLabelElement;
|
|
118
|
+
}
|
|
119
|
+
/** Props for {@link GhostContextMenuSeparator}. */
|
|
120
|
+
export interface GhostContextMenuSeparatorProps {
|
|
121
|
+
as?: GhostContextMenuSeparatorElement;
|
|
122
|
+
decorative?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/** Props for {@link GhostContextMenuCheckboxItem}. */
|
|
125
|
+
export interface GhostContextMenuCheckboxItemProps {
|
|
126
|
+
as?: GhostContextMenuCheckboxItemElement;
|
|
127
|
+
checked?: boolean | undefined;
|
|
128
|
+
defaultChecked?: boolean;
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
}
|
|
131
|
+
/** Props for {@link GhostContextMenuRadioGroup}. */
|
|
132
|
+
export interface GhostContextMenuRadioGroupProps {
|
|
133
|
+
as?: GhostContextMenuRadioGroupElement;
|
|
134
|
+
modelValue?: string | undefined;
|
|
135
|
+
defaultValue?: string | undefined;
|
|
136
|
+
disabled?: boolean;
|
|
137
|
+
}
|
|
138
|
+
/** Props for {@link GhostContextMenuRadioItem}. */
|
|
139
|
+
export interface GhostContextMenuRadioItemProps {
|
|
140
|
+
as?: GhostContextMenuRadioItemElement;
|
|
141
|
+
value: string;
|
|
142
|
+
disabled?: boolean;
|
|
143
|
+
}
|
|
144
|
+
/** Methods and state exposed by a template ref to {@link GhostContextMenuTrigger}. */
|
|
145
|
+
export interface GhostContextMenuTriggerExposed {
|
|
146
|
+
readonly element: HTMLElement | null;
|
|
147
|
+
focus(options?: FocusOptions): void;
|
|
148
|
+
blur(): void;
|
|
149
|
+
}
|
|
150
|
+
/** Methods and state exposed by a template ref to {@link GhostContextMenuContent}. */
|
|
151
|
+
export interface GhostContextMenuContentExposed {
|
|
152
|
+
readonly element: HTMLElement | null;
|
|
153
|
+
focus(options?: FocusOptions): void;
|
|
154
|
+
blur(): void;
|
|
155
|
+
}
|
|
156
|
+
/** Methods and state exposed by a template ref to {@link GhostContextMenuItem}. */
|
|
157
|
+
export interface GhostContextMenuItemExposed {
|
|
158
|
+
readonly element: HTMLElement | null;
|
|
159
|
+
focus(options?: FocusOptions): void;
|
|
160
|
+
blur(): void;
|
|
161
|
+
}
|
|
162
|
+
/** Methods and state exposed by a template ref to {@link GhostContextMenuCheckboxItem}. */
|
|
163
|
+
export interface GhostContextMenuCheckboxItemExposed {
|
|
164
|
+
readonly element: HTMLElement | null;
|
|
165
|
+
focus(options?: FocusOptions): void;
|
|
166
|
+
blur(): void;
|
|
167
|
+
}
|
|
168
|
+
/** Methods and state exposed by a template ref to {@link GhostContextMenuRadioItem}. */
|
|
169
|
+
export interface GhostContextMenuRadioItemExposed {
|
|
170
|
+
readonly element: HTMLElement | null;
|
|
171
|
+
focus(options?: FocusOptions): void;
|
|
172
|
+
blur(): void;
|
|
173
|
+
}
|
|
174
|
+
/** Options for {@link useGhostContextMenu}. */
|
|
175
|
+
export interface UseGhostContextMenuOptions {
|
|
176
|
+
open?: MaybeRefOrGetter<boolean | undefined>;
|
|
177
|
+
defaultOpen?: MaybeRefOrGetter<boolean | undefined>;
|
|
178
|
+
onOpenChange?: (open: boolean) => void;
|
|
179
|
+
}
|
|
180
|
+
/** Reactive state and helpers returned by {@link useGhostContextMenu}. */
|
|
181
|
+
export interface UseGhostContextMenuReturn {
|
|
182
|
+
isOpen: Ref<boolean>;
|
|
183
|
+
open: () => void;
|
|
184
|
+
close: () => void;
|
|
185
|
+
triggerId: ComputedRef<string>;
|
|
186
|
+
contentId: ComputedRef<string>;
|
|
187
|
+
}
|
|
188
|
+
/** Pointer coordinates used for the virtual floating anchor. */
|
|
189
|
+
export interface GhostContextMenuPointerPosition {
|
|
190
|
+
x: number;
|
|
191
|
+
y: number;
|
|
192
|
+
}
|
|
193
|
+
/** Internal context shared between context menu parts. */
|
|
194
|
+
export interface GhostContextMenuContext {
|
|
195
|
+
isOpen: Ref<boolean>;
|
|
196
|
+
open: () => void;
|
|
197
|
+
close: () => void;
|
|
198
|
+
openAtPointer: (x: number, y: number) => void;
|
|
199
|
+
defaultTriggerId: ComputedRef<string>;
|
|
200
|
+
defaultContentId: ComputedRef<string>;
|
|
201
|
+
triggerId: ComputedRef<string>;
|
|
202
|
+
contentId: ComputedRef<string>;
|
|
203
|
+
triggerElement: Ref<HTMLElement | null>;
|
|
204
|
+
virtualReference: ComputedRef<ReferenceElement>;
|
|
205
|
+
pointerPosition: Ref<GhostContextMenuPointerPosition>;
|
|
206
|
+
setTriggerElement: (element: HTMLElement | null) => void;
|
|
207
|
+
setTriggerId: (id: string | null) => void;
|
|
208
|
+
setContentId: (id: string | null) => void;
|
|
209
|
+
}
|
|
210
|
+
export declare const ghostContextMenuContextKey: InjectionKey<GhostContextMenuContext>;
|
|
211
|
+
/** Radio group context scoped to a context menu. */
|
|
212
|
+
export interface GhostContextMenuRadioGroupContext {
|
|
213
|
+
readonly selectedValue: Ref<string | undefined>;
|
|
214
|
+
disabled: ComputedRef<boolean>;
|
|
215
|
+
select: (value: string) => void;
|
|
216
|
+
isSelected: (value: string) => boolean;
|
|
217
|
+
isItemDisabled: (value: string) => boolean;
|
|
218
|
+
}
|
|
219
|
+
export declare const ghostContextMenuRadioGroupContextKey: InjectionKey<GhostContextMenuRadioGroupContext>;
|
|
220
|
+
/**
|
|
221
|
+
* Resolves a DOM element from either a raw element or a component ref
|
|
222
|
+
* (preferring exposed `.element` over `.$el`).
|
|
223
|
+
*/
|
|
224
|
+
export declare function resolveContextMenuHtmlElement(target: unknown): HTMLElement | null;
|
|
225
|
+
/** Builds a zero-size virtual reference for {@link useFloating}. */
|
|
226
|
+
export declare function createContextMenuVirtualReference(getPosition: () => GhostContextMenuPointerPosition): ReferenceElement;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { DataTablePaginationState, DataTableRowId } from './ghost-data-table.js';
|
|
2
|
+
import type { GhostEmptyStateHeadingLevel } from './ghost-empty-state.js';
|
|
3
|
+
import type { DataTableColumnRow, DataTableTableColumnRef, GhostDataTableTableProps, GhostDataTableTableSlots } from './ghost-data-table-table.js';
|
|
4
|
+
/** Props of the `#detail` slot: the expanded row. */
|
|
5
|
+
export interface GhostDataTablePresetDetailSlotProps<TData> {
|
|
6
|
+
row: TData;
|
|
7
|
+
rowId: DataTableRowId;
|
|
8
|
+
rowIndex: number;
|
|
9
|
+
}
|
|
10
|
+
/** Props of the `#search` slot, which replaces the default search field. */
|
|
11
|
+
export interface GhostDataTablePresetSearchSlotProps {
|
|
12
|
+
/** Current global filter as text (`''` when cleared). */
|
|
13
|
+
value: string;
|
|
14
|
+
/** Commits a global filter through the root (resets the page on server filtering). */
|
|
15
|
+
setValue: (value: string) => void;
|
|
16
|
+
/** The preset's `searchLabel`. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** `true` while the parent `GhostDataTable` is disabled. */
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** State and command for an opted-in `bulkActions` slot with selected rows. */
|
|
22
|
+
export interface GhostDataTablePresetBulkActionsSlotProps {
|
|
23
|
+
/** Includes selections on other server pages. Treat the IDs as read-only. */
|
|
24
|
+
selectedRowIds: readonly DataTableRowId[];
|
|
25
|
+
/** Count of all selected IDs. */
|
|
26
|
+
selectedCount: number;
|
|
27
|
+
/** Clears all selections while selection is enabled and the table is operable. */
|
|
28
|
+
clearSelection: () => void;
|
|
29
|
+
}
|
|
30
|
+
/** Pager state for an opted-in `footer` slot. */
|
|
31
|
+
export interface GhostDataTablePresetFooterSlotProps {
|
|
32
|
+
/** Effective 1-based pagination. */
|
|
33
|
+
pagination: DataTablePaginationState;
|
|
34
|
+
/** Effective page count, including one page for an empty result. */
|
|
35
|
+
pageCount: number;
|
|
36
|
+
/** Filtered local count or server-supplied total. */
|
|
37
|
+
rowCount: number;
|
|
38
|
+
/** Commits a page change through the root and emits its usual events. */
|
|
39
|
+
setPageIndex: (pageIndex: number) => void;
|
|
40
|
+
}
|
|
41
|
+
interface GhostDataTablePresetLayoutSlots {
|
|
42
|
+
toolbarStart?: () => unknown;
|
|
43
|
+
toolbarEnd?: () => unknown;
|
|
44
|
+
bulkActions?: (props: GhostDataTablePresetBulkActionsSlotProps) => unknown;
|
|
45
|
+
footer?: (props: GhostDataTablePresetFooterSlotProps) => unknown;
|
|
46
|
+
}
|
|
47
|
+
/** Opt-in layout regions of {@link GhostDataTablePreset}. */
|
|
48
|
+
export type GhostDataTablePresetLayoutSlotName = keyof GhostDataTablePresetLayoutSlots;
|
|
49
|
+
/**
|
|
50
|
+
* Typed cell slots plus the legacy structure slots and opted-in layout slots.
|
|
51
|
+
* A new layout name keeps its cell signature until it is enabled via `layoutSlots`.
|
|
52
|
+
*/
|
|
53
|
+
export type GhostDataTablePresetSlots<TColumns extends readonly DataTableTableColumnRef[], TLayout extends GhostDataTablePresetLayoutSlotName = never> = Omit<GhostDataTableTableSlots<TColumns>, NoInfer<TLayout>> & Pick<GhostDataTablePresetLayoutSlots, NoInfer<TLayout>> & {
|
|
54
|
+
/** Content of an expanded row's detail `<tr>` (one cell spanning the row). */
|
|
55
|
+
detail?: (props: GhostDataTablePresetDetailSlotProps<DataTableColumnRow<TColumns[number]>>) => unknown;
|
|
56
|
+
/** Rendered before the search field and the table. */
|
|
57
|
+
toolbar?: () => unknown;
|
|
58
|
+
/** Replaces the default search field (for example to debounce input). */
|
|
59
|
+
search?: (props: GhostDataTablePresetSearchSlotProps) => unknown;
|
|
60
|
+
};
|
|
61
|
+
/** Props for {@link GhostDataTablePreset}. */
|
|
62
|
+
export interface GhostDataTablePresetProps<TColumns extends readonly DataTableTableColumnRef[], TLayout extends GhostDataTablePresetLayoutSlotName = never> extends GhostDataTableTableProps<TColumns> {
|
|
63
|
+
/** Opt into the named layout slots on this preset. Omit to keep all four names available for cells. */
|
|
64
|
+
layoutSlots?: readonly TLayout[];
|
|
65
|
+
/**
|
|
66
|
+
* Visible title of the `GhostEmptyState` shown when no rows render.
|
|
67
|
+
* @default 'No results'
|
|
68
|
+
*/
|
|
69
|
+
emptyTitle?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Heading level of the empty-state title. Match the page outline (axe
|
|
72
|
+
* `heading-order`): one below the nearest heading above the table.
|
|
73
|
+
* @default 3
|
|
74
|
+
*/
|
|
75
|
+
emptyHeadingLevel?: GhostEmptyStateHeadingLevel;
|
|
76
|
+
/** Visible label of the default search field. @default 'Search' */
|
|
77
|
+
searchLabel?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Accessible name of the selection column header (`aria-label` on the
|
|
80
|
+
* `<th>`, which holds only the select-all checkbox). @default 'Selection'
|
|
81
|
+
*/
|
|
82
|
+
selectionHeaderLabel?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Accessible name of the expansion column header (visually hidden text in
|
|
85
|
+
* the `<th>`). @default 'Details'
|
|
86
|
+
*/
|
|
87
|
+
expansionHeaderLabel?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Shows the search field (or `#search` slot). Defaults to `true` when any
|
|
90
|
+
* column takes part in the global filter (an accessor and
|
|
91
|
+
* `enableColumnFilter !== false`).
|
|
92
|
+
*/
|
|
93
|
+
showGlobalFilter?: boolean | undefined;
|
|
94
|
+
/** Accessible name of the select-all checkbox. @default 'Select all rows' */
|
|
95
|
+
selectAllLabel?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Accessible name of a row's selection checkbox.
|
|
98
|
+
* @default (rowId) => `Select row ${rowId}`
|
|
99
|
+
*/
|
|
100
|
+
rowSelectionLabel?: (rowId: DataTableRowId) => string;
|
|
101
|
+
/**
|
|
102
|
+
* Accessible name of a row's expand button.
|
|
103
|
+
* @default (rowId) => `Show details for ${rowId}`
|
|
104
|
+
*/
|
|
105
|
+
rowExpansionLabel?: (rowId: DataTableRowId) => string;
|
|
106
|
+
}
|
|
107
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { DataTableTypedCellContext } from './define-data-table-columns.js';
|
|
3
|
+
import type { DataTableRowId, GhostDataTableSlotProps } from './ghost-data-table.js';
|
|
4
|
+
import type { GhostTableProps } from './ghost-table.js';
|
|
5
|
+
/** Minimal column shape `GhostDataTableTable` reads from its `columns` prop. */
|
|
6
|
+
export interface DataTableTableColumnRef {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Row type of a column definition, read from its `accessorFn` parameter
|
|
11
|
+
* (present, optional, on every `DataTableColumnDef<TData>`).
|
|
12
|
+
*/
|
|
13
|
+
export type DataTableColumnRow<TColumn> = TColumn extends {
|
|
14
|
+
accessorFn?: (row: infer TData, index: number) => unknown;
|
|
15
|
+
} ? TData : unknown;
|
|
16
|
+
/**
|
|
17
|
+
* Value type of a column. Columns from `defineDataTableColumns` keep their
|
|
18
|
+
* literal accessor, so this is `row[key]` or the `accessorFn` return type.
|
|
19
|
+
* Hand-written `DataTableColumnDef` objects give `unknown`, matching the
|
|
20
|
+
* generic `getValue(): unknown` policy.
|
|
21
|
+
*/
|
|
22
|
+
export type DataTableColumnValue<TColumn> = TColumn extends {
|
|
23
|
+
accessorFn: (row: never, index: number) => infer TValue;
|
|
24
|
+
} ? TValue : TColumn extends {
|
|
25
|
+
accessorKey: infer K;
|
|
26
|
+
} ? K extends keyof DataTableColumnRow<TColumn> ? DataTableColumnRow<TColumn>[K] : unknown : unknown;
|
|
27
|
+
/**
|
|
28
|
+
* Props of a `#<columnId>` cell slot: the cell context plus the cell `value`
|
|
29
|
+
* (read once per render) and a `getValue()` that returns it.
|
|
30
|
+
*/
|
|
31
|
+
export type GhostDataTableTableCellSlotProps<TData, TValue> = DataTableTypedCellContext<TData, TValue>;
|
|
32
|
+
/**
|
|
33
|
+
* Slots of {@link GhostDataTableTable}: one optional cell slot per column id.
|
|
34
|
+
* With a `columns` array from `defineDataTableColumns`, each slot's `value` is
|
|
35
|
+
* typed from its column; otherwise slot names are any string and `value` is
|
|
36
|
+
* `unknown`.
|
|
37
|
+
*/
|
|
38
|
+
export type GhostDataTableTableSlots<TColumns extends readonly DataTableTableColumnRef[]> = {
|
|
39
|
+
[TColumn in TColumns[number] as TColumn['id']]?: (props: GhostDataTableTableCellSlotProps<DataTableColumnRow<TColumn>, DataTableColumnValue<TColumn>>) => unknown;
|
|
40
|
+
};
|
|
41
|
+
/** Props for {@link GhostDataTableTable}. */
|
|
42
|
+
export interface GhostDataTableTableProps<TColumns extends readonly DataTableTableColumnRef[]> extends GhostTableProps {
|
|
43
|
+
/**
|
|
44
|
+
* Columns to render, in order, matched to the parent `GhostDataTable`
|
|
45
|
+
* columns by `id` (ids the parent does not have are skipped). Defaults to
|
|
46
|
+
* every parent column. Pass the same array you give `GhostDataTable` to
|
|
47
|
+
* type the `#<columnId>` slots.
|
|
48
|
+
*/
|
|
49
|
+
columns?: TColumns;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* What `GhostDataTable` provides to its rendering children. The row type is
|
|
53
|
+
* hidden behind a generic callback (an existential), so a child can read the
|
|
54
|
+
* root's typed bindings without the root's `TData` and without a cast.
|
|
55
|
+
* Reading inside a `computed` tracks the root's reactive bindings.
|
|
56
|
+
*/
|
|
57
|
+
export interface GhostDataTableContext {
|
|
58
|
+
withBindings: <TResult>(read: <TData>(bindings: GhostDataTableSlotProps<TData>) => TResult) => TResult;
|
|
59
|
+
/** Current global filter value (controlled prop or internal state). */
|
|
60
|
+
globalFilter: () => unknown;
|
|
61
|
+
/** Commits a global filter through the root (page reset and `stateChange`). */
|
|
62
|
+
setGlobalFilter: (globalFilter: unknown) => void;
|
|
63
|
+
/** Resolved `enableRowSelection`. */
|
|
64
|
+
rowSelectionEnabled: () => boolean;
|
|
65
|
+
/** Authoritative selection, including off-page rows in manual pagination. */
|
|
66
|
+
selectedRowIds: () => readonly DataTableRowId[];
|
|
67
|
+
/** Clears the root selection. Callers that expose a UI action check disabled state. */
|
|
68
|
+
resetRowSelection: () => void;
|
|
69
|
+
/** Resolved `enableRowExpansion`. */
|
|
70
|
+
rowExpansionEnabled: () => boolean;
|
|
71
|
+
/** Resolved `disabled`. */
|
|
72
|
+
disabled: () => boolean;
|
|
73
|
+
/** True when any root column takes part in the global filter. */
|
|
74
|
+
hasGlobalFilterColumns: () => boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare const ghostDataTableContextKey: InjectionKey<GhostDataTableContext>;
|