@danielgindi/selectbox 1.0.57 → 1.0.60

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;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:.25em .25em 0 0;content:"";display:inline-block;height:.45em;left:.15em;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__multi .selectbox__open_indicator{top:11px}.selectbox__single .selectbox__open_indicator{top:8px}.selectbox__clear{position:absolute;right:2px;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__multi .selectbox__clear{top:5px}.selectbox__single .selectbox__clear{top:4px}.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;z-index:2;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__multi .selectbox__spinner{top:4px}.selectbox__single .selectbox__spinner{top:3px}.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 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)}}
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,UACA,cACA,UACA,eACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,6BACA,WACA,qBACA,aACA,WACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,6CACI,0BAGJ,yDACI,yCAGJ,qCACI,WACA,SAGJ,6CACI,SAGJ,8CACI,QAIR,kBACI,kBACA,UACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,gBACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UAIR,4BACI,WACA,SAGJ,oCACI,QAGJ,qCACI,QAGJ,sEACI,WAEA,gFACI,WACA,UAKZ,oBACI,kBACA,UACA,UACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBAEA,8BACI,WACA,SAGJ,sCACI,QAGJ,uCACI,QAGJ,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,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"}
package/dist/lib.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/selectbox 1.0.57
2
+ * @danielgindi/selectbox 1.0.60
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -5993,7 +5993,8 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;
5993
5993
  * @property {Element} [el] An element to attach to, instead of creating a new one
5994
5994
  * @property {string} [baseClassName='droplist'] class name for the menu root element
5995
5995
  * @property {string|string[]} [additionalClasses]
5996
- * @property {number} [itemBlurDelay=300] How long to wait before deciding to blur the focused item?
5996
+ * @property {boolean} [autoItemBlur=true] Should we automatically blur the focused item when the droplist loses focus?
5997
+ * @property {number} [autoItemBlurDelay=300] How long to wait before deciding to blur the focused item (when the droplist loses focus)?
5997
5998
  * @property {boolean} [capturesFocus=true] Should this DropList be added to the TAB-key stack?
5998
5999
  * @property {boolean} [multi=false] Does this DropList show checkboxes for multiple item selection?
5999
6000
  * @property {function} [keyDownHandler=null] An alternative "keydown" event handler. Return true to prevent default behaviour.
