bkui-vue 0.0.1-beta.20 → 0.0.1-beta.23
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 +8514 -3025
- package/dist/bkui-vue.esm.js +8515 -3026
- package/dist/bkui-vue.umd.js +8516 -3027
- package/dist/style.css +153 -86
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/index.js +10 -1
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/index.js +1 -1
- 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/card/index.js +1 -1
- package/lib/checkbox/common.d.ts +1 -1
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.css +115 -0
- package/lib/code-diff/code-diff.d.ts +71 -0
- package/lib/code-diff/code-diff.less +145 -0
- package/lib/code-diff/code-diff.variable.css +208 -0
- package/lib/code-diff/index.d.ts +6 -0
- package/lib/collapse/index.js +1 -1
- package/lib/date-picker/date-picker.d.ts +21 -131
- package/lib/date-picker/index.d.ts +7 -7
- 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/date-picker/utils.d.ts +1 -1
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/dialog/index.d.ts +7 -7
- package/lib/dialog/index.js +1 -1
- package/lib/directives/clickoutside.d.ts +3 -23
- package/lib/directives/index.js +2 -2
- package/lib/divider/index.js +1 -1
- package/lib/dropdown/index.d.ts +1 -1
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/form-item.d.ts +7 -21
- package/lib/form/form.css +9 -0
- package/lib/form/form.d.ts +9 -29
- package/lib/form/form.less +14 -1
- package/lib/form/form.variable.css +9 -0
- package/lib/form/index.d.ts +18 -58
- package/lib/form/index.js +1 -1
- package/lib/input/index.d.ts +61 -7
- package/lib/input/index.js +2 -2
- package/lib/input/input.css +19 -2
- package/lib/input/input.d.ts +32 -2
- package/lib/input/input.less +25 -3
- package/lib/input/input.variable.css +19 -2
- package/lib/link/index.js +1 -1
- package/lib/loading/index.d.ts +32 -10
- 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/menu/index.js +1 -1
- package/lib/menu/utils.d.ts +1 -1
- package/lib/message/index.js +1 -1
- package/lib/message/messageConstructor.d.ts +1 -1
- package/lib/modal/index.d.ts +4 -4
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +1 -1
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/popover/index.d.ts +7 -7
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.d.ts +2 -2
- package/lib/process/index.js +2 -2
- package/lib/progress/index.d.ts +4 -4
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.d.ts +1 -1
- package/lib/radio/common.d.ts +1 -1
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.js +1 -1
- package/lib/select/index.js +12 -12
- package/lib/shared/bk-helper-core.d.ts +0 -1
- package/lib/shared/bk-popover.d.ts +1 -1
- package/lib/shared/index.d.ts +0 -10
- package/lib/shared/index.js +1 -1
- package/lib/shared/vue-types.d.ts +5 -1
- package/lib/sideslider/index.d.ts +4 -4
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.d.ts +1 -1
- package/lib/slider/index.js +2 -2
- package/lib/steps/index.js +2 -2
- package/lib/switcher/index.js +1 -1
- package/lib/tab/index.js +1 -1
- package/lib/tab/tab-nav.d.ts +1 -1
- package/lib/table/index.d.ts +36 -13
- package/lib/table/index.js +10 -1
- package/lib/table/props.d.ts +8 -0
- package/lib/table/render.d.ts +3 -1
- package/lib/table/table.css +8 -1
- package/lib/table/table.d.ts +15 -4
- package/lib/table/table.less +10 -1
- package/lib/table/table.variable.css +8 -1
- package/lib/tag/index.d.ts +3 -3
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.d.ts +1 -1
- package/lib/timeline/index.js +1 -1
- package/lib/transfer/index.js +1 -1
- package/lib/tree/index.d.ts +50 -28
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +15 -6
- package/lib/tree/tree.css +10 -12
- package/lib/tree/tree.d.ts +27 -13
- package/lib/tree/tree.less +21 -24
- package/lib/tree/tree.variable.css +10 -12
- package/lib/tree/util.d.ts +20 -7
- package/lib/virtual-render/index.d.ts +4 -4
- package/lib/virtual-render/index.js +10 -1
- package/lib/virtual-render/virtual-render.d.ts +1 -1
- package/package.json +14 -12
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("
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("../shared"),require("vue"),require("../loading")):"function"==typeof define&&define.amd?define(["exports","../shared","vue","../loading"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Shared,e.Vue,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:t.PropTypes.theme().def(""),hoverTheme:t.PropTypes.theme(["primary","warning","success","danger"]).def(""),size:t.PropTypes.size(),title:t.PropTypes.string,icon:t.PropTypes.string,iconRight:t.PropTypes.string,disabled:t.PropTypes.bool,loading:t.PropTypes.bool,laodingMode:t.PropTypes.commonType(Object.values(n.BkLoadingMode)),outline:t.PropTypes.bool,text:t.PropTypes.bool,nativeType:{type:String}},c=o.defineComponent({name:"Button",props:l,emits:["click","mouseover"],setup:function(e,i){var u,a=i.slots,l=i.attrs,c=i.emit,d=o.ref(!1),p=null!==(u=a.default)&&void 0!==u&&u,f="bk-button",v=o.computed((function(){var o,n=e.hoverTheme?"".concat(f,"-hover-").concat(e.hoverTheme):"",i=e.theme?"".concat(f,"-").concat(e.theme):"",r=e.hoverTheme?"":i;return t.classes((o={"is-disabled":e.disabled,"is-outline":e.outline,"is-text":e.text&&!e.hoverTheme},s(o,"".concat(f,"-").concat(e.size),""!==e.size),s(o,"no-slot",!p),o),"".concat(r," ").concat(f," ").concat(n))})),m=o.computed((function(){return e.text||e.outline||e.hoverTheme?d.value&&!e.text?"white":e.hoverTheme||e.theme:["","default"].includes(e.theme)?"":"white"})),h=o.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 t;return o.createVNode("button",o.mergeProps({title:e.title,disabled:e.disabled,class:v.value,type:e.nativeType},l,{onClick:b,onMouseover:y,onMouseleave:g}),[e.loading&&o.createVNode(r.default,{class:"".concat(f,"-loading"),mode:e.laodingMode,theme:m.value,size:h.value},null),a.default&&o.createVNode("span",{class:"".concat(f,"-text")},[null===(t=a.default)||void 0===t?void 0:t.call(a)])])}}}),d=o.defineComponent({name:"ButtonGroup",props:{size:t.PropTypes.size()},setup:function(e,n){var i=o.computed((function(){return t.classes(s({},"bk-button-group-".concat(e.size),!!e.size),"bk-button-group")}));return function(){var e,t;return o.createVNode("div",{class:i.value},[null===(t=(e=n.slots).default)||void 0===t?void 0:t.call(e)])}}}),p=t.withInstallProps(c,{ButtonGroup:d});e.BkButton=p,e.BkButtonGroup=d,e.default=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/card/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("../shared"),require("vue")):"function"==typeof define&&define.amd?define(["exports","../shared","vue"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Shared,e.Vue)}(this,(function(e,o,t){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(e){e.exports=function(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e},e.exports.__esModule=!0,e.exports.default=e.exports}(s);var l=r(s.exports),d=t.defineComponent({name:"Card",props:{title:o.PropTypes.string,showHeader:o.PropTypes.bool.def(!0),showFooter:o.PropTypes.bool.def(!1),collapseStatus:o.PropTypes.bool.def(!0),border:o.PropTypes.bool.def(!0),headBorder:o.PropTypes.bool.def(!0)},setup:function(e){return{isCollapse:t.computed((function(){return e.collapseStatus}))}},render:function(){var e,r,s,d,a,i,n,p,u,c=o.classes(l({},"bk-card-border-none",!this.$props.border),"bk-card"),f=o.classes(l({},"bk-card-border-none",!this.$props.headBorder),"bk-card-head"),b=t.createVNode("div",null,[t.createVNode("div",{class:"title",title:this.$props.title},[this.$props.title])]);return t.createVNode("div",{class:c},[this.$props.showHeader?t.createVNode("div",{class:f},[t.createVNode("span",null,[null!==(s=null===(r=(e=this.$slots).header)||void 0===r?void 0:r.call(e))&&void 0!==s?s:b])]):"",this.$props.collapseStatus?t.createVNode("div",null,[t.createVNode("div",{class:"bk-card-body"},[null!==(i=null===(a=(d=this.$slots).default)||void 0===a?void 0:a.call(d))&&void 0!==i?i:"Content"]),this.$props.showFooter?t.createVNode("div",{class:"bk-card-footer"},[null!==(u=null===(p=(n=this.$slots).footer)||void 0===p?void 0:p.call(n))&&void 0!==u?u:"Footer"]):""]):""])}}),a=o.withInstall(d);e.default=a,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/checkbox/common.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { InjectionKey, Ref } from 'vue';
|
2
2
|
import type { ICheckboxGroupContext } from './type';
|
3
3
|
export declare const checkboxGroupKey: InjectionKey<ICheckboxGroupContext>;
|
4
4
|
export declare function useFocus(): [Ref<boolean>, {
|
package/lib/checkbox/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("../shared"),require("vue")):"function"==typeof define&&define.amd?define(["exports","../shared","vue"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Shared,e.Vue)}(this,(function(e,o,t){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={exports:{}},a={exports:{}};!function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var l={exports:{}};!function(e){e.exports=function(e,o){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,a=[],l=!0,u=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(a.push(r.value),!o||a.length!==o);l=!0);}catch(e){u=!0,n=e}finally{try{l||null==t.return||t.return()}finally{if(u)throw n}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports}(l);var u={exports:{}},s={exports:{}};!function(e){e.exports=function(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,r=new Array(o);t<o;t++)r[t]=e[t];return r},e.exports.__esModule=!0,e.exports.default=e.exports}(s),function(e){var o=s.exports;e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(u);var i={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(i),function(e){var o=a.exports,t=l.exports,r=u.exports,n=i.exports;e.exports=function(e,a){return o(e)||t(e,a)||r(e,a)||n()},e.exports.__esModule=!0,e.exports.default=e.exports}(n);var c=r(n.exports),p=Symbol("CheckboxGroup");var d={modelValue:o.PropTypes.oneOfType([String,Number,Boolean]).def(void 0),label:o.PropTypes.oneOfType([String,Number,Boolean]).isRequired,trueLabel:o.PropTypes.oneOfType([String,Number,Boolean]).def(""),falseLabel:o.PropTypes.oneOfType([String,Number,Boolean]).def(""),disabled:o.PropTypes.bool.def(!1),checked:o.PropTypes.bool.def(!1),indeterminate:o.PropTypes.bool,beforeChange:o.PropTypes.func,size:o.PropTypes.size()},f=t.defineComponent({name:"Checkbox",props:d,emits:["update:modelValue","change"],setup:function(){var e=function(){var e=t.ref(!1);return[e,{blur:function(){e.value=!0},focus:function(){e.value=!1}}]}(),r=c(e,2),n=r[0],a=r[1],l=a.blur,u=a.focus,s=function(){var e=t.getCurrentInstance(),r=e.props,n=e.emit,a=t.inject(p,o.EMPTY_OBJ),l=!o.isEmptyObj(a),u=t.reactive({isLocalChecked:r.checked}),s=t.computed((function(){return l?a.state.localValue.includes(r.label):void 0!==r.modelValue&&(r.modelValue===r.label||r.modelValue===r.trueLabel)||u.isLocalChecked}));u.isLocalChecked=s.value;var i=t.computed((function(){return l?s.value?r.label:"":s.value?""!==r.trueLabel?r.trueLabel:r.label:""!==r.falseLabel?r.falseLabel:""})),c=t.computed((function(){return!(!l||!a.props.disabled)||r.disabled}));return t.onMounted((function(){l&&a.register(e.proxy)})),t.onBeforeUnmount((function(){l&&a.unregister(e.proxy)})),{value:i,isChecked:s,isDisabled:c,handleChange:function(e){if(!c.value){var o=e.target;u.isLocalChecked=o.checked,n("change",i.value),n("update:modelValue",i.value),l&&a.handleChange(u.isLocalChecked,r.label),t.nextTick((function(){o.checked!==s.value&&(u.isLocalChecked=s.value,o.checked=s.value)}))}}}}();return{currentValue:s.value,isFocus:n,isChecked:s.isChecked,isDisabled:s.isDisabled,handleBlur:l,handleFocus:u,handleChange:s.handleChange}},render:function(){var e=o.classes({"bk-checkbox":!0,"is-focus":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled});return t.createVNode("label",{class:e},[t.createVNode("span",{class:"bk-checkbox-input"},[t.createVNode("input",{role:"checkbox",type:"checkbox",class:"bk-checkbox-original",value:this.currentValue,disabled:this.isDisabled,checked:this.isChecked,onChange:this.handleChange},null)]),t.createVNode("span",{class:"bk-checkbox-label"},[this.label])])}}),h={exports:{}},x={exports:{}};!function(e){var o=s.exports;e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(x);var b={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(b);var v={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(v),function(e){var o=x.exports,t=b.exports,r=u.exports,n=v.exports;e.exports=function(e){return o(e)||t(e)||r(e)||n()},e.exports.__esModule=!0,e.exports.default=e.exports}(h);var y=r(h.exports),m={name:o.PropTypes.string.def(""),modelValue:o.PropTypes.array,disabled:o.PropTypes.bool},k=t.defineComponent({name:"CheckboxGroup",props:m,emits:["change","update:modelValue"],setup:function(e,o){var r=t.reactive({localValue:e.modelValue?y(e.modelValue):[]});t.watch((function(){return e.modelValue}),(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.localValue=y(e)}));var n=[];return t.provide(p,{name:"CheckboxGroup",props:e,state:r,register:function(e){n.push(e)},unregister:function(e){var o=n.indexOf(e);o>-1&&n.splice(o,1)},handleChange:function(t,n){var a=y(r.localValue);a=t?[].concat(y(r.localValue),[n]):r.localValue.reduce((function(e,o){return o!==n&&e.push(o),e}),[]),e.modelValue||(r.localValue=a),o.emit("update:modelValue",a),o.emit("change",a)}}),t.onMounted((function(){n.forEach((function(e){(e.isChecked||e.checked)&&r.localValue.push(e.label)}))})),{}},render:function(){return t.createVNode("div",{class:"bk-checkbox-group"},[this.$slots.default()])}}),g=o.withInstallProps(f,{Group:k});e.BkCheckbox=g,e.BkCheckboxGroup=k,e.default=g,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/checkbox/type.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
|
-
import type { CheckboxGroupProps } from './checkbox-group';
|
3
2
|
import type { CheckboxProps } from './checkbox';
|
3
|
+
import type { CheckboxGroupProps } from './checkbox-group';
|
4
4
|
export declare type ICheckboxInstance = ComponentPublicInstance<CheckboxProps, {
|
5
5
|
isChecked: boolean;
|
6
6
|
checked: boolean;
|
@@ -0,0 +1,115 @@
|
|
1
|
+
@import 'highlight.js/styles/googlecode.css';
|
2
|
+
@import 'diff2html/bundles/css/diff2html.min.css';
|
3
|
+
/* stylelint-disable declaration-no-important */
|
4
|
+
.bk-code-diff {
|
5
|
+
position: relative;
|
6
|
+
}
|
7
|
+
.bk-code-diff .d2h-file-header {
|
8
|
+
display: none;
|
9
|
+
}
|
10
|
+
.bk-code-diff.dark {
|
11
|
+
color: #abb2bf !important;
|
12
|
+
background: #282c34;
|
13
|
+
}
|
14
|
+
.bk-code-diff.dark .hljs {
|
15
|
+
color: #abb2bf !important;
|
16
|
+
background: #282c34;
|
17
|
+
}
|
18
|
+
.bk-code-diff.dark .d2h-file-side-diff:nth-child(n + 2) .d2h-code-wrapper {
|
19
|
+
border-left-color: #313238;
|
20
|
+
}
|
21
|
+
.bk-code-diff.dark pre code.hljs {
|
22
|
+
display: block;
|
23
|
+
padding: 1em;
|
24
|
+
overflow-x: auto;
|
25
|
+
}
|
26
|
+
.bk-code-diff.dark code.hljs {
|
27
|
+
padding: 3px 5px;
|
28
|
+
}
|
29
|
+
.bk-code-diff.dark .hljs-comment,
|
30
|
+
.bk-code-diff.dark .hljs-quote {
|
31
|
+
font-style: italic;
|
32
|
+
color: #5c6370;
|
33
|
+
}
|
34
|
+
.bk-code-diff.dark .hljs-doctag,
|
35
|
+
.bk-code-diff.dark .hljs-formula,
|
36
|
+
.bk-code-diff.dark .hljs-keyword,
|
37
|
+
.bk-code-diff.dark .hljs-params {
|
38
|
+
color: #c678dd;
|
39
|
+
}
|
40
|
+
.bk-code-diff.dark .hljs-deletion,
|
41
|
+
.bk-code-diff.dark .hljs-name,
|
42
|
+
.bk-code-diff.dark .hljs-section,
|
43
|
+
.bk-code-diff.dark .hljs-selector-tag,
|
44
|
+
.bk-code-diff.dark .hljs-subst {
|
45
|
+
color: #e06c75;
|
46
|
+
}
|
47
|
+
.bk-code-diff.dark .hljs-literal {
|
48
|
+
color: #56b6c2;
|
49
|
+
}
|
50
|
+
.bk-code-diff.dark .hljs-addition,
|
51
|
+
.bk-code-diff.dark .hljs-attribute,
|
52
|
+
.bk-code-diff.dark .hljs-meta .hljs-string,
|
53
|
+
.bk-code-diff.dark .hljs-regexp,
|
54
|
+
.bk-code-diff.dark .hljs-string {
|
55
|
+
color: #98c379;
|
56
|
+
}
|
57
|
+
.bk-code-diff.dark .hljs-attr,
|
58
|
+
.bk-code-diff.dark .hljs-number,
|
59
|
+
.bk-code-diff.dark .hljs-selector-attr,
|
60
|
+
.bk-code-diff.dark .hljs-selector-class,
|
61
|
+
.bk-code-diff.dark .hljs-selector-pseudo,
|
62
|
+
.bk-code-diff.dark .hljs-template-variable,
|
63
|
+
.bk-code-diff.dark .hljs-type,
|
64
|
+
.bk-code-diff.dark .hljs-variable {
|
65
|
+
color: #d19a66;
|
66
|
+
}
|
67
|
+
.bk-code-diff.dark .hljs-bullet,
|
68
|
+
.bk-code-diff.dark .hljs-link,
|
69
|
+
.bk-code-diff.dark .hljs-meta,
|
70
|
+
.bk-code-diff.dark .hljs-selector-id,
|
71
|
+
.bk-code-diff.dark .hljs-symbol,
|
72
|
+
.bk-code-diff.dark .hljs-title {
|
73
|
+
color: #61aeee;
|
74
|
+
}
|
75
|
+
.bk-code-diff.dark .hljs-built_in,
|
76
|
+
.bk-code-diff.dark .hljs-class .hljs-title,
|
77
|
+
.bk-code-diff.dark .hljs-title.class_ {
|
78
|
+
color: #e6c07b;
|
79
|
+
}
|
80
|
+
.bk-code-diff.dark .hljs-emphasis {
|
81
|
+
font-style: italic;
|
82
|
+
}
|
83
|
+
.bk-code-diff.dark .hljs-strong {
|
84
|
+
font-weight: 700;
|
85
|
+
}
|
86
|
+
.bk-code-diff.dark .hljs-link {
|
87
|
+
text-decoration: underline;
|
88
|
+
}
|
89
|
+
.bk-code-diff.dark .d2h-code-linenumber,
|
90
|
+
.bk-code-diff.dark .d2h-code-side-linenumber {
|
91
|
+
font-size: 12px;
|
92
|
+
color: #8f8f89;
|
93
|
+
background: #282c34;
|
94
|
+
border: none;
|
95
|
+
}
|
96
|
+
.bk-code-diff.dark .d2h-info {
|
97
|
+
color: inherit;
|
98
|
+
background-color: transparent;
|
99
|
+
}
|
100
|
+
.bk-code-diff.dark .d2h-del {
|
101
|
+
background-color: #422321 !important;
|
102
|
+
}
|
103
|
+
.bk-code-diff.dark .d2h-del .hljs {
|
104
|
+
background: transparent;
|
105
|
+
}
|
106
|
+
.bk-code-diff.dark .d2h-ins {
|
107
|
+
background: #2d3324 !important;
|
108
|
+
}
|
109
|
+
.bk-code-diff.dark .d2h-ins .hljs {
|
110
|
+
background: transparent;
|
111
|
+
}
|
112
|
+
.bk-code-diff.dark .d2h-code-side-emptyplaceholder,
|
113
|
+
.bk-code-diff.dark .d2h-emptyplaceholder {
|
114
|
+
background-color: #292929 !important;
|
115
|
+
}
|
@@ -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;
|
@@ -0,0 +1,145 @@
|
|
1
|
+
@import '../styles/themes/themes.less';
|
2
|
+
@import 'highlight.js/styles/googlecode.css';
|
3
|
+
@import 'diff2html/bundles/css/diff2html.min.css';
|
4
|
+
|
5
|
+
/* stylelint-disable declaration-no-important */
|
6
|
+
.@{bk-prefix}-code-diff {
|
7
|
+
position: relative;
|
8
|
+
|
9
|
+
.d2h-file-header {
|
10
|
+
display: none;
|
11
|
+
}
|
12
|
+
|
13
|
+
&.dark {
|
14
|
+
color: #abb2bf !important;
|
15
|
+
background: #282c34;
|
16
|
+
|
17
|
+
.hljs {
|
18
|
+
color: #abb2bf !important;
|
19
|
+
background: #282c34;
|
20
|
+
}
|
21
|
+
|
22
|
+
.d2h-file-side-diff {
|
23
|
+
&:nth-child(n + 2) {
|
24
|
+
.d2h-code-wrapper {
|
25
|
+
border-left-color: #313238;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
pre code.hljs {
|
31
|
+
display: block;
|
32
|
+
padding: 1em;
|
33
|
+
overflow-x: auto;
|
34
|
+
}
|
35
|
+
|
36
|
+
code.hljs {
|
37
|
+
padding: 3px 5px;
|
38
|
+
}
|
39
|
+
|
40
|
+
.hljs-comment,
|
41
|
+
.hljs-quote {
|
42
|
+
font-style: italic;
|
43
|
+
color: #5c6370;
|
44
|
+
}
|
45
|
+
|
46
|
+
.hljs-doctag,
|
47
|
+
.hljs-formula,
|
48
|
+
.hljs-keyword,
|
49
|
+
.hljs-params {
|
50
|
+
color: #c678dd;
|
51
|
+
}
|
52
|
+
|
53
|
+
.hljs-deletion,
|
54
|
+
.hljs-name,
|
55
|
+
.hljs-section,
|
56
|
+
.hljs-selector-tag,
|
57
|
+
.hljs-subst {
|
58
|
+
color: #e06c75;
|
59
|
+
}
|
60
|
+
|
61
|
+
.hljs-literal {
|
62
|
+
color: #56b6c2;
|
63
|
+
}
|
64
|
+
|
65
|
+
.hljs-addition,
|
66
|
+
.hljs-attribute,
|
67
|
+
.hljs-meta .hljs-string,
|
68
|
+
.hljs-regexp,
|
69
|
+
.hljs-string {
|
70
|
+
color: #98c379;
|
71
|
+
}
|
72
|
+
|
73
|
+
.hljs-attr,
|
74
|
+
.hljs-number,
|
75
|
+
.hljs-selector-attr,
|
76
|
+
.hljs-selector-class,
|
77
|
+
.hljs-selector-pseudo,
|
78
|
+
.hljs-template-variable,
|
79
|
+
.hljs-type,
|
80
|
+
.hljs-variable {
|
81
|
+
color: #d19a66;
|
82
|
+
}
|
83
|
+
|
84
|
+
.hljs-bullet,
|
85
|
+
.hljs-link,
|
86
|
+
.hljs-meta,
|
87
|
+
.hljs-selector-id,
|
88
|
+
.hljs-symbol,
|
89
|
+
.hljs-title {
|
90
|
+
color: #61aeee;
|
91
|
+
}
|
92
|
+
|
93
|
+
.hljs-built_in,
|
94
|
+
.hljs-class .hljs-title,
|
95
|
+
.hljs-title.class_ {
|
96
|
+
color: #e6c07b;
|
97
|
+
}
|
98
|
+
|
99
|
+
.hljs-emphasis {
|
100
|
+
font-style: italic;
|
101
|
+
}
|
102
|
+
|
103
|
+
.hljs-strong {
|
104
|
+
font-weight: 700;
|
105
|
+
}
|
106
|
+
|
107
|
+
.hljs-link {
|
108
|
+
text-decoration: underline;
|
109
|
+
}
|
110
|
+
|
111
|
+
.d2h-code-linenumber,
|
112
|
+
.d2h-code-side-linenumber {
|
113
|
+
font-size: 12px;
|
114
|
+
color: #8f8f89;
|
115
|
+
background: #282c34;
|
116
|
+
border: none;
|
117
|
+
}
|
118
|
+
|
119
|
+
.d2h-info {
|
120
|
+
color: inherit;
|
121
|
+
background-color: transparent;
|
122
|
+
}
|
123
|
+
|
124
|
+
.d2h-del {
|
125
|
+
background-color: #422321 !important;
|
126
|
+
|
127
|
+
.hljs {
|
128
|
+
background: transparent;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
.d2h-ins {
|
133
|
+
background: #2d3324 !important;
|
134
|
+
|
135
|
+
.hljs {
|
136
|
+
background: transparent;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
.d2h-code-side-emptyplaceholder,
|
141
|
+
.d2h-emptyplaceholder {
|
142
|
+
background-color: #292929 !important;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|