UNPKG

react-selectize

Version:

A Stateless & Flexible Select component for React inspired by Selectize

300 lines (299 loc) 8.13 kB
.react-selectize { color: #000; } .react-selectize.control-wrapper { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; position: relative; } .react-selectize.control-wrapper:not(.tethered) { width: 300px; } .react-selectize.control-wrapper.disabled { pointer-events: none; } .react-selectize.control-wrapper .react-selectize-control { cursor: pointer; display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-align: start; -moz-box-align: start; -o-box-align: start; -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start; position: relative; padding: 2px; } .react-selectize.control-wrapper .react-selectize-control > div { min-height: 30px; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-placeholder { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; overflow: hidden; -o-text-overflow: ellipsis; text-overflow: ellipsis; white-space: nowrap; position: absolute; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-selected-values { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; -ms-box-flex: 1; box-flex: 1; -webkit-flex-grow: 1; flex-grow: 1; -webkit-box-lines: multiple; -moz-box-lines: multiple; -o-box-lines: multiple; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-selected-values .resizable-input { background: none; border: none; outline: none; font-size: 1em; margin: 2px; padding: 4px 0px; vertical-align: middle; width: 0px; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-selected-values .value-wrapper { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-arrow-container, .react-selectize.control-wrapper .react-selectize-control .react-selectize-reset-container { -webkit-box-flex: 0; -moz-box-flex: 0; -o-box-flex: 0; -ms-box-flex: 0; box-flex: 0; -webkit-flex-grow: 0; flex-grow: 0; -webkit-flex-shrink: 0; flex-shrink: 0; cursor: pointer; display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: center; -moz-box-pack: center; -o-box-pack: center; -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-arrow-container { width: 32px; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-reset-container { width: 16px; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-reset-container:hover .react-selectize-reset path { stroke: #c0392b; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-arrow path { fill: #999; } .react-selectize.control-wrapper .react-selectize-control .react-selectize-reset path { -webkit-transition: stroke 0.5s 0s ease; -moz-transition: stroke 0.5s 0s ease; -o-transition: stroke 0.5s 0s ease; -ms-transition: stroke 0.5s 0s ease; transition: stroke 0.5s 0s ease; stroke: #999; stroke-linecap: square; stroke-linejoin: mitter; } .react-selectize.control-wrapper .dropdown-menu.tethered { min-width: 298px; } .react-selectize.control-wrapper .dropdown-menu:not(.tethered) { width: calc(100% - 2px); } .react-selectize.dropdown-menu-wrapper { position: absolute; } .react-selectize.dropdown-menu-wrapper.tethered { min-width: 298px; } .react-selectize.dropdown-menu-wrapper:not(.tethered) { width: calc(100% - 2px); } .react-selectize.dropdown-menu { overflow: auto; position: absolute; max-height: 200px; z-index: 10; } .react-selectize.dropdown-menu .groups.as-columns { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; } .react-selectize.dropdown-menu .groups.as-columns > div { -webkit-box-flex: 1; -moz-box-flex: 1; -o-box-flex: 1; box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; } .react-selectize.dropdown-menu .option-wrapper { cursor: pointer; outline: none; } .multi-select.react-selectize.control-wrapper .simple-value { display: inline-block; margin: 2px; vertical-align: middle; } .multi-select.react-selectize.control-wrapper .simple-value span { display: inline-block; padding: 2px 5px 4px; vertical-align: center; } .simple-select.react-selectize.control-wrapper .simple-value { margin: 2px; } .simple-select.react-selectize.control-wrapper .simple-value span { display: inline-block; vertical-align: center; } .react-selectize.dark { font-family: Helvetica Neue, Helvetica, Arial, sans-serif; } .react-selectize.dark.control-wrapper .react-selectize-control { border: 1px solid #363636; -webkit-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0px 1px 0px rgba(255,255,255,0.15) inset, 0px 1px 0px 0px rgba(255,255,255,0.1); box-shadow: 0px 1px 0px rgba(255,255,255,0.15) inset, 0px 1px 0px 0px rgba(255,255,255,0.1); } .react-selectize.dark.control-wrapper .react-selectize-control .react-selectize-placeholder { color: #aaa; text-indent: 8px; } .react-selectize.dark.control-wrapper .react-selectize-control .react-selectize-selected-values { padding-left: 5px; } .react-selectize.dark.dropdown-menu-wrapper.flipped { margin-bottom: 3px; } .react-selectize.dark.dropdown-menu-wrapper:not(.flipped) { margin-top: 3px; } .react-selectize.dark.dropdown-menu { background-color: #626262; -webkit-box-shadow: 0px 3px 15px 0px rgba(0,0,0,0.65); box-shadow: 0px 3px 15px 0px rgba(0,0,0,0.65); border: 1px solid #00183d; -webkit-border-radius: 3px; border-radius: 3px; color: #fefefe; } .react-selectize.dark.dropdown-menu.flipped { margin-bottom: 3px; } .react-selectize.dark.dropdown-menu:not(.flipped) { margin-top: 3px; } .react-selectize.dark.dropdown-menu .simple-group-title { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; color: #fff; padding: 5px 8px; } .react-selectize.dark.dropdown-menu .option-wrapper.highlight { background-color: #404040; } .react-selectize.dark.dropdown-menu .option-wrapper.highlight .simple-option { color: #bdd23f; } .react-selectize.dark.dropdown-menu .option-wrapper .simple-option { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: box; display: flex; -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; font-size: 14px; height: 35px; padding: 0px 10px; } .react-selectize.dark.dropdown-menu .no-results-found { padding: 5px 10px; } .react-selectize.dark.dropdown-menu .simple-option a, .react-selectize.dark.dropdown-menu .no-results-found a { color: #a0b42a; } .multi-select.react-selectize.dark.control-wrapper .simple-value { color: #e0ecdf; }