@mingto/mt-ui 1.1.36 → 1.1.39

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 (95) hide show
  1. package/README.md +173 -19
  2. package/dist/avatar-image/index.d.ts +3 -3
  3. package/dist/avatar-image/src/avatar-image.vue.d.ts +1 -1
  4. package/dist/avatar-text/index.d.ts +2 -2
  5. package/dist/avatar-text/src/avatar-text.vue.d.ts +3 -2
  6. package/dist/backtop/index.d.ts +2 -2
  7. package/dist/backtop/src/backtop.d.ts +1 -1
  8. package/dist/backtop/src/backtop.vue.d.ts +1 -1
  9. package/dist/badge/index.d.ts +3 -3
  10. package/dist/badge/src/badge.vue.d.ts +1 -1
  11. package/dist/button/index.d.ts +44 -26
  12. package/dist/button/src/button.vue.d.ts +25 -13
  13. package/dist/cell/index.d.ts +15 -22
  14. package/dist/cell/src/cell.vue.d.ts +9 -16
  15. package/dist/cell-group/index.d.ts +8 -6
  16. package/dist/cell-group/src/cell-group.d.ts +6 -6
  17. package/dist/config-provider/index.d.ts +12 -3
  18. package/dist/config-provider/src/config-provider.d.ts +41 -6
  19. package/dist/dialog/index.d.ts +29 -29
  20. package/dist/dialog/src/dialog.d.ts +2 -2
  21. package/dist/dialog/src/dialog.vue.d.ts +15 -14
  22. package/dist/dialog/src/layout/dialog-confirm-layout.vue.d.ts +1 -37
  23. package/dist/empty/index.d.ts +3 -3
  24. package/dist/empty/src/empty.d.ts +1 -1
  25. package/dist/empty/src/empty.vue.d.ts +2 -2
  26. package/dist/fade-transition/index.d.ts +5 -5
  27. package/dist/fade-transition/src/fade-transition.vue.d.ts +2 -2
  28. package/dist/file-preview/src/ai-music-preview.vue.d.ts +17 -16
  29. package/dist/file-preview/src/iframe-preview.vue.d.ts +3 -2
  30. package/dist/file-preview/src/image-preview.vue.d.ts +3 -2
  31. package/dist/file-preview/src/music-preview.vue.d.ts +3 -2
  32. package/dist/hooks/dom/use-z-index.d.ts +4 -1
  33. package/dist/hooks/event/use-same-target.d.ts +4 -2
  34. package/dist/hooks/index.d.ts +1 -0
  35. package/dist/hooks/locale/use-locale.d.ts +2 -2
  36. package/dist/hooks/use-namespace/index.d.ts +23 -0
  37. package/dist/hooks/vue/use-children.d.ts +6 -3
  38. package/dist/image/index.d.ts +25 -10
  39. package/dist/image/src/image.d.ts +7 -0
  40. package/dist/image/src/image.vue.d.ts +15 -5
  41. package/dist/index.es.js +67694 -64647
  42. package/dist/index.umd.js +68544 -106524
  43. package/dist/infinite-scroll/index.d.ts +27 -27
  44. package/dist/infinite-scroll/src/infinite-scroll.d.ts +7 -4
  45. package/dist/infinite-scroll/src/infinite-scroll.vue.d.ts +18 -16
  46. package/dist/loading/src/loading.d.ts +3 -1
  47. package/dist/locale/index.d.ts +2 -0
  48. package/dist/locale/lang/ar.d.ts +8 -0
  49. package/dist/locale/lang/en.d.ts +8 -0
  50. package/dist/locale/lang/ms.d.ts +8 -0
  51. package/dist/locale/lang/th.d.ts +8 -0
  52. package/dist/locale/lang/vi.d.ts +8 -0
  53. package/dist/locale/lang/zh-cn.d.ts +8 -0
  54. package/dist/locale/lang/zh-tw.d.ts +8 -0
  55. package/dist/message/src/message.d.ts +1 -1
  56. package/dist/message/src/message.vue.d.ts +4 -4
  57. package/dist/popover/index.d.ts +28 -28
  58. package/dist/popover/src/content.vue.d.ts +6 -10
  59. package/dist/popover/src/popover.vue.d.ts +15 -15
  60. package/dist/poster/src/method.d.ts +3 -3
  61. package/dist/progress/index.d.ts +16 -13
  62. package/dist/progress/src/progress.d.ts +2 -2
  63. package/dist/progress/src/progress.vue.d.ts +10 -7
  64. package/dist/qrcode/index.d.ts +3 -3
  65. package/dist/qrcode/src/qrcode.vue.d.ts +1 -1
  66. package/dist/style.css +544 -373
  67. package/dist/tab/src/tab.d.ts +2 -1
  68. package/dist/table/index.d.ts +2 -4
  69. package/dist/table/src/table.vue.d.ts +2 -4
  70. package/dist/table-column/index.d.ts +3 -6
  71. package/dist/table-column/src/table-column.vue.d.ts +3 -6
  72. package/dist/tabs/index.d.ts +8 -8
  73. package/dist/tabs/src/tabs.d.ts +1 -0
  74. package/dist/tabs/src/tabs.vue.d.ts +3 -3
  75. package/dist/tag/index.d.ts +17 -17
  76. package/dist/tag/src/tag.d.ts +6 -2
  77. package/dist/tag/src/tag.vue.d.ts +8 -8
  78. package/dist/tooltip/index.d.ts +60 -53
  79. package/dist/tooltip/src/tooltip.vue.d.ts +78 -77
  80. package/dist/upload/index.d.ts +320 -237
  81. package/dist/upload/src/layout/upload-file-list-layout.vue.d.ts +8 -2
  82. package/dist/upload/src/layout/upload-image-grid-layout.vue.d.ts +8 -2
  83. package/dist/upload/src/layout/upload-image-only-layout.vue.d.ts +8 -2
  84. package/dist/upload/src/trigger/upload-file-list-trigger.vue.d.ts +1 -1
  85. package/dist/upload/src/trigger/upload-image-only-trigger.vue.d.ts +8 -2
  86. package/dist/upload/src/upload-content.d.ts +15 -4
  87. package/dist/upload/src/upload-content.vue.d.ts +41 -16
  88. package/dist/upload/src/upload.d.ts +16 -7
  89. package/dist/upload/src/upload.vue.d.ts +407 -213
  90. package/dist/utils/class/deferred.d.ts +8 -5
  91. package/dist/utils/prop/size.d.ts +1 -1
  92. package/dist/utils/vue/children.d.ts +1 -3
  93. package/dist/utils/vue/install.d.ts +2 -2
  94. package/package.json +6 -4
  95. /package/dist/upload/src/{use-full-scree-drag.d.ts → use-full-screen-drag.d.ts} +0 -0
