choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
437 lines (436 loc) • 12 kB
CSS
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors */
.c7n-mention-wrapper {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
position: relative;
display: inline-block;
width: 100%;
vertical-align: middle;
}
.c7n-mention-editor {
position: relative;
display: inline-block;
width: 100%;
height: 0.36rem;
padding: 0.01rem 0.1rem;
color: #000000;
font-size: 0.13rem;
background-color: transparent;
background-image: none;
border: none;
-webkit-transition: all 0.3s;
transition: all 0.3s;
display: block;
height: auto;
min-height: 0.3rem;
padding: 0;
line-height: 1.5;
}
.c7n-mention-editor-group:not(.c7n-mention-editor-group-compact) .c7n-mention-editor-wrapper {
display: inline-grid;
}
.c7n-mention-editor::-moz-placeholder {
color: #bfbfbf;
opacity: 1;
}
.c7n-mention-editor:-ms-input-placeholder {
color: #bfbfbf;
}
.c7n-mention-editor::-webkit-input-placeholder {
color: #bfbfbf;
}
.c7n-mention-editor-wrapper {
position: relative;
display: inline-block;
width: 100%;
}
.c7n-mention-editor-content {
position: relative;
display: inline-block;
width: 100%;
vertical-align: middle;
}
.c7n-mention-editor-rendered-wrapper {
position: relative;
display: block;
-webkit-box-sizing: content-box;
box-sizing: content-box;
width: 100%;
}
.c7n-mention-editor-rendered {
position: relative;
display: inline-block;
width: 100%;
}
.c7n-mention-editor-icon .c7n-mention-editor-icon-copy {
display: none;
}
.c7n-mention-editor-has-copy {
padding-right: 0.2rem;
}
.c7n-mention-editor-has-value .c7n-mention-editor-icon {
right: 0;
background: none;
border: none;
cursor: pointer;
}
.c7n-mention-editor-has-value .c7n-mention-editor-icon-copy {
display: inline-block;
}
.c7n-mention-editor-suffix,
.c7n-mention-editor-prefix,
.c7n-mention-editor-icon {
position: absolute ;
top: 0;
bottom: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
min-width: 0.24rem;
margin: auto 0;
padding: 0 0.02rem;
text-align: center;
}
.c7n-mention-editor-suffix,
.c7n-mention-editor-prefix {
color: rgba(0, 0, 0, 0.26);
}
.c7n-mention-editor-suffix {
right: 0;
}
.c7n-mention-editor-prefix {
left: 0;
}
.c7n-mention-editor-has-prefix .c7n-mention-editor {
padding-left: 0;
}
.c7n-mention-editor-label {
padding: 0;
color: inherit;
line-height: 2.61538462;
-webkit-transform-origin: inherit;
-ms-transform-origin: inherit;
transform-origin: inherit;
-webkit-transition: inherit;
transition: inherit;
pointer-events: none;
}
.is-required .c7n-mention-editor-label::after {
display: inline-block;
width: 0.08rem;
margin-left: 0.04rem;
color: #d50000;
font-size: 0.13rem;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
.c7n-mention-editor-label-wrapper {
position: absolute;
top: 0;
left: 0.1rem;
height: 0;
margin-left: -0.05rem;
padding: 0 0.05rem;
border-top: 0.02rem solid transparent;
-webkit-transform-origin: 0.1rem -230%;
-ms-transform-origin: 0.1rem -230%;
transform-origin: 0.1rem -230%;
-webkit-transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.c7n-mention-editor-rendered-lg .c7n-mention-editor-label {
font-size: 0.16rem;
line-height: 0.4rem;
}
.c7n-mention-editor-rendered-sm .c7n-mention-editor-label {
font-size: 0.12rem;
line-height: 0.24rem;
}
.c7n-mention-editor-has-prefix .c7n-mention-editor-label-wrapper {
left: 0;
}
.c7n-mention-editor-has-value .c7n-mention-editor-label-wrapper,
.c7n-mention-editor-focused .c7n-mention-editor-label-wrapper {
border-top-color: #fff;
-webkit-transform: scaleX(0.8);
-ms-transform: scaleX(0.8);
transform: scaleX(0.8);
}
.c7n-mention-editor:-webkit-autofill + .c7n-mention-editor-label-wrapper {
border-top-color: #fff;
-webkit-transform: scaleX(0.8);
transform: scaleX(0.8);
}
.c7n-mention-editor-has-value .c7n-mention-editor-label,
.c7n-mention-editor-focused .c7n-mention-editor-label {
-webkit-transform: scaleY(0.8);
-ms-transform: scaleY(0.8);
transform: scaleY(0.8);
}
.c7n-mention-editor:-webkit-autofill + .c7n-mention-editor-label-wrapper .c7n-mention-editor-label {
-webkit-transform: scaleY(0.8);
transform: scaleY(0.8);
}
.c7n-mention-editor-focused .c7n-mention-editor-label {
color: #3f51b5;
}
.has-error .c7n-mention-editor-label {
color: #d50000;
}
.c7n-mention-editor-has-border.c7n-mention-editor-wrapper::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: block;
border: 0.01rem solid rgba(0, 0, 0, 0.2);
border-radius: 0.04rem;
content: ' ';
}
.c7n-mention-editor-has-border.c7n-mention-editor-wrapper:hover::before {
border-color: #000000;
}
.c7n-mention-editor-has-border.c7n-mention-editor-focused.c7n-mention-editor-wrapper::before,
.has-error .c7n-mention-editor-wrapper::before {
border-width: 0.02rem;
}
.c7n-mention-editor-has-border.c7n-mention-editor-focused.c7n-mention-editor-wrapper::before {
border-color: #3f51b5;
}
.has-error .c7n-mention-editor-has-border.c7n-mention-editor-wrapper::before {
border-color: #d50000;
}
.c7n-mention-editor-has-border.c7n-mention-editor-disabled::before {
border-color: rgba(0, 0, 0, 0.2) ;
border-style: dashed;
}
.c7n-mention-editor-placeholder {
position: absolute;
left: 0;
width: 100%;
max-width: 100%;
color: #bfbfbf;
white-space: nowrap;
text-overflow: ellipsis;
pointer-events: none;
}
.c7n-mention-editor-has-value .c7n-mention-editor-placeholder {
display: none;
}
.c7n-mention-editor-length-info {
position: absolute;
right: 0;
margin-top: 0.02rem;
color: rgba(0, 0, 0, 0.54);
font-size: 0.12rem;
letter-spacing: 0.02rem;
}
.c7n-mention-editor:hover {
border-color: #6374c2;
}
.c7n-mention-editor:focus {
border-color: #6374c2;
outline: 0;
}
.c7n-mention-editor-disabled {
color: rgba(0, 0, 0, 0.54);
opacity: 1;
}
.c7n-mention-editor-disabled:hover {
border-color: rgba(0, 0, 0, 0.54);
}
.c7n-mention-editor-disabled .c7n-mention-editor,
.c7n-mention-editor-disabled .c7n-mention-editor-placeholder,
.c7n-mention-editor-disabled .c7n-mention-editor-prefix,
.c7n-mention-editor-disabled .c7n-mention-editor-suffix {
color: rgba(0, 0, 0, 0.54);
cursor: not-allowed;
}
.c7n-mention-editor-underline {
position: absolute;
width: 100%;
height: 0;
border-bottom: 0.01rem solid rgba(0, 0, 0, 0.54);
}
.c7n-mention-editor-ripple {
position: absolute;
left: 0;
width: 100%;
height: 0;
border-bottom: 0.02rem solid #3f51b5;
-webkit-transform: scaleX(0.5);
-ms-transform: scaleX(0.5);
transform: scaleX(0.5);
-webkit-transform-origin: 50%;
-ms-transform-origin: 50%;
transform-origin: 50%;
opacity: 0;
-webkit-transition: border-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2);
transition: border-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2);
}
.c7n-mention-editor-disabled .c7n-mention-editor-underline {
border-bottom: 0.01rem dotted rgba(0, 0, 0, 0.42);
}
.c7n-mention-editor-focused .c7n-mention-editor-underline .c7n-mention-editor-ripple {
-webkit-transform: scaleX(1);
-ms-transform: scaleX(1);
transform: scaleX(1);
opacity: 1;
-webkit-transition: opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1), border-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
transition: opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1), border-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
transition: transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1), opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1), border-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
transition: transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1), opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1), border-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1);
}
textarea.c7n-mention-editor {
max-width: 100%;
height: auto;
min-height: 0.3rem;
vertical-align: bottom;
-webkit-transition: all 0.3s, height 0s;
transition: all 0.3s, height 0s;
}
.c7n-mention-editor-lg {
height: 0.4rem;
padding: 0.06rem 0.1rem;
font-size: 0.16rem;
}
.c7n-mention-editor-lg .c7n-mention-editor-has-copy {
padding-right: 0.22rem;
}
.c7n-mention-editor-sm {
height: 0.24rem;
padding: 0.01rem 0.06rem;
}
.c7n-mention-editor-sm .c7n-mention-editor-has-copy {
padding-right: 0.18rem;
}
.c7n-mention-editor:-webkit-autofill {
width: calc(100% - .04rem);
height: 0.32rem;
margin: 0.02rem;
text-indent: -0.02rem;
border-radius: 0.04rem;
-webkit-box-shadow: 0 0 0 10rem #fff inset;
box-shadow: 0 0 0 10rem #fff inset;
}
textarea.c7n-mention-editor:-webkit-autofill {
height: auto;
}
.c7n-mention-editor-wrapper {
height: auto;
overflow-y: auto;
}
.c7n-mention-active:not(.disabled) .c7n-mention-editor {
border-color: #6374c2;
outline: 0;
}
.c7n-mention-wrapper.disabled .c7n-mention-editor {
color: rgba(0, 0, 0, 0.54);
opacity: 1;
}
.c7n-mention-wrapper.disabled .c7n-mention-editor:hover {
border-color: rgba(0, 0, 0, 0.54);
}
.c7n-mention-dropdown {
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
list-style: none;
position: absolute;
top: -99.99rem;
left: -99.99rem;
z-index: 1050;
min-width: 1.2rem;
max-height: 2.5rem;
margin-top: 1.5em;
overflow-x: hidden;
overflow-y: auto;
background-color: #fff;
border-radius: 0.02rem;
outline: none;
-webkit-box-shadow: 0 0.02rem 0.08rem rgba(0, 0, 0, 0.12);
box-shadow: 0 0.02rem 0.08rem rgba(0, 0, 0, 0.12);
}
.c7n-mention-dropdown-placement-top {
margin-top: -0.1em;
}
.c7n-mention-dropdown-notfound.c7n-mention-dropdown-item {
color: rgba(0, 0, 0, 0.25);
}
.c7n-mention-dropdown-notfound.c7n-mention-dropdown-item .icon-loading {
display: block;
color: #3f51b5;
text-align: center;
}
.c7n-mention-dropdown-item {
position: relative;
display: block;
padding: 0.05rem 0.12rem;
overflow: hidden;
color: #000000;
font-weight: normal;
line-height: 0.22rem;
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
-webkit-transition: background 0.3s;
transition: background 0.3s;
}
.c7n-mention-dropdown-item:hover {
background-color: rgba(0, 0, 0, 0.04);
}
.c7n-mention-dropdown-item.focus,
.c7n-mention-dropdown-item-active {
background-color: rgba(140, 158, 255, 0.12);
}
.c7n-mention-dropdown-item-disabled {
color: rgba(0, 0, 0, 0.25);
cursor: not-allowed;
}
.c7n-mention-dropdown-item-disabled:hover {
color: rgba(0, 0, 0, 0.25);
background-color: #fff;
cursor: not-allowed;
}
.c7n-mention-dropdown-item-selected,
.c7n-mention-dropdown-item-selected:hover {
color: #000000;
font-weight: bold;
background-color: #f5f5f5;
}
.c7n-mention-dropdown-item-divider {
height: 0.01rem;
margin: 0.01rem 0;
overflow: hidden;
line-height: 0;
background-color: #e8e8e8;
}
.c7n-mention .public-DraftEditorPlaceholder-root {
position: absolute;
pointer-events: none;
}
.c7n-mention .public-DraftEditorPlaceholder-root .public-DraftEditorPlaceholder-inner {
height: auto;
padding: 0.05rem 0.11rem;
color: #bfbfbf;
white-space: pre-wrap;
word-wrap: break-word;
outline: none;
opacity: 1;
}
.c7n-mention .DraftEditor-editorContainer .public-DraftEditor-content {
height: auto;
padding: 0.05rem 0.11rem;
}