bkui-vue 0.0.1-beta.19 → 0.0.1-beta.21
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/README.md +7 -3
- package/README_EN.md +7 -3
- package/dist/bkui-vue.cjs.js +1429 -365
- package/dist/bkui-vue.esm.js +1427 -364
- package/dist/bkui-vue.umd.js +1429 -365
- package/dist/style.css +376 -85
- package/lib/button/button.css +9 -0
- package/lib/button/button.d.ts +25 -1
- package/lib/button/button.less +18 -10
- package/lib/button/button.variable.css +9 -0
- package/lib/button/index.d.ts +42 -4
- package/lib/button/index.js +1 -1
- package/lib/code-diff/code-diff.css +114 -0
- package/lib/code-diff/code-diff.d.ts +71 -0
- package/lib/code-diff/code-diff.less +144 -0
- package/lib/code-diff/code-diff.variable.css +207 -0
- package/lib/code-diff/index.d.ts +6 -0
- package/lib/components.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +20 -130
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/interface.d.ts +1 -1
- package/lib/date-picker/props.d.ts +111 -0
- package/lib/directives/clickoutside.d.ts +3 -23
- package/lib/directives/index.js +2 -2
- package/lib/icon/arrows-right.d.ts +4 -0
- package/lib/icon/arrows-right.js +15 -0
- package/lib/icon/bk.d.ts +4 -0
- package/lib/icon/bk.js +15 -0
- package/lib/icon/index.d.ts +4 -0
- package/lib/icon/index.js +1 -1
- package/lib/icon/qq.d.ts +4 -0
- package/lib/icon/qq.js +15 -0
- package/lib/icon/weixin.d.ts +4 -0
- package/lib/icon/weixin.js +15 -0
- package/lib/input/index.d.ts +58 -4
- package/lib/input/index.js +2 -2
- package/lib/input/input.css +19 -2
- package/lib/input/input.d.ts +31 -1
- package/lib/input/input.less +25 -3
- package/lib/input/input.variable.css +19 -2
- package/lib/loading/index.d.ts +31 -9
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +98 -71
- package/lib/loading/loading.d.ts +23 -8
- package/lib/loading/loading.less +62 -49
- package/lib/loading/loading.variable.css +98 -71
- package/lib/shared/index.js +1 -1
- package/lib/shared/vue-types.d.ts +4 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/index.js +1 -1
- package/lib/table/index.d.ts +42 -1
- package/lib/table/index.js +1 -1
- package/lib/table/props.d.ts +13 -0
- package/lib/table/render.d.ts +9 -0
- package/lib/table/table.d.ts +19 -0
- package/lib/table/utils.d.ts +8 -0
- package/lib/tag/index.d.ts +189 -22
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +91 -0
- package/lib/tag/tag.d.ts +83 -7
- package/lib/tag/tag.less +103 -2
- package/lib/tag/tag.variable.css +91 -0
- package/lib/transfer/index.d.ts +27 -0
- package/lib/transfer/index.js +1 -0
- package/lib/transfer/transfer.css +158 -0
- package/lib/transfer/transfer.d.ts +185 -0
- package/lib/transfer/transfer.less +171 -0
- package/lib/transfer/transfer.variable.css +251 -0
- package/lib/tree/index.d.ts +22 -3
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +11 -0
- package/lib/tree/tree.css +1 -12
- package/lib/tree/tree.d.ts +10 -1
- package/lib/tree/tree.less +10 -24
- package/lib/tree/tree.variable.css +1 -12
- package/lib/tree/util.d.ts +20 -3
- package/package.json +8 -4
package/lib/button/button.d.ts
CHANGED
@@ -36,12 +36,19 @@ declare const buttonProps: {
|
|
36
36
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
37
37
|
default: string;
|
38
38
|
};
|
39
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
40
|
+
default: string;
|
41
|
+
};
|
42
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
43
|
+
default: string;
|
44
|
+
};
|
39
45
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
40
46
|
default: boolean;
|
41
47
|
};
|
42
48
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
43
49
|
default: boolean;
|
44
50
|
};
|
51
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
45
52
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
46
53
|
default: boolean;
|
47
54
|
};
|
@@ -64,12 +71,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
64
71
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
65
72
|
default: string;
|
66
73
|
};
|
74
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
75
|
+
default: string;
|
76
|
+
};
|
77
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
78
|
+
default: string;
|
79
|
+
};
|
67
80
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
68
81
|
default: boolean;
|
69
82
|
};
|
70
83
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
71
84
|
default: boolean;
|
72
85
|
};
|
86
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
73
87
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
74
88
|
default: boolean;
|
75
89
|
};
|
@@ -79,7 +93,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
93
|
nativeType: {
|
80
94
|
type: IButtonNativeType;
|
81
95
|
};
|
82
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
96
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseover")[], "click" | "mouseover", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
83
97
|
theme: import("vue-types").VueTypeDef<string> & {
|
84
98
|
default: string;
|
85
99
|
};
|
@@ -90,12 +104,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
90
104
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
91
105
|
default: string;
|
92
106
|
};
|
107
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
108
|
+
default: string;
|
109
|
+
};
|
110
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
111
|
+
default: string;
|
112
|
+
};
|
93
113
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
94
114
|
default: boolean;
|
95
115
|
};
|
96
116
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
97
117
|
default: boolean;
|
98
118
|
};
|
119
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
99
120
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
100
121
|
default: boolean;
|
101
122
|
};
|
@@ -107,13 +128,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
107
128
|
};
|
108
129
|
}>> & {
|
109
130
|
onClick?: (...args: any[]) => any;
|
131
|
+
onMouseover?: (...args: any[]) => any;
|
110
132
|
}, {
|
111
133
|
title: string;
|
112
134
|
text: boolean;
|
113
135
|
theme: string;
|
136
|
+
icon: string;
|
114
137
|
outline: boolean;
|
115
138
|
disabled: boolean;
|
116
139
|
loading: boolean;
|
117
140
|
hoverTheme: string;
|
141
|
+
iconRight: string;
|
118
142
|
}>;
|
119
143
|
export default _default;
|
package/lib/button/button.less
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
@themeSelectors: primary, warning, success, danger;
|
17
17
|
@sizeSelectors: small, large;
|
18
18
|
|
19
|
-
|
19
|
+
.@{bk-prefix}-button {
|
20
20
|
display: inline-block;
|
21
21
|
height: @btnHeight;
|
22
22
|
min-width: @btnMinWidth;
|
@@ -35,13 +35,12 @@
|
|
35
35
|
box-sizing: border-box;
|
36
36
|
transition: background-color ease .3s;
|
37
37
|
appearance: none;
|
38
|
-
|
39
38
|
|
40
39
|
each(@themeSelectors, {
|
41
40
|
@color: '@{value}-color';
|
42
41
|
@hoverColor: 'button-@{value}-hover-color';
|
43
42
|
@activeColor: 'button-@{value}-active-color';
|
44
|
-
|
43
|
+
&.@{bk-prefix}-button-@{value} {
|
45
44
|
background-color: @@color;
|
46
45
|
color: @white-color;
|
47
46
|
border-color: @@color;
|
@@ -54,6 +53,7 @@
|
|
54
53
|
&:active {
|
55
54
|
background-color: @@activeColor;
|
56
55
|
border-color: @@activeColor;
|
56
|
+
color: @white-color;
|
57
57
|
}
|
58
58
|
|
59
59
|
&.is-disabled {
|
@@ -82,7 +82,7 @@
|
|
82
82
|
}
|
83
83
|
}
|
84
84
|
|
85
|
-
|
85
|
+
&.@{bk-prefix}-button-hover-@{value} {
|
86
86
|
&:hover {
|
87
87
|
background-color: @@hoverColor;
|
88
88
|
border-color: @@hoverColor;
|
@@ -96,14 +96,21 @@
|
|
96
96
|
@sizeBtnMinWidth: '@{value}BtnMinWidth';
|
97
97
|
@sizeBtnHeight: '@{value}BtnHeight';
|
98
98
|
@sizeBtnPadding: '@{value}BtnPadding';
|
99
|
-
|
99
|
+
&.@{bk-prefix}-button-@{value} {
|
100
100
|
min-width: @@sizeBtnMinWidth;
|
101
101
|
height: @@sizeBtnHeight;
|
102
|
+
line-height: @@sizeBtnHeight;
|
102
103
|
padding: 0 @@sizeBtnPadding;
|
103
104
|
}
|
104
105
|
})
|
105
106
|
;
|
106
107
|
|
108
|
+
.@{bk-prefix}-button-loading {
|
109
|
+
&:not(:last-child) {
|
110
|
+
margin-right: @smallBtnPadding;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
107
114
|
&:hover {
|
108
115
|
border-color: @button-default-hover-border-color;
|
109
116
|
}
|
@@ -129,7 +136,7 @@
|
|
129
136
|
outline: none;
|
130
137
|
}}
|
131
138
|
|
132
|
-
|
139
|
+
.@{bk-prefix}-button-group {
|
133
140
|
display: inline-block;
|
134
141
|
font-size: 0;
|
135
142
|
|
@@ -137,8 +144,8 @@
|
|
137
144
|
@sizeBtnMinWidth: '@{value}BtnMinWidth';
|
138
145
|
@sizeBtnHeight: '@{value}BtnHeight';
|
139
146
|
@sizeBtnPadding: '@{value}BtnPadding';
|
140
|
-
|
141
|
-
|
147
|
+
&.@{bk-prefix}-button-group-@{value} {
|
148
|
+
.@{bk-prefix}-button {
|
142
149
|
min-width: @@sizeBtnMinWidth;
|
143
150
|
height: @@sizeBtnHeight;
|
144
151
|
padding: 0 @@sizeBtnPadding;
|
@@ -147,7 +154,7 @@
|
|
147
154
|
})
|
148
155
|
;
|
149
156
|
|
150
|
-
|
157
|
+
.@{bk-prefix}-button {
|
151
158
|
height: @btnHeight;
|
152
159
|
min-width: @btnMinWidth;
|
153
160
|
margin: 0 0 0 -1px;
|
@@ -181,4 +188,5 @@
|
|
181
188
|
border-color: @primary-color;
|
182
189
|
}
|
183
190
|
|
184
|
-
}
|
191
|
+
}
|
192
|
+
}
|
@@ -123,6 +123,7 @@
|
|
123
123
|
.bk-button.bk-button-primary:active {
|
124
124
|
background-color: var(--button-primary-active-color);
|
125
125
|
border-color: var(--button-primary-active-color);
|
126
|
+
color: var(--white-color);
|
126
127
|
}
|
127
128
|
.bk-button.bk-button-primary.is-disabled {
|
128
129
|
background-color: var(--disable-color);
|
@@ -163,6 +164,7 @@
|
|
163
164
|
.bk-button.bk-button-warning:active {
|
164
165
|
background-color: var(--button-warning-active-color);
|
165
166
|
border-color: var(--button-warning-active-color);
|
167
|
+
color: var(--white-color);
|
166
168
|
}
|
167
169
|
.bk-button.bk-button-warning.is-disabled {
|
168
170
|
background-color: var(--disable-color);
|
@@ -203,6 +205,7 @@
|
|
203
205
|
.bk-button.bk-button-success:active {
|
204
206
|
background-color: var(--button-success-active-color);
|
205
207
|
border-color: var(--button-success-active-color);
|
208
|
+
color: var(--white-color);
|
206
209
|
}
|
207
210
|
.bk-button.bk-button-success.is-disabled {
|
208
211
|
background-color: var(--disable-color);
|
@@ -243,6 +246,7 @@
|
|
243
246
|
.bk-button.bk-button-danger:active {
|
244
247
|
background-color: var(--button-danger-active-color);
|
245
248
|
border-color: var(--button-danger-active-color);
|
249
|
+
color: var(--white-color);
|
246
250
|
}
|
247
251
|
.bk-button.bk-button-danger.is-disabled {
|
248
252
|
background-color: var(--disable-color);
|
@@ -274,13 +278,18 @@
|
|
274
278
|
.bk-button.bk-button-small {
|
275
279
|
min-width: 48px;
|
276
280
|
height: 26px;
|
281
|
+
line-height: 26px;
|
277
282
|
padding: 0 12px;
|
278
283
|
}
|
279
284
|
.bk-button.bk-button-large {
|
280
285
|
min-width: 74px;
|
281
286
|
height: 38px;
|
287
|
+
line-height: 38px;
|
282
288
|
padding: 0 20px;
|
283
289
|
}
|
290
|
+
.bk-button .bk-button-loading:not(:last-child) {
|
291
|
+
margin-right: 12px;
|
292
|
+
}
|
284
293
|
.bk-button:hover {
|
285
294
|
border-color: var(--button-default-hover-border-color);
|
286
295
|
}
|
package/lib/button/index.d.ts
CHANGED
@@ -7,10 +7,12 @@ declare const BkButton: {
|
|
7
7
|
title: string;
|
8
8
|
text: boolean;
|
9
9
|
theme: string;
|
10
|
+
icon: string;
|
10
11
|
outline: boolean;
|
11
12
|
disabled: boolean;
|
12
13
|
loading: boolean;
|
13
14
|
hoverTheme: string;
|
15
|
+
iconRight: string;
|
14
16
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
15
17
|
theme: import("vue-types").VueTypeDef<string> & {
|
16
18
|
default: string;
|
@@ -22,12 +24,19 @@ declare const BkButton: {
|
|
22
24
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
23
25
|
default: string;
|
24
26
|
};
|
27
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
28
|
+
default: string;
|
29
|
+
};
|
30
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
31
|
+
default: string;
|
32
|
+
};
|
25
33
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
26
34
|
default: boolean;
|
27
35
|
};
|
28
36
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
29
37
|
default: boolean;
|
30
38
|
};
|
39
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
31
40
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
32
41
|
default: boolean;
|
33
42
|
};
|
@@ -39,7 +48,8 @@ declare const BkButton: {
|
|
39
48
|
};
|
40
49
|
}>> & {
|
41
50
|
onClick?: (...args: any[]) => any;
|
42
|
-
|
51
|
+
onMouseover?: (...args: any[]) => any;
|
52
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "text" | "theme" | "icon" | "outline" | "disabled" | "loading" | "hoverTheme" | "iconRight">;
|
43
53
|
$attrs: {
|
44
54
|
[x: string]: unknown;
|
45
55
|
};
|
@@ -51,7 +61,7 @@ declare const BkButton: {
|
|
51
61
|
}>;
|
52
62
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
53
63
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
54
|
-
$emit: (event: "click", ...args: any[]) => void;
|
64
|
+
$emit: (event: "click" | "mouseover", ...args: any[]) => void;
|
55
65
|
$el: any;
|
56
66
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
57
67
|
theme: import("vue-types").VueTypeDef<string> & {
|
@@ -64,12 +74,19 @@ declare const BkButton: {
|
|
64
74
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
65
75
|
default: string;
|
66
76
|
};
|
77
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
78
|
+
default: string;
|
79
|
+
};
|
80
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
81
|
+
default: string;
|
82
|
+
};
|
67
83
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
68
84
|
default: boolean;
|
69
85
|
};
|
70
86
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
71
87
|
default: boolean;
|
72
88
|
};
|
89
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
73
90
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
74
91
|
default: boolean;
|
75
92
|
};
|
@@ -81,14 +98,17 @@ declare const BkButton: {
|
|
81
98
|
};
|
82
99
|
}>> & {
|
83
100
|
onClick?: (...args: any[]) => any;
|
84
|
-
|
101
|
+
onMouseover?: (...args: any[]) => any;
|
102
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseover")[], string, {
|
85
103
|
title: string;
|
86
104
|
text: boolean;
|
87
105
|
theme: string;
|
106
|
+
icon: string;
|
88
107
|
outline: boolean;
|
89
108
|
disabled: boolean;
|
90
109
|
loading: boolean;
|
91
110
|
hoverTheme: string;
|
111
|
+
iconRight: string;
|
92
112
|
}> & {
|
93
113
|
beforeCreate?: (() => void) | (() => void)[];
|
94
114
|
created?: (() => void) | (() => void)[];
|
@@ -120,12 +140,19 @@ declare const BkButton: {
|
|
120
140
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
121
141
|
default: string;
|
122
142
|
};
|
143
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
144
|
+
default: string;
|
145
|
+
};
|
146
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
147
|
+
default: string;
|
148
|
+
};
|
123
149
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
124
150
|
default: boolean;
|
125
151
|
};
|
126
152
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
127
153
|
default: boolean;
|
128
154
|
};
|
155
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
129
156
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
130
157
|
default: boolean;
|
131
158
|
};
|
@@ -137,6 +164,7 @@ declare const BkButton: {
|
|
137
164
|
};
|
138
165
|
}>> & {
|
139
166
|
onClick?: (...args: any[]) => any;
|
167
|
+
onMouseover?: (...args: any[]) => any;
|
140
168
|
} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
|
141
169
|
__isFragment?: never;
|
142
170
|
__isTeleport?: never;
|
@@ -152,12 +180,19 @@ declare const BkButton: {
|
|
152
180
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
153
181
|
default: string;
|
154
182
|
};
|
183
|
+
icon: import("vue-types").VueTypeValidableDef<string> & {
|
184
|
+
default: string;
|
185
|
+
};
|
186
|
+
iconRight: import("vue-types").VueTypeValidableDef<string> & {
|
187
|
+
default: string;
|
188
|
+
};
|
155
189
|
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
156
190
|
default: boolean;
|
157
191
|
};
|
158
192
|
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
159
193
|
default: boolean;
|
160
194
|
};
|
195
|
+
laodingMode: import("vue-types").VueTypeDef<string>;
|
161
196
|
outline: import("vue-types").VueTypeValidableDef<boolean> & {
|
162
197
|
default: boolean;
|
163
198
|
};
|
@@ -169,14 +204,17 @@ declare const BkButton: {
|
|
169
204
|
};
|
170
205
|
}>> & {
|
171
206
|
onClick?: (...args: any[]) => any;
|
172
|
-
|
207
|
+
onMouseover?: (...args: any[]) => any;
|
208
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseover")[], "click" | "mouseover", {
|
173
209
|
title: string;
|
174
210
|
text: boolean;
|
175
211
|
theme: string;
|
212
|
+
icon: string;
|
176
213
|
outline: boolean;
|
177
214
|
disabled: boolean;
|
178
215
|
loading: boolean;
|
179
216
|
hoverTheme: string;
|
217
|
+
iconRight: string;
|
180
218
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
|
181
219
|
ButtonGroup: import("vue").DefineComponent<{
|
182
220
|
size: import("vue-types").VueTypeDef<string>;
|
package/lib/button/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("../loading")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","../loading"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e.Loading)}(this,(function(e,t,o,n){"use strict";function
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("../loading")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","../loading"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e.Loading)}(this,(function(e,t,o,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(n);function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};!function(e){e.exports=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var s=u(a.exports),l={theme:o.PropTypes.theme().def(""),hoverTheme:o.PropTypes.theme(["primary","warning","success","danger"]).def(""),size:o.PropTypes.size(),title:o.PropTypes.string,icon:o.PropTypes.string,iconRight:o.PropTypes.string,disabled:o.PropTypes.bool,loading:o.PropTypes.bool,laodingMode:o.PropTypes.commonType(Object.values(n.BkLoadingMode)),outline:o.PropTypes.bool,text:o.PropTypes.bool,nativeType:{type:String}},c=t.defineComponent({name:"Button",props:l,emits:["click","mouseover"],setup:function(e,i){var u,a=i.slots,l=i.attrs,c=i.emit,d=t.ref(!1),p=null!==(u=a.default)&&void 0!==u&&u,f="bk-button",v=t.computed((function(){var t,n=e.hoverTheme?"".concat(f,"-hover-").concat(e.hoverTheme):"",i=e.theme?"".concat(f,"-").concat(e.theme):"",r=e.hoverTheme?"":i;return o.classes((t={"is-disabled":e.disabled,"is-outline":e.outline,"is-text":e.text&&!e.hoverTheme},s(t,"".concat(f,"-").concat(e.size),""!==e.size),s(t,"no-slot",!p),t),"".concat(r," ").concat(f," ").concat(n))})),m=t.computed((function(){return e.text||e.outline||e.hoverTheme?d.value&&!e.text?"white":e.hoverTheme||e.theme:["","default"].includes(e.theme)?"":"white"})),h=t.computed((function(){return e.size===n.BkLoadingSize.Small?n.BkLoadingSize.Mini:n.BkLoadingSize.Small})),b=function(){c("click")},y=function(){d.value=!0,c("mouseover")},g=function(){d.value=!1};return function(){var o;return t.createVNode("button",t.mergeProps({title:e.title,disabled:e.disabled,class:v.value,type:e.nativeType},l,{onClick:b,onMouseover:y,onMouseleave:g}),[e.loading&&t.createVNode(r.default,{class:"".concat(f,"-loading"),mode:e.laodingMode,theme:m.value,size:h.value},null),a.default&&t.createVNode("span",{class:"".concat(f,"-text")},[null===(o=a.default)||void 0===o?void 0:o.call(a)])])}}}),d=t.defineComponent({name:"ButtonGroup",props:{size:o.PropTypes.size()},setup:function(e,n){var i=t.computed((function(){return o.classes(s({},"bk-button-group-".concat(e.size),!!e.size),"bk-button-group")}));return function(){var e,o;return t.createVNode("div",{class:i.value},[null===(o=(e=n.slots).default)||void 0===o?void 0:o.call(e)])}}}),p=o.withInstallProps(c,{ButtonGroup:d});e.BkButton=p,e.BkButtonGroup=d,e.default=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -0,0 +1,114 @@
|
|
1
|
+
@import 'highlight.js/styles/googlecode.css';
|
2
|
+
/* stylelint-disable declaration-no-important */
|
3
|
+
.bk-code-diff {
|
4
|
+
position: relative;
|
5
|
+
}
|
6
|
+
.bk-code-diff .d2h-file-header {
|
7
|
+
display: none;
|
8
|
+
}
|
9
|
+
.bk-code-diff.dark {
|
10
|
+
color: #abb2bf !important;
|
11
|
+
background: #282c34;
|
12
|
+
}
|
13
|
+
.bk-code-diff.dark .hljs {
|
14
|
+
color: #abb2bf !important;
|
15
|
+
background: #282c34;
|
16
|
+
}
|
17
|
+
.bk-code-diff.dark .d2h-file-side-diff:nth-child(n + 2) .d2h-code-wrapper {
|
18
|
+
border-left-color: #313238;
|
19
|
+
}
|
20
|
+
.bk-code-diff.dark pre code.hljs {
|
21
|
+
display: block;
|
22
|
+
padding: 1em;
|
23
|
+
overflow-x: auto;
|
24
|
+
}
|
25
|
+
.bk-code-diff.dark code.hljs {
|
26
|
+
padding: 3px 5px;
|
27
|
+
}
|
28
|
+
.bk-code-diff.dark .hljs-comment,
|
29
|
+
.bk-code-diff.dark .hljs-quote {
|
30
|
+
font-style: italic;
|
31
|
+
color: #5c6370;
|
32
|
+
}
|
33
|
+
.bk-code-diff.dark .hljs-doctag,
|
34
|
+
.bk-code-diff.dark .hljs-formula,
|
35
|
+
.bk-code-diff.dark .hljs-keyword,
|
36
|
+
.bk-code-diff.dark .hljs-params {
|
37
|
+
color: #c678dd;
|
38
|
+
}
|
39
|
+
.bk-code-diff.dark .hljs-deletion,
|
40
|
+
.bk-code-diff.dark .hljs-name,
|
41
|
+
.bk-code-diff.dark .hljs-section,
|
42
|
+
.bk-code-diff.dark .hljs-selector-tag,
|
43
|
+
.bk-code-diff.dark .hljs-subst {
|
44
|
+
color: #e06c75;
|
45
|
+
}
|
46
|
+
.bk-code-diff.dark .hljs-literal {
|
47
|
+
color: #56b6c2;
|
48
|
+
}
|
49
|
+
.bk-code-diff.dark .hljs-addition,
|
50
|
+
.bk-code-diff.dark .hljs-attribute,
|
51
|
+
.bk-code-diff.dark .hljs-meta .hljs-string,
|
52
|
+
.bk-code-diff.dark .hljs-regexp,
|
53
|
+
.bk-code-diff.dark .hljs-string {
|
54
|
+
color: #98c379;
|
55
|
+
}
|
56
|
+
.bk-code-diff.dark .hljs-attr,
|
57
|
+
.bk-code-diff.dark .hljs-number,
|
58
|
+
.bk-code-diff.dark .hljs-selector-attr,
|
59
|
+
.bk-code-diff.dark .hljs-selector-class,
|
60
|
+
.bk-code-diff.dark .hljs-selector-pseudo,
|
61
|
+
.bk-code-diff.dark .hljs-template-variable,
|
62
|
+
.bk-code-diff.dark .hljs-type,
|
63
|
+
.bk-code-diff.dark .hljs-variable {
|
64
|
+
color: #d19a66;
|
65
|
+
}
|
66
|
+
.bk-code-diff.dark .hljs-bullet,
|
67
|
+
.bk-code-diff.dark .hljs-link,
|
68
|
+
.bk-code-diff.dark .hljs-meta,
|
69
|
+
.bk-code-diff.dark .hljs-selector-id,
|
70
|
+
.bk-code-diff.dark .hljs-symbol,
|
71
|
+
.bk-code-diff.dark .hljs-title {
|
72
|
+
color: #61aeee;
|
73
|
+
}
|
74
|
+
.bk-code-diff.dark .hljs-built_in,
|
75
|
+
.bk-code-diff.dark .hljs-class .hljs-title,
|
76
|
+
.bk-code-diff.dark .hljs-title.class_ {
|
77
|
+
color: #e6c07b;
|
78
|
+
}
|
79
|
+
.bk-code-diff.dark .hljs-emphasis {
|
80
|
+
font-style: italic;
|
81
|
+
}
|
82
|
+
.bk-code-diff.dark .hljs-strong {
|
83
|
+
font-weight: 700;
|
84
|
+
}
|
85
|
+
.bk-code-diff.dark .hljs-link {
|
86
|
+
text-decoration: underline;
|
87
|
+
}
|
88
|
+
.bk-code-diff.dark .d2h-code-linenumber,
|
89
|
+
.bk-code-diff.dark .d2h-code-side-linenumber {
|
90
|
+
font-size: 12px;
|
91
|
+
color: #8f8f89;
|
92
|
+
background: #282c34;
|
93
|
+
border: none;
|
94
|
+
}
|
95
|
+
.bk-code-diff.dark .d2h-info {
|
96
|
+
color: inherit;
|
97
|
+
background-color: transparent;
|
98
|
+
}
|
99
|
+
.bk-code-diff.dark .d2h-del {
|
100
|
+
background-color: #422321 !important;
|
101
|
+
}
|
102
|
+
.bk-code-diff.dark .d2h-del .hljs {
|
103
|
+
background: transparent;
|
104
|
+
}
|
105
|
+
.bk-code-diff.dark .d2h-ins {
|
106
|
+
background: #2d3324 !important;
|
107
|
+
}
|
108
|
+
.bk-code-diff.dark .d2h-ins .hljs {
|
109
|
+
background: transparent;
|
110
|
+
}
|
111
|
+
.bk-code-diff.dark .d2h-code-side-emptyplaceholder,
|
112
|
+
.bk-code-diff.dark .d2h-emptyplaceholder {
|
113
|
+
background-color: #292929 !important;
|
114
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
2
|
+
import { ElementType } from '@bkui-vue/shared';
|
3
|
+
declare const diffFormats: readonly ["side-by-side", "line-by-line"];
|
4
|
+
export declare type DiffFormatType = ElementType<typeof diffFormats>;
|
5
|
+
export declare const LANGUAGES: readonly ["css", "java", "javascript", "json", "scss", "less", "stylus", "shell", "bash", "cpp", "go", "xml", "python", "typescript", "sql", "ruby", "vim", "php", "perl", "powershell", "makefile"];
|
6
|
+
export declare type LanguagesUnion = ElementType<typeof LANGUAGES>;
|
7
|
+
declare const themes: readonly ["dark", "light"];
|
8
|
+
export declare type ThemesUnion = ElementType<typeof themes>;
|
9
|
+
export declare const codeDiffProps: {
|
10
|
+
oldContent: import("vue-types").VueTypeValidableDef<string> & {
|
11
|
+
default: string;
|
12
|
+
};
|
13
|
+
newContent: import("vue-types").VueTypeValidableDef<string> & {
|
14
|
+
default: string;
|
15
|
+
};
|
16
|
+
diffFormat: import("vue-types").VueTypeValidableDef<"side-by-side" | "line-by-line"> & {
|
17
|
+
default: "side-by-side" | "line-by-line";
|
18
|
+
};
|
19
|
+
diffContext: import("vue-types").VueTypeValidableDef<number>;
|
20
|
+
theme: import("vue-types").VueTypeValidableDef<"dark" | "light"> & {
|
21
|
+
default: "dark" | "light";
|
22
|
+
};
|
23
|
+
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
24
|
+
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
25
|
+
};
|
26
|
+
};
|
27
|
+
export declare type CodeDiffPropsType = ExtractPropTypes<typeof codeDiffProps>;
|
28
|
+
declare const _default: import("vue").DefineComponent<{
|
29
|
+
oldContent: import("vue-types").VueTypeValidableDef<string> & {
|
30
|
+
default: string;
|
31
|
+
};
|
32
|
+
newContent: import("vue-types").VueTypeValidableDef<string> & {
|
33
|
+
default: string;
|
34
|
+
};
|
35
|
+
diffFormat: import("vue-types").VueTypeValidableDef<"side-by-side" | "line-by-line"> & {
|
36
|
+
default: "side-by-side" | "line-by-line";
|
37
|
+
};
|
38
|
+
diffContext: import("vue-types").VueTypeValidableDef<number>;
|
39
|
+
theme: import("vue-types").VueTypeValidableDef<"dark" | "light"> & {
|
40
|
+
default: "dark" | "light";
|
41
|
+
};
|
42
|
+
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
43
|
+
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
44
|
+
};
|
45
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
46
|
+
oldContent: import("vue-types").VueTypeValidableDef<string> & {
|
47
|
+
default: string;
|
48
|
+
};
|
49
|
+
newContent: import("vue-types").VueTypeValidableDef<string> & {
|
50
|
+
default: string;
|
51
|
+
};
|
52
|
+
diffFormat: import("vue-types").VueTypeValidableDef<"side-by-side" | "line-by-line"> & {
|
53
|
+
default: "side-by-side" | "line-by-line";
|
54
|
+
};
|
55
|
+
diffContext: import("vue-types").VueTypeValidableDef<number>;
|
56
|
+
theme: import("vue-types").VueTypeValidableDef<"dark" | "light"> & {
|
57
|
+
default: "dark" | "light";
|
58
|
+
};
|
59
|
+
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
60
|
+
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
61
|
+
};
|
62
|
+
}>> & {
|
63
|
+
[x: string & `on${any}`]: (...args: any[]) => any;
|
64
|
+
}, {
|
65
|
+
theme: "dark" | "light";
|
66
|
+
oldContent: string;
|
67
|
+
newContent: string;
|
68
|
+
diffFormat: "side-by-side" | "line-by-line";
|
69
|
+
language: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
70
|
+
}>;
|
71
|
+
export default _default;
|