@danielgindi/selectbox 2.0.26 → 2.0.27

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{--selectbox-border-radius: 4px;--selectbox-open-indicator-spacing: 0.25em;--selectbox-open-indicator-width: 1.2em;--selectbox-spinner-spacing: 0.125em;--selectbox-spinner-width: 1.2em;--selectbox-clear-spacing: 0.125em;--selectbox-clear-width: 1.2em;--selectbox-horz-padding: 0.5em;--selectbox-single-top-padding: 0.1667em;--selectbox-single-bottom-padding: 0.3334em;--selectbox-multi-vert-padding: 0.357em;--selectbox-multi-item-border-width: 1px;--selectbox-multi-item-border-radius: 4px;--selectbox-multi-item-horz-spacing: 0.416em;--selectbox-multi-item-vert-spacing: 0.416em;--selectbox-multi-item-horz-padding: 0.416em;--selectbox-multi-item-top-padding: 0px;--selectbox-multi-item-remove-spacing: 0.153em;--selectbox-multi-item-bottom-padding: 0.2em;--selectbox-multi-search-top-offset: 0px;position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;line-height:1.2;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:var(--selectbox-border-radius);border:solid #aaa 1px}.selectbox.selectbox__rtl{direction:rtl}.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__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:var(--selectbox-open-indicator-width)}.selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-open-indicator-width)}.selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner){padding-right:var(--selectbox-clear-width)}.selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-clear-width)}.selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:var(--selectbox-spinner-width)}.selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-clear-width)}.selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear){padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width))}.selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:calc(var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner.selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__multi{padding-top:var(--selectbox-multi-vert-padding);padding-bottom:var(--selectbox-multi-vert-padding)}.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;width:100%;margin:calc(0px - var(--selectbox-multi-item-vert-spacing)) 0 0;padding:0 var(--selectbox-horz-padding);text-overflow:ellipsis;white-space:nowrap}.selectbox__rtl .selectbox__list::before,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__list::before{float:left}.selectbox__open_indicator{position:absolute;right:var(--selectbox-open-indicator-spacing);top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.5em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:1.5px 1.5px 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)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}.selectbox__rtl .selectbox__open_indicator,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__open_indicator{right:auto;left:var(--selectbox-open-indicator-spacing)}.selectbox__rtl .selectbox__open_indicator::before,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__rtl.selectbox__open_list .selectbox__open_indicator::before,[dir=rtl] .selectbox.selectbox__open_list:not(.selectbox__ltr) .selectbox__open_indicator::before{transform:translateY(50%) rotate(315deg)}.selectbox__clear{position:absolute;right:var(--selectbox-clear-spacing);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}.selectbox__rtl .selectbox__clear,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__clear{right:auto;left:var(--selectbox-clear-spacing)}.selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:calc(var(--selectbox-clear-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__rtl .selectbox__clear,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__ltr) .selectbox__clear{right:auto;left:calc(var(--selectbox-clear-spacing) + var(--selectbox-open-indicator-width))}.selectbox[aria-disabled=true]>.selectbox__clear{display:none}.selectbox__spinner{position:absolute;right:var(--selectbox-spinner-spacing);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}.selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__spinner{right:auto;left:var(--selectbox-spinner-spacing)}.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear) .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator) .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width))}.selectbox__has_spinner.selectbox__has_open_indicator.selectbox__has_clear .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width) + var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear).selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__ltr) .selectbox__spinner{right:auto;left:var(var(--selectbox-spinner-spacing)--selectbox-open-indicator-width)}.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator).selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width))}.selectbox__has_spinner.selectbox__has_clear.selectbox__has_open_indicator.selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_clearselectbox__has_open_indicator:not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width) + var(--selectbox-open-indicator-width))}.selectbox__item{box-sizing:border-box;float:left;cursor:default;background-color:#e4e4e4;border:var(--selectbox-multi-item-border-width) solid #aaa;border-radius:var(--selectbox-multi-item-border-radius);margin-left:0;margin-right:var(--selectbox-multi-item-horz-spacing);margin-top:var(--selectbox-multi-item-vert-spacing);padding:var(--selectbox-multi-item-top-padding) var(--selectbox-multi-item-horz-padding) var(--selectbox-multi-item-bottom-padding);line-height:inherit}.selectbox__item span{vertical-align:top}.selectbox__item:focus{background-color:#ccc;outline:0}.selectbox__rtl .selectbox__item,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item{float:right;margin-left:var(--selectbox-multi-item-horz-spacing);margin-right:0}.selectbox__item_remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-top:.2em;margin-right:var(--selectbox-multi-item-remove-spacing);font-size:13px}.selectbox__item_remove:before{content:"×"}.selectbox__rtl .selectbox__item_remove,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item_remove{margin-left:var(--selectbox-multi-item-remove-spacing);margin-right:0}.selectbox__single_wrapper{position:relative;min-height:1em;max-width:100%;margin:0;padding:var(--selectbox-single-top-padding) var(--selectbox-horz-padding) var(--selectbox-single-bottom-padding) var(--selectbox-horz-padding);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:calc(var(--selectbox-multi-item-vert-spacing) + var(--selectbox-multi-item-border-width) + var(--selectbox-multi-item-top-padding) + var(--selectbox-multi-search-top-offset))}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;left:0;top:var(--selectbox-single-top-padding)}.selectbox__multi.selectbox__rtl .selectbox__search_wrapper,[dir=rtl] .selectbox.selectbox__multi:not(.selectbox__ltr) .selectbox__search_wrapper{float:right}.selectbox__single.selectbox__rtl .selectbox__search_wrapper,[dir=rtl] .selectbox.selectbox__single:not(.selectbox__ltr) .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:0;font-family:inherit;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 input.selectbox__search_field{padding:0 var(--selectbox-horz-padding)}.selectbox__multi input.selectbox__search_field{padding:0}.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}@-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{--selectbox-border-radius: 4px;--selectbox-open-indicator-spacing: 0.25em;--selectbox-open-indicator-width: 1.2em;--selectbox-spinner-spacing: 0.125em;--selectbox-spinner-width: 1.2em;--selectbox-clear-spacing: 0.125em;--selectbox-clear-width: 1.2em;--selectbox-horz-padding: 0.5em;--selectbox-single-top-padding: 0.1667em;--selectbox-single-bottom-padding: 0.3334em;--selectbox-multi-vert-padding: 0.357em;--selectbox-multi-item-border-width: 1px;--selectbox-multi-item-border-radius: 4px;--selectbox-multi-item-horz-spacing: 0.416em;--selectbox-multi-item-vert-spacing: 0.416em;--selectbox-multi-item-horz-padding: 0.416em;--selectbox-multi-item-top-padding: 0px;--selectbox-multi-item-remove-spacing: 0.153em;--selectbox-multi-item-bottom-padding: 0.2em;--selectbox-multi-search-top-offset: 0px;position:relative;box-sizing:border-box;display:inline-block;cursor:default;outline:0;line-height:1.2;user-select:none;-webkit-user-select:none;color:#000;background-color:#fff;border-radius:var(--selectbox-border-radius);border:solid #aaa 1px}.selectbox.selectbox__rtl{direction:rtl}.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__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner){padding-right:var(--selectbox-open-indicator-width)}.selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-open-indicator-width)}.selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner){padding-right:var(--selectbox-clear-width)}.selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-clear-width)}.selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear){padding-right:var(--selectbox-spinner-width)}.selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__has_clear):not(.selectbox__ltr){padding-right:0;padding-left:var(--selectbox-clear-width)}.selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear){padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_spinner:not(.selectbox__has_clear):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner){padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__has_spinner):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width))}.selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator){padding-right:calc(var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator).selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__has_open_indicator):not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner{padding-right:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner.selectbox__rtl,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear.selectbox__has_spinner:not(.selectbox__ltr){padding-right:0;padding-left:calc(var(--selectbox-open-indicator-width) + var(--selectbox-clear-width) + var(--selectbox-spinner-width))}.selectbox.selectbox__multi{padding-top:var(--selectbox-multi-vert-padding);padding-bottom:var(--selectbox-multi-vert-padding)}.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;width:100%;margin:calc(0px - var(--selectbox-multi-item-vert-spacing)) 0 0;padding:0 var(--selectbox-horz-padding);text-overflow:ellipsis;white-space:nowrap}.selectbox__rtl .selectbox__list::before,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__list::before{float:left}.selectbox__open_indicator{position:absolute;right:var(--selectbox-open-indicator-spacing);top:50%;transform:translateY(-50%);z-index:2;font-size:1em;width:1em;height:.5em;overflow:hidden;direction:ltr;text-align:left;cursor:pointer}.selectbox__open_indicator::before{border-style:solid;border-color:#9d9d9d;border-width:1.5px 1.5px 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)}.selectbox__open_list .selectbox__open_indicator::before{transform:translateY(50%) rotate(-45deg)}.selectbox__rtl .selectbox__open_indicator,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__open_indicator{right:auto;left:var(--selectbox-open-indicator-spacing)}.selectbox__rtl .selectbox__open_indicator::before,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__open_indicator::before{transform:rotate(-225deg)}.selectbox__rtl.selectbox__open_list .selectbox__open_indicator::before,[dir=rtl] .selectbox.selectbox__open_list:not(.selectbox__ltr) .selectbox__open_indicator::before{transform:translateY(50%) rotate(315deg)}.selectbox__clear{position:absolute;right:var(--selectbox-clear-spacing);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}.selectbox__rtl .selectbox__clear,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__clear{right:auto;left:var(--selectbox-clear-spacing)}.selectbox__has_open_indicator.selectbox__has_clear .selectbox__clear{right:calc(var(--selectbox-clear-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_open_indicator.selectbox__has_clear.selectbox__rtl .selectbox__clear,[dir=rtl] .selectbox.selectbox__has_open_indicator.selectbox__has_clear:not(.selectbox__ltr) .selectbox__clear{right:auto;left:calc(var(--selectbox-clear-spacing) + var(--selectbox-open-indicator-width))}.selectbox[aria-disabled=true]>.selectbox__clear{display:none}.selectbox__spinner{position:absolute;right:var(--selectbox-spinner-spacing);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}.selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__spinner{right:auto;left:var(--selectbox-spinner-spacing)}.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear) .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-open-indicator-width))}.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator) .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width))}.selectbox__has_spinner.selectbox__has_open_indicator.selectbox__has_clear .selectbox__spinner{right:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width) + var(--selectbox-open-indicator-width) + var(--selectbox-spinner-width))}.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear).selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_open_indicator:not(.selectbox__has_clear):not(.selectbox__ltr) .selectbox__spinner{right:auto;left:var(var(--selectbox-spinner-spacing)--selectbox-open-indicator-width)}.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator).selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_clear:not(.selectbox__has_open_indicator):not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width))}.selectbox__has_spinner.selectbox__has_clear.selectbox__has_open_indicator.selectbox__rtl .selectbox__spinner,[dir=rtl] .selectbox.selectbox__has_spinner.selectbox__has_clearselectbox__has_open_indicator:not(.selectbox__ltr) .selectbox__spinner{right:auto;left:calc(var(--selectbox-spinner-spacing) + var(--selectbox-clear-width) + var(--selectbox-open-indicator-width))}.selectbox__item{box-sizing:border-box;float:left;cursor:default;background-color:#e4e4e4;border:var(--selectbox-multi-item-border-width) solid #aaa;border-radius:var(--selectbox-multi-item-border-radius);margin-left:0;margin-right:var(--selectbox-multi-item-horz-spacing);margin-top:var(--selectbox-multi-item-vert-spacing);padding:var(--selectbox-multi-item-top-padding) var(--selectbox-multi-item-horz-padding) var(--selectbox-multi-item-bottom-padding);line-height:inherit}.selectbox__item span{vertical-align:top}.selectbox__item:focus{background-color:#ccc;outline:0}.selectbox__rtl .selectbox__item,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item{float:right;margin-left:var(--selectbox-multi-item-horz-spacing);margin-right:0}.selectbox__item_remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-top:.2em;font-size:13px}.selectbox__item_remove:before{content:"×"}.selectbox__item_remove:first-child{margin-right:var(--selectbox-multi-item-remove-spacing)}.selectbox__item_remove:last-child{margin-left:var(--selectbox-multi-item-remove-spacing)}.selectbox__rtl .selectbox__item_remove:first-child,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item_remove:first-child{margin-left:var(--selectbox-multi-item-remove-spacing);margin-right:0}.selectbox__rtl .selectbox__item_remove:last-child,[dir=rtl] .selectbox:not(.selectbox__ltr) .selectbox__item_remove:last-child{margin-right:var(--selectbox-multi-item-remove-spacing);margin-left:0}.selectbox__single_wrapper{position:relative;min-height:1em;max-width:100%;margin:0;padding:var(--selectbox-single-top-padding) var(--selectbox-horz-padding) var(--selectbox-single-bottom-padding) var(--selectbox-horz-padding);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:calc(var(--selectbox-multi-item-vert-spacing) + var(--selectbox-multi-item-border-width) + var(--selectbox-multi-item-top-padding) + var(--selectbox-multi-search-top-offset))}.selectbox__single .selectbox__search_wrapper{position:absolute;z-index:1;left:0;top:var(--selectbox-single-top-padding)}.selectbox__multi.selectbox__rtl .selectbox__search_wrapper,[dir=rtl] .selectbox.selectbox__multi:not(.selectbox__ltr) .selectbox__search_wrapper{float:right}.selectbox__single.selectbox__rtl .selectbox__search_wrapper,[dir=rtl] .selectbox.selectbox__single:not(.selectbox__ltr) .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:0;font-family:inherit;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 input.selectbox__search_field{padding:0 var(--selectbox-horz-padding)}.selectbox__multi input.selectbox__search_field{padding:0}.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}@-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":"CAeA,WACI,+BACA,2CACA,wCACA,qCACA,iCACA,mCACA,+BACA,gCAEA,yCACA,4CAEA,wCACA,yCACA,0CACA,6CACA,6CACA,6CACA,wCACA,+CACA,6CACA,yCAEA,kBACA,sBACA,qBACA,eACA,UACA,gBAEA,iBACA,yBAEA,WACA,sBACA,6CACA,sBAEA,0BACI,cAGJ,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,iGACI,oDA/EJ,gPAkFQ,gBACA,mDAIR,iGACI,2CAxFJ,gPA2FQ,gBACA,0CAIR,iGACI,6CAjGJ,gPAoGQ,gBACA,0CAIR,2FACI,2FA1GJ,oOA6GQ,gBACA,0FAIR,2FACI,yFAnHJ,oOAsHQ,gBACA,wFAIR,2FACI,kFA5HJ,oOA+HQ,gBACA,iFAIR,qFACI,0HArIJ,wNAwIQ,gBACA,yHAIR,4BACI,gDACA,mDAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBAEA,WACA,gEACA,wCAEA,uBACA,mBAGI,4GACI,WAKZ,2BACI,kBACA,8CACA,QACA,2BACA,UACA,cACA,UACA,YACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,6BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,yDACI,yCAGJ,gHACI,WACA,6CAEA,gIACI,0BAKJ,0KACI,yCAKZ,kBACI,kBACA,qCACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,UACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UArPR,8FA0PI,WACA,oCAGJ,sEACI,mFAGJ,oMAEI,WACA,kFAGJ,iDACI,aAIR,oBACI,kBACA,uCACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBAnSJ,kGAuSI,WACA,sCAGJ,qGACI,qFAGJ,qGACI,4EAGJ,+FACI,qJAGJ,kQAEI,WACA,2EAGJ,kQAEI,WACA,2EAGJ,qPAEI,WACA,mHAIR,iBACI,sBACA,WACA,eAEA,yBACA,2DACA,wDAEA,cACA,sDACA,oDACA,oIACA,oBAEH,sBACC,mBAGD,uBACC,sBACA,UA/VE,4FAmWI,YACA,qDACA,eAIR,wBACI,WACA,eACA,qBACA,iBACA,gBACA,wDACH,eAEA,+BACC,YAnXE,0GAuXI,uDACA,eAIR,2BACI,kBACA,eACA,eACA,SACA,+IACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,WACA,0LAMJ,8CACI,kBACA,UACA,OACA,wCAGJ,kJAEI,YAGJ,oJAEI,QACA,UAIR,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,UAEA,oBACA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,iDACI,wCAGJ,gDACI,UAGJ,8BACI,yBACA,0BAGJ,8BACI,4BACA,6BAGJ,2CACI,GACI,uBAEJ,KACI,0BAIR,mCACI,GACI,uBAEJ,KACI","file":"selectbox.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/selectbox.scss"],"names":[],"mappings":"CAeA,WACI,+BACA,2CACA,wCACA,qCACA,iCACA,mCACA,+BACA,gCAEA,yCACA,4CAEA,wCACA,yCACA,0CACA,6CACA,6CACA,6CACA,wCACA,+CACA,6CACA,yCAEA,kBACA,sBACA,qBACA,eACA,UACA,gBAEA,iBACA,yBAEA,WACA,sBACA,6CACA,sBAEA,0BACI,cAGJ,iCACI,YAGP,+BACC,sBACA,sBACA,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,iGACI,oDA/EJ,gPAkFQ,gBACA,mDAIR,iGACI,2CAxFJ,gPA2FQ,gBACA,0CAIR,iGACI,6CAjGJ,gPAoGQ,gBACA,0CAIR,2FACI,2FA1GJ,oOA6GQ,gBACA,0FAIR,2FACI,yFAnHJ,oOAsHQ,gBACA,wFAIR,2FACI,kFA5HJ,oOA+HQ,gBACA,iFAIR,qFACI,0HArIJ,wNAwIQ,gBACA,yHAIR,4BACI,gDACA,mDAIR,kBACI,qBACA,UAEA,WADM,8DAIV,iBACI,sBACA,qBACA,qBACA,mBAEA,WACA,gEACA,wCAEA,uBACA,mBAGI,4GACI,WAKZ,2BACI,kBACA,8CACA,QACA,2BACA,UACA,cACA,UACA,YACA,gBACA,cACA,gBACA,eAEA,mCACI,mBACA,qBACA,6BACA,WACA,qBACA,aACA,UACA,kBACA,YACA,yBACA,mBACA,YACA,iEAGJ,yDACI,yCAGJ,gHACI,WACA,6CAEA,gIACI,0BAKJ,0KACI,yCAKZ,kBACI,kBACA,qCACA,QACA,2BACA,UAEA,yBACI,sBACA,cACA,eACA,iBACA,WACA,kBACA,eACA,gBACA,SACA,UACA,SACA,gBAEA,gCACI,YAGJ,+BACI,aACA,UArPR,8FA0PI,WACA,oCAGJ,sEACI,mFAGJ,oMAEI,WACA,kFAGJ,iDACI,aAIR,oBACI,kBACA,uCACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBAnSJ,kGAuSI,WACA,sCAGJ,qGACI,qFAGJ,qGACI,4EAGJ,+FACI,qJAGJ,kQAEI,WACA,2EAGJ,kQAEI,WACA,2EAGJ,qPAEI,WACA,mHAIR,iBACI,sBACA,WACA,eAEA,yBACA,2DACA,wDAEA,cACA,sDACA,oDACA,oIACA,oBAEH,sBACC,mBAGD,uBACC,sBACA,UA/VE,4FAmWI,YACA,qDACA,eAIR,wBACI,WACA,eACA,qBACA,iBACA,gBACH,eAEA,+BACC,YAGE,oCACI,wDAGJ,mCACI,uDAIA,kIACI,uDACA,eAGJ,gIACI,wDACA,cAKZ,2BACI,kBACA,eACA,eACA,SACA,+IACA,mBAEA,oDAEA,uDACI,WAGJ,0EACI,UAIR,sLAEI,WAGJ,2BACC,eAEG,6CACI,WACA,0LAMJ,8CACI,kBACA,UACA,OACA,wCAGJ,kJAEI,YAGJ,oJAEI,QACA,UAIR,8BACI,sBACH,qBACG,YACH,eACG,eACA,mBAEA,wBACA,gBACH,yBACG,gBACA,YACA,gBACA,UACA,SACA,UAEA,oBACA,cACA,mBAEA,mPAII,gBACA,wBACA,QACA,SACA,SACA,UAGJ,yCACI,gBACA,wBACA,QACA,SACA,SACA,UAGP,oCACC,qBACA,oBACA,2BAIF,iDACI,wCAGJ,gDACI,UAGJ,8BACI,yBACA,0BAGJ,8BACI,4BACA,6BAGJ,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 2.0.26
2
+ * @danielgindi/selectbox 2.0.27
3
3
  * git://github.com/danielgindi/selectbox.git
4
4
  */
5
5
  'use strict';
@@ -6371,7 +6371,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty;
6371
6371
  /** */
6372
6372
 
6373
6373
  /** @type {DropList.Options} */
6374
- let defaultOptions$1 = {
6374
+ const DefaultOptions$1 = {
6375
6375
  baseClassName: 'droplist',
6376
6376
 
6377
6377
  autoItemBlur: true,
@@ -6430,7 +6430,7 @@ class DropList {
6430
6430
  * @param {DropList.Options} options
6431
6431
  */
6432
6432
  constructor(options) {var _o$positionOptionsPro;
6433
- const o = _objectSpread2({}, defaultOptions$1);
6433
+ const o = _objectSpread2({}, DefaultOptions$1);
6434
6434
 
6435
6435
  for (let [key, value] of Object.entries(/**@type Object*/options))
6436
6436
  if (value !== undefined)
@@ -9897,6 +9897,7 @@ const inputBackbufferCssProps = [
9897
9897
  * @property {string} [labelProp='label']
9898
9898
  * @property {string} [valueProp='value']
9899
9899
  * @property {string} [multiItemLabelProp='short_label']
9900
+ * @property {'after'|'before'|'none'} [multiItemRemovePosition='after']
9900
9901
  * @property {number} [maxMultiItems] maximum number of multi items. The rest will get a single item to represent.
9901
9902
  * @property {function(count: number, items: DropList.ItemBase[]):string} [multiItemsRestLabelProvider] label for the item representing the rest of the items.
9902
9903
  * @property {DropList.ItemBase[]|null} [items] initial items
@@ -9919,7 +9920,7 @@ const inputBackbufferCssProps = [
9919
9920
  * @property {boolean} [closeListWhenLoading] whether we should close the list automatically when loading
9920
9921
  * @property {string[]} [clearInputWhen=['single_close','multi_select_single']] clear input box when closing the droplist or selecting <code>['single_close', 'multi_close', 'multi_select_single']</code>
9921
9922
  * */
9922
- const defaultOptions = {
9923
+ const DefaultOptions = {
9923
9924
  el: null,
9924
9925
  baseClassName: 'selectbox',
9925
9926
  disabled: false,
@@ -9946,6 +9947,7 @@ const defaultOptions = {
9946
9947
  labelProp: 'label',
9947
9948
  valueProp: 'value',
9948
9949
  multiItemLabelProp: 'short_label',
9950
+ multiItemRemovePosition: 'after',
9949
9951
  maxMultiItems: null,
9950
9952
  multiItemsRestLabelProvider: null,
9951
9953
  items: [],
@@ -10004,7 +10006,7 @@ class SelectBox {
10004
10006
  * @param {SelectBox.Options} options
10005
10007
  */
10006
10008
  constructor(options) {
10007
- const o = _objectSpread2({}, defaultOptions);
10009
+ const o = _objectSpread2({}, DefaultOptions);
10008
10010
 
10009
10011
  for (let [key, value] of Object.entries(/**@type Object*/options))
10010
10012
  if (value !== undefined)
@@ -10042,6 +10044,7 @@ class SelectBox {
10042
10044
  labelProp: o.labelProp,
10043
10045
  valueProp: o.valueProp,
10044
10046
  multiItemLabelProp: o.multiItemLabelProp,
10047
+ multiItemRemovePosition: o.multiItemRemovePosition,
10045
10048
 
10046
10049
  maxMultiItems: o.maxMultiItems,
10047
10050
  multiItemsRestLabelProvider: o.multiItemsRestLabelProvider,
@@ -10954,6 +10957,18 @@ class SelectBox {
10954
10957
  setMultiItemLabelProp(prop) {
10955
10958
  const p = this._p;
10956
10959
  p.multiItemLabelProp = prop;
10960
+ this._scheduleSync('render_items');
10961
+ return this;
10962
+ }
10963
+
10964
+ /**
10965
+ * @param {'before'|'after'|'none'} position
10966
+ * @returns {SelectBox}
10967
+ */
10968
+ setMultiItemRemovePosition(position) {
10969
+ const p = this._p;
10970
+ p.multiItemRemovePosition = position;
10971
+ this._scheduleSync('render_items');
10957
10972
  return this;
10958
10973
  }
10959
10974
 
@@ -12674,22 +12689,29 @@ class SelectBox {
12674
12689
  if (label === false)
12675
12690
  return null;
12676
12691
 
12692
+ const elRemove = Dom.createElement('span', {
12693
+ class: "".concat(p.baseClassName, "__item_remove"),
12694
+ role: 'presentation'
12695
+ });
12696
+
12677
12697
  const itemEl = Dom.createElement('li',
12678
12698
  {
12679
12699
  class: "".concat(p.baseClassName, "__item"),
12680
12700
  tabindex: '0',
12681
12701
  title: label
12682
- },
12683
- [
12684
- Dom.createElement('span', {
12685
- class: "".concat(p.baseClassName, "__item_remove"),
12686
- role: 'presentation'
12687
- })]
12688
-
12702
+ }
12689
12703
  );
12690
12704
 
12705
+ if (p.multiItemRemovePosition === 'before') {
12706
+ itemEl.appendChild(elRemove);
12707
+ }
12708
+
12691
12709
  this._renderMultiItemContent(item, itemEl);
12692
12710
 
12711
+ if (p.multiItemRemovePosition === 'after') {
12712
+ itemEl.appendChild(elRemove);
12713
+ }
12714
+
12693
12715
  itemEl[ItemSymbol] = item;
12694
12716
 
12695
12717
  return itemEl;