-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
724f593
commit 4621c7f
Showing
15 changed files
with
211 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ dist | |
dist-ssr | ||
*.local | ||
docs/.vitepress/cache | ||
types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Button } from './button' | ||
|
||
export interface AccordionItem extends Button { | ||
slot?: string | ||
disabled?: boolean | ||
content?: string | ||
defaultOpen?: boolean | ||
closeOthers?: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { avatar } from '../ui.config' | ||
import colors from '../../constants/colors.config' | ||
|
||
export type AvatarSize = keyof typeof 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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { Link } from './link' | ||
import { button } from '../ui.config' | ||
import type { NestedKeyOf } from '.' | ||
import colors from '#ui-colors' | ||
|
||
export type ButtonSize = keyof typeof button.size | ||
export type ButtonColor = keyof typeof button.color | typeof colors[number] | ||
export type ButtonVariant = keyof typeof button.variant | NestedKeyOf<typeof 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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface ClipboardPlugin { | ||
copy: (text: string, success?: { title?: string, description?: string }, failure?: { title?: string, description?: string }) => void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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?: Partial<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[] | ||
[key: string]: any | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Link } from './link' | ||
import type { Avatar } from './avatar' | ||
|
||
export interface DropdownItem extends Link { | ||
label: string | ||
slot?: string | ||
icon?: string | ||
iconClass?: string | ||
avatar?: Avatar | ||
shortcuts?: string[] | ||
disabled?: boolean | ||
click?: Function | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export interface FormError { | ||
path: string | ||
message: string | ||
} | ||
|
||
export interface Form<T> { | ||
validate(path?: string, opts: { silent?: boolean }): Promise<T> | ||
clear(path?: string): void | ||
errors: Ref<FormError[]> | ||
setErrors(errs: FormError[], path?: string): void | ||
getErrors(path?: string): FormError[] | ||
} | ||
|
||
export type FormSubmitEvent<T> = SubmitEvent & { data: T } | ||
|
||
export type FormEventType = 'blur' | 'input' | 'change' | 'submit' | ||
|
||
export interface FormEvent { | ||
type: FormEventType | ||
path: string | ||
} | ||
|
||
export interface InjectedFormGroupValue { | ||
inputId: Ref<string> | ||
name: Ref<string> | ||
size: Ref<string> | ||
error: Ref<string | boolean> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export * from './accordion' | ||
export * from './avatar' | ||
export * from './button' | ||
export * from './clipboard' | ||
export * from './command-palette' | ||
export * from './dropdown' | ||
export * from './form' | ||
export * from './link' | ||
export * from './notification' | ||
export * from './popper' | ||
export * from './tabs' | ||
export * from './vertical-navigation' | ||
export * from './utils' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { NuxtLinkProps } from '#app' | ||
|
||
export interface Link extends NuxtLinkProps { | ||
active?: boolean | ||
exact?: boolean | ||
exactQuery?: boolean | ||
exactMatch?: boolean | ||
inactiveClass?: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { Avatar } from './avatar' | ||
import type { Button } from './button' | ||
import appConfig from '#build/app.config' | ||
|
||
export interface NotificationAction extends Partial<Button> { | ||
click: Function | ||
} | ||
|
||
export interface Notification { | ||
id: string | ||
title: string | ||
description: string | ||
icon?: string | ||
avatar?: Partial<Avatar> | ||
closeButton?: Partial<Button> | ||
timeout: number | ||
actions?: NotificationAction[] | ||
click?: Function | ||
callback?: Function | ||
color?: string | ||
ui?: Partial<typeof appConfig.ui.notification> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Placement, PositioningStrategy } from '@popperjs/core' | ||
|
||
export interface PopperOptions { | ||
locked?: boolean | ||
overflowPadding?: number | ||
offsetDistance?: number | ||
offsetSkid?: number | ||
placement?: Placement | ||
strategy?: PositioningStrategy | ||
gpuAcceleration?: boolean | ||
adaptive?: boolean | ||
scroll?: boolean | ||
resize?: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface TabItem { | ||
label: string | ||
slot?: string | ||
disabled?: boolean | ||
content?: string | ||
[key: string]: any | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type Strategy = 'merge' | 'override'; | ||
|
||
export type NestedKeyOf<ObjectType extends object> = { | ||
[Key in keyof ObjectType]: ObjectType[Key] extends object | ||
? NestedKeyOf<ObjectType[Key]> | ||
: Key; | ||
}[keyof ObjectType]; | ||
|
||
export type DeepPartial<T> = Partial<{ | ||
[P in keyof T]: DeepPartial<T[P]> | { [key: string]: string }; | ||
}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Link } from './link' | ||
import type { Avatar } from './avatar' | ||
|
||
export interface VerticalNavigationLink extends Link { | ||
label: string | ||
icon?: string | ||
iconClass?: string | ||
avatar?: Avatar | ||
click?: Function | ||
badge?: string | number | ||
} |