@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.
Files changed (356) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +40 -2
  3. package/dist/.registries/component-names.generated.d.ts +3 -0
  4. package/dist/GhostAccordion.vue.d.ts +38 -0
  5. package/dist/GhostAccordionContent.vue.d.ts +26 -0
  6. package/dist/GhostAccordionItem.vue.d.ts +20 -0
  7. package/dist/GhostAccordionTrigger.vue.d.ts +23 -0
  8. package/dist/GhostAvatar.vue.d.ts +27 -0
  9. package/dist/GhostBadge.vue.d.ts +16 -0
  10. package/dist/GhostBreadcrumb.vue.d.ts +28 -0
  11. package/dist/GhostBreadcrumbEllipsis.vue.d.ts +20 -0
  12. package/dist/GhostBreadcrumbItem.vue.d.ts +25 -0
  13. package/dist/GhostBreadcrumbLink.vue.d.ts +25 -0
  14. package/dist/GhostBreadcrumbList.vue.d.ts +25 -0
  15. package/dist/GhostBreadcrumbPage.vue.d.ts +25 -0
  16. package/dist/GhostBreadcrumbSeparator.vue.d.ts +25 -0
  17. package/dist/GhostButton.vue.d.ts +25 -0
  18. package/dist/GhostCalendar.vue.d.ts +57 -0
  19. package/dist/GhostCalendarCell.vue.d.ts +35 -0
  20. package/dist/GhostCalendarGrid.vue.d.ts +19 -0
  21. package/dist/GhostCalendarHeader.vue.d.ts +24 -0
  22. package/dist/GhostCalendarHeading.vue.d.ts +22 -0
  23. package/dist/GhostCalendarNextButton.vue.d.ts +24 -0
  24. package/dist/GhostCalendarPrevButton.vue.d.ts +24 -0
  25. package/dist/GhostCard.vue.d.ts +18 -0
  26. package/dist/GhostCheckbox.vue.d.ts +48 -0
  27. package/dist/GhostCheckboxGroup.vue.d.ts +24 -0
  28. package/dist/GhostCollapsible.vue.d.ts +31 -0
  29. package/dist/GhostCollapsibleContent.vue.d.ts +30 -0
  30. package/dist/GhostCollapsibleTrigger.vue.d.ts +28 -0
  31. package/dist/GhostCombobox.vue.d.ts +69 -0
  32. package/dist/GhostComboboxContent.vue.d.ts +41 -0
  33. package/dist/GhostComboboxEmpty.vue.d.ts +21 -0
  34. package/dist/GhostComboboxGroup.vue.d.ts +21 -0
  35. package/dist/GhostComboboxInput.vue.d.ts +11 -0
  36. package/dist/GhostComboboxLabel.vue.d.ts +21 -0
  37. package/dist/GhostComboboxOption.vue.d.ts +29 -0
  38. package/dist/GhostComboboxTrigger.vue.d.ts +26 -0
  39. package/dist/GhostCommandPalette.vue.d.ts +57 -0
  40. package/dist/GhostCommandPaletteContent.vue.d.ts +47 -0
  41. package/dist/GhostCommandPaletteEmpty.vue.d.ts +25 -0
  42. package/dist/GhostCommandPaletteGroup.vue.d.ts +25 -0
  43. package/dist/GhostCommandPaletteInput.vue.d.ts +13 -0
  44. package/dist/GhostCommandPaletteItem.vue.d.ts +33 -0
  45. package/dist/GhostCommandPaletteLabel.vue.d.ts +25 -0
  46. package/dist/GhostCommandPaletteList.vue.d.ts +25 -0
  47. package/dist/GhostCommandPaletteOverlay.vue.d.ts +32 -0
  48. package/dist/GhostCommandPaletteSeparator.vue.d.ts +10 -0
  49. package/dist/GhostCommandPaletteTitle.vue.d.ts +25 -0
  50. package/dist/GhostCommandPaletteTrigger.vue.d.ts +28 -0
  51. package/dist/GhostContextMenu.vue.d.ts +26 -0
  52. package/dist/GhostContextMenuCheckboxItem.vue.d.ts +63 -0
  53. package/dist/GhostContextMenuContent.vue.d.ts +39 -0
  54. package/dist/GhostContextMenuGroup.vue.d.ts +21 -0
  55. package/dist/GhostContextMenuItem.vue.d.ts +30 -0
  56. package/dist/GhostContextMenuLabel.vue.d.ts +21 -0
  57. package/dist/GhostContextMenuRadioGroup.vue.d.ts +31 -0
  58. package/dist/GhostContextMenuRadioItem.vue.d.ts +31 -0
  59. package/dist/GhostContextMenuSeparator.vue.d.ts +11 -0
  60. package/dist/GhostContextMenuTrigger.vue.d.ts +28 -0
  61. package/dist/GhostDataTable.vue.d.ts +29 -0
  62. package/dist/GhostDataTablePreset.vue.d.ts +21 -0
  63. package/dist/GhostDataTableTable.vue.d.ts +20 -0
  64. package/dist/GhostDatePicker.vue.d.ts +106 -0
  65. package/dist/GhostDatePickerCalendar.vue.d.ts +16 -0
  66. package/dist/GhostDatePickerContent.vue.d.ts +46 -0
  67. package/dist/GhostDatePickerInput.vue.d.ts +19 -0
  68. package/dist/GhostDatePickerTrigger.vue.d.ts +14 -0
  69. package/dist/GhostDialog.vue.d.ts +31 -0
  70. package/dist/GhostDialogClose.vue.d.ts +28 -0
  71. package/dist/GhostDialogContent.vue.d.ts +50 -0
  72. package/dist/GhostDialogDescription.vue.d.ts +25 -0
  73. package/dist/GhostDialogOverlay.vue.d.ts +32 -0
  74. package/dist/GhostDialogTitle.vue.d.ts +25 -0
  75. package/dist/GhostDialogTrigger.vue.d.ts +28 -0
  76. package/dist/GhostDrawer.vue.d.ts +39 -0
  77. package/dist/GhostDrawerClose.vue.d.ts +28 -0
  78. package/dist/GhostDrawerContent.vue.d.ts +47 -0
  79. package/dist/GhostDrawerDescription.vue.d.ts +25 -0
  80. package/dist/GhostDrawerOverlay.vue.d.ts +32 -0
  81. package/dist/GhostDrawerTitle.vue.d.ts +25 -0
  82. package/dist/GhostDrawerTrigger.vue.d.ts +28 -0
  83. package/dist/GhostDropdownMenu.vue.d.ts +26 -0
  84. package/dist/GhostDropdownMenuCheckboxItem.vue.d.ts +63 -0
  85. package/dist/GhostDropdownMenuContent.vue.d.ts +39 -0
  86. package/dist/GhostDropdownMenuGroup.vue.d.ts +21 -0
  87. package/dist/GhostDropdownMenuItem.vue.d.ts +30 -0
  88. package/dist/GhostDropdownMenuLabel.vue.d.ts +21 -0
  89. package/dist/GhostDropdownMenuRadioGroup.vue.d.ts +31 -0
  90. package/dist/GhostDropdownMenuRadioItem.vue.d.ts +31 -0
  91. package/dist/GhostDropdownMenuSeparator.vue.d.ts +11 -0
  92. package/dist/GhostDropdownMenuTrigger.vue.d.ts +26 -0
  93. package/dist/GhostEmptyState.vue.d.ts +19 -0
  94. package/dist/GhostField.vue.d.ts +31 -0
  95. package/dist/GhostFieldControl.vue.d.ts +13 -0
  96. package/dist/GhostFieldDescription.vue.d.ts +21 -0
  97. package/dist/GhostFieldError.vue.d.ts +18 -0
  98. package/dist/GhostFieldLabel.vue.d.ts +30 -0
  99. package/dist/GhostFileUpload.vue.d.ts +64 -0
  100. package/dist/GhostFileUploadDropzone.vue.d.ts +13 -0
  101. package/dist/GhostFileUploadItem.vue.d.ts +17 -0
  102. package/dist/GhostFileUploadItemRemove.vue.d.ts +13 -0
  103. package/dist/GhostFileUploadList.vue.d.ts +13 -0
  104. package/dist/GhostFileUploadTrigger.vue.d.ts +19 -0
  105. package/dist/GhostForm.vue.d.ts +25 -0
  106. package/dist/GhostHoverCard.vue.d.ts +37 -0
  107. package/dist/GhostHoverCardContent.vue.d.ts +47 -0
  108. package/dist/GhostHoverCardTrigger.vue.d.ts +28 -0
  109. package/dist/GhostInlineAlert.vue.d.ts +19 -0
  110. package/dist/GhostInput.vue.d.ts +26 -0
  111. package/dist/GhostInteractiveSurface.vue.d.ts +25 -0
  112. package/dist/GhostKbd.vue.d.ts +25 -0
  113. package/dist/GhostLink.vue.d.ts +25 -0
  114. package/dist/GhostMenubar.vue.d.ts +27 -0
  115. package/dist/GhostMenubarCheckboxItem.vue.d.ts +63 -0
  116. package/dist/GhostMenubarContent.vue.d.ts +39 -0
  117. package/dist/GhostMenubarGroup.vue.d.ts +21 -0
  118. package/dist/GhostMenubarItem.vue.d.ts +30 -0
  119. package/dist/GhostMenubarLabel.vue.d.ts +21 -0
  120. package/dist/GhostMenubarMenu.vue.d.ts +26 -0
  121. package/dist/GhostMenubarRadioGroup.vue.d.ts +31 -0
  122. package/dist/GhostMenubarRadioItem.vue.d.ts +31 -0
  123. package/dist/GhostMenubarSeparator.vue.d.ts +11 -0
  124. package/dist/GhostMenubarTrigger.vue.d.ts +26 -0
  125. package/dist/GhostNumberInput.vue.d.ts +37 -0
  126. package/dist/GhostPagination.vue.d.ts +53 -0
  127. package/dist/GhostPopover.vue.d.ts +28 -0
  128. package/dist/GhostPopoverClose.vue.d.ts +28 -0
  129. package/dist/GhostPopoverContent.vue.d.ts +47 -0
  130. package/dist/GhostPopoverTrigger.vue.d.ts +28 -0
  131. package/dist/GhostPortal.vue.d.ts +28 -0
  132. package/dist/GhostPresence.vue.d.ts +27 -0
  133. package/dist/GhostProgress.vue.d.ts +14 -0
  134. package/dist/GhostRadioGroup.vue.d.ts +36 -0
  135. package/dist/GhostRadioGroupItem.vue.d.ts +10 -0
  136. package/dist/GhostScrollArea.vue.d.ts +17 -0
  137. package/dist/GhostScrollSpy.vue.d.ts +57 -0
  138. package/dist/GhostScrollSpyItem.vue.d.ts +26 -0
  139. package/dist/GhostScrollSpyLink.vue.d.ts +27 -0
  140. package/dist/GhostScrollSpyList.vue.d.ts +24 -0
  141. package/dist/GhostSegmentedControl.vue.d.ts +44 -0
  142. package/dist/GhostSegmentedControlIndicator.vue.d.ts +3 -0
  143. package/dist/GhostSegmentedControlItem.vue.d.ts +30 -0
  144. package/dist/GhostSelect.vue.d.ts +24 -0
  145. package/dist/GhostSelectContent.vue.d.ts +41 -0
  146. package/dist/GhostSelectGroup.vue.d.ts +21 -0
  147. package/dist/GhostSelectLabel.vue.d.ts +21 -0
  148. package/dist/GhostSelectOption.vue.d.ts +29 -0
  149. package/dist/GhostSelectTrigger.vue.d.ts +26 -0
  150. package/dist/GhostSelectValue.vue.d.ts +14 -0
  151. package/dist/GhostSeparator.vue.d.ts +7 -0
  152. package/dist/GhostSkeleton.vue.d.ts +18 -0
  153. package/dist/GhostSlider.vue.d.ts +141 -0
  154. package/dist/GhostSpinner.vue.d.ts +8 -0
  155. package/dist/GhostSubmenu.vue.d.ts +23 -0
  156. package/dist/GhostSubmenuContent.vue.d.ts +20 -0
  157. package/dist/GhostSubmenuTrigger.vue.d.ts +17 -0
  158. package/dist/GhostSwitch.vue.d.ts +37 -0
  159. package/dist/GhostTable.vue.d.ts +15 -0
  160. package/dist/GhostTableBody.vue.d.ts +13 -0
  161. package/dist/GhostTableCaption.vue.d.ts +13 -0
  162. package/dist/GhostTableCell.vue.d.ts +13 -0
  163. package/dist/GhostTableFoot.vue.d.ts +13 -0
  164. package/dist/GhostTableHead.vue.d.ts +13 -0
  165. package/dist/GhostTableHeaderCell.vue.d.ts +13 -0
  166. package/dist/GhostTableRow.vue.d.ts +13 -0
  167. package/dist/GhostTabs.vue.d.ts +37 -0
  168. package/dist/GhostTabsContent.vue.d.ts +27 -0
  169. package/dist/GhostTabsList.vue.d.ts +25 -0
  170. package/dist/GhostTabsTrigger.vue.d.ts +30 -0
  171. package/dist/GhostTagsInput.vue.d.ts +26 -0
  172. package/dist/GhostTextarea.vue.d.ts +29 -0
  173. package/dist/GhostToast.vue.d.ts +17 -0
  174. package/dist/GhostToastAction.vue.d.ts +17 -0
  175. package/dist/GhostToastClose.vue.d.ts +16 -0
  176. package/dist/GhostToastDescription.vue.d.ts +12 -0
  177. package/dist/GhostToastProvider.vue.d.ts +24 -0
  178. package/dist/GhostToastTitle.vue.d.ts +12 -0
  179. package/dist/GhostToastViewport.vue.d.ts +25 -0
  180. package/dist/GhostToggleGroup.vue.d.ts +41 -0
  181. package/dist/GhostToggleGroupItem.vue.d.ts +30 -0
  182. package/dist/GhostToolbar.vue.d.ts +29 -0
  183. package/dist/GhostTooltip.vue.d.ts +36 -0
  184. package/dist/GhostTooltipContent.vue.d.ts +47 -0
  185. package/dist/GhostTooltipProvider.vue.d.ts +16 -0
  186. package/dist/GhostTooltipTrigger.vue.d.ts +28 -0
  187. package/dist/GhostTree.vue.d.ts +59 -0
  188. package/dist/GhostTreeGroup.vue.d.ts +22 -0
  189. package/dist/GhostTreeItem.vue.d.ts +27 -0
  190. package/dist/GhostTreeTrigger.vue.d.ts +25 -0
  191. package/dist/GhostVisuallyHidden.vue.d.ts +19 -0
  192. package/dist/accordion-header-keyboard.d.ts +11 -0
  193. package/dist/calendar-date-math.d.ts +16 -0
  194. package/dist/calendar-intl.d.ts +7 -0
  195. package/dist/calendar-public-date.d.ts +1 -0
  196. package/dist/command-palette-context.d.ts +6 -0
  197. package/dist/data-table-interaction.d.ts +57 -0
  198. package/dist/data-table-processing.d.ts +32 -0
  199. package/dist/data-table-render.d.ts +40 -0
  200. package/dist/data-table-slot-bindings.d.ts +21 -0
  201. package/dist/date-picker-calendar-bridge.d.ts +25 -0
  202. package/dist/date-picker-value.d.ts +33 -0
  203. package/dist/define-data-table-columns.d.ts +89 -0
  204. package/dist/dev-codes.d.ts +179 -0
  205. package/dist/dialog-shared.d.ts +178 -0
  206. package/dist/dismissable-layer-stack.d.ts +28 -0
  207. package/dist/form-reset.d.ts +29 -0
  208. package/dist/get-pagination-range.d.ts +24 -0
  209. package/dist/get-tabbable-elements.d.ts +22 -0
  210. package/dist/ghost-accordion.d.ts +120 -0
  211. package/dist/ghost-avatar.d.ts +41 -0
  212. package/dist/ghost-badge.d.ts +11 -0
  213. package/dist/ghost-breadcrumb.d.ts +114 -0
  214. package/dist/ghost-button.d.ts +39 -0
  215. package/dist/ghost-calendar.d.ts +148 -0
  216. package/dist/ghost-card.d.ts +29 -0
  217. package/dist/ghost-checkbox-group.d.ts +88 -0
  218. package/dist/ghost-checkbox.d.ts +51 -0
  219. package/dist/ghost-collapsible.d.ts +104 -0
  220. package/dist/ghost-combobox.d.ts +217 -0
  221. package/dist/ghost-command-palette.d.ts +377 -0
  222. package/dist/ghost-context-menu.d.ts +226 -0
  223. package/dist/ghost-data-table-preset.d.ts +107 -0
  224. package/dist/ghost-data-table-table.d.ts +76 -0
  225. package/dist/ghost-data-table.d.ts +508 -0
  226. package/dist/ghost-date-picker.d.ts +301 -0
  227. package/dist/ghost-dialog.d.ts +256 -0
  228. package/dist/ghost-drawer.d.ts +268 -0
  229. package/dist/ghost-dropdown-menu.d.ts +226 -0
  230. package/dist/ghost-empty-state.d.ts +26 -0
  231. package/dist/ghost-field.d.ts +172 -0
  232. package/dist/ghost-file-upload-accept.d.ts +32 -0
  233. package/dist/ghost-file-upload-messages.d.ts +14 -0
  234. package/dist/ghost-file-upload.d.ts +325 -0
  235. package/dist/ghost-form.d.ts +273 -0
  236. package/dist/ghost-hover-card.d.ts +192 -0
  237. package/dist/ghost-inline-alert.d.ts +34 -0
  238. package/dist/ghost-input.d.ts +71 -0
  239. package/dist/ghost-interactive-surface.d.ts +41 -0
  240. package/dist/ghost-kbd.d.ts +39 -0
  241. package/dist/ghost-link.d.ts +58 -0
  242. package/dist/ghost-menubar.d.ts +260 -0
  243. package/dist/ghost-number-input.d.ts +88 -0
  244. package/dist/ghost-pagination.d.ts +92 -0
  245. package/dist/ghost-popover.d.ts +188 -0
  246. package/dist/ghost-portal.d.ts +21 -0
  247. package/dist/ghost-presence.d.ts +78 -0
  248. package/dist/ghost-progress.d.ts +40 -0
  249. package/dist/ghost-radio-group.d.ts +100 -0
  250. package/dist/ghost-scroll-area.d.ts +46 -0
  251. package/dist/ghost-scroll-spy.d.ts +150 -0
  252. package/dist/ghost-segmented-control.d.ts +124 -0
  253. package/dist/ghost-select.d.ts +188 -0
  254. package/dist/ghost-separator.d.ts +33 -0
  255. package/dist/ghost-skeleton.d.ts +14 -0
  256. package/dist/ghost-slider.d.ts +99 -0
  257. package/dist/ghost-spinner.d.ts +22 -0
  258. package/dist/ghost-submenu.d.ts +20 -0
  259. package/dist/ghost-switch.d.ts +77 -0
  260. package/dist/ghost-table.d.ts +62 -0
  261. package/dist/ghost-tabs.d.ts +154 -0
  262. package/dist/ghost-tags-input.d.ts +41 -0
  263. package/dist/ghost-textarea.d.ts +78 -0
  264. package/dist/ghost-toast.d.ts +219 -0
  265. package/dist/ghost-toggle-group.d.ts +123 -0
  266. package/dist/ghost-toolbar.d.ts +23 -0
  267. package/dist/ghost-tooltip-provider.d.ts +48 -0
  268. package/dist/ghost-tooltip.d.ts +190 -0
  269. package/dist/ghost-tree.d.ts +355 -0
  270. package/dist/ghost-visually-hidden.d.ts +27 -0
  271. package/dist/ghostvue.js +19653 -0
  272. package/dist/has-tabbable-descendants.d.ts +2 -0
  273. package/dist/index.d.ts +322 -0
  274. package/dist/invoke-attr-handler.d.ts +15 -0
  275. package/dist/is-ime-composing.d.ts +28 -0
  276. package/dist/manifest.json +18406 -0
  277. package/dist/measure-scroll-overflow.d.ts +6 -0
  278. package/dist/menu-item-activation.d.ts +39 -0
  279. package/dist/resolver.d.ts +49 -0
  280. package/dist/resolver.js +14 -0
  281. package/dist/scroll-spy-motion.d.ts +26 -0
  282. package/dist/sort-by-document-order.d.ts +23 -0
  283. package/dist/sync-calendar-focus-tab-stops.d.ts +2 -0
  284. package/dist/sync-segmented-control-item-order.d.ts +5 -0
  285. package/dist/sync-tabs-selection-tab-stops.d.ts +7 -0
  286. package/dist/sync-toggle-group-selection-tab-stops.d.ts +14 -0
  287. package/dist/track-reactive-reads.d.ts +13 -0
  288. package/dist/typeahead-match.d.ts +15 -0
  289. package/dist/use-collapsible-content-hidden.d.ts +28 -0
  290. package/dist/use-controllable-state.d.ts +20 -0
  291. package/dist/use-dismissable-layer.d.ts +48 -0
  292. package/dist/use-floating.d.ts +38 -0
  293. package/dist/use-focus-scope.d.ts +41 -0
  294. package/dist/use-ghost-accordion.d.ts +5 -0
  295. package/dist/use-ghost-avatar.d.ts +28 -0
  296. package/dist/use-ghost-badge.d.ts +13 -0
  297. package/dist/use-ghost-breadcrumb.d.ts +19 -0
  298. package/dist/use-ghost-button.d.ts +18 -0
  299. package/dist/use-ghost-calendar.d.ts +3 -0
  300. package/dist/use-ghost-card.d.ts +15 -0
  301. package/dist/use-ghost-checkbox-group.d.ts +13 -0
  302. package/dist/use-ghost-checkbox.d.ts +24 -0
  303. package/dist/use-ghost-collapsible.d.ts +8 -0
  304. package/dist/use-ghost-combobox.d.ts +65 -0
  305. package/dist/use-ghost-command-palette.d.ts +24 -0
  306. package/dist/use-ghost-context-menu.d.ts +14 -0
  307. package/dist/use-ghost-data-table.d.ts +55 -0
  308. package/dist/use-ghost-date-picker.d.ts +11 -0
  309. package/dist/use-ghost-dialog.d.ts +10 -0
  310. package/dist/use-ghost-drawer.d.ts +11 -0
  311. package/dist/use-ghost-dropdown-menu.d.ts +5 -0
  312. package/dist/use-ghost-empty-state.d.ts +18 -0
  313. package/dist/use-ghost-field-part-content.d.ts +15 -0
  314. package/dist/use-ghost-field.d.ts +10 -0
  315. package/dist/use-ghost-file-upload.d.ts +16 -0
  316. package/dist/use-ghost-form.d.ts +7 -0
  317. package/dist/use-ghost-hover-card.d.ts +8 -0
  318. package/dist/use-ghost-id.d.ts +6 -0
  319. package/dist/use-ghost-inline-alert.d.ts +20 -0
  320. package/dist/use-ghost-input.d.ts +29 -0
  321. package/dist/use-ghost-interactive-surface.d.ts +21 -0
  322. package/dist/use-ghost-kbd.d.ts +35 -0
  323. package/dist/use-ghost-link.d.ts +20 -0
  324. package/dist/use-ghost-menu-branch.d.ts +54 -0
  325. package/dist/use-ghost-menu-collection.d.ts +30 -0
  326. package/dist/use-ghost-menu-root.d.ts +13 -0
  327. package/dist/use-ghost-menubar-menu.d.ts +3 -0
  328. package/dist/use-ghost-menubar.d.ts +10 -0
  329. package/dist/use-ghost-number-input.d.ts +63 -0
  330. package/dist/use-ghost-pagination.d.ts +22 -0
  331. package/dist/use-ghost-popover.d.ts +8 -0
  332. package/dist/use-ghost-presence.d.ts +48 -0
  333. package/dist/use-ghost-progress.d.ts +33 -0
  334. package/dist/use-ghost-radio-group.d.ts +5 -0
  335. package/dist/use-ghost-scroll-area.d.ts +23 -0
  336. package/dist/use-ghost-scroll-spy.d.ts +25 -0
  337. package/dist/use-ghost-segmented-control.d.ts +6 -0
  338. package/dist/use-ghost-select.d.ts +62 -0
  339. package/dist/use-ghost-separator.d.ts +19 -0
  340. package/dist/use-ghost-skeleton.d.ts +19 -0
  341. package/dist/use-ghost-slider.d.ts +65 -0
  342. package/dist/use-ghost-spinner.d.ts +18 -0
  343. package/dist/use-ghost-switch.d.ts +39 -0
  344. package/dist/use-ghost-table.d.ts +70 -0
  345. package/dist/use-ghost-tabs.d.ts +5 -0
  346. package/dist/use-ghost-textarea.d.ts +44 -0
  347. package/dist/use-ghost-toast.d.ts +56 -0
  348. package/dist/use-ghost-toggle-group.d.ts +6 -0
  349. package/dist/use-ghost-toolbar.d.ts +23 -0
  350. package/dist/use-ghost-tooltip.d.ts +8 -0
  351. package/dist/use-ghost-tree.d.ts +14 -0
  352. package/dist/use-ghost-visually-hidden.d.ts +35 -0
  353. package/dist/use-inert-others.d.ts +20 -0
  354. package/dist/use-roving-focus.d.ts +22 -0
  355. package/dist/use-scroll-lock.d.ts +13 -0
  356. package/package.json +60 -4
