style: lint
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
import type { AcceptableValue } from 'reka-ui'
|
||||
|
||||
/**
|
||||
* Option rendered by {@link Combobox}.
|
||||
*
|
||||
* @param T Value type accepted by the underlying Reka combobox item.
|
||||
*/
|
||||
export interface ComboboxOptionItem<T extends AcceptableValue> {
|
||||
/** User-visible label shown in the input and option row. */
|
||||
label: string
|
||||
/** Value passed through `v-model` when this option is selected. */
|
||||
value: T
|
||||
/** Optional secondary text shown below the label. */
|
||||
description?: string
|
||||
/** Prevents the option from being selected when true. */
|
||||
disabled?: boolean
|
||||
/** Iconify class name rendered before the label. */
|
||||
icon?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Option group accepted by {@link Combobox}.
|
||||
*
|
||||
* @param T Value type shared by the group's child options.
|
||||
*/
|
||||
export interface ComboboxOptionGroupItem<T extends AcceptableValue> {
|
||||
/** Optional group heading rendered above child options. */
|
||||
groupLabel?: string
|
||||
/** Options rendered within this group. */
|
||||
children?: ComboboxOptionItem<T>[]
|
||||
/** Optional group heading rendered above child options. */
|
||||
groupLabel?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Option rendered by {@link Combobox}.
|
||||
*
|
||||
* @param T Value type accepted by the underlying Reka combobox item.
|
||||
*/
|
||||
export interface ComboboxOptionItem<T extends AcceptableValue> {
|
||||
/** Optional secondary text shown below the label. */
|
||||
description?: string
|
||||
/** Prevents the option from being selected when true. */
|
||||
disabled?: boolean
|
||||
/** Iconify class name rendered before the label. */
|
||||
icon?: string
|
||||
/** User-visible label shown in the input and option row. */
|
||||
label: string
|
||||
/** Value passed through `v-model` when this option is selected. */
|
||||
value: T
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
*
|
||||
* @param T String or number value emitted through the tab group's `v-model`.
|
||||
*/
|
||||
export interface SelectTabOption<T extends string | number> {
|
||||
/** User-visible tab label. */
|
||||
label: string
|
||||
/** Value passed through `v-model` when this tab is selected. */
|
||||
value: T
|
||||
export interface SelectTabOption<T extends number | string> {
|
||||
/** Optional secondary text reserved for consumers that render richer tab content. */
|
||||
description?: string
|
||||
/** Iconify class name rendered before the label. */
|
||||
icon?: string
|
||||
/** User-visible tab label. */
|
||||
label: string
|
||||
/** Value passed through `v-model` when this tab is selected. */
|
||||
value: T
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import type { AcceptableValue } from 'reka-ui'
|
||||
|
||||
/**
|
||||
* Option rendered by {@link Select} and {@link SelectOption}.
|
||||
*
|
||||
* @param T Value type accepted by the underlying Reka select item.
|
||||
*/
|
||||
export interface SelectOptionItem<T extends AcceptableValue> {
|
||||
/** User-visible label shown in the trigger and option row. */
|
||||
label: string
|
||||
/** Value passed through `v-model` when this option is selected. */
|
||||
value: T
|
||||
/** Optional secondary text shown below the label. */
|
||||
description?: string
|
||||
/** Prevents the option from being selected when true. */
|
||||
disabled?: boolean
|
||||
/** Iconify class name rendered before the label. */
|
||||
icon?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Option group accepted by {@link Select}.
|
||||
*
|
||||
* @param T Value type shared by the group's child options.
|
||||
*/
|
||||
export interface SelectOptionGroupItem<T extends AcceptableValue> {
|
||||
/** Optional group heading rendered above child options. */
|
||||
groupLabel?: string
|
||||
/** Options rendered within this group. */
|
||||
children?: SelectOptionItem<T>[]
|
||||
/** Optional group heading rendered above child options. */
|
||||
groupLabel?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Option rendered by {@link Select} and {@link SelectOption}.
|
||||
*
|
||||
* @param T Value type accepted by the underlying Reka select item.
|
||||
*/
|
||||
export interface SelectOptionItem<T extends AcceptableValue> {
|
||||
/** Optional secondary text shown below the label. */
|
||||
description?: string
|
||||
/** Prevents the option from being selected when true. */
|
||||
disabled?: boolean
|
||||
/** Iconify class name rendered before the label. */
|
||||
icon?: string
|
||||
/** User-visible label shown in the trigger and option row. */
|
||||
label: string
|
||||
/** Value passed through `v-model` when this option is selected. */
|
||||
value: T
|
||||
}
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
/** Available button sizes shared by the button primitives. */
|
||||
export type ButtonSize = 'sm' | 'md' | 'lg' | 'unset'
|
||||
|
||||
/** Geometry used by solid buttons. */
|
||||
export type ButtonShape = 'rect' | 'rounded' | 'circle' | 'parallelogram'
|
||||
|
||||
/** Supported button color families backed by the Wind3 palette. */
|
||||
export type ButtonColor = 'neutral' | 'primary' | 'cyan' | 'blue' | 'green' | 'lime' | 'amber' | 'red' | 'orange' | 'purple' | 'pink'
|
||||
|
||||
/** Visual emphasis within a button color family. */
|
||||
export type ButtonVariant = 'primary' | 'secondary'
|
||||
|
||||
/** Shared interaction and content props implemented by {@link BasicButton}. */
|
||||
export interface BasicButtonProps {
|
||||
/** Expands the button to the width of its container. @default false */
|
||||
block?: boolean
|
||||
/** Prevents interaction. */
|
||||
disabled?: boolean
|
||||
/** UnoCSS/Iconify class rendered before the label or default slot. */
|
||||
icon?: string
|
||||
/** Text content used instead of the default slot. */
|
||||
label?: string
|
||||
/** Prevents interaction. */
|
||||
disabled?: boolean
|
||||
/** Replaces the icon with a spinner and prevents interaction. */
|
||||
loading?: boolean
|
||||
/** Controls padding and type scale. @default 'md' */
|
||||
size?: ButtonSize
|
||||
/** Expands the button to the width of its container. @default false */
|
||||
block?: boolean
|
||||
}
|
||||
|
||||
/** Supported button color families backed by the Wind3 palette. */
|
||||
export type ButtonColor = 'amber' | 'blue' | 'cyan' | 'green' | 'lime' | 'neutral' | 'orange' | 'pink' | 'primary' | 'purple' | 'red'
|
||||
|
||||
/** Visual props for the solid button. */
|
||||
export interface ButtonProps extends BasicButtonProps {
|
||||
/** Controls the button geometry. @default 'rect' */
|
||||
shape?: ButtonShape
|
||||
/** Selects the button color family. @default 'neutral' */
|
||||
color?: ButtonColor
|
||||
/** Selects solid or subtle emphasis within the color family. @default 'secondary' */
|
||||
variant?: ButtonVariant
|
||||
/** Shows the offset outline on hover and keyboard focus. @default true */
|
||||
outline?: boolean
|
||||
/** Controls the button geometry. @default 'rect' */
|
||||
shape?: ButtonShape
|
||||
/** Selects solid or subtle emphasis within the color family. @default 'secondary' */
|
||||
variant?: ButtonVariant
|
||||
}
|
||||
|
||||
/** Geometry used by solid buttons. */
|
||||
export type ButtonShape = 'circle' | 'parallelogram' | 'rect' | 'rounded'
|
||||
|
||||
/** Available button sizes shared by the button primitives. */
|
||||
export type ButtonSize = 'lg' | 'md' | 'sm' | 'unset'
|
||||
|
||||
/** Visual emphasis within a button color family. */
|
||||
export type ButtonVariant = 'primary' | 'secondary'
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
export class LocalStorageShim implements Storage {
|
||||
get length() {
|
||||
return this.map.size
|
||||
}
|
||||
|
||||
private map = new Map<string, any>()
|
||||
|
||||
clear() {
|
||||
@@ -13,15 +17,11 @@ export class LocalStorageShim implements Storage {
|
||||
return Array.from(this.map.keys())[index] || null
|
||||
}
|
||||
|
||||
get length() {
|
||||
return this.map.size
|
||||
removeItem(key: string) {
|
||||
this.map.delete(key)
|
||||
}
|
||||
|
||||
setItem(key: string, value: string) {
|
||||
this.map.set(key, value)
|
||||
}
|
||||
|
||||
removeItem(key: string) {
|
||||
this.map.delete(key)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user