polestar-ui-kit
Version:
## Install
202 lines (172 loc) • 3.84 kB
text/less
@import '~antd/lib/select/style/index';
@import '../../themes/default/index';
@import '../../mixins/index';
@ps-select-prefix-cls: ~"@{polestar-prefix}-select";
.@{select-prefix-cls} {
&-selection {
&:hover {
border: @border-width-base @border-style-base @primary-color;
}
}
&-disabled &-selection--multiple &-selection__choice {
&:hover{
background: @background-color-base;
color: #aaa;
cursor: not-allowed;
}
}
&-selection--multiple {
padding-bottom: 0;
.@{select-prefix-cls}-selection__choice__remove {
i {
display: none;
}
&:after {
font-family: 'polestar' ;
content: '\E217';
}
}
}
.@{select-prefix-cls}-selection__choice {
&__disabled {
padding: 0;
background: transparent;
border:0;
font-size: @font-size-sm;
.@{select-prefix-cls}-selection__choice__content:hover{
background: #fff;
}
}
&:hover{
background-color: @navy-1;
color:@navy-5;
cursor: pointer;
}
}
}
&-selection--single {
height: 10px;
}
.@{select-prefix-cls}-dropdown {
&-menu {
&-item-group {
border-bottom: 1px solid @primary-3;
}
&-item-group-title {
background-color: @primary-1;
}
&-item-group .ant-select-dropdown-menu-item:first-child {
border-radius: 0 0 0 0;
}
&-item-group .ant-select-dropdown-menu-item {
border-bottom: none;
}
&-item-group-list {
margin: 0;
padding: 0;
> .@{select-prefix-cls}-dropdown-menu-item {
padding-left: 20px;
//border-bottom: solid 1px @primary-3;
}
}
&-item-group-title {
color: @text-color-secondary;
padding: 0 @control-padding-horizontal;
height: 32px;
line-height: 32px;
font-size: @font-size-base;
}
&-item {
&-disabled {
&:hover {
color: @disabled-color;
background-color: transparent ;
}
}
&-active {
background-color: transparent;
}
}
}
&&--multiple {
.@{select-prefix-cls}-dropdown-menu-item {
&:after {
.ps-iconfont("\E08C");
color: transparent;
.iconfont-size-under-12px(10px);
transition: all 0.2s ease;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: @control-padding-horizontal;
font-weight: bold;
text-shadow: 0 0.1px 0, 0.1px 0 0, 0 -0.1px 0, -0.1px 0;
}
&-disabled:after {
display: none;
}
&:hover:after {
color: @primary-1;
}
&-selected:after,
&-selected:hover:after {
color: @item-active-bg;
}
svg {
display: none;
}
}
}
}
.@{select-prefix-cls} {
&-arrow {
.iconfont-mixin();
margin-top: -3px;
font-size: @font-size-lg;
&:hover{
color: @primary-color;
}
&:focus,
&:active{
color: @primary-color;
}
&:after {
font-family: 'polestar' ;
content: '\E072';
}
& &-icon svg {
display: none;
}
}
}
// Readonly
.@{ps-select-prefix-cls}.@{ps-select-prefix-cls}-readonly {
color: @gray-10;
.@{select-prefix-cls}-selection {
background: @gray-1; // @gray-2;
cursor: default;
}
}
// combobox
.ps-select-combobox-container {
.ant-input {
position: absolute;
left: 0;
padding-right: 28px;
// width: 85%;
// border-right: none;
// &:focus {
// border-right: none !important;
// // border-right-width: 0 !important;
// // border-color: white;
// }
// &:hover {
// border-right: none !important;
// }
}
.ant-select {
.ant-select-arrow {
z-index: 1;
}
}
}