bkui-vue 0.0.1-beta.96 → 0.0.1-beta.99
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 +27 -27
- package/dist/index.esm.js +2152 -480
- package/dist/index.umd.js +24 -24
- package/dist/style.css +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -1
- package/lib/icon/folder.js +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/message/messageConstructor.d.ts +1 -1
- package/lib/navigation/index.d.ts +20 -1
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation.css +0 -1
- package/lib/navigation/navigation.d.ts +9 -0
- package/lib/navigation/navigation.less +0 -1
- package/lib/navigation/navigation.variable.css +0 -1
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/popover2/arrow.d.ts +2 -0
- package/lib/popover2/content.d.ts +24 -0
- package/lib/popover2/index.d.ts +428 -0
- package/lib/popover2/index.js +1 -0
- package/lib/popover2/popover2.css +25 -0
- package/lib/popover2/popover2.d.ts +180 -0
- package/lib/popover2/popover2.less +35 -0
- package/lib/popover2/popover2.variable.css +124 -0
- package/lib/popover2/props.d.ts +92 -0
- package/lib/popover2/reference.d.ts +2 -0
- package/lib/popover2/use-floating.d.ts +15 -0
- package/lib/popover2/use-popper-id.d.ts +5 -0
- package/lib/select/index.d.ts +54 -1
- package/lib/select/index.js +1 -1
- package/lib/select/select.css +92 -47
- package/lib/select/select.d.ts +25 -0
- package/lib/select/select.less +6 -5
- package/lib/select/select.variable.css +92 -47
- package/lib/shared/index.js +1 -1
- package/lib/shared/pop-manager.d.ts +1 -1
- package/lib/shared/popover.d.ts +1 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +5 -0
- package/lib/table/table.less +6 -0
- package/lib/table/table.variable.css +5 -0
- package/lib/table/use-common.d.ts +4 -22
- package/lib/table/utils.d.ts +4 -1
- package/lib/tree/index.js +1 -1
- package/package.json +2 -1
- package/lib/icon/funnel.js +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue")):t(e["../shared"],e.vue);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t)=>(()=>{var n={8022:(e,t,n)=>{var o=n(4481),r=n(6426),i=r;i.v1=o,i.v4=r,e.exports=i},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},4481:(e,t,n)=>{var o,r,i=n(9157),l=n(8725),a=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],u=(e=e||{}).node||o,d=void 0!==e.clockseq?e.clockseq:r;if(null==u||null==d){var p=i();null==u&&(u=o=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=r=16383&(p[6]<<8|p[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:s+1,v=m-a+(h-s)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||m>a)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=m,s=h,r=d;var g=(1e4*(268435455&(m+=122192928e5))+h)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var y=m/4294967296*1e4&268435455;f[c++]=y>>>8&255,f[c++]=255&y,f[c++]=y>>>24&15|16,f[c++]=y>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var w=0;w<6;++w)f[c+w]=u[w];return t||l(f)}},6426:(e,t,n)=>{var o=n(9157),r=n(8725);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var l=(e=e||{}).random||(e.rng||o)();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t)for(var a=0;a<16;++a)t[i+a]=l[a];return t||r(l)}},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return n[e](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.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";r.r(i),r.d(i,{default:()=>ye});var e=r(4212);function t(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}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw r}}return i}}(e,n)||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,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var o=r(748);const l=(0,o.defineComponent)({name:"PopArrow",render:function(){var t=(0,e.resolveClassName)("pop2-arrow");return(0,o.createVNode)("div",{class:t},null)}}),a=(0,o.defineComponent)({name:"PopContent",props:{width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto")},setup:function(e){var t=function(e){return/^\d+\.?\d*$/.test("".concat(e))?"".concat(e,"px"):e};return{style:(0,o.computed)((function(){return{width:t(e.width),height:t(e.height)}}))}},render:function(){var t,n,r,i,l,a,s=[(0,e.resolveClassName)("popover2"),(0,e.resolveClassName)("pop2-content")];return(0,o.createVNode)("div",{class:s,tabindex:"-1",style:this.style},[null!==(r=null===(n=(t=this.$slots).default)||void 0===n?void 0:n.call(t))&&void 0!==r?r:"",null!==(a=null===(l=(i=this.$slots).arrow)||void 0===l?void 0:l.call(i))&&void 0!==a?a:""])}});var s={onAfterHidden:Function,onAfterShow:Function},c=Object.assign({isShow:e.PropTypes.bool.def(!1),always:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),width:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),height:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def("auto"),content:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number]).def(""),placement:e.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:e.PropTypes.string.def("dark"),trigger:e.PropTypes.string.def("hover"),arrow:e.PropTypes.bool.def(!0),padding:e.PropTypes.number.def(5),offset:e.PropTypes.number.def(6),boundary:e.PropTypes.string.def(void 0),zIndex:e.PropTypes.number.def(void 0),disableTeleport:e.PropTypes.bool.def(!1),autoPlacement:e.PropTypes.bool.def(!1)},s);const f=(0,o.defineComponent)({name:"PopReference",render:function(){var e,t,n;return null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""}});function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function m(e){return["top","bottom"].includes(d(e))?"x":"y"}function h(e){return"y"===e?"height":"width"}function v(e,t,n){let{reference:o,floating:r}=e;const i=o.x+o.width/2-r.width/2,l=o.y+o.height/2-r.height/2,a=m(t),s=h(a),c=o[s]/2-r[s]/2,f="x"===a;let u;switch(d(t)){case"top":u={x:i,y:o.y-r.height};break;case"bottom":u={x:i,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:l};break;case"left":u={x:o.x-r.width,y:l};break;default:u={x:o.x,y:o.y}}switch(p(t)){case"start":u[a]-=c*(n&&f?-1:1);break;case"end":u[a]+=c*(n&&f?-1:1)}return u}function g(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function y(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function w(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=t,m=g(p),h=a[d?"floating"===u?"reference":"floating":u],v=y(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:s})),w=y(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===u?{...l.floating,x:o,y:r}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[u]);return{top:v.top-w.top+m.top,bottom:w.bottom-v.bottom+m.bottom,left:v.left-w.left+m.left,right:w.right-v.right+m.right}}const b=Math.min,x=Math.max;function T(e,t,n){return x(e,b(t,n))}const P=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:o=0}=null!=e?e:{},{x:r,y:i,placement:l,rects:a,platform:s}=t;if(null==n)return{};const c=g(o),f={x:r,y:i},u=m(l),d=p(l),v=h(u),y=await s.getDimensions(n),w="y"===u?"top":"left",b="y"===u?"bottom":"right",x=a.reference[v]+a.reference[u]-f[u]-a.floating[v],P=f[u]-a.reference[u],R=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n));let A=R?"y"===u?R.clientHeight||0:R.clientWidth||0:0;0===A&&(A=a.floating[v]);const C=x/2-P/2,O=c[w],E=A-y[v]-c[b],L=A/2-y[v]/2+C,S=T(O,L,E),N=("start"===d?c[w]:c[b])>0&&L!==S&&a.reference[v]<=a.floating[v];return{[u]:f[u]-(N?L<O?O-L:E-L:0),data:{[u]:S,centerOffset:L-S}}}}),R={left:"right",right:"left",bottom:"top",top:"bottom"};function A(e){return e.replace(/left|right|bottom|top/g,(e=>R[e]))}function C(e,t,n){void 0===n&&(n=!1);const o=p(e),r=m(e),i=h(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=A(l)),{main:l,cross:A(l)}}const O={start:"end",end:"start"};function E(e){return e.replace(/start|end/g,(e=>O[e]))}const L=["top","right","bottom","left"],S=L.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]),N=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,r,i,l;const{x:a,y:s,rects:c,middlewareData:f,placement:u,platform:m,elements:h}=t,{alignment:v=null,allowedPlacements:g=S,autoAlignment:y=!0,...b}=e,x=function(e,t,n){return(e?[...n.filter((t=>p(t)===e)),...n.filter((t=>p(t)!==e))]:n.filter((e=>d(e)===e))).filter((n=>!e||p(n)===e||!!t&&E(n)!==n))}(v,y,g),T=await w(t,b),P=null!=(n=null==(o=f.autoPlacement)?void 0:o.index)?n:0,R=x[P];if(null==R)return{};const{main:A,cross:O}=C(R,c,await(null==m.isRTL?void 0:m.isRTL(h.floating)));if(u!==R)return{x:a,y:s,reset:{placement:x[0]}};const L=[T[d(R)],T[A],T[O]],N=[...null!=(r=null==(i=f.autoPlacement)?void 0:i.overflows)?r:[],{placement:R,overflows:L}],H=x[P+1];if(H)return{data:{index:P+1,overflows:N},reset:{placement:H}};const V=N.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),j=null==(l=V.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:l.placement,k=null!=j?j:V[0].placement;return k!==u?{data:{index:P+1,overflows:N},reset:{placement:k}}:{}}}},H=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:s}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",flipAlignment:m=!0,...h}=e,v=d(o),g=u||(v!==l&&m?function(e){const t=A(e);return[E(e),t,E(t)]}(l):[A(l)]),y=[l,...g],b=await w(t,h),x=[];let T=(null==(n=r.flip)?void 0:n.overflows)||[];if(c&&x.push(b[v]),f){const{main:e,cross:t}=C(o,i,await(null==a.isRTL?void 0:a.isRTL(s.floating)));x.push(b[e],b[t])}if(T=[...T,{placement:o,overflows:x}],!x.every((e=>e<=0))){var P,R;const e=(null!=(P=null==(R=r.flip)?void 0:R.index)?P:0)+1,t=y[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(p){case"bestFit":{var O;const e=null==(O=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}};function V(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function j(e){return L.some((t=>e[t]>=0))}const k=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:o}=e;switch(t){case"referenceHidden":{const t=V(await w(e,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:j(t)}}}case"escaped":{const t=V(await w(e,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:t,escaped:j(t)}}}default:return{}}}}},D=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,r=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=d(n),a=p(n),s="x"===m(n),c=["left","top"].includes(l)?-1:1,f=i&&s?-1:1,u="function"==typeof t?t(e):t;let{mainAxis:h,crossAxis:v,alignmentAxis:g}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof g&&(v="end"===a?-1*g:g),s?{x:v*f,y:h*c}:{x:h*c,y:v*f}}(t,e);return{x:n+r.x,y:o+r.y,data:r}}}};const M=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=e,c={x:n,y:o},f=await w(t,s),u=m(d(r)),p=function(e){return"x"===e?"y":"x"}(u);let h=c[u],v=c[p];if(i){const e="y"===u?"bottom":"right";h=T(h+f["y"===u?"top":"left"],h,h-f[e])}if(l){const e="y"===p?"bottom":"right";v=T(v+f["y"===p?"top":"left"],v,v-f[e])}const g=a.fn({...t,[u]:h,[p]:v});return{...g,data:{x:g.x-n,y:g.y-o}}}}},I=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:o,elements:r,rects:i,platform:l,strategy:a}=t,{padding:s=2,x:c,y:f}=e,u=y(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:i.reference,offsetParent:await(null==l.getOffsetParent?void 0:l.getOffsetParent(r.floating)),strategy:a}):i.reference),p=null!=(n=await(null==l.getClientRects?void 0:l.getClientRects(r.reference)))?n:[],h=g(s),v=await l.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===p.length&&p[0].left>p[1].right&&null!=c&&null!=f)return null!=(e=p.find((e=>c>e.left-h.left&&c<e.right+h.right&&f>e.top-h.top&&f<e.bottom+h.bottom)))?e:u;if(p.length>=2){if("x"===m(o)){const e=p[0],t=p[p.length-1],n="top"===d(o),r=e.top,i=t.bottom,l=n?e.left:t.left,a=n?e.right:t.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const e="left"===d(o),t=x(...p.map((e=>e.right))),n=b(...p.map((e=>e.left))),r=p.filter((o=>e?o.left===n:o.right===t)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:n,right:t,width:t-n,height:l-i,x:n,y:i}}return u}},floating:r.floating,strategy:a});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};function $(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function W(e){if(null==e)return window;if(!$(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function q(e){return W(e).getComputedStyle(e)}function z(e){return $(e)?"":e?(e.nodeName||"").toLowerCase():""}function F(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function B(e){return e instanceof W(e).HTMLElement}function U(e){return e instanceof W(e).Element}function _(e){return"undefined"!=typeof ShadowRoot&&(e instanceof W(e).ShadowRoot||e instanceof ShadowRoot)}function X(e){const{overflow:t,overflowX:n,overflowY:o}=q(e);return/auto|scroll|overlay|hidden/.test(t+o+n)}function Y(e){return["table","td","th"].includes(z(e))}function Z(e){const t=/firefox/i.test(F()),n=q(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function G(){return!/^((?!chrome|android).)*safari/i.test(F())}const J=Math.min,K=Math.max,Q=Math.round;function ee(e,t,n){var o,r,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&B(e)&&(s=e.offsetWidth>0&&Q(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Q(a.height)/e.offsetHeight||1);const f=U(e)?W(e):window,u=!G()&&n,d=(a.left+(u&&null!=(o=null==(r=f.visualViewport)?void 0:r.offsetLeft)?o:0))/s,p=(a.top+(u&&null!=(i=null==(l=f.visualViewport)?void 0:l.offsetTop)?i:0))/c,m=a.width/s,h=a.height/c;return{width:m,height:h,top:p,right:d+m,bottom:p+h,left:d,x:d,y:p}}function te(e){return(t=e,(t instanceof W(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function ne(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function oe(e){return ee(te(e)).left+ne(e).scrollLeft}function re(e,t,n){const o=B(t),r=te(t),i=ee(e,o&&function(e){const t=ee(e);return Q(t.width)!==e.offsetWidth||Q(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==z(t)||X(r))&&(l=ne(t)),B(t)){const e=ee(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else r&&(a.x=oe(r));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function ie(e){return"html"===z(e)?e:e.assignedSlot||e.parentNode||(_(e)?e.host:null)||te(e)}function le(e){return B(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function ae(e){const t=W(e);let n=le(e);for(;n&&Y(n)&&"static"===getComputedStyle(n).position;)n=le(n);return n&&("html"===z(n)||"body"===z(n)&&"static"===getComputedStyle(n).position&&!Z(n))?t:n||function(e){let t=ie(e);for(_(t)&&(t=t.host);B(t)&&!["html","body"].includes(z(t));){if(Z(t))return t;t=t.parentNode}return null}(e)||t}function se(e){if(B(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ee(e);return{width:t.width,height:t.height}}function ce(e){const t=ie(e);return["html","body","#document"].includes(z(t))?e.ownerDocument.body:B(t)&&X(t)?t:ce(t)}function fe(e,t){var n;void 0===t&&(t=[]);const o=ce(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=W(o),l=r?[i].concat(i.visualViewport||[],X(o)?o:[]):o,a=t.concat(l);return r?a:a.concat(fe(l))}function ue(e,t,n){return"viewport"===t?y(function(e,t){const n=W(e),o=te(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,s=0;if(r){i=r.width,l=r.height;const e=G();(e||!e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):U(t)?function(e,t){const n=ee(e,!1,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft;return{top:o,left:r,x:r,y:o,right:r+e.clientWidth,bottom:o+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):y(function(e){var t;const n=te(e),o=ne(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=K(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=K(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let a=-o.scrollLeft+oe(e);const s=-o.scrollTop;return"rtl"===q(r||n).direction&&(a+=K(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(te(e)))}function de(e){const t=fe(e),n=["absolute","fixed"].includes(q(e).position)&&B(e)?ae(e):e;return U(n)?t.filter((e=>U(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==z(e))):[]}const pe={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?de(t):[].concat(n),o],l=i[0],a=i.reduce(((e,n)=>{const o=ue(t,n,r);return e.top=K(o.top,e.top),e.right=J(o.right,e.right),e.bottom=J(o.bottom,e.bottom),e.left=K(o.left,e.left),e}),ue(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:o}=e;const r=B(n),i=te(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==z(n)||X(i))&&(l=ne(n)),B(n))){const e=ee(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:U,getDimensions:se,getOffsetParent:ae,getDocumentElement:te,getElementRects:e=>{let{reference:t,floating:n,strategy:o}=e;return{reference:re(t,ae(n),o),floating:{...se(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===q(e).direction},me=function(t,n,r,i,l){var a=(0,o.ref)(t.isShow),s=["dark","light"],c=(0,o.computed)((function(){var e=t.theme.split(/\s+/);return e.sort((function(e,t){return Number(s.includes(t))-Number(s.includes(e))})),{systemThemes:e,customThemes:e.filter((function(e){return!s.includes(e)}))}})),f=function(){var e,n,o;return{elReference:d(null===(e=r.value)||void 0===e?void 0:e.$el),elContent:d(null===(n=i.value)||void 0===n?void 0:n.$el),elArrow:t.arrow?d(null===(o=l.value)||void 0===o?void 0:o.$el):null}},d=function e(t){return t instanceof HTMLElement?t:t instanceof Text?e(t.nextElementSibling):null},p=c.value.customThemes.join(" "),m=c.value.customThemes.reduce((function(e,t){return Object.assign(u({},"data-".concat(t,"-theme"),!0),e)}),{}),h="".concat(p),g=null,y=function(){var e=f(),n=e.elReference,o=e.elContent,r=e.elArrow,i=function(e){return{placement:t.placement,middleware:[I(),D(t.offset),t.autoPlacement?N():H(),M({padding:t.padding}),P({element:e}),k()]}}(r);g=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=!0,animationFrame:a=!1}=o,s=r&&!a,c=i&&!a,f=s||c?[...U(e)?fe(e):[],...fe(t)]:[];f.forEach((e=>{s&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));let u,d=null;l&&(d=new ResizeObserver(n),U(e)&&!a&&d.observe(e),d.observe(t));let p=a?ee(e):null;return a&&function t(){const o=ee(e);!p||o.x===p.x&&o.y===p.y&&o.width===p.width&&o.height===p.height||n(),p=o,u=requestAnimationFrame(t)}(),l||n(),()=>{var e;f.forEach((e=>{s&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}(n,o,(function(){((e,t,n)=>(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:f}=v(s,o,a),u=o,d={};for(let n=0;n<i.length;n++){const{name:p,fn:m}=i[n],{x:h,y:g,data:y,reset:w}=await m({x:c,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:s,platform:l,elements:{reference:e,floating:t}});c=null!=h?h:c,f=null!=g?g:f,d={...d,[p]:{...d[p],...y}},w&&("object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):w.rects),({x:c,y:f}=v(s,u,a))),n=-1)}return{x:c,y:f,placement:u,strategy:r,middlewareData:d}})(e,t,{platform:pe,...n}))(n,o,i).then((function(e){var n=e.x,i=e.y,l=e.placement,a=e.middlewareData,s=o.className;o.className="".concat(s.replace(h,"")," ").concat(h).replace(/\s+/gm," ").replace(/^\s+|\s+$/g,""),Object.keys(m).forEach((function(e){o.setAttribute(e,m[e])}));var c=a.hide.referenceHidden;if(Object.assign(o.style,{left:"".concat(n,"px"),top:"".concat(i,"px"),visibility:c?"hidden":"visible"}),t.arrow){var f=a.arrow,d=f.x,p=f.y,v=l.split("-")[0],g={top:"bottom",right:"left",bottom:"top",left:"right"}[v];r.setAttribute("data-arrow",v),Object.assign(r.style,u({left:w(d)?"".concat(d,"px"):"",top:w(p)?"".concat(p,"px"):"",right:"",bottom:""},g,"-4px"))}}))}))},w=function(e){return/^-?\d+\.?\d*$/.test("".concat(e))},b=function(){var o,r=d(null===(o=i.value)||void 0===o?void 0:o.$el);r.style.setProperty("display","block"),r.style.setProperty("z-index","".concat(t.zIndex?t.zIndex:e.bkZIndexManager.getModalNextIndex())),y(),n.emit("update:isShow",!0),n.emit("afterShow",!1)},x=function(){var e;d(null===(e=i.value)||void 0===e?void 0:e.$el).style.setProperty("display","none"),n.emit("update:isShow",!1),n.emit("afterHidden",!1)},T=function(){a.value?x():b(),a.value=!a.value};return{showPopover:b,hidePopover:x,resolveTriggerEvents:function(){var e;return null!==(e={hover:[["mouseenter",b],["mouseleave",x],["focus",b],["blur",x]],click:[["click",T]],manual:[[]]}[t.trigger])&&void 0!==e?e:[]},updatePopover:y,triggerPopover:T,resolvePopElements:f,localIsShow:a,cleanup:g}};var he=r(8022),ve=null;const ge=(0,o.defineComponent)({name:"Popover2",components:{Content:a,Arrow:l},props:c,setup:function(e,t){var r=e.content,i=e.theme,l=e.disableTeleport,a=e.width,s=e.height,c=(0,o.toRef)(e,"isShow"),f=(0,o.ref)(),u=(0,o.ref)(),d=(0,o.ref)(),p=null,m=me(e,t,f,u,d),h=m.localIsShow,v=m.showPopover,g=m.triggerPopover,y=m.resolveTriggerEvents,w=m.updatePopover,b=m.resolvePopElements,x=m.cleanup,T=function(){w(),e.always?v():P()};e.always||e.disabled||(0,o.watch)([c],(function(){h.value=e.isShow,g()})),(0,o.watch)((function(){return[e.disabled]}),(function(e){e[0]?T():R()}));var P=function(){var e=b().elReference;(p=y()).forEach((function(t){var o=n(t,2),r=o[0],i=o[1];e.addEventListener(r,i)}))},R=function(){"function"==typeof x&&x(),function(){if(null==p?void 0:p.length){var e=b().elReference;e&&p.forEach((function(t){var o=n(t,2),r=o[0],i=o[1];e.removeEventListener(r,i)})),p=null}}()};(0,o.onMounted)((function(){e.disabled||T()})),(0,o.onUnmounted)((function(){R()})),t.expose({show:function(){h.value=!0,g()},hide:function(){h.value=!1,g()}});var A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#",t=function(){return"".concat(e).concat(ve)},n=function(){return document.querySelector(t())instanceof HTMLElement};if(null===ve||!n()){ve="id_".concat((0,he.v4)());var o=document.createElement("div");o.setAttribute("id",ve),o.setAttribute("data-popper-id",ve),document.body.append(o)}return{popContainerId:ve,prefixId:t()}}(),C=A.prefixId;return{boundary:"string"==typeof e.boundary?e.boundary:C,arrow:e.arrow,refReference:f,refContent:u,refArrow:d,content:r,theme:i,disableTeleport:l,width:a,height:s}},render:function(){var e,t,n,r,i,s,c=this;return(0,o.createVNode)(o.Fragment,null,[(0,o.createVNode)(f,{ref:"refReference"},{default:function(){return[null!==(n=null===(t=(e=c.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:(0,o.createVNode)("span",null,null)]}}),(0,o.createVNode)(o.Teleport,{to:this.boundary,disabled:this.disableTeleport},{default:function(){return[(0,o.createVNode)(a,{ref:"refContent","data-theme":c.theme,width:c.width,height:c.height},{default:function(){return[null!==(s=null===(i=(r=c.$slots).content)||void 0===i?void 0:i.call(r))&&void 0!==s?s:c.content]},arrow:function(){var e,t;return c.arrow?(0,o.createVNode)(l,{ref:"refArrow"},{default:function(){return[null===(t=(e=c.$slots).arrow)||void 0===t?void 0:t.call(e)]}}):""}})]}})])}}),ye=(0,e.withInstall)(ge)})(),i})()));
|
@@ -0,0 +1,25 @@
|
|
1
|
+
.bk-popover2.bk-pop2-content {
|
2
|
+
position: absolute;
|
3
|
+
display: none;
|
4
|
+
padding: 7px 14px;
|
5
|
+
font-size: 12px;
|
6
|
+
color: #fff;
|
7
|
+
background: #26323d;
|
8
|
+
border-radius: 4px;
|
9
|
+
box-sizing: border-box;
|
10
|
+
}
|
11
|
+
.bk-popover2.bk-pop2-content .bk-pop2-arrow {
|
12
|
+
position: absolute;
|
13
|
+
width: 8px;
|
14
|
+
height: 8px;
|
15
|
+
background: #333;
|
16
|
+
transform: rotate(45deg);
|
17
|
+
}
|
18
|
+
.bk-popover2.bk-pop2-content[data-theme='light'] {
|
19
|
+
color: #26323d;
|
20
|
+
background-color: #fff;
|
21
|
+
box-shadow: 0 0 6px 0 #dcdee5;
|
22
|
+
}
|
23
|
+
.bk-popover2.bk-pop2-content[data-theme='light'] .bk-pop2-arrow {
|
24
|
+
background-color: #fff;
|
25
|
+
}
|
@@ -0,0 +1,180 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
onAfterHidden: FunctionConstructor;
|
3
|
+
onAfterShow: FunctionConstructor;
|
4
|
+
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
5
|
+
default: boolean;
|
6
|
+
} & {
|
7
|
+
default: boolean;
|
8
|
+
};
|
9
|
+
always: import("vue-types").VueTypeValidableDef<boolean> & {
|
10
|
+
default: boolean;
|
11
|
+
} & {
|
12
|
+
default: boolean;
|
13
|
+
};
|
14
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
15
|
+
default: boolean;
|
16
|
+
} & {
|
17
|
+
default: boolean;
|
18
|
+
};
|
19
|
+
width: import("vue-types").VueTypeDef<string | number> & {
|
20
|
+
default: string | number;
|
21
|
+
};
|
22
|
+
height: import("vue-types").VueTypeDef<string | number> & {
|
23
|
+
default: string | number;
|
24
|
+
};
|
25
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
26
|
+
default: string | number;
|
27
|
+
};
|
28
|
+
placement: import("vue-types").VueTypeDef<string> & {
|
29
|
+
default: string;
|
30
|
+
};
|
31
|
+
theme: import("vue-types").VueTypeValidableDef<string> & {
|
32
|
+
default: string;
|
33
|
+
} & {
|
34
|
+
default: string;
|
35
|
+
};
|
36
|
+
trigger: import("vue-types").VueTypeValidableDef<string> & {
|
37
|
+
default: string;
|
38
|
+
} & {
|
39
|
+
default: string;
|
40
|
+
};
|
41
|
+
arrow: import("vue-types").VueTypeValidableDef<boolean> & {
|
42
|
+
default: boolean;
|
43
|
+
} & {
|
44
|
+
default: boolean;
|
45
|
+
};
|
46
|
+
padding: import("vue-types").VueTypeValidableDef<number> & {
|
47
|
+
default: number;
|
48
|
+
} & {
|
49
|
+
default: number;
|
50
|
+
};
|
51
|
+
offset: import("vue-types").VueTypeValidableDef<number> & {
|
52
|
+
default: number;
|
53
|
+
} & {
|
54
|
+
default: number;
|
55
|
+
};
|
56
|
+
boundary: import("vue-types").VueTypeValidableDef<string> & {
|
57
|
+
default: string;
|
58
|
+
} & {
|
59
|
+
default: string;
|
60
|
+
};
|
61
|
+
zIndex: import("vue-types").VueTypeValidableDef<number> & {
|
62
|
+
default: number;
|
63
|
+
} & {
|
64
|
+
default: number;
|
65
|
+
};
|
66
|
+
disableTeleport: import("vue-types").VueTypeValidableDef<boolean> & {
|
67
|
+
default: boolean;
|
68
|
+
} & {
|
69
|
+
default: boolean;
|
70
|
+
};
|
71
|
+
autoPlacement: import("vue-types").VueTypeValidableDef<boolean> & {
|
72
|
+
default: boolean;
|
73
|
+
} & {
|
74
|
+
default: boolean;
|
75
|
+
};
|
76
|
+
}, {
|
77
|
+
boundary: string;
|
78
|
+
arrow: boolean;
|
79
|
+
refReference: import("vue").Ref<any>;
|
80
|
+
refContent: import("vue").Ref<any>;
|
81
|
+
refArrow: import("vue").Ref<any>;
|
82
|
+
content: string | number;
|
83
|
+
theme: string;
|
84
|
+
disableTeleport: boolean;
|
85
|
+
width: string | number;
|
86
|
+
height: string | number;
|
87
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
88
|
+
onAfterHidden: FunctionConstructor;
|
89
|
+
onAfterShow: FunctionConstructor;
|
90
|
+
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
91
|
+
default: boolean;
|
92
|
+
} & {
|
93
|
+
default: boolean;
|
94
|
+
};
|
95
|
+
always: import("vue-types").VueTypeValidableDef<boolean> & {
|
96
|
+
default: boolean;
|
97
|
+
} & {
|
98
|
+
default: boolean;
|
99
|
+
};
|
100
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
101
|
+
default: boolean;
|
102
|
+
} & {
|
103
|
+
default: boolean;
|
104
|
+
};
|
105
|
+
width: import("vue-types").VueTypeDef<string | number> & {
|
106
|
+
default: string | number;
|
107
|
+
};
|
108
|
+
height: import("vue-types").VueTypeDef<string | number> & {
|
109
|
+
default: string | number;
|
110
|
+
};
|
111
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
112
|
+
default: string | number;
|
113
|
+
};
|
114
|
+
placement: import("vue-types").VueTypeDef<string> & {
|
115
|
+
default: string;
|
116
|
+
};
|
117
|
+
theme: import("vue-types").VueTypeValidableDef<string> & {
|
118
|
+
default: string;
|
119
|
+
} & {
|
120
|
+
default: string;
|
121
|
+
};
|
122
|
+
trigger: import("vue-types").VueTypeValidableDef<string> & {
|
123
|
+
default: string;
|
124
|
+
} & {
|
125
|
+
default: string;
|
126
|
+
};
|
127
|
+
arrow: import("vue-types").VueTypeValidableDef<boolean> & {
|
128
|
+
default: boolean;
|
129
|
+
} & {
|
130
|
+
default: boolean;
|
131
|
+
};
|
132
|
+
padding: import("vue-types").VueTypeValidableDef<number> & {
|
133
|
+
default: number;
|
134
|
+
} & {
|
135
|
+
default: number;
|
136
|
+
};
|
137
|
+
offset: import("vue-types").VueTypeValidableDef<number> & {
|
138
|
+
default: number;
|
139
|
+
} & {
|
140
|
+
default: number;
|
141
|
+
};
|
142
|
+
boundary: import("vue-types").VueTypeValidableDef<string> & {
|
143
|
+
default: string;
|
144
|
+
} & {
|
145
|
+
default: string;
|
146
|
+
};
|
147
|
+
zIndex: import("vue-types").VueTypeValidableDef<number> & {
|
148
|
+
default: number;
|
149
|
+
} & {
|
150
|
+
default: number;
|
151
|
+
};
|
152
|
+
disableTeleport: import("vue-types").VueTypeValidableDef<boolean> & {
|
153
|
+
default: boolean;
|
154
|
+
} & {
|
155
|
+
default: boolean;
|
156
|
+
};
|
157
|
+
autoPlacement: import("vue-types").VueTypeValidableDef<boolean> & {
|
158
|
+
default: boolean;
|
159
|
+
} & {
|
160
|
+
default: boolean;
|
161
|
+
};
|
162
|
+
}>>, {
|
163
|
+
placement: string;
|
164
|
+
offset: number;
|
165
|
+
zIndex: number;
|
166
|
+
content: string | number;
|
167
|
+
trigger: string;
|
168
|
+
disabled: boolean;
|
169
|
+
arrow: boolean;
|
170
|
+
theme: string;
|
171
|
+
width: string | number;
|
172
|
+
height: string | number;
|
173
|
+
always: boolean;
|
174
|
+
padding: number;
|
175
|
+
isShow: boolean;
|
176
|
+
boundary: string;
|
177
|
+
disableTeleport: boolean;
|
178
|
+
autoPlacement: boolean;
|
179
|
+
}>;
|
180
|
+
export default _default;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@import '../styles/themes/themes.less';
|
2
|
+
|
3
|
+
|
4
|
+
.@{bk-prefix}-popover2 {
|
5
|
+
&.@{bk-prefix}-pop2-content {
|
6
|
+
position: absolute;
|
7
|
+
display: none;
|
8
|
+
|
9
|
+
padding: 7px 14px;
|
10
|
+
|
11
|
+
font-size: 12px;
|
12
|
+
color: #fff;
|
13
|
+
background: #26323d;
|
14
|
+
border-radius: 4px;
|
15
|
+
box-sizing: border-box;
|
16
|
+
|
17
|
+
.@{bk-prefix}-pop2-arrow {
|
18
|
+
position: absolute;
|
19
|
+
width: 8px;
|
20
|
+
height: 8px;
|
21
|
+
background: #333;
|
22
|
+
transform: rotate(45deg);
|
23
|
+
}
|
24
|
+
|
25
|
+
&[data-theme='light'] {
|
26
|
+
color: #26323d;
|
27
|
+
background-color: #fff;
|
28
|
+
box-shadow: 0 0 6px 0 #dcdee5;
|
29
|
+
|
30
|
+
.@{bk-prefix}-pop2-arrow {
|
31
|
+
background-color: #fff;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,124 @@
|
|
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: 38px;
|
23
|
+
--border-width-base: 1px;
|
24
|
+
--border-style-base: solid;
|
25
|
+
--border-radius-base: 2px;
|
26
|
+
--input-disabled-bg: #fafbfd;
|
27
|
+
--input-disabled-border: var(--disable-color);
|
28
|
+
--input-height-base: var(--component-size-base);
|
29
|
+
--input-color: var(--default-color);
|
30
|
+
--input-bg: white;
|
31
|
+
--input-border-color: var(--light-gray);
|
32
|
+
--input-broder-radius: 3px;
|
33
|
+
--input-shadow-color: #a3c5fd;
|
34
|
+
--input-horizontal-padding: 10px;
|
35
|
+
--input-block-color: #f4f6fa;
|
36
|
+
--input-icon-size: var(--font-size-large);
|
37
|
+
--input-maxlength-color: #979ba5;
|
38
|
+
--button-primary-hover-color: #5594fa;
|
39
|
+
--button-danger-hover-color: #ff5656;
|
40
|
+
--button-success-hover-color: #45e35f;
|
41
|
+
--button-warning-hover-color: #ffb848;
|
42
|
+
--button-default-hover-border-color: #979ba5;
|
43
|
+
--button-primary-active-color: #2c77f4;
|
44
|
+
--button-danger-active-color: #db2626;
|
45
|
+
--button-success-active-color: #1ab943;
|
46
|
+
--button-warning-active-color: #eb9000;
|
47
|
+
--fixed-navbar-background: #fff;
|
48
|
+
--fixed-navbar-boxshadow-color: rgba(0, 0, 0, 0.1);
|
49
|
+
--switch-default-color: #fff;
|
50
|
+
--switch-grey-color: #c4c6cc;
|
51
|
+
--breadcrumb-black-color: #979ba5;
|
52
|
+
--breadcrumb-primary-hover-color: #0082ff;
|
53
|
+
--breadcrumb-fn-main-color: #63656e;
|
54
|
+
--link-default-hover-color: #979ba5;
|
55
|
+
--link-primary-hover-color: #699df4;
|
56
|
+
--link-success-hover-color: #45e35f;
|
57
|
+
--link-warning-hover-color: #ffb848;
|
58
|
+
--link-danger-hover-color: #ff5656;
|
59
|
+
--link-default-disabled-color: #dcdee5;
|
60
|
+
--link-primary-disabled-color: #a3c5fd;
|
61
|
+
--link-success-disabled-color: #94f5a4;
|
62
|
+
--link-warning-disabled-color: #ffd695;
|
63
|
+
--link-danger-disabled-color: #fd9c9c;
|
64
|
+
--message-color: var(--default-color);
|
65
|
+
--message-primary-bg-color: #f0f8ff;
|
66
|
+
--message-primary-border-color: #e1ecff;
|
67
|
+
--message-warning-bg-color: #fff4e2;
|
68
|
+
--message-warning-border-color: #ffe8c3;
|
69
|
+
--message-success-bg-color: #f2fff4;
|
70
|
+
--message-success-border-color: #dcffe2;
|
71
|
+
--message-danger-bg-color: #ffeded;
|
72
|
+
--message-danger-border-color: #ffdddd;
|
73
|
+
--slider-default-bg: #dcdee5;
|
74
|
+
--slider-disable-bar-bg: #979ba5;
|
75
|
+
--menu-bg-color: #182132;
|
76
|
+
--submenu-bg-color: #151d2c;
|
77
|
+
--menu-active-bg-color: linear-gradient(90deg, #3f87ff 0%, #3a84ff 100%);
|
78
|
+
--menu-color: #96a2b9;
|
79
|
+
--menu-group-color: var(--default-color);
|
80
|
+
--menu-width: 260px;
|
81
|
+
--menu-collapse-width: 60px;
|
82
|
+
--menu-active-color: white;
|
83
|
+
--nav-header-bg-color: #182132;
|
84
|
+
--nav-bg-color: #182132;
|
85
|
+
--date-picker-disabled-bg: #fafbfd;
|
86
|
+
--date-picker-dropdown-mb: 4px;
|
87
|
+
--date-picker-dropdown-bg: #fff;
|
88
|
+
--table-bg-color: var(--white-color);
|
89
|
+
--table-border-color: #dcdee5;
|
90
|
+
--table-head-bg-color: #fafbfd;
|
91
|
+
--table-head-font-color: #313238;
|
92
|
+
--table-body-font-color: #575961;
|
93
|
+
--table-row-hover-bg-color: #f5f7fa;
|
94
|
+
--table-row-active-bg-color: #f0f1f5;
|
95
|
+
--cascader-panel-border-color: #dcdee5;
|
96
|
+
--cascader-panel-hover: #eaf3ff;
|
97
|
+
--cascader-panel-active: #f4f6fa;
|
98
|
+
--cascader-panel-disabled-bg: #fff;
|
99
|
+
}
|
100
|
+
.bk-popover2.bk-pop2-content {
|
101
|
+
position: absolute;
|
102
|
+
display: none;
|
103
|
+
padding: 7px 14px;
|
104
|
+
font-size: 12px;
|
105
|
+
color: #fff;
|
106
|
+
background: #26323d;
|
107
|
+
border-radius: 4px;
|
108
|
+
box-sizing: border-box;
|
109
|
+
}
|
110
|
+
.bk-popover2.bk-pop2-content .bk-pop2-arrow {
|
111
|
+
position: absolute;
|
112
|
+
width: 8px;
|
113
|
+
height: 8px;
|
114
|
+
background: #333;
|
115
|
+
transform: rotate(45deg);
|
116
|
+
}
|
117
|
+
.bk-popover2.bk-pop2-content[data-theme='light'] {
|
118
|
+
color: #26323d;
|
119
|
+
background-color: #fff;
|
120
|
+
box-shadow: 0 0 6px 0 #dcdee5;
|
121
|
+
}
|
122
|
+
.bk-popover2.bk-pop2-content[data-theme='light'] .bk-pop2-arrow {
|
123
|
+
background-color: #fff;
|
124
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
2
|
+
export declare const PopoverProps: {
|
3
|
+
onAfterHidden: FunctionConstructor;
|
4
|
+
onAfterShow: FunctionConstructor;
|
5
|
+
isShow: import("vue-types").VueTypeValidableDef<boolean> & {
|
6
|
+
default: boolean;
|
7
|
+
} & {
|
8
|
+
default: boolean;
|
9
|
+
};
|
10
|
+
always: import("vue-types").VueTypeValidableDef<boolean> & {
|
11
|
+
default: boolean;
|
12
|
+
} & {
|
13
|
+
default: boolean;
|
14
|
+
};
|
15
|
+
disabled: import("vue-types").VueTypeValidableDef<boolean> & {
|
16
|
+
default: boolean;
|
17
|
+
} & {
|
18
|
+
default: boolean;
|
19
|
+
};
|
20
|
+
width: import("vue-types").VueTypeDef<string | number> & {
|
21
|
+
default: string | number;
|
22
|
+
};
|
23
|
+
height: import("vue-types").VueTypeDef<string | number> & {
|
24
|
+
default: string | number;
|
25
|
+
};
|
26
|
+
content: import("vue-types").VueTypeDef<string | number> & {
|
27
|
+
default: string | number;
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* 组件显示位置
|
31
|
+
*/
|
32
|
+
placement: import("vue-types").VueTypeDef<string> & {
|
33
|
+
default: string;
|
34
|
+
};
|
35
|
+
theme: import("vue-types").VueTypeValidableDef<string> & {
|
36
|
+
default: string;
|
37
|
+
} & {
|
38
|
+
default: string;
|
39
|
+
};
|
40
|
+
/**
|
41
|
+
* 触发方式
|
42
|
+
* 支持 click hover manual
|
43
|
+
* manual: 通过isShow控制显示、隐藏
|
44
|
+
*/
|
45
|
+
trigger: import("vue-types").VueTypeValidableDef<string> & {
|
46
|
+
default: string;
|
47
|
+
} & {
|
48
|
+
default: string;
|
49
|
+
};
|
50
|
+
arrow: import("vue-types").VueTypeValidableDef<boolean> & {
|
51
|
+
default: boolean;
|
52
|
+
} & {
|
53
|
+
default: boolean;
|
54
|
+
};
|
55
|
+
padding: import("vue-types").VueTypeValidableDef<number> & {
|
56
|
+
default: number;
|
57
|
+
} & {
|
58
|
+
default: number;
|
59
|
+
};
|
60
|
+
offset: import("vue-types").VueTypeValidableDef<number> & {
|
61
|
+
default: number;
|
62
|
+
} & {
|
63
|
+
default: number;
|
64
|
+
};
|
65
|
+
/**
|
66
|
+
* 弹出内容绑定元素
|
67
|
+
*/
|
68
|
+
boundary: import("vue-types").VueTypeValidableDef<string> & {
|
69
|
+
default: string;
|
70
|
+
} & {
|
71
|
+
default: string;
|
72
|
+
};
|
73
|
+
zIndex: import("vue-types").VueTypeValidableDef<number> & {
|
74
|
+
default: number;
|
75
|
+
} & {
|
76
|
+
default: number;
|
77
|
+
};
|
78
|
+
disableTeleport: import("vue-types").VueTypeValidableDef<boolean> & {
|
79
|
+
default: boolean;
|
80
|
+
} & {
|
81
|
+
default: boolean;
|
82
|
+
};
|
83
|
+
/**
|
84
|
+
* chooses the placement that has the most space available automatically
|
85
|
+
*/
|
86
|
+
autoPlacement: import("vue-types").VueTypeValidableDef<boolean> & {
|
87
|
+
default: boolean;
|
88
|
+
} & {
|
89
|
+
default: boolean;
|
90
|
+
};
|
91
|
+
};
|
92
|
+
export declare type PopoverPropTypes = Readonly<ExtractPropTypes<typeof PopoverProps>>;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare const _default: (props: any, ctx: any, refReference: any, refContent: any, refArrow: any) => {
|
2
|
+
showPopover: () => void;
|
3
|
+
hidePopover: () => void;
|
4
|
+
resolveTriggerEvents: () => any;
|
5
|
+
updatePopover: () => void;
|
6
|
+
triggerPopover: () => void;
|
7
|
+
resolvePopElements: () => {
|
8
|
+
elReference: any;
|
9
|
+
elContent: any;
|
10
|
+
elArrow: any;
|
11
|
+
};
|
12
|
+
localIsShow: any;
|
13
|
+
cleanup: any;
|
14
|
+
};
|
15
|
+
export default _default;
|
package/lib/select/index.d.ts
CHANGED
@@ -27,6 +27,9 @@ declare const BkSelect: {
|
|
27
27
|
loadingText: string;
|
28
28
|
selectAllText: string;
|
29
29
|
scrollLoading: boolean;
|
30
|
+
popoverOptions: {
|
31
|
+
[key: string]: any;
|
32
|
+
};
|
30
33
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
31
34
|
modelValue: import("vue-types").VueTypeValidableDef<any>;
|
32
35
|
multiple: import("vue-types").VueTypeValidableDef<boolean> & {
|
@@ -129,13 +132,24 @@ declare const BkSelect: {
|
|
129
132
|
} & {
|
130
133
|
default: boolean;
|
131
134
|
};
|
135
|
+
popoverOptions: import("vue-types").VueTypeValidableDef<{
|
136
|
+
[key: string]: any;
|
137
|
+
}> & {
|
138
|
+
default: () => {
|
139
|
+
[key: string]: any;
|
140
|
+
};
|
141
|
+
} & {
|
142
|
+
default: () => {
|
143
|
+
[key: string]: any;
|
144
|
+
};
|
145
|
+
};
|
132
146
|
}>> & {
|
133
147
|
onChange?: (...args: any[]) => any;
|
134
148
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
135
149
|
onClear?: (...args: any[]) => any;
|
136
150
|
onToggle?: (...args: any[]) => any;
|
137
151
|
"onScroll-end"?: (...args: any[]) => any;
|
138
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "showOnInit" | "disabled" | "placeholder" | "size" | "multiple" | "loading" | "clearable" | "behavior" | "tagTheme" | "filterable" | "allowCreate" | "popoverMinWidth" | "remoteMethod" | "scrollHeight" | "showSelectAll" | "multipleMode" | "collapseTags" | "noDataText" | "noMatchText" | "loadingText" | "selectAllText" | "scrollLoading">;
|
152
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "showOnInit" | "disabled" | "placeholder" | "size" | "multiple" | "loading" | "clearable" | "behavior" | "tagTheme" | "filterable" | "allowCreate" | "popoverMinWidth" | "remoteMethod" | "scrollHeight" | "showSelectAll" | "multipleMode" | "collapseTags" | "noDataText" | "noMatchText" | "loadingText" | "selectAllText" | "scrollLoading" | "popoverOptions">;
|
139
153
|
$attrs: {
|
140
154
|
[x: string]: unknown;
|
141
155
|
};
|
@@ -251,6 +265,17 @@ declare const BkSelect: {
|
|
251
265
|
} & {
|
252
266
|
default: boolean;
|
253
267
|
};
|
268
|
+
popoverOptions: import("vue-types").VueTypeValidableDef<{
|
269
|
+
[key: string]: any;
|
270
|
+
}> & {
|
271
|
+
default: () => {
|
272
|
+
[key: string]: any;
|
273
|
+
};
|
274
|
+
} & {
|
275
|
+
default: () => {
|
276
|
+
[key: string]: any;
|
277
|
+
};
|
278
|
+
};
|
254
279
|
}>> & {
|
255
280
|
onChange?: (...args: any[]) => any;
|
256
281
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
@@ -629,6 +654,9 @@ declare const BkSelect: {
|
|
629
654
|
loadingText: string;
|
630
655
|
selectAllText: string;
|
631
656
|
scrollLoading: boolean;
|
657
|
+
popoverOptions: {
|
658
|
+
[key: string]: any;
|
659
|
+
};
|
632
660
|
}> & {
|
633
661
|
beforeCreate?: (() => void) | (() => void)[];
|
634
662
|
created?: (() => void) | (() => void)[];
|
@@ -751,6 +779,17 @@ declare const BkSelect: {
|
|
751
779
|
} & {
|
752
780
|
default: boolean;
|
753
781
|
};
|
782
|
+
popoverOptions: import("vue-types").VueTypeValidableDef<{
|
783
|
+
[key: string]: any;
|
784
|
+
}> & {
|
785
|
+
default: () => {
|
786
|
+
[key: string]: any;
|
787
|
+
};
|
788
|
+
} & {
|
789
|
+
default: () => {
|
790
|
+
[key: string]: any;
|
791
|
+
};
|
792
|
+
};
|
754
793
|
}>> & {
|
755
794
|
onChange?: (...args: any[]) => any;
|
756
795
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
@@ -1212,6 +1251,17 @@ declare const BkSelect: {
|
|
1212
1251
|
} & {
|
1213
1252
|
default: boolean;
|
1214
1253
|
};
|
1254
|
+
popoverOptions: import("vue-types").VueTypeValidableDef<{
|
1255
|
+
[key: string]: any;
|
1256
|
+
}> & {
|
1257
|
+
default: () => {
|
1258
|
+
[key: string]: any;
|
1259
|
+
};
|
1260
|
+
} & {
|
1261
|
+
default: () => {
|
1262
|
+
[key: string]: any;
|
1263
|
+
};
|
1264
|
+
};
|
1215
1265
|
}>> & {
|
1216
1266
|
onChange?: (...args: any[]) => any;
|
1217
1267
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
@@ -1590,6 +1640,9 @@ declare const BkSelect: {
|
|
1590
1640
|
loadingText: string;
|
1591
1641
|
selectAllText: string;
|
1592
1642
|
scrollLoading: boolean;
|
1643
|
+
popoverOptions: {
|
1644
|
+
[key: string]: any;
|
1645
|
+
};
|
1593
1646
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
|
1594
1647
|
Option: import("vue").DefineComponent<{
|
1595
1648
|
value: import("vue-types").VueTypeValidableDef<any>;
|