mc-plus 1.0.7 → 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.
Files changed (57) hide show
  1. package/dist/es/hooks-c7yYlQyM.js +15 -0
  2. package/dist/es/index.js +40 -12
  3. package/dist/es/mc-alert-D_0-anUc.js +12 -0
  4. package/dist/es/{mc-button-D6IV1cvA.js → mc-button-CUHRxe0J.js} +3 -3
  5. package/dist/es/{mc-collapse-DE4emHTm.js → mc-collapse-HNiVA8cx.js} +2 -2
  6. package/dist/es/{mc-icon-B0xq3JPC.js → mc-icon--CImsgxi.js} +1 -1
  7. package/dist/es/mc-input-C0-hVMB4.js +16 -0
  8. package/dist/es/mc-message-CiZLkARt.js +51 -0
  9. package/dist/es/mc-radio-CyQBkFhk.js +20 -0
  10. package/dist/es/mc-select-DphuwPx6.js +52 -0
  11. package/dist/es/mc-switch-B6sZH0JJ.js +11 -0
  12. package/dist/es/mc-tag-DAxgmVb3.js +53 -0
  13. package/dist/es/mc-toast-FFs5K38d.js +52 -0
  14. package/dist/es/mc-tooltip-CSuvzJyd.js +33 -0
  15. package/dist/es/theme/index.css +1 -1
  16. package/dist/es/theme/mc-alert.css +1 -0
  17. package/dist/es/theme/mc-input.css +1 -0
  18. package/dist/es/theme/mc-message.css +1 -0
  19. package/dist/es/theme/mc-radio.css +1 -0
  20. package/dist/es/theme/mc-select.css +1 -0
  21. package/dist/es/theme/mc-switch.css +1 -0
  22. package/dist/es/theme/mc-tag.css +1 -0
  23. package/dist/es/theme/mc-toast.css +1 -0
  24. package/dist/es/theme/mc-tooltip.css +1 -0
  25. package/dist/es/{utils-CDDTlenj.js → utils-BwgRXuj9.js} +1 -1
  26. package/dist/es/vendor-CNzO2Q1s.js +506 -0
  27. package/dist/index.css +1 -1
  28. package/dist/types/components/index.d.ts +10 -1
  29. package/dist/types/components/mc-alert/index.d.ts +48 -0
  30. package/dist/types/components/mc-alert/types.d.ts +17 -0
  31. package/dist/types/components/mc-input/index.d.ts +57 -0
  32. package/dist/types/components/mc-input/types.d.ts +17 -0
  33. package/dist/types/components/mc-message/index.d.ts +64 -0
  34. package/dist/types/components/mc-message/types.d.ts +35 -0
  35. package/dist/types/components/mc-radio/index.d.ts +87 -0
  36. package/dist/types/components/mc-radio/types.d.ts +35 -0
  37. package/dist/types/components/mc-select/constant.d.ts +4 -0
  38. package/dist/types/components/mc-select/index.d.ts +93 -0
  39. package/dist/types/components/mc-select/types.d.ts +42 -0
  40. package/dist/types/components/mc-switch/index.d.ts +45 -0
  41. package/dist/types/components/mc-switch/types.d.ts +15 -0
  42. package/dist/types/components/mc-tag/index.d.ts +57 -0
  43. package/dist/types/components/mc-tag/types.d.ts +24 -0
  44. package/dist/types/components/mc-toast/index.d.ts +61 -0
  45. package/dist/types/components/mc-toast/toast.d.ts +19 -0
  46. package/dist/types/components/mc-toast/types.d.ts +21 -0
  47. package/dist/types/components/mc-tooltip/index.d.ts +65 -0
  48. package/dist/types/components/mc-tooltip/types.d.ts +20 -0
  49. package/dist/types/hooks/index.d.ts +2 -0
  50. package/dist/types/hooks/useClickOutside.d.ts +2 -0
  51. package/dist/types/hooks/useEventListener.d.ts +2 -0
  52. package/dist/umd/index.css +1 -1
  53. package/dist/umd/index.css.gz +0 -0
  54. package/dist/umd/index.umd.cjs +3 -1
  55. package/dist/umd/index.umd.cjs.gz +0 -0
  56. package/package.json +4 -1
  57. package/dist/es/vendor-D4RgMZ9r.js +0 -171
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ export { default as useClickOutside } from './useClickOutside';
2
+ export { default as useEventListener } from './useEventListener';
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export default function useClickOutside(elementRef: Ref<HTMLElement | void>, callback: (e: MouseEvent) => void): void;
@@ -0,0 +1,2 @@
1
+ import { MaybeRef } from 'vue';
2
+ export default function useEventListener(target: MaybeRef<EventTarget | HTMLElement | void>, event: string, handler: (e: Event) => any): void;