@danielgindi/selectbox 2.0.27 → 2.0.29
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 +1 -1
- package/css/selectbox.css.map +1 -1
- package/dist/lib.cjs.js +45 -13
- package/dist/lib.cjs.js.map +1 -1
- package/dist/lib.cjs.min.js +2 -2
- package/dist/lib.cjs.min.js.map +1 -1
- package/dist/lib.es6.js +45 -13
- package/dist/lib.es6.js.map +1 -1
- package/dist/lib.es6.min.js +2 -2
- package/dist/lib.es6.min.js.map +1 -1
- package/dist/lib.umd.js +45 -13
- package/dist/lib.umd.js.map +1 -1
- package/dist/lib.umd.min.js +2 -2
- package/dist/lib.umd.min.js.map +1 -1
- package/lib/SelectBox.js +44 -12
- package/package.json +1 -1
- package/scss/selectbox.scss +9 -1
- package/vue/SelectBox.vue +10 -0
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;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)}}
|
|
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[aria-readonly=true]{cursor:default}.selectbox[aria-readonly=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,.selectbox[aria-readonly=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 */
|
package/css/selectbox.css.map
CHANGED
|
@@ -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,
|
|
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,+BACC,eAEA,iCACC,eAIF,8BACC,yBACA,0BAGD,8BACC,4BACA,6BAGE,iGACI,oDAvFJ,gPA0FQ,gBACA,mDAIR,iGACI,2CAhGJ,gPAmGQ,gBACA,0CAIR,iGACI,6CAzGJ,gPA4GQ,gBACA,0CAIR,2FACI,2FAlHJ,oOAqHQ,gBACA,0FAIR,2FACI,yFA3HJ,oOA8HQ,gBACA,wFAIR,2FACI,kFApIJ,oOAuIQ,gBACA,iFAIR,qFACI,0HA7IJ,wNAgJQ,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,UA7PR,8FAkQI,WACA,oCAGJ,sEACI,mFAGJ,oMAEI,WACA,kFAGJ,kGACI,aAIR,oBACI,kBACA,uCACA,QACA,2BACA,UAEA,4BACI,WACA,cACA,cACA,UACA,WACA,oBACA,gBACA,2CACA,6CACA,8CACA,0CACA,kBACA,wBACA,uDACA,uBA3SJ,kGA+SI,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,UAvWE,4FA2WI,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.
|
|
2
|
+
* @danielgindi/selectbox 2.0.29
|
|
3
3
|
* git://github.com/danielgindi/selectbox.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -9879,6 +9879,7 @@ const inputBackbufferCssProps = [
|
|
|
9879
9879
|
* @property {string|string[]} [additionalClasses]
|
|
9880
9880
|
* @property {'ltr'|'rtl'|'auto'} [direction='auto']
|
|
9881
9881
|
* @property {boolean} [disabled=false] Should start as disabled?
|
|
9882
|
+
* @property {boolean} [readOnly=false] Should start as readOnly?
|
|
9882
9883
|
* @property {boolean} [clearable=true] Has clear button?
|
|
9883
9884
|
* @property {boolean} [hasOpenIndicator=true] has open/close indicator?
|
|
9884
9885
|
* @property {string} [placeholder=''] Placeholder text
|
|
@@ -9924,6 +9925,7 @@ const DefaultOptions = {
|
|
|
9924
9925
|
el: null,
|
|
9925
9926
|
baseClassName: 'selectbox',
|
|
9926
9927
|
disabled: false,
|
|
9928
|
+
readOnly: false,
|
|
9927
9929
|
clearable: true,
|
|
9928
9930
|
hasOpenIndicator: true,
|
|
9929
9931
|
placeholder: '',
|
|
@@ -10022,6 +10024,7 @@ class SelectBox {
|
|
|
10022
10024
|
listOptions: o.listOptions,
|
|
10023
10025
|
|
|
10024
10026
|
disabled: !!o.disabled,
|
|
10027
|
+
readOnly: !!o.readOnly,
|
|
10025
10028
|
clearable: !!o.clearable,
|
|
10026
10029
|
hasOpenIndicator: !!o.hasOpenIndicator,
|
|
10027
10030
|
placeholder: o.placeholder,
|
|
@@ -10104,6 +10107,7 @@ class SelectBox {
|
|
|
10104
10107
|
p.multiItemEls = [];
|
|
10105
10108
|
|
|
10106
10109
|
this.enable(!p.disabled);
|
|
10110
|
+
this.setReadOnly(!p.readOnly);
|
|
10107
10111
|
|
|
10108
10112
|
this._setupDropdownMenu();
|
|
10109
10113
|
|
|
@@ -10330,6 +10334,32 @@ class SelectBox {
|
|
|
10330
10334
|
return this._p.disabled;
|
|
10331
10335
|
}
|
|
10332
10336
|
|
|
10337
|
+
/**
|
|
10338
|
+
* Sets read only mode
|
|
10339
|
+
* @param {boolean=true} readOnly Should the control be read only?
|
|
10340
|
+
* @returns {SelectBox}
|
|
10341
|
+
*/
|
|
10342
|
+
setReadOnly(readOnly) {
|
|
10343
|
+
const p = this._p;
|
|
10344
|
+
|
|
10345
|
+
if (readOnly === undefined) {
|
|
10346
|
+
readOnly = true;
|
|
10347
|
+
}
|
|
10348
|
+
p.readOnly = !readOnly;
|
|
10349
|
+
p.el.setAttribute('aria-readOnly', p.readOnly.toString());
|
|
10350
|
+
p.input.readOnly = !(p.searchable || p.multi) || !!p.readOnly;
|
|
10351
|
+
|
|
10352
|
+
return this;
|
|
10353
|
+
}
|
|
10354
|
+
|
|
10355
|
+
/**
|
|
10356
|
+
* Is the control enabled?
|
|
10357
|
+
* @returns {boolean}
|
|
10358
|
+
*/
|
|
10359
|
+
isReadOnly() {
|
|
10360
|
+
return !this._p.readOnly;
|
|
10361
|
+
}
|
|
10362
|
+
|
|
10333
10363
|
/**
|
|
10334
10364
|
* @param {string|string[]} classes
|
|
10335
10365
|
* @returns {SelectBox}
|
|
@@ -11457,7 +11487,7 @@ class SelectBox {
|
|
|
11457
11487
|
spellcheck: 'false',
|
|
11458
11488
|
role: 'textbox',
|
|
11459
11489
|
'aria-autocomplete': 'list',
|
|
11460
|
-
readOnly: !(p.searchable || p.multi)
|
|
11490
|
+
readOnly: !(p.searchable || p.multi) || !!p.readOnly
|
|
11461
11491
|
})
|
|
11462
11492
|
);
|
|
11463
11493
|
}
|
|
@@ -11491,7 +11521,7 @@ class SelectBox {
|
|
|
11491
11521
|
if (!Dom.closestUntil(evt.target, ".".concat(p.baseClassName, "__item_remove"), evt.currentTarget))
|
|
11492
11522
|
return;
|
|
11493
11523
|
|
|
11494
|
-
if (p.disabled) return;
|
|
11524
|
+
if (p.disabled || p.readOnly) return;
|
|
11495
11525
|
|
|
11496
11526
|
this._removeMultiItemFromEvent(
|
|
11497
11527
|
/**@type Element*/
|
|
@@ -11544,6 +11574,7 @@ class SelectBox {
|
|
|
11544
11574
|
if (p.hasOpenIndicator) {
|
|
11545
11575
|
p.openIndicator = Dom.createElement('span', { class: "".concat(p.baseClassName, "__open_indicator") });
|
|
11546
11576
|
p.el.appendChild(p.openIndicator);
|
|
11577
|
+
p.el.classList.add("".concat(p.baseClassName, "__has_open_indicator"));
|
|
11547
11578
|
} else {
|
|
11548
11579
|
DomCompat.remove(p.openIndicator);
|
|
11549
11580
|
delete p.openIndicator;
|
|
@@ -11858,7 +11889,7 @@ class SelectBox {
|
|
|
11858
11889
|
|
|
11859
11890
|
setTimeout(() => {
|
|
11860
11891
|
if (this[DestroyedSymbol]) return; // destroyed by event handler
|
|
11861
|
-
if (p.disabled) return;
|
|
11892
|
+
if (p.disabled || p.readOnly) return;
|
|
11862
11893
|
|
|
11863
11894
|
this._trigger('search:blur');
|
|
11864
11895
|
|
|
@@ -12001,7 +12032,8 @@ class SelectBox {
|
|
|
12001
12032
|
p.lastKeyAllowsNonTypeKeys &&
|
|
12002
12033
|
!p.multi &&
|
|
12003
12034
|
!dropList.hasFocusedItem() &&
|
|
12004
|
-
!p.disabled
|
|
12035
|
+
!p.disabled &&
|
|
12036
|
+
!p.readOnly)
|
|
12005
12037
|
{
|
|
12006
12038
|
this.toggleList();
|
|
12007
12039
|
evt.preventDefault();
|
|
@@ -12013,20 +12045,20 @@ class SelectBox {
|
|
|
12013
12045
|
if (p.input) {
|
|
12014
12046
|
p.sink.
|
|
12015
12047
|
add(p.input, 'input.dropdown', () => {var _p$dropList9;
|
|
12016
|
-
if (p.disabled) return;
|
|
12048
|
+
if (p.disabled || p.readOnly) return;
|
|
12017
12049
|
|
|
12018
12050
|
p.filterTerm = p.input.value.trim();
|
|
12019
12051
|
(_p$dropList9 = p.dropList) === null || _p$dropList9 === void 0 || _p$dropList9.setSearchTerm(p.filterTerm, true);
|
|
12020
12052
|
}).
|
|
12021
12053
|
add(p.input, 'click.dropdown', () => {
|
|
12022
|
-
if (p.disabled) return;
|
|
12054
|
+
if (p.disabled || p.readOnly) return;
|
|
12023
12055
|
|
|
12024
12056
|
if (!p.multi && p.searchable) {
|
|
12025
12057
|
this.openList();
|
|
12026
12058
|
}
|
|
12027
12059
|
}).
|
|
12028
12060
|
add(p.input, 'focus.dropdown', () => {
|
|
12029
|
-
if (p.disabled) return;
|
|
12061
|
+
if (p.disabled || p.readOnly) return;
|
|
12030
12062
|
|
|
12031
12063
|
this._trigger('search:focus');
|
|
12032
12064
|
|
|
@@ -12043,7 +12075,7 @@ class SelectBox {
|
|
|
12043
12075
|
|
|
12044
12076
|
p.sink.
|
|
12045
12077
|
add(p.el, 'mousedown.dropdown', () => {
|
|
12046
|
-
if (!p.multi && !p.searchable && !avoidToggleFromClick && !p.disabled) {
|
|
12078
|
+
if (!p.multi && !p.searchable && !avoidToggleFromClick && !p.disabled && !p.readOnly) {
|
|
12047
12079
|
this.toggleList();
|
|
12048
12080
|
}
|
|
12049
12081
|
avoidToggleFromClick = false;
|
|
@@ -12052,7 +12084,7 @@ class SelectBox {
|
|
|
12052
12084
|
if (currentTouchId) return;
|
|
12053
12085
|
currentTouchId = evt.changedTouches[0].identifier;
|
|
12054
12086
|
|
|
12055
|
-
if (this.isDisabled())
|
|
12087
|
+
if (this.isDisabled() || this.isReadOnly())
|
|
12056
12088
|
return;
|
|
12057
12089
|
|
|
12058
12090
|
if (Dom.closestUntil(evt.target, ".".concat(p.baseClassName, "__item,.").concat(p.baseClassName, "__clear"), p.el))
|
|
@@ -12492,7 +12524,7 @@ class SelectBox {
|
|
|
12492
12524
|
p.el.classList.add("".concat(p.baseClassName, "__has_clear"));
|
|
12493
12525
|
|
|
12494
12526
|
p.sink.add(p.clearButton, 'click', () => {
|
|
12495
|
-
if (this.isDisabled()) return;
|
|
12527
|
+
if (this.isDisabled() || this.isReadOnly()) return;
|
|
12496
12528
|
this.clear();
|
|
12497
12529
|
});
|
|
12498
12530
|
}
|
|
@@ -12646,7 +12678,7 @@ class SelectBox {
|
|
|
12646
12678
|
if (p.input) p.input.readOnly = false;
|
|
12647
12679
|
p.el.classList.add("".concat(p.baseClassName, "__searchable"));
|
|
12648
12680
|
} else {
|
|
12649
|
-
if (p.input) p.input.readOnly =
|
|
12681
|
+
if (p.input) p.input.readOnly = p.readOnly;
|
|
12650
12682
|
p.el.classList.remove("".concat(p.baseClassName, "__searchable"));
|
|
12651
12683
|
}
|
|
12652
12684
|
|
|
@@ -13028,7 +13060,7 @@ class SelectBox {
|
|
|
13028
13060
|
_handleMultiKeydown(event) {
|
|
13029
13061
|
const p = this._p;
|
|
13030
13062
|
|
|
13031
|
-
if (p.disabled) return;
|
|
13063
|
+
if (p.disabled || p.readOnly) return;
|
|
13032
13064
|
|
|
13033
13065
|
const isRtl = getComputedStyle(p.el).direction === 'rtl';
|
|
13034
13066
|
|