@mtn-ui/components 1.0.10 → 1.0.11

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.
@@ -0,0 +1,122 @@
1
+ import { ActionItem } from './types';
2
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ actions: {
4
+ type: import('vue').PropType<ActionItem[]>;
5
+ default: undefined;
6
+ };
7
+ mode: {
8
+ type: import('vue').PropType<import('./types').ActionGroupMode>;
9
+ default: string;
10
+ };
11
+ maxItems: {
12
+ type: NumberConstructor;
13
+ default: number;
14
+ };
15
+ gap: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ moreText: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ moreIcon: {
24
+ type: ObjectConstructor;
25
+ default: undefined;
26
+ };
27
+ moreProps: {
28
+ type: import('vue').PropType<Partial<import('..').DropdownButtonProps>>;
29
+ default: () => {};
30
+ };
31
+ size: {
32
+ type: import('vue').PropType<import('..').ButtonSize>;
33
+ default: string;
34
+ };
35
+ compact: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ vertical: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ block: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ disableCollapse: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
52
+ "action-click": (action: ActionItem) => any;
53
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
54
+ actions: {
55
+ type: import('vue').PropType<ActionItem[]>;
56
+ default: undefined;
57
+ };
58
+ mode: {
59
+ type: import('vue').PropType<import('./types').ActionGroupMode>;
60
+ default: string;
61
+ };
62
+ maxItems: {
63
+ type: NumberConstructor;
64
+ default: number;
65
+ };
66
+ gap: {
67
+ type: NumberConstructor;
68
+ default: number;
69
+ };
70
+ moreText: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ moreIcon: {
75
+ type: ObjectConstructor;
76
+ default: undefined;
77
+ };
78
+ moreProps: {
79
+ type: import('vue').PropType<Partial<import('..').DropdownButtonProps>>;
80
+ default: () => {};
81
+ };
82
+ size: {
83
+ type: import('vue').PropType<import('..').ButtonSize>;
84
+ default: string;
85
+ };
86
+ compact: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ vertical: {
91
+ type: BooleanConstructor;
92
+ default: boolean;
93
+ };
94
+ block: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
98
+ disableCollapse: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ }>> & Readonly<{
103
+ "onAction-click"?: ((action: ActionItem) => any) | undefined;
104
+ }>, {
105
+ size: import('..').ButtonSize;
106
+ block: boolean;
107
+ compact: boolean;
108
+ gap: number;
109
+ vertical: boolean;
110
+ mode: import('./types').ActionGroupMode;
111
+ actions: ActionItem[];
112
+ maxItems: number;
113
+ moreText: string;
114
+ moreIcon: Record<string, any>;
115
+ moreProps: Partial<import('..').DropdownButtonProps>;
116
+ disableCollapse: boolean;
117
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
118
+ containerRef: HTMLDivElement;
119
+ measureRef: HTMLDivElement;
120
+ moreTriggerRef: HTMLSpanElement;
121
+ }, any>;
122
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'vue';
2
- import { ButtonSize } from '../button/types';
2
+ import { ButtonSize, ButtonType } from '../button/types';
3
3
  import { DropdownButtonProps } from '../dropdown-button/props';