@@ -5,9 +5,9 @@ export declare const MtFadeTransition: {
5
5
  readonly default: 300;
6
6
  };
7
7
  }>> & Readonly<{
8
- onAfterLeave?: ((...args: any[]) => any) | undefined;
8
+ onAfterLeave?: (() => any) | undefined;
9
9
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
- afterLeave: (...args: any[]) => void;
10
+ afterLeave: () => any;
11
11
  }, import('vue').PublicProps, {
12
12
  readonly duration: number;
13
13
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
@@ -23,7 +23,7 @@ export declare const MtFadeTransition: {
23
23
  readonly default: 300;
24
24
  };
25
25
  }>> & Readonly<{
26
- onAfterLeave?: ((...args: any[]) => any) | undefined;
26
+ onAfterLeave?: (() => any) | undefined;
27
27
  }>, {}, {}, {}, {}, {
28
28
  readonly duration: number;
29
29
  }>;
@@ -36,9 +36,9 @@ export declare const MtFadeTransition: {
36
36
  readonly default: 300;
37
37
  };
38
38
  }>> & Readonly<{
39
- onAfterLeave?: ((...args: any[]) => any) | undefined;
39
+ onAfterLeave?: (() => any) | undefined;
40
40
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
- afterLeave: (...args: any[]) => void;
41
+ afterLeave: () => any;
42
42
  }, string, {
43
43
  readonly duration: number;
44
44
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
@@ -13,14 +13,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
13
13
  readonly default: 300;
14
14
  };
15
15
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
- afterLeave: (...args: any[]) => void;
16
+ afterLeave: () => any;
17
17
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
18
  readonly duration: {
19
19
  readonly type: NumberConstructor;
20
20
  readonly default: 300;
21
21
  };
