bkui-vue 0.0.1-beta.130 → 0.0.1-beta.133

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.
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon")):t(e["../shared"],e.vue,e["../icon"]);for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(self,((e,t,a)=>(()=>{"use strict";var i={6870:e=>{e.exports=a},4212:t=>{t.exports=e},748:e=>{e.exports=t}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={exports:{}};return i[e](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{default:()=>r});var e=o(4212);function t(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var a=o(748),i=o(6870);const l=(0,a.defineComponent)({name:"ResizeLayout",props:{placement:e.PropTypes.placement().def("left"),min:e.PropTypes.number.def(3),max:e.PropTypes.number.def(1/0),triggerWidth:e.PropTypes.number.def(5),triggerOffset:e.PropTypes.number.def(3),initialDivide:e.PropTypes.oneOfType([String,Number]).def("20%"),immediate:e.PropTypes.bool,disabled:e.PropTypes.bool,collapsible:e.PropTypes.bool,autoMinimize:e.PropTypes.oneOfType([Boolean,Number]).def(!1),border:e.PropTypes.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup:function(e,i){var l=i.emit,o=(0,a.toRefs)(e),n=o.placement,r=o.initialDivide,u=o.triggerOffset,s=o.triggerWidth,c=o.max,v=o.min,d=o.immediate,f=o.autoMinimize,p=(0,a.ref)(!1),m=(0,a.ref)(!0),b=(0,a.ref)(!1),y=(0,a.ref)(null),h=(0,a.ref)({}),g=(0,a.ref)(null),z=(0,a.ref)(null),x=(0,a.ref)(null),k=(0,a.ref)(null),w=(0,a.computed)((function(){return["left","right"].includes(n.value)})),P=(0,a.computed)((function(){return w.value?"width":"height"})),R=(0,a.computed)((function(){var e=r.value;return"number"==typeof e&&(e="".concat(e,"px")),t({},P.value,e)})),T=(0,a.computed)((function(){var e;return t(e={},"margin-".concat(n.value),"".concat(u.value-s.value,"px")),t(e,P.value,"".concat(s.value,"px")),e})),M=(0,a.computed)((function(){return f.value?"boolean"==typeof f.value?50:f.value:0})),S=new ResizeObserver((function(){var e=g.value.getBoundingClientRect();y.value=w.value?e.width:e.height})),O=function(){var e=k.value.getBoundingClientRect();j(!p.value),p.value?(k.value.setAttribute("data-".concat(P.value),"".concat(e[P.value],"px")),k.value.style[P.value]="5px"):(m.value=!0,k.value.style[P.value]=k.value.getAttribute("data-".concat(P.value)))},j=function(e){k.value.addEventListener("transitionend",(function t(){m.value=e,k.value.style.transition="",k.value.removeEventListener("transitionend",t)})),k.value.style.transition="".concat(P.value," cubic-bezier(0.4, 0, 0.2, 1) .3s")};return(0,a.onMounted)((function(){S.observe(g.value)})),(0,a.onBeforeUnmount)((function(){S.unobserve(g.value)})),{collapsed:p,asideContentVisible:m,minimized:b,limitMax:y,state:h,vertical:w,cssPropKey:P,bkResizeLayoutRef:g,resizeProxyRef:z,resizeMaskRef:x,asideRef:k,triggerStyle:T,asideStyle:R,handleMousedown:function(e){l("before-resize",e);var t=k.value.getBoundingClientRect();h.value=Object.freeze({mouse:{clientX:e.clientX,clientY:e.clientY},aside:{width:t.width,height:t.height}}),x.value.style.display="block",x.value.style.cursor=w.value?"col-resize":"row-resize",d.value||function(){switch(z.value.style.visibility="visible",n.value){case"left":z.value.style.inset="0 auto auto ".concat(h.value.aside.width,"px");break;case"right":z.value.style.inset="0 ".concat(h.value.aside.width,"px auto auto");break;case"top":z.value.style.inset="".concat(h.value.aside.height,"px auto auto 0");break;case"bottom":z.value.style.inset="auto auto ".concat(h.value.aside.height,"px 0")}}(),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};var i=function(e){var t;switch(n.value){case"top":t=e.clientY-h.value.mouse.clientY;break;case"right":t=h.value.mouse.clientX-e.clientX;break;case"bottom":t=h.value.mouse.clientY-e.clientY;break;case"left":t=e.clientX-h.value.mouse.clientX}var a,i=(a=h.value.aside[P.value]+t,Math.min(c.value,Math.max(v.value,a),y.value-s.value)+u.value),o="".concat(i,"px");d.value?k.value.style[P.value]=o:z.value.style[n.value]=o,l("resizing",i)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",(function e(){if(z.value.style.visibility="hidden",x.value.style.display="none",document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e),document.onselectstart=null,document.ondragstart=null,(0,a.nextTick)((function(){(function(){if(!f.value)return!1;var e=k.value.getBoundingClientRect();if(b.value=p.value=e[P.value]<=M.value,!b.value)return m.value=!0,!1;O(),(0,a.nextTick)((function(){k.value.setAttribute("data-".concat(P.value),R.value[P.value])}))})(),l("after-resize",parseFloat(z.value.style[n.value]))})),d.value)return!1;k.value.style[P.value]=z.value.style[n.value]}))},setCollapse:function(e){p.value="boolean"==typeof e?e:!p.value,O(),l("collapse-change",p.value)}}},render:function(){var e,t,l,o,n,r,u=["bk-resize-layout","bk-resize-layout-".concat(this.placement),{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return(0,a.createVNode)("div",{ref:"bkResizeLayoutRef",class:u},[(0,a.createVNode)("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[(0,a.withDirectives)((0,a.createVNode)("div",{class:"bk-resize-layout-aside-content"},[null===(t=(e=this.$slots).aside)||void 0===t?void 0:t.call(e)]),[[a.vShow,this.asideContentVisible]]),(0,a.withDirectives)((0,a.createVNode)("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:(0,a.withModifiers)(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),(0,a.withDirectives)((0,a.createVNode)("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&((null===(o=(l=this.$slots)["collapse-trigger"])||void 0===o?void 0:o.call(l))||(0,a.createVNode)(i.AngleLeft,{class:"bk-resize-collapse",onClick:this.setCollapse},null))]),(0,a.createVNode)("main",{class:"bk-resize-layout-main"},[null===(r=(n=this.$slots).main)||void 0===r?void 0:r.call(n)]),(0,a.createVNode)("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}}),r=(0,e.withInstall)(l)})(),n})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon")):t(e["../shared"],e.vue,e["../icon"]);for(var i in a)("object"==typeof exports?exports:e)[i]=a[i]}}(self,((e,t,a)=>(()=>{"use strict";var i={6870:e=>{e.exports=a},4212:t=>{t.exports=e},748:e=>{e.exports=t}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={exports:{}};return i[e](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{default:()=>r});var e=o(4212);function t(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var a=o(748),i=o(6870);const l=(0,a.defineComponent)({name:"ResizeLayout",props:{placement:e.PropTypes.placement().def("left"),min:e.PropTypes.number.def(3),max:e.PropTypes.number.def(1/0),triggerWidth:e.PropTypes.number.def(5),triggerOffset:e.PropTypes.number.def(3),initialDivide:e.PropTypes.oneOfType([String,Number]).def("20%"),immediate:e.PropTypes.bool,disabled:e.PropTypes.bool,collapsible:e.PropTypes.bool,autoMinimize:e.PropTypes.oneOfType([Boolean,Number]).def(!1),border:e.PropTypes.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup:function(e,i){var l=i.emit,o=(0,a.toRefs)(e),n=o.placement,r=o.initialDivide,u=o.triggerOffset,s=o.triggerWidth,c=o.max,v=o.min,d=o.immediate,f=o.autoMinimize,p=(0,a.ref)(!1),m=(0,a.ref)(!0),b=(0,a.ref)(!1),y=(0,a.ref)(null),h=(0,a.ref)({}),g=(0,a.ref)(null),z=(0,a.ref)(null),x=(0,a.ref)(null),k=(0,a.ref)(null),w=(0,a.computed)((function(){return["left","right"].includes(n.value)})),P=(0,a.computed)((function(){return w.value?"width":"height"})),R=(0,a.computed)((function(){var e=r.value;return"number"==typeof e&&(e="".concat(e,"px")),t({},P.value,e)})),T=(0,a.computed)((function(){var e;return t(e={},"margin-".concat(n.value),"".concat(u.value-s.value,"px")),t(e,P.value,"".concat(s.value,"px")),e})),M=(0,a.computed)((function(){return f.value?"boolean"==typeof f.value?50:f.value:0})),S=new ResizeObserver((function(){var e=g.value.getBoundingClientRect();y.value=w.value?e.width:e.height})),C=function(){var e=k.value.getBoundingClientRect();O(!p.value),p.value?(k.value.setAttribute("data-".concat(P.value),"".concat(e[P.value],"px")),k.value.style[P.value]="5px"):(m.value=!0,k.value.style[P.value]=k.value.getAttribute("data-".concat(P.value)))},O=function(e){k.value.addEventListener("transitionend",(function t(){m.value=e,k.value.style.transition="",k.value.removeEventListener("transitionend",t)})),k.value.style.transition="".concat(P.value," cubic-bezier(0.4, 0, 0.2, 1) .3s")};return(0,a.onMounted)((function(){S.observe(g.value)})),(0,a.onBeforeUnmount)((function(){S.unobserve(g.value)})),{collapsed:p,asideContentVisible:m,minimized:b,limitMax:y,state:h,vertical:w,cssPropKey:P,bkResizeLayoutRef:g,resizeProxyRef:z,resizeMaskRef:x,asideRef:k,triggerStyle:T,asideStyle:R,handleMousedown:function(e){l("before-resize",e);var t=k.value.getBoundingClientRect();h.value=Object.freeze({mouse:{clientX:e.clientX,clientY:e.clientY},aside:{width:t.width,height:t.height}}),x.value.style.display="block",x.value.style.cursor=w.value?"col-resize":"row-resize",d.value||function(){switch(z.value.style.visibility="visible",n.value){case"left":z.value.style.inset="0 auto auto ".concat(h.value.aside.width,"px");break;case"right":z.value.style.inset="0 ".concat(h.value.aside.width,"px auto auto");break;case"top":z.value.style.inset="".concat(h.value.aside.height,"px auto auto 0");break;case"bottom":z.value.style.inset="auto auto ".concat(h.value.aside.height,"px 0")}}(),document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};var i=function(e){var t;switch(n.value){case"top":t=e.clientY-h.value.mouse.clientY;break;case"right":t=h.value.mouse.clientX-e.clientX;break;case"bottom":t=h.value.mouse.clientY-e.clientY;break;case"left":t=e.clientX-h.value.mouse.clientX}var a,i=(a=h.value.aside[P.value]+t,Math.min(c.value,Math.max(v.value,a),y.value-s.value)+u.value),o="".concat(i,"px");d.value?k.value.style[P.value]=o:z.value.style[n.value]=o,l("resizing",i)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",(function e(){if(z.value.style.visibility="hidden",x.value.style.display="none",document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e),document.onselectstart=null,document.ondragstart=null,(0,a.nextTick)((function(){(function(){if(!f.value)return!1;var e=k.value.getBoundingClientRect();if(b.value=p.value=e[P.value]<=M.value,!b.value)return m.value=!0,!1;C(),(0,a.nextTick)((function(){k.value.setAttribute("data-".concat(P.value),R.value[P.value])}))})(),l("after-resize",parseFloat(z.value.style[n.value]))})),d.value)return!1;k.value.style[P.value]=z.value.style[n.value]}))},setCollapse:function(e){p.value="boolean"==typeof e?e:!p.value,C(),l("collapse-change",p.value)}}},render:function(){var e,t,l,o,n,r,u=["bk-resize-layout","bk-resize-layout-".concat(this.placement),{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return(0,a.createVNode)("div",{ref:"bkResizeLayoutRef",class:u},[(0,a.createVNode)("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[(0,a.withDirectives)((0,a.createVNode)("div",{class:"bk-resize-layout-aside-content"},[null===(t=(e=this.$slots).aside)||void 0===t?void 0:t.call(e)]),[[a.vShow,this.asideContentVisible]]),(0,a.withDirectives)((0,a.createVNode)("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:(0,a.withModifiers)(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),(0,a.withDirectives)((0,a.createVNode)("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&((null===(o=(l=this.$slots)["collapse-trigger"])||void 0===o?void 0:o.call(l))||(this.collapsed?(0,a.createVNode)(i.AngleRight,{class:"bk-resize-collapse",onClick:this.setCollapse},null):(0,a.createVNode)(i.AngleLeft,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),(0,a.createVNode)("main",{class:"bk-resize-layout-main"},[null===(r=(n=this.$slots).main)||void 0===r?void 0:r.call(n)]),(0,a.createVNode)("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}}),r=(0,e.withInstall)(l)})(),n})()));
@@ -251,6 +251,10 @@
251
251
  align-items: center;
