UNPKG

choerodon-ui

Version:

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

278 lines (277 loc) 7.79 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 */ .c7n-pro-switch { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; width: 100%; height: 100%; cursor: inherit; opacity: 0; } .c7n-pro-switch-wrapper { padding: 0.03rem; } .c7n-pro-switch-wrapper.c7n-pro-field { width: auto; } .c7n-pro-switch-wrapper { position: relative; display: inline-block; line-height: 1; white-space: nowrap; vertical-align: middle; outline: none; cursor: pointer; } .c7n-pro-switch:disabled { cursor: not-allowed; } .c7n-pro-switch-float-label .c7n-pro-field-label { padding: 0; color: rgba(0, 0, 0, 0.6); line-height: 2.61538462; -webkit-transform-origin: inherit; -ms-transform-origin: inherit; transform-origin: inherit; -webkit-transition: inherit; transition: inherit; pointer-events: none; } .c7n-pro-switch-float-label .c7n-pro-field-label-wrapper { position: absolute; top: 0; left: 0.1rem; max-width: 98%; height: 0; margin-left: -0.05rem; padding: 0 0.05rem; border-top: 0.02rem solid #fff; -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-pro-switch-float-label .c7n-pro-field-label::after { width: 0; } .c7n-pro-switch-float-label.c7n-pro-switch-focused .c7n-pro-field-label { color: #3f51b5; } .c7n-pro-switch-float-label.c7n-pro-switch-invalid .c7n-pro-field-label { color: #d50000; } .c7n-pro-switch-float-label .c7n-pro-field-label-wrapper, .c7n-pro-switch-float-label .c7n-pro-switch:focus + .c7n-pro-field-label-wrapper { -webkit-transform: scaleX(0.8); -ms-transform: scaleX(0.8); transform: scaleX(0.8); } .c7n-pro-switch-float-label .c7n-pro-switch:-webkit-autofill + .c7n-pro-field-label-wrapper { -webkit-transform: scaleX(0.8); transform: scaleX(0.8); } .c7n-pro-switch-float-label .c7n-pro-field-label, .c7n-pro-switch-float-label.c7n-pro-switch-focused .c7n-pro-field-label { font-weight: 500; font-size: 0.15rem; -webkit-transform: scaleY(0.8); -ms-transform: scaleY(0.8); transform: scaleY(0.8); } .c7n-pro-switch-float-label .c7n-pro-switch:-webkit-autofill + .c7n-pro-field-label-wrapper .c7n-pro-field-label { font-weight: 500; font-size: 0.15rem; -webkit-transform: scaleY(0.8); transform: scaleY(0.8); } .c7n-pro-switch-float-label .c7n-pro-switch { height: 0.36rem; border-radius: 0.04rem; } .c7n-pro-switch-float-label textarea.c7n-pro-switch { height: auto; } .c7n-pro-switch-float-label.c7n-pro-switch-invalid, .c7n-pro-switch-float-label.c7n-pro-switch-required { background-color: #fff; } .c7n-pro-switch-float-label.c7n-pro-switch-required .c7n-pro-field-label::after { width: 0.08rem; } .c7n-pro-switch-empty:not(.c7n-pro-switch-focused) .c7n-pro-field-label { font-weight: inherit; font-size: inherit; -webkit-transform: none; -ms-transform: none; transform: none; } .c7n-pro-switch-empty:not(.c7n-pro-switch-focused) .c7n-pro-field-label-wrapper { border-top-color: transparent; -webkit-transform: none; -ms-transform: none; transform: none; } .c7n-pro-switch-float-label .c7n-pro-switch > ul { margin-top: 0.06rem; margin-left: 0.03rem; } .c7n-pro-switch-float-label .c7n-pro-switch > ul > li { display: inline-block; max-width: 99%; height: 0.2rem; margin-bottom: 0.02rem; line-height: 0.2rem; vertical-align: middle; } .c7n-pro-switch-float-label .c7n-pro-switch-multiple-block { display: inline-block; max-width: 99%; margin: 0 0.02rem; padding: 0 0 0 0.08rem; overflow: hidden; color: #fff; line-height: 1.5; white-space: nowrap; background-color: #3f51b5; border-radius: 0.12rem; cursor: default; } .c7n-pro-switch-float-label .c7n-pro-switch-multiple-block > div { display: inline-block; max-width: 100%; height: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: top; } .c7n-pro-switch-float-label .c7n-pro-switch-multiple-block > div:not(:last-child) { max-width: calc(100% - .24rem); } .c7n-pro-switch-float-label .c7n-pro-switch-multiple-block-invalid { background-color: #d50000; } .c7n-pro-switch-float-label .c7n-pro-switch-multiple-block-disabled { padding-right: 0.1rem; background-color: rgba(0, 0, 0, 0.25); cursor: not-allowed; } .c7n-pro-switch-float-label .c7n-pro-switch-multiple-block .icon { height: 100%; margin-left: 0.08rem; color: rgba(255, 255, 255, 0.72); font-size: 0.16rem; line-height: 0.2rem; vertical-align: top; cursor: pointer; } .c7n-pro-switch-prefix-button.c7n-pro-switch-float-label .c7n-pro-field-label-wrapper { left: 0.24rem; } .c7n-pro-switch-float-label { padding-top: 0.07rem; } .c7n-pro-switch-label { position: relative; display: block; min-width: 0.36rem; height: 0.16rem; padding: 0 0.05rem 0 0.2rem; color: #fff; font-size: 0.12rem; line-height: 0.14rem; background-color: rgba(0, 0, 0, 0.38); border-radius: 0.1rem; } .c7n-pro-switch-label::after { position: absolute; top: 0; bottom: 0; left: 0; width: 0.2rem; height: 0.2rem; margin-top: auto; margin-bottom: auto; background-color: #fff; border-radius: 50%; -webkit-box-shadow: 0 0.02rem 0.01rem -0.01rem rgba(0, 0, 0, 0.2), 0 0.01rem 0.01rem 0 rgba(0, 0, 0, 0.14), 0 0.01rem 0.03rem 0 rgba(0, 0, 0, 0.12); box-shadow: 0 0.02rem 0.01rem -0.01rem rgba(0, 0, 0, 0.2), 0 0.01rem 0.01rem 0 rgba(0, 0, 0, 0.14), 0 0.01rem 0.03rem 0 rgba(0, 0, 0, 0.12); cursor: inherit; -webkit-transition: all 0.36s cubic-bezier(0.78, 0.14, 0.15, 0.86); transition: all 0.36s cubic-bezier(0.78, 0.14, 0.15, 0.86); content: ' '; } .c7n-pro-switch:active + .c7n-pro-switch-label::after { width: 0.24rem; } .c7n-pro-switch-focused .c7n-pro-switch-label { -webkit-box-shadow: 0 0 0 0.02rem rgba(182, 191, 219, 0.2); box-shadow: 0 0 0 0.02rem rgba(182, 191, 219, 0.2); } .c7n-pro-switch-focused:hover .c7n-pro-switch-label { -webkit-box-shadow: none; box-shadow: none; } .c7n-pro-switch-float-label { padding-right: 0.08rem; padding-left: 0.08rem; vertical-align: middle; } .c7n-pro-switch:checked + .c7n-pro-switch-label { padding: 0 0.2rem 0 0.05rem; background-color: #b6bfdb; } .c7n-pro-switch:checked + .c7n-pro-switch-label::after { left: 100%; margin-left: -0.2rem; background-color: #3f51b5; } .c7n-pro-switch:disabled { cursor: not-allowed; } .c7n-pro-switch:disabled + .c7n-pro-switch-label { opacity: 0.4; } .c7n-pro-switch-sm { padding: 0; } .c7n-pro-switch-sm .c7n-pro-switch-label { min-width: 0.3rem; height: 0.12rem; } .c7n-pro-switch-sm .c7n-pro-switch-label::after { left: 0.01rem; width: 0.16rem; height: 0.16rem; } .c7n-pro-switch-sm .c7n-pro-switch:checked + .c7n-pro-switch-label::after { margin-left: -0.17rem; } .c7n-pro-switch-lg { padding: 0.03rem 0; } .c7n-pro-switch-lg .c7n-pro-switch-label { min-width: 0.4rem; height: 0.2rem; } .c7n-pro-switch-lg .c7n-pro-switch-label::after { left: 0.01rem; width: 0.24rem; height: 0.24rem; } .c7n-pro-switch-lg .c7n-pro-switch:checked + .c7n-pro-switch-label::after { margin-left: -0.23rem; } .c7n-pro-switch-float-label .c7n-pro-field-label-wrapper { left: 0; -webkit-transform-origin: 0.1rem -330%; -ms-transform-origin: 0.1rem -330%; transform-origin: 0.1rem -330%; }