bkui-vue 0.0.2-beta.2 → 0.0.2-beta.4
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/dist/index.cjs.js +63 -63
- package/dist/index.esm.js +13936 -13787
- package/dist/index.umd.js +62 -62
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/index.js +1 -1
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.d.ts +1 -0
- package/lib/badge/index.d.ts +3 -0
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +4 -4
- package/lib/button/button-group.d.ts +2 -2
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +1 -0
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/cascader.less +4 -4
- package/lib/cascader/index.d.ts +4 -0
- package/lib/cascader/index.js +1 -1
- package/lib/checkbox/checkbox-group.d.ts +3 -1
- package/lib/checkbox/checkbox.d.ts +8 -8
- package/lib/checkbox/index.d.ts +15 -13
- package/lib/checkbox/index.js +1 -1
- package/lib/collapse-transition/collapse-transition.d.ts +1 -0
- package/lib/collapse-transition/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +3 -3
- package/lib/color-picker/index.js +1 -1
- package/lib/date-picker/base/confirm.d.ts +1 -0
- package/lib/date-picker/base/date-table.d.ts +1 -0
- package/lib/date-picker/base/month-table.d.ts +1 -0
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -0
- package/lib/date-picker/base/time-spinner.d.ts +2 -1
- package/lib/date-picker/base/year-table.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +3 -2
- package/lib/date-picker/index.d.ts +9 -6
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/panel/date-range.d.ts +1 -0
- package/lib/date-picker/panel/date.d.ts +1 -0
- package/lib/date-picker/panel/time-range.d.ts +3 -2
- package/lib/date-picker/panel/time.d.ts +3 -2
- package/lib/date-picker/time-picker.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -3
- package/lib/dialog/index.d.ts +10 -7
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/props.d.ts +1 -1
- package/lib/divider/divider.less +3 -4
- package/lib/divider/index.js +1 -1
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/image/image-viewer.less +5 -3
- package/lib/image/image-viewer.variable.css +122 -0
- package/lib/image/image.css +142 -0
- package/lib/image/image.d.ts +0 -1
- package/lib/image/image.less +4 -1
- package/lib/image/image.variable.css +264 -0
- package/lib/image/index.js +1 -1
- package/lib/info-box/index.js +1 -1
- package/lib/input/index.d.ts +7 -7
- package/lib/input/index.js +1 -1
- package/lib/input/input.d.ts +4 -4
- package/lib/link/index.d.ts +3 -0
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +1 -0
- package/lib/loading/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/message/message.less +3 -3
- package/lib/message/messageConstructor.d.ts +2 -1
- package/lib/modal/index.d.ts +8 -8
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +3 -3
- package/lib/modal/props.mixin.d.ts +1 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/pagination/index.d.ts +7 -7
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.d.ts +4 -4
- package/lib/plugin-popover/index.js +1 -1
- package/lib/pop-confirm/index.js +1 -1
- package/lib/pop-confirm/pop-confirm.less +9 -8
- package/lib/popover/content.d.ts +1 -0
- package/lib/popover/index.js +1 -1
- package/lib/progress/index.d.ts +7 -7
- package/lib/progress/progress.d.ts +4 -4
- package/lib/radio/index.d.ts +3 -3
- package/lib/radio/radio-button.d.ts +3 -3
- package/lib/radio/radio-group.d.ts +1 -1
- package/lib/radio/radio.less +1 -1
- package/lib/rate/index.d.ts +4 -4
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +2 -2
- package/lib/rate/rate.less +5 -3
- package/lib/rate/rate.variable.css +122 -0
- package/lib/rate/star.less +6 -4
- package/lib/rate/star.variable.css +122 -0
- package/lib/resize-layout/index.js +1 -1
- package/lib/search-select/index.js +1 -1
- package/lib/select/index.d.ts +20 -9
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +1 -0
- package/lib/select/optionGroup.d.ts +1 -0
- package/lib/select/select.d.ts +8 -5
- package/lib/select/selectTagInput.d.ts +1 -0
- package/lib/shared/vue-types.d.ts +2 -2
- package/lib/sideslider/index.d.ts +7 -7
- package/lib/sideslider/sideslider.d.ts +3 -3
- package/lib/slider/index.js +1 -1
- package/lib/slider/slider.less +6 -6
- package/lib/steps/index.d.ts +7 -7
- package/lib/steps/steps.d.ts +4 -4
- package/lib/styles/index.d.ts +2 -0
- package/lib/styles/reset.less +4 -2
- package/lib/styles/reset.variable.css +122 -0
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/tab/index.d.ts +3 -0
- package/lib/tab/index.js +1 -1
- package/lib/tab/tab-nav.d.ts +1 -0
- package/lib/tab/tab.d.ts +1 -0
- package/lib/table/index.d.ts +9 -9
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.less +5 -7
- package/lib/table/plugins/settings.less +3 -3
- package/lib/table/table.d.ts +3 -3
- package/lib/table-column/index.d.ts +1 -1
- package/lib/tag-input/index.d.ts +12 -12
- package/lib/tag-input/tag-input.d.ts +6 -6
- package/lib/tag-input/tag-props.d.ts +2 -2
- package/lib/time-picker/index.d.ts +9 -6
- package/lib/time-picker/time-picker.less +39 -39
- package/lib/tree/index.d.ts +3 -3
- package/lib/tree/index.js +1 -1
- package/lib/tree/tree.d.ts +1 -1
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/virtual-render.less +5 -6
- package/package.json +1 -1
package/lib/select/select.d.ts
CHANGED
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
12
12
|
} & {
|
13
13
|
default: boolean;
|
14
14
|
};
|
15
|
-
size: import("vue-types").VueTypeDef<"
|
16
|
-
default: "
|
15
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large"> & {
|
16
|
+
default: "default" | "small" | "large";
|
17
17
|
};
|
18
18
|
clearable: import("vue-types").VueTypeValidableDef<boolean> & {
|
19
19
|
default: boolean;
|
@@ -417,6 +417,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
417
417
|
focus: () => void;
|
418
418
|
handleInput: (e: any) => void;
|
419
419
|
handleKeydown: (e: any) => void;
|
420
|
+
resolveClassName: (cls: string) => string;
|
420
421
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("keydown" | "update:modelValue" | "enter" | "remove")[], string, {
|
421
422
|
disabled: boolean;
|
422
423
|
placeholder: string;
|
@@ -493,6 +494,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
493
494
|
focus: () => void;
|
494
495
|
handleInput: (e: any) => void;
|
495
496
|
handleKeydown: (e: any) => void;
|
497
|
+
resolveClassName: (cls: string) => string;
|
496
498
|
}> & {} & import("vue").ComponentCustomProperties & {}>;
|
497
499
|
virtualRenderRef: import("vue").Ref<any>;
|
498
500
|
popoverRef: import("vue").Ref<any>;
|
@@ -651,6 +653,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
651
653
|
localPlaceholder: import("vue").ComputedRef<string>;
|
652
654
|
localSearchPlaceholder: import("vue").ComputedRef<string>;
|
653
655
|
localSelectAllText: import("vue").ComputedRef<string>;
|
656
|
+
resolveClassName: (cls: string) => string;
|
654
657
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("blur" | "change" | "focus" | "toggle" | "clear" | "update:modelValue" | "scroll-end")[], "blur" | "change" | "focus" | "toggle" | "clear" | "update:modelValue" | "scroll-end", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
655
658
|
modelValue: import("vue-types").VueTypeValidableDef<any>;
|
656
659
|
multiple: import("vue-types").VueTypeValidableDef<boolean> & {
|
@@ -663,8 +666,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
663
666
|
} & {
|
664
667
|
default: boolean;
|
665
668
|
};
|
666
|
-
size: import("vue-types").VueTypeDef<"
|
667
|
-
default: "
|
669
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large"> & {
|
670
|
+
default: "default" | "small" | "large";
|
668
671
|
};
|
669
672
|
clearable: import("vue-types").VueTypeValidableDef<boolean> & {
|
670
673
|
default: boolean;
|
@@ -941,7 +944,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
941
944
|
}, {
|
942
945
|
prefix: string;
|
943
946
|
disabled: boolean;
|
944
|
-
size: "
|
947
|
+
size: "default" | "small" | "large";
|
945
948
|
multiple: boolean;
|
946
949
|
showOnInit: boolean;
|
947
950
|
placeholder: string;
|
@@ -43,6 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
43
43
|
focus: () => void;
|
44
44
|
handleInput: (e: any) => void;
|
45
45
|
handleKeydown: (e: any) => void;
|
46
|
+
resolveClassName: (cls: string) => string;
|
46
47
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("keydown" | "update:modelValue" | "enter" | "remove")[], "keydown" | "update:modelValue" | "enter" | "remove", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
47
48
|
selected: {
|
48
49
|
type: PropType<ISelected[]>;
|
@@ -174,7 +174,7 @@ export declare enum DialogTypeEnum {
|
|
174
174
|
CONFIRM = "confirm",
|
175
175
|
PROCESS = "process"
|
176
176
|
}
|
177
|
-
export declare function dialogTypeUnion(): VueTypeDef<"
|
177
|
+
export declare function dialogTypeUnion(): VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
178
178
|
export declare enum DirectionEnum {
|
179
179
|
HORIZONTAL = "horizontal",
|
180
180
|
VERTICAL = "vertical"
|
@@ -229,7 +229,7 @@ export declare function InputBehaviorType(): VueTypeDef<"normal" | "simplicity">
|
|
229
229
|
default: "normal" | "simplicity";
|
230
230
|
};
|
231
231
|
export declare class PropTypes extends propTypesNS {
|
232
|
-
static size(): VueTypeDef<"
|
232
|
+
static size(): VueTypeDef<"default" | "small" | "large">;
|
233
233
|
static theme(): VueTypeDef<"success" | "warning" | "danger" | "primary">;
|
234
234
|
static placement(): VueTypeDef<"top" | "right" | "bottom" | "left">;
|
235
235
|
static style(): VueTypeDef<CSSProperties>;
|
@@ -4,7 +4,6 @@ declare const BkSideslider: {
|
|
4
4
|
$data: {};
|
5
5
|
$props: {
|
6
6
|
title?: string;
|
7
|
-
transfer?: string | boolean | HTMLElement;
|
8
7
|
width?: string | number;
|
9
8
|
height?: string | number;
|
10
9
|
maxHeight?: string;
|
@@ -12,6 +11,7 @@ declare const BkSideslider: {
|
|
12
11
|
isShow?: boolean;
|
13
12
|
zIndex?: string | number;
|
14
13
|
draggable?: boolean;
|
14
|
+
transfer?: string | boolean | HTMLElement;
|
15
15
|
showMask?: boolean;
|
16
16
|
multiInstance?: boolean;
|
17
17
|
direction?: string;
|
@@ -67,7 +67,7 @@ declare const BkSideslider: {
|
|
67
67
|
[key: string]: any;
|
68
68
|
}>) => void)[];
|
69
69
|
readonly size?: "small" | "medium" | "large" | "normal";
|
70
|
-
readonly dialogType?: "
|
70
|
+
readonly dialogType?: "show" | "process" | "operation" | "confirm";
|
71
71
|
onShown?: (...args: any[]) => any;
|
72
72
|
onHidden?: (...args: any[]) => any;
|
73
73
|
readonly beforeClose?: unknown;
|
@@ -170,7 +170,7 @@ declare const BkSideslider: {
|
|
170
170
|
default: "show" | "if";
|
171
171
|
};
|
172
172
|
beforeClose: import("vue-types").VueTypeDef<unknown>;
|
173
|
-
dialogType: import("vue-types").VueTypeDef<"
|
173
|
+
dialogType: import("vue-types").VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
174
174
|
multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
|
175
175
|
default: boolean;
|
176
176
|
} & {
|
@@ -185,7 +185,6 @@ declare const BkSideslider: {
|
|
185
185
|
"onAnimation-end"?: (...args: any[]) => any;
|
186
186
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("shown" | "hidden" | "closed" | "update:isShow" | "animation-end")[], string, {
|
187
187
|
title: string;
|
188
|
-
transfer: string | boolean | HTMLElement;
|
189
188
|
width: string | number;
|
190
189
|
height: string | number;
|
191
190
|
maxHeight: string;
|
@@ -193,6 +192,7 @@ declare const BkSideslider: {
|
|
193
192
|
isShow: boolean;
|
194
193
|
zIndex: string | number;
|
195
194
|
draggable: boolean;
|
195
|
+
transfer: string | boolean | HTMLElement;
|
196
196
|
showMask: boolean;
|
197
197
|
multiInstance: boolean;
|
198
198
|
direction: string;
|
@@ -304,7 +304,7 @@ declare const BkSideslider: {
|
|
304
304
|
default: "show" | "if";
|
305
305
|
};
|
306
306
|
beforeClose: import("vue-types").VueTypeDef<unknown>;
|
307
|
-
dialogType: import("vue-types").VueTypeDef<"
|
307
|
+
dialogType: import("vue-types").VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
308
308
|
multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
|
309
309
|
default: boolean;
|
310
310
|
} & {
|
@@ -402,7 +402,7 @@ declare const BkSideslider: {
|
|
402
402
|
default: "show" | "if";
|
403
403
|
};
|
404
404
|
beforeClose: import("vue-types").VueTypeDef<unknown>;
|
405
|
-
dialogType: import("vue-types").VueTypeDef<"
|
405
|
+
dialogType: import("vue-types").VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
406
406
|
multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
|
407
407
|
default: boolean;
|
408
408
|
} & {
|
@@ -417,7 +417,6 @@ declare const BkSideslider: {
|
|
417
417
|
"onAnimation-end"?: (...args: any[]) => any;
|
418
418
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("shown" | "hidden" | "closed" | "update:isShow" | "animation-end")[], "shown" | "hidden" | "closed" | "update:isShow" | "animation-end", {
|
419
419
|
title: string;
|
420
|
-
transfer: string | boolean | HTMLElement;
|
421
420
|
width: string | number;
|
422
421
|
height: string | number;
|
423
422
|
maxHeight: string;
|
@@ -425,6 +424,7 @@ declare const BkSideslider: {
|
|
425
424
|
isShow: boolean;
|
426
425
|
zIndex: string | number;
|
427
426
|
draggable: boolean;
|
427
|
+
transfer: string | boolean | HTMLElement;
|
428
428
|
showMask: boolean;
|
429
429
|
multiInstance: boolean;
|
430
430
|
direction: string;
|
@@ -79,7 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
default: "show" | "if";
|
80
80
|
};
|
81
81
|
beforeClose: import("vue-types").VueTypeDef<unknown>;
|
82
|
-
dialogType: import("vue-types").VueTypeDef<"
|
82
|
+
dialogType: import("vue-types").VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
83
83
|
multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
|
84
84
|
default: boolean;
|
85
85
|
} & {
|
@@ -167,7 +167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
167
167
|
default: "show" | "if";
|
168
168
|
};
|
169
169
|
beforeClose: import("vue-types").VueTypeDef<unknown>;
|
170
|
-
dialogType: import("vue-types").VueTypeDef<"
|
170
|
+
dialogType: import("vue-types").VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
171
171
|
multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
|
172
172
|
default: boolean;
|
173
173
|
} & {
|
@@ -182,7 +182,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
182
182
|
"onAnimation-end"?: (...args: any[]) => any;
|
183
183
|
}, {
|
184
184
|
title: string;
|
185
|
-
transfer: string | boolean | HTMLElement;
|
186
185
|
width: string | number;
|
187
186
|
height: string | number;
|
188
187
|
maxHeight: string;
|
@@ -190,6 +189,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
190
189
|
isShow: boolean;
|
191
190
|
zIndex: string | number;
|
192
191
|
draggable: boolean;
|
192
|
+
transfer: string | boolean | HTMLElement;
|
193
193
|
showMask: boolean;
|
194
194
|
multiInstance: boolean;
|
195
195
|
direction: string;
|
package/lib/slider/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r)=>(()=>{var n={8133:e=>{"use strict";e.exports=a},5537:e=>{"use strict";e.exports=r},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:N(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function N(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=S(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function S(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(L.prototype),v(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new L(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),k(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;k(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:O(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,u),a.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var a in t)u.o(t,a)&&!u.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";u.r(l),u.d(l,{default:()=>f});var e=u(4212),t=u(748),a=u(2841),r=u.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=u(8133),o=u.n(n),i=u(5537),c=u.n(i);const s=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var n=r.emit,o=(0,t.ref)(!1),u=(0,t.ref)(!1),l=(0,t.ref)(0),i=(0,t.ref)(0),s=(0,t.ref)(0),d=(0,t.ref)(null),f=(0,t.ref)(a.modelValue),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(!1),V=(0,t.ref)(null),b=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),x=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),g=(0,t.computed)((function(){return a.params.vertical?{bottom:x.value}:{left:x.value}})),w=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),N(e),v(window,"mousemove",S),v(window,"touchmove",S),v(window,"mouseup",E),v(window,"touchend",E))},N=function(e){o.value=!0,u.value=!0,a.params.vertical?l.value=e.clientY:i.value=e.clientX,s.value=parseFloat(x.value),d.value=s.value},S=function(e){if(o.value){u.value=!1,n("resetSize");var t=0;a.params.vertical?(p.value=e.clientY,t=(l.value-p.value)/a.params.sliderSize*100):(h.value=e.clientX,t=(h.value-i.value)/a.params.sliderSize*100),d.value=s.value+t,k(d.value)}},E=function e(){y.value=!1,o.value&&(setTimeout((function(){o.value=!1,u.value||(k(d.value),n("emitChange"))}),0),m(window,"mousemove",S),m(window,"touchmove",S),m(window,"mouseup",e),m(window,"touchend",e))},k=function(e){if(null!==e&&!isNaN(e)){e<0?d.value=0:e>100&&(d.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),n("update:modelValue",r),o.value||a.modelValue===f.value||(f.value=a.modelValue)}};return{renderDom:function(){return(0,t.createVNode)("div",{class:["bk-slider-button",a.params.vertical?"vertical":"horizontal",{grabbing:o.value}],ref:V,tabindex:"0",style:g.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(b.value.content)?(0,t.createVNode)(c(),{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[w.value]):void 0])},setPosition:k,tip:b}},render:function(){return this.renderDom()}});var v=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},m=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const d=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var n=this,u=a.slots,l=a.emit,i=(0,t.ref)(1),c=(0,t.ref)(null),m=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(0),p=(0,t.ref)(0),h=(0,t.ref)(null),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),g=(0,t.computed)((function(){return Math.min(c.value,m.value)})),w=(0,t.computed)((function(){return Math.max(c.value,m.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-g.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(c.value-e.minValue)/(e.maxValue-e.minValue),"%")})),N=(0,t.computed)((function(){return e.range?"".concat(100*(g.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),S=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:N.value}:{width:L.value,left:N.value}})),E=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(w.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(c.value-e.minValue)/(e.maxValue-e.minValue)}))})),k=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),j=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),O=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),T=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),_=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:x.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){I()})),(0,t.watch)((function(){return c.value}),(function(t){e.range?l("update:modelValue",[g.value,w.value]):l("update:modelValue",t),f.value=t})),(0,t.watch)((function(){return m.value}),(function(e){l("update:modelValue",[g.value,w.value]),p.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(c.value=Math.max(e.minValue,Number(e.modelValue[0])),m.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(c.value=e.minValue,m.value=e.maxValue),d.value=[c.value,m.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?c.value=e.minValue:c.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),d.value=c.value),C(),v(window,"resize",C())}));var C=function(){h.value&&(i.value=h.value["client".concat(e.vertical?"Height":"Width")])},B=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(C(),e.vertical){var n=null===(a=h.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;F((n-t.clientY)/i.value*100)}else{var o=null===(r=h.value)||void 0===r?void 0:r.getBoundingClientRect().left;F((t.clientX-o)/i.value*100)}M()}},P=function(){return e.range?![g.value,w.value].every((function(e,t){return e===d.value[t]})):e.modelValue!==d.value},I=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?l("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?l("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?l("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?l("update:modelValue",[t[0],e.maxValue]):(c.value=Number(t[0]),m.value=Number(t[1]),P()&&(d.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?l("update:modelValue",e.minValue):t>e.maxValue?l("update:modelValue",e.maxValue):(c.value=t,P()&&(d.value=t)))}},M=function(){return a=n,o=void 0,u=void 0,i=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:l("change",e.range?[g.value,w.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{l(i.next(e))}catch(e){t(e)}}function n(e){try{l(i.throw(e))}catch(e){t(e)}}function l(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,n)}l((i=i.apply(a,o||[])).next())}));var a,o,u,i},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},F=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(g.value-a)<Math.abs(w.value-a)?b.value=c.value<m.value?y.value:V.value:b.value=c.value>m.value?y.value:V.value,b.value.setPosition(t)}else y.value.setPosition(t)},G=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(f.value=e.minValue,c.value=e.minValue):a>e.maxValue?(f.value=e.maxValue,c.value=e.maxValue):c.value=a}},A=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(p.value=e.minValue,m.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,m.value=e.maxValue):m.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[c.value,m.value].includes(a)?"0":"1"};return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["bk-slider",e.extCls]},[null===(a=u.start)||void 0===a?void 0:a.call(u),(0,t.createVNode)("div",{class:"bk-slider-runway",ref:h,style:k.value,onClick:B},[(0,t.createVNode)("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:S.value},null),e.showInterval?E.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?T.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["bk-slider-interval",{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?j.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?T.value.map((function(a,r){return(0,t.createVNode)("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(s,{modelValue:c.value,"onUpdate:modelValue":function(e){return c.value=e},ref:y,params:_.value,onEmitChange:M,onResetSize:C},null),e.range?(0,t.createVNode)(s,{modelValue:m.value,"onUpdate:modelValue":function(e){return m.value=e},ref:V,params:_.value,onEmitChange:M,onResetSize:C},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"bk-slider-input"},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:G},null)]),O.value&&m.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(o(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=u.end)||void 0===r?void 0:r.call(u)])}}},render:function(){return this.renderDom()}}),f=(0,e.withInstall)(d)})(),l})()));
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../config-provider"],e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r,n)=>(()=>{var o={2717:e=>{"use strict";e.exports=a},8133:e=>{"use strict";e.exports=r},5537:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:N(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function N(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=S(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function S(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(L.prototype),v(L.prototype,c,(function(){return this})),t.AsyncIterator=L,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new L(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;C(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:O(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(a){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var a=u[e]={exports:{}};return o[e](a,a.exports,l),a.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";l.r(i),l.d(i,{default:()=>p});var e=l(4212),t=l(748),a=l(2841),r=l.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=l(2717),o=l(8133),u=l.n(o),c=l(5537),s=l.n(c);const v=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var o=r.emit,u=(0,t.ref)(!1),l=(0,t.ref)(!1),i=(0,t.ref)(0),c=(0,t.ref)(0),v=(0,t.ref)(0),f=(0,t.ref)(null),p=(0,t.ref)(a.modelValue),h=(0,t.ref)(0),y=(0,t.ref)(0),V=(0,t.ref)(!1),b=(0,t.ref)(null),x=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),g=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),w=(0,t.computed)((function(){return a.params.vertical?{bottom:g.value}:{left:g.value}})),L=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),N=function(e){a.params.disable||(e.preventDefault(),S(e),m(window,"mousemove",E),m(window,"touchmove",E),m(window,"mouseup",C),m(window,"touchend",C))},S=function(e){u.value=!0,l.value=!0,a.params.vertical?i.value=e.clientY:c.value=e.clientX,v.value=parseFloat(g.value),f.value=v.value},E=function(e){if(u.value){l.value=!1,o("resetSize");var t=0;a.params.vertical?(h.value=e.clientY,t=(i.value-h.value)/a.params.sliderSize*100):(y.value=e.clientX,t=(y.value-c.value)/a.params.sliderSize*100),f.value=v.value+t,j(f.value)}},C=function e(){V.value=!1,u.value&&(setTimeout((function(){u.value=!1,l.value||(j(f.value),o("emitChange"))}),0),d(window,"mousemove",E),d(window,"touchmove",E),d(window,"mouseup",e),d(window,"touchend",e))},j=function(e){if(null!==e&&!isNaN(e)){e<0?f.value=0:e>100&&(f.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),o("update:modelValue",r),u.value||a.modelValue===p.value||(p.value=a.modelValue)}},O=(0,n.usePrefix)().resolveClassName;return{renderDom:function(){return(0,t.createVNode)("div",{class:["".concat(O("slider-button")),a.params.vertical?"vertical":"horizontal",{grabbing:u.value}],ref:b,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:N},[Boolean(x.value.content)?(0,t.createVNode)(s(),{content:x.value.content,theme:"dark",placement:x.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}}):(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[L.value]):void 0])},setPosition:j,tip:x}},render:function(){return this.renderDom()}});var m=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},d=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const f=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var o=this,l=a.slots,i=a.emit,c=(0,t.ref)(1),s=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),g=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),w=(0,t.computed)((function(){return Math.min(s.value,d.value)})),L=(0,t.computed)((function(){return Math.max(s.value,d.value)})),N=(0,t.computed)((function(){return e.range?"".concat(100*(L.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(s.value-e.minValue)/(e.maxValue-e.minValue),"%")})),S=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),E=(0,t.computed)((function(){return e.vertical?{height:N.value,bottom:S.value}:{width:N.value,left:S.value}})),C=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(L.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(s.value-e.minValue)/(e.maxValue-e.minValue)}))})),j=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),O=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),T=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),_=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),P=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:g.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:c.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){k()})),(0,t.watch)((function(){return s.value}),(function(t){e.range?i("update:modelValue",[w.value,L.value]):i("update:modelValue",t),p.value=t})),(0,t.watch)((function(){return d.value}),(function(e){i("update:modelValue",[w.value,L.value]),h.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),d.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,d.value=e.maxValue),f.value=[s.value,d.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),f.value=s.value),B(),m(window,"resize",B())}));var B=function(){y.value&&(c.value=y.value["client".concat(e.vertical?"Height":"Width")])},I=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(B(),e.vertical){var n=null===(a=y.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;G((n-t.clientY)/c.value*100)}else{var o=null===(r=y.value)||void 0===r?void 0:r.getBoundingClientRect().left;G((t.clientX-o)/c.value*100)}z()}},M=function(){return e.range?![w.value,L.value].every((function(e,t){return e===f.value[t]})):e.modelValue!==f.value},k=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?i("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?i("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?i("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?i("update:modelValue",[t[0],e.maxValue]):(s.value=Number(t[0]),d.value=Number(t[1]),M()&&(f.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?i("update:modelValue",e.minValue):t>e.maxValue?i("update:modelValue",e.maxValue):(s.value=t,M()&&(f.value=t)))}},z=function(){return a=o,n=void 0,u=void 0,l=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:i("change",e.range?[w.value,L.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,o)}i((l=l.apply(a,n||[])).next())}));var a,n,u,l},F=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},G=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(L.value-a)?x.value=s.value<d.value?V.value:b.value:x.value=s.value>d.value?V.value:b.value,x.value.setPosition(t)}else V.value.setPosition(t)},q=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(p.value=e.minValue,s.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,s.value=e.maxValue):s.value=a}},A=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(h.value=e.minValue,d.value=e.minValue):a>e.maxValue?(h.value=e.maxValue,d.value=e.maxValue):d.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,d.value].includes(a)?"0":"1"},D=(0,n.usePrefix)().resolveClassName;return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["".concat(D("slider")),e.extCls]},[null===(a=l.start)||void 0===a?void 0:a.call(l),(0,t.createVNode)("div",{class:"".concat(D("slider-runway")),ref:y,style:j.value,onClick:I},[(0,t.createVNode)("div",{class:["".concat(D("slider-bar")),e.vertical?"vertical":"horizontal",{disable:e.disable}],style:E.value},null),e.showInterval?C.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["".concat(D("slider-interval")),{vertical:e.vertical}],style:F(a)},null)})):void 0,e.customContent?_.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["".concat(D("slider-interval")),{vertical:e.vertical}],style:F(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["".concat(D("slider-labels")),e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?O.value.map((function(a,r){return(0,t.createVNode)("div",{class:["".concat(D("slider-label")),e.vertical?"vertical":"horizontal"],key:r,style:F(a.stepWidth)},[a.stepLabel])})):e.customContent?_.value.map((function(a,r){return(0,t.createVNode)("div",{class:["".concat(D("slider-label")),e.vertical?"vertical":"horizontal"],key:r,style:F(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(v,{modelValue:s.value,"onUpdate:modelValue":function(e){return s.value=e},ref:V,params:P.value,onEmitChange:z,onResetSize:B},null),e.range?(0,t.createVNode)(v,{modelValue:d.value,"onUpdate:modelValue":function(e){return d.value=e},ref:b,params:P.value,onEmitChange:z,onResetSize:B},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"".concat(D("slider-input"))},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(u(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:q},null)]),T.value&&d.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(u(),{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=l.end)||void 0===r?void 0:r.call(l)])}}},render:function(){return this.renderDom()}}),p=(0,e.withInstall)(f)})(),i})()));
|
package/lib/slider/slider.less
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
flex-direction: row;
|
6
6
|
align-items: center;
|
7
7
|
|
8
|
-
|
8
|
+
.@{bk-prefix}-slider-runway {
|
9
9
|
position: relative;
|
10
10
|
width: 100%;
|
11
11
|
height: 4px;
|
@@ -15,7 +15,7 @@
|
|
15
15
|
border-radius: 2px;
|
16
16
|
opacity: 1;
|
17
17
|
|
18
|
-
|
18
|
+
.@{bk-prefix}-slider-bar {
|
19
19
|
position: absolute;
|
20
20
|
height: 4px;
|
21
21
|
background: @primary-color;
|
@@ -35,7 +35,7 @@
|
|
35
35
|
background: @slider-disable-bar-bg;
|
36
36
|
}
|
37
37
|
|
38
|
-
|
38
|
+
.@{bk-prefix}-slider-labels {
|
39
39
|
position: relative;
|
40
40
|
|
41
41
|
&.vertical {
|
@@ -56,7 +56,7 @@
|
|
56
56
|
justify-content: space-between;
|
57
57
|
}
|
58
58
|
|
59
|
-
|
59
|
+
.@{bk-prefix}-slider-label {
|
60
60
|
position: absolute;
|
61
61
|
display: flex;
|
62
62
|
width: 10px;
|
@@ -79,7 +79,7 @@
|
|
79
79
|
}
|
80
80
|
}
|
81
81
|
|
82
|
-
|
82
|
+
.@{bk-prefix}-slider-interval {
|
83
83
|
position: absolute;
|
84
84
|
width: 4px;
|
85
85
|
height: 4px;
|
@@ -108,7 +108,7 @@
|
|
108
108
|
}
|
109
109
|
}
|
110
110
|
|
111
|
-
|
111
|
+
.@{bk-prefix}-slider-button {
|
112
112
|
position: absolute;
|
113
113
|
z-index: 1001;
|
114
114
|
display: flex;
|
package/lib/steps/index.d.ts
CHANGED
@@ -3,10 +3,10 @@ declare const BkSteps: {
|
|
3
3
|
$: import("vue").ComponentInternalInstance;
|
4
4
|
$data: {};
|
5
5
|
$props: {
|
6
|
-
steps?: unknown[];
|
7
6
|
text?: boolean;
|
8
7
|
extCls?: string;
|
9
8
|
theme?: "success" | "warning" | "danger" | "primary";
|
9
|
+
steps?: unknown[];
|
10
10
|
direction?: "horizontal" | "vertical";
|
11
11
|
lineType?: "dashed" | "solid";
|
12
12
|
beforeChange?: (...args: any[]) => any;
|
@@ -58,7 +58,7 @@ declare const BkSteps: {
|
|
58
58
|
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
59
59
|
[key: string]: any;
|
60
60
|
}>) => void)[];
|
61
|
-
readonly size?: "
|
61
|
+
readonly size?: "default" | "small" | "large";
|
62
62
|
"onUpdate:curStep"?: (...args: any[]) => any;
|
63
63
|
};
|
64
64
|
$attrs: {
|
@@ -78,7 +78,7 @@ declare const BkSteps: {
|
|
78
78
|
theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
|
79
79
|
default: "success" | "warning" | "danger" | "primary";
|
80
80
|
};
|
81
|
-
size: import("vue-types").VueTypeDef<"
|
81
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
|
82
82
|
curStep: import("vue-types").VueTypeValidableDef<number> & {
|
83
83
|
default: number;
|
84
84
|
} & {
|
@@ -120,10 +120,10 @@ declare const BkSteps: {
|
|
120
120
|
jumpTo: (index: any) => Promise<void>;
|
121
121
|
resolveClassName: (cls: string) => string;
|
122
122
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:curStep")[], string, {
|
123
|
-
steps: unknown[];
|
124
123
|
text: boolean;
|
125
124
|
extCls: string;
|
126
125
|
theme: "success" | "warning" | "danger" | "primary";
|
126
|
+
steps: unknown[];
|
127
127
|
direction: "horizontal" | "vertical";
|
128
128
|
lineType: "dashed" | "solid";
|
129
129
|
beforeChange: (...args: any[]) => any;
|
@@ -154,7 +154,7 @@ declare const BkSteps: {
|
|
154
154
|
theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
|
155
155
|
default: "success" | "warning" | "danger" | "primary";
|
156
156
|
};
|
157
|
-
size: import("vue-types").VueTypeDef<"
|
157
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
|
158
158
|
curStep: import("vue-types").VueTypeValidableDef<number> & {
|
159
159
|
default: number;
|
160
160
|
} & {
|
@@ -203,7 +203,7 @@ declare const BkSteps: {
|
|
203
203
|
theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
|
204
204
|
default: "success" | "warning" | "danger" | "primary";
|
205
205
|
};
|
206
|
-
size: import("vue-types").VueTypeDef<"
|
206
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
|
207
207
|
curStep: import("vue-types").VueTypeValidableDef<number> & {
|
208
208
|
default: number;
|
209
209
|
} & {
|
@@ -245,10 +245,10 @@ declare const BkSteps: {
|
|
245
245
|
jumpTo: (index: any) => Promise<void>;
|
246
246
|
resolveClassName: (cls: string) => string;
|
247
247
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:curStep")[], "click" | "update:curStep", {
|
248
|
-
steps: unknown[];
|
249
248
|
text: boolean;
|
250
249
|
extCls: string;
|
251
250
|
theme: "success" | "warning" | "danger" | "primary";
|
251
|
+
steps: unknown[];
|
252
252
|
direction: "horizontal" | "vertical";
|
253
253
|
lineType: "dashed" | "solid";
|
254
254
|
beforeChange: (...args: any[]) => any;
|
package/lib/steps/steps.d.ts
CHANGED
@@ -28,7 +28,7 @@ declare const stepsProps: {
|
|
28
28
|
theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
|
29
29
|
default: "success" | "warning" | "danger" | "primary";
|
30
30
|
};
|
31
|
-
size: import("vue-types").VueTypeDef<"
|
31
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
|
32
32
|
curStep: import("vue-types").VueTypeValidableDef<number> & {
|
33
33
|
default: number;
|
34
34
|
} & {
|
@@ -68,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
68
68
|
theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
|
69
69
|
default: "success" | "warning" | "danger" | "primary";
|
70
70
|
};
|
71
|
-
size: import("vue-types").VueTypeDef<"
|
71
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
|
72
72
|
curStep: import("vue-types").VueTypeValidableDef<number> & {
|
73
73
|
default: number;
|
74
74
|
} & {
|
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
110
110
|
theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary"> & {
|
111
111
|
default: "success" | "warning" | "danger" | "primary";
|
112
112
|
};
|
113
|
-
size: import("vue-types").VueTypeDef<"
|
113
|
+
size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
|
114
114
|
curStep: import("vue-types").VueTypeValidableDef<number> & {
|
115
115
|
default: number;
|
116
116
|
} & {
|
@@ -148,10 +148,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
148
148
|
onClick?: (...args: any[]) => any;
|
149
149
|
"onUpdate:curStep"?: (...args: any[]) => any;
|
150
150
|
}, {
|
151
|
-
steps: unknown[];
|
152
151
|
text: boolean;
|
153
152
|
extCls: string;
|
154
153
|
theme: "success" | "warning" | "danger" | "primary";
|
154
|
+
steps: unknown[];
|
155
155
|
direction: "horizontal" | "vertical";
|
156
156
|
lineType: "dashed" | "solid";
|
157
157
|
beforeChange: (...args: any[]) => any;
|
package/lib/styles/index.d.ts
CHANGED
package/lib/styles/reset.less
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
@import '../styles/themes/themes.less';
|
2
|
+
|
1
3
|
.scroll-bar-style {
|
2
4
|
&::-webkit-scrollbar {
|
3
5
|
width: 4px;
|
@@ -326,12 +328,12 @@ optgroup {
|
|
326
328
|
/**
|
327
329
|
* BK-Scroll-Style
|
328
330
|
*/
|
329
|
-
|
331
|
+
.@{bk-prefix}-scroll-y {
|
330
332
|
overflow-y: auto;
|
331
333
|
.scroll-bar-style();
|
332
334
|
}
|
333
335
|
|
334
|
-
|
336
|
+
.@{bk-prefix}-scroll-x {
|
335
337
|
overflow-x: auto;
|
336
338
|
.scroll-bar-style();
|
337
339
|
}
|
@@ -1,3 +1,125 @@
|
|
1
|
+
:root {
|
2
|
+
--bk-prefix: bk;
|
3
|
+
--popover-max-height: 216px;
|
4
|
+
--primary-color: #3a84ff;
|
5
|
+
--success-color: #2dcb56;
|
6
|
+
--warning-color: #ff9c01;
|
7
|
+
--danger-color: #ea3636;
|
8
|
+
--default-color: #63656e;
|
9
|
+
--gray-color: #979ba5;
|
10
|
+
--light-gray: #c4c6cc;
|
11
|
+
--white-color: white;
|
12
|
+
--whitesmoke-color: #fafbfd;
|
13
|
+
--disable-color: #dcdee5;
|
14
|
+
--font-size-base: 12px;
|
15
|
+
--font-size-medium: 14px;
|
16
|
+
--font-size-large: 16px;
|
17
|
+
--line-height-base: 16px;
|
18
|
+
--line-height-medium: 16px;
|
19
|
+
--line-height-large: 18px;
|
20
|
+
--component-size-small: 26px;
|
21
|
+
--component-size-base: 32px;
|
22
|
+
--component-size-large: 40px;
|
23
|
+
--border-width-base: 1px;
|
24
|
+
--border-style-base: solid;
|
25
|
+
--border-radius-base: 2px;
|
26
|
+
--border-style-color: var(--light-gray);
|
27
|
+
--input-disabled-bg: #fafbfd;
|
28
|
+
--input-disabled-border: var(--disable-color);
|
29
|
+
--input-height-base: var(--component-size-base);
|
30
|
+
--input-color: var(--default-color);
|
31
|
+
--input-bg: white;
|
32
|
+
--input-border-color: var(--light-gray);
|
33
|
+
--input-broder-radius: 3px;
|
34
|
+
--input-shadow-color: #a3c5fd;
|
35
|
+
--input-horizontal-padding: 10px;
|
36
|
+
--input-block-color: #f5f7fa;
|
37
|
+
--input-block-hover-color: #eaebf0;
|
38
|
+
--input-icon-size: var(--font-size-medium);
|
39
|
+
--input-maxlength-color: #979ba5;
|
40
|
+
--button-primary-hover-color: #5594fa;
|
41
|
+
--button-danger-hover-color: #ff5656;
|
42
|
+
--button-success-hover-color: #45e35f;
|
43
|
+
--button-warning-hover-color: #ffb848;
|
44
|
+
--button-default-hover-border-color: #979ba5;
|
45
|
+
--button-primary-active-color: #2c77f4;
|
46
|
+
--button-danger-active-color: #db2626;
|
47
|
+
--button-success-active-color: #1ab943;
|
48
|
+
--button-warning-active-color: #eb9000;
|
49
|
+
--button-selected-bg-color: #e1ecff;
|
50
|
+
--button-disabled-selected-bg-color: #f0f1f5;
|
51
|
+
--radio-font-color: #63656e;
|
52
|
+
--radio-active-color: #5594fa;
|
53
|
+
--radio-hover-border-color: #979ba5;
|
54
|
+
--radio-disabled-border: #dcdee5;
|
55
|
+
--radio-disabled-font-color: #c4c6cc;
|
56
|
+
--radio-disabled-checked-bg: #a3c5fd;
|
57
|
+
--radio-button-checked-bg: #e1ecff;
|
58
|
+
--radio-button-disabled-checked-bg: #fafbfd;
|
59
|
+
--checkbox-disabled-checked-bg: #a3c5fd;
|
60
|
+
--fixed-navbar-background: #fff;
|
61
|
+
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
62
|
+
--switch-default-color: #fff;
|
63
|
+
--switch-grey-color: #c4c6cc;
|
64
|
+
--breadcrumb-black-color: #979ba5;
|
65
|
+
--breadcrumb-primary-hover-color: #0082ff;
|
66
|
+
--breadcrumb-fn-main-color: #63656e;
|
67
|
+
--link-default-hover-color: #979ba5;
|
68
|
+
--link-primary-hover-color: #699df4;
|
69
|
+
--link-success-hover-color: #45e35f;
|
70
|
+
--link-warning-hover-color: #ffb848;
|
71
|
+
--link-danger-hover-color: #ff5656;
|
72
|
+
--link-default-disabled-color: #dcdee5;
|
73
|
+
--link-primary-disabled-color: #a3c5fd;
|
74
|
+
--link-success-disabled-color: #94f5a4;
|
75
|
+
--link-warning-disabled-color: #ffd695;
|
76
|
+
--link-danger-disabled-color: #fd9c9c;
|
77
|
+
--message-color: var(--default-color);
|
78
|
+
--message-primary-bg-color: #f0f8ff;
|
79
|
+
--message-primary-border-color: #e1ecff;
|
80
|
+
--message-primary-shadow-color: #e1e8f4;
|
81
|
+
--message-warning-bg-color: #fff4e2;
|
82
|
+
--message-warning-border-color: #ffe8c3;
|
83
|
+
--message-warning-shadow-color: #ede6db;
|
84
|
+
--message-success-bg-color: #f2fff4;
|
85
|
+
--message-success-border-color: #dcffe2;
|
86
|
+
--message-success-shadow-color: #cef0d7;
|
87
|
+
--message-danger-bg-color: #ffeded;
|
88
|
+
--message-danger-border-color: #ffdddd;
|
89
|
+
--message-danger-shadow-color: #f6dada;
|
90
|
+
--slider-default-bg: #dcdee5;
|
91
|
+
--slider-disable-bar-bg: #979ba5;
|
92
|
+
--menu-bg-color: #182132;
|
93
|
+
--submenu-bg-color: #151d2c;
|
94
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
95
|
+
--menu-color: #96a2b9;
|
96
|
+
--menu-group-color: var(--default-color);
|
97
|
+
--menu-width: 260px;
|
98
|
+
--menu-collapse-width: 60px;
|
99
|
+
--menu-active-color: white;
|
100
|
+
--nav-header-bg-color: #182132;
|
101
|
+
--nav-bg-color: #182132;
|
102
|
+
--date-picker-disabled-bg: #fafbfd;
|
103
|
+
--date-picker-dropdown-mb: 4px;
|
104
|
+
--date-picker-dropdown-bg: #fff;
|
105
|
+
--table-bg-color: var(--white-color);
|
106
|
+
--table-border-color: #dcdee5;
|
107
|
+
--table-head-bg-color: #fafbfd;
|
108
|
+
--table-head-font-color: #313238;
|
109
|
+
--table-body-font-color: #63656E;
|
110
|
+
--table-row-hover-bg-color: #f5f7fa;
|
111
|
+
--table-row-active-bg-color: #f0f1f5;
|
112
|
+
--cascader-panel-border-color: #dcdee5;
|
113
|
+
--cascader-panel-hover: #f5f7fa;
|
114
|
+
--cascader-panel-active: #e1ecff;
|
115
|
+
--cascader-panel-disabled-bg: #fff;
|
116
|
+
--search-select-focus-border-color: var(--primary-color);
|
117
|
+
--search-select-focus-color: #3c96ff;
|
118
|
+
--search-select-font-color: var(--default-color);
|
119
|
+
--search-select-placeholder-color: var(--light-gray);
|
120
|
+
--search-select-message-color: var(--danger-color);
|
121
|
+
--search-select-menu-border-color: var(--disable-color);
|
122
|
+
}
|
1
123
|
.scroll-bar-style::-webkit-scrollbar {
|
2
124
|
width: 4px;
|
3
125
|
height: 4px;
|