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/loading/index.d.ts
CHANGED
@@ -5,20 +5,23 @@ declare const BkLoading: {
|
|
5
5
|
$data: {};
|
6
6
|
$props: Partial<{
|
7
7
|
title: string;
|
8
|
+
loading: boolean;
|
8
9
|
}> & Omit<Readonly<{
|
9
10
|
indicator?: unknown;
|
11
|
+
loading?: unknown;
|
10
12
|
theme?: unknown;
|
11
13
|
title?: unknown;
|
12
14
|
size?: unknown;
|
13
15
|
mode?: unknown;
|
14
16
|
} & {
|
15
17
|
title: string;
|
18
|
+
loading: boolean;
|
16
19
|
} & {
|
17
20
|
theme?: string;
|
18
21
|
size?: string;
|
19
22
|
indicator?: Function;
|
20
23
|
mode?: BkLoadingMode;
|
21
|
-
}> & {} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title">;
|
24
|
+
}> & {} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "loading">;
|
22
25
|
$attrs: {
|
23
26
|
[x: string]: unknown;
|
24
27
|
};
|
@@ -34,19 +37,24 @@ declare const BkLoading: {
|
|
34
37
|
$el: any;
|
35
38
|
$options: import("vue").ComponentOptionsBase<Readonly<{
|
36
39
|
indicator?: unknown;
|
40
|
+
loading?: unknown;
|
37
41
|
theme?: unknown;
|
38
42
|
title?: unknown;
|
39
43
|
size?: unknown;
|
40
44
|
mode?: unknown;
|
41
45
|
} & {
|
42
46
|
title: string;
|
47
|
+
loading: boolean;
|
43
48
|
} & {
|
44
49
|
theme?: string;
|
45
50
|
size?: string;
|
46
51
|
indicator?: Function;
|
47
52
|
mode?: BkLoadingMode;
|
48
|
-
}> & {}, () => JSX.Element
|
53
|
+
}> & {}, () => JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
54
|
+
[key: string]: any;
|
55
|
+
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
49
56
|
title: string;
|
57
|
+
loading: boolean;
|
50
58
|
}> & {
|
51
59
|
beforeCreate?: (() => void) | (() => void)[];
|
52
60
|
created?: (() => void) | (() => void)[];
|
@@ -69,36 +77,45 @@ declare const BkLoading: {
|
|
69
77
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
70
78
|
} & Readonly<{
|
71
79
|
indicator?: unknown;
|
80
|
+
loading?: unknown;
|
72
81
|
theme?: unknown;
|
73
82
|
title?: unknown;
|
74
83
|
size?: unknown;
|
75
84
|
mode?: unknown;
|
76
85
|
} & {
|
77
86
|
title: string;
|
87
|
+
loading: boolean;
|
78
88
|
} & {
|
79
89
|
theme?: string;
|
80
90
|
size?: string;
|
81
91
|
indicator?: Function;
|
82
92
|
mode?: BkLoadingMode;
|
83
|
-
}> & {} & import("vue").ShallowUnwrapRef<() => JSX.Element
|
93
|
+
}> & {} & import("vue").ShallowUnwrapRef<() => JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
94
|
+
[key: string]: any;
|
95
|
+
}>[]> & {} & {} & import("vue").ComponentCustomProperties;
|
84
96
|
__isFragment?: never;
|
85
97
|
__isTeleport?: never;
|
86
98
|
__isSuspense?: never;
|
87
99
|
} & import("vue").ComponentOptionsBase<Readonly<{
|
88
100
|
indicator?: unknown;
|
101
|
+
loading?: unknown;
|
89
102
|
theme?: unknown;
|
90
103
|
title?: unknown;
|
91
104
|
size?: unknown;
|
92
105
|
mode?: unknown;
|
93
106
|
} & {
|
94
107
|
title: string;
|
108
|
+
loading: boolean;
|
95
109
|
} & {
|
96
110
|
theme?: string;
|
97
111
|
size?: string;
|
98
112
|
indicator?: Function;
|
99
113
|
mode?: BkLoadingMode;
|
100
|
-
}> & {}, () => JSX.Element
|
114
|
+
}> & {}, () => JSX.Element | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
115
|
+
[key: string]: any;
|
116
|
+
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
101
117
|
title: string;
|
118
|
+
loading: boolean;
|
102
119
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
|
103
120
|
setDefaultIndicator: typeof setDefaultIndicator;
|
104
121
|
BkLoadingMode: typeof BkLoadingMode;
|
package/lib/loading/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,o,t){"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};!function(e){e.exports=function(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var i,d,l,r=n(a.exports);function u(e){l="function"==typeof e?e:function(){return o.createVNode(e,null,null)}}e.BkLoadingMode=void 0,(i=e.BkLoadingMode||(e.BkLoadingMode={})).Spin="spin",i.Default="default",e.BkLoadingSize=void 0,(d=e.BkLoadingSize||(e.BkLoadingSize={})).Small="small",d.Large="large";var s={indicator:{type:Function},loading:t.PropTypes.bool,theme:t.PropTypes.theme(["white","primary","warning","success","danger"]),title:t.PropTypes.string.def(""),size:t.PropTypes.size(),mode:t.PropTypes.oneOf(Object.values(e.BkLoadingMode))},c=o.defineComponent({name:"Loading",props:s,setup:function(e,n){var a=[1,2,3,4].map((function(e){return o.createVNode("span",{class:"dot dot-".concat(e)},null)})),i=o.createVNode("div",{class:"bk-spin-indicator"},[[1,2,3,4,5,6,7,8].map((function(e){return o.createVNode("span",{class:"oval oval-".concat(e)},null)}))]),d=o.computed((function(){return t.classes({"bk-nested-loading":!!n.slots.default},"bk-loading-wrapper")})),u=o.computed((function(){var o;return t.classes((r(o={},"bk-loading-size-".concat(e.size),!e.size),r(o,"bk-loading-".concat(e.theme),!e.theme),o),"bk-loading-indicator")})),s=o.computed((function(){return!!e.title})),c=o.computed((function(){var t="spin"===e.mode;return"function"==typeof e.indicator?o.createVNode(e.indicator,null,null):"function"==typeof l?o.createVNode(l,null,null):t?i:a}));return function(){var t,a;return n.slots.default&&!e.loading?null===(a=(t=n.slots).default)||void 0===a?void 0:a.call(t):o.createVNode("div",{class:d.value},[o.createVNode("div",{class:u.value},[c.value,s.value&&o.createVNode("div",{class:"bk-loading-title"},[e.title])]),n.slots.default&&o.createVNode("div",{class:"bk-loading-mask"},[n.slots.default()])])}}}),p=t.withInstallProps(c,{setDefaultIndicator:u,BkLoadingMode:e.BkLoadingMode,BkLoadingSize:e.BkLoadingSize},!0);e.BkLoading=p,e.default=p,e.setDefaultIndicator=u,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/loading/loading.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
1
|
+
import { ExtractPropTypes, VNode } from 'vue';
|
2
2
|
export declare enum BkLoadingMode {
|
3
3
|
Spin = "spin",
|
4
4
|
Default = "default"
|
@@ -12,6 +12,9 @@ export declare const loadingTypes: {
|
|
12
12
|
indicator: {
|
13
13
|
type: FunctionConstructor;
|
14
14
|
};
|
15
|
+
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
16
|
+
default: boolean;
|
17
|
+
};
|
15
18
|
theme: import("vue-types").VueTypeDef<string>;
|
16
19
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
17
20
|
default: string;
|
@@ -26,6 +29,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
26
29
|
indicator: {
|
27
30
|
type: FunctionConstructor;
|
28
31
|
};
|
32
|
+
loading: import("vue-types").VueTypeValidableDef<boolean> & {
|
33
|
+
default: boolean;
|
34
|
+
};
|
29
35
|
theme: import("vue-types").VueTypeDef<string>;
|
30
36
|
title: import("vue-types").VueTypeValidableDef<string> & {
|
31
37
|
default: string;
|
@@ -34,14 +40,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
34
40
|
};
|
35
41
|
size: import("vue-types").VueTypeDef<string>;
|
36
42
|
mode: import("vue-types").VueTypeDef<BkLoadingMode>;
|
37
|
-
}, () => JSX.Element
|
43
|
+
}, () => JSX.Element | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
44
|
+
[key: string]: any;
|
45
|
+
}>[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
38
46
|
indicator?: unknown;
|
47
|
+
loading?: unknown;
|
39
48
|
theme?: unknown;
|
40
49
|
title?: unknown;
|
41
50
|
size?: unknown;
|
42
51
|
mode?: unknown;
|
43
52
|
} & {
|
44
53
|
title: string;
|
54
|
+
loading: boolean;
|
45
55
|
} & {
|
46
56
|
theme?: string;
|
47
57
|
size?: string;
|
@@ -49,5 +59,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
49
59
|
mode?: BkLoadingMode;
|
50
60
|
}> & {}, {
|
51
61
|
title: string;
|
62
|
+
loading: boolean;
|
52
63
|
}>;
|
53
64
|
export default _default;
|
package/lib/menu/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@bkui-vue/icon/"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","@bkui-vue/icon/","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e._,e.Shared)}(this,(function(e,t,n,o){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l={exports:{}};!function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@bkui-vue/icon/"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","@bkui-vue/icon/","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e._,e.Shared)}(this,(function(e,t,n,o){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l={exports:{}};!function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports}(l);var a=r(l.exports),u={exports:{}},i={exports:{}},s={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o},e.exports.__esModule=!0,e.exports.default=e.exports}(s),function(e){var t=s.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(i);var c={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(c);var p={exports:{}};!function(e){var t=s.exports;e.exports=function(e,n){if(e){if("string"==typeof e)return t(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(p);var d={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(d),function(e){var t=i.exports,n=c.exports,o=p.exports,r=d.exports;e.exports=function(e){return t(e)||n(e)||o(e)||r()},e.exports.__esModule=!0,e.exports.default=e.exports}(u);var f=r(u.exports),v=Symbol("MENU_PROVIDER_KEY"),y=Symbol("MENU_PROVIDER_KEY_PATH"),m=function(){return t.inject(v)},h=function(){var e,n=t.getCurrentInstance(),o=n.parent?n.parent.provides:null===(e=n.vnode.appContext)||void 0===e?void 0:e.provides;return o&&y in o?t.inject(y):{parentInfo:void 0,parentKeys:t.ref([])}},x=function(e){return(e||"").split(" ").filter((function(e){return!!e.trim()}))};function g(e,t){if(e&&t){var n=x(t),o=e.getAttribute("class")||"";if(e.classList){var r;(r=e.classList).remove.apply(r,f(n))}else{n.forEach((function(e){o=o.replace(" ".concat(e," ")," ")}));var l=x(o).join(" ");e.setAttribute("class",l)}}}function b(e,t){if(e){var n,o=e.getAttribute("class")||"",r=x(o),l=(t||"").split(" ").filter((function(e){return!r.includes(e)&&!!e.trim()}));if(e.classList)(n=e.classList).add.apply(n,f(l));else o+=" ".concat(l.join(" ")),e.setAttribute("class",o)}}var I={activeKey:String,collapse:{type:Boolean,default:!1},OpenedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}},_=t.defineComponent({name:"Menu",props:I,emits:["update:activeKey","update:openKeys","click","openChange"],setup:function(e,n){var o=n.slots,r=n.emit,l=t.ref(""),u=t.ref([]),i=t.ref({}),s=t.computed((function(){return e.mode})),c=t.ref(e.collapse),p=t.ref([]);t.watch((function(){return e.OpenedKeys}),(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.value;u.value=e}),{immediate:!0}),t.watchEffect((function(){void 0!==e.activeKey&&(l.value=e.activeKey)})),t.watch((function(){return e.collapse}),(function(){c.value=e.collapse;var t=f(p.value),n=f(u.value);u.value=c.value?[]:t,p.value=c.value?n:[]}),{immediate:!0});var d;return d={activeKey:l,menuStore:i,registerMenuInfo:function(e,t){i.value=Object.assign(Object.assign({},i.value),a({},e,t))},unregisterMenuInfo:function(e){delete i.value[e],i.value=Object.assign({},i.value)},mode:s.value,openedKeys:u,collapse:c,handleOpenChange:function(t,n){n?e.uniqueOpen?u.value=[t]:u.value.push(t):u.value=u.value.filter((function(e){return e!==t})),r("openChange",n,i.value[t]),r("update:openKeys",f(u.value))},handleActiveChange:function(e){l.value=e,r("click",i.value[e]),r("update:activeKey",e,i.value[e])}},t.provide(v,d),function(){var e;return t.createVNode("div",{class:{"bk-menu":!0,"is-collapse":c.value}},[null===(e=null==o?void 0:o.default)||void 0===e?void 0:e.call(o)])}}}),w=t.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup:function(e,n){var o,r,l=n.slots,a=n.emit,u=m(),i=u.registerMenuInfo,s=u.unregisterMenuInfo,c=u.activeKey,p=u.handleActiveChange,d=t.getCurrentInstance(),f=h().parentInfo,v=(null===(r=null===(o=d.vnode.key)||void 0===o?void 0:o.toString)||void 0===r?void 0:r.call(o))||String(d.uid),y=t.computed((function(){return c.value===v})),x=t.computed((function(){return e.needIcon}));i(v,{key:v,parentKey:null==f?void 0:f.key});var g=function(e){p(v),a("click",e)};return t.onBeforeUnmount((function(){return s(v)})),function(){var e,n;return t.createVNode("li",{class:{"bk-menu-item":!0,"is-active":y.value},onClick:g},[x.value&&t.createVNode("span",{class:"item-icon"},[(null===(e=null==l?void 0:l.icon)||void 0===e?void 0:e.call(l))||t.createVNode("i",{class:"default-icon"},null)]),t.createVNode("span",{class:"item-content"},[null===(n=l.default)||void 0===n?void 0:n.call(l)])])}}}),K={title:{type:String,default:"title"}},S=t.defineComponent({name:"Submenu",props:K,emits:["collapse"],slots:["icon"],setup:function(e,o){var r,l,a=o.slots,u=o.emit,i=m(),s=i.registerMenuInfo,c=i.unregisterMenuInfo,p=i.openedKeys,d=i.handleOpenChange,v=i.collapse,x=i.activeKey,I=i.menuStore,_=h().parentInfo,w=t.getCurrentInstance(),K=(null===(l=null===(r=w.vnode.key)||void 0===r?void 0:r.toString)||void 0===l?void 0:l.call(r))||String(w.uid),S=t.ref({css:!0,onBeforeEnter:function(e){b(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:function(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height="".concat(e.scrollHeight,"px"),e.style.maxHeight="".concat(e.scrollHeight,"px")):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:function(e){e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,g(e,"collapse-transition")},onBeforeLeave:function(e){e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height="".concat(e.scrollHeight,"px"),e.style.maxHeight="".concat(e.scrollHeight,"px"),e.style.overflow="hidden"},onLeave:function(e){0!==e.scrollHeight&&(b(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:function(e){g(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),k=t.computed((function(){return p.value.includes(K)})),M=t.computed((function(){var e,t,n=null===(t=null===(e=I.value)||void 0===e?void 0:e[x.value])||void 0===t?void 0:t.parentKey;return v.value&&n===K&&k}));!function(e){var n=h(),o=n.parentKeys,r=n.parentInfo,l=t.computed((function(){return[].concat(f(o.value),[e])}));t.provide(y,{parentInfo:{key:e,parentKey:null==r?void 0:r.key},parentKeys:l})}(K),s(K,{key:K,parentKey:null==_?void 0:_.key}),t.onBeforeUnmount((function(){return c(K)}));var O=function(){d(K,!k.value),u("collapse",!k.value,w)};return function(){var o,r;return t.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":k.value}},[t.createVNode("div",{class:{"submenu-header":!0,"is-collapse":M.value},onClick:O},[t.createVNode("span",{class:"submenu-header-icon"},[(null===(o=a.icon)||void 0===o?void 0:o.call(a))||t.createVNode(n.TreeApplicationShape,{class:"menu-icon"},null)]),t.createVNode("span",{class:"submenu-header-content"},[e.title]),t.createVNode(n.AngleDown,{class:{"submenu-header-collapse":!0,"is-collapse":p.value.includes(K)}},null)]),t.createVNode(t.Transition,S.value,{default:function(){return[t.withDirectives(t.createVNode("ul",{class:"submenu-list"},[null===(r=a.default)||void 0===r?void 0:r.call(a)]),[[t.vShow,k.value]])]}})])}}}),k=t.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup:function(e,n){var o=n.slots;return function(){var n;return t.createVNode("div",{class:"bk-menu-group"},[t.createVNode("div",{class:"group-name"},[e.name]),t.createVNode("ul",{class:"group-wrap"},[null===(n=o.default)||void 0===n?void 0:n.call(o)])])}}}),M=o.withInstallProps(_,{Item:w,Submenu:S,Group:k});e.default=M,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/message/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,t,n,o){"use strict";var s={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},r=1,i=function(e,n){var o=n,i=o.position||"top-right";"string"==typeof n&&(o={message:n});var a=n.onClose,u=o.offset||20;s[i].forEach((function(e){u+=(e.el.offsetHeight||0)+16})),u+=16;var c="message_".concat(r+=1);o=Object.assign(Object.assign({},o),{offset:u,id:c});var l=document.createElement("div"),d=t.createVNode(e,o);d.props.onDestory=function(e){!function(e,t,n){null==n||n();var o=t.startsWith("top")?"top":"bottom",r=-1;s[t].forEach((function(t,n){t.props.id===e&&(r=n)}));for(var i=s[t][r].el.offsetHeight,a=s[t].length,u=r;u<a;u++){var c=parseInt(s[t][u].el.style[o],10)-i-16;s[t][u].component.props.offset=c}s[t].splice(r,1)}(e,i,a),t.render(null,l)},t.render(d,l),s[i].push(d),document.body.appendChild(l.firstElementChild)};var a={id:n.PropTypes.string.def(""),message:n.PropTypes.string.def(""),theme:n.PropTypes.theme(["primary","warning","success","danger"]).def("primary"),delay:n.PropTypes.number.def(3e3),offset:n.PropTypes.number.def(0),onClose:n.PropTypes.func},u=t.defineComponent({name:"
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,t,n,o){"use strict";var s={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},r=1,i=function(e,n){var o=n,i=o.position||"top-right";"string"==typeof n&&(o={message:n});var a=n.onClose,u=o.offset||20;s[i].forEach((function(e){u+=(e.el.offsetHeight||0)+16})),u+=16;var c="message_".concat(r+=1);o=Object.assign(Object.assign({},o),{offset:u,id:c});var l=document.createElement("div"),d=t.createVNode(e,o);d.props.onDestory=function(e){!function(e,t,n){null==n||n();var o=t.startsWith("top")?"top":"bottom",r=-1;s[t].forEach((function(t,n){t.props.id===e&&(r=n)}));for(var i=s[t][r].el.offsetHeight,a=s[t].length,u=r;u<a;u++){var c=parseInt(s[t][u].el.style[o],10)-i-16;s[t][u].component.props.offset=c}s[t].splice(r,1)}(e,i,a),t.render(null,l)},t.render(d,l),s[i].push(d),document.body.appendChild(l.firstElementChild)};var a={id:n.PropTypes.string.def(""),message:n.PropTypes.string.def(""),theme:n.PropTypes.theme(["primary","warning","success","danger"]).def("primary"),delay:n.PropTypes.number.def(3e3),offset:n.PropTypes.number.def(0),onClose:n.PropTypes.func},u=t.defineComponent({name:"Message",props:a,emits:["destory"],setup:function(e,o){var s=o.emit,r=t.computed((function(){return["bk-message","bk-message-".concat(e.theme)]})),i=n.bkZIndexManager.getMessageNextIndex(),a=t.computed((function(){return{top:"".concat(e.offset,"px"),zIndex:i}})),u=t.ref(!1),c=null;return t.onMounted((function(){c=setTimeout((function(){u.value=!1}),e.delay),u.value=!0})),t.onUnmounted((function(){clearTimeout(c)})),t.watch(u,(function(){u.value||s("destory",e.id)})),{classNames:r,styles:a,visible:u,handleClose:function(){u.value=!1}}},render:function(){var e=this;return t.createVNode(t.Transition,{name:"bk-message-fade"},{default:function(){return[t.withDirectives(t.createVNode("div",{class:e.classNames,style:e.styles},[t.createVNode("div",{class:"bk-message-content"},[t.createVNode("div",{class:"bk-message-icon"},[{primary:t.createVNode(o.Info,null,null),warning:t.createVNode(o.Warn,null,null),success:t.createVNode(o.Success,null,null),danger:t.createVNode(o.Close,null,null)}[e.theme]]),e.message]),t.createVNode(o.Error,{class:"bk-message-icon bk-message-close",onClick:e.handleClose},null)]),[[t.vShow,e.visible]])]}})}});e.default=function(e){i(u,e)},Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/modal/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 n={exports:{}},i={exports:{}},s={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.
|
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 n={exports:{}},i={exports:{}},s={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}(s),function(e){var t=s.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(i);var a={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var l={exports:{}};!function(e){var t=s.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 d={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(d),function(e){var t=i.exports,o=a.exports,r=l.exports,n=d.exports;e.exports=function(e){return t(e)||o(e)||r(e)||n()},e.exports.__esModule=!0,e.exports.default=e.exports}(n);var u=r(n.exports),p={isShow:{type:Boolean,default:!1},width:{type:[Number,String],default:"50%"},height:{type:[Number,String],default:"50%"},customClass:{type:[Object,String],default:""},scrollable:{type:Boolean,default:!0}},c=t.defineComponent({name:"Modal",props:Object.assign({},p),data:function(){return{visible:!1}},watch:{isShow:{handler:function(e){this.visible=e}},visible:function(e){var t=this;e?this.$nextTick((function(){o.bkPopIndexManager.show(t.$el)})):o.bkPopIndexManager.hide(this.$el)}},computed:{dialogWidth:function(){return/^\d+$/.test("".concat(this.width))?"".concat(this.width,"px"):this.width},dialogHeight:function(){return/^\d+$/.test("".concat(this.height))?"".concat(this.height,"px"):this.height},compStyle:function(){return{width:this.dialogWidth,height:this.dialogHeight,display:this.visible?"inherit":"none"}}},beforeUnmount:function(){o.bkPopIndexManager.hide(this.$el)},render:function(){var e,o,r,n,i,s,a,l,d;return t.createVNode("div",{class:["bk-modal-wrapper"].concat(u(this.customClass)),style:this.compStyle},[this.isShow?t.createVNode("div",{class:"bk-modal-body"},[t.createVNode("div",{class:"bk-modal-header"},[null!==(r=null===(o=(e=this.$slots).header)||void 0===o?void 0:o.call(e))&&void 0!==r?r:""]),t.createVNode("div",{class:"bk-modal-content"},[null!==(s=null===(i=(n=this.$slots).default)||void 0===i?void 0:i.call(n))&&void 0!==s?s:""]),t.createVNode("div",{class:"bk-modal-footer"},[null!==(d=null===(l=(a=this.$slots).footer)||void 0===l?void 0:l.call(a))&&void 0!==d?d:""])]):""])}}),f=o.withInstallProps(c,{propsMixin:p},!0);e.BkModal=f,e.default=f,e.propsMixin=p,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/navigation/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e["@bkui-vue/icon/icons"])}(this,(function(e,t,i){"use strict";var o={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}},a=t.defineComponent({props:o,slots:["side-icon"],setup:function(e,i){var o=i.slots;return function(){var i,a;return t.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:"left-right"===e.navigationType?"0":"1px"}},[(null===(i=o.default)||void 0===i?void 0:i.call(o))||[t.createVNode("span",{class:"title-icon"},[(null===(a=o["side-icon"])||void 0===a?void 0:a.call(o))||t.createVNode("i",{class:"bk-icon icon-rtx"},null)]),t.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}}),n={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator:function(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}},l=t.defineComponent({name:"
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e["@bkui-vue/icon/icons"])}(this,(function(e,t,i){"use strict";var o={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}},a=t.defineComponent({props:o,slots:["side-icon"],setup:function(e,i){var o=i.slots;return function(){var i,a;return t.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:"left-right"===e.navigationType?"0":"1px"}},[(null===(i=o.default)||void 0===i?void 0:i.call(o))||[t.createVNode("span",{class:"title-icon"},[(null===(a=o["side-icon"])||void 0===a?void 0:a.call(o))||t.createVNode("i",{class:"bk-icon icon-rtx"},null)]),t.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}}),n={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator:function(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}},l=t.defineComponent({name:"Navigation",props:n,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup:function(e,i){var o=i.emit,a=t.ref(e.headerTitle),n=t.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(n.click=!n.click,n.hover=n.click,o("toggle",n.hover)),t.onBeforeUnmount((function(){n.timer&&window.clearTimeout(n.timer)}));return{defaultHeaderTitle:a,nav:n,onBeforeUnmount:t.onBeforeUnmount,handleMouseOver:function(){n.click||(n.enterTimer=setTimeout((function(){n.hover=!0,n.enterTimer&&window.clearTimeout(n.enterTimer),n.timer&&window.clearTimeout(n.timer),o("hover",n.hover),o("toggle",n.hover)}),e.hoverEnterDelay))},handleMouseLeave:function(){n.click||(n.enterTimer&&window.clearTimeout(n.enterTimer),n.timer=setTimeout((function(){n.hover=!1,window.clearTimeout(n.timer),o("leave",n.hover),o("toggle",n.hover)}),e.hoverLeaveDelay))},handleClick:function(){n.click=!n.click,n.hover=n.click,o("toggle",n.hover),o("toggle-click",n.hover)}}},render:function(){var e,o,n,l,s,r,d,c,h,v,u,f;return t.createVNode("div",{class:"bk-navigation"},["top-bottom"===this.navigationType&&t.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:"".concat(this.headHeight,"px")}},[t.createVNode(a,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),t.createVNode("div",{class:"header-right"},[null===(o=(e=this.$slots).header)||void 0===o?void 0:o.call(e)])]),t.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&t.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?"".concat(this.hoverWidth,"px"):"".concat(this.navWidth,"px")}},[t.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?"".concat(this.hoverWidth,"px"):"".concat(this.navWidth,"px"),borderRight:"top-bottom"!==this.navigationType?"none":"1px solid #DCDEE5"}},["top-bottom"!==this.navigationType&&t.createVNode(a,{style:{flexBasis:"".concat(this.headHeight,"px")},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),t.createVNode("div",{class:"nav-slider-list",style:{height:"calc(100vh - ".concat(+this.headHeight+56,"px)")}},[null===(l=(n=this.$slots).menu)||void 0===l?void 0:l.call(n)]),t.createVNode("div",{class:"nav-slider-footer"},[t.createVNode("div",{class:{"is-left":"top-bottom"!==this.navigationType,"footer-icon":!0},onClick:this.handleClick},[t.createVNode(i.CollapseLeft,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),t.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},["top-bottom"!==this.navigationType&&t.createVNode("div",{class:"container-header",style:{flexBasis:"".concat(this.headHeight,"px")}},[(null===(r=(s=this.$slots).header)||void 0===r?void 0:r.call(s))||[t.createVNode("div",{class:"container-header-title"},[this.headerTitle]),t.createVNode("div",{class:"container-header-sets"},[null===(c=(d=this.$slots)["header-set"])||void 0===c?void 0:c.call(d)])]]),t.createVNode("div",{class:"container-content",style:{maxHeight:"calc(100vh - ".concat(this.headHeight,"px)")}},[null===(v=(h=this.$slots).default)||void 0===v?void 0:v.call(h),t.createVNode("div",{class:"container-footer"},[null===(f=(u=this.$slots).footer)||void 0===f?void 0:f.call(u)])])])])])}});l.install=function(e){e.component(l.name,l)},e.default=l,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/notify/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,t,o,n){"use strict";var r={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},i=1,s=function(e,o){var n=o,s=n.position||"top-right";"string"==typeof o&&(n={message:o});var u=o.onClose,a=n.offset||20;r[s].forEach((function(e){a+=(e.el.offsetHeight||0)+16})),a+=16;var l="message_".concat(i+=1);n=Object.assign(Object.assign({},n),{offset:a,id:l});var c=document.createElement("div"),f=t.createVNode(e,n);f.props.onDestory=function(e){!function(e,t,o){null==o||o();var n=t.startsWith("top")?"top":"bottom",i=-1;r[t].forEach((function(t,o){t.props.id===e&&(i=o)}));for(var s=r[t][i].el.offsetHeight,u=r[t].length,a=i;a<u;a++){var l=parseInt(r[t][a].el.style[n],10)-s-16;r[t][a].component.props.offset=l}r[t].splice(i,1)}(e,s,u),t.render(null,c)},t.render(f,c),r[s].push(f),document.body.appendChild(c.firstElementChild)};function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};!function(e){e.exports=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/icon/icons"])}(this,(function(e,t,o,n){"use strict";var r={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},i=1,s=function(e,o){var n=o,s=n.position||"top-right";"string"==typeof o&&(n={message:o});var u=o.onClose,a=n.offset||20;r[s].forEach((function(e){a+=(e.el.offsetHeight||0)+16})),a+=16;var l="message_".concat(i+=1);n=Object.assign(Object.assign({},n),{offset:a,id:l});var c=document.createElement("div"),f=t.createVNode(e,n);f.props.onDestory=function(e){!function(e,t,o){null==o||o();var n=t.startsWith("top")?"top":"bottom",i=-1;r[t].forEach((function(t,o){t.props.id===e&&(i=o)}));for(var s=r[t][i].el.offsetHeight,u=r[t].length,a=i;a<u;a++){var l=parseInt(r[t][a].el.style[n],10)-s-16;r[t][a].component.props.offset=l}r[t].splice(i,1)}(e,s,u),t.render(null,c)},t.render(f,c),r[s].push(f),document.body.appendChild(c.firstElementChild)};function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};!function(e){e.exports=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var l=u(a.exports),c={id:o.PropTypes.string.def(""),title:o.PropTypes.string.def(""),message:o.PropTypes.string.def(""),theme:o.PropTypes.theme(["primary","warning","success","danger"]).def("primary"),position:o.PropTypes.position().def("top-right"),delay:o.PropTypes.number.def(3e3),offset:o.PropTypes.number.def(0),onClose:o.PropTypes.func},f=t.defineComponent({name:"Notify",props:c,emits:["destory"],setup:function(e,n){var r=n.emit,i=t.computed((function(){return["bk-notify","bk-notify-".concat(e.theme)]})),s=o.bkZIndexManager.getMessageNextIndex(),u=t.computed((function(){return e.position.indexOf("right")>1?"right":"left"})),a=t.computed((function(){return e.position.startsWith("top")?"top":"bottom"})),c=t.computed((function(){var t;return l(t={},u.value,"10px"),l(t,a.value,"".concat(e.offset,"px")),l(t,"zIndex",s),t})),f=t.ref(!1),d=null;return t.onMounted((function(){d=setTimeout((function(){f.value=!1}),e.delay),f.value=!0})),t.onUnmounted((function(){clearTimeout(d)})),t.watch(f,(function(){f.value||r("destory",e.id)})),{classNames:i,styles:c,visible:f,handleClose:function(){f.value=!1}}},render:function(){var e=this;return t.createVNode(t.Transition,{name:"bk-notify-fade"},{default:function(){return[t.withDirectives(t.createVNode("div",{class:e.classNames,style:e.styles},[t.createVNode("div",{class:"bk-notify-content"},[t.createVNode("div",{class:"bk-notify-icon"},[{primary:t.createVNode(n.Info,null,null),warning:t.createVNode(n.Warn,null,null),success:t.createVNode(n.Success,null,null),danger:t.createVNode(n.Close,null,null)}[e.theme]]),e.title?t.createVNode("h3",{class:"bk-notify-content-header"},[e.title]):"",t.createVNode("div",{class:"bk-notify-content-text"},[e.message])]),t.createVNode(n.Error,{class:"bk-notify-icon bk-notify-close",onClick:e.handleClose},null)]),[[t.vShow,e.visible]])]}})}});e.default=function(e){s(f,e)},Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -51,8 +51,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
51
51
|
offset?: unknown;
|
52
52
|
onClose?: unknown;
|
53
53
|
} & {
|
54
|
-
offset: number;
|
55
54
|
title: string;
|
55
|
+
offset: number;
|
56
56
|
id: string;
|
57
57
|
theme: string;
|
58
58
|
position: string;
|
@@ -63,8 +63,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
63
63
|
}> & {
|
64
64
|
onDestory?: (...args: any[]) => any;
|
65
65
|
}, {
|
66
|
-
offset: number;
|
67
66
|
title: string;
|
67
|
+
offset: number;
|
68
68
|
id: string;
|
69
69
|
onClose: (...args: any[]) => any;
|
70
70
|
theme: string;
|
package/lib/popover/index.d.ts
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
declare const BkPopover: {
|
2
2
|
new (...args: any[]): {
|
3
3
|
$: import("vue").ComponentInternalInstance;
|
4
|
-
$data: {
|
5
|
-
popoverInstance: any;
|
6
|
-
isPopInstance: boolean;
|
7
|
-
};
|
4
|
+
$data: {};
|
8
5
|
$props: Partial<{
|
9
6
|
placement: string;
|
10
7
|
modifiers: unknown[];
|
@@ -15,17 +12,52 @@ declare const BkPopover: {
|
|
15
12
|
trigger: string;
|
16
13
|
arrow: boolean;
|
17
14
|
isShow: boolean;
|
18
|
-
|
15
|
+
transition: string;
|
16
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
17
|
+
fixOnBoundary: boolean;
|
18
|
+
}> & Omit<({} & (Readonly<{
|
19
|
+
isShow?: unknown;
|
20
|
+
width?: unknown;
|
21
|
+
height?: unknown;
|
22
|
+
content?: unknown;
|
23
|
+
transition?: unknown;
|
24
|
+
placement?: unknown;
|
25
|
+
theme?: unknown;
|
26
|
+
handleFirstUpdate?: unknown;
|
27
|
+
trigger?: unknown;
|
28
|
+
arrow?: unknown;
|
29
|
+
modifiers?: unknown;
|
30
|
+
boundary?: unknown;
|
31
|
+
fixOnBoundary?: unknown;
|
32
|
+
} & {
|
33
|
+
placement: string;
|
34
|
+
modifiers: unknown[];
|
35
|
+
width: string | number;
|
36
|
+
height: string | number;
|
37
|
+
theme: string;
|
38
|
+
content: string | number;
|
39
|
+
trigger: string;
|
40
|
+
arrow: boolean;
|
41
|
+
isShow: boolean;
|
42
|
+
transition: string;
|
43
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
44
|
+
fixOnBoundary: boolean;
|
45
|
+
} & {
|
46
|
+
boundary?: string | HTMLElement;
|
47
|
+
}> & ({} | {}))) & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{
|
19
48
|
isShow?: unknown;
|
20
49
|
width?: unknown;
|
21
50
|
height?: unknown;
|
22
51
|
content?: unknown;
|
52
|
+
transition?: unknown;
|
23
53
|
placement?: unknown;
|
24
54
|
theme?: unknown;
|
25
55
|
handleFirstUpdate?: unknown;
|
26
56
|
trigger?: unknown;
|
27
57
|
arrow?: unknown;
|
28
58
|
modifiers?: unknown;
|
59
|
+
boundary?: unknown;
|
60
|
+
fixOnBoundary?: unknown;
|
29
61
|
} & {
|
30
62
|
placement: string;
|
31
63
|
modifiers: unknown[];
|
@@ -36,9 +68,12 @@ declare const BkPopover: {
|
|
36
68
|
trigger: string;
|
37
69
|
arrow: boolean;
|
38
70
|
isShow: boolean;
|
71
|
+
transition: string;
|
72
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
73
|
+
fixOnBoundary: boolean;
|
39
74
|
} & {
|
40
|
-
|
41
|
-
}> & {}
|
75
|
+
boundary?: string | HTMLElement;
|
76
|
+
}> & ({} | {})), "placement" | "modifiers" | "width" | "height" | "theme" | "content" | "trigger" | "arrow" | "isShow" | "transition" | "handleFirstUpdate" | "fixOnBoundary">;
|
42
77
|
$attrs: {
|
43
78
|
[x: string]: unknown;
|
44
79
|
};
|
@@ -50,19 +85,22 @@ declare const BkPopover: {
|
|
50
85
|
}>;
|
51
86
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
52
87
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
53
|
-
$emit: (event: string, ...args: any[]) => void;
|
88
|
+
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
54
89
|
$el: any;
|
55
90
|
$options: import("vue").ComponentOptionsBase<Readonly<{
|
56
91
|
isShow?: unknown;
|
57
92
|
width?: unknown;
|
58
93
|
height?: unknown;
|
59
94
|
content?: unknown;
|
95
|
+
transition?: unknown;
|
60
96
|
placement?: unknown;
|
61
97
|
theme?: unknown;
|
62
98
|
handleFirstUpdate?: unknown;
|
63
99
|
trigger?: unknown;
|
64
100
|
arrow?: unknown;
|
65
101
|
modifiers?: unknown;
|
102
|
+
boundary?: unknown;
|
103
|
+
fixOnBoundary?: unknown;
|
66
104
|
} & {
|
67
105
|
placement: string;
|
68
106
|
modifiers: unknown[];
|
@@ -73,20 +111,12 @@ declare const BkPopover: {
|
|
73
111
|
trigger: string;
|
74
112
|
arrow: boolean;
|
75
113
|
isShow: boolean;
|
114
|
+
transition: string;
|
115
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
116
|
+
fixOnBoundary: boolean;
|
76
117
|
} & {
|
77
|
-
|
78
|
-
}> & {}, {
|
79
|
-
compStyle: import("vue").ComputedRef<{
|
80
|
-
width: any;
|
81
|
-
height: any;
|
82
|
-
zIndex: number;
|
83
|
-
}>;
|
84
|
-
}, {
|
85
|
-
popoverInstance: any;
|
86
|
-
isPopInstance: boolean;
|
87
|
-
}, {}, {
|
88
|
-
handleClose(): void;
|
89
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
118
|
+
boundary?: string | HTMLElement;
|
119
|
+
}> & ({} | {}), () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {
|
90
120
|
placement: string;
|
91
121
|
modifiers: unknown[];
|
92
122
|
width: string | number;
|
@@ -96,6 +126,9 @@ declare const BkPopover: {
|
|
96
126
|
trigger: string;
|
97
127
|
arrow: boolean;
|
98
128
|
isShow: boolean;
|
129
|
+
transition: string;
|
130
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
131
|
+
fixOnBoundary: boolean;
|
99
132
|
}> & {
|
100
133
|
beforeCreate?: (() => void) | (() => void)[];
|
101
134
|
created?: (() => void) | (() => void)[];
|
@@ -116,17 +149,20 @@ declare const BkPopover: {
|
|
116
149
|
$forceUpdate: () => void;
|
117
150
|
$nextTick: typeof import("vue").nextTick;
|
118
151
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
119
|
-
} & Readonly<{
|
152
|
+
} & (Readonly<{
|
120
153
|
isShow?: unknown;
|
121
154
|
width?: unknown;
|
122
155
|
height?: unknown;
|
123
156
|
content?: unknown;
|
157
|
+
transition?: unknown;
|
124
158
|
placement?: unknown;
|
125
159
|
theme?: unknown;
|
126
160
|
handleFirstUpdate?: unknown;
|
127
161
|
trigger?: unknown;
|
128
162
|
arrow?: unknown;
|
129
163
|
modifiers?: unknown;
|
164
|
+
boundary?: unknown;
|
165
|
+
fixOnBoundary?: unknown;
|
130
166
|
} & {
|
131
167
|
placement: string;
|
132
168
|
modifiers: unknown[];
|
@@ -137,20 +173,41 @@ declare const BkPopover: {
|
|
137
173
|
trigger: string;
|
138
174
|
arrow: boolean;
|
139
175
|
isShow: boolean;
|
176
|
+
transition: string;
|
177
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
178
|
+
fixOnBoundary: boolean;
|
140
179
|
} & {
|
141
|
-
|
142
|
-
}> & {} & import("vue").ShallowUnwrapRef<{
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
180
|
+
boundary?: string | HTMLElement;
|
181
|
+
}> & ({} | {})) & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties & Readonly<{
|
182
|
+
isShow?: unknown;
|
183
|
+
width?: unknown;
|
184
|
+
height?: unknown;
|
185
|
+
content?: unknown;
|
186
|
+
transition?: unknown;
|
187
|
+
placement?: unknown;
|
188
|
+
theme?: unknown;
|
189
|
+
handleFirstUpdate?: unknown;
|
190
|
+
trigger?: unknown;
|
191
|
+
arrow?: unknown;
|
192
|
+
modifiers?: unknown;
|
193
|
+
boundary?: unknown;
|
194
|
+
fixOnBoundary?: unknown;
|
195
|
+
} & {
|
196
|
+
placement: string;
|
197
|
+
modifiers: unknown[];
|
198
|
+
width: string | number;
|
199
|
+
height: string | number;
|
200
|
+
theme: string;
|
201
|
+
content: string | number;
|
202
|
+
trigger: string;
|
203
|
+
arrow: boolean;
|
204
|
+
isShow: boolean;
|
205
|
+
transition: string;
|
206
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
207
|
+
fixOnBoundary: boolean;
|
208
|
+
} & {
|
209
|
+
boundary?: string | HTMLElement;
|
210
|
+
}> & ({} | {});
|
154
211
|
__isFragment?: never;
|
155
212
|
__isTeleport?: never;
|
156
213
|
__isSuspense?: never;
|
@@ -159,12 +216,15 @@ declare const BkPopover: {
|
|
159
216
|
width?: unknown;
|
160
217
|
height?: unknown;
|
161
218
|
content?: unknown;
|
219
|
+
transition?: unknown;
|
162
220
|
placement?: unknown;
|
163
221
|
theme?: unknown;
|
164
222
|
handleFirstUpdate?: unknown;
|
165
223
|
trigger?: unknown;
|
166
224
|
arrow?: unknown;
|
167
225
|
modifiers?: unknown;
|
226
|
+
boundary?: unknown;
|
227
|
+
fixOnBoundary?: unknown;
|
168
228
|
} & {
|
169
229
|
placement: string;
|
170
230
|
modifiers: unknown[];
|
@@ -175,20 +235,12 @@ declare const BkPopover: {
|
|
175
235
|
trigger: string;
|
176
236
|
arrow: boolean;
|
177
237
|
isShow: boolean;
|
238
|
+
transition: string;
|
239
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
240
|
+
fixOnBoundary: boolean;
|
178
241
|
} & {
|
179
|
-
|
180
|
-
}> & {}, {
|
181
|
-
compStyle: import("vue").ComputedRef<{
|
182
|
-
width: any;
|
183
|
-
height: any;
|
184
|
-
zIndex: number;
|
185
|
-
}>;
|
186
|
-
}, {
|
187
|
-
popoverInstance: any;
|
188
|
-
isPopInstance: boolean;
|
189
|
-
}, {}, {
|
190
|
-
handleClose(): void;
|
191
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
242
|
+
boundary?: string | HTMLElement;
|
243
|
+
}> & ({} | {}), () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {
|
192
244
|
placement: string;
|
193
245
|
modifiers: unknown[];
|
194
246
|
width: string | number;
|
@@ -198,5 +250,8 @@ declare const BkPopover: {
|
|
198
250
|
trigger: string;
|
199
251
|
arrow: boolean;
|
200
252
|
isShow: boolean;
|
253
|
+
transition: string;
|
254
|
+
handleFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
|
255
|
+
fixOnBoundary: boolean;
|
201
256
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
|
202
257
|
export default BkPopover;
|
package/lib/popover/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";var
|
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 n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r={exports:{}};!function(e){e.exports=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports}(r);var a=n(r.exports),i={isShow:o.PropTypes.bool,width:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number]).def("auto"),height:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number]).def("auto"),content:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number]).def(""),transition:o.PropTypes.string.def("fade-in"),placement:o.PropTypes.placement(["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"]).def("top"),theme:o.PropTypes.string.def("light"),handleFirstUpdate:{type:Function,default:function(){}},trigger:o.PropTypes.string.def("hover"),arrow:o.PropTypes.bool.def(!0),modifiers:o.PropTypes.array.def([{name:"offset",options:{offset:[0,8]}}]),boundary:o.PropTypes.oneOfType([o.PropTypes.string.def("parent"),o.PropTypes.instanceOf(HTMLElement)]),fixOnBoundary:o.PropTypes.bool.def(!1)},u=t.defineComponent({name:"Popover",props:i,setup:function(e,n){var r=!1,i=Object.create(null),u=t.toRefs(e),s=u.width,p=u.height,d=u.theme,f=u.trigger,l=u.isShow,c=u.placement,m=u.modifiers,v=u.arrow,h=u.content,y=t.ref(),T=t.ref(),b=t.computed((function(){return{width:/^\d+$/.test(String(s.value))?"".concat(s.value,"px"):s.value,height:/^\d+$/.test(String(p.value))?"".concat(p.value,"px"):p.value,zIndex:o.bkZIndexManager.getModalNextIndex()}})),g=["dark","light"],P=t.computed((function(){var e=d.value.split(/\s+/);return e.sort((function(e,t){return Number(g.includes(t))-Number(g.includes(e))})),{systemThemes:e,customThemes:e.filter((function(e){return!g.includes(e)}))}})),w=function(e){"manual"===f.value&&r&&(e?i.show():i.hide())};t.watch((function(){return e.isShow}),(function(e){w(e)}),{immediate:!0});var x=function(){n.emit("update:isShow",!1)},O=function(){n.emit("update:isShow",!0)},S=function(){var e=i;e.constructor&&(e.isShow&&e.hide(),e.destroy(),i=Object.create(null))},j=function(){i=new o.BKPopover(y.value,T.value,{theme:P.value.systemThemes.join(" "),placement:c.value,trigger:f.value,modifiers:m.value,onFirstUpdate:e.handleFirstUpdate,afterShow:O,afterHidden:x,appendTo:e.boundary,fixOnBoundary:e.fixOnBoundary}),r=!0,w(l.value)},k=function(){S(),t.nextTick(j)};n.expose({update:k}),t.onMounted(k),t.onBeforeUnmount(S);var N=function(){n.emit("after-enter")},M=function(){n.emit("after-leave")},V=P.value.customThemes.join(" "),_=P.value.customThemes.reduce((function(e,t){return Object.assign(a({},"data-".concat(t,"-theme"),!0),e)}),{}),B="bk-popover-content ".concat(V);return function(){var o,r,a,i,u;return t.createVNode("div",{class:"bk-popover","data-bk-pop-container":!0},[t.createVNode("div",{ref:y,class:"bk-popover-reference"},[null===(r=(o=n.slots).default)||void 0===r?void 0:r.call(o)]),t.createVNode(t.Transition,{name:e.transition,onAfterEnter:N,onAfterLeave:M},{default:function(){return[t.createVNode("div",t.mergeProps({ref:T,class:B,style:b.value},_),[null!==(u=null===(i=(a=n.slots).content)||void 0===i?void 0:i.call(a))&&void 0!==u?u:h.value,v&&t.createVNode("div",{class:"arrow","data-popper-arrow":!0},null)])]}})])}}}),s=o.withInstall(u);e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}));
|