diff --git a/src/runtime/components/Button.vue b/src/runtime/components/Button.vue index 4840da83..99bd1b25 100644 --- a/src/runtime/components/Button.vue +++ b/src/runtime/components/Button.vue @@ -5,6 +5,7 @@ import _appConfig from '#build/app.config' import theme from '#build/ui/button' import type { LinkProps } from './Link.vue' import type { UseComponentIconsProps } from '../composables/useComponentIcons' +import type { PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { button: Partial } } @@ -22,7 +23,7 @@ export interface ButtonProps extends UseComponentIconsProps, Omit + ui?: PartialString } export interface ButtonSlots { diff --git a/src/runtime/components/CommandPalette.vue b/src/runtime/components/CommandPalette.vue index 311026df..d6ec62df 100644 --- a/src/runtime/components/CommandPalette.vue +++ b/src/runtime/components/CommandPalette.vue @@ -8,7 +8,7 @@ import _appConfig from '#build/app.config' import theme from '#build/ui/command-palette' import type { UseComponentIconsProps } from '../composables/useComponentIcons' import type { AvatarProps, ButtonProps, ChipProps, KbdProps, InputProps } from '../types' -import type { DynamicSlots } from '../types/utils' +import type { DynamicSlots, PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { commandPalette: Partial } } @@ -75,7 +75,7 @@ export interface CommandPaletteProps extends Pick class?: any - ui?: Partial + ui?: PartialString } export type CommandPaletteEmits = ComboboxRootEmits diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index de5ad280..93d5ab38 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -7,7 +7,7 @@ import _appConfig from '#build/app.config' import theme from '#build/ui/input-menu' import type { UseComponentIconsProps } from '../composables/useComponentIcons' import type { AvatarProps, ChipProps, InputProps } from '../types' -import type { AcceptableValue, ArrayOrWrapped } from '../types/utils' +import type { AcceptableValue, ArrayOrWrapped, PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { inputMenu: Partial } } @@ -82,7 +82,7 @@ export interface InputMenuProps extends Pick, 'modelValu filter?: boolean | string[] items?: T[] | T[][] class?: any - ui?: Partial + ui?: PartialString } export type InputMenuEmits = ComboboxRootEmits & { diff --git a/src/runtime/components/Select.vue b/src/runtime/components/Select.vue index 78161b57..670f17cf 100644 --- a/src/runtime/components/Select.vue +++ b/src/runtime/components/Select.vue @@ -6,7 +6,7 @@ import _appConfig from '#build/app.config' import theme from '#build/ui/select' import type { UseComponentIconsProps } from '../composables/useComponentIcons' import type { AvatarProps, ChipProps, InputProps } from '../types' -import type { AcceptableValue } from '../types/utils' +import type { AcceptableValue, PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { select: Partial } } @@ -60,7 +60,7 @@ export interface SelectProps extends Omit, UseCompone portal?: boolean items?: T[] | T[][] class?: any - ui?: Partial + ui?: PartialString } export type SelectEmits = SelectRootEmits & { diff --git a/src/runtime/components/SelectMenu.vue b/src/runtime/components/SelectMenu.vue index c5bc2532..b4395d79 100644 --- a/src/runtime/components/SelectMenu.vue +++ b/src/runtime/components/SelectMenu.vue @@ -6,7 +6,7 @@ import _appConfig from '#build/app.config' import theme from '#build/ui/select-menu' import type { UseComponentIconsProps } from '../composables/useComponentIcons' import type { AvatarProps, ChipProps, InputProps } from '../types' -import type { AcceptableValue, ArrayOrWrapped } from '../types/utils' +import type { AcceptableValue, ArrayOrWrapped, PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { selectMenu: Partial } } @@ -69,7 +69,7 @@ export interface SelectMenuProps extends Pick, 'modelVal filter?: boolean | string[] items?: T[] | T[][] class?: any - ui?: Partial + ui?: PartialString } export type SelectMenuEmits = ComboboxRootEmits & { diff --git a/src/runtime/components/Switch.vue b/src/runtime/components/Switch.vue index f38bbff5..7a9504da 100644 --- a/src/runtime/components/Switch.vue +++ b/src/runtime/components/Switch.vue @@ -4,6 +4,7 @@ import type { SwitchRootProps } from 'radix-vue' import type { AppConfig } from '@nuxt/schema' import _appConfig from '#build/app.config' import theme from '#build/ui/switch' +import type { PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { switch: Partial } } @@ -35,7 +36,7 @@ export interface SwitchProps extends Pick + ui?: PartialString } export interface SwitchEmits { diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue index 319edbd6..ee5fcf55 100644 --- a/src/runtime/components/Tabs.vue +++ b/src/runtime/components/Tabs.vue @@ -5,7 +5,7 @@ import type { AppConfig } from '@nuxt/schema' import _appConfig from '#build/app.config' import theme from '#build/ui/tabs' import type { AvatarProps } from '../types' -import type { DynamicSlots } from '../types/utils' +import type { DynamicSlots, PartialString } from '../types/utils' const appConfig = _appConfig as AppConfig & { ui: { tabs: Partial } } @@ -42,7 +42,7 @@ export interface TabsProps extends Pick class?: any - ui?: Partial + ui?: PartialString } export interface TabsEmits extends TabsRootEmits {} diff --git a/src/runtime/types/utils.ts b/src/runtime/types/utils.ts index 02d26b03..9c31526d 100644 --- a/src/runtime/types/utils.ts +++ b/src/runtime/types/utils.ts @@ -12,3 +12,7 @@ export type GetObjectField = MaybeObject extend export type AcceptableValue = string | number | boolean | Record export type ArrayOrWrapped = T extends any[] ? T : Array + +export type PartialString = { + [K in keyof T]?: string +}