@danielgindi/selectbox 1.0.66 → 1.0.69

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/css/selectbox.css CHANGED
@@ -1,3 +1,3 @@
1
- .selectbox{position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:4px;border:solid #aaa 1px}.selectbox.selectbox__searchable{cursor:text}.selectbox[aria-disabled=true]{border:solid #aaa 1px;background-color:#eee;cursor:default}.selectbox[aria-disabled=true] *{cursor:default}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}.selectbox.selectbox__single{padding-top:4px}.selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:17px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:0;padding-left:17px}.selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),.selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:27px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),[dir=rtl] .selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:0;padding-left:27px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:44px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:0;padding-left:44px}.selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:54px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:0;padding-left:54px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:74px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:0;padding-left:74px}.selectbox.selectbox__multi{padding-top:5px}.selectbox__focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.selectbox__list{box-sizing:border-box;list-style:none none;display:inline-block;vertical-align:top;overflow:hidden;width:100%;margin:-5px 0 0;padding:0 8px 4px;text-overflow:ellipsis;white-space:nowrap}.selectbox__list::before{float:right;display:block;content:"";width:0;height:25px}[dir=rtl] .selectbox__list::before{float:left}.selectbox__has_open_indicator .selectbox__list::before,.selectbox__has_clear .selectbox__list::before,.selectbox__has_spinner .selectbox__list::before{margin-left:-8px;margin-right:-8px}.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner) .selectbox__list::before{width:17px}.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner) .selectbox__list::before,.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear) .selectbox__list::before{width:27px}.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear) .selectbox__list::before,.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner) .selectbox__list::before{width:44px}.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator) .selectbox__list::before{width:54px}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner .selectbox__list::before{width:74px}.selectbox__open_indicator{position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.6423em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:.2em .2em 0 0;content:"";display:inline-block;height:.45em;left:.2em;position:relative;top:-0.18em;transform:rotate(135deg);vertical-align:top;width:.45em;transition:transform 150ms cubic-bezier(1, -0.115, 0.975, 0.855)}[dir=rtl] .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}[dir=rtl] .selectbox__open_indicator{right:auto;left:4px}.selectbox__clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__clear>button{box-sizing:border-box;display:block;cursor:pointer;font-weight:bold;width:26px;text-align:center;font-size:13px;line-height:1.4;margin:0;padding:0 0 3px;border:0;background:none}.selectbox__clear>button:before{content:"×"}.selectbox__clear>button:focus{outline:none;color:red}[dir=rtl] .selectbox__clear{right:auto;left:2px}.selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:14px}[dir=rtl] .selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:auto;left:14px}.selectbox__spinner{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__spinner::before{content:"";display:block;font-size:1em;width:1em;height:1em;text-indent:-9999em;overflow:hidden;border-top:.3em solid rgba(100,100,100,.1);border-right:.3em solid rgba(100,100,100,.1);border-bottom:.3em solid rgba(100,100,100,.1);border-left:.3em solid rgba(60,60,60,.45);border-radius:50%;transform:translateZ(0);animation:selectbox__spinner_anim 1.1s infinite linear;transition:opacity .1s}[dir=rtl] .selectbox__spinner{right:auto;left:2px}.selectbox__has_spinner.selectbox__has_open_indicator .selectbox__spinner{right:22px}[dir=rtl] .selectbox__has_spinner.selectbox__has_open_indicator .selectbox__spinner{right:auto;left:22px}.selectbox__has_spinner.selectbox__has_clear .selectbox__spinner{right:36px}[dir=rtl] .selectbox__has_spinner.selectbox__has_clear .selectbox__spinner{right:auto;left:36px}.selectbox__item{box-sizing:border-box;float:left;cursor:default;background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;margin-left:0;margin-right:5px;margin-top:5px;padding:0 5px 2px}.selectbox__item span{vertical-align:middle}.selectbox__item:focus{background-color:#ccc;outline:0}[dir=rtl] .selectbox__item{float:right;margin-left:5px;margin-right:0}.selectbox__item_remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;font-size:13px}.selectbox__item_remove:before{content:"×"}[dir=rtl] .selectbox__item_remove{margin-left:2px;margin-right:0}.selectbox__single_wrapper{position:relative;min-height:1em;max-width:100%;margin:0 0 3px;padding:2px 0 1px;color:currentColor}.selectbox__single_wrapper:empty::after{content:"​"}.selectbox__empty_selection .selectbox__single_wrapper{width:12em}.selectbox__has_selection.selectbox__has_input .selectbox__single_wrapper{opacity:0}.selectbox__has_selection.selectbox__empty_input.has_droplist .selectbox__single_wrapper,.selectbox__has_selection.selectbox__empty_input.selectbox__focus .selectbox__single_wrapper{opacity:.5}.selectbox__search_wrapper{max-width:100%}.selectbox__multi .selectbox__search_wrapper{float:left;margin-top:5px}[dir=rtl] .selectbox__multi .selectbox__search_wrapper{float:right}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;left:0;top:4px}[dir=rtl] .selectbox__single .selectbox__search_wrapper{right:0;left:auto}input.selectbox__search_field{box-sizing:border-box;display:inline-block;height:auto;max-width:100%;cursor:inherit;color:currentColor;-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);box-shadow:none;border:none;border-radius:0;outline:0;margin:0;padding:2px 0;font-size:1em;line-height:normal}input.selectbox__search_field::-webkit-search-decoration,input.selectbox__search_field::-webkit-search-cancel-button,input.selectbox__search_field::-webkit-search-results-button,input.selectbox__search_field::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field::-ms-clear{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field:focus{outline:0 !important;border:0 !important;box-shadow:none !important}.selectbox__single_wrapper,.selectbox__single input.selectbox__search_field{padding-left:8px;padding-right:8px}@-webkit-keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
1
+ .selectbox{position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:4px;border:solid #aaa 1px}.selectbox.selectbox__searchable{cursor:text}.selectbox[aria-disabled=true]{border:solid #aaa 1px;background-color:#eee;cursor:default}.selectbox[aria-disabled=true] *{cursor:default}.selectbox.has_droplist_above{border-top-left-radius:0;border-top-right-radius:0}.selectbox.has_droplist_below{border-bottom-left-radius:0;border-bottom-right-radius:0}.selectbox.selectbox__single{padding-top:4px}.selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:17px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:0;padding-left:17px}.selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),.selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:27px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner),[dir=rtl] .selectbox.selectbox__single.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:0;padding-left:27px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:44px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear),[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:0;padding-left:44px}.selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:54px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:0;padding-left:54px}.selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:74px}[dir=rtl] .selectbox.selectbox__single.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:0;padding-left:74px}.selectbox.selectbox__multi{padding-top:5px}.selectbox__focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.selectbox__list{box-sizing:border-box;list-style:none none;display:inline-block;vertical-align:top;overflow:hidden;width:100%;margin:-5px 0 0;padding:0 8px 4px;text-overflow:ellipsis;white-space:nowrap}.selectbox__list::before{float:right;display:block;content:"";width:0;height:25px}[dir=rtl] .selectbox__list::before{float:left}.selectbox__has_open_indicator .selectbox__list::before,.selectbox__has_clear .selectbox__list::before,.selectbox__has_spinner .selectbox__list::before{margin-left:-8px;margin-right:-8px}.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner) .selectbox__list::before{width:17px}.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner) .selectbox__list::before,.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear) .selectbox__list::before{width:27px}.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear) .selectbox__list::before,.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner) .selectbox__list::before{width:44px}.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator) .selectbox__list::before{width:54px}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner .selectbox__list::before{width:74px}.selectbox__open_indicator{position:absolute;right:4px;top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.6423em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:.2em .2em 0 0;content:"";display:inline-block;height:.45em;left:.2em;position:relative;top:-0.18em;transform:rotate(135deg);vertical-align:top;width:.45em;transition:transform 150ms cubic-bezier(1, -0.115, 0.975, 0.855)}[dir=rtl] .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}[dir=rtl] .selectbox__open_indicator{right:auto;left:4px}.selectbox__clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__clear>button{box-sizing:border-box;display:block;cursor:pointer;font-weight:bold;width:26px;text-align:center;font-size:13px;line-height:1.4;margin:0;padding:0;border:0;background:none}.selectbox__clear>button:before{content:"×"}.selectbox__clear>button:focus{outline:none;color:red}[dir=rtl] .selectbox__clear{right:auto;left:2px}.selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:14px}[dir=rtl] .selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:auto;left:14px}.selectbox[aria-disabled=true]>.selectbox__clear{display:none}.selectbox__spinner{position:absolute;right:2px;top:50%;transform:translateY(-50%);z-index:2}.selectbox__spinner::before{content:"";display:block;font-size:1em;width:1em;height:1em;text-indent:-9999em;overflow:hidden;border-top:.3em solid rgba(100,100,100,.1);border-right:.3em solid rgba(100,100,100,.1);border-bottom:.3em solid rgba(100,100,100,.1);border-left:.3em solid rgba(60,60,60,.45);border-radius:50%;transform:translateZ(0);animation:selectbox__spinner_anim 1.1s infinite linear;transition:opacity .1s}[dir=rtl] .selectbox__spinner{right:auto;left:2px}.selectbox__has_spinner.selectbox__has_open_indicator .selectbox__spinner{right:22px}[dir=rtl] .selectbox__has_spinner.selectbox__has_open_indicator .selectbox__spinner{right:auto;left:22px}.selectbox__has_spinner.selectbox__has_clear .selectbox__spinner{right:36px}[dir=rtl] .selectbox__has_spinner.selectbox__has_clear .selectbox__spinner{right:auto;left:36px}.selectbox__item{box-sizing:border-box;float:left;cursor:default;background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;margin-left:0;margin-right:5px;margin-top:5px;padding:0 5px 2px}.selectbox__item span{vertical-align:middle}.selectbox__item:focus{background-color:#ccc;outline:0}[dir=rtl] .selectbox__item{float:right;margin-left:5px;margin-right:0}.selectbox__item_remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px;font-size:13px}.selectbox__item_remove:before{content:"×"}[dir=rtl] .selectbox__item_remove{margin-left:2px;margin-right:0}.selectbox__single_wrapper{position:relative;min-height:1em;max-width:100%;margin:0 0 3px;padding:2px 0 1px;color:currentColor}.selectbox__single_wrapper:empty::after{content:"​"}.selectbox__empty_selection .selectbox__single_wrapper{width:12em}.selectbox__has_selection.selectbox__has_input .selectbox__single_wrapper{opacity:0}.selectbox__has_selection.selectbox__empty_input.has_droplist .selectbox__single_wrapper,.selectbox__has_selection.selectbox__empty_input.selectbox__focus .selectbox__single_wrapper{opacity:.5}.selectbox__search_wrapper{max-width:100%}.selectbox__multi .selectbox__search_wrapper{float:left;margin-top:5px}[dir=rtl] .selectbox__multi .selectbox__search_wrapper{float:right}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;left:0;top:4px}[dir=rtl] .selectbox__single .selectbox__search_wrapper{right:0;left:auto}input.selectbox__search_field{box-sizing:border-box;display:inline-block;height:auto;max-width:100%;cursor:inherit;color:currentColor;-webkit-appearance:none;appearance:none;background:rgba(0,0,0,0);box-shadow:none;border:none;border-radius:0;outline:0;margin:0;padding:2px 0;font-size:1em;line-height:normal}input.selectbox__search_field::-webkit-search-decoration,input.selectbox__search_field::-webkit-search-cancel-button,input.selectbox__search_field::-webkit-search-results-button,input.selectbox__search_field::-webkit-search-results-decoration{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field::-ms-clear{appearance:none;-webkit-appearance:none;width:0;height:0;margin:0;padding:0}input.selectbox__search_field:focus{outline:0 !important;border:0 !important;box-shadow:none !important}.selectbox__single_wrapper,.selectbox__single input.selectbox__search_field{padding-left:8px;padding-right:8px}@-webkit-keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes selectbox__spinner_anim{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
2
2
 
3
3
  /*# sourceMappingURL=selectbox.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CAGA,WACI,kBACA,sBACA,qBACA,eACA,UAEA,iBACA,yBAEA,WACA,sBACA,kBACA,sBAEA,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,6BACI,gBAEA,mHACI,mBAEA,6HACI,gBACA,kBAIR,sOAEI,mBAEA,0PACI,gBACA,kBAIR,0NAEI,mBAEA,8OACI,gBACA,kBAIR,6GACI,mBAEA,uHACI,gBACA,kBAIR,uGACI,mBAEA,iHACI,gBACA,kBAKZ,4BACI,gBAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBACA,gBAEA,WACA,gBACA,kBAEA,uBACA,mBAEA,yBAEI,YAEA,cACA,WACA,QACA,YAEA,mCACI,WAOJ,wJACI,iBACA,kBAKJ,gHACI,WAMJ,gOACI,WAMJ,oNACI,WAKJ,0GACI,WAKJ,oGACI,WAKZ,2BACI,kBACA,UACA,QACA,2BACA,UACA,cACA,UACA,eACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,2BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,6CACI,0BAGJ,yDACI,yCAGJ,qCACI,WACA,SAIR,kBACI,kBACA,UACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,gBACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UAIR,4BACI,WACA,SAGJ,sEACI,WAEA,gFACI,WACA,UAKZ,oBACI,kBACA,UACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBAGJ,8BACI,WACA,SAGJ,0EACI,WAEA,oFACI,WACA,UAIR,iEACI,WAEA,2EACI,WACA,UAKZ,iBAEI,sBACA,WACA,eAEA,yBACA,sBACA,kBAEA,cACA,iBACA,eACA,kBAEH,sBACC,sBAGD,uBACC,sBACA,UAGE,2BACI,YACA,gBACA,eAIR,wBACI,WACA,eACA,qBACA,iBACA,iBACH,eAEA,+BACC,YAGE,kCACI,gBACA,eAIR,2BACI,kBACA,eACA,eACA,eACA,kBACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,WACA,eAEA,uDACI,YAIR,8CACI,kBACA,UACA,OACA,QAEA,wDACI,QACA,UAKZ,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,cAEA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,4EAEI,iBACA,kBAGJ,2CACI,GACI,uBAEJ,KACI,0BAIR,mCACI,GACI,uBAEJ,KACI","file":"selectbox.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CAGA,WACI,kBACA,sBACA,qBACA,eACA,UAEA,iBACA,yBAEA,WACA,sBACA,kBACA,sBAEA,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,6BACI,gBAEA,mHACI,mBAEA,6HACI,gBACA,kBAIR,sOAEI,mBAEA,0PACI,gBACA,kBAIR,0NAEI,mBAEA,8OACI,gBACA,kBAIR,6GACI,mBAEA,uHACI,gBACA,kBAIR,uGACI,mBAEA,iHACI,gBACA,kBAKZ,4BACI,gBAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBACA,gBAEA,WACA,gBACA,kBAEA,uBACA,mBAEA,yBAEI,YAEA,cACA,WACA,QACA,YAEA,mCACI,WAOJ,wJACI,iBACA,kBAKJ,gHACI,WAMJ,gOACI,WAMJ,oNACI,WAKJ,0GACI,WAKJ,oGACI,WAKZ,2BACI,kBACA,UACA,QACA,2BACA,UACA,cACA,UACA,eACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,2BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,6CACI,0BAGJ,yDACI,yCAGJ,qCACI,WACA,SAIR,kBACI,kBACA,UACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,UACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UAIR,4BACI,WACA,SAGJ,sEACI,WAEA,gFACI,WACA,UAIR,iDACI,aAIR,oBACI,kBACA,UACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBAGJ,8BACI,WACA,SAGJ,0EACI,WAEA,oFACI,WACA,UAIR,iEACI,WAEA,2EACI,WACA,UAKZ,iBAEI,sBACA,WACA,eAEA,yBACA,sBACA,kBAEA,cACA,iBACA,eACA,kBAEH,sBACC,sBAGD,uBACC,sBACA,UAGE,2BACI,YACA,gBACA,eAIR,wBACI,WACA,eACA,qBACA,iBACA,iBACH,eAEA,+BACC,YAGE,kCACI,gBACA,eAIR,2BACI,kBACA,eACA,eACA,eACA,kBACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,WACA,eAEA,uDACI,YAIR,8CACI,kBACA,UACA,OACA,QAEA,wDACI,QACA,UAKZ,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,cAEA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,4EAEI,iBACA,kBAGJ,2CACI,GACI,uBAEJ,KACI,0BAIR,mCACI,GACI,uBAEJ,KACI","file":"selectbox.css"}
package/dist/lib.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.66
2
+ * @danielgindi/selectbox 1.0.69
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -8820,7 +8820,7 @@ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$2;
8820
8820
  var setToStringTag = setToStringTag$4;
8821
8821
  var inheritIfRequired = inheritIfRequired$2;
8822
8822
 
8823
- var collection$1 = function (CONSTRUCTOR_NAME, wrapper, common) {
8823
+ var collection$2 = function (CONSTRUCTOR_NAME, wrapper, common) {
8824
8824
  var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
8825
8825
  var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
8826
8826
  var ADDER = IS_MAP ? 'set' : 'add';
@@ -8933,7 +8933,7 @@ var InternalStateModule = internalState;
8933
8933
  var setInternalState = InternalStateModule.set;
8934
8934
  var internalStateGetterFor = InternalStateModule.getterFor;
8935
8935
 
8936
- var collectionStrong$1 = {
8936
+ var collectionStrong$2 = {
8937
8937
  getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
8938
8938
  var Constructor = wrapper(function (that, iterable) {
8939
8939
  anInstance(that, Prototype);
@@ -9123,14 +9123,14 @@ var collectionStrong$1 = {
9123
9123
  };
9124
9124
 
9125
9125
  'use strict';
9126
- var collection = collection$1;
9127
- var collectionStrong = collectionStrong$1;
9126
+ var collection$1 = collection$2;
9127
+ var collectionStrong$1 = collectionStrong$2;
9128
9128
 
9129
9129
  // `Set` constructor
9130
9130
  // https://tc39.es/ecma262/#sec-set-objects
9131
- collection('Set', function (init) {
9131
+ collection$1('Set', function (init) {
9132
9132
  return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
9133
- }, collectionStrong);
9133
+ }, collectionStrong$1);
9134
9134
 
9135
9135
  var web_domCollections_iterator = {};
9136
9136
 
@@ -9370,6 +9370,20 @@ $$2({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
9370
9370
  }
9371
9371
  });
9372
9372
 
9373
+ var es_map = {};
9374
+
9375
+ var es_map_constructor = {};
9376
+
9377
+ 'use strict';
9378
+ var collection = collection$2;
9379
+ var collectionStrong = collectionStrong$2;
9380
+
9381
+ // `Map` constructor
9382
+ // https://tc39.es/ecma262/#sec-map-objects
9383
+ collection('Map', function (init) {
9384
+ return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
9385
+ }, collectionStrong);
9386
+
9373
9387
  var es_array_findIndex = {};
9374
9388
 
9375
9389
  'use strict';
@@ -9935,6 +9949,7 @@ var SelectBox = /*#__PURE__*/function () {
9935
9949
  }
9936
9950
 
9937
9951
  this.setItems(o.items);
9952
+ delete o.items; // we do not need this in memory anymore
9938
9953
 
9939
9954
  if (o.multi && Array.isArray(o.selectedValues)) {
9940
9955
  this.setSelectedValues(o.selectedValues);
@@ -10086,6 +10101,8 @@ var SelectBox = /*#__PURE__*/function () {
10086
10101
  p.filteredItems = null;
10087
10102
  p.itemsChanged = true;
10088
10103
 
10104
+ this._updateItemByValueMap();
10105
+
10089
10106
  if (resetValues) {
10090
10107
  this.setSelectedValues(this.getSelectedValues());
10091
10108
  }
@@ -10115,9 +10132,9 @@ var SelectBox = /*#__PURE__*/function () {
10115
10132
  } }, { key: "updateItemByValue", value:
10116
10133
 
10117
10134
  function updateItemByValue(value, newItem) {
10118
- var p = this._p,valueProp = p.valueProp;
10135
+ var p = this._p;
10119
10136
 
10120
- var existingItem = p.items.find(function (x) {return x[valueProp] === value;});
10137
+ var existingItem = p.itemByValueMap.get(value);
10121
10138
  if (existingItem)
10122
10139
  Object.assign(existingItem, newItem);
10123
10140
 
@@ -10639,11 +10656,17 @@ var SelectBox = /*#__PURE__*/function () {
10639
10656
  */ }, { key: "setValueProp", value:
10640
10657
  function setValueProp(prop) {
10641
10658
  var p = this._p;
10659
+
10660
+ if (p.valueProp === prop)
10661
+ return this;
10662
+
10642
10663
  p.valueProp = prop;
10643
10664
 
10644
10665
  if (p.dropList)
10645
10666
  p.dropList.setValueProp(prop);
10646
10667
 
10668
+ this._updateItemByValueMap();
10669
+
10647
10670
  return this;
10648
10671
  }
10649
10672
 
@@ -10788,19 +10811,19 @@ var SelectBox = /*#__PURE__*/function () {
10788
10811
  var selectedValues = [];
10789
10812
  var selectedItems = [];var _iterator2 = _createForOfIteratorHelper(
10790
10813
 
10791
- values),_step2;try {var _loop = function _loop() {var value = _step2.value;
10814
+ values),_step2;try {for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {var value = _step2.value;
10792
10815
  if (set.has(value))
10793
- return "continue";
10816
+ continue;
10794
10817
  set.add(value);
10795
10818
 
10796
10819
  selectedValues.push(value);
10797
10820
 
10798
- var item = p.items.find(function (x) {return x[valueProp] === value;});
10821
+ var item = p.itemByValueMap.get(value);
10799
10822
  if (item !== undefined) {
10800
10823
  selectedItems.push(item);
10801
10824
  } else {
10802
10825
  selectedItems.push(_defineProperty({}, p.valueProp, value));
10803
- }};for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {var _ret = _loop();if (_ret === "continue") continue;
10826
+ }
10804
10827
  }} catch (err) {_iterator2.e(err);} finally {_iterator2.f();}
10805
10828
 
10806
10829
  p.selectedValues = selectedValues;
@@ -11016,6 +11039,21 @@ var SelectBox = /*#__PURE__*/function () {
11016
11039
  return this;
11017
11040
  }
11018
11041
 
11042
+ /**
11043
+ * Prepare the mapping between values and items.
11044
+ * This reduces search time greatly (i.e when checking items), especially when Vue proxies are in place.
11045
+ * @private
11046
+ */ }, { key: "_updateItemByValueMap", value:
11047
+ function _updateItemByValueMap() {
11048
+ var p = this._p;
11049
+
11050
+ var itemByValueMap = p.itemByValueMap = new Map();
11051
+ var valueProp = p.valueProp;var _iterator3 = _createForOfIteratorHelper(
11052
+ p.items),_step3;try {for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {var item = _step3.value;
11053
+ itemByValueMap.set(item[valueProp], item);
11054
+ }} catch (err) {_iterator3.e(err);} finally {_iterator3.f();}
11055
+ }
11056
+
11019
11057
  /** @private */ }, { key: "_renderBase", value:
11020
11058
  function _renderBase() {var _this4 = this;
11021
11059
  var p = this._p;
@@ -11926,9 +11964,9 @@ var SelectBox = /*#__PURE__*/function () {
11926
11964
  var p = this._p;
11927
11965
 
11928
11966
  if (this[DestroyedSymbol])
11929
- return;var _iterator3 = _createForOfIteratorHelper(
11967
+ return;var _iterator4 = _createForOfIteratorHelper(
11930
11968
 
11931
- queue),_step3;try {for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {var op = _step3.value;
11969
+ queue),_step4;try {for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {var op = _step4.value;
11932
11970
  switch (op.mode) {
11933
11971
  case 'full':
11934
11972
  this._syncFull(true);
@@ -11993,7 +12031,7 @@ var SelectBox = /*#__PURE__*/function () {
11993
12031
  this._syncFull(false);
11994
12032
  break;}
11995
12033
 
11996
- }} catch (err) {_iterator3.e(err);} finally {_iterator3.f();}
12034
+ }} catch (err) {_iterator4.e(err);} finally {_iterator4.f();}
11997
12035
  } }, { key: "_cleanupSingleWrapper", value:
11998
12036
 
11999
12037
  function _cleanupSingleWrapper() {
@@ -12368,19 +12406,19 @@ var SelectBox = /*#__PURE__*/function () {
12368
12406
  if (value === RestMultiItemsSymbol) {
12369
12407
  var items = (p.treatGroupSelectionAsItems ? p.selectedItems : p.selectedItems.filter(function (x) {return !x._group;})).
12370
12408
  slice(p.maxMultiItems);
12371
- var itemsToRemove = [];var _iterator4 = _createForOfIteratorHelper(
12409
+ var itemsToRemove = [];var _iterator5 = _createForOfIteratorHelper(
12372
12410
 
12373
- items),_step4;try {for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {var _item3 = _step4.value;
12411
+ items),_step5;try {for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {var _item3 = _step5.value;
12374
12412
  var removeselEvt = { value: value, item: _item3, cancel: false };
12375
12413
  this._trigger('removesel:before', removeselEvt);
12376
12414
  if (!removeselEvt.cancel)
12377
12415
  itemsToRemove.push(_item3);
12378
- }} catch (err) {_iterator4.e(err);} finally {_iterator4.f();}
12416
+ }} catch (err) {_iterator5.e(err);} finally {_iterator5.f();}
12379
12417
 
12380
12418
  if (itemsToRemove.length > 0) {
12381
- this._removeMultiItemElementByIndex(p.multiItemEls.length - 1);var _iterator5 = _createForOfIteratorHelper(
12419
+ this._removeMultiItemElementByIndex(p.multiItemEls.length - 1);var _iterator6 = _createForOfIteratorHelper(
12382
12420
 
12383
- itemsToRemove),_step5;try {for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {var _item2 = _step5.value;
12421
+ itemsToRemove),_step6;try {for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {var _item2 = _step6.value;
12384
12422
  // sync selection
12385
12423
  var idx = p.selectedItems.indexOf(_item2);
12386
12424
  if (idx === -1)
@@ -12391,7 +12429,7 @@ var SelectBox = /*#__PURE__*/function () {
12391
12429
  p.selectionChanged = true;
12392
12430
  p.resortBySelectionNeeded = true;
12393
12431
  }
12394
- }} catch (err) {_iterator5.e(err);} finally {_iterator5.f();}
12432
+ }} catch (err) {_iterator6.e(err);} finally {_iterator6.f();}
12395
12433
  }
12396
12434
 
12397
12435
  if (items.length > itemsToRemove.length) {
@@ -12790,6 +12828,11 @@ var SelectBox = /*#__PURE__*/function () {
12790
12828
  stickyGroup = groups[0].filter(function (x) {return stickyValues.has(x[valueProp]);});
12791
12829
  if (stickyGroup.length > 0) {
12792
12830
  groups[0] = groups[0].filter(function (x) {return !stickyValues.has(x[valueProp]);});
12831
+
12832
+ if (groups[0].length === 0)
12833
+ groups.shift();
12834
+ } else {
12835
+ stickyGroup = null;
12793
12836
  }
12794
12837
  }
12795
12838
 
@@ -12814,7 +12857,7 @@ var SelectBox = /*#__PURE__*/function () {
12814
12857
  });
12815
12858
  }
12816
12859
 
12817
- if (stickyGroup && stickyGroup.length > 0) {
12860
+ if (stickyGroup) {
12818
12861
  groups.unshift(stickyGroup);
12819
12862
  }
12820
12863