@ldmjs/ui 1.0.0 → 1.0.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.
@@ -0,0 +1 @@
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={};return(()=>{__webpack_require__.r(s),__webpack_require__.d(s,{default:()=>x});var e=__webpack_require__(2380);const t=["tabindex","aria-owns"],i={ref:"tags",class:"multiselect__tags"},l={class:"multiselect__tags-wrap"},o=["textContent"],r=["onKeypress","onMousedown"],n=["textContent"],a={class:"multiselect__spinner"},h=["name","id","placeholder","value","disabled","tabindex","aria-controls"],p=["id"],c={key:0},u={class:"multiselect__option"},d=["id","role"],m=["onClick","onMouseenter","data-select","data-selected","data-deselect"],g=["data-select","data-deselect","onMouseenter","onMousedown"],f={class:"multiselect__option"},b={class:"multiselect__option"};function render(s,y,w,V,v,_){return(0,e.openBlock)(),(0,e.createElementBlock)("div",{tabindex:s.searchable?-1:w.tabindex,class:(0,e.normalizeClass)([{"multiselect--active":s.isOpen,"multiselect--disabled":w.disabled,"multiselect--above":_.isAbove,"multiselect--has-options-group":_.hasOptionGroup,"multiselect--list-empty":s.isOpen&&!_.showNoResultsSlot&&!_.showNoOptionsSlot&&0===s.filteredOptions.length},"multiselect"]),onFocus:y[13]||(y[13]=e=>s.activate()),onBlur:y[14]||(y[14]=e=>!s.searchable&&s.deactivate()),onKeydown:[y[15]||(y[15]=(0,e.withKeys)((0,e.withModifiers)((e=>s.pointerForward()),["self","prevent"]),["down"])),y[16]||(y[16]=(0,e.withKeys)((0,e.withModifiers)((e=>s.pointerBackward()),["self","prevent"]),["up"]))],onKeypress:y[17]||(y[17]=(0,e.withKeys)((0,e.withModifiers)((e=>s.addPointerElement(e)),["stop","self"]),["enter","tab"])),onKeyup:y[18]||(y[18]=(0,e.withKeys)((e=>s.deactivate()),["esc"])),role:"combobox","aria-owns":"listbox-"+s.id},[(0,e.renderSlot)(s.$slots,"caret",{toggle:s.toggle},(()=>[(0,e.createElementVNode)("div",{onMousedown:y[0]||(y[0]=(0,e.withModifiers)((e=>s.toggle()),["prevent","stop"])),class:"multiselect__select"},null,32)])),(0,e.createTextVNode)(),(0,e.renderSlot)(s.$slots,"clear",{search:s.search}),(0,e.createTextVNode)(),(0,e.createElementVNode)("div",i,[(0,e.renderSlot)(s.$slots,"selection",{search:s.search,remove:s.removeElement,values:_.visibleValues,isOpen:s.isOpen},(()=>[(0,e.withDirectives)((0,e.createElementVNode)("div",l,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(_.visibleValues,((t,i)=>(0,e.renderSlot)(s.$slots,"tag",{option:t,search:s.search,remove:s.removeElement},(()=>[((0,e.openBlock)(),(0,e.createElementBlock)("span",{class:"multiselect__tag",key:i},[(0,e.createElementVNode)("span",{textContent:(0,e.toDisplayString)(s.getOptionLabel(t))},null,8,o),(0,e.createTextVNode)(),(0,e.createElementVNode)("i",{tabindex:"1",onKeypress:(0,e.withKeys)((0,e.withModifiers)((e=>s.removeElement(t)),["prevent"]),["enter"]),onMousedown:(0,e.withModifiers)((e=>s.removeElement(t)),["prevent"]),class:"multiselect__tag-icon"},null,40,r)]))])))),256))],512),[[e.vShow,_.visibleValues.length>0]]),(0,e.createTextVNode)(),s.internalValue&&s.internalValue.length>w.limit?(0,e.renderSlot)(s.$slots,"limit",{key:0},(()=>[(0,e.createElementVNode)("strong",{class:"multiselect__strong",textContent:(0,e.toDisplayString)(w.limitText(s.internalValue.length-w.limit))},null,8,n)])):(0,e.createCommentVNode)("",!0)])),(0,e.createTextVNode)(),(0,e.createVNode)(e.Transition,{name:"multiselect__loading"},{default:(0,e.withCtx)((()=>[(0,e.renderSlot)(s.$slots,"loading",{},(()=>[(0,e.withDirectives)((0,e.createElementVNode)("div",a,null,512),[[e.vShow,w.loading]])]))])),_:3}),(0,e.createTextVNode)(),s.searchable?((0,e.openBlock)(),(0,e.createElementBlock)("input",{key:0,ref:"search",name:w.name,id:s.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:s.placeholder,style:(0,e.normalizeStyle)(_.inputStyle),value:s.search,disabled:w.disabled,tabindex:w.tabindex,class:"multiselect__input","aria-controls":"listbox-"+s.id,onInput:y[1]||(y[1]=e=>s.updateSearch(e.target.value)),onFocus:y[2]||(y[2]=(0,e.withModifiers)((e=>s.activate()),["prevent"])),onBlur:y[3]||(y[3]=(0,e.withModifiers)((e=>s.deactivate()),["prevent"])),onKeyup:y[4]||(y[4]=(0,e.withKeys)((e=>s.deactivate()),["esc"])),onKeydown:[y[5]||(y[5]=(0,e.withKeys)((0,e.withModifiers)((e=>s.pointerForward()),["prevent"]),["down"])),y[6]||(y[6]=(0,e.withKeys)((0,e.withModifiers)((e=>s.pointerBackward()),["prevent"]),["up"])),y[8]||(y[8]=(0,e.withKeys)((0,e.withModifiers)((e=>s.removeLastElement()),["stop"]),["delete"]))],onKeypress:y[7]||(y[7]=(0,e.withKeys)((0,e.withModifiers)((e=>s.addPointerElement(e)),["prevent","stop","self"]),["enter"]))},null,44,h)):(0,e.createCommentVNode)("",!0),(0,e.createTextVNode)(),_.isSingleLabelVisible?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:1,class:"multiselect__single",onMousedown:y[9]||(y[9]=(0,e.withModifiers)(((...e)=>s.toggle&&s.toggle(...e)),["prevent"]))},[(0,e.renderSlot)(s.$slots,"singleLabel",{option:_.singleValue},(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(s.currentOptionLabel),1)]))],32)):(0,e.createCommentVNode)("",!0),(0,e.createTextVNode)(),_.isPlaceholderVisible?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:2,class:"multiselect__placeholder",onMousedown:y[10]||(y[10]=(0,e.withModifiers)(((...e)=>s.toggle&&s.toggle(...e)),["prevent"]))},[(0,e.renderSlot)(s.$slots,"placeholder",{},(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(s.placeholder),1)]))],32)):(0,e.createCommentVNode)("",!0)],512),(0,e.createTextVNode)(),(0,e.createVNode)(e.Transition,{name:"multiselect"},{default:(0,e.withCtx)((()=>[(0,e.withDirectives)((0,e.createElementVNode)("div",{class:"multiselect__content-wrapper",onFocus:y[11]||(y[11]=(...e)=>s.activate&&s.activate(...e)),tabindex:"-1",onMousedown:y[12]||(y[12]=(0,e.withModifiers)((()=>{}),["prevent"])),style:(0,e.normalizeStyle)({maxHeight:s.optimizedHeight+"px"}),ref:"list"},[(0,e.createElementVNode)("ul",{class:"multiselect__content",style:(0,e.normalizeStyle)(_.contentStyle),role:"listbox",id:"listbox-"+s.id},[(0,e.renderSlot)(s.$slots,"beforeList"),(0,e.createTextVNode)(),s.multiple&&s.max===s.internalValue.length?((0,e.openBlock)(),(0,e.createElementBlock)("li",c,[(0,e.createElementVNode)("span",u,[(0,e.renderSlot)(s.$slots,"maxElements",{},(()=>[(0,e.createTextVNode)("Maximum of "+(0,e.toDisplayString)(s.max)+" options selected. First remove a selected option to select another.",1)]))])])):(0,e.createCommentVNode)("",!0),(0,e.createTextVNode)(),!s.max||s.internalValue.length<s.max?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(s.filteredOptions,((t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)("li",{class:"multiselect__element",key:i,id:s.id+"-"+i,role:t&&(t.$isLabel||t.$isDisabled)?null:"option"},[t&&(t.$isLabel||t.$isDisabled)?(0,e.createCommentVNode)("",!0):((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:0,class:(0,e.normalizeClass)([s.optionHighlight(i,t),"multiselect__option"]),onClick:(0,e.withModifiers)((e=>s.select(t)),["stop"]),onMouseenter:(0,e.withModifiers)((e=>s.pointerSet(i)),["self"]),"data-select":t&&t.isTag?s.tagPlaceholder:_.selectLabelText,"data-selected":_.selectedLabelText,"data-deselect":_.deselectLabelText},[(0,e.renderSlot)(s.$slots,"option",{option:t,search:s.search,index:i},(()=>[(0,e.createElementVNode)("span",null,(0,e.toDisplayString)(s.getOptionLabel(t)),1)]))],42,m)),(0,e.createTextVNode)(),t&&(t.$isLabel||t.$isDisabled)?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:1,"data-select":s.groupSelect&&_.selectGroupLabelText,"data-deselect":s.groupSelect&&_.deselectGroupLabelText,class:(0,e.normalizeClass)([s.groupHighlight(i,t),"multiselect__option"]),onMouseenter:(0,e.withModifiers)((e=>s.groupSelect&&s.pointerSet(i)),["self"]),onMousedown:(0,e.withModifiers)((e=>s.selectGroup(t)),["prevent"])},[(0,e.renderSlot)(s.$slots,"option",{option:t,search:s.search,index:i},(()=>[(0,e.createElementVNode)("span",null,(0,e.toDisplayString)(s.getOptionLabel(t)),1)]))],42,g)):(0,e.createCommentVNode)("",!0)],8,d)))),128)):(0,e.createCommentVNode)("",!0),(0,e.createTextVNode)(),(0,e.withDirectives)((0,e.createElementVNode)("li",null,[(0,e.createElementVNode)("span",f,[(0,e.renderSlot)(s.$slots,"noResult",{search:s.search},(()=>[(0,e.createTextVNode)("No elements found. Consider changing the search query.")]))])],512),[[e.vShow,_.showNoResultsSlot]]),(0,e.createTextVNode)(),(0,e.withDirectives)((0,e.createElementVNode)("li",null,[(0,e.createElementVNode)("span",b,[(0,e.renderSlot)(s.$slots,"noOptions",{},(()=>[(0,e.createTextVNode)("List is empty.")]))])],512),[[e.vShow,_.showNoOptionsSlot]]),(0,e.createTextVNode)(),(0,e.renderSlot)(s.$slots,"afterList")],12,p)],36),[[e.vShow,s.isOpen]])])),_:3})],42,t)}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 r=filterOptions(o[i],e,t,l);return r.length?{[s]:o[s],[i]:r}:[]}))}const flow=(...e)=>t=>e.reduce(((e,t)=>t(e)),t),y={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{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(){this.isOpen||this.disabled||(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))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():tthis.$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))}}},w={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}}},V={name:"vue-multiselect",mixins:[y,w],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 v=__webpack_require__(6262);const _=(0,v.A)(V,[["render",render]]),S=_,x=S})(),s})()));
@@ -0,0 +1 @@
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 o=e.__vccOpts||e;for(const[e,n]of t)o[e]=n;return o}},2380:t=>{t.exports=e}},o={};function __webpack_require__(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,__webpack_require__),r.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{__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 n={};return(()=>{__webpack_require__.r(n),__webpack_require__.d(n,{default:()=>i});var e=__webpack_require__(2380);function render(t,o,n,r,s,c){return t.componentName?((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.componentName),{key:0})):(0,e.createCommentVNode)("",!0)}const defineDescriptor=(e,t,o)=>{if(!t.hasOwnProperty(o)){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n)}},merge=e=>{const t={};return e.forEach((e=>{e&&Object.getOwnPropertyNames(e).forEach((o=>defineDescriptor(e,t,o)))})),t},buildFromProps=(e,t)=>{const o={};return t.forEach((t=>defineDescriptor(e,o,t))),o},{defineComponent:t}=__webpack_require__(2380),o={props:{template:String,parentComp:Object},data(){return{componentName:"",dynamic:null}},created(){const e="runtime-template-"+Math.floor(1e4*Math.random());if(this.template){if(this.dynamic&&this.$parent){const{$data:o,$props:n}=this.$parent;let r={$data:{},$props:{}};Object.keys(o||{}).forEach((e=>{void 0===this.$data[e]&&(r.$data[e]=o[e])})),Object.keys(n||{}).forEach((e=>r.$props[e]=n[e]));const s=merge([r.$data,r.$props,this.methodsFromProps]);return this.$options.components[e]=t(this.dynamic,{props:s}),void(this.componentName=e)}const o=this.parentComp||this.$parent;this.$options.methods||(this.$options.methods={}),this.$options.computed||(this.$options.computed={}),this.$options.components||(this.$options.components={});const{$data:n,$props:r,$options:s}=o,{components:c,computed:p,methods:i}=s;let a={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n||{}).forEach((e=>{void 0===this.$data[e]&&(a.$data[e]=n[e])})),Object.keys(r||{}).forEach((e=>{void 0===this.$props[e]&&(a.$props[e]=r[e])})),Object.keys(i||{}).forEach((e=>{void 0===this.$options.methods[e]&&(a.methods[e]=i[e])})),Object.keys(p||{}).forEach((e=>{void 0===this.$options.computed[e]&&(a.computed[e]=p[e])})),Object.keys(c||{}).forEach((e=>{void 0===this.$options.components[e]&&(a.components[e]=c[e])}));const d=Object.keys(a.methods||{}),_=Object.keys(a.$data||{}),m=Object.keys(a.$props||{}),h=_.concat(m).concat(d);this.methodsFromProps=buildFromProps(o,d);const u=merge([a.$data,a.$props,this.methodsFromProps]),f={},b={};let $=this.template||"<div></div>";_.forEach((e=>{const t=new RegExp(`[^"{\\s=]?${e}["}\\s]*?(?=["}\\s])`,"g"),n=t.exec($);if(n===e){const n=`${e}_ld`;b[n]=a.$data[e],$=$.replace(t,n);const r=o._watchers.find((t=>t.expression===e));if(r){const e=r.cb;r.cb=function(t,r){const s=this.__renderFn__.componentInstance;s[n]=t,e.call(o,t,r)}.bind(this)}else{const t=function(e){const t=this.__renderFn__.componentInstance;t[n]=e}.bind(this);o.$watch(e,t)}f[n]=function(t,n){o[e]=t}}})),this.$options.components[e]=t({template:$,props:h,data:()=>b,computed:a.computed,components:a.components,watch:f},{props:u}),this.componentName=e}}},r={components:{},mixins:[o]};var s=__webpack_require__(6262);const c=(0,s.A)(r,[["render",render]]),p=c,i=p})(),n})()));
@@ -0,0 +1,48 @@
1
+ body {
2
+ .v-breadcrumbs {
3
+ white-space: nowrap;
4
+ text-overflow: ellipsis;
5
+ overflow: hidden;
6
+ padding: 0;
7
+ width: fit-content;
8
+
9
+ & li {
10
+ color: var(--grey) !important;
11
+ font-size: var(--font-size) !important;
12
+ overflow: hidden;
13
+
14
+
15
+ &.v-breadcrumbs-item {
16
+ overflow: hidden !important;
17
+ text-overflow: ellipsis !important;
18
+ white-space: nowrap !important;
19
+ display: block !important;
20
+ cursor: pointer !important;
21
+ padding: 0;
22
+
23
+ & a {
24
+ color: inherit !important;
25
+ }
26
+
27
+ &[text="home"] {
28
+ & + .v-breadcrumbs-divider {
29
+ display: none;
30
+ }
31
+ }
32
+
33
+ &:last-child {
34
+ font-weight: bold !important;
35
+ color: var(--text) !important;
36
+ }
37
+ }
38
+
39
+ &.v-breadcrumbs-divider {
40
+ padding: 0 4px;
41
+ }
42
+ }
43
+
44
+ .v-breadcrumbs-item--disabled {
45
+ opacity: 1 !important;
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,301 @@
1
+ body {
2
+ .v-btn {
3
+ text-transform: none !important;
4
+ font-size: var(--font-size) !important;
5
+ font-weight: 400 !important;
6
+ letter-spacing: 0 !important;
7
+
8
+ .v-btn__overlay {
9
+ display: none;
10
+ }
11
+ .v-btn__underlay {
12
+ display: none;
13
+ }
14
+
15
+ &.v-btn--density-compact {
16
+ height: var(--input-height);
17
+
18
+ &:not(.v-btn--variant-outlined):not(.v-btn--variant-elevated) {
19
+ .v-btn__overlay {
20
+ display: none;
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ &.mobile-device {
27
+ .v-btn:hover,
28
+ .v-btn.small-button:hover,
29
+ .v-btn.square-sm-button:hover {
30
+ background: none !important;
31
+ background-color: transparent !important;
32
+ }
33
+ }
34
+
35
+ .small-button {
36
+ font-size: var(--font-size) !important;
37
+ padding: 0 12px;
38
+
39
+ &.v-btn--variant-text {
40
+ padding: 0 12px !important;
41
+ }
42
+
43
+ &.v-btn--block {
44
+ height: auto;
45
+ min-height: var(--input-height);
46
+ padding: 4px 6px;
47
+ }
48
+
49
+ &:not(.v-btn--block) {
50
+ height: var(--input-height) !important;
51
+ }
52
+
53
+ &.bg-primary {
54
+ background-color: var(--primary-l-2) !important;
55
+
56
+ &:hover {
57
+ background-color: var(--primary-l-1) !important;
58
+ }
59
+
60
+ &:active {
61
+ background-color: var(--primary) !important;
62
+ }
63
+
64
+ &[disabled] {
65
+ background-color: var(--grey-l-5) !important;
66
+ color: var(--grey) !important;
67
+ }
68
+ }
69
+
70
+ &.bg-success {
71
+ background-color: var(--success) !important;
72
+ color: var(--white) !important;
73
+
74
+ &:hover {
75
+ background-color: var(--success-d-1) !important;
76
+ }
77
+
78
+ &:active {
79
+ background-color: var(--success-d-2) !important;
80
+ }
81
+
82
+ &[disabled] {
83
+ background-color: var(--grey-l-5) !important;
84
+ color: var(--grey) !important;
85
+ }
86
+ }
87
+
88
+ &.text-primary {
89
+ color: var(--primary) !important;
90
+ &:hover {
91
+ background-color: var(--primary-l-8) !important;
92
+ }
93
+
94
+ &:active {
95
+ background-color: var(--primary-l-7) !important;
96
+ }
97
+
98
+ &.--active {
99
+ background-color: var(--primary-l-8) !important;
100
+ border-color: var(--primary-l-2) !important;
101
+ color: var(--primary-l-2) !important;
102
+ }
103
+ }
104
+
105
+ &.text-grey {
106
+ &.v-btn--variant-outlined {
107
+ border-color: var(--grey-l-5) !important;
108
+ span {
109
+ color: var(--text) !important;
110
+ }
111
+ .v-icon {
112
+ color: var(--grey);
113
+ }
114
+ svg {
115
+ color: var(--grey);
116
+ }
117
+ }
118
+ &.v-btn--variant-text {
119
+ border: 1px solid transparent;
120
+ }
121
+ &:hover {
122
+ background-color: var(--grey-l-5) !important;
123
+ }
124
+
125
+ &:active {
126
+ background-color: var(--grey-l-5) !important;
127
+ }
128
+ }
129
+
130
+ &.text-success {
131
+ &.v-btn--variant-outlined {
132
+ color: var(--success-d-1) !important;
133
+ .v-icon {
134
+ color: var(--success-d-1) !important;
135
+ }
136
+ }
137
+ &:hover {
138
+ background-color: var(--success-l-6) !important;
139
+ }
140
+
141
+ &:active {
142
+ background-color: var(--success-l-5) !important;
143
+ }
144
+ }
145
+
146
+ &.text-error {
147
+ &.v-btn--variant-outlined {
148
+ color: var(--error);
149
+ .v-icon {
150
+ color: var(--error);
151
+ }
152
+ }
153
+ &:hover {
154
+ background-color: var(--error-l-6) !important;
155
+ }
156
+
157
+ &:active {
158
+ background-color: var(--error-l-5) !important;
159
+ }
160
+ }
161
+
162
+ .v-icon, svg {
163
+ margin-right: 4px;
164
+ }
165
+
166
+ svg.primary--text {
167
+ color: var(--primary) !important;
168
+ }
169
+
170
+ &:after {
171
+ content: unset;
172
+ }
173
+ }
174
+
175
+ .square-sm-button {
176
+ padding: 0 !important;
177
+ height: var(--input-height) !important;
178
+ width: var(--input-height) !important;
179
+ min-width: var(--input-height) !important;
180
+ min-height: var(--input-height) !important;
181
+ max-width: var(--input-height) !important;
182
+ max-height: var(--input-height) !important;
183
+ border-radius: var(--border-radius);
184
+
185
+ &.v-btn--icon {
186
+ border: none;
187
+ border-radius: var(--border-radius);
188
+ }
189
+
190
+ .v-icon:not(.custom-icon) {
191
+ transform: translate(1px, 1px);
192
+ }
193
+
194
+ &.bg-primary {
195
+ color: var(--white) !important;
196
+ background-color: var(--primary-l-2) !important;
197
+ }
198
+
199
+ &.text-primary {
200
+ color: var(--primary) !important;
201
+ &.v-btn--variant-text {
202
+ .v-icon:not(.text-primary):not(.text-grey):not(.text-success):not(.text-error):not(.text-warning) {
203
+ color: var(--primary) !important;
204
+ }
205
+ svg {
206
+ color: var(--primary) !important;
207
+ }
208
+ }
209
+ &:not(.v-btn--icon) {
210
+ &:hover {
211
+ background-color: var(--primary-l-8) !important;
212
+ }
213
+ &:active {
214
+ background-color: var(--primary-l-7) !important;
215
+ }
216
+ }
217
+
218
+ &.--active {
219
+ border-color: var(--primary-l-2);
220
+ background-color: var(--primary-l-8) !important;
221
+ svg {
222
+ color: var(--primary-l-2) !important;
223
+ }
224
+ }
225
+ }
226
+
227
+ &.text-grey {
228
+ &.v-btn--variant-outlined {
229
+ color: var(--grey-l-5) !important;
230
+ .v-icon {
231
+ color: var(--grey);
232
+ }
233
+ svg {
234
+ color: var(--grey);
235
+ }
236
+ }
237
+ &.v-btn--disabled {
238
+ opacity: 1;
239
+ background-color: var(--grey-l-6);
240
+
241
+ svg {
242
+ color: var(--grey-l-4);
243
+ }
244
+ &.v-btn--icon {
245
+ background: none;
246
+ opacity: 0.8;
247
+ }
248
+ }
249
+ &:not(.v-btn--icon) {
250
+ &:hover {
251
+ background-color: var(--grey-l-5) !important;
252
+ }
253
+
254
+ &:active {
255
+ background-color: var(--grey-l-4) !important;
256
+ }
257
+ }
258
+ &.--active {
259
+ border-color: var(--primary-l-2);
260
+ background-color: var(--primary-l-8) !important;
261
+ svg {
262
+ color: var(--primary-l-2) !important;
263
+ }
264
+ }
265
+ }
266
+
267
+ &.text-success {
268
+ &.v-btn--variant-outlined {
269
+ color: var(--success-d-1) !important;
270
+ .v-icon {
271
+ color: var(--success-d-1) !important;
272
+ }
273
+ color: var(--success-d-1) !important;
274
+ svg {
275
+ color: var(--success-d-1) !important;
276
+ }
277
+ }
278
+ }
279
+
280
+ &.text-error {
281
+ &.v-btn--variant-outlined {
282
+ color: var(--error) !important;
283
+ .v-icon {
284
+ color: var(--error) !important;
285
+ }
286
+ svg {
287
+ color: var(--error) !important;
288
+ }
289
+ }
290
+ &:not(.v-btn--icon) {
291
+ &:hover {
292
+ background-color: var(--error-l-6) !important;
293
+ }
294
+
295
+ &:active {
296
+ background-color: var(--error-l-5) !important;
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
@@ -0,0 +1,25 @@
1
+ body {
2
+ .vc-blue {
3
+ // --vc-accent-50: #eff6ff;
4
+ // --vc-accent-100: #dbeafe;
5
+ --vc-accent-200: var(--secondary);
6
+ --vc-accent-300: var(--primary-l-3);
7
+ --vc-accent-400: var(--primary-l-2);
8
+ --vc-accent-500: var(--primary-l-1);
9
+ --vc-accent-600: var(--primary);
10
+ --vc-accent-700: var(--primary-d-1);
11
+ --vc-accent-800: var(--primary-d-1);
12
+ --vc-accent-900: var(--primary-d-1);
13
+ }
14
+ .vc-highlight-content-solid {
15
+ font-weight: normal;
16
+ color: var(--white);
17
+ }
18
+ .vc-attr {
19
+ --vc-highlight-solid-bg: var(--vc-accent-400) !important;
20
+ }
21
+ .vc-light {
22
+ --vc-rounded-lg: var(--border-radius);
23
+ --vc-border: var(--grey-l-5);
24
+ }
25
+ }
@@ -0,0 +1,68 @@
1
+ body {
2
+ .v-chip {
3
+ .v-chip__close .v-icon {
4
+ font-size: 16px !important;
5
+ }
6
+ .v-chip__content {
7
+ overflow: hidden;
8
+ text-overflow: ellipsis;
9
+ display: flex;
10
+ height: 100%;
11
+
12
+ svg {
13
+ flex-shrink: 0;
14
+ }
15
+ }
16
+ }
17
+ .v-chip.v-chip--density-compact {
18
+ height: var(--chip-height);
19
+
20
+ &.text-grey {
21
+ border: 1px solid var(--grey);
22
+ color: var(--grey) !important;
23
+ .v-icon {
24
+ color: var(--grey) !important;
25
+ }
26
+ svg {
27
+ color: var(--grey) !important;
28
+ }
29
+ }
30
+ &.text-primary {
31
+ border: 1px solid var(--primary-l-2);
32
+ color: var(--primary-l-2) !important;
33
+ .v-icon {
34
+ color: var(--primary-l-2) !important;
35
+ }
36
+ svg {
37
+ color: var(--primary-l-2) !important;
38
+ }
39
+
40
+ &.--active {
41
+ background-color: var(--primary-l-2) !important;
42
+ color: var(--white) !important;
43
+ }
44
+ }
45
+
46
+ &.v-chip--badge {
47
+ border-radius: 0 !important;
48
+ }
49
+ }
50
+
51
+ .v-chip--variant-tonal {
52
+ background-color: var(--primary-l-2);
53
+ color: var(--white);
54
+ .v-chip__underlay {
55
+ display: none;
56
+ }
57
+ .v-chip__close {
58
+ opacity: 0.6;
59
+ }
60
+ }
61
+
62
+ .v-chip.small-chip {
63
+ font-size: var(--font-size);
64
+ }
65
+ .v-chip.v-chip--badge {
66
+ font-size: var(--font-size);
67
+ }
68
+ }
@@ -0,0 +1,73 @@
1
+ $colors: ('primary', 'secondary', 'success', 'warning', 'error', 'grey', 'dark', 'white');
2
+
3
+ body,
4
+ .v-application {
5
+ @each $color in $colors {
6
+ & .#{$color} {
7
+ background-color: var(--#{$color}) !important;
8
+ border-color: var(--#{$color}) !important;
9
+ }
10
+ & .#{$color}--text, & .text-#{$color} {
11
+ @if $color == 'primary' {
12
+ color: var(--#{$color}-l-2) !important;
13
+ } @else {
14
+ color: var(--#{$color}) !important;
15
+ }
16
+ }
17
+ & .#{$color}--bg, & .bg-#{$color} {
18
+ @if $color == 'primary' {
19
+ background-color: var(--#{$color}-l-8) !important;
20
+ } @else if $color == 'grey' {
21
+ background-color: var(--#{$color}-l-6) !important;
22
+ } @else if $color == 'secondary' {
23
+ background-color: var(--#{$color}-l-5) !important;
24
+ } @else {
25
+ background-color: var(--#{$color}) !important;
26
+ }
27
+ }
28
+ & .#{$color}--border, & .border-#{$color} {
29
+ @if $color == 'primary' {
30
+ border-color: var(--#{$color}-l-2) !important;
31
+ } @else if $color == 'grey' {
32
+ border-color: var(--#{$color}-l-5) !important;
33
+ } @else {
34
+ border-color: var(--#{$color}) !important;
35
+ }
36
+ }
37
+ & .#{$color}--hover {
38
+ transition: background 0.1s;
39
+ @if $color == 'grey' {
40
+ &:hover {
41
+ background-color: var(--#{$color}-l-6) !important;
42
+ }
43
+ } @else if $color == 'secondary' {
44
+ &:hover {
45
+ background-color: var(--#{$color}-l-5) !important;
46
+ }
47
+ } @else {
48
+ &:hover {
49
+ background-color: var(--#{$color}) !important;
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ & .text-color {
56
+ color: var(--text);
57
+ }
58
+
59
+ & .label-color {
60
+ color: var(--label);
61
+ }
62
+ }
63
+
64
+ .main-gradient-h {
65
+ background: var(--primary);
66
+ background: linear-gradient(90deg, var(--primary) 0%, var(--primary-d-1) 100%);
67
+ }
68
+
69
+ .main-gradient-v {
70
+ background: var(--primary);
71
+ background: linear-gradient(180deg, var(--primary) 0%, var(--primary-d-1) 100%);
72
+ }
73
+
@@ -0,0 +1,13 @@
1
+ @mixin mix-font-face ($font_name, $font_file) {
2
+ font-family: $font_name;
3
+ src: local('O'),
4
+ url('../fonts/#{$font_file}.woff') format('woff'),
5
+ url('../fonts/#{$font_file}.woff2') format('woff2'),
6
+ url('../fonts/#{$font_file}.ttf') format('truetype');
7
+ font-weight: normal;
8
+ font-style: normal;
9
+ }
10
+
11
+ @font-face {
12
+ @include mix-font-face('Roboto', Roboto-Regular);
13
+ }