mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 06:21:46 +01:00
chore(deps): migrate to eslint 9 (#2443)
This commit is contained in:
8
src/runtime/types/alert.d.ts
vendored
8
src/runtime/types/alert.d.ts
vendored
@@ -1,8 +1,8 @@
|
||||
import { alert } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type { Button } from './button'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { alert } from '../ui.config'
|
||||
import type { Button } from './button'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type AlertColor = keyof typeof alert.color | ExtractDeepKey<AppConfig, ['ui', 'alert', 'color']> | typeof colors[number]
|
||||
export type AlertVariant = keyof typeof alert.variant | ExtractDeepKey<AppConfig, ['ui', 'alert', 'variant']> | NestedKeyOf<typeof alert.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'alert', 'color']>>
|
||||
|
||||
6
src/runtime/types/avatar.d.ts
vendored
6
src/runtime/types/avatar.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { avatar } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { avatar } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type AvatarSize = keyof typeof avatar.size | ExtractDeepKey<AppConfig, ['ui', 'avatar', 'size']>
|
||||
export type AvatarChipColor = 'gray' | typeof colors[number]
|
||||
|
||||
6
src/runtime/types/badge.d.ts
vendored
6
src/runtime/types/badge.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { badge } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { badge } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type BadgeSize = keyof typeof badge.size | ExtractDeepKey<AppConfig, ['ui', 'badge', 'size']>
|
||||
export type BadgeColor = keyof typeof badge.color | ExtractDeepKey<AppConfig, ['ui', 'badge', 'color']> | typeof colors[number]
|
||||
|
||||
8
src/runtime/types/button.d.ts
vendored
8
src/runtime/types/button.d.ts
vendored
@@ -1,8 +1,8 @@
|
||||
import type { Link } from './link'
|
||||
import { button } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { button } from '../ui.config'
|
||||
import type { Link } from './link'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type ButtonSize = keyof typeof button.size | ExtractDeepKey<AppConfig, ['ui', 'button', 'size']>
|
||||
export type ButtonColor = keyof typeof button.color | ExtractDeepKey<AppConfig, ['ui', 'button', 'color']> | typeof colors[number]
|
||||
|
||||
4
src/runtime/types/chip.d.ts
vendored
4
src/runtime/types/chip.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import { chip } from '../ui.config'
|
||||
import colors from '#ui-colors'
|
||||
import type { chip } from '../ui.config'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type ChipSize = keyof typeof chip.size
|
||||
export type ChipColor = 'gray' | typeof colors[number]
|
||||
|
||||
4
src/runtime/types/command-palette.d.ts
vendored
4
src/runtime/types/command-palette.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { FuseResultMatch } from 'fuse.js'
|
||||
import type { FuseResultMatch } from 'fuse.js'
|
||||
import type { Avatar } from './avatar'
|
||||
|
||||
export interface Command {
|
||||
@@ -24,6 +24,6 @@ export interface Group {
|
||||
commands?: Command[]
|
||||
search?: (...args: any[]) => any[] | Promise<any[]>
|
||||
filter?: (...args: any[]) => Command[]
|
||||
static?: Boolean
|
||||
static?: boolean
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
6
src/runtime/types/component.d.ts
vendored
6
src/runtime/types/component.d.ts
vendored
@@ -5,10 +5,10 @@ T extends new () => { $props: infer P } ? NonNullable<P> :
|
||||
|
||||
export type ComponentSlots<T> =
|
||||
T extends new () => { $slots: infer S } ? NonNullable<S> :
|
||||
T extends (props: any, ctx: { slots: infer S; attrs: any; emit: any }, ...args: any) => any ? NonNullable<S> :
|
||||
T extends (props: any, ctx: { slots: infer S, attrs: any, emit: any }, ...args: any) => any ? NonNullable<S> :
|
||||
{}
|
||||
|
||||
export type ComponentEmit<T> =
|
||||
T extends new () => { $emit: infer E } ? NonNullable<E> :
|
||||
T extends (props: any, ctx: { slots: any; attrs: any; emit: infer E }, ...args: any) => any ? NonNullable<E> :
|
||||
{}
|
||||
T extends (props: any, ctx: { slots: any, attrs: any, emit: infer E }, ...args: any) => any ? NonNullable<E> :
|
||||
{}
|
||||
|
||||
6
src/runtime/types/divider.d.ts
vendored
6
src/runtime/types/divider.d.ts
vendored
@@ -1,3 +1,3 @@
|
||||
import { divider } from '#ui/ui.config'
|
||||
|
||||
export type DividerSize = keyof typeof divider.border.size.horizontal | keyof typeof divider.border.size.vertical
|
||||
import type { divider } from '#ui/ui.config'
|
||||
|
||||
export type DividerSize = keyof typeof divider.border.size.horizontal | keyof typeof divider.border.size.vertical
|
||||
|
||||
2
src/runtime/types/dropdown.d.ts
vendored
2
src/runtime/types/dropdown.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import type { NuxtLinkProps } from '#app'
|
||||
import type { Avatar } from './avatar'
|
||||
import type { NuxtLinkProps } from '#app'
|
||||
|
||||
export interface DropdownItem extends NuxtLinkProps {
|
||||
label: string
|
||||
|
||||
4
src/runtime/types/form-group.d.ts
vendored
4
src/runtime/types/form-group.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import { formGroup } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { formGroup } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
|
||||
export type FormGroupSize = keyof typeof formGroup.size | ExtractDeepKey<AppConfig, ['ui', 'formGroup', 'size']>
|
||||
|
||||
4
src/runtime/types/form.d.ts
vendored
4
src/runtime/types/form.d.ts
vendored
@@ -10,8 +10,8 @@ export interface FormErrorWithId extends FormError {
|
||||
}
|
||||
|
||||
export interface Form<T> {
|
||||
validate(path?: string | string[], opts?: { silent?: true }): Promise<T | false>;
|
||||
validate(path?: string | string[], opts?: { silent?: false }): Promise<T>;
|
||||
validate(path?: string | string[], opts?: { silent?: true }): Promise<T | false>
|
||||
validate(path?: string | string[], opts?: { silent?: false }): Promise<T>
|
||||
clear(path?: string): void
|
||||
errors: Ref<FormError[]>
|
||||
setErrors(errs: FormError[], path?: string): void
|
||||
|
||||
6
src/runtime/types/input.d.ts
vendored
6
src/runtime/types/input.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { input } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { input } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type InputSize = keyof typeof input.size | ExtractDeepKey<AppConfig, ['ui', 'input', 'size']>
|
||||
export type InputColor = keyof typeof input.color | ExtractDeepKey<AppConfig, ['ui', 'input', 'color']> | typeof colors[number]
|
||||
|
||||
4
src/runtime/types/kbd.d.ts
vendored
4
src/runtime/types/kbd.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import { kbd } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { kbd } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
|
||||
export type KbdSize = keyof typeof kbd.size | ExtractDeepKey<AppConfig, ['ui', 'kbd', 'size']>
|
||||
|
||||
4
src/runtime/types/meter.d.ts
vendored
4
src/runtime/types/meter.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import { meter } from '../ui.config'
|
||||
import colors from '#ui-colors'
|
||||
import type { meter } from '../ui.config'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type MeterSize = keyof typeof meter.meter.size
|
||||
export type MeterColor = keyof typeof meter.color | typeof colors[number]
|
||||
|
||||
4
src/runtime/types/modal.d.ts
vendored
4
src/runtime/types/modal.d.ts
vendored
@@ -6,7 +6,7 @@ export interface Modal {
|
||||
transition?: boolean
|
||||
preventClose?: boolean
|
||||
fullscreen?: boolean
|
||||
class?: string | Object | string[]
|
||||
class?: string | object | string[]
|
||||
ui?: any
|
||||
onClose?: () => void
|
||||
onClosePrevented?: () => void
|
||||
@@ -15,4 +15,4 @@ export interface Modal {
|
||||
export interface ModalState {
|
||||
component: Component | string
|
||||
props: Modal
|
||||
}
|
||||
}
|
||||
|
||||
2
src/runtime/types/notification.d.ts
vendored
2
src/runtime/types/notification.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import type { Avatar } from './avatar'
|
||||
import type { Button } from './button'
|
||||
import colors from '#ui-colors'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type NotificationColor = 'gray' | typeof colors[number]
|
||||
|
||||
|
||||
4
src/runtime/types/progress.d.ts
vendored
4
src/runtime/types/progress.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import { progress } from '../ui.config'
|
||||
import colors from '#ui-colors'
|
||||
import type { progress } from '../ui.config'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type ProgressSize = keyof typeof progress.progress.size
|
||||
export type ProgressAnimation = keyof typeof progress.animation
|
||||
|
||||
6
src/runtime/types/range.d.ts
vendored
6
src/runtime/types/range.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { range } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import colors from '#ui-colors'
|
||||
import type { range } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type RangeSize = keyof typeof range.size | ExtractDeepKey<AppConfig, ['ui', 'range', 'size']>
|
||||
export type RangeColor = typeof colors[number]
|
||||
|
||||
6
src/runtime/types/select.d.ts
vendored
6
src/runtime/types/select.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { select } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { select } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type SelectSize = keyof typeof select.size | ExtractDeepKey<AppConfig, ['ui', 'select', 'size']>
|
||||
export type SelectColor = keyof typeof select.color | ExtractDeepKey<AppConfig, ['ui', 'select', 'color']> | typeof colors[number]
|
||||
|
||||
6
src/runtime/types/textarea.d.ts
vendored
6
src/runtime/types/textarea.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { textarea } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import type { textarea } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type TextareaSize = keyof typeof textarea.size | ExtractDeepKey<AppConfig, ['ui', 'textarea', 'size']>
|
||||
export type TextareaColor = keyof typeof textarea.color | ExtractDeepKey<AppConfig, ['ui', 'textarea', 'color']> | typeof colors[number]
|
||||
|
||||
6
src/runtime/types/toggle.d.ts
vendored
6
src/runtime/types/toggle.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
import { toggle } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import colors from '#ui-colors'
|
||||
import type { toggle } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type colors from '#ui-colors'
|
||||
|
||||
export type ToggleSize = keyof typeof toggle.size | ExtractDeepKey<AppConfig, ['ui', 'toggle', 'size']>
|
||||
export type ToggleColor = typeof colors[number]
|
||||
|
||||
4
src/runtime/types/utils.d.ts
vendored
4
src/runtime/types/utils.d.ts
vendored
@@ -14,8 +14,8 @@ export type DeepPartial<T, O = any> = {
|
||||
|
||||
export type NestedKeyOf<ObjectType extends Record<string, any>> = {
|
||||
[Key in keyof ObjectType]: ObjectType[Key] extends Record<string, any>
|
||||
? NestedKeyOf<ObjectType[Key]>
|
||||
: Key
|
||||
? NestedKeyOf<ObjectType[Key]>
|
||||
: Key
|
||||
}[keyof ObjectType]
|
||||
|
||||
type DeepKey<T, Keys extends string[]> =
|
||||
|
||||
Reference in New Issue
Block a user