123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371 |
- import * as vue from 'vue';
- import { ComponentPropsOptions, ExtractPropTypes, PropType, ComponentPublicInstance, FunctionalComponent, Prop } from 'vue';
- interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
- filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
- }
- type ClassValue = any;
- type Density = null | 'default' | 'comfortable' | 'compact';
- type JSXComponent<Props = any> = {
- new (): ComponentPublicInstance<Props>;
- } | FunctionalComponent<Props>;
- type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
- declare const IconValue: PropType<IconValue>;
- type VRatingItemSlot = {
- value: number;
- index: number;
- isFilled: boolean;
- isHovered: boolean;
- icon: IconValue;
- color?: string;
- props: Record<string, unknown>;
- rating: number;
- };
- type VRatingItemLabelSlot = {
- value: number;
- index: number;
- label?: string;
- };
- declare const VRating: {
- new (...args: any[]): vue.CreateComponentPublicInstance<{
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- } & {
- name?: string | undefined;
- color?: string | undefined;
- class?: any;
- theme?: string | undefined;
- activeColor?: string | undefined;
- itemLabels?: string[] | undefined;
- } & {
- $children?: {} | vue.VNodeChild | {
- item?: ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- };
- 'v-slots'?: {
- item?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } | undefined;
- } & {
- "v-slot:item"?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- "v-slot:item-label"?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } & {
- "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
- }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
- 'update:modelValue': (value: number | string) => true;
- }, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- } & {
- name?: string | undefined;
- color?: string | undefined;
- class?: any;
- theme?: string | undefined;
- activeColor?: string | undefined;
- itemLabels?: string[] | undefined;
- } & {
- $children?: {} | vue.VNodeChild | {
- item?: ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- };
- 'v-slots'?: {
- item?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } | undefined;
- } & {
- "v-slot:item"?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- "v-slot:item-label"?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } & {
- "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
- }, {
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- }, true, {}, vue.SlotsType<Partial<{
- item: (arg: VRatingItemSlot) => vue.VNode[];
- 'item-label': (arg: VRatingItemLabelSlot) => vue.VNode[];
- }>>, {
- P: {};
- B: {};
- D: {};
- C: {};
- M: {};
- Defaults: {};
- }, {
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- } & {
- name?: string | undefined;
- color?: string | undefined;
- class?: any;
- theme?: string | undefined;
- activeColor?: string | undefined;
- itemLabels?: string[] | undefined;
- } & {
- $children?: {} | vue.VNodeChild | {
- item?: ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- };
- 'v-slots'?: {
- item?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } | undefined;
- } & {
- "v-slot:item"?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- "v-slot:item-label"?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } & {
- "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
- }, {}, {}, {}, {}, {
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- }>;
- __isFragment?: never;
- __isTeleport?: never;
- __isSuspense?: never;
- } & vue.ComponentOptionsBase<{
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- } & {
- name?: string | undefined;
- color?: string | undefined;
- class?: any;
- theme?: string | undefined;
- activeColor?: string | undefined;
- itemLabels?: string[] | undefined;
- } & {
- $children?: {} | vue.VNodeChild | {
- item?: ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- };
- 'v-slots'?: {
- item?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- 'item-label'?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } | undefined;
- } & {
- "v-slot:item"?: false | ((arg: VRatingItemSlot) => vue.VNodeChild) | undefined;
- "v-slot:item-label"?: false | ((arg: VRatingItemLabelSlot) => vue.VNodeChild) | undefined;
- } & {
- "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
- }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
- 'update:modelValue': (value: number | string) => true;
- }, string, {
- length: string | number;
- style: vue.StyleValue;
- disabled: boolean;
- size: string | number;
- readonly: boolean;
- tag: string;
- modelValue: string | number;
- density: Density;
- ripple: boolean;
- clearable: boolean;
- hover: boolean;
- itemAriaLabel: string;
- emptyIcon: IconValue;
- fullIcon: IconValue;
- halfIncrements: boolean;
- itemLabelPosition: string;
- }, {}, string, vue.SlotsType<Partial<{
- item: (arg: VRatingItemSlot) => vue.VNode[];
- 'item-label': (arg: VRatingItemLabelSlot) => vue.VNode[];
- }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
- theme: StringConstructor;
- tag: {
- type: StringConstructor;
- default: string;
- };
- size: {
- type: (StringConstructor | NumberConstructor)[];
- default: string;
- };
- density: {
- type: vue.PropType<Density>;
- default: string;
- validator: (v: any) => boolean;
- };
- class: vue.PropType<ClassValue>;
- style: {
- type: vue.PropType<vue.StyleValue>;
- default: null;
- };
- name: StringConstructor;
- itemAriaLabel: {
- type: StringConstructor;
- default: string;
- };
- activeColor: StringConstructor;
- color: StringConstructor;
- clearable: BooleanConstructor;
- disabled: BooleanConstructor;
- emptyIcon: {
- type: vue.PropType<IconValue>;
- default: string;
- };
- fullIcon: {
- type: vue.PropType<IconValue>;
- default: string;
- };
- halfIncrements: BooleanConstructor;
- hover: BooleanConstructor;
- length: {
- type: (StringConstructor | NumberConstructor)[];
- default: number;
- };
- readonly: BooleanConstructor;
- modelValue: {
- type: (StringConstructor | NumberConstructor)[];
- default: number;
- };
- itemLabels: Prop<string[]>;
- itemLabelPosition: {
- type: StringConstructor;
- default: string;
- validator: (v: any) => boolean;
- };
- ripple: BooleanConstructor;
- }, vue.ExtractPropTypes<{
- theme: StringConstructor;
- tag: {
- type: StringConstructor;
- default: string;
- };
- size: {
- type: (StringConstructor | NumberConstructor)[];
- default: string;
- };
- density: {
- type: vue.PropType<Density>;
- default: string;
- validator: (v: any) => boolean;
- };
- class: vue.PropType<ClassValue>;
- style: {
- type: vue.PropType<vue.StyleValue>;
- default: null;
- };
- name: StringConstructor;
- itemAriaLabel: {
- type: StringConstructor;
- default: string;
- };
- activeColor: StringConstructor;
- color: StringConstructor;
- clearable: BooleanConstructor;
- disabled: BooleanConstructor;
- emptyIcon: {
- type: vue.PropType<IconValue>;
- default: string;
- };
- fullIcon: {
- type: vue.PropType<IconValue>;
- default: string;
- };
- halfIncrements: BooleanConstructor;
- hover: BooleanConstructor;
- length: {
- type: (StringConstructor | NumberConstructor)[];
- default: number;
- };
- readonly: BooleanConstructor;
- modelValue: {
- type: (StringConstructor | NumberConstructor)[];
- default: number;
- };
- itemLabels: Prop<string[]>;
- itemLabelPosition: {
- type: StringConstructor;
- default: string;
- validator: (v: any) => boolean;
- };
- ripple: BooleanConstructor;
- }>>;
- type VRating = InstanceType<typeof VRating>;
- export { VRating };
|