mc-plus 1.0.7 → 1.0.9

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 (71) hide show
  1. package/dist/es/hooks-c7yYlQyM.js +15 -0
  2. package/dist/es/index.js +46 -10
  3. package/dist/es/mc-alert-DoOso0Gr.js +12 -0
  4. package/dist/es/{mc-button-D6IV1cvA.js → mc-button-CUHRxe0J.js} +3 -3
  5. package/dist/es/mc-checkbox-B38O15cu.js +11 -0
  6. package/dist/es/{mc-collapse-DE4emHTm.js → mc-collapse-HNiVA8cx.js} +2 -2
  7. package/dist/es/{mc-icon-B0xq3JPC.js → mc-icon--CImsgxi.js} +1 -1
  8. package/dist/es/mc-input-C0-hVMB4.js +16 -0
  9. package/dist/es/mc-message-CypXiHrq.js +51 -0
  10. package/dist/es/mc-radio-BZwvlo2W.js +23 -0
  11. package/dist/es/mc-select-AXjlPhsg.js +52 -0
  12. package/dist/es/mc-switch-B6sZH0JJ.js +11 -0
  13. package/dist/es/mc-table-CT4Mb5B4.js +252 -0
  14. package/dist/es/mc-tag-aW5PUBk2.js +33 -0
  15. package/dist/es/mc-toast-CmkXAYH6.js +52 -0
  16. package/dist/es/mc-tooltip-CSuvzJyd.js +33 -0
  17. package/dist/es/theme/index.css +1 -1
  18. package/dist/es/theme/mc-alert.css +1 -0
  19. package/dist/es/theme/mc-checkbox.css +1 -0
  20. package/dist/es/theme/mc-input.css +1 -0
  21. package/dist/es/theme/mc-message.css +1 -0
  22. package/dist/es/theme/mc-radio.css +1 -0
  23. package/dist/es/theme/mc-select.css +1 -0
  24. package/dist/es/theme/mc-switch.css +1 -0
  25. package/dist/es/theme/mc-table.css +1 -0
  26. package/dist/es/theme/mc-tag.css +1 -0
  27. package/dist/es/theme/mc-toast.css +1 -0
  28. package/dist/es/theme/mc-tooltip.css +1 -0
  29. package/dist/es/{utils-CDDTlenj.js → utils-BwgRXuj9.js} +1 -1
  30. package/dist/es/vendor-CNzO2Q1s.js +506 -0
  31. package/dist/index.css +1 -1
  32. package/dist/types/components/index.d.ts +12 -1
  33. package/dist/types/components/mc-alert/index.d.ts +49 -0
  34. package/dist/types/components/mc-alert/types.d.ts +17 -0
  35. package/dist/types/components/mc-checkbox/index.d.ts +29 -0
  36. package/dist/types/components/mc-checkbox/types.d.ts +15 -0
  37. package/dist/types/components/mc-form/constanst.d.ts +4 -0
  38. package/dist/types/components/mc-form/types.d.ts +47 -0
  39. package/dist/types/components/mc-input/index.d.ts +57 -0
  40. package/dist/types/components/mc-input/types.d.ts +17 -0
  41. package/dist/types/components/mc-message/index.d.ts +61 -0
  42. package/dist/types/components/mc-message/types.d.ts +34 -0
  43. package/dist/types/components/mc-radio/constant.d.ts +3 -0
  44. package/dist/types/components/mc-radio/index.d.ts +51 -0
  45. package/dist/types/components/mc-radio/types.d.ts +20 -0
  46. package/dist/types/components/mc-select/constant.d.ts +4 -0
  47. package/dist/types/components/mc-select/index.d.ts +93 -0
  48. package/dist/types/components/mc-select/types.d.ts +42 -0
  49. package/dist/types/components/mc-switch/index.d.ts +45 -0
  50. package/dist/types/components/mc-switch/types.d.ts +15 -0
  51. package/dist/types/components/mc-table/composables/usePagination.d.ts +11 -0
  52. package/dist/types/components/mc-table/composables/useTableScroll.d.ts +13 -0
  53. package/dist/types/components/mc-table/composables/useTableSort.d.ts +17 -0
  54. package/dist/types/components/mc-table/index.d.ts +7 -0
  55. package/dist/types/components/mc-table/types.d.ts +168 -0
  56. package/dist/types/components/mc-tag/index.d.ts +60 -0
  57. package/dist/types/components/mc-tag/types.d.ts +28 -0
  58. package/dist/types/components/mc-toast/index.d.ts +61 -0
  59. package/dist/types/components/mc-toast/toast.d.ts +19 -0
  60. package/dist/types/components/mc-toast/types.d.ts +21 -0
  61. package/dist/types/components/mc-tooltip/index.d.ts +65 -0
  62. package/dist/types/components/mc-tooltip/types.d.ts +20 -0
  63. package/dist/types/hooks/index.d.ts +2 -0
  64. package/dist/types/hooks/useClickOutside.d.ts +2 -0
  65. package/dist/types/hooks/useEventListener.d.ts +2 -0
  66. package/dist/umd/index.css +1 -1
  67. package/dist/umd/index.css.gz +0 -0
  68. package/dist/umd/index.umd.cjs +3 -1
  69. package/dist/umd/index.umd.cjs.gz +0 -0
  70. package/package.json +4 -1
  71. package/dist/es/vendor-D4RgMZ9r.js +0 -171
