diff --git a/cli/templates.mjs b/cli/templates.mjs index a37ddc3f..d2ff1221 100644 --- a/cli/templates.mjs +++ b/cli/templates.mjs @@ -147,7 +147,8 @@ const test = ({ name, prose, content }) => { ? undefined : ` import { describe, it, expect } from 'vitest' -import ${upperName}, { type ${upperName}Props, type ${upperName}Slots } from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue' +import ${upperName} from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue' +import type { ${upperName}Props, ${upperName}Slots } from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue' import ComponentRender from '../${content ? '../' : ''}component-render' describe('${upperName}', () => { diff --git a/docs/app/components/Banner.vue b/docs/app/components/Banner.vue index 6786ddc1..c9bdcc73 100644 --- a/docs/app/components/Banner.vue +++ b/docs/app/components/Banner.vue @@ -1,6 +1,7 @@ diff --git a/docs/app/components/content/examples/form/FormExampleSuperstruct.vue b/docs/app/components/content/examples/form/FormExampleSuperstruct.vue index fca03d5c..7c6ef064 100644 --- a/docs/app/components/content/examples/form/FormExampleSuperstruct.vue +++ b/docs/app/components/content/examples/form/FormExampleSuperstruct.vue @@ -1,5 +1,6 @@ + + diff --git a/docs/app/components/content/examples/table/TableGroupedRowsExample.vue b/docs/app/components/content/examples/table/TableGroupedRowsExample.vue index 9d9b6cc3..85f02c39 100644 --- a/docs/app/components/content/examples/table/TableGroupedRowsExample.vue +++ b/docs/app/components/content/examples/table/TableGroupedRowsExample.vue @@ -1,7 +1,8 @@ @@ -216,6 +217,22 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.table || {}) loadingAnimation: props.loadingAnimation })) +const hasFooter = computed(() => { + function hasFooterRecursive(columns: TableColumn[]): boolean { + for (const column of columns) { + if ('footer' in column) { + return true + } + if ('columns' in column && hasFooterRecursive(column.columns as TableColumn[])) { + return true + } + } + return false + } + + return hasFooterRecursive(columns.value) +}) + const globalFilterState = defineModel('globalFilter', { default: undefined }) const columnFiltersState = defineModel('columnFilters', { default: [] }) const columnOrderState = defineModel('columnOrder', { default: [] }) @@ -461,6 +478,30 @@ defineExpose({ + + + + + + + + + + + + diff --git a/src/runtime/composables/defineShortcuts.ts b/src/runtime/composables/defineShortcuts.ts index 57e53d27..75655fd0 100644 --- a/src/runtime/composables/defineShortcuts.ts +++ b/src/runtime/composables/defineShortcuts.ts @@ -36,6 +36,8 @@ interface Shortcut { const chainedShortcutRegex = /^[^-]+.*-.*[^-]+$/ const combinedShortcutRegex = /^[^_]+.*_.*[^_]+$/ +// keyboard keys which can be combined with Shift modifier (in addition to alphabet keys) +const shiftableKeys = ['arrowleft', 'arrowright', 'arrowup', 'arrowright', 'tab', 'escape', 'enter', 'backspace'] export function extractShortcuts(items: any[] | any[][]) { const shortcuts: Record = {} @@ -76,7 +78,8 @@ export function defineShortcuts(config: MaybeRef, options: Shor return } - const alphabeticalKey = /^[a-z]{1}$/i.test(e.key) + const alphabetKey = /^[a-z]{1}$/i.test(e.key) + const shiftableKey = shiftableKeys.includes(e.key.toLowerCase()) let chainedKey chainedInputs.value.push(e.key) @@ -109,9 +112,9 @@ export function defineShortcuts(config: MaybeRef, options: Shor if (e.ctrlKey !== shortcut.ctrlKey) { continue } - // shift modifier is only checked in combination with alphabetical keys - // (shift with non-alphabetical keys would change the key) - if (alphabeticalKey && e.shiftKey !== shortcut.shiftKey) { + // shift modifier is only checked in combination with alphabet keys and some extra keys + // (shift with special characters would change the key) + if ((alphabetKey || shiftableKey) && e.shiftKey !== shortcut.shiftKey) { continue } // alt modifier changes the combined key anyways diff --git a/src/runtime/composables/useAvatarGroup.ts b/src/runtime/composables/useAvatarGroup.ts index 642502e5..1448f34f 100644 --- a/src/runtime/composables/useAvatarGroup.ts +++ b/src/runtime/composables/useAvatarGroup.ts @@ -1,4 +1,5 @@ -import { inject, provide, computed, type ComputedRef, type InjectionKey } from 'vue' +import { inject, provide, computed } from 'vue' +import type { ComputedRef, InjectionKey } from 'vue' import type { AvatarGroupProps } from '../types' export const avatarGroupInjectionKey: InjectionKey> = Symbol('nuxt-ui.avatar-group') diff --git a/src/runtime/composables/useComponentIcons.ts b/src/runtime/composables/useComponentIcons.ts index 0104aa9b..37de0ee2 100644 --- a/src/runtime/composables/useComponentIcons.ts +++ b/src/runtime/composables/useComponentIcons.ts @@ -1,4 +1,5 @@ -import { computed, toValue, type MaybeRefOrGetter } from 'vue' +import { computed, toValue } from 'vue' +import type { MaybeRefOrGetter } from 'vue' import { useAppConfig } from '#imports' import type { AvatarProps } from '../types' diff --git a/src/runtime/composables/useFormField.ts b/src/runtime/composables/useFormField.ts index e750bf3e..7a5328ff 100644 --- a/src/runtime/composables/useFormField.ts +++ b/src/runtime/composables/useFormField.ts @@ -1,5 +1,7 @@ -import { inject, computed, type InjectionKey, type Ref, type ComputedRef, provide } from 'vue' -import { type UseEventBusReturn, useDebounceFn } from '@vueuse/core' +import { inject, computed, provide } from 'vue' +import type { InjectionKey, Ref, ComputedRef } from 'vue' +import { useDebounceFn } from '@vueuse/core' +import type { UseEventBusReturn } from '@vueuse/core' import type { FormFieldProps } from '../types' import type { FormEvent, FormInputEvents, FormFieldInjectedOptions, FormInjectedOptions } from '../types/form' import type { GetObjectField } from '../types/utils' diff --git a/src/runtime/composables/useOverlay.ts b/src/runtime/composables/useOverlay.ts index 2a22b451..9e81ed31 100644 --- a/src/runtime/composables/useOverlay.ts +++ b/src/runtime/composables/useOverlay.ts @@ -3,9 +3,34 @@ import { reactive, markRaw, shallowReactive } from 'vue' import { createSharedComposable } from '@vueuse/core' import type { ComponentProps, ComponentEmit } from 'vue-component-type-helpers' -// Extracts the first argument of the close event -type CloseEventArgType = T extends (event: 'close', args_0: infer R) => void ? R : never - +/** + * This is a workaround for a design limitation in TypeScript. + * + * Conditional types only match the last function overload, not a union of all possible + * parameter types. This workaround forces TypeScript to properly extract the 'close' + * event argument type from component emits with multiple event signatures. + * + * @see https://github.com/microsoft/TypeScript/issues/32164 + */ +type CloseEventArgType = T extends { + (event: 'close', arg_0: infer Arg, ...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void + (...args: any[]): void +} ? Arg : never export type OverlayOptions> = { defaultOpen?: boolean props?: OverlayAttrs diff --git a/src/runtime/composables/usePortal.ts b/src/runtime/composables/usePortal.ts index 83cbef02..3aae1517 100644 --- a/src/runtime/composables/usePortal.ts +++ b/src/runtime/composables/usePortal.ts @@ -1,4 +1,5 @@ -import { inject, provide, computed, type Ref, type InjectionKey } from 'vue' +import { inject, provide, computed } from 'vue' +import type { Ref, InjectionKey } from 'vue' export const portalTargetInjectionKey: InjectionKey> = Symbol('nuxt-ui.portal-target') diff --git a/src/runtime/types/form.ts b/src/runtime/types/form.ts index 96fe5f17..fb04d7dc 100644 --- a/src/runtime/types/form.ts +++ b/src/runtime/types/form.ts @@ -21,11 +21,11 @@ export interface Form { blurredFields: ReadonlySet>> } -export type FormSchema = - | YupObjectSchema - | JoiSchema - | SuperstructSchema - | StandardSchemaV1 +export type FormSchema + = | YupObjectSchema + | JoiSchema + | SuperstructSchema + | StandardSchemaV1 // Define a utility type to infer the input type based on the schema type export type InferInput = Schema extends StandardSchemaV1 ? StandardSchemaV1.InferInput @@ -83,10 +83,10 @@ export type FormInputEvent = { eager?: boolean } -export type FormEvent = - | FormInputEvent - | FormChildAttachEvent - | FormChildDetachEvent +export type FormEvent + = | FormInputEvent + | FormChildAttachEvent + | FormChildDetachEvent export interface FormInjectedOptions { disabled?: boolean diff --git a/src/runtime/types/tv.ts b/src/runtime/types/tv.ts index 0300fa93..9f67ba1e 100644 --- a/src/runtime/types/tv.ts +++ b/src/runtime/types/tv.ts @@ -30,8 +30,8 @@ type ComponentSlots }> = Id<{ [K in keyof T['slots']]?: ClassValue }> -type GetComponentAppConfig = - A extends Record> ? A[U][K] : {} +type GetComponentAppConfig + = A extends Record> ? A[U][K] : {} type ComponentAppConfig< T, diff --git a/src/runtime/types/utils.ts b/src/runtime/types/utils.ts index 48ca5b42..0aef695e 100644 --- a/src/runtime/types/utils.ts +++ b/src/runtime/types/utils.ts @@ -44,8 +44,8 @@ export type MergeTypes = { export type GetItemKeys = keyof Extract, object> -export type GetItemValue | undefined, T extends NestedItem = NestedItem> = - T extends object +export type GetItemValue | undefined, T extends NestedItem = NestedItem> + = T extends object ? VK extends undefined ? T : VK extends keyof T @@ -70,10 +70,10 @@ export type GetModelValueEmits< 'update:modelValue': [payload: GetModelValue] } -export type StringOrVNode = - | string - | VNode - | (() => VNode) +export type StringOrVNode + = | string + | VNode + | (() => VNode) export type EmitsToProps = { [K in keyof T as `on${Capitalize}`]: T[K] extends [...args: infer Args] diff --git a/src/runtime/utils/index.ts b/src/runtime/utils/index.ts index b38eb579..0e7ebca8 100644 --- a/src/runtime/utils/index.ts +++ b/src/runtime/utils/index.ts @@ -85,3 +85,14 @@ export function compare(value?: T, currentValue?: T, comparator?: string | (( export function isArrayOfArray(item: A[] | A[][]): item is A[][] { return Array.isArray(item[0]) } + +export function mergeClasses(appConfigClass?: string | string[], propClass?: string) { + if (!appConfigClass && !propClass) { + return '' + } + + return [ + ...(Array.isArray(appConfigClass) ? appConfigClass : [appConfigClass]), + propClass + ].filter(Boolean) +} diff --git a/src/runtime/utils/tv.ts b/src/runtime/utils/tv.ts index d9e3f3e1..974458a3 100644 --- a/src/runtime/utils/tv.ts +++ b/src/runtime/utils/tv.ts @@ -1,4 +1,5 @@ -import { createTV, type defaultConfig } from 'tailwind-variants' +import { createTV } from 'tailwind-variants' +import type { defaultConfig } from 'tailwind-variants' import type { AppConfig } from '@nuxt/schema' import appConfig from '#build/app.config' diff --git a/src/theme/table.ts b/src/theme/table.ts index 11985e09..643e8cc5 100644 --- a/src/theme/table.ts +++ b/src/theme/table.ts @@ -7,6 +7,7 @@ export default (options: Required) => ({ caption: 'sr-only', thead: 'relative', tbody: 'divide-y divide-default [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary', + tfoot: 'relative', tr: 'data-[selected=true]:bg-elevated/50', th: 'px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0', td: 'p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0', @@ -23,7 +24,14 @@ export default (options: Required) => ({ }, sticky: { true: { + thead: 'sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur', + tfoot: 'sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur' + }, + header: { thead: 'sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur' + }, + footer: { + tfoot: 'sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur' } }, loading: { diff --git a/test/components/Accordion.spec.ts b/test/components/Accordion.spec.ts index 3c0830e6..d7603084 100644 --- a/test/components/Accordion.spec.ts +++ b/test/components/Accordion.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Accordion, { type AccordionProps, type AccordionSlots } from '../../src/runtime/components/Accordion.vue' +import Accordion from '../../src/runtime/components/Accordion.vue' +import type { AccordionProps, AccordionSlots } from '../../src/runtime/components/Accordion.vue' import ComponentRender from '../component-render' describe('Accordion', () => { diff --git a/test/components/Alert.spec.ts b/test/components/Alert.spec.ts index 88d7f6a9..9f851f8e 100644 --- a/test/components/Alert.spec.ts +++ b/test/components/Alert.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Alert, { type AlertProps, type AlertSlots } from '../../src/runtime/components/Alert.vue' +import Alert from '../../src/runtime/components/Alert.vue' +import type { AlertProps, AlertSlots } from '../../src/runtime/components/Alert.vue' import ComponentRender from '../component-render' import theme from '#build/ui/alert' diff --git a/test/components/Avatar.spec.ts b/test/components/Avatar.spec.ts index 48480e57..5004b08f 100644 --- a/test/components/Avatar.spec.ts +++ b/test/components/Avatar.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Avatar, { type AvatarProps, type AvatarSlots } from '../../src/runtime/components/Avatar.vue' +import Avatar from '../../src/runtime/components/Avatar.vue' +import type { AvatarProps, AvatarSlots } from '../../src/runtime/components/Avatar.vue' import ComponentRender from '../component-render' import theme from '#build/ui/avatar' diff --git a/test/components/AvatarGroup.spec.ts b/test/components/AvatarGroup.spec.ts index 361da6eb..b849346a 100644 --- a/test/components/AvatarGroup.spec.ts +++ b/test/components/AvatarGroup.spec.ts @@ -1,7 +1,8 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' import Avatar from '../../src/runtime/components/Avatar.vue' -import AvatarGroup, { type AvatarGroupProps, type AvatarGroupSlots } from '../../src/runtime/components/AvatarGroup.vue' +import AvatarGroup from '../../src/runtime/components/AvatarGroup.vue' +import type { AvatarGroupProps, AvatarGroupSlots } from '../../src/runtime/components/AvatarGroup.vue' import ComponentRender from '../component-render' import theme from '#build/ui/avatar-group' diff --git a/test/components/Badge.spec.ts b/test/components/Badge.spec.ts index a9452e9e..2e6e36e6 100644 --- a/test/components/Badge.spec.ts +++ b/test/components/Badge.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Badge, { type BadgeProps, type BadgeSlots } from '../../src/runtime/components/Badge.vue' +import Badge from '../../src/runtime/components/Badge.vue' +import type { BadgeProps, BadgeSlots } from '../../src/runtime/components/Badge.vue' import ComponentRender from '../component-render' import theme from '#build/ui/badge' diff --git a/test/components/Breadcrumb.spec.ts b/test/components/Breadcrumb.spec.ts index d074f42a..bc2f8522 100644 --- a/test/components/Breadcrumb.spec.ts +++ b/test/components/Breadcrumb.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Breadcrumb, { type BreadcrumbProps, type BreadcrumbSlots } from '../../src/runtime/components/Breadcrumb.vue' +import Breadcrumb from '../../src/runtime/components/Breadcrumb.vue' +import type { BreadcrumbProps, BreadcrumbSlots } from '../../src/runtime/components/Breadcrumb.vue' import ComponentRender from '../component-render' describe('Breadcrumb', () => { diff --git a/test/components/Button.spec.ts b/test/components/Button.spec.ts index 39b361b9..95017543 100644 --- a/test/components/Button.spec.ts +++ b/test/components/Button.spec.ts @@ -1,6 +1,7 @@ import { ref } from 'vue' import { describe, it, expect, test } from 'vitest' -import Button, { type ButtonProps, type ButtonSlots } from '../../src/runtime/components/Button.vue' +import Button from '../../src/runtime/components/Button.vue' +import type { ButtonProps, ButtonSlots } from '../../src/runtime/components/Button.vue' import ComponentRender from '../component-render' import theme from '#build/ui/button' import { mountSuspended } from '@nuxt/test-utils/runtime' diff --git a/test/components/ButtonGroup.spec.ts b/test/components/ButtonGroup.spec.ts index f29e2dd5..510b455e 100644 --- a/test/components/ButtonGroup.spec.ts +++ b/test/components/ButtonGroup.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import ButtonGroup, { type ButtonGroupProps, type ButtonGroupSlots } from '../../src/runtime/components/ButtonGroup.vue' +import ButtonGroup from '../../src/runtime/components/ButtonGroup.vue' +import type { ButtonGroupProps, ButtonGroupSlots } from '../../src/runtime/components/ButtonGroup.vue' import ComponentRender from '../component-render' import { UInput, UButton } from '#components' import buttonTheme from '#build/ui/button' diff --git a/test/components/Calendar.spec.ts b/test/components/Calendar.spec.ts index 575f7d92..69933687 100644 --- a/test/components/Calendar.spec.ts +++ b/test/components/Calendar.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, vi, afterAll, test } from 'vitest' import { mountSuspended } from '@nuxt/test-utils/runtime' -import Calendar, { type CalendarProps, type CalendarSlots } from '../../src/runtime/components/Calendar.vue' +import Calendar from '../../src/runtime/components/Calendar.vue' +import type { CalendarProps, CalendarSlots } from '../../src/runtime/components/Calendar.vue' import ComponentRender from '../component-render' import theme from '#build/ui/calendar' import { CalendarDate } from '@internationalized/date' diff --git a/test/components/Card.spec.ts b/test/components/Card.spec.ts index c936c146..dfafab3d 100644 --- a/test/components/Card.spec.ts +++ b/test/components/Card.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Card, { type CardProps, type CardSlots } from '../../src/runtime/components/Card.vue' +import Card from '../../src/runtime/components/Card.vue' +import type { CardProps, CardSlots } from '../../src/runtime/components/Card.vue' import ComponentRender from '../component-render' import theme from '#build/ui/card' diff --git a/test/components/Carousel.spec.ts b/test/components/Carousel.spec.ts index 1fdda7f3..659cef61 100644 --- a/test/components/Carousel.spec.ts +++ b/test/components/Carousel.spec.ts @@ -1,6 +1,7 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' -import Carousel, { type CarouselProps, type CarouselSlots } from '../../src/runtime/components/Carousel.vue' +import Carousel from '../../src/runtime/components/Carousel.vue' +import type { CarouselProps, CarouselSlots } from '../../src/runtime/components/Carousel.vue' import ComponentRender from '../component-render' const CarouselWrapper = defineComponent({ diff --git a/test/components/Checkbox.spec.ts b/test/components/Checkbox.spec.ts index 4ac957b8..a02df044 100644 --- a/test/components/Checkbox.spec.ts +++ b/test/components/Checkbox.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import Checkbox, { type CheckboxProps, type CheckboxSlots } from '../../src/runtime/components/Checkbox.vue' +import Checkbox from '../../src/runtime/components/Checkbox.vue' +import type { CheckboxProps, CheckboxSlots } from '../../src/runtime/components/Checkbox.vue' import ComponentRender from '../component-render' import theme from '#build/ui/checkbox' import { renderForm } from '../utils/form' diff --git a/test/components/CheckboxGroup.spec.ts b/test/components/CheckboxGroup.spec.ts index 01cac48f..02500904 100644 --- a/test/components/CheckboxGroup.spec.ts +++ b/test/components/CheckboxGroup.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import CheckboxGroup, { type CheckboxGroupProps, type CheckboxGroupSlots } from '../../src/runtime/components/CheckboxGroup.vue' +import CheckboxGroup from '../../src/runtime/components/CheckboxGroup.vue' +import type { CheckboxGroupProps, CheckboxGroupSlots } from '../../src/runtime/components/CheckboxGroup.vue' import ComponentRender from '../component-render' import theme from '#build/ui/checkbox-group' import themeCheckbox from '#build/ui/checkbox' diff --git a/test/components/Chip.spec.ts b/test/components/Chip.spec.ts index b21dc048..60bbf0fe 100644 --- a/test/components/Chip.spec.ts +++ b/test/components/Chip.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Chip, { type ChipProps, type ChipSlots } from '../../src/runtime/components/Chip.vue' +import Chip from '../../src/runtime/components/Chip.vue' +import type { ChipProps, ChipSlots } from '../../src/runtime/components/Chip.vue' import ComponentRender from '../component-render' import theme from '#build/ui/chip' diff --git a/test/components/Collapsible.spec.ts b/test/components/Collapsible.spec.ts index 0d819451..0083699a 100644 --- a/test/components/Collapsible.spec.ts +++ b/test/components/Collapsible.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Collapsible, { type CollapsibleProps, type CollapsibleSlots } from '../../src/runtime/components/Collapsible.vue' +import Collapsible from '../../src/runtime/components/Collapsible.vue' +import type { CollapsibleProps, CollapsibleSlots } from '../../src/runtime/components/Collapsible.vue' import ComponentRender from '../component-render' describe('Collapsible', () => { diff --git a/test/components/ColorPicker.spec.ts b/test/components/ColorPicker.spec.ts index 46aa09dc..eddf7276 100644 --- a/test/components/ColorPicker.spec.ts +++ b/test/components/ColorPicker.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, test } from 'vitest' import { mountSuspended } from '@nuxt/test-utils/runtime' -import ColorPicker, { type ColorPickerProps } from '../../src/runtime/components/ColorPicker.vue' +import ColorPicker from '../../src/runtime/components/ColorPicker.vue' +import type { ColorPickerProps } from '../../src/runtime/components/ColorPicker.vue' import ComponentRender from '../component-render' import theme from '#build/ui/color-picker' diff --git a/test/components/CommandPalette.spec.ts b/test/components/CommandPalette.spec.ts index f9abaa6c..3fb72741 100644 --- a/test/components/CommandPalette.spec.ts +++ b/test/components/CommandPalette.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import CommandPalette, { type CommandPaletteProps, type CommandPaletteSlots } from '../../src/runtime/components/CommandPalette.vue' +import CommandPalette from '../../src/runtime/components/CommandPalette.vue' +import type { CommandPaletteProps, CommandPaletteSlots } from '../../src/runtime/components/CommandPalette.vue' import ComponentRender from '../component-render' describe('CommandPalette', () => { diff --git a/test/components/Container.spec.ts b/test/components/Container.spec.ts index b242d092..7eb0bfb3 100644 --- a/test/components/Container.spec.ts +++ b/test/components/Container.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Container, { type ContainerProps, type ContainerSlots } from '../../src/runtime/components/Container.vue' +import Container from '../../src/runtime/components/Container.vue' +import type { ContainerProps, ContainerSlots } from '../../src/runtime/components/Container.vue' import ComponentRender from '../component-render' describe('Container', () => { diff --git a/test/components/ContextMenu.spec.ts b/test/components/ContextMenu.spec.ts index 10201ba3..b19aa6f2 100644 --- a/test/components/ContextMenu.spec.ts +++ b/test/components/ContextMenu.spec.ts @@ -1,6 +1,7 @@ import { h, defineComponent } from 'vue' import { describe, it, expect, test } from 'vitest' -import ContextMenu, { type ContextMenuProps, type ContextMenuSlots } from '../../src/runtime/components/ContextMenu.vue' +import ContextMenu from '../../src/runtime/components/ContextMenu.vue' +import type { ContextMenuProps, ContextMenuSlots } from '../../src/runtime/components/ContextMenu.vue' import theme from '#build/ui/context-menu' import { mountSuspended } from '@nuxt/test-utils/runtime' import { expectSlotProps } from '../utils/types' diff --git a/test/components/Drawer.spec.ts b/test/components/Drawer.spec.ts index 9505bc78..970fb5a9 100644 --- a/test/components/Drawer.spec.ts +++ b/test/components/Drawer.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Drawer, { type DrawerProps, type DrawerSlots } from '../../src/runtime/components/Drawer.vue' +import Drawer from '../../src/runtime/components/Drawer.vue' +import type { DrawerProps, DrawerSlots } from '../../src/runtime/components/Drawer.vue' import ComponentRender from '../component-render' import theme from '#build/ui/drawer' diff --git a/test/components/DropdownMenu.spec.ts b/test/components/DropdownMenu.spec.ts index f9406b06..59b5807c 100644 --- a/test/components/DropdownMenu.spec.ts +++ b/test/components/DropdownMenu.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import DropdownMenu, { type DropdownMenuProps, type DropdownMenuSlots } from '../../src/runtime/components/DropdownMenu.vue' +import DropdownMenu from '../../src/runtime/components/DropdownMenu.vue' +import type { DropdownMenuProps, DropdownMenuSlots } from '../../src/runtime/components/DropdownMenu.vue' import ComponentRender from '../component-render' import theme from '#build/ui/dropdown-menu' import { expectSlotProps } from '../utils/types' diff --git a/test/components/Input.spec.ts b/test/components/Input.spec.ts index f655cdd5..e7eb2590 100644 --- a/test/components/Input.spec.ts +++ b/test/components/Input.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, test } from 'vitest' import { mount } from '@vue/test-utils' -import Input, { type InputProps, type InputSlots } from '../../src/runtime/components/Input.vue' +import Input from '../../src/runtime/components/Input.vue' +import type { InputProps, InputSlots } from '../../src/runtime/components/Input.vue' import ComponentRender from '../component-render' import theme from '#build/ui/input' diff --git a/test/components/InputMenu.spec.ts b/test/components/InputMenu.spec.ts index dd2f1d5c..3e644ac3 100644 --- a/test/components/InputMenu.spec.ts +++ b/test/components/InputMenu.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import InputMenu, { type InputMenuProps, type InputMenuSlots } from '../../src/runtime/components/InputMenu.vue' +import InputMenu from '../../src/runtime/components/InputMenu.vue' +import type { InputMenuProps, InputMenuSlots } from '../../src/runtime/components/InputMenu.vue' import ComponentRender from '../component-render' import theme from '#build/ui/input' import { renderForm } from '../utils/form' diff --git a/test/components/InputNumber.spec.ts b/test/components/InputNumber.spec.ts index 9f2d6754..3c6382a9 100644 --- a/test/components/InputNumber.spec.ts +++ b/test/components/InputNumber.spec.ts @@ -2,7 +2,8 @@ import { describe, it, expect, test } from 'vitest' import { flushPromises } from '@vue/test-utils' import { mountSuspended } from '@nuxt/test-utils/runtime' import { reactive } from 'vue' -import InputNumber, { type InputNumberProps, type InputNumberSlots } from '../../src/runtime/components/InputNumber.vue' +import InputNumber from '../../src/runtime/components/InputNumber.vue' +import type { InputNumberProps, InputNumberSlots } from '../../src/runtime/components/InputNumber.vue' import ComponentRender from '../component-render' import theme from '#build/ui/input-number' import type { FormInputEvents } from '~/src/module' diff --git a/test/components/InputTags.spec.ts b/test/components/InputTags.spec.ts index 54bc658b..04390263 100644 --- a/test/components/InputTags.spec.ts +++ b/test/components/InputTags.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect } from 'vitest' import theme from '#build/ui/input' -import InputTags, { type InputTagsProps, type InputTagsSlots } from '../../src/runtime/components/InputTags.vue' +import InputTags from '../../src/runtime/components/InputTags.vue' +import type { InputTagsProps, InputTagsSlots } from '../../src/runtime/components/InputTags.vue' import ComponentRender from '../component-render' describe('InputTags', () => { diff --git a/test/components/Kbd.spec.ts b/test/components/Kbd.spec.ts index d6174cff..e9dfe15f 100644 --- a/test/components/Kbd.spec.ts +++ b/test/components/Kbd.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Kbd, { type KbdProps, type KbdSlots } from '../../src/runtime/components/Kbd.vue' +import Kbd from '../../src/runtime/components/Kbd.vue' +import type { KbdProps, KbdSlots } from '../../src/runtime/components/Kbd.vue' import ComponentRender from '../component-render' import theme from '#build/ui/kbd' diff --git a/test/components/Modal.spec.ts b/test/components/Modal.spec.ts index fdd8ff2e..1ce23dea 100644 --- a/test/components/Modal.spec.ts +++ b/test/components/Modal.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Modal, { type ModalProps, type ModalSlots } from '../../src/runtime/components/Modal.vue' +import Modal from '../../src/runtime/components/Modal.vue' +import type { ModalProps, ModalSlots } from '../../src/runtime/components/Modal.vue' import ComponentRender from '../component-render' describe('Modal', () => { diff --git a/test/components/NavigationMenu.spec.ts b/test/components/NavigationMenu.spec.ts index ca5326fe..94d883fb 100644 --- a/test/components/NavigationMenu.spec.ts +++ b/test/components/NavigationMenu.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import NavigationMenu, { type NavigationMenuProps, type NavigationMenuSlots } from '../../src/runtime/components/NavigationMenu.vue' +import NavigationMenu from '../../src/runtime/components/NavigationMenu.vue' +import type { NavigationMenuProps, NavigationMenuSlots } from '../../src/runtime/components/NavigationMenu.vue' import ComponentRender from '../component-render' import theme from '#build/ui/navigation-menu' import { expectSlotProps } from '../utils/types' diff --git a/test/components/Pagination.spec.ts b/test/components/Pagination.spec.ts index 1a1fda01..2f939e58 100644 --- a/test/components/Pagination.spec.ts +++ b/test/components/Pagination.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Pagination, { type PaginationProps, type PaginationSlots } from '../../src/runtime/components/Pagination.vue' +import Pagination from '../../src/runtime/components/Pagination.vue' +import type { PaginationProps, PaginationSlots } from '../../src/runtime/components/Pagination.vue' import ComponentRender from '../component-render' import theme from '#build/ui/button' diff --git a/test/components/PinInput.spec.ts b/test/components/PinInput.spec.ts index 771bbb8c..6ff74eda 100644 --- a/test/components/PinInput.spec.ts +++ b/test/components/PinInput.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, test } from 'vitest' import { flushPromises, mount } from '@vue/test-utils' -import PinInput, { type PinInputProps } from '../../src/runtime/components/PinInput.vue' +import PinInput from '../../src/runtime/components/PinInput.vue' +import type { PinInputProps } from '../../src/runtime/components/PinInput.vue' import ComponentRender from '../component-render' import theme from '#build/ui/pin-input' diff --git a/test/components/Popover.spec.ts b/test/components/Popover.spec.ts index 885f0c7b..33a0b8d3 100644 --- a/test/components/Popover.spec.ts +++ b/test/components/Popover.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Popover, { type PopoverProps, type PopoverSlots } from '../../src/runtime/components/Popover.vue' +import Popover from '../../src/runtime/components/Popover.vue' +import type { PopoverProps, PopoverSlots } from '../../src/runtime/components/Popover.vue' import ComponentRender from '../component-render' describe('Popover', () => { diff --git a/test/components/Progress.spec.ts b/test/components/Progress.spec.ts index aba394de..91720e94 100644 --- a/test/components/Progress.spec.ts +++ b/test/components/Progress.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Progress, { type ProgressProps, type ProgressSlots } from '../../src/runtime/components/Progress.vue' +import Progress from '../../src/runtime/components/Progress.vue' +import type { ProgressProps, ProgressSlots } from '../../src/runtime/components/Progress.vue' import ComponentRender from '../component-render' import theme from '#build/ui/progress' diff --git a/test/components/RadioGroup.spec.ts b/test/components/RadioGroup.spec.ts index d0be84a9..663442f9 100644 --- a/test/components/RadioGroup.spec.ts +++ b/test/components/RadioGroup.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import RadioGroup, { type RadioGroupProps, type RadioGroupSlots } from '../../src/runtime/components/RadioGroup.vue' +import RadioGroup from '../../src/runtime/components/RadioGroup.vue' +import type { RadioGroupProps, RadioGroupSlots } from '../../src/runtime/components/RadioGroup.vue' import ComponentRender from '../component-render' import theme from '#build/ui/radio-group' import { flushPromises, mount } from '@vue/test-utils' diff --git a/test/components/Select.spec.ts b/test/components/Select.spec.ts index 9231cd6e..564c160e 100644 --- a/test/components/Select.spec.ts +++ b/test/components/Select.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, test } from 'vitest' import { flushPromises, mount } from '@vue/test-utils' -import Select, { type SelectProps, type SelectSlots } from '../../src/runtime/components/Select.vue' +import Select from '../../src/runtime/components/Select.vue' +import type { SelectProps, SelectSlots } from '../../src/runtime/components/Select.vue' import ComponentRender from '../component-render' import theme from '#build/ui/input' import { renderForm } from '../utils/form' diff --git a/test/components/SelectMenu.spec.ts b/test/components/SelectMenu.spec.ts index e843735e..9ac2b34c 100644 --- a/test/components/SelectMenu.spec.ts +++ b/test/components/SelectMenu.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import SelectMenu, { type SelectMenuProps, type SelectMenuSlots } from '../../src/runtime/components/SelectMenu.vue' +import SelectMenu from '../../src/runtime/components/SelectMenu.vue' +import type { SelectMenuProps, SelectMenuSlots } from '../../src/runtime/components/SelectMenu.vue' import ComponentRender from '../component-render' import theme from '#build/ui/input' import { renderForm } from '../utils/form' diff --git a/test/components/Separator.spec.ts b/test/components/Separator.spec.ts index b5160617..236a9a24 100644 --- a/test/components/Separator.spec.ts +++ b/test/components/Separator.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Separator, { type SeparatorProps, type SeparatorSlots } from '../../src/runtime/components/Separator.vue' +import Separator from '../../src/runtime/components/Separator.vue' +import type { SeparatorProps, SeparatorSlots } from '../../src/runtime/components/Separator.vue' import ComponentRender from '../component-render' import theme from '#build/ui/separator' diff --git a/test/components/Skeleton.spec.ts b/test/components/Skeleton.spec.ts index 1a382d8d..b1a3d3ac 100644 --- a/test/components/Skeleton.spec.ts +++ b/test/components/Skeleton.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Skeleton, { type SkeletonProps } from '../../src/runtime/components/Skeleton.vue' +import Skeleton from '../../src/runtime/components/Skeleton.vue' +import type { SkeletonProps } from '../../src/runtime/components/Skeleton.vue' import ComponentRender from '../component-render' describe('Skeleton', () => { diff --git a/test/components/Slideover.spec.ts b/test/components/Slideover.spec.ts index fec119dc..81dfb8e0 100644 --- a/test/components/Slideover.spec.ts +++ b/test/components/Slideover.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Slideover, { type SlideoverProps, type SlideoverSlots } from '../../src/runtime/components/Slideover.vue' +import Slideover from '../../src/runtime/components/Slideover.vue' +import type { SlideoverProps, SlideoverSlots } from '../../src/runtime/components/Slideover.vue' import ComponentRender from '../component-render' describe('Slideover', () => { diff --git a/test/components/Slider.spec.ts b/test/components/Slider.spec.ts index 435edfe8..71cd2e1d 100644 --- a/test/components/Slider.spec.ts +++ b/test/components/Slider.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import Slider, { type SliderProps } from '../../src/runtime/components/Slider.vue' +import Slider from '../../src/runtime/components/Slider.vue' +import type { SliderProps } from '../../src/runtime/components/Slider.vue' import ComponentRender from '../component-render' import theme from '#build/ui/slider' import { flushPromises, mount } from '@vue/test-utils' diff --git a/test/components/Stepper.spec.ts b/test/components/Stepper.spec.ts index fd3fe6af..eb47350d 100644 --- a/test/components/Stepper.spec.ts +++ b/test/components/Stepper.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Stepper, { type StepperProps, type StepperSlots } from '../../src/runtime/components/Stepper.vue' +import Stepper from '../../src/runtime/components/Stepper.vue' +import type { StepperProps, StepperSlots } from '../../src/runtime/components/Stepper.vue' import ComponentRender from '../component-render' import theme from '#build/ui/stepper' diff --git a/test/components/Switch.spec.ts b/test/components/Switch.spec.ts index 59cb75a4..2442bdc1 100644 --- a/test/components/Switch.spec.ts +++ b/test/components/Switch.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import Switch, { type SwitchProps, type SwitchSlots } from '../../src/runtime/components/Switch.vue' +import Switch from '../../src/runtime/components/Switch.vue' +import type { SwitchProps, SwitchSlots } from '../../src/runtime/components/Switch.vue' import ComponentRender from '../component-render' import theme from '#build/ui/switch' import { flushPromises, mount } from '@vue/test-utils' diff --git a/test/components/Table.spec.ts b/test/components/Table.spec.ts index 91ca7a52..a0590c76 100644 --- a/test/components/Table.spec.ts +++ b/test/components/Table.spec.ts @@ -3,7 +3,8 @@ import { describe, it, expect } from 'vitest' import { flushPromises } from '@vue/test-utils' import { mountSuspended } from '@nuxt/test-utils/runtime' import { UCheckbox, UButton, UBadge, UDropdownMenu } from '#components' -import Table, { type TableProps, type TableSlots, type TableColumn } from '../../src/runtime/components/Table.vue' +import Table from '../../src/runtime/components/Table.vue' +import type { TableProps, TableSlots, TableColumn, TableRow } from '../../src/runtime/components/Table.vue' import ComponentRender from '../component-render' import theme from '#build/ui/table' @@ -98,6 +99,16 @@ describe('Table', () => { }, { accessorKey: 'amount', header: () => h('div', { class: 'text-right' }, 'Amount'), + footer: ({ column }) => { + const total = column.getFacetedRowModel().rows.reduce((acc: number, row: TableRow) => acc + Number.parseFloat(row.getValue('amount')), 0) + + const formatted = new Intl.NumberFormat('en-US', { + style: 'currency', + currency: 'EUR' + }).format(total) + + return h('div', { class: 'text-right font-medium' }, `Total: ${formatted}`) + }, cell: ({ row }) => { const amount = Number.parseFloat(row.getValue('amount')) diff --git a/test/components/Tabs.spec.ts b/test/components/Tabs.spec.ts index 13d5fe74..e72a98e9 100644 --- a/test/components/Tabs.spec.ts +++ b/test/components/Tabs.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Tabs, { type TabsProps, type TabsSlots } from '../../src/runtime/components/Tabs.vue' +import Tabs from '../../src/runtime/components/Tabs.vue' +import type { TabsProps, TabsSlots } from '../../src/runtime/components/Tabs.vue' import ComponentRender from '../component-render' import theme from '#build/ui/tabs' diff --git a/test/components/Textarea.spec.ts b/test/components/Textarea.spec.ts index 90280b21..445c78cf 100644 --- a/test/components/Textarea.spec.ts +++ b/test/components/Textarea.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, test } from 'vitest' import { mount } from '@vue/test-utils' -import Textarea, { type TextareaProps, type TextareaSlots } from '../../src/runtime/components/Textarea.vue' +import Textarea from '../../src/runtime/components/Textarea.vue' +import type { TextareaProps, TextareaSlots } from '../../src/runtime/components/Textarea.vue' import ComponentRender from '../component-render' import theme from '#build/ui/textarea' import { renderForm } from '../utils/form' diff --git a/test/components/Timeline.spec.ts b/test/components/Timeline.spec.ts index 12f028f5..0ecd80f3 100644 --- a/test/components/Timeline.spec.ts +++ b/test/components/Timeline.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from 'vitest' -import Timeline, { type TimelineProps, type TimelineSlots } from '../../src/runtime/components/Timeline.vue' +import Timeline from '../../src/runtime/components/Timeline.vue' +import type { TimelineProps, TimelineSlots } from '../../src/runtime/components/Timeline.vue' import ComponentRender from '../component-render' import theme from '#build/ui/timeline' diff --git a/test/components/Toast.spec.ts b/test/components/Toast.spec.ts index f96c9cd1..012110f4 100644 --- a/test/components/Toast.spec.ts +++ b/test/components/Toast.spec.ts @@ -1,7 +1,8 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' import Toaster from '../../src/runtime/components/Toaster.vue' -import Toast, { type ToastProps, type ToastSlots } from '../../src/runtime/components/Toast.vue' +import Toast from '../../src/runtime/components/Toast.vue' +import type { ToastProps, ToastSlots } from '../../src/runtime/components/Toast.vue' import ComponentRender from '../component-render' import { ClientOnly } from '#components' diff --git a/test/components/Tooltip.spec.ts b/test/components/Tooltip.spec.ts index 9a646696..96621d4c 100644 --- a/test/components/Tooltip.spec.ts +++ b/test/components/Tooltip.spec.ts @@ -1,7 +1,8 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' import { TooltipProvider } from 'reka-ui' -import Tooltip, { type TooltipProps, type TooltipSlots } from '../../src/runtime/components/Tooltip.vue' +import Tooltip from '../../src/runtime/components/Tooltip.vue' +import type { TooltipProps, TooltipSlots } from '../../src/runtime/components/Tooltip.vue' import ComponentRender from '../component-render' const TooltipWrapper = defineComponent({ diff --git a/test/components/Tree.spec.ts b/test/components/Tree.spec.ts index 01e6617d..9339c282 100644 --- a/test/components/Tree.spec.ts +++ b/test/components/Tree.spec.ts @@ -1,5 +1,6 @@ import { describe, it, expect, test } from 'vitest' -import Tree, { type TreeProps, type TreeSlots, type TreeItem } from '../../src/runtime/components/Tree.vue' +import Tree from '../../src/runtime/components/Tree.vue' +import type { TreeProps, TreeSlots, TreeItem } from '../../src/runtime/components/Tree.vue' import ComponentRender from '../component-render' import theme from '#build/ui/tree' import { expectEmitPayloadType } from '../utils/types' diff --git a/test/components/__snapshots__/Table-vue.spec.ts.snap b/test/components/__snapshots__/Table-vue.spec.ts.snap index b28ae606..cbff99fa 100644 --- a/test/components/__snapshots__/Table-vue.spec.ts.snap +++ b/test/components/__snapshots__/Table-vue.spec.ts.snap @@ -50,6 +50,7 @@ exports[`Table > renders with as correctly 1`] = ` + " `; @@ -104,6 +105,7 @@ exports[`Table > renders with body-bottom slot correctly 1`] = ` Body bottom slot + " `; @@ -157,6 +159,7 @@ exports[`Table > renders with body-top slot correctly 1`] = ` + " `; @@ -211,6 +214,7 @@ exports[`Table > renders with caption correctly 1`] = ` + " `; @@ -265,6 +269,7 @@ exports[`Table > renders with caption slot correctly 1`] = ` + " `; @@ -319,6 +324,7 @@ exports[`Table > renders with cell slot correctly 1`] = ` + " `; @@ -373,6 +379,7 @@ exports[`Table > renders with class correctly 1`] = ` + " `; @@ -564,6 +571,32 @@ exports[`Table > renders with columns correctly 1`] = ` + + + + + + + + + + + + + + + + + + + +
Total: €2,990.00
+ + + + + + " `; @@ -618,6 +651,7 @@ exports[`Table > renders with data correctly 1`] = ` + " `; @@ -635,6 +669,7 @@ exports[`Table > renders with empty correctly 1`] = ` There is no data + " `; @@ -674,6 +709,32 @@ exports[`Table > renders with empty slot correctly 1`] = ` Empty slot + + + + + + + + + + + + + + + + + + + +
Total: €0.00
+ + + + + + " `; @@ -728,6 +789,7 @@ exports[`Table > renders with expanded slot correctly 1`] = ` + " `; @@ -782,6 +844,7 @@ exports[`Table > renders with header slot correctly 1`] = ` + " `; @@ -836,6 +899,7 @@ exports[`Table > renders with loading animation carousel correctly 1`] = ` + " `; @@ -890,6 +954,7 @@ exports[`Table > renders with loading animation carousel-inverse correctly 1`] = + " `; @@ -944,6 +1009,7 @@ exports[`Table > renders with loading animation elastic correctly 1`] = ` + " `; @@ -998,6 +1064,7 @@ exports[`Table > renders with loading animation swing correctly 1`] = ` + " `; @@ -1052,6 +1119,7 @@ exports[`Table > renders with loading color error correctly 1`] = ` + " `; @@ -1106,6 +1174,7 @@ exports[`Table > renders with loading color info correctly 1`] = ` + " `; @@ -1160,6 +1229,7 @@ exports[`Table > renders with loading color neutral correctly 1`] = ` + " `; @@ -1214,6 +1284,7 @@ exports[`Table > renders with loading color primary correctly 1`] = ` + " `; @@ -1268,6 +1339,7 @@ exports[`Table > renders with loading color secondary correctly 1`] = ` + " `; @@ -1322,6 +1394,7 @@ exports[`Table > renders with loading color success correctly 1`] = ` + " `; @@ -1376,6 +1449,7 @@ exports[`Table > renders with loading color warning correctly 1`] = ` + " `; @@ -1430,6 +1504,7 @@ exports[`Table > renders with loading correctly 1`] = ` + " `; @@ -1469,6 +1544,32 @@ exports[`Table > renders with loading slot correctly 1`] = ` Loading slot + + + + + + + + + + + + + + + + + + + +
Total: €0.00
+ + + + + + " `; @@ -1523,6 +1624,7 @@ exports[`Table > renders with sticky correctly 1`] = ` + " `; @@ -1577,6 +1679,7 @@ exports[`Table > renders with ui correctly 1`] = ` + " `; @@ -1594,6 +1697,7 @@ exports[`Table > renders without data correctly 1`] = ` No data + " `; diff --git a/test/components/__snapshots__/Table.spec.ts.snap b/test/components/__snapshots__/Table.spec.ts.snap index 8d1b9fe8..ee61ab7a 100644 --- a/test/components/__snapshots__/Table.spec.ts.snap +++ b/test/components/__snapshots__/Table.spec.ts.snap @@ -50,6 +50,7 @@ exports[`Table > renders with as correctly 1`] = ` + " `; @@ -104,6 +105,7 @@ exports[`Table > renders with body-bottom slot correctly 1`] = ` Body bottom slot + " `; @@ -157,6 +159,7 @@ exports[`Table > renders with body-top slot correctly 1`] = ` + " `; @@ -211,6 +214,7 @@ exports[`Table > renders with caption correctly 1`] = ` + " `; @@ -265,6 +269,7 @@ exports[`Table > renders with caption slot correctly 1`] = ` + " `; @@ -319,6 +324,7 @@ exports[`Table > renders with cell slot correctly 1`] = ` + " `; @@ -373,6 +379,7 @@ exports[`Table > renders with class correctly 1`] = ` + " `; @@ -564,6 +571,32 @@ exports[`Table > renders with columns correctly 1`] = ` + + + + + + + + + + + + + + + + + + + +
Total: €2,990.00
+ + + + + + " `; @@ -618,6 +651,7 @@ exports[`Table > renders with data correctly 1`] = ` + " `; @@ -635,6 +669,7 @@ exports[`Table > renders with empty correctly 1`] = ` There is no data + " `; @@ -674,6 +709,32 @@ exports[`Table > renders with empty slot correctly 1`] = ` Empty slot + + + + + + + + + + + + + + + + + + + +
Total: €0.00
+ + + + + + " `; @@ -728,6 +789,7 @@ exports[`Table > renders with expanded slot correctly 1`] = ` + " `; @@ -782,6 +844,7 @@ exports[`Table > renders with header slot correctly 1`] = ` + " `; @@ -836,6 +899,7 @@ exports[`Table > renders with loading animation carousel correctly 1`] = ` + " `; @@ -890,6 +954,7 @@ exports[`Table > renders with loading animation carousel-inverse correctly 1`] = + " `; @@ -944,6 +1009,7 @@ exports[`Table > renders with loading animation elastic correctly 1`] = ` + " `; @@ -998,6 +1064,7 @@ exports[`Table > renders with loading animation swing correctly 1`] = ` + " `; @@ -1052,6 +1119,7 @@ exports[`Table > renders with loading color error correctly 1`] = ` + " `; @@ -1106,6 +1174,7 @@ exports[`Table > renders with loading color info correctly 1`] = ` + " `; @@ -1160,6 +1229,7 @@ exports[`Table > renders with loading color neutral correctly 1`] = ` + " `; @@ -1214,6 +1284,7 @@ exports[`Table > renders with loading color primary correctly 1`] = ` + " `; @@ -1268,6 +1339,7 @@ exports[`Table > renders with loading color secondary correctly 1`] = ` + " `; @@ -1322,6 +1394,7 @@ exports[`Table > renders with loading color success correctly 1`] = ` + " `; @@ -1376,6 +1449,7 @@ exports[`Table > renders with loading color warning correctly 1`] = ` + " `; @@ -1430,6 +1504,7 @@ exports[`Table > renders with loading correctly 1`] = ` + " `; @@ -1469,6 +1544,32 @@ exports[`Table > renders with loading slot correctly 1`] = ` Loading slot + + + + + + + + + + + + + + + + + + + +
Total: €0.00
+ + + + + + " `; @@ -1523,6 +1624,7 @@ exports[`Table > renders with sticky correctly 1`] = ` + " `; @@ -1577,6 +1679,7 @@ exports[`Table > renders with ui correctly 1`] = ` + " `; @@ -1594,6 +1697,7 @@ exports[`Table > renders without data correctly 1`] = ` No data + " `;