diff --git a/test/components/Accordion.spec.ts b/test/components/Accordion.spec.ts index 001ba04d..2c382062 100644 --- a/test/components/Accordion.spec.ts +++ b/test/components/Accordion.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Accordion, { type AccordionProps } from '../../src/runtime/components/Accordion.vue' +import Accordion, { type AccordionProps, type AccordionSlots } from '../../src/runtime/components/Accordion.vue' import ComponentRender from '../component-render' describe('Accordion', () => { @@ -53,7 +53,7 @@ describe('Accordion', () => { ['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?: AccordionProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AccordionProps, slots?: Partial> }) => { 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 89a2a26a..e42bbf13 100644 --- a/test/components/Alert.spec.ts +++ b/test/components/Alert.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Alert, { type AlertProps } from '../../src/runtime/components/Alert.vue' +import Alert, { type AlertProps, type AlertSlots } from '../../src/runtime/components/Alert.vue' import ComponentRender from '../component-render' import theme from '#build/ui/alert' @@ -23,7 +23,7 @@ describe('Alert', () => { ['with title slot', { slots: { title: () => 'Title slot' } }], ['with description slot', { slots: { description: () => 'Description slot' } }], ['with close slot', { slots: { close: () => 'Close slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AlertProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AlertProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Alert) expect(html).toMatchSnapshot() }) diff --git a/test/components/Avatar.spec.ts b/test/components/Avatar.spec.ts index 262ac56c..b1f682dc 100644 --- a/test/components/Avatar.spec.ts +++ b/test/components/Avatar.spec.ts @@ -15,7 +15,7 @@ describe('Avatar', () => { ...sizes.map((size: string) => [`with size ${size}`, { props: { src: 'https://avatars.githubusercontent.com/u/739984?v=4', size } }]), ['with class', { props: { class: 'bg-white dark:bg-gray-900' } }], ['with ui', { props: { ui: { fallback: 'font-bold' } } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AvatarProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: AvatarProps }) => { const html = await ComponentRender(nameOrHtml, options, Avatar) expect(html).toMatchSnapshot() }) diff --git a/test/components/Badge.spec.ts b/test/components/Badge.spec.ts index ddf99d54..0f3c9dfc 100644 --- a/test/components/Badge.spec.ts +++ b/test/components/Badge.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Badge, { type BadgeProps } from '../../src/runtime/components/Badge.vue' +import Badge, { type BadgeProps, type BadgeSlots } from '../../src/runtime/components/Badge.vue' import ComponentRender from '../component-render' import theme from '#build/ui/badge' @@ -18,7 +18,7 @@ describe('Badge', () => { ...variants.map((variant: string) => [`with variant ${variant}`, { props: { label: 'Badge', variant } }]), // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BadgeProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BadgeProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Badge) expect(html).toMatchSnapshot() }) diff --git a/test/components/Breadcrumb.spec.ts b/test/components/Breadcrumb.spec.ts index a6f949d9..2b3e8a26 100644 --- a/test/components/Breadcrumb.spec.ts +++ b/test/components/Breadcrumb.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Breadcrumb, { type BreadcrumbProps } from '../../src/runtime/components/Breadcrumb.vue' +import Breadcrumb, { type BreadcrumbProps, type BreadcrumbSlots } from '../../src/runtime/components/Breadcrumb.vue' import ComponentRender from '../component-render' describe('Breadcrumb', () => { @@ -34,7 +34,7 @@ describe('Breadcrumb', () => { ['with item slot', { props, slots: { item: () => 'Item 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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: BreadcrumbProps, slots?: Partial> }) => { 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 794f1c38..830a0e47 100644 --- a/test/components/Button.spec.ts +++ b/test/components/Button.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Button, { type ButtonProps } from '../../src/runtime/components/Button.vue' +import Button, { type ButtonProps, type ButtonSlots } from '../../src/runtime/components/Button.vue' import ComponentRender from '../component-render' import theme from '#build/ui/button' @@ -31,7 +31,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ButtonProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Button) expect(html).toMatchSnapshot() }) diff --git a/test/components/Card.spec.ts b/test/components/Card.spec.ts index 339ea2bf..7a8983db 100644 --- a/test/components/Card.spec.ts +++ b/test/components/Card.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Card, { type CardProps } from '../../src/runtime/components/Card.vue' +import Card, { type CardProps, type CardSlots } from '../../src/runtime/components/Card.vue' import ComponentRender from '../component-render' describe('Card', () => { @@ -12,7 +12,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CardProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Card) expect(html).toMatchSnapshot() }) diff --git a/test/components/Checkbox.spec.ts b/test/components/Checkbox.spec.ts index 65f88ece..e6cd1a82 100644 --- a/test/components/Checkbox.spec.ts +++ b/test/components/Checkbox.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Checkbox, { type CheckboxProps } from '../../src/runtime/components/Checkbox.vue' +import Checkbox, { type CheckboxProps, type CheckboxSlots } from '../../src/runtime/components/Checkbox.vue' import ComponentRender from '../component-render' import theme from '#build/ui/checkbox' @@ -27,7 +27,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Checkbox) expect(html).toMatchSnapshot() }) diff --git a/test/components/Chip.spec.ts b/test/components/Chip.spec.ts index d510229b..4cfa6712 100644 --- a/test/components/Chip.spec.ts +++ b/test/components/Chip.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Chip, { type ChipProps } from '../../src/runtime/components/Chip.vue' +import Chip, { type ChipProps, type ChipSlots } from '../../src/runtime/components/Chip.vue' import ComponentRender from '../component-render' import theme from '#build/ui/chip' @@ -21,7 +21,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 & { show?: boolean }, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChipProps & { show?: boolean }, slots?: Partial }) => { 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 60d4bdca..9b8d55cd 100644 --- a/test/components/Collapsible.spec.ts +++ b/test/components/Collapsible.spec.ts @@ -1,11 +1,11 @@ import { describe, it, expect } from 'vitest' -import Collapsible, { type CollapsibleProps } from '../../src/runtime/components/Collapsible.vue' +import Collapsible, { type CollapsibleProps, type CollapsibleSlots } from '../../src/runtime/components/Collapsible.vue' import ComponentRender from '../component-render' describe('Collapsible', () => { it.each([ ['with open', { props: { open: true }, slots: { default: () => 'Click me', content: () => 'Collapsible content' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CollapsibleProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: CollapsibleProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Collapsible) expect(html).toMatchSnapshot() }) diff --git a/test/components/Container.spec.ts b/test/components/Container.spec.ts index c5e16430..b242d092 100644 --- a/test/components/Container.spec.ts +++ b/test/components/Container.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Container, { type ContainerProps } from '../../src/runtime/components/Container.vue' +import Container, { type ContainerProps, type ContainerSlots } from '../../src/runtime/components/Container.vue' import ComponentRender from '../component-render' describe('Container', () => { @@ -9,7 +9,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContainerProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Container) expect(html).toMatchSnapshot() }) diff --git a/test/components/Drawer.spec.ts b/test/components/Drawer.spec.ts index a78db7c8..5b808fbd 100644 --- a/test/components/Drawer.spec.ts +++ b/test/components/Drawer.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Drawer, { type DrawerProps } from '../../src/runtime/components/Drawer.vue' +import Drawer, { type DrawerProps, type DrawerSlots } from '../../src/runtime/components/Drawer.vue' import ComponentRender from '../component-render' describe('Drawer', () => { @@ -18,7 +18,7 @@ describe('Drawer', () => { ['with description slot', { props: { open: true, portal: false }, slots: { description: () => 'Description slot' } }], ['with body slot', { props: { open: true, portal: false }, slots: { body: () => 'Body slot' } }], ['with footer slot', { props: { open: true, portal: false }, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DrawerProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DrawerProps, slots?: Partial }) => { 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 0d15c0a4..3c22a43d 100644 --- a/test/components/DropdownMenu.spec.ts +++ b/test/components/DropdownMenu.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import DropdownMenu, { type DropdownMenuProps } from '../../src/runtime/components/DropdownMenu.vue' +import DropdownMenu, { type DropdownMenuProps, type DropdownMenuSlots } from '../../src/runtime/components/DropdownMenu.vue' import ComponentRender from '../component-render' describe('DropdownMenu', () => { @@ -34,7 +34,7 @@ describe('DropdownMenu', () => { ['with trailing slot', { props, slots: { trailing: () => 'Trailing slot' } }], ['with item slot', { props, slots: { item: () => 'Item slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DropdownMenuProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: DropdownMenuProps, slots?: Partial> }) => { const html = await ComponentRender(nameOrHtml, options, DropdownMenu) expect(html).toMatchSnapshot() }) diff --git a/test/components/Form.spec.ts b/test/components/Form.spec.ts index 9218463b..a2c21f8b 100644 --- a/test/components/Form.spec.ts +++ b/test/components/Form.spec.ts @@ -8,7 +8,7 @@ import * as yup from 'yup' import Joi from 'joi' import * as valibot from 'valibot' import ComponentRender from '../component-render' -import type { FormProps } from '../../src/runtime/components/Form.vue' +import type { FormProps, FormSlots } from '../../src/runtime/components/Form.vue' import { UForm, UInput, @@ -75,8 +75,8 @@ describe('Form', () => { // Props ['with state', { props: { state: {} } }], // Slots - ['with default slot', { props: { state: {} }, slots: { default: 'Form slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props: FormProps }) => { + ['with default slot', { props: { state: {} }, slots: { default: () => 'Form slot' } }] + ])('renders %s correctly', async (nameOrHtml: string, options: { props: FormProps, slots?: Partial }) => { 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 9b7cdc38..bd580aaa 100644 --- a/test/components/FormField.spec.ts +++ b/test/components/FormField.spec.ts @@ -1,6 +1,6 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' -import FormField, { type FormFieldProps } from '../../src/runtime/components/FormField.vue' +import FormField, { type FormFieldProps, type FormFieldSlots } from '../../src/runtime/components/FormField.vue' import ComponentRender from '../component-render' import theme from '#build/ui/form-field' @@ -33,7 +33,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: FormFieldProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, FormFieldWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/Input.spec.ts b/test/components/Input.spec.ts index 99294d52..8b3ade24 100644 --- a/test/components/Input.spec.ts +++ b/test/components/Input.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect, test } from 'vitest' import { mount } from '@vue/test-utils' -import Input, { type InputProps } from '../../src/runtime/components/Input.vue' +import Input, { type InputProps, type InputSlots } from '../../src/runtime/components/Input.vue' import ComponentRender from '../component-render' import theme from '#build/ui/input' @@ -33,7 +33,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Input) expect(html).toMatchSnapshot() }) diff --git a/test/components/Kbd.spec.ts b/test/components/Kbd.spec.ts index 8567c4ae..5fcab612 100644 --- a/test/components/Kbd.spec.ts +++ b/test/components/Kbd.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Kbd, { type KbdProps } from '../../src/runtime/components/Kbd.vue' +import Kbd, { type KbdProps, type KbdSlots } from '../../src/runtime/components/Kbd.vue' import ComponentRender from '../component-render' import theme from '#build/ui/kbd' @@ -16,7 +16,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: KbdProps, slots?: Partial }) => { 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 dd35abf3..6cb4af98 100644 --- a/test/components/Link.spec.ts +++ b/test/components/Link.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Link, { type LinkProps } from '../../src/runtime/components/Link.vue' +import Link, { type LinkProps, type LinkSlots } from '../../src/runtime/components/Link.vue' import ComponentRender from '../component-render' describe('Link', () => { @@ -15,7 +15,7 @@ describe('Link', () => { ['with inactiveClass', { props: { active: false, inactiveClass: 'hover:text-primary-500 dark:hover:text-primary-400' } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: LinkProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: LinkProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Link) expect(html).toMatchSnapshot() }) diff --git a/test/components/Modal.spec.ts b/test/components/Modal.spec.ts index 2ce81377..58422379 100644 --- a/test/components/Modal.spec.ts +++ b/test/components/Modal.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Modal, { type ModalProps } from '../../src/runtime/components/Modal.vue' +import Modal, { type ModalProps, type ModalSlots } from '../../src/runtime/components/Modal.vue' import ComponentRender from '../component-render' describe('Modal', () => { @@ -23,7 +23,7 @@ describe('Modal', () => { ['with close slot', { props: { open: true, portal: false }, slots: { close: () => 'Close slot' } }], ['with body slot', { props: { open: true, portal: false }, slots: { body: () => 'Body slot' } }], ['with footer slot', { props: { open: true, portal: false }, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ModalProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ModalProps, slots?: Partial }) => { 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 49adb655..94605fe8 100644 --- a/test/components/NavigationMenu.spec.ts +++ b/test/components/NavigationMenu.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import NavigationMenu, { type NavigationMenuProps } from '../../src/runtime/components/NavigationMenu.vue' +import NavigationMenu, { type NavigationMenuProps, type NavigationMenuSlots } from '../../src/runtime/components/NavigationMenu.vue' import ComponentRender from '../component-render' describe('NavigationMenu', () => { @@ -38,7 +38,7 @@ describe('NavigationMenu', () => { ['with trailing slot', { props, slots: { trailing: () => 'Trailing slot' } }], ['with item slot', { props, slots: { item: () => 'Item slot' } }], ['with custom slot', { props, slots: { custom: () => 'Custom slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: NavigationMenuProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: NavigationMenuProps, slots?: Partial> }) => { const html = await ComponentRender(nameOrHtml, options, NavigationMenu) expect(html).toMatchSnapshot() }) diff --git a/test/components/Pagination.spec.ts b/test/components/Pagination.spec.ts index d115f5c5..c134cdf4 100644 --- a/test/components/Pagination.spec.ts +++ b/test/components/Pagination.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Pagination, { type PaginationProps } from '../../src/runtime/components/Pagination.vue' +import Pagination, { type PaginationProps, type PaginationSlots } from '../../src/runtime/components/Pagination.vue' import ComponentRender from '../component-render' import theme from '#build/ui/button' @@ -40,7 +40,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PaginationProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Pagination) expect(html).toMatchSnapshot() }) diff --git a/test/components/Popover.spec.ts b/test/components/Popover.spec.ts index bd7998a3..5bf28177 100644 --- a/test/components/Popover.spec.ts +++ b/test/components/Popover.spec.ts @@ -1,12 +1,12 @@ import { describe, it, expect } from 'vitest' -import Popover, { type PopoverProps } from '../../src/runtime/components/Popover.vue' +import Popover, { type PopoverProps, type PopoverSlots } from '../../src/runtime/components/Popover.vue' import ComponentRender from '../component-render' describe('Popover', () => { it.each([ // Props ['with open', { props: { open: true, portal: false, arrow: true }, slots: { default: () => 'Click me', content: () => 'Popover content' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PopoverProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: PopoverProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Popover) expect(html).toMatchSnapshot() }) diff --git a/test/components/RadioGroup.spec.ts b/test/components/RadioGroup.spec.ts index e0bac03e..24928e87 100644 --- a/test/components/RadioGroup.spec.ts +++ b/test/components/RadioGroup.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import RadioGroup, { type RadioGroupProps } from '../../src/runtime/components/RadioGroup.vue' +import RadioGroup, { type RadioGroupProps, type RadioGroupSlots } from '../../src/runtime/components/RadioGroup.vue' import ComponentRender from '../component-render' import theme from '#build/ui/radio-group' @@ -27,7 +27,7 @@ describe('RadioGroup', () => { ['with legend slot', { props: { options }, slots: { label: () => 'Legend slot' } }], ['with label slot', { props: { options }, slots: { label: () => 'Label slot' } }], ['with description slot', { slots: { label: () => 'Description slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: RadioGroupProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: RadioGroupProps, slots?: Partial> }) => { const html = await ComponentRender(nameOrHtml, options, RadioGroup) expect(html).toMatchSnapshot() }) diff --git a/test/components/Separator.spec.ts b/test/components/Separator.spec.ts index 290036d9..5ee5779b 100644 --- a/test/components/Separator.spec.ts +++ b/test/components/Separator.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Separator, { type SeparatorProps } from '../../src/runtime/components/Separator.vue' +import Separator, { type SeparatorProps, type SeparatorSlots } from '../../src/runtime/components/Separator.vue' import ComponentRender from '../component-render' import theme from '#build/ui/separator' @@ -21,7 +21,7 @@ describe('Separator', () => { ...colors.map((color: string) => [`with color ${color}`, { props: { color } }]), ['with class', { props: { class: 'flex-row-reverse' } }], ['with ui', { props: { ui: { label: 'text-lg' } } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SeparatorProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SeparatorProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Separator) expect(html).toMatchSnapshot() }) diff --git a/test/components/Skeleton.spec.ts b/test/components/Skeleton.spec.ts index 93bd9252..1a382d8d 100644 --- a/test/components/Skeleton.spec.ts +++ b/test/components/Skeleton.spec.ts @@ -7,7 +7,7 @@ describe('Skeleton', () => { // Props ['with as', { props: { as: 'span' } }], ['with class', { props: { class: 'rounded-full size-12' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SkeletonProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SkeletonProps }) => { const html = await ComponentRender(nameOrHtml, options, Skeleton) expect(html).toMatchSnapshot() }) diff --git a/test/components/Slideover.spec.ts b/test/components/Slideover.spec.ts index 843aeb5e..20f26ecd 100644 --- a/test/components/Slideover.spec.ts +++ b/test/components/Slideover.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Slideover, { type SlideoverProps } from '../../src/runtime/components/Slideover.vue' +import Slideover, { type SlideoverProps, type SlideoverSlots } from '../../src/runtime/components/Slideover.vue' import ComponentRender from '../component-render' describe('Slideover', () => { @@ -25,7 +25,7 @@ describe('Slideover', () => { ['with close slot', { props: { open: true, portal: false }, slots: { close: () => 'Close slot' } }], ['with body slot', { props: { open: true, portal: false }, slots: { body: () => 'Body slot' } }], ['with footer slot', { props: { open: true, portal: false }, slots: { footer: () => 'Footer slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SlideoverProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SlideoverProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Slideover) expect(html).toMatchSnapshot() }) diff --git a/test/components/Slider.spec.ts b/test/components/Slider.spec.ts index b336b101..87f18d0b 100644 --- a/test/components/Slider.spec.ts +++ b/test/components/Slider.spec.ts @@ -21,7 +21,7 @@ describe('Slider', () => { ...colors.map((color: string) => [`with color ${color}`, { props: { color } }]), ['with class', { props: { class: 'w-48' } }], ['with ui', { props: { ui: { track: 'bg-gray-100 dark:bg-gray-800' } } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SliderProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SliderProps }) => { const html = await ComponentRender(nameOrHtml, options, Slider) expect(html).toMatchSnapshot() }) diff --git a/test/components/Switch.spec.ts b/test/components/Switch.spec.ts index bd4b38e2..49e73a4d 100644 --- a/test/components/Switch.spec.ts +++ b/test/components/Switch.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Switch, { type SwitchProps } from '../../src/runtime/components/Switch.vue' +import Switch, { type SwitchProps, type SwitchSlots } from '../../src/runtime/components/Switch.vue' import ComponentRender from '../component-render' import theme from '#build/ui/switch' @@ -29,7 +29,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: SwitchProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Switch) expect(html).toMatchSnapshot() }) diff --git a/test/components/Tabs.spec.ts b/test/components/Tabs.spec.ts index 9aa61c2a..f5c174dc 100644 --- a/test/components/Tabs.spec.ts +++ b/test/components/Tabs.spec.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest' -import Tabs, { type TabsProps } from '../../src/runtime/components/Tabs.vue' +import Tabs, { type TabsProps, type TabsSlots } from '../../src/runtime/components/Tabs.vue' import ComponentRender from '../component-render' describe('Tabs', () => { @@ -34,7 +34,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?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TabsProps, slots?: Partial> }) => { 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 2e9f68f2..d6cbee46 100644 --- a/test/components/Textarea.spec.ts +++ b/test/components/Textarea.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect, test } from 'vitest' import { mount } from '@vue/test-utils' -import Textarea, { type TextareaProps } from '../../src/runtime/components/Textarea.vue' +import Textarea, { type TextareaProps, type TextareaSlots } from '../../src/runtime/components/Textarea.vue' import ComponentRender from '../component-render' import theme from '#build/ui/textarea' @@ -24,7 +24,7 @@ describe('Textarea', () => { ['with ui', { props: { ui: { wrapper: 'ms-4' } } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TextareaProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TextareaProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, Textarea) expect(html).toMatchSnapshot() }) diff --git a/test/components/Toast.spec.ts b/test/components/Toast.spec.ts index d4a03ba4..c866739b 100644 --- a/test/components/Toast.spec.ts +++ b/test/components/Toast.spec.ts @@ -1,7 +1,7 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' import Toaster from '../../src/runtime/components/Toaster.vue' -import Toast, { type ToastProps } from '../../src/runtime/components/Toast.vue' +import Toast, { type ToastProps, type ToastSlots } from '../../src/runtime/components/Toast.vue' import ComponentRender from '../component-render' import { ClientOnly } from '#components' import theme from '#build/ui/toast' @@ -38,7 +38,7 @@ describe('Toast', () => { ['with title slot', { slots: { title: () => 'Title slot' } }], ['with description slot', { slots: { description: () => 'Description slot' } }], ['with close slot', { slots: { close: () => 'Close slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ToastProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: ToastProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, ToastWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/Tooltip.spec.ts b/test/components/Tooltip.spec.ts index 5992c433..6aee685a 100644 --- a/test/components/Tooltip.spec.ts +++ b/test/components/Tooltip.spec.ts @@ -1,7 +1,7 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' import { TooltipProvider } from 'radix-vue' -import Tooltip, { type TooltipProps } from '../../src/runtime/components/Tooltip.vue' +import Tooltip, { type TooltipProps, type TooltipSlots } from '../../src/runtime/components/Tooltip.vue' import ComponentRender from '../component-render' const TooltipWrapper = defineComponent({ @@ -22,7 +22,7 @@ describe('Tooltip', () => { // Slots ['with default slot', { props: { text: 'Tooltip', shortcuts: ['⌘', 'K'], open: true, portal: false }, slots: { default: () => 'Default slot' } }], ['with content slot', { props: { open: true, portal: false }, slots: { content: () => 'Content slot' } }] - ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TooltipProps, slots?: any }) => { + ])('renders %s correctly', async (nameOrHtml: string, options: { props?: TooltipProps, slots?: Partial }) => { const html = await ComponentRender(nameOrHtml, options, TooltipWrapper) expect(html).toMatchSnapshot() }) diff --git a/test/components/__snapshots__/Accordion.spec.ts.snap b/test/components/__snapshots__/Accordion.spec.ts.snap index 514d5e3a..f65e223e 100644 --- a/test/components/__snapshots__/Accordion.spec.ts.snap +++ b/test/components/__snapshots__/Accordion.spec.ts.snap @@ -3,9 +3,9 @@ exports[`Accordion > renders with as correctly 1`] = ` "
-

-

-

-

-

-