@@ -1,3 +1,14 @@
1
+ export * from './mc-alert';
1
2
  export * from './mc-button';
2
- export * from './mc-icon';
3
3
  export * from './mc-collapse';
4
+ export * from './mc-icon';
5
+ export * from './mc-input';
6
+ export * from './mc-message';
7
+ export * from './mc-radio';
8
+ export * from './mc-select';
9
+ export * from './mc-switch';
10
+ export * from './mc-table';
11
+ export * from './mc-tag';
12
+ export * from './mc-toast';
13
+ export * from './mc-checkbox';
14
+ export * from './mc-tooltip';
@@ -0,0 +1,49 @@
1
+ export * from './types';
2
+ export declare const McAlert: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').AlertProps> & Readonly<{
4
+ onClose?: ((val: MouseEvent) => any) | undefined;
5
+ }>, {
6
+ ref: import('vue').Ref<HTMLDivElement | void>;
7
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
+ close: (val: MouseEvent) => any;
9
+ }, import('vue').PublicProps, {
10
+ type: import('../../core').AlertType;
11
+ closable: boolean;
12
+ showIcon: boolean;
13
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
14
+ _ref: HTMLDivElement;
15
+ }, any, import('vue').ComponentProvideOptions, {
16
+ P: {};
17
+ B: {};
18
+ D: {};
19
+ C: {};
20
+ M: {};
21
+ Defaults: {};
22
+ }, Readonly<import('../../core').AlertProps> & Readonly<{
23
+ onClose?: ((val: MouseEvent) => any) | undefined;
24
+ }>, {
25
+ ref: import('vue').Ref<HTMLDivElement | void>;
26
+ }, {}, {}, {}, {
27
+ type: import('../../core').AlertType;
28
+ closable: boolean;
29
+ showIcon: boolean;
30
+ }>;
31
+ __isFragment?: never;
32
+ __isTeleport?: never;
33
+ __isSuspense?: never;
34
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').AlertProps> & Readonly<{
35
+ onClose?: ((val: MouseEvent) => any) | undefined;
36
+ }>, {
37
+ ref: import('vue').Ref<HTMLDivElement | void>;
38
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
39
+ close: (val: MouseEvent) => any;
40
+ }, string, {
41
+ type: import('../../core').AlertType;
42
+ closable: boolean;
43
+ showIcon: boolean;
44
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
45
+ $slots: {
46
+ title?(_: {}): any;
47
+ description?(_: {}): any;
48
+ };
49
+ }) & import('vue').Plugin;
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+ export type AlertType = "success" | "info" | "warning" | "error";
3
+ export interface AlertProps {
4
+ type?: AlertType;
5
+ title?: string;
6
+ description?: string;
7
+ closable?: boolean;
8
+ showIcon?: boolean;
9
+ height?: string;
10
+ width?: string;
11
+ }
12
+ export interface AlertEmits {
13
+ (e: "close", val: MouseEvent): void;
14
+ }
15
+ export interface AlertInstance {
16
+ ref: Ref<HTMLDivElement | void>;
17
+ }
@@ -0,0 +1,29 @@
1
+ export * from './types';
2
+ export declare const McCheckbox: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').CheckboxProps> & Readonly<{
4
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
5
+ onChange?: ((val: boolean) => any) | undefined;
6
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
+ "update:modelValue": (val: boolean) => any;
8
+ change: (val: boolean) => any;
9
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
+ P: {};
11
+ B: {};
12
+ D: {};
13
+ C: {};
14
+ M: {};
15
+ Defaults: {};
16
+ }, Readonly<import('../../core').CheckboxProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
18
+ onChange?: ((val: boolean) => any) | undefined;
19
+ }>, {}, {}, {}, {}, {}>;
20
+ __isFragment?: never;
21
+ __isTeleport?: never;
22
+ __isSuspense?: never;
23
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').CheckboxProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
25
+ onChange?: ((val: boolean) => any) | undefined;
26
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
27
+ "update:modelValue": (val: boolean) => any;
28
+ change: (val: boolean) => any;
29
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
@@ -0,0 +1,15 @@
1
+ import { Ref } from 'vue';
2
+ export interface CheckboxProps {
3
+ modelValue?: boolean;
4
+ disabled?: boolean;
5
+ content?: string;
6
+ remarks?: string;
7
+ partial?: boolean;
8
+ }
9
+ export interface CheckboxEmits {
10
+ (e: "change", val: boolean): void;
11
+ (e: "update:modelValue", val: boolean): void;
12
+ }
13
+ export interface CheckboxInstance {
14
+ ref: Ref<HTMLButtonElement | void>;
15
+ }
@@ -0,0 +1,4 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { FormContext, FormItemContext } from './types';
3
+ export declare const FORM_CTX_KEY: InjectionKey<FormContext>;
4
+ export declare const FORM_ITEM_CTX_KEY: InjectionKey<FormItemContext>;
@@ -0,0 +1,47 @@
1
+ import { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
2
+ import { Ref } from 'vue';
3
+ export interface FormItemRule extends RuleItem {
4
+ trigger?: string | string[];
5
+ }
6
+ export type FormRules = Record<string, FormItemRule[]>;
7
+ export type FormValidateResult = Promise<boolean>;
8
+ export type FormValidateCallback = (isValid: boolean, invalidFields?: ValidateFieldsError) => void;
9
+ export type ValidateStatus = "success" | "error" | "init" | "validating";
10
+ export interface FormValidateFailuer {
11
+ errors?: ValidateError[];
12
+ fields: ValidateFieldsError;
13
+ }
14
+ export interface FormProps {
15
+ model: Record<string, any>;
16
+ rules?: FormRules;
17
+ }
18
+ export interface FormEmits {
19
+ (event: "validate", prop: FormItemProps, isValid: boolean, message: string): void;
20
+ }
21
+ export interface FormItemProps {
22
+ prop?: string;
23
+ label?: string;
24
+ disabled?: boolean;
25
+ required?: boolean;
26
+ rules?: FormItemRule[];
27
+ }
28
+ export interface FormInstance {
29
+ validate(callback?: FormValidateCallback): FormValidateResult;
30
+ validateField(keys?: string[], callback?: FormValidateCallback): FormValidateResult;
31
+ clearValidate(keys?: string[]): void;
32
+ }
33
+ export interface FormItemInstance {
34
+ validateStatus: Ref<ValidateStatus>;
35
+ validateMessage: Ref<string>;
36
+ validate(trigger: string, callback?: FormValidateCallback): FormValidateResult;
37
+ clearValidate(): void;
38
+ }
39
+ export interface FormContext extends FormProps {
40
+ emits: FormEmits;
41
+ addField(field: FormItemContext): void;
42
+ removeField(field: FormItemContext): void;
43
+ }
44
+ export interface FormItemContext extends FormItemProps {
45
+ validate(trigger: string, callback?: FormValidateCallback): FormValidateResult;
46
+ clearValidate(): void;
47
+ }
@@ -0,0 +1,57 @@
1
+ export * from './types';
2
+ export declare const McInput: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').InputProps> & Readonly<{
4
+ onInput?: ((value?: string | undefined) => any) | undefined;
5
+ "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
6
+ onChange?: ((value?: string | undefined) => any) | undefined;
7
+ onFocus?: ((event: Event) => any) | undefined;
8
+ onBlur?: ((event: Event) => any) | undefined;
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
+ input: (value?: string | undefined) => any;
11
+ "update:modelValue": (value?: string | undefined) => any;
12
+ change: (value?: string | undefined) => any;
13
+ focus: (event: Event) => any;
14
+ blur: (event: Event) => any;
15
+ }, import('vue').PublicProps, {
16
+ placeholder: string;
17
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
18
+ P: {};
19
+ B: {};
20
+ D: {};
21
+ C: {};
22
+ M: {};
23
+ Defaults: {};
24
+ }, Readonly<import('../../core').InputProps> & Readonly<{
25
+ onInput?: ((value?: string | undefined) => any) | undefined;
26
+ "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
27
+ onChange?: ((value?: string | undefined) => any) | undefined;
28
+ onFocus?: ((event: Event) => any) | undefined;
29
+ onBlur?: ((event: Event) => any) | undefined;
30
+ }>, {}, {}, {}, {}, {
31
+ placeholder: string;
32
+ }>;
33
+ __isFragment?: never;
34
+ __isTeleport?: never;
35
+ __isSuspense?: never;
36
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').InputProps> & Readonly<{
37
+ onInput?: ((value?: string | undefined) => any) | undefined;
38
+ "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
39
+ onChange?: ((value?: string | undefined) => any) | undefined;
40
+ onFocus?: ((event: Event) => any) | undefined;
41
+ onBlur?: ((event: Event) => any) | undefined;
42
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
43
+ input: (value?: string | undefined) => any;
44
+ "update:modelValue": (value?: string | undefined) => any;
45
+ change: (value?: string | undefined) => any;
46
+ focus: (event: Event) => any;
47
+ blur: (event: Event) => any;
48
+ }, string, {
49
+ placeholder: string;
50
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
51
+ $slots: {
52
+ pre?(_: {}): any;
53
+ default?(_: {
54
+ class: string;
55
+ }): any;
56
+ };
57
+ }) & import('vue').Plugin;
@@ -0,0 +1,17 @@
1
+ export interface InputProps {
2
+ modelValue?: string;
3
+ search?: boolean;
4
+ disabled?: boolean;
5
+ password?: boolean;
6
+ placeholder?: string;
7
+ }
8
+ export interface InputEmits {
9
+ (e: "update:modelValue", value?: string): void;
10
+ (e: "input", value?: string): void;
11
+ (e: "change", value?: string): void;
12
+ (e: "focus", event: Event): void;
13
+ (e: "blur", event: Event): void;
14
+ }
15
+ export interface InputInstance {
16
+ ref: HTMLInputElement;
17
+ }
@@ -0,0 +1,61 @@
1
+ import { App } from 'vue';
2
+ import { MessageService, MessageType } from './types';
3
+ export * from './types';
4
+ export declare const McMessage: {
5
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').MessageProps> & Readonly<{
6
+ onClose?: (() => any) | undefined;
7
+ }>, {
8
+ ref: import('vue').Ref<HTMLDivElement | undefined>;
9
+ handleClose: () => void;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ close: () => any;
12
+ }, import('vue').PublicProps, {
13
+ type: MessageType;
14
+ closable: boolean;
15
+ showIcon: boolean;
16
+ message: string;
17
+ duration: number;
18
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
19
+ _ref: HTMLDivElement;
20
+ }, any, import('vue').ComponentProvideOptions, {
21
+ P: {};
22
+ B: {};
23
+ D: {};
24
+ C: {};
25
+ M: {};
26
+ Defaults: {};
27
+ }, Readonly<import('../../core').MessageProps> & Readonly<{
28
+ onClose?: (() => any) | undefined;
29
+ }>, {
30
+ ref: import('vue').Ref<HTMLDivElement | undefined>;
31
+ handleClose: () => void;
32
+ }, {}, {}, {}, {
33
+ type: MessageType;
34
+ closable: boolean;
35
+ showIcon: boolean;
36
+ message: string;
37
+ duration: number;
38
+ }>;
39
+ __isFragment?: never;
40
+ __isTeleport?: never;
41
+ __isSuspense?: never;
42
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').MessageProps> & Readonly<{
43
+ onClose?: (() => any) | undefined;
44
+ }>, {
45
+ ref: import('vue').Ref<HTMLDivElement | undefined>;
46
+ handleClose: () => void;
47
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
48
+ close: () => any;
49
+ }, string, {
50
+ type: MessageType;
51
+ closable: boolean;
52
+ showIcon: boolean;
53
+ message: string;
54
+ duration: number;
55
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
56
+ declare const Message: MessageService;
57
+ export { Message };
58
+ declare const _default: {
59
+ install: (app: App) => void;
60
+ };
61
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import { Ref } from 'vue';
2
+ export type MessageType = "success" | "info" | "warning" | "error";
3
+ export type MessagePosition = "top" | "bottom";
4
+ export interface MessageProps {
5
+ type?: MessageType;
6
+ message?: string;
7
+ duration?: number;
8
+ showIcon?: boolean;
9
+ closable?: boolean;
10
+ onClose?: () => void;
11
+ }
12
+ export interface MessageEmits {
13
+ (e: "close"): void;
14
+ }
15
+ export interface MessageComponentExposed {
16
+ handleClose: () => void;
17
+ }
18
+ export interface MessageInstance {
19
+ ref: Ref<HTMLDivElement | undefined>;
20
+ }
21
+ export interface MessageOptions extends MessageProps {
22
+ id?: string;
23
+ }
24
+ export interface MessageMethod {
25
+ (options: MessageOptions | string): void;
26
+ }
27
+ export interface MessageService {
28
+ info: MessageMethod;
29
+ success: MessageMethod;
30
+ warning: MessageMethod;
31
+ error: MessageMethod;
32
+ close: (id: string) => void;
33
+ closeAll: () => void;
34
+ }
@@ -0,0 +1,3 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { RadioGroupContext } from './types';
3
+ export declare const RADIO_INJECTION_KEY: InjectionKey<RadioGroupContext>;
@@ -0,0 +1,51 @@
1
+ export * from './types';
2
+ export declare const McRadioGroup: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').RadioGroupProps> & Readonly<{
4
+ "onUpdate:modelValue"?: ((val?: string | undefined) => any) | undefined;
5
+ onChange?: ((val?: string | undefined) => any) | undefined;
6
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
+ "update:modelValue": (val?: string | undefined) => any;
8
+ change: (val?: string | undefined) => any;
9
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
+ P: {};
11
+ B: {};
12
+ D: {};
13
+ C: {};
14
+ M: {};
15
+ Defaults: {};
16
+ }, Readonly<import('../../core').RadioGroupProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((val?: string | undefined) => any) | undefined;
18
+ onChange?: ((val?: string | undefined) => any) | undefined;
19
+ }>, {}, {}, {}, {}, {}>;
20
+ __isFragment?: never;
21
+ __isTeleport?: never;
22
+ __isSuspense?: never;
23
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').RadioGroupProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((val?: string | undefined) => any) | undefined;
25
+ onChange?: ((val?: string | undefined) => any) | undefined;
26
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
27
+ "update:modelValue": (val?: string | undefined) => any;
28
+ change: (val?: string | undefined) => any;
29
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
30
+ $slots: {
31
+ default?(_: {}): any;
32
+ };
33
+ }) & import('vue').Plugin;
34
+ export declare const McRadio: {
35
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').RadioProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
36
+ P: {};
37
+ B: {};
38
+ D: {};
39
+ C: {};
40
+ M: {};
41
+ Defaults: {};
42
+ }, Readonly<import('../../core').RadioProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
43
+ __isFragment?: never;
44
+ __isTeleport?: never;
45
+ __isSuspense?: never;
46
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').RadioProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
47
+ $slots: {
48
+ default?(_: {}): any;
49
+ remark?(_: {}): any;
50
+ };
51
+ }) & import('vue').Plugin;
@@ -0,0 +1,20 @@
1
+ import { ComputedRef } from 'vue';
2
+ export interface RadioProps {
3
+ label?: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ remark?: string;
7
+ }
8
+ export interface RadioGroupProps {
9
+ modelValue?: string;
10
+ disabled?: boolean;
11
+ }
12
+ export interface RadioGroupContext {
13
+ modelValue?: ComputedRef<string | undefined>;
14
+ disabled?: ComputedRef<boolean | undefined>;
15
+ handleSelect: (val?: string) => void;
16
+ }
17
+ export interface RadioGroupEmits {
18
+ (e: "update:modelValue", val?: string): void;
19
+ (e: "change", val?: string): void;
20
+ }
@@ -0,0 +1,4 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { SelectContext, SelectGroupContext } from './types';
3
+ export declare const SELECT_INJECTION_KEY: InjectionKey<SelectContext>;
4
+ export declare const SELECT_GROUP_INJECTION_KEY: InjectionKey<SelectGroupContext>;
@@ -0,0 +1,93 @@
1
+ export * from './types';
2
+ export declare const McSelect: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').SelectProps> & Readonly<{
4
+ "onUpdate:modelValue"?: ((val: string | string[]) => any) | undefined;
5
+ onChange?: ((val: string | string[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
+ "update:modelValue": (val: string | string[]) => any;
8
+ change: (val: string | string[]) => any;
9
+ }, import('vue').PublicProps, {
10
+ type: import('../../core').SelectType;
11
+ modelValue: string;
12
+ placeholder: string;
13
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
14
+ _ref: HTMLDivElement;
15
+ }, any, import('vue').ComponentProvideOptions, {
16
+ P: {};
17
+ B: {};
18
+ D: {};
19
+ C: {};
20
+ M: {};
21
+ Defaults: {};
22
+ }, Readonly<import('../../core').SelectProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((val: string | string[]) => any) | undefined;
24
+ onChange?: ((val: string | string[]) => any) | undefined;
25
+ }>, {}, {}, {}, {}, {
26
+ type: import('../../core').SelectType;
27
+ modelValue: string;
28
+ placeholder: string;
29
+ }>;
30
+ __isFragment?: never;
31
+ __isTeleport?: never;
32
+ __isSuspense?: never;
33
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').SelectProps> & Readonly<{
34
+ "onUpdate:modelValue"?: ((val: string | string[]) => any) | undefined;
35
+ onChange?: ((val: string | string[]) => any) | undefined;
36
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
37
+ "update:modelValue": (val: string | string[]) => any;
38
+ change: (val: string | string[]) => any;
39
+ }, string, {
40
+ type: import('../../core').SelectType;
41
+ modelValue: string;
42
+ placeholder: string;
43
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
44
+ $slots: {
45
+ default?(_: {}): any;
46
+ empty?(_: {}): any;
47
+ };
48
+ }) & import('vue').Plugin;
49
+ export declare const McSelectOption: {
50
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').SelectOptionProps> & Readonly<{}>, {
51
+ isShow: boolean;
52
+ ref: import('vue').Ref<HTMLLIElement | undefined>;
53
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
54
+ _ref: HTMLDivElement;
55
+ }, any, import('vue').ComponentProvideOptions, {
56
+ P: {};
57
+ B: {};
58
+ D: {};
59
+ C: {};
60
+ M: {};
61
+ Defaults: {};
62
+ }, Readonly<import('../../core').SelectOptionProps> & Readonly<{}>, {
63
+ isShow: boolean;
64
+ ref: import('vue').Ref<HTMLLIElement | undefined>;
65
+ }, {}, {}, {}, {}>;
66
+ __isFragment?: never;
67
+ __isTeleport?: never;
68
+ __isSuspense?: never;
69
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').SelectOptionProps> & Readonly<{}>, {
70
+ isShow: boolean;
71
+ ref: import('vue').Ref<HTMLLIElement | undefined>;
72
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
73
+ $slots: {
74
+ default?(_: {}): any;
75
+ };
76
+ }) & import('vue').Plugin;
77
+ export declare const McSelectGroup: {
78
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').SelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
79
+ P: {};
80
+ B: {};
81
+ D: {};
82
+ C: {};
83
+ M: {};
84
+ Defaults: {};
85
+ }, Readonly<import('../../core').SelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
86
+ __isFragment?: never;
87
+ __isTeleport?: never;
88
+ __isSuspense?: never;
89
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').SelectGroupProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
90
+ $slots: {
91
+ default?(_: {}): any;
92
+ };
93
+ }) & import('vue').Plugin;
@@ -0,0 +1,42 @@
1
+ import { ComputedRef, Ref, VNode } from 'vue';
2
+ export type SelectType = "single";
3
+ export interface SelectOptionProps {
4
+ value: string;
5
+ label?: string;
6
+ width?: string;
7
+ height?: string;
8
+ _group?: string;
9
+ _vnode?: VNode;
10
+ }
11
+ export interface SelectOptionInstance {
12
+ isShow: boolean;
13
+ ref: Ref<HTMLLIElement | undefined>;
14
+ }
15
+ export interface SelectGroupProps {
16
+ label: string;
17
+ width?: string;
18
+ height?: string;
19
+ }
20
+ export interface SelectProps {
21
+ modelValue?: string;
22
+ placeholder?: string;
23
+ disabled?: boolean;
24
+ type?: SelectType;
25
+ width?: string;
26
+ height?: string;
27
+ search?: boolean;
28
+ }
29
+ export interface SelectEmits {
30
+ (e: "update:modelValue", val: string | string[]): void;
31
+ (e: "change", val: string | string[]): void;
32
+ }
33
+ export interface SelectContext {
34
+ filterOptions: ComputedRef<SelectOptionProps[]>;
35
+ selectValues: Ref<string[]>;
36
+ handleSelect(item: SelectOptionProps): void;
37
+ removeOption(item: SelectOptionProps): void;
38
+ addOption(item: SelectOptionProps): void;
39
+ }
40
+ export interface SelectGroupContext {
41
+ groupName: string;
42
+ }
@@ -0,0 +1,45 @@
1
+ export * from './types';
2
+ export declare const McSwitch: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').SwitchProps> & Readonly<{
4
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
5
+ }>, {
6
+ ref: import('vue').Ref<HTMLLabelElement | void>;
7
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
+ "update:modelValue": (val: boolean) => any;
9
+ }, import('vue').PublicProps, {
10
+ disabled: boolean;
11
+ modelValue: boolean;
12
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
13
+ _ref: HTMLLabelElement;
14
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
15
+ P: {};
16
+ B: {};
17
+ D: {};
18
+ C: {};
19
+ M: {};
20
+ Defaults: {};
21
+ }, Readonly<import('../../core').SwitchProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
23
+ }>, {
24
+ ref: import('vue').Ref<HTMLLabelElement | void>;
25
+ }, {}, {}, {}, {
26
+ disabled: boolean;
27
+ modelValue: boolean;
28
+ }>;
29
+ __isFragment?: never;
30
+ __isTeleport?: never;
31
+ __isSuspense?: never;
32
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../core').SwitchProps> & Readonly<{
33
+ "onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
34
+ }>, {
35
+ ref: import('vue').Ref<HTMLLabelElement | void>;
36
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
37
+ "update:modelValue": (val: boolean) => any;
38
+ }, string, {
39
+ disabled: boolean;
40
+ modelValue: boolean;
41
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
42
+ $slots: {
43
+ default?(_: {}): any;
44
+ };
45
+ }) & import('vue').Plugin;
@@ -0,0 +1,15 @@
1
+ import { Ref } from 'vue';
2
+ export interface SwitchProps {
3
+ modelValue?: boolean;
4
+ width?: string;
5
+ label?: string;
6
+ disabled?: boolean;
7
+ onText?: string;
8
+ offText?: string;
9
+ }
10
+ export interface SwitchEmits {
11
+ (e: "update:modelValue", val: boolean): void;
12
+ }
13
+ export interface SwitchInstance {
14
+ ref: Ref<HTMLLabelElement | void>;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { PaginationConfig } from '../types';
3
+ export declare function usePagination(data: Ref<Record<string, unknown>[]>, pagination: Ref<PaginationConfig | undefined>): {
4
+ currentPage: Ref<number, number>;
5
+ pageSize: Ref<number, number>;
6
+ paginatedData: import('vue').ComputedRef<Record<string, unknown>[]>;
7
+ updatePagination: (payload: {
8
+ pageSize: number;
9
+ pageNum: number;
10
+ }) => void;
11
+ };