From e5788e24a74f70d0dea065e1238ab7e6f9c346e1 Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Wed, 15 Oct 2025 16:08:38 +0200 Subject: [PATCH 1/7] type: fix slots typing --- .../components/content/ComponentExample.vue | 5 +-- .../theme-picker/ThemePickerButton.vue | 2 +- playgrounds/nuxt/app/components/Matrix.vue | 4 ++- src/runtime/components/Accordion.vue | 13 ++++---- src/runtime/components/Alert.vue | 11 ++++--- src/runtime/components/App.vue | 3 +- src/runtime/components/AuthForm.vue | 21 ++++++------ src/runtime/components/AvatarGroup.vue | 3 +- src/runtime/components/Badge.vue | 7 ++-- src/runtime/components/Banner.vue | 9 ++--- src/runtime/components/BlogPost.vue | 17 +++++----- src/runtime/components/BlogPosts.vue | 3 +- src/runtime/components/Breadcrumb.vue | 21 ++++++------ src/runtime/components/Button.vue | 8 ++--- src/runtime/components/Calendar.vue | 7 ++-- src/runtime/components/Card.vue | 7 ++-- src/runtime/components/Carousel.vue | 3 +- src/runtime/components/ChangelogVersion.vue | 23 ++++++------- src/runtime/components/ChangelogVersions.vue | 27 +++++++-------- src/runtime/components/ChatMessage.vue | 7 ++-- src/runtime/components/ChatMessages.vue | 14 ++++---- src/runtime/components/ChatPalette.vue | 5 +-- src/runtime/components/ChatPrompt.vue | 5 +-- src/runtime/components/Checkbox.vue | 5 +-- src/runtime/components/CheckboxGroup.vue | 9 ++--- src/runtime/components/Chip.vue | 5 +-- src/runtime/components/Collapsible.vue | 5 +-- src/runtime/components/CommandPalette.vue | 19 ++++++----- src/runtime/components/Container.vue | 3 +- src/runtime/components/ContextMenu.vue | 17 +++++----- src/runtime/components/DashboardGroup.vue | 3 +- src/runtime/components/DashboardNavbar.vue | 15 +++++---- src/runtime/components/DashboardPanel.vue | 11 ++++--- .../components/DashboardResizeHandle.vue | 3 +- src/runtime/components/DashboardSearch.vue | 3 +- src/runtime/components/DashboardSidebar.vue | 13 ++++---- src/runtime/components/DashboardToolbar.vue | 7 ++-- src/runtime/components/Drawer.vue | 15 +++++---- src/runtime/components/DropdownMenu.vue | 17 +++++----- .../components/DropdownMenuContent.vue | 3 +- src/runtime/components/Empty.vue | 15 +++++---- src/runtime/components/Error.vue | 11 ++++--- src/runtime/components/FieldGroup.vue | 3 +- src/runtime/components/FileUpload.vue | 29 ++++++++-------- src/runtime/components/Footer.vue | 11 ++++--- src/runtime/components/FooterColumns.vue | 19 ++++++----- src/runtime/components/Form.vue | 3 +- src/runtime/components/FormField.vue | 14 ++++---- src/runtime/components/Header.vue | 19 ++++++----- src/runtime/components/Input.vue | 8 ++--- src/runtime/components/InputMenu.vue | 32 +++++++++--------- src/runtime/components/InputNumber.vue | 5 +-- src/runtime/components/InputTags.vue | 13 ++++---- src/runtime/components/Kbd.vue | 3 +- src/runtime/components/Link.vue | 4 +-- src/runtime/components/Main.vue | 3 +- src/runtime/components/Marquee.vue | 3 +- src/runtime/components/Modal.vue | 19 ++++++----- src/runtime/components/NavigationMenu.vue | 17 +++++----- src/runtime/components/Page.vue | 7 ++-- src/runtime/components/PageAnchors.vue | 11 ++++--- src/runtime/components/PageAside.vue | 7 ++-- src/runtime/components/PageBody.vue | 3 +- src/runtime/components/PageCTA.vue | 19 ++++++----- src/runtime/components/PageCard.vue | 15 +++++---- src/runtime/components/PageColumns.vue | 3 +- src/runtime/components/PageFeature.vue | 9 ++--- src/runtime/components/PageGrid.vue | 3 +- src/runtime/components/PageHeader.vue | 11 ++++--- src/runtime/components/PageHero.vue | 21 ++++++------ src/runtime/components/PageLinks.vue | 13 ++++---- src/runtime/components/PageList.vue | 3 +- src/runtime/components/PageLogos.vue | 3 +- src/runtime/components/PageSection.vue | 25 +++++++------- src/runtime/components/Pagination.vue | 15 +++++---- src/runtime/components/Popover.vue | 7 ++-- src/runtime/components/PricingPlan.vue | 27 +++++++-------- src/runtime/components/PricingPlans.vue | 3 +- src/runtime/components/PricingTable.vue | 33 ++++++++++--------- src/runtime/components/Progress.vue | 5 +-- src/runtime/components/RadioGroup.vue | 9 ++--- src/runtime/components/Select.vue | 27 +++++++-------- src/runtime/components/SelectMenu.vue | 31 ++++++++--------- src/runtime/components/Separator.vue | 3 +- src/runtime/components/Slideover.vue | 19 ++++++----- src/runtime/components/Stepper.vue | 11 ++++--- src/runtime/components/Switch.vue | 5 +-- src/runtime/components/Table.vue | 20 +++++------ src/runtime/components/Tabs.vue | 14 ++++---- src/runtime/components/Textarea.vue | 7 ++-- src/runtime/components/Timeline.vue | 11 ++++--- src/runtime/components/Toast.vue | 11 ++++--- src/runtime/components/Toaster.vue | 3 +- src/runtime/components/Tooltip.vue | 5 +-- src/runtime/components/Tree.vue | 13 ++++---- src/runtime/components/User.vue | 9 ++--- .../components/color-mode/ColorModeButton.vue | 4 +-- .../components/content/ContentNavigation.vue | 11 ++++--- .../components/content/ContentSearch.vue | 3 +- .../components/content/ContentSurround.vue | 12 +++---- src/runtime/components/content/ContentToc.vue | 17 +++++----- src/runtime/components/prose/A.vue | 3 +- src/runtime/components/prose/Accordion.vue | 3 +- .../components/prose/AccordionItem.vue | 3 +- src/runtime/components/prose/Badge.vue | 3 +- src/runtime/components/prose/Blockquote.vue | 3 +- src/runtime/components/prose/Callout.vue | 3 +- src/runtime/components/prose/Card.vue | 5 +-- src/runtime/components/prose/CardGroup.vue | 3 +- src/runtime/components/prose/Code.vue | 3 +- src/runtime/components/prose/CodeCollapse.vue | 3 +- src/runtime/components/prose/CodeGroup.vue | 3 +- src/runtime/components/prose/CodePreview.vue | 5 +-- src/runtime/components/prose/CodeTree.vue | 3 +- src/runtime/components/prose/Collapsible.vue | 3 +- src/runtime/components/prose/Em.vue | 3 +- src/runtime/components/prose/Field.vue | 3 +- src/runtime/components/prose/FieldGroup.vue | 3 +- src/runtime/components/prose/H1.vue | 3 +- src/runtime/components/prose/H2.vue | 3 +- src/runtime/components/prose/H3.vue | 3 +- src/runtime/components/prose/H4.vue | 3 +- src/runtime/components/prose/Li.vue | 3 +- src/runtime/components/prose/Ol.vue | 3 +- src/runtime/components/prose/P.vue | 3 +- src/runtime/components/prose/Pre.vue | 3 +- src/runtime/components/prose/Steps.vue | 3 +- src/runtime/components/prose/Strong.vue | 3 +- src/runtime/components/prose/Table.vue | 3 +- src/runtime/components/prose/Tabs.vue | 3 +- src/runtime/components/prose/TabsItem.vue | 3 +- src/runtime/components/prose/Tbody.vue | 3 +- src/runtime/components/prose/Td.vue | 3 +- src/runtime/components/prose/Th.vue | 3 +- src/runtime/components/prose/Thead.vue | 3 +- src/runtime/components/prose/Tr.vue | 3 +- src/runtime/components/prose/Ul.vue | 3 +- src/runtime/inertia/components/Link.vue | 4 +-- src/runtime/types/utils.ts | 4 +-- src/runtime/vue/components/Link.vue | 4 +-- 140 files changed, 674 insertions(+), 547 deletions(-) diff --git a/docs/app/components/content/ComponentExample.vue b/docs/app/components/content/ComponentExample.vue index 1d2889e63a..33b9dba706 100644 --- a/docs/app/components/content/ComponentExample.vue +++ b/docs/app/components/content/ComponentExample.vue @@ -1,4 +1,5 @@ diff --git a/playgrounds/nuxt/app/components/Matrix.vue b/playgrounds/nuxt/app/components/Matrix.vue index c3aeb9772a..d453ce69b5 100644 --- a/playgrounds/nuxt/app/components/Matrix.vue +++ b/playgrounds/nuxt/app/components/Matrix.vue @@ -1,4 +1,6 @@ diff --git a/src/runtime/components/Alert.vue b/src/runtime/components/Alert.vue index 1d9ab5c5c1..6fd05b921f 100644 --- a/src/runtime/components/Alert.vue +++ b/src/runtime/components/Alert.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/App.vue b/src/runtime/components/App.vue index d2171cb9d6..c37ab7fe7d 100644 --- a/src/runtime/components/App.vue +++ b/src/runtime/components/App.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/AvatarGroup.vue b/src/runtime/components/AvatarGroup.vue index 722d5519ae..6f3ba0caf2 100644 --- a/src/runtime/components/AvatarGroup.vue +++ b/src/runtime/components/AvatarGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Badge.vue b/src/runtime/components/Badge.vue index 6ee8a7a88e..62defcc068 100644 --- a/src/runtime/components/Badge.vue +++ b/src/runtime/components/Badge.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Banner.vue b/src/runtime/components/Banner.vue index ea89369361..95b4f583c1 100644 --- a/src/runtime/components/Banner.vue +++ b/src/runtime/components/Banner.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/BlogPosts.vue b/src/runtime/components/BlogPosts.vue index de5abc5f3e..a2af799002 100644 --- a/src/runtime/components/BlogPosts.vue +++ b/src/runtime/components/BlogPosts.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Breadcrumb.vue b/src/runtime/components/Breadcrumb.vue index a6f9092577..c1a1264d43 100644 --- a/src/runtime/components/Breadcrumb.vue +++ b/src/runtime/components/Breadcrumb.vue @@ -1,5 +1,6 @@ @@ -90,19 +91,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.breadcrumb |
  • - - + + - + {{ get(item, props.labelKey as string) }} - + diff --git a/src/runtime/components/Button.vue b/src/runtime/components/Button.vue index c0411ade3a..a3d14a32ee 100644 --- a/src/runtime/components/Button.vue +++ b/src/runtime/components/Button.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Card.vue b/src/runtime/components/Card.vue index 2e53d39dcc..4d6af96ae2 100644 --- a/src/runtime/components/Card.vue +++ b/src/runtime/components/Card.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Carousel.vue b/src/runtime/components/Carousel.vue index 75191d0031..fba2fd0212 100644 --- a/src/runtime/components/Carousel.vue +++ b/src/runtime/components/Carousel.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/ChangelogVersions.vue b/src/runtime/components/ChangelogVersions.vue index c76ac1f618..d172cf30e8 100644 --- a/src/runtime/components/ChangelogVersions.vue +++ b/src/runtime/components/ChangelogVersions.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/ChatMessage.vue b/src/runtime/components/ChatMessage.vue index 04f54cc44a..43e1fd76e4 100644 --- a/src/runtime/components/ChatMessage.vue +++ b/src/runtime/components/ChatMessage.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/ChatMessages.vue b/src/runtime/components/ChatMessages.vue index c19740d389..9351d6c59b 100644 --- a/src/runtime/components/ChatMessages.vue +++ b/src/runtime/components/ChatMessages.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/ChatPrompt.vue b/src/runtime/components/ChatPrompt.vue index 89ff553c80..cce4075f4a 100644 --- a/src/runtime/components/ChatPrompt.vue +++ b/src/runtime/components/ChatPrompt.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Checkbox.vue b/src/runtime/components/Checkbox.vue index 1c6884ef0f..bdda60c946 100644 --- a/src/runtime/components/Checkbox.vue +++ b/src/runtime/components/Checkbox.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/CheckboxGroup.vue b/src/runtime/components/CheckboxGroup.vue index d89586a815..84c254bcce 100644 --- a/src/runtime/components/CheckboxGroup.vue +++ b/src/runtime/components/CheckboxGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Chip.vue b/src/runtime/components/Chip.vue index 742c2ecaf8..ad6eb47665 100644 --- a/src/runtime/components/Chip.vue +++ b/src/runtime/components/Chip.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Collapsible.vue b/src/runtime/components/Collapsible.vue index 6bf0703c32..d5a069bc9f 100644 --- a/src/runtime/components/Collapsible.vue +++ b/src/runtime/components/Collapsible.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 0a213df0a2..819df70eb5 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/Container.vue b/src/runtime/components/Container.vue index cda21f8f41..c5b92e1df1 100644 --- a/src/runtime/components/Container.vue +++ b/src/runtime/components/Container.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/ContextMenu.vue b/src/runtime/components/ContextMenu.vue index 208e548dfd..6796334114 100644 --- a/src/runtime/components/ContextMenu.vue +++ b/src/runtime/components/ContextMenu.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/DashboardGroup.vue b/src/runtime/components/DashboardGroup.vue index 11f0d27b2d..5a979cdaf5 100644 --- a/src/runtime/components/DashboardGroup.vue +++ b/src/runtime/components/DashboardGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/DashboardNavbar.vue b/src/runtime/components/DashboardNavbar.vue index f8109c2621..008fe3dfe5 100644 --- a/src/runtime/components/DashboardNavbar.vue +++ b/src/runtime/components/DashboardNavbar.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/DashboardPanel.vue b/src/runtime/components/DashboardPanel.vue index 2aed4b7620..aa517a1d05 100644 --- a/src/runtime/components/DashboardPanel.vue +++ b/src/runtime/components/DashboardPanel.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/DashboardResizeHandle.vue b/src/runtime/components/DashboardResizeHandle.vue index a909b90c1d..9a3f9a0cbe 100644 --- a/src/runtime/components/DashboardResizeHandle.vue +++ b/src/runtime/components/DashboardResizeHandle.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/DashboardSearch.vue b/src/runtime/components/DashboardSearch.vue index cc836edf67..44a15bda14 100644 --- a/src/runtime/components/DashboardSearch.vue +++ b/src/runtime/components/DashboardSearch.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/DashboardSidebar.vue b/src/runtime/components/DashboardSidebar.vue index 6b01e9ad5e..b608de5f0b 100644 --- a/src/runtime/components/DashboardSidebar.vue +++ b/src/runtime/components/DashboardSidebar.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/DashboardToolbar.vue b/src/runtime/components/DashboardToolbar.vue index 0804190641..3f0797ac70 100644 --- a/src/runtime/components/DashboardToolbar.vue +++ b/src/runtime/components/DashboardToolbar.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Drawer.vue b/src/runtime/components/Drawer.vue index 65e92871eb..917b28c183 100644 --- a/src/runtime/components/Drawer.vue +++ b/src/runtime/components/Drawer.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/DropdownMenu.vue b/src/runtime/components/DropdownMenu.vue index 5eb96481c1..9e52eb4bc7 100644 --- a/src/runtime/components/DropdownMenu.vue +++ b/src/runtime/components/DropdownMenu.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/DropdownMenuContent.vue b/src/runtime/components/DropdownMenuContent.vue index bfcbd56016..17ff48f100 100644 --- a/src/runtime/components/DropdownMenuContent.vue +++ b/src/runtime/components/DropdownMenuContent.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/Empty.vue b/src/runtime/components/Empty.vue index fde3dea1a1..4704a0fe3b 100644 --- a/src/runtime/components/Empty.vue +++ b/src/runtime/components/Empty.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Error.vue b/src/runtime/components/Error.vue index 66fedb6c44..7c59bf71e5 100644 --- a/src/runtime/components/Error.vue +++ b/src/runtime/components/Error.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/FieldGroup.vue b/src/runtime/components/FieldGroup.vue index 3bb45f90e7..614c99fe98 100644 --- a/src/runtime/components/FieldGroup.vue +++ b/src/runtime/components/FieldGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/FileUpload.vue b/src/runtime/components/FileUpload.vue index 17b9a8b3f3..5185a235bf 100644 --- a/src/runtime/components/FileUpload.vue +++ b/src/runtime/components/FileUpload.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Footer.vue b/src/runtime/components/Footer.vue index eae721f362..d3dde071c1 100644 --- a/src/runtime/components/Footer.vue +++ b/src/runtime/components/Footer.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/FooterColumns.vue b/src/runtime/components/FooterColumns.vue index 5857cb8c7d..c3571bb122 100644 --- a/src/runtime/components/FooterColumns.vue +++ b/src/runtime/components/FooterColumns.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Form.vue b/src/runtime/components/Form.vue index 653900c4a1..2cdaabe61e 100644 --- a/src/runtime/components/Form.vue +++ b/src/runtime/components/Form.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/FormField.vue b/src/runtime/components/FormField.vue index 87e523d996..6ba399e9c4 100644 --- a/src/runtime/components/FormField.vue +++ b/src/runtime/components/FormField.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Input.vue b/src/runtime/components/Input.vue index aed1b12f1d..153936961f 100644 --- a/src/runtime/components/Input.vue +++ b/src/runtime/components/Input.vue @@ -1,5 +1,5 @@ diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index be0fb4bd3c..1c8cf5da4a 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -1,5 +1,5 @@ diff --git a/src/runtime/components/InputNumber.vue b/src/runtime/components/InputNumber.vue index a865e9e039..8f50d9a160 100644 --- a/src/runtime/components/InputNumber.vue +++ b/src/runtime/components/InputNumber.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/InputTags.vue b/src/runtime/components/InputTags.vue index a55e664de7..6cbfacbc37 100644 --- a/src/runtime/components/InputTags.vue +++ b/src/runtime/components/InputTags.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Kbd.vue b/src/runtime/components/Kbd.vue index 3ad66e85f5..198a41d94b 100644 --- a/src/runtime/components/Kbd.vue +++ b/src/runtime/components/Kbd.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Link.vue b/src/runtime/components/Link.vue index a555269dc7..24cba3d236 100644 --- a/src/runtime/components/Link.vue +++ b/src/runtime/components/Link.vue @@ -1,5 +1,5 @@ diff --git a/src/runtime/components/Main.vue b/src/runtime/components/Main.vue index ea744b68e1..6e316b32ee 100644 --- a/src/runtime/components/Main.vue +++ b/src/runtime/components/Main.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Marquee.vue b/src/runtime/components/Marquee.vue index 0774ca5b80..cd64c34bef 100644 --- a/src/runtime/components/Marquee.vue +++ b/src/runtime/components/Marquee.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Modal.vue b/src/runtime/components/Modal.vue index b06853d5e9..0d7f0aa69b 100644 --- a/src/runtime/components/Modal.vue +++ b/src/runtime/components/Modal.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index b4641b77c8..c21812efa2 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/Page.vue b/src/runtime/components/Page.vue index 616dc9cab2..3deddac2eb 100644 --- a/src/runtime/components/Page.vue +++ b/src/runtime/components/Page.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageAnchors.vue b/src/runtime/components/PageAnchors.vue index 719d431089..1d80aba4c5 100644 --- a/src/runtime/components/PageAnchors.vue +++ b/src/runtime/components/PageAnchors.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageAside.vue b/src/runtime/components/PageAside.vue index 06264e7f8f..f1d057202b 100644 --- a/src/runtime/components/PageAside.vue +++ b/src/runtime/components/PageAside.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageBody.vue b/src/runtime/components/PageBody.vue index cd1540cefa..099d6feba5 100644 --- a/src/runtime/components/PageBody.vue +++ b/src/runtime/components/PageBody.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageCTA.vue b/src/runtime/components/PageCTA.vue index 3fd3f10dbc..1dcf016c7f 100644 --- a/src/runtime/components/PageCTA.vue +++ b/src/runtime/components/PageCTA.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageCard.vue b/src/runtime/components/PageCard.vue index 5640a8a891..8df62f781c 100644 --- a/src/runtime/components/PageCard.vue +++ b/src/runtime/components/PageCard.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageColumns.vue b/src/runtime/components/PageColumns.vue index 7e99f6d509..dea407ed33 100644 --- a/src/runtime/components/PageColumns.vue +++ b/src/runtime/components/PageColumns.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageFeature.vue b/src/runtime/components/PageFeature.vue index 6d289701f1..74fb67bbe2 100644 --- a/src/runtime/components/PageFeature.vue +++ b/src/runtime/components/PageFeature.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageGrid.vue b/src/runtime/components/PageGrid.vue index 5be289c4e7..cef0c51b1d 100644 --- a/src/runtime/components/PageGrid.vue +++ b/src/runtime/components/PageGrid.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageHeader.vue b/src/runtime/components/PageHeader.vue index 75aaeef5be..e4f90d2c38 100644 --- a/src/runtime/components/PageHeader.vue +++ b/src/runtime/components/PageHeader.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageHero.vue b/src/runtime/components/PageHero.vue index c987e8c21b..2c1dbe328e 100644 --- a/src/runtime/components/PageHero.vue +++ b/src/runtime/components/PageHero.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageLinks.vue b/src/runtime/components/PageLinks.vue index f98b548311..f83b3b1f61 100644 --- a/src/runtime/components/PageLinks.vue +++ b/src/runtime/components/PageLinks.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageList.vue b/src/runtime/components/PageList.vue index 7fde32cdf3..f8ddea5a2e 100644 --- a/src/runtime/components/PageList.vue +++ b/src/runtime/components/PageList.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageLogos.vue b/src/runtime/components/PageLogos.vue index 06e2a1c9aa..99f7ed64cd 100644 --- a/src/runtime/components/PageLogos.vue +++ b/src/runtime/components/PageLogos.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PageSection.vue b/src/runtime/components/PageSection.vue index 03cbc7cac4..85fc0b392a 100644 --- a/src/runtime/components/PageSection.vue +++ b/src/runtime/components/PageSection.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Pagination.vue b/src/runtime/components/Pagination.vue index 1bbe701b44..73294418d7 100644 --- a/src/runtime/components/Pagination.vue +++ b/src/runtime/components/Pagination.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Popover.vue b/src/runtime/components/Popover.vue index 3e58f8f491..7e427dcd2f 100644 --- a/src/runtime/components/Popover.vue +++ b/src/runtime/components/Popover.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PricingPlan.vue b/src/runtime/components/PricingPlan.vue index 912178ff96..2f8685f653 100644 --- a/src/runtime/components/PricingPlan.vue +++ b/src/runtime/components/PricingPlan.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PricingPlans.vue b/src/runtime/components/PricingPlans.vue index 198b7ec8d5..20507ad095 100644 --- a/src/runtime/components/PricingPlans.vue +++ b/src/runtime/components/PricingPlans.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/PricingTable.vue b/src/runtime/components/PricingTable.vue index f8f5c0671f..d5b4c00961 100644 --- a/src/runtime/components/PricingTable.vue +++ b/src/runtime/components/PricingTable.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/RadioGroup.vue b/src/runtime/components/RadioGroup.vue index f07b213a10..c5395480c1 100644 --- a/src/runtime/components/RadioGroup.vue +++ b/src/runtime/components/RadioGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Select.vue b/src/runtime/components/Select.vue index 96da5bacb5..d3fa1353ab 100644 --- a/src/runtime/components/Select.vue +++ b/src/runtime/components/Select.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/SelectMenu.vue b/src/runtime/components/SelectMenu.vue index 191b73f5cb..e3dd4c813c 100644 --- a/src/runtime/components/SelectMenu.vue +++ b/src/runtime/components/SelectMenu.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Separator.vue b/src/runtime/components/Separator.vue index 2d58a14cfe..210ddbac3e 100644 --- a/src/runtime/components/Separator.vue +++ b/src/runtime/components/Separator.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Slideover.vue b/src/runtime/components/Slideover.vue index 9df043f300..a4d8cf8cb4 100644 --- a/src/runtime/components/Slideover.vue +++ b/src/runtime/components/Slideover.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Stepper.vue b/src/runtime/components/Stepper.vue index 82dc4fd150..416225a198 100644 --- a/src/runtime/components/Stepper.vue +++ b/src/runtime/components/Stepper.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/Switch.vue b/src/runtime/components/Switch.vue index ada4ae985f..5980844e73 100644 --- a/src/runtime/components/Switch.vue +++ b/src/runtime/components/Switch.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Table.vue b/src/runtime/components/Table.vue index f596e803d5..5df837e650 100644 --- a/src/runtime/components/Table.vue +++ b/src/runtime/components/Table.vue @@ -1,6 +1,6 @@ diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue index 0c0877b283..f6c2ace2f5 100644 --- a/src/runtime/components/Tabs.vue +++ b/src/runtime/components/Tabs.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/Timeline.vue b/src/runtime/components/Timeline.vue index 213656441d..cd020b04bb 100644 --- a/src/runtime/components/Timeline.vue +++ b/src/runtime/components/Timeline.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/Toast.vue b/src/runtime/components/Toast.vue index d2f04e2dad..925a3a875f 100644 --- a/src/runtime/components/Toast.vue +++ b/src/runtime/components/Toast.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Toaster.vue b/src/runtime/components/Toaster.vue index 5ecc7ee219..ebbc7398c6 100644 --- a/src/runtime/components/Toaster.vue +++ b/src/runtime/components/Toaster.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/Tree.vue b/src/runtime/components/Tree.vue index 6b52f7f657..102be82caa 100644 --- a/src/runtime/components/Tree.vue +++ b/src/runtime/components/Tree.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/color-mode/ColorModeButton.vue b/src/runtime/components/color-mode/ColorModeButton.vue index 0d8ad091ad..fa12b60cce 100644 --- a/src/runtime/components/color-mode/ColorModeButton.vue +++ b/src/runtime/components/color-mode/ColorModeButton.vue @@ -14,7 +14,7 @@ export interface ColorModeButtonProps extends /** @vue-ignore */ Pick diff --git a/src/runtime/components/content/ContentSearch.vue b/src/runtime/components/content/ContentSearch.vue index 26b5b9af27..16493f6a32 100644 --- a/src/runtime/components/content/ContentSearch.vue +++ b/src/runtime/components/content/ContentSearch.vue @@ -1,5 +1,6 @@ diff --git a/src/runtime/components/content/ContentSurround.vue b/src/runtime/components/content/ContentSurround.vue index 29bc2061ed..98ab25359d 100644 --- a/src/runtime/components/content/ContentSurround.vue +++ b/src/runtime/components/content/ContentSurround.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/A.vue b/src/runtime/components/prose/A.vue index b07667f148..521f3f6e12 100644 --- a/src/runtime/components/prose/A.vue +++ b/src/runtime/components/prose/A.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Accordion.vue b/src/runtime/components/prose/Accordion.vue index dd2ba99b0a..ff509664c8 100644 --- a/src/runtime/components/prose/Accordion.vue +++ b/src/runtime/components/prose/Accordion.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/AccordionItem.vue b/src/runtime/components/prose/AccordionItem.vue index 369a9a6b6a..8116c90b61 100644 --- a/src/runtime/components/prose/AccordionItem.vue +++ b/src/runtime/components/prose/AccordionItem.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Badge.vue b/src/runtime/components/prose/Badge.vue index 9294e9d3f8..38c365156c 100644 --- a/src/runtime/components/prose/Badge.vue +++ b/src/runtime/components/prose/Badge.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Blockquote.vue b/src/runtime/components/prose/Blockquote.vue index 77fa64634c..dcf30e2278 100644 --- a/src/runtime/components/prose/Blockquote.vue +++ b/src/runtime/components/prose/Blockquote.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Callout.vue b/src/runtime/components/prose/Callout.vue index 750400d946..86f6b5a260 100644 --- a/src/runtime/components/prose/Callout.vue +++ b/src/runtime/components/prose/Callout.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Card.vue b/src/runtime/components/prose/Card.vue index 312183d49f..58c1a7f390 100644 --- a/src/runtime/components/prose/Card.vue +++ b/src/runtime/components/prose/Card.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/CardGroup.vue b/src/runtime/components/prose/CardGroup.vue index 4ed8659a57..0e2478ef37 100644 --- a/src/runtime/components/prose/CardGroup.vue +++ b/src/runtime/components/prose/CardGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Code.vue b/src/runtime/components/prose/Code.vue index f35345ba11..bdc8d13cc5 100644 --- a/src/runtime/components/prose/Code.vue +++ b/src/runtime/components/prose/Code.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/CodeCollapse.vue b/src/runtime/components/prose/CodeCollapse.vue index 041389ed49..2431256a6b 100644 --- a/src/runtime/components/prose/CodeCollapse.vue +++ b/src/runtime/components/prose/CodeCollapse.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/CodeGroup.vue b/src/runtime/components/prose/CodeGroup.vue index 6b8622275f..906142a31e 100644 --- a/src/runtime/components/prose/CodeGroup.vue +++ b/src/runtime/components/prose/CodeGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/CodePreview.vue b/src/runtime/components/prose/CodePreview.vue index d7813b83ac..99617fe9c3 100644 --- a/src/runtime/components/prose/CodePreview.vue +++ b/src/runtime/components/prose/CodePreview.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/CodeTree.vue b/src/runtime/components/prose/CodeTree.vue index ed52d98f93..d999ba1c1a 100644 --- a/src/runtime/components/prose/CodeTree.vue +++ b/src/runtime/components/prose/CodeTree.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Collapsible.vue b/src/runtime/components/prose/Collapsible.vue index 4e2aa1038e..9f5ded2799 100644 --- a/src/runtime/components/prose/Collapsible.vue +++ b/src/runtime/components/prose/Collapsible.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Em.vue b/src/runtime/components/prose/Em.vue index e382b7dd48..1f393af4c9 100644 --- a/src/runtime/components/prose/Em.vue +++ b/src/runtime/components/prose/Em.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Field.vue b/src/runtime/components/prose/Field.vue index 2bcc38b04b..950853a555 100644 --- a/src/runtime/components/prose/Field.vue +++ b/src/runtime/components/prose/Field.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/FieldGroup.vue b/src/runtime/components/prose/FieldGroup.vue index 277f2d49cb..c4db324ef4 100644 --- a/src/runtime/components/prose/FieldGroup.vue +++ b/src/runtime/components/prose/FieldGroup.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/H1.vue b/src/runtime/components/prose/H1.vue index f3541d2600..a32e19fb7a 100644 --- a/src/runtime/components/prose/H1.vue +++ b/src/runtime/components/prose/H1.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/H2.vue b/src/runtime/components/prose/H2.vue index 125978b4f9..742166c6d3 100644 --- a/src/runtime/components/prose/H2.vue +++ b/src/runtime/components/prose/H2.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/H3.vue b/src/runtime/components/prose/H3.vue index 958b7d5167..2f2cce6250 100644 --- a/src/runtime/components/prose/H3.vue +++ b/src/runtime/components/prose/H3.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/H4.vue b/src/runtime/components/prose/H4.vue index ff8b46f06f..b02e7eb19b 100644 --- a/src/runtime/components/prose/H4.vue +++ b/src/runtime/components/prose/H4.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Li.vue b/src/runtime/components/prose/Li.vue index 24fe19dc39..30956040ef 100644 --- a/src/runtime/components/prose/Li.vue +++ b/src/runtime/components/prose/Li.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Ol.vue b/src/runtime/components/prose/Ol.vue index 155c5c00eb..f81ec7be71 100644 --- a/src/runtime/components/prose/Ol.vue +++ b/src/runtime/components/prose/Ol.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/P.vue b/src/runtime/components/prose/P.vue index 1c30334624..0308481f4e 100644 --- a/src/runtime/components/prose/P.vue +++ b/src/runtime/components/prose/P.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Pre.vue b/src/runtime/components/prose/Pre.vue index 6c1e0c655d..ef5d37ff78 100644 --- a/src/runtime/components/prose/Pre.vue +++ b/src/runtime/components/prose/Pre.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Steps.vue b/src/runtime/components/prose/Steps.vue index ee2ce19c27..20a81cd4a6 100644 --- a/src/runtime/components/prose/Steps.vue +++ b/src/runtime/components/prose/Steps.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Strong.vue b/src/runtime/components/prose/Strong.vue index 23ac2b45c2..d64958adba 100644 --- a/src/runtime/components/prose/Strong.vue +++ b/src/runtime/components/prose/Strong.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Table.vue b/src/runtime/components/prose/Table.vue index e16dd8e5cf..a84363ac37 100644 --- a/src/runtime/components/prose/Table.vue +++ b/src/runtime/components/prose/Table.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Tabs.vue b/src/runtime/components/prose/Tabs.vue index 7e96c4213e..a48f11f86e 100644 --- a/src/runtime/components/prose/Tabs.vue +++ b/src/runtime/components/prose/Tabs.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/TabsItem.vue b/src/runtime/components/prose/TabsItem.vue index 49d30a8835..71c9e49684 100644 --- a/src/runtime/components/prose/TabsItem.vue +++ b/src/runtime/components/prose/TabsItem.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Tbody.vue b/src/runtime/components/prose/Tbody.vue index 2dfe56afb5..d80ce199c1 100644 --- a/src/runtime/components/prose/Tbody.vue +++ b/src/runtime/components/prose/Tbody.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Td.vue b/src/runtime/components/prose/Td.vue index 87fe88e49f..b436af76fa 100644 --- a/src/runtime/components/prose/Td.vue +++ b/src/runtime/components/prose/Td.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Th.vue b/src/runtime/components/prose/Th.vue index 9a04a0cf67..38b70c0caa 100644 --- a/src/runtime/components/prose/Th.vue +++ b/src/runtime/components/prose/Th.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Thead.vue b/src/runtime/components/prose/Thead.vue index 8dc6de681a..c52fde4c84 100644 --- a/src/runtime/components/prose/Thead.vue +++ b/src/runtime/components/prose/Thead.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Tr.vue b/src/runtime/components/prose/Tr.vue index a4619d3e94..3392634ca4 100644 --- a/src/runtime/components/prose/Tr.vue +++ b/src/runtime/components/prose/Tr.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/components/prose/Ul.vue b/src/runtime/components/prose/Ul.vue index d5558977f8..88aa61b4f1 100644 --- a/src/runtime/components/prose/Ul.vue +++ b/src/runtime/components/prose/Ul.vue @@ -1,4 +1,5 @@ diff --git a/src/runtime/inertia/components/Link.vue b/src/runtime/inertia/components/Link.vue index 1061d74197..a341a8e3e7 100644 --- a/src/runtime/inertia/components/Link.vue +++ b/src/runtime/inertia/components/Link.vue @@ -1,5 +1,5 @@ diff --git a/src/runtime/types/utils.ts b/src/runtime/types/utils.ts index aaacba9d66..7605063297 100644 --- a/src/runtime/types/utils.ts +++ b/src/runtime/types/utils.ts @@ -17,9 +17,9 @@ export type DynamicSlots< Suffix extends string | undefined = undefined, ExtraProps extends object = {} > = { - [K in DynamicSlotsKeys]: ( + [K in DynamicSlotsKeys]?: ( props: { item: Extract } & ExtraProps - ) => any + ) => VNode[] } export type GetObjectField = MaybeObject extends Record diff --git a/src/runtime/vue/components/Link.vue b/src/runtime/vue/components/Link.vue index 89775d09ad..ddd4dc254c 100644 --- a/src/runtime/vue/components/Link.vue +++ b/src/runtime/vue/components/Link.vue @@ -1,5 +1,5 @@ From 28ba62195e4a1432a08fd31172d63d310e95d151 Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Thu, 16 Oct 2025 19:29:49 +0200 Subject: [PATCH 2/7] fix: improve slots return --- .../components/content/ComponentExample.vue | 6 ++-- .../theme-picker/ThemePickerButton.vue | 4 ++- playgrounds/nuxt/app/components/Matrix.vue | 4 +-- src/runtime/components/Accordion.vue | 5 ++-- src/runtime/components/Alert.vue | 12 ++++---- src/runtime/components/App.vue | 4 +-- src/runtime/components/AuthForm.vue | 22 +++++++-------- src/runtime/components/AvatarGroup.vue | 7 +++-- src/runtime/components/Badge.vue | 8 +++--- src/runtime/components/Banner.vue | 10 +++---- src/runtime/components/BlogPost.vue | 18 ++++++------ src/runtime/components/BlogPosts.vue | 4 +-- src/runtime/components/Breadcrumb.vue | 7 ++--- src/runtime/components/Button.vue | 9 +++--- src/runtime/components/Calendar.vue | 8 +++--- src/runtime/components/Card.vue | 8 +++--- src/runtime/components/Carousel.vue | 5 ++-- src/runtime/components/ChangelogVersion.vue | 24 ++++++++-------- src/runtime/components/ChangelogVersions.vue | 28 +++++++++---------- src/runtime/components/ChatMessage.vue | 8 +++--- src/runtime/components/ChatMessages.vue | 15 +++++----- src/runtime/components/ChatPalette.vue | 6 ++-- src/runtime/components/ChatPrompt.vue | 6 ++-- src/runtime/components/Checkbox.vue | 6 ++-- src/runtime/components/CheckboxGroup.vue | 7 ++--- src/runtime/components/Chip.vue | 6 ++-- src/runtime/components/Collapsible.vue | 6 ++-- src/runtime/components/CommandPalette.vue | 13 ++++----- src/runtime/components/Container.vue | 4 +-- src/runtime/components/ContextMenu.vue | 11 ++++---- src/runtime/components/DashboardGroup.vue | 4 +-- src/runtime/components/DashboardNavbar.vue | 16 +++++------ src/runtime/components/DashboardPanel.vue | 12 ++++---- .../components/DashboardResizeHandle.vue | 4 +-- src/runtime/components/DashboardSearch.vue | 4 +-- src/runtime/components/DashboardSidebar.vue | 14 +++++----- src/runtime/components/DashboardToolbar.vue | 8 +++--- src/runtime/components/Drawer.vue | 17 ++++++----- src/runtime/components/DropdownMenu.vue | 11 ++++---- .../components/DropdownMenuContent.vue | 5 ++-- src/runtime/components/Empty.vue | 16 +++++------ src/runtime/components/Error.vue | 12 ++++---- src/runtime/components/FieldGroup.vue | 4 +-- src/runtime/components/FileUpload.vue | 28 +++++++++---------- src/runtime/components/Footer.vue | 12 ++++---- src/runtime/components/FooterColumns.vue | 12 ++++---- src/runtime/components/Form.vue | 4 +-- src/runtime/components/FormField.vue | 15 +++++----- src/runtime/components/Header.vue | 20 ++++++------- src/runtime/components/Input.vue | 10 +++---- src/runtime/components/InputMenu.vue | 18 ++++++------ src/runtime/components/InputNumber.vue | 6 ++-- src/runtime/components/InputTags.vue | 10 +++---- src/runtime/components/Kbd.vue | 4 +-- src/runtime/components/Link.vue | 5 ++-- src/runtime/components/Main.vue | 4 +-- src/runtime/components/Marquee.vue | 4 +-- src/runtime/components/Modal.vue | 21 +++++++------- src/runtime/components/NavigationMenu.vue | 9 +++--- src/runtime/components/Page.vue | 8 +++--- src/runtime/components/PageAnchors.vue | 4 +-- src/runtime/components/PageAside.vue | 8 +++--- src/runtime/components/PageBody.vue | 4 +-- src/runtime/components/PageCTA.vue | 20 ++++++------- src/runtime/components/PageCard.vue | 16 +++++------ src/runtime/components/PageColumns.vue | 4 +-- src/runtime/components/PageFeature.vue | 10 +++---- src/runtime/components/PageGrid.vue | 4 +-- src/runtime/components/PageHeader.vue | 12 ++++---- src/runtime/components/PageHero.vue | 22 +++++++-------- src/runtime/components/PageLinks.vue | 6 ++-- src/runtime/components/PageList.vue | 4 +-- src/runtime/components/PageLogos.vue | 4 +-- src/runtime/components/PageSection.vue | 26 ++++++++--------- src/runtime/components/Pagination.vue | 14 +++++----- src/runtime/components/Popover.vue | 9 +++--- src/runtime/components/PricingPlan.vue | 28 +++++++++---------- src/runtime/components/PricingPlans.vue | 16 +++++++++-- src/runtime/components/PricingTable.vue | 18 ++++++------ src/runtime/components/Progress.vue | 6 ++-- src/runtime/components/RadioGroup.vue | 7 ++--- src/runtime/components/Select.vue | 15 +++++----- src/runtime/components/SelectMenu.vue | 19 ++++++------- src/runtime/components/Separator.vue | 4 +-- src/runtime/components/Slideover.vue | 21 +++++++------- src/runtime/components/Stepper.vue | 5 ++-- src/runtime/components/Switch.vue | 6 ++-- src/runtime/components/Table.vue | 21 +++++++------- src/runtime/components/Tabs.vue | 10 +++---- src/runtime/components/Textarea.vue | 8 +++--- src/runtime/components/Timeline.vue | 5 ++-- src/runtime/components/Toast.vue | 13 ++++----- src/runtime/components/Toaster.vue | 4 +-- src/runtime/components/Tooltip.vue | 7 ++--- src/runtime/components/Tree.vue | 5 ++-- src/runtime/components/User.vue | 10 +++---- .../components/color-mode/ColorModeButton.vue | 5 ++-- .../components/content/ContentNavigation.vue | 4 +-- .../components/content/ContentSearch.vue | 4 +-- .../components/content/ContentSurround.vue | 5 ++-- src/runtime/components/content/ContentToc.vue | 16 +++++------ src/runtime/components/prose/A.vue | 4 +-- src/runtime/components/prose/Accordion.vue | 10 +++++-- .../components/prose/AccordionItem.vue | 4 +-- src/runtime/components/prose/Badge.vue | 4 +-- src/runtime/components/prose/Blockquote.vue | 4 +-- src/runtime/components/prose/Callout.vue | 4 +-- src/runtime/components/prose/Card.vue | 6 ++-- src/runtime/components/prose/CardGroup.vue | 4 +-- src/runtime/components/prose/Code.vue | 4 +-- src/runtime/components/prose/CodeCollapse.vue | 4 +-- src/runtime/components/prose/CodeGroup.vue | 10 +++++-- src/runtime/components/prose/CodePreview.vue | 6 ++-- src/runtime/components/prose/CodeTree.vue | 10 +++++-- src/runtime/components/prose/Collapsible.vue | 4 +-- src/runtime/components/prose/Em.vue | 4 +-- src/runtime/components/prose/Field.vue | 4 +-- src/runtime/components/prose/FieldGroup.vue | 4 +-- src/runtime/components/prose/H1.vue | 4 +-- src/runtime/components/prose/H2.vue | 4 +-- src/runtime/components/prose/H3.vue | 4 +-- src/runtime/components/prose/H4.vue | 4 +-- src/runtime/components/prose/Li.vue | 4 +-- src/runtime/components/prose/Ol.vue | 4 +-- src/runtime/components/prose/P.vue | 4 +-- src/runtime/components/prose/Pre.vue | 4 +-- src/runtime/components/prose/Steps.vue | 4 +-- src/runtime/components/prose/Strong.vue | 4 +-- src/runtime/components/prose/Table.vue | 4 +-- src/runtime/components/prose/Tabs.vue | 10 +++++-- src/runtime/components/prose/TabsItem.vue | 4 +-- src/runtime/components/prose/Tbody.vue | 4 +-- src/runtime/components/prose/Td.vue | 4 +-- src/runtime/components/prose/Th.vue | 4 +-- src/runtime/components/prose/Thead.vue | 4 +-- src/runtime/components/prose/Tr.vue | 4 +-- src/runtime/components/prose/Ul.vue | 4 +-- src/runtime/inertia/components/Link.vue | 5 ++-- src/runtime/types/utils.ts | 5 +++- src/runtime/vue/components/Link.vue | 5 ++-- 140 files changed, 618 insertions(+), 596 deletions(-) diff --git a/docs/app/components/content/ComponentExample.vue b/docs/app/components/content/ComponentExample.vue index 33b9dba706..a681de5f6d 100644 --- a/docs/app/components/content/ComponentExample.vue +++ b/docs/app/components/content/ComponentExample.vue @@ -1,10 +1,10 @@ diff --git a/playgrounds/nuxt/app/components/Matrix.vue b/playgrounds/nuxt/app/components/Matrix.vue index d453ce69b5..dd73e52191 100644 --- a/playgrounds/nuxt/app/components/Matrix.vue +++ b/playgrounds/nuxt/app/components/Matrix.vue @@ -1,5 +1,5 @@ diff --git a/src/runtime/components/App.vue b/src/runtime/components/App.vue index c37ab7fe7d..d4216027f2 100644 --- a/src/runtime/components/App.vue +++ b/src/runtime/components/App.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/AvatarGroup.vue b/src/runtime/components/AvatarGroup.vue index 6f3ba0caf2..3d65b97fa9 100644 --- a/src/runtime/components/AvatarGroup.vue +++ b/src/runtime/components/AvatarGroup.vue @@ -1,8 +1,8 @@ @@ -50,6 +50,9 @@ const max = computed(() => typeof props.max === 'string' ? Number.parseInt(props const children = computed(() => { let children = slots.default?.() + if (!Array.isArray(children)) { + children = children ? [children] : [] + } if (children?.length) { children = children.flatMap((child: any) => { if (typeof child.type === 'symbol') { diff --git a/src/runtime/components/Badge.vue b/src/runtime/components/Badge.vue index 62defcc068..d8b0ad40af 100644 --- a/src/runtime/components/Badge.vue +++ b/src/runtime/components/Badge.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/Banner.vue b/src/runtime/components/Banner.vue index 95b4f583c1..59b32fade3 100644 --- a/src/runtime/components/Banner.vue +++ b/src/runtime/components/Banner.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/BlogPosts.vue b/src/runtime/components/BlogPosts.vue index a2af799002..5118b8ac05 100644 --- a/src/runtime/components/BlogPosts.vue +++ b/src/runtime/components/BlogPosts.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/Breadcrumb.vue b/src/runtime/components/Breadcrumb.vue index c1a1264d43..c6089a4203 100644 --- a/src/runtime/components/Breadcrumb.vue +++ b/src/runtime/components/Breadcrumb.vue @@ -1,10 +1,9 @@ diff --git a/src/runtime/components/Button.vue b/src/runtime/components/Button.vue index a3d14a32ee..009269721e 100644 --- a/src/runtime/components/Button.vue +++ b/src/runtime/components/Button.vue @@ -1,10 +1,11 @@ diff --git a/src/runtime/components/Calendar.vue b/src/runtime/components/Calendar.vue index 62ba809625..7755ce4eb7 100644 --- a/src/runtime/components/Calendar.vue +++ b/src/runtime/components/Calendar.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/Card.vue b/src/runtime/components/Card.vue index 4d6af96ae2..c8f47e67fd 100644 --- a/src/runtime/components/Card.vue +++ b/src/runtime/components/Card.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/Carousel.vue b/src/runtime/components/Carousel.vue index fba2fd0212..c4c82d4fe7 100644 --- a/src/runtime/components/Carousel.vue +++ b/src/runtime/components/Carousel.vue @@ -1,6 +1,5 @@ diff --git a/src/runtime/components/ChangelogVersions.vue b/src/runtime/components/ChangelogVersions.vue index d172cf30e8..86ed267b5e 100644 --- a/src/runtime/components/ChangelogVersions.vue +++ b/src/runtime/components/ChangelogVersions.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/ChatMessage.vue b/src/runtime/components/ChatMessage.vue index 43e1fd76e4..725e4c2212 100644 --- a/src/runtime/components/ChatMessage.vue +++ b/src/runtime/components/ChatMessage.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/ChatMessages.vue b/src/runtime/components/ChatMessages.vue index 9351d6c59b..f5f8d0399e 100644 --- a/src/runtime/components/ChatMessages.vue +++ b/src/runtime/components/ChatMessages.vue @@ -1,10 +1,11 @@ diff --git a/src/runtime/components/ChatPalette.vue b/src/runtime/components/ChatPalette.vue index 1170cf57fb..4ede3d63cb 100644 --- a/src/runtime/components/ChatPalette.vue +++ b/src/runtime/components/ChatPalette.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/ChatPrompt.vue b/src/runtime/components/ChatPrompt.vue index cce4075f4a..f16dba030c 100644 --- a/src/runtime/components/ChatPrompt.vue +++ b/src/runtime/components/ChatPrompt.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/Checkbox.vue b/src/runtime/components/Checkbox.vue index bdda60c946..78b86536a0 100644 --- a/src/runtime/components/Checkbox.vue +++ b/src/runtime/components/Checkbox.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/CheckboxGroup.vue b/src/runtime/components/CheckboxGroup.vue index 84c254bcce..dd820d245d 100644 --- a/src/runtime/components/CheckboxGroup.vue +++ b/src/runtime/components/CheckboxGroup.vue @@ -1,10 +1,9 @@ diff --git a/src/runtime/components/Collapsible.vue b/src/runtime/components/Collapsible.vue index d5a069bc9f..14ceeaa0c9 100644 --- a/src/runtime/components/Collapsible.vue +++ b/src/runtime/components/Collapsible.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 819df70eb5..8ee25a3341 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -1,6 +1,5 @@ diff --git a/src/runtime/components/ContextMenu.vue b/src/runtime/components/ContextMenu.vue index 6796334114..f8fcb9ae40 100644 --- a/src/runtime/components/ContextMenu.vue +++ b/src/runtime/components/ContextMenu.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/DashboardGroup.vue b/src/runtime/components/DashboardGroup.vue index 5a979cdaf5..7dd9f9afb8 100644 --- a/src/runtime/components/DashboardGroup.vue +++ b/src/runtime/components/DashboardGroup.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/DashboardNavbar.vue b/src/runtime/components/DashboardNavbar.vue index 008fe3dfe5..875f5505f9 100644 --- a/src/runtime/components/DashboardNavbar.vue +++ b/src/runtime/components/DashboardNavbar.vue @@ -1,5 +1,5 @@ diff --git a/src/runtime/components/DashboardPanel.vue b/src/runtime/components/DashboardPanel.vue index aa517a1d05..1ef53d3bb0 100644 --- a/src/runtime/components/DashboardPanel.vue +++ b/src/runtime/components/DashboardPanel.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/DashboardResizeHandle.vue b/src/runtime/components/DashboardResizeHandle.vue index 9a3f9a0cbe..949f2e39d5 100644 --- a/src/runtime/components/DashboardResizeHandle.vue +++ b/src/runtime/components/DashboardResizeHandle.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/DashboardSearch.vue b/src/runtime/components/DashboardSearch.vue index 44a15bda14..2b7d9f651d 100644 --- a/src/runtime/components/DashboardSearch.vue +++ b/src/runtime/components/DashboardSearch.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/DashboardSidebar.vue b/src/runtime/components/DashboardSidebar.vue index b608de5f0b..3faee71557 100644 --- a/src/runtime/components/DashboardSidebar.vue +++ b/src/runtime/components/DashboardSidebar.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/DashboardToolbar.vue b/src/runtime/components/DashboardToolbar.vue index 3f0797ac70..40d73e9a83 100644 --- a/src/runtime/components/DashboardToolbar.vue +++ b/src/runtime/components/DashboardToolbar.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/Drawer.vue b/src/runtime/components/Drawer.vue index 917b28c183..3aa0507a81 100644 --- a/src/runtime/components/Drawer.vue +++ b/src/runtime/components/Drawer.vue @@ -1,10 +1,9 @@ diff --git a/src/runtime/components/DropdownMenu.vue b/src/runtime/components/DropdownMenu.vue index 9e52eb4bc7..331bc9293f 100644 --- a/src/runtime/components/DropdownMenu.vue +++ b/src/runtime/components/DropdownMenu.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/DropdownMenuContent.vue b/src/runtime/components/DropdownMenuContent.vue index 17ff48f100..d1ef946699 100644 --- a/src/runtime/components/DropdownMenuContent.vue +++ b/src/runtime/components/DropdownMenuContent.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/Empty.vue b/src/runtime/components/Empty.vue index 4704a0fe3b..9441a113c8 100644 --- a/src/runtime/components/Empty.vue +++ b/src/runtime/components/Empty.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/Error.vue b/src/runtime/components/Error.vue index 7c59bf71e5..0d2453d2e2 100644 --- a/src/runtime/components/Error.vue +++ b/src/runtime/components/Error.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/FieldGroup.vue b/src/runtime/components/FieldGroup.vue index 614c99fe98..9564e736c7 100644 --- a/src/runtime/components/FieldGroup.vue +++ b/src/runtime/components/FieldGroup.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/FileUpload.vue b/src/runtime/components/FileUpload.vue index 5185a235bf..2e40db3780 100644 --- a/src/runtime/components/FileUpload.vue +++ b/src/runtime/components/FileUpload.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/Footer.vue b/src/runtime/components/Footer.vue index d3dde071c1..6f46212cf9 100644 --- a/src/runtime/components/Footer.vue +++ b/src/runtime/components/Footer.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/FooterColumns.vue b/src/runtime/components/FooterColumns.vue index c3571bb122..52311b96d4 100644 --- a/src/runtime/components/FooterColumns.vue +++ b/src/runtime/components/FooterColumns.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/FormField.vue b/src/runtime/components/FormField.vue index 6ba399e9c4..696d636534 100644 --- a/src/runtime/components/FormField.vue +++ b/src/runtime/components/FormField.vue @@ -1,8 +1,9 @@ diff --git a/src/runtime/components/Header.vue b/src/runtime/components/Header.vue index 3242a4ede0..631da29ff7 100644 --- a/src/runtime/components/Header.vue +++ b/src/runtime/components/Header.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/Input.vue b/src/runtime/components/Input.vue index 153936961f..293df4b4b0 100644 --- a/src/runtime/components/Input.vue +++ b/src/runtime/components/Input.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index 1c8cf5da4a..593c1f6555 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/InputNumber.vue b/src/runtime/components/InputNumber.vue index 8f50d9a160..3175a20090 100644 --- a/src/runtime/components/InputNumber.vue +++ b/src/runtime/components/InputNumber.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/InputTags.vue b/src/runtime/components/InputTags.vue index 6cbfacbc37..c03fd5b276 100644 --- a/src/runtime/components/InputTags.vue +++ b/src/runtime/components/InputTags.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/Link.vue b/src/runtime/components/Link.vue index 24cba3d236..39213310be 100644 --- a/src/runtime/components/Link.vue +++ b/src/runtime/components/Link.vue @@ -1,9 +1,10 @@ diff --git a/src/runtime/components/Main.vue b/src/runtime/components/Main.vue index 6e316b32ee..b01e2a7fa3 100644 --- a/src/runtime/components/Main.vue +++ b/src/runtime/components/Main.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/Marquee.vue b/src/runtime/components/Marquee.vue index cd64c34bef..9855a6b8d4 100644 --- a/src/runtime/components/Marquee.vue +++ b/src/runtime/components/Marquee.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/Modal.vue b/src/runtime/components/Modal.vue index 0d7f0aa69b..363532ccaa 100644 --- a/src/runtime/components/Modal.vue +++ b/src/runtime/components/Modal.vue @@ -1,10 +1,9 @@ diff --git a/src/runtime/components/NavigationMenu.vue b/src/runtime/components/NavigationMenu.vue index c21812efa2..2a9faaf6bf 100644 --- a/src/runtime/components/NavigationMenu.vue +++ b/src/runtime/components/NavigationMenu.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/Page.vue b/src/runtime/components/Page.vue index 3deddac2eb..a17eb99803 100644 --- a/src/runtime/components/Page.vue +++ b/src/runtime/components/Page.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/PageAnchors.vue b/src/runtime/components/PageAnchors.vue index 1d80aba4c5..6025d4a2bb 100644 --- a/src/runtime/components/PageAnchors.vue +++ b/src/runtime/components/PageAnchors.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageBody.vue b/src/runtime/components/PageBody.vue index 099d6feba5..5fe6c04dc0 100644 --- a/src/runtime/components/PageBody.vue +++ b/src/runtime/components/PageBody.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/PageCTA.vue b/src/runtime/components/PageCTA.vue index 1dcf016c7f..6eeff79d61 100644 --- a/src/runtime/components/PageCTA.vue +++ b/src/runtime/components/PageCTA.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageCard.vue b/src/runtime/components/PageCard.vue index 8df62f781c..e071dc5156 100644 --- a/src/runtime/components/PageCard.vue +++ b/src/runtime/components/PageCard.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageColumns.vue b/src/runtime/components/PageColumns.vue index dea407ed33..68eaced86f 100644 --- a/src/runtime/components/PageColumns.vue +++ b/src/runtime/components/PageColumns.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/PageFeature.vue b/src/runtime/components/PageFeature.vue index 74fb67bbe2..480d28c0ae 100644 --- a/src/runtime/components/PageFeature.vue +++ b/src/runtime/components/PageFeature.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageGrid.vue b/src/runtime/components/PageGrid.vue index cef0c51b1d..bddf69cecc 100644 --- a/src/runtime/components/PageGrid.vue +++ b/src/runtime/components/PageGrid.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/PageHeader.vue b/src/runtime/components/PageHeader.vue index e4f90d2c38..9d94e8c483 100644 --- a/src/runtime/components/PageHeader.vue +++ b/src/runtime/components/PageHeader.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageHero.vue b/src/runtime/components/PageHero.vue index 2c1dbe328e..34e3843f4f 100644 --- a/src/runtime/components/PageHero.vue +++ b/src/runtime/components/PageHero.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageLinks.vue b/src/runtime/components/PageLinks.vue index f83b3b1f61..19732ca7e6 100644 --- a/src/runtime/components/PageLinks.vue +++ b/src/runtime/components/PageLinks.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageLogos.vue b/src/runtime/components/PageLogos.vue index 99f7ed64cd..f4d2a9e820 100644 --- a/src/runtime/components/PageLogos.vue +++ b/src/runtime/components/PageLogos.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PageSection.vue b/src/runtime/components/PageSection.vue index 85fc0b392a..19e2d128d7 100644 --- a/src/runtime/components/PageSection.vue +++ b/src/runtime/components/PageSection.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/Pagination.vue b/src/runtime/components/Pagination.vue index 73294418d7..013852019f 100644 --- a/src/runtime/components/Pagination.vue +++ b/src/runtime/components/Pagination.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/Popover.vue b/src/runtime/components/Popover.vue index 7e427dcd2f..89946dee4b 100644 --- a/src/runtime/components/Popover.vue +++ b/src/runtime/components/Popover.vue @@ -1,9 +1,8 @@ diff --git a/src/runtime/components/PricingPlan.vue b/src/runtime/components/PricingPlan.vue index 2f8685f653..6d8c4b107e 100644 --- a/src/runtime/components/PricingPlan.vue +++ b/src/runtime/components/PricingPlan.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/PricingPlans.vue b/src/runtime/components/PricingPlans.vue index 20507ad095..17a8f6e5f0 100644 --- a/src/runtime/components/PricingPlans.vue +++ b/src/runtime/components/PricingPlans.vue @@ -1,9 +1,9 @@ @@ -56,7 +56,17 @@ const appConfig = useAppConfig() as PricingPlans['AppConfig'] const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.pricingPlans || {}) })) -const count = computed(() => props.plans?.length || slots.default?.()?.flatMap(mapSlot).filter(Boolean)?.length || 3) +const count = computed(() => { + if (props.plans?.length) { + return props.plans.length + } + const children = slots.default?.() + if (Array.isArray(children)) { + return children.flatMap(mapSlot).filter(Boolean).length || 3 + } else { + return children ? 1 : 3 + } +}) function mapSlot(slot: any) { if (typeof slot.type === 'symbol') { diff --git a/src/runtime/components/PricingTable.vue b/src/runtime/components/PricingTable.vue index d5b4c00961..546df96da0 100644 --- a/src/runtime/components/PricingTable.vue +++ b/src/runtime/components/PricingTable.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/RadioGroup.vue b/src/runtime/components/RadioGroup.vue index c5395480c1..2e31b74bf9 100644 --- a/src/runtime/components/RadioGroup.vue +++ b/src/runtime/components/RadioGroup.vue @@ -1,9 +1,8 @@ diff --git a/src/runtime/components/SelectMenu.vue b/src/runtime/components/SelectMenu.vue index e3dd4c813c..7307e2e7cb 100644 --- a/src/runtime/components/SelectMenu.vue +++ b/src/runtime/components/SelectMenu.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/Separator.vue b/src/runtime/components/Separator.vue index 210ddbac3e..6299787285 100644 --- a/src/runtime/components/Separator.vue +++ b/src/runtime/components/Separator.vue @@ -1,10 +1,10 @@ diff --git a/src/runtime/components/Slideover.vue b/src/runtime/components/Slideover.vue index a4d8cf8cb4..68a65019ec 100644 --- a/src/runtime/components/Slideover.vue +++ b/src/runtime/components/Slideover.vue @@ -1,10 +1,9 @@ diff --git a/src/runtime/components/Stepper.vue b/src/runtime/components/Stepper.vue index 416225a198..4da962e9ad 100644 --- a/src/runtime/components/Stepper.vue +++ b/src/runtime/components/Stepper.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/Table.vue b/src/runtime/components/Table.vue index 5df837e650..d5ca4d47a2 100644 --- a/src/runtime/components/Table.vue +++ b/src/runtime/components/Table.vue @@ -1,6 +1,6 @@ diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue index f6c2ace2f5..41bb3f6e58 100644 --- a/src/runtime/components/Tabs.vue +++ b/src/runtime/components/Tabs.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/Textarea.vue b/src/runtime/components/Textarea.vue index 07989e6ea2..b0318a78fa 100644 --- a/src/runtime/components/Textarea.vue +++ b/src/runtime/components/Textarea.vue @@ -1,11 +1,11 @@ diff --git a/src/runtime/components/Timeline.vue b/src/runtime/components/Timeline.vue index cd020b04bb..875114ab17 100644 --- a/src/runtime/components/Timeline.vue +++ b/src/runtime/components/Timeline.vue @@ -1,10 +1,9 @@ diff --git a/src/runtime/components/Toaster.vue b/src/runtime/components/Toaster.vue index ebbc7398c6..839026428f 100644 --- a/src/runtime/components/Toaster.vue +++ b/src/runtime/components/Toaster.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/Tree.vue b/src/runtime/components/Tree.vue index 102be82caa..797e6816f5 100644 --- a/src/runtime/components/Tree.vue +++ b/src/runtime/components/Tree.vue @@ -1,11 +1,10 @@ diff --git a/src/runtime/components/color-mode/ColorModeButton.vue b/src/runtime/components/color-mode/ColorModeButton.vue index fa12b60cce..fdaba77e00 100644 --- a/src/runtime/components/color-mode/ColorModeButton.vue +++ b/src/runtime/components/color-mode/ColorModeButton.vue @@ -14,10 +14,11 @@ export interface ColorModeButtonProps extends /** @vue-ignore */ Pick diff --git a/src/runtime/components/content/ContentSurround.vue b/src/runtime/components/content/ContentSurround.vue index 98ab25359d..f7eb499092 100644 --- a/src/runtime/components/content/ContentSurround.vue +++ b/src/runtime/components/content/ContentSurround.vue @@ -1,10 +1,11 @@ diff --git a/src/runtime/components/prose/A.vue b/src/runtime/components/prose/A.vue index 521f3f6e12..78e85a279c 100644 --- a/src/runtime/components/prose/A.vue +++ b/src/runtime/components/prose/A.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/prose/Accordion.vue b/src/runtime/components/prose/Accordion.vue index ff509664c8..fb9ac96ed2 100644 --- a/src/runtime/components/prose/Accordion.vue +++ b/src/runtime/components/prose/Accordion.vue @@ -1,9 +1,9 @@ @@ -45,7 +45,11 @@ const items = computed<{ }[]>(() => { // eslint-disable-next-line @typescript-eslint/no-unused-expressions rerenderCount.value - return slots.default?.()?.flatMap(transformSlot).filter(Boolean) || [] + let children = slots.default?.() + if (!Array.isArray(children)) { + children = [children] + } + return children?.flatMap(transformSlot).filter(Boolean) || [] }) function transformSlot(slot: any, index: number) { diff --git a/src/runtime/components/prose/AccordionItem.vue b/src/runtime/components/prose/AccordionItem.vue index 8116c90b61..5172410ec6 100644 --- a/src/runtime/components/prose/AccordionItem.vue +++ b/src/runtime/components/prose/AccordionItem.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Badge.vue b/src/runtime/components/prose/Badge.vue index 38c365156c..a042255cf0 100644 --- a/src/runtime/components/prose/Badge.vue +++ b/src/runtime/components/prose/Badge.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/prose/Blockquote.vue b/src/runtime/components/prose/Blockquote.vue index dcf30e2278..83f3981b04 100644 --- a/src/runtime/components/prose/Blockquote.vue +++ b/src/runtime/components/prose/Blockquote.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/prose/Callout.vue b/src/runtime/components/prose/Callout.vue index 86f6b5a260..f4f283db54 100644 --- a/src/runtime/components/prose/Callout.vue +++ b/src/runtime/components/prose/Callout.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/prose/Card.vue b/src/runtime/components/prose/Card.vue index 58c1a7f390..2136601c0f 100644 --- a/src/runtime/components/prose/Card.vue +++ b/src/runtime/components/prose/Card.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/prose/CardGroup.vue b/src/runtime/components/prose/CardGroup.vue index 0e2478ef37..919990d5df 100644 --- a/src/runtime/components/prose/CardGroup.vue +++ b/src/runtime/components/prose/CardGroup.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Code.vue b/src/runtime/components/prose/Code.vue index bdc8d13cc5..300235750f 100644 --- a/src/runtime/components/prose/Code.vue +++ b/src/runtime/components/prose/Code.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/CodeCollapse.vue b/src/runtime/components/prose/CodeCollapse.vue index 2431256a6b..36be61c77c 100644 --- a/src/runtime/components/prose/CodeCollapse.vue +++ b/src/runtime/components/prose/CodeCollapse.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/prose/CodeGroup.vue b/src/runtime/components/prose/CodeGroup.vue index 906142a31e..f891963e3e 100644 --- a/src/runtime/components/prose/CodeGroup.vue +++ b/src/runtime/components/prose/CodeGroup.vue @@ -1,7 +1,7 @@ @@ -54,7 +54,11 @@ const items = computed<{ }[]>(() => { // eslint-disable-next-line @typescript-eslint/no-unused-expressions rerenderCount.value - return slots.default?.()?.flatMap(transformSlot).filter(Boolean) || [] + let children = slots.default?.() + if (!Array.isArray(children)) { + children = [children] + } + return children?.flatMap(transformSlot).filter(Boolean) || [] }) function transformSlot(slot: any, index: number) { diff --git a/src/runtime/components/prose/CodePreview.vue b/src/runtime/components/prose/CodePreview.vue index 99617fe9c3..c2a8348773 100644 --- a/src/runtime/components/prose/CodePreview.vue +++ b/src/runtime/components/prose/CodePreview.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/CodeTree.vue b/src/runtime/components/prose/CodeTree.vue index d999ba1c1a..fc4d3ceea8 100644 --- a/src/runtime/components/prose/CodeTree.vue +++ b/src/runtime/components/prose/CodeTree.vue @@ -1,8 +1,8 @@ @@ -65,7 +65,11 @@ const flatItems = computed<{ }[]>(() => { // eslint-disable-next-line @typescript-eslint/no-unused-expressions rerenderCount.value - return slots.default?.()?.flatMap(transformSlot).filter(Boolean) || [] + let children = slots.default?.() + if (!Array.isArray(children)) { + children = [children] + } + return children?.flatMap(transformSlot).filter(Boolean) || [] }) const items = computed(() => buildTree(flatItems.value)) diff --git a/src/runtime/components/prose/Collapsible.vue b/src/runtime/components/prose/Collapsible.vue index 9f5ded2799..c28f485dcd 100644 --- a/src/runtime/components/prose/Collapsible.vue +++ b/src/runtime/components/prose/Collapsible.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/prose/Em.vue b/src/runtime/components/prose/Em.vue index 1f393af4c9..b786f90550 100644 --- a/src/runtime/components/prose/Em.vue +++ b/src/runtime/components/prose/Em.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Field.vue b/src/runtime/components/prose/Field.vue index 950853a555..925d0ac9a3 100644 --- a/src/runtime/components/prose/Field.vue +++ b/src/runtime/components/prose/Field.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/FieldGroup.vue b/src/runtime/components/prose/FieldGroup.vue index c4db324ef4..3ad2a765e3 100644 --- a/src/runtime/components/prose/FieldGroup.vue +++ b/src/runtime/components/prose/FieldGroup.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/H1.vue b/src/runtime/components/prose/H1.vue index a32e19fb7a..8c64128aba 100644 --- a/src/runtime/components/prose/H1.vue +++ b/src/runtime/components/prose/H1.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/H2.vue b/src/runtime/components/prose/H2.vue index 742166c6d3..22e7c3e1fb 100644 --- a/src/runtime/components/prose/H2.vue +++ b/src/runtime/components/prose/H2.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/prose/H3.vue b/src/runtime/components/prose/H3.vue index 2f2cce6250..c35fde84a2 100644 --- a/src/runtime/components/prose/H3.vue +++ b/src/runtime/components/prose/H3.vue @@ -1,8 +1,8 @@ diff --git a/src/runtime/components/prose/H4.vue b/src/runtime/components/prose/H4.vue index b02e7eb19b..3d8c4c5e98 100644 --- a/src/runtime/components/prose/H4.vue +++ b/src/runtime/components/prose/H4.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Li.vue b/src/runtime/components/prose/Li.vue index 30956040ef..6ab3ebd69f 100644 --- a/src/runtime/components/prose/Li.vue +++ b/src/runtime/components/prose/Li.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Ol.vue b/src/runtime/components/prose/Ol.vue index f81ec7be71..841b49d233 100644 --- a/src/runtime/components/prose/Ol.vue +++ b/src/runtime/components/prose/Ol.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/P.vue b/src/runtime/components/prose/P.vue index 0308481f4e..084da3097c 100644 --- a/src/runtime/components/prose/P.vue +++ b/src/runtime/components/prose/P.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Pre.vue b/src/runtime/components/prose/Pre.vue index ef5d37ff78..c52b40f601 100644 --- a/src/runtime/components/prose/Pre.vue +++ b/src/runtime/components/prose/Pre.vue @@ -1,9 +1,9 @@ diff --git a/src/runtime/components/prose/Steps.vue b/src/runtime/components/prose/Steps.vue index 20a81cd4a6..06e63f7021 100644 --- a/src/runtime/components/prose/Steps.vue +++ b/src/runtime/components/prose/Steps.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Strong.vue b/src/runtime/components/prose/Strong.vue index d64958adba..15377431a3 100644 --- a/src/runtime/components/prose/Strong.vue +++ b/src/runtime/components/prose/Strong.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Table.vue b/src/runtime/components/prose/Table.vue index a84363ac37..8ca15da008 100644 --- a/src/runtime/components/prose/Table.vue +++ b/src/runtime/components/prose/Table.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Tabs.vue b/src/runtime/components/prose/Tabs.vue index a48f11f86e..1438d95041 100644 --- a/src/runtime/components/prose/Tabs.vue +++ b/src/runtime/components/prose/Tabs.vue @@ -1,9 +1,9 @@ @@ -59,7 +59,11 @@ const items = computed<{ }[]>(() => { // eslint-disable-next-line @typescript-eslint/no-unused-expressions rerenderCount.value - return slots.default?.()?.flatMap(transformSlot).filter(Boolean) || [] + let children = slots.default?.() + if (!Array.isArray(children)) { + children = [children] + } + return children?.flatMap(transformSlot).filter(Boolean) || [] }) function transformSlot(slot: any, index: number) { diff --git a/src/runtime/components/prose/TabsItem.vue b/src/runtime/components/prose/TabsItem.vue index 71c9e49684..32445c35fc 100644 --- a/src/runtime/components/prose/TabsItem.vue +++ b/src/runtime/components/prose/TabsItem.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Tbody.vue b/src/runtime/components/prose/Tbody.vue index d80ce199c1..4bb3164a0a 100644 --- a/src/runtime/components/prose/Tbody.vue +++ b/src/runtime/components/prose/Tbody.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Td.vue b/src/runtime/components/prose/Td.vue index b436af76fa..760abb50ef 100644 --- a/src/runtime/components/prose/Td.vue +++ b/src/runtime/components/prose/Td.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Th.vue b/src/runtime/components/prose/Th.vue index 38b70c0caa..5e9e169184 100644 --- a/src/runtime/components/prose/Th.vue +++ b/src/runtime/components/prose/Th.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Thead.vue b/src/runtime/components/prose/Thead.vue index c52fde4c84..b64b645f30 100644 --- a/src/runtime/components/prose/Thead.vue +++ b/src/runtime/components/prose/Thead.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Tr.vue b/src/runtime/components/prose/Tr.vue index 3392634ca4..a50468b597 100644 --- a/src/runtime/components/prose/Tr.vue +++ b/src/runtime/components/prose/Tr.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/components/prose/Ul.vue b/src/runtime/components/prose/Ul.vue index 88aa61b4f1..1e7a9e2d9d 100644 --- a/src/runtime/components/prose/Ul.vue +++ b/src/runtime/components/prose/Ul.vue @@ -1,7 +1,7 @@ diff --git a/src/runtime/inertia/components/Link.vue b/src/runtime/inertia/components/Link.vue index a341a8e3e7..b813df89ce 100644 --- a/src/runtime/inertia/components/Link.vue +++ b/src/runtime/inertia/components/Link.vue @@ -1,9 +1,10 @@ diff --git a/src/runtime/types/utils.ts b/src/runtime/types/utils.ts index 7605063297..d1c1468b4e 100644 --- a/src/runtime/types/utils.ts +++ b/src/runtime/types/utils.ts @@ -5,6 +5,9 @@ export type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P] | undefined } +export type MaybeArray = T | T[] +export type SlotsReturn = MaybeArray + export type DynamicSlotsKeys = ( Name extends string ? Suffix extends string @@ -19,7 +22,7 @@ export type DynamicSlots< > = { [K in DynamicSlotsKeys]?: ( props: { item: Extract } & ExtraProps - ) => VNode[] + ) => SlotsReturn } export type GetObjectField = MaybeObject extends Record diff --git a/src/runtime/vue/components/Link.vue b/src/runtime/vue/components/Link.vue index ddd4dc254c..cfd21e48eb 100644 --- a/src/runtime/vue/components/Link.vue +++ b/src/runtime/vue/components/Link.vue @@ -1,9 +1,10 @@ From c1d6eda3bff9c0ffd82f0e19f75d2e7f29269139 Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Thu, 16 Oct 2025 19:30:03 +0200 Subject: [PATCH 3/7] test: update slots tests --- test/components/Accordion.spec.ts | 2 +- test/components/Alert.spec.ts | 2 +- test/components/AuthForm.spec.ts | 2 +- test/components/AvatarGroup.spec.ts | 2 +- test/components/Badge.spec.ts | 2 +- test/components/Banner.spec.ts | 2 +- test/components/BlogPost.spec.ts | 2 +- test/components/BlogPosts.spec.ts | 2 +- test/components/Breadcrumb.spec.ts | 2 +- test/components/Button.spec.ts | 2 +- test/components/Calendar.spec.ts | 6 +++--- test/components/Card.spec.ts | 2 +- test/components/Carousel.spec.ts | 2 +- test/components/ChangelogVersion.spec.ts | 2 +- test/components/ChangelogVersions.spec.ts | 2 +- test/components/ChatMessage.spec.ts | 2 +- test/components/ChatMessages.spec.ts | 2 +- test/components/ChatPalette.spec.ts | 2 +- test/components/ChatPrompt.spec.ts | 2 +- test/components/Checkbox.spec.ts | 2 +- test/components/CheckboxGroup.spec.ts | 2 +- test/components/Chip.spec.ts | 2 +- test/components/Collapsible.spec.ts | 2 +- test/components/CommandPalette.spec.ts | 2 +- test/components/Container.spec.ts | 2 +- test/components/ContextMenu.spec.ts | 2 +- test/components/DashboardGroup.spec.ts | 2 +- test/components/DashboardNavbar.spec.ts | 8 ++++---- test/components/DashboardPanel.spec.ts | 8 ++++---- test/components/DashboardResizeHandle.spec.ts | 8 ++++---- test/components/DashboardSidebar.spec.ts | 8 ++++---- test/components/DashboardToolbar.spec.ts | 2 +- test/components/Drawer.spec.ts | 2 +- test/components/DropdownMenu.spec.ts | 2 +- test/components/Empty.spec.ts | 2 +- test/components/Error.spec.ts | 2 +- test/components/FieldGroup.spec.ts | 2 +- test/components/FileUpload.spec.ts | 2 +- test/components/Footer.spec.ts | 2 +- test/components/FooterColumns.spec.ts | 2 +- test/components/Form.spec.ts | 2 +- test/components/FormField.spec.ts | 2 +- test/components/Header.spec.ts | 2 +- test/components/Input.spec.ts | 2 +- test/components/InputMenu.spec.ts | 2 +- test/components/InputNumber.spec.ts | 2 +- test/components/InputTags.spec.ts | 2 +- test/components/Kbd.spec.ts | 2 +- test/components/Link.spec.ts | 2 +- test/components/Main.spec.ts | 2 +- test/components/Marquee.spec.ts | 2 +- test/components/Modal.spec.ts | 2 +- test/components/NavigationMenu.spec.ts | 2 +- test/components/PageAnchors.spec.ts | 2 +- test/components/PageBody.spec.ts | 2 +- test/components/PageCTA.spec.ts | 2 +- test/components/PageCard.spec.ts | 2 +- test/components/PageColumns.spec.ts | 2 +- test/components/PageFeature.spec.ts | 2 +- test/components/PageGrid.spec.ts | 2 +- test/components/PageHeader.spec.ts | 2 +- test/components/PageHero.spec.ts | 2 +- test/components/PageLinks.spec.ts | 2 +- test/components/PageList.spec.ts | 2 +- test/components/PageLogos.spec.ts | 2 +- test/components/PageSection.spec.ts | 2 +- test/components/Pagination.spec.ts | 2 +- test/components/PricingPlan.spec.ts | 2 +- test/components/PricingPlans.spec.ts | 2 +- test/components/PricingTable.spec.ts | 2 +- test/components/Progress.spec.ts | 2 +- test/components/RadioGroup.spec.ts | 2 +- test/components/Select.spec.ts | 2 +- test/components/SelectMenu.spec.ts | 2 +- test/components/Separator.spec.ts | 2 +- test/components/Slideover.spec.ts | 2 +- test/components/Stepper.spec.ts | 2 +- test/components/Switch.spec.ts | 2 +- test/components/Table.spec.ts | 2 +- test/components/Tabs.spec.ts | 2 +- test/components/Textarea.spec.ts | 2 +- test/components/Timeline.spec.ts | 2 +- test/components/Toast.spec.ts | 2 +- test/components/Tree.spec.ts | 2 +- test/components/User.spec.ts | 2 +- test/components/content/ContentNavigation.spec.ts | 2 +- test/components/content/ContentSurround.spec.ts | 2 +- test/components/content/ContentToc.spec.ts | 2 +- test/utils/types.ts | 2 +- 89 files changed, 103 insertions(+), 103 deletions(-) diff --git a/test/components/Accordion.spec.ts b/test/components/Accordion.spec.ts index 3e34131b05..7cc5f84a6e 100644 --- a/test/components/Accordion.spec.ts +++ b/test/components/Accordion.spec.ts @@ -60,7 +60,7 @@ describe('Accordion', () => { ['with body slot', { props: { ...props, modelValue: '1' }, slots: { body: () => 'Body slot' } }], ['with custom slot', { props: { ...props, modelValue: '5' }, slots: { custom: () => 'Custom slot' } }], ['with custom body slot', { props: { ...props, modelValue: '5' }, slots: { 'custom-body': () => 'Custom body slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AccordionProps, slots?: Partial 'Custom slot' } & { 'custom-body': () => 'Custom body slot' }> }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AccordionProps, slots?: AccordionSlots & { custom?: () => 'Custom slot' } & { 'custom-body'?: () => 'Custom body slot' } }) => { const html = await ComponentRender(nameOrHtml, options, Accordion) expect(html).toMatchSnapshot() }) diff --git a/test/components/Alert.spec.ts b/test/components/Alert.spec.ts index 905d096984..3cfde9184b 100644 --- a/test/components/Alert.spec.ts +++ b/test/components/Alert.spec.ts @@ -32,7 +32,7 @@ describe('Alert', () => { ['with title slot', { props, slots: { title: () => 'Title slot' } }], ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with close slot', { props, slots: { close: () => 'Close slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AlertProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AlertProps, slots?: AlertSlots }) => { const html = await ComponentRender(nameOrHtml, options, Alert) expect(html).toMatchSnapshot() }) diff --git a/test/components/AuthForm.spec.ts b/test/components/AuthForm.spec.ts index 0a3b46233a..6e6903880b 100644 --- a/test/components/AuthForm.spec.ts +++ b/test/components/AuthForm.spec.ts @@ -42,7 +42,7 @@ describe('AuthForm', () => { ['with validation slot', { props, slots: { validation: () => 'Validation' } }], ['with submit slot', { props, slots: { submit: () => 'Submit' } }], ['with footer slot', { props, slots: { footer: () => 'Footer' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props: AuthFormProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props: AuthFormProps, slots?: AuthFormSlots }) => { const html = await ComponentRender(nameOrHtml, options, AuthForm) expect(html).toMatchSnapshot() }) diff --git a/test/components/AvatarGroup.spec.ts b/test/components/AvatarGroup.spec.ts index 445f334263..2f0b7ed9b3 100644 --- a/test/components/AvatarGroup.spec.ts +++ b/test/components/AvatarGroup.spec.ts @@ -32,7 +32,7 @@ describe('AvatarGroup', () => { ['with ui', { props: { ui: { base: 'rounded-lg' } } }], // Slots ['with default slot', {}] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AvatarGroupProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AvatarGroupProps, slots?: AvatarGroupSlots }) => { const html = await ComponentRender(nameOrHtml, options, AvatarGroupWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/Badge.spec.ts b/test/components/Badge.spec.ts index c6f41cfc01..a4c18e3b4f 100644 --- a/test/components/Badge.spec.ts +++ b/test/components/Badge.spec.ts @@ -32,7 +32,7 @@ describe('Badge', () => { ['with default slot', { slots: { default: () => 'Default slot' } }], ['with leading slot', { slots: { leading: () => 'Leading slot' } }], ['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BadgeProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BadgeProps, slots?: BadgeSlots }) => { const html = await ComponentRender(nameOrHtml, options, Badge) expect(html).toMatchSnapshot() }) diff --git a/test/components/Banner.spec.ts b/test/components/Banner.spec.ts index 9c17feb3e9..7b252ebdb8 100644 --- a/test/components/Banner.spec.ts +++ b/test/components/Banner.spec.ts @@ -27,7 +27,7 @@ describe('Banner', () => { ['with title slot', { props, slots: { title: () => 'Title slot' } }], ['with actions slot', { props, slots: { actions: () => 'Actions slot' } }], ['with close slot', { props, slots: { close: () => 'Close slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BannerProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BannerProps, slots?: BannerSlots }) => { const html = await ComponentRender(nameOrHtml, options, Banner) expect(html).toMatchSnapshot() }) diff --git a/test/components/BlogPost.spec.ts b/test/components/BlogPost.spec.ts index 149dbd72b6..dc25b9187e 100644 --- a/test/components/BlogPost.spec.ts +++ b/test/components/BlogPost.spec.ts @@ -58,7 +58,7 @@ describe('BlogPost', () => { ['with header slot', { props, slots: { header: () => 'Header slot' } }], ['with body slot', { props, slots: { body: () => 'Body slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BlogPostProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BlogPostProps, slots?: BlogPostSlots }) => { const html = await ComponentRender(nameOrHtml, options, BlogPost) expect(html).toMatchSnapshot() }) diff --git a/test/components/BlogPosts.spec.ts b/test/components/BlogPosts.spec.ts index 92adc107ac..dd301571d4 100644 --- a/test/components/BlogPosts.spec.ts +++ b/test/components/BlogPosts.spec.ts @@ -33,7 +33,7 @@ describe('BlogPosts', () => { ['with class', { props: { ...props, class: 'gap-y-12' } }], // Slots ['with default slot', { props, slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BlogPostsProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BlogPostsProps, slots?: BlogPostsSlots }) => { const html = await ComponentRender(nameOrHtml, options, BlogPosts) expect(html).toMatchSnapshot() }) diff --git a/test/components/Breadcrumb.spec.ts b/test/components/Breadcrumb.spec.ts index 89194552d1..09b6b8b9e5 100644 --- a/test/components/Breadcrumb.spec.ts +++ b/test/components/Breadcrumb.spec.ts @@ -41,7 +41,7 @@ describe('Breadcrumb', () => { ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }], ['with separator slot', { props, slots: { separator: () => '/' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BreadcrumbProps, slots?: Partial 'Custom slot' }> }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BreadcrumbProps, slots?: BreadcrumbSlots & { custom?: () => 'Custom slot' } }) => { const html = await ComponentRender(nameOrHtml, options, Breadcrumb) expect(html).toMatchSnapshot() }) diff --git a/test/components/Button.spec.ts b/test/components/Button.spec.ts index 75afdf4f23..acc66867c3 100644 --- a/test/components/Button.spec.ts +++ b/test/components/Button.spec.ts @@ -46,7 +46,7 @@ describe('Button', () => { ['with default slot', { slots: { default: () => 'Default slot' } }], ['with leading slot', { slots: { leading: () => 'Leading slot' } }], ['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ButtonProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ButtonProps, slots?: ButtonSlots }) => { const html = await ComponentRender(nameOrHtml, options, Button) expect(html).toMatchSnapshot() }) diff --git a/test/components/Calendar.spec.ts b/test/components/Calendar.spec.ts index f3350fec4b..7298bfa94c 100644 --- a/test/components/Calendar.spec.ts +++ b/test/components/Calendar.spec.ts @@ -46,9 +46,9 @@ describe('Calendar', () => { ['with ui', { props: { ui: { header: 'gap-4' } } }], // Slots ['with heading slot', { slots: { heading: () => 'Heading' } }], - ['with day slot', { slots: { day: ({ day }: Parameters[0]) => day.day } }], - ['with week-day slot', { slots: { 'week-day': ({ day }: Parameters[0]) => day } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CalendarProps, slots?: Partial }) => { + ['with day slot', { slots: { day: ({ day }: Parameters['day']>[0]) => day.day } }], + ['with week-day slot', { slots: { 'week-day': ({ day }: Parameters['week-day']>[0]) => day } }] + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CalendarProps, slots?: CalendarSlots }) => { const html = await ComponentRender(nameOrHtml, options, Calendar) expect(html).toMatchSnapshot() }) diff --git a/test/components/Card.spec.ts b/test/components/Card.spec.ts index f537d74aed..ea4a75ca4f 100644 --- a/test/components/Card.spec.ts +++ b/test/components/Card.spec.ts @@ -19,7 +19,7 @@ describe('Card', () => { ['with default slot', { slots: { default: () => 'Default slot' } }], ['with header slot', { slots: { header: () => 'Header slot' } }], ['with footer slot', { slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CardProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CardProps, slots?: CardSlots }) => { const html = await ComponentRender(nameOrHtml, options, Card) expect(html).toMatchSnapshot() }) diff --git a/test/components/Carousel.spec.ts b/test/components/Carousel.spec.ts index bb499e354c..091a5e4f14 100644 --- a/test/components/Carousel.spec.ts +++ b/test/components/Carousel.spec.ts @@ -40,7 +40,7 @@ describe('Carousel', () => { ['with as', { props: { ...props, as: 'nav' } }], ['with class', { props: { ...props, class: 'w-full max-w-xs' } }], ['with ui', { props: { ...props, ui: { viewport: 'h-[320px]' } } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CarouselProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CarouselProps, slots?: CarouselSlots }) => { const html = await ComponentRender(nameOrHtml, options, CarouselWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/ChangelogVersion.spec.ts b/test/components/ChangelogVersion.spec.ts index 60a895f5f8..14584d0cee 100644 --- a/test/components/ChangelogVersion.spec.ts +++ b/test/components/ChangelogVersion.spec.ts @@ -35,7 +35,7 @@ describe('ChangelogVersion', () => { ['with authors slot', { slots: { authors: () => 'Authors slot' } }], ['with actions slot', { slots: { actions: () => 'Actions slot' } }], ['with indicator slot', { slots: { indicator: () => 'Indicator slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChangelogVersionProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChangelogVersionProps, slots?: ChangelogVersionSlots }) => { const html = await ComponentRender(nameOrHtml, options, ChangelogVersion) expect(html).toMatchSnapshot() }) diff --git a/test/components/ChangelogVersions.spec.ts b/test/components/ChangelogVersions.spec.ts index 4a3adac132..cc21d2fc5b 100644 --- a/test/components/ChangelogVersions.spec.ts +++ b/test/components/ChangelogVersions.spec.ts @@ -36,7 +36,7 @@ describe('ChangelogVersions', () => { // Slots ['with default slot', { props, slots: { default: () => 'Default slot' } }], ['with indicator slot', { props, slots: { indicator: () => 'Indicator slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChangelogVersionsProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChangelogVersionsProps, slots?: ChangelogVersionsSlots }) => { const html = await ComponentRender(nameOrHtml, options, ChangelogVersions) expect(html).toMatchSnapshot() }) diff --git a/test/components/ChatMessage.spec.ts b/test/components/ChatMessage.spec.ts index a25ae09a52..700ffe7f4e 100644 --- a/test/components/ChatMessage.spec.ts +++ b/test/components/ChatMessage.spec.ts @@ -29,7 +29,7 @@ describe('ChatMessage', () => { ['with ui', { props: { ...props, ui: {} } }], // Slots ['with content slot', { props, slots: { content: () => 'Content slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatMessageProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatMessageProps, slots?: ChatMessageSlots }) => { const html = await ComponentRender(nameOrHtml, options, ChatMessage) expect(html).toMatchSnapshot() }) diff --git a/test/components/ChatMessages.spec.ts b/test/components/ChatMessages.spec.ts index e46a595512..add45b1334 100644 --- a/test/components/ChatMessages.spec.ts +++ b/test/components/ChatMessages.spec.ts @@ -34,7 +34,7 @@ describe('ChatMessages', () => { ['with indicator slot', { props: { ...props, status: 'submitted' }, slots: { indicator: () => 'Indicator slot' } }], ['with viewport slot', { props, slots: { viewport: () => 'Viewport slot' } }], ['with content slot', { props, slots: { content: () => 'Content slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatMessagesProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatMessagesProps, slots?: ChatMessagesSlots }) => { const html = await ComponentRender(nameOrHtml, options, ChatMessages) expect(html).toMatchSnapshot() }) diff --git a/test/components/ChatPalette.spec.ts b/test/components/ChatPalette.spec.ts index c7f7aca12b..e3cdfbed0f 100644 --- a/test/components/ChatPalette.spec.ts +++ b/test/components/ChatPalette.spec.ts @@ -14,7 +14,7 @@ describe('ChatPalette', () => { // Slots ['with default slot', { slots: { default: () => 'Default slot' } }], ['with prompt slot', { slots: { prompt: () => 'Prompt slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatPaletteProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatPaletteProps, slots?: ChatPaletteSlots }) => { const html = await ComponentRender(nameOrHtml, options, ChatPalette) expect(html).toMatchSnapshot() }) diff --git a/test/components/ChatPrompt.spec.ts b/test/components/ChatPrompt.spec.ts index d5da2a105c..bfdda28c4e 100644 --- a/test/components/ChatPrompt.spec.ts +++ b/test/components/ChatPrompt.spec.ts @@ -20,7 +20,7 @@ describe('ChatPrompt', () => { // Slots ['with header slot', { slots: { header: () => 'Header slot' } }], ['with footer slot', { slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatPromptProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatPromptProps, slots?: ChatPromptSlots }) => { const html = await ComponentRender(nameOrHtml, options, ChatPrompt) expect(html).toMatchSnapshot() }) diff --git a/test/components/Checkbox.spec.ts b/test/components/Checkbox.spec.ts index d06809b166..5349b75513 100644 --- a/test/components/Checkbox.spec.ts +++ b/test/components/Checkbox.spec.ts @@ -39,7 +39,7 @@ describe('Checkbox', () => { // Slots ['with label slot', { slots: { label: () => 'Label slot' } }], ['with description slot', { slots: { label: () => 'Description slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps, slots?: CheckboxSlots }) => { const html = await ComponentRender(nameOrHtml, options, Checkbox) expect(html).toMatchSnapshot() }) diff --git a/test/components/CheckboxGroup.spec.ts b/test/components/CheckboxGroup.spec.ts index 356cbe435b..59f319523f 100644 --- a/test/components/CheckboxGroup.spec.ts +++ b/test/components/CheckboxGroup.spec.ts @@ -46,7 +46,7 @@ describe('CheckboxGroup', () => { ['with legend slot', { props, slots: { legend: () => 'Legend slot' } }], ['with label slot', { props, slots: { label: () => 'Label slot' } }], ['with description slot', { props, slots: { description: () => 'Description slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxGroupProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxGroupProps, slots?: CheckboxGroupSlots }) => { const html = await ComponentRender(nameOrHtml, options, CheckboxGroup) expect(html).toMatchSnapshot() }) diff --git a/test/components/Chip.spec.ts b/test/components/Chip.spec.ts index 27cfb7fd37..207f67d317 100644 --- a/test/components/Chip.spec.ts +++ b/test/components/Chip.spec.ts @@ -24,7 +24,7 @@ describe('Chip', () => { // Slots ['with default slot', { slots: { default: () => 'Default slot' } }], ['with content slot', { slots: { content: () => 'Content slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChipProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChipProps, slots?: ChipSlots }) => { const html = await ComponentRender(nameOrHtml, options, Chip) expect(html).toMatchSnapshot() }) diff --git a/test/components/Collapsible.spec.ts b/test/components/Collapsible.spec.ts index ae004ed453..30066c745e 100644 --- a/test/components/Collapsible.spec.ts +++ b/test/components/Collapsible.spec.ts @@ -19,7 +19,7 @@ describe('Collapsible', () => { // Slots ['with default slot', { props, slots: { default: () => 'Default slot' } }], ['with content slot', { props, slots: { content: () => 'Content slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CollapsibleProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CollapsibleProps, slots?: CollapsibleSlots }) => { const html = await ComponentRender(nameOrHtml, options, Collapsible) expect(html).toMatchSnapshot() }) diff --git a/test/components/CommandPalette.spec.ts b/test/components/CommandPalette.spec.ts index 8881b28fc2..c090231c39 100644 --- a/test/components/CommandPalette.spec.ts +++ b/test/components/CommandPalette.spec.ts @@ -95,7 +95,7 @@ describe('CommandPalette', () => { ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }], ['with close slot', { props: { ...props, close: true }, slots: { close: () => 'Close slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CommandPaletteProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CommandPaletteProps, slots?: CommandPaletteSlots }) => { const html = await ComponentRender(nameOrHtml, options, CommandPalette) expect(html).toMatchSnapshot() }) diff --git a/test/components/Container.spec.ts b/test/components/Container.spec.ts index 05fdc3474f..9cbf9fe43c 100644 --- a/test/components/Container.spec.ts +++ b/test/components/Container.spec.ts @@ -12,7 +12,7 @@ describe('Container', () => { ['with class', { props: { class: 'max-w-5xl' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContainerProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContainerProps, slots?: ContainerSlots }) => { const html = await ComponentRender(nameOrHtml, options, Container) expect(html).toMatchSnapshot() }) diff --git a/test/components/ContextMenu.spec.ts b/test/components/ContextMenu.spec.ts index e72551f604..b1fbc96b2d 100644 --- a/test/components/ContextMenu.spec.ts +++ b/test/components/ContextMenu.spec.ts @@ -98,7 +98,7 @@ describe('ContextMenu', () => { ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContextMenuProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContextMenuProps, slots?: ContextMenuSlots }) => { const wrapper = await mountSuspended(ContextMenuWrapper, options as any) await wrapper.find('span').trigger('click.right') diff --git a/test/components/DashboardGroup.spec.ts b/test/components/DashboardGroup.spec.ts index da5a890533..8efd1bc935 100644 --- a/test/components/DashboardGroup.spec.ts +++ b/test/components/DashboardGroup.spec.ts @@ -12,7 +12,7 @@ describe('DashboardGroup', () => { ['with class', { props: { class: 'inset-4' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DashboardGroupProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DashboardGroupProps, slots?: DashboardGroupSlots }) => { const html = await ComponentRender(nameOrHtml, options, DashboardGroup) expect(html).toMatchSnapshot() }) diff --git a/test/components/DashboardNavbar.spec.ts b/test/components/DashboardNavbar.spec.ts index bda472cf02..3cc9b73a15 100644 --- a/test/components/DashboardNavbar.spec.ts +++ b/test/components/DashboardNavbar.spec.ts @@ -4,12 +4,12 @@ import { axe } from 'vitest-axe' import { mountSuspended } from '@nuxt/test-utils/runtime' import DashboardGroup from '../../src/runtime/components/DashboardGroup.vue' import DashboardNavbar from '../../src/runtime/components/DashboardNavbar.vue' -import type { DashboardNavbarProps, DashboardNavbarSlots } from '../../src/runtime/components/DashboardNavbar.vue' +import type { DashboardNavbarProps } from '../../src/runtime/components/DashboardNavbar.vue' const DashboardWrapper = defineComponent({ components: { - UDashboardGroup: DashboardGroup as any, - UDashboardNavbar: DashboardNavbar as any + UDashboardGroup: DashboardGroup, + UDashboardNavbar: DashboardNavbar }, inheritAttrs: false, template: ` @@ -40,7 +40,7 @@ describe('DashboardNavbar', () => { ['with default slot', { slots: { default: () => 'Default slot' } }], ['with right slot', { slots: { right: () => 'Right slot' } }], ['with toggle slot', { slots: { toggle: () => 'Toggle slot' } }] - ])('renders %s correctly', async (_: string, options: { props?: DashboardNavbarProps, slots?: Partial }) => { + ])('renders %s correctly', async (_: string, options: { props?: DashboardNavbarProps, slots?: typeof DashboardWrapper['slots'] }) => { const wrapper = await mountSuspended(DashboardWrapper, options) expect(wrapper.html()).toMatchSnapshot() }) diff --git a/test/components/DashboardPanel.spec.ts b/test/components/DashboardPanel.spec.ts index db1d98e8e1..ef50a20a4c 100644 --- a/test/components/DashboardPanel.spec.ts +++ b/test/components/DashboardPanel.spec.ts @@ -4,12 +4,12 @@ import { axe } from 'vitest-axe' import { mountSuspended } from '@nuxt/test-utils/runtime' import DashboardGroup from '../../src/runtime/components/DashboardGroup.vue' import DashboardPanel from '../../src/runtime/components/DashboardPanel.vue' -import type { DashboardPanelProps, DashboardPanelSlots } from '../../src/runtime/components/DashboardPanel.vue' +import type { DashboardPanelProps } from '../../src/runtime/components/DashboardPanel.vue' const DashboardWrapper = defineComponent({ components: { - UDashboardGroup: DashboardGroup as any, - UDashboardPanel: DashboardPanel as any + UDashboardGroup: DashboardGroup, + UDashboardPanel: DashboardPanel }, inheritAttrs: false, template: ` @@ -37,7 +37,7 @@ describe('DashboardPanel', () => { ['with header slot', { slots: { header: () => 'Header slot' } }], ['with footer slot', { slots: { footer: () => 'Footer slot' } }], ['with resize-handle slot', { slots: { 'resize-handle': () => 'Resize handle slot' } }] - ])('renders %s correctly', async (_: string, options: { props?: DashboardPanelProps, slots?: Partial }) => { + ])('renders %s correctly', async (_: string, options: { props?: DashboardPanelProps, slots?: typeof DashboardWrapper['slots'] }) => { const wrapper = await mountSuspended(DashboardWrapper, options) expect(wrapper.html()).toMatchSnapshot() }) diff --git a/test/components/DashboardResizeHandle.spec.ts b/test/components/DashboardResizeHandle.spec.ts index 354864a0c6..adbb747807 100644 --- a/test/components/DashboardResizeHandle.spec.ts +++ b/test/components/DashboardResizeHandle.spec.ts @@ -4,12 +4,12 @@ import { axe } from 'vitest-axe' import { mountSuspended } from '@nuxt/test-utils/runtime' import DashboardGroup from '../../src/runtime/components/DashboardGroup.vue' import DashboardResizeHandle from '../../src/runtime/components/DashboardResizeHandle.vue' -import type { DashboardResizeHandleProps, DashboardResizeHandleSlots } from '../../src/runtime/components/DashboardResizeHandle.vue' +import type { DashboardResizeHandleProps } from '../../src/runtime/components/DashboardResizeHandle.vue' const DashboardWrapper = defineComponent({ components: { - UDashboardGroup: DashboardGroup as any, - UDashboardResizeHandle: DashboardResizeHandle as any + UDashboardGroup: DashboardGroup, + UDashboardResizeHandle: DashboardResizeHandle }, inheritAttrs: false, template: ` @@ -28,7 +28,7 @@ describe('DashboardResizeHandle', () => { ['with class', { props: { class: 'absolute' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (_: string, options: { props?: DashboardResizeHandleProps, slots?: Partial }) => { + ])('renders %s correctly', async (_: string, options: { props?: DashboardResizeHandleProps, slots?: typeof DashboardWrapper['slots'] }) => { const wrapper = await mountSuspended(DashboardWrapper, options) expect(wrapper.html()).toMatchSnapshot() }) diff --git a/test/components/DashboardSidebar.spec.ts b/test/components/DashboardSidebar.spec.ts index 4451a5e12c..d0772bba33 100644 --- a/test/components/DashboardSidebar.spec.ts +++ b/test/components/DashboardSidebar.spec.ts @@ -4,12 +4,12 @@ import { axe } from 'vitest-axe' import { mountSuspended } from '@nuxt/test-utils/runtime' import DashboardGroup from '../../src/runtime/components/DashboardGroup.vue' import DashboardSidebar from '../../src/runtime/components/DashboardSidebar.vue' -import type { DashboardSidebarProps, DashboardSidebarSlots } from '../../src/runtime/components/DashboardSidebar.vue' +import type { DashboardSidebarProps } from '../../src/runtime/components/DashboardSidebar.vue' const DashboardWrapper = defineComponent({ components: { - UDashboardGroup: DashboardGroup as any, - UDashboardSidebar: DashboardSidebar as any + UDashboardGroup: DashboardGroup, + UDashboardSidebar: DashboardSidebar }, inheritAttrs: false, template: ` @@ -47,7 +47,7 @@ describe('DashboardSidebar', () => { ['with toggle slot', { slots: { toggle: () => 'Toggle slot' } }], ['with content slot', { slots: { content: () => 'Content slot' } }], ['with resize-handle slot', { slots: { 'resize-handle': () => 'Resize handle slot' } }] - ])('renders %s correctly', async (_: string, options: { props?: DashboardSidebarProps, slots?: Partial }) => { + ])('renders %s correctly', async (_: string, options: { props?: DashboardSidebarProps, slots?: typeof DashboardWrapper['slots'] }) => { const wrapper = await mountSuspended(DashboardWrapper, options) expect(wrapper.html()).toMatchSnapshot() }) diff --git a/test/components/DashboardToolbar.spec.ts b/test/components/DashboardToolbar.spec.ts index 1b9d7b9d15..9d79391f16 100644 --- a/test/components/DashboardToolbar.spec.ts +++ b/test/components/DashboardToolbar.spec.ts @@ -15,7 +15,7 @@ describe('DashboardToolbar', () => { ['with default slot', { slots: { default: (): string => 'Default slot' } }], ['with left slot', { slots: { left: (): string => 'Left slot' } }], ['with right slot', { slots: { right: (): string => 'Right slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DashboardToolbarProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DashboardToolbarProps, slots?: DashboardToolbarSlots }) => { const html = await ComponentRender(nameOrHtml, options, DashboardToolbar) expect(html).toMatchSnapshot() }) diff --git a/test/components/Drawer.spec.ts b/test/components/Drawer.spec.ts index 892cf9d4cf..4870e422c2 100644 --- a/test/components/Drawer.spec.ts +++ b/test/components/Drawer.spec.ts @@ -29,7 +29,7 @@ describe('Drawer', () => { ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with body slot', { props, slots: { body: () => 'Body slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DrawerProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DrawerProps, slots?: DrawerSlots }) => { const html = await ComponentRender(nameOrHtml, options, Drawer) expect(html).toMatchSnapshot() }) diff --git a/test/components/DropdownMenu.spec.ts b/test/components/DropdownMenu.spec.ts index 6e289fa63c..ba020f24fe 100644 --- a/test/components/DropdownMenu.spec.ts +++ b/test/components/DropdownMenu.spec.ts @@ -110,7 +110,7 @@ describe('DropdownMenu', () => { ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DropdownMenuProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DropdownMenuProps, slots?: DropdownMenuSlots }) => { const html = await ComponentRender(nameOrHtml, options, DropdownMenu) expect(html).toMatchSnapshot() }) diff --git a/test/components/Empty.spec.ts b/test/components/Empty.spec.ts index 4bf95ff669..4758e2b84b 100644 --- a/test/components/Empty.spec.ts +++ b/test/components/Empty.spec.ts @@ -37,7 +37,7 @@ describe('Empty', () => { ['with body slot', { props, slots: { body: () => 'Body slot' } }], ['with actions slot', { props, slots: { actions: () => 'Actions slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: EmptyProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: EmptyProps, slots?: EmptySlots }) => { const html = await ComponentRender(nameOrHtml, options, Empty) expect(html).toMatchSnapshot() }) diff --git a/test/components/Error.spec.ts b/test/components/Error.spec.ts index f62383f9a4..e704b4b991 100644 --- a/test/components/Error.spec.ts +++ b/test/components/Error.spec.ts @@ -28,7 +28,7 @@ describe('Error', () => { ['with statusMessage slot', { props, slots: { statusMessage: () => 'Status message slot' } }], ['with message slot', { props, slots: { message: () => 'Message slot' } }], ['with links slot', { props, slots: { links: () => 'Links slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ErrorProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ErrorProps, slots?: ErrorSlots }) => { const html = await ComponentRender(nameOrHtml, options, Error) expect(html).toMatchSnapshot() }) diff --git a/test/components/FieldGroup.spec.ts b/test/components/FieldGroup.spec.ts index 1b4f02f0b1..15649b574b 100644 --- a/test/components/FieldGroup.spec.ts +++ b/test/components/FieldGroup.spec.ts @@ -43,7 +43,7 @@ describe('FieldGroup', () => { } }] ) - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FieldGroupProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FieldGroupProps, slots?: FieldGroupSlots }) => { const html = await ComponentRender(nameOrHtml, options, FieldGroup) expect(html).toMatchSnapshot() }) diff --git a/test/components/FileUpload.spec.ts b/test/components/FileUpload.spec.ts index 84b3ea6e03..d1b13f5f96 100644 --- a/test/components/FileUpload.spec.ts +++ b/test/components/FileUpload.spec.ts @@ -86,7 +86,7 @@ describe('FileUpload', () => { ['with file-name slot', { props, slots: { 'file-name': () => 'File name slot' } }], ['with file-size slot', { props, slots: { 'file-size': () => 'File size slot' } }], ['with file-trailing slot', { props, slots: { 'file-trailing': () => 'File trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FileUploadProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FileUploadProps, slots?: FileUploadSlots }) => { const html = await ComponentRender(nameOrHtml, options, FileUpload) expect(html).toMatchSnapshot() }) diff --git a/test/components/Footer.spec.ts b/test/components/Footer.spec.ts index 44b9b6e82e..a8c2066251 100644 --- a/test/components/Footer.spec.ts +++ b/test/components/Footer.spec.ts @@ -17,7 +17,7 @@ describe('Footer', () => { ['with right slot', { slots: { right: () => 'Right slot' } }], ['with top slot', { slots: { top: () => 'Top slot' } }], ['with bottom slot', { slots: { bottom: () => 'Bottom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FooterProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FooterProps, slots?: FooterSlots }) => { const html = await ComponentRender(nameOrHtml, options, Footer) expect(html).toMatchSnapshot() }) diff --git a/test/components/FooterColumns.spec.ts b/test/components/FooterColumns.spec.ts index 2bb098f662..c8d85c6814 100644 --- a/test/components/FooterColumns.spec.ts +++ b/test/components/FooterColumns.spec.ts @@ -71,7 +71,7 @@ describe('FooterColumns', () => { ['with link-leading slot', { props, slots: { 'link-leading': () => 'Link leading slot' } }], ['with link-label slot', { props, slots: { 'link-label': () => 'Link label slot' } }], ['with link-trailing slot', { props, slots: { 'link-trailing': () => 'Link trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FooterColumnsProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FooterColumnsProps, slots?: FooterColumnsSlots }) => { const html = await ComponentRender(nameOrHtml, options, FooterColumns) expect(html).toMatchSnapshot() }) diff --git a/test/components/Form.spec.ts b/test/components/Form.spec.ts index b54776b4ac..4156603fc6 100644 --- a/test/components/Form.spec.ts +++ b/test/components/Form.spec.ts @@ -16,7 +16,7 @@ describe('Form', () => { it.each([ ['with state', { props: { state: {} } }], ['with default slot', { props: { state: {} }, slots: { default: () => 'Form slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props: FormProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props: FormProps, slots?: FormSlots }) => { const html = await ComponentRender(nameOrHtml, options, UForm) expect(html).toMatchSnapshot() }) diff --git a/test/components/FormField.spec.ts b/test/components/FormField.spec.ts index feaef220fe..11ee5e39e2 100644 --- a/test/components/FormField.spec.ts +++ b/test/components/FormField.spec.ts @@ -80,7 +80,7 @@ describe('FormField', () => { ['with error slot', { slots: { error: () => 'Error slot' } }], ['with hint slot', { slots: { hint: () => 'Hint slot' } }], ['with help slot', { slots: { help: () => 'Help slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FormFieldProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FormFieldProps, slots?: FormFieldSlots }) => { const html = await ComponentRender(nameOrHtml, options, FormFieldWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/Header.spec.ts b/test/components/Header.spec.ts index 4694573078..827e1262b0 100644 --- a/test/components/Header.spec.ts +++ b/test/components/Header.spec.ts @@ -29,7 +29,7 @@ describe('Header', () => { ['with bottom slot', { slots: { bottom: () => 'Bottom slot' } }], ['with body slot', { slots: { body: () => 'Body slot' } }], ['with content slot', { slots: { content: () => 'Content slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: HeaderProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: HeaderProps, slots?: HeaderSlots }) => { const html = await ComponentRender(nameOrHtml, options, Header) expect(html).toMatchSnapshot() }) diff --git a/test/components/Input.spec.ts b/test/components/Input.spec.ts index 1ce15ce135..df2b3d7656 100644 --- a/test/components/Input.spec.ts +++ b/test/components/Input.spec.ts @@ -46,7 +46,7 @@ describe('Input', () => { ['with default slot', { slots: { default: () => 'Default slot' } }], ['with leading slot', { slots: { leading: () => 'Leading slot' } }], ['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: InputSlots }) => { const html = await ComponentRender(nameOrHtml, options, Input) expect(html).toMatchSnapshot() }) diff --git a/test/components/InputMenu.spec.ts b/test/components/InputMenu.spec.ts index 44067bd90d..6fd05232c2 100644 --- a/test/components/InputMenu.spec.ts +++ b/test/components/InputMenu.spec.ts @@ -85,7 +85,7 @@ describe('InputMenu', () => { ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with create-item-label slot', { props: { ...props, searchTerm: 'New value', createItem: true }, slots: { 'create-item-label': () => 'Create item slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputMenuProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputMenuProps, slots?: InputMenuSlots }) => { const html = await ComponentRender(nameOrHtml, options, InputMenu) expect(html).toMatchSnapshot() }) diff --git a/test/components/InputNumber.spec.ts b/test/components/InputNumber.spec.ts index ff56016866..42f77b5ffa 100644 --- a/test/components/InputNumber.spec.ts +++ b/test/components/InputNumber.spec.ts @@ -34,7 +34,7 @@ describe('InputNumber', () => { // Slots ['with increment slot', { slots: { increment: () => '+' } }], ['with decrement slot', { slots: { decrement: () => '-' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputNumberProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputNumberProps, slots?: InputNumberSlots }) => { const html = await ComponentRender(nameOrHtml, options, InputNumber) expect(html).toMatchSnapshot() }) diff --git a/test/components/InputTags.spec.ts b/test/components/InputTags.spec.ts index 13baa12fca..cfe53395b0 100644 --- a/test/components/InputTags.spec.ts +++ b/test/components/InputTags.spec.ts @@ -38,7 +38,7 @@ describe('InputTags', () => { ['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }], ['with item-text slot', { slots: { ['item-text']: () => 'Item Text slot' } }], ['with item-delete slot', { slots: { ['item-delete']: () => 'Item Delete slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputTagsProps, slots?: Partial, attrs?: Record }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputTagsProps, slots?: InputTagsSlots, attrs?: Record }) => { const html = await ComponentRender(nameOrHtml, options, InputTags) expect(html).toMatchSnapshot() }) diff --git a/test/components/Kbd.spec.ts b/test/components/Kbd.spec.ts index 1fa369011e..46df3129e1 100644 --- a/test/components/Kbd.spec.ts +++ b/test/components/Kbd.spec.ts @@ -20,7 +20,7 @@ describe('Kbd', () => { ['with class', { props: { value: 'K', class: 'font-bold' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: KbdProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: KbdProps, slots?: KbdSlots }) => { const html = await ComponentRender(nameOrHtml, options, Kbd) expect(html).toMatchSnapshot() }) diff --git a/test/components/Link.spec.ts b/test/components/Link.spec.ts index f7c2d6a670..ece742bf13 100644 --- a/test/components/Link.spec.ts +++ b/test/components/Link.spec.ts @@ -20,7 +20,7 @@ describe('Link', () => { ['with class', { props: { class: 'font-medium' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: LinkProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: LinkProps, slots?: LinkSlots }) => { const html = await ComponentRender(nameOrHtml, options, Link) expect(html).toMatchSnapshot() }) diff --git a/test/components/Main.spec.ts b/test/components/Main.spec.ts index d9a4ce91d9..3bb37531dd 100644 --- a/test/components/Main.spec.ts +++ b/test/components/Main.spec.ts @@ -12,7 +12,7 @@ describe('Main', () => { ['with class', { props: { class: 'min-h-full' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: MainProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: MainProps, slots?: MainSlots }) => { const html = await ComponentRender(nameOrHtml, options, Main) expect(html).toMatchSnapshot() }) diff --git a/test/components/Marquee.spec.ts b/test/components/Marquee.spec.ts index f9b1e51182..9d80520cbc 100644 --- a/test/components/Marquee.spec.ts +++ b/test/components/Marquee.spec.ts @@ -18,7 +18,7 @@ describe('Marquee', () => { ['with ui', { props: { ui: { content: 'gap-4' } } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: MarqueeProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: MarqueeProps, slots?: MarqueeSlots }) => { const html = await ComponentRender(nameOrHtml, options, Marquee) expect(html).toMatchSnapshot() }) diff --git a/test/components/Modal.spec.ts b/test/components/Modal.spec.ts index f2358ddba9..c20b666469 100644 --- a/test/components/Modal.spec.ts +++ b/test/components/Modal.spec.ts @@ -30,7 +30,7 @@ describe('Modal', () => { ['with close slot', { props, slots: { close: () => 'Close slot' } }], ['with body slot', { props, slots: { body: () => 'Body slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ModalProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ModalProps, slots?: ModalSlots }) => { const html = await ComponentRender(nameOrHtml, options, Modal) expect(html).toMatchSnapshot() }) diff --git a/test/components/NavigationMenu.spec.ts b/test/components/NavigationMenu.spec.ts index d6bedbd518..c70cb829b0 100644 --- a/test/components/NavigationMenu.spec.ts +++ b/test/components/NavigationMenu.spec.ts @@ -111,7 +111,7 @@ describe('NavigationMenu', () => { ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: NavigationMenuProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: NavigationMenuProps, slots?: NavigationMenuSlots }) => { const html = await ComponentRender(nameOrHtml, options, NavigationMenu) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageAnchors.spec.ts b/test/components/PageAnchors.spec.ts index 08b87d8e48..b38c5409bc 100644 --- a/test/components/PageAnchors.spec.ts +++ b/test/components/PageAnchors.spec.ts @@ -39,7 +39,7 @@ describe('PageAnchors', () => { ['with link-leading slot', { props, slots: { 'link-leading': () => 'Link leading slot' } }], ['with link-label slot', { props, slots: { 'link-label': () => 'Link label slot' } }], ['with link-trailing slot', { props, slots: { 'link-trailing': () => 'Link trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageAnchorsProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageAnchorsProps, slots?: PageAnchorsSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageAnchors) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageBody.spec.ts b/test/components/PageBody.spec.ts index 940114ac12..3144d45553 100644 --- a/test/components/PageBody.spec.ts +++ b/test/components/PageBody.spec.ts @@ -12,7 +12,7 @@ describe('PageBody', () => { ['with class', { props: { class: 'mt-12' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageBodyProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageBodyProps, slots?: PageBodySlots }) => { const html = await ComponentRender(nameOrHtml, options, PageBody) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageCTA.spec.ts b/test/components/PageCTA.spec.ts index 97728fc4bf..377587aada 100644 --- a/test/components/PageCTA.spec.ts +++ b/test/components/PageCTA.spec.ts @@ -32,7 +32,7 @@ describe('PageCTA', () => { ['with links slot', { slots: { links: () => 'Links slot' } }], ['with default slot', { slots: { default: () => 'Default slot' } }], ['with bottom slot', { slots: { bottom: () => 'Bottom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageCTAProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageCTAProps, slots?: PageCTASlots }) => { const html = await ComponentRender(nameOrHtml, options, PageCTA) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageCard.spec.ts b/test/components/PageCard.spec.ts index 311557944c..f58fbf7ab1 100644 --- a/test/components/PageCard.spec.ts +++ b/test/components/PageCard.spec.ts @@ -46,7 +46,7 @@ describe('PageCard', () => { ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }], ['with default slot', { props, slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageCardProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageCardProps, slots?: PageCardSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageCard) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageColumns.spec.ts b/test/components/PageColumns.spec.ts index 18ef36c19c..c4f2cdf8a5 100644 --- a/test/components/PageColumns.spec.ts +++ b/test/components/PageColumns.spec.ts @@ -12,7 +12,7 @@ describe('PageColumns', () => { ['with class', { props: { class: 'xl:columns-4' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageColumnsProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageColumnsProps, slots?: PageColumnsSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageColumns) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageFeature.spec.ts b/test/components/PageFeature.spec.ts index c6edf1d0b0..30edccbff0 100644 --- a/test/components/PageFeature.spec.ts +++ b/test/components/PageFeature.spec.ts @@ -30,7 +30,7 @@ describe('PageFeature', () => { ['with title slot', { props, slots: { title: () => 'Title slot' } }], ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with default slot', { props, slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageFeatureProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageFeatureProps, slots?: PageFeatureSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageFeature) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageGrid.spec.ts b/test/components/PageGrid.spec.ts index 20c19c4950..8e69eaa420 100644 --- a/test/components/PageGrid.spec.ts +++ b/test/components/PageGrid.spec.ts @@ -12,7 +12,7 @@ describe('PageGrid', () => { ['with class', { props: { class: 'xl:grid-cols-4' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageGridProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageGridProps, slots?: PageGridSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageGrid) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageHeader.spec.ts b/test/components/PageHeader.spec.ts index e070a272d5..f303ddc8e5 100644 --- a/test/components/PageHeader.spec.ts +++ b/test/components/PageHeader.spec.ts @@ -21,7 +21,7 @@ describe('PageHeader', () => { ['with headline slot', { slots: { headline: () => 'Headline slot' } }], ['with links slot', { slots: { links: () => 'Links slot' } }], ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageHeaderProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageHeaderProps, slots?: PageHeaderSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageHeader) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageHero.spec.ts b/test/components/PageHero.spec.ts index e3e1ecf0aa..115a56913f 100644 --- a/test/components/PageHero.spec.ts +++ b/test/components/PageHero.spec.ts @@ -29,7 +29,7 @@ describe('PageHero', () => { ['with links slot', { slots: { links: () => 'Links slot' } }], ['with default slot', { slots: { default: () => 'Default slot' } }], ['with bottom slot', { slots: { bottom: () => 'Bottom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageHeroProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageHeroProps, slots?: PageHeroSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageHero) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageLinks.spec.ts b/test/components/PageLinks.spec.ts index 0e3b495242..667a59ee89 100644 --- a/test/components/PageLinks.spec.ts +++ b/test/components/PageLinks.spec.ts @@ -41,7 +41,7 @@ describe('PageLinks', () => { ['with link-leading slot', { props, slots: { 'link-leading': () => 'Link leading slot' } }], ['with link-label slot', { props, slots: { 'link-label': () => 'Link label slot' } }], ['with link-trailing slot', { props, slots: { 'link-trailing': () => 'Link trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageLinksProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageLinksProps, slots?: PageLinksSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageLinks) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageList.spec.ts b/test/components/PageList.spec.ts index 8b84439c3c..d18caa4b62 100644 --- a/test/components/PageList.spec.ts +++ b/test/components/PageList.spec.ts @@ -13,7 +13,7 @@ describe('PageList', () => { ['with class', { props: { class: 'gap-2' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageListProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageListProps, slots?: PageListSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageList) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageLogos.spec.ts b/test/components/PageLogos.spec.ts index b54d08da11..3298f8e7aa 100644 --- a/test/components/PageLogos.spec.ts +++ b/test/components/PageLogos.spec.ts @@ -21,7 +21,7 @@ describe('PageLogos', () => { // Slots ['with default slot', { slots: { default: () => 'Default slot' } }], ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageLogosProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageLogosProps, slots?: PageLogosSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageLogos) expect(html).toMatchSnapshot() }) diff --git a/test/components/PageSection.spec.ts b/test/components/PageSection.spec.ts index fb28f71293..0d0da92814 100644 --- a/test/components/PageSection.spec.ts +++ b/test/components/PageSection.spec.ts @@ -38,7 +38,7 @@ describe('PageSection', () => { ['with links slot', { slots: { links: () => 'Links slot' } }], ['with default slot', { slots: { default: () => 'Default slot' } }], ['with bottom slot', { slots: { bottom: () => 'Bottom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageSectionProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageSectionProps, slots?: PageSectionSlots }) => { const html = await ComponentRender(nameOrHtml, options, PageSection) expect(html).toMatchSnapshot() }) diff --git a/test/components/Pagination.spec.ts b/test/components/Pagination.spec.ts index 6dfebc51a0..4732eb04e3 100644 --- a/test/components/Pagination.spec.ts +++ b/test/components/Pagination.spec.ts @@ -42,7 +42,7 @@ describe('Pagination', () => { ['with last slot', { props, slots: { last: () => 'Last slot' } }], ['with ellipsis slot', { props: { ...props, siblingCount: 1, showEdges: true, page: 5 }, slots: { ellipsis: () => 'Ellipsis slot' } }], ['with item slot', { props, slots: { item: () => 'Item slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PaginationProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PaginationProps, slots?: PaginationSlots }) => { const html = await ComponentRender(nameOrHtml, options, Pagination) expect(html).toMatchSnapshot() }) diff --git a/test/components/PricingPlan.spec.ts b/test/components/PricingPlan.spec.ts index 8dc0695a20..73a9ea6b62 100644 --- a/test/components/PricingPlan.spec.ts +++ b/test/components/PricingPlan.spec.ts @@ -66,7 +66,7 @@ describe('PricingPlan', () => { ['with header slot', { props, slots: { header: () => 'Header slot' } }], ['with body slot', { props, slots: { body: () => 'Body slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PricingPlanProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PricingPlanProps, slots?: PricingPlanSlots }) => { const html = await ComponentRender(nameOrHtml, options, PricingPlan) expect(html).toMatchSnapshot() }) diff --git a/test/components/PricingPlans.spec.ts b/test/components/PricingPlans.spec.ts index f8b54c04cc..970dd03207 100644 --- a/test/components/PricingPlans.spec.ts +++ b/test/components/PricingPlans.spec.ts @@ -35,7 +35,7 @@ describe('PricingPlans', () => { ['with class', { props: { ...props, class: 'gap-y-12' } }], // Slots ['with default slot', { props, slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PricingPlansProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PricingPlansProps, slots?: PricingPlansSlots }) => { const html = await ComponentRender(nameOrHtml, options, PricingPlans) expect(html).toMatchSnapshot() }) diff --git a/test/components/PricingTable.spec.ts b/test/components/PricingTable.spec.ts index 6d6b096d83..26d49225b0 100644 --- a/test/components/PricingTable.spec.ts +++ b/test/components/PricingTable.spec.ts @@ -80,7 +80,7 @@ describe('PricingTable', () => { ['with tier-billing slot', { props, slots: { 'tier-billing': () => 'Tier billing slot' } }], ['with tier-discount slot', { props, slots: { 'tier-discount': () => 'Tier discount slot' } }], ['with tier-price slot', { props, slots: { 'tier-price': () => 'Tier price slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props: PricingTableProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props: PricingTableProps, slots?: PricingTableSlots }) => { const html = await ComponentRender(nameOrHtml, options, PricingTable) expect(html).toMatchSnapshot() }) diff --git a/test/components/Progress.spec.ts b/test/components/Progress.spec.ts index c1131df7f8..5658d81702 100644 --- a/test/components/Progress.spec.ts +++ b/test/components/Progress.spec.ts @@ -28,7 +28,7 @@ describe('Progress', () => { ['with ui', { props: { ui: { base: 'bg-default' } } }], // Slots ['with status slot', { slots: { status: () => 'Status slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ProgressProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ProgressProps, slots?: ProgressSlots }) => { const html = await ComponentRender(nameOrHtml, options, Progress) expect(html).toMatchSnapshot() }) diff --git a/test/components/RadioGroup.spec.ts b/test/components/RadioGroup.spec.ts index 51c3190624..e9fcba4adf 100644 --- a/test/components/RadioGroup.spec.ts +++ b/test/components/RadioGroup.spec.ts @@ -45,7 +45,7 @@ describe('RadioGroup', () => { ['with legend slot', { props, slots: { label: () => 'Legend slot' } }], ['with label slot', { props, slots: { label: () => 'Label slot' } }], ['with description slot', { props, slots: { label: () => 'Description slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: RadioGroupProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: RadioGroupProps, slots?: RadioGroupSlots }) => { const html = await ComponentRender(nameOrHtml, options, RadioGroup) expect(html).toMatchSnapshot() }) diff --git a/test/components/Select.spec.ts b/test/components/Select.spec.ts index 941c92a6e0..4e316b9409 100644 --- a/test/components/Select.spec.ts +++ b/test/components/Select.spec.ts @@ -81,7 +81,7 @@ describe('Select', () => { ['with item-leading slot', { props, slots: { 'item-leading': () => 'Item leading slot' } }], ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SelectProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SelectProps, slots?: SelectSlots }) => { const html = await ComponentRender(nameOrHtml, options, Select) expect(html).toMatchSnapshot() }) diff --git a/test/components/SelectMenu.spec.ts b/test/components/SelectMenu.spec.ts index 43b0f52865..60ad2a2f69 100644 --- a/test/components/SelectMenu.spec.ts +++ b/test/components/SelectMenu.spec.ts @@ -87,7 +87,7 @@ describe('SelectMenu', () => { ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with create-item-label slot', { props: { ...props, searchTerm: 'New value', createItem: true }, slots: { 'create-item-label': () => 'Create item slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SelectMenuProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SelectMenuProps, slots?: SelectMenuSlots }) => { const html = await ComponentRender(nameOrHtml, options, SelectMenu) expect(html).toMatchSnapshot() }) diff --git a/test/components/Separator.spec.ts b/test/components/Separator.spec.ts index 2010f48f57..b7c8b64a4c 100644 --- a/test/components/Separator.spec.ts +++ b/test/components/Separator.spec.ts @@ -23,7 +23,7 @@ describe('Separator', () => { ['with as', { props: { as: 'span' } }], ['with class', { props: { class: 'flex-row-reverse' } }], ['with ui', { props: { ui: { label: 'text-lg' } } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SeparatorProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SeparatorProps, slots?: SeparatorSlots }) => { const html = await ComponentRender(nameOrHtml, options, Separator) expect(html).toMatchSnapshot() }) diff --git a/test/components/Slideover.spec.ts b/test/components/Slideover.spec.ts index 1a60ba1378..03c2b10f30 100644 --- a/test/components/Slideover.spec.ts +++ b/test/components/Slideover.spec.ts @@ -32,7 +32,7 @@ describe('Slideover', () => { ['with close slot', { props, slots: { close: () => 'Close slot' } }], ['with body slot', { props, slots: { body: () => 'Body slot' } }], ['with footer slot', { props, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SlideoverProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SlideoverProps, slots?: SlideoverSlots }) => { const html = await ComponentRender(nameOrHtml, options, Slideover) expect(html).toMatchSnapshot() }) diff --git a/test/components/Stepper.spec.ts b/test/components/Stepper.spec.ts index 9a5f84ccef..c1681bcd74 100644 --- a/test/components/Stepper.spec.ts +++ b/test/components/Stepper.spec.ts @@ -46,7 +46,7 @@ describe('Stepper', () => { ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with content slot', { props, slots: { content: () => 'Content slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: StepperProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: StepperProps, slots?: StepperSlots }) => { const html = await ComponentRender(nameOrHtml, options, Stepper) expect(html).toMatchSnapshot() }) diff --git a/test/components/Switch.spec.ts b/test/components/Switch.spec.ts index 33138fc8b7..1ade887210 100644 --- a/test/components/Switch.spec.ts +++ b/test/components/Switch.spec.ts @@ -36,7 +36,7 @@ describe('Switch', () => { // Slots ['with label slot', { slots: { label: () => 'Label slot' } }], ['with description slot', { slots: { label: () => 'Description slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SwitchProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SwitchProps, slots?: SwitchSlots }) => { const html = await ComponentRender(nameOrHtml, options, Switch) expect(html).toMatchSnapshot() }) diff --git a/test/components/Table.spec.ts b/test/components/Table.spec.ts index 849f845a66..e9a0f52704 100644 --- a/test/components/Table.spec.ts +++ b/test/components/Table.spec.ts @@ -182,7 +182,7 @@ describe('Table', () => { ['with caption slot', { props, slots: { caption: () => 'Caption slot' } }], ['with body-top slot', { props, slots: { 'body-top': () => 'Body top slot' } }], ['with body-bottom slot', { props, slots: { 'body-bottom': () => 'Body bottom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TableProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TableProps, slots?: TableSlots }) => { const html = await ComponentRender(nameOrHtml, options, Table) expect(html).toMatchSnapshot() }) diff --git a/test/components/Tabs.spec.ts b/test/components/Tabs.spec.ts index a5abded715..ace38ef7f2 100644 --- a/test/components/Tabs.spec.ts +++ b/test/components/Tabs.spec.ts @@ -52,7 +52,7 @@ describe('Tabs', () => { ['with trailing slot', { props, slots: { trailing: () => 'Trailing slot' } }], ['with content slot', { props, slots: { content: () => 'Content slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TabsProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TabsProps, slots?: TabsSlots }) => { const html = await ComponentRender(nameOrHtml, options, Tabs) expect(html).toMatchSnapshot() }) diff --git a/test/components/Textarea.spec.ts b/test/components/Textarea.spec.ts index a538d8bc14..ce7acad399 100644 --- a/test/components/Textarea.spec.ts +++ b/test/components/Textarea.spec.ts @@ -46,7 +46,7 @@ describe('Textarea', () => { ['with default slot', { slots: { default: () => 'Default slot' } }], ['with leading slot', { slots: { leading: () => 'Leading slot' } }], ['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TextareaProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TextareaProps, slots?: TextareaSlots }) => { const html = await ComponentRender(nameOrHtml, options, Textarea) expect(html).toMatchSnapshot() }) diff --git a/test/components/Timeline.spec.ts b/test/components/Timeline.spec.ts index 91aa9a0277..fadcb01d0f 100644 --- a/test/components/Timeline.spec.ts +++ b/test/components/Timeline.spec.ts @@ -56,7 +56,7 @@ describe('Timeline', () => { ['with date slot', { props, slots: { date: () => 'Date slot' } }], ['with title slot', { props, slots: { title: () => 'Title slot' } }], ['with description slot', { props, slots: { description: () => 'Description slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TimelineProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TimelineProps, slots?: TimelineSlots }) => { const html = await ComponentRender(nameOrHtml, options, Timeline) expect(html).toMatchSnapshot() }) diff --git a/test/components/Toast.spec.ts b/test/components/Toast.spec.ts index b212561096..7e35c427ab 100644 --- a/test/components/Toast.spec.ts +++ b/test/components/Toast.spec.ts @@ -50,7 +50,7 @@ describe('Toast', () => { ['with title slot', { props, slots: { title: () => 'Title slot' } }], ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with close slot', { props, slots: { close: () => 'Close slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ToastProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ToastProps, slots?: ToastSlots }) => { const html = await ComponentRender(nameOrHtml, options, ToastWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/Tree.spec.ts b/test/components/Tree.spec.ts index 8c1166e59c..fc178c9139 100644 --- a/test/components/Tree.spec.ts +++ b/test/components/Tree.spec.ts @@ -71,7 +71,7 @@ describe('Tree', () => { ['with item-leading slot', { props, slots: { 'item-leading': () => 'leading slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'trailing slot' } }], ['with dynamic slot', { props, slots: { app: () => 'dynamic slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: Partial, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: Partial, slots?: TreeSlots }) => { const html = await ComponentRender(nameOrHtml, options, Tree) expect(html).toMatchSnapshot() }) diff --git a/test/components/User.spec.ts b/test/components/User.spec.ts index 580389dfd3..8e3ccadccd 100644 --- a/test/components/User.spec.ts +++ b/test/components/User.spec.ts @@ -33,7 +33,7 @@ describe('User', () => { ['with name slot', { props, slots: { name: () => 'Name slot' } }], ['with description slot', { props, slots: { description: () => 'Description slot' } }], ['with default slot', { props, slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: UserProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: UserProps, slots?: UserSlots }) => { const html = await ComponentRender(nameOrHtml, options, User) expect(html).toMatchSnapshot() }) diff --git a/test/components/content/ContentNavigation.spec.ts b/test/components/content/ContentNavigation.spec.ts index b54a17b321..fea147a3ed 100644 --- a/test/components/content/ContentNavigation.spec.ts +++ b/test/components/content/ContentNavigation.spec.ts @@ -68,7 +68,7 @@ describe('ContentNavigation', () => { ['with item-label slot', { props, slots: { 'item-label': () => 'Item label slot' } }], ['with item-trailing slot', { props, slots: { 'item-trailing': () => 'Item trailing slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentNavigationProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentNavigationProps, slots?: ContentNavigationSlots }) => { const html = await ComponentRender(nameOrHtml, options, ContentNavigation) expect(html).toMatchSnapshot() }) diff --git a/test/components/content/ContentSurround.spec.ts b/test/components/content/ContentSurround.spec.ts index b4752a5b13..7bf35768e3 100644 --- a/test/components/content/ContentSurround.spec.ts +++ b/test/components/content/ContentSurround.spec.ts @@ -28,7 +28,7 @@ describe('ContentSurround', () => { ['with link slot', { props, slots: { link: () => 'Link slot' } }], ['with link-leading slot', { props, slots: { 'link-leading': () => 'Link leading slot' } }], ['with link-title slot', { props, slots: { 'link-title': () => 'Link title slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentSurroundProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentSurroundProps, slots?: ContentSurroundSlots }) => { const html = await ComponentRender(nameOrHtml, options, ContentSurround) expect(html).toMatchSnapshot() }) diff --git a/test/components/content/ContentToc.spec.ts b/test/components/content/ContentToc.spec.ts index ed2e7683d5..67f66c56be 100644 --- a/test/components/content/ContentToc.spec.ts +++ b/test/components/content/ContentToc.spec.ts @@ -66,7 +66,7 @@ describe('ContentToc', () => { ['with link slot', { props, slots: { link: () => 'Link slot' } }], ['with top slot', { props, slots: { top: () => 'Top slot' } }], ['with bottom slot', { props, slots: { bottom: () => 'Bottom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentTocProps, slots?: Partial }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentTocProps, slots?: ContentTocSlots }) => { const html = await ComponentRender(nameOrHtml, options, ContentToc) expect(html).toMatchSnapshot() }) diff --git a/test/utils/types.ts b/test/utils/types.ts index 8d91218276..49d471b841 100644 --- a/test/utils/types.ts +++ b/test/utils/types.ts @@ -18,7 +18,7 @@ export function expectSlotProps>(_name type Ctx = V extends { __ctx?: infer C } ? NonNullable : never type Slots = Ctx extends { slots: infer S } ? { - [K in keyof S as S[K] extends never ? never : K]: S[K] extends (props: infer P) => any ? P : never + [K in keyof Required as Required[K] extends never ? never : K]: Required[K] extends (props: infer P) => any ? P : never } : never type Events = Ctx extends { props: infer Props } ? { From 4ffadb2dc4b9d0f582fe3928a06a20d693012bee Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Thu, 16 Oct 2025 21:54:09 +0200 Subject: [PATCH 4/7] up --- src/runtime/components/ChangelogVersions.vue | 1 - src/runtime/components/DashboardNavbar.vue | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/runtime/components/ChangelogVersions.vue b/src/runtime/components/ChangelogVersions.vue index 86ed267b5e..2189a96a69 100644 --- a/src/runtime/components/ChangelogVersions.vue +++ b/src/runtime/components/ChangelogVersions.vue @@ -44,7 +44,6 @@ export interface ChangelogVersionsSlots diff --git a/src/runtime/components/DashboardNavbar.vue b/src/runtime/components/DashboardNavbar.vue index 875f5505f9..79fb77c0ce 100644 --- a/src/runtime/components/DashboardNavbar.vue +++ b/src/runtime/components/DashboardNavbar.vue @@ -1,10 +1,10 @@ From 5bb49884fddad46987a19fd341aa2c46ff8fc833 Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Fri, 17 Oct 2025 01:59:00 +0200 Subject: [PATCH 5/7] up --- src/runtime/components/Avatar.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/components/Avatar.vue b/src/runtime/components/Avatar.vue index 8d4b1211f6..caf7361f73 100644 --- a/src/runtime/components/Avatar.vue +++ b/src/runtime/components/Avatar.vue @@ -3,6 +3,7 @@ import type { AppConfig } from '@nuxt/schema' import theme from '#build/ui/avatar' import type { ChipProps, IconProps } from '../types' import type { ComponentConfig } from '../types/tv' +import type { SlotsReturn } from '../types/utils' type Avatar = ComponentConfig @@ -30,7 +31,7 @@ export interface AvatarProps { } export interface AvatarSlots { - default(props?: {}): any + default(props?: {}): SlotsReturn } From 76d9e05cd148bd46fbfca092bf92ec3d579d14fc Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Fri, 17 Oct 2025 02:55:19 +0200 Subject: [PATCH 6/7] up --- src/runtime/components/Avatar.vue | 2 +- src/runtime/components/prose/CodeGroup.vue | 2 +- src/runtime/components/prose/CodeTree.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/components/Avatar.vue b/src/runtime/components/Avatar.vue index caf7361f73..be51d419ab 100644 --- a/src/runtime/components/Avatar.vue +++ b/src/runtime/components/Avatar.vue @@ -31,7 +31,7 @@ export interface AvatarProps { } export interface AvatarSlots { - default(props?: {}): SlotsReturn + default?(props?: {}): SlotsReturn } diff --git a/src/runtime/components/prose/CodeGroup.vue b/src/runtime/components/prose/CodeGroup.vue index f891963e3e..9a8c203c83 100644 --- a/src/runtime/components/prose/CodeGroup.vue +++ b/src/runtime/components/prose/CodeGroup.vue @@ -56,7 +56,7 @@ const items = computed<{ rerenderCount.value let children = slots.default?.() if (!Array.isArray(children)) { - children = [children] + children = children ? [children] : [] } return children?.flatMap(transformSlot).filter(Boolean) || [] }) diff --git a/src/runtime/components/prose/CodeTree.vue b/src/runtime/components/prose/CodeTree.vue index fc4d3ceea8..2028127003 100644 --- a/src/runtime/components/prose/CodeTree.vue +++ b/src/runtime/components/prose/CodeTree.vue @@ -67,7 +67,7 @@ const flatItems = computed<{ rerenderCount.value let children = slots.default?.() if (!Array.isArray(children)) { - children = [children] + children = children ? [children] : [] } return children?.flatMap(transformSlot).filter(Boolean) || [] }) From b9369eb89b17d19578d1954b2857ff66b2628ebc Mon Sep 17 00:00:00 2001 From: Sandro Circi Date: Fri, 17 Oct 2025 03:06:37 +0200 Subject: [PATCH 7/7] up --- src/runtime/components/prose/Accordion.vue | 2 +- src/runtime/components/prose/Tabs.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/prose/Accordion.vue b/src/runtime/components/prose/Accordion.vue index fb9ac96ed2..22f5fa82d8 100644 --- a/src/runtime/components/prose/Accordion.vue +++ b/src/runtime/components/prose/Accordion.vue @@ -47,7 +47,7 @@ const items = computed<{ rerenderCount.value let children = slots.default?.() if (!Array.isArray(children)) { - children = [children] + children = children ? [children] : [] } return children?.flatMap(transformSlot).filter(Boolean) || [] }) diff --git a/src/runtime/components/prose/Tabs.vue b/src/runtime/components/prose/Tabs.vue index 1438d95041..c85a4d2c67 100644 --- a/src/runtime/components/prose/Tabs.vue +++ b/src/runtime/components/prose/Tabs.vue @@ -61,7 +61,7 @@ const items = computed<{ rerenderCount.value let children = slots.default?.() if (!Array.isArray(children)) { - children = [children] + children = children ? [children] : [] } return children?.flatMap(transformSlot).filter(Boolean) || [] })