123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673 |
- .ui-input {
- display: inline-flex;
- align-items: center;
- --base-border-color: rgba(255, 255, 255, 0.2);
- --colors-content-color: #fff;
- height: 100%;
- &.error {
- position: relative;
- --colors-primary-base: #fa3f48;
- --base-border-color: #fa3f48;
- .error-msg {
- top: 100%;
- position: absolute;
- color: var(--colors-primary-base);
- margin-top: 5px;
- }
- }
- &.require {
- position: relative;
- &::before {
- content: '*';
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- right: 100%;
- margin-right: 4px;
- color: #fa3f48;
- line-height: 1.5em;
- }
- }
- .input {
- position: relative;
- align-items: center;
- display: inline-flex;
- .input-div,
- textarea,
- input {
- width: 100%;
- height: 100%;
- outline: none;
- border: none;
- font-size: 14px;
- color: var(--colors-content-color);
- padding-left: 4px;
- resize: none;
- & + .replace {
- position: absolute;
- z-index: 1;
- }
- &.replace-input {
- opacity: 0;
- cursor: pointer;
- }
- }
- .pre-icon {
- position: absolute;
- z-index: 1;
- }
- }
- .label {
- cursor: pointer;
- margin-left: 7px;
- }
- .radio,
- .checkbox {
- width: 16px;
- height: 16px;
- input {
- & + .replace {
- color: var(--colors-color);
- border: 1px solid currentColor;
- background-color: var(--colors-normal-back);
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- pointer-events: none;
- transition: all 0.1s linear;
- }
- &:focus + .replace {
- border-color: var(--colors-primary-base);
- }
- &:checked + .replace {
- color: var(--colors-primary-base);
- }
- }
- }
- .checkbox input {
- & + .replace {
- border-radius: 4px;
- .icon {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%) scale(0);
- transition: all 0.1s linear;
- }
- }
- &:checked + .replace {
- .icon {
- transform: translate(-50%, -50%) scale(1);
- }
- }
- }
- .radio input {
- & + .replace {
- border-radius: 50%;
- &::after {
- content: '';
- border-radius: 50%;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%) scale(0);
- transition: all 0.1s linear;
- width: 60%;
- height: 60%;
- background-color: currentColor;
- }
- }
- &:checked + .replace::after {
- transform: translate(-50%, -50%) scale(1);
- }
- }
- .text {
- width: 100%;
- height: 100%;
- border-radius: 4px;
- input {
- background: var(--colors-normal-back);
- height: 100%;
- padding: 8px 10px;
- border-radius: 4px;
- border: 1px solid var(--base-border-color);
- transition: border 0.3s ease;
- &:focus {
- border-color: var(--colors-primary-base);
- }
- &.warn {
- border-color: var(--colors-warn);
- &:focus {
- border-color: var(--colors-warn);
- }
- }
- &::placeholder {
- color: var(--colors-color);
- }
- }
- &.pre-suffix {
- input {
- padding-left: 30px;
- }
- .pre-icon {
- left: 10px;
- top: 50%;
- transform: translateY(-50%);
- }
- }
- &.right input {
- text-align: right;
- }
- &.suffix {
- input {
- padding-right: 60px;
- }
- .retouch {
- position: absolute;
- right: 10px;
- top: 50%;
- transform: translateY(-50%);
- z-index: 10;
- cursor: pointer;
- }
- .len {
- font-size: var(--small-size);
- color: rgba(var(--colors-primary-fill), 1);
- span {
- color: var(--colors-primary-base);
- }
- }
- }
- &.ready {
- .retouch,
- input {
- transition: all 0.1s linear;
- }
- }
- }
- .textarea {
- width: 100%;
- height: 100%;
- min-height: 50px;
- > .replace {
- border-radius: 4px;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- pointer-events: none;
- background: var(--colors-normal-back);
- border: 1px solid var(--base-border-color);
- transition: border 0.3s ease;
- }
- .input-div {
- overflow-y: auto;
- a {
- color: var(--color-main-normal);
- }
- }
- .input-div,
- textarea {
- height: 100%;
- width: 100%;
- padding: 10px;
- &:focus + .replace {
- border-color: var(--colors-primary-base);
- }
- &::placeholder {
- color: var(--colors-color);
- }
- }
- &.right .input-div,
- &.right textarea {
- text-align: right;
- }
- &.suffix {
- --bar-height: 30px;
- .input-div,
- textarea {
- margin-bottom: var(--bar-height);
- height: calc(100% - var(--bar-height));
- }
- > .retouch {
- position: absolute;
- right: 0;
- left: 0;
- bottom: 0;
- background-color: rgba(var(--colors-primary-fill), 0.1);
- height: var(--bar-height);
- display: flex;
- padding: 0 10px;
- align-items: center;
- justify-content: space-between;
- }
- .len {
- justify-self: end;
- font-size: var(--small-size);
- color: rgba(var(--colors-primary-fill), 1);
- span {
- color: var(--colors-primary-base);
- }
- }
- }
- }
- .number {
- input {
- -moz-appearance: textfield;
- }
- input::-webkit-inner-spin-button,
- input::-webkit-outer-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
- .ctrls {
- position: absolute;
- inset: 2px 0;
- width: 8px;
- .icon {
- position: absolute;
- right: 0;
- &.up {
- bottom: 0;
- }
- &.down {
- top: 0;
- }
- }
- }
- &.ctrl.suffix input {
- padding-right: 20px;
- z-index: 1;
- }
- }
- .select {
- input {
- cursor: pointer;
- &.ui-text {
- padding-right: 0;
- }
- &.icon {
- padding-right: 30px;
- }
- }
- &.focus {
- input {
- border-color: var(--colors-primary-base);
- }
- .retouch {
- transform: translateY(-50%) rotateZ(180deg);
- }
- }
- }
- .range {
- width: 100%;
- height: 100%;
- display: flex;
- --height: 6px;
- --slideSize: calc(var(--height) + 8px);
- .range-content {
- flex: 1;
- background-color: var(--colors-normal-back);
- position: relative;
- cursor: pointer;
- }
- .range-content::before,
- .range-content {
- height: var(--height);
- border-radius: calc(var(--height) / 2);
- }
- .range-content::before,
- .range-content .range-slide {
- content: '';
- position: absolute;
- }
- .range-content::before {
- pointer-events: none;
- left: 0;
- top: 0;
- width: var(--percentage);
- background-color: var(--colors-primary-base);
- }
- .range-locus {
- width: calc(100% - var(--slideSize));
- height: var(--height);
- position: relative;
- .range-slide {
- cursor: pointer;
- height: var(--slideSize);
- width: var(--slideSize);
- top: 50%;
- left: var(--percentage);
- transform: translateY(-50%);
- background-color: var(--colors-content-color);
- border-radius: 50%;
- .tips{
- position: absolute;
- background: rgba(0, 0, 0, 0.6);
- padding: 4px 6px;
- border-radius: 4px;
- bottom: 120%;
- left: 50%;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- display: none;
- font-size: 12px;
- }
- &:hover{
- .tips{
- display: block;
- }
- }
- }
- }
- .range-text {
- margin-left: 10px;
- width: 65px;
- }
- .animation {
- &.range-content::before,
- .range-slide {
- transition: all 0.1s linear;
- }
- }
- }
- .switch {
- --height: 24px;
- width: 50px;
- height: var(--height);
- .replace {
- background-color: rgba(255, 255, 255, 0.3);
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- border-radius: calc(var(--height) / 2);
- pointer-events: none;
- position: relative;
- transition: background-color 0.3s ease;
- &::after {
- content: '';
- --padding: 3px;
- --size: calc(var(--height) - var(--padding) * 2);
- position: absolute;
- width: var(--size);
- height: var(--size);
- top: var(--padding);
- background: var(--colors-content-color);
- border-radius: 50%;
- left: var(--padding);
- transition: left 0.3s ease;
- }
- }
- input:checked + .replace {
- background-color: var(--colors-primary-base);
- &::after {
- left: calc(100% - var(--size) - var(--padding));
- }
- }
- }
- .file {
- width: 100%;
- height: 100%;
- input {
- cursor: pointer;
- opacity: 0;
- }
- .use-replace {
- position: absolute;
- }
- .use-replace,
- .replace {
- left: 0;
- right: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- pointer-events: none;
- }
- &:not(.valuable) {
- .replace {
- top: 0;
- bottom: 0;
- background: rgba(var(--colors-primary-fill), 0.1);
- border-radius: 4px;
- border: 1px solid rgba(var(--colors-primary-fill), 0.2);
- // position: relative;
- .placeholder {
- text-align: center;
- max-width: 80%;
- p:not(:last-child) {
- margin-bottom: 10px;
- }
- .bottom {
- font-size: 12px;
- color: rgba(255, 255, 255, 0.3);
- width: 90%;
- position: absolute;
- bottom: 10px;
- left: 50%;
- transform: translateX(-50%);
- text-align: left;
- }
- }
- }
- input {
- width: 100%;
- height: 100%;
- &:focus + .replace {
- border-color: var(--colors-primary-base);
- }
- }
- }
- &.valuable {
- background: rgba(var(--colors-primary-fill), 0.1);
- border-radius: 4px;
- border: 1px solid rgba(var(--colors-primary-fill), 0.2);
- input,
- .replace {
- position: absolute;
- bottom: 0;
- background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.5) 100%);
- height: 32px;
- line-height: 32px;
- .tj {
- position: absolute;
- right: 10px;
- top: 0;
- bottom: 0;
- display: flex;
- align-items: center;
- font-size: 10px;
- > span {
- color: var(--colors-primary-base);
- margin-right: 4px;
- }
- }
- }
- .icons {
- position: absolute;
- right: 10px;
- top: 0;
- span {
- width: 24px;
- height: 24px;
- border-radius: 50%;
- background: rgba(0, 0, 0, 0.3);
- font-size: 12px;
- color: rgba(255, 255, 255, 0.6);
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 10px;
- }
- }
- }
- }
- .search {
- .retouch {
- transform: translateY(-50%) !important;
- .clear {
- // background-color: rgba(255,255,255,.3);
- font-size: 16px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(255, 255, 255, 0.6);
- border-radius: 50%;
- cursor: pointer;
- }
- }
- }
- .color {
- &.default {
- input {
- opacity: 1;
- border: inherit;
- outline: inherit;
- }
- }
- .replace {
- pointer-events: none;
- }
- }
- }
- .select-float {
- transition: transform 0.3s ease, opacity 0.3s ease;
- transform-origin: center top;
- &:not(.show) {
- transform: scale(1, 0);
- opacity: 0;
- pointer-events: none;
- }
- &.show {
- transform: scale(1, 1);
- opacity: 1;
- }
- }
- .select-replace {
- --colors-content-color: #fff;
- list-style: none;
- max-height: 288px;
- background: rgba(26, 26, 26, 0.8);
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.3), inset 0 0 1px rgb(255 255 255 / 90%);
- backdrop-filter: blur(4px);
- border-radius: 4px;
- overflow-y: auto;
- color: var(--colors-content-color);
- &.hide-scroll{
- max-height: 100%;
- }
- li {
- padding: 10px 10px;
- font-size: 14px;
- &.un-data {
- padding: 20px;
- color: rgba(255, 255, 255, 0.3);
- pointer-events: none;
- }
- &.active {
- background: var(--colors-normal-back);
- color: var(--colors-primary-base);
- }
- &:not(.active):hover {
- cursor: pointer;
- background-color: var(--colors-primary-base);
- }
- }
- }
- .is-hidden {
- position: absolute;
- left: -10000px;
- top: -10000px;
- }
- .no-vip {
- .file {
- input {
- pointer-events: none;
- }
- label {
- pointer-events: none;
- }
- }
- }
|