@@ -0,0 +1,301 @@
1
+ import type { CalendarDate } from '@internationalized/date';
2
+ import type { ComputedRef, InjectionKey, MaybeRefOrGetter, Ref, WritableComputedRef } from 'vue';
3
+ import type { GhostPopoverFlipOptions, GhostPopoverOffsetOptions, GhostPopoverPlacement, GhostPopoverShiftOptions, GhostPopoverStrategy } from './ghost-popover.js';
4
+ import type { GhostPortalTarget } from './ghost-portal.js';
5
+ /** Inclusive date range. Equal endpoints are a valid one-day range. */
6
+ export interface GhostDatePickerRange {
7
+ start: CalendarDate;
8
+ end: CalendarDate;
9
+ }
10
+ /** Committed picker value: a date (single mode), a range, or empty. */
11
+ export type GhostDatePickerValue = CalendarDate | GhostDatePickerRange | null;
12
+ /** Which value a text input edits. */
13
+ export type GhostDatePickerPart = 'single' | 'start' | 'end';
14
+ /** Selection mode, fixed for the lifetime of a picker instance. */
15
+ export type GhostDatePickerSelectionMode = 'single' | 'range';
16
+ /** Day of week (Sunday = `0`). */
17
+ export type GhostDatePickerWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
18
+ /** Context passed to `parse` and `format`. */
19
+ export interface GhostDatePickerTextContext {
20
+ locale: string;
21
+ part: GhostDatePickerPart;
22
+ }
23
+ /**
24
+ * Synchronous text parser. Return `null` for invalid nonempty text; empty text
25
+ * never reaches the parser. Must round-trip text produced by `format`.
26
+ */
27
+ export type GhostDatePickerParse = (text: string, context: GhostDatePickerTextContext) => CalendarDate | null;
28
+ /** Synchronous display formatter. Never affects ISO form serialization. */
29
+ export type GhostDatePickerFormat = (date: CalendarDate, context: GhostDatePickerTextContext) => string;
30
+ /** Whole-range business validation. Return an error message or `null`. */
31
+ export type GhostDatePickerValidateRange = (range: GhostDatePickerRange) => string | null;
32
+ /** Stable machine-readable error codes. */
33
+ export type GhostDatePickerErrorCode = 'parse' | 'incomplete' | 'min' | 'max' | 'unavailable' | 'range-order' | 'range-validation' | 'required' | 'external-invalid' | 'configuration' | 'uncommitted';
34
+ /** One validation error with its default (or localized) message. */
35
+ export interface GhostDatePickerError {
36
+ code: GhostDatePickerErrorCode;
37
+ part: GhostDatePickerPart | 'range';
38
+ message: string;
39
+ }
40
+ /** Props for the renderless {@link GhostDatePicker} root. */
41
+ export interface GhostDatePickerProps {
42
+ /**
43
+ * `'single'` or `'range'`. Fixed for an instance; remount with a new `key`
44
+ * to change modes.
45
+ * @default 'single'
46
+ */
47
+ selectionMode?: GhostDatePickerSelectionMode;
48
+ /**
49
+ * Controlled committed value. `undefined` is uncontrolled; `null` is a
50
+ * controlled empty value.
51
+ * @default undefined
52
+ */
53
+ modelValue?: GhostDatePickerValue | undefined;
54
+ /**
55
+ * Initial uncontrolled value and uncontrolled form-reset target.
56
+ * @default null
57
+ */
58
+ defaultValue?: GhostDatePickerValue;
59
+ /**
60
+ * Controlled requested open state.
61
+ * @default undefined
62
+ */
63
+ open?: boolean | undefined;
64
+ /**
65
+ * Initial uncontrolled open state.
66
+ * @default false
67
+ */
68
+ defaultOpen?: boolean;
69
+ /** Inclusive lower bound. */
70
+ minValue?: CalendarDate | undefined;
71
+ /** Inclusive upper bound. */
72
+ maxValue?: CalendarDate | undefined;
73
+ /** Unavailable endpoint dates; they stay focusable in the calendar. */
74
+ isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;
75
+ /** Optional whole-range business validation. */
76
+ validateRange?: GhostDatePickerValidateRange | undefined;
77
+ /**
78
+ * Calendar and formatting locale.
79
+ * @default 'en-US'
80
+ */
81
+ locale?: string;
82
+ /** Week start override (Sunday = `0`); defaults to the locale preference. */
83
+ weekStartsOn?: GhostDatePickerWeekday | undefined;
84
+ /** Explicit current date for SSR-safe "today" styling and focus fallback. */
85
+ today?: CalendarDate | undefined;
86
+ /** Month shown when the picker opens empty. */
87
+ defaultVisibleMonth?: CalendarDate | undefined;
88
+ /** Synchronous parser. Defaults to strict ISO `YYYY-MM-DD`. */
89
+ parse?: GhostDatePickerParse | undefined;
90
+ /** Synchronous formatter. Defaults to ISO `YYYY-MM-DD`. */
91
+ format?: GhostDatePickerFormat | undefined;
92
+ /** @default false */
93
+ disabled?: boolean;
94
+ /** @default false */
95
+ readonly?: boolean;
96
+ /** @default false */
97
+ required?: boolean;
98
+ /** Consumer-supplied invalid state (`external-invalid`). @default false */
99
+ invalid?: boolean;
100
+ /** Form name (`name` single; `name[start]` / `name[end]` range). */
101
+ name?: string | undefined;
102
+ /** Range start submission name override. */
103
+ startName?: string | undefined;
104
+ /** Range end submission name override. */
105
+ endName?: string | undefined;
106
+ /** External `<form>` id for submission, validation, and reset. */
107
+ form?: string | undefined;
108
+ /**
109
+ * Format description linked to every input.
110
+ * @default 'YYYY-MM-DD'
111
+ */
112
+ formatHint?: string;
113
+ /** Localizes built-in error messages. */
114
+ validationMessage?: ((error: GhostDatePickerError) => string) | undefined;
115
+ }
116
+ /** Default slot props of {@link GhostDatePicker}. */
117
+ export interface GhostDatePickerSlotProps {
118
+ /** Committed value. */
119
+ value: GhostDatePickerValue;
120
+ /** Effective open state (`requested && !disabled && !readonly`). */
121
+ open: boolean;
122
+ /** `true` while text is uncommitted or a calendar range is in progress. */
123
+ pending: boolean;
124
+ /** Errors currently shown to the user. */
125
+ errors: GhostDatePickerError[];
126
+ /** Commits `null` when editable. */
127
+ clear: () => void;
128
+ /** Requests open. */
129
+ openCalendar: () => void;
130
+ /** Requests close. */
131
+ close: () => void;
132
+ }
133
+ /** Props for {@link GhostDatePickerInput}. */
134
+ export interface GhostDatePickerInputProps {
135
+ /**
136
+ * Which value this input edits. Range pickers need one `start` and one `end`.
137
+ * @default 'single'
138
+ */
139
+ part?: GhostDatePickerPart;
140
+ /** Combines with the root (for example from `GhostFieldControl`). */
141
+ disabled?: boolean;
142
+ /** Combines with the root (for example from `GhostFieldControl`). */
143
+ invalid?: boolean;
144
+ /** Combines with the root (for example from `GhostFieldControl`). */
145
+ required?: boolean;
146
+ }
147
+ /** Props for {@link GhostDatePickerContent}. */
148
+ export interface GhostDatePickerContentProps {
149
+ /** @default 'bottom-start' */
150
+ placement?: GhostPopoverPlacement;
151
+ /** Distance or axis offsets passed to the floating layer. */
152
+ offset?: GhostPopoverOffsetOptions | boolean | undefined;
153
+ /** @default true */
154
+ flip?: boolean | GhostPopoverFlipOptions;
155
+ /** @default true */
156
+ shift?: boolean | GhostPopoverShiftOptions;
157
+ /** @default 'absolute' */
158
+ strategy?: GhostPopoverStrategy;
159
+ /** @default true */
160
+ portal?: boolean;
161
+ /** @default 'body' */
162
+ portalTo?: GhostPortalTarget;
163
+ /**
164
+ * Accessible name of the built-in Close control.
165
+ * @default 'Close date picker'
166
+ */
167
+ closeLabel?: string;
168
+ }
169
+ /** Template ref contract shared by DatePicker DOM parts. */
170
+ export interface GhostDatePickerPartExposed {
171
+ readonly element: HTMLElement | null;
172
+ focus(options?: FocusOptions): void;
173
+ blur(): void;
174
+ }
175
+ /** Template ref contract of {@link GhostDatePickerInput}. */
176
+ export interface GhostDatePickerInputExposed {
177
+ readonly element: HTMLInputElement | null;
178
+ focus(options?: FocusOptions): void;
179
+ blur(): void;
180
+ }
181
+ /**
182
+ * Reactive source for a callback option. Unlike other options a callback
183
+ * cannot be passed bare, because `toValue` would call it as a getter: pass a
184
+ * ref or a getter that returns the callback (`() => props.parse`).
185
+ */
186
+ export type GhostDatePickerCallbackSource<Fn> = Readonly<Ref<Fn | undefined>> | (() => Fn | undefined);
187
+ /** Options for {@link useGhostDatePicker}. Mirrors the root props. */
188
+ export interface UseGhostDatePickerOptions {
189
+ selectionMode?: MaybeRefOrGetter<GhostDatePickerSelectionMode | undefined>;
190
+ modelValue?: MaybeRefOrGetter<GhostDatePickerValue | undefined>;
191
+ defaultValue?: MaybeRefOrGetter<GhostDatePickerValue | undefined>;
192
+ open?: MaybeRefOrGetter<boolean | undefined>;
193
+ defaultOpen?: MaybeRefOrGetter<boolean | undefined>;
194
+ minValue?: MaybeRefOrGetter<CalendarDate | undefined>;
195
+ maxValue?: MaybeRefOrGetter<CalendarDate | undefined>;
196
+ isDateDisabled?: GhostDatePickerCallbackSource<(date: CalendarDate) => boolean>;
197
+ validateRange?: GhostDatePickerCallbackSource<GhostDatePickerValidateRange>;
198
+ locale?: MaybeRefOrGetter<string | undefined>;
199
+ weekStartsOn?: MaybeRefOrGetter<GhostDatePickerWeekday | undefined>;
200
+ today?: MaybeRefOrGetter<CalendarDate | undefined>;
201
+ defaultVisibleMonth?: MaybeRefOrGetter<CalendarDate | undefined>;
202
+ parse?: GhostDatePickerCallbackSource<GhostDatePickerParse>;
203
+ format?: GhostDatePickerCallbackSource<GhostDatePickerFormat>;
204
+ disabled?: MaybeRefOrGetter<boolean | undefined>;
205
+ readonly?: MaybeRefOrGetter<boolean | undefined>;
206
+ required?: MaybeRefOrGetter<boolean | undefined>;
207
+ invalid?: MaybeRefOrGetter<boolean | undefined>;
208
+ formatHint?: MaybeRefOrGetter<string | undefined>;
209
+ validationMessage?: GhostDatePickerCallbackSource<(error: GhostDatePickerError) => string>;
210
+ /** Called with each committed value proposal (`update:modelValue`). */
211
+ onValueChange?: (value: GhostDatePickerValue) => void;
212
+ /** Called with each open-state proposal (`update:open`). */
213
+ onOpenChange?: (open: boolean) => void;
214
+ }
215
+ /** State and actions returned by {@link useGhostDatePicker}. */
216
+ export interface UseGhostDatePickerReturn {
217
+ /** Committed value (controlled prop or internal state). */
218
+ value: WritableComputedRef<GhostDatePickerValue>;
219
+ selectionMode: ComputedRef<GhostDatePickerSelectionMode>;
220
+ locale: ComputedRef<string>;
221
+ /** Requested open state before `disabled` / `readonly` precedence. */
222
+ requestedOpen: WritableComputedRef<boolean>;
223
+ /** Effective open state. */
224
+ isOpen: ComputedRef<boolean>;
225
+ isDisabled: ComputedRef<boolean>;
226
+ isReadonly: ComputedRef<boolean>;
227
+ isRequired: ComputedRef<boolean>;
228
+ /** `true` while text is uncommitted or a calendar range is in progress. */
229
+ pending: ComputedRef<boolean>;
230
+ /** Errors shown to the user (after a commit attempt or invalid event). */
231
+ errors: ComputedRef<GhostDatePickerError[]>;
232
+ /** Pending calendar range anchor. */
233
+ anchor: Ref<CalendarDate | null>;
234
+ /** Value the calendar displays (committed value, or the pending anchor). */
235
+ calendarValue: ComputedRef<CalendarDate | GhostDatePickerRange | null>;
236
+ /** Month shown when the calendar opens. */
237
+ initialVisibleMonth: ComputedRef<CalendarDate | undefined>;
238
+ /** Date the calendar focuses when it opens. */
239
+ initialFocusDate: ComputedRef<CalendarDate | undefined>;
240
+ /** `minValue > maxValue`: date selection is disabled. */
241
+ hasConfigurationError: ComputedRef<boolean>;
242
+ /** Rejected second range activation (or unavailable date) in the calendar. */
243
+ calendarError: Ref<GhostDatePickerError | null>;
244
+ /** Text currently shown in `part`'s input. */
245
+ displayText: (part: GhostDatePickerPart) => string;
246
+ /** `true` when `part`'s text differs from the committed value. */
247
+ isDirty: (part: GhostDatePickerPart) => boolean;
248
+ /** Visible errors that belong to `part` (including pair-level errors). */
249
+ errorsFor: (part: GhostDatePickerPart) => GhostDatePickerError[];
250
+ /** Native custom-validity message for `part` (`''` when valid). */
251
+ validityMessage: (part: GhostDatePickerPart) => string;
252
+ /** Stores raw text for `part` without committing or reformatting. */
253
+ setDraft: (part: GhostDatePickerPart, text: string) => void;
254
+ /** Attempts to commit the current text. Returns `true` on success. */
255
+ commitText: () => boolean;
256
+ /** Restores text from the committed value and clears draft errors. */
257
+ revertText: () => void;
258
+ /** Handles an accepted calendar activation. */
259
+ selectCalendarDate: (date: CalendarDate) => void;
260
+ /** Marks native validation as attempted so `required` errors show. */
261
+ markValidationAttempted: () => void;
262
+ /** Commits `null` when editable. */
263
+ clear: () => void;
264
+ openCalendar: () => void;
265
+ close: () => void;
266
+ /** Discards calendar-only progress (anchor and calendar error). */
267
+ cancelCalendar: () => void;
268
+ /** Native form reset reconciliation. */
269
+ applyFormReset: () => void;
270
+ }
271
+ /** Internal context shared by DatePicker parts. */
272
+ export interface GhostDatePickerContext extends UseGhostDatePickerReturn {
273
+ contentId: ComputedRef<string>;
274
+ hintId: ComputedRef<string>;
275
+ errorId: (part: GhostDatePickerPart) => string;
276
+ summaryId: ComputedRef<string>;
277
+ form: ComputedRef<string | undefined>;
278
+ minValue: ComputedRef<CalendarDate | undefined>;
279
+ maxValue: ComputedRef<CalendarDate | undefined>;
280
+ isDateDisabled: ComputedRef<((date: CalendarDate) => boolean) | undefined>;
281
+ weekStartsOn: ComputedRef<GhostDatePickerWeekday | undefined>;
282
+ today: ComputedRef<CalendarDate | undefined>;
283
+ formatHint: ComputedRef<string>;
284
+ /** Errors to show in the open dialog's error summary (empty when hidden). */
285
+ summaryErrors: ComputedRef<GhostDatePickerError[]>;
286
+ /** Increments after each applied form reset so inputs resync their DOM. */
287
+ resetVersion: Ref<number>;
288
+ registerInput: (part: GhostDatePickerPart, element: HTMLInputElement | null) => void;
289
+ inputElement: (part: GhostDatePickerPart) => HTMLInputElement | null;
290
+ setTriggerElement: (element: HTMLElement | null) => void;
291
+ triggerElement: Ref<HTMLElement | null>;
292
+ setSummaryElement: (element: HTMLElement | null) => void;
293
+ /** Called by an input's native `invalid` event. */
294
+ onInputInvalid: (event: Event) => void;
295
+ /** Registered by `GhostDatePickerCalendar` while mounted. */
296
+ calendarFocus: Ref<{
297
+ ready: ComputedRef<boolean>;
298
+ resolve: () => HTMLElement | null;
299
+ } | null>;
300
+ }
301
+ export declare const ghostDatePickerContextKey: InjectionKey<GhostDatePickerContext>;
@@ -0,0 +1,256 @@
1
+ import type { Component, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
2
+ import type { GhostPortalTarget } from './ghost-portal.js';
3
+ /** Valid `as` targets for {@link GhostDialogTrigger}. */
4
+ export type GhostDialogTriggerElement = string | Component;
5
+ /** Valid `as` targets for {@link GhostDialogOverlay}. */
6
+ export type GhostDialogOverlayElement = string | Component;
7
+ /** Valid `as` targets for {@link GhostDialogContent}. */
8
+ export type GhostDialogContentElement = string | Component;
9
+ /** Valid `as` targets for {@link GhostDialogTitle}. */
10
+ export type GhostDialogTitleElement = string | Component;
11
+ /** Valid `as` targets for {@link GhostDialogDescription}. */
12
+ export type GhostDialogDescriptionElement = string | Component;
13
+ /** Valid `as` targets for {@link GhostDialogClose}. */
14
+ export type GhostDialogCloseElement = string | Component;
15
+ /** Supported semantic roles for {@link GhostDialogContent}. */
16
+ export type GhostDialogContentRole = 'dialog' | 'alertdialog';
17
+ /** Props for the {@link GhostDialog} root provider component. */
18
+ export interface GhostDialogProps {
19
+ /**
20
+ * Controlled open state. Omit to run uncontrolled from `defaultOpen`.
21
+ * @default undefined
22
+ */
23
+ open?: boolean | undefined;
24
+ /**
25
+ * Initial open state when `open` is omitted.
26
+ * @default false
27
+ */
28
+ defaultOpen?: boolean;
29
+ /**
30
+ * Enables modal behavior (trapped focus loop, scroll lock, inert background
31
+ * siblings, `aria-modal`, and overlay rendering).
32
+ * @default true
33
+ */
34
+ modal?: boolean;
35
+ }
36
+ /** Props passed to the {@link GhostDialog} default slot. */
37
+ export interface GhostDialogSlotProps {
38
+ open: boolean;
39
+ close: () => void;
40
+ }
41
+ /** Props for {@link GhostDialogTrigger}. */
42
+ export interface GhostDialogTriggerProps {
43
+ /**
44
+ * Tag name or component rendered for the trigger control.
45
+ * @default 'button'
46
+ */
47
+ as?: GhostDialogTriggerElement;
48
+ /**
49
+ * Disables opening or toggling on click or keyboard activation.
50
+ * @default false
51
+ */
52
+ disabled?: boolean;
53
+ }
54
+ /** Props for {@link GhostDialogOverlay}. */
55
+ export interface GhostDialogOverlayProps {
56
+ /**
57
+ * Tag name or component rendered for the modal backdrop.
58
+ * @default 'div'
59
+ */
60
+ as?: GhostDialogOverlayElement;
61
+ /**
62
+ * Teleport overlay through {@link GhostPortal} when `true`, or render inline when `false`.
63
+ * @default true
64
+ */
65
+ portal?: boolean;
66
+ /**
67
+ * Teleport target passed to {@link GhostPortal} when `portal` is `true`.
68
+ * @default 'body'
69
+ */
70
+ portalTo?: GhostPortalTarget;
71
+ }
72
+ /** Props for {@link GhostDialogContent}. */
73
+ export interface GhostDialogContentProps {
74
+ /**
75
+ * Tag name or component rendered for the dialog surface.
76
+ * @default 'div'
77
+ */
78
+ as?: GhostDialogContentElement;
79
+ /**
80
+ * Semantic ARIA role for the dialog surface. Setting `'alertdialog'` turns off
81
+ * outside-click dismissal by default.
82
+ * @default 'dialog'
83
+ */
84
+ role?: GhostDialogContentRole;
85
+ /**
86
+ * Dismisses the topmost open dialog when pressing `Escape`.
87
+ * @default true
88
+ */
89
+ closeOnEscape?: boolean;
90
+ /**
91
+ * Dismisses the topmost open dialog on outside pointerdown (including the
92
+ * backdrop overlay). Defaults to `true` for `'dialog'` and `false` for `'alertdialog'`.
93
+ * @default undefined
94
+ */
95
+ closeOnOutsideClick?: boolean | undefined;
96
+ /**
97
+ * Teleport content through {@link GhostPortal} when `true`, or render inline when `false`.
98
+ * @default true
99
+ */
100
+ portal?: boolean;
101
+ /**
102
+ * Teleport target passed to {@link GhostPortal} when `portal` is `true`.
103
+ * @default 'body'
104
+ */
105
+ portalTo?: GhostPortalTarget;
106
+ /**
107
+ * Gates the first focus-scope activation (initial focus and, when modal,
108
+ * the focus trap) of each opening. Set it to `false` while content still
109
+ * needs positioning or rendering, then `true` once it is ready. Activation
110
+ * also waits for portal placement. After activation the scope stays active
111
+ * until close, even if this later becomes `false`. Scroll lock, background
112
+ * inert, and dismissal apply from the moment the dialog opens.
113
+ * @default true
114
+ */
115
+ focusReady?: boolean;
116
+ /**
117
+ * Resolves the element that receives focus when the focus scope activates.
118
+ * Called after mount, once per opening, after `focusReady` and portal
119
+ * placement. Return `null`, or an element that is disconnected, unfocusable,
120
+ * or outside the content, to keep the default: `[data-autofocus]`, then the
121
+ * first tabbable element, then the content itself.
122
+ * @default undefined
123
+ */
124
+ initialFocus?: (() => HTMLElement | null) | undefined;
125
+ /**
126
+ * Resolves the element that receives focus when the dialog closes. Called
127
+ * after mount on each close that restores focus. Return `null`, or an
128
+ * element that is disconnected or unfocusable (for example disabled), to
129
+ * keep the default: the element that was focused when the dialog opened.
130
+ * Not called while a controlled parent keeps the dialog open.
131
+ * @default undefined
132
+ */
133
+ returnFocus?: (() => HTMLElement | null) | undefined;
134
+ }
135
+ /** Props for {@link GhostDialogTitle}. */
136
+ export interface GhostDialogTitleProps {
137
+ /**
138
+ * Tag name or component rendered for the dialog title.
139
+ * @default 'h2'
140
+ */
141
+ as?: GhostDialogTitleElement;
142
+ }
143
+ /** Props for {@link GhostDialogDescription}. */
144
+ export interface GhostDialogDescriptionProps {
145
+ /**
146
+ * Tag name or component rendered for the dialog description.
147
+ * @default 'p'
148
+ */
149
+ as?: GhostDialogDescriptionElement;
150
+ }
151
+ /** Props for {@link GhostDialogClose}. */
152
+ export interface GhostDialogCloseProps {
153
+ /**
154
+ * Tag name or component rendered for the close control.
155
+ * @default 'button'
156
+ */
157
+ as?: GhostDialogCloseElement;
158
+ /**
159
+ * Disables closing on click or keyboard activation.
160
+ * @default false
161
+ */
162
+ disabled?: boolean;
163
+ }
164
+ /** Methods and state exposed by a template ref to {@link GhostDialogTrigger}. */
165
+ export interface GhostDialogTriggerExposed {
166
+ readonly element: HTMLElement | null;
167
+ focus(options?: FocusOptions): void;
168
+ blur(): void;
169
+ }
170
+ /** Methods and state exposed by a template ref to {@link GhostDialogOverlay}. */
171
+ export interface GhostDialogOverlayExposed {
172
+ readonly element: HTMLElement | null;
173
+ focus(options?: FocusOptions): void;
174
+ blur(): void;
175
+ }
176
+ /** Methods and state exposed by a template ref to {@link GhostDialogContent}. */
177
+ export interface GhostDialogContentExposed {
178
+ readonly element: HTMLElement | null;
179
+ focus(options?: FocusOptions): void;
180
+ blur(): void;
181
+ }
182
+ /** Methods and state exposed by a template ref to {@link GhostDialogTitle}. */
183
+ export interface GhostDialogTitleExposed {
184
+ readonly element: HTMLElement | null;
185
+ focus(options?: FocusOptions): void;
186
+ blur(): void;
187
+ }
188
+ /** Methods and state exposed by a template ref to {@link GhostDialogDescription}. */
189
+ export interface GhostDialogDescriptionExposed {
190
+ readonly element: HTMLElement | null;
191
+ focus(options?: FocusOptions): void;
192
+ blur(): void;
193
+ }
194
+ /** Methods and state exposed by a template ref to {@link GhostDialogClose}. */
195
+ export interface GhostDialogCloseExposed {
196
+ readonly element: HTMLElement | null;
197
+ focus(options?: FocusOptions): void;
198
+ blur(): void;
199
+ }
200
+ /** Options for {@link useGhostDialog}. */
201
+ export interface UseGhostDialogOptions {
202
+ open?: MaybeRefOrGetter<boolean | undefined>;
203
+ defaultOpen?: MaybeRefOrGetter<boolean | undefined>;
204
+ modal?: MaybeRefOrGetter<boolean | undefined>;
205
+ onOpenChange?: (open: boolean) => void;
206
+ }
207
+ /** Reactive state and helpers returned by {@link useGhostDialog}. */
208
+ export interface UseGhostDialogReturn {
209
+ isOpen: Ref<boolean>;
210
+ isModal: ComputedRef<boolean>;
211
+ open: () => void;
212
+ close: () => void;
213
+ toggle: () => void;
214
+ triggerId: ComputedRef<string>;
215
+ contentId: ComputedRef<string>;
216
+ titleId: ComputedRef<string>;
217
+ descriptionId: ComputedRef<string>;
218
+ }
219
+ /** Internal context shared between `GhostDialog` parts. */
220
+ export interface GhostDialogContext {
221
+ isOpen: Ref<boolean>;
222
+ isModal: ComputedRef<boolean>;
223
+ open: () => void;
224
+ close: () => void;
225
+ toggle: () => void;
226
+ defaultTriggerId: ComputedRef<string>;
227
+ defaultContentId: ComputedRef<string>;
228
+ defaultTitleId: ComputedRef<string>;
229
+ defaultDescriptionId: ComputedRef<string>;
230
+ triggerId: ComputedRef<string>;
231
+ contentId: ComputedRef<string>;
232
+ titleId: ComputedRef<string>;
233
+ descriptionId: ComputedRef<string>;
234
+ triggerRegistered: Ref<boolean>;
235
+ titleRegistered: Ref<boolean>;
236
+ descriptionRegistered: Ref<boolean>;
237
+ triggerElement: Ref<HTMLElement | null>;
238
+ overlayElement: Ref<HTMLElement | null>;
239
+ contentElement: Ref<HTMLElement | null>;
240
+ setTriggerElement: (element: HTMLElement | null) => void;
241
+ setOverlayElement: (element: HTMLElement | null) => void;
242
+ setContentElement: (element: HTMLElement | null) => void;
243
+ setTriggerId: (id: string | null) => void;
244
+ setTriggerRegistered: (registered: boolean) => void;
245
+ setContentId: (id: string | null) => void;
246
+ setTitleId: (id: string | null) => void;
247
+ setTitleRegistered: (registered: boolean) => void;
248
+ setDescriptionId: (id: string | null) => void;
249
+ setDescriptionRegistered: (registered: boolean) => void;
250
+ }
251
+ export interface GhostDialogInternalContext extends GhostDialogContext {
252
+ openedAtMount: Ref<boolean>;
253
+ /** Internal: skips content exit retention (see `DialogPartsContext`). */
254
+ skipExitPresence?: () => boolean;
255
+ }
256
+ export declare const ghostDialogContextKey: InjectionKey<GhostDialogInternalContext>;