react-selectize
Version:
A Stateless & Flexible Select component for React inspired by Selectize
315 lines (314 loc) • 8.96 kB
CSS
.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;
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 .react-selectize-placeholder {
display: block;
line-height: 30px;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
position: absolute;
max-width: calc(100% - 56px);
}
.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;
min-height: 30px;
-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;
height: 30px;
}
.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.dropdown-menu-wrapper {
position: absolute;
}
.react-selectize.dropdown-menu-wrapper.tethered {
min-width: 300px;
}
.react-selectize.dropdown-menu-wrapper:not(.tethered) {
width: 100%;
}
.react-selectize.dropdown-menu {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: auto;
position: absolute;
max-height: 200px;
z-index: 10;
}
.react-selectize.dropdown-menu.tethered {
min-width: 300px;
}
.react-selectize.dropdown-menu:not(.tethered) {
width: 100%;
}
.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.bootstrap3 {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
.react-selectize.bootstrap3.control-wrapper.open .react-selectize-control {
background-color: #fff;
border: 1px solid #66afe9;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(102,175,233,0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 8px rgba(102,175,233,0.6);
}
.react-selectize.bootstrap3.control-wrapper .react-selectize-control {
border: 1px solid;
border-color: #d9d9d9 #ccc #b3b3b3;
-webkit-border-radius: 4px;
border-radius: 4px;
font-size: 1em;
}
.react-selectize.bootstrap3.control-wrapper .react-selectize-control .react-selectize-placeholder {
color: #aaa;
text-indent: 8px;
}
.react-selectize.bootstrap3.control-wrapper .react-selectize-control .react-selectize-selected-values {
padding-left: 5px;
}
.react-selectize.bootstrap3.dropdown-menu-wrapper.flipped {
margin-bottom: 5px;
}
.react-selectize.bootstrap3.dropdown-menu-wrapper:not(.flipped) {
margin-top: 5px;
}
.react-selectize.bootstrap3.dropdown-menu-wrapper .dropdown-menu.custom-enter-active,
.react-selectize.bootstrap3.dropdown-menu-wrapper .dropdown-menu.custom-leave-active {
-webkit-transition: opacity 0.2s 0s ease;
-moz-transition: opacity 0.2s 0s ease;
-o-transition: opacity 0.2s 0s ease;
-ms-transition: opacity 0.2s 0s ease;
transition: opacity 0.2s 0s ease;
}
.react-selectize.bootstrap3.dropdown-menu-wrapper .dropdown-menu.custom-enter {
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
}
.react-selectize.bootstrap3.dropdown-menu-wrapper .dropdown-menu.custom-enter-active {
opacity: 1;
-ms-filter: none;
filter: none;
}
.react-selectize.bootstrap3.dropdown-menu-wrapper .dropdown-menu.custom-leave {
opacity: 1;
-ms-filter: none;
filter: none;
}
.react-selectize.bootstrap3.dropdown-menu-wrapper .dropdown-menu.custom-leave-active {
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
}
.react-selectize.bootstrap3.dropdown-menu {
background: #fff;
border: 1px solid #ccc;
-webkit-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,0.175);
box-shadow: 0 6px 12px rgba(0,0,0,0.175);
}
.react-selectize.bootstrap3.dropdown-menu.flipped {
margin-bottom: 5px;
}
.react-selectize.bootstrap3.dropdown-menu:not(.flipped) {
margin-top: 5px;
}
.react-selectize.bootstrap3.dropdown-menu .no-results-found {
color: #aaa ;
font-style: oblique;
padding: 8px 10px;
}
.react-selectize.bootstrap3.dropdown-menu .groups:not(.as-columns) > div:not(:first-child) {
border-top: 1px solid #e5e5e5;
margin: 12px 0px 0px 0px;
}
.react-selectize.bootstrap3.dropdown-menu .simple-group-title {
background-color: #fff;
color: #999;
padding: 8px 8px;
text-shadow: 0px 1px 0px rgba(0,0,0,0.05);
}
.react-selectize.bootstrap3.dropdown-menu .option-wrapper.highlight {
background: #428bca;
}
.react-selectize.bootstrap3.dropdown-menu .option-wrapper.highlight .simple-option {
color: #fff;
}
.react-selectize.bootstrap3.dropdown-menu .option-wrapper .simple-option {
color: #333;
cursor: pointer;
padding: 8px 10px;
}
.react-selectize.bootstrap3.dropdown-menu .option-wrapper .simple-option.not-selectable {
background-color: #f8f8f8;
color: #999;
cursor: default;
font-style: oblique;
text-shadow: 0px 1px 0px #fff;
}
.multi-select.react-selectize.bootstrap3.control-wrapper .simple-value {
background: #efefef;
-webkit-border-radius: 4px;
border-radius: 4px;
color: #333;
}