UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

600 lines (599 loc) 16.2 kB
/* 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 */ /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */ .c7n-input { -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; list-style: none; position: relative; display: inline-block; width: 100%; height: 0.36rem; padding: 0.01rem 0.1rem; color: #000000; font-size: 0.13rem; line-height: 1.5; background-color: transparent; background-image: none; border: none; -webkit-transition: all 0.3s; transition: all 0.3s; } .c7n-input-group:not(.c7n-input-group-compact) .c7n-input-wrapper { display: inline-grid; } .c7n-input::-moz-placeholder { color: #bfbfbf; opacity: 1; } .c7n-input:-ms-input-placeholder { color: #bfbfbf; } .c7n-input::-webkit-input-placeholder { color: #bfbfbf; } .c7n-input-wrapper { position: relative; display: inline-block; width: 100%; } .c7n-input-content { position: relative; display: inline-block; width: 100%; vertical-align: middle; } .c7n-input-rendered-wrapper { position: relative; display: block; -webkit-box-sizing: content-box; box-sizing: content-box; width: 100%; } .c7n-input-rendered { position: relative; display: inline-block; width: 100%; } .c7n-input-icon .c7n-input-icon-copy { display: none; } .c7n-input-has-copy { padding-right: calc(0.18rem + 0.02rem); } .c7n-input-has-value .c7n-input-icon { right: 0; background: none; border: none; cursor: pointer; } .c7n-input-has-value .c7n-input-icon-copy { display: inline-block; } .c7n-input-suffix, .c7n-input-prefix, .c7n-input-icon { position: absolute !important; 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-input-suffix, .c7n-input-prefix { color: rgba(0, 0, 0, 0.26); } .c7n-input-suffix { right: 0; } .c7n-input-prefix { left: 0; } .c7n-input-has-prefix .c7n-input { padding-left: 0; } .c7n-input-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-input-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-input-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-input-rendered-lg .c7n-input-label { font-size: 0.16rem; line-height: 0.4rem; } .c7n-input-rendered-sm .c7n-input-label { font-size: 0.12rem; line-height: 0.24rem; } .c7n-input-has-prefix .c7n-input-label-wrapper { left: 0; } .c7n-input-has-value .c7n-input-label-wrapper, .c7n-input-focused .c7n-input-label-wrapper { border-top-color: #fff; -webkit-transform: scaleX(0.8); -ms-transform: scaleX(0.8); transform: scaleX(0.8); } .c7n-input:-webkit-autofill + .c7n-input-label-wrapper { z-index: 1; border-top-color: #fff; -webkit-transform: scaleX(0.8); transform: scaleX(0.8); } .c7n-input-has-value .c7n-input-label, .c7n-input-focused .c7n-input-label { -webkit-transform: scaleY(0.8); -ms-transform: scaleY(0.8); transform: scaleY(0.8); } .c7n-input:-webkit-autofill + .c7n-input-label-wrapper .c7n-input-label { -webkit-transform: scaleY(0.8); transform: scaleY(0.8); } .c7n-input-focused .c7n-input-label { color: #3f51b5; } .has-error .c7n-input-label { color: #d50000; } .c7n-input-has-border { position: relative; display: inline-block; width: 100%; } .c7n-input-has-border::before { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; border: 0.01rem solid #d9d9d9; border-radius: 0.04rem; content: ' '; } .c7n-input-has-border:hover::before { border-color: #000000; } .c7n-input-focused .c7n-input-has-border::before, .c7n-input-focused.c7n-input-has-border::before, .has-error .c7n-input-wrapper::before { border-width: 0.02rem; } .c7n-input-focused .c7n-input-has-border::before, .c7n-input-focused.c7n-input-has-border::before { border-color: #3f51b5; } .has-error .c7n-input-has-border::before { border-color: #d50000; } .c7n-input-disabled .c7n-input-has-border::before, .c7n-input-disabled.c7n-input-has-border::before { background-color: unset; border-color: #d9d9d9 !important; border-style: dashed; } .c7n-input-placeholder { position: absolute; left: 0; width: 100%; max-width: 100%; color: #bfbfbf; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; } .c7n-input-has-value .c7n-input-placeholder { display: none; } .c7n-input-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-input:hover { border-color: #6374c2; } .c7n-input:focus { border-color: #b6bfdb; outline: 0; } .c7n-input-disabled { color: rgba(0, 0, 0, 0.54); opacity: 1; } .c7n-input-disabled:hover { border-color: rgba(0, 0, 0, 0.54); } .c7n-input-disabled .c7n-input, .c7n-input-disabled .c7n-input-placeholder, .c7n-input-disabled .c7n-input-prefix, .c7n-input-disabled .c7n-input-suffix { color: rgba(0, 0, 0, 0.54); cursor: not-allowed; } .c7n-input-underline { position: absolute; width: 100%; height: 0; border-bottom: 0.01rem solid rgba(0, 0, 0, 0.54); } .c7n-input-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-input-disabled .c7n-input-underline { border-bottom: 0.01rem dotted rgba(0, 0, 0, 0.42); } .c7n-input-focused .c7n-input-underline .c7n-input-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-input { 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-input-lg { height: 0.4rem; padding: 0.06rem 0.1rem; font-size: 0.16rem; } .c7n-input-lg .c7n-input-has-copy { padding-right: calc(0.2rem + 0.02rem); } .c7n-input-sm { height: 0.24rem; padding: 0.01rem 0.06rem; } .c7n-input-sm .c7n-input-has-copy { padding-right: calc(0.16rem + 0.02rem); } .c7n-input:-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-input:-webkit-autofill { height: auto; } .c7n-input-textarea .c7n-input-rendered { position: relative; display: block; padding-top: 0.15rem; } .c7n-input-textarea .c7n-input-label { bottom: auto; } .c7n-input-textarea .c7n-input-textarea-element { padding: 0.1rem; } .c7n-input-group { -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; list-style: none; position: relative; display: table; width: 100%; border-collapse: separate; border-spacing: 0; } .c7n-input-group[class*='col-'] { float: none; padding-right: 0; padding-left: 0; } .c7n-input-group > [class*='col-'] { padding-right: 0.08rem; } .c7n-input-group > [class*='col-']:last-child { padding-right: 0; } .c7n-input-group-addon, .c7n-input-group-wrap, .c7n-input-group > .c7n-input { display: table-cell; } .c7n-input-group-addon:not(:first-child):not(:last-child), .c7n-input-group-wrap:not(:first-child):not(:last-child), .c7n-input-group > .c7n-input:not(:first-child):not(:last-child) { border-radius: 0; } .c7n-input-group-addon, .c7n-input-group-wrap { width: 0.01rem; white-space: nowrap; vertical-align: middle; } .c7n-input-group-wrap > * { display: block !important; } .c7n-input-group .c7n-input { width: 100%; margin-bottom: 0; } .c7n-input-group .c7n-input:focus { z-index: 1; } .c7n-input-group-addon { position: relative; padding: 0 0.1rem; color: #000000; font-weight: normal; font-size: 0.13rem; line-height: 1; text-align: center; background-color: #eee; border: 0.01rem solid #d9d9d9; border-radius: 0.02rem; -webkit-transition: all 0.3s; transition: all 0.3s; } .c7n-input-group-addon .c7n-select { margin: calc(-1 * (0.01rem + 0.01rem)) calc(-1 * 0.1rem); } .c7n-input-group-addon .c7n-select .c7n-select-selection { margin: -0.01rem; background-color: inherit; border: 0.01rem solid transparent; -webkit-box-shadow: none; box-shadow: none; } .c7n-input-group-addon .c7n-select-open .c7n-select-selection, .c7n-input-group-addon .c7n-select-focused .c7n-select-selection { color: #3f51b5; } .c7n-input-group-addon .c7n-select-has-border.c7n-select::before { display: none; } .c7n-input-group-addon > i:only-child::after { position: absolute; top: 0; right: 0; bottom: 0; left: 0; content: ''; } .c7n-input-group > .c7n-input:first-child, .c7n-input-group-addon:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; } .c7n-input-group > .c7n-input:first-child .c7n-select .c7n-select-selection, .c7n-input-group-addon:first-child .c7n-select .c7n-select-selection { border-top-right-radius: 0; border-bottom-right-radius: 0; } .c7n-input-group > .c7n-input-affix-wrapper:not(:first-child) .c7n-input { border-top-left-radius: 0; border-bottom-left-radius: 0; } .c7n-input-group > .c7n-input-affix-wrapper:not(:last-child) .c7n-input { border-top-right-radius: 0; border-bottom-right-radius: 0; } .c7n-input-group > .c7n-input-has-border:not(:first-child)::before, .c7n-input-group > *:not(:first-child) .c7n-input-has-border::before { border-top-left-radius: 0; border-bottom-left-radius: 0; } .c7n-input-group > .c7n-input-has-border:not(:last-child)::before, .c7n-input-group > *:not(:last-child) .c7n-input-has-border::before { border-top-right-radius: 0; border-bottom-right-radius: 0; } .c7n-input-group-addon:first-child { border-right: 0; } .c7n-input-group-addon:last-child { border-left: 0; } .c7n-input-group > .c7n-input:last-child, .c7n-input-group-addon:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; } .c7n-input-group > .c7n-input:last-child .c7n-select .c7n-select-selection, .c7n-input-group-addon:last-child .c7n-select .c7n-select-selection { border-top-left-radius: 0; border-bottom-left-radius: 0; } .c7n-input-group-lg .c7n-input, .c7n-input-group-lg > .c7n-input-group-addon { height: 0.4rem; padding: 0.06rem 0.1rem; font-size: 0.16rem; } .c7n-input-group-sm .c7n-input, .c7n-input-group-sm > .c7n-input-group-addon { height: 0.24rem; padding: 0.01rem 0.06rem; } .c7n-input-group-lg .c7n-select-selection--single { height: 0.4rem; } .c7n-input-group-sm .c7n-select-selection--single { height: 0.24rem; } .c7n-input-group .c7n-input-affix-wrapper { float: left; width: 100%; } .c7n-input-group.c7n-input-group-compact { display: block; white-space: nowrap; zoom: 1; } .c7n-input-group.c7n-input-group-compact::before, .c7n-input-group.c7n-input-group-compact::after { display: table; white-space: initial; content: ' '; } .c7n-input-group.c7n-input-group-compact::after { clear: both; height: 0; font-size: 0; visibility: hidden; } .c7n-input-group.c7n-input-group-compact .c7n-input-has-border::before, .c7n-input-group.c7n-input-group-compact .c7n-select-has-border::before { border-style: solid; } .c7n-input-group.c7n-input-group-compact > * { display: inline-block; float: none; vertical-align: top; } .c7n-input-group.c7n-input-group-compact > *:not(:first-child) .c7n-input-has-border, .c7n-input-group.c7n-input-group-compact > *:not(:first-child) .c7n-select-has-border, .c7n-input-group.c7n-input-group-compact > *:not(:first-child).c7n-input-has-border, .c7n-input-group.c7n-input-group-compact > *:not(:first-child).c7n-select-has-border { margin-left: -0.01rem; } .c7n-input-group.c7n-input-group-compact > *:not(:first-child) .c7n-input-has-border::before, .c7n-input-group.c7n-input-group-compact > *:not(:first-child) .c7n-select-has-border::before, .c7n-input-group.c7n-input-group-compact > *:not(:first-child).c7n-input-has-border::before, .c7n-input-group.c7n-input-group-compact > *:not(:first-child).c7n-select-has-border::before { border-top-left-radius: 0; border-bottom-left-radius: 0; } .c7n-input-group.c7n-input-group-compact > *:not(:last-child) .c7n-input-has-border::before, .c7n-input-group.c7n-input-group-compact > *:not(:last-child) .c7n-select-has-border::before, .c7n-input-group.c7n-input-group-compact > *:not(:last-child).c7n-input-has-border::before, .c7n-input-group.c7n-input-group-compact > *:not(:last-child).c7n-select-has-border::before { border-top-right-radius: 0; border-bottom-right-radius: 0; } .c7n-input-group.c7n-input-group-compact .c7n-input { z-index: auto; float: none; } .c7n-input-group-wrapper { position: relative; display: inline-block; width: 100%; vertical-align: top; } .c7n-input-affix-wrapper { -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0; list-style: none; position: relative; display: inline-block; width: 100%; } .c7n-input-affix-wrapper .c7n-input { z-index: 1; } .c7n-input-affix-wrapper:hover .c7n-input:not(.c7n-input-disabled) { border-color: #6374c2; } .c7n-input-affix-wrapper .c7n-input-prefix, .c7n-input-affix-wrapper .c7n-input-suffix { position: absolute; top: 50%; z-index: 2; line-height: 0; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%); } .c7n-input-affix-wrapper .c7n-input { min-height: 100%; } .c7n-input-search-icon { color: rgba(0, 0, 0, 0.45); pointer-events: none; } .c7n-input-search:not(.c7n-input-search-small) > .c7n-input-suffix { right: 0.12rem; } .c7n-input-search > .c7n-input-suffix > .c7n-input-search-button { border-top-left-radius: 0; border-bottom-left-radius: 0; } .c7n-input-search > .c7n-input-suffix > .c7n-input-search-button > .icon-search { font-size: 0.16rem; } .c7n-input-search.c7n-input-search-enter-button > .c7n-input { padding-right: 0.46rem; } .c7n-input-search.c7n-input-search-enter-button > .c7n-input-suffix { right: 0; }