bkui-vue 0.0.1-beta.12 → 0.0.1-beta.15
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 +25 -17
- package/README_EN.md +89 -0
- package/dist/bkui-vue.cjs.js +1847 -467
- package/dist/bkui-vue.esm.js +1842 -468
- package/dist/bkui-vue.umd.js +1847 -467
- package/dist/style.css +454 -177
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/index.js +1 -1
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.css +10 -1
- package/lib/breadcrumb/breadcrumb.d.ts +20 -0
- package/lib/breadcrumb/breadcrumb.less +13 -2
- package/lib/breadcrumb/breadcrumb.variable.css +10 -1
- package/lib/breadcrumb/index.d.ts +38 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button.d.ts +2 -2
- package/lib/button/index.d.ts +8 -8
- package/lib/button/index.js +1 -1
- package/lib/card/index.js +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/collapse/index.js +1 -1
- package/lib/components.d.ts +3 -1
- package/lib/date-picker/index.js +1 -1
- package/lib/dialog/index.js +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/divider/index.js +1 -1
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/index.js +1 -1
- package/lib/icon/angle-down-fill.d.ts +4 -0
- package/lib/icon/angle-up-fill.d.ts +4 -0
- package/lib/icon/arrows-left.d.ts +4 -0
- package/lib/icon/index.d.ts +4 -0
- package/lib/icon/index.js +1 -1
- package/lib/icon/spinner.d.ts +4 -0
- package/lib/index.d.ts +1 -0
- package/lib/input/index.d.ts +19 -11
- package/lib/input/index.js +2 -2
- package/lib/input/input.css +1 -0
- package/lib/input/input.d.ts +5 -3
- package/lib/input/input.less +4 -3
- package/lib/input/input.variable.css +1 -0
- package/lib/link/index.js +1 -1
- package/lib/loading/index.d.ts +21 -4
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.d.ts +13 -2
- package/lib/menu/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/navigation/index.js +1 -1
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +2 -2
- package/lib/popover/index.d.ts +103 -48
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +22 -13
- package/lib/popover/popover.d.ts +30 -23
- package/lib/popover/popover.less +55 -45
- package/lib/popover/popover.variable.css +22 -13
- package/lib/popover/props.d.ts +77 -0
- package/lib/preset.d.ts +2 -3
- package/lib/process/index.d.ts +145 -0
- package/lib/process/index.js +15 -0
- package/lib/process/process.css +139 -0
- package/lib/process/process.d.ts +116 -0
- package/lib/process/process.less +179 -0
- package/lib/process/process.variable.css +225 -0
- package/lib/progress/index.d.ts +23 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +0 -3
- package/lib/progress/progress.d.ts +17 -1
- package/lib/progress/progress.less +0 -4
- package/lib/progress/progress.variable.css +0 -3
- package/lib/radio/index.d.ts +2 -2
- package/lib/radio/index.js +1 -1
- package/lib/rate/index.js +1 -1
- package/lib/select/common.d.ts +10 -1
- package/lib/select/index.d.ts +133 -190
- package/lib/select/index.js +2 -2
- package/lib/select/option.d.ts +1 -7
- package/lib/select/optionGroup.d.ts +22 -15
- package/lib/select/select.css +71 -14
- package/lib/select/select.d.ts +40 -55
- package/lib/select/select.less +73 -14
- package/lib/select/select.variable.css +71 -14
- package/lib/shared/bk-helper-core.d.ts +6 -0
- package/lib/shared/bk-popover.d.ts +45 -4
- package/lib/shared/index.d.ts +10 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/utils.d.ts +6 -0
- package/lib/sideslider/index.js +1 -1
- package/lib/slider/index.js +2 -2
- package/lib/steps/index.d.ts +8 -8
- package/lib/steps/index.js +2 -2
- package/lib/steps/steps.d.ts +2 -2
- package/lib/styles/index.d.ts +2 -0
- package/lib/styles/index.js +1 -1
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +149 -135
- package/lib/switcher/switcher.less +210 -154
- package/lib/switcher/switcher.variable.css +149 -135
- package/lib/tab/index.js +1 -1
- package/lib/table/index.d.ts +76 -1
- package/lib/table/index.js +1 -1
- package/lib/table/props.d.ts +38 -0
- package/lib/table/render.d.ts +1 -1
- package/lib/table/table.css +6 -4
- package/lib/table/table.d.ts +34 -0
- package/lib/table/table.less +4 -4
- package/lib/table/table.variable.css +6 -4
- package/lib/table/utils.d.ts +7 -0
- package/lib/tag/index.js +1 -1
- package/lib/tree/index.d.ts +22 -8
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +52 -0
- package/lib/tree/tree.css +16 -7
- package/lib/tree/tree.d.ts +13 -7
- package/lib/tree/tree.less +24 -24
- package/lib/tree/tree.variable.css +16 -7
- package/lib/tree/util.d.ts +3 -44
- package/lib/virtual-render/index.d.ts +395 -0
- package/lib/virtual-render/index.js +1 -0
- package/lib/virtual-render/props.d.ts +147 -0
- package/lib/virtual-render/v-virtual-render.d.ts +7 -0
- package/lib/virtual-render/virtual-render.css +40 -0
- package/lib/virtual-render/virtual-render.d.ts +175 -0
- package/lib/virtual-render/virtual-render.less +51 -0
- package/lib/virtual-render/virtual-render.variable.css +40 -0
- package/package.json +10 -6
package/lib/progress/index.d.ts
CHANGED
@@ -3,6 +3,7 @@ declare const BkProgress: {
|
|
3
3
|
$: import("vue").ComponentInternalInstance;
|
4
4
|
$data: {};
|
5
5
|
$props: Partial<{
|
6
|
+
fixed: number;
|
6
7
|
width: number;
|
7
8
|
color: string;
|
8
9
|
theme: string;
|
@@ -12,6 +13,7 @@ declare const BkProgress: {
|
|
12
13
|
percent: number;
|
13
14
|
strokeWidth: number;
|
14
15
|
strokeLinecap: string;
|
16
|
+
bgColor: string;
|
15
17
|
titleStyle: {
|
16
18
|
[key: string]: any;
|
17
19
|
};
|
@@ -29,9 +31,12 @@ declare const BkProgress: {
|
|
29
31
|
textInside?: unknown;
|
30
32
|
showText?: unknown;
|
31
33
|
color?: unknown;
|
34
|
+
bgColor?: unknown;
|
35
|
+
fixed?: unknown;
|
32
36
|
format?: unknown;
|
33
37
|
titleStyle?: unknown;
|
34
38
|
} & {
|
39
|
+
fixed: number;
|
35
40
|
width: number;
|
36
41
|
color: string;
|
37
42
|
theme: string;
|
@@ -40,6 +45,7 @@ declare const BkProgress: {
|
|
40
45
|
percent: number;
|
41
46
|
strokeWidth: number;
|
42
47
|
strokeLinecap: string;
|
48
|
+
bgColor: string;
|
43
49
|
titleStyle: {
|
44
50
|
[key: string]: any;
|
45
51
|
};
|
@@ -48,7 +54,7 @@ declare const BkProgress: {
|
|
48
54
|
} & {
|
49
55
|
size?: string;
|
50
56
|
format?: (...args: any[]) => any;
|
51
|
-
}> & {} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "width" | "color" | "theme" | "extCls" | "type" | "format" | "percent" | "strokeWidth" | "strokeLinecap" | "titleStyle" | "showText" | "textInside">;
|
57
|
+
}> & {} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "fixed" | "width" | "color" | "theme" | "extCls" | "type" | "format" | "percent" | "strokeWidth" | "strokeLinecap" | "bgColor" | "titleStyle" | "showText" | "textInside">;
|
52
58
|
$attrs: {
|
53
59
|
[x: string]: unknown;
|
54
60
|
};
|
@@ -74,9 +80,12 @@ declare const BkProgress: {
|
|
74
80
|
textInside?: unknown;
|
75
81
|
showText?: unknown;
|
76
82
|
color?: unknown;
|
83
|
+
bgColor?: unknown;
|
84
|
+
fixed?: unknown;
|
77
85
|
format?: unknown;
|
78
86
|
titleStyle?: unknown;
|
79
87
|
} & {
|
88
|
+
fixed: number;
|
80
89
|
width: number;
|
81
90
|
color: string;
|
82
91
|
theme: string;
|
@@ -85,6 +94,7 @@ declare const BkProgress: {
|
|
85
94
|
percent: number;
|
86
95
|
strokeWidth: number;
|
87
96
|
strokeLinecap: string;
|
97
|
+
bgColor: string;
|
88
98
|
titleStyle: {
|
89
99
|
[key: string]: any;
|
90
100
|
};
|
@@ -99,6 +109,7 @@ declare const BkProgress: {
|
|
99
109
|
[key: string]: any;
|
100
110
|
}>[];
|
101
111
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
112
|
+
fixed: number;
|
102
113
|
width: number;
|
103
114
|
color: string;
|
104
115
|
theme: string;
|
@@ -108,6 +119,7 @@ declare const BkProgress: {
|
|
108
119
|
percent: number;
|
109
120
|
strokeWidth: number;
|
110
121
|
strokeLinecap: string;
|
122
|
+
bgColor: string;
|
111
123
|
titleStyle: {
|
112
124
|
[key: string]: any;
|
113
125
|
};
|
@@ -145,9 +157,12 @@ declare const BkProgress: {
|
|
145
157
|
textInside?: unknown;
|
146
158
|
showText?: unknown;
|
147
159
|
color?: unknown;
|
160
|
+
bgColor?: unknown;
|
161
|
+
fixed?: unknown;
|
148
162
|
format?: unknown;
|
149
163
|
titleStyle?: unknown;
|
150
164
|
} & {
|
165
|
+
fixed: number;
|
151
166
|
width: number;
|
152
167
|
color: string;
|
153
168
|
theme: string;
|
@@ -156,6 +171,7 @@ declare const BkProgress: {
|
|
156
171
|
percent: number;
|
157
172
|
strokeWidth: number;
|
158
173
|
strokeLinecap: string;
|
174
|
+
bgColor: string;
|
159
175
|
titleStyle: {
|
160
176
|
[key: string]: any;
|
161
177
|
};
|
@@ -185,9 +201,12 @@ declare const BkProgress: {
|
|
185
201
|
textInside?: unknown;
|
186
202
|
showText?: unknown;
|
187
203
|
color?: unknown;
|
204
|
+
bgColor?: unknown;
|
205
|
+
fixed?: unknown;
|
188
206
|
format?: unknown;
|
189
207
|
titleStyle?: unknown;
|
190
208
|
} & {
|
209
|
+
fixed: number;
|
191
210
|
width: number;
|
192
211
|
color: string;
|
193
212
|
theme: string;
|
@@ -196,6 +215,7 @@ declare const BkProgress: {
|
|
196
215
|
percent: number;
|
197
216
|
strokeWidth: number;
|
198
217
|
strokeLinecap: string;
|
218
|
+
bgColor: string;
|
199
219
|
titleStyle: {
|
200
220
|
[key: string]: any;
|
201
221
|
};
|
@@ -210,6 +230,7 @@ declare const BkProgress: {
|
|
210
230
|
[key: string]: any;
|
211
231
|
}>[];
|
212
232
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
233
|
+
fixed: number;
|
213
234
|
width: number;
|
214
235
|
color: string;
|
215
236
|
theme: string;
|
@@ -219,6 +240,7 @@ declare const BkProgress: {
|
|
219
240
|
percent: number;
|
220
241
|
strokeWidth: number;
|
221
242
|
strokeLinecap: string;
|
243
|
+
bgColor: string;
|
222
244
|
titleStyle: {
|
223
245
|
[key: string]: any;
|
224
246
|
};
|
package/lib/progress/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,r){"use strict";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(e){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,r){"use strict";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(e){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(s);var n=o(s.exports),c=function(e,r){var o=r.attrs,s=r.slots,c=o.percent,a=o.strokeWidth,i=o.size,l=o.color,p=o.titleStyle,d=o.showText,u=o.textInside,f=o.theme,h={height:"".concat(a,"px"),lineHeight:"".concat(a,"px")},y={width:"".concat(c,"%"),background:l,animationDuration:"3s"},b=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(d||s.default)&&(e&&u||!e&&!u)?null==s?void 0:s.default():null};return t.createVNode("div",{class:"progress-outer"},[t.createVNode("div",{class:"bk-progress-".concat(i||"normal"," progress-bar"),style:h},[t.createVNode("div",{style:y,class:n({"progress-inner":!0},"bk-".concat(f),!0)},[t.createVNode("div",{class:"inner-text",style:p},[b()])])]),b(!1)])},a=function(e,r){var o=r.attrs,s=r.slots,n=o.width,c=o.percent,a=o.strokeWidth,i=o.color,l=o.strokeLinecap,p=o.theme,d=o.type,u=o.bgColor,f=o.titleStyle,h=a||6,y=n||126,b={width:"number"==typeof y?"".concat(y,"px"):y,height:"number"==typeof y?"".concat(y,"px"):y,fontSize:"".concat(.15*y+6,"px")},x=50-h/2,v="dashboard"===d,g=2*Math.PI*x,P=v?.75:1,k="".concat(-1*g*(1-P)/2,"px"),m={strokeDasharray:"".concat(g*P,"px, ").concat(g,"px"),strokeDashoffset:k},T={strokeDasharray:"".concat(g*P*(c/100),"px, ").concat(g,"px"),strokeDashoffset:k,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease"},V="\n M 50 50\n m 0 ".concat(v?"":"-").concat(x,"\n a ").concat(x," ").concat(x," 0 1 1 0 ").concat(v?"-":"").concat(2*x,"\n a ").concat(x," ").concat(x," 0 1 1 0 ").concat(v?"":"-").concat(2*x,"\n "),N={d:V,stroke:u||"#f5f5f5","stroke-linecap":l,"stroke-width":h,"fill-opacity":"0",class:"process-circle-trail",style:m},w={d:V,stroke:i||"#13ce66","stroke-linecap":l,"stroke-width":c>0&&h||0,"fill-opacity":"0",class:"process-circle-path bk-".concat(p,"-circle-trail"),style:T};return t.createVNode("div",{class:"progress-outer-circle",style:b},[t.createVNode("svg",{viewBox:"0 0 100 100"},[t.createVNode("path",N,null),t.createVNode("path",w,null)]),t.createVNode("span",{class:"progress-circle-text",style:f},[null==s?void 0:s.default()])])};function i(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}var l=t.defineComponent({name:"Progress",props:{extCls:r.PropTypes.string,type:r.PropTypes.string.validate((function(e){return["line","circle","dashboard"].includes(e)})).def("line"),percent:r.PropTypes.number.def(0),theme:r.PropTypes.theme().def("primary"),size:r.PropTypes.size(),width:r.PropTypes.number.def(126),strokeWidth:r.PropTypes.number,strokeLinecap:r.PropTypes.string.def("round"),textInside:r.PropTypes.bool.def(!1),showText:r.PropTypes.bool.def(!0),color:r.PropTypes.string,bgColor:r.PropTypes.string,fixed:r.PropTypes.number.validate((function(e){return e>=0&&e<=20})).def(0),format:r.PropTypes.func.def((function(e){return"".concat(e,"%")})),titleStyle:r.PropTypes.object.def({fontSize:"16px",verticalAlign:"middle"})},setup:function(){return{}},methods:{validPercent:function(e){return!e||e<0?0:e>100?100:e},renderProcessInfo:function(){var e,r=this.$props,o=r.showText,s=r.format,n=r.percent,c=r.textInside,a=r.titleStyle,i=r.fixed,l=s(null===(e=this.validPercent(n))||void 0===e?void 0:e.toFixed(i));return(o||this.$slots.default)&&c?this.$slots.default?this.$slots.default():t.createVNode("span",null,[l]):!o||c?null:t.createVNode("span",{class:"progress-text",style:"string"==typeof l?a:void 0},[this.$slots.default?this.$slots.default():l])}},render:function(){var e=this.renderProcessInfo(),o=Object.assign(Object.assign({},this.$props),{percent:this.validPercent(this.percent)}),s=t.createVNode(c,o,i(e)?e:{default:function(){return[e]}});"circle"!==this.type&&"dashboard"!==this.type||(s=t.createVNode(a,o,i(e)?e:{default:function(){return[e]}}));var n={class:r.classes({extCls:!!this.extCls},"bk-progress bk-progress-".concat(this.type))};return t.createVNode("div",n,[s])}}),p=r.withInstall(l);e.default=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -45,6 +45,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
45
45
|
color: import("vue-types").VueTypeValidableDef<string> & {
|
46
46
|
default: string;
|
47
47
|
};
|
48
|
+
bgColor: import("vue-types").VueTypeValidableDef<string> & {
|
49
|
+
default: string;
|
50
|
+
};
|
51
|
+
fixed: import("vue-types").VueTypeValidableDef<number> & {
|
52
|
+
default: number;
|
53
|
+
} & {
|
54
|
+
validator: import("vue-types/dist/types").ValidatorFunction<unknown>;
|
55
|
+
} & {
|
56
|
+
default: number;
|
57
|
+
};
|
48
58
|
format: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
49
59
|
default: (...args: any[]) => any;
|
50
60
|
} & {
|
@@ -64,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
64
74
|
}, {}, unknown, {}, {
|
65
75
|
/** 验证进度值 */
|
66
76
|
validPercent(percent?: number): number;
|
67
|
-
/** text
|
77
|
+
/** text 区域展示内容*/
|
68
78
|
renderProcessInfo(): JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
69
79
|
[key: string]: any;
|
70
80
|
}>[];
|
@@ -80,9 +90,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
80
90
|
textInside?: unknown;
|
81
91
|
showText?: unknown;
|
82
92
|
color?: unknown;
|
93
|
+
bgColor?: unknown;
|
94
|
+
fixed?: unknown;
|
83
95
|
format?: unknown;
|
84
96
|
titleStyle?: unknown;
|
85
97
|
} & {
|
98
|
+
fixed: number;
|
86
99
|
width: number;
|
87
100
|
color: string;
|
88
101
|
theme: string;
|
@@ -91,6 +104,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
91
104
|
percent: number;
|
92
105
|
strokeWidth: number;
|
93
106
|
strokeLinecap: string;
|
107
|
+
bgColor: string;
|
94
108
|
titleStyle: {
|
95
109
|
[key: string]: any;
|
96
110
|
};
|
@@ -100,6 +114,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
100
114
|
size?: string;
|
101
115
|
format?: (...args: any[]) => any;
|
102
116
|
}> & {}, {
|
117
|
+
fixed: number;
|
103
118
|
width: number;
|
104
119
|
color: string;
|
105
120
|
theme: string;
|
@@ -109,6 +124,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
109
124
|
percent: number;
|
110
125
|
strokeWidth: number;
|
111
126
|
strokeLinecap: string;
|
127
|
+
bgColor: string;
|
112
128
|
titleStyle: {
|
113
129
|
[key: string]: any;
|
114
130
|
};
|
package/lib/radio/index.d.ts
CHANGED
@@ -142,7 +142,7 @@ declare const BkRadio: {
|
|
142
142
|
modelValue: string | number | boolean;
|
143
143
|
checked: boolean;
|
144
144
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
|
145
|
-
|
145
|
+
Group: import("vue").DefineComponent<{
|
146
146
|
name: import("vue-types").VueTypeValidableDef<string> & {
|
147
147
|
default: string;
|
148
148
|
} & {
|
@@ -168,7 +168,7 @@ declare const BkRadio: {
|
|
168
168
|
name: string;
|
169
169
|
disabled: boolean;
|
170
170
|
}>;
|
171
|
-
|
171
|
+
Button: import("vue").DefineComponent<{
|
172
172
|
name: import("vue-types").VueTypeValidableDef<string> & {
|
173
173
|
default: string;
|
174
174
|
} & {
|
package/lib/radio/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,o){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}},n={exports:{}};!function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,o){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}},n={exports:{}};!function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}(n);var s={exports:{}};!function(e){e.exports=function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var r,a,n=[],s=!0,l=!1;try{for(o=o.call(e);!(s=(r=o.next()).done)&&(n.push(r.value),!t||n.length!==t);s=!0);}catch(e){l=!0,a=e}finally{try{s||null==o.return||o.return()}finally{if(l)throw a}}return n}},e.exports.__esModule=!0,e.exports.default=e.exports}(s);var l={exports:{}},i={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r},e.exports.__esModule=!0,e.exports.default=e.exports}(i),function(e){var t=i.exports;e.exports=function(e,o){if(e){if("string"==typeof e)return t(e,o);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)?t(e,o):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(l);var u={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}(u),function(e){var t=n.exports,o=s.exports,r=l.exports,a=u.exports;e.exports=function(e,n){return t(e)||o(e,n)||r(e,n)||a()},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var d=r(a.exports),p=Symbol("RadioGroup");function c(){var e=t.ref(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}function h(){var e=t.getCurrentInstance(),r=e.props,a=e.emit,n=t.inject(p,o.EMPTY_OBJ),s=!o.isEmptyObj(n),l=t.reactive({isLocalChecked:r.checked}),i=t.computed((function(){return s?n.state.localValue===r.label:""!==r.modelValue?r.modelValue===r.label:l.isLocalChecked}));l.isLocalChecked=i.value;var u=t.computed((function(){return!(!s||!n.props.disabled)||r.disabled}));return{name:t.computed((function(){return s&&n.props.name?n.props.name:r.name})),isCheck:i,isDisabled:u,handlerChange:function(){u.value||(a("change",r.label),a("update:modelValue",r.label),s&&n.handleChange(r.label))}}}var f={name:o.PropTypes.string.def(""),label:o.PropTypes.oneOfType([String,Number,Boolean]).isRequired,modelValue:o.PropTypes.oneOfType([String,Number,Boolean]).def(""),checked:o.PropTypes.bool.def(!1),disabled:o.PropTypes.bool.def(!1)},b=t.defineComponent({name:"Radio",props:f,emits:["change","update:modelValue"],setup:function(){var e=c(),t=d(e,2),o=t[0],r=t[1],a=r.blur,n=r.focus,s=h();return{isFocus:o,realName:s.name,isCheck:s.isCheck,isDisabled:s.isDisabled,handleBlur:a,handleFocus:n,handlerChange:s.handlerChange}},render:function(){var e=o.classes({"bk-radio":!0,"is-focus":this.isFocus,"is-disabled":this.isDisabled,"is-checked":this.isCheck});return t.createVNode("label",{class:e,tabindex:"0"},[t.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",name:this.realName,value:this.label,checked:this.isCheck,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handlerChange},null),t.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}}),m={name:o.PropTypes.string.def(""),modelValue:o.PropTypes.oneOfType([String,Number,Boolean]),disabled:o.PropTypes.bool},y=t.defineComponent({name:"RadioGroup",props:m,emits:["change","update:modelValue"],setup:function(e,o){var r=t.reactive({localValue:e.modelValue});t.watch((function(){return e.modelValue}),(function(){r.localValue=e.modelValue}));return t.provide(p,{props:e,state:r,handleChange:function(e){o.emit("update:modelValue",e),o.emit("change",e)}}),{}},render:function(){return t.createVNode("div",{class:"bk-radio-group"},[this.$slots.default()])}}),x={name:o.PropTypes.string.def(""),label:o.PropTypes.oneOfType([String,Number,Boolean]).isRequired,modelValue:o.PropTypes.oneOfType([String,Number,Boolean]).def(""),checked:o.PropTypes.bool.def(!1),disabled:o.PropTypes.bool.def(!1),size:o.PropTypes.size},v=t.defineComponent({name:"RadioButton",props:x,emits:["change","update:modelValue"],setup:function(){var e=c(),t=d(e,2),o=t[0],r=t[1],a=r.blur,n=r.focus,s=h();return{isFocus:o,realName:s.name,isCheck:s.isCheck,isDisabled:s.isDisabled,handleBlur:a,handleFocus:n,handlerChange:s.handlerChange}},render:function(){var e=o.classes({"bk-radio-button":!0,"is-focus":this.isFocus,"is-disabled":this.isDisabled,"is-checked":this.isCheck});return t.createVNode("label",{class:e,tabindex:"0"},[t.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",name:this.realName,value:this.label,checked:this.isCheck,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handlerChange},null),t.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}}),g=o.withInstallProps(b,{Group:y,Button:v});e.BkRadio=g,e.BkRadioButton=v,e.BkRadioGroup=y,e.default=g,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/rate/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,r){"use strict";var o=t.defineComponent({name:"
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,r){"use strict";var o=t.defineComponent({name:"Star",props:{rate:r.PropTypes.number.def(0),width:r.PropTypes.number.def(15),height:r.PropTypes.number.def(16),editable:r.PropTypes.bool.def(!0),hoverRate:r.PropTypes.number.def(0),max:r.PropTypes.number.def(5)},emits:["chooseRate","changeHover"],setup:function(e,o){var a=o.emit,n=function(t){return r.classes({"bk-is-select":t<Math.floor(i.value),"bk-is-edit":e.editable,"bk-rate-star":!0})},i=t.computed((function(){return e.hoverRate||e.rate})),s={width:"".concat(e.width,"px"),height:"".concat(e.height,"px"),minWidth:"".concat(e.width,"px")};return function(){return t.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((function(r,o){return t.createVNode("svg",{class:n(o),style:s,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:function(){return function(t){e.editable&&a("chooseRate",t+1)}(o)},onMouseenter:function(){return function(t){e.editable&&a("changeHover",t+1)}(o)}},[t.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[t.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[t.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[t.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[t.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])])}))])}}}),a=t.defineComponent({name:"Rate",components:{star:o},props:{modelValue:r.PropTypes.number.def(0),size:r.PropTypes.size(),editable:r.PropTypes.bool.def(!0)},emits:["change","update:modelValue"],setup:function(e,a){var n=a.emit,i=t.ref(0),s=function(t){e.editable&&(n("update:modelValue",t),n("change",t))},l=function(e){i.value=e},u=r.classes({"bk-rate":!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},c=t.computed((function(){var t=Math.floor(e.modelValue),r=(d.width+3)*t,o=d.width*(e.modelValue-t);return{width:"".concat(r+o,"px")}})),p={width:d.width,height:d.height};return function(){return t.createVNode("p",{class:u},[e.editable?t.createVNode(o,t.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:l,onMouseleave:function(){return l(0)}},p),null):t.createVNode(t.Fragment,null,[t.createVNode(o,t.mergeProps({rate:5,style:c.value,class:"bk-score-real",editable:!1},p),null),t.createVNode(o,t.mergeProps({rate:0,editable:!1},p),null)])])}}}),n=r.withInstall(a);e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/select/common.d.ts
CHANGED
@@ -5,7 +5,9 @@ export interface ISelectContext {
|
|
5
5
|
props: {
|
6
6
|
multiple?: boolean;
|
7
7
|
};
|
8
|
-
selectedOptions: any
|
8
|
+
selectedOptions: Set<any>;
|
9
|
+
searchKey: string;
|
10
|
+
isRemoteSearch: boolean;
|
9
11
|
register(option: OptionInstanceType): any;
|
10
12
|
unregister(option: OptionInstanceType): any;
|
11
13
|
handleOptionSelected(option: OptionInstanceType): void;
|
@@ -13,8 +15,15 @@ export interface ISelectContext {
|
|
13
15
|
export declare const selectKey: InjectionKey<ISelectContext>;
|
14
16
|
export interface IOptionGroupContext {
|
15
17
|
disabled: boolean;
|
18
|
+
groupCollapse: boolean;
|
16
19
|
}
|
17
20
|
export declare const optionGroupKey: InjectionKey<IOptionGroupContext>;
|
21
|
+
export interface ISelectState {
|
22
|
+
currentPlaceholder: string;
|
23
|
+
options: Set<OptionInstanceType>;
|
24
|
+
selectedOptions: Set<OptionInstanceType>;
|
25
|
+
currentSelectedLabel: string;
|
26
|
+
}
|
18
27
|
export declare function useFocus(): {
|
19
28
|
isFocus: import("vue").Ref<boolean>;
|
20
29
|
handleFocus: () => void;
|