diff --git a/playground/app/pages/alert.vue b/playground/app/pages/alert.vue index 7214b9c5..fd5202eb 100644 --- a/playground/app/pages/alert.vue +++ b/playground/app/pages/alert.vue @@ -1,7 +1,7 @@ - + - + - + - + - + @@ -29,7 +29,7 @@ const sizes = Object.keys(theme.variants.size) - + diff --git a/playground/app/pages/badge.vue b/playground/app/pages/badge.vue index 292b55ea..f709bbd6 100644 --- a/playground/app/pages/badge.vue +++ b/playground/app/pages/badge.vue @@ -1,8 +1,8 @@ @@ -13,7 +13,7 @@ const variants = Object.keys(theme.variants.variant) - + @@ -25,7 +25,7 @@ const variants = Object.keys(theme.variants.variant) - + diff --git a/playground/app/pages/button-group.vue b/playground/app/pages/button-group.vue index b7f79012..647a77c7 100644 --- a/playground/app/pages/button-group.vue +++ b/playground/app/pages/button-group.vue @@ -1,7 +1,7 @@ @@ -46,7 +46,7 @@ const sizes = Object.keys(theme.variants.size) - + Click me! diff --git a/playground/app/pages/button.vue b/playground/app/pages/button.vue index 4a2621ba..6130ee76 100644 --- a/playground/app/pages/button.vue +++ b/playground/app/pages/button.vue @@ -1,8 +1,8 @@ @@ -28,7 +28,7 @@ const variants = Object.keys(theme.variants.variant) - + @@ -46,10 +46,10 @@ const variants = Object.keys(theme.variants.variant) - + - + - + diff --git a/playground/app/pages/checkbox.vue b/playground/app/pages/checkbox.vue index 2efae856..13210311 100644 --- a/playground/app/pages/checkbox.vue +++ b/playground/app/pages/checkbox.vue @@ -1,7 +1,7 @@ @@ -18,10 +18,10 @@ const checked = ref(false) - + - + diff --git a/playground/app/pages/chip.vue b/playground/app/pages/chip.vue index 582bb4c6..ae831fe6 100644 --- a/playground/app/pages/chip.vue +++ b/playground/app/pages/chip.vue @@ -1,8 +1,8 @@ @@ -26,7 +26,7 @@ const sizes = Object.keys(theme.variants.size) v-for="size in sizes" :key="size" placeholder="Search..." - :size="(size as any)" + :size="size" class="w-60" /> @@ -36,7 +36,7 @@ const sizes = Object.keys(theme.variants.size) :key="size" icon="i-heroicons-magnifying-glass" placeholder="Search..." - :size="(size as any)" + :size="size" class="w-60" /> @@ -47,7 +47,7 @@ const sizes = Object.keys(theme.variants.size) icon="i-heroicons-magnifying-glass" trailing placeholder="Search..." - :size="(size as any)" + :size="size" class="w-60" /> diff --git a/playground/app/pages/kbd.vue b/playground/app/pages/kbd.vue index 55834351..7a894a41 100644 --- a/playground/app/pages/kbd.vue +++ b/playground/app/pages/kbd.vue @@ -2,7 +2,8 @@ import theme from '#build/ui/kbd' import { kbdKeysMap } from '@nuxt/ui/runtime/composables/useKbd.js' -const sizes = Object.keys(theme.variants.size) +const sizes = Object.keys(theme.variants.size) as Array + const kbdKeys = Object.keys(kbdKeysMap) @@ -21,7 +22,7 @@ const kbdKeys = Object.keys(kbdKeysMap) - + diff --git a/playground/app/pages/modal.vue b/playground/app/pages/modal.vue index af585ebf..38defc58 100644 --- a/playground/app/pages/modal.vue +++ b/playground/app/pages/modal.vue @@ -2,11 +2,13 @@ import { LazyModalProgrammaticExample } from '#components' const open = ref(false) +const count = ref(0) const modal = useModal() -const count = ref(0) -const openModal = () => { + +function openModal() { count.value++ + modal.open(LazyModalProgrammaticExample, { description: 'And you can even provide a description !', count: count.value diff --git a/playground/app/pages/progress.vue b/playground/app/pages/progress.vue index f2532745..42537ca9 100644 --- a/playground/app/pages/progress.vue +++ b/playground/app/pages/progress.vue @@ -2,7 +2,7 @@ import { onMounted, ref } from 'vue' import theme from '#build/ui/progress' -const sizes = Object.keys(theme.variants.size) +const sizes = Object.keys(theme.variants.size) as Array const value1 = ref(0) const value2 = ref(0) @@ -43,7 +43,7 @@ onMounted(() => { - + @@ -63,7 +63,7 @@ onMounted(() => { - + diff --git a/playground/app/pages/radio-group.vue b/playground/app/pages/radio-group.vue index a94b05ee..7fb5840d 100644 --- a/playground/app/pages/radio-group.vue +++ b/playground/app/pages/radio-group.vue @@ -1,7 +1,7 @@ @@ -49,8 +57,6 @@ const { data: users, pending } = await useFetch('https://jsonplaceholder.typicod - - @@ -66,24 +72,33 @@ const { data: users, pending } = await useFetch('https://jsonplaceholder.typicod + > + + + + + > + + + + diff --git a/playground/app/pages/slideover.vue b/playground/app/pages/slideover.vue index f77983cc..9084ae8e 100644 --- a/playground/app/pages/slideover.vue +++ b/playground/app/pages/slideover.vue @@ -2,11 +2,13 @@ import { LazySlideoverProgrammaticExample } from '#components' const open = ref(false) +const count = ref(0) const slideover = useSlideover() -const count = ref(0) -const openSlideover = () => { + +function openSlideover() { count.value++ + slideover.open(LazySlideoverProgrammaticExample, { description: 'And you can even provide a description!', count: count.value diff --git a/playground/app/pages/slider.vue b/playground/app/pages/slider.vue index 0b2aa67d..befc1b39 100644 --- a/playground/app/pages/slider.vue +++ b/playground/app/pages/slider.vue @@ -1,7 +1,7 @@ @@ -26,7 +26,7 @@ const value = ref(50) - + diff --git a/playground/app/pages/switch.vue b/playground/app/pages/switch.vue index 873e4d0b..e9caca67 100644 --- a/playground/app/pages/switch.vue +++ b/playground/app/pages/switch.vue @@ -1,7 +1,7 @@ @@ -17,13 +17,13 @@ const checked = ref(false) - + @@ -53,7 +53,7 @@ const checked = ref(false) import theme from '#build/ui/textarea' -const sizes = Object.keys(theme.variants.size) +const sizes = Object.keys(theme.variants.size) as Array @@ -15,7 +15,7 @@ const sizes = Object.keys(theme.variants.size) - + diff --git a/src/runtime/components/Checkbox.vue b/src/runtime/components/Checkbox.vue index 597ae4e4..634a0bcd 100644 --- a/src/runtime/components/Checkbox.vue +++ b/src/runtime/components/Checkbox.vue @@ -83,6 +83,7 @@ const ui = computed(() => tv({ extend: checkbox, slots: props.ui })({ })) function onUpdate(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) emitFormChange() diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 334206f0..311026df 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -262,7 +262,7 @@ const groups = computed(() => { - + diff --git a/src/runtime/components/DropdownMenu.vue b/src/runtime/components/DropdownMenu.vue index 50159d3f..025e9167 100644 --- a/src/runtime/components/DropdownMenu.vue +++ b/src/runtime/components/DropdownMenu.vue @@ -29,10 +29,10 @@ export interface DropdownMenuItem extends Omit, Pi select?(e: Event): void } -type DropdownVariants = VariantProps +type DropdownMenuVariants = VariantProps export interface DropdownMenuProps extends Omit, Pick { - size?: DropdownVariants['size'] + size?: DropdownMenuVariants['size'] items?: T[] | T[][] /** * The content of the menu. diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index 4b204985..de5ad280 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -94,8 +94,8 @@ export type InputMenuEmits = ComboboxRootEmits & { type SlotProps = (props: { item: T, index: number }) => any export type InputMenuSlots = { - 'leading'(props: { modelValue: T, open: boolean }): any - 'trailing'(props: { modelValue: T, open: boolean }): any + 'leading'(props: { modelValue: T, open: boolean, ui: any }): any + 'trailing'(props: { modelValue: T, open: boolean, ui: any }): any 'empty'(props: { searchTerm?: string }): any 'item': SlotProps 'item-leading': SlotProps @@ -193,6 +193,7 @@ onMounted(() => { }) function onUpdate(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) emitFormChange() @@ -280,13 +281,13 @@ function onUpdateOpen(value: boolean) { /> - + - + @@ -334,7 +335,7 @@ function onUpdateOpen(value: boolean) { - + diff --git a/src/runtime/components/RadioGroup.vue b/src/runtime/components/RadioGroup.vue index aa4b8cff..7b0734f3 100644 --- a/src/runtime/components/RadioGroup.vue +++ b/src/runtime/components/RadioGroup.vue @@ -95,6 +95,7 @@ const normalizedItems = computed(() => { }) function onUpdate(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) emitFormChange() diff --git a/src/runtime/components/Select.vue b/src/runtime/components/Select.vue index 0790e0f9..78161b57 100644 --- a/src/runtime/components/Select.vue +++ b/src/runtime/components/Select.vue @@ -72,8 +72,8 @@ export type SelectEmits = SelectRootEmits & { type SlotProps = (props: { item: T, index: number }) => any export interface SelectSlots { - 'leading'(props: { modelValue: string, open: boolean }): any - 'trailing'(props: { modelValue: string, open: boolean }): any + 'leading'(props: { modelValue: string, open: boolean, ui: any }): any + 'trailing'(props: { modelValue: string, open: boolean, ui: any }): any 'item': SlotProps 'item-leading': SlotProps 'item-label': SlotProps @@ -118,6 +118,7 @@ const ui = computed(() => tv({ extend: select, slots: props.ui })({ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0]) ? props.items : [props.items]) as SelectItem[][] : []) function onUpdate(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) @@ -148,7 +149,7 @@ function onUpdateOpen(value: boolean) { > - + @@ -156,7 +157,7 @@ function onUpdateOpen(value: boolean) { - + @@ -174,11 +175,11 @@ function onUpdateOpen(value: boolean) { - + - + diff --git a/src/runtime/components/SelectMenu.vue b/src/runtime/components/SelectMenu.vue index ebba713b..c5bc2532 100644 --- a/src/runtime/components/SelectMenu.vue +++ b/src/runtime/components/SelectMenu.vue @@ -81,9 +81,9 @@ export type SelectMenuEmits = ComboboxRootEmits & { type SlotProps = (props: { item: T, index: number }) => any export type SelectMenuSlots = { - 'leading'(props: { modelValue: T, open: boolean }): any + 'leading'(props: { modelValue: T, open: boolean, ui: any }): any 'default'(props: { modelValue: T, open: boolean }): any - 'trailing'(props: { modelValue: T, open: boolean }): any + 'trailing'(props: { modelValue: T, open: boolean, ui: any }): any 'empty'(props: { searchTerm?: string }): any 'item': SlotProps 'item-leading': SlotProps @@ -119,12 +119,12 @@ const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, const { orientation, size: buttonGroupSize } = useButtonGroup(props) const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(toRef(() => defu(props, { trailingIcon: appConfig.ui.icons.chevronDown }))) -const inputSize = computed(() => buttonGroupSize.value || formGroupSize.value) +const selectSize = computed(() => buttonGroupSize.value || formGroupSize.value) const ui = computed(() => tv({ extend: selectMenu, slots: props.ui })({ color: color.value, variant: props.variant, - size: inputSize?.value, + size: selectSize?.value, loading: props.loading, leading: isLeading.value || !!slots.leading, trailing: isTrailing.value || !!slots.trailing, @@ -166,6 +166,7 @@ function filterFunction(items: ArrayOrWrapped, searchTerm: stri const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0]) ? props.items : [props.items]) as SelectMenuItem[][] : []) function onUpdate(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) emitFormChange() @@ -201,7 +202,7 @@ function onUpdateOpen(value: boolean) { - + @@ -216,7 +217,7 @@ function onUpdateOpen(value: boolean) { - + @@ -245,11 +246,11 @@ function onUpdateOpen(value: boolean) { - + - + diff --git a/src/runtime/components/Slider.vue b/src/runtime/components/Slider.vue index aa8ebb9d..ff8bace0 100644 --- a/src/runtime/components/Slider.vue +++ b/src/runtime/components/Slider.vue @@ -84,6 +84,7 @@ const ui = computed(() => tv({ extend: slider, slots: props.ui })({ })) function onChange(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) emitFormChange() diff --git a/src/runtime/components/Switch.vue b/src/runtime/components/Switch.vue index 53516e19..1be836bd 100644 --- a/src/runtime/components/Switch.vue +++ b/src/runtime/components/Switch.vue @@ -76,6 +76,7 @@ const ui = computed(() => tv({ extend: switchTv, slots: props.ui })({ })) function onUpdate(value: any) { + // @ts-expect-error - 'target' does not exist in type 'EventInit' const event = new Event('change', { target: { value } }) emits('change', event) emitFormChange() diff --git a/src/theme/command-palette.ts b/src/theme/command-palette.ts index fb5bcd35..7cbfba85 100644 --- a/src/theme/command-palette.ts +++ b/src/theme/command-palette.ts @@ -15,7 +15,7 @@ export default (options: Required) => ({ itemLeadingAvatar: 'shrink-0', itemLeadingChip: 'shrink-0 mx-1.5', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', - itemTrailingSelectedIcon: 'shrink-0 size-5', + itemTrailingIcon: 'shrink-0 size-5', itemTrailingHighlightedIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 hidden group-data-highlighted:inline-flex', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0 gap-0.5', itemLabel: 'truncate space-x-1', diff --git a/src/theme/context-menu.ts b/src/theme/context-menu.ts index e6c4f3b2..dd9c9217 100644 --- a/src/theme/context-menu.ts +++ b/src/theme/context-menu.ts @@ -30,8 +30,8 @@ export default (options: Required) => ({ }, size: { xs: { - label: 'gap-1 p-1 text-xs', - item: 'gap-1 p-1 text-xs', + label: 'p-1 text-xs gap-1', + item: 'p-1 text-xs gap-1', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', @@ -39,8 +39,8 @@ export default (options: Required) => ({ itemTrailingKbdsSize: 'sm' }, sm: { - label: 'gap-1.5 p-1.5 text-xs', - item: 'gap-1.5 p-1.5 text-xs', + label: 'p-1.5 text-xs gap-1.5', + item: 'p-1.5 text-xs gap-1.5', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', @@ -48,8 +48,8 @@ export default (options: Required) => ({ itemTrailingKbdsSize: 'sm' }, md: { - label: 'gap-1.5 p-1.5 text-sm', - item: 'gap-1.5 p-1.5 text-sm', + label: 'p-1.5 text-sm gap-1.5', + item: 'p-1.5 text-sm gap-1.5', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', @@ -57,8 +57,8 @@ export default (options: Required) => ({ itemTrailingKbdsSize: 'md' }, lg: { - label: 'gap-2 p-2 text-sm', - item: 'gap-2 p-2 text-sm', + label: 'p-2 text-sm gap-2', + item: 'p-2 text-sm gap-2', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', @@ -66,8 +66,8 @@ export default (options: Required) => ({ itemTrailingKbdsSize: 'md' }, xl: { - label: 'gap-2 p-2 text-base', - item: 'gap-2 p-2 text-base', + label: 'p-2 text-base gap-2', + item: 'p-2 text-base gap-2', itemLeadingIcon: 'size-6', itemLeadingAvatarSize: 'xs', itemTrailingIcon: 'size-6', diff --git a/src/theme/dropdown-menu.ts b/src/theme/dropdown-menu.ts index 518ebfa7..2aca71f3 100644 --- a/src/theme/dropdown-menu.ts +++ b/src/theme/dropdown-menu.ts @@ -31,8 +31,8 @@ export default (options: Required) => ({ }, size: { xs: { - label: 'gap-1 p-1 text-xs', - item: 'gap-1 p-1 text-xs', + label: 'p-1 text-xs gap-1', + item: 'p-1 text-xs gap-1', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', @@ -40,8 +40,8 @@ export default (options: Required) => ({ itemTrailingKbdsSize: 'sm' }, sm: { - label: 'gap-1.5 p-1.5 text-xs', - item: 'gap-1.5 p-1.5 text-xs', + label: 'p-1.5 text-xs gap-1.5', + item: 'p-1.5 text-xs gap-1.5', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', @@ -49,8 +49,8 @@ export default (options: Required) => ({ itemTrailingKbdsSize: 'sm' }, md: { - label: 'gap-1.5 p-1.5 text-sm', - item: 'gap-1.5 p-1.5 text-sm', + label: 'p-1.5 text-sm gap-1.5', + item: 'p-1.5 text-sm gap-1.5', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', diff --git a/src/theme/input-menu.ts b/src/theme/input-menu.ts index 32f9d8c7..996d97b0 100644 --- a/src/theme/input-menu.ts +++ b/src/theme/input-menu.ts @@ -17,7 +17,7 @@ export default (options: Required) => { itemLeadingAvatar: 'shrink-0', itemLeadingChip: 'shrink-0 mx-1.5', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', - itemTrailingSelectedIcon: 'shrink-0 size-5', + itemTrailingIcon: 'shrink-0 size-5', itemLabel: 'truncate', tagsItem: 'px-1.5 py-0.5 rounded font-medium inline-flex items-center gap-0.5 ring ring-inset ring-gray-300 dark:ring-gray-700 bg-gray-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 data-disabled:cursor-not-allowed data-disabled:opacity-75', tagsItemText: 'truncate', diff --git a/src/theme/select.ts b/src/theme/select.ts index d4a447e2..7b5e4937 100644 --- a/src/theme/select.ts +++ b/src/theme/select.ts @@ -11,15 +11,64 @@ export default (options: Required) => { viewport: 'divide-y divide-gray-200 dark:divide-gray-800 scroll-py-1', group: 'p-1 isolate', empty: 'py-2 text-center text-sm text-gray-500 dark:text-gray-400', - label: 'p-1.5 text-xs font-semibold text-gray-900 dark:text-white', + label: 'font-semibold text-gray-900 dark:text-white', separator: '-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800', - item: ['group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50', options.transitions && 'transition-colors before:transition-colors'], - itemLeadingIcon: ['shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200', options.transitions && 'transition-colors'], + item: ['group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50', options.transitions && 'transition-colors before:transition-colors'], + itemLeadingIcon: ['shrink-0 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200', options.transitions && 'transition-colors'], itemLeadingAvatar: 'shrink-0', + itemLeadingAvatarSize: '', itemLeadingChip: 'shrink-0 mx-1.5', + itemLeadingChipSize: '', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', - itemTrailingSelectedIcon: 'shrink-0 size-5', + itemTrailingIcon: 'shrink-0', itemLabel: 'truncate' + }, + variants: { + size: { + xs: { + label: 'p-1 text-[10px]/3 gap-1', + item: 'p-1 text-xs gap-1', + itemLeadingIcon: 'size-4', + itemLeadingAvatarSize: '3xs', + itemLeadingChipSize: 'sm', + itemTrailingIcon: 'size-4' + }, + sm: { + label: 'p-1.5 text-[10px]/3 gap-1.5', + item: 'p-1.5 text-xs gap-1.5', + itemLeadingIcon: 'size-4', + itemLeadingAvatarSize: '3xs', + itemLeadingChipSize: 'sm', + itemTrailingIcon: 'size-4' + }, + md: { + label: 'p-1.5 text-xs gap-1.5', + item: 'p-1.5 text-sm gap-1.5', + itemLeadingIcon: 'size-5', + itemLeadingAvatarSize: '2xs', + itemLeadingChipSize: 'md', + itemTrailingIcon: 'size-5' + }, + lg: { + label: 'p-2 text-xs gap-2', + item: 'p-2 text-sm gap-2', + itemLeadingIcon: 'size-5', + itemLeadingAvatarSize: '2xs', + itemLeadingChipSize: 'md', + itemTrailingIcon: 'size-5' + }, + xl: { + label: 'p-2 text-sm gap-2', + item: 'p-2 text-base gap-2', + itemLeadingIcon: 'size-6', + itemLeadingAvatarSize: 'xs', + itemLeadingChipSize: 'lg', + itemTrailingIcon: 'size-6' + } + } + }, + defaultVariants: { + size: 'md' } }, { slots: { diff --git a/test/components/ContextMenu.spec.ts b/test/components/ContextMenu.spec.ts index 73648411..78cb1aa2 100644 --- a/test/components/ContextMenu.spec.ts +++ b/test/components/ContextMenu.spec.ts @@ -5,7 +5,7 @@ import theme from '#build/ui/context-menu' // FIXME: Can't force open state describe('ContextMenu', () => { - const sizes = Object.keys(theme.variants.size as any) + const sizes = Object.keys(theme.variants.size) as any const items = [ [{ diff --git a/test/components/InputMenu.spec.ts b/test/components/InputMenu.spec.ts index 90d0a2f9..37de35d8 100644 --- a/test/components/InputMenu.spec.ts +++ b/test/components/InputMenu.spec.ts @@ -37,7 +37,7 @@ describe('InputMenu', () => { ['with defaultValue', { props: { ...props, defaultValue: items[0] } }], ['with id', { props: { ...props, id: 'id' } }], ['with name', { props: { ...props, name: 'name' } }], - ['with placeholder', { props: { ...props, placeholder: 'InputMenu a status' } }], + ['with placeholder', { props: { ...props, placeholder: 'Search...' } }], ['with disabled', { props: { ...props, disabled: true } }], ['with required', { props: { ...props, required: true } }], ['with icon', { props: { ...props, icon: 'i-heroicons-magnifying-glass' } }], diff --git a/test/components/__snapshots__/DropdownMenu.spec.ts.snap b/test/components/__snapshots__/DropdownMenu.spec.ts.snap index 659e4f21..b71878fb 100644 --- a/test/components/__snapshots__/DropdownMenu.spec.ts.snap +++ b/test/components/__snapshots__/DropdownMenu.spec.ts.snap @@ -9,47 +9,47 @@ exports[`DropdownMenu > renders with arrow correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -69,47 +69,47 @@ exports[`DropdownMenu > renders with class correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -129,44 +129,44 @@ exports[`DropdownMenu > renders with custom slot correctly 1`] = ` - My account + My account - Custom slot + Custom slot Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -186,47 +186,47 @@ exports[`DropdownMenu > renders with default slot correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -246,47 +246,47 @@ exports[`DropdownMenu > renders with disabled correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -306,22 +306,22 @@ exports[`DropdownMenu > renders with item slot correctly 1`] = ` - Item slot + Item slot - + Profile - Item slotItem slot - Item slotItem slot + Item slotItem slot + Item slotItem slot - Item slot + Item slot - Item slotItem slot - Item slotItem slot + Item slotItem slot + Item slotItem slot - Item slot + Item slot @@ -339,47 +339,47 @@ exports[`DropdownMenu > renders with item-label slot correctly 1`] = ` - Item label slot + Item label slot - + Profile - + Item label slot⌃B - + Item label slot? - + Item label slot - + Item label slot - + Item label slot⌃N - + Item label slot - + Item label slot - + Item label slot - + Item label slot - + Item label slot⇧⌃Q @@ -399,34 +399,34 @@ exports[`DropdownMenu > renders with item-leading slot correctly 1`] = ` - Item leading slotMy account + Item leading slotMy account - + Profile - Item leading slotBilling⌃BItem leading slotSettings? - Item leading slotTeam + Item leading slotBilling⌃BItem leading slotSettings? + Item leading slotTeam - Item leading slotInvite users + Item leading slotInvite users - Item leading slotNew team⌃N + Item leading slotNew team⌃N - Item leading slotGitHub + Item leading slotGitHub - Item leading slotSupport + Item leading slotSupport - Item leading slotKeyboard Shortcuts + Item leading slotKeyboard Shortcuts - Item leading slotAPI + Item leading slotAPI - Item leading slotLogout⇧⌃Q + Item leading slotLogout⇧⌃Q @@ -444,40 +444,40 @@ exports[`DropdownMenu > renders with item-trailing slot correctly 1`] = ` - My accountItem trailing slot + My accountItem trailing slot - + Profile - + BillingItem trailing slot - + SettingsItem trailing slot - + TeamItem trailing slot - + Invite usersItem trailing slot - + New teamItem trailing slot - + GitHubItem trailing slot - + SupportItem trailing slot - + Keyboard ShortcutsItem trailing slot - + APIItem trailing slot - + LogoutItem trailing slot @@ -497,47 +497,47 @@ exports[`DropdownMenu > renders with items correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -617,47 +617,47 @@ exports[`DropdownMenu > renders with size md correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -677,47 +677,47 @@ exports[`DropdownMenu > renders with size sm correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -797,47 +797,47 @@ exports[`DropdownMenu > renders with size xs correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q @@ -857,47 +857,47 @@ exports[`DropdownMenu > renders with ui correctly 1`] = ` - My account + My account - + Profile - + Billing⌃B - + Settings? - + Team - + Invite users - + New team⌃N - + GitHub - + Support - + Keyboard Shortcuts - + API - + Logout⇧⌃Q diff --git a/test/components/__snapshots__/InputMenu.spec.ts.snap b/test/components/__snapshots__/InputMenu.spec.ts.snap index cb5c5a03..7cb206a2 100644 --- a/test/components/__snapshots__/InputMenu.spec.ts.snap +++ b/test/components/__snapshots__/InputMenu.spec.ts.snap @@ -1028,7 +1028,7 @@ exports[`InputMenu > renders with name correctly 1`] = ` `; exports[`InputMenu > renders with placeholder correctly 1`] = ` -" +" diff --git a/test/components/__snapshots__/Select.spec.ts.snap b/test/components/__snapshots__/Select.spec.ts.snap index 49f33861..cfefbfc6 100644 --- a/test/components/__snapshots__/Select.spec.ts.snap +++ b/test/components/__snapshots__/Select.spec.ts.snap @@ -11,23 +11,23 @@ exports[`Select > renders with arrow correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -71,23 +71,23 @@ exports[`Select > renders with class correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -131,23 +131,23 @@ exports[`Select > renders with color gray correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -191,23 +191,23 @@ exports[`Select > renders with color green correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -251,23 +251,23 @@ exports[`Select > renders with color primary correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -311,23 +311,23 @@ exports[`Select > renders with color red correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -371,23 +371,23 @@ exports[`Select > renders with color white correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -431,23 +431,23 @@ exports[`Select > renders with defaultValue correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -491,23 +491,23 @@ exports[`Select > renders with disabled correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -549,23 +549,23 @@ exports[`Select > renders with icon correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -609,23 +609,23 @@ exports[`Select > renders with id correctly 1`] = ` - + Backlog - + Todo - + In Progress - + Done - + Canceled @@ -669,11 +669,11 @@ exports[`Select > renders with item slot correctly 1`] = ` - Item slot - Item slot - Item slot - Item slot - Item slot + Item slot + Item slot + Item slot + Item slot + Item slot