@meleon/uni-ui
Version:
A uniapp components library written in vue3 and typescript
158 lines (157 loc) • 3.28 kB
text/less
.ml-input {
position: relative;
box-sizing: border-box;
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
&-title {
position: absolute;
width: 100%;
font-size: 16px;
color: var(--info-color-7);
.message {
border: unset;
background-color: unset;
box-shadow: unset;
float: right;
font-size: 12px;
}
.success-message {
color: var(--success-color-6);
}
.error-message {
color: var(--error-color-6);
}
}
&-wrapper {
position: relative;
box-sizing: border-box;
width: 100%;
padding: 0 8px;
border: solid 1px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: space-between;
border-color: var(--info-color-1);
background-color: var(--info-color-1);
box-shadow: 0 0 0 0 var(--primaryColorHover);
transition: all 0.2s ease;
overflow: hidden;
.overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.1;
background-color: var(--infor-color-5);
}
.input {
flex: 1;
font-size: 12px;
color: var(--info-color-7);
}
.ml-input-placeholder {
color: var(--info-color-7);
}
.icon {
height: 100%;
width: 20px;
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}
.prefix-icon {
margin-right: 8px;
}
.suffix-icon {
position: absolute;
right: 10px;
}
}
.error {
background-color: #ffffff;
// border: solid 1px #ff8282 ;
// box-shadow: 0 0 0 4px #ffc8c8;
}
.options-container {
position: relative;
box-sizing: border-box;
padding: 5px 10px;
display: flex;
flex-direction: column;
align-items: flex-start;
background-color: #ffffff;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
transform-style: preserve-3d;
.option {
margin: 5px 0;
}
}
.options-container::after {
content: '';
position: absolute;
top: -8px;
left: 35px;
display: block;
width: 0;
height: 0;
transform: translateZ(-10px);
border-width: 6px;
border-style: solid;
border-color: black;
}
.ml-virtual-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
opacity: 0.2;
background-color: #000000;
}
}
// focus
.ml-input--actived {
.ml-input-wrapper {
border-radius: 2px;
background-color: #ffffff;
border-color: var(--primary-color-6);
// box-shadow: 0 0 0 4px var(--primary-color-5);
}
}
// disabled
.ml-input--disabled {
.ml-input-wrapper {
border-color: var(--info-color-1);
background-color: var(--info-color-1);
.ml-input-placeholder {
color: var(--info-color-4);
}
}
}
// size
.ml-input-mini {
.ml-input-wrapper {
height: 28px;
}
}
.ml-input-small {
.ml-input-wrapper {
height: 32px;
}
}
.ml-input-medium {
.ml-input-wrapper {
height: 36px;
}
}
.ml-input-large {
.ml-input-wrapper {
height: 40px;
}
}