remove old files

This commit is contained in:
Benjamin Canac
2024-03-27 12:39:55 +01:00
parent f3fec877c5
commit 85c693e3ba
150 changed files with 0 additions and 12276 deletions

View File

@@ -1,9 +0,0 @@
import type { Button } from './button'
export interface AccordionItem extends Button {
slot?: string
disabled?: boolean
content?: string
defaultOpen?: boolean
closeOthers?: boolean
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -1,3 +0,0 @@
export interface ClipboardPlugin {
copy: (text: string, success?: { title?: string, description?: string }, failure?: { title?: string, description?: string }) => void
}

View File

@@ -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
}

View File

@@ -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> :
{}

View File

@@ -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

View File

@@ -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
}

View File

@@ -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']>

View File

@@ -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
}

View File

@@ -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']>>

View File

@@ -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']>

View File

@@ -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
}

View File

@@ -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]

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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]

View File

@@ -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]

View File

@@ -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']>>

View File

@@ -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;
}

View File

@@ -1,7 +0,0 @@
export interface TabItem {
label: string
slot?: string
disabled?: boolean
content?: string
[key: string]: any
}

View File

@@ -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']>>

View File

@@ -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]

View File

@@ -1,7 +0,0 @@
export interface Tooltip {
text?: string
prevent?: boolean
shortcuts?: string[]
openDelay?: number
closeDelay?: number
}

View File

@@ -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

View File

@@ -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
}