2019-04-30 11:11:25 +08:00
|
|
|
|
.#{$ns}Number {
|
2019-12-06 09:58:08 +08:00
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
line-height: var(--Form-input-height);
|
|
|
|
|
font-size: var(--Form-input-fontSize);
|
|
|
|
|
height: var(--Form-input-height);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: middle;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
background: var(--Number-bg);
|
2022-11-04 14:32:16 +08:00
|
|
|
|
border: var(--Number-borderWidth) solid var(--Form-input-borderColor);
|
2020-12-21 10:08:40 +08:00
|
|
|
|
border-radius: var(--Number-borderRadius);
|
2022-03-01 10:46:52 +08:00
|
|
|
|
overflow: hidden;
|
2023-02-23 14:56:47 +08:00
|
|
|
|
position: relative;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
|
border-width: var(--inputNumber-base-default-top-border-width)
|
|
|
|
|
var(--inputNumber-base-default-right-border-width)
|
|
|
|
|
var(--inputNumber-base-default-bottom-border-width)
|
|
|
|
|
var(--inputNumber-base-default-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-base-default-top-border-style)
|
|
|
|
|
var(--inputNumber-base-default-right-border-style)
|
|
|
|
|
var(--inputNumber-base-default-bottom-border-style)
|
|
|
|
|
var(--inputNumber-base-default-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-base-default-top-border-color)
|
|
|
|
|
var(--inputNumber-base-default-right-border-color)
|
|
|
|
|
var(--inputNumber-base-default-bottom-border-color)
|
|
|
|
|
var(--inputNumber-base-default-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-base-default-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-base-default-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-default-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-default-bottom-left-border-radius);
|
|
|
|
|
background: var(--inputNumber-base-default-bg-color);
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
border-width: var(--inputNumber-base-hover-top-border-width)
|
|
|
|
|
var(--inputNumber-base-hover-right-border-width)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-border-width)
|
|
|
|
|
var(--inputNumber-base-hover-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-base-hover-top-border-style)
|
|
|
|
|
var(--inputNumber-base-hover-right-border-style)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-border-style)
|
|
|
|
|
var(--inputNumber-base-hover-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-base-hover-top-border-color)
|
|
|
|
|
var(--inputNumber-base-hover-right-border-color)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-border-color)
|
|
|
|
|
var(--inputNumber-base-hover-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-base-hover-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-base-hover-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-left-border-radius);
|
|
|
|
|
background: var(--inputNumber-base-hover-bg-color);
|
|
|
|
|
}
|
2022-11-09 17:08:20 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-focused {
|
2023-01-06 20:36:45 +08:00
|
|
|
|
border-width: var(--inputNumber-base-active-top-border-width)
|
|
|
|
|
var(--inputNumber-base-active-right-border-width)
|
|
|
|
|
var(--inputNumber-base-active-bottom-border-width)
|
|
|
|
|
var(--inputNumber-base-active-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-base-active-top-border-style)
|
|
|
|
|
var(--inputNumber-base-active-right-border-style)
|
|
|
|
|
var(--inputNumber-base-active-bottom-border-style)
|
|
|
|
|
var(--inputNumber-base-active-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-base-active-top-border-color)
|
|
|
|
|
var(--inputNumber-base-active-right-border-color)
|
|
|
|
|
var(--inputNumber-base-active-bottom-border-color)
|
|
|
|
|
var(--inputNumber-base-active-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-base-active-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-base-active-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-active-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-active-bottom-left-border-radius);
|
|
|
|
|
background: var(--inputNumber-base-active-bg-color);
|
|
|
|
|
box-shadow: var(--inputNumber-base-active-shadow);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
|
&-disabled {
|
|
|
|
|
border-width: var(--inputNumber-base-disabled-top-border-width)
|
|
|
|
|
var(--inputNumber-base-disabled-right-border-width)
|
|
|
|
|
var(--inputNumber-base-disabled-bottom-border-width)
|
|
|
|
|
var(--inputNumber-base-disabled-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-base-disabled-top-border-style)
|
|
|
|
|
var(--inputNumber-base-disabled-right-border-style)
|
|
|
|
|
var(--inputNumber-base-disabled-bottom-border-style)
|
|
|
|
|
var(--inputNumber-base-disabled-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-base-disabled-top-border-color)
|
|
|
|
|
var(--inputNumber-base-disabled-right-border-color)
|
|
|
|
|
var(--inputNumber-base-disabled-bottom-border-color)
|
|
|
|
|
var(--inputNumber-base-disabled-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-base-disabled-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-base-disabled-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-disabled-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-disabled-bottom-left-border-radius);
|
|
|
|
|
background: var(--inputNumber-base-disabled-bg-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@include input-border();
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-handler {
|
|
|
|
|
text-align: center;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
display: block;
|
|
|
|
|
touch-action: none;
|
2019-05-15 16:10:20 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-active {
|
|
|
|
|
background: #ddd;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-handler-up-inner,
|
|
|
|
|
&-handler-down-inner {
|
|
|
|
|
user-select: none;
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:hover {
|
2022-07-26 17:21:43 +08:00
|
|
|
|
.#{$ns}Number-handler-wrap {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2022-11-09 17:08:20 +08:00
|
|
|
|
&.no-steps > &-handler-wrap {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-disabled:hover {
|
2022-04-25 10:33:54 +08:00
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-input-wrap {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-input {
|
|
|
|
|
width: 100%;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
background: transparent;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
text-align: left;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
outline: 0;
|
|
|
|
|
-moz-appearance: textfield;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
line-height: calc(var(--Form-input-height) - var(--Number-borderWidth) * 2);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
height: 100%;
|
2021-01-04 16:45:43 +08:00
|
|
|
|
transition: all var(--animation-duration) ease;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
border: 0;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
border-radius: var(--Form-input-borderRadius);
|
2022-03-01 10:46:52 +08:00
|
|
|
|
color: var(--Form-input-color);
|
2023-01-06 20:36:45 +08:00
|
|
|
|
padding: 0 var(--inputNumber-base-default-paddingRight) 0
|
|
|
|
|
var(--inputNumber-base-default-paddingLeft);
|
2022-11-04 14:32:16 +08:00
|
|
|
|
|
|
|
|
|
&::placeholder {
|
|
|
|
|
color: var(--Form-input-placeholderColor);
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-handler {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
background: var(--Number-handler-bg);
|
|
|
|
|
color: var(--Number-handler-color);
|
|
|
|
|
font-family: var(--Number-handler-fontFamily);
|
|
|
|
|
font-size: var(--Number-handler-fontSize);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
background: var(--Number-handler-onHover-bg);
|
|
|
|
|
color: var(--Number-handler-onHover-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
cursor: pointer;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:hover:active {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
background: var(--Number-handler-onActive-bg);
|
2023-01-06 20:36:45 +08:00
|
|
|
|
color: var(--inputNumber-base-active-icon-color);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-handler-up {
|
|
|
|
|
&-inner {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
transform: var(--Number-handler--up-transform);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:after {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
content: var(--Number-handler--up-content);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-08-12 21:14:33 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-handler-down {
|
|
|
|
|
&-inner {
|
|
|
|
|
&:after {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
content: var(--Number-handler--down-content);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-08-12 21:14:33 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
@if $Number-handler-mode==vertical {
|
|
|
|
|
&-handler-wrap {
|
2022-07-26 17:21:43 +08:00
|
|
|
|
display: none;
|
2023-02-23 14:56:47 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
border-left: px2rem(1px) solid var(--Form-input-borderColor);
|
|
|
|
|
width: var(--Number-handler-width);
|
|
|
|
|
height: 100%;
|
2023-05-08 13:28:07 +08:00
|
|
|
|
// 为了实现handle出现后,不遮挡内容,自然的留出padding的位置的效果
|
|
|
|
|
outline: var(--inputNumber-base-default-paddingRight)
|
|
|
|
|
var(--inputNumber-base-default-bg-color)
|
|
|
|
|
solid;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&-handler {
|
|
|
|
|
line-height: calc((var(--Form-input-height) - #{px2rem(6px)}) / 2);
|
|
|
|
|
height: calc(
|
|
|
|
|
(var(--Form-input-height) - var(--Number-borderWidth) * 2) / 2
|
|
|
|
|
);
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&-handler-up {
|
|
|
|
|
border-bottom: var(--Number-handler-borderBottom);
|
|
|
|
|
padding-top: px2rem(1px);
|
|
|
|
|
}
|
|
|
|
|
} @else {
|
|
|
|
|
position: relative;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&-input {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&-handler-up,
|
|
|
|
|
&-handler-down {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: var(--Number-handler-width);
|
|
|
|
|
height: 100%;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&-handler-down {
|
|
|
|
|
left: 0;
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
|
&-handler-up {
|
|
|
|
|
right: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
|
|
&-handler-down-disabled,
|
|
|
|
|
&-handler-up-disabled {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
background: var(--Number-handler-onDisabled-bg);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
pointer-events: none;
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--Number-handler-onDisabled-color);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-06 16:09:58 +08:00
|
|
|
|
.is-error > & {
|
|
|
|
|
border-color: var(--Form-input-onError-borderColor);
|
|
|
|
|
background: var(--Form-input-onError-bg);
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&-disabled {
|
2022-04-25 10:33:54 +08:00
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Number-input {
|
2022-04-25 10:33:54 +08:00
|
|
|
|
opacity: 0.72;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
cursor: not-allowed;
|
2022-03-24 20:22:16 +08:00
|
|
|
|
color: var(--text--muted-color);
|
|
|
|
|
background: var(--Form-input-onDisabled-bg);
|
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2022-04-25 10:33:54 +08:00
|
|
|
|
.#{$ns}Number-handler-wrap {
|
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
.#{$ns}Number-handler {
|
2022-04-25 10:33:54 +08:00
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
color: var(--text--muted-color);
|
|
|
|
|
background: var(--Form-input-onDisabled-bg);
|
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
opacity: 0.72;
|
2019-04-30 11:11:25 +08:00
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
|
&:hover {
|
2020-12-21 10:08:40 +08:00
|
|
|
|
color: var(--text--muted-color);
|
|
|
|
|
border-color: var(--Form-input-borderColor);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2022-04-25 10:33:54 +08:00
|
|
|
|
&:hover:active {
|
|
|
|
|
background: var(--Form-input-onDisabled-bg);
|
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-06 20:36:45 +08:00
|
|
|
|
.#{$ns}Form-control--sizeSm > .#{$ns}Number {
|
|
|
|
|
height: var(--inputNumber-size-sm-height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-control--sizeMd > .#{$ns}Number {
|
|
|
|
|
height: var(--inputNumber-size-md-height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Form-control--sizeLg > .#{$ns}Number {
|
|
|
|
|
height: var(--inputNumber-size-lg-height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}NumberControl {
|
|
|
|
|
&:not(.is-inline) > .#{$ns}Number {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
2019-05-15 16:10:20 +08:00
|
|
|
|
}
|
2021-08-18 14:53:26 +08:00
|
|
|
|
|
2021-10-19 09:59:39 +08:00
|
|
|
|
.#{$ns}Number--borderHalf,
|
|
|
|
|
.#{$ns}Number--borderNone {
|
2021-08-18 14:53:26 +08:00
|
|
|
|
.#{$ns}Number-handler-wrap {
|
|
|
|
|
border-left: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-10-19 09:59:39 +08:00
|
|
|
|
|
|
|
|
|
.#{$ns}NumberControl--withUnit {
|
|
|
|
|
display: flex;
|
2023-05-05 11:18:37 +08:00
|
|
|
|
|
2023-03-10 15:38:02 +08:00
|
|
|
|
&:hover {
|
|
|
|
|
.#{$ns}Number,
|
|
|
|
|
.#{$ns}NumberControl-unit {
|
|
|
|
|
border-width: var(--inputNumber-base-hover-top-border-width)
|
|
|
|
|
var(--inputNumber-base-hover-right-border-width)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-border-width)
|
|
|
|
|
var(--inputNumber-base-hover-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-base-hover-top-border-style)
|
|
|
|
|
var(--inputNumber-base-hover-right-border-style)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-border-style)
|
|
|
|
|
var(--inputNumber-base-hover-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-base-hover-top-border-color)
|
|
|
|
|
var(--inputNumber-base-hover-right-border-color)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-border-color)
|
|
|
|
|
var(--inputNumber-base-hover-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-base-hover-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-base-hover-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-hover-bottom-left-border-radius);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-10-19 09:59:39 +08:00
|
|
|
|
.#{$ns}Number {
|
|
|
|
|
flex-grow: 1;
|
2023-03-10 15:38:02 +08:00
|
|
|
|
border-top-right-radius: 0 !important;
|
|
|
|
|
border-bottom-right-radius: 0 !important;
|
|
|
|
|
border-right: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Number-focused + .#{$ns}NumberControl-unit {
|
|
|
|
|
border-width: var(--inputNumber-base-active-top-border-width)
|
|
|
|
|
var(--inputNumber-base-active-right-border-width)
|
|
|
|
|
var(--inputNumber-base-active-bottom-border-width)
|
|
|
|
|
var(--inputNumber-base-active-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-base-active-top-border-style)
|
|
|
|
|
var(--inputNumber-base-active-right-border-style)
|
|
|
|
|
var(--inputNumber-base-active-bottom-border-style)
|
|
|
|
|
var(--inputNumber-base-active-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-base-active-top-border-color)
|
|
|
|
|
var(--inputNumber-base-active-right-border-color)
|
|
|
|
|
var(--inputNumber-base-active-bottom-border-color)
|
|
|
|
|
var(--inputNumber-base-active-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-base-active-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-base-active-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-active-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-base-active-bottom-left-border-radius);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
& .#{$ns}NumberControl-unit {
|
|
|
|
|
border-top-left-radius: 0 !important;
|
|
|
|
|
border-bottom-left-radius: 0 !important;
|
2023-05-05 11:18:37 +08:00
|
|
|
|
background-color: var(--inputNumber-base-unit-bg-color);
|
2023-03-10 15:38:02 +08:00
|
|
|
|
min-width: var(--inputNumber-base-default-unit-width);
|
|
|
|
|
padding: var(--inputNumber-base-default-unit-paddingTop)
|
|
|
|
|
var(--inputNumber-base-default-unit-paddingRight)
|
|
|
|
|
var(--inputNumber-base-default-unit-paddingBottom)
|
|
|
|
|
var(--inputNumber-base-default-unit-paddingLeft);
|
2021-10-19 09:59:39 +08:00
|
|
|
|
}
|
2023-03-10 15:38:02 +08:00
|
|
|
|
.#{$ns}NumberControl-single-unit {
|
|
|
|
|
cursor: default;
|
2023-05-05 11:18:37 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
min-width: unset;
|
|
|
|
|
padding: 0 var(--inputNumber-base-default-unit-paddingLeft);
|
2021-10-19 09:59:39 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-04-25 10:33:54 +08:00
|
|
|
|
.#{$ns}Number--enhance {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
border: var(--Number-borderWidth) solid var(--Number-borderColor);
|
|
|
|
|
border-radius: var(--Number-borderRadius);
|
|
|
|
|
overflow: hidden;
|
2023-01-06 20:36:45 +08:00
|
|
|
|
|
|
|
|
|
border-width: var(--inputNumber-enhance-default-top-border-width)
|
|
|
|
|
var(--inputNumber-enhance-default-right-border-width)
|
|
|
|
|
var(--inputNumber-enhance-default-bottom-border-width)
|
|
|
|
|
var(--inputNumber-enhance-default-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-enhance-default-top-border-style)
|
|
|
|
|
var(--inputNumber-enhance-default-right-border-style)
|
|
|
|
|
var(--inputNumber-enhance-default-bottom-border-style)
|
|
|
|
|
var(--inputNumber-enhance-default-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-enhance-default-top-border-color)
|
|
|
|
|
var(--inputNumber-enhance-default-right-border-color)
|
|
|
|
|
var(--inputNumber-enhance-default-bottom-border-color)
|
|
|
|
|
var(--inputNumber-enhance-default-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-enhance-default-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-default-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-default-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-default-bottom-left-border-radius);
|
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
background: var(--inputNumber-enhance-default-bg-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
border-width: var(--inputNumber-enhance-hover-top-border-width)
|
|
|
|
|
var(--inputNumber-enhance-hover-right-border-width)
|
|
|
|
|
var(--inputNumber-enhance-hover-bottom-border-width)
|
|
|
|
|
var(--inputNumber-enhance-hover-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-enhance-hover-top-border-style)
|
|
|
|
|
var(--inputNumber-enhance-hover-right-border-style)
|
|
|
|
|
var(--inputNumber-enhance-hover-bottom-border-style)
|
|
|
|
|
var(--inputNumber-enhance-hover-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-enhance-hover-top-border-color)
|
|
|
|
|
var(--inputNumber-enhance-hover-right-border-color)
|
|
|
|
|
var(--inputNumber-enhance-hover-bottom-border-color)
|
|
|
|
|
var(--inputNumber-enhance-hover-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-enhance-hover-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-hover-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-hover-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-hover-bottom-left-border-radius);
|
2023-02-23 14:56:47 +08:00
|
|
|
|
.#{$ns}Number-input {
|
|
|
|
|
padding-right: var(--inputNumber-base-default-paddingRight);
|
|
|
|
|
}
|
2023-01-06 20:36:45 +08:00
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
background: var(--inputNumber-enhance-hover-bg-color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:focus-within {
|
|
|
|
|
border-width: var(--inputNumber-enhance-active-top-border-width)
|
|
|
|
|
var(--inputNumber-enhance-active-right-border-width)
|
|
|
|
|
var(--inputNumber-enhance-active-bottom-border-width)
|
|
|
|
|
var(--inputNumber-enhance-active-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-enhance-active-top-border-style)
|
|
|
|
|
var(--inputNumber-enhance-active-right-border-style)
|
|
|
|
|
var(--inputNumber-enhance-active-bottom-border-style)
|
|
|
|
|
var(--inputNumber-enhance-active-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-enhance-active-top-border-color)
|
|
|
|
|
var(--inputNumber-enhance-active-right-border-color)
|
|
|
|
|
var(--inputNumber-enhance-active-bottom-border-color)
|
|
|
|
|
var(--inputNumber-enhance-active-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-enhance-active-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-active-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-active-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-active-bottom-left-border-radius);
|
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
background: var(--inputNumber-enhance-active-bg-color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-disabled {
|
|
|
|
|
border-width: var(--inputNumber-enhance-disabled-top-border-width)
|
|
|
|
|
var(--inputNumber-enhance-disabled-right-border-width)
|
|
|
|
|
var(--inputNumber-enhance-disabled-bottom-border-width)
|
|
|
|
|
var(--inputNumber-enhance-disabled-left-border-width);
|
|
|
|
|
border-style: var(--inputNumber-enhance-disabled-top-border-style)
|
|
|
|
|
var(--inputNumber-enhance-disabled-right-border-style)
|
|
|
|
|
var(--inputNumber-enhance-disabled-bottom-border-style)
|
|
|
|
|
var(--inputNumber-enhance-disabled-left-border-style);
|
|
|
|
|
border-color: var(--inputNumber-enhance-disabled-top-border-color)
|
|
|
|
|
var(--inputNumber-enhance-disabled-right-border-color)
|
|
|
|
|
var(--inputNumber-enhance-disabled-bottom-border-color)
|
|
|
|
|
var(--inputNumber-enhance-disabled-left-border-color);
|
|
|
|
|
border-radius: var(--inputNumber-enhance-disabled-top-left-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-disabled-top-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-disabled-bottom-right-border-radius)
|
|
|
|
|
var(--inputNumber-enhance-disabled-bottom-left-border-radius);
|
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
background: var(--inputNumber-enhance-disabled-bg-color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Number-input {
|
|
|
|
|
padding: var(--inputNumber-enhance-default-paddingTop)
|
|
|
|
|
var(--inputNumber-enhance-default-paddingRight)
|
|
|
|
|
var(--inputNumber-enhance-default-paddingBottom)
|
|
|
|
|
var(--inputNumber-enhance-default-paddingLeft);
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-25 10:33:54 +08:00
|
|
|
|
.#{$ns}Number--enhance-left-icon,
|
|
|
|
|
.#{$ns}Number--enhance-right-icon {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: var(--Form-inputNumber-base-width);
|
|
|
|
|
height: var(--Form-inputNumber-base-height);
|
|
|
|
|
line-height: var(--Form-inputNumber-base-height);
|
|
|
|
|
text-align: center;
|
2023-01-06 20:36:45 +08:00
|
|
|
|
color: var(--inputNumber-enhance-leftIcon-default-color);
|
|
|
|
|
& > svg {
|
|
|
|
|
width: var(--fontSizeSm);
|
|
|
|
|
height: var(--fontSizeSm);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-left-icon {
|
|
|
|
|
background: var(--inputNumber-enhance-leftIcon-default-bg-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
&:hover {
|
2022-07-26 17:21:43 +08:00
|
|
|
|
cursor: pointer;
|
2023-01-06 20:36:45 +08:00
|
|
|
|
background: var(--inputNumber-enhance-leftIcon-hover-bg-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
&-focused {
|
2023-01-06 20:36:45 +08:00
|
|
|
|
background: var(--inputNumber-enhance-leftIcon-active-bg-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
}
|
2023-01-06 20:36:45 +08:00
|
|
|
|
.InputNumber-enhance-minus {
|
|
|
|
|
content: var(--inputNumber-enhance-leftIcon-default-icon);
|
|
|
|
|
}
|
|
|
|
|
svg {
|
2023-01-06 21:10:51 +08:00
|
|
|
|
width: var(--inputNumber-enhance-leftIcon-default-width);
|
|
|
|
|
height: var(--inputNumber-enhance-leftIcon-default-height);
|
2023-01-06 20:36:45 +08:00
|
|
|
|
color: var(--inputNumber-enhance-leftIcon-default-color);
|
|
|
|
|
&:hover {
|
|
|
|
|
color: var(--inputNumber-enhance-leftIcon-hover-color);
|
|
|
|
|
}
|
|
|
|
|
&:active {
|
|
|
|
|
color: var(--inputNumber-enhance-leftIcon-active-color);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-right-icon {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
background: var(--inputNumber-enhance-rightIcon-default-bg-color);
|
|
|
|
|
&:hover {
|
|
|
|
|
background: var(--inputNumber-enhance-rightIcon-hover-bg-color);
|
|
|
|
|
}
|
|
|
|
|
&:active {
|
|
|
|
|
background: var(--inputNumber-enhance-rightIcon-active-bg-color);
|
|
|
|
|
}
|
|
|
|
|
.InputNumber-enhance-plus {
|
|
|
|
|
content: var(--inputNumber-enhance-rightIcon-default-icon);
|
|
|
|
|
}
|
|
|
|
|
svg {
|
|
|
|
|
width: var(--inputNumber-enhance-rightIcon-default-height);
|
|
|
|
|
height: var(--inputNumber-enhance-rightIcon-default-width);
|
|
|
|
|
color: var(--inputNumber-enhance-rightIcon-default-color);
|
|
|
|
|
&:hover {
|
|
|
|
|
color: var(--inputNumber-enhance-rightIcon-hover-color);
|
|
|
|
|
}
|
|
|
|
|
&:active {
|
|
|
|
|
color: var(--inputNumber-enhance-rightIcon-active-color);
|
|
|
|
|
}
|
2022-04-25 10:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-left-icon {
|
|
|
|
|
border-top-left-radius: var(--Number-borderRadius);
|
|
|
|
|
border-bottom-left-radius: var(--Number-borderRadius);
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-right-icon {
|
|
|
|
|
border-top-right-radius: var(--Number-borderRadius);
|
|
|
|
|
border-bottom-right-radius: var(--Number-borderRadius);
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
flex: 1;
|
|
|
|
|
border: 0;
|
|
|
|
|
border-left: var(--Number-borderWidth) solid var(--Number-borderColor);
|
|
|
|
|
border-right: var(--Number-borderWidth) solid var(--Number-borderColor);
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
.#{$ns}Number-handler-wrap {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: var(--Form-input-onFocused-borderColor);
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-border-min,
|
2022-07-26 17:21:43 +08:00
|
|
|
|
.#{$ns}Number--enhance-border-max {
|
2022-04-25 10:33:54 +08:00
|
|
|
|
background: var(--Number-handler-onDisabled-bg);
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
color: var(--Number-handler-onDisabled-color);
|
|
|
|
|
&:hover {
|
2022-07-26 17:21:43 +08:00
|
|
|
|
background: var(--Number-handler-onDisabled-bg);
|
|
|
|
|
color: var(--Number-handler-onDisabled-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-border-disabled {
|
2023-01-06 20:36:45 +08:00
|
|
|
|
background: var(--inputNumber-enhance-disabled-bg-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
&:hover {
|
2022-07-26 17:21:43 +08:00
|
|
|
|
cursor: not-allowed;
|
2023-01-06 20:36:45 +08:00
|
|
|
|
background: var(--inputNumber-enhance-disabled-bg-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-border-readOnly,
|
|
|
|
|
.#{$ns}Number--enhance-border-readOnly {
|
|
|
|
|
&:hover {
|
2022-07-26 17:21:43 +08:00
|
|
|
|
color: var(--Number-handler-onHover-color);
|
2022-04-25 10:33:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Number--enhance-no-steps {
|
|
|
|
|
.#{$ns}Number--enhance-left-icon,
|
|
|
|
|
.#{$ns}Number--enhance-right-icon {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: var(--Number-borderRadius);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-26 17:21:43 +08:00
|
|
|
|
.#{$ns}Number--enhance-disabled {
|
2022-04-25 10:33:54 +08:00
|
|
|
|
.#{$ns}Number--enhance-input {
|
|
|
|
|
border-color: var(--Form-input-onDisabled-borderColor);
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: var(--Number-borderColor);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.#{$ns}Number--enhance-borderNone,
|
|
|
|
|
.#{$ns}Number--enhance-borderHalf {
|
|
|
|
|
border: none;
|
|
|
|
|
}
|