amis/packages/amis-ui/scss/components/_input-box.scss

100 lines
2.0 KiB
SCSS
Raw Normal View History

2020-05-14 17:06:42 +08:00
.#{$ns}InputBox {
@include input-input();
@include input-border();
2020-05-14 17:06:42 +08:00
2020-06-11 20:23:39 +08:00
&--inline {
display: inline-flex;
}
2020-06-03 17:19:14 +08:00
> input[readonly] {
cursor: inherit;
}
&.is-error,
.is-error > & {
border-color: var(--Form-input-onError-borderColor);
background: var(--Form-input-onError-bg);
2020-05-14 17:06:42 +08:00
}
&.is-focused {
border-color: var(--Form-input-onFocused-borderColor);
box-shadow: var(--Form-input-boxShadow);
background: var(--Form-input-onFocused-bg);
2020-05-14 17:06:42 +08:00
}
2020-06-03 17:19:14 +08:00
&.is-clickable:hover {
border-color: var(--Form-input-onFocused-borderColor);
box-shadow: var(--Form-input-boxShadow);
2020-06-03 17:19:14 +08:00
cursor: pointer;
}
2020-05-14 17:06:42 +08:00
&.is-error.is-focused {
border-color: var(--Form-input-onError-borderColor);
2020-05-14 17:06:42 +08:00
}
&.is-disabled {
color: var(--text--muted-color);
background: var(--Form-input-onDisabled-bg);
border-color: var(--Form-input-onDisabled-borderColor);
2020-05-14 17:06:42 +08:00
}
&-clear {
@include input-clear();
}
> svg {
display: inline-block;
width: 14px;
color: var(--icon-color);
margin-top: px2rem(2px);
2020-05-14 17:06:42 +08:00
}
> a {
cursor: pointer;
}
&-caret {
transition: transform var(--animation-duration) ease-out;
margin: 5px;
display: flex;
color: var(--Form-select-caret-iconColor);
&:hover {
color: var(--Form-select-caret-onHover-iconColor);
}
> svg {
width: px2rem(10px);
height: px2rem(10px);
top: 0;
}
}
&.is-active &-caret {
transform: rotate(180deg);
}
2023-04-24 18:19:32 +08:00
&.is-mobile {
border: none;
border-radius: 0;
border-bottom: var(--Form-input-borderWidth) solid
var(--Form-input-borderColor);
&.is-error,
.is-error > & {
border-bottom-color: var(--Form-input-onError-borderColor);
}
&.is-focused {
border-bottom-color: var(--Form-input-onFocused-borderColor);
}
&.is-error.is-focused {
border-bottom-color: var(--Form-input-onError-borderColor);
}
&.is-disabled {
border-bottom-color: var(--Form-input-onDisabled-borderColor);
}
}
2020-05-14 17:06:42 +08:00
}