@@ -6053,7 +6054,8 @@ var hasOwnProperty = Object.prototype.hasOwnProperty;
6053
6054
  var defaultOptions$1 = {
6054
6055
  baseClassName: 'droplist',
6055
6056
 
6056
- itemBlurDelay: 300,
6057
+ autoItemBlur: true,
6058
+ autoItemBlurDelay: 300,
6057
6059
  capturesFocus: true,
6058
6060
  multi: false,
6059
6061
  keyDownHandler: null,
@@ -6076,9 +6078,9 @@ var defaultOptions$1 = {
6076
6078
  Emits the following events:
6077
6079
  ---------------------------
6078
6080
 
6079
- 'itemfocus' {value, item, event}: item gained focus.
6081
+ 'itemfocus' {value, item, event?, el}: item gained focus.
6080
6082
  'itemblur' {value, item}: item lost focus.
6081
- 'select' {value, item}: item was selected (in single mode).
6083
+ 'select' {value, item, event?, el}: item was selected (in single mode).
6082
6084
  'show:before': the drop list will show.
6083
6085
  'show': the drop list has been shown.
6084
6086
  'hide:before': the drop list will hide.
@@ -6107,7 +6109,8 @@ var DropList = /*#__PURE__*/function () {
6107
6109
 
6108
6110
  baseClassName: o.baseClassName,
6109
6111
  additionalClasses: o.additionalClasses,
6110
- itemBlurDelay: o.itemBlurDelay,
6112
+ autoItemBlur: o.autoItemBlur,
6113
+ autoItemBlurDelay: o.autoItemBlurDelay,
6111
6114
  capturesFocus: o.capturesFocus,
6112
6115
  multi: o.multi,
6113
6116
  keyDownHandler: o.keyDownHandler,
@@ -6244,7 +6247,9 @@ var DropList = /*#__PURE__*/function () {
6244
6247
  p.virtualListHelper.setOnItemUnrender(function (el) {
6245
6248
  try {
6246
6249
  fn(el[ItemSymbol$1][ItemSymbol$1], el);
6247
- } catch (err) {console.error(err);} // eslint-disable-line no-console
6250
+ } catch (err) {
6251
+ console.error(err); // eslint-disable-line no-console
6252
+ }
6248
6253
  delete el[ItemSymbol$1];
6249
6254
 
6250
6255
  if (p.focusItemEl === el)
@@ -6363,7 +6368,9 @@ var DropList = /*#__PURE__*/function () {
6363
6368
  p.virtualListHelper.setOnItemUnrender(function (el) {
6364
6369
  try {
6365
6370
  _fn(el[ItemSymbol$1][ItemSymbol$1], el);
6366
- } catch (err) {console.error(err);} // eslint-disable-line no-console
6371
+ } catch (err) {
6372
+ console.error(err); // eslint-disable-line no-console
6373
+ }
6367
6374
  delete el[ItemSymbol$1];
6368
6375
 
6369
6376
  if (p.focusItemEl === el)
@@ -6483,7 +6490,8 @@ var DropList = /*#__PURE__*/function () {
6483
6490
  this._trigger('select', {
6484
6491
  value: item ? item.value : undefined,
6485
6492
  item: (_item$ItemSymbol3 = item[ItemSymbol$1]) !== null && _item$ItemSymbol3 !== void 0 ? _item$ItemSymbol3 : item,
6486
- event: event });
6493
+ event: event,
6494
+ el: p.focusItemEl });
6487
6495
 
6488
6496
 
6489
6497
  return true;
@@ -7078,7 +7086,7 @@ var DropList = /*#__PURE__*/function () {
7078
7086
  // Detect mouse tap outside of the droplist, to blur the focused item
7079
7087
  p.sink.add(document, 'mousedown', p.onDocumentMouseDown = function (event) {
7080
7088
  if (!p.el.contains(event.target))
7081
- _this2._delayBlur();
7089
+ _this2._delayBlurItemOnBlur();
7082
7090
  });
7083
7091
  }
7084
7092
  });
@@ -7227,7 +7235,12 @@ var DropList = /*#__PURE__*/function () {
7227
7235
  itemElement.classList.add("".concat(p.baseClassName, "__item_focus"));
7228
7236
  p.focusItemEl = itemElement;
7229
7237
 
7230
- this._trigger('itemfocus', { value: itemElement.value, item: itemElement[ItemSymbol$1], event: null });
7238
+ this._trigger('itemfocus', {
7239
+ value: itemElement.value,
7240
+ item: itemElement[ItemSymbol$1],
7241
+ event: null,
7242
+ el: itemElement });
7243
+
7231
7244
  }
7232
7245
  }
7233
7246
 
@@ -7502,7 +7515,9 @@ var DropList = /*#__PURE__*/function () {
7502
7515
 
7503
7516
  // Track scrolling
7504
7517
  var didScroll = false;
7505
- var onScroll = function onScroll() {didScroll = true;};
7518
+ var onScroll = function onScroll() {
7519
+ didScroll = true;
7520
+ };
7506
7521
  var onTouchCancel = function onTouchCancel() {
7507
7522
  currentTouchId = null;
7508
7523
  p.sink.remove(null, '.dropdown_touchextra');
@@ -7551,7 +7566,7 @@ var DropList = /*#__PURE__*/function () {
7551
7566
  if (_this8[DestroyedSymbol$1]) return;
7552
7567
 
7553
7568
  if (!p.el.contains(document.activeElement)) {
7554
- _this8._delayBlur();
7569
+ _this8._delayBlurItemOnBlur();
7555
7570
  }
7556
7571
  });
7557
7572
  });
@@ -7734,21 +7749,24 @@ var DropList = /*#__PURE__*/function () {
7734
7749
  p.focusItemIndex = itemIndex;
7735
7750
 
7736
7751
  var item = p.items[itemIndex];
7737
- this._trigger('itemfocus', { value: item.value, item: (_item$ItemSymbol4 = item[ItemSymbol$1]) !== null && _item$ItemSymbol4 !== void 0 ? _item$ItemSymbol4 : item, event: event });
7738
- } }, { key: "_delayBlur", value:
7752
+ this._trigger('itemfocus', { value: item.value, item: (_item$ItemSymbol4 = item[ItemSymbol$1]) !== null && _item$ItemSymbol4 !== void 0 ? _item$ItemSymbol4 : item, event: event, el: focusItemEl });
7753
+ } }, { key: "_delayBlurItemOnBlur", value:
7739
7754
 
7740
- function _delayBlur() {var _this10 = this;
7755
+ function _delayBlurItemOnBlur() {var _this10 = this;
7741
7756
  if (this[DestroyedSymbol$1])
7742
7757
  return;
7743
7758
 
7744
7759
  var p = this._p;
7745
7760
 
7761
+ if (!p.autoItemBlur)
7762
+ return;
7763
+
7746
7764
  clearTimeout(p.blurTimer);
7747
7765
 
7748
7766
  p.blurTimer = setTimeout(function () {
7749
7767
  if (_this10[DestroyedSymbol$1]) return;
7750
7768
  _this10.blurFocusedItem();
7751
- }, p.itemBlurDelay);
7769
+ }, p.autoItemBlurDelay);
7752
7770
  } }, { key: "_move", value:
7753
7771
 
7754
7772
  function _move(direction, event) {
@@ -7934,7 +7952,11 @@ var DropList = /*#__PURE__*/function () {
7934
7952
  }
7935
7953
 
7936
7954
  // Fire event
7937
- this._trigger('groupcheck', { value: item.value, item: (_item$ItemSymbol5 = item[ItemSymbol$1]) !== null && _item$ItemSymbol5 !== void 0 ? _item$ItemSymbol5 : item, affectedItems: affectedItems });
7955
+ this._trigger('groupcheck', {
7956
+ value: item.value,
7957
+ item: (_item$ItemSymbol5 = item[ItemSymbol$1]) !== null && _item$ItemSymbol5 !== void 0 ? _item$ItemSymbol5 : item,
7958
+ affectedItems: affectedItems });
7959
+
7938
7960
  } else if (p.groupCount > 0) {
7939
7961
  items = p.items;
7940
7962
  itemIndex = items.indexOf(item);
@@ -11593,7 +11615,9 @@ var SelectBox = /*#__PURE__*/function () {
11593
11615
  if (p.unrenderSingleItem && p.singleWrapper.childNodes.length > 0) {
11594
11616
  try {
11595
11617
  p.unrenderSingleItem(p.singleWrapper[ItemSymbol], p.singleWrapper);
11596
- } catch (err) {console.error(err);} // eslint-disable-line no-console
11618
+ } catch (err) {
11619
+ console.error(err); // eslint-disable-line no-console
11620
+ }
11597
11621
  }
11598
11622
 
11599
11623
  delete p.singleWrapper[ItemSymbol];
@@ -11618,7 +11642,9 @@ var SelectBox = /*#__PURE__*/function () {
11618
11642
  if (unrender && itemEl.childNodes.length > 0) {
11619
11643
  try {
11620
11644
  unrender(item, itemEl);
11621
- } catch (err) {console.error(err);} // eslint-disable-line no-console
11645
+ } catch (err) {
11646
+ console.error(err); // eslint-disable-line no-console
11647
+ }
11622
11648
  }
11623
11649
  DomCompat.remove(itemEl);
11624
11650