@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
124 lines (123 loc) • 3.45 kB
TypeScript
import { NeonSize } from '@/common/enums/NeonSize';
import { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';
import { NeonChipAction } from '@/common/enums/NeonChipAction';
/**
* <p>
* <strong>NeonChip</strong> is a clickable or removable chip which can be used as a tag or to indicate selected values
* in filters and other more complex inputs (e.g. search / multiselect). Clicking the chip results in a callback and in
* the case it is removable, also removal of the chip. Chips are designed to fit inside inputs for creating more complex
* input components.
* </p>
* <p>
* Chips are navigable via tab (tabindex). When focussed, use space, return or enter to click on clickable tabs and, in
* the case of removable tabs, use backspace and delete to remove a tab. Escape will blur a focussed tab.
* </p>
*/
declare const _default: import("vue").DefineComponent<{
/**
* The chip label
*/
label: {
type: StringConstructor;
required: true;
};
/**
* The size of the chip.
*/
size: {
type: () => NeonSize;
default: NeonSize;
};
/**
* The chip color.
*/
color: {
type: () => NeonFunctionalColor;
default: NeonFunctionalColor;
};
/**
* The action when clicking on a chip. Can be click or remove.
*/
action: {
type: () => NeonChipAction;
default: NeonChipAction;
};
/**
* The chip disabled state.
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* This is the name of an icon which can optionally be added to the chip.
*/
icon: {
type: StringConstructor;
default: null;
};
}, {
chip: import("vue").Ref<null>;
open: import("vue").Ref<boolean>;
active: import("vue").Ref<boolean>;
role: import("vue").ComputedRef<"link" | "button" | undefined>;
attrs: {
[x: string]: unknown;
};
keyUp: () => void;
keyDown: () => void;
clicked: () => void;
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close")[], "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
/**
* The chip label
*/
label: {
type: StringConstructor;
required: true;
};
/**
* The size of the chip.
*/
size: {
type: () => NeonSize;
default: NeonSize;
};
/**
* The chip color.
*/
color: {
type: () => NeonFunctionalColor;
default: NeonFunctionalColor;
};
/**
* The action when clicking on a chip. Can be click or remove.
*/
action: {
type: () => NeonChipAction;
default: NeonChipAction;
};
/**
* The chip disabled state.
*/
disabled: {
type: BooleanConstructor;
default: boolean;
};
/**
* This is the name of an icon which can optionally be added to the chip.
*/
icon: {
type: StringConstructor;
default: null;
};
}>> & {
onClick?: ((...args: any[]) => any) | undefined;
onClose?: ((...args: any[]) => any) | undefined;
}, {
disabled: boolean;
icon: string;
size: NeonSize;
color: NeonFunctionalColor;
action: NeonChipAction;
}, {}>;
export default _default;