mc-plus 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/hooks-c7yYlQyM.js +15 -0
- package/dist/es/index.js +39 -10
- package/dist/es/mc-alert-D_0-anUc.js +12 -0
- package/dist/es/{mc-button-CCqqz0nh.js → mc-button-CUHRxe0J.js} +7 -7
- package/dist/es/{mc-collapse-yds-F_6E.js → mc-collapse-HNiVA8cx.js} +8 -8
- package/dist/es/{mc-icon-B0xq3JPC.js → mc-icon--CImsgxi.js} +1 -1
- package/dist/es/mc-input-C0-hVMB4.js +16 -0
- package/dist/es/mc-message-CiZLkARt.js +51 -0
- package/dist/es/mc-radio-CyQBkFhk.js +20 -0
- package/dist/es/mc-select-DphuwPx6.js +52 -0
- package/dist/es/mc-switch-B6sZH0JJ.js +11 -0
- package/dist/es/mc-tag-DAxgmVb3.js +53 -0
- package/dist/es/mc-toast-FFs5K38d.js +52 -0
- package/dist/es/mc-tooltip-CSuvzJyd.js +33 -0
- package/dist/es/theme/index.css +1 -1
- package/dist/es/theme/mc-alert.css +1 -0
- package/dist/es/theme/mc-button.css +1 -1
- package/dist/es/theme/mc-collapse.css +1 -1
- package/dist/es/theme/mc-icon.css +1 -1
- package/dist/es/theme/mc-input.css +1 -0
- package/dist/es/theme/mc-message.css +1 -0
- package/dist/es/theme/mc-radio.css +1 -0
- package/dist/es/theme/mc-select.css +1 -0
- package/dist/es/theme/mc-switch.css +1 -0
- package/dist/es/theme/mc-tag.css +1 -0
- package/dist/es/theme/mc-toast.css +1 -0
- package/dist/es/theme/mc-tooltip.css +1 -0
- package/dist/es/{utils-CDDTlenj.js → utils-BwgRXuj9.js} +1 -1
- package/dist/es/vendor-CNzO2Q1s.js +506 -0
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +10 -1
- package/dist/types/components/mc-alert/index.d.ts +48 -0
- package/dist/types/components/mc-alert/types.d.ts +17 -0
- package/dist/types/components/mc-icon/types.d.ts +1 -1
- package/dist/types/components/mc-input/index.d.ts +57 -0
- package/dist/types/components/mc-input/types.d.ts +17 -0
- package/dist/types/components/mc-message/index.d.ts +64 -0
- package/dist/types/components/mc-message/types.d.ts +35 -0
- package/dist/types/components/mc-radio/index.d.ts +87 -0
- package/dist/types/components/mc-radio/types.d.ts +35 -0
- package/dist/types/components/mc-select/constant.d.ts +4 -0
- package/dist/types/components/mc-select/index.d.ts +93 -0
- package/dist/types/components/mc-select/types.d.ts +42 -0
- package/dist/types/components/mc-switch/index.d.ts +45 -0
- package/dist/types/components/mc-switch/types.d.ts +15 -0
- package/dist/types/components/mc-tag/index.d.ts +57 -0
- package/dist/types/components/mc-tag/types.d.ts +24 -0
- package/dist/types/components/mc-toast/index.d.ts +61 -0
- package/dist/types/components/mc-toast/toast.d.ts +19 -0
- package/dist/types/components/mc-toast/types.d.ts +21 -0
- package/dist/types/components/mc-tooltip/index.d.ts +65 -0
- package/dist/types/components/mc-tooltip/types.d.ts +20 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useClickOutside.d.ts +2 -0
- package/dist/types/hooks/useEventListener.d.ts +2 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +3 -1
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +52 -49
- package/dist/es/vendor-D4RgMZ9r.js +0 -171
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export declare const McTag: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').TagProps> & Readonly<{
|
|
4
|
+
onClick?: ((val: MouseEvent) => any) | undefined;
|
|
5
|
+
onClose?: ((val: MouseEvent) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
ref: import('vue').Ref<HTMLDivElement | void>;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
9
|
+
click: (val: MouseEvent) => any;
|
|
10
|
+
close: (val: MouseEvent) => any;
|
|
11
|
+
}, import('vue').PublicProps, {
|
|
12
|
+
size: import('../../core').TagSize;
|
|
13
|
+
type: import('../../core').TagType;
|
|
14
|
+
radius: import('../../core').TagRadius;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
17
|
+
_ref: HTMLDivElement;
|
|
18
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
19
|
+
P: {};
|
|
20
|
+
B: {};
|
|
21
|
+
D: {};
|
|
22
|
+
C: {};
|
|
23
|
+
M: {};
|
|
24
|
+
Defaults: {};
|
|
25
|
+
}, Readonly<import('../../core').TagProps> & Readonly<{
|
|
26
|
+
onClick?: ((val: MouseEvent) => any) | undefined;
|
|
27
|
+
onClose?: ((val: MouseEvent) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
ref: import('vue').Ref<HTMLDivElement | void>;
|
|
30
|
+
}, {}, {}, {}, {
|
|
31
|
+
size: import('../../core').TagSize;
|
|
32
|
+
type: import('../../core').TagType;
|
|
33
|
+
radius: import('../../core').TagRadius;
|
|
34
|
+
selected: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
__isFragment?: never;
|
|
37
|
+
__isTeleport?: never;
|
|
38
|
+
__isSuspense?: never;
|
|
39
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('../../core').TagProps> & Readonly<{
|
|
40
|
+
onClick?: ((val: MouseEvent) => any) | undefined;
|
|
41
|
+
onClose?: ((val: MouseEvent) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
ref: import('vue').Ref<HTMLDivElement | void>;
|
|
44
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
45
|
+
click: (val: MouseEvent) => any;
|
|
46
|
+
close: (val: MouseEvent) => any;
|
|
47
|
+
}, string, {
|
|
48
|
+
size: import('../../core').TagSize;
|
|
49
|
+
type: import('../../core').TagType;
|
|
50
|
+
radius: import('../../core').TagRadius;
|
|
51
|
+
selected: boolean;
|
|
52
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
53
|
+
$slots: {
|
|
54
|
+
default?(_: {}): any;
|
|
55
|
+
};
|
|
56
|
+
}) & import('vue').Plugin;
|
|
57
|
+
export default McTag;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { IconType } from '../mc-icon/types';
|
|
3
|
+
export type TagType = "primary" | "plain" | "dark";
|
|
4
|
+
export type TagSize = "medium" | "large" | "small";
|
|
5
|
+
export type TagRadius = "default" | "round";
|
|
6
|
+
export interface TagProps {
|
|
7
|
+
type?: TagType;
|
|
8
|
+
size?: TagSize;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
closable?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
radius?: TagRadius;
|
|
13
|
+
height?: string;
|
|
14
|
+
width?: string;
|
|
15
|
+
icon?: IconType;
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface TagEmits {
|
|
19
|
+
(e: "click", val: MouseEvent): void;
|
|
20
|
+
(e: "close", val: MouseEvent): void;
|
|
21
|
+
}
|
|
22
|
+
export interface TagInstance {
|
|
23
|
+
ref: Ref<HTMLDivElement | void>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export * from './toast';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export declare const McToast: {
|
|
4
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').ToastProps> & Readonly<{
|
|
5
|
+
onClose?: (() => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
ref: import('vue').Ref<HTMLDivElement | void>;
|
|
8
|
+
close: () => void;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
close: () => any;
|
|
11
|
+
}, import('vue').PublicProps, {
|
|
12
|
+
title: string;
|
|
13
|
+
type: import('../../core').ToastType;
|
|
14
|
+
message: string;
|
|
15
|
+
duration: number;
|
|
16
|
+
showClose: boolean;
|
|
17
|
+
position: import('../../core').ToastPosition;
|
|
18
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
19
|
+
_ref: HTMLDivElement;
|
|
20
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
21
|
+
P: {};
|
|
22
|
+
B: {};
|
|
23
|
+
D: {};
|
|
24
|
+
C: {};
|
|
25
|
+
M: {};
|
|
26
|
+
Defaults: {};
|
|
27
|
+
}, Readonly<import('../../core').ToastProps> & Readonly<{
|
|
28
|
+
onClose?: (() => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
ref: import('vue').Ref<HTMLDivElement | void>;
|
|
31
|
+
close: () => void;
|
|
32
|
+
}, {}, {}, {}, {
|
|
33
|
+
title: string;
|
|
34
|
+
type: import('../../core').ToastType;
|
|
35
|
+
message: string;
|
|
36
|
+
duration: number;
|
|
37
|
+
showClose: boolean;
|
|
38
|
+
position: import('../../core').ToastPosition;
|
|
39
|
+
}>;
|
|
40
|
+
__isFragment?: never;
|
|
41
|
+
__isTeleport?: never;
|
|
42
|
+
__isSuspense?: never;
|
|
43
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('../../core').ToastProps> & Readonly<{
|
|
44
|
+
onClose?: (() => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
ref: import('vue').Ref<HTMLDivElement | void>;
|
|
47
|
+
close: () => void;
|
|
48
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
49
|
+
close: () => any;
|
|
50
|
+
}, string, {
|
|
51
|
+
title: string;
|
|
52
|
+
type: import('../../core').ToastType;
|
|
53
|
+
message: string;
|
|
54
|
+
duration: number;
|
|
55
|
+
showClose: boolean;
|
|
56
|
+
position: import('../../core').ToastPosition;
|
|
57
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
58
|
+
declare const _default: {
|
|
59
|
+
install: (app: any) => void;
|
|
60
|
+
};
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ToastProps } from './types';
|
|
2
|
+
export declare const createToast: (options: ToastProps | string) => {
|
|
3
|
+
close: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const toast: (options: ToastProps | string) => {
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const toastPrimary: (options: ToastProps | string) => {
|
|
9
|
+
close: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const toastSuccess: (options: ToastProps | string) => {
|
|
12
|
+
close: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const toastWarning: (options: ToastProps | string) => {
|
|
15
|
+
close: () => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const toastError: (options: ToastProps | string) => {
|
|
18
|
+
close: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { IconType } from '../mc-icon/types';
|
|
3
|
+
export type ToastType = "primary" | "success" | "warning" | "error";
|
|
4
|
+
export type ToastPosition = "top" | "bottom";
|
|
5
|
+
export interface ToastProps {
|
|
6
|
+
type?: ToastType;
|
|
7
|
+
title?: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
icon?: IconType;
|
|
10
|
+
showClose?: boolean;
|
|
11
|
+
duration?: number;
|
|
12
|
+
position?: ToastPosition;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface ToastEmits {
|
|
16
|
+
(e: "close"): void;
|
|
17
|
+
}
|
|
18
|
+
export interface ToastInstance {
|
|
19
|
+
ref: Ref<HTMLDivElement | void>;
|
|
20
|
+
close: () => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export declare const McTooltip: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').TooltipProps> & Readonly<{
|
|
4
|
+
"onVisible:change"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
"onClick:outside"?: (() => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
show(): void;
|
|
8
|
+
hide(): void;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
"visible:change": (value: boolean) => any;
|
|
11
|
+
"click:outside": () => any;
|
|
12
|
+
}, import('vue').PublicProps, {
|
|
13
|
+
trigger: import('../../core').TooltipTrigger;
|
|
14
|
+
placement: import('@popperjs/core').Placement;
|
|
15
|
+
showTimeout: number;
|
|
16
|
+
hideTimeout: number;
|
|
17
|
+
transitionName: string;
|
|
18
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
19
|
+
containerNode: HTMLDivElement;
|
|
20
|
+
triggerNode: HTMLDivElement;
|
|
21
|
+
popperNode: HTMLDivElement;
|
|
22
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
23
|
+
P: {};
|
|
24
|
+
B: {};
|
|
25
|
+
D: {};
|
|
26
|
+
C: {};
|
|
27
|
+
M: {};
|
|
28
|
+
Defaults: {};
|
|
29
|
+
}, Readonly<import('../../core').TooltipProps> & Readonly<{
|
|
30
|
+
"onVisible:change"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
"onClick:outside"?: (() => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
show(): void;
|
|
34
|
+
hide(): void;
|
|
35
|
+
}, {}, {}, {}, {
|
|
36
|
+
trigger: import('../../core').TooltipTrigger;
|
|
37
|
+
placement: import('@popperjs/core').Placement;
|
|
38
|
+
showTimeout: number;
|
|
39
|
+
hideTimeout: number;
|
|
40
|
+
transitionName: string;
|
|
41
|
+
}>;
|
|
42
|
+
__isFragment?: never;
|
|
43
|
+
__isTeleport?: never;
|
|
44
|
+
__isSuspense?: never;
|
|
45
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('../../core').TooltipProps> & Readonly<{
|
|
46
|
+
"onVisible:change"?: ((value: boolean) => any) | undefined;
|
|
47
|
+
"onClick:outside"?: (() => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
show(): void;
|
|
50
|
+
hide(): void;
|
|
51
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
52
|
+
"visible:change": (value: boolean) => any;
|
|
53
|
+
"click:outside": () => any;
|
|
54
|
+
}, string, {
|
|
55
|
+
trigger: import('../../core').TooltipTrigger;
|
|
56
|
+
placement: import('@popperjs/core').Placement;
|
|
57
|
+
showTimeout: number;
|
|
58
|
+
hideTimeout: number;
|
|
59
|
+
transitionName: string;
|
|
60
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
61
|
+
$slots: {
|
|
62
|
+
default?(_: {}): any;
|
|
63
|
+
content?(_: {}): any;
|
|
64
|
+
};
|
|
65
|
+
}) & import('vue').Plugin;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Placement, Options } from '@popperjs/core';
|
|
2
|
+
export type TooltipTrigger = "hover" | "click";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
content?: string;
|
|
5
|
+
trigger?: TooltipTrigger;
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
popperOptions?: Partial<Options>;
|
|
9
|
+
showTimeout?: number;
|
|
10
|
+
hideTimeout?: number;
|
|
11
|
+
transitionName?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TooltipEmits {
|
|
14
|
+
(e: "visible:change", value: boolean): void;
|
|
15
|
+
(e: "click:outside"): void;
|
|
16
|
+
}
|
|
17
|
+
export interface TooltipInstance {
|
|
18
|
+
show(): void;
|
|
19
|
+
hide(): void;
|
|
20
|
+
}
|