mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 00:40:34 +01:00
remove old files
This commit is contained in:
9
src/runtime/types/accordion.d.ts
vendored
9
src/runtime/types/accordion.d.ts
vendored
@@ -1,9 +0,0 @@
|
||||
import type { Button } from './button'
|
||||
|
||||
export interface AccordionItem extends Button {
|
||||
slot?: string
|
||||
disabled?: boolean
|
||||
content?: string
|
||||
defaultOpen?: boolean
|
||||
closeOthers?: boolean
|
||||
}
|
||||
12
src/runtime/types/alert.d.ts
vendored
12
src/runtime/types/alert.d.ts
vendored
@@ -1,12 +0,0 @@
|
||||
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'
|
||||
|
||||
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']>>
|
||||
|
||||
export interface AlertAction extends Button {
|
||||
click?: Function
|
||||
}
|
||||
17
src/runtime/types/avatar.d.ts
vendored
17
src/runtime/types/avatar.d.ts
vendored
@@ -1,17 +0,0 @@
|
||||
import { avatar } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
export type AvatarSize = keyof typeof avatar.size | ExtractDeepKey<AppConfig, ['ui', 'avatar', 'size']>
|
||||
export type AvatarChipColor = 'gray' | typeof colors[number]
|
||||
export type AvatarChipPosition = keyof typeof avatar.chip.position
|
||||
|
||||
export interface Avatar {
|
||||
src?: string | boolean
|
||||
alt?: string
|
||||
text?: string
|
||||
size?: AvatarSize
|
||||
chipColor?: AvatarChipColor
|
||||
chipPosition?: AvatarChipPosition
|
||||
}
|
||||
15
src/runtime/types/badge.d.ts
vendored
15
src/runtime/types/badge.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
import { badge } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
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]
|
||||
export type BadgeVariant = keyof typeof badge.variant | ExtractDeepKey<AppConfig, ['ui', 'badge', 'variant']> | NestedKeyOf<typeof badge.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'badge', 'color']>>
|
||||
|
||||
export interface Badge {
|
||||
label?: string
|
||||
size?: BadgeSize
|
||||
color?: BadgeColor
|
||||
variant?: BadgeVariant
|
||||
}
|
||||
10
src/runtime/types/breadcrumb.d.ts
vendored
10
src/runtime/types/breadcrumb.d.ts
vendored
@@ -1,10 +0,0 @@
|
||||
import type { Link } from './link'
|
||||
|
||||
export interface BreadcrumbLink extends Link {
|
||||
label: string
|
||||
labelClass?: string
|
||||
icon?: string
|
||||
iconClass?: string
|
||||
// FIXME: This is a workaround for `link.to` not being resolved although it extends `NuxtLinkProps`
|
||||
[key: string]: any
|
||||
}
|
||||
31
src/runtime/types/button.d.ts
vendored
31
src/runtime/types/button.d.ts
vendored
@@ -1,31 +0,0 @@
|
||||
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'
|
||||
|
||||
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]
|
||||
export type ButtonVariant = keyof typeof button.variant | ExtractDeepKey<AppConfig, ['ui', 'button', 'variant']> | NestedKeyOf<typeof button.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'button', 'color']>>
|
||||
|
||||
export interface Button extends Link {
|
||||
type?: string
|
||||
block?: boolean
|
||||
label?: string
|
||||
loading?: boolean
|
||||
disabled?: boolean
|
||||
padded?: boolean
|
||||
size?: ButtonSize
|
||||
color?: ButtonColor
|
||||
variant?: ButtonVariant
|
||||
icon?: string
|
||||
loadingIcon?: string
|
||||
leadingIcon?: string
|
||||
trailingIcon?: string
|
||||
trailing?: boolean
|
||||
leading?: boolean
|
||||
to?: string | object
|
||||
target?: string
|
||||
square?: boolean
|
||||
truncate?: boolean
|
||||
}
|
||||
15
src/runtime/types/chip.d.ts
vendored
15
src/runtime/types/chip.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
import { chip } from '../ui.config'
|
||||
import colors from '#ui-colors'
|
||||
|
||||
export type ChipSize = keyof typeof chip.size
|
||||
export type ChipColor = 'gray' | typeof colors[number]
|
||||
export type ChipPosition = keyof typeof chip.position
|
||||
|
||||
export interface Chip {
|
||||
size?: ChipSize
|
||||
color?: ChipColor
|
||||
position?: ChipPosition
|
||||
text?: string
|
||||
inset?: boolean
|
||||
show?: boolean
|
||||
}
|
||||
3
src/runtime/types/clipboard.d.ts
vendored
3
src/runtime/types/clipboard.d.ts
vendored
@@ -1,3 +0,0 @@
|
||||
export interface ClipboardPlugin {
|
||||
copy: (text: string, success?: { title?: string, description?: string }, failure?: { title?: string, description?: string }) => void
|
||||
}
|
||||
28
src/runtime/types/command-palette.d.ts
vendored
28
src/runtime/types/command-palette.d.ts
vendored
@@ -1,28 +0,0 @@
|
||||
import type { FuseSortFunctionMatch, FuseSortFunctionMatchList } from 'fuse.js'
|
||||
import type { Avatar } from './avatar'
|
||||
|
||||
export interface Command {
|
||||
id: string | number
|
||||
prefix?: string
|
||||
suffix?: string
|
||||
icon?: string
|
||||
iconClass?: string
|
||||
avatar?: Avatar
|
||||
chip?: string
|
||||
disabled?: boolean
|
||||
shortcuts?: string[]
|
||||
group?: string
|
||||
score?: number
|
||||
matches?: (FuseSortFunctionMatch | FuseSortFunctionMatchList)[]
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
export interface Group {
|
||||
key: string
|
||||
active?: string
|
||||
inactive?: string
|
||||
commands?: Command[]
|
||||
search?: Function
|
||||
filter?: Function
|
||||
[key: string]: any
|
||||
}
|
||||
14
src/runtime/types/component.d.ts
vendored
14
src/runtime/types/component.d.ts
vendored
@@ -1,14 +0,0 @@
|
||||
export type ComponentProps<T> =
|
||||
T extends new () => { $props: infer P } ? NonNullable<P> :
|
||||
T extends (props: infer P, ...args: any) => any ? 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> :
|
||||
{}
|
||||
|
||||
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> :
|
||||
{}
|
||||
3
src/runtime/types/divider.d.ts
vendored
3
src/runtime/types/divider.d.ts
vendored
@@ -1,3 +0,0 @@
|
||||
import { divider } from '#ui/ui.config'
|
||||
|
||||
export type DividerSize = keyof typeof divider.border.size.horizontal | keyof typeof divider.border.size.vertical
|
||||
15
src/runtime/types/dropdown.d.ts
vendored
15
src/runtime/types/dropdown.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
import type { NuxtLinkProps } from '#app'
|
||||
import type { Avatar } from './avatar'
|
||||
|
||||
export interface DropdownItem extends NuxtLinkProps {
|
||||
label: string
|
||||
labelClass?: string
|
||||
slot?: string
|
||||
icon?: string
|
||||
iconClass?: string
|
||||
avatar?: Avatar
|
||||
shortcuts?: string[]
|
||||
disabled?: boolean
|
||||
class?: string
|
||||
click?: Function
|
||||
}
|
||||
5
src/runtime/types/form-group.d.ts
vendored
5
src/runtime/types/form-group.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
import { formGroup } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
export type FormGroupSize = keyof typeof formGroup.size | ExtractDeepKey<AppConfig, ['ui', 'formGroup', 'size']>
|
||||
13
src/runtime/types/horizontal-navigation.d.ts
vendored
13
src/runtime/types/horizontal-navigation.d.ts
vendored
@@ -1,13 +0,0 @@
|
||||
import type { Link } from './link'
|
||||
import type { Avatar } from './avatar'
|
||||
import type { Badge } from './badge'
|
||||
|
||||
export interface HorizontalNavigationLink extends Link {
|
||||
label: string
|
||||
labelClass?: string
|
||||
icon?: string
|
||||
iconClass?: string
|
||||
avatar?: Avatar
|
||||
click?: Function
|
||||
badge?: string | number | Badge
|
||||
}
|
||||
8
src/runtime/types/input.d.ts
vendored
8
src/runtime/types/input.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
import { input } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
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]
|
||||
export type InputVariant = keyof typeof input.variant | ExtractDeepKey<AppConfig, ['ui', 'input', 'variant']> | NestedKeyOf<typeof input.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'input', 'color']>>
|
||||
5
src/runtime/types/kbd.d.ts
vendored
5
src/runtime/types/kbd.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
import { kbd } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
export type KbdSize = keyof typeof kbd.size | ExtractDeepKey<AppConfig, ['ui', 'kbd', 'size']>
|
||||
12
src/runtime/types/link.d.ts
vendored
12
src/runtime/types/link.d.ts
vendored
@@ -1,12 +0,0 @@
|
||||
import type { NuxtLinkProps } from '#app'
|
||||
|
||||
export interface Link extends NuxtLinkProps {
|
||||
as?: string
|
||||
type?: string
|
||||
disabled?: boolean
|
||||
active?: boolean
|
||||
exact?: boolean
|
||||
exactQuery?: boolean
|
||||
exactMatch?: boolean
|
||||
inactiveClass?: string
|
||||
}
|
||||
5
src/runtime/types/meter.d.ts
vendored
5
src/runtime/types/meter.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
import { meter } from '../ui.config'
|
||||
import colors from '#ui-colors'
|
||||
|
||||
export type MeterSize = keyof typeof meter.meter.size
|
||||
export type MeterColor = keyof typeof meter.color | typeof colors[number]
|
||||
18
src/runtime/types/modal.d.ts
vendored
18
src/runtime/types/modal.d.ts
vendored
@@ -1,18 +0,0 @@
|
||||
import type { Component } from 'vue'
|
||||
|
||||
export interface Modal {
|
||||
appear?: boolean
|
||||
overlay?: boolean
|
||||
transition?: boolean
|
||||
preventClose?: boolean
|
||||
fullscreen?: boolean
|
||||
class?: string | Object | string[]
|
||||
ui?: any
|
||||
onClose?: () => void
|
||||
onClosePrevented?: () => void
|
||||
}
|
||||
|
||||
export interface ModalState {
|
||||
component: Component | string
|
||||
props: Modal
|
||||
}
|
||||
24
src/runtime/types/notification.d.ts
vendored
24
src/runtime/types/notification.d.ts
vendored
@@ -1,24 +0,0 @@
|
||||
import type { Avatar } from './avatar'
|
||||
import type { Button } from './button'
|
||||
import colors from '#ui-colors'
|
||||
|
||||
export type NotificationColor = 'gray' | typeof colors[number]
|
||||
|
||||
export interface NotificationAction extends Button {
|
||||
click?: Function
|
||||
}
|
||||
|
||||
export interface Notification {
|
||||
id: string
|
||||
title: string
|
||||
description?: string
|
||||
icon?: string
|
||||
avatar?: Avatar
|
||||
closeButton?: Button
|
||||
timeout: number
|
||||
actions?: NotificationAction[]
|
||||
click?: Function
|
||||
callback?: Function
|
||||
color?: NotificationColor
|
||||
ui?: any
|
||||
}
|
||||
17
src/runtime/types/popper.d.ts
vendored
17
src/runtime/types/popper.d.ts
vendored
@@ -1,17 +0,0 @@
|
||||
import type { Placement, PositioningStrategy } from '@popperjs/core'
|
||||
|
||||
export interface PopperOptions {
|
||||
// Workaround for weak types: https://mariusschulz.com/blog/weak-type-detection-in-typescript#workarounds-for-weak-types
|
||||
[key: string]: unknown
|
||||
locked?: boolean
|
||||
overflowPadding?: number
|
||||
offsetDistance?: number
|
||||
offsetSkid?: number
|
||||
placement?: Placement
|
||||
strategy?: PositioningStrategy
|
||||
gpuAcceleration?: boolean
|
||||
adaptive?: boolean
|
||||
scroll?: boolean
|
||||
resize?: boolean
|
||||
arrow?: boolean
|
||||
}
|
||||
6
src/runtime/types/progress.d.ts
vendored
6
src/runtime/types/progress.d.ts
vendored
@@ -1,6 +0,0 @@
|
||||
import { progress } from '../ui.config'
|
||||
import colors from '#ui-colors'
|
||||
|
||||
export type ProgressSize = keyof typeof progress.progress.size
|
||||
export type ProgressAnimation = keyof typeof progress.animation
|
||||
export type ProgressColor = typeof colors[number]
|
||||
7
src/runtime/types/range.d.ts
vendored
7
src/runtime/types/range.d.ts
vendored
@@ -1,7 +0,0 @@
|
||||
import { range } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import colors from '#ui-colors'
|
||||
|
||||
export type RangeSize = keyof typeof range.size | ExtractDeepKey<AppConfig, ['ui', 'range', 'size']>
|
||||
export type RangeColor = typeof colors[number]
|
||||
8
src/runtime/types/select.d.ts
vendored
8
src/runtime/types/select.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
import { select } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
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]
|
||||
export type SelectVariant = keyof typeof select.variant | ExtractDeepKey<AppConfig, ['ui', 'select', 'variant']> | NestedKeyOf<typeof select.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'select', 'color']>>
|
||||
17
src/runtime/types/slideover.d.ts
vendored
17
src/runtime/types/slideover.d.ts
vendored
@@ -1,17 +0,0 @@
|
||||
import type { Component } from 'vue'
|
||||
|
||||
interface Slideover {
|
||||
ui?: any;
|
||||
side?: 'right' | 'left';
|
||||
transition?: boolean;
|
||||
appear?: boolean;
|
||||
overlay?: boolean;
|
||||
preventClose?: boolean;
|
||||
modelValue?: boolean;
|
||||
}
|
||||
|
||||
interface SlideoverState {
|
||||
component: Component | string;
|
||||
props: Slideover;
|
||||
}
|
||||
|
||||
7
src/runtime/types/tabs.d.ts
vendored
7
src/runtime/types/tabs.d.ts
vendored
@@ -1,7 +0,0 @@
|
||||
export interface TabItem {
|
||||
label: string
|
||||
slot?: string
|
||||
disabled?: boolean
|
||||
content?: string
|
||||
[key: string]: any
|
||||
}
|
||||
8
src/runtime/types/textarea.d.ts
vendored
8
src/runtime/types/textarea.d.ts
vendored
@@ -1,8 +0,0 @@
|
||||
import { textarea } from '../ui.config'
|
||||
import type { NestedKeyOf, ExtractDeepKey, ExtractDeepObject } from '.'
|
||||
import colors from '#ui-colors'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
|
||||
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]
|
||||
export type TextareaVariant = keyof typeof textarea.variant | ExtractDeepKey<AppConfig, ['ui', 'textarea', 'variant']> | NestedKeyOf<typeof textarea.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'textarea', 'color']>>
|
||||
7
src/runtime/types/toggle.d.ts
vendored
7
src/runtime/types/toggle.d.ts
vendored
@@ -1,7 +0,0 @@
|
||||
import { toggle } from '../ui.config'
|
||||
import type { ExtractDeepKey } from '.'
|
||||
import type { AppConfig } from 'nuxt/schema'
|
||||
import colors from '#ui-colors'
|
||||
|
||||
export type ToggleSize = keyof typeof toggle.size | ExtractDeepKey<AppConfig, ['ui', 'toggle', 'size']>
|
||||
export type ToggleColor = typeof colors[number]
|
||||
7
src/runtime/types/tooltip.d.ts
vendored
7
src/runtime/types/tooltip.d.ts
vendored
@@ -1,7 +0,0 @@
|
||||
export interface Tooltip {
|
||||
text?: string
|
||||
prevent?: boolean
|
||||
shortcuts?: string[]
|
||||
openDelay?: number
|
||||
closeDelay?: number
|
||||
}
|
||||
28
src/runtime/types/utils.d.ts
vendored
28
src/runtime/types/utils.d.ts
vendored
@@ -1,28 +0,0 @@
|
||||
export type Strategy = 'merge' | 'override'
|
||||
|
||||
export type NestedKeyOf<ObjectType extends Record<string, any>> = {
|
||||
[Key in keyof ObjectType]: ObjectType[Key] extends Record<string, any>
|
||||
? NestedKeyOf<ObjectType[Key]>
|
||||
: Key
|
||||
}[keyof ObjectType]
|
||||
|
||||
export type DeepPartial<T> = Partial<{
|
||||
[P in keyof T]: DeepPartial<T[P]> | { [key: string]: string | object }
|
||||
}>
|
||||
|
||||
type DeepKey<T, Keys extends string[]> =
|
||||
Keys extends [infer First, ...infer Rest]
|
||||
? First extends keyof T
|
||||
? Rest extends string[]
|
||||
? DeepKey<T[First], Rest>
|
||||
: never
|
||||
: never
|
||||
: T
|
||||
|
||||
export type ExtractDeepKey<T, Path extends string[]> = DeepKey<T, Path> extends infer Result
|
||||
? Result extends Record<string, any> ? keyof Result : never
|
||||
: never
|
||||
|
||||
export type ExtractDeepObject<T, Path extends string[]> = DeepKey<T, Path> extends infer Result
|
||||
? Result extends Record<string, any> ? Result : never
|
||||
: never
|
||||
13
src/runtime/types/vertical-navigation.d.ts
vendored
13
src/runtime/types/vertical-navigation.d.ts
vendored
@@ -1,13 +0,0 @@
|
||||
import type { Link } from './link'
|
||||
import type { Avatar } from './avatar'
|
||||
import type { Badge } from './badge'
|
||||
|
||||
export interface VerticalNavigationLink extends Link {
|
||||
label: string
|
||||
labelClass?: string
|
||||
icon?: string
|
||||
iconClass?: string
|
||||
avatar?: Avatar
|
||||
click?: Function
|
||||
badge?: string | number | Badge
|
||||
}
|
||||
Reference in New Issue
Block a user