252
252
  justify-content: space-between;
253
253
  }
254
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-hover {
255
+ color: #3a84ff;
256
+ background-color: #f5f7fa;
257
+ }
254
258
  .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option:hover {
255
259
  color: #63656e;
256
260
  background-color: #f5f7fa;
@@ -264,6 +268,15 @@
264
268
  cursor: not-allowed;
265
269
  background-color: transparent;
266
270
  }
271
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-multiple.is-selected {
272
+ background-color: #fff;
273
+ }
274
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-multiple.is-hover {
275
+ background-color: #f5f7fa;
276
+ }
277
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-multiple:hover {
278
+ background-color: #f5f7fa;
279
+ }
267
280
  .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-options-loading {
268
281
  display: flex;
269
282
  align-items: center;
@@ -257,10 +257,10 @@
257
257
  justify-content: space-between;
258
258
  }
259
259
 
260
- // &.is-hover {
261
- // color: #3a84ff;
262
- // background-color: #f5f7fa;
263
- // }
260
+ &.is-hover {
261
+ color: #3a84ff;
262
+ background-color: #f5f7fa;
263
+ }
264
264
 
265
265
  &:hover {
266
266
  color: #63656e;
@@ -277,6 +277,20 @@
277
277
  cursor: not-allowed;
278
278
  background-color: transparent;
279
279
  }
