@ldmjs/ui 1.0.90 → 2.0.0-beta.1
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 +46 -94
- package/dist/components/ld-avatar.js +1 -0
- package/dist/components/ld-badge.js +1 -0
- package/dist/components/ld-breadcrumbs.js +1 -0
- package/dist/components/ld-button.js +1 -0
- package/dist/components/ld-calendar.js +1 -0
- package/dist/components/ld-checkbox.js +1 -0
- package/dist/components/ld-chip.js +1 -0
- package/dist/components/ld-combobox.js +1 -0
- package/dist/components/ld-data-iterator.js +1 -0
- package/dist/components/ld-datepicker.js +1 -0
- package/dist/components/ld-dialog.js +1 -0
- package/dist/components/ld-edit-list-box.js +1 -0
- package/dist/components/ld-edit-masked-text.js +1 -0
- package/dist/components/ld-edit-text.js +1 -0
- package/dist/components/ld-expansion-panel.js +1 -0
- package/dist/components/ld-expansion-panels.js +1 -0
- package/dist/components/ld-icon.js +1 -0
- package/dist/components/ld-loader.js +1 -0
- package/dist/components/ld-page-toolbar.js +1 -0
- package/dist/components/ld-pager.js +1 -0
- package/dist/components/ld-progress.js +1 -0
- package/dist/components/ld-radiobutton.js +1 -0
- package/dist/components/ld-radiogroup.js +1 -0
- package/dist/components/ld-select-list-box.js +1 -0
- package/dist/components/ld-select.js +1 -0
- package/dist/components/ld-slider.js +1 -0
- package/dist/components/ld-splitter.js +1 -0
- package/dist/components/ld-step.js +1 -0
- package/dist/components/ld-switch.js +1 -0
- package/dist/components/ld-tab.js +1 -0
- package/dist/components/ld-tabs.js +1 -0
- package/dist/components/ld-text-markup.js +1 -0
- package/dist/components/ld-text-viewer.js +1 -0
- package/dist/components/ld-textarea.js +1 -0
- package/dist/components/ld-timepicker.js +1 -0
- package/dist/components/ld-toggle-buttons.js +1 -0
- package/dist/components/ld-uploader.js +1 -0
- package/dist/fonts/Roboto-Medium.ttf +0 -0
- package/dist/fonts/Roboto-Medium.woff +0 -0
- package/dist/fonts/Roboto-Medium.woff2 +0 -0
- package/dist/fonts/Roboto-SemiBold.ttf +0 -0
- package/dist/fonts/Roboto-SemiBold.woff +0 -0
- package/dist/fonts/Roboto-SemiBold.woff2 +0 -0
- package/dist/i18n/ru/ru-Ru.json +50 -2
- package/dist/index.d.ts +20 -15
- package/dist/index.js +1 -21186
- package/dist/lib/runtime-template.js +1 -1
- package/dist/lib/toastification.js +1 -1
- package/dist/scss/_animations.scss +31 -12
- package/dist/scss/_avatar.scss +333 -0
- package/dist/scss/_badge.scss +128 -0
- package/dist/scss/_breadcrumbs.scss +133 -17
- package/dist/scss/_buttons.scss +584 -282
- package/dist/scss/_calendar.scss +154 -51
- package/dist/scss/_checkbox.scss +245 -0
- package/dist/scss/_chip.scss +163 -63
- package/dist/scss/_colors.scss +21 -19
- package/dist/scss/_dialogs.scss +106 -177
- package/dist/scss/_editor.scss +146 -0
- package/dist/scss/_expansions.scss +57 -0
- package/dist/scss/_fonts.scss +115 -0
- package/dist/scss/_inputs.scss +928 -138
- package/dist/scss/_loader.scss +163 -0
- package/dist/scss/_pager.scss +83 -16
- package/dist/scss/_progress.scss +282 -0
- package/dist/scss/_radiobutton.scss +218 -0
- package/dist/scss/_radiogroup.scss +87 -0
- package/dist/scss/_scroll.scss +65 -0
- package/dist/scss/_shadows.scss +47 -0
- package/dist/scss/_slider.scss +53 -0
- package/dist/scss/_splitter.scss +60 -0
- package/dist/scss/_step.scss +179 -0
- package/dist/scss/_switch.scss +198 -0
- package/dist/scss/_tabs.scss +318 -0
- package/dist/scss/_textmarkup.scss +47 -0
- package/dist/scss/_textviewer.scss +13 -0
- package/dist/scss/_toasted.scss +44 -22
- package/dist/scss/_toggle.scss +125 -0
- package/dist/scss/_toolbar.scss +40 -1
- package/dist/scss/_tooltip.scss +30 -0
- package/dist/scss/_treeview.scss +35 -0
- package/dist/scss/_uploader.scss +167 -0
- package/dist/scss/_variables.scss +5 -27
- package/dist/scss/index.scss +150 -16
- package/dist/scss/utils.scss +17 -0
- package/dist/types/breadcrumbs.d.ts +2 -0
- package/dist/types/calendar.d.ts +8 -73
- package/dist/types/combobox.d.ts +10 -0
- package/dist/types/dialogs.d.ts +28 -1
- package/dist/types/form.d.ts +6 -0
- package/dist/types/options.d.ts +11 -1
- package/dist/types/toasted.d.ts +4 -4
- package/dist/utils/validators.js +1 -1
- package/package.json +123 -120
- package/dist/css/calendar.css +0 -1066
- package/dist/css/index.css +0 -20
- package/dist/css/root.css +0 -86
- package/dist/lib/calendar.js +0 -1
- package/dist/lib/floating.js +0 -1
- package/dist/lib/multiselect.js +0 -1
- package/dist/scss/_multiselect.scss +0 -170
- package/dist/scss/_toasted-old.scss +0 -408
- package/dist/scss/index-old.scss +0 -16
package/dist/lib/floating.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["ldmui"]=t():e["ldmui"]=t()})(self,()=>(()=>{"use strict";var e={};(()=>{e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{arrow:()=>B,autoPlacement:()=>L,autoUpdate:()=>autoUpdate,computePosition:()=>floating_ui_dom_esm_computePosition,detectOverflow:()=>T,flip:()=>P,getOverflowAncestors:()=>getOverflowAncestors,hide:()=>D,inline:()=>W,limitShift:()=>F,offset:()=>E,platform:()=>O,shift:()=>C,size:()=>N});const n=["top","right","bottom","left"],i=["start","end"],o=n.reduce((e,t)=>e.concat(t,t+"-"+i[0],t+"-"+i[1]),[]),r=Math.min,l=Math.max,s=Math.round,c=Math.floor,createCoords=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function clamp(e,t,n){return l(e,r(t,n))}function evaluate(e,t){return"function"===typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}const g=new Set(["top","bottom"]);function getSideAxis(e){return g.has(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){void 0===n&&(n=!1);const i=getAlignment(e),o=getAlignmentAxis(e),r=getAxisLength(o);let l="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=getOppositePlacement(l)),[l,getOppositePlacement(l)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,e=>f[e])}const d=["left","right"],u=["right","left"],m=["top","bottom"],p=["bottom","top"];function getSideList(e,t,n){switch(e){case"top":case"bottom":return n?t?u:d:t?d:u;case"left":case"right":return t?m:p;default:return[]}}function getOppositeAxisPlacements(e,t,n,i){const o=getAlignment(e);let r=getSideList(getSide(e),"start"===n,i);return o&&(r=r.map(e=>e+"-"+o),t&&(r=r.concat(r.map(getOppositeAlignmentPlacement)))),r}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,e=>a[e])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"!==typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:i,floating:o}=e;const r=getSideAxis(t),l=getAlignmentAxis(t),s=getAxisLength(l),c=getSide(t),a="y"===r,f=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,d=i[s]/2-o[s]/2;let u;switch(c){case"top":u={x:f,y:i.y-o.height};break;case"bottom":u={x:f,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:g};break;case"left":u={x:i.x-o.width,y:g};break;default:u={x:i.x,y:i.y}}switch(getAlignment(t)){case"start":u[l]-=d*(n&&a?-1:1);break;case"end":u[l]+=d*(n&&a?-1:1);break}return u}const computePosition=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:g}=computeCoordsFromPlacement(a,i,c),d=i,u={},m=0;for(let n=0;n<s.length;n++){const{name:r,fn:p}=s[n],{x:h,y:w,data:y,reset:v}=await p({x:f,y:g,initialPlacement:i,placement:d,strategy:o,middlewareData:u,rects:a,platform:l,elements:{reference:e,floating:t}});f=null!=h?h:f,g=null!=w?w:g,u={...u,[r]:{...u[r],...y}},v&&m<=50&&(m++,"object"===typeof v&&(v.placement&&(d=v.placement),v.rects&&(a=!0===v.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:f,y:g}=computeCoordsFromPlacement(a,d,c))),n=-1)}return{x:f,y:g,placement:d,strategy:o,middlewareData:u}};async function detectOverflow(e,t){var n;void 0===t&&(t={});const{x:i,y:o,platform:r,rects:l,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:d=!1,padding:u=0}=evaluate(t,e),m=getPaddingObject(u),p="floating"===g?"reference":"floating",h=s[d?p:g],w=rectToClientRect(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(h)))||n?h:h.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:a,rootBoundary:f,strategy:c})),y="floating"===g?{x:i,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),x=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},b=rectToClientRect(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-b.top+m.top)/x.y,bottom:(b.bottom-w.bottom+m.bottom)/x.y,left:(w.left-b.left+m.left)/x.x,right:(b.right-w.right+m.right)/x.x}}const arrow=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:s,elements:c,middlewareData:a}=t,{element:f,padding:g=0}=evaluate(e,t)||{};if(null==f)return{};const d=getPaddingObject(g),u={x:n,y:i},m=getAlignmentAxis(o),p=getAxisLength(m),h=await s.getDimensions(f),w="y"===m,y=w?"top":"left",v=w?"bottom":"right",x=w?"clientHeight":"clientWidth",b=l.reference[p]+l.reference[m]-u[m]-l.floating[p],A=u[m]-l.reference[m],S=await(null==s.getOffsetParent?void 0:s.getOffsetParent(f));let R=S?S[x]:0;R&&await(null==s.isElement?void 0:s.isElement(S))||(R=c.floating[x]||l.floating[p]);const O=b/2-A/2,T=R/2-h[p]/2-1,E=r(d[y],T),L=r(d[v],T),C=E,P=R-h[p]-L,N=R/2-h[p]/2+O,D=clamp(C,N,P),B=!a.arrow&&null!=getAlignment(o)&&N!==D&&l.reference[p]/2-(N<C?E:L)-h[p]/2<0,W=B?N<C?N-C:N-P:0;return{[m]:u[m]+W,data:{[m]:D,centerOffset:N-D-W,...B&&{alignmentOffset:W}},reset:B}}});function getPlacementList(e,t,n){const i=e?[...n.filter(t=>getAlignment(t)===e),...n.filter(t=>getAlignment(t)!==e)]:n.filter(e=>getSide(e)===e);return i.filter(n=>!e||(getAlignment(n)===e||!!t&&getOppositeAlignmentPlacement(n)!==n))}const autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,r;const{rects:l,middlewareData:s,placement:c,platform:a,elements:f}=t,{crossAxis:g=!1,alignment:d,allowedPlacements:u=o,autoAlignment:m=!0,...p}=evaluate(e,t),h=void 0!==d||u===o?getPlacementList(d||null,m,u):u,w=await detectOverflow(t,p),y=(null==(n=s.autoPlacement)?void 0:n.index)||0,v=h[y];if(null==v)return{};const x=getAlignmentSides(v,l,await(null==a.isRTL?void 0:a.isRTL(f.floating)));if(c!==v)return{reset:{placement:h[0]}};const b=[w[getSide(v)],w[x[0]],w[x[1]]],A=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:v,overflows:b}],S=h[y+1];if(S)return{data:{index:y+1,overflows:A},reset:{placement:S}};const R=A.map(e=>{const t=getAlignment(e.placement);return[e.placement,t&&g?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),O=R.filter(e=>e[2].slice(0,getAlignment(e[0])?2:3).every(e=>e<=0)),T=(null==(r=O[0])?void 0:r[0])||R[0][0];return T!==c?{data:{index:y+1,overflows:A},reset:{placement:T}}:{}}}},flip=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:r,rects:l,initialPlacement:s,platform:c,elements:a}=t,{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:d,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...h}=evaluate(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const w=getSide(o),y=getSideAxis(s),v=getSide(s)===s,x=await(null==c.isRTL?void 0:c.isRTL(a.floating)),b=d||(v||!p?[getOppositePlacement(s)]:getExpandedPlacements(s)),A="none"!==m;!d&&A&&b.push(...getOppositeAxisPlacements(s,p,m,x));const S=[s,...b],R=await detectOverflow(t,h),O=[];let T=(null==(i=r.flip)?void 0:i.overflows)||[];if(f&&O.push(R[w]),g){const e=getAlignmentSides(o,l,x);O.push(R[e[0]],R[e[1]])}if(T=[...T,{placement:o,overflows:O}],!O.every(e=>e<=0)){var E,L;const e=((null==(E=r.flip)?void 0:E.index)||0)+1,t=S[e];if(t){const n="alignment"===g&&y!==getSideAxis(t);if(!n||T.every(e=>getSideAxis(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(L=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:L.placement;if(!n)switch(u){case"bestFit":{var C;const e=null==(C=T.filter(e=>{if(A){const t=getSideAxis(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=s;break}if(o!==n)return{reset:{placement:n}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return n.some(t=>e[t]>=0)}const hide=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...o}=evaluate(e,t);switch(i){case"referenceHidden":{const e=await detectOverflow(t,{...o,elementContext:"reference"}),i=getSideOffsets(e,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:isAnySideFullyClipped(i)}}}case"escaped":{const e=await detectOverflow(t,{...o,altBoundary:!0}),i=getSideOffsets(e,n.floating);return{data:{escapedOffsets:i,escaped:isAnySideFullyClipped(i)}}}default:return{}}}}};function getBoundingRect(e){const t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top)),i=l(...e.map(e=>e.right)),o=l(...e.map(e=>e.bottom));return{x:t,y:n,width:i-t,height:o-n}}function getRectsByLine(e){const t=e.slice().sort((e,t)=>e.y-t.y),n=[];let i=null;for(let e=0;e<t.length;e++){const o=t[e];!i||o.y-i.y>i.height/2?n.push([o]):n[n.length-1].push(o),i=o}return n.map(e=>rectToClientRect(getBoundingRect(e)))}const inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:i,rects:o,platform:s,strategy:c}=t,{padding:a=2,x:f,y:g}=evaluate(e,t),d=Array.from(await(null==s.getClientRects?void 0:s.getClientRects(i.reference))||[]),u=getRectsByLine(d),m=rectToClientRect(getBoundingRect(d)),p=getPaddingObject(a);function getBoundingClientRect(){if(2===u.length&&u[0].left>u[1].right&&null!=f&&null!=g)return u.find(e=>f>e.left-p.left&&f<e.right+p.right&&g>e.top-p.top&&g<e.bottom+p.bottom)||m;if(u.length>=2){if("y"===getSideAxis(n)){const e=u[0],t=u[u.length-1],i="top"===getSide(n),o=e.top,r=t.bottom,l=i?e.left:t.left,s=i?e.right:t.right,c=s-l,a=r-o;return{top:o,bottom:r,left:l,right:s,width:c,height:a,x:l,y:o}}const e="left"===getSide(n),t=l(...u.map(e=>e.right)),i=r(...u.map(e=>e.left)),o=u.filter(n=>e?n.left===i:n.right===t),s=o[0].top,c=o[o.length-1].bottom,a=i,f=t,g=f-a,d=c-s;return{top:s,bottom:c,left:a,right:f,width:g,height:d,x:a,y:s}}return m}const h=await s.getElementRects({reference:{getBoundingClientRect},floating:i.floating,strategy:c});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},h=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:n,platform:i,elements:o}=e,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),l=getSide(n),s=getAlignment(n),c="y"===getSideAxis(n),a=h.has(l)?-1:1,f=r&&c?-1:1,g=evaluate(t,e);let{mainAxis:d,crossAxis:u,alignmentAxis:m}="number"===typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return s&&"number"===typeof m&&(u="end"===s?-1*m:m),c?{x:u*f,y:d*a}:{x:d*a,y:u*f}}const offset=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:r,placement:l,middlewareData:s}=t,c=await convertValueToCoords(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:o+c.x,y:r+c.y,data:{...c,placement:l}}}}},shift=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=evaluate(e,t),a={x:n,y:i},f=await detectOverflow(t,c),g=getSideAxis(getSide(o)),d=getOppositeAxis(g);let u=a[d],m=a[g];if(r){const e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=u+f[e],i=u-f[t];u=clamp(n,u,i)}if(l){const e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=m+f[e],i=m-f[t];m=clamp(n,m,i)}const p=s.fn({...t,[d]:u,[g]:m});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[d]:r,[g]:l}}}}}},limitShift=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:o,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:c=!0,crossAxis:a=!0}=evaluate(e,t),f={x:n,y:i},g=getSideAxis(o),d=getOppositeAxis(g);let u=f[d],m=f[g];const p=evaluate(s,t),w="number"===typeof p?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const e="y"===d?"height":"width",t=r.reference[d]-r.floating[e]+w.mainAxis,n=r.reference[d]+r.reference[e]-w.mainAxis;u<t?u=t:u>n&&(u=n)}if(a){var y,v;const e="y"===d?"width":"height",t=h.has(getSide(o)),n=r.reference[g]-r.floating[e]+(t&&(null==(y=l.offset)?void 0:y[g])||0)+(t?0:w.crossAxis),i=r.reference[g]+r.reference[e]+(t?0:(null==(v=l.offset)?void 0:v[g])||0)-(t?w.crossAxis:0);m<n?m=n:m>i&&(m=i)}return{[d]:u,[g]:m}}}},size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:s,platform:c,elements:a}=t,{apply:f=()=>{},...g}=evaluate(e,t),d=await detectOverflow(t,g),u=getSide(o),m=getAlignment(o),p="y"===getSideAxis(o),{width:h,height:w}=s.floating;let y,v;"top"===u||"bottom"===u?(y=u,v=m===(await(null==c.isRTL?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(v=u,y="end"===m?"top":"bottom");const x=w-d.top-d.bottom,b=h-d.left-d.right,A=r(w-d[y],x),S=r(h-d[v],b),R=!t.middlewareData.shift;let O=A,T=S;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(T=b),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(O=x),R&&!m){const e=l(d.left,0),t=l(d.right,0),n=l(d.top,0),i=l(d.bottom,0);p?T=h-2*(0!==e||0!==t?e+t:l(d.left,d.right)):O=w-2*(0!==n||0!==i?n+i:l(d.top,d.bottom))}await f({...t,availableWidth:T,availableHeight:O});const E=await c.getDimensions(a.floating);return h!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return"undefined"!==typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!(!hasWindow()||"undefined"===typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}const w=new Set(["inline","contents"]);function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=getComputedStyle(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!w.has(o)}const y=new Set(["table","td","th"]);function isTableElement(e){return y.has(getNodeName(e))}const v=[":popover-open",":modal"];function isTopLayer(e){return v.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const x=["transform","translate","scale","rotate","perspective"],b=["transform","translate","scale","rotate","perspective","filter"],A=["paint","layout","strict","content"];function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle(e):e;return x.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||b.some(e=>(n.willChange||"").includes(e))||A.some(e=>(n.contain||"").includes(e))}function getContainingBlock(e){let t=getParentNode(e);while(isHTMLElement(t)&&!isLastTraversableNode(t)){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const S=new Set(["html","body","#document"]);function isLastTraversableNode(e){return S.has(getNodeName(e))}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=getNearestOverflowAncestor(e),r=o===(null==(i=e.ownerDocument)?void 0:i.body),l=getWindow(o);if(r){const e=getFrameElement(l);return t.concat(l,l.visualViewport||[],isOverflowElement(o)?o:[],e&&n?getOverflowAncestors(e):[])}return t.concat(o,getOverflowAncestors(o,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=isHTMLElement(e),r=o?e.offsetWidth:n,l=o?e.offsetHeight:i,c=s(n)!==r||s(i)!==l;return c&&(n=r,i=l),{width:n,height:i,$:c}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:r}=getCssDimensions(t);let l=(r?s(n.width):n.width)/i,c=(r?s(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const R=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:R}function shouldAddVisualOffsets(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==getWindow(e))&&t}function getBoundingClientRect(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),r=unwrapElement(e);let l=createCoords(1);t&&(i?isElement(i)&&(l=getScale(i)):l=getScale(e));const s=shouldAddVisualOffsets(r,n,i)?getVisualOffsets(r):createCoords(0);let c=(o.left+s.x)/l.x,a=(o.top+s.y)/l.y,f=o.width/l.x,g=o.height/l.y;if(r){const e=getWindow(r),t=i&&isElement(i)?getWindow(i):i;let n=e,o=getFrameElement(n);while(o&&i&&t!==n){const e=getScale(o),t=o.getBoundingClientRect(),i=getComputedStyle(o),r=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;c*=e.x,a*=e.y,f*=e.x,g*=e.y,c+=r,a+=l,n=getWindow(o),o=getFrameElement(n)}}return rectToClientRect({width:f,height:g,x:c,y:a})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t,n){void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=i.left+t.scrollLeft-(n?0:getWindowScrollBarX(e,i)),r=i.top+t.scrollTop;return{x:o,y:r}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const r="fixed"===o,l=getDocumentElement(i),s=!!t&&isTopLayer(t.floating);if(i===l||s&&r)return n;let c={scrollLeft:0,scrollTop:0},a=createCoords(1);const f=createCoords(0),g=isHTMLElement(i);if((g||!g&&!r)&&(("body"!==getNodeName(i)||isOverflowElement(l))&&(c=getNodeScroll(i)),isHTMLElement(i))){const e=getBoundingClientRect(i);a=getScale(i),f.x=e.x+i.clientLeft,f.y=e.y+i.clientTop}const d=!l||g||r?createCoords(0):getHTMLOffset(l,c,!0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+f.x+d.x,y:n.y*a.y-c.scrollTop*a.y+f.y+d.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),i=e.ownerDocument.body,o=l(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=l(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+getWindowScrollBarX(e);const c=-n.scrollTop;return"rtl"===getComputedStyle(i).direction&&(s+=l(t.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:c}}function getViewportRect(e,t){const n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport;let r=i.clientWidth,l=i.clientHeight,s=0,c=0;if(o){r=o.width,l=o.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:r,height:l,x:s,y:c}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,"fixed"===t),i=n.top+e.clientTop,o=n.left+e.clientLeft,r=isHTMLElement(e)?getScale(e):createCoords(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,c=o*r.x,a=i*r.y;return{width:l,height:s,x:c,y:a}}function getClientRectFromClippingAncestor(e,t,n){let i;if("viewport"===t)i=getViewportRect(e,n);else if("document"===t)i=getDocumentRect(getDocumentElement(e));else if(isElement(t))i=getInnerBoundingClientRect(t,n);else{const n=getVisualOffsets(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return!(n===t||!isElement(n)||isLastTraversableNode(n))&&("fixed"===getComputedStyle(n).position||hasFixedPositionAncestor(n,t))}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let i=getOverflowAncestors(e,[],!1).filter(e=>isElement(e)&&"body"!==getNodeName(e)),o=null;const r="fixed"===getComputedStyle(e).position;let l=r?getParentNode(e):e;while(isElement(l)&&!isLastTraversableNode(l)){const t=getComputedStyle(l),n=isContainingBlock(l);n||"fixed"!==t.position||(o=null);const s=r?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||isOverflowElement(l)&&!n&&hasFixedPositionAncestor(e,l);s?i=i.filter(e=>e!==l):o=t,l=getParentNode(l)}return t.set(e,i),i}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const s="clippingAncestors"===n?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),c=[...s,i],a=c[0],f=c.reduce((e,n)=>{const i=getClientRectFromClippingAncestor(t,n,o);return e.top=l(i.top,e.top),e.right=r(i.right,e.right),e.bottom=r(i.bottom,e.bottom),e.left=l(i.left,e.left),e},getClientRectFromClippingAncestor(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const i=isHTMLElement(t),o=getDocumentElement(t),r="fixed"===n,l=getBoundingClientRect(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const c=createCoords(0);function setLeftRTLScrollbarOffset(){c.x=getWindowScrollBarX(o)}if(i||!i&&!r)if(("body"!==getNodeName(t)||isOverflowElement(o))&&(s=getNodeScroll(t)),i){const e=getBoundingClientRect(t,!0,r,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&setLeftRTLScrollbarOffset();r&&!i&&o&&setLeftRTLScrollbarOffset();const a=!o||i||r?createCoords(0):getHTMLOffset(o,s),f=l.left+s.scrollLeft-c.x-a.x,g=l.top+s.scrollTop-c.y-a.y;return{x:f,y:g,width:l.width,height:l.height}}function isStaticPositioned(e){return"static"===getComputedStyle(e).position}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||"fixed"===getComputedStyle(e).position)return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement(e)){let t=getParentNode(e);while(t&&!isLastTraversableNode(t)){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return n}let i=getTrueOffsetParent(e,t);while(i&&isTableElement(i)&&isStaticPositioned(i))i=getTrueOffsetParent(i,t);return i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)?n:i||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,i=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return"rtl"===getComputedStyle(e).direction}const O={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n,i=null;const o=getDocumentElement(e);function cleanup(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}function refresh(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),cleanup();const f=e.getBoundingClientRect(),{left:g,top:d,width:u,height:m}=f;if(s||t(),!u||!m)return;const p=c(d),h=c(o.clientWidth-(g+u)),w=c(o.clientHeight-(d+m)),y=c(g),v=-p+"px "+-h+"px "+-w+"px "+-y+"px",x={rootMargin:v,threshold:l(0,r(1,a))||1};let b=!0;function handleObserve(t){const i=t[0].intersectionRatio;if(i!==a){if(!b)return refresh();i?refresh(!1,i):n=setTimeout(()=>{refresh(!1,1e-7)},1e3)}1!==i||rectsAreEqual(f,e.getBoundingClientRect())||refresh(),b=!1}try{i=new IntersectionObserver(handleObserve,{...x,root:o.ownerDocument})}catch(e){i=new IntersectionObserver(handleObserve,x)}i.observe(e)}return refresh(!0),cleanup}function autoUpdate(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:l="function"===typeof ResizeObserver,layoutShift:s="function"===typeof IntersectionObserver,animationFrame:c=!1}=i,a=unwrapElement(e),f=o||r?[...a?getOverflowAncestors(a):[],...getOverflowAncestors(t)]:[];f.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),r&&e.addEventListener("resize",n)});const g=a&&s?observeMove(a,n):null;let d,u=-1,m=null;l&&(m=new ResizeObserver(e=>{let[i]=e;i&&i.target===a&&m&&(m.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),a&&!c&&m.observe(a),m.observe(t));let p=c?getBoundingClientRect(e):null;function frameLoop(){const t=getBoundingClientRect(e);p&&!rectsAreEqual(p,t)&&n(),p=t,d=requestAnimationFrame(frameLoop)}return c&&frameLoop(),n(),()=>{var e;f.forEach(e=>{o&&e.removeEventListener("scroll",n),r&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(d)}}const T=detectOverflow,E=offset,L=autoPlacement,C=shift,P=flip,N=size,D=hide,B=arrow,W=inline,F=limitShift,floating_ui_dom_esm_computePosition=(e,t,n)=>{const i=new Map,o={platform:O,...n},r={...o.platform,_c:i};return computePosition(e,t,{...o,platform:r})};return t})());
|
package/dist/lib/multiselect.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("vue")):e["ldmui"]=t(e["vue"])})(self,e=>(()=>{"use strict";var t={6262:(e,t)=>{t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[e,s]of t)i[e]=s;return i}},2380:t=>{t.exports=e}},i={};function __webpack_require__(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,__webpack_require__),l.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var s={};__webpack_require__.r(s),__webpack_require__.d(s,{default:()=>N});var l=__webpack_require__(2380);const o=["tabindex","aria-owns"],n={ref:"tags",class:"multiselect__tags"},r={class:"multiselect__tags-wrap"},a=["textContent"],h=["onKeypress","onMousedown"],p={class:"multiselect__tag"},c=["textContent"],u={class:"multiselect__spinner"},d=["name","id","placeholder","value","disabled","tabindex","aria-controls"],m=["id"],g={key:0},f={class:"multiselect__option"},b=["id","role"],y=["onClick","onMouseenter","data-select","data-selected","data-deselect"],w=["data-select","data-deselect","onMouseenter","onMousedown"],V={class:"multiselect__option"},v={class:"multiselect__option"};function render(e,t,i,s,_,S){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{tabindex:e.searchable?-1:i.tabindex,class:(0,l.normalizeClass)([[e.uid?"multiselect"+e.uid:"",{"multiselect--active":e.isOpen,"multiselect--disabled":i.disabled,"multiselect--above":S.isAbove,"multiselect--has-options-group":S.hasOptionGroup,"multiselect--list-empty":e.isOpen&&!S.showNoResultsSlot&&!S.showNoOptionsSlot&&0===e.filteredOptions.length}],"multiselect"]),onFocus:t[12]||(t[12]=t=>e.activate()),onBlur:t[13]||(t[13]=t=>!e.searchable&&e.deactivate()),onKeydown:[t[14]||(t[14]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerForward(),["self","prevent"]),["down"])),t[15]||(t[15]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[16]||(t[16]=(0,l.withKeys)((0,l.withModifiers)(t=>e.addPointerElement(t),["stop","self"]),["enter","tab"])),onKeyup:t[17]||(t[17]=(0,l.withKeys)(t=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"caret",{toggle:e.toggle},()=>[(0,l.createElementVNode)("div",{onMousedown:t[0]||(t[0]=(0,l.withModifiers)(t=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t[32]||(t[32]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"clear",{search:e.search}),t[33]||(t[33]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",n,[(0,l.renderSlot)(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:S.visibleValues,isOpen:e.isOpen},()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",r,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(S.visibleValues,(i,s)=>(0,l.renderSlot)(e.$slots,"tag",{option:i,search:e.search,remove:e.removeElement},()=>[((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:"multiselect__tag",key:s},[(0,l.createElementVNode)("span",{textContent:(0,l.toDisplayString)(e.getOptionLabel(i))},null,8,a),t[18]||(t[18]=(0,l.createTextVNode)()),(0,l.createElementVNode)("i",{tabindex:"1",onKeypress:(0,l.withKeys)((0,l.withModifiers)(t=>e.removeElement(i),["prevent"]),["enter"]),onMousedown:(0,l.withModifiers)(t=>e.removeElement(i),["prevent"]),class:"multiselect__tag-icon"},null,40,h)]))])),256)),t[19]||(t[19]=(0,l.createTextVNode)()),e.internalValue&&e.internalValue.length>i.limit?(0,l.renderSlot)(e.$slots,"tag-overflow",{key:0,limit:i.limit,count:e.internalValue.length},()=>[(0,l.createElementVNode)("span",p,[(0,l.createElementVNode)("strong",{class:"multiselect__strong",textContent:(0,l.toDisplayString)(i.limitText(e.internalValue.length-i.limit))},null,8,c)])]):(0,l.createCommentVNode)("",!0)],512),[[l.vShow,S.visibleValues.length>0]])]),t[20]||(t[20]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect__loading"},{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,"loading",{},()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",u,null,512),[[l.vShow,i.loading]])])]),_:3}),t[21]||(t[21]=(0,l.createTextVNode)()),e.searchable?((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,ref:"search",name:i.name,id:e.id||e.uid,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:(0,l.normalizeStyle)(S.inputStyle),value:e.search,disabled:i.disabled,tabindex:i.tabindex,class:"multiselect__input","aria-controls":"listbox-"+e.id,onInput:t[1]||(t[1]=t=>e.updateSearch(t.target.value)),onFocus:t[2]||(t[2]=(0,l.withModifiers)(t=>e.activate(),["prevent"])),onKeyup:t[3]||(t[3]=(0,l.withKeys)(t=>e.deactivate(),["esc"])),onKeydown:[t[4]||(t[4]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerForward(),["prevent"]),["down"])),t[5]||(t[5]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerBackward(),["prevent"]),["up"])),t[7]||(t[7]=(0,l.withKeys)((0,l.withModifiers)(t=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[6]||(t[6]=(0,l.withKeys)((0,l.withModifiers)(t=>e.addPointerElement(t),["prevent","stop","self"]),["enter"]))},null,44,d)):(0,l.createCommentVNode)("",!0),t[22]||(t[22]=(0,l.createTextVNode)()),S.isSingleLabelVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,class:"multiselect__single",onMousedown:t[8]||(t[8]=(0,l.withModifiers)((...t)=>e.toggle&&e.toggle(...t),["prevent"]))},[(0,l.renderSlot)(e.$slots,"singleLabel",{option:S.singleValue},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.currentOptionLabel),1)])],32)):(0,l.createCommentVNode)("",!0),t[23]||(t[23]=(0,l.createTextVNode)()),S.isPlaceholderVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:2,class:"multiselect__placeholder",onMousedown:t[9]||(t[9]=(0,l.withModifiers)((...t)=>e.toggle&&e.toggle(...t),["prevent"]))},[(0,l.renderSlot)(e.$slots,"placeholder",{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.placeholder),1)])],32)):(0,l.createCommentVNode)("",!0)],512),t[34]||(t[34]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect"},{default:(0,l.withCtx)(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",{class:"multiselect__content-wrapper",onFocus:t[10]||(t[10]=(...t)=>e.activate&&e.activate(...t)),tabindex:"-1",onMousedown:t[11]||(t[11]=(0,l.withModifiers)(()=>{},["prevent"])),style:(0,l.normalizeStyle)({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[(0,l.createElementVNode)("ul",{class:"multiselect__content",style:(0,l.normalizeStyle)(S.contentStyle),role:"listbox",id:"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"beforeList"),t[27]||(t[27]=(0,l.createTextVNode)()),e.multiple&&e.max===e.internalValue.length?((0,l.openBlock)(),(0,l.createElementBlock)("li",g,[(0,l.createElementVNode)("span",f,[(0,l.renderSlot)(e.$slots,"maxElements",{},()=>[(0,l.createTextVNode)("Maximum of "+(0,l.toDisplayString)(e.max)+" options selected. First remove a selected option to select another.",1)])])])):(0,l.createCommentVNode)("",!0),t[28]||(t[28]=(0,l.createTextVNode)()),!e.max||e.internalValue.length<e.max?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:1},(0,l.renderList)(e.filteredOptions,(i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("li",{class:"multiselect__element",key:s,id:e.id+"-"+s,role:i&&(i.$isLabel||i.$isDisabled)?null:"option"},[i&&(i.$isLabel||i.$isDisabled)?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)([e.optionHighlight(s,i),"multiselect__option"]),onClick:(0,l.withModifiers)(t=>e.select(i),["stop"]),onMouseenter:(0,l.withModifiers)(t=>e.pointerSet(s),["self"]),"data-select":i&&i.isTag?e.tagPlaceholder:S.selectLabelText,"data-selected":S.selectedLabelText,"data-deselect":S.deselectLabelText},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)])],42,y)),t[24]||(t[24]=(0,l.createTextVNode)()),i&&(i.$isLabel||i.$isDisabled)?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,"data-select":e.groupSelect&&S.selectGroupLabelText,"data-deselect":e.groupSelect&&S.deselectGroupLabelText,class:(0,l.normalizeClass)([e.groupHighlight(s,i),"multiselect__option"]),onMouseenter:(0,l.withModifiers)(t=>e.groupSelect&&e.pointerSet(s),["self"]),onMousedown:(0,l.withModifiers)(t=>e.selectGroup(i),["prevent"])},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)])],42,w)):(0,l.createCommentVNode)("",!0)],8,b))),128)):(0,l.createCommentVNode)("",!0),t[29]||(t[29]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",V,[(0,l.renderSlot)(e.$slots,"noResult",{search:e.search},()=>[t[25]||(t[25]=(0,l.createTextVNode)("No elements found. Consider changing the search query.",-1))])])],512),[[l.vShow,S.showNoResultsSlot]]),t[30]||(t[30]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",v,[(0,l.renderSlot)(e.$slots,"noOptions",{},()=>[t[26]||(t[26]=(0,l.createTextVNode)("List is empty.",-1))])])],512),[[l.vShow,S.showNoOptionsSlot]]),t[31]||(t[31]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"afterList")],12,m)],36),[[l.vShow,e.isOpen]])]),_:3})],42,o)}function isEmpty(e){return 0!==e&&(!(!Array.isArray(e)||0!==e.length)||!e)}function not(e){return(...t)=>!e(...t)}function includes(e,t){void 0===e&&(e="undefined"),null===e&&(e="null"),!1===e&&(e="false");const i=e.toString().toLowerCase();return-1!==i.indexOf(t.trim())}function filterOptions(e,t,i,s){return t?e.filter(e=>includes(s(e,i),t)).sort((e,t)=>s(e,i).length-s(t,i).length):e}function stripGroups(e){return e.filter(e=>!e.$isLabel)}function flattenOptions(e,t){return i=>i.reduce((i,s)=>s[e]&&s[e].length?(i.push({$groupLabel:s[t],$isLabel:!0}),i.concat(s[e])):i,[])}function filterGroups(e,t,i,s,l){return o=>o.map(o=>{if(!o[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const n=filterOptions(o[i],e,t,l);return n.length?{[s]:o[s],[i]:n}:[]})}const flow=(...e)=>t=>e.reduce((e,t)=>t(e),t),_={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{uid:{type:String,default:""},internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return isEmpty(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||0===this.modelValue?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let i=this.options.concat();return i=this.internalSearch?this.groupValues?this.filterAndFlat(i,t,this.label):filterOptions(i,t,this.label,this.customLabel):this.groupValues?flattenOptions(this.groupValues,this.groupLabel)(i):i,i=this.hideSelected?i.filter(not(this.isSelected)):i,this.taggable&&t.length&&!this.isExistingOption(t)&&("bottom"===this.tagPosition?i.push({isTag:!0,label:e}):i.unshift({isTag:!0,label:e})),i.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){const e=this.groupValues?this.flatAndStrip(this.options):this.options;return e.map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat(e,t,i){return flow(filterGroups(t,i,this.groupValues,this.groupLabel,this.customLabel),flattenOptions(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return flow(flattenOptions(this.groupValues,this.groupLabel),stripGroups)(e)},updateSearch(e){this.search=e},isExistingOption(e){return!!this.options&&this.optionKeys.indexOf(e)>-1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(isEmpty(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return isEmpty(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect)this.selectGroup(e);else if(!(-1!==this.blockKeys.indexOf(t)||this.disabled||e.$isDisabled||e.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==t||this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{const i=this.isSelected(e);if(i)return void("Tab"!==t&&this.removeElement(e));this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(t=>t[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const e=this.internalValue.filter(e=>-1===t[this.groupValues].indexOf(e));this.$emit("update:modelValue",e)}else{let e=t[this.groupValues].filter(e=>!(this.isOptionDisabled(e)||this.isSelected(e)));this.max&&e.splice(this.max-this.internalValue.length),this.$emit("select",e,this.id),this.$emit("update:modelValue",this.internalValue.concat(e))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled)return;if(e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();const i="object"===typeof e?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const e=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("update:modelValue",e)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){if(this.isOpen||this.disabled)return;this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||"undefined"!==typeof this.$el&&this.$el.focus(),this.$emit("open",this.id);const onMouseDown=e=>{if(e?.target){const t=this.uid?"multiselect"+this.uid:"multiselect",i=e.target.closest("."+t);Boolean(i)||(this.deactivate(),document.removeEventListener("mousedown",onMouseDown))}};setTimeout(()=>{document.addEventListener("mousedown",onMouseDown)},300)},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if("undefined"===typeof window)return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom,i=t>this.maxHeight;i||t>e||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},S={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const i=this.options.find(e=>e[this.groupLabel]===t.$groupLabel);return i&&!this.wholeGroupDisabled(i)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},x={name:"vue-multiselect",mixins:[_,S],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return!1},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.internalValue.slice(0,this.limit)},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)},showNoResultsSlot(){return this.showNoResults&&0===this.filteredOptions.length&&this.search&&!this.loading},showNoOptionsSlot(){return this.showNoOptions&&(0===this.options.length||!0===this.hasOptionGroup&&0===this.filteredOptions.length)&&!this.search&&!this.loading}}};var O=__webpack_require__(6262);const L=(0,O.A)(x,[["render",render]]),$=L,N=$;return s})());
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--multiselect-height: calc(var(--input-height) - 2px);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.multiselect {
|
|
6
|
-
position: relative;
|
|
7
|
-
min-height: var(--multiselect-height);
|
|
8
|
-
flex-basis: 100%;
|
|
9
|
-
font-family: 'Roboto', Arial, Helvetica, sans-serif;
|
|
10
|
-
font-size: var(--font-size);
|
|
11
|
-
|
|
12
|
-
&--with-right-button {
|
|
13
|
-
.multiselect__tags {
|
|
14
|
-
border-top-right-radius: 0 !important;
|
|
15
|
-
border-bottom-right-radius: 0 !important;
|
|
16
|
-
}
|
|
17
|
-
& + .v-btn {
|
|
18
|
-
border-top-left-radius: 0 !important;
|
|
19
|
-
border-bottom-left-radius: 0 !important;
|
|
20
|
-
border-left: none;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
& .multiselect__single {
|
|
25
|
-
margin-left: 12px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&__placeholder {
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
height: var(--multiselect-height);
|
|
32
|
-
padding-left: 4px;
|
|
33
|
-
font-style: italic;
|
|
34
|
-
color: var(--grey-l-2);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&--active {
|
|
38
|
-
& .multiselect__tags {
|
|
39
|
-
border-color: var(--grey-l-4) !important;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
& .multiselect__tags {
|
|
44
|
-
min-height: var(--multiselect-height);
|
|
45
|
-
border: 1px solid var(--grey-l-5);
|
|
46
|
-
border-radius: var(--border-radius);
|
|
47
|
-
background-color: var(--white);
|
|
48
|
-
|
|
49
|
-
.multiselect__strong {
|
|
50
|
-
font-size: var(--font-size);
|
|
51
|
-
color: var(--grey);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&-wrap {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-wrap: wrap;
|
|
57
|
-
min-height: var(--multiselect-height);
|
|
58
|
-
padding-top: 3px;
|
|
59
|
-
|
|
60
|
-
.v-chip {
|
|
61
|
-
margin-left: 8px !important;
|
|
62
|
-
max-width: 228px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
& > span:not(.multiselect__placeholder) {
|
|
67
|
-
padding-top: 5px;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
& input {
|
|
72
|
-
height: var(--multiselect-height);
|
|
73
|
-
padding-left: 8px;
|
|
74
|
-
|
|
75
|
-
&:focus {
|
|
76
|
-
outline: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&--list-empty {
|
|
81
|
-
.multiselect__content-wrapper {
|
|
82
|
-
border: none !important;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&__content-wrapper {
|
|
87
|
-
z-index: 99;
|
|
88
|
-
width: 100%;
|
|
89
|
-
display: block;
|
|
90
|
-
background-color: var(--white);
|
|
91
|
-
border-radius: var(--border-radius);
|
|
92
|
-
box-shadow: var(--shadow-1);
|
|
93
|
-
overflow: auto;
|
|
94
|
-
padding: 0;
|
|
95
|
-
border: 1px solid var(--grey-l-5);
|
|
96
|
-
border-top: none;
|
|
97
|
-
border-bottom-left-radius: 5px;
|
|
98
|
-
border-bottom-right-radius: 5px;
|
|
99
|
-
|
|
100
|
-
& ul {
|
|
101
|
-
width: 100%;
|
|
102
|
-
padding: 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
& li {
|
|
106
|
-
min-height: var(--multiselect-height);
|
|
107
|
-
display: flex;
|
|
108
|
-
align-items: center;
|
|
109
|
-
cursor: pointer;
|
|
110
|
-
width: 100%;
|
|
111
|
-
font-size: var(--font-size);
|
|
112
|
-
|
|
113
|
-
& .multiselect__option {
|
|
114
|
-
width: 100%;
|
|
115
|
-
padding-left: 10px;
|
|
116
|
-
display: flex;
|
|
117
|
-
align-items: center;
|
|
118
|
-
text-decoration: none;
|
|
119
|
-
text-transform: none;
|
|
120
|
-
position: relative;
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
transition: all 0.2s;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
& .multiselect__option--highlight {
|
|
126
|
-
background-color: var(--grey-l-6);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&.multiselect--arrow {
|
|
132
|
-
&.mobile {
|
|
133
|
-
height: 25px !important;
|
|
134
|
-
}
|
|
135
|
-
.multiselect__select {
|
|
136
|
-
position: absolute;
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
justify-content: center;
|
|
140
|
-
width: 40px;
|
|
141
|
-
height: var(--input-height);
|
|
142
|
-
right: 1px;
|
|
143
|
-
top: 1px;
|
|
144
|
-
&:before {
|
|
145
|
-
position: relative;
|
|
146
|
-
color: var(--grey);
|
|
147
|
-
border-style: solid;
|
|
148
|
-
border-width: 5px 5px 0;
|
|
149
|
-
border-color: var(--grey) transparent transparent;
|
|
150
|
-
content: '';
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
&.multiselect--active {
|
|
154
|
-
.multiselect__select {
|
|
155
|
-
&:before {
|
|
156
|
-
transform: rotate(180deg);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&--disabled {
|
|
163
|
-
.multiselect__tags {
|
|
164
|
-
background-color: var(--grey-l-6);
|
|
165
|
-
}
|
|
166
|
-
.multiselect__select:before {
|
|
167
|
-
opacity: 0.6;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|