mltc-design-system
Version:
長照設計系統
76 lines (75 loc) • 2.39 kB
TypeScript
import { App, Component } from 'vue';
import { default as Button } from './components/Button.vue';
import { default as DemoBlock } from './components/DemoBlock.vue';
import { default as Input } from './components/Input.vue';
import { default as Select } from './components/Select.vue';
import { default as Checkbox } from './components/Checkbox.vue';
import { default as CheckboxGroup } from './components/CheckboxGroup.vue';
export type ButtonType = 'default' | 'primary' | 'secondary' | 'text' | 'link' | 'outline';
export type ButtonSize = 'small' | 'medium' | 'large';
export interface ButtonProps {
type?: ButtonType;
size?: ButtonSize;
disabled?: boolean;
loading?: boolean;
block?: boolean;
plain?: boolean;
color?: string;
}
export type InputType = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url' | 'search';
export type InputSize = 'small' | 'medium' | 'large';
export type InputStatus = 'normal' | 'error' | 'success' | 'warning';
export interface InputProps {
type?: InputType;
modelValue?: string | number;
size?: InputSize;
status?: InputStatus;
placeholder?: string;
disabled?: boolean;
readonly?: boolean;
maxlength?: number;
showWordLimit?: boolean;
clearable?: boolean;
showPassword?: boolean;
prefixIcon?: string;
suffixIcon?: string;
id?: string;
name?: string;
autofocus?: boolean;
autocomplete?: string;
errorMessage?: string;
}
export type SelectSize = 'small' | 'medium' | 'large';
export interface SelectOption {
label: string;
value: string | number;
disabled?: boolean;
}
export interface SelectProps {
modelValue: string | number | Array<string | number>;
options: SelectOption[];
placeholder?: string;
size?: SelectSize;
disabled?: boolean;
readonly?: boolean;
clearable?: boolean;
multiple?: boolean;
filterable?: boolean;
searchPlaceholder?: string;
emptyText?: string;
label?: string;
required?: boolean;
error?: boolean;
errorMessage?: string;
helpText?: string;
dropdownWidth?: string | number;
maxHeight?: string | number;
}
export interface ComponentsMap {
[key: string]: Component;
}
declare const MLTCDesignSystem: {
install: (app: App) => void;
};
export default MLTCDesignSystem;
export { Button, DemoBlock, Input, Select, Checkbox, CheckboxGroup };