280
+
281
+ &.is-multiple {
282
+ &.is-selected {
283
+ background-color: #fff
284
+ }
285
+
286
+ &.is-hover {
287
+ background-color: #f5f7fa;
288
+ }
289
+
290
+ &:hover {
291
+ background-color: #f5f7fa;
292
+ }
293
+ }
280
294
  }
281
295
 
282
296
  .bk-select-options-loading {
@@ -353,6 +353,10 @@
353
353
  align-items: center;
354
354
  justify-content: space-between;
355
355
  }
356
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-hover {
357
+ color: #3a84ff;
358
+ background-color: #f5f7fa;
359
+ }
356
360
  .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option:hover {
357
361
  color: #63656e;
358
362
  background-color: #f5f7fa;
@@ -366,6 +370,15 @@
366
370
  cursor: not-allowed;
367
371
  background-color: transparent;
368
372
  }
373
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-multiple.is-selected {
374
+ background-color: #fff;
375
+ }
376
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-multiple.is-hover {
377
+ background-color: #f5f7fa;
378
+ }
379
+ .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-option.is-multiple:hover {
380
+ background-color: #f5f7fa;
381
+ }
369
382
  .bk-popover2.bk-pop2-content.bk-select-popover .bk-select-content .bk-select-options-loading {
370
383
  display: flex;
371
384
  align-items: center;