4
4
  /**
5
5
  * 组件模式
@@ -0,0 +1,263 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ popconfirmIcon?(_: {}): any;
5
+ icon?(_: {}): any;
6
+ icon?(_: {}): any;
7
+ default?(_: {}): any;
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: any;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
15
+ loading: {
16
+ type: BooleanConstructor;
17
+ default: undefined;
18
+ };
19
+ confirm: {
20
+ type: import('vue').PropType<string | false | ((count?: number) => string)>;
21
+ default: string;
22
+ };
23
+ confirmType: {
24
+ type: import('vue').PropType<"modal" | "popconfirm">;
25
+ default: string;
26
+ };
27
+ confirmTitle: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ okText: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ cancelText: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ hideIcon: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ autoLoading: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ beforeDelete: {
48
+ type: import('vue').PropType<() => boolean | Promise<boolean>>;
49
+ default: undefined;
50
+ };
51
+ count: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
55
+ showSuccess: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ successText: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ showError: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
67
+ debounce: {
68
+ type: NumberConstructor;
69
+ default: number;
70
+ };
71
+ onDelete: {
72
+ type: import('vue').PropType<(done: () => void) => void | Promise<void>>;
73
+ default: undefined;
74
+ };
75
+ type: {
76
+ type: import('vue').PropType<"primary" | "default" | "dashed" | "text" | "link">;
77
+ default: string;
78
+ };
79
+ size: {
80
+ type: import('vue').PropType<"small" | "middle" | "large">;
81
+ default: string;
82
+ };
83
+ disabled: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ danger: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ block: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ ghost: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ shape: {
100
+ type: import('vue').PropType<"default" | "circle" | "round">;
101
+ default: string;
102
+ };
103
+ htmlType: {
104
+ type: import('vue').PropType<"button" | "submit" | "reset">;
105
+ default: string;
106
+ };
107
+ icon: {
108
+ type: import('vue').PropType<any>;
109
+ };
110
+ permission: {
111
+ type: import('vue').PropType<string | string[]>;
112
+ default: undefined;
113
+ };
114
+ permissionAction: {
115
+ type: import('vue').PropType<"hide" | "disable">;
116
+ default: string;
117
+ };
118
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
119
+ success: (result?: any) => any;
120
+ error: (error: Error) => any;
121
+ delete: (done: () => void) => any;
122
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
123
+ loading: {
124
+ type: BooleanConstructor;
125
+ default: undefined;
126
+ };
127
+ confirm: {
128
+ type: import('vue').PropType<string | false | ((count?: number) => string)>;
129
+ default: string;
130
+ };
131
+ confirmType: {
132
+ type: import('vue').PropType<"modal" | "popconfirm">;
133
+ default: string;
134
+ };
135
+ confirmTitle: {
136
+ type: StringConstructor;
137
+ default: string;
138
+ };
139
+ okText: {
140
+ type: StringConstructor;
141
+ default: string;
142
+ };
143
+ cancelText: {
144
+ type: StringConstructor;
145
+ default: string;
146
+ };
147
+ hideIcon: {
148
+ type: BooleanConstructor;
149
+ default: boolean;
150
+ };
151
+ autoLoading: {
152
+ type: BooleanConstructor;
153
+ default: boolean;
154
+ };
155
+ beforeDelete: {
156
+ type: import('vue').PropType<() => boolean | Promise<boolean>>;
157
+ default: undefined;
158
+ };
159
+ count: {
160
+ type: NumberConstructor;
161
+ default: number;
162
+ };
163
+ showSuccess: {
164
+ type: BooleanConstructor;
165
+ default: boolean;
166
+ };
167
+ successText: {
168
+ type: StringConstructor;
169
+ default: string;
170
+ };
171
+ showError: {
172
+ type: BooleanConstructor;
173
+ default: boolean;
174
+ };
175
+ debounce: {
176
+ type: NumberConstructor;
177
+ default: number;
178
+ };
179
+ onDelete: {
180
+ type: import('vue').PropType<(done: () => void) => void | Promise<void>>;
181
+ default: undefined;
182
+ };
183
+ type: {
184
+ type: import('vue').PropType<"primary" | "default" | "dashed" | "text" | "link">;
185
+ default: string;
186
+ };
187
+ size: {
188
+ type: import('vue').PropType<"small" | "middle" | "large">;
189
+ default: string;
190
+ };
191
+ disabled: {
192
+ type: BooleanConstructor;
193
+ default: boolean;
194
+ };
195
+ danger: {
196
+ type: BooleanConstructor;
197
+ default: boolean;
198
+ };
199
+ block: {
200
+ type: BooleanConstructor;
201
+ default: boolean;
202
+ };
203
+ ghost: {
204
+ type: BooleanConstructor;
205
+ default: boolean;
206
+ };
207
+ shape: {
208
+ type: import('vue').PropType<"default" | "circle" | "round">;
209
+ default: string;
210
+ };
211
+ htmlType: {
212
+ type: import('vue').PropType<"button" | "submit" | "reset">;
213
+ default: string;
214
+ };
215
+ icon: {
216
+ type: import('vue').PropType<any>;
217
+ };
218
+ permission: {
219
+ type: import('vue').PropType<string | string[]>;
220
+ default: undefined;
221
+ };
222
+ permissionAction: {
223
+ type: import('vue').PropType<"hide" | "disable">;
224
+ default: string;
225
+ };
226
+ }>> & Readonly<{
227
+ onSuccess?: ((result?: any) => any) | undefined;
228
+ onError?: ((error: Error) => any) | undefined;
229
+ onDelete?: ((done: () => void) => any) | undefined;
230
+ }>, {
231
+ type: "default" | "link" | "text" | "primary" | "dashed";
232
+ size: "small" | "middle" | "large";
233
+ loading: boolean;
234
+ disabled: boolean;
235
+ danger: boolean;
236
+ block: boolean;
237
+ ghost: boolean;
238
+ shape: "default" | "circle" | "round";
239
+ htmlType: "button" | "submit" | "reset";
240
+ permission: string | string[];
241
+ permissionAction: "hide" | "disable";
242
+ confirm: string | false | ((count?: number) => string);
243
+ showSuccess: boolean;
244
+ confirmType: "modal" | "popconfirm";
245
+ confirmTitle: string;
246
+ okText: string;
247
+ cancelText: string;
248
+ hideIcon: boolean;
249
+ autoLoading: boolean;
250
+ beforeDelete: () => boolean | Promise<boolean>;
251
+ count: number;
252
+ successText: string;
253
+ showError: boolean;
254
+ debounce: number;
255
+ onDelete: (done: () => void) => void | Promise<void>;
256
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
257
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
258
+ export default _default;
259
+ type __VLS_WithTemplateSlots<T, S> = T & {
260
+ new (): {
261
+ $slots: S;
262
+ };
263
+ };
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
1
  {
2
- "name": "@mtn-ui/components",
3
- "version": "1.0.10",
4
- "type": "module",
5
- "description": "Core components for mtn-ui",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/types/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/types/index.d.ts",
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.cjs",
14
- "default": "./dist/index.mjs"
2
+ "name": "@mtn-ui/components",
3
+ "version": "1.0.11",
4
+ "type": "module",
5
+ "description": "Core components for mtn-ui",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.cjs",
14
+ "default": "./dist/index.mjs"
15
+ },
16
+ "./style": "./dist/components.css"
15
17
  },
16
- "./style": "./dist/components.css"
17
- },
18
- "publishConfig": {
19
- "access": "public"
20
- },
21
- "files": [
22
- "dist"
23
- ],
24
- "dependencies": {
25
- "@ant-design/icons-vue": "^7.0.1",
26
- "@mtn-ui/shared": "^1.0.0",
27
- "@mtn-ui/theme": "^1.0.0",
28
- "@vueuse/core": "^14.1.0",
29
- "ant-design-vue": "^4.2.6",
30
- "class-variance-authority": "latest",
31
- "radix-vue": "latest"
32
- },
33
- "devDependencies": {
34
- "@tailwindcss/vite": "^4.0.0",
35
- "@vitejs/plugin-vue": "^5.2.1",
36
- "@vitejs/plugin-vue-jsx": "^4.1.1",
37
- "@vue/test-utils": "^2.4.6",
38
- "jsdom": "^24.1.0",
39
- "vite": "^6.0.0",
40
- "vite-plugin-dts": "^4.0.0",
41
- "vitest": "^3.0.0",
42
- "vue": "^3.5.0"
43
- },
44
- "peerDependencies": {
45
- "vue": "^3.5.0"
46
- },
47
- "scripts": {
48
- "build": "vite build && node scripts/fix-types.js",
49
- "dev": "vite build --watch",
50
- "test": "vitest run",
51
- "test:watch": "vitest"
52
- }
53
- }
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "scripts": {
25
+ "build": "vite build && node scripts/fix-types.js",
26
+ "dev": "vite build --watch",
27
+ "test": "vitest run",
28
+ "test:watch": "vitest"
29
+ },
30
+ "dependencies": {
31
+ "@ant-design/icons-vue": "^7.0.1",
32
+ "@mtn-ui/shared": "^1.0.0",
33
+ "@mtn-ui/theme": "^1.0.0",
34
+ "@vueuse/core": "^14.1.0",
35
+ "ant-design-vue": "^4.2.6",
36
+ "class-variance-authority": "latest",
37
+ "radix-vue": "latest"
38
+ },
39
+ "devDependencies": {
40
+ "@tailwindcss/vite": "^4.0.0",
41
+ "@vitejs/plugin-vue": "^5.2.1",
42
+ "@vitejs/plugin-vue-jsx": "^4.1.1",
43
+ "@vue/test-utils": "^2.4.6",
44
+ "jsdom": "^24.1.0",
45
+ "vite": "^6.0.0",
46
+ "vite-plugin-dts": "^4.0.0",
47
+ "vitest": "^3.0.0",
48
+ "vue": "^3.5.0"
49
+ },
50
+ "peerDependencies": {
51
+ "vue": "^3.5.0"
52
+ }
53
+ }