103 lines
1.7 KiB
SCSS
103 lines
1.7 KiB
SCSS
@import "@Themes/constants.scss";
|
|
|
|
.root {
|
|
position: relative;
|
|
|
|
.input {
|
|
z-index: 1;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
padding: 24px;
|
|
gap: 10px;
|
|
width: 100%;
|
|
height: 70px;
|
|
border: 1px solid var(--color-neutral-200);
|
|
|
|
&:disabled {
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
&:focus {
|
|
~ .fake-placeholder {
|
|
transform: translateY(-35px);
|
|
}
|
|
}
|
|
|
|
&:not([data-value=""]) {
|
|
~ .fake-placeholder {
|
|
transform: translateY(-35px);
|
|
}
|
|
}
|
|
|
|
&[type="number"] {
|
|
&:focus {
|
|
~ .fake-placeholder {
|
|
transform: translateY(-35px);
|
|
}
|
|
}
|
|
|
|
&:not([data-value=""]) {
|
|
~ .fake-placeholder {
|
|
transform: translateY(-35px);
|
|
}
|
|
}
|
|
|
|
&::-webkit-inner-spin-button,
|
|
&::-webkit-outer-spin-button {
|
|
-webkit-appearance: none;
|
|
margin: 0;
|
|
}
|
|
|
|
/* For Chrome, Safari, and Opera */
|
|
&::-webkit-inner-spin-button,
|
|
&::-webkit-outer-spin-button {
|
|
-webkit-appearance: none;
|
|
margin: 0;
|
|
}
|
|
|
|
/* For IE 10+ */
|
|
&::-ms-inner-spin-button,
|
|
&::-ms-outer-spin-button {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
&:not([data-value=""]) {
|
|
~ .fake-placeholder {
|
|
transform: translateY(-35px);
|
|
}
|
|
}
|
|
|
|
~ .fake-placeholder {
|
|
z-index: 2;
|
|
top: 35%;
|
|
margin-left: 8px;
|
|
padding: 0 16px;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
background: $color-generic-white;
|
|
transition: transform 0.3s ease-in-out;
|
|
}
|
|
}
|
|
|
|
&[data-is-errored="true"] {
|
|
.input {
|
|
border: 1px solid var(--color-error-600);
|
|
~ .fake-placeholder {
|
|
color: var(--color-error-600);
|
|
}
|
|
}
|
|
}
|
|
|
|
.copy-icon {
|
|
cursor: pointer;
|
|
height: 24px;
|
|
width: 24px;
|
|
position: absolute;
|
|
top: 50%;
|
|
right: 24px;
|
|
transform: translate(0, -50%);
|
|
}
|
|
}
|