@chief-editor/ui
Version:
UI Component for chief editor
217 lines (180 loc) • 4.73 kB
text/less
@import "./var.less";
@import "./mixin.less";
@len: length(@sizeList);
.@{prefixCls}-select-input-wrapper {
position: relative;
display: block;
width: 100%;
cursor: pointer;
input {
background: none;
color: @color-text-grey1;
}
.font-height(12px);
&:hover {
.@{prefixCls}-select-input {
.motion-ready-border();
}
}
&:active {
.@{prefixCls}-select-input {
.motion-processing-border();
}
}
.@{prefixCls}-select-input {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 1;
border-radius: @border-radius-base;
border: 1px solid @color-neutral6;
//background-color: @color-neutral1;
outline: none;
.transition();
&:focus {
.motion-active-border();
.motion-stroked-hint();
}
}
.@{prefixCls}-select-input-content-wrapper {
position: relative;
z-index: 2;
border: solid 1px transparent;
height: 24px;
overflow: hidden;
}
.@{prefixCls}-select-input-icon {
position: absolute;
right: 7px;
top: 2px;
color: @color-text-grey3;
.@{prefixCls}-icon-close-one {
pointer-events: auto;
color: @color-neutral11;
}
}
.@{prefixCls}-select-tip {
.font-height(12px);
color: @color-text-grey1;
position: absolute;
top: 2px;
right: 24px;
background-color: @color-neutral4;
display: flex;
height: 18px;
width: 18px;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.@{prefixCls}-select-value {
line-height: 18px;
font-size: 12px;
width: 100%;
border: 0;
outline: none;
cursor: pointer;
&::-webkit-input-placeholder {
color: @color-text-grey4;
}
}
.@{prefixCls}-select-input-inner {
position: relative;
padding: 2px 8px;
display: flex;
align-items: center;
flex-wrap: wrap;
font-size: 12px;
&.@{prefixCls}-select-input-inner-simple {
padding-right: 24px;
}
&-single {
padding-right: 30px;
}
.@{prefixCls}-tag {
display: inline-flex;
flex: none;
border: none;
margin-right: 4px;
padding: 0 28px 0 8px;
width: 72px;
font-size: 12px;
line-height: 18px;
align-items: center;
pointer-events: auto;
border-radius: @border-radius-base;
&-close {
font-size: 9px;
}
.tag-content {
overflow: hidden;
text-overflow: ellipsis;
}
&:last-child {
margin-right: 0;
}
&.new-line {
margin-top: 4px;
}
}
}
&-disabled,
&-readonly {
cursor: not-allowed;
.@{prefixCls}-select-input {
border-color: @color-neutral4;
cursor: not-allowed;
}
.@{prefixCls}-select-value {
color: @color-text-grey4;
cursor: not-allowed;
&::-webkit-input-placeholder {
color: @color-text-grey4;
}
}
&:hover {
.@{prefixCls}-select-input {
border-color: @color-neutral4;
}
}
}
&-disabled {
.@{prefixCls}-select-input {
background-color: @color-neutral2;
}
.@{prefixCls}-select-value {
background-color: @color-neutral2;
}
}
&-readonly {
.@{prefixCls}-select-input {
background-color: @color-neutral1;
}
.@{prefixCls}-select-value {
background-color: @color-neutral1;
}
}
&.@{prefixCls}-select-input-wrapper-popover-input {
padding: 0;
pointer-events: auto;
font-size: 12px;
line-height: 18px;
.@{prefixCls}-select-input-content-wrapper {
position: relative;
z-index: 2;
height: auto;
overflow: auto;
}
.@{prefixCls}-select-input {
border-color: @color-primary6;
}
.@{prefixCls}-popover-show & .@{prefixCls}-select-input {
.motion-stroked-hint();
}
.@{prefixCls}-select-input-inner {
padding: 2px 40px 2px 8px;
}
}
}