22
22
  }>> & Readonly<{
23
- onAfterLeave?: ((...args: any[]) => any) | undefined;
23
+ onAfterLeave?: (() => any) | undefined;
24
24
  }>, {
25
25
  readonly duration: number;
26
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,38 +1,39 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
3
  title: {
3
- type: StringConstructor;
4
- require: boolean;
4
+ type: PropType<string>;
5
+ required: true;
5
6
  };
6
7
  prompt: {
7
- type: StringConstructor;
8
- require: boolean;
8
+ type: PropType<string>;
9
+ required: true;
9
10
  };
10
11
  src: {
11
- type: StringConstructor;
12
- require: boolean;
12
+ type: PropType<string>;
13
+ required: true;
13
14
  };
14
15
  background: {
15
- type: StringConstructor;
16
- require: boolean;
16
+ type: PropType<string>;
17
+ required: true;
17
18
  };
18
19
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
20
  load: () => any;
20
21
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
21
22
  title: {
22
- type: StringConstructor;
23
- require: boolean;
23
+ type: PropType<string>;
24
+ required: true;
24
25
  };
25
26
  prompt: {
26
- type: StringConstructor;
27
- require: boolean;
27
+ type: PropType<string>;
28
+ required: true;
28
29
  };
29
30
  src: {
30
- type: StringConstructor;
31
- require: boolean;
31
+ type: PropType<string>;
32
+ required: true;
32
33
  };
33
34
  background: {
34
- type: StringConstructor;
35
- require: boolean;
35
+ type: PropType<string>;
36
+ required: true;
36
37
  };
37
38
  }>> & Readonly<{
38
39
  onLoad?: (() => any) | undefined;
@@ -1,13 +1,14 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
3
  src: {
3
- type: StringConstructor;
4
+ type: PropType<string>;
4
5
  required: true;
5
6
  };
6
7
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
8
  load: () => any;
8
9
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
10
  src: {
10
- type: StringConstructor;
11
+ type: PropType<string>;
11
12
  required: true;
12
13
  };
13
14
  }>> & Readonly<{
@@ -1,12 +1,13 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
3
  src: {
3
- type: StringConstructor;
4
+ type: PropType<string>;
4
5
  };
5
6
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
7
  load: () => any;
7
8
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
8
9
  src: {
9
- type: StringConstructor;
10
+ type: PropType<string>;
10
11
  };
11
12
  }>> & Readonly<{
12
13
  onLoad?: (() => any) | undefined;
@@ -1,12 +1,13 @@
1
+ import { PropType } from 'vue';
1
2
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
3
  src: {
3
- type: StringConstructor;
4
+ type: PropType<string>;
4
5
  };
5
6
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
7
  load: () => any;
7
8
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
8
9
  src: {
9
- type: StringConstructor;
10
+ type: PropType<string>;
10
11
  };
11
12
  }>> & Readonly<{
12
13
  onLoad?: (() => any) | undefined;
@@ -1,3 +1,6 @@
1
- export declare function useZIndex(initialZIndex?: number): {
1
+ import { ComputedRef } from 'vue';
2
+ import { ZIndexConfig } from '../../config-provider';
3
+ export declare function useZIndex(initialZIndex?: number, configKey?: keyof ZIndexConfig): {
2
4
  nextZIndex: () => number;
5
+ baseZIndex: ComputedRef<number>;
3
6
  };
@@ -1,5 +1,7 @@
1
- export declare function useSameTarget(handleClick?: (e: MouseEvent) => void): {
1
+ interface UseSameTargetResult {
2
2
  onClick: (e: MouseEvent) => void;
3
3
  onMousedown: (e: MouseEvent) => void;
4
4
  onMouseup: (e: MouseEvent) => void;
5
- };
5
+ }
6
+ export declare function useSameTarget(handleClick?: (e: MouseEvent) => void): UseSameTargetResult;
7
+ export {};
@@ -1,4 +1,5 @@
1
1
  export * from './dom';
2
2
  export * from './event';
3
3
  export * from './locale';
4
+ export * from './use-namespace';
4
5
  export * from './vue';
@@ -1,7 +1,7 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { Language } from '../../locale';
2
+ import { Language, LocaleMessageKeys } from '../../locale';
3
3
  export type TranslatorOption = Record<string, string | number>;
4
- export type Translator = (path: string, option?: TranslatorOption) => string;
4
+ export type Translator = (path: LocaleMessageKeys, option?: TranslatorOption) => string;
5
5
  export interface LocaleContext {
6
6
  locale: ComputedRef<Language>;
7
7
  lang: ComputedRef<string>;
@@ -0,0 +1,23 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ export declare const defaultNamespace = "mt";
3
+ export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
4
+ export declare function useGetDerivedNamespace(namespaceOverrides?: Ref<string | undefined>): Ref<string>;
5
+ export interface UseNamespaceReturn {
6
+ namespace: Ref<string>;
7
+ b: (blockSuffix?: string) => string;
8
+ e: (element?: string) => string;
9
+ m: (modifier?: string) => string;
10
+ be: (blockSuffix?: string, element?: string) => string;
11
+ em: (element?: string, modifier?: string) => string;
12
+ bm: (blockSuffix?: string, modifier?: string) => string;
13
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
14
+ is: {
15
+ (name: string, state: boolean | undefined): string;
16
+ (name: string): string;
17
+ };
18
+ cssVar: (object: Record<string, string>) => Record<string, string>;
19
+ cssVarName: (name: string) => string;
20
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
21
+ cssVarBlockName: (name: string) => string;
22
+ }
23
+ export declare function useNamespace(block: string, namespaceOverrides?: Ref<string | undefined>): UseNamespaceReturn;
@@ -1,5 +1,8 @@
1
1
  import { ComponentInternalInstance, InjectionKey } from 'vue';
2
- declare function useChildren<T>(key: InjectionKey<T>, value: T): {
3
- children: Array<ComponentInternalInstance>;
2
+ interface ParentProvide<_T> {
3
+ children: ComponentInternalInstance[];
4
+ }
5
+ export declare function useChildren<T>(key: InjectionKey<ParentProvide<T>>, value: T): {
6
+ children: ComponentInternalInstance[];
4
7
  };
5
- export { useChildren };
8
+ export {};
@@ -19,6 +19,10 @@ export declare const MtImage: {
19
19
  readonly validator: (value: string) => boolean;
20
20
  readonly default: "cover";
21
21
  };
22
+ readonly position: {
23
+ readonly type: StringConstructor;
24
+ readonly default: "";
25
+ };
22
26
  readonly draggable: {
23
27
  readonly type: BooleanConstructor;
24
28
  readonly default: false;
@@ -28,16 +32,17 @@ export declare const MtImage: {
28
32
  readonly default: false;
29
33
  };
30
34
  }>> & Readonly<{
31
- onLoad?: (() => any) | undefined;
32
35
  onError?: (() => any) | undefined;
36
+ onLoad?: (() => any) | undefined;
33
37
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
- load: () => any;
35
38
  error: () => any;
39
+ load: () => any;
36
40
  }, import('vue').PublicProps, {
37
- readonly src: string;
38
41
  readonly width: string | number;
39
42
  readonly height: string | number;
43
+ readonly src: string;
40
44
  readonly fit: "none" | "fill" | "contain" | "cover" | "scale-down";
45
+ readonly position: string;
41
46
  readonly draggable: boolean;
42
47
  readonly lazy: boolean;
43
48
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
@@ -69,6 +74,10 @@ export declare const MtImage: {
69
74
  readonly validator: (value: string) => boolean;
70
75
  readonly default: "cover";
71
76
  };
77
+ readonly position: {
78
+ readonly type: StringConstructor;
79
+ readonly default: "";
80
+ };
72
81
  readonly draggable: {
73
82
  readonly type: BooleanConstructor;
74
83
  readonly default: false;
@@ -78,13 +87,14 @@ export declare const MtImage: {
78
87
  readonly default: false;
79
88
  };
80
89
  }>> & Readonly<{
81
- onLoad?: (() => any) | undefined;
82
90
  onError?: (() => any) | undefined;
91
+ onLoad?: (() => any) | undefined;
83
92
  }>, {}, {}, {}, {}, {
84
- readonly src: string;
85
93
  readonly width: string | number;
86
94
  readonly height: string | number;
95
+ readonly src: string;
87
96
  readonly fit: "none" | "fill" | "contain" | "cover" | "scale-down";
97
+ readonly position: string;
88
98
  readonly draggable: boolean;
89
99
  readonly lazy: boolean;
90
100
  }>;
@@ -111,6 +121,10 @@ export declare const MtImage: {
111
121
  readonly validator: (value: string) => boolean;
112
122
  readonly default: "cover";
113
123
  };
124
+ readonly position: {
125
+ readonly type: StringConstructor;
126
+ readonly default: "";
127
+ };
114
128
  readonly draggable: {
115
129
  readonly type: BooleanConstructor;
116
130
  readonly default: false;
@@ -120,23 +134,24 @@ export declare const MtImage: {
120
134
  readonly default: false;
121
135
  };
122
136
  }>> & Readonly<{
123
- onLoad?: (() => any) | undefined;
124
137
  onError?: (() => any) | undefined;
138
+ onLoad?: (() => any) | undefined;
125
139
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
126
- load: () => any;
127
140
  error: () => any;
141
+ load: () => any;
128
142
  }, string, {
129
- readonly src: string;
130
143
  readonly width: string | number;
131
144
  readonly height: string | number;
145
+ readonly src: string;
132
146
  readonly fit: "none" | "fill" | "contain" | "cover" | "scale-down";
147
+ readonly position: string;
133
148
  readonly draggable: boolean;
134
149
  readonly lazy: boolean;
135
150
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
136
151
  $slots: Readonly<{
137
- error: any;
152
+ error?: () => import('vue').VNode[];
138
153
  }> & {
139
- error: any;
154
+ error?: () => import('vue').VNode[];
140
155
  };
141
156
  }) & import('vue').Plugin;
142
157
  export default MtImage;
@@ -31,6 +31,13 @@ declare const imageProps: {
31
31
  readonly validator: (value: string) => boolean;
32
32
  readonly default: "cover";
33
33
  };
34
+ /**
35
+ * 图片在容器内的对齐位置,对应 CSS 的 object-position
36
+ */
37
+ readonly position: {
38
+ readonly type: StringConstructor;
39
+ readonly default: "";
40
+ };
34
41
  /**
35
42
  * 图片是否可拖动
36
43
  */
@@ -1,9 +1,10 @@
1
+ import { VNode } from 'vue';
1
2
  declare function __VLS_template(): {
2
3
  attrs: Partial<{}>;
3
4
  slots: Readonly<{
4
- error: any;
5
+ error?: () => VNode[];
5
6
  }> & {
6
- error: any;
7
+ error?: () => VNode[];
7
8
  };
8
9
  refs: {
9
10
  imageRef: HTMLDivElement;
@@ -31,6 +32,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
31
32
  readonly validator: (value: string) => boolean;
32
33
  readonly default: "cover";
33
34
  };
35
+ readonly position: {
36
+ readonly type: StringConstructor;
37
+ readonly default: "";
38
+ };
34
39
  readonly draggable: {
35
40
  readonly type: BooleanConstructor;
36
41
  readonly default: false;
@@ -40,8 +45,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
40
45
  readonly default: false;
41
46
  };
42
47
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
43
- load: () => any;
44
48
  error: () => any;
49
+ load: () => any;
45
50
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
46
51
  readonly src: {
47
52
  readonly type: StringConstructor;
@@ -62,6 +67,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
62
67
  readonly validator: (value: string) => boolean;
63
68
  readonly default: "cover";
64
69
  };
70
+ readonly position: {
71
+ readonly type: StringConstructor;
72
+ readonly default: "";
73
+ };
65
74
  readonly draggable: {
66
75
  readonly type: BooleanConstructor;
67
76
  readonly default: false;
@@ -71,13 +80,14 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
71
80
  readonly default: false;
72
81
  };
73
82
  }>> & Readonly<{
74
- onLoad?: (() => any) | undefined;
75
83
  onError?: (() => any) | undefined;
84
+ onLoad?: (() => any) | undefined;
76
85
  }>, {
77
- readonly src: string;
78
86
  readonly width: string | number;
79
87
  readonly height: string | number;
88
+ readonly src: string;
80
89
  readonly fit: "none" | "fill" | "contain" | "cover" | "scale-down";
90
+ readonly position: string;
81
91
  readonly draggable: boolean;
82
92
  readonly lazy: boolean;